diff options
author | Alexander Foremny <aforemny@posteo.de> | 2024-02-07 02:32:13 +0100 |
---|---|---|
committer | Alexander Foremny <aforemny@posteo.de> | 2024-02-07 02:57:44 +0100 |
commit | 9abe1e72043062bc35a243e1c2f7027fde42b814 (patch) | |
tree | 9acb169f8b4a9f5bacb75c8e8e1db3f3abd91529 /README.md | |
parent | edc24dd5b991b32be862e4e9410bc9062bcdbfe1 (diff) |
support joins
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..c9eba83 --- /dev/null +++ b/README.md @@ -0,0 +1,33 @@ +```console +❯ tree data/ +data/ +├── c +│ ├── 1.json +│ └── 2.json +└── j + ├── 1.json + └── 2.json +``` + +```console +> SELECT . FROM c +{"id":2,"j_id":3} +{"foo":"bar","id":1,"j_id":1} + +> SELECT id FROM c +{"c.id":2} +{"c.id":1} + +> SELECT c.id, j.id, is_j FROM c LEFT JOIN j ON j.id == c.j_id +{"c.id":2,"is_j":null,"j.id":null} +{"c.id":1,"is_j":true,"j.id":1} + +> SELECT c.id, j.id FROM c RIGHT JOIN j ON j.id == c.j_id +{"c.id":null,"j.id":2} +{"c.id":1,"j.id":1} + +> SELECT c.id, j.id FROM c FULL JOIN j ON j.id == c.j_id +{"c.id":2,"j.id":null} +{"c.id":1,"j.id":1} +{"c.id":null,"j.id":2} +``` |