From fb4e65eef4f8d16486719e5480e3e1d02c8259b7 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Sun, 27 Sep 2026 17:57:58 +0200 Subject: [PATCH] add database section to book --- book/src/SUMMARY.md | 1 + book/src/database.md | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 book/src/database.md diff --git a/book/src/SUMMARY.md b/book/src/SUMMARY.md index f771191..b201bc6 100644 --- a/book/src/SUMMARY.md +++ b/book/src/SUMMARY.md @@ -9,6 +9,7 @@ - [DNS](proxy/dns.md) - [HTTPS](proxy/https.md) - [Services](services.md) +- [Database](database.md) - [Federation](federation.md) - [Haze scripts](scripts.md) - [Xdebug](xdebug.md) diff --git a/book/src/database.md b/book/src/database.md new file mode 100644 index 0000000..bf96761 --- /dev/null +++ b/book/src/database.md @@ -0,0 +1,33 @@ +# Database + +There are 3 ways of accessing the database of a haze instance. + +## CLI + +```bash +haze [filter] db [query] +``` + +Opens the command line client for the database. If a query is specified, it will +be executed. If no query is specified, an interactive shell will be started. + +Example + +``` +haze db 'select fileid, storage, path from oc_filecache' +``` + +## WebUI + +A web UI (based on [DbGate](https://www.dbgate.io/)) is available with every +instance. + +It can be accessed by using `haze open db`, or, if the proxy is setup at +`db.haze.example.com`. + +## External tools + +For usage with external tools, the database connection URL is printed when the +instance is created. + +Details on how to use the connection URL is dependent on the external tool.