GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • litestar-org/sqlspec
  • Home
  • Learn
  • Databases
  • Integrations
  • Reference
  • Playground
  • Project
  • SQLSpec
  • Configuration
  • Exceptions
  • Protocols
  • Typing
  • Drivers

This view

  • Original page
  • New address

GeezerVison is showing sqlspec.dev — Index - SQLSpec

Query Builders¶

from sqlspec.builder import (
    AlterTable,
    BuiltQuery,
    Column,
    CreateTable,
    Delete,
    DropTable,
    Explain,
    Insert,
    Merge,
    QueryBuilder,
    Select,
    SQLFactory,
    Update,
    Values,
    VectorDistance,
    sql,
)

Fluent, parameterized SQL query builders backed by SQLGlot AST nodes. For hands-on tutorials and compiled SQL examples, see:

  • Query Builder: SELECT, Filtering and Joins
  • Expressions, Window Functions and Vector Search
  • DML, Upserts, MERGE and DDL Schema Builders

Reference Pages¶

Page Primary Symbols Description
SQL Factory and Base Builder sql, SQLFactory, QueryBuilder, BuiltQuery, ExpressionBuilder, Explain, ExplainMixin, build_copy_statement Entry-point sql factory, base QueryBuilder, EXPLAIN plan builders, and COPY statement helpers.
Select and Clause Builders Select, JoinBuilder, WindowFunctionBuilder, CaseBuilder, Case, SubqueryBuilder, WhereClauseMixin, JoinClauseMixin SELECT, JOIN, CTE (WITH), WHERE / OR WHERE, GROUP BY, HAVING, ORDER BY, LIMIT/OFFSET, PIVOT/UNPIVOT, and set operations.
DML Builders Insert, ConflictBuilder, Update, Delete, Merge, Values, ReturningClauseMixin Parameterized INSERT, ON CONFLICT / ON DUPLICATE KEY UPDATE upserts, UPDATE, DELETE, MERGE, VALUES, and RETURNING clauses.
DDL Builders DDLBuilder, CreateTable, CreateTableAsSelect, AlterTable, CreateIndex, CreateSequence, CreateView, CreateMaterializedView, CreateSchema, DropTable, RenameTable, Truncate, CommentOn Schema, table, sequence, index, view, materialized view, and catalog/Arrow/record schema-inference DDL builders.
Columns and Expressions Column, ColumnExpression, FunctionColumn, AggregateExpression, VectorDistance, build_oracle_hnsw_subquery, build_oracle_hybrid_rrf_sql Operator-overloaded column descriptors, scalar/aggregate/math/string/conversion wrappers, cross-dialect vector distance, and Oracle 26ai Hybrid RRF helpers.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.