https://github.com/jdockerty/wal-c
Basic/toy WAL, written in C
https://github.com/jdockerty/wal-c
Last synced: 8 months ago
JSON representation
Basic/toy WAL, written in C
- Host: GitHub
- URL: https://github.com/jdockerty/wal-c
- Owner: jdockerty
- Created: 2024-11-04T14:40:25.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-11T18:56:00.000Z (over 1 year ago)
- Last Synced: 2025-01-17T12:26:00.670Z (over 1 year ago)
- Language: C
- Size: 30.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# wal-c
A Write-Ahead Log (WAL) written in C.
## Concept
The WAL has an extremely simple design, it should be able to write arbitrary
key-value pairs and replay the inserted values back.
## Usage
A CLI tool is provided to act as an entrypoint to the WAL operations[^1].
[^1]: A WAL works much better for longer running operations than for a CLI, so
this is really a glorified file read/writer.
- `wal-c write PATH_TO_FILE k=v,...`: Write an arbitrary number of key-value pairs to the file as an insertion operation.
- `wal-c delete PATH_TO_FILE k=v,...`: Write an arbitrary number of key-value pairs to the file as a delete operation.
- `wal-c [-s] replay PATH_TO_FILE`: Replay the values written into the WAL directory. When `-s` is given, deletes will be shown.
- `wal-c close PATH_TO_FILE`: Closes a file, encoding metadata and marking it as immutable.