Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for HasTable (0.06 sec)

  1. tests/tests_test.go

    	}
    
    	if err = DB.AutoMigrate(allModels...); err != nil {
    		log.Printf("Failed to auto migrate, but got error %v\n", err)
    		os.Exit(1)
    	}
    
    	for _, m := range allModels {
    		if !DB.Migrator().HasTable(m) {
    			log.Printf("Failed to create table for %#v\n", m)
    			os.Exit(1)
    		}
    	}
    Registered: Sun Dec 28 09:35:17 UTC 2025
    - Last Modified: Mon Jul 21 02:46:58 UTC 2025
    - 3.7K bytes
    - Viewed (0)
  2. migrator.go

    	CurrentDatabase() string
    	FullDataTypeOf(*schema.Field) clause.Expr
    	GetTypeAliases(databaseTypeName string) []string
    
    	// Tables
    	CreateTable(dst ...interface{}) error
    	DropTable(dst ...interface{}) error
    	HasTable(dst interface{}) bool
    	RenameTable(oldName, newName interface{}) error
    	GetTables() (tableList []string, err error)
    	TableType(dst interface{}) (TableType, error)
    
    	// Columns
    Registered: Sun Dec 28 09:35:17 UTC 2025
    - Last Modified: Mon Oct 30 09:15:49 UTC 2023
    - 3.1K bytes
    - Viewed (0)
  3. tests/migrate_test.go

    			hasTable := false
    			for _, t2 := range tables {
    				if t2 == t1 {
    					hasTable = true
    					break
    				}
    			}
    			if !hasTable {
    				t.Fatalf("Failed to get table %v when GetTables", t1)
    			}
    		}
    	}
    
    	for _, m := range allModels {
    		if !DB.Migrator().HasTable(m) {
    			t.Fatalf("Failed to create table for %#v", m)
    		}
    	}
    
    Registered: Sun Dec 28 09:35:17 UTC 2025
    - Last Modified: Wed Aug 20 04:51:17 UTC 2025
    - 65.2K bytes
    - Viewed (0)
  4. migrator/migrator.go

    			return tx.Exec("DROP TABLE IF EXISTS ?", m.CurrentTable(stmt)).Error
    		}); err != nil {
    			return err
    		}
    	}
    	return nil
    }
    
    // HasTable returns table exists or not for value, value could be a struct or string
    func (m Migrator) HasTable(value interface{}) bool {
    	var count int64
    
    	m.RunWithValue(value, func(stmt *gorm.Statement) error {
    		currentDatabase := m.DB.Migrator().CurrentDatabase()
    Registered: Sun Dec 28 09:35:17 UTC 2025
    - Last Modified: Sun Oct 26 12:31:09 UTC 2025
    - 29.7K bytes
    - Viewed (0)
  5. tests/test_depends_hashable.py

    # This is more or less a workaround to make Depends and Security hashable
    # as other tools that use them depend on that
    # Ref: https://github.com/fastapi/fastapi/pull/14320
    
    from fastapi import Depends, Security
    
    
    def dep():
        pass
    
    
    def test_depends_hashable():
        dep()  # just for coverage
        d1 = Depends(dep)
        d2 = Depends(dep)
        d3 = Depends(dep, scope="function")
        d4 = Depends(dep, scope="function")
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Nov 19 16:50:18 UTC 2025
    - 596 bytes
    - Viewed (0)
  6. CHANGELOG/CHANGELOG-1.14.md

    * Multiple tests which previously failed due to lack of external IP addresses defined on the nodes should now be passable. ([#68792](https://github.com/kubernetes/kubernetes/pull/68792), [@johnSchnake](https://github.com/johnSchnake))
    Registered: Fri Dec 26 09:05:12 UTC 2025
    - Last Modified: Mon Jun 14 22:06:39 UTC 2021
    - 271.5K bytes
    - Viewed (0)
  7. docs/en/docs/release-notes.md

    ## 0.121.3
    
    ### Refactors
    
    * ♻️ Make the result of `Depends()` and `Security()` hashable, as a workaround for other tools interacting with these internal parts. PR [#14372](https://github.com/fastapi/fastapi/pull/14372) by [@tiangolo](https://github.com/tiangolo).
    
    ### Upgrades
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 19:06:15 UTC 2025
    - 586.7K bytes
    - Viewed (0)
Back to top