A minor abstraction to allow registering computed fields for pocketbase. Integrates with automatic type generation for typescript.
Find a file
2026-04-24 16:49:33 +10:00
computedfields.go use codeberg repo 2026-04-24 16:49:33 +10:00
go.mod use codeberg repo 2026-04-24 16:49:33 +10:00
go.sum use codeberg repo 2026-04-24 16:49:33 +10:00
LICENSE added license and readme 2026-01-22 22:00:30 +11:00
README.md Update README.md 2026-01-22 22:01:38 +11:00

Computed fields registry for pocketbase

This very minor abstraction exists for two purposes:

  1. Computed fields all live in one place
  2. Additional fields can be tied into typescript generation (package github.com/davenh99/pb-typescript)

Example of adding computed fields to typescript output:

gentypes.Register(app, gentypes.Config{
    FilePath:                   "ui",
    CollectionAdditionalFields: c.ComputedFieldsCfg.ExtractFields(),
    PrintSelectOptions:         true,
})