# The dataTypeFileArg is handled differently from the normal optionalArgs
# and only added to the list here to make use of the formatting of the help.
optionalArgs[dataTypeFileArg] =f"path to a csv that contains custom datatype mappings. The format is '{dataTypeFileArg}=path/to/file.csv' (See the README)."
"ddl2cpp [optional args] <path to ddl> <path to target> <namespace>\n\n"
"OPTIONAL ARGUMENTS:\n"+arg_string+"\n"
"<path to ddl> path to your SQL database/table definitions (SHOW CREATE TABLE SomeTable) \n"
"<path to target> path to a generated C++ header file without extension (no *.h). \n"
"<namespace> namespace you want. Usually a project/database name\n"
)
sys.exit(0)
optionalArgs= {
# if -some-key is present, it will set variable someKey to True
"-no-timestamp-warning": "show warning about date / time data types", # noTimeStampWarning = True
"-auto-id": "Assume column 'id' to have an automatic value as if AUTO_INCREMENT was specified (e.g. implicit for SQLite ROWID)", # autoId = True
"-identity-naming": "Use table and column names from the ddl (defaults to UpperCamelCase for tables and lowerCamelCase for columns)", # identityNaming = True
"-split-tables": "Make a header for each table name, using target as a directory", # splitTables = True