“SQL is actually pretty great”

San Francisco
Joined October 2023
Include

Only show posts containing:

Exclude

Hide posts containing:

Time range
-
Minimum likes
Replying to @k_omotani
If you add more schema update statements, sqlc will have to do more work. But it shouldn't be perceptible because the extra work is so small relative to everything else that sqlc does.
1
1
101
Replying to @k_omotani
Yes, sqlc builds up a catalog from your DDL statements each time it runs.
1
1
86
Replying to @gorilla0513
The documentation is unfortunately lacking. The plugin interface is essentially gRPC over stdin/stdout. A reasonable place to start is with our plugin SDK for Go (github.com/sqlc-dev/plugin-s…) which implements the interface. And for a full plugin example, see github.com/sqlc-dev/sqlc-gen….
1
88
Replying to @itishrishikesh
Sorry to hear that. There are critical elements of sqlc that don't build on Windows, although we just merged a workaround using WASM so Windows should be fully supported in the next sqlc release. You can try it now if you go install from the main branch. github.com/sqlc-dev/sqlc/pul…
1
1
59
Replying to @knaka
You might try overriding the timestamp database type with `pgtype.Timestamp` which doesn't require changing the database driver from `database/sql`. docs.sqlc.dev/en/latest/howt…
1
38
Just added GitHub as an authentication provider to sqlc Cloud, in case you don't have (or don't want to use) a Google account.
379
In sqlc v1.24.0 we introduced a way to verify whether schema changes are safe to apply before they hit production. Let us know what other verification steps would be useful to prevent production database outages before they happen. sqlc.dev/posts/2023/11/21/sq…
2
702
Replying to @toritori0318
It might not be exactly what you want, but sqlc.embed() can give you a little more control over your output struct types. docs.sqlc.dev/en/latest/howt…
1
44
In case it's still relevant, we released sqlc-gen-go which is the sqlc internal Go codegen package extracted for use as an external plugin. Forking and modifying it to support alternative SQLite drivers should be easier than forking the entirety of sqlc. github.com/sqlc-dev/sqlc-gen…
1
1
1
179
We've extracted the sqlc Go codegen package as a separate plugin called sqlc-gen-go. So now you can fork and modify sqlc's Go output without forking the entirety of sqlc. sqlc.dev/posts/2023/11/06/pu…
4
470
Replying to @zztkm
Are you writing a plugin in Go or something else? We will likely expose the internal/rpc interface soon so that a Go plugin can actually just implement the gRPC server interface directly and hand that to the sdk.
1
1
50
Replying to @zztkm
Yes, basically. The messages sqlc sends and receives from plugins are proto, and we implement a gRPC-like interface over stdin and stdout. Take a look at github.com/sqlc-dev/plugin-s… for an example in Go.
1
1
100
ORMs I think turned out to be a bad idea. Libraries like sqlc for Go or pgtyped for ts are the future
3
2
343
Soon, but for now we'd recommend pgtyped. And you can use it with sqlc cloud managed databases: `DATABASE_URL=$(sqlc createdb) npx pgtyped -c config.json`
1
65
Replying to @zztkm
It's definitely something we are considering. github.com/sqlc-dev/sqlc/pul…
1
1
1
188