Idris2Doc : FS.Sqlite3

FS.Sqlite3

(source)

Reexports

importpublic Sqlite3
importpublic FS

Definitions

openSqlite : HasSqlErrores=>String->AsynceesDB
Totality: total
Visibility: export
openStmt : HasSqlErrores=>DB=>String->AsynceesStmt
Totality: total
Visibility: export
withDB : HasSqlErrores=>String-> (DB=>Asynceesa) ->Asynceesa
  Open a connection to the given database and use it to
run the given effectful computation.

This comes with the guarantees that the connection is properly
closed at the end.

Totality: total
Visibility: export
withStmt : HasSqlErrores=>DB=>String-> (Stmt=>Asynceesa) ->Asynceesa
  Prepare an SQL statement and use it to run the given effectful computation.

This comes with the guarantees that the statement is properly
finalized at the end.

Totality: total
Visibility: export
bindParams : HasSqlErrores=>DB=>Stmt=>ListParameter->Asyncees ()
  Prepare an SQL statement and use it to run the given effectful computation.

This comes with the guarantees that the statement is properly
finalized at the end.

Totality: total
Visibility: export
openBoundStmt : HasSqlErrores=>DB=>ParamStmt->AsynceesStmt
Totality: total
Visibility: export
withBoundStmt : HasSqlErrores=>DB=>ParamStmt-> (Stmt=>Asynceesa) ->Asynceesa
  Prepare an SQL statement and use it to run the given effectful computation.

This comes with the guarantees that the statement is properly
finalized at the end.

This works just like `withStmt` but it also bind the given arguments.

Totality: total
Visibility: export
step : HasSqlErrores=>Stmt=>AsynceesSqlResult
  Runs an SQL statement, returning the response from the database.

Totality: total
Visibility: export
commit : HasSqlErrores=>DB=>ParamStmt->Asyncees ()
  Prepares, executes and finalizes the given SQL statement.

The statement may hold a list of parameters, which will be
bound prior to executing the statement.

Totality: total
Visibility: export
selectRows : HasSqlErrores=>DB=>FromRowa=>ParamStmt->Nat->Asyncees (Lista)
  Prepares and executes the given SQL query and extracts up to
`n` rows of results.

Totality: total
Visibility: export
selectRow : HasSqlErrores=>DB=>FromRowa=>ParamStmt->Asynceesa
  Prepares and executes the given SQL query and extracts the
first result.

Totality: total
Visibility: export
findRow : HasSqlErrores=>DB=>FromRowa=>ParamStmt->Asyncees (Maybea)
  Prepares and executes the given SQL query and extracts the
first result (if any).

Totality: total
Visibility: export
rows : HasSqlErrores=>ChunkSize=>DB=>FromRowa=>ParamStmt->AsyncStreamees (Lista)
Totality: total
Visibility: export
cmd : HasSqlErrores=>DB=>Cmdt->Asyncees ()
  Executes the given SQL command.

Totality: total
Visibility: export
cmds : HasSqlErrores=>DB=>Cmds->Asyncees ()
  Runs several commands in a single transaction.

If any of the commands fails, the whole transaction is rolled back.

Totality: total
Visibility: export
query : HasSqlErrores=>DB=>Queryt->Nat->Asyncees (Listt)
  Runs the given query and accumulates at most `n` rows.

Totality: total
Visibility: export
query1 : HasSqlErrores=>DB=>Queryt->Asyncees (Maybet)
  Runs the given query and returns the first result (if any).

Totality: total
Visibility: export
queryRows : HasSqlErrores=>ChunkSize=>DB=>Queryt->AsyncStreamees (Listt)
  Streams the rows resulting from running the given query.

Totality: total
Visibility: export
queryTable : HasSqlErrores=>DB=> {autotr : ToRowt} -> (q : Queryt) -> {auto0_ : ToRowTypest=FromRowTypest} ->Nat->Asyncees (Tablet)
  Runs the given query and accumulates at most `n` rows.

The result is stored in a `Table` with a proper header of
column names.

Totality: total
Visibility: export