MCPcopy
hub / github.com/pocketbase/pocketbase / FindLogById

Method FindLogById

core/log_query.go:16–29  ·  view source on GitHub ↗

FindLogById finds a single Log entry by its id.

(id string)

Source from the content-addressed store, hash-verified

14
15// FindLogById finds a single Log entry by its id.
16func (app *BaseApp) FindLogById(id string) (*Log, error) {
17 model := &Log{}
18
19 err := app.LogQuery().
20 AndWhere(dbx.HashExp{"id": id}).
21 Limit(1).
22 One(model)
23
24 if err != nil {
25 return nil, err
26 }
27
28 return model, nil
29}
30
31// LogsStatsItem defines the total number of logs for a specific time period.
32type LogsStatsItem struct {

Callers

nothing calls this directly

Calls 1

LogQueryMethod · 0.95

Tested by

no test coverage detected