package
1.2.1
Repository: https://github.com/go-magma/magma.git
Documentation: pkg.go.dev

# Functions

No description provided by the author
CloseRowsLogOnError will close the *Rows object and log if an error is returned by Rows.Close().
ExecInTx executes a callback inside a sql transaction on the provided DB.
GetSqlBuilder returns a squirrel Builder for the configured SQL dialect as found in the SQL_DIALECT env var.
NewMariaDBStatementBuilder returns an implementation of StatementBuilder for MariaDB dialect.
NewPostgresStatementBuilder returns an implementation of StatementBuilder for PostgreSQL dialect.
Open is a wrapper for sql.Open which sets the max open connections to 1 for in memory sqlite3 dbs.
OpenCleanForTest is the same as OpenForTest, except it also drops then creates the underlying DB name before returning.
OpenForTest returns a new connection to a shared test DB.

# 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

# Structs

UpsertValue wraps a column name and updated value.

# Interfaces

InsertBuilder is an interface which tracks squirrel's InsertBuilder struct but returns InsertBuilder on all self-referencing returns and adds an OnConflict method to support upserts.
StatementBuilder is an interface which tracks squirrel's StatementBuilderType with the difference that Insert returns this package's InsertBuilder interface type.

# Type aliases

ColumnBuilder is a builder for columns within a table creation statement This builder is immutable and all methods will return a new instance of the builder with the requested fields set.
ColumnOnDeleteOption is an enum type to specify ON DELETE behavior for foreign keys.
ColumnType is an enum type to specify table column types.
CreateIndexBuilder is a builder for CREATE INDEX statements.
CreateTableBuilder is a builder for DDL table creation statements.