Memory Adapter

April 10, 2025

Installation

The Memory adapter is included in the core package and requires no additional dependencies:

Configuration

The Memory adapter accepts minimal configuration:

Usage Examples

Basic CRUD Operations

Best Practices

  • Use for development only - The memory adapter is not suitable for production use as data is lost on restart
  • Test with realistic data volumes - Pre-populate with a representative data set to test performance
  • Reset between tests - Create a new instance for each test to ensure a clean environment

Limitations

  • No persistence across application restarts
  • Not suitable for production environments
  • Limited query capabilities compared to SQL-based adapters
  • No support for complex joins or transactions

When to Use

  • During development and prototyping
  • For automated testing
  • For demos and examples
  • When you need a lightweight, zero-configuration database