- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for UniqueName (0.09 sec)
-
schema/naming.go
} // IndexName generate index name func (ns NamingStrategy) IndexName(table, column string) string { return ns.formatName("idx", table, ns.toDBName(column)) } // UniqueName generate unique constraint name func (ns NamingStrategy) UniqueName(table, column string) string { return ns.formatName("uni", table, ns.toDBName(column)) } func (ns NamingStrategy) formatName(prefix, table, name string) string {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Jun 12 03:46:59 UTC 2024 - 5.3K bytes - Viewed (0) -
schema/constraint.go
func (schema *Schema) ParseUniqueConstraints() map[string]UniqueConstraint { uniques := make(map[string]UniqueConstraint) for _, field := range schema.Fields { if field.Unique { name := schema.namer.UniqueName(schema.Table, field.DBName) uniques[name] = UniqueConstraint{Name: name, Field: field} } } return uniques
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Mar 18 07:33:54 UTC 2024 - 1.9K bytes - Viewed (0) -
tests/table_test.go
} } }) } type mockUniqueNamingStrategy struct { UName string schema.NamingStrategy } func (a mockUniqueNamingStrategy) UniqueName(table, column string) string { return a.UName
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Sat Mar 09 09:31:28 UTC 2024 - 10.6K bytes - Viewed (0) -
src/main/webapp/js/admin/adminlte.min.js.map
this._config.onTabClick(item)\n }\n\n onTabChanged(item) {\n this._config.onTabChanged(item)\n }\n\n onTabCreated(item) {\n this._config.onTabCreated(item)\n }\n\n createTab(title, link, uniqueName, autoOpen) {\n let tabId = `panel-${uniqueName}`\n let navId = `tab-${uniqueName}`\n\n if (this._config.allowDuplicates) {\n tabId += `-${Math.floor(Math.random() * 1000)}`\n navId += `-${Math.floor(Math.random() * 1000)}`\n }\n\n const newNavItem = `<li class=\"nav-item\"...
Registered: Thu Oct 31 13:40:30 UTC 2024 - Last Modified: Sat Oct 26 01:49:09 UTC 2024 - 132.4K bytes - Viewed (0) -
migrator/migrator.go
return m.RunWithValue(value, func(stmt *gorm.Statement) error { // We're currently only receiving boolean values on `Unique` tag, // so the UniqueConstraint name is fixed constraint := m.DB.NamingStrategy.UniqueName(stmt.Table, field.DBName) if unique && !field.Unique { return m.DB.Migrator().DropConstraint(value, constraint) } if !unique && field.Unique { return m.DB.Migrator().CreateConstraint(value, constraint)
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Fri Apr 26 07:15:49 UTC 2024 - 29K bytes - Viewed (0) -
tests/migrate_test.go
// UniqueAffectedByUniqueIndex is true if DB.Dialector.Name() == "mysql" { uniqueConstraintIndex := &migrator.Index{TableName: table, NameValue: DB.Config.NamingStrategy.UniqueName(table, "name"), ColumnList: []string{"name"}, PrimaryKeyValue: sql.NullBool{Bool: false, Valid: true}, UniqueValue: sql.NullBool{Bool: true, Valid: true}} checkNotUnique = func(t *testing.T) { checkColumnType(t, "name", false)
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Mar 18 11:24:16 UTC 2024 - 56.2K bytes - Viewed (0)