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

Method query

orm/query.go:878–883  ·  view source on GitHub ↗
(ctx context.Context, model Model, query interface{})

Source from the content-addressed store, hash-verified

876}
877
878func (q *Query) query(ctx context.Context, model Model, query interface{}) (Result, error) {
879 if _, ok := model.(useQueryOne); ok {
880 return q.db.QueryOneContext(ctx, model, query, q.tableModel)
881 }
882 return q.db.QueryContext(ctx, model, query, q.tableModel)
883}
884
885// SelectAndCount runs Select and Count in two goroutines,
886// waits for them to finish and returns the result. If query limit is -1

Callers 1

SelectMethod · 0.95

Calls 2

QueryOneContextMethod · 0.65
QueryContextMethod · 0.65

Tested by

no test coverage detected