Versions in this module Expand all Collapse all v1 v1.0.1 Sep 14, 2016 Changes in this version + type Convention interface + ColumnName func(fieldName string) string + Join func(prefix, name string) string + Name func() string + var ConventionSame Convention + var ConventionSnake Convention + type DB interface + Exec func(query string, args ...interface{}) (sql.Result, error) + Query func(query string, args ...interface{}) (*sql.Rows, error) + type Dialect interface + Name func() string + Placeholder func(n int) string + Quote func(name string) string + func DialectFor(name string) Dialect + type ExecRowStmt struct + func NewDeleteRowStmt(row interface{}, sql string) *ExecRowStmt + func NewUpdateRowStmt(row interface{}, sql string) *ExecRowStmt + func (stmt *ExecRowStmt) Exec(db DB, row interface{}) (int, error) + func (stmt *ExecRowStmt) String() string + type GetRowStmt struct + func NewGetRowStmt(row interface{}, sql string) *GetRowStmt + func (stmt *GetRowStmt) Get(db DB, dest interface{}) (int, error) + func (stmt *GetRowStmt) String() string + type InsertRowStmt struct + func NewInsertRowStmt(row interface{}, sql string) *InsertRowStmt + func (stmt *InsertRowStmt) Exec(db DB, row interface{}) error + func (stmt *InsertRowStmt) String() string + type SQLLogger interface + LogSQL func(query string, args []interface{}, rowsAffected int, err error) + type SQLLoggerFunc func(query string, args []interface{}, rowsAffected int, err error) + func (f SQLLoggerFunc) LogSQL(query string, args []interface{}, rowsAffected int, err error) + type Schema struct + Convention Convention + Dialect Dialect + Logger SQLLogger + var Default *Schema = &Schema{} + func (s *Schema) NewDeleteRowStmt(row interface{}, sql string) *ExecRowStmt + func (s *Schema) NewGetRowStmt(row interface{}, sql string) *GetRowStmt + func (s *Schema) NewInsertRowStmt(row interface{}, sql string) *InsertRowStmt + func (s *Schema) NewSelectStmt(row interface{}, sql string) *SelectStmt + func (s *Schema) NewUpdateRowStmt(row interface{}, sql string) *ExecRowStmt + type SelectStmt struct + func NewSelectStmt(row interface{}, sql string) *SelectStmt + func (stmt *SelectStmt) Select(db DB, dest interface{}, args ...interface{}) error + func (stmt *SelectStmt) String() string