-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improvements suggestions #50
Comments
Initially I was for using Knex queries wherever possible, but this turned a bit to more a hack with all those Knex raw mixtures. Eventually it is all raw queries, so we might just enter them directly instead double translating then through Knex. |
Fully agree with @gpetrov here! The only perks to the Knex approach are the conditional "if A then query.where(A)" thingies, but those should be easy enough to refactor too. For the other points: ✅ Add schema and comment support in tableInfo and columnInfo for all vendors (for the vendors that support them. IIRC MySQL doesn't differentiate between schema/database, and sqlite doesn't have comments f.e.) ✅ Add primary information in tableInfo The only reason it isn't like that right now is my lack of knowledge of all the specific SQL casting stuff in the different vendors 😁 ✅ Refactor knex queries to raw SQL to improve readability when appropriate Mind clarifying what you mean by unify in this case? ✅ Move table creation SQL code to test specs. |
It's just that the default schema in MySQL is named after its database, instead of being named
Creating the exact same table configuration in each database so the expected result from each test can be shared (and maybe also database initialization if we move it to
Okay, I'll get to it 👍 |
Awesome! Thank you @Oreilles ❤️ |
Are you sure about that? From MySQL's reference manual:
As far as I can tell, MySQL treats SCHEMA == DATABASE and schema's don't have behavioral characteristics you'd find in the other vendors 🤔 |
OK, that's weird... It means that their concept of a database is different than others. (You can't query table from a database while being in another one in other vendors, but apparently with MySQL you can - because it behaves like a schema). |
So it'd be better to say that they don't support databases, but only support schemas? 🤔 |
tableInfo
andcolumnInfo
for all vendorsprimary
information intableInfo
is_view
information intableInfo
and stop filtering them outRawColumn
toColumn
knex
queries to raw SQL to improve readability when appropriateOpinion? 🥬
The text was updated successfully, but these errors were encountered: