eloquent
4.3.0, released 2 weeks ago by an unverified publisher
Laravel-style query builder, schema builder, and migrations for PostgreSQL and MySQL.
Unverified publisher
What it does
Provides a Laravel-inspired query builder, schema builder, and migrations for Dart supporting PostgreSQL and MySQL drivers. Includes both a traditional query builder and an Active Record/Data Mapper ORM without code generation or reflection.
AI-written summary of version 4.3.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You want Laravel-style query building and migrations in Dart
- You are connecting directly to PostgreSQL or MySQL databases
- You want an ORM that does not rely on code generation or reflection
Skip it when
- You need an embedded client-side local database like SQLite
- You do not use PostgreSQL or MySQL
Strengths
- Rich query builder ported from Laravel 5.2 and 12
- Supports multiple PostgreSQL drivers and MySQL
- Active Record and Data Mapper ORM features without code generation
Weaknesses
- Limited to PostgreSQL and MySQL drivers
- Not an embedded local mobile database like SQLite
Setup
- Kind
- Pure Dart
- Effort
- Medium
- Code generation
- No
- Direct dependencies
- 9
Requires database connection configuration and proper driver setup for PostgreSQL or MySQL.
final manager = new Manager();
manager.addConnection({
'driver': 'pgsql',
'host': 'localhost',
'port': '5432',
'database': 'database_name',
'username': 'user_name',
'password': 'pass',
});
manager.setAsGlobal();
final db = await manager.connection();
final res = await db.table('temp_location').select(['id', 'city']).get();Alternatives
Packages that do the same job and could replace eloquent.
Works with
Packages commonly used together with eloquent: ones it builds on, ones built on it, and its own family.
- intleloquent depends on itA Dart library for internationalization and localization, providing message translation, plural/gender handling, and date/number formatting.
- postgreseloquent depends on itPostgreSQL driver for Dart supporting binary protocol, pooling and statement reuse.
- mysql_darteloquent depends on itNative MySQL and MariaDB client written in Dart.