RethinkDb.Driver.FSharp 0.9.0-beta-07

.NET 6.0 .NET Standard 2.0
This is a prerelease version of RethinkDb.Driver.FSharp.
Install-Package RethinkDb.Driver.FSharp -Version 0.9.0-beta-07
dotnet add package RethinkDb.Driver.FSharp --version 0.9.0-beta-07
<PackageReference Include="RethinkDb.Driver.FSharp" Version="0.9.0-beta-07" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add RethinkDb.Driver.FSharp --version 0.9.0-beta-07
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: RethinkDb.Driver.FSharp, 0.9.0-beta-07"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install RethinkDb.Driver.FSharp as a Cake Addin
#addin nuget:?package=RethinkDb.Driver.FSharp&version=0.9.0-beta-07&prerelease

// Install RethinkDb.Driver.FSharp as a Cake Tool
#tool nuget:?package=RethinkDb.Driver.FSharp&version=0.9.0-beta-07&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

RethinkDb.Driver.FSharp

This package provides idiomatic F# extensions on the official C# driver. Within this package:

Connection Configuration / Creation

open RethinkDb.Driver.FSharp

let dataCfg = DataConfig.fromJson "rethink-config.json"
// - or -
let dataCfg = DataConfig.fromConfiguration [config-section]
// - or -
let dataCfg = DataConfig.fromUri [connection-string]

let conn = dataCfg.CreateConnection ()  // IConnection

Domain-Specific Language (DSL) / Computation Expression (CE) Style

open RethinkDb.Driver.FSharp

// Remove the conn parameter and usage for point-free style

let getPost postId conn =
    rethink<Post> {
        withTable "Post"
        get postId
        resultOption
        withRetryOptionDefault conn
    }

let updatePost post conn =
    rethink {
        withTable "Post"
        get post.id
        update post
        write
        ignoreResult
        withRetryDefault conn
    }

Function Style

open RethinkDb.Driver.FSharp.Functions

// Remove the conn parameter and usage for point-free style

let getPost postId conn =
    fromTable "Post"
    |> get postId
    |> runResult<Post>
    |> asOption
    |> withRetryDefault
    |> withConn conn

let updatePost post conn =
    fromTable "Post"
    |> get post.id
    |> update post
    |> runWrite
    |> ignoreResult
    |> withRetryDefault
    |> withConn conn

Retry Logic

The driver does not reconnect automatically when the underlying connection has been interrupted. When specified, the retry logic attempts to reconnect; default retries wait 200ms, 500ms, and 1 second. There are also functions to retry once, and those that allow the intervals to be specified.

Strongly-Typed Optional Arguments

Many RethinkDB commands support optional arguments to tweak the behavior of that command. A quick example using the between command (clause):

// ...
    between 1 100 [ LowerBound Open; UpperBound Closed ]
// ...

More information is available on the project site.

Product Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows
.NET Core netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1
.NET Standard netstandard2.0 netstandard2.1
.NET Framework net461 net462 net463 net47 net471 net472 net48
MonoAndroid monoandroid
MonoMac monomac
MonoTouch monotouch
Tizen tizen40 tizen60
Xamarin.iOS xamarinios
Xamarin.Mac xamarinmac
Xamarin.TVOS xamarintvos
Xamarin.WatchOS xamarinwatchos
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on RethinkDb.Driver.FSharp:

Package Downloads
RethinkDB.DistributedCache

An IDistributedCache implementation utilizing RethinkDB for storage

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.9.0-beta-07 60 7/19/2022
0.9.0-beta-06 43 7/18/2022
0.9.0-beta-05 93 6/16/2022
0.9.0-beta-04 51 6/14/2022
0.9.0-beta-03 128 5/25/2022
0.9.0-beta-02 45 5/24/2022
0.9.0-beta-01 50 5/18/2022
0.8.0-alpha-0009 57 4/29/2022
0.8.0-alpha-0008 56 4/27/2022
0.8.0-alpha-0007 56 4/22/2022
0.8.0-alpha-0005 56 4/21/2022
0.8.0-alpha-0004 55 4/21/2022
0.8.0-alpha-0003 57 4/19/2022
0.8.0-alpha-0001 54 4/19/2022

Add URI config option and logging CreateConnection overloads