package
0.3.1
Repository: https://github.com/icinga/icinga-go-library.git
Documentation: pkg.go.dev

# Functions

CantPerformQuery wraps the given error with the specified query that cannot be executed.
NewColumnMap returns a new ColumnMap.
NewConnector creates a fully initialized RetryConnector from the given args.
NewDbFromConfig returns a new DB from Config.
No description provided by the author
No description provided by the author
SplitOnDupId returns a state machine which tracks the inputs' IDs.
TableName returns the table of t.

# Constants

Driver names as automatically registered in the database/sql package by themselves.
Driver names as automatically registered in the database/sql package by themselves.

# Structs

Config defines database client configuration.
DB is a wrapper around sqlx.DB with bulk execution, statement building, streaming and logging capabilities.
Options define user configurable database options.
RetryConnector wraps driver.Connector with retry logic.
RetryConnectorCallbacks specifies callbacks that are executed upon certain events.

# Interfaces

ColumnMap provides a cached mapping of structs exported fields to their database column names.
Entity is implemented by each type that works with the database package.
Fingerprinter is implemented by every entity that uniquely identifies itself.
ID is a unique identifier of an entity.
IDer is implemented by every entity that uniquely identifies itself.
PgsqlOnConflictConstrainter implements the PgsqlOnConflictConstraint method, which returns the primary or unique key constraint name of the PostgreSQL table.
Scoper implements the Scope method, which returns a struct specifying the WHERE conditions that entities must satisfy in order to be SELECTed.
TableNamer implements the TableName method, which returns the table of the object.
Upserter implements the Upsert method, which returns a part of the object for ON DUPLICATE KEY UPDATE.

# Type aliases

EntityFactoryFunc knows how to create an Entity.
MysqlFuncLogger is an adapter that allows ordinary functions to be used as a logger for mysql.SetLogger.
OnInitConnFunc can be used to execute post Connect() arbitrary actions.
OnSuccess is a callback for successful (bulk) DML operations.