Skip to main content

Function: subsetModel()

function subsetModel(model, keep): DiagramModel;

model reduced to the given tables (+ notes), like selectView does for a DiagramView: refs between kept tables, groups with kept members (tableIds filtered), views untouched.

Order follows the model, not keep; unknown ids are ignored. Groups left without a kept table are dropped. Sticky notes are kept only when listed in noteIds (none when it is omitted). Enums, the project and the view list are kept whole; records keeps the kept tables' counts. Columns keep their isFk flag from the full model.

Parameters​

model​

DiagramModel

keep​

noteIds?​

readonly string[]

tableIds​

readonly string[]

Returns​

DiagramModel