addTable method

void addTable(
  1. int table_id,
  2. String tableName,
  3. Map<String, List<String>>? uniqueKeysMap,
  4. List<String>? crcFieldNamesList, {
  5. Map<String, Object>? propertyMap,
})

Implementation

void addTable(int table_id, String tableName,
    Map<String, List<String>>? uniqueKeysMap, List<String>? crcFieldNamesList,
    {Map<String, Object>? propertyMap}) {
  TableMetaData tmd =
      TableMetaData(table_id, tableName, uniqueKeysMap, crcFieldNamesList);
  tmd.setPropertyMap(propertyMap);
  maxTableId = table_id;
  _tableMetaDataList.add(tmd);
  if (_tableIdMap.containsKey(tmd.table_id))
    throw ArgumentError("table_id ${tmd.table_id} already exists.");
  _tableIdMap[tmd.table_id] = tmd;
  _tableNameMap[tmd.table_name] = tmd;
}