astql

package module
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2026 License: MIT Imports: 5 Imported by: 0

README

astql

CI Coverage Go Report Card CodeQL Go Reference License Go Version Release

Type-safe SQL query builder with DBML schema validation.

Build queries as an AST, validate against your schema, render to parameterized SQL.

Injection-safe SQL Expressions, Any Dialect

instance.T("users")      // ✓ exists in schema
instance.T("uusers")     // panic: table "uusers" not found

instance.F("email")      // ✓ exists in schema
instance.F("emial")      // panic: field "emial" not found

query := astql.Select(instance.T("users")).
    Fields(instance.F("username"), instance.F("email")).
    Where(instance.C(instance.F("active"), astql.EQ, instance.P("is_active")))

result, _ := query.Render(postgres.New())
// SELECT "username", "email" FROM "users" WHERE "active" = :is_active

Typos become compile-time failures, not runtime surprises. Values are parameterized. Identifiers are quoted. The schema is the source of truth.

Same query, different databases:

import (
    "github.com/zoobz-io/astql/postgres"
    "github.com/zoobz-io/astql/sqlite"
    "github.com/zoobz-io/astql/mariadb"
    "github.com/zoobz-io/astql/mssql"
)

result, _ := query.Render(postgres.New())  // "username", LIMIT 10
result, _ := query.Render(sqlite.New())    // "username", LIMIT 10
result, _ := query.Render(mariadb.New())   // `username`, LIMIT 10
result, _ := query.Render(mssql.New())     // [username], TOP 10

One AST. Four dialects. Each renderer handles identifier quoting, pagination syntax, vendor-specific operators.

Install

go get github.com/zoobz-io/astql
go get github.com/zoobz-io/dbml

Requires Go 1.24+.

Quick Start

package main

import (
    "fmt"
    "github.com/zoobz-io/astql"
    "github.com/zoobz-io/astql/postgres"
    "github.com/zoobz-io/dbml"
)

func main() {
    // Define schema
    project := dbml.NewProject("myapp")
    users := dbml.NewTable("users")
    users.AddColumn(dbml.NewColumn("id", "bigint"))
    users.AddColumn(dbml.NewColumn("username", "varchar"))
    users.AddColumn(dbml.NewColumn("email", "varchar"))
    users.AddColumn(dbml.NewColumn("active", "boolean"))
    project.AddTable(users)

    // Create instance
    instance, err := astql.NewFromDBML(project)
    if err != nil {
        panic(err)
    }

    // Build and render
    result, err := astql.Select(instance.T("users")).
        Fields(instance.F("username"), instance.F("email")).
        Where(instance.C(instance.F("active"), astql.EQ, instance.P("is_active"))).
        OrderBy(instance.F("username"), astql.ASC).
        Limit(10).
        Render(postgres.New())

    if err != nil {
        panic(err)
    }

    fmt.Println(result.SQL)
    // SELECT "username", "email" FROM "users" WHERE "active" = :is_active ORDER BY "username" ASC LIMIT 10
    fmt.Println(result.RequiredParams)
    // [is_active]
}

Capabilities

Feature Description Docs
Schema Validation Tables and fields checked against DBML at build time Schema Validation
Multi-Dialect PostgreSQL, SQLite, MariaDB, MSSQL from one AST Architecture
Parameterized Values Injection-resistant queries with named parameters Conditions
Composable Queries Subqueries, JOINs, aggregates, window functions Joins
CASE Expressions Conditional logic within queries API

Why ASTQL?

  • Schema-validatedT("users") and F("email") checked against DBML at build time
  • Injection-resistant — parameterized values, quoted identifiers, no string concatenation
  • Multi-dialect — one query, four databases
  • Composable — subqueries, JOINs, aggregates, window functions, CASE expressions

Schema-First Data Access

ASTQL enables a pattern: define schema once in DBML, generate everything else.

Your DBML becomes the single source of truth. Downstream tools consume the schema to build:

  • Type-safe repositories — generated data access layers with cereal
  • Query builders — domain-specific methods that can't reference invalid columns
  • Multi-database applications — same business logic, swappable storage backends
// Schema defines what's valid
project := dbml.ParseFile("schema.dbml")
instance, _ := astql.NewFromDBML(project)

// Queries are structurally correct by construction
users := instance.T("users")
query := astql.Select(users).
    Fields(instance.F("id"), instance.F("email")).
    Where(instance.C(instance.F("active"), astql.EQ, instance.P("active")))

// Render to any supported database
sql, _ := query.Render(postgres.New())  // production
sql, _ := query.Render(sqlite.New())    // testing

The schema guards the boundary. Queries inside the boundary are safe by construction.

Documentation

Learn
  • Quickstart — get started in minutes
  • Concepts — tables, fields, params, conditions, builders
  • Architecture — AST structure, render pipeline, security layers
Guides
  • Schema Validation — DBML integration and validation
  • Conditions — WHERE, AND/OR, subqueries, BETWEEN
  • Joins — INNER, LEFT, RIGHT, CROSS joins
  • Aggregates — GROUP BY, HAVING, window functions
  • Testing — testing patterns for query builders
Cookbook
Reference
  • API — complete function documentation
  • Operators — all comparison and special operators

Contributing

See CONTRIBUTING.md for guidelines. For security issues, see SECURITY.md.

License

MIT — see LICENSE.

Documentation

Overview

Package astql provides a type-safe SQL query builder with multi-provider support.

The package generates an Abstract Syntax Tree (AST) from fluent builder calls, then renders it to SQL with named parameters compatible with sqlx. Schema validation is available through DBML integration.

Basic Usage

Queries can be built directly using the package-level builder functions:

import "github.com/zoobz-io/astql/postgres"

query := astql.Select(table).
	Fields(field1, field2).
	Where(condition).
	OrderBy(field1, astql.ASC).
	Limit(10)

result, err := query.Render(postgres.New())
// result.SQL: SELECT "field1", "field2" FROM "table" WHERE ... ORDER BY "field1" ASC LIMIT 10
// result.RequiredParams: []string{"param_name", ...}

Multi-Provider Support

The package supports multiple SQL dialects through the Renderer interface. Available providers: postgres, mariadb, sqlite, mssql.

import "github.com/zoobz-io/astql/mariadb"

result, err := query.Render(mariadb.New())

Schema-Validated Usage

