FSharp.ORM


Db

Namespace: FSharp.ORM

Operations on the Database.

Functions and values

Function or valueDescription
call(config procedure)
Signature: config:IDbConfig -> procedure:'T -> 'T
Type parameters: 'T

Calls the stored procedure.

delete(config entity)
Signature: config:IDbConfig -> entity:'T -> unit
Type parameters: 'T

Deletes the entity.

deleteWithOpt(config entity opt)
Signature: config:IDbConfig -> entity:'T -> opt:DeleteOpt -> unit
Type parameters: 'T

Deletes the entity with options.

execute(config sql condition)
Signature: config:IDbConfig -> sql:string -> condition:(string * obj * Type) list -> int

Executes the arbitrary SQL.

executeReader(...)
Signature: config:IDbConfig -> handler:(DbDataReader -> 'T) -> sql:string -> condition:(string * obj * Type) list -> 'T
Type parameters: 'T

Executes the SQL and handles the reader.

find(config id)
Signature: config:IDbConfig -> id:obj list -> 'T
Type parameters: 'T

Finds the entity.

findWithVersion(config id version)
Signature: config:IDbConfig -> id:obj list -> version:obj -> 'T
Type parameters: 'T

Finds the entity with the version.

insert(config entity)
Signature: config:IDbConfig -> entity:'T -> 'T
Type parameters: 'T

Inserts the entity.

insertOrUpdate(config entity)
Signature: config:IDbConfig -> entity:'T -> 'T
Type parameters: 'T

Inserts the entity, or updates if it already exists.

insertWithOpt(config entity opt)
Signature: config:IDbConfig -> entity:'T -> opt:InsertOpt -> 'T
Type parameters: 'T

Inserts the entity.

paginate(...)
Signature: config:IDbConfig -> sql:string -> condition:(string * obj * Type) list -> (offset:int64 * limit:int64) -> 'T list
Type parameters: 'T

Paginates the rows.

paginateAndCount(...)
Signature: config:IDbConfig -> sql:string -> condition:(string * obj * Type) list -> (offset:int64 * limit:int64) -> 'T list * int64
Type parameters: 'T

Paginates the rows, and counts rows without the offset and the limit.

paginateOnDemand(...)
Signature: config:IDbConfig -> sql:string -> condition:(string * obj * Type) list -> (offset:int64 * limit:int64) -> seq<'T>
Type parameters: 'T

Paginates the rows on demand.

query(config sql condition)
Signature: config:IDbConfig -> sql:string -> condition:(string * obj * Type) list -> 'T list
Type parameters: 'T

Queries the rows.

queryable(config)
Signature: config:IDbConfig -> IQueryable<'T>
Type parameters: 'T

Creates an IQueryable on 'T

queryableDelete(config query)
Signature: config:IDbConfig -> query:IQueryable<'T> -> unit
Type parameters: 'T

Deletes all values returned by query.

queryableDirectSql(...)
Signature: config:IDbConfig -> query:seq<Sql> -> parametters:seq<Parameter> -> IQueryable<'T>
Type parameters: 'T

Creates an IQueryable on 'T that executes specified query when enumerated.

queryOnDemand(config sql condition)
Signature: config:IDbConfig -> sql:string -> condition:(string * obj * Type) list -> seq<'T>
Type parameters: 'T

Queries the rows on demand.

tryFind(config id)
Signature: config:IDbConfig -> id:obj list -> 'T option
Type parameters: 'T

Try to find the entity.

tryFindWithVersion(config id version)
Signature: config:IDbConfig -> id:obj list -> version:obj -> 'T option
Type parameters: 'T

Try to find the entity with the version.

update(config entity)
Signature: config:IDbConfig -> entity:'T -> 'T
Type parameters: 'T

Updates the entity.

updateWithOpt(config entity opt)
Signature: config:IDbConfig -> entity:'T -> opt:UpdateOpt -> 'T
Type parameters: 'T

Updates the entity with options.

Fork me on GitHub