Documentation ¶
Overview ¶
Package dbhelper wraps SQL and specific capabilities of an SQL db
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Helper ¶
type Helper interface { fmt.Stringer // Supports indicates if this helper supports this driver name Supports(driverName string) bool // PreConnect calculates the connect URL for the db from a canonical URL used in Fn config PreConnect(url *url.URL) (string, error) // PostCreate Apply any configuration to the DB prior to use PostCreate(db *sqlx.DB) (*sqlx.DB, error) // CheckTableExists checks if a table exists in the DB CheckTableExists(tx *sqlx.Tx, table string) (bool, error) // IsDuplicateKeyError determines if an error indicates if the prior error was caused by a duplicate key insert IsDuplicateKeyError(err error) bool }
Helper provides DB-specific SQL capabilities
Click to show internal directories.
Click to hide internal directories.