db

module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2025 License: MIT

README ΒΆ

Database

Part of the Entiqon Core.

🌱 Overview

Entiqon/db is a modular SQL query engine for Go, designed for composable, type-safe, and auditable SQL generation.


πŸ›  Capabilities

Module Feature Purpose Status
builder insert High-level SQL builder for INSERT statements πŸ“ Planned
select High-level SQL builder for SELECT statements (stable and production-ready) βœ… Stable
update High-level SQL builder for UPDATE statements πŸ“ Planned
delete High-level SQL builder for DELETE statements πŸ“ Planned
upsert High-level SQL builder for UPSERT / MERGE statements πŸ“ Planned
token field Dialect-agnostic representation of SQL fields/expressions βœ… Stable
table Dialect-agnostic representation of SQL tables/sources βœ… Stable
join Dialect-agnostic representation of SQL join clauses 🚧 Ongoing
contract BaseToken Common base for tokens (shared identity, ownership, validity checks) βœ… Stable
Clonable Ensures semantic cloning of tokens without mutation βœ… Stable
Debuggable Provides developer-facing diagnostics (Debug()) βœ… Stable
Rawable Provides generic SQL output for logging (Raw()) βœ… Stable
Renderable Provides dialect-aware SQL rendering (Render()) βœ… Stable
Stringable Provides UX-facing, human-friendly string representations (String()) βœ… Stable
Validable Ensures tokens can self-validate construction rules βœ… Stable

πŸ“„ License

MIT β€” Β© Entiqon Project

Directories ΒΆ

Path Synopsis
Package builder provides modular, dialect-aware SQL builders.
Package builder provides modular, dialect-aware SQL builders.
selects
Package selects provides a builder for SQL SELECT statements.
Package selects provides a builder for SQL SELECT statements.
Package contract defines small, reusable behavioral contracts (interfaces) that core tokens (Field, Table, Join, Condition, etc.) and builders implement to enable polymorphic behavior without tight coupling between packages.
Package contract defines small, reusable behavioral contracts (interfaces) that core tokens (Field, Table, Join, Condition, etc.) and builders implement to enable polymorphic behavior without tight coupling between packages.
Package dialect defines the core SQL dialect contract and capability matrix.
Package dialect defines the core SQL dialect contract and capability matrix.
generic
Package generic provides the ANSI-compliant SQL dialect implementation.
Package generic provides the ANSI-compliant SQL dialect implementation.
Package errors defines sentinel errors used across Entiqon’s SQL builder tokens (tables, fields, joins, conditions).
Package errors defines sentinel errors used across Entiqon’s SQL builder tokens (tables, fields, joins, conditions).
internal
core/contract
Package contract defines core interfaces and types for Entiqon tokens, including rendering and error-handling abstractions.
Package contract defines core interfaces and types for Entiqon tokens, including rendering and error-handling abstractions.
Package token provides low-level primitives to represent SQL query fragments in a dialect-agnostic way.
Package token provides low-level primitives to represent SQL query fragments in a dialect-agnostic way.
condition
Package condition defines SQL condition tokens used by the Entiqon SQL builder.
Package condition defines SQL condition tokens used by the Entiqon SQL builder.
field
Package field defines the token.Field type, a low-level primitive used by the SQL builder.
Package field defines the token.Field type, a low-level primitive used by the SQL builder.
helpers
Package helpers provides classification and resolution utilities for SQL token parsing.
Package helpers provides classification and resolution utilities for SQL token parsing.
join
Package token provides primitives to represent SQL JOIN clauses in a dialect-agnostic way.
Package token provides primitives to represent SQL JOIN clauses in a dialect-agnostic way.
table
Package table defines the token.Table type, which represents a SQL table or subquery source with optional alias.
Package table defines the token.Table type, which represents a SQL table or subquery source with optional alias.
types
Package types defines low-level, dependency-free classifications used by SQL tokens.
Package types defines low-level, dependency-free classifications used by SQL tokens.
types/condition
Package condition provides primitives to represent SQL conditional expressions (WHERE, HAVING, ON).
Package condition provides primitives to represent SQL conditional expressions (WHERE, HAVING, ON).
types/identifier
Package identifier provides the classification of SQL expressions into broad syntactic categories such as subqueries, functions, aggregates, literals, and plain identifiers.
Package identifier provides the classification of SQL expressions into broad syntactic categories such as subqueries, functions, aggregates, literals, and plain identifiers.
types/join
Package join provides low-level primitives to represent SQL JOIN clauses in a dialect-agnostic way.
Package join provides low-level primitives to represent SQL JOIN clauses in a dialect-agnostic way.
types/operator
Package operator provides the set of SQL comparison and predicate operators supported by Entiqon condition tokens (WHERE, ON, HAVING).
Package operator provides the set of SQL comparison and predicate operators supported by Entiqon condition tokens (WHERE, ON, HAVING).

Jump to

Keyboard shortcuts

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