Comments (1)
That's great to hear! I use them for PKs in a number of projects as well in MSSQL / AzureDB projects.
You can query for COMBs falling within a date range. If your SQL is being dynamically generated from .NET code, you can just create the boundary COMBs for your query parameters like this (untested):
var fromComb = provider.Create(Guid.Empty, startDateTime);
var toComb = provider.Create(new Guid("FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF", endDateTime);
If you're looking to convert from a date range to a COMB query directly in T-SQL (for example, feeding datetime
values to a stored procedure and having it search on the COMB values), you can use the T-SQL examples shown in the README for your chosen provider to combine the "empty" and "full" GUID values with your start and end datetime
values, respectively.
Either way, you'll be able to take full advantage of indexing. It's not as efficient as a "real" datetime column and index, of course, but it's fine for a wide range of use cases.
from rt.comb.
Related Issues (20)
- Migrating from SQL Server to PostgreSQL with COMB guids HOT 2
- Comparing two Guid (created with RT.Comb) if lower HOT 1
- Binary order for PostgreSql and Sqlite what Provider or Strategy to use. HOT 6
- Installing NuGet package pulls in lots of unwanted "dependencies" HOT 2
- deploy into SQL Server HOT 2
- Create AspNetCore package HOT 5
- RT.Comb.Provider.Postgre.Create().ToString("N") JavaScript version. HOT 1
- check whether a Guid is an RT.Comb one HOT 2
- T-SQL in README for extracting DateTime from COMB needs some tweaks HOT 2
- PostgreSqlCombProvider not sequential in Postgresql HOT 2
- MySql Support HOT 2
- Full comb from timestamp HOT 1
- Question about existing SQL Server Tables HOT 1
- .NET Framework v4.6 is too restrictive HOT 2
- PostgreSql bad byte order HOT 1
- MsSQL bad order when creating Guids in for loop HOT 4
- Unit Test runner not working under OS X HOT 1
- Add zero configuration support HOT 2
- test result show not sorted HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rt.comb.