module CQL::ActiveRecord::Queryable

Overview

The Queryable module provides Active Record-style chainable query methods that integrate with the CQL::Query system. It implements the Active Record query interface while maintaining type safety and performance.

Features

Examples

# Basic queries
User.where(active: true).all
User.select(:name, :email).where(age: 18).all
User.order(:created_at).limit(10).all

# Joins through associations
User.query.joins(:posts) { posts.published == true }.all

# Aggregations
User.count
User.where(active: true).count

# Method chaining
User.where(active: true)
  .order(:created_at)
  .limit(20)
  .offset(10)
  .all

Defined in:

active_record/query_builder.cr
active_record/queryable.cr