https://github.com/xtdb/2x-playground
Developer Experience experimentation for 2.x
https://github.com/xtdb/2x-playground
Last synced: 8 months ago
JSON representation
Developer Experience experimentation for 2.x
- Host: GitHub
- URL: https://github.com/xtdb/2x-playground
- Owner: xtdb
- License: mit
- Created: 2022-07-21T17:33:11.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-01-10T23:49:29.000Z (over 2 years ago)
- Last Synced: 2024-11-08T17:33:18.039Z (over 1 year ago)
- Language: HTML
- Homepage:
- Size: 243 KB
- Stars: 6
- Watchers: 6
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.adoc
- License: LICENSE
Awesome Lists containing this project
README
= 2x-playground
This repository provides a wide range of examples which allow you to experiment with the XTDB's UX.
----
.
├── README.adoc
├── SQL.adoc
│
│ # clients:
├── clojure
├── psql
├── python
│
│ # servers:
├── xtdb-server-clj
└── xtdb-server-docker
----
== Start a server
=== Option 1: Docker
[source,sh]
----
docker pull ghcr.io/xtdb/xtdb-ea
docker run -ti --rm -p 5432:5432 -p 9832:9832 -p 3000:3000 ghcr.io/xtdb/xtdb-ea:latest
----
=== Option 2: JAR
TODO
=== Option 3: Clojure in-process
* Make sure Clojure is installed
* `cd xtdb-server-clj && ./run.sh`
== XTDB SQL
The SQL dialect available in XTDB tries very hard to adhere to the SQL Specification.
There are small deviations from the spec where absolutely required.
Read more in https://github.com/xtdb/2x-playground/blob/main/SQL.adoc[`SQL.adoc`].
== psql
Install `psql` (Postgres) if you don't have it already.
Some package managers offer the Postgres client in isolation
(ubuntu has `postgresql-client`) but this is surprisingly uncommon.
[source,sh]
----
sudo apt-get install -y postgresql
sudo pacman -S postgresql
brew install postgresql
# etc.
----
* Start an XTDB server
* Run `./psql/run.sh` to start a client
* Try a query from `./psql/queries.sql`
== Python
* Start an XTDB server
* Install dependencies: `./python/install.sh`
* Edit and run `./python/queries.py`
== Clojure
The Clojure examples consume XTDB directly, running a client and server in the same process for convenience.
This means you do not need to start an external XTDB server.
(Though you still can, of course.)
The client code still speaks to XTDB over the `pgwire` protocol using JDBC.
`./clojure/README.adoc`