go: use sqlc for all db calls #3235
Labels
enhancement
New feature or request
go
Pull requests that update Go code
help wanted
Extra attention is needed
tech migration
Tasks related to technology, library, or paradigm transitions.
The purpose of this issue is to track migrating all prepared DB statements to use
sqlc
.How to migrate a prepared statement to `sqlc`
queries.sql
in the directory you are working inmake generate
Notes:
$1::int
but then it loses the name, so if there's multiple args it will be things likeColumn1
so it's better to switch to named args, in that case,@id::int
:one
or:many
, respectively. If it doesn't return anything, tag it as:exec
after the name.Files with prepared db statements to migrate to
sqlc
:alert/store.go
alert/alerlog/store.go
alert/alertmetrics/store.go
auth/handler.go
auth/basic/db.go
auth/nonce/store.go
config/store.go
engine/backend.go
engine/cleanupmanager/db.go
engine/compatmanager/db.go
engine/escalationmanager/db.go
engine/escalationmanager/update.go
engine/heartbeatmanager/db.go
engine/message/db.go
engine/metricsmanager/db.go
engine/npcyclemanager/db.go
engine/processinglock/conn.go
engine/processinglock/lock.go
engine/rotationmanager/db.go
engine/schedulemanager/db.go
engine/verifymanager/db.go
engine/verifymanager/update.go
escalation/store.go
gadb/db.go
heartbeat/store.go
integrationkey/store.go
keyring/store.go
label/store.go
limit/store.go
notice/store.go
notification/store.go
notification/twilio/dbsms.go
notificationchannel/store.go
oncall/store.go
override/store.go
schedule/store.go
schedule/rotation/store.go
schedule/rule/store.go
service/store.go
user/store.go
user/contactmethod/store.go
user/favorite/store.go
user/notificationrule/store.go
util/sqlprepare.go
The text was updated successfully, but these errors were encountered: