Idris2Doc : Oracle.Statement

Oracle.Statement

(source)

Definitions

prepare : Connection->String->IO (EitherOracleErrorStatement)
  Prepare a SQL statement.

The returned statement must eventually be released with `release` or managed with `withStatement`.

Totality: total
Visibility: export
release : Statement->IO ()
  Release a prepared statement.

This decrements the underlying ODPI-C statement reference count.

Totality: total
Visibility: export
withStatement : Connection->String-> (Statement->IO (EitherOracleErrora)) ->IO (EitherOracleErrora)
  Prepare a statement, execute an action, and guarantee that the statement is released afterwards.

This is the preferred way to work with prepared statements.

Prepare a statement, execute an action, and guarantee cleanup.

The statement is released regardless of whether the action succeeds or fails.

Totality: total
Visibility: export
execute : Statement->IO (EitherOracleError ())
  Execute a prepared statement.

For SELECT statements this executes the query.
For INSERT/UPDATE/DELETE statements this performs the update.

Totality: total
Visibility: export
bindOne : Statement->BindParameter->IO (EitherOracleError ())
  Bind a single named parameter.

Supported value types:
- OracleNull
- OracleString
- OracleInt
- OracleUInt
- OracleDouble
- OracleBool
- OracleClob
- OracleBlob
- OracleDate
- OracleTimestamp
- OracleTimestampTZ
- OracleTimestampLTZ
- OracleIntervalYM
- OracleIntervalDS

OracleBytes bindings are not supported as of yet.

Totality: total
Visibility: export
bind : Statement->ListBindParameter->IO (EitherOracleError ())
  Bind a collection of named parameters.

Totality: total
Visibility: export
fetchRow : Statement->IO (EitherOracleError (Maybe (ListOracleValue)))
  Fetch a single row from the current result set.

Returns:
- Right Nothing when no rows remain.
- Right (Just row) when a row was fetched.
- Left OracleError on failure.

Visibility: export
fetchRaw : Statement->IO (EitherOracleError (List (ListOracleValue)))
  Fetch all remaining rows from the current result set.

Visibility: export
query : Connection->String->ListBindParameter->IO (EitherOracleError (List (ListOracleValue)))
  Execute a SQL query and return all rows.

Visibility: export