Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Monitor = newMonitor()
Functions ¶
func BulkInsert ¶
func BulkInsert[T Table](executor gorp.SqlExecutor, db DB, allObjs ...T) error
Bulk insert objects into the database, using an executor which can be a transaction or a database connection itself.
Note: This function does NOT support auto-incrementing primary keys.
func ReplaceAll ¶
Replace all old objects of a table with new objects.
Types ¶
type Connector ¶
Kubernetes connector which initializes the database connection from a secret.
func (Connector) FromSecretRef ¶
Create a new database client with authentication from the provided secret reference.
type DB ¶
Wrapper around gorp.DbMap that adds some convenience functions.
func (*DB) CreateTable ¶
Adds missing functionality to gorp.DbMap which creates one table.
func (*DB) SelectTimed ¶
Executes a select query while monitoring its execution time.
func (*DB) TableExists ¶
Check if a table exists in the database.
Click to show internal directories.
Click to hide internal directories.