sqler
1.2.1, released 5 months ago by finchdart.com
A SQL query builder for Dart with MySQL and SQLite support
What it does
Sqler is a fluent SQL query builder that allows Dart developers to construct type-safe SQL statements including SELECT, INSERT, UPDATE, and DELETE operations. It supports both MySQL and SQLite syntaxes, parameterized queries, joins, and table definitions.
AI-written summary of version 1.2.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to programmatically build SQL queries in Dart with a fluent API.
- Your project targets both MySQL and SQLite databases with shared query logic.
- You want to avoid raw SQL string concatenation and prevent SQL injection using parameters.
Skip it when
- You are looking for a complete ORM solution to map database rows directly to complex object models.
- You only need high-level device storage key-value operations.
Strengths
- Fluent interface design for method chaining and readability.
- Supports multiple target databases (MySQL and SQLite) from a single query definition.
- Parameterized queries to prevent SQL injection.
Weaknesses
- It is currently in a beta release stage.
- Does not handle full database connection pooling or execution by itself, focusing primarily on string generation.
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 2
Not documented
var query = Sqler()
.addSelect(QSelect('name'))
.addSelect(QSelect('published_date'))
.from(QField('books'))
.where(WhereOne(QField('publication_year'), QO.EQ, QVar(1980)))
.orderBy(QOrder('name'))
.limit(10);
print(query.toSQL());Alternatives
Packages that do the same job and could replace sqler.
- sqflite
If you need a direct SQLite database implementation plugin for Flutter rather than a generic query builder.
96Compare - drift
If you want a robust reactive type-safe ORM and query builder specifically for SQLite in Dart and Flutter.
99Compare - sqlite3
If you want direct low-level SQLite bindings for Dart.
92Compare
Works with
Packages commonly used together with sqler: ones it builds on, ones built on it, and its own family.
- cryptosqler depends on itProvides SHA, MD5, and HMAC hashing functions for Dart.
- intlsqler depends on itA Dart library for internationalization and localization, providing message translation, plural/gender handling, and date/number formatting.
- finchBuilt on sqlerA lightweight Dart framework for building server‑side web apps, APIs, databases and WebSockets.