sqlite

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 30, 2022 License: MIT Imports: 7 Imported by: 11

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func And

func And(args ...any) chain

func Arg

func Arg(args ...any) chain

func Concat

func Concat(args ...any) chain

func Delete

func Delete(queryMods ...query.Mod[*deleteQuery]) query.BaseQuery[*deleteQuery]

func F

func F(name string, args ...any) *function

func Group

func Group(exps ...any) chain

func Insert

func Insert(queryMods ...query.Mod[*insertQuery]) query.BaseQuery[*insertQuery]

func Named

func Named(name string, value any) chain

func Not

func Not(exp any) chain

func Or

func Or(args ...any) chain

func P

func P(exp any) chain

func Placeholder

func Placeholder(n uint) chain

func Quote

func Quote(ss ...string) chain

func Raw

func Raw(query string, args ...any) chain

func RawQuery

func RawQuery(q string, args ...any) query.BaseQuery[expr.Raw]

func S

func S(s string) chain

func Select

func Select(queryMods ...query.Mod[*selectQuery]) query.BaseQuery[*selectQuery]

func Update

func Update(queryMods ...query.Mod[*updateQuery]) query.BaseQuery[*updateQuery]

func X

func X(exp any, others ...any) chain

Types

type DeleteQM

type DeleteQM struct {
	// contains filtered or unexported fields
}

func (DeleteQM) From

func (qm DeleteQM) From(name any) query.Mod[*deleteQuery]

func (DeleteQM) FromAs

func (qm DeleteQM) FromAs(name any, alias string) query.Mod[*deleteQuery]

func (DeleteQM) IndexedBy

func (qm DeleteQM) IndexedBy(indexName string) query.Mod[*deleteQuery]

func (DeleteQM) NotIndexed

func (qm DeleteQM) NotIndexed() query.Mod[*deleteQuery]

func (DeleteQM) Recursive

func (DeleteQM) Recursive(r bool) query.Mod[Q]

func (DeleteQM) Returning

func (qm DeleteQM) Returning(clauses ...any) query.Mod[*deleteQuery]

func (DeleteQM) Where

func (qm DeleteQM) Where(e query.Expression) query.Mod[*deleteQuery]

func (DeleteQM) WhereClause

func (qm DeleteQM) WhereClause(clause string, args ...any) query.Mod[*deleteQuery]

func (DeleteQM) With

func (DeleteQM) With(name string, columns ...string) cteChain[Q]

type Dialect

type Dialect struct{}

func (Dialect) WriteArg

func (d Dialect) WriteArg(w io.Writer, position int)

func (Dialect) WriteNamedArg

func (d Dialect) WriteNamedArg(w io.Writer, name string)

func (Dialect) WriteQuoted

func (d Dialect) WriteQuoted(w io.Writer, s string)

type InsertQM

type InsertQM struct {
	// contains filtered or unexported fields
}

func (InsertQM) Into

func (qm InsertQM) Into(name any, columns ...string) query.Mod[*insertQuery]

func (InsertQM) IntoAs

func (qm InsertQM) IntoAs(name any, alias string, columns ...string) query.Mod[*insertQuery]

func (InsertQM) OnConflict

func (qm InsertQM) OnConflict(column any, where ...any) mods.Conflict[*insertQuery]

func (InsertQM) OrAbort

func (o InsertQM) OrAbort() query.Mod[Q]

func (InsertQM) OrFail

func (o InsertQM) OrFail() query.Mod[Q]

func (InsertQM) OrIgnore

func (o InsertQM) OrIgnore() query.Mod[Q]

func (InsertQM) OrReplace

func (o InsertQM) OrReplace() query.Mod[Q]

func (InsertQM) OrRollback

func (o InsertQM) OrRollback() query.Mod[Q]

func (InsertQM) Query

func (qm InsertQM) Query(q query.Query) query.Mod[*insertQuery]

Insert from a query If Go allows type parameters on methods, limit this to select and raw

func (InsertQM) Recursive

func (InsertQM) Recursive(r bool) query.Mod[Q]

func (InsertQM) Returning

func (qm InsertQM) Returning(clauses ...any) query.Mod[*insertQuery]

func (InsertQM) Values

func (qm InsertQM) Values(clauses ...any) query.Mod[*insertQuery]

func (InsertQM) With

func (InsertQM) With(name string, columns ...string) cteChain[Q]

type SelectQM

type SelectQM struct {
	mods.FromMod[*selectQuery] // select *FROM*

	mods.TableAliasMod[*clause.FromItem] // Adding an alias to from item
	// contains filtered or unexported fields
}

func (SelectQM) Columns

func (SelectQM) Columns(clauses ...any) query.Mod[*selectQuery]

func (SelectQM) CrossJoin

func (j SelectQM) CrossJoin(e any) query.Mod[Q]

func (SelectQM) Distinct

func (SelectQM) Distinct() query.Mod[*selectQuery]

func (SelectQM) Except

