Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 252 for DB (0.04 sec)

  1. tests/scanner_valuer_test.go

    	}
    
    	var result2 ScannerValuerStruct
    	if err := DB.First(&result2, result.ID).Error; err != nil {
    		t.Errorf("got error %v when query with %v", err, result.ID)
    	}
    
    	AssertObjEqual(t, result2, result, "ID", "CreatedAt", "UpdatedAt", "Name", "Gender", "Age")
    }
    
    func TestInvalidValuer(t *testing.T) {
    	DB.Migrator().DropTable(&ScannerValuerStruct{})
    	if err := DB.Migrator().AutoMigrate(&ScannerValuerStruct{}); err != nil {
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Wed Jun 07 07:02:07 UTC 2023
    - 10.6K bytes
    - Viewed (0)
  2. tests/associations_belongs_to_test.go

    	user := *GetUser("belongs-to", Config{Company: true, Manager: true})
    
    	if err := DB.Create(&user).Error; err != nil {
    		t.Fatalf("errors happened when create: %v", err)
    	}
    
    	CheckUser(t, user, user)
    
    	// Find
    	var user2 User
    	DB.Find(&user2, "id = ?", user.ID)
    	pointerOfUser := &user2
    	if err := DB.Model(&pointerOfUser).Association("Company").Find(&user2.Company); err != nil {
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Mon Oct 30 09:15:49 UTC 2023
    - 9.3K bytes
    - Viewed (0)
  3. tests/connpool_test.go

    }
    
    type wrapperConnPool struct {
    	db     *sql.DB
    	got    []string
    	expect []string
    }
    
    func (c *wrapperConnPool) Ping() error {
    	return c.db.Ping()
    }
    
    // If you use BeginTx returned *sql.Tx as shown below then you can't record queries in a transaction.
    //
    //	func (c *wrapperConnPool) BeginTx(ctx context.Context, opts *sql.TxOptions) (*sql.Tx, error) {
    //		 return c.db.BeginTx(ctx, opts)
    //	}
    //
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Tue Feb 06 02:54:40 UTC 2024
    - 5.5K bytes
    - Viewed (0)
  4. tests/update_has_many_test.go

    	}
    
    	if err := DB.Save(&user).Error; err != nil {
    		t.Fatalf("errors happened when update: %v", err)
    	}
    
    	var user3 User
    	DB.Preload("Pets").Find(&user3, "id = ?", user.ID)
    	CheckUser(t, user2, user3)
    
    	if err := DB.Session(&gorm.Session{FullSaveAssociations: true}).Save(&user).Error; err != nil {
    		t.Fatalf("errors happened when update: %v", err)
    	}
    
    	var user4 User
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Thu Jan 06 07:02:53 UTC 2022
    - 2K bytes
    - Viewed (0)
  5. tests/non_std_test.go

    	UpdatedAt  time.Time
    }
    
    func TestNonStdPrimaryKeyAndDefaultValues(t *testing.T) {
    	DB.Migrator().DropTable(&Animal{})
    	if err := DB.AutoMigrate(&Animal{}); err != nil {
    		t.Fatalf("no error should happen when migrate but got %v", err)
    	}
    
    	animal := Animal{Name: "Ferdinand"}
    	DB.Save(&animal)
    	updatedAt1 := animal.UpdatedAt
    
    	DB.Save(&animal).Update("name", "Francis")
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Wed May 08 04:07:58 UTC 2024
    - 1.9K bytes
    - Viewed (0)
  6. src/test/resources/plugin/repo2/index.html

                <td>Sun Jul 05 13:18:45 UTC 2015</td>
                <td align="right">
                                  &nbsp;
                              </td>
                <td></td>
              </tr>
                      <tr>
                <td><a href="https://oss.sonatype.org/content/repositories/snapshots/org/codelibs/fess/fess-db-mysql/">fess-db-mysql/</a></td>
    Registered: Thu Oct 31 13:40:30 UTC 2024
    - Last Modified: Tue Aug 13 07:34:14 UTC 2019
    - 10.5K bytes
    - Viewed (0)
  7. tests/table_test.go

    	return namer.TableName("user")
    }
    
    func TestTableWithNamer(t *testing.T) {
    	db, _ := gorm.Open(tests.DummyDialector{}, &gorm.Config{
    		NamingStrategy: schema.NamingStrategy{
    			TablePrefix: "t_",
    		},
    	})
    
    	sql := db.ToSQL(func(tx *gorm.DB) *gorm.DB {
    		return tx.Model(&UserWithTableNamer{}).Find(&UserWithTableNamer{})
    	})
    
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Sat Mar 09 09:31:28 UTC 2024
    - 10.6K bytes
    - Viewed (0)
  8. callbacks/callbacks.go

    	CreateClauses        []string
    	QueryClauses         []string
    	UpdateClauses        []string
    	DeleteClauses        []string
    }
    
    func RegisterDefaultCallbacks(db *gorm.DB, config *Config) {
    	enableTransaction := func(db *gorm.DB) bool {
    		return !db.SkipDefaultTransaction
    	}
    
    	if len(config.CreateClauses) == 0 {
    		config.CreateClauses = createClauses
    	}
    	if len(config.QueryClauses) == 0 {
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Wed Oct 27 23:56:55 UTC 2021
    - 3.3K bytes
    - Viewed (0)
  9. src/test/resources/plugin/repo3/index.html

    <a href="fess-crawler-db/" title="fess-crawler-db/">fess-crawler-db/</a>                                                 -         -      
    <a href="fess-crawler-db-h2/" title="fess-crawler-db-h2/">fess-crawler-db-h2/</a>                                              -         -      
    <a href="fess-crawler-db-mysql/" title="fess-crawler-db-mysql/">fess-crawler-db-mysql/</a>                                           -         -      
    Registered: Thu Oct 31 13:40:30 UTC 2024
    - Last Modified: Mon Jun 17 13:30:41 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  10. src/test/resources/plugin/repo1/index.html

    <a href="fess-crawler-db/" title="fess-crawler-db/">fess-crawler-db/</a>                                                 -         -      
    <a href="fess-crawler-db-h2/" title="fess-crawler-db-h2/">fess-crawler-db-h2/</a>                                              -         -      
    <a href="fess-crawler-db-mysql/" title="fess-crawler-db-mysql/">fess-crawler-db-mysql/</a>                                           -         -      
    Registered: Thu Oct 31 13:40:30 UTC 2024
    - Last Modified: Tue Aug 13 07:34:14 UTC 2019
    - 3.3K bytes
    - Viewed (0)
Back to top