0.7.0
π EctoLibSql v0.7.0 - Performance & Feature Release
Major performance improvements, new connection management features, and comprehensive SQLite configuration support.
π Bug Fixes
-
ON CONFLICT Support (Issue #25) - Full upsert support with composite unique indexes
:on_conflict: :nothingwith conflict targets:on_conflict: :replace_allfor upserts- Custom field replacement with
{fields, _, targets}
-
Binary ID Type System (Issue #23) - Complete resolution
- Fixed
autogenerate(:binary_id)to generate string UUIDs - Fixed INSERT without RETURNING clause (was causing CaseClauseError)
- Fixed BLOB encoding in Rust NIF (now returns Elixir binaries)
- Fixed
-
Remote Test Stability - Fixed vector operations test failures from stale data
β‘ Performance Improvements
Prepared Statement Caching - Statements are now cached and reused with automatic binding cleanup, delivering ~10-15x faster query execution for repeated queries. Benchmark: 100 cached executions in ~33ms (~330Β΅s per query).
β¨ New Features
Connection Management
busy_timeout/2- Configure database lock timeout (default: 5000ms)reset/1- Reset connection state without closinginterrupt/1- Cancel long-running queries
PRAGMA Configuration
New EctoLibSql.Pragma module with comprehensive SQLite configuration:
- Foreign keys control (
enable_foreign_keys/1,disable_foreign_keys/1) - Journal mode (
set_journal_mode/2- WAL, DELETE, MEMORY, etc.) - Cache size (
set_cache_size/2) - Synchronous level (
set_synchronous/2- OFF, NORMAL, FULL, EXTRA) - Table introspection (
table_info/2,table_list/1) - User version tracking (
user_version/1,set_user_version/2)
Transaction Features
- Savepoints - Nested transaction support with partial rollback
create_savepoint/2- Create named savepointrelease_savepoint_by_name/2- Commit savepoint changesrollback_to_savepoint_by_name/2- Rollback to savepoint
- Transaction Ownership Validation - Prevents cross-connection transaction manipulation
Batch Operations
execute_batch_sql/2- Execute multiple SQL statements (non-transactional)execute_transactional_batch_sql/2- Atomic batch execution
Prepared Statement Introspection
stmt_parameter_count/2- Get number of parametersstmt_column_count/2- Get number of result columnsstmt_column_name/3- Get column name by index
Advanced Replica Sync
get_frame_number_for_replica/1- Monitor replication framesync_until_frame/2- Wait for specific frame (30s timeout)flush_and_get_frame/1- Push pending writesmax_write_replication_index/1- Read-your-writes consistency tracking
π Security Fixes
- SQL Injection Prevention - Added strict alphanumeric validation for savepoint names
- Prepared Statement Validation - Enhanced parameter binding checks
π Documentation
- Updated AGENTS.md with all new features
- Updated README.md with concise examples
π Backward Compatibility
All changes are backward compatible. Prepared statement API unchanged - caching happens transparently with improved performance.
Full Changelog: https://github.com/ocean/ecto_libsql/blob/main/CHANGELOG.md
Full list of changes: 0.6.0...0.7.0