feat(web): Go W-G2 txn/migrate/FTS and W-G3 form ABI

Wire begin/commit/rollback, migrations, FTS search, and form
rules/validate/render/submit/from_schema plus mount_form; pass
web-db-w2, web-db-w6, and web-form-smoke against libweb.so.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
cflmyandCursor committed 2026-09-10 16:01:17 +08:00
1 parent 09b549a862
commit 364428ca1e
11 files changed
+1942 -103

No files matched your search

+19
View File
@@ -90,6 +90,25 @@ func Route(appBag map[string]any, path string, page any) (map[string]any, error)
return out, nil
}
// MountForm stores form under app.forms[id].
func MountForm(appBag map[string]any, id string, form any) (map[string]any, error) {
id = strings.TrimSpace(id)
if id == "" {
return nil, fmt.Errorf("missing form id")
}
if form == nil {
return nil, fmt.Errorf("missing `form`")
}
out := clone(appBag)
forms := map[string]any{}
if f, ok := out["forms"].(map[string]any); ok {
forms = clone(f)
}
forms[id] = form
out["forms"] = forms
return out, nil
}
func normalizeRoutePath(raw string) (string, error) {
s := strings.TrimSpace(raw)
if s == "" {