package
0.0.0-20231014214933-bf83fb330073
Repository: https://github.com/skyrin/go-lib.git
Documentation: pkg.go.dev
# Functions
GetConnectionStr returns a connection string.
GetConnParamFromENV initializes new connection parameters and populates from ENV variables.
GetConnParamFromJSONConfig get connection params from a JSON config.
IsPQError checks if the passed error is the specified Postgres error code.
NewBulkInsert initializes a new BulkInsert, specifying the table, columns and optional suffix to use.
NewBulkUpdate initializes a new BulkUpdate, specifying the table, columns to update, columns to use as filters and whether to use caching or not.
NewPostgresConn initializes a new Postgres connection FIXME: use a pool?.
NewSlug initializes and returns a new slug generator.
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
FieldCount TODO: move to more generic location.
FieldPlaceHolder TODO: move to more generic location.
PQErr23505UniqueViolation Postgres code for unique violation.
PQErr58030IOError Postgres code for i/o error ("could not write to temporary file").
# Structs
BulkInsert allows for multiple inserts to be ran in a single query, speeding up inserts into a table.
BulkUpdate allows for multiple updates to be ran in a single query.
BulkUpdateCol defines the column name and type.
Connection wrapper of the *sql.DB If a transaction is started, it is stored internally in the txn and automatically used when making DB calls until commit/rollback is executed.
ConnParam connection parameters used to initialize a connection.
Row a wrapper struct for sql.Row, so error handling can happen.
Rows wrapper struct for sql.Rows, so error handling can happen.
Slug ...
Statement a prepared statement.
Status defines a status reference for a table/column combination.
Txn wrapper of the *sql.Txn.