Expo SQLite Eloquent ORM v0.10.6 is a lightweight, fluent ORM wrapper for expo-sqlite in React Native/Expo apps, inspired by Laravel's Eloquent. It provides a query builder, model-based CRUD, relationships, attribute casting, and a migration system. Updated regularly on npm, it competes with other SQLite wrappers by offering a Laravel-like API. Released under MIT license, it requires expo-sqlite ~13.4.0, React ^18.2.0, and React Native ^0.73.2.
npm install expo-sqlite-eloquent-ormNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Defines a User model with attribute casting, creates table, inserts, finds, updates, and queries records using the ORM.
Define a static `tableName` property in your model class instead of calling `Model.table('name')`.Use methods like `insert`, `where`, `get` for common operations.
Define `casts` as an object in the class instance, e.g., `casts = { age: 'number', is_active: 'boolean' }`.Call `user.hasMany(Post)` on an instance, not `User.hasMany(Post)`.
Check for `null` explicitly, e.g., `const user = await User.find(1); if (user !== null) { ... }`.Add `static tableName = 'your_table';` to your model class.
Ensure cast type strings are exactly one of: 'number', 'boolean', 'string', 'json'.
Always define a table name via `static tableName` in your model or use `User.table('users')` before `get()`.