AmberDB
view release on metacpan or search on metacpan
* Supported 'db' parameter alias in AmberDB constructor alongside database, dbase, and dbname.
- [DYNAMIC FIELD NORMALIZATION ENGINE (.norm)]
* Implemented field_normalize() and norm_info() in AmberDB::Base::Schema for domain-agnostic feature extraction from unstructured raw text strings.
* Normalization rules reside in dedicated <table_id>.norm schema files, eliminating runtime overhead for ordinary read/query workloads.
* Supports pipeline stages: preprocess boundary regexes, categorical mapping, single matches (integer, titlecase, trim, code callbacks), and multi-matches (min/max selection).
* Optional schema block array mapping via { as_array => 1 }.
* Registered _norm container in AmberDB core constructor with lock_keys and lock_value protection.
* Added comprehensive unit test suite in t/amberdb_field_normalize.t.
- [INDEX INTEGRITY & STRICT NUMERIC ID REINDEXING]
* Enforced strict positive integer filtering (defined $_ && $_ > 0) across all binary index buffers (keys, A:keys, B:keys, $blk:keys, bin_encode, bin_decode, bin_add, bin_punch), completely preventing non-numeric or non-positive IDs from en...
* Updated set_index in AmberDB::Tools::Index to close and unlink all existing index files (.inx, .src, .fld, .fac, .slg, .unq) on both physical disk and RAM-disk before rebuilding, ensuring clean and deterministic recreation.
* Added RAM-disk synchronization to set_index: freshly rebuilt index files are atomically mirrored to RAM-disk upon completion with safe filehandle management.
* Fixed UTF-8 double-encoding in $blk:vals across sort_add, sort_modify, and sort_del in AmberDB::Base::Index to prevent exponential byte bloat on multibyte character updates.
* Enhanced amberdb_cli.pl with database name auto-detection from connect.pl, core.conf (site_id), and project directories, ensuring CLI maintenance commands attach to active RAM-disk instances.
* Disallowed generic 'dbstore' as a valid database name across Ramdisk and CLI modules to eliminate unintended directory creation on RAM-disk.
* Enforced strict CLI connect argument validation: positional argument after 'connect' is strictly the database name (amberdb connect <database_name> [user] [pass]). Explicitly rejected 'connect dbstore' and directory paths with a descripti...
* Added non-numeric key and record ID enforcement in index_put(): when $type is not 'raw', non-numeric IDs in array references are filtered out and non-numeric scalar values are rejected from entering index files (.inx, .src, .fld, etc.).
- [FAST RANGE FILTER ENGINE]
* Implemented range_slice() using pre-sorted .inx keys ($blk:keys) and .fld boundaries for sub-millisecond range queries.
* Slices contiguous 8-byte packed binary record IDs directly via index() and substr(), replacing slow multi-key OR unions.
* Stored distinct block values under $blk:vals (and tiered A:$blk:vals, B:$blk:vals) in .inx for binary search boundary detection.
* Added candidate pruning for small survivor sets (<= 250 records) directly on the raw binary slice.
* Full lifecycle management for $blk:vals: automatically maintains and prunes values across sort_add, sort_modify, and sort_del.
- [FIELD QUERY ENHANCEMENTS]
* field_fetch now accepts named block arguments via resolve_block_idx().
* Fixed raw numeric value recovery for fallback queries on normalized .inx sort keys.
- [DATE ENGINE OPTIMIZATIONS]
* Added memoization caching to AmberDB::Date with rollover protection.
* Added reset_date() methods.
* Replaced direct hash access with fast accessor methods across dump, vacuum, and backup routines.
- [DIRECTORY ARCHITECTURE & LOCK PATH STANDARDIZATION]
* Standardized lock_dir and session_dir as single-key directories in AmberDB::Base::Ramdisk and AmberDB::Base.
* Removed obsolete fallback keys (lock_rdir) and legacy naming aliases (conf_dir, cfg_dir).
* In RAM-disk environments, lock_dir and session_dir are dynamically mounted under $ramdisk_dir/lock and $ramdisk_dir/session with 0755 permissions; when unmounted, they reside cleanly under $dbase_dir/lock and $dbase_dir/session.
* Aligned database lock directory structures with inter-process state locking specifications.
- [SCHEMA LOADING RESILIENCE]
* Wrapped 'do $target_path' inside eval { do $target_path } in AmberDB::Base::Schema (table_info() and dbase_info()).
* Prevents fatal process/worker termination when user .table or .dbase schema files contain syntax errors under global $SIG{__DIE__} handlers.
- [SLUG INDEX ARCHITECTURE VERIFICATION (.slg)]
* Verified flat unified .slg index access model where block numbers (formerly _0 / _1 file suffixes) reside in key prefixes:
- Block 0: "0:$rid" -> URL slug value
- Block 1: "1:$slug" -> Record ID value
* Enforced direct .slg table access and recs_get key lookups without legacy .rwt fallbacks.
- [GROUP-LEVEL SCHEMA INHERITANCE (.dbase -> .table)]
* Database group schema files (.dbase) now cascade common operational flags to all member tables in the group.
* Added %INHERITABLE_DBASE_KEYS whitelist in AmberDB::Base::Schema (use_ramdisk, keep_deleted, use_counter, log_owner, table_dir, use_section, etc.) preventing table-specific blocks and rules from leaking.
* Granular overrides: attributes explicitly defined in a .table file take precedence over .dbase defaults.
* Upgraded version string to 5.26.0 across all modules in lib/.
5.25.2 2026-09-11
- [CONNECTION PROFILES & LOCAL USER SESSIONS]
* Centralized connection profile management ($adb->{_connect}) for database, username, credentials, and session tokens.
* Automated config/connect.pl profile configuration with support for hashed credentials for local CLI/daemon access.
* Added user management API (user_add, user_passwd, user_del, user_list, user_verify) and CLI console.
* Added CLI session token generation, persistence, and cleanup.
* Enforced actor username as 'cli' for isolated CLI sessions.
- [RAM-DISK ARCHITECTURE & MOUNT MANAGEMENT REFACTORING]
* Centralized candidate RAM-disk directory resolution and OS detection inside ramdisk_is_mounted().
* Standardized platform detection across AmberDB::Base::Ramdisk to canonical 'windows', 'macos', or 'linux'.
* Generalized macOS APFS/HFS+ volume detection to match any mounted volume under /Volumes/ (e.g. /Volumes/AmberDB_RAM, /Volumes/eticaretim, /Volumes/<User>).
* Implemented encapsulated RAM-disk mount status caching with get_cache()/set_cache('ramdisk', 'mount') and support for force => 1 re-verification.
* Cleaned up ramdisk_setup() to cleanly fall back to dbase_dir and physical directories when unmounted, while dynamically repointing and creating table_rdir, schema_rdir, conf_rdir, lock_dir, and session_dir on the RAM-disk when mounted.
* Flexible argument parsing in ramdisk_setup() supporting ($tableid, %opts), (%opts), and hashref options.
* Automatically invoke ramdisk_setup() inside set_datadir() when changing database root directory.
- [CLI SESSION COLLISION AVOIDANCE & CODEBASE CLEANUP]
* Added collision prevention loop in bin/amberdb_cli.pl generate_token() checking existing session files in both project local (.amberdb/session/sess_$token) and active database session_dir (cli_$token).
* Removed redundant if ($adb) checks and legacy candidate search arrays in CLI session handlers.
* Upgraded version string to 5.25.2 across all 25 modules in lib/.
- [TRANSACTION UNDO JOURNAL BASE64 STANDARDIZATION]
* Standardized transaction undo logs (dbstore/journal/txn_*) to strictly encode raw database before-images with Base64 (MIME::Base64).
* Eliminated legacy string regex escaping ($safe_enc/$safe_dec) and index Hex conversions (unpack/pack "H*").
* Unified transaction rollback with RAM-disk Tier 4 (sync_ramdisk) Base64 payload specification for 100% binary safety.
5.25.1 2026-09-11
- [JOURNAL & TRANSACTION STANDARDIZATION] Extensionless Uniform Journaling:
* Standardized all transaction undo logs and RAM-disk write-behind queues under $dbase_dir/journal/ ($adb->journal_dir()).
* Removed legacy .txn extension; transaction journal files now follow the standard extensionless format dbstore/journal/txn_<timestamp>_<seq>_<pid> (Base.pm:481-488).
* Modernized transact_recover() to scan journal/ directory for txn_* files and extract process IDs via /[-_](\d+)$/ for deterministic crash recovery without race conditions.
* Added explicit transact_commit() method alias to transact_end() matching documented public API semantics.
* Cleaned out obsolete legacy 5-parameter signature fallback and 6-field journal format fallback in AmberDB::Base::Transact.
- [RAM-DISK TIER 4 WRITE-BEHIND JOURNALING] Explicit sync_ramdisk Queue:
* Renamed dirty sync queue from sync_events to sync_ramdisk for clear semantic clarity:
- Active Queue: dbstore/journal/sync_ramdisk
- Rotated Queue: dbstore/journal/sync_ramdisk_<timestamp>
* Updated AmberDB::Base::Ramdisk (ramdisk_mark_dirty, ramdisk_sync, ramdisk_sync_db_path) and AmberDB::Base (journal_slot, journal_scan) to reflect sync_ramdisk naming.
* Synchronized background daemon engine (bin/amberdb_daemon.pl) and unit test suites (t/amberdb_ramdisk_tiers.t, t/amberdb_journal.t).
- [MODERN COMMAND LINE INTERFACE & NATURAL QUERY PARSER]
* Implemented unified bin/amberdb_cli.pl with bin/amberdb (POSIX shell) and bin/amberdb.bat (Windows CMD) wrappers.
* Natural positional query signatures:
- amberdb read <table> <id> (read_id)
- amberdb read <table> all [offset] [limit] [modifiers] (read_all)
- amberdb search <table> <query> [offset] [limit] [modifiers] (search_table)
- amberdb fetch <table> <block> <value> (field_fetch)
- amberdb count <table>, amberdb info <table>, amberdb status, amberdb ping
* Dual execution model: direct stateless execution against database without background session side-effects, and isolated session management via 4-digit numeric tokens (connect, disconnect, config, path, attr).
* Trailing output format (json, pretty, tsv, dumper, table, raw) and elapsed execution time (time, time=1, --time) keywords.
* Preserved clean machine-readable JSON output by rendering execution time metrics as an independent footer line.
* Completely eliminated redundant %cli_path and %cli_cfg hashes in CLI, directly utilizing $adb->path() and $adb->config().
* Added full CLI test suite in t/amberdb_cli.t (100% pass) and updated wiki documentation (TR-Guide-CLI.md, Guide-CLI.md, bin/commands.md).
5.25.0 2026-09-10
- [CORE ENGINE MODULARIZATION & NAMESPACE RESTRUCTURING] Grouped Internal Engine Modules Under AmberDB::Base::*:
* Migrated and reorganized core engine components into AmberDB::Base namespace:
- AmberDB::Base::Encoder (Serialization, multi-era format decoding, binary index packing)
- AmberDB::Base::Schema (Schema definition, table_info, table_attr, field type system)
- AmberDB::Base::Ramdisk (Physical RAM-disk Linux tmpfs, macOS APFS, Windows ImDisk file acceleration)
- AmberDB::Base::Cache (In-memory L1 process cache and staging disk buffer)
- AmberDB::Base::Index (Field indexing, foreign keys, operators)
( run in 1.216 second using v1.01-cache-2.11-cpan-3f962061493 )