MCPcopy Index your code
hub / github.com/riverqueue/river / Run

Method Run

rivershared/sqlctemplate/sqlc_template.go:117–123  ·  view source on GitHub ↗

also finds "/* TEMPLATE_BEGIN" Run replaces any tempates in input SQL with values from context added via WithReplacements. args aren't used for replacements in the input SQL, but are needed to determine which placeholder number (e.g. $1, $2, $3, ...) we should start with to replace any template nam

(ctx context.Context, argPlaceholder, sql string, args []any)

Source from the content-addressed store, hash-verified

115// argPlaceholder is the character to use as a placeholder like "$" in "$1" or
116// "$2". This should be a "$" for Postgres, but a "?" for SQLite.
117func (r *Replacer) Run(ctx context.Context, argPlaceholder, sql string, args []any) (string, []any) {
118 sql, namedArgs, err := r.RunSafely(ctx, argPlaceholder, sql, args)
119 if err != nil {
120 panic(err)
121 }
122 return sql, namedArgs
123}
124
125// RunSafely is the same as Run, but returns an error in case of missing or
126// extra templates.

Callers

nothing calls this directly

Calls 1

RunSafelyMethod · 0.95

Tested by

no test coverage detected