Comments (6)
Hey @oliverjanik , I think you need to use ReferenceEquals
when comparing null
with the AST ReqlExpr
.
Could you provide more context with how you're using and why you're checking null
?
Thanks,
Brian
from rethinkdb.driver.
Yeah that's what I ended up doing, but it confused the hell out of me for a while. Is it intended to be like that?
from rethinkdb.driver.
@oliverjanik Yea, the operator overload for ==
is intended. This allows us to write queries like:
.Filter(g => g[nameof(Game.points)].Eq(9))
.Filter(g => g[nameof(Game.points)] == 9) //op overload
Fancy! 👍
Wiki docs for this are here: https://github.com/bchavez/RethinkDb.Driver/wiki/Extra-C%23-Driver-Features#implicit-conversion-operator-overload
from rethinkdb.driver.
g[nameof(Game.points)]
is never null in these situations, would a null check break anything?
from rethinkdb.driver.
Hey Oliver,
g[nameof(Game.points)]
isn't null
per se but I think the field in the JSON document could be null
. The server would have the necessary information.
Consider what happens with:
(g => g[nameof(Game.points)] == 9)
This check doesn't happen on the client, it happens on the server. == 9
gets converted into ReQL: .Eq(9)
. Same would apply for null
: == null -> .Eq(null)
.
🍷 🌴 _"Get drunk on the good life, I'll take you to paradise..."_
from rethinkdb.driver.
Alright then, I'm closing this issue.
On a sidenote: It feels like Rethink guys reinvented Expression trees in their Java driver.
from rethinkdb.driver.
Related Issues (20)
- Create a method to return result as raw json HOT 4
- Resolution function on OptArg insert conflict HOT 1
- ConnectionPool.Builder.ConnectAsync does not respect InitialTimeout() HOT 4
- Add Error codes to Exceptions HOT 2
- Additional exceptions thrown when trying to cancel Cursor.MoveNextAsync() HOT 6
- Object's primary key and key of RunAtom() is different (Client-side generation). HOT 4
- Support for System.Text.Json.JsonDocument
- Cursor<T> should implement IAsyncEnumerable<T> in .net core 3
- RethinkDB 2.4 Release
- Best options: RunResult, RunAtom or RunCursor HOT 3
- Get list from Table that contains 'A' in the 'message' field HOT 1
- ASL 2.0 HOT 1
- Implement lambda functions as a possible argument in Insert().OptArgs("conflict",...) HOT 1
- System.NullReferenceException HOT 1
- Add EntityFramework support to Linq provider HOT 5
- Polymorphism HOT 1
- Various exceptions when updating a document HOT 1
- System.Configuration.ConfigurationErrorsException: HOT 1
- Wrong OptArg serialisation after OrderBy
- Insert not working with RunNoReply & Can't use runOpts is always null -- solved
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 rethinkdb.driver.