# # insrcdata : testfull sample # dest ="../rust-testfull/src/insrcdata.rs" [[table]] name="Person" src = "persons.csv" [[table.col]] name = 'name' # Inner join with cardinality 1..1 [[table.join]] name = 'spouse' to = 'ref' # Inner join with cardinality 0..1 [[table.join]] name = 'father' to = 'ref' optional = true # Other inner join with cardinality 0..1 [[table.join]] name = 'mother' to = 'ref' optional = true # bool value [[table.col]] name = 'woman' format = 'bool' #range = true. clippy linter is triggered by the Rust code generated for this function # float value (this score has no real meaning) [[table.col]] name = 'score' format = 'f64' range = true # Create code labels for rows [[table.col]] name = 'Persons' src = 'ref' format = 'label' # ---- table encoding [[table]] name = "strencoding" src = "strencoding.csv" array = true [[table.col]] name = 'text' range = true # ---- table lettercase [[table]] name = "lettercase" src = "lettercase.csv" [[table.col]] name = 'name' [[table.col]] name = 'lettercases' src= "label" format = 'label' [[table.col]] name = 'transformer' format = 'object' target = [ { lang= 'rs', type = 'fn(&str)->String', template="co::{}", import='crate::colobject as co' }, { lang= 'c', type = 'transformer_t*', import='colobject.h' }, ] [[table.col]] name = 'point' format = 'object' target = [ { lang= 'rs', type = "&'static crate::colobject::Point", template="&co::{}", import='crate::colobject as co' }, { lang= 'c', type = 'const point_t*', template="&POINT_{}", import='colobject.h' }, ] # ---- table wikidata [[table]] name = "wikidata" src = "wikidata.csv" array = true [[table.col]] name = 'qid' format = 'u32' [[table.variant]] name = 'object' src = 'ref' either = [ { to= 'ref', external='Person', reverse="wdata" }, { to= 'label', external='lettercase', reverse="wdata2" }, ] # ---- table library of congress [[table]] name = "congress" src = "congress.csv" array = true [[table.col]] name = 'lccn' [[table.variant]] name = 'object' src = 'ref' optional=true either = [ { to= 'ref', external='Person', reverse="congress" }, { to= 'label', external='lettercase', reverse="congress" }, ]