For compile-time safety, create an ASTQL instance from a DBML schema:

instance, err := astql.NewFromDBML(project)
if err != nil {
	return err
}

// These panic if the field/table doesn't exist in the schema
users := instance.T("users")
email := instance.F("email")

Supported Operations

The package supports SELECT, INSERT, UPDATE, DELETE, and COUNT operations, along with JOINs, subqueries, window functions, aggregates, CASE expressions, set operations (UNION, INTERSECT, EXCEPT), and PostgreSQL-specific features like DISTINCT ON, row locking, RETURNING, ON CONFLICT, and pgvector operators.

Output Format

All queries use named parameters (`:param_name`) for use with sqlx.NamedExec and similar functions. Identifiers are quoted to handle reserved words.

Index

Constants

View Source
const (
	OpSelect = types.OpSelect
	OpInsert = types.OpInsert
	OpUpdate = types.OpUpdate
	OpDelete = types.OpDelete
	OpCount  = types.OpCount
)

Re-export operation constants for public API.

View Source
const (
	ASC  = types.ASC
	DESC = types.DESC
)

Re-export direction constants for public API.

View Source
const (
	NullsFirst = types.NullsFirst
	NullsLast  = types.NullsLast
)

Re-export nulls ordering constants for public API.

View Source
const (
	// Basic comparison operators.
	EQ = types.EQ
	NE = types.NE
	GT = types.GT
	GE = types.GE
	LT = types.LT
	LE = types.LE

	// Extended operators.
	IN        = types.IN
	NotIn     = types.NotIn
	LIKE      = types.LIKE
	NotLike   = types.NotLike
	ILIKE     = types.ILIKE
	NotILike  = types.NotILike
	IsNull    = types.IsNull
	IsNotNull = types.IsNotNull
	EXISTS    = types.EXISTS
	NotExists = types.NotExists

	// Regex operators (PostgreSQL).
	RegexMatch     = types.RegexMatch
	RegexIMatch    = types.RegexIMatch
	NotRegexMatch  = types.NotRegexMatch
	NotRegexIMatch = types.NotRegexIMatch

	// Array operators (PostgreSQL).
	ArrayContains    = types.ArrayContains
	ArrayContainedBy = types.ArrayContainedBy
	ArrayOverlap     = types.ArrayOverlap

	// Vector operators (pgvector).
	VectorL2Distance     = types.VectorL2Distance
	VectorInnerProduct   = types.VectorInnerProduct
	VectorCosineDistance = types.VectorCosineDistance
	VectorL1Distance     = types.VectorL1Distance
)

Re-export operator constants for public API.

View Source
const (
	AggSum           = types.AggSum
	AggAvg           = types.AggAvg
	AggMin           = types.AggMin
	AggMax           = types.AggMax
	AggCountField    = types.AggCountField
	AggCountDistinct = types.AggCountDistinct
)

Re-export aggregate function constants for public API.

View Source
const (
	CastText            = types.CastText
	CastInteger         = types.CastInteger
	CastBigint          = types.CastBigint
	CastSmallint        = types.CastSmallint
	CastNumeric         = types.CastNumeric
	CastReal            = types.CastReal
	CastDoublePrecision = types.CastDoublePrecision
	CastBoolean         = types.CastBoolean
	CastDate            = types.CastDate
	CastTime            = types.CastTime
	CastTimestamp       = types.CastTimestamp
	CastTimestampTZ     = types.CastTimestampTZ
	CastInterval        = types.CastInterval
	CastUUID            = types.CastUUID
	CastJSON            = types.CastJSON
	CastJSONB           = types.CastJSONB
	CastBytea           = types.CastBytea
)

Re-export cast type constants for public API.

View Source
const (
	WinRowNumber  = types.WinRowNumber
	WinRank       = types.WinRank
	WinDenseRank  = types.WinDenseRank
	WinNtile      = types.WinNtile
	WinLag        = types.WinLag
	WinLead       = types.WinLead
	WinFirstValue = types.WinFirstValue
	WinLastValue  = types.WinLastValue
)

Re-export window function constants for public API.

View Source
const (
	FrameUnboundedPreceding = types.FrameUnboundedPreceding
	FrameCurrentRow         = types.FrameCurrentRow
	FrameUnboundedFollowing = types.FrameUnboundedFollowing
)

Re-export frame bound constants for public API.

View Source
const (
	SetUnion        = types.SetUnion
	SetUnionAll     = types.SetUnionAll
	SetIntersect    = types.SetIntersect
	SetIntersectAll = types.SetIntersectAll
	SetExcept       = types.SetExcept
	SetExceptAll    = types.SetExceptAll
)

Re-export set operation constants for public API.

Variables

This section is empty.

Functions

func Abs

func Abs(field types.Field) types.FieldExpression

Abs creates an ABS math expression.

func As

As adds an alias to a field expression.

func Avg

func Avg(field types.Field) types.FieldExpression

Avg creates an AVG aggregate expression.

func AvgFilter

func AvgFilter(field types.Field, filter types.ConditionItem) types.FieldExpression

AvgFilter creates an AVG aggregate with a FILTER clause.

func Between

func Between(field types.Field, low, high types.Param) types.BetweenCondition

Example: Between(field, low, high) -> field BETWEEN :low AND :high.

func BinaryExpr

func BinaryExpr(field types.Field, op types.Operator, param types.Param) types.FieldExpression

BinaryExpr creates a binary expression for field <op> param patterns. Commonly used for vector distance calculations, e.g., embedding <-> :query Example: BinaryExpr(embedding, VectorL2Distance, query) -> "embedding" <-> :query

func CF

CF creates a field comparison condition.

func CSub

func CSub(field types.Field, op types.Operator, subquery types.Subquery) types.SubqueryCondition

CSub creates a subquery condition with a field.

func CSubExists

func CSubExists(op types.Operator, subquery types.Subquery) types.SubqueryCondition

CSubExists creates an EXISTS/NOT EXISTS subquery condition.

func Cast

func Cast(field types.Field, castType types.CastType) types.FieldExpression

Example: Cast(field, CastText) -> CAST("field" AS TEXT).

func Ceil

func Ceil(field types.Field) types.FieldExpression

Ceil creates a CEIL math expression.

func Coalesce

func Coalesce(values ...types.Param) types.FieldExpression

Coalesce creates a COALESCE expression that returns the first non-null value.

