Documentation
¶
Index ¶
- func QuoteIdent(dialect string, parts ...string) string
- type Builder
- func (b *Builder) And(condition string, args ...any) *Builder
- func (b *Builder) Build() (string, []any)
- func (b *Builder) Columns(cols ...string) *Builder
- func (b *Builder) Delete(table string) *Builder
- func (b *Builder) From(table string) *Builder
- func (b *Builder) GroupBy(columns ...string) *Builder
- func (b *Builder) Having(condition string, args ...any) *Builder
- func (b *Builder) Insert(table string) *Builder
- func (b *Builder) Join(joinType, table, condition string) *Builder
- func (b *Builder) Limit(n int) *Builder
- func (b *Builder) Offset(n int) *Builder
- func (b *Builder) Or(condition string, args ...any) *Builder
- func (b *Builder) OrderBy(clause string) *Builder
- func (b *Builder) Placeholder() string
- func (b *Builder) Returning(columns ...string) *Builder
- func (b *Builder) Select(columns ...string) *Builder
- func (b *Builder) Set(column string, value any) *Builder
- func (b *Builder) Update(table string) *Builder
- func (b *Builder) Values(vals ...any) *Builder
- func (b *Builder) Where(condition string, args ...any) *Builder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func QuoteIdent ¶
QuoteIdent quotes identifier parts for the given dialect. PostgreSQL/SQLite: "schema"."table" MySQL: `schema`.`table`
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
Builder constructs parameterized SQL queries.
func (*Builder) Placeholder ¶
Placeholder returns the next placeholder token and advances the counter.
Click to show internal directories.
Click to hide internal directories.