MCPcopy Create free account
hub / github.com/gogs/gogs / Quote

Function Quote

internal/dbutil/string.go:11–21  ·  view source on GitHub ↗

Quote adds surrounding double quotes for all given arguments before being formatted if the current database is UsePostgreSQL.

(format string, args ...string)

Source from the content-addressed store, hash-verified

9// Quote adds surrounding double quotes for all given arguments before being
10// formatted if the current database is UsePostgreSQL.
11func Quote(format string, args ...string) string {
12 anys := make([]any, len(args))
13 for i := range args {
14 if conf.UsePostgreSQL {
15 anys[i] = `"` + args[i] + `"`
16 } else {
17 anys[i] = args[i]
18 }
19 }
20 return fmt.Sprintf(format, anys...)
21}

Callers 13

GetByEmailMethod · 0.92
GetByKeyIDMethod · 0.92
ListFollowersMethod · 0.92
ListFollowingsMethod · 0.92
createRepositoryFunction · 0.92
usersCountFunction · 0.92
usersDeleteByIDFunction · 0.92
usersDeleteInactivatedFunction · 0.92
usersListFunction · 0.92
orgsListFunction · 0.92
ListMethod · 0.92

Calls

no outgoing calls

Tested by 7

usersCountFunction · 0.74
usersDeleteByIDFunction · 0.74
usersDeleteInactivatedFunction · 0.74
usersListFunction · 0.74
orgsListFunction · 0.74
TestQuoteFunction · 0.68