camelconstconst camel: CaseStyleWords joined, each after the first with a capital: givenName, line1.
Case styles and naming (commons data 0007-physical FR-001, FR-002): how a list of words is written as a name. snake, camel and pascal are the library's own, snake case is the default, and an extension adds another through the engine's point physical.caseStyle. The stored value of a code is written by a style too, so that employedBy is stored as employed_by in a snake case database and the data already there stays what it was; a project may keep the codes as their names.
camelconstconst camel: CaseStyleWords joined, each after the first with a capital: givenName, line1.
CaseStyleinterfaceinterface CaseStyleA case style: a name, and how it writes words.
| Member | Type | What it is |
|---|---|---|
name | string | |
write | (words: Words) => string |
caseStylePointconstconst caseStylePoint: ContributionPoint<CaseStyle>The contribution point an extension fills to add a case style.
caseStylesFromfunctionfunction caseStylesFrom(composition: Composition): readonly CaseStyle[]The case styles of a composition, in its order.
| Parameter | What it is |
|---|---|
composition | the project's composition |
Returns: the styles its extensions contribute
namingfunctionfunction naming(names?: CaseStyle, codes?: "name" | CaseStyle): NamingA naming.
| Parameter | What it is |
|---|---|
names | the style of the names; snake case where none is given |
codes | the style of the stored codes; the style of the names where none is given |
Returns: the naming
Naminginterfaceno test imports itinterface NamingHow names, and the stored values of codes, are written.
| Member | Type | What it is |
|---|---|---|
names | CaseStyle | The style of the names of tables, columns, constraints and indexes. |
codes | "name" | CaseStyle | The style of the stored values of codes, or name to store a code as its name. |
pascalconstconst pascal: CaseStyleWords joined, each with a capital: GivenName, Line1.
snakeconstconst snake: CaseStyleWords joined by an underscore: given_name, line_1.
writeCodefunctionfunction writeCode(n: Naming, code: string): stringThe stored value of a code.