A simple ORM utility for React Native apps using SQLite, built on top of react-native-sqlite-storage. Version 1.0.0 provides a Rails-inspired active record pattern with model definitions, CRUD operations, query builder, and raw SQL execution. Works on iOS and Android but not web. Key differentiators: lightweight, supports column types, defaults, unique constraints, and paginated queries. Integrates with Expo SQLite or direct react-native-sqlite-storage. Notable: exports from 'expo-sqlite-orm' despite package name, and uses class-based models with static getters.
npm install react-native-sqlite-ormNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Defines an Animal model with SQLite ORM, creates table, saves a record, and retrieves it.
Use `import { BaseModel } from 'expo-sqlite-orm'`Import DatabaseLayer from the source path directly, or avoid using it if possible.
Use a platform check to exclude web or choose a web-compatible alternative.
Always name your primary key column 'id'.
Be aware that the package is installed as 'react-native-sqlite-orm' but imported as 'expo-sqlite-orm'.
Install the package with `npm install react-native-sqlite-orm` or `yarn add react-native-sqlite-orm`. Then use import from 'expo-sqlite-orm'.
Change import to `import { BaseModel } from 'expo-sqlite-orm'`Use correct import: `import { BaseModel } from 'expo-sqlite-orm'`