Browse Source

Add readme

main
Dylan Baker 2 years ago
parent
commit
0d31435066
1 changed files with 44 additions and 0 deletions
  1. 44
    0
      README.md

+ 44
- 0
README.md View File

@@ -0,0 +1,44 @@
1
+# Kappe
2
+
3
+Kappe is a tool designed to compile SQL to Elasticsearch's JSON-based query syntax. Currently, the featureset is small, basic `SELECT a, b, c FROM d WHERE e = "f"` queries work. Output is printed to STDOUT where it can be collected onto the clipboard or into a file for later use.
4
+
5
+### Installation
6
+
7
+Install Rust if you don't have it already.
8
+
9
+```shell
10
+$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
11
+```
12
+
13
+Once you have Rust installed, you can use Cargo to install Kappe.
14
+
15
+```shell
16
+$ git clone https://git.simulacrum.party/simulacrumparty/kappe
17
+$ cd kappe
18
+$ cargo install --path .
19
+```
20
+
21
+### Usage
22
+
23
+```shell
24
+$ kappe 'select a, b, c from d where e = f'
25
+GET /documents/_search
26
+{
27
+  "_source": [
28
+    "a",
29
+    "b",
30
+    "c"
31
+  ],
32
+  "query": {
33
+    "bool": {
34
+      "filter": [
35
+        {
36
+          "term": {
37
+            "e": "f"
38
+          }
39
+        }
40
+      ]
41
+    }
42
+  }
43
+}
44
+```

Loading…
Cancel
Save