4 ms·
This is very slick! > Time will tell if it's feasible to also type-check mutating queries. What do you mean by "mutating queries"? When the underlying schema
by chrisjc 4y ago
This is very slick!
> Time will tell if it's feasible to also type-check mutating queries.
What do you mean by "mutating queries"? When the underlying schema changes? For instance when a new column is added to the `video` table, or if `video.id` changes to a varchar?
Haven't dived in deep enough yet, but is this using the DB engine's explain query, or I guess my question is how does it interrogate the underlying db/schema if the schema isn't supplied as code in the setup? Or at least, how would you envision all that happening?
- nikeee 4y agoBy mutating queries I thought of UPDATE, INSERT and DELETE. It should be possible to parse those and check if they obey the schema, so raw SQL that updates/inserts/deletes data could also be checked.
- chrisjc 4y agoAh! Always struggling with terminology specifics when talking about DBs/SQL. Sometime when people use the term SQL, they mean DDL, DQL (data query lang) and DML (data manipulation lang), other times they mean just queries (DQL).