Skip to content

philippkueng/datalite

Repository files navigation

DataLite

CI

Disclaimer: This repo is highly experimental, expect APIs and implementations to change.

Datalog meets SQLite, DuckDB or PostgreSQL for lower volume of data.

Reasoning & Vision

The thought being that while Datomic, DataScript, Datalevin, XTDB all have their niche I was thinking of another niche, that it'd be handy to be able to query a SQL database using Datalog and hence expand the reach of applications written but also tap into tools that are being developed for SQLite eg. litestream or DuckDB's capability to query CSVs.

This is the reason why I'd like to explore the idea of creating a wrapper on top of SQL, mapping a schema as used for Datomic and create SQL tables from it supporting both nested maps and arrays (to a certain degree) and then offering the database to be queried with Datalog.

Furthermore, having a Clojure-wrapper over SQLite, with SQLite running anywhere from embedded devices to in browser using WASM and Clojure being deployable pretty much anywhere too there's a chance that if one writes their local-first application against DataLite one can lift and shift it to another environment with minimal adaptations.

Getting started

Add the dependency into your deps.edn

io.github.philippkueng/datalite {:git/sha "bb271de51ed19bba48e90622f3f8b1d6b5be588c"}

Then head over to the submit-tx-test which will demonstrate the how to apply the schema, submit data and query it.

Run tests

clj -X:test

Run a specific test namespace

clj -X:test :nses '[datalite.submit-tx-test]'

License

DataLite is licensed under the Mozilla Public License, version 2

About

Datalog meets SQLite

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Contributors