Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 54 for Db (0.02 sec)

  1. gorm.go

    			if errTranslator, ok := db.Dialector.(ErrorTranslator); ok {
    				err = errTranslator.Translate(err)
    			}
    		}
    
    		if db.Error == nil {
    			db.Error = err
    		} else {
    			db.Error = fmt.Errorf("%v; %w", db.Error, err)
    		}
    	}
    	return db.Error
    }
    
    // DB returns `*sql.DB`
    func (db *DB) DB() (*sql.DB, error) {
    	connPool := db.ConnPool
    	if db.Statement != nil && db.Statement.ConnPool != nil {
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Wed Oct 09 11:29:48 UTC 2024
    - 12.1K bytes
    - Viewed (0)
  2. tests/tests_test.go

    		if dbDSN == "" {
    			dbDSN = sqlserverDSN
    		}
    		db, err = gorm.Open(sqlserver.Open(dbDSN), cfg)
    	case "tidb":
    		log.Println("testing tidb...")
    		if dbDSN == "" {
    			dbDSN = tidbDSN
    		}
    		db, err = gorm.Open(mysql.Open(dbDSN), cfg)
    	default:
    		log.Println("testing sqlite3...")
    		db, err = gorm.Open(sqlite.Open(filepath.Join(os.TempDir(), "gorm.db")), cfg)
    		if err == nil {
    			db.Exec("PRAGMA foreign_keys = ON")
    		}
    	}
    
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Mon Sep 30 03:21:19 UTC 2024
    - 3.3K bytes
    - Viewed (0)
  3. finisher_api.go

    func (db *DB) Create(value interface{}) (tx *DB) {
    	if db.CreateBatchSize > 0 {
    		return db.CreateInBatches(value, db.CreateBatchSize)
    	}
    
    	tx = db.getInstance()
    	tx.Statement.Dest = value
    	return tx.callbacks.Create().Execute(tx)
    }
    
    // CreateInBatches inserts value in batches of batchSize
    func (db *DB) CreateInBatches(value interface{}, batchSize int) (tx *DB) {
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Sat Sep 14 12:58:29 UTC 2024
    - 22.8K bytes
    - Viewed (0)
  4. internal/event/target/postgresql.go

    func (target *PostgreSQLTarget) initPostgreSQL() error {
    	args := target.args
    
    	db, err := sql.Open("postgres", target.connString)
    	if err != nil {
    		return err
    	}
    	target.db = db
    
    	if args.MaxOpenConnections > 0 {
    		// Set the maximum connections limit
    		target.db.SetMaxOpenConns(args.MaxOpenConnections)
    	}
    
    	err = target.db.Ping()
    	if err != nil {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Sep 06 23:06:30 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  5. tests/transaction_test.go

    	}
    }
    
    func TestDeeplyNestedTransactionWithBlockAndWrappedCallback(t *testing.T) {
    	transaction := func(ctx context.Context, db *gorm.DB, callback func(ctx context.Context, db *gorm.DB) error) error {
    		return db.WithContext(ctx).Transaction(func(tx *gorm.DB) error {
    			return callback(ctx, tx)
    		})
    	}
    	var (
    		user  = *GetUser("transaction-nested", Config{})
    		user1 = *GetUser("transaction-nested-1", Config{})
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Sat Sep 14 12:58:29 UTC 2024
    - 12.9K bytes
    - Viewed (0)
  6. internal/event/target/mysql.go

    	args := target.args
    
    	db, err := sql.Open("mysql", args.DSN)
    	if err != nil {
    		target.loggerOnce(context.Background(), err, target.ID().String())
    		return err
    	}
    	target.db = db
    
    	if args.MaxOpenConnections > 0 {
    		// Set the maximum connections limit
    		target.db.SetMaxOpenConns(args.MaxOpenConnections)
    	}
    
    	err = target.db.Ping()
    	if err != nil {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Sep 06 23:06:30 UTC 2024
    - 11.6K bytes
    - Viewed (0)
  7. .teamcity/src/test/kotlin/PerformanceTestBuildTypeTest.kt

                "\"-Porg.gradle.performance.branchName=%teamcity.build.branch%\"",
                "\"-Porg.gradle.performance.db.url=%performance.db.url%\"",
                "\"-Porg.gradle.performance.db.username=%performance.db.username%\"",
                "-DenableTestDistribution=%enableTestDistribution%",
                "-Dorg.gradle.workers.max=%maxParallelForks%",
    Registered: Wed Nov 06 11:36:14 UTC 2024
    - Last Modified: Mon Sep 30 07:24:00 UTC 2024
    - 7.3K bytes
    - Viewed (0)
  8. .teamcity/src/main/kotlin/configurations/PerformanceTestsPass.kt

                    extraParameters = listOf(
                        "-Porg.gradle.performance.branchName" to "%teamcity.build.branch%",
                        "-Porg.gradle.performance.db.url" to "%performance.db.url%",
                        "-Porg.gradle.performance.db.username" to "%performance.db.username%",
                        "-Porg.gradle.performance.dependencyBuildIds" to dependencyBuildIds,
                        "-PperformanceBaselines" to dependencyBaselines
    Registered: Wed Nov 06 11:36:14 UTC 2024
    - Last Modified: Tue Sep 10 13:15:00 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  9. .gitignore

    /src/main/webapp/jar/
    /dbflute_fess/extlib/*
    /dbflute_fess/log/*.log
    /dbflute_h2/log/*.log
    /dbflute_mysql/log/*.log
    /dbflute_oracle/log/*.log
    /src/main/webapp/WEB-INF/conf/*.properties
    /src/main/webapp/WEB-INF/db/*.lock.db
    /src/main/webapp/WEB-INF/logs/fess*
    /.settings/
    .project
    .classpath
    *.iml
    .idea
    .vscode
    .DS_Store
    /plugins/
    /modules/
    /tomcat.8080/
    dbflute_fess/output/doc/lastadoc-fess.html
    Registered: Thu Oct 31 13:40:30 UTC 2024
    - Last Modified: Thu Oct 24 01:47:10 UTC 2024
    - 1023 bytes
    - Viewed (0)
  10. docs/em/docs/tutorial/sql-databases.md

    ```Python
    user = await db.query(User).first()
    ```
    
    ...& โ†ฉ๏ธ ๐Ÿ‘ฅ โš™๏ธ:
    
    ```Python
    user = db.query(User).first()
    ```
    
    โคด๏ธ ๐Ÿ‘ฅ ๐Ÿ”œ ๐Ÿ“ฃ *โžก ๐Ÿ› ๏ธ ๐Ÿ”ข* & ๐Ÿ”— ๐Ÿต `async def`, โฎ๏ธ ๐Ÿ˜ `def`,:
    
    ```Python hl_lines="2"
    @app.get("/users/{user_id}", response_model=schemas.User)
    def read_user(user_id: int, db: Session = Depends(get_db)):
        db_user = crud.get_user(db, user_id=user_id)
        ...
    ```
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 25K bytes
    - Viewed (0)
Back to top