4 ms·
It's not so much the parsing... it's the validation against an underlying data source. I can write `SELECT A, B from Foo` and it's "valid SQL" but that doesn't
by tracker1 3y ago
It's not so much the parsing... it's the validation against an underlying data source. I can write `SELECT A, B from Foo` and it's "valid SQL" but that doesn't mean the underlying Foo table exists, or that the columns are there. Beyond this, that doesn't mean it understands that A should map to an Int32 or that B should be a UTF-8 byte array in the outer language I'm working with.
Personally, I'm fine with the likes of type mappers like what Dapper in C# does, or serde_postgres offers in Rust. For that matter template string processors in JS/Node/Deno are also really nice. Yeah, you need to understand the underlying data source, but that's often far easier than massive amounts of boilerplate.