Quick ORM
5.2.0
5.2.0
  • Introduction
  • Why Quick?
  • What's New?
  • Upgrade Guide
  • Contributing
  • Guide
    • Getting Started
      • Defining An Entity
        • Subclass Entities
      • Retrieving Entities
      • Working with Entities
      • Creating New Entities
      • Updating Existing Entities
      • Deleting Entities
      • Query Scopes and Subselects
    • Relationships
      • Relationship Types
        • hasOne
        • hasMany
        • belongsTo
        • belongsToMany
        • hasManyThrough
        • hasOneThrough
        • belongsToThrough
        • polymorphicBelongsTo
        • polymorphicHasMany
      • Retrieving Relationships
      • Querying Relationships
      • Relationship Counts
      • Ordering By Relationships
      • Eager Loading
    • CBORM Compatibility Shim
    • Collections
    • Custom Getters & Setters
    • Serialization
    • Interception Points
    • Debugging
    • FAQ
  • Cookbook
    • Introduction
    • Dynamic Datasource
  • External Links
    • API Docs
    • Source Code
    • Issue Tracker
Powered by GitBook
On this page
  • Configure a default datasource in your CFML engine
  • Download Quick
  • Add a mapping for quick in your Application.cfc
  • Configure your defaultGrammar in config/ColdBox.cfc

Was this helpful?

Edit on GitHub
Export as PDF
  1. Guide

Getting Started

PreviousContributingNextDefining An Entity

Last updated 2 years ago

Was this helpful?

qb is the engine that powers Quick. It is highly recommended that you become familiar with the qb documentation.

Configure a default datasource in your CFML engine

You can do this any way you'd like: through the web admin, in Application.cfc, or using cfconfig.

Make sure to set this.datasource in your Application.cfc so Quick knows which datasource to use.

Quick can use , but it makes it easier to use when you don't have to deal with that.

Download Quick

The easiest way to download Quick is to use ForgeBox with CommandBox. Just run the following from the root of your application:

box install quick

Add a mapping for quick in your Application.cfc

For a default installation in a ColdBox template, the following line will do the trick.

this.mappings[ "/quick" ] = COLDBOX_APP_ROOT_PATH & "/modules/quick";

Configure your defaultGrammar in config/ColdBox.cfc

Quick will auto discover your grammar by default on startup. To avoid this check, set a BaseGrammar.

defaultGrammar is a module setting for Quick. Set it in your config/ColdBox.cfc like so:

moduleSettings = {
    quick = {
        defaultGrammar = "MySQLGrammar@qb"
    }
};

Valid options are any of the qb supported grammars. At the time of writing valid grammar options are: MySQLGrammar@qb, PostgresGrammar@qb, SqlServerGrammar@qb and OracleGrammar@qb. You can also have qb discover your grammar on application init using AutoDiscover@qb. Please check the qb docs for additional options.

If you want to use a different datasource and/or grammar for individual entitities you can do so by attributes to your entities.

multiple datasources
adding some metadata