MCPcopy Create free account
hub / github.com/dataddo/pgq / WriteString

Method WriteString

internal/query/query_builder.go:24–30  ·  view source on GitHub ↗

WriteString appends the provided string to the query and extracts any parameters from it.

(part string)

Source from the content-addressed store, hash-verified

22
23// WriteString appends the provided string to the query and extracts any parameters from it.
24func (qb *Builder) WriteString(part string) {
25 params := getParams(part)
26
27 qb.params = append(qb.params, params...)
28
29 qb.query.WriteString(part)
30}
31
32// HasParam checks whether the Builder has a parameter of the given name.
33func (qb *Builder) HasParam(name string) bool {

Callers 2

generateQueryMethod · 0.95
buildInsertQueryFunction · 0.95

Calls 1

getParamsFunction · 0.85

Tested by

no test coverage detected