SQLite Adapter
The SQLite adapter provides a lightweight, file-based database solution perfect for small to medium applications, local development, and embedded systems.
Installation
Install the SQLite adapter and its dependencies:
Configuration
Configure the SQLite adapter with your database file path:
In-Memory Database
For testing or development, you can use an in-memory database:
Schema Management
Initialize your database schema:
Usage Examples
Basic CRUD Operations
Transactions
Advanced Queries
Performance Optimization
Backup and Maintenance
Best Practices
- Use WAL mode for better concurrency and performance
- Create proper indexes on columns frequently used in WHERE clauses
- Use transactions for operations that must be atomic
- Implement regular backups using VACUUM INTO
- Set busy timeout to handle concurrent access conflicts
- Use prepared statements to prevent SQL injection (handled automatically by the adapter)
Limitations
- Limited concurrency compared to client-server databases
- No built-in user management or access control
- Maximum database size limited to 281 TB (though practical limits are much lower)
- Limited support for ALTER TABLE operations
Related Resources
MySQL Adapter
The MySQL adapter provides integration with MySQL and MariaDB, widely-used relational database systems known for reliability, performance, and broad compatibility.
Memory Adapter
The Memory adapter stores all data in-memory, making it perfect for development, testing, and prototyping. Data is lost when the application restarts.