Module: Observ::JsonQueryable

Extended by:
ActiveSupport::Concern
Included in:
Session
Defined in:
app/models/concerns/observ/json_queryable.rb

Overview

Provides database-agnostic JSON querying capabilities.

This concern allows models with JSON/JSONB columns to query nested JSON fields in a way that works across different database adapters (PostgreSQL, SQLite, MySQL, etc.)

Usage:

class Session < ApplicationRecord
include Observ::JsonQueryable
end

# Query by JSON field
Session.where_json(:metadata, :agent_type, "MyAgent")
Session.where_json(:metadata, "nested.path", "value")

Defined Under Namespace

Classes: JsonQuery