databaseCQL Documentation

A high-performance, type-safe ORM for Crystal applications.

Build fast, reliable database applications with compile-time safety and exceptional performance.

Quick Navigation

I want to...

Go to...

Learn CQL from scratch

Accomplish a specific task

Look up API details

Understand concepts

Installation

Add CQL to your shard.yml:

dependencies:
  cql:
    github: azutoolkit/cql
    version: ~> 0.0.435

  # Choose your database driver:
  pg:  # PostgreSQL
    github: will/crystal-pg
    version: "~> 0.26.0"

Then run:

Full installation guide

Quick Start

Documentation Structure

Tutorials

Learning-oriented - Step-by-step guides for beginners

How-to Guides

Task-oriented - Practical steps to accomplish specific goals

Reference

Information-oriented - Technical descriptions and specifications

Explanation

Understanding-oriented - Conceptual discussions

Key Features

  • Type Safety - Catch errors at compile time

  • Multiple Databases - PostgreSQL, MySQL, SQLite

  • Active Record - Familiar patterns for rapid development

  • Migrations - Version-controlled schema changes

  • Validations - Built-in data integrity

  • Relationships - belongs_to, has_one, has_many, many-to-many

  • Soft Deletes - Mark records as deleted

  • Optimistic Locking - Prevent concurrent update conflicts

Getting Help

License

CQL is available under the MIT license.

Last updated

Was this helpful?