qb

Build parameterized, database-agnostic SQL queries with a fluent query builder.

1|Updated Apr 10, 2026
One-click install
npx skills add https://github.com/ColdBox/skills --skill qb-coldbox
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: qb
Source: https://github.com/ColdBox/skills/tree/main/modules/qb
Command: npx skills add https://github.com/ColdBox/skills --skill qb-coldbox

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The qb skill removes the complexity and risk of writing raw SQL by providing a fluent, parameterized query builder that produces safe, portable SQL across different database engines and prevents SQL injection.

Core Features & Use Cases

  • Query composition: chainable select/from/where/join/group/order/limit clauses, aggregates, and subqueries for complex reads.
  • Mutations and batching: safe inserts, updates, deletes, bulk inserts, pagination, and chunked processing for large datasets.
  • Cross-database portability: configurable grammars for MySQL, Postgres, MSSQL, and SQLite and support for raw expressions when necessary.
  • Use cases include building REST API data access layers, background job batch-processing, and analytics queries that must run against different SQL dialects.

Quick Start

Use the qb skill to build a parameterized select query returning id, name, and email from the users table filtered by isActive.

Frequently Asked Questions about qb

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build parameterized SQL queries in ColdBox to prevent SQL injection?

You can build parameterized SQL queries in ColdBox using a fluent query builder that automatically binds parameters, preventing SQL injection and ensuring safe database interactions across different SQL dialects.

Can I write database-agnostic SQL that works across MySQL, Postgres, and MSSQL?

Yes, database-agnostic SQL is achievable by configuring SQL grammars for MySQL, Postgres, MSSQL, and SQLite, allowing the same fluent query builder code to generate portable SQL for each specific database engine.

What's the best way to handle pagination and chunked processing for large datasets in BoxLang?

For large datasets, a fluent query builder provides built-in pagination and chunked processing capabilities, allowing you to safely select, insert, update, or delete records in manageable batches without loading everything into memory.

Does the qb query builder support subqueries and complex joins?

Yes, the query builder supports subqueries and complex joins by chaining select, from, where, join, group, and order clauses, enabling you to compose intricate SQL reads for REST API data access layers and analytics.

Do I need to inject a specific component to use a fluent query builder in ColdBox?

Yes, you need to inject QueryBuilder@qb into your ColdBox or BoxLang application to start building parameterized, database-agnostic SQL queries safely through the fluent query builder interface.

When should I use raw expressions instead of the fluent query builder?

Use raw expressions when you need database-specific SQL syntax that the fluent query builder cannot abstract, though the builder handles standard selects, joins, mutations, and subqueries across supported SQL grammars.