Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var (
DB *sqlx.DB
)
Functions ¶
func Columns ¶
Columns returns a slice of strings listing the names of columns expected given the struct registered with name table.
func Connect ¶
Connect sets the query package's *sqlx.DB. Fallaciously, it does not actually establish the connection.
func Delete ¶
Insert returns a templated DELETE query for the given table name based on the field names in the corresponding struct using the SQLx Named(Query|ExecStmt) bindvar syntax.
func Get ¶
Insert returns a templated SELECT ... LIMIT 1 query for the given table name based on the field names in the corresponding struct using the SQLx Named(Query|ExecStmt) bindvar syntax.
func Insert ¶
Insert returns a templated INSERT query for the given table name based on the field names in the corresponding struct using the SQLx Named(Query|ExecStmt) bindvar syntax.
func Register ¶
func Register(model interface{})
Register adds models (aka structs) to the reflection cache. Registration does not actually take place until Connect has been called.
Types ¶
This section is empty.