MCPcopy Index your code
hub / github.com/pocketbase/pocketbase / bindSQLApi

Function bindSQLApi

apis/sql.go:22–25  ·  view source on GitHub ↗

bindSQLApi registers the SQL api endpoints.

(app core.App, rg *router.RouterGroup[*core.RequestEvent])

Source from the content-addressed store, hash-verified

20
21// bindSQLApi registers the SQL api endpoints.
22func bindSQLApi(app core.App, rg *router.RouterGroup[*core.RequestEvent]) {
23 subGroup := rg.Group("/sql").Bind(RequireSuperuserAuth())
24 subGroup.POST("", runSQL)
25}
26
27func runSQL(e *core.RequestEvent) error {
28 // extra precaution in case manually invoked from somewhere else

Callers 1

NewRouterFunction · 0.85

Calls 4

RequireSuperuserAuthFunction · 0.85
GroupMethod · 0.80
POSTMethod · 0.80
BindMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…