- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for SchemaName (0.18 sec)
-
schema/naming.go
if ns.SingularTable { return ns.TablePrefix + ns.toDBName(str) } return ns.TablePrefix + inflection.Plural(ns.toDBName(str)) } // SchemaName generate schema name from table name, don't guarantee it is the reverse value of TableName func (ns NamingStrategy) SchemaName(table string) string { table = strings.TrimPrefix(table, ns.TablePrefix) if ns.SingularTable { return ns.toSchemaName(table) }
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,
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Tue May 30 02:00:48 GMT 2023 - 7K bytes - Viewed (0)