Binary Query Language 1.01

Definition Value Explanation
DEFAULT_RECORD "default.rec" Default filename for records, set as "default.rec". Provides a fallback file for storing data, with "Account" as the default record type for basic authentication.
DEFAULT_RECORD_TYPE "account" Default record type is "account". Ensures the system supports login/authentication out-of-the-box if no other types are defined.
MAX_RECORD_TYPES 255 Maximum number of record types, configurable up to 255. Fits within a byte, balancing flexibility and memory efficiency.
MAX_RECORDS 1024 Maximum number of records, set to 1024 but adjustable in preferences. Allows scalability tailored to application needs.
DB_MONOLITHIC 0x00000001 Flag for a single-file database. Contrasts with segmented storage, simplifying file handling.
DB_RAM_RECORD 0x00000002 Loads records into RAM buffer. Boosts performance by reducing disk I/O for frequently accessed data.
DB_FILE_JOURNAL 0x00000004 Enables journaling of all I/O operations. Supports auditing and recovery by logging changes.
DB_TIMESTAMP 0x00000008 Adds timestamps to output. Useful for tracking record creation or modification times.
RECORD_JOINED 0x00000010 Indicates records can be joined. Suggests lightweight relational capabilities across record types.
RECORD_BACKUP 0x00000020 Saves records to a concurrent backup file. Enhances data reliability with redundancy.
RECORD_TIMEOUT 0x00000040 Marks records as expirable. Enables time-based expiration, like for temporary records.
GET 0x00000001 Command to retrieve data. Uses bit 0 as a toggle with PUT (1 = GET).
PUT 0xfffffffe Command to store data. Toggles bit 0 with GET (0 = PUT), saving space in the 8-bit command set.
ALL 0x00000002 Applies operation to all records. Simplifies bulk actions like retrieving or storing everything.
GT 0x00000004 "Greater than" filter. Supports conditional queries for numeric comparisons.
LT 0x00000008 "Less than" filter. Pairs with GT for range-based queries.
EQU 0x00000010 "Equal to" filter. Enables exact-match queries.
ORDER_BY1 0x00000020 Sorts by name (0) or date (1). Provides basic result ordering.
ORDER_BY2 0x00000040 Sorts by size (2) or data type (3). Extends sorting for specific fields.
EXTENDED_ENABLE 0x00000080 Enables extended command set. Signals use of 16-bit operations like JOIN.
JOIN 0x00000001 16-bit command for cross-record relations. Adds relational functionality.
SPLIT 0x00000002 16-bit command to split records. Complements JOIN for data manipulation.
DATA_SUFFIX ".dat" File extension for data files. Ensures consistent naming for storage.
Channel Data Encoding
#define MAX_FIELDS 256 #define CHANNEL_OBJECT_ENABLE 0x0000000000000001 #define CHANNEL_STATE_MASK 0x00000000000001fe // bits (1-8) a byte for runtime state. struct Field //@struct Field { struct Linkable field_node; char field_name[64]; unsigned char field_type; void *data; struct HyperLinkedList *listeners; int (*FieldHandler)(struct Field *fieldPtr); // }; struct Object //@struct Object { struct Linkable node; struct HyperLinkedList ob_fields; //--- List of Field Structs uint64_t ob_flags; uint64_t ob_size; char ob_name[256]; struct GraphicsContext *ob_graphics; struct Runtime *ob_run; uint32_t ob_field_number; uint32_t user_data; // 64 bit pad uint64_t crc; }; #define HEAP_MEMORY 0 #define STACK_MEMORY 1 #define IPC_MEMORY 2 #define GPU_MEMORY 3 #define CLOUD_MEMORY 4 #define REGISTRY_MEMORY 5 #define PAGE_MEMORY 6 #define RESERVED_MEMORY 7 #define DATA_BYTE 0 #define DATA_SHORT 1 #define DATA_CHAR 2 #define DATA_INT 3 #define DATA_LONG 4 #define DATA_FLOAT 5 #define DATA_DOUBLE 6 #define DATA_OBJECT 7 #define DATA_PRIMITIVE 0 #define DATA_ARRAY 1 #define DATA_2D_ARRAY 2 #define DATA_3D_ARRAY 3 #define DATA_SIGNED 0x40 #define DATA_CONTAINED 0x40 #define DATA_PACK_PARAMETERS 0x80 // OR flags