mirror of
https://github.com/lightninglabs/aperture.git
synced 2025-12-17 17:14:19 +01:00
Since v0.18.0 there they multiple bug fixes, support more postgres/sqlite features, etc... Nothing impacting the current code. NOTE: It also looks like sqlc is growing as a company and wants to support more languages, add feature for cloud clients, etc... Because of the open source nature of this project I do not think that brings any extra benefit. The only remarkable thing is that they are working on doing the code more modular, and extracting the code generation in multiple "plugins" They already extracted the go one. No changes are needed by now, but maybe at some point they delete the code gen form the main project and the config files need to be updated to use the plugin system [sqlc-dev/plugin-sdk-go].
21 lines
423 B
Bash
Executable File
21 lines
423 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
# Directory of the script file, independent of where it's called from.
|
|
DIR="$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)"
|
|
# Use the user's cache directories
|
|
GOCACHE=`go env GOCACHE`
|
|
GOMODCACHE=`go env GOMODCACHE`
|
|
|
|
echo "Generating sql models and queries in go..."
|
|
|
|
docker run \
|
|
--rm \
|
|
--user "$UID:$(id -g)" \
|
|
-e UID=$UID \
|
|
-v "$DIR/../:/build" \
|
|
-w /build \
|
|
sqlc/sqlc:1.25.0 generate
|
|
|