Written to: 8 requirements: 8 proved, 0 partly, 0 failing, 0 with no test recorded. 0007-physical FR-003, 0007-physical FR-005, 0007-physical FR-006, 0007-physical FR-007, 0007-physical FR-008, 0007-physical FR-009 and 2 more
Binding (commons data 0007-physical): a logical schema, a dialect and a naming made into the statements that create the schema and load its reference data. Names are written by the case style; a table follows the tables its foreign keys refer to; indexes follow tables and data follows both; every statement carries the logical elements it was made from; and what the dialect cannot express, or a name that is too long or alike, is an error value, all of them together.
A foreign key that closes a cycle of tables is added afterwards where the dialect can add a constraint, and is an error where it cannot.
Source: commons/data/sql/physical/bind.ts
2 of 2 exports are imported by a test of the run. A test that imports an export may not call it or check what it returns.
function bind(schema: LogicalSchema, options: BindOptions): Result<Physical, readonly PhysicalError[]>
Binds a logical schema to a dialect.
| Parameter | What it is |
|---|
schema | the logical schema |
options | the dialect, the naming and the statements extensions add |
Returns: the bound schema, or every error
Imported by 247 tests of the run (247 passed, 0 failed): the library's results
interface BindOptions
What bind is given besides the schema.
| Member | Type | What it is |
|---|
dialect | Dialect | |
naming? | Naming | How names and codes are written; snake case where none is given. |
sources? | readonly StatementSource[] | What extensions add, in order. |
schema? | string | The schema the tables are in (0013-sql-qualified-names): qualified where the dialect has schemas, else its words come first in each table's name. |
tableClauses? | readonly TableClause[] | What extensions add to the end of a table, in order. |
Imported by 15 tests of the run (15 passed, 0 failed): the library's results