Storage Adapters
In polizy, relationship facts (tuples) are not stored directly in the core engine. Instead, polizy delegates all reading, writing, and deleting of tuples to a Storage Adapter. This decoupling keeps polizy extremely lightweight and allows it to run in any environment—from local testing in memory to serverless functions and production databases.
Prisma Storage
The Prisma Storage Adapter is the recommended adapter for persisting relationship facts (tuples) in production. It maps polizy's tuple structure to a database table managed by your Prisma schema.
Writing a Custom Adapter
If you want to store polizy's relationship tuples in a store other than memory or a SQL database via Prisma—such as Redis, DynamoDB, MongoDB, or an external API—you can build a custom adapter.
StorageAdapter Reference
This page provides the formal API specification and operational contracts for polizy storage adapters.