longevity
A Persistence Framework for Scala and NoSQL
View project on
GitHub
user manual
Table of Contents
Preliminaries
What Is Longevity?
Project Setup
The Domain Model
Declaring a Domain Model
Persistent Objects
Basic Values
Collections
Components
Key Values
Limitations on Persistents, Components, and Key Values
The Persistent Type
Properties
Keys
Primary Keys
Indexes
Subtype Polymorphism
Polymorphic Components
Polymorphic Persistents
Controlled Vocabularies
The Longevity Context
Choosing your Effect
Configuring your Longevity Context
Repositories in the Context
Optimistic Locking
Write Timestamps
The Repository
Opening and Closing the Connection
Schema Creation
Persistent State
Repo.create
Repo.retrieve
Repo.update
Repo.delete
Polymorphism
Queries
Using the Query DSL
Query Filters
Ordered Queries
Offsets and Limits
Retrieval by Query
Stream by Query
Limitations on Cassandra Queries
Testing Your Domain Model
In Memory Repositories
Generating Test Data
Enforcing Constraints
RepoCrudSpec
QuerySpec
Translating Persistents to the Database
Persistent to JSON
Cassandra Translation
Cassandra Keys
MongoDB Translation
MongoDB Keys
SQLite Translation
Migrating to a New Version of Your Domain
Project Setup for Longevity Migrations
Tagging a Version of Your Domain Model
Defining Your Migration
Running Your Migration
Integration Points
Managing Logging
Using IDEA and Longevity Together
up:
longevity site
next:
what is longevity