Idris2Doc : Postgres.Result

Postgres.Result

(source)

Reexports

importpublic Data.Vect

Definitions

dataPGresult : Type
  Internal phantom type used to mark pointers to the
`libpq` struct of the same name.

Totality: total
Visibility: export
dataResult : Type
  The result of executing a command. See `Postgres.Exec`
for more.

Totality: total
Visibility: export
Constructor: 
MkResult : PtrPGresult->Result
interfaceResultProducer : Type->Type->Type
  All of the various forms of execution supported by libpq
provide types that conform to the `ResultProducer` interface.

Parameters: source, input
Methods:
exec : source->input->IO (PtrPGresult)

Implementation: 
ResultProducerExecSourceString
exec : ResultProducersourceinput=>source->input->IO (PtrPGresult)
Visibility: public export
withResult : ResultProducersourcea=>source->a-> (Result->IOb) ->IOb
  Execute the given result producer, do the given thing with the
result, and then free the memory used for the result.

Visibility: export
pgResultStatus : Result->ResultStatus
Visibility: export
pgResultSuccess : Result->Bool
Visibility: export
pgResultErrorMessage : Result->MaybeString
  Get the Postgres error message for the given result or
Nothing if the result was a success.

Visibility: export
dataTupleResult : Nat->Nat->Type
Totality: total
Visibility: export
Constructor: 
MkTupleResult : (res : Result) ->TupleResult (resultRowCountres) (resultColCountres)
tupleResult : (res : Result) ->Maybe (TupleResult (resultRowCountres) (resultColCountres))
Visibility: export
pgResultSize : TupleResultrc-> (Nat, Nat)
  Get the size of the resultset as (row, col).

Visibility: export
pgResultStringValue : TupleResultrowscols->Finrows->Fincols->String
  Get the result value at the given row and column as a String regardless
of what the underlying Postgres type is.

Null postgres values are treated as empty strings.

Use `pgResultNullableStringValue` to handle nulls as Nothing.

Visibility: export
pgResultNullableStringValue : TupleResultrowscols->Finrows->Fincols->MaybeString
  Get the result value at the given row and column as a (Maybe String) regardless
of what the underlying Postgres type is.

Null postgres values are Nothing, whereas all other values are String (this does not
fail to parse Strings by returning Nothing -- anything non-null is guaranteed to return
a `Just` value).

Use `pgResultStringValue` to handle nulls as empty Strings.

Visibility: export
recordColHeader : Type
  The combination of name and type information for a single Postgres result column.

Totality: total
Visibility: public export
Constructor: 
MkHeader : String->PType->ColHeader

Projections:
.name : ColHeader->String
.type : ColHeader->PType

Hint: 
ShowColHeader
.name : ColHeader->String
Visibility: public export
name : ColHeader->String
Visibility: public export
.type : ColHeader->PType
Visibility: public export
type : ColHeader->PType
Visibility: public export
pgStringResultset : TupleResultrowscols->Vectrows (Vectcols (Lazy String))
  Get the resultset (all rows and columns) with all values as Strings
regardless of the underlying Postgres value type.

Null is treated as the empty String.

To get (Maybe String) where null is Nothing, use `pgNullableStringResultset`

Visibility: export
StringResultset : Bool->Type
Visibility: public export
pgNullableStringResultset : TupleResultrowscols->Vectrows (Vectcols (Lazy (MaybeString)))
  Get the resultset (all rows and columns) with all values as (Maybe Strings)
regardless of the underlying Postgres value type.

Null is treated as Nothing -- No matter what type the Postgres column is, a non-null
value will be a `Just` value with a String in it; Nothing only means null, not
ever that the value failed to parse as a String.

To get String where null is the empty String, use `pgStringResultset`

Visibility: export
pgResultsetColNames : TupleResultrowscols->VectcolsString
Visibility: export
pgResultsetColTypes : TypeDictionary=>TupleResultrowscols->VectcolsPType
  Get all the column types for the given result. Note that 
this is currently limited by the few known types that
are looked up and stored in the TypeDictionary.

Visibility: export