appwrite
ModuleThe Appwrite source: its readers, and the builders that turn what they read into resources.
Contents
3 submodules, and what the module defines itself.
use utopia_migration::sources::appwrite::get_attribute;pub fn get_attribute(collection: &ResourceRef, definition: &Array) -> Result<ResourceRef>The attribute form of get_column for a collection.
use utopia_migration::sources::appwrite::get_column;pub fn get_column(table: &ResourceRef, definition: &Array) -> Result<ResourceRef>A column resource of table from a column definition (as the API or the
attributes collection report it). A format given as the type (email,
url, ip, enum) and a missing size are resolved the way the server
resolves them (resolve).
use utopia_migration::sources::appwrite::get_database;pub fn get_database(database_type: &str, database: &Array) -> Result<ResourceRef>A database resource of database_type (DocumentsDB, VectorsDB, or Database).
use utopia_migration::sources::appwrite::get_entity;pub fn get_entity(database_type: &str, entity: &Array) -> Result<ResourceRef>A table (Database) or collection (DocumentsDB, VectorsDB) resource.
use utopia_migration::sources::appwrite::get_record;pub fn get_record(database_type: &str, record: &Array) -> Result<ResourceRef>A row (Database) or document (DocumentsDB, VectorsDB) resource.
appwrite::api_reader
Own pageReading databases through the Appwrite API.
use utopia_migration::sources::appwrite::api_reader::ApiReader;pub struct ApiReaderReads databases through the API's TablesDB service; rows and the rest as the models' arrays.
appwrite::reader
Own pageHow the Appwrite source reads databases: through the API, or straight from the project's database.
use utopia_migration::sources::appwrite::reader::DatabaseReader;pub struct DatabaseReaderReads straight from the project's database (_databases, _attributes,
_indexes and the per-database collections).
Debug.use utopia_migration::sources::appwrite::reader::Cursor;pub enum CursorWhere a cursor points: a resource, or an id.
use utopia_migration::sources::appwrite::reader::ReaderQuery;pub enum ReaderQueryA query of a reader: an API query string, or a database query.
use utopia_migration::sources::appwrite::reader::Reader;pub trait Reader: Send + SyncLists databases, tables, columns, indexes and rows for the Appwrite source, and builds the queries it pages them with.
use utopia_migration::sources::appwrite::reader::plain;pub fn plain(doc: &Document) -> ArrayA document as a plain array (getArrayCopy()).
pub type DatabaseResolver = Arc<dyn Fn(&Document) -> Db + Send + Sync>Resolves the database a database document's data lives in.
appwrite::source
Own pageAn Appwrite project as the source.
use utopia_migration::sources::appwrite::source::Appwrite;pub struct AppwriteAn Appwrite project as a source.
Debug.pub const SOURCE_API: &str = "api"Read databases through the API.
pub const SOURCE_DATABASE: &str = "database"Read databases straight from the project's database.