func Concat

func Concat(fields ...types.Field) types.FieldExpression

Concat creates a CONCAT string expression with multiple fields. Example: Concat(field1, field2) -> CONCAT("field1", "field2")

func CountDistinct

func CountDistinct(field types.Field) types.FieldExpression

CountDistinct creates a COUNT(DISTINCT) aggregate expression.

func CountDistinctFilter

func CountDistinctFilter(field types.Field, filter types.ConditionItem) types.FieldExpression

CountDistinctFilter creates a COUNT(DISTINCT field) aggregate with a FILTER clause.

func CountField

func CountField(field types.Field) types.FieldExpression

CountField creates a COUNT aggregate expression for a specific field.

func CountFieldFilter

func CountFieldFilter(field types.Field, filter types.ConditionItem) types.FieldExpression

CountFieldFilter creates a COUNT(field) aggregate with a FILTER clause.

func CountStar

func CountStar() types.FieldExpression

CountStar creates a COUNT(*) aggregate expression for use in SELECT.

func CurrentDate

func CurrentDate() types.FieldExpression

CurrentDate creates a CURRENT_DATE expression returning current date. Example: CurrentDate() -> CURRENT_DATE

func CurrentTime

func CurrentTime() types.FieldExpression

CurrentTime creates a CURRENT_TIME expression returning current time. Example: CurrentTime() -> CURRENT_TIME

func CurrentTimestamp

func CurrentTimestamp() types.FieldExpression

CurrentTimestamp creates a CURRENT_TIMESTAMP expression. Example: CurrentTimestamp() -> CURRENT_TIMESTAMP

func DateTrunc

func DateTrunc(part types.DatePart, field types.Field) types.FieldExpression

DateTrunc creates a DATE_TRUNC expression to truncate to specified precision. Example: DateTrunc(PartMonth, field) -> DATE_TRUNC('month', "field")

func Extract

func Extract(part types.DatePart, field types.Field) types.FieldExpression

Extract creates an EXTRACT expression to get a part of a date/time field. Example: Extract(PartYear, field) -> EXTRACT(YEAR FROM "field")

func Floor

func Floor(field types.Field) types.FieldExpression

Floor creates a FLOOR math expression.

func HavingAvg

func HavingAvg(field types.Field, op types.Operator, value types.Param) types.AggregateCondition

Example: HavingAvg(field, LT, param) -> HAVING AVG("field") < :param.

func HavingCount

func HavingCount(op types.Operator, value types.Param) types.AggregateCondition

Example: HavingCount(GT, param) -> HAVING COUNT(*) > :param.

func HavingCountDistinct

func HavingCountDistinct(field types.Field, op types.Operator, value types.Param) types.AggregateCondition

HavingCountDistinct creates a HAVING COUNT(DISTINCT field) condition.

func HavingCountField

func HavingCountField(field types.Field, op types.Operator, value types.Param) types.AggregateCondition

Example: HavingCountField(field, GT, param) -> HAVING COUNT("field") > :param.

func HavingMax

func HavingMax(field types.Field, op types.Operator, value types.Param) types.AggregateCondition

HavingMax creates a HAVING MAX(field) condition.

func HavingMin

func HavingMin(field types.Field, op types.Operator, value types.Param) types.AggregateCondition

HavingMin creates a HAVING MIN(field) condition.

func HavingSum

func HavingSum(field types.Field, op types.Operator, value types.Param) types.AggregateCondition

Example: HavingSum(field, GE, param) -> HAVING SUM("field") >= :param.

func LTrim

func LTrim(field types.Field) types.FieldExpression

LTrim creates an LTRIM string expression. Example: LTrim(field) -> LTRIM("field")

func Length

func Length(field types.Field) types.FieldExpression

Length creates a LENGTH string expression. Example: Length(field) -> LENGTH("field")

func Lower

func Lower(field types.Field) types.FieldExpression

Lower creates a LOWER string expression. Example: Lower(field) -> LOWER("field")

func Max

func Max(field types.Field) types.FieldExpression

Max creates a MAX aggregate expression.

func MaxFilter

func MaxFilter(field types.Field, filter types.ConditionItem) types.FieldExpression

MaxFilter creates a MAX aggregate with a FILTER clause.

func Min

func Min(field types.Field) types.FieldExpression

Min creates a MIN aggregate expression.

func MinFilter

func MinFilter(field types.Field, filter types.ConditionItem) types.FieldExpression

MinFilter creates a MIN aggregate with a FILTER clause.

func NotBetween

func NotBetween(field types.Field, low, high types.Param) types.BetweenCondition

Example: NotBetween(field, low, high) -> field NOT BETWEEN :low AND :high.

func Now

func Now() types.FieldExpression

Now creates a NOW() date expression returning current timestamp. Example: Now() -> NOW()

func NullIf

func NullIf(value1, value2 types.Param) types.FieldExpression

NullIf creates a NULLIF expression that returns NULL if two values are equal.

func Power

func Power(field types.Field, exponent types.Param) types.FieldExpression

Power creates a POWER math expression.

func RTrim

func RTrim(field types.Field) types.FieldExpression

RTrim creates an RTRIM string expression. Example: RTrim(field) -> RTRIM("field")

func Replace

func Replace(field types.Field, search types.Param, replacement types.Param) types.FieldExpression

Replace creates a REPLACE string expression. Example: Replace(field, search, replacement) -> REPLACE("field", :search, :replacement)

func Round

func Round(field types.Field, precision ...types.Param) types.FieldExpression

Round creates a ROUND math expression.

func Sqrt

func Sqrt(field types.Field) types.FieldExpression

Sqrt creates a SQRT math expression.

func Sub

func Sub(builder *Builder) types.Subquery

Sub creates a subquery from a builder.

func Substring

func Substring(field types.Field, start types.Param, length types.Param) types.FieldExpression

Substring creates a SUBSTRING string expression. Example: Substring(field, start, length) -> SUBSTRING("field", :start, :length)

func Sum

func Sum(field types.Field) types.FieldExpression

Sum creates a SUM aggregate expression.

func SumFilter

func SumFilter(field types.Field, filter types.ConditionItem) types.FieldExpression

Example: SumFilter(field, condition) -> SUM("field") FILTER (WHERE condition).

func Trim

func Trim(field types.Field) types.FieldExpression

Trim creates a TRIM string expression. Example: Trim(field) -> TRIM("field")

