module QuantumFields::Support::Postgresql

Abstracts PostgreSQL support for quantum_fields operations

Public Class Methods

field_node(field, key) click to toggle source

Returns an Arel node in the context of given field and JSON key, which in this context constructs as “'my_json_field'->>'my_key'”

# File lib/quantum_fields/support/postgresql.rb, line 10
def field_node(field, key)
  Arel::Nodes::InfixOperation.new('->>',
                                  field,
                                  Arel::Nodes.build_quoted(key))
end