# # template for insrcdata project configuration file # # # # Level 1 : project # # source code # path relative to project file path, may be overridden by the -outdir command line argument # optional : default to project name with .rs extension dest ="src/hellodata.rs" # # Level 2 : table # [[table]] # name of the struct that will implement a row in the table # must be a valid identifier name = 'HelloWorld' # table source # path relative to project file path ( or to the -indir argument ) # optional : default to table name in lowercase with .csv extension src = "helloworld.csv" # if true : create a static method array() that will return a reference to the table # will also create an as_index() method # optional : default to false array = true # in future version, some optimisation strategy may need to rearange row order. # set this flag to true if input row order must not be altered in table. # optional : default to false sorted = false # # Level 3 : column # [[table.col]] # name of the struct field that will implement a column in the table name = 'sentence' # content of the header row in the csv that contain the name of the column # default to name option value src= 'sentence' # datatype of the struct field (str, i32, u08..) # default to str format = 'str' # create a struct method to iterate the rows with a column value matching the range # optional : default to false # this field is useless for label and object formats range = false # if several rows have the same value for this column, only the first row is kept # rows with empty values are skipped # you can set this flag for several columns of the table: the row will be skipped if all the columns are equal # optional : default to false single = false # for object format column # specify implementation for each target language target = [ { lang= 'rs', type = '...', template="...{}...", import='...' }, ] # for label format column # in rust allow to retrieve the enum variant from a row # must contains the name of the column that will store the enum # optional : default to empty value, disabling generation as_label = "as_label" # for label format column # the name of the column to use when generating inline help comment # optional : no help generated if absent label_helps = "info-col" # # Level 3 : join # [[table.join]] # name of the struct field that will implement a join in the table name = 'author' # content of the header row in the csv that contain the name of the column # default to name option value src= 'author' # declare the target column of a join to = 'ref' # target table for external join # optional : inner join if undefined external= 'Person' # accessor method will return a Option<> # optional : false by default optional = false # create accessor method in to table for reverse join # optional : no creation by default reverse = 'books' # name oh the column # optional : default to empty value, disabling generation as_index = "author_index" # # Level 3 : variant # # name of the struct field that will implement a join in the table name = 'object' # content of the header row in the csv that contain the name of the column # default to name option value src = 'ref' # accessor method will create a None variant for empty values # optional : false by default optional=true # define target of each variant # - to = target column # - external = target table for external join, optional : inner join if undefined # - reverse = create accessor method in to table for reverse join, optional : no creation by default either = [ { to= 'ref', external='Author', reverse="books" }, ]