agiletiger / ojotas

The database-first ORM
MIT License
7 stars 4 forks source link

getParamsFromAst should accept table definitions to know which insert values are optional #29

Closed nicoabie closed 9 months ago

nicoabie commented 10 months ago

imagine the following statement

INSERT INTO users (name, email, age) VALUES (?, ?, ?) if age is nullable we should allow creating users without specifying their age.

nicoabie commented 10 months ago

today generateParamsTypeFromAst receives the table definitions I think it should not do that, only getParamsFromAst receive them and generateParamsTypeFromAst renamed and only be in charge of receiving the output from getParamsFromAst and the queryName to form the string

nicoabie commented 9 months ago

addressed in #39