Package sleela-sql
This package contains 1 source unit(s) defining 3 class(es) / struct(s). Each unit below lists its fields (the values it stores) and methods (the actions it performs), with a plain explanation of each.
SqlModel #sleela 2.5 (lib/sleela-sql/SqlModel.sleela)
Schema struct
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
name | String name | table name |
cols | String cols | "id, title, year" (display only) |
ncols | int ncols | column count |
Plan struct
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
op | String op | "CREATE" | "INSERT" | "SELECT" |
table | String table | target table |
nvalues | int nvalues | INSERT: number of VALUES supplied |
col | String col | SELECT: a projected / WHERE column ("" or "*" = all) |
colFound | int colFound | SELECT: 1 if `col` exists in the schema, else 0 |
exists | int exists | CREATE: 1 if a table of this name already exists |
SqlModel class
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
checkCreate | void checkCreate(Plan p) | Verdict for a CREATE plan (table must not already exist). |
checkInsert | void checkInsert(Plan p, Schema s) | Verdict for an INSERT plan against a schema (arity invariant). |
checkSelect | void checkSelect(Plan p, Schema s) | Verdict for a SELECT plan against a schema (column existence). |
schema | Schema schema(String name, String cols, int ncols) | No description in source. |
plan | Plan plan(String op, String table, int nvalues, String col, | No description in source. |
main | void main() | No description in source. |