AmberDB
view release on metacpan or search on metacpan
- [TABLE COUNT & LOCK PATH ROBUSTNESS]
* Added definedness guard for raw index key string in AmberDB::table_count.
* Standardized lock directory resolution via $self->path("lock_dir") in flock_open.
* Extended $adb->path() to support setter operations ($adb->path({ backup_dir => '...' }) and $adb->path(key => 'val')).
5.26.4 2026-10-01
- [IMPROVEMENTS]
* The reindex vacuum bug has been resolved.
* Some incorrect statements in "Changes" have been corrected.
5.26.3 2026-09-29
- [AUTOCOMPLETE & INSTANT SEARCH / AJAX QUERY SUGGESTION ENGINE (.ajw, .ajn)]
* Implemented high-performance dual-index query suggestion and autocomplete engine designed for Ajax instant-search bars and typeahead UI widgets.
* Introduced '.ajw' (Word Prefix Index): maps 2 to 12-character token prefixes to top candidate words with occurrence frequency scores (top 10 matches per prefix), supporting both native Unicode (Turkish/international alphabet) and ASCII-fo...
* Introduced '.ajn' (Next Word Transition Index): stores n-gram word transition frequency tables (up to 300 transitions per token), powering chained multi-word query completions (e.g. 'orhan ' -> 'pamuk', 'kemal', 'hançerlioÄlu'; 'orhan p...
* Added 'AmberDB::suggest_table($tableid, $query, [%opts])' method (default limit 10) to execute single-word prefix lookups (.ajw) or active next-word transitions (.ajn) seamlessly based on query structure.
* Added automatic real-time suggestion index updates in CRUD operations ('insert_id', 'insert_list', 'update_id') via 'AmberDB::Base::Index::suggest_add'.
* Built-in multi-value and relational foreign key (RDBM) awareness: automatically traverses comma/semicolon-separated values (e.g. multi-author fields) and resolves foreign IDs ('rdbm_target') into display titles when building suggestions.
- [SCHEMA CONFIGURATION: SUGGEST_BLOCK & SUGGEST_JOIN]
* Extended 'AmberDB::Base::Schema' to declare autocomplete sources with 'suggest_block => [...]' (field block IDs to index for suggestions).
* Added 'suggest_join => [ [blk1, blk2], ... ]' schema directive to enable automatic cross-block compound sentence generation (e.g. combining Author and Title blocks into "Author Title" autocomplete phrases).
* Updated 'table_infset' to serialize 'suggest_block' and 'suggest_join' into 'core.conf' table definitions.
* Updated 'normalize_blocks' to sanitize suggest configurations for simple/use_simple tables.
- [TOOLS & REINDEXING INFRASTRUCTURE]
* Added 'set_suggest($tableid, @records)' and 'reindex_suggest($tableid)' to 'AmberDB::Tools::Index' for complete standalone suggestion index rebuilding.
* Added convenient method alias '*reindex = \&set_index' in 'AmberDB::Tools::Index'.
* Updated 'set_index' and 'AmberDB::Tools::Update::update_table' to include '.ajw' and '.ajn' in index cleanups and rebuilds.
- [LOCALE & WORD NORMALIZATION EXTENSIONS]
* Extended 'AmberDB::Locale::normalize_word($word [, $mode_write, $no_ascii])' with a '$no_ascii' flag to preserve locale native characters ('alphabet_chars', e.g. 'ç, Ä, ı, ö, Å, ü') while stripping non-word punctuation without phone...
* Added composite caching key ('$word:$is_write:$no_ascii') in 'normalize_word' to eliminate cross-mode cache pollution and maximize lookup speed.
* Compiled regex pattern '_letter_chars' ('a-zA-Z${safe_extra}') for consistent token extraction across locale-aware indexing operations.
- [TEST SUITE & MANIFEST]
* Created comprehensive test suite 't/amberdb_suggest.t' covering automatic index generation, single-word prefix lookups, next-word transitions, multi-value fields, reindexing, and RAM-disk Tier 1 operations.
* Registered 't/amberdb_suggest.t' in 'MANIFEST'.
- [INDEX REBUILD & SOFT-DELETE ARCHIVE INTEGRITY (.del)]
* Protected auto-increment 'lastid' against ID collision during reindexing ('set_index' / 'set_readall'): fast key scan on soft-deleted archive (.del) ensures IDs of archived records are never reused.
* Preserved vacuum behavior when '.del' is absent: truly purged trailing records allow 'lastid' to compact down to the highest remaining record ID.
* Added unit test 't/amberdb_reindex_lastid_del.t' and registered in 'MANIFEST'.
5.26.2 2026-09-28
- [STANDALONE EXECUTABLE BUILDER & CI RELEASE AUTOMATION]
* Resolved Strawberry Perl PAR::Packer ('pp') compilation failure on Windows by decoupling attached module search switch into separated '-I lib' arguments.
* Configured GitHub Actions build-exe workflow to automatically compile and smoke-test amberdb.exe on pushes to main and master branches.
* Enforced dynamic release tag formatting ('v<VERSION>_exe', e.g. 'v5.26.2_exe') to prevent refspec collisions with Git branch 'main' and keep binary releases isolated from source tags.
* Updated bin/build_exe.bat with fixed compiler flags and registered script in MANIFEST.
- [CLI ENGINE VERSION INTROSPECTION]
* Added '--version', '-v', and 'version' commands to bin/amberdb_cli.pl.
* Emits standard release banner 'AmberDB v<VERSION> (CLI)' or structured JSON schema when combined with 'format=json'.
- [DOCUMENT-STORE SINGLE HASH / REFERENCE ENCODING FIX]
* Fixed AmberDB::recs_put to ensure single reference record payloads (HASH/ARRAY, e.g. 'data={...}') are passed through db_encode rather than stringified to 'HASH(0x...)'.
* Verified complete recursive serialization and round-trip fidelity for deeply nested hashes and arrays inside array records (tested in t/amberdb_escape_encode.t).
- [CLI DEFAULT TABLE OUTPUT RENDERING & POSITIONAL ARGUMENTS]
* Configured clean, formatted ASCII box tables ('+----+----+') as default CLI output for single records ('read <table_name> <id>') and multi-record lists ('read all', 'search', 'fetch'), replacing legacy Data::Dumper fallback.
* Enhanced CLI positional argument parsing for multi-block records, enabling seamless scalar, JSON array, and JSON hash parameters directly via command line (e.g. 'amberdb insert items 0 "Mouse" \'["wireless","bt"]\' \'{"brand":"Razer"}\'')...
* Fixed TSV output formatting ('format=tsv' / 'tsv') to join record fields strictly with tabs on a single line ('<id>\t<field_1>\t<field_2>...') instead of splitting fields across separate newlines.
* Preserved full backwards compatibility with explicit format switches: 'format=dumper' / 'dumper', 'format=json' / 'json', 'format=pretty' / 'pretty', and 'format=tsv' / 'tsv'.
* Added bilingual command-line usage screen support: 'amberdb usage' / 'amberdb help' renders in English, while 'amberdb usage.tr' / 'amberdb help.tr' (or 'usage tr') renders in Turkish.
* Added subtest 13 in t/amberdb_cli.t to verify default table output, TSV tab separation, column headers, and explicit dumper formatting.
5.26.1 2026-09-28
- [32-BIT PERL / CPAN TESTERS QUAD PACKING COMPATIBILITY]
* Implemented transparent cross-platform 64-bit integer packing in AmberDB::Base::Encoder (_pack_ids, _unpack_ids, _pack_single_id).
* Utilizes native 64-bit pack("(Q>)*") / unpack("(Q>)*") on 64-bit Perls with zero performance overhead.
* Automatically falls back to dual 32-bit unsigned network integer pack("(NN)*") / unpack("(NN)*") on 32-bit Perls without quad support (use64bitint=undef, e.g. Raspberry Pi armv6l).
* Guaranteed 100% byte-exact binary compatibility on physical .inx, .fld, .src index files across 32-bit and 64-bit architectures.
* Completely resolved CPAN Testers "Invalid type 'Q' in pack" exceptions across 36 test suites.
- [CLI THREE-MODE ARCHITECTURE & ZERO-FALLBACK ENFORCEMENT]
* Re-architected amberdb CLI (bin/amberdb_cli.pl) into three distinct, predictable operational modes:
1. 'amberdb setup': Provisions global workspace (~/.amberdb) with session/ and config/ directories. Fully eliminated dummy default/ database.
2. 'amberdb connect <name>[@<path>]': Named session management with canonical absolute path resolution; rejects raw directory names without database alias.
3. Direct CRUD ('amberdb CRUD'): Strictly targets local ./dbstore in current working directory without fallback to ~/.amberdb/default.
* Read operations (tables, read, search, count, info) return empty/null cleanly without creating directory skeletons.
* Write operations (insert) automatically provision ./dbstore and core.conf on-the-fly.
* Updated user guides and documentation in README.md, wiki/TR-Guide-CLI.md, and wiki/Guide-CLI.md.
- [SCHEMA USE_SIMPLE SANITIZATION & STRING KEY PRESERVATION]
* Updated AmberDB::Base::Schema to strip unused 'blocks' definition for use_simple => 1 tables.
* Wrapped explicit ID sorting in AmberDB::insert_list with unless ($is_simple) guard, eliminating numeric comparison warnings on string keys without regex overhead.
- [CROSS-PLATFORM CI & MACOS MOUNT FIX]
* Fixed macOS /Volumes permission error in AmberDB::Base::Ramdisk by verifying write permissions before activating RAM-disk mount points.
* Added eval guard to ramdisk_setup with graceful fallback to local storage.
- [WINDOWS CRLF & TRANSACTION JOURNAL HARDENING]
* Enforced binmode on journal handles in AmberDB::Base::Transact to prevent Windows CRLF mangling of record separators and Base64 payloads.
* Added journal content diagnostic dumps and exact field assertions in t/amberdb_transact.t.
- [WINDOWS CI & FLOCK / CLI AT-SYNTAX COMPATIBILITY]
* Replaced colon separator with '@' for custom directory connect syntax ('amberdb connect <dbname>@<path>'), completely eliminating ambiguity with Windows drive letters (C:\path).
* Enforced strict directory path and legacy colon syntax rejection in bin/amberdb_cli.pl.
* Added automatic background workspace provisioning in bin/amberdb_cli.pl: automatically runs global setup on first invocation if ~/.amberdb does not exist.
* Fixed t/amberdb_transact.t journal reader to read directly via active transaction handle ($adb->{_txn}->{fh}), eliminating Windows mandatory flock(LOCK_EX) read collisions that resulted in uninitialized $journal_content on native Windows ...
* Added comprehensive cross-platform connect '@' syntax, auto-setup, and Windows drive path rejection tests in t/amberdb_cli.t.
5.26.0 2026-09-23
- [FAST INDEXED FIELD COUNTING (field_count)]
* Implemented field_count($table, $block, $val) for fast O(1) indexed counting across inverted match (.fld) indexes without reading or deserializing full records.
* Optimized for high-throughput facet counts, inventory status aggregation, and relational child counts.
* Added comprehensive unit test suite in t/amberdb_field_count.t and documentation in wiki/Method-field_count.md and wiki/TR-Method-field_count.md.
- [COLUMNAR FACETS & BIDIRECTIONAL DICTIONARY LOOKUP]
* Enhanced AmberDB::Base::Facet facet counting, facet menu generation, and tiered active/junk rule separation.
* Optimized .unq bidirectional string dictionary mapping between text labels and compact numeric dictionary IDs.
- [RELATIONAL PARENT/CHILD TABLES & MATCH INDEXING]
* Enforced transparent child table RAM-disk cache invalidation (_invalidate_child_ramdisk_tables) when parent_table receives writes or deletes.
* Validated match_block index construction and field_fetch O(1) lookups for child tables linked by parent_table (e.g., member_google).
- [ENCODER & BINARY BUFFER OPTIMIZATIONS]
* Optimized binary crop routines (t/amberdb_bin_crop.t) and range filtering algorithms in AmberDB::Base::Encoder and AmberDB::Array.
- [TOOLS REFACTOR & SUB-MODULE DECOMPOSITION (AmberDB::Tools)]
( run in 1.151 second using v1.01-cache-2.11-cpan-c32d3c3b8f1 )