MCPcopy Index your code
hub / github.com/upper/db / New

Method New

internal/sqlbuilder/wrapper.go:56–56  ·  view source on GitHub ↗

New wraps an active *sql.DB session and returns a SQLBuilder database. The adapter needs to be imported to the blank namespace in order for it to be used here. This method is internally used by upper-db to create a builder backed by the given database. You may want to use your adapter's New funct

(*sql.DB)

Source from the content-addressed store, hash-verified

54 // given database. You may want to use your adapter's New function instead of
55 // this one.
56 New(*sql.DB) (db.Session, error)
57
58 // NewTx wraps an active *sql.Tx transation and returns a SQLBuilder
59 // transaction. The adapter needs to be imported to the blank namespace in

Callers 15

logger.goFile · 0.65
errors.goFile · 0.65
NewCacheWithCapacityFunction · 0.65
initMethod · 0.65
FieldByIndexesFunction · 0.65
getMappingFunction · 0.65
OpenMethod · 0.65
InsertReturningMethod · 0.65
UpdateReturningMethod · 0.65
statement.goFile · 0.65
MustCompileMethod · 0.65
BindDBFunction · 0.65

Calls

no outgoing calls

Tested by 15

TestSelectFunction · 0.52
TestInsertFunction · 0.52
TestUpdateFunction · 0.52
TestDeleteFunction · 0.52
TestPaginateFunction · 0.52
TestTemplateSelectFunction · 0.52
TestTemplateInsertFunction · 0.52
TestTemplateUpdateFunction · 0.52
TestTemplateDeleteFunction · 0.52
TestTemplateSelectFunction · 0.52