func (SelectQM) Except(q query.Query) query.Mod[*selectQuery]

func (SelectQM) FullJoin

func (j SelectQM) FullJoin(e any) joinChain[Q]

func (SelectQM) GroupBy

func (SelectQM) GroupBy(e any) query.Mod[*selectQuery]

func (SelectQM) Having

func (SelectQM) Having(e query.Expression) query.Mod[*selectQuery]

func (SelectQM) HavingClause

func (qm SelectQM) HavingClause(clause string, args ...any) query.Mod[*selectQuery]

func (SelectQM) IndexedBy

func (SelectQM) IndexedBy(indexName string) query.Mod[*clause.FromItem]

func (SelectQM) InnerJoin

func (j SelectQM) InnerJoin(e any) joinChain[Q]

func (SelectQM) Intersect

func (SelectQM) Intersect(q query.Query) query.Mod[*selectQuery]

func (SelectQM) LeftJoin

func (j SelectQM) LeftJoin(e any) joinChain[Q]

func (SelectQM) Limit

func (SelectQM) Limit(count any) query.Mod[*selectQuery]

Sqlite can use an clauseession for the limit

func (SelectQM) NotIndexed

func (SelectQM) NotIndexed() query.Mod[*clause.FromItem]

func (SelectQM) Offset

func (SelectQM) Offset(count any) query.Mod[*selectQuery]

Sqlite can use an clauseession for the offset

func (SelectQM) OrderBy

func (SelectQM) OrderBy(e any) orderBy[*selectQuery]

func (SelectQM) Recursive

func (SelectQM) Recursive(r bool) query.Mod[Q]

func (SelectQM) RightJoin

func (j SelectQM) RightJoin(e any) joinChain[Q]

func (SelectQM) Union

func (SelectQM) Union(q query.Query) query.Mod[*selectQuery]

func (SelectQM) UnionAll

func (SelectQM) UnionAll(q query.Query) query.Mod[*selectQuery]

func (SelectQM) Where

func (SelectQM) Where(e query.Expression) query.Mod[*selectQuery]

func (SelectQM) WhereClause

func (qm SelectQM) WhereClause(clause string, args ...any) query.Mod[*selectQuery]

func (SelectQM) Window

func (SelectQM) Window(name string) windowMod[*selectQuery]

func (SelectQM) With

func (SelectQM) With(name string, columns ...string) cteChain[Q]

type UpdateQM

type UpdateQM struct {
	mods.FromMod[*updateQuery] // update *FROM*
	// contains filtered or unexported fields
}

func (UpdateQM) CrossJoin

func (j UpdateQM) CrossJoin(e any) query.Mod[Q]

func (UpdateQM) FullJoin

func (j UpdateQM) FullJoin(e any) joinChain[Q]

func (UpdateQM) IndexedBy

func (qm UpdateQM) IndexedBy(indexName string) query.Mod[*updateQuery]

func (UpdateQM) InnerJoin

func (j UpdateQM) InnerJoin(e any) joinChain[Q]

func (UpdateQM) LeftJoin

func (j UpdateQM) LeftJoin(e any) joinChain[Q]

func (UpdateQM) NotIndexed

func (qm UpdateQM) NotIndexed() query.Mod[*updateQuery]

func (UpdateQM) OrAbort

func (o UpdateQM) OrAbort() query.Mod[Q]

func (UpdateQM) OrFail

func (o UpdateQM) OrFail() query.Mod[Q]

func (UpdateQM) OrIgnore

func (o UpdateQM) OrIgnore() query.Mod[Q]

func (UpdateQM) OrReplace

func (o UpdateQM) OrReplace() query.Mod[Q]

func (UpdateQM) OrRollback

func (o UpdateQM) OrRollback() query.Mod[Q]

func (UpdateQM) Recursive

func (UpdateQM) Recursive(r bool) query.Mod[Q]

func (UpdateQM) Returning

func (qm UpdateQM) Returning(clauses ...any) query.Mod[*updateQuery]

func (UpdateQM) RightJoin

func (j UpdateQM) RightJoin(e any) joinChain[Q]

func (UpdateQM) Set

func (qm UpdateQM) Set(a string, b any) query.Mod[*updateQuery]

func (UpdateQM) SetArg

func (qm UpdateQM) SetArg(a string, b any) query.Mod[*updateQuery]

func (UpdateQM) Table

func (qm UpdateQM) Table(name any) query.Mod[*updateQuery]

func (UpdateQM) TableAs

func (qm UpdateQM) TableAs(name any, alias string) query.Mod[*updateQuery]

func (UpdateQM) Where

func (qm UpdateQM) Where(e query.Expression) query.Mod[*updateQuery]

func (UpdateQM) WhereClause

func (qm UpdateQM) WhereClause(clause string, args ...any) query.Mod[*updateQuery]

func (UpdateQM) With

func (UpdateQM) With(name string, columns ...string) cteChain[Q]

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL