MCPcopy Create free account
hub / github.com/OpenListTeam/OpenList / columnName

Function columnName

internal/db/util.go:10–15  ·  view source on GitHub ↗
(name string)

Source from the content-addressed store, hash-verified

8)
9
10func columnName(name string) string {
11 if conf.Conf.Database.Type == "postgres" {
12 return fmt.Sprintf(`"%s"`, name)
13 }
14 return fmt.Sprintf("`%s`", name)
15}
16
17func addStorageOrder(db *gorm.DB) *gorm.DB {
18 return db.Order(fmt.Sprintf("%s, %s", columnName("order"), columnName("id")))

Callers 15

GetStoragesFunction · 0.85
GetEnabledStoragesFunction · 0.85
GetSharingsFunction · 0.85
GetSharingsByCreatorIdFunction · 0.85
GetSSHPublicKeyByUserIdFunction · 0.85
GetSSHPublicKeysFunction · 0.85
GetMetasFunction · 0.85
GetSettingItemByKeyFunction · 0.85
GetPublicSettingItemsFunction · 0.85
GetSettingItemsByGroupFunction · 0.85
GetSettingItemsInGroupsFunction · 0.85
DeleteSettingItemByKeyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected