Automatic CRUD generation
Typesql can automatically generate CRUD operations for the tables you want.
You can specify the tables you want to generate CRUD operations on the config file typesql.json
with the attribute includeCrudTables.
If you use [”*”], TypeSQL will generate CRUD operations for all the tables on your schema.
CRUD Operations
Suppose you have the table books as defined below:
If you define the configuration “includeCrudTables”: [“books”], TypeSQL will generate the following functions insertIntoBooks(...)
, selectFromBooks(...)
, updateBooks(...)
and deleteFromBooks(...)
.
See an example of how to call the generated functions: