MCPcopy Create free account
hub / github.com/go-pg/pg / queryString

Function queryString

hook.go:57–66  ·  view source on GitHub ↗
(query interface{})

Source from the content-addressed store, hash-verified

55}
56
57func queryString(query interface{}) ([]byte, error) {
58 switch query := query.(type) {
59 case orm.TemplateAppender:
60 return query.AppendTemplate(nil)
61 case string:
62 return dummyFormatter{}.FormatQuery(nil, query), nil
63 default:
64 return nil, fmt.Errorf("pg: can't append %T", query)
65 }
66}
67
68// FormattedQuery returns the formatted query of a query event.
69// The query is only valid until the query Result is returned to the user.

Callers 1

UnformattedQueryMethod · 0.70

Calls 2

AppendTemplateMethod · 0.65
FormatQueryMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…