kts

Kit Term Storage - fast, concurrent in-memory tables inspired by Erlang's ETS

Files

FileDescription
kit.tomlPackage manifest with metadata and dependencies
src/main.kitTable management, CRUD, queries, and atomic ops
zig/kts.zigLow-level Zig implementation with mutex locking
tests/query-operations-test.kitTests for pattern matching and select operations
tests/set-operations-test.kitTests for insert, lookup, delete, and keys
tests/table-lifecycle-test.kitTests for table creation, types, and cleanup

Dependencies

No Kit package dependencies.

Installation

kit add gitlab.com/kit-lang/packages/kit-kts.git

Usage

import Kit.Kts

License

MIT License - see LICENSE for details.

Exported Functions & Types

KTSError

KTS error type for typed error handling.

Variants

TableCreateError {message}
TableNotFoundError {message}
InvalidKeyError {message}
TableClosedError {message}

TableType

Table type variants for different storage patterns. - Set: Unique keys, O(1) lookup (hash map) - OrderedSet: Unique keys, sorted, O(log n) lookup (balanced tree) - Bag: Duplicate keys allowed, unique values per key - DuplicateBag: Duplicate keys and values allowed

Variants

Set
OrderedSet
Bag
DuplicateBag

TableOption

Table options for configuring access and behavior. - :named - Table can be looked up by name via KTS.whereis - :public - Any process can read/write (default) - :protected - Any process can read, only owner can write - :private - Only owner can read/write

Variants

Named
Public
Protected
Private