func Upper

func Upper(field types.Field) types.FieldExpression

Upper creates an UPPER string expression. Example: Upper(field) -> UPPER("field")

Types

type AST

type AST = types.AST

AST represents the abstract syntax tree for a query. This is re-exported from internal/types for use by consumers.

type ASTQL

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

ASTQL represents an instance of the query builder with a specific DBML schema.

func NewFromDBML

func NewFromDBML(project *dbml.Project) (*ASTQL, error)

NewFromDBML creates a new ASTQL instance from a DBML project.

func (*ASTQL) ASC

func (*ASTQL) ASC() types.Direction

ASC returns the ascending sort direction constant.

func (*ASTQL) AggC

func (a *ASTQL) AggC(aggFunc types.AggregateFunc, field *types.Field, op types.Operator, param types.Param) types.AggregateCondition

AggC creates a validated aggregate condition for HAVING clauses. Use nil for field to create COUNT(*).

func (*ASTQL) And

func (a *ASTQL) And(conditions ...types.ConditionItem) types.ConditionGroup

And creates an AND condition group.

func (*ASTQL) ArrayContainedBy

func (*ASTQL) ArrayContainedBy() types.Operator

ArrayContainedBy returns the array contained by operator constant (PostgreSQL <@).

func (*ASTQL) ArrayContains

func (*ASTQL) ArrayContains() types.Operator

ArrayContains returns the array contains operator constant (PostgreSQL @>).

func (*ASTQL) ArrayOverlap

func (*ASTQL) ArrayOverlap() types.Operator

ArrayOverlap returns the array overlap operator constant (PostgreSQL &&).

func (*ASTQL) C

func (a *ASTQL) C(field types.Field, op types.Operator, param types.Param) types.Condition

C creates a validated condition.

func (*ASTQL) ConditionItems

func (*ASTQL) ConditionItems() []types.ConditionItem

ConditionItems returns an empty slice of ConditionItem for programmatic query building.

func (*ASTQL) Conditions

func (*ASTQL) Conditions() []types.Condition

Conditions returns an empty slice of Condition for programmatic query building.

func (*ASTQL) DESC

func (*ASTQL) DESC() types.Direction

DESC returns the descending sort direction constant.

func (*ASTQL) EQ

func (*ASTQL) EQ() types.Operator

EQ returns the equals operator constant.

func (*ASTQL) EXISTS

func (*ASTQL) EXISTS() types.Operator

EXISTS returns the EXISTS operator constant.

func (*ASTQL) F

func (a *ASTQL) F(name string) types.Field

F creates a validated field reference.

func (*ASTQL) Fields

func (*ASTQL) Fields() []types.Field

Fields returns an empty slice of Field for programmatic query building.

func (*ASTQL) GE

func (*ASTQL) GE() types.Operator

GE returns the greater than or equal operator constant.

func (*ASTQL) GT

func (*ASTQL) GT() types.Operator

GT returns the greater than operator constant.

func (*ASTQL) GetInstance

func (a *ASTQL) GetInstance() *ASTQL

GetInstance returns the ASTQL instance (for use by provider packages).

func (*ASTQL) ILIKE

func (*ASTQL) ILIKE() types.Operator

ILIKE returns the case-insensitive LIKE operator constant (PostgreSQL).

func (*ASTQL) IN

func (*ASTQL) IN() types.Operator

IN returns the IN operator constant.

func (*ASTQL) IsNotNull

func (*ASTQL) IsNotNull() types.Operator

IsNotNull returns the IS NOT NULL operator constant.

func (*ASTQL) IsNull

func (*ASTQL) IsNull() types.Operator

IsNull returns the IS NULL operator constant.

func (*ASTQL) JSONBPath

func (a *ASTQL) JSONBPath(field types.Field, key types.Param) types.Field

JSONBPath creates a field with JSONB path access (->). The key is parameterized for safety - renders as: field->:key_param Example: JSONBPath(metadata, P("tags_key")) -> "metadata"->:tags_key

func (*ASTQL) JSONBText

func (a *ASTQL) JSONBText(field types.Field, key types.Param) types.Field

JSONBText creates a field with JSONB text extraction (->>). The key is parameterized for safety - renders as: field->>:key_param Example: JSONBText(metadata, P("status_key")) -> "metadata"->>:status_key

func (*ASTQL) LE

func (*ASTQL) LE() types.Operator

LE returns the less than or equal operator constant.

func (*ASTQL) LIKE

func (*ASTQL) LIKE() types.Operator

LIKE returns the LIKE operator constant.

func (*ASTQL) LT

func (*ASTQL) LT() types.Operator

LT returns the less than operator constant.

func (*ASTQL) NE

func (*ASTQL) NE() types.Operator

NE returns the not equals operator constant.

func (*ASTQL) NotExists

func (*ASTQL) NotExists() types.Operator

NotExists returns the NOT EXISTS operator constant.

func (*ASTQL) NotILike

func (*ASTQL) NotILike() types.Operator

NotILike returns the NOT ILIKE operator constant (PostgreSQL).

func (*ASTQL) NotIn

func (*ASTQL) NotIn() types.Operator

NotIn returns the NOT IN operator constant.

func (*ASTQL) NotLike

func (*ASTQL) NotLike() types.Operator

NotLike returns the NOT LIKE operator constant.

func (*ASTQL) NotNull

func (a *ASTQL) NotNull(field types.Field) types.Condition

NotNull creates a NOT NULL condition.

func (*ASTQL) NotRegexIMatch

func (*ASTQL) NotRegexIMatch() types.Operator

NotRegexIMatch returns the case-insensitive regex non-match operator constant (PostgreSQL !~*).

func (*ASTQL) NotRegexMatch

func (*ASTQL) NotRegexMatch() types.Operator

NotRegexMatch returns the regex non-match operator constant (PostgreSQL !~).

func (*ASTQL) Null

func (a *ASTQL) Null(field types.Field) types.Condition

Null creates a NULL condition.

func (*ASTQL) OpCount

func (*ASTQL) OpCount() types.Operation

OpCount returns the Count operation constant.

func (*ASTQL) OpDelete

func (*ASTQL) OpDelete() types.Operation

OpDelete returns the Delete operation constant.

func (*ASTQL) OpInsert

func (*ASTQL) OpInsert() types.Operation

OpInsert returns the Insert operation constant.

func (*ASTQL) OpSelect

func (*ASTQL) OpSelect() types.Operation

OpSelect returns the Select operation constant.

func (*ASTQL) OpUpdate

func (*ASTQL) OpUpdate() types.Operation

OpUpdate returns the Update operation constant.

func (*ASTQL) Or

func (a *ASTQL) Or(conditions ...types.ConditionItem) types.ConditionGroup

Or creates an OR condition group.

func (*ASTQL) P

func (a *ASTQL) P(name string) types.Param

P creates a validated parameter reference.

func (*ASTQL) Params

func (*ASTQL) Params() []types.Param

Params returns an empty slice of Param for programmatic query building.

func (*ASTQL) RegexIMatch

func (*ASTQL) RegexIMatch() types.Operator

RegexIMatch returns the case-insensitive regex match operator constant (PostgreSQL ~*).

func (*ASTQL) RegexMatch

func (*ASTQL) RegexMatch() types.Operator

RegexMatch returns the regex match operator constant (PostgreSQL ~).

func (*ASTQL) T

func (a *ASTQL) T(name string, alias ...string) types.Table

T creates a validated table reference.

func (*ASTQL) TryAggC

func (a *ASTQL) TryAggC(aggFunc types.AggregateFunc, field *types.Field, op types.Operator, param types.Param) (types.AggregateCondition, error)

TryAggC creates a validated aggregate condition for HAVING clauses. Use nil for field to create COUNT(*).

func (*ASTQL) TryAnd

func (*ASTQL) TryAnd(conditions ...types.ConditionItem) (types.ConditionGroup, error)

TryAnd creates an AND condition group, returning an error if invalid.

func (*ASTQL) TryC

func (a *ASTQL) TryC(field types.Field, op types.Operator, param types.Param) (types.Condition, error)

TryC creates a validated condition, returning an error if invalid.

func (*ASTQL) TryF

func (a *ASTQL) TryF(name string) (types.Field, error)

TryF creates a validated field reference, returning an error if invalid.

func (*ASTQL) TryNotNull

func (a *ASTQL) TryNotNull(field types.Field) (types.Condition, error)

TryNotNull creates a NOT NULL condition, returning an error if invalid.

func (*ASTQL) TryNull

func (a *ASTQL) TryNull(field types.Field) (types.Condition, error)

TryNull creates a NULL condition, returning an error if invalid.

func (*ASTQL) TryOr

func (*ASTQL) TryOr(conditions ...types.ConditionItem) (types.ConditionGroup, error)

TryOr creates an OR condition group, returning an error if invalid.

func (*ASTQL) TryP

func (*ASTQL) TryP(name string) (types.Param, error)

TryP creates a validated parameter reference, returning an error if invalid.

func (*ASTQL) TryT

func (a *ASTQL) TryT(name string, alias ...string) (types.Table, error)

TryT creates a validated table reference, returning an error if invalid.

func (*ASTQL) TryWithTable

func (a *ASTQL) TryWithTable(field types.Field, tableOrAlias string) (types.Field, error)

TryWithTable creates a new Field with a table/alias prefix, returning an error if invalid.

func (*ASTQL) ValueMap

func (*ASTQL) ValueMap() map[types.Field]types.Param

ValueMap returns an empty map for programmatic INSERT value building.

func (*ASTQL) VectorCosineDistance

func (*ASTQL) VectorCosineDistance() types.Operator

VectorCosineDistance returns the vector cosine distance operator constant (pgvector <=>).

func (*ASTQL) VectorInnerProduct

func (*ASTQL) VectorInnerProduct() types.Operator

VectorInnerProduct returns the vector negative inner product operator constant (pgvector <#>).

func (*ASTQL) VectorL1Distance

func (*ASTQL) VectorL1Distance() types.Operator

VectorL1Distance returns the vector L1/Manhattan distance operator constant (pgvector <+>).

func (*ASTQL) VectorL2Distance

func (*ASTQL) VectorL2Distance() types.Operator

VectorL2Distance returns the vector L2/Euclidean distance operator constant (pgvector <->).

func (*ASTQL) WithTable

func (a *ASTQL) WithTable(field types.Field, tableOrAlias string) types.Field

WithTable creates a new Field with a table/alias prefix, validated against the schema.

type AggregateCondition

type AggregateCondition = types.AggregateCondition

AggregateCondition represents a HAVING condition on an aggregate function. Use with Builder.HavingAgg() for conditions like COUNT(*) > 10.

type AggregateFunc

type AggregateFunc = types.AggregateFunc

AggregateFunc represents SQL aggregate functions.

type BetweenCondition

type BetweenCondition = types.BetweenCondition

BetweenCondition represents a BETWEEN condition with two bounds.

type BinaryExpression

type BinaryExpression = types.BinaryExpression

BinaryExpression represents a binary operation between a field and a parameter. Used for expressions like vector distance calculations: field <-> :param

type Builder

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

Builder provides a fluent API for constructing queries.

func Count

func Count(t types.Table) *Builder

Count creates a new COUNT query builder.

func Delete

func Delete(t types.Table) *Builder

Delete creates a new DELETE query builder.

func Insert

func Insert(t types.Table) *Builder

Insert creates a new INSERT query builder.

func Select

func Select(t types.Table) *Builder

Select creates a new SELECT query builder.

func Update

func Update(t types.Table) *Builder

Update creates a new UPDATE query builder.

func (*Builder) Build

func (b *Builder) Build() (*types.AST, error)

Build returns the constructed AST or an error.

func (*Builder) CrossJoin

func (b *Builder) CrossJoin(table types.Table) *Builder

CrossJoin adds a CROSS JOIN (no ON clause needed).

func (*Builder) Distinct

func (b *Builder) Distinct() *Builder

Distinct sets the DISTINCT flag for SELECT queries.

func (*Builder) DistinctOn

func (b *Builder) DistinctOn(fields ...types.Field) *Builder

DistinctOn sets DISTINCT ON fields for SELECT queries (PostgreSQL). The query will return only the first row for each unique combination of the specified fields.

func (*Builder) Except

func (b *Builder) Except(other *Builder) *CompoundBuilder

Except creates an EXCEPT between two queries.

func (*Builder) ExceptAll

func (b *Builder) ExceptAll(other *Builder) *CompoundBuilder

ExceptAll creates an EXCEPT ALL between two queries.

func (*Builder) Fields

func (b *Builder) Fields(fields ...types.Field) *Builder

Fields sets the fields to select.

func (*Builder) ForKeyShare

func (b *Builder) ForKeyShare() *Builder

ForKeyShare adds FOR KEY SHARE row locking.

func (*Builder) ForNoKeyUpdate

func (b *Builder) ForNoKeyUpdate() *Builder

ForNoKeyUpdate adds FOR NO KEY UPDATE row locking.

func (*Builder) ForShare

func (b *Builder) ForShare() *Builder

ForShare adds FOR SHARE row locking.

func (*Builder) ForUpdate

func (b *Builder) ForUpdate() *Builder

ForUpdate adds FOR UPDATE row locking.

func (*Builder) FullOuterJoin

func (b *Builder) FullOuterJoin(table types.Table, on types.ConditionItem) *Builder

FullOuterJoin adds a FULL OUTER JOIN.

func (*Builder) GetAST

func (b *Builder) GetAST() *types.AST

GetAST returns the internal AST.

func (*Builder) GetError

func (b *Builder) GetError() error

GetError returns the internal error (for use by provider packages).

func (*Builder) GroupBy

func (b *Builder) GroupBy(fields ...types.Field) *Builder

GroupBy adds GROUP BY fields.

func (*Builder) Having

func (b *Builder) Having(conditions ...types.Condition) *Builder

Having adds HAVING conditions (simple field-based conditions). For aggregate conditions like COUNT(*) > 10, use HavingAgg instead.

func (*Builder) HavingAgg

func (b *Builder) HavingAgg(conditions ...types.AggregateCondition) *Builder

HavingAgg adds aggregate HAVING conditions like COUNT(*) > :min_count. Use this for conditions on aggregate functions (COUNT, SUM, AVG, MIN, MAX).

func (*Builder) InnerJoin

func (b *Builder) InnerJoin(table types.Table, on types.ConditionItem) *Builder

InnerJoin adds an INNER JOIN.

func (*Builder) Intersect

func (b *Builder) Intersect(other *Builder) *CompoundBuilder

Intersect creates an INTERSECT between two queries.

func (*Builder) IntersectAll

func (b *Builder) IntersectAll(other *Builder) *CompoundBuilder

IntersectAll creates an INTERSECT ALL between two queries.

func (*Builder) Join

func (b *Builder) Join(table types.Table, on types.ConditionItem) *Builder

Join adds an INNER JOIN.

func (*Builder) LeftJoin

func (b *Builder) LeftJoin(table types.Table, on types.ConditionItem) *Builder

LeftJoin adds a LEFT JOIN.

func (*Builder) Limit

func (b *Builder) Limit(limit int) *Builder

Limit sets the limit to a static integer value.

func (*Builder) LimitParam

func (b *Builder) LimitParam(param types.Param) *Builder

LimitParam sets the limit to a parameterized value.

func (*Builder) MustBuild

func (b *Builder) MustBuild() *types.AST

MustBuild returns the AST or panics on error.

func (*Builder) MustRender

func (b *Builder) MustRender(renderer Renderer) *QueryResult

MustRender builds and renders the AST with the provided renderer, or panics on error.

func (*Builder) Offset

func (b *Builder) Offset(offset int) *Builder

Offset sets the offset to a static integer value.

func (*Builder) OffsetParam

func (b *Builder) OffsetParam(param types.Param) *Builder

OffsetParam sets the offset to a parameterized value.

func (*Builder) OnConflict

func (b *Builder) OnConflict(columns ...types.Field) *ConflictBuilder

OnConflict adds ON CONFLICT clause for INSERT.

func (*Builder) OrderBy

func (b *Builder) OrderBy(f types.Field, direction types.Direction) *Builder

OrderBy adds ordering.

func (*Builder) OrderByExpr

func (b *Builder) OrderByExpr(f types.Field, op types.Operator, p types.Param, direction types.Direction) *Builder

OrderByExpr is useful for vector distance ordering: ORDER BY embedding <-> :query_vector ASC.

func (*Builder) OrderByNulls

func (b *Builder) OrderByNulls(f types.Field, direction types.Direction, nulls types.NullsOrdering) *Builder

OrderByNulls adds ordering with NULLS FIRST/LAST.

func (*Builder) Render

func (b *Builder) Render(renderer Renderer) (*QueryResult, error)

Render builds the AST and renders it using the provided renderer.

func (*Builder) Returning

func (b *Builder) Returning(fields ...types.Field) *Builder

Returning adds RETURNING fields for INSERT/UPDATE/DELETE.

func (*Builder) RightJoin

func (b *Builder) RightJoin(table types.Table, on types.ConditionItem) *Builder

RightJoin adds a RIGHT JOIN.

func (*Builder) SelectBinaryExpr

func (b *Builder) SelectBinaryExpr(f types.Field, op types.Operator, p types.Param, alias string) *Builder

SelectBinaryExpr adds a binary expression (field <op> param) AS alias to SELECT. Useful for vector distance calculations with pgvector.

Example:

builder.SelectBinaryExpr(f, VectorCosineDistance, p, "score")
// Renders: "field" <=> :param AS "score"

func (*Builder) SelectExpr

func (b *Builder) SelectExpr(expr types.FieldExpression) *Builder

SelectExpr adds a field expression (aggregate, case, etc) to SELECT.

func (*Builder) Set

func (b *Builder) Set(f types.Field, p types.Param) *Builder

Set adds a field update for UPDATE queries.

func (*Builder) SetError

func (b *Builder) SetError(err error)

SetError sets the internal error (for use by provider packages).

func (*Builder) SetExpr

func (b *Builder) SetExpr(f types.Field, expr types.FieldExpression) *Builder

SetExpr adds a field update with an expression value for UPDATE queries. Use this for computed assignments like `items_completed = items_completed + :increment`.

func (*Builder) Union

func (b *Builder) Union(other *Builder) *CompoundBuilder

Union creates a UNION between two queries.

func (*Builder) UnionAll

func (b *Builder) UnionAll(other *Builder) *CompoundBuilder

UnionAll creates a UNION ALL between two queries.

func (*Builder) Values

func (b *Builder) Values(valueMap map[types.Field]types.Param) *Builder

Values adds a row of field-value pairs for INSERT queries. Call Values() multiple times to insert multiple rows. Use instance.ValueMap() to create the map programmatically.

func (*Builder) Where

func (b *Builder) Where(condition types.ConditionItem) *Builder

Where sets or adds conditions.

func (*Builder) WhereField

func (b *Builder) WhereField(f types.Field, op types.Operator, p types.Param) *Builder

WhereField is a convenience method for simple field conditions.

type CaseBuilder

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

CaseBuilder provides fluent API for building CASE expressions.

func Case

func Case() *CaseBuilder

Case creates a new CASE expression builder.

func (*CaseBuilder) As

func (cb *CaseBuilder) As(alias string) *CaseBuilder

As adds an alias to the CASE expression.

func (*CaseBuilder) Build

func (cb *CaseBuilder) Build() types.FieldExpression

Build returns the CaseExpression wrapped in a FieldExpression.

func (*CaseBuilder) Else

func (cb *CaseBuilder) Else(result types.Param) *CaseBuilder

Else sets the ELSE clause.

func (*CaseBuilder) When

func (cb *CaseBuilder) When(condition types.ConditionItem, result types.Param) *CaseBuilder

When adds a WHEN...THEN clause.

type CastType

type CastType = types.CastType

CastType represents allowed PostgreSQL data types for casting.

type CompoundBuilder

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

CompoundBuilder handles building compound queries with set operations.

func Except

func Except(first, second *Builder) *CompoundBuilder

Except creates an EXCEPT between two queries (standalone function).

func ExceptAll

func ExceptAll(first, second *Builder) *CompoundBuilder

ExceptAll creates an EXCEPT ALL between two queries (standalone function).

func Intersect

func Intersect(first, second *Builder) *CompoundBuilder

Intersect creates an INTERSECT between two queries (standalone function).

func IntersectAll

func IntersectAll(first, second *Builder) *CompoundBuilder

IntersectAll creates an INTERSECT ALL between two queries (standalone function).

func Union

func Union(first, second *Builder) *CompoundBuilder

Union creates a UNION between two queries (standalone function).

func UnionAll

func UnionAll(first, second *Builder) *CompoundBuilder

UnionAll creates a UNION ALL between two queries (standalone function).

func (*CompoundBuilder) Build

func (cb *CompoundBuilder) Build() (*types.CompoundQuery, error)

Build returns the CompoundQuery or an error.

func (*CompoundBuilder) Except

func (cb *CompoundBuilder) Except(other *Builder) *CompoundBuilder

Except adds an EXCEPT to the compound query.

func (*CompoundBuilder) ExceptAll

func (cb *CompoundBuilder) ExceptAll(other *Builder) *CompoundBuilder

ExceptAll adds an EXCEPT ALL to the compound query.

func (*CompoundBuilder) Intersect

func (cb *CompoundBuilder) Intersect(other *Builder) *CompoundBuilder

Intersect adds an INTERSECT to the compound query.

func (*CompoundBuilder) IntersectAll

func (cb *CompoundBuilder) IntersectAll(other *Builder) *CompoundBuilder

IntersectAll adds an INTERSECT ALL to the compound query.

func (*CompoundBuilder) Limit

func (cb *CompoundBuilder) Limit(limit int) *CompoundBuilder

Limit sets the limit for the compound query to a static integer value.

func (*CompoundBuilder) LimitParam

func (cb *CompoundBuilder) LimitParam(param types.Param) *CompoundBuilder

LimitParam sets the limit for the compound query to a parameterized value.

func (*CompoundBuilder) MustBuild

func (cb *CompoundBuilder) MustBuild() *types.CompoundQuery

MustBuild returns the CompoundQuery or panics on error.

func (*CompoundBuilder) MustRender

func (cb *CompoundBuilder) MustRender(renderer Renderer) *QueryResult

MustRender builds and renders the compound query with the provided renderer, or panics on error.

func (*CompoundBuilder) Offset

func (cb *CompoundBuilder) Offset(offset int) *CompoundBuilder

Offset sets the offset for the compound query to a static integer value.

func (*CompoundBuilder) OffsetParam

func (cb *CompoundBuilder) OffsetParam(param types.Param) *CompoundBuilder

OffsetParam sets the offset for the compound query to a parameterized value.

func (*CompoundBuilder) OrderBy

func (cb *CompoundBuilder) OrderBy(f types.Field, direction types.Direction) *CompoundBuilder

OrderBy adds final ordering to the compound query.

func (*CompoundBuilder) OrderByNulls

func (cb *CompoundBuilder) OrderByNulls(f types.Field, direction types.Direction, nulls types.NullsOrdering) *CompoundBuilder

OrderByNulls adds final ordering with NULLS FIRST/LAST to the compound query.

func (*CompoundBuilder) Render

func (cb *CompoundBuilder) Render(renderer Renderer) (*QueryResult, error)

Render builds and renders the compound query using the provided renderer.

func (*CompoundBuilder) Union

func (cb *CompoundBuilder) Union(other *Builder) *CompoundBuilder

Union adds a UNION to the compound query.

func (*CompoundBuilder) UnionAll

func (cb *CompoundBuilder) UnionAll(other *Builder) *CompoundBuilder

UnionAll adds a UNION ALL to the compound query.

type CompoundQuery

type CompoundQuery = types.CompoundQuery

CompoundQuery represents a query with set operations.

type ConditionItem

type ConditionItem = types.ConditionItem

ConditionItem represents either a single condition or a group of conditions.

type ConflictBuilder

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

ConflictBuilder handles ON CONFLICT actions.

func (*ConflictBuilder) DoNothing

func (cb *ConflictBuilder) DoNothing() *Builder

DoNothing sets the conflict action to DO NOTHING.

func (*ConflictBuilder) DoUpdate

func (cb *ConflictBuilder) DoUpdate() *UpdateBuilder

DoUpdate sets the conflict action to DO UPDATE.

type Direction

type Direction = types.Direction

Direction represents sort direction.

type FrameBound

type FrameBound = types.FrameBound

FrameBound represents window frame boundaries.

type NullsOrdering

type NullsOrdering = types.NullsOrdering

NullsOrdering represents NULL ordering in ORDER BY.

type Operation

type Operation = types.Operation

Operation represents the type of query operation.

type Operator

type Operator = types.Operator

Operator represents SQL comparison operators.

type QueryResult

type QueryResult = types.QueryResult

QueryResult contains the rendered SQL and required parameters.

type Renderer

type Renderer interface {
	// Render converts an AST to a QueryResult with dialect-specific SQL.
	Render(ast *types.AST) (*types.QueryResult, error)

	// RenderCompound converts a CompoundQuery (UNION, INTERSECT, EXCEPT) to SQL.
	RenderCompound(query *types.CompoundQuery) (*types.QueryResult, error)

	// Capabilities returns the SQL features supported by this dialect.
	Capabilities() render.Capabilities
}

Renderer defines the interface for SQL dialect-specific rendering. Implementations convert an AST to dialect-specific SQL with named parameters.

type SetOperand

type SetOperand = types.SetOperand

SetOperand represents one operand in a set operation.

type SetOperation

type SetOperation = types.SetOperation

SetOperation represents SQL set operations (UNION, INTERSECT, EXCEPT).

type UpdateBuilder

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

UpdateBuilder handles DO UPDATE SET clause construction.

func (*UpdateBuilder) Build

func (ub *UpdateBuilder) Build() *Builder

Build finalizes the update and returns the builder.

func (*UpdateBuilder) Set

func (ub *UpdateBuilder) Set(field types.Field, param types.Param) *UpdateBuilder

Set adds a field to update on conflict.

type WindowBuilder

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

WindowBuilder provides a fluent API for building window function expressions.

func AvgOver

func AvgOver(field types.Field) *WindowBuilder

AvgOver creates an AVG() OVER window function.

func CountOver

func CountOver(field ...types.Field) *WindowBuilder

CountOver creates a COUNT(field) OVER window function.

func DenseRank

func DenseRank() *WindowBuilder

DenseRank creates a DENSE_RANK() window function.

func FirstValue

func FirstValue(field types.Field) *WindowBuilder

FirstValue creates a FIRST_VALUE(field) window function.

func Lag

func Lag(field types.Field, offset types.Param, defaultVal ...types.Param) *WindowBuilder

Lag creates a LAG(field, offset, default) window function.

func LastValue

func LastValue(field types.Field) *WindowBuilder

LastValue creates a LAST_VALUE(field) window function.

func Lead

func Lead(field types.Field, offset types.Param, defaultVal ...types.Param) *WindowBuilder

Lead creates a LEAD(field, offset, default) window function.

func MaxOver

func MaxOver(field types.Field) *WindowBuilder

MaxOver creates a MAX() OVER window function.

func MinOver

func MinOver(field types.Field) *WindowBuilder

MinOver creates a MIN() OVER window function.

func Ntile

func Ntile(n types.Param) *WindowBuilder

Ntile creates an NTILE(n) window function.

func Rank

func Rank() *WindowBuilder

Rank creates a RANK() window function.

func RowNumber

func RowNumber() *WindowBuilder

RowNumber creates a ROW_NUMBER() window function.

func SumOver

func SumOver(field types.Field) *WindowBuilder

SumOver creates a SUM() OVER window function.

func (*WindowBuilder) As

func (wb *WindowBuilder) As(alias string) types.FieldExpression

As adds an alias to the window function and returns a FieldExpression.

func (*WindowBuilder) Build

func (wb *WindowBuilder) Build() types.FieldExpression

Build returns the FieldExpression without an alias.

func (*WindowBuilder) Frame

func (wb *WindowBuilder) Frame(start, end types.FrameBound) *WindowBuilder

Frame sets the frame clause with ROWS BETWEEN (convenience method).

func (*WindowBuilder) OrderBy

func (wb *WindowBuilder) OrderBy(field types.Field, direction types.Direction) *WindowBuilder

OrderBy adds ORDER BY to the window specification (convenience method).

func (*WindowBuilder) Over

func (wb *WindowBuilder) Over(spec types.WindowSpec) *WindowBuilder

Over sets the window specification for a window function.

func (*WindowBuilder) OverBuilder

func (wb *WindowBuilder) OverBuilder(builder *WindowSpecBuilder) *WindowBuilder

OverBuilder sets the window specification from a builder.

func (*WindowBuilder) PartitionBy

func (wb *WindowBuilder) PartitionBy(fields ...types.Field) *WindowBuilder

PartitionBy adds PARTITION BY fields (convenience method).

type WindowFunc

type WindowFunc = types.WindowFunc

WindowFunc represents window function types.

type WindowSpec

type WindowSpec = types.WindowSpec

WindowSpec represents a window specification.

type WindowSpecBuilder

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

WindowSpecBuilder provides a fluent API for building window specifications.

func Window

func Window() *WindowSpecBuilder

Window creates a new WindowSpec for use with window functions.

func (*WindowSpecBuilder) Build

func (wsb *WindowSpecBuilder) Build() types.WindowSpec

Build returns the WindowSpec.

func (*WindowSpecBuilder) OrderBy

func (wsb *WindowSpecBuilder) OrderBy(field types.Field, direction types.Direction) *WindowSpecBuilder

OrderBy adds ORDER BY to the window specification.

func (*WindowSpecBuilder) OrderByNulls

func (wsb *WindowSpecBuilder) OrderByNulls(field types.Field, direction types.Direction, nulls types.NullsOrdering) *WindowSpecBuilder

OrderByNulls adds ORDER BY with NULLS ordering to the window specification.

func (*WindowSpecBuilder) PartitionBy

func (wsb *WindowSpecBuilder) PartitionBy(fields ...types.Field) *WindowSpecBuilder

PartitionBy adds PARTITION BY fields to the window specification.

func (*WindowSpecBuilder) Rows

func (wsb *WindowSpecBuilder) Rows(start, end types.FrameBound) *WindowSpecBuilder

Rows sets the frame clause with ROWS BETWEEN.

Directories

Path Synopsis
internal
Package mariadb provides the MariaDB dialect renderer for astql.
Package mariadb provides the MariaDB dialect renderer for astql.
Package mssql provides the SQL Server dialect renderer for astql.
Package mssql provides the SQL Server dialect renderer for astql.
Package postgres provides the PostgreSQL dialect renderer for astql.
Package postgres provides the PostgreSQL dialect renderer for astql.
Package sqlite provides the SQLite dialect renderer for astql.
Package sqlite provides the SQLite dialect renderer for astql.
Package testing provides test utilities for astql.
Package testing provides test utilities for astql.

Jump to

Keyboard shortcuts

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