Lines Matching defs:database

152 type database struct {  struct
153 PartialDatabase
154 db.Settings
156 lookupNameOnce sync.Once
157 name string
159 mu sync.Mutex // guards ctx, txOptions
160 ctx context.Context
161 txOptions *sql.TxOptions
163 sessMu sync.Mutex // guards sess, baseTx
164 sess *sql.DB
165 baseTx BaseTx
167 sessID uint64
168 txID uint64
170 cacheMu sync.Mutex // guards cachedStatements and cachedCollections
171 cachedStatements *cache.Cache
172 cachedCollections *cache.Cache
174 template *exql.Template
182 func (d *database) Session() *sql.DB {
187 func (d *database) SetContext(ctx context.Context) {
194 func (d *database) Context() context.Context {
204 func (d *database) SetTxOptions(txOptions sql.TxOptions) {
211 func (d *database) TxOptions() *sql.TxOptions {
222 func (d *database) BindTx(ctx context.Context, t *sql.Tx) error {
238 func (d *database) Transaction() BaseTx {
243 func (d *database) Name() string {
254 func (d *database) BindSession(sess *sql.DB) error {
276 func (d *database) Ping() error {
285 func (d *database) SetConnMaxLifetime(t time.Duration) {
294 func (d *database) SetMaxIdleConns(n int) {
303 func (d *database) SetMaxOpenConns(n int) {
311 func (d *database) ClearCache() {
324 func (d *database) NewClone(p PartialDatabase, checkConn bool) (BaseDatabase, error) {
346 func (d *database) Close() error {
378 func (d *database) Collection(name string) db.Collection {
396 …abase) StatementPrepare(ctx context.Context, stmt *exql.Statement) (sqlStmt *sql.Stmt, err error) {
426 func (d *database) ConvertValues(values []interface{}) []interface{} {
435 …tExec(ctx context.Context, stmt *exql.Statement, args ...interface{}) (res sql.Result, err error) {
496 …Query(ctx context.Context, stmt *exql.Statement, args ...interface{}) (rows *sql.Rows, err error) {
540 …ueryRow(ctx context.Context, stmt *exql.Statement, args ...interface{}) (row *sql.Row, err error) {
582 func (d *database) Driver() interface{} {
591 … (d *database) compileStatement(stmt *exql.Statement, args []interface{}) (string, []interface{}) {
600 … context.Context, stmt *exql.Statement, args []interface{}) (*Stmt, string, []interface{}, error) {
644 func (d *database) WaitForConnection(connectFn func() error) error {