couchbaselabs / couchbaselabs/Linq2Couchbase

F# support for Option type

Open
#147 1 comment 2 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
98
Forks
50
PR merge metrics
No merged PRs in 30d

Description

One thing that would be really nice would be to have support for F# option types.

e.g.

``` fsharp
type Person = { Name : string option; Age : int }

...
let q =
query {
for person in context.Query() do
where (person.Name = Some("Roger"))
select person
}
```

This results in a syntax error when emitting the N1QL, which tbh was expected, but as F# does not use `null` or nullable types but rather Option types, this would be a nice addition.
Half of it already works, you can query for `person.Name = None` and I guess `None` somehow gets translated to null somewhere.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.