Search by

k-kinzal / sql-semantics-sqlite

kinzal

SQLite statement models, SQL reconstruction, and schema binding for SQL Semantics

Package info

github.com/k-kinzal/sql-semantics-sqlite

Documentation

pkg:composer/k-kinzal/sql-semantics-sqlite

Statistics

Installs: 0

Dependents: 1

Suggesters: 0

Stars: 0

dev-main 2026-09-28 02:33 UTC

This package is auto-updated.

Last update: 2026-09-28 02:33:09 UTC


README

Packagist Downloads PHP Version License: MIT Docs Ask DeepWiki

SQL Semantics for SQLite adds SQLite to SQL Semantics: the typed statement models of the official SQLite grammars, the SQLite rules for reading declarations, and the SQLite builder that composes values under stable names. Installing it also installs the shared SQL Semantics runtime, and Dialect::Sqlite selects SQLite in the runtime's Semantics. No database connection is needed.

Requirements

  • PHP 8.1+ with the zlib extension

Support Syntax

The following grammar versions are supported. Pass the version tag as the second argument of Semantics; omitting it uses the default.

Version Version tag Default
3.47.2 sqlite-3.47.2 Yes

Installation

composer require k-kinzal/sql-semantics-sqlite

Usage

use SqlSemantics\Facade\Semantics;
use SqlSemantics\Platform\Sqlite\Dialect;

$statement = (new Semantics(Dialect::Sqlite))->analyze("INSERT OR REPLACE INTO users (id, name) VALUES (1, 'Alice')");

$statement->toString(); // "INSERT OR REPLACE INTO users( id , name ) VALUES( 1 , 'Alice' )"

See the SQL Semantics documentation for statement models, traversal, dependencies, and composition.

License

MIT License. See LICENSE for details.