wrong-use-of-git database
Find a file
2024-06-14 03:02:53 +02:00
wugdb Initial commit 🎉 2024-06-14 03:02:53 +02:00
LICENSE Initial commit 🎉 2024-06-14 03:02:53 +02:00
README.md Initial commit 🎉 2024-06-14 03:02:53 +02:00

wrong-use-of-git database

wugdb is a Nushell module providing a tool for storing and retrieving structured Nushell data in a Git branch.

The data is stored in JSON files in a dedicated, unrelated (orphan) branch. A Git commit is generated each time the stored data is updated.

The commands provided are wugdb list, wugdb get, wugdb store, and wugdb drop. Each supports --help for more detail.

More details about the internals of wugdb are available in a blog post

This module works, but has minimal to no error handling, and is more of a proof of concept. Use in production is generally not recommended (unless you really want to).

The plural of wugdb is wugdbs.

Example

> use wugdb
> git init
> [ 1 2 3 ] | wugdb store first
> [ 4 5 6 ] | wugdb store second
> wugdb get first 
╭───┬───╮
│ 0 │ 1 │
│ 1 │ 2 │
│ 2 │ 3 │
╰───┴───╯
> wugdb get second | append [ 7 8 9 ] | wugdb store second
> wugdb get second
╭───┬───╮
│ 0 │ 4 │
│ 1 │ 5 │
│ 2 │ 6 │
│ 3 │ 7 │
│ 4 │ 8 │
│ 5 │ 9 │
╰───┴───╯

License

wugdb is available under the MIT license. See LICENSE for details.

Repositories

This project can be found at: