A simple object-relational mapper (ORM) for mobiletto storage, supporting Amazon S3, Backblaze B2, local filesystems, and IndexedDB. Version 2.2.36 (stable). Provides repository-based CRUD operations, field validation, indexing, and multi-connection replication. Differentiates from full-fledged ORMs by being storage-agnostic and simple to set up, with minimal dependencies. Released under LGPL-3.0, with active maintenance on GitHub. Suitable for projects needing a lightweight ORM over cloud or local storage without a database backend.
npm install mobiletto-ormNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows registering storage drivers, creating a repository with validation, and performing create and findBy operations.
Ensure registerDriver() is called for each storage driver before repositoryFactory().
Omit 'id' from the fields definition; it is auto-generated.
Do not use indexeddb driver in Node.js. Use only in browser builds.
Consider using repository.addIndex() or avoid relying on field-level indexing for future-proofing.
Install mobiletto-base and import registerDriver from it before calling.
Call registerDriver('s3', require('mobiletto-driver-s3')) before creating connections.Ensure each typeName is unique, or reuse existing repository instance.
Remove 'id' from fields; it is auto-generated internally.