Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Builder ¶
type Builder interface { // Builds returns generated SQL and parameters. Build() (string, []interface{}, error) }
Builder interface is implemented by all specialized builders below and is used to generate SQL statements.
type DefaultValue ¶
type DefaultValue struct{}
func (DefaultValue) String ¶
func (dv DefaultValue) String() string
type Deleter ¶
type Deleter interface { Builder With(name string, q Builder) Deleter Using(using string) Deleter Where(where string, params ...interface{}) Deleter Returning(returning ...string) Deleter }
Deleter is a DELETE statement builder.
type Insecter ¶
type Inserter ¶
type Inserter interface { Builder With(name string, q Builder) Inserter Columns(col ...string) Inserter Values(params ...interface{}) Inserter From(q Selecter) Inserter OnConflictDoNothing(target string, params ...interface{}) Inserter Returning(returning ...string) Inserter }
Inserter is an INSERT statement builder.
type Selecter ¶
type Selecter interface { Builder With(name string, q Builder) Selecter Columns(col string, params ...interface{}) Selecter From(from string, params ...interface{}) Selecter Where(where string, params ...interface{}) Selecter Union(all bool, q Selecter) Selecter Offset(offset uint64) Selecter Limit(limit uint64) Selecter Distinct(distinct ...string) Selecter GroupBy(groupBy string) Selecter Having(having string, params ...interface{}) Selecter OrderBy(orderBy string) Selecter For(locking string) Selecter }
Selecter is a SELECT statement builder.
type Updater ¶
type Updater interface { Builder With(name string, q Builder) Updater From(from string, params ...interface{}) Updater Set(set string, params ...interface{}) Updater Where(where string, params ...interface{}) Updater Returning(returning ...string) Updater }
Updater is an UPDATE statement builder.
type Upserter ¶
type Upserter interface { Builder With(name string, q Builder) Upserter Columns(col ...string) Upserter Values(params ...interface{}) Upserter From(q Selecter) Upserter Update(update string, params ...interface{}) Upserter // unless specified, Columns with EXCLUDED values used Returning(returning ...string) Upserter }
Upserter is an INSERT statement builder.
Click to show internal directories.
Click to hide internal directories.