package
0.7.19
Repository: https://github.com/ntbosscher/gobase.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
Package squtil is a place for utils to help with github.com/Masterminds/squirrel.

# Functions

AddConnection adds additional database connections that can be used by this package.
AttachTxHandler starts a database transaction so that subsequent calls to Tx() will use the same transaction.
No description provided by the author
No description provided by the author
ExecContext runs the query without expecting any output.
GetContext runs the query expecting exactly 1 resulting row.
Insert works just like ExecContext except that it returns the inserted id Insert uses QueryRow for postgres b/c the driver doesn't support .LastInsertId() For your postgres insert query, be sure to include "returning <id-column>".
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
NewConnection creates a new database connection.
No description provided by the author
QueryRowContext runs the query and expects exactly 1 row.
No description provided by the author
ScheduleFunc calls callbackWithTx every interval within a new db transaction.
No description provided by the author
SelectContext runs the query and scans the resulting rows into dest.
Updates the default struct to column name mapper (you can still bypass this using the `db:"col_name"` tag) sample: // struct: type Company struct { ID int, ContactPerson int } // query: select id, contactPerson from company where id = 1; // mapper: mapper("ID") // id mapper("ContactPerson") // contactPerson .
No description provided by the author
No description provided by the author
UseConnection toggles between database connections used by this package.
WithTx runs the callback in a sql transaction.

# Constants

DefaultConnectionKey is the key that will select the default database connection.

# Variables

Builder is a pre-configured squirrel sql-builder instance.
EnableVerboseLogging will log all queries, input parameters and errors (even ones returned to the caller).

# Structs

No description provided by the author
No description provided by the author
No description provided by the author

# Type aliases

No description provided by the author