Giter Site home page Giter Site logo

Comments (8)

damianh avatar damianh commented on May 22, 2024

A solution would be in the ReadStreamForward to use StreamVersion instead of Ordinal as the orderby clause.

hmm, they should both be in the right order. It's needed when reading all streams.

from sqlstreamstore.

bwaterschoot avatar bwaterschoot commented on May 22, 2024

Not sure whether you'll be able to pull that off:
http://blogs.msdn.com/b/sqltips/archive/2005/07/20/441053.aspx

from sqlstreamstore.

damianh avatar damianh commented on May 22, 2024

Last resort is that I dump the TVP approach.

from sqlstreamstore.

yreynhout avatar yreynhout commented on May 22, 2024

Isn't there a UC on the Ordinal column? Why not hand it out yourself (much like the StreamVersion)? I'm probably oversimplifying ...

from sqlstreamstore.

damianh avatar damianh commented on May 22, 2024

@yreynhout it's an identity column https://github.com/damianh/Cedar.EventStore/blob/master/src/Cedar.EventStore.MsSql2008/SqlScripts/InitializeStore.sql#L13 . How would I do that from the client side? Only thing I can think of is some sort of counter that a client can 'take' x number of "ordinals"

from sqlstreamstore.

yreynhout avatar yreynhout commented on May 22, 2024

Not from the client side, but inside the store/the script. Identity columns have been "replaced" by sequences in sql server anyway. Try it in Azure, you'll see the holes appear ...

from sqlstreamstore.

damianh avatar damianh commented on May 22, 2024

SQL Server 2012 introduced support for the sequence object as an alternative to the identity column property for generating surrogate keys.

http://sqlmag.com/sql-server/sequence-and-identity-performance

Well aren't I out of date with sql server.

I want to support 2008(R2) though, does this look viable? https://blogs.msdn.microsoft.com/askjay/2012/10/08/sequence-objects-in-sql-2012-and-sql-2008/

from sqlstreamstore.

LeeCampbell avatar LeeCampbell commented on May 22, 2024

I have provided a fairly simple fix in PR #20. It has been over 10 years since I wore a SQL hat, so would appreciate the criticism if it is not appropriate.

from sqlstreamstore.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.