Alle Abfragen für Reihen-Seite

This commit is contained in:
Simon Martens
2025-02-15 16:43:09 +01:00
parent 6aeb4c0548
commit d1b3e69aed
11 changed files with 605 additions and 172 deletions

17
dbmodels/agents.go Normal file
View File

@@ -0,0 +1,17 @@
package dbmodels
import (
"github.com/pocketbase/dbx"
"github.com/pocketbase/pocketbase/core"
)
func AgentForId(app core.App, id string) (*Agent, error) {
agent := &Agent{}
err := app.RecordQuery(AGENTS_TABLE).
Where(dbx.HashExp{ID_FIELD: id}).
One(agent)
if err != nil {
return nil, err
}
return agent, nil
}