SQLProvider

Sql Module

Functions and values

Function or value Description

connect con f

Full Usage: connect con f

Parameters:
Returns: 'a
con : IDbConnection
f : IDbConnection -> 'a
Returns: 'a

connectAsync con f

Full Usage: connectAsync con f

Parameters:
Returns: Task<unit>
con : DbConnection
f : DbConnection -> unit
Returns: Task<unit>

dataReaderToArray reader

Full Usage: dataReaderToArray reader

Parameters:
Returns: (string * obj)[][]
reader : IDataReader
Returns: (string * obj)[][]

dataReaderToArrayAsync reader

Full Usage: dataReaderToArrayAsync reader

Parameters:
Returns: Task<(string * obj)[] array>
reader : DbDataReader
Returns: Task<(string * obj)[] array>

dbUnbox v

Full Usage: dbUnbox v

Parameters:
    v : obj

Returns: 'a
v : obj
Returns: 'a

dbUnboxWithDefault def v

Full Usage: dbUnboxWithDefault def v

Parameters:
    def : 'a
    v : obj

Returns: 'a
def : 'a
v : obj
Returns: 'a

ensureOpen con

Full Usage: ensureOpen con

Parameters:
con : IDbConnection

evaluateOneByOne asyncFunc entityList

Full Usage: evaluateOneByOne asyncFunc entityList

Parameters:
    asyncFunc : 'a -> 'b
    entityList : 'a seq

Returns: Task<'c list>

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.

asyncFunc : 'a -> 'b
entityList : 'a seq
Returns: Task<'c list>

executeSql createCommand sql con

Full Usage: executeSql createCommand sql con

Parameters:
Returns: IDataReader
createCommand : 'a -> IDbConnection -> IDbCommand
sql : 'a
con : IDbConnection
Returns: IDataReader

executeSqlAsDataTable createCommand sql con

Full Usage: executeSqlAsDataTable createCommand sql con

Parameters:
Returns: DataTable
createCommand : 'a -> IDbConnection -> IDbCommand
sql : 'a
con : IDbConnection
Returns: DataTable

executeSqlAsDataTableAsync createCommand sql con

Full Usage: executeSqlAsDataTableAsync createCommand sql con

Parameters:
Returns: Task<DataTable>
createCommand : 'a -> IDbConnection -> DbCommand
sql : 'a
con : IDbConnection
Returns: Task<DataTable>

executeSqlAsync createCommand sql con

Full Usage: executeSqlAsync createCommand sql con

Parameters:
Returns: Task<DbDataReader>
createCommand : 'a -> IDbConnection -> DbCommand
sql : 'a
con : IDbConnection
Returns: Task<DbDataReader>

Type something to start searching.