clause

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type And

type And []Expression

And represents an AND expression

func (And) Build

func (a And) Build() (string, []any)

type Assignment

type Assignment struct {
	Column Column
	Value  any
}

Assignment represents a column assignment for UPDATE

func (Assignment) Build

func (a Assignment) Build() (string, []any)

type Between

type Between struct {
	Column Column
	Min    any
	Max    any
}

Between represents a BETWEEN expression

func (Between) Build

func (b Between) Build() (string, []any)

type Column

type Column struct {
	Table string
	Name  string
}

Column represents a database column with optional table qualifier

func (Column) ColumnName

func (c Column) ColumnName() string

ColumnName returns the full column name (with table prefix if specified)

type Columnar

type Columnar interface {
	ColumnName() string
}

Columnar defines an interface for providing a column name.

type Eq

type Eq struct {
	Column Column
	Value  any
}

Eq represents an equality expression (column = value)

func (Eq) Build

func (e Eq) Build() (string, []any)

type Expr

type Expr struct {
	SQL  string
	Vars []any
}

Expr represents a custom SQL expression

func (Expr) Build

func (e Expr) Build() (string, []any)

type Expression

type Expression interface {
	Build() (sql string, args []any)
}

Expression is the base interface for all SQL expressions

type Gt

type Gt struct {
	Column Column
	Value  any
}

Gt represents a greater than expression (column > value)

func (Gt) Build

func (g Gt) Build() (string, []any)

type Gte

type Gte struct {
	Column Column
	Value  any
}

Gte represents a greater than or equal expression (column >= value)

func (Gte) Build

func (g Gte) Build() (string, []any)

type IN

type IN struct {
	Column Column
	Values []any
}

IN represents an IN expression

func (IN) Build

func (i IN) Build() (string, []any)

type IsNotNull

type IsNotNull struct {
	Column Column
}

IsNotNull represents an IS NOT NULL expression

func (IsNotNull) Build

func (i IsNotNull) Build() (string, []any)

type IsNull

type IsNull struct {
	Column Column
}

IsNull represents an IS NULL expression

func (IsNull) Build

func (i IsNull) Build() (string, []any)

type Like

type Like struct {
	Column Column
	Value  string
}

Like represents a LIKE expression

func (Like) Build

func (l Like) Build() (string, []any)

type Lt

type Lt struct {
	Column Column
	Value  any
}

Lt represents a less than expression (column < value)

func (Lt) Build

func (l Lt) Build() (string, []any)

type Lte

type Lte struct {
	Column Column
	Value  any
}

Lte represents a less than or equal expression (column <= value)

func (Lte) Build

func (l Lte) Build() (string, []any)

type Neq

type Neq struct {
	Column Column
	Value  any
}

Neq represents a not equal expression (column != value)

func (Neq) Build

func (n Neq) Build() (string, []any)

type Not

type Not struct {
	Expr Expression
}

Not represents a NOT expression

func (Not) Build

func (n Not) Build() (string, []any)

type NotLike

type NotLike struct {
	Column Column
	Value  string
}

NotLike represents a NOT LIKE expression

func (NotLike) Build

func (n NotLike) Build() (string, []any)

type Or

type Or []Expression

Or represents an OR expression

func (Or) Build

func (o Or) Build() (string, []any)

type OrderByColumn

type OrderByColumn struct {
	Column Column
	Desc   bool
}

OrderByColumn represents an ORDER BY column

func (OrderByColumn) Build

func (o OrderByColumn) Build() string

Jump to

Keyboard shortcuts

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