-
-
Notifications
You must be signed in to change notification settings - Fork 134
GOTCHA!
You have entered the forest of goblins! A collection of gotchas goblins to look out for when using the driver or they may give you pain and headaches. Being aware of these gotchas will help you slay goblins should you encounter them on your journey to greatness. Take heed the warnings from your forefathers and foremothers for they have distilled onto you the knowledge so that you may succeed. Beware, ugly goblins ahead!
Bad things happen when DateTime.MinValue
is used. For example, you might be tempted to use DateTime.MinValue
:
DateTime.MinValue = 1/1/0001 12:00:00 AM
The minimum date time supported by RehtinkDB is:
1/1/1400
You will run into problems trying to store 0001
when the minimum is 1400
. Use DateTime?
nullable to indicate a time has not been set.
See Issue 49 and 66. Additionally, .NET Core DateTime.MinValue
calculations are different between Windows and Linux platforms. See dotnet/corefx:Issue 9019.
The moral of story: Use DateTime? foo = null
for MinValue
.
This won't work:
var items = Table("foo").RunAtomAsync<IEnumerable<JObject>>(conn);
This will:
var items = Table("foo").RunAtomAsync<JArray>(conn);
See Issue 65.
This also applies for the .RunChanges<T>
run helper. .RunChanges<JObject>
is just a simple wrapper for .RunCursor<Change<T>>
. If the desired call is .RunChanges<JObject>
simply use .RunCursor<JObject>()
instead. See Issue 99.
If you are building dynamic queries using ReQL terms, you might do something like:
if( expr == null )
And you'll get a mysterious exception. However, this will work:
if( ReferenceEquals(expr, null) )
See Issue 55.
- Home
- Query Examples
- Logging
- Connections & Pooling
- Extra C# Features
- GOTCHA Goblins!
- LINQ to ReQL Provider
- Differences
- Java ReQL API Documentation