Prostore
prostore — declarative ORM for Crystal targeting SQLite and PostgreSQL.
See doc/adr/ for the architectural decisions.
Constants
Convenience top-level constant.
Class methods
Delete all rows from models in reverse FK dependency order (children
before parents). Safe for test teardown when foreign_keys=ON.
High-level entry: bootstrap or migrate the database referenced by url.
Opens a temporary connection, migrates, then closes it. For in-memory
SQLite use Prostore.setup(url) instead, which reuses the connection.
Migrate using a pre-opened connection. The caller retains ownership of
conn and is responsible for closing it. Use this when migrate and the
subsequent app queries must share the same underlying database — most
importantly for sqlite3::memory: where each DB.open is a distinct,
empty database.
Open, migrate, and set as the default connection in one call.
Returns the connection so the caller can close it on shutdown.
Prefer this over separate migrate(url) + connect(url) for
sqlite3::memory: databases.
Convenience alias for test teardown — identical to delete_all.
Nested types
- Prostore::Adapter
- Prostore::Backup
- Prostore::Connection
- Prostore::Diff
- Prostore::Drift
- Prostore::DriftError
- Prostore::Error
- Prostore::FingerprintError
- Prostore::Migration
- Prostore::MigrationError
- Prostore::Model
- Prostore::Query
- Prostore::Records
- Prostore::SQL
- Prostore::Schema
- Prostore::SchemaError
- Prostore::Steps
- Prostore::TUI
- Prostore::Types