graph/db: freeze sql migration queries

This commit is contained in:
Elle Mouton
2025-11-02 11:08:07 +02:00
committed by yyforyongyu
parent 5db82a4233
commit 352b4d620a
11 changed files with 4141 additions and 17 deletions

View File

@@ -5,6 +5,12 @@ import (
"strings"
)
// GetTx returns the underlying DBTX (either *sql.DB or *sql.Tx) used by the
// Queries struct.
func (q *Queries) GetTx() DBTX {
return q.db
}
// makeQueryParams generates a string of query parameters for a SQL query. It is
// meant to replace the `?` placeholders in a SQL query with numbered parameters
// like `$1`, `$2`, etc. This is required for the sqlc /*SLICE:<field_name>*/