The Fake Ledger Database
FaqueLDB is a testing-oriented in-memory database that aims to be a drop-in replacement for Amazon Quantum Ledger Database (QLDB). To this end, it supports PartiQL queries and serializes data using the Amazon Ion format.
FaqueLDB currently supports:
- Transactions
- Full journal with verifiable hashes
- Commit or abort transactions
- Committed views (
_ql_committed_*
)
SELECT
Queries:- Everything supported by the PartiQL reference implementation, including conditionals, joins, and navigating nested data structures
- The
BY
clause to retrieve document IDs - The system catalog (
information_schema
)
- Functions:
- Aggregations (
COUNT
,MAX
, etc.) - Casts (
CAST
,TO_STRING
, etc.) - Null handling (
COALESCE
, etc.) - Date/time (
UTCNOW
, etc.) - String utilities (
TRIM
,UPPER
, etc.)
- Aggregations (
- DDL:
CREATE TABLE
without tagsDROP TABLE
CREATE INDEX
is implemented, but it doesn't affect query performance
- DML:
INSERT
for single and multiple values
These features of QLDB are not currently supported, but are on the roadmap:
- DDL:
DROP INDEX
does not support theWITH
clause that is required by QLDBUNDROP TABLE
is not supported by the PartiQL reference parser yet
- DML:
- Functions:
- Multiple ledgers
These features of QLDB are not supported and are low priority:
- The control plane and all its features, including ledger management, exports, streams, and tags
docker run --rm -p 8000:8000 cimbul/faqueldb
$ ./gradlew run
Using the QLDB Shell:
$ qldb -s http://localhost:8000 -l test
qldbshell > create table foo
qldbshell > insert into foo << {'x': 1}, {'x': 2} >>
qldbshell > select * from foo
$ ./gradlew test