- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for ns (0.23 sec)
-
schema/naming.go
return ns.TablePrefix + str } if ns.SingularTable { return ns.TablePrefix + ns.toDBName(str) } return ns.TablePrefix + inflection.Plural(ns.toDBName(str)) } // RelationshipFKName generate fk name for relation func (ns NamingStrategy) RelationshipFKName(rel Relationship) string { return ns.formatName("fk", rel.Schema.Table, ns.toDBName(rel.Name)) } // CheckerName generate checker name
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Mon Oct 30 09:15:49 GMT 2023 - 5.2K bytes - Viewed (0) -
schema/naming_test.go
} for key, value := range maps { if ns.SchemaName(key) != value { t.Errorf("%v schema name should equal %v, but got %v", key, value, ns.SchemaName(key)) } } } func TestNamingStrategy(t *testing.T) { ns := NamingStrategy{ TablePrefix: "public.", SingularTable: true, NameReplacer: strings.NewReplacer("CID", "Cid"), } idxName := ns.IndexName("public.table", "name")
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Tue May 30 02:00:48 GMT 2023 - 7K bytes - Viewed (0) -
schema/schema_test.go
f.Updatable = true f.Readable = true } }) } } type CustomizedNamingStrategy struct { schema.NamingStrategy } func (ns CustomizedNamingStrategy) ColumnName(table, column string) string { baseColumnName := ns.NamingStrategy.ColumnName(table, column) if table == "" { return baseColumnName } s := strings.Split(table, "_") var prefix string
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Fri Dec 15 08:31:23 GMT 2023 - 12.9K bytes - Viewed (0)