Database
Partly RustIn Appwrite#
Appwrite runs some of its classes from the Rust crate; the rest are still PHP.
Rust 107,825 lines (86,092 code)split
| Part | Code | Comments | Blank | Total | Files |
|---|---|---|---|---|---|
| Rust source | 86,092 | 12,646 | 9,087 | 107,825 | 251 |
Comments include doc comments. Each side counts its src/.
Served from Rust (4)
Utopia\Database\DateTimeUtopia\Database\IdUtopia\Database\PermissionUtopia\Database\RoleInstall#
cargo add utopia-databaseOverview#
A document database: collections with typed attributes and indexes, documents with permissions, queries, relationships, tenancy and caching, over pluggable storage adapters.
The crate reads and writes the same tables, rows and metadata as
utopia-php/database, so PHP and Rust services share one dataset.
Port status
Only the modules without I/O are here so far: identifiers, roles,
permissions, dates and the errors they fail with. The rest of the crate
(the model, the adapters, the validators and the Error marks they
set) comes from appwrite/appwrite#14308.
PHP classes and their Rust items
| PHP | Rust |
|---|---|
Utopia\Database\Id | id |
Utopia\Database\Role | Role |
Utopia\Database\Permission, PermissionType | Permission, PermissionType |
Utopia\Database\DateTime | datetime |
Utopia\Database\Exception and Exception\* | Error, Kind |
Modules#
Each module groups one concept of the library. Internal ones hold items the crate re-exports at its root.
API#
What utopia_database exports at its root.