Ìlànà (pronounced “ee-LAH-nah”) is a Yoruba word meaning “pattern,” “system,” or “protocol.”IlanaORM is a fully-featured, Eloquent-style Object-Relational Mapping (ORM) library for Node.js that makes database interactions simple and intuitive. Think of it as a bridge between your JavaScript/TypeScript code and your database.
If you’re new to ORMs, IlanaORM uses simple, English-like methods that make database operations intuitive:
Copy
Ask AI
// Instead of writing SQL like this:// SELECT * FROM users WHERE age > 18 AND is_active = true// You write this:const users = await User.query() .where("age", ">", 18) .where("is_active", true) .get();
Automatic TypeScript support means fewer bugs and better developer experience:
Copy
Ask AI
const user = await User.find(1); // TypeScript knows this is a User instanceuser.name = "John"; // ✅ Validuser.invalidProperty = "test"; // ❌ TypeScript error
Define how your data connects with simple relationship methods:
Copy
Ask AI
class User extends Model { posts() { return this.hasMany("Post"); // A user has many posts }}// Load user with all their postsconst user = await User.with("posts").find(1);
New to databases? Don’t worry! This documentation explains everything from
the ground up. We’ll start with the basics and gradually introduce more
advanced concepts.