IF Commons GitHub

sql/extensions/rewrite/rewrite

Written to: 2 requirements: 2 proved, 0 partly, 0 failing, 0 with no test recorded. 0017-sql-rewrite FR-001, 0017-sql-rewrite FR-006

Making a table again (commons data 0017-sql-rewrite): what an engine cannot change in place (whether a column may be null, a default, the primary key, a constraint, a column that is required and has no default) is made by making the table again from the state after the change: a new table, the rows copied, the old one dropped, the new one renamed, the indexes made. A change of type is made in place with a cast where the engine can, and by making the table again where it cannot, when the project says that values may be cast.

Source: commons/data/sql/extensions/rewrite/rewrite.ts

1 of 3 exports are imported by a test of the run. A test that imports an export may not call it or check what it returns.

Rewriteinterfaceno test imports it
interface Rewrite

The settings with every default filled.

MemberTypeWhat it is
rewriteboolean
castsboolean
suffixstring
rewritefunction
function rewrite(given?: RewriteSettings): Fallback

The fallback of a project's settings.

ParameterWhat it is
givenwhat a project says

Returns: the fallback, to be given to plan or contributed through lifecycle.fallback

Imported by 9 tests of the run (9 passed, 0 failed): the library's results

RewriteSettingsinterfaceno test imports it
interface RewriteSettings

What a project says of the rewrite; what is not said is the default.

MemberTypeWhat it is
rewrite?"off" | "on"Whether a table is made again where the engine cannot change it in place; on by default.
casts?"allow" | "refuse"Whether a change of type may cast the values; refuse by default, which leaves it to a person.
suffix?stringThe last word of the name the new table has while it is made; rebuild by default.

Titles, headings, exports, tables, columns and requirements. Esc closes.