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

Method UnformattedQuery

hook.go:53–55  ·  view source on GitHub ↗

UnformattedQuery returns the unformatted query of a query event. The query is only valid until the query Result is returned to the user.

()

Source from the content-addressed store, hash-verified

51// UnformattedQuery returns the unformatted query of a query event.
52// The query is only valid until the query Result is returned to the user.
53func (e *QueryEvent) UnformattedQuery() ([]byte, error) {
54 return queryString(e.Query)
55}
56
57func queryString(query interface{}) ([]byte, error) {
58 switch query := query.(type) {

Callers 2

hook_test.goFile · 0.80
AfterQueryMethod · 0.80

Calls 1

queryStringFunction · 0.70

Tested by

no test coverage detected