preloaded data works

This commit is contained in:
Jan Prochazka
2021-11-27 17:49:02 +01:00
parent d4f4211ee4
commit 40d53275e3
12 changed files with 177 additions and 5 deletions

View File

@@ -22,6 +22,9 @@ export interface TableInfoYaml {
// schema?: string;
columns: ColumnInfoYaml[];
primaryKey?: string[];
insertKey?: string[];
data?: any[];
}
export interface ForeignKeyInfoYaml {
@@ -119,6 +122,8 @@ export function tableInfoFromYaml(table: TableInfoYaml, allTables: TableInfoYaml
columns: table.primaryKey.map(columnName => ({ columnName })),
};
}
res.preloadedRows = table.data;
res.preloadedRowsKey = table.insertKey;
return res;
}