AmberDB

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

          * 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)]
          * Decomposed monolithic AmberDB::Tools (~2350 lines) into modular sub-modules under lib/AmberDB/Tools/:
            - AmberDB::Tools::Index: Primary keys, full-text inverted search, columnar facets, match blocks, sort matrices, and URL slug indexing (set_index, set_readall, set_search, set_fields, set_filters, set_rwlnkall, set_sort, index_alltables, c...
            - AmberDB::Tools::Maintain: Database maintenance, backup dump/restore, compacting, table deletion, and TSV/CSV conversion (dump, restore, vacuum, del_table, tie2csv, csv2tie, dir_tables, all_tables, _copy_file).
            - AmberDB::Tools::Update: Table upgrades, schema migrations, and centralized update routines (update_table, update_all, replace_tablename, replace_blockdata, db_simple, convert_tables, update_storage, update_version).
          * Preserved AmberDB::Tools as the unified facade wrapper inheriting from all sub-modules (use parent qw(...)) with 100% backward compatibility.
          * Enforced strict zero-POD rule across all sub-modules; all user-facing documentation is consolidated in AmberDB::Tools.

        - [CENTRALIZED CLI STORAGE & VERSION UPDATES (amberdb_cli.pl)]
          * Integrated 'amberdb update storage' and 'amberdb update version' into bin/amberdb_cli.pl (and amberdb/amberdb.bat wrappers).
          * Added CLI option parsing for --check, --force, --all, --no-backup, --tables, and --cpanm flags.
          * Fully eliminated legacy bin/amberdb_setup.pl; all maintenance and provisioning tasks are routed through the main amberdb CLI.
          * Registered bin/amberdb and bin/amberdb_cli.pl in Makefile.PL EXE_FILES.

        - [RAM-DISK ZERO-FALLBACK & SHARED MEMORY ARCHITECTURE]
          * Re-engineered RAM-disk mounting lifecycle using platform table mapping (%RM_DIR: Windows R:, Linux /dev/shm, macOS /Volumes).
          * Fixed Windows ImDisk detection in AmberDB::Base::Ramdisk by appending a trailing slash ($rm_base/) in -d tests to resolve MSYS2/Windows drive root stat quirks.
          * Enforced strict Zero-Fallback architecture: when unmounted or disconnected, ramdisk_dir, table_rdir, schema_rdir, and config_rdir are normalized strictly to "" (empty string) in both $cfg and {_path}.
          * Completely removed shmem_dir and any fallback creation of dbstore/ramdisk directories on physical disk when unmounted; tables and routines never assume a RAM-disk is present.
          * Removed table_rdir, schema_rdir, and config_rdir from default persistent @dirs initialization array in AmberDB::Base::set_datadir.
          * Implemented pure RAM-disk Shared Memory API: get_shmem(), set_shmem(), del_shmem() with strict zero-fallback to disk when unmounted.
          * Simplified Windows batch utility bin/setup_windows.bat using native imdisk directly, deleting obsolete shell and PowerShell helper scripts.
          * Handled explicit AMBERDB_TEST_RAMDISK=0 as deterministic unmounted test override in AmberDB::Base::Ramdisk.
          * Optimized ramdisk_is_mounted() for fast O(1) cached lookup.

        - [TIERED STORAGE SYNCHRONIZATION & READ/WRITE CONSISTENCY (R0 - R4)]
          * R1 (Tier 1 - Hybrid Storage: Primary Data on Disk, Indexes on RAM-Disk):
            - Synchronous index dual-write: index_put(), index_del(), and recs_put()/recs_del() (for non-.db index targets like .slg, .fld, .inx, .fac, .src) now automatically write to both RAM-disk and physical disk.
            - Guarantees complete index durability and survival across system reboots and power outages while preserving sub-millisecond query execution directly from RAM-disk.
            - Primary data files (.db) remain strictly on physical disk without mirroring to RAM, eliminating memory bloat.
          * R4 (Tier 4 - Write-Behind Async Storage):
            - Fixed multi-record retrieval and query functions (read_list, read_all) and field scanning/filtering (field_fetch, field_filter, field_count, field_scan, search_table, table_keys) to include use_ramdisk == 4 in $data_path resolution.
            - Guarantees immediate read-your-own-writes consistency directly from the active RAM-disk before the asynchronous background flush daemon writes dirty records to physical disk.

        - [STORAGE DIRECTORY LAYOUT & TEST SUITE ENHANCEMENTS]
          * Modernized xt/amberdb_ramdisk.t and t/amberdb_ramdisk_tiers.t to completely eliminate all legacy "ramdisk" folder references, hardcoded subfolder paths, and regex expectations.
          * Upgraded all test instances to pass explicit database names and isolated RAM-disk mounts ($mock_mount/amberdb_<dbname>).
          * Hardened AmberDB::Base::Ramdisk test emulation mode ($ENV{AMBERDB_TEST_RAMDISK}) to strictly use temporary directories instead of defaulting to the host's physical RAM-disk (R:), completely preventing test artifacts from polluting product...
          * Completely eliminated the legacy "$dbase_dir/ramdisk" fallback in AmberDB::Base::Ramdisk; when no database name is provided in production, RAM-disk mounting is strictly disabled (zero-fallback).
          * Fixed test emulation fallback in AmberDB::Base::Ramdisk when database name is omitted under $ENV{AMBERDB_TEST_RAMDISK}, defaulting to isolated tmpdir()/amberdb_test to ensure clean schema inheritance testing (t/amberdb_dbase_inheritance.t...
          * Updated AmberDB::Tools::Update::update_storage to exclude the obsolete 'ramdisk' folder from canonical directory layouts.
          * Purged all orphaned physical dbstore/ramdisk directories across active projects.
          * Standardized lock directory resolution in t/amberdb_lock.t using $adb->path('lock_dir').
          * Added comprehensive R1 dual-write synchronization assertions in xt/amberdb_ramdisk.t verifying .inx, .fld, and .slg physical persistence.

        - [CONNECT PARAMETER NORMALIZATION]
          * 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.



( run in 0.588 second using v1.01-cache-2.11-cpan-1bcd28dbaf1 )