Documentation ¶
Index ¶
- func MergeSet(set stmt.Set, args []interface{}) stmt.Set
- func ToColumn(arg interface{}) stmt.Column
- func ToColumns(values []interface{}) []stmt.Column
- func ToFrom(arg interface{}) stmt.From
- func ToInt64(value interface{}) (int64, bool)
- func ToPrefix(arg interface{}) stmt.Prefix
- func ToSet(args []interface{}) stmt.Set
- func ToSuffix(arg interface{}) stmt.Suffix
- func ToTable(arg interface{}) stmt.Table
- func ToTables(values []interface{}) []stmt.Table
- type Builder
- type Delete
- func (b Delete) And(condition stmt.Expression) Delete
- func (b Delete) From(arg interface{}) Delete
- func (b Delete) Only() Delete
- func (b Delete) Or(condition stmt.Expression) Delete
- func (b Delete) Prepare() (string, map[string]interface{})
- func (b Delete) Returning(values ...interface{}) Delete
- func (b Delete) Statement() stmt.Statement
- func (b Delete) String() string
- func (b Delete) Using(args ...interface{}) Delete
- func (b Delete) Where(condition stmt.Expression) Delete
- type Insert
- func (b Insert) Columns(columns ...interface{}) Insert
- func (b Insert) Into(into interface{}) Insert
- func (b Insert) OnConflict(args ...interface{}) Insert
- func (b Insert) Prepare() (string, map[string]interface{})
- func (b Insert) Returning(values ...interface{}) Insert
- func (b Insert) Set(args ...interface{}) Insert
- func (b Insert) Statement() stmt.Statement
- func (b Insert) String() string
- func (b Insert) Values(values ...interface{}) Insert
- type Select
- func (b Select) And(condition stmt.Expression) Select
- func (b Select) Columns(args ...interface{}) Select
- func (b Select) Distinct() Select
- func (b Select) From(arg interface{}) Select
- func (b Select) GroupBy(args ...interface{}) Select
- func (b Select) Having(condition stmt.Expression) Select
- func (b Select) Join(args ...interface{}) Select
- func (b Select) Limit(value interface{}) Select
- func (b Select) Offset(value interface{}) Select
- func (b Select) Or(condition stmt.Expression) Select
- func (b Select) OrderBy(orders ...stmt.Order) Select
- func (b Select) Prefix(prefix interface{}) Select
- func (b Select) Prepare() (string, map[string]interface{})
- func (b Select) Statement() stmt.Statement
- func (b Select) String() string
- func (b Select) Suffix(suffix interface{}) Select
- func (b Select) Where(condition stmt.Expression) Select
- type Update
- func (b Update) And(condition stmt.Expression) Update
- func (b Update) From(arg interface{}) Update
- func (b Update) Only() Update
- func (b Update) Or(condition stmt.Expression) Update
- func (b Update) Prepare() (string, map[string]interface{})
- func (b Update) Returning(values ...interface{}) Update
- func (b Update) Set(args ...interface{}) Update
- func (b Update) Statement() stmt.Statement
- func (b Update) String() string
- func (b Update) Using(args ...interface{}) Update
- func (b Update) Where(condition stmt.Expression) Update
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Builder ¶
type Builder interface { // String returns the underlying query as a raw statement. String() string // Prepare returns the underlying query as a named statement. Prepare() (string, map[string]interface{}) // Statement returns underlying statement. Statement() stmt.Statement }
Builder defines a generic methods available for Select, Insert, Update and Delete builders.
type Delete ¶
type Delete struct {
// contains filtered or unexported fields
}
Delete is a builder used for "SELECT" query.
func (Delete) And ¶
func (b Delete) And(condition stmt.Expression) Delete
And adds AND WHERE conditions.
func (Delete) Or ¶
func (b Delete) Or(condition stmt.Expression) Delete
Or adds OR WHERE conditions.
type Insert ¶
type Insert struct {
// contains filtered or unexported fields
}
Insert is a builder used for "INSERT" query.
func (Insert) OnConflict ¶
OnConflict builds the ON CONFLICT clause.
type Select ¶
type Select struct {
// contains filtered or unexported fields
}
Select is a builder used for "SELECT" query.
func (Select) And ¶
func (b Select) And(condition stmt.Expression) Select
And adds AND WHERE conditions.
func (Select) Having ¶
func (b Select) Having(condition stmt.Expression) Select
Having adds HAVING clauses.
func (Select) Or ¶
func (b Select) Or(condition stmt.Expression) Select
Or adds OR WHERE conditions.
type Update ¶
type Update struct {
// contains filtered or unexported fields
}
Update is a builder used for "UPDATE" query.
func (Update) And ¶
func (b Update) And(condition stmt.Expression) Update
And adds AND WHERE conditions.
func (Update) Or ¶
func (b Update) Or(condition stmt.Expression) Update
Or adds OR WHERE conditions.
Click to show internal directories.
Click to hide internal directories.