Artifact 725cc416041c143b58a2f1bbebb6e8414d452b5b50bc6d9c801cf3e854c8ff2f:
- File
src/sqlar.h
— part of check-in
[dd27c70e9d]
at
2026-11-19 16:10:29
on branch userdb
— User state in ~/.pic/pic.sqlite instead of loose files (ticket 2ad667b78b)
pic's user-level state now lives in one SQLite database, shared by every pic process (WAL, a busy timeout), in tables prefixed picu_: settings, the model catalog cache from pi.dev (stored with the SQLite Archive compression rule; sqlar_compress and sqlar_uncompress are registered), project trust, model scopes and the workspaces pic has used. ~/.pic/settings.json and ~/.pic/models-store.json are imported on first open in one transaction and then deleted. pic settings shows and changes settings. Tests and benchmarks now run with a private HOME and an offline catalog, so they no longer read or write the real ~/.pic. (user: dmestas, size: 247) [annotate] [blame] [check-ins using] [more...]
/* SQLite Archive compression as SQL functions (sqlar.c). */ #ifndef PIC_SQLAR_H #define PIC_SQLAR_H #include "sqlite3.h" /* Registers sqlar_compress(X) and sqlar_uncompress(Y, SZ) on db. 0 or -1. */ int pic_sqlar_register(sqlite3 *db); #endif