feat(05-01): add Paginate envelope and RegisterJoinTable

- Page/PageMeta emit {data, meta} with no links key
- RegisterJoinTable fails loud on nil db; document pivot-write contract
This commit is contained in:
Jakub Zych
2026-09-18 18:47:42 +02:00
parent 969a5f522a
commit 52638fb4e3
4 changed files with 126 additions and 0 deletions

16
lagoon/relations_test.go Normal file
View File

@@ -0,0 +1,16 @@
package lagoon
import (
"strings"
"testing"
)
func TestRegisterJoinTableNilDB(t *testing.T) {
err := RegisterJoinTable(nil, struct{}{}, "Artists", struct{}{})
if err == nil {
t.Fatal("want non-nil error")
}
if !strings.Contains(err.Error(), "nil") {
t.Fatalf("got %v", err)
}
}