v3 RC1 #1
|
@ -1,5 +1,4 @@
|
|||
/// Document store implementation for SQLite
|
||||
module BitBadger.Documents.Sqlite
|
||||
namespace BitBadger.Documents.Sqlite
|
||||
|
||||
open BitBadger.Documents
|
||||
open Microsoft.Data.Sqlite
|
||||
|
@ -106,6 +105,9 @@ module Results =
|
|||
ToCustomList<'TDoc>(cmd, fromData<'TDoc>)
|
||||
|
||||
|
||||
[<AutoOpen>]
|
||||
module internal Helpers =
|
||||
|
||||
/// Execute a non-query command
|
||||
let internal write (cmd: SqliteCommand) = backgroundTask {
|
||||
let! _ = cmd.ExecuteNonQueryAsync()
|
||||
|
@ -373,6 +375,10 @@ module Definition =
|
|||
use conn = Configuration.dbConn ()
|
||||
WithConn.Definition.ensureTable name conn
|
||||
|
||||
/// Document insert/save functions
|
||||
[<AutoOpen>]
|
||||
module Document =
|
||||
|
||||
/// Insert a new document
|
||||
[<CompiledName "Insert">]
|
||||
let insert<'TDoc> tableName (document: 'TDoc) =
|
||||
|
@ -613,6 +619,7 @@ module Extensions =
|
|||
open System.Runtime.CompilerServices
|
||||
|
||||
/// C# extensions on the SqliteConnection type
|
||||
[<Extension>]
|
||||
type SqliteConnectionCSharpExtensions =
|
||||
|
||||
/// Execute a query that returns a list of results
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -3,7 +3,7 @@ namespace BitBadger.Documents.Tests;
|
|||
using System;
|
||||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
using static Sqlite;
|
||||
using Sqlite;
|
||||
|
||||
/// <summary>
|
||||
/// A throwaway SQLite database file, which will be deleted when it goes out of scope
|
||||
|
|
|
@ -7,7 +7,7 @@ let allTests =
|
|||
[ CommonTests.all
|
||||
CommonCSharpTests.Unit
|
||||
SqliteTests.all
|
||||
testSequenced SqliteCSharpTests.Integration ]
|
||||
SqliteCSharpTests.All ]
|
||||
|
||||
[<EntryPoint>]
|
||||
let main args = runTestsWithCLIArgs [] args allTests
|
||||
|
|
Loading…
Reference in New Issue
Block a user