coldbox-orm-qb

Construct and execute database-agnostic SQL queries with the QB fluent builder.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Helps developers avoid writing error-prone raw SQL by providing a fluent, database-agnostic API to construct and execute selects, joins, aggregates, subqueries, and CRUD operations within ColdBox and BoxLang applications.

Core Features & Use Cases

  • Fluent Query Construction: Chainable where/join/orderBy/groupBy/having APIs to build readable queries.
  • Advanced Joins & Subqueries: Support for join closures, joinSub, and subqueries as columns or filters.
  • Aggregates & Pagination: Built-in count, sum, avg, min, max, forPage, limit, and offset helpers.
  • CRUD and Raw Expressions: Insert/update/delete support plus selectRaw/whereRaw/orderByRaw for custom SQL when needed.
  • Use Case: Build a paginated report of active users with aggregated order totals using a subquery join and database-agnostic grammar settings.

Quick Start

Use the QB skill to build and run a parameterized query that returns active users ordered by last name with pagination.

Frequently Asked Questions about coldbox-orm-qb

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

FAQPage Schema
How do I build complex SQL queries in ColdBox without writing raw SQL strings?

Build complex SQL queries in ColdBox by using a fluent query builder to chain parameterized where, join, and orderBy clauses, preventing raw SQL errors while constructing selects, aggregates, and CRUD operations.

Can I use a fluent query builder for subqueries and advanced joins in BoxLang?

Use a fluent query builder in BoxLang for subqueries and advanced joins by utilizing join closures and subqueries as columns or filters, enabling database-agnostic query construction across MySQL, PostgreSQL, MSSQL, and Oracle.

What's the best way to add pagination and aggregates to a ColdBox service layer?

Add pagination and aggregates to a ColdBox service layer by chaining built-in count, sum, avg, min, max, forPage, limit, and offset helpers within your query builder to calculate and segment report data efficiently.

Does ColdBox query builder support raw expressions for custom SQL syntax?

ColdBox query builder supports custom SQL syntax by providing selectRaw, whereRaw, and orderByRaw expressions, allowing you to inject specific database functions or syntax while maintaining the fluent query chain.

Do I need a specific datasource and grammar configured to run database-agnostic queries?

You need a datasource and grammar configured for the QueryBuilder module to run database-agnostic queries, ensuring the fluent API translates standard SQL syntax correctly across MySQL, PostgreSQL, MSSQL, and Oracle environments.