2 unstable releases
|0.7.0||May 21, 2022|
|0.6.2||May 5, 2022|
#422 in Database interfaces
24 downloads per month
Used in deepwell-rpc
DEEPWELL is an experimental backend system to provide core wiki operations via an API for Wikijump. This is intended as an internal API consumed by the web server as part of its logical tasks.
#![forbid(unsafe_code)] is set, and therefore this crate has only safe code.
Available under the terms of the GNU Affero General Public License. See LICENSE.md.
If you have
sea-orm-cli, and have a local instance of Wikijump running, you can use the following script to autogenerate SeaORM model files:
The primary organization of the crate is as follows:
api/— Web server definition, such as its routes and related structures.
- Each API is namespaced based on its version. The primary version of interest is the "internal" API, which is consumed by PHP and not meant for outside consumption due to it providing unguarded access.
methods/— Implementations for individual routes provision above.
services/— "Services", or logical encapsulations of different concepts or operations.
- For instance, the
ParentServiceallows retrieving and storing data related to parent-child page relationships. You can think of it as "wrapping" the
- Similarly, the
pagetable, but also wraps all the other operations contained with the logical concept of the "page", such as creating new revisions using the
RevisionServiceas part of the "edit" method.
- For instance, the
locales/— Provides localization methods, interpreting the Fluent translation files.
models/— Primarily auto-generated by Sea-ORM, these files allow for interfacing with the database.
- Other files are utilities, and are generally understandable by looking at their contents..
The routes are defined in
api/, with their implementations in
methods/, and the structures they rely on in
services/<name>/structs.rs. The services invoked to encapsulate logical operations are at
This executable targets the latest stable Rust. At time of writing, that is
$ cargo build --release
Tests have not yet been implemented, but when they are, run:
$ cargo test
-- --nocapture to the end if you want to see test output.
$ cargo fmt # Ensure code is formatted $ cargo clippy # Check code for lints