Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for tableware (4.36 sec)

  1. schema/schema_helper_test.go

    				}
    
    				if r.JoinTable.Table != relation.JoinTable.Table {
    					t.Errorf("schema %v relation's join table tablename expects %v, but got %v", s, relation.JoinTable.Table, r.JoinTable.Table)
    				}
    
    				for i := range relation.JoinTable.Fields {
    					checkSchemaField(t, r.JoinTable, &relation.JoinTable.Fields[i], nil)
    				}
    			}
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Dec 15 08:31:23 GMT 2023
    - 7.5K bytes
    - Viewed (0)
  2. tests/migrate_test.go

    	}
    
    	tableName := "null_string_model"
    
    	DB.Migrator().DropTable(tableName)
    
    	err := DB.Table(tableName).AutoMigrate(&NullModel{})
    	AssertEqual(t, err, nil)
    
    	// default null -> 'null'
    	err = DB.Table(tableName).AutoMigrate(&NullStringModel{})
    	AssertEqual(t, err, nil)
    
    	columnType, err := findColumnType(tableName, "content")
    	AssertEqual(t, err, nil)
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Mar 18 11:24:16 GMT 2024
    - 56.2K bytes
    - Viewed (0)
  3. tests/table_test.go

    	}
    
    	AssertEqual(t, r.Statement.Vars, []interface{}{2, 4, 1, 3})
    }
    
    type UserWithTableNamer struct {
    	gorm.Model
    	Name string
    }
    
    func (UserWithTableNamer) TableName(namer schema.Namer) string {
    	return namer.TableName("user")
    }
    
    func TestTableWithNamer(t *testing.T) {
    	db, _ := gorm.Open(tests.DummyDialector{}, &gorm.Config{
    		NamingStrategy: schema.NamingStrategy{
    			TablePrefix: "t_",
    		},
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Sat Mar 09 09:31:28 GMT 2024
    - 10.6K bytes
    - Viewed (0)
  4. schema/relationship_test.go

    	})
    }
    
    type Author struct {
    	gorm.Model
    }
    
    type Book struct {
    	gorm.Model
    	Author   Author
    	AuthorID uint
    }
    
    func (Book) TableName() string {
    	return "my_schema.a_very_very_very_very_very_very_very_very_long_table_name"
    }
    
    func TestParseConstraintNameWithSchemaQualifiedLongTableName(t *testing.T) {
    	s, err := schema.Parse(
    		&Book{},
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Apr 15 03:20:20 GMT 2024
    - 25.5K bytes
    - Viewed (0)
  5. internal/event/target/postgresql_test.go

    			found = true
    			break
    		}
    	}
    	if !found {
    		t.Fatal("postgres driver not registered")
    	}
    }
    
    func TestPsqlTableNameValidation(t *testing.T) {
    	validTables := []string{"táblë", "table", "TableName", "\"Table name\"", "\"✅✅\"", "table$one", "\"táblë\""}
    	invalidTables := []string{"table name", "table \"name\"", "✅✅", "$table$"}
    
    	for _, name := range validTables {
    		if err := validatePsqlTableName(name); err != nil {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Apr 24 17:51:07 GMT 2024
    - 1.7K bytes
    - Viewed (0)
  6. cni/pkg/plugin/plugin_dryrun_test.go

    		// If table is not empty, get table name from the first line
    		lines := strings.Split(strings.Trim(table, "\n"), "\n")
    		if len(lines) >= 1 && strings.HasPrefix(lines[0], "* ") {
    			tableName := lines[0][2:]
    			lines = append(lines, "COMMIT")
    			tables[tableName] = strings.Join(lines, "\n")
    		}
    	}
    	return tables
    }
    
    func refreshGoldens(t *testing.T, goldenFileName string, generatedRules map[string]string) {
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Sat Feb 10 00:31:55 GMT 2024
    - 8.4K bytes
    - Viewed (0)
  7. schema/schema_test.go

    		checkSchemaField(t, user, &fields[i], func(f *schema.Field) {
    			f.Creatable = true
    			f.Updatable = true
    			f.Readable = true
    		})
    	}
    }
    
    type CustomizeTable struct{}
    
    func (CustomizeTable) TableName() string {
    	return "customize"
    }
    
    func TestCustomizeTableName(t *testing.T) {
    	customize, err := schema.Parse(&CustomizeTable{}, &sync.Map{}, schema.NamingStrategy{})
    	if err != nil {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Dec 15 08:31:23 GMT 2023
    - 12.9K bytes
    - Viewed (0)
Back to top