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

Method New

orm/query.go:101–111  ·  view source on GitHub ↗

New returns new zero Query bound to the current db.

()

Source from the content-addressed store, hash-verified

99
100// New returns new zero Query bound to the current db.
101func (q *Query) New() *Query {
102 clone := &Query{
103 ctx: q.ctx,
104 db: q.db,
105
106 model: q.model,
107 tableModel: cloneTableModelJoins(q.tableModel),
108 flags: q.flags,
109 }
110 return clone.withFlag(implicitModelFlag)
111}
112
113// Clone clones the Query.
114func (q *Query) Clone() *Query {

Callers 15

WrapWithMethod · 0.95
selectJoinsMethod · 0.95
listener.goFile · 0.45
TestParseURLFunction · 0.45
TestOptions_ToURLFunction · 0.45
TestLoaderErrorMethod · 0.45
ParseURLFunction · 0.45
enableSSLMethod · 0.45
readRowDescriptionFunction · 0.45
tx.goFile · 0.45
stmt.goFile · 0.45

Calls 2

withFlagMethod · 0.95
cloneTableModelJoinsFunction · 0.85

Tested by 5

TestParseURLFunction · 0.36
TestOptions_ToURLFunction · 0.36
TestLoaderErrorMethod · 0.36
ValueMethod · 0.36