MCPcopy Index your code
hub / github.com/Masterminds/structable / New

Function New

structable.go:263–275  ·  view source on GitHub ↗

New creates a new DbRecorder. (The squirrel.DBProxy interface defines the functions normal for a database connection or a prepared statement cache.)

(db squirrel.DBProxyBeginner, flavor string)

Source from the content-addressed store, hash-verified

261// (The squirrel.DBProxy interface defines the functions normal for a database connection
262// or a prepared statement cache.)
263func New(db squirrel.DBProxyBeginner, flavor string) *DbRecorder {
264 b := squirrel.StatementBuilder.RunWith(db)
265 r := new(DbRecorder)
266 r.builder = &b
267 r.db = db
268 r.flavor = flavor
269
270 if flavor == "postgres" {
271 b = b.PlaceholderFormat(squirrel.Dollar)
272 }
273
274 return r
275}
276
277// Bind binds a DbRecorder to a Record.
278//

Callers 15

NewActRecFunction · 0.85
TestLoadFunction · 0.85
TestLoadWhereFunction · 0.85
TestInsertFunction · 0.85
TestUpdateFunction · 0.85
TestDeleteFunction · 0.85
TestExistsFunction · 0.85
TestPlainStructInsertFunction · 0.85

Calls

no outgoing calls

Tested by 15

NewActRecFunction · 0.68
TestLoadFunction · 0.68
TestLoadWhereFunction · 0.68
TestInsertFunction · 0.68
TestUpdateFunction · 0.68
TestDeleteFunction · 0.68
TestExistsFunction · 0.68
TestPlainStructInsertFunction · 0.68