agiletiger / ojotas

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

generate function and types from sql file #8

Closed nicoabie closed 10 months ago

nicoabie commented 10 months ago

the idea is to take a sql like string and generate an AST from it. we can try https://www.npmjs.com/package/node-sql-parser initially

once we have that, we generate a function that is going to return that sql string and return the correct types.

we will need to go to the db and do some introspection to know which are the types of the entities being selected

nicoabie commented 10 months ago

completed in https://github.com/agiletiger/ojotas/pull/12