Skip to main content

Crate unisql_sqlparser_adapter

Crate unisql_sqlparser_adapter 

Source
Expand description

sqlparser adapter: text -> IR for the dialects that sqlparser can parse. The per-dialect differences are the Rules; no parser type escapes this crate. Anything the IR cannot represent is ReadError::NotInIr, never a pass-through.

Query, Select, Insert, Update and Delete are destructured with every field named and no ..: a sqlparser upgrade that adds a field fails the build here, forcing a decision rather than silently dropping a construct.

Structs§

Rules
What differs between source dialects at the AST-to-IR step.
SchemaRead
The classes of the base-table columns a DDL script declares, read for types only: this is not DDL translation, and no statement of it is ever written out.

Statics§

MYSQL
POSTGRES
SQLITE

Functions§

read
Read exactly one statement written in the dialect described by rules.
read_schema
Read CREATE TABLE, ALTER TABLE .. ADD|DROP|ALTER COLUMN and DROP TABLE out of a DDL script (a migration file) in the dialect described by rules. Statements are split on ; tokens, so a dollar-quoted body does not split; a statement that does not parse is listed in skipped.