Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for Stmts (0.18 sec)

  1. prepare_stmt.go

    	for _, query := range db.PreparedSQL {
    		if stmt, ok := db.Stmts[query]; ok {
    			delete(db.Stmts, query)
    			go stmt.Close()
    		}
    	}
    }
    
    func (sdb *PreparedStmtDB) Reset() {
    	sdb.Mux.Lock()
    	defer sdb.Mux.Unlock()
    
    	for _, stmt := range sdb.Stmts {
    		go stmt.Close()
    	}
    	sdb.PreparedSQL = make([]string, 0, 100)
    	sdb.Stmts = make(map[string]*Stmt)
    }
    
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Thu Mar 28 08:47:39 GMT 2024
    - 6.4K bytes
    - Viewed (0)
  2. tests/prepared_stmt_test.go

    			var result User
    			tx.First(&result)
    			wg.Done()
    		}()
    	}
    	wg.Wait()
    
    	conn, ok := tx.ConnPool.(*gorm.PreparedStmtDB)
    	AssertEqual(t, ok, true)
    	AssertEqual(t, len(conn.Stmts), 2)
    	for _, stmt := range conn.Stmts {
    		if stmt == nil {
    			t.Fatalf("stmt cannot bee nil")
    		}
    	}
    
    	AssertEqual(t, sqlDB.Stats().InUse, 0)
    }
    
    func TestPreparedStmtInTransaction(t *testing.T) {
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Thu Mar 21 07:55:43 GMT 2024
    - 4K bytes
    - Viewed (0)
  3. gorm.go

    				Tx:             t,
    				PreparedStmtDB: preparedStmt,
    			}
    		default:
    			tx.Statement.ConnPool = &PreparedStmtDB{
    				ConnPool: db.Config.ConnPool,
    				Mux:      preparedStmt.Mux,
    				Stmts:    preparedStmt.Stmts,
    			}
    		}
    		txConfig.ConnPool = tx.Statement.ConnPool
    		txConfig.PrepareStmt = true
    	}
    
    	if config.SkipHooks {
    		tx.Statement.SkipHooks = true
    	}
    
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Sun Aug 20 11:46:56 GMT 2023
    - 11.6K bytes
    - Viewed (0)
  4. api/go1.2.txt

    pkg testing, type CoverBlock struct, Col1 uint16
    pkg testing, type CoverBlock struct, Line0 uint32
    pkg testing, type CoverBlock struct, Line1 uint32
    pkg testing, type CoverBlock struct, Stmts uint16
    pkg testing, type TB interface, Error(...interface{})
    pkg testing, type TB interface, Errorf(string, ...interface{})
    pkg testing, type TB interface, Fail()
    pkg testing, type TB interface, FailNow()
    Plain Text
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri Oct 18 04:36:59 GMT 2013
    - 1.9M bytes
    - Viewed (2)
Back to top