diff --git a/src/RethinkDb.Driver.FSharp/Builder.fs b/src/RethinkDb.Driver.FSharp/Builder.fs index 0973e2d..23ed414 100644 --- a/src/RethinkDb.Driver.FSharp/Builder.fs +++ b/src/RethinkDb.Driver.FSharp/Builder.fs @@ -934,6 +934,16 @@ type RethinkBuilder<'T> () = member this.WithRetryOption (f : IConnection -> Task<'T option>, retries : float seq, conn : IConnection) = this.WithRetryOption (f, retries) conn + /// Retries a variable number of times, waiting each time for the seconds specified + [] + member _.WithRetryCursor (f : IConnection -> Task>, retries : float seq) = + withRetry> retries f + + /// Retries a variable number of times, waiting each time for the seconds specified + [] + member this.WithRetryCursor (f : IConnection -> Task>, retries : float seq, conn : IConnection) = + this.WithRetryCursor (f, retries) conn + /// Retries a variable number of times, waiting each time for the seconds specified [] member _.WithAsyncRetry (f : IConnection -> Async<'T>, retries : float seq) = withAsyncRetry<'T> retries f @@ -953,6 +963,16 @@ type RethinkBuilder<'T> () = member this.WithAsyncRetryOption (f : IConnection -> Async<'T option>, retries : float seq, conn : IConnection) = this.WithAsyncRetryOption (f, retries) conn + /// Retries a variable number of times, waiting each time for the seconds specified + [] + member _.WithAsyncRetryCursor (f : IConnection -> Async>, retries : float seq) = + withAsyncRetry> retries f + + /// Retries a variable number of times, waiting each time for the seconds specified + [] + member this.WithAsyncRetryCursor (f : IConnection -> Async>, retries : float seq, conn : IConnection) = + this.WithAsyncRetryCursor (f, retries) conn + /// Retries a variable number of times, waiting each time for the seconds specified [] member _.WithSyncRetry (f : IConnection -> 'T, retries : float seq) = withSyncRetry<'T> retries f @@ -972,6 +992,16 @@ type RethinkBuilder<'T> () = member this.WithSyncRetryOption (f : IConnection -> 'T option, retries : float seq, conn : IConnection) = this.WithSyncRetryOption (f, retries) conn + /// Retries a variable number of times, waiting each time for the seconds specified + [] + member _.WithSyncRetryCursor (f : IConnection -> Cursor<'T>, retries : float seq) = + withSyncRetry> retries f + + /// Retries a variable number of times, waiting each time for the seconds specified + [] + member this.WithSyncRetryCursor (f : IConnection -> Cursor<'T>, retries : float seq, conn : IConnection) = + this.WithSyncRetryCursor (f, retries) conn + /// Retries at 200ms, 500ms, and 1s [] member _.WithRetryDefault (f : IConnection -> Task<'T>) = withRetryDefault<'T> f @@ -989,6 +1019,15 @@ type RethinkBuilder<'T> () = member this.WithRetryOptionDefault (f : IConnection -> Task<'T option>, conn : IConnection) = this.WithRetryOptionDefault f conn + /// Retries at 200ms, 500ms, and 1s + [] + member _.WithRetryCursorDefault (f : IConnection -> Task>) = withRetryDefault> f + + /// Retries at 200ms, 500ms, and 1s + [] + member this.WithRetryCursorDefault (f : IConnection -> Task>, conn : IConnection) = + this.WithRetryCursorDefault f conn + /// Retries at 200ms, 500ms, and 1s [] member _.WithAsyncRetryDefault (f : IConnection -> Async<'T>) = withAsyncRetryDefault<'T> f @@ -1007,6 +1046,15 @@ type RethinkBuilder<'T> () = member this.WithAsyncRetryOptionDefault (f : IConnection -> Async<'T option>, conn : IConnection) = this.WithAsyncRetryOptionDefault f conn + /// Retries at 200ms, 500ms, and 1s + [] + member _.WithAsyncRetryCursorDefault (f : IConnection -> Async>) = withAsyncRetryDefault> f + + /// Retries at 200ms, 500ms, and 1s + [] + member this.WithAsyncRetryCursorDefault (f : IConnection -> Async>, conn : IConnection) = + this.WithAsyncRetryCursorDefault f conn + /// Retries at 200ms, 500ms, and 1s [] member _.WithSyncRetryDefault (f : IConnection -> 'T) = withSyncRetryDefault<'T> f @@ -1024,6 +1072,15 @@ type RethinkBuilder<'T> () = member this.WithSyncRetryOptionDefault (f : IConnection -> 'T option, conn : IConnection) = this.WithSyncRetryOptionDefault f conn + /// Retries at 200ms, 500ms, and 1s + [] + member _.WithSyncRetryCursorDefault (f : IConnection -> Cursor<'T>) = withSyncRetryDefault> f + + /// Retries at 200ms, 500ms, and 1s + [] + member this.WithSyncRetryCursorDefault (f : IConnection -> Cursor<'T>, conn : IConnection) = + this.WithSyncRetryCursorDefault f conn + /// Retries once immediately [] member _.WithRetryOnce (f : IConnection -> Task<'T>) = withRetryOnce<'T> f @@ -1041,6 +1098,15 @@ type RethinkBuilder<'T> () = member this.WithRetryOptionOnce (f : IConnection -> Task<'T option>, conn : IConnection) = this.WithRetryOptionOnce f conn + /// Retries once immediately + [] + member _.WithRetryCursorOnce (f : IConnection -> Task>) = withRetryOnce> f + + /// Retries once immediately + [] + member this.WithRetryCursorOnce (f : IConnection -> Task>, conn : IConnection) = + this.WithRetryCursorOnce f conn + /// Retries once immediately [] member _.WithAsyncRetryOnce (f : IConnection -> Async<'T>) = withAsyncRetryOnce<'T> f @@ -1058,6 +1124,15 @@ type RethinkBuilder<'T> () = member this.WithAsyncRetryOptionOnce (f : IConnection -> Async<'T option>, conn : IConnection) = this.WithAsyncRetryOptionOnce f conn + /// Retries once immediately + [] + member _.WithAsyncRetryCursorOnce (f : IConnection -> Async>) = withAsyncRetryOnce> f + + /// Retries once immediately + [] + member this.WithAsyncRetryCursorOnce (f : IConnection -> Async>, conn : IConnection) = + this.WithAsyncRetryCursorOnce f conn + /// Retries once immediately [] member _.WithSyncRetryOnce (f : IConnection -> 'T) = withSyncRetryOnce<'T> f @@ -1075,6 +1150,15 @@ type RethinkBuilder<'T> () = member this.WithSyncRetryOptionOnce (f : IConnection -> 'T option, conn : IConnection) = this.WithSyncRetryOptionOnce f conn + /// Retries once immediately + [] + member _.WithSyncRetryCursorOnce (f : IConnection -> Cursor<'T>) = withSyncRetryOnce> f + + /// Retries once immediately + [] + member this.WithSyncRetryCursorOnce (f : IConnection -> Cursor<'T>, conn : IConnection) = + this.WithSyncRetryCursorOnce f conn + /// RethinkDB computation expression let rethink<'T> = RethinkBuilder<'T> () diff --git a/src/RethinkDb.Driver.FSharp/RethinkDb.Driver.FSharp.fsproj b/src/RethinkDb.Driver.FSharp/RethinkDb.Driver.FSharp.fsproj index 64749b3..0693a10 100644 --- a/src/RethinkDb.Driver.FSharp/RethinkDb.Driver.FSharp.fsproj +++ b/src/RethinkDb.Driver.FSharp/RethinkDb.Driver.FSharp.fsproj @@ -14,9 +14,9 @@ See LICENSE RethinkDB document F# 0.9.0 - beta-04 + beta-05 - Add cursor / toList functions and DSL operations + Add retry for cursor DSL operations