Skip to content

v1.0.0

Choose a tag to compare

@miguejarias miguejarias released this 23 Mar 21:14
· 4 commits to main since this release

1.0.0

Session Store

New PostgreSQL-backed session persistence — durable server-side sessions using your existing Postgres database.

  • Upsert-based save — new and existing sessions handled in a single atomic query via INSERT ... ON CONFLICT DO UPDATE
  • Expiration-aware load — expired sessions filtered in the WHERE clause, never returned even if GC hasn't run
  • Bulk garbage collection — deletes all expired rows in one query, called probabilistically by middleware
  • postgres.session_store() — returns a SessionStore to pass to session.setup()

Thin Driver Layer

Most Postgres-specific logic has moved into the framework. This package is now a thin adapter that plugs pog into the framework's driver-agnostic abstractions.

  • Vtable-style query bridge — vtable_query and vtable_exec satisfy the framework's DbPool interface by coercing Dynamic handles and converting generic Value params to pog-specific values
  • postgres.start(name) — reads database.toml, finds the named connection, and starts a pool in one call
  • postgres.start_cache(pool, name) — wires an existing pool into the framework's CachePool via the database cache backend
  • Removed modules — cache/cache, cache/pool, console/*, db/db, db/migrate, and all internal action/command modules now live in the framework

Renames

  • Pool → DbPool
  • pool_connection module → db

Breaking Changes

  • Pool type renamed to DbPool
  • pool_connection module renamed to db
  • Cache module removed — use postgres.start_cache() which delegates to the framework's CachePool
  • postgres_gen, postgres_migrate, and postgres_cache_table commands removed — use the framework's db_gen, migrate, and make_cache_table commands instead
  • Config now read from config/*.toml via the framework's unified config system
  • start_session replaced by postgres.session_store() — returns a SessionStore for the caller to pass to session.setup()