Floorplan Updated
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
module db
|
||||
|
||||
open Dapper
|
||||
open Dapper.FSharp
|
||||
open Dapper.FSharp.MySQL
|
||||
open MySql.Data.MySqlClient
|
||||
open DredgeFramework
|
||||
@@ -24,6 +26,16 @@ let Insert<'a> asyncQuery =
|
||||
|> connection.InsertAsync<'a>
|
||||
|> RunSynchronously
|
||||
|
||||
let InsertOutput<'a> asyncQuery =
|
||||
asyncQuery
|
||||
|> connection.InsertAsync<'a>
|
||||
|> RunSynchronously
|
||||
|> ignore
|
||||
|
||||
let table = asyncQuery.Table
|
||||
connection.Query<'a>($"""Select * From {table} Where id = (select last_insert_id())""")
|
||||
|> EnumerableToArray
|
||||
|
||||
let Update<'a> asyncQuery =
|
||||
asyncQuery
|
||||
|> connection.UpdateAsync<'a>
|
||||
|
||||
Reference in New Issue
Block a user