MCPcopy
hub / github.com/pocketbase/pocketbase / getTotalViews

Function getTotalViews

core/collection_record_table_sync_test.go:118–128  ·  view source on GitHub ↗
(app core.App)

Source from the content-addressed store, hash-verified

116}
117
118func getTotalViews(app core.App) (int, error) {
119 var total int
120
121 err := app.DB().Select("count(*)").
122 From("sqlite_master").
123 AndWhere(dbx.NewExp("sql is not null")).
124 AndWhere(dbx.HashExp{"type": "view"}).
125 Row(&total)
126
127 return total, err
128}
129
130func TestSingleVsMultipleValuesNormalization(t *testing.T) {
131 t.Parallel()

Calls 2

SelectMethod · 0.80
DBMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…