- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 14 for Namer (0.04 sec)
-
schema/schema.go
} type Tabler interface { TableName() string } type TablerWithNamer interface { TableName(Namer) string } // Parse get data type from dialector func Parse(dest interface{}, cacheStore *sync.Map, namer Namer) (*Schema, error) { return ParseWithSpecialTableName(dest, cacheStore, namer, "") } // ParseWithSpecialTableName get data type from dialector with extra schema table
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Jun 20 12:19:31 UTC 2024 - 13.7K bytes - Viewed (0) -
schema/naming.go
package schema import ( "crypto/sha1" "encoding/hex" "regexp" "strings" "unicode/utf8" "github.com/jinzhu/inflection" "golang.org/x/text/cases" "golang.org/x/text/language" ) // Namer namer interface type Namer interface { TableName(table string) string SchemaName(table string) string ColumnName(table, column string) string JoinTableName(joinTable string) string RelationshipFKName(Relationship) 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
checks[names[0]] = CheckConstraint{Name: names[0], Constraint: strings.Join(names[1:], ","), Field: field} } else { if names[0] == "" { chk = strings.Join(names[1:], ",") } name := schema.namer.CheckerName(schema.Table, field.DBName) checks[name] = CheckConstraint{Name: name, Constraint: chk, Field: field} } } } return checks } type UniqueConstraint struct { Name string Field *Field
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Mar 18 07:33:54 UTC 2024 - 1.9K bytes - Viewed (0) -
src/cmd/api/testdata/src/pkg/p1/p1.go
type EmbedURLPtr struct { *URL } type S2 struct { // Deprecated: use T. S Extra bool } var X0 int64 var ( Y int X I ) type Namer interface { Name() string } type I interface { Namer ptwo.Twoer Set(name string, balance int64) // Deprecated: use GetNamed. Get(string) int64 GetNamed(string) (balance int64) private() } type Public interface {
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Fri Dec 02 16:29:41 UTC 2022 - 3.3K bytes - Viewed (0) -
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_", },
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Sat Mar 09 09:31:28 UTC 2024 - 10.6K bytes - Viewed (0) -
schema/relationship.go
Tag: `gorm:"-"`, }) if relation.JoinTable, err = Parse(reflect.New(reflect.StructOf(joinTableFields)).Interface(), schema.cacheStore, schema.namer); err != nil { schema.err = err } relation.JoinTable.Name = many2many relation.JoinTable.Table = schema.namer.JoinTableName(many2many) relation.JoinTable.PrimaryFields = make([]*Field, 0, len(relation.JoinTable.Fields)) relName := relation.Schema.Name
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Jun 12 03:46:59 UTC 2024 - 22.7K bytes - Viewed (0) -
src/cmd/api/testdata/src/pkg/p1/golden.txt
pkg p1, type I interface, Name() string pkg p1, type I interface, PackageTwoMeth() pkg p1, type I interface, Set(string, int64) pkg p1, type I interface, unexported methods pkg p1, type MyInt int pkg p1, type Namer interface { Name } pkg p1, type Namer interface, Name() string pkg p1, type Private interface, X() pkg p1, type Private interface, unexported methods pkg p1, type Private //deprecated pkg p1, type Public interface { X, Y }
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Fri Dec 02 16:29:41 UTC 2022 - 3.6K bytes - Viewed (0) -
schema/index.go
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Sun Feb 04 07:49:19 UTC 2024 - 3.7K bytes - Viewed (0) -
schema/utils.go
} for idx, r := range foreignValues { queryValues[idx] = r } return columns, queryValues } type embeddedNamer struct { Table string Namer
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Sat Aug 19 13:35:14 UTC 2023 - 5.5K bytes - Viewed (0) -
schema/field.go
field.Readable = false cacheStore := &sync.Map{} cacheStore.Store(embeddedCacheKey, true) if field.EmbeddedSchema, err = getOrParse(fieldValue.Interface(), cacheStore, embeddedNamer{Table: schema.Table, Namer: schema.namer}); err != nil { schema.err = err } for _, ef := range field.EmbeddedSchema.Fields { ef.Schema = schema ef.OwnerSchema = field.EmbeddedSchema
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Apr 15 03:20:20 UTC 2024 - 32K bytes - Viewed (0)