Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for HasTable (0.2 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)
    		}
    	}
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Fri Dec 15 08:36:08 GMT 2023
    - 3.3K bytes
    - Viewed (1)
  2. 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)
    		}
    	}
    
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Mon Mar 18 11:24:16 GMT 2024
    - 56.2K bytes
    - Viewed (0)
  3. 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
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Mon Oct 30 09:15:49 GMT 2023
    - 3.1K 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()
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Fri Apr 26 07:15:49 GMT 2024
    - 29K bytes
    - Viewed (0)
  5. internal/pubsub/pubsub_test.go

    func TestMultiPubSub(t *testing.T) {
    	ps := New[Maskable, Maskable](2)
    	ch1 := make(chan Maskable, 1)
    	ch2 := make(chan Maskable, 1)
    	doneCh := make(chan struct{})
    	defer close(doneCh)
    	if err := ps.Subscribe(MaskAll, ch1, doneCh, func(entry Maskable) bool { return true }); err != nil {
    		t.Fatalf("unexpected error: %v", err)
    	}
    	if err := ps.Subscribe(MaskAll, ch2, doneCh, func(entry Maskable) bool { return true }); err != nil {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 5.8K bytes
    - Viewed (0)
  6. internal/pubsub/pubsub.go

    var GetByteBuffer = func() []byte {
    	return make([]byte, 0, 4096)
    }
    
    // Sub - subscriber entity.
    type Sub[T Maskable] struct {
    	ch     chan T
    	types  Mask
    	filter func(entry T) bool
    }
    
    // PubSub holds publishers and subscribers
    type PubSub[T Maskable, M Maskable] struct {
    	// atomics, keep at top:
    	types          uint64
    	numSubscribers int32
    	maxSubscribers int32
    
    	// not atomics:
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue Feb 06 16:57:30 GMT 2024
    - 5.2K bytes
    - Viewed (0)
  7. internal/pubsub/mask.go

    func (t *Mask) MergeMaskable(other Maskable) {
    	*t |= Mask(other.Mask())
    }
    
    // SetIf will add other if b is true.
    func (t *Mask) SetIf(b bool, other Mask) {
    	if b {
    		*t |= other
    	}
    }
    
    // Mask returns the mask as a uint64.
    func (t Mask) Mask() uint64 {
    	return uint64(t)
    }
    
    // Maskable implementations must return their mask as a 64 bit uint.
    type Maskable interface {
    	Mask() uint64
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue Jul 05 21:45:49 GMT 2022
    - 1.3K bytes
    - Viewed (0)
  8. tensorflow/c/eager/tape.h

    //
    // Gradient is the type returned by gradient functions. In Python TF it's either
    // Tensor or IndexedSlices or None, which here we map to nullptr. Gradients need
    // to allow their size to be computed and they need to be passable to a backward
    // function and deleted (as the backprop code creates lots of gradients the user
    // is not interested in).
    //
    // BackwardFunction needs to be a closure which stores intermediate activations
    C
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Tue Apr 02 12:40:29 GMT 2024
    - 47.2K bytes
    - Viewed (1)
  9. 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))
    Plain Text
    - Registered: Fri Apr 26 09:05:10 GMT 2024
    - Last Modified: Mon Jun 14 22:06:39 GMT 2021
    - 271.5K bytes
    - Viewed (0)
  10. RELEASE.md

        functions. AutoGraph is also applied in functions used with `tf.data`,
        `tf.distribute` and `tf.keras` APIS.
    *   Adds `enable_tensor_equality()`, which switches the behavior such that:
        *   Tensors are no longer hashable.
        *   Tensors can be compared with `==` and `!=`, yielding a Boolean Tensor
            with element-wise comparison results. This will be the default behavior
            in 2.0.
    
    ## Breaking Changes
    
    Plain Text
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Wed Apr 03 20:27:38 GMT 2024
    - 727.4K bytes
    - Viewed (8)
Back to top