There will be times when you want to use different objects when you SELECT from mysql and when you do an INSERT. For example, suppose you have an id column. You want it to be not nullable for select, but nullable for insert. This is used in such a case.
Configuration file
declared
isSeparate - Whether to separate the file (default: false)
insertPrefix - Prefix for insert (default: “insert”)
insertSuffix - Suffix for insert (default: "")
If there is no need to separate the schema for Select and Insert, leave it false or omit separate from options.
prefix
A string to be prepended to the schema and type name. (Default is Insert)
suffix
A string to be given after the schema and type name. (Default is an empty string)
example
Usage
This option allows you to create an object without an id when you want to do an INSERT using knex.