lib

package
v1.0.0-rc.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 2, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package lib contains the Ferret-facing DB::POSTGRES function bridge.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Begin

func Begin(ctx context.Context, arg runtime.Value) (runtime.Value, error)

Begin starts a Postgres transaction and returns a transaction handle.

@param database {PostgresDatabase} Database handle. @return {PostgresTransaction} Open transaction handle.

func Close

func Close(_ context.Context, arg runtime.Value) (runtime.Value, error)

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

func Commit(_ context.Context, arg runtime.Value) (runtime.Value, error)

Commit commits a Postgres transaction handle.

@param transaction {PostgresTransaction} Transaction to commit. @return {Boolean} True when the transaction is committed.

func Open

func Open(ctx context.Context, arg runtime.Value) (runtime.Value, error)

Open creates a Postgres database handle from connection options.

@param options {Object} Postgres connection options. @return {PostgresDatabase} Open database handle.

func RegisterLib

func RegisterLib(ns runtime.Namespace) error

RegisterLib registers the DB::POSTGRES namespace functions in the provided namespace.

func Rollback

func Rollback(_ context.Context, arg runtime.Value) (runtime.Value, error)

Rollback rolls back a Postgres transaction handle.

@param transaction {PostgresTransaction} Transaction to roll back. @return {Boolean} True when the transaction is rolled back.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL