Documentation
¶
Overview ¶
Package lib contains the Ferret-facing DB::POSTGRES function bridge.
Index ¶
- func Begin(ctx context.Context, arg runtime.Value) (runtime.Value, error)
- func Close(_ context.Context, arg runtime.Value) (runtime.Value, error)
- func Commit(_ context.Context, arg runtime.Value) (runtime.Value, error)
- func Open(ctx context.Context, arg runtime.Value) (runtime.Value, error)
- func RegisterLib(ns runtime.Namespace) error
- func Rollback(_ context.Context, arg runtime.Value) (runtime.Value, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Begin ¶
Begin starts a Postgres transaction and returns a transaction handle.
@param database {PostgresDatabase} Database handle. @return {PostgresTransaction} Open transaction handle.
func Close ¶
Close closes a Postgres database handle. Closing an already closed database is idempotent.
@param database {PostgresDatabase} Database handle to close. @return {Boolean} True when the handle is closed.
func Commit ¶
Commit commits a Postgres transaction handle.
@param transaction {PostgresTransaction} Transaction to commit. @return {Boolean} True when the transaction is committed.
func Open ¶
Open creates a Postgres database handle from connection options.
@param options {Object} Postgres connection options. @return {PostgresDatabase} Open database handle.
func RegisterLib ¶
RegisterLib registers the DB::POSTGRES namespace functions in the provided namespace.
Types ¶
This section is empty.