Skip to main content

@swampadmin/db-adapters

v2026.02.10.0

Pluggable datastore backends for persisting model state across runs.

Adapters

  • SQLite — zero-config local storage, great for development
  • DynamoDB — serverless key-value with automatic scaling
  • TiKV — distributed transactional key-value store

All adapters implement the same get/set/delete/list interface.

Repository

https://github.com/swamp-club/db-adapters

Labels

databasesqlitedynamodbtikvstorage

Contents

Install

$ swamp extension pull @swampadmin/db-adapters

Release Notes

New

  • TiKV datastore — distributed transactional key-value backend
  • DynamoDB adapter now supports consistent_read config option

Fixed

  • SQLite adapter properly closes connections on method completion

sqlite-store
datastore-providersqlite.ts

sqlite-store datastore provider

dynamodb-storeconfigurable
datastore-providerdynamodb.ts

dynamodb-store datastore provider

Config Fields

FieldTypeDescription
table_namestringDynamoDB table name
regionstringAWS region
consistent_read?booleanUse strongly consistent reads (default: false)
tikv-storeconfigurable
datastore-providertikv.ts

tikv-store datastore provider

Config Fields

FieldTypeDescription
pd_endpointsarrayTiKV Placement Driver endpoints
key_prefix?stringKey space prefix