This PR adds the options --readonly-prefix and --readonly-suffixes to set a table to be read-only. Read-only means to only generate StructType::Read (not Update or Create) and the corresponding functions.
This is useful for things like SQLite's Views which are read-only (can be read, but cannot be written to)
This PR also includes a slight refactor of the generate_for_table function, which now only adds new-lines and struct if they actually have code, resulting in less empty new-lines (which is more apparent with readonly set)
This PR adds the options
--readonly-prefix
and--readonly-suffixes
to set a table to be read-only. Read-only means to only generateStructType::Read
(not Update or Create) and the corresponding functions.This is useful for things like SQLite's Views which are read-only (can be read, but cannot be written to)
This PR also includes a slight refactor of the
generate_for_table
function, which now only adds new-lines and struct if they actually have code, resulting in less empty new-lines (which is more apparent with readonly set)re #56
--read-only-prefix