Sql Module
Functions and values
| Function or value |
Description
|
Full Usage:
connect con f
Parameters:
IDbConnection
f : IDbConnection -> 'a
Returns: 'a
Type parameters: 'a |
Note: SQLProvider reuses the connection through multiple instances, so you can't dispose it here. Instead it's created with ISQLProvider's CreateConnection method, and that is having always "use" to ensure it is disposed properly on "finally".
|
Full Usage:
connectAndClose con f
Parameters:
IDbConnection
f : IDbConnection -> 'a
Returns: 'a
Type parameters: 'a |
|
Full Usage:
connectAndCloseAsync con f
Parameters:
DbConnection
f : DbConnection -> Task<'a>
Returns: Task<'a>
Type parameters: 'a |
|
Full Usage:
connectAsync con f
Parameters:
DbConnection
f : DbConnection -> Task<'a>
Returns: Task<Task<'a>>
Type parameters: 'a |
Note: SQLProvider reuses the connection through multiple instances, so you can't dispose it here. Instead it's created with ISQLProvider's CreateConnection method, and that is having always "use" to ensure it is disposed properly on "finally".
|
|
|
Full Usage:
dataReaderToArrayAsync reader
Parameters:
DbDataReader
Returns: Task<(string * obj)[] array>
|
|
Full Usage:
dbUnbox v
Parameters:
obj
Returns: 'a
Modifiers: inline Type parameters: 'a |
|
Full Usage:
dbUnboxWithDefault def v
Parameters:
'a
v : obj
Returns: 'a
Modifiers: inline Type parameters: 'a |
|
|
|
Full Usage:
evaluateOneByOne asyncFunc entityList
Parameters:
'a -> 'b
entityList : 'a seq
Returns: Task<'c list>
Type parameters: 'a, 'b, 'c (requires :> System.Threading.Tasks.Task<'c>) |
Helper function to run async computation non-parallel style for list of objects. This is needed if async database opreation is executed for a list of entities. DB-connections are not usually supporting parallel SQL-query execution, so even when async thread is available, it can't be used to execute another SQL at the same time.
|
Full Usage:
executeSql createCommand sql con
Parameters:
'a -> IDbConnection -> IDbCommand
sql : 'a
con : IDbConnection
Returns: IDataReader
Type parameters: 'a |
|
Full Usage:
executeSqlAsDataTable createCommand sql con
Parameters:
'a -> IDbConnection -> IDbCommand
sql : 'a
con : IDbConnection
Returns: DataTable
Type parameters: 'a |
|
Full Usage:
executeSqlAsDataTableAsync createCommand sql con
Parameters:
'a -> IDbConnection -> DbCommand
sql : 'a
con : IDbConnection
Returns: Task<DataTable>
Type parameters: 'a |
|
Full Usage:
executeSqlAsync createCommand sql con
Parameters:
'a -> IDbConnection -> DbCommand
sql : 'a
con : IDbConnection
Returns: Task<DbDataReader>
Type parameters: 'a |
|