Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for prepareContent (0.32 sec)

  1. tests/connpool_test.go

    	"gorm.io/gorm"
    	. "gorm.io/gorm/utils/tests"
    )
    
    type wrapperTx struct {
    	*sql.Tx
    	conn *wrapperConnPool
    }
    
    func (c *wrapperTx) PrepareContext(ctx context.Context, query string) (*sql.Stmt, error) {
    	c.conn.got = append(c.conn.got, query)
    	return c.Tx.PrepareContext(ctx, query)
    }
    
    func (c *wrapperTx) ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error) {
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Tue Feb 06 02:54:40 UTC 2024
    - 5.5K bytes
    - Viewed (0)
  2. prepare_stmt.go

    	// Reason why cannot lock conn.PrepareContext
    	// suppose the maxopen is 1, g1 is creating record and g2 is querying record.
    	// 1. g1 begin tx, g1 is requeue because of waiting for the system call, now `db.ConnPool` db.numOpen == 1.
    	// 2. g2 select lock `conn.PrepareContext(ctx, query)`, now db.numOpen == db.maxOpen , wait for release.
    	// 3. g1 tx exec insert, wait for unlock `conn.PrepareContext(ctx, query)` to finish tx and release.
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Thu Mar 28 08:47:39 UTC 2024
    - 6.4K bytes
    - Viewed (0)
  3. interfaces.go

    }
    
    type ParamsFilter interface {
    	ParamsFilter(ctx context.Context, sql string, params ...interface{}) (string, []interface{})
    }
    
    // ConnPool db conns pool interface
    type ConnPool interface {
    	PrepareContext(ctx context.Context, query string) (*sql.Stmt, error)
    	ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error)
    	QueryContext(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error)
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Sat Aug 19 13:33:31 UTC 2023
    - 2.2K bytes
    - Viewed (0)
  4. src/database/sql/sql.go

    // when the statement is no longer needed.
    //
    // Prepare uses [context.Background] internally; to specify the context, use
    // [DB.PrepareContext].
    func (db *DB) Prepare(query string) (*Stmt, error) {
    	return db.PrepareContext(context.Background(), query)
    }
    
    func (db *DB) prepare(ctx context.Context, query string, strategy connReuseStrategy) (*Stmt, error) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:16:53 UTC 2024
    - 103.6K bytes
    - Viewed (0)
  5. src/database/sql/fakedb_test.go

    	}
    	return stmt, nil
    }
    
    // hook to simulate broken connections
    var hookPrepareBadConn func() bool
    
    func (c *fakeConn) Prepare(query string) (driver.Stmt, error) {
    	panic("use PrepareContext")
    }
    
    func (c *fakeConn) PrepareContext(ctx context.Context, query string) (driver.Stmt, error) {
    	c.numPrepare++
    	if c.db == nil {
    		panic("nil c.db; conn = " + fmt.Sprintf("%#v", c))
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 01 12:38:07 UTC 2024
    - 30.3K bytes
    - Viewed (0)
  6. src/database/sql/driver/driver.go

    }
    
    // ConnPrepareContext enhances the [Conn] interface with context.
    type ConnPrepareContext interface {
    	// PrepareContext returns a prepared statement, bound to this connection.
    	// context is for the preparation of the statement,
    	// it must not store the context within the statement itself.
    	PrepareContext(ctx context.Context, query string) (Stmt, error)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 23 09:04:12 UTC 2023
    - 20.9K bytes
    - Viewed (0)
  7. src/database/sql/sql_test.go

    // must be defined for compatibility.
    func (c *ctxOnlyConn) Prepare(q string) (driver.Stmt, error) {
    	panic("not used")
    }
    
    func (c *ctxOnlyConn) PrepareContext(ctx context.Context, q string) (driver.Stmt, error) {
    	return c.fc.PrepareContext(ctx, q)
    }
    
    func (c *ctxOnlyConn) QueryContext(ctx context.Context, q string, args []driver.NamedValue) (driver.Rows, error) {
    	c.queryCtxCalled = true
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 18:42:28 UTC 2024
    - 111.6K bytes
    - Viewed (0)
  8. src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go

    		{"(*ColumnType).ScanType", Method, 8},
    		{"(*Conn).BeginTx", Method, 9},
    		{"(*Conn).Close", Method, 9},
    		{"(*Conn).ExecContext", Method, 9},
    		{"(*Conn).PingContext", Method, 9},
    		{"(*Conn).PrepareContext", Method, 9},
    		{"(*Conn).QueryContext", Method, 9},
    		{"(*Conn).QueryRowContext", Method, 9},
    		{"(*Conn).Raw", Method, 13},
    		{"(*DB).Begin", Method, 0},
    		{"(*DB).BeginTx", Method, 8},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 534.2K bytes
    - Viewed (0)
  9. src/internal/trace/traceviewer/static/trace_viewer_full.html

    mpressedSize,this.decompressed.crc32=this.crc32,this.decompressed.compressionMethod=this.compressionMethod,this.decompressed.getCompressedContent=this.prepareCompressedContent(a,a.index,this.compressedSize,b),this.decompressed.getContent=this.prepareContent(a,a.index,this.compressedSize,b,this.uncompressedSize),this.loadOptions.checkCRC32&&(this.decompressed=e.transformTo("string",this.decompressed.getContent()),g.crc32(this.decompressed)!==this.crc32))throw new Error("Corrupted zip : CRC32 mism...
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 21 20:45:06 UTC 2023
    - 2.5M bytes
    - Viewed (0)
Back to top