You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if norm.is_some() && col["file"].is_badvalue(){// Many-to-one relation (subtable with fkey in parent table)
282
-
let subtable = add_table(colname,&path, norm, settings, col["cols"].as_vec().unwrap_or_else(|| fatalerr!("Error: subtable 'cols' entry is not an array")),None, cardinality);
292
+
let subtable = add_table(colname,&path, norm, settings, col["cols"].as_vec().unwrap_or_else(|| fatalerr!("Error: subtable 'cols' entry is not an array")), cardinality);
293
+
emit_preamble(&subtable, settings,None);
283
294
Some(subtable)
284
295
}
285
296
elseif norm.is_some(){// Many-to-many relation (this file will contain the crosslink table)
286
297
let filename = col["file"].as_str().unwrap_or_else(|| fatalerr!("Error: subtable {} has no 'file' entry", colname));
287
298
if table.columns.is_empty(){fatalerr!("Error: table '{}' cannot have a subtable as first column", name);}
288
-
Some(add_table(colname,&path,Some(filename), settings, col["cols"].as_vec().unwrap_or_else(|| fatalerr!("Error: subtable 'cols' entry is not an array")),Some(format!("{} {}", name, table.columns[0].datatype)), cardinality))
299
+
let subtable = add_table(colname,&path,Some(filename), settings, col["cols"].as_vec().unwrap_or_else(|| fatalerr!("Error: subtable 'cols' entry is not an array")), cardinality);
else{// One-to-many relation (this file will contain the subtable with the parent table fkey)
291
304
let filename = col["file"].as_str().unwrap_or_else(|| fatalerr!("Error: subtable {} has no 'file' entry", colname));
292
305
if table.columns.is_empty(){fatalerr!("Error: table '{}' cannot have a subtable as first column", name);}
293
-
Some(add_table(colname,&path,Some(filename), settings, col["cols"].as_vec().unwrap_or_else(|| fatalerr!("Error: subtable 'cols' entry is not an array")),Some(format!("{} {}", name, table.columns[0].datatype)), cardinality))
306
+
let subtable = add_table(colname,&path,Some(filename), settings, col["cols"].as_vec().unwrap_or_else(|| fatalerr!("Error: subtable 'cols' entry is not an array")), cardinality);
0 commit comments