frida_query_builder 1.1.0 copy "frida_query_builder: ^1.1.0" to clipboard
frida_query_builder: ^1.1.0 copied to clipboard

A dart library that helps you create SQLITE queries using statements and the builder design pattern.

πŸ”¨ Frida query builder #

Frida Query Builder is a lightweight Dart library designed to build basic SQLite queries in a clear and structured way, without code generators, without heavy ORMs, and without complex configurations.

Its goal is to provide a minimal abstraction layer that allows developers to create SELECT, INSERT, UPDATE, and DELETE statements using Dart classes and methods, while keeping full control over the generated SQL.

Frida is built for developers who:

  • Want explicit and predictable SQL
  • Do not need automatic migrations or generated models
  • Prefer simplicity over feature-heavy ORMs
  • Work with SQLite in local applications (Flutter or pure Dart)

Frida Query Builder does not try to hide SQLβ€”instead, it makes it more readable, reusable, and safer, reducing common string-concatenation errors and improving code maintainability.

Examples #

DDL


final createUsers = Create(
    tableName: "users",
    columns: [
      ColumnInteger(
        name: "id",
        isPrimaryKey: true,
        isAutoIncrement: true,
      ),
      ColumnText(
        name: "name",
        isNotNull: true,
      ),
    ],
  );
  print(FridaQueryBuilder(createUsers).build());

  /* Output:
  CREATE TABLE users(
    id INTEGER PRIMARY KEY AUTOINCREMENT,
    name TEXT NOT NULL
  );
  */

DML

// Insert
final insertUser = Insert(
  into: "users",
  values: {
    "name": "Felipe",
  },
);

print(FridaQueryBuilder(insertUser).build());

  /* Output:
  INSERT INTO users(name) VALUES("Felipe");
  */

DQL

// Select
final selectUsers = Select(
  from: "users",
  columns: ["id".field, "name".field],
);


print(FridaQueryBuilder(selectUsers).build());

  /* Output:
  SELECT id, name
  FROM users;
  */

πŸ“– Supported SQLite Functionalities #

Data types

Functionality Supported
INTEGER βœ…
REAL βœ…
TEXT βœ…
BLOB βœ…

Data definition

Functionality Supported
CREATE TABLE βœ…
DROP TABLE ❌
ALTER TABLE (rename, add column) ❌

Data Manipulation

Functionality Supported
INSERT INTO (single row) βœ…
INSERT INTO (multiple rows) ❌
UPDATE (with WHERE) βœ…
DELETE (with WHERE) βœ…

Querying (SELECT)

Functionality Supported
SELECT (specific columns / *) βœ…
DISTINCT βœ…
WHERE conditions βœ…
ORDER BY βœ…
GROUP BY + HAVING βœ…
LIMIT + OFFSET βœ…
INNER JOIN βœ…
LEFT JOIN βœ…
Subqueries (WHERE, FROM, SELECT) ❌
Aggregate functions (COUNT, SUM, AVG, MIN, MAX) βœ…

Constraints & Expr.

Functionality Supported
CHECK βœ…
NOT NULL ❌
DEFAULT βœ…
UNIQUE ❌
PRIMARY KEY βœ…
FOREIGN KEY βœ…
Arithmetic operators (+, -, *, /) ❌
Comparison operators (=, <>, <, <=, >, >=) βœ…
AND βœ…
OR βœ…
NOT ❌
IN βœ…
BETWEEN ❌
LIKE βœ…

Transactions

Functionality Supported
BEGIN TRANSACTION ❌
COMMIT ❌
ROLLBACK ❌
CREATE INDEX ❌
DROP INDEX ❌
Unique indexes ❌

Advanced

Functionality Supported
WITH (CTE) ❌
Window functions ❌
Full-text search (FTS5) ❌
JSON functions ❌

πŸ“„ UML Diagram classes #

Statements classes
Builders classes
3
likes
0
points
563
downloads

Publisher

unverified uploader

Weekly Downloads

A dart library that helps you create SQLITE queries using statements and the builder design pattern.

Repository (GitHub)
View/report issues

License

unknown (license)

More

Packages that depend on frida_query_builder