Module: JsonbOperations::ActiveRecord::WhereChain
- Includes:
- Kernel
- Defined in:
- lib/jsonb_operations/active_record/where_chain.rb
Overview
typed: strict frozen_string_literal: true
Instance Method Summary collapse
-
#contained_by(*args, **kwargs) ⇒ Object
: (*untyped, **untyped) -> untyped.
-
#contains(*args, **kwargs) ⇒ Object
: (*untyped, **untyped) -> untyped.
-
#contains_all_keys(*args, **kwargs) ⇒ Object
: (*untyped, **untyped) -> untyped.
-
#contains_any_key(*args, **kwargs) ⇒ Object
: (*untyped, **untyped) -> untyped.
-
#contains_key(*args, **kwargs) ⇒ Object
: (*untyped, **untyped) -> untyped.
-
#json_element(*args, **kwargs) ⇒ Object
: (*untyped, **untyped) -> JsonbOperations::ActiveRecord::JsonbExpression.
-
#json_element_text(*args, **kwargs) ⇒ Object
: (*untyped, **untyped) -> JsonbOperations::ActiveRecord::JsonbExpression.
-
#json_field(*args, **kwargs) ⇒ Object
: (*untyped, **untyped) -> JsonbOperations::ActiveRecord::JsonbExpression.
-
#json_field_text(*args, **kwargs) ⇒ Object
: (*untyped, **untyped) -> JsonbOperations::ActiveRecord::JsonbExpression.
-
#json_path(*args, **kwargs) ⇒ Object
: (*untyped, **untyped) -> JsonbOperations::ActiveRecord::JsonbExpression.
-
#json_path_text(*args, **kwargs) ⇒ Object
: (*untyped, **untyped) -> JsonbOperations::ActiveRecord::JsonbExpression.
-
#path_exists(*args, **kwargs) ⇒ Object
: (*untyped, **untyped) -> untyped.
-
#path_match(*args, **kwargs) ⇒ Object
: (*untyped, **untyped) -> untyped.
Instance Method Details
#contained_by(*args, **kwargs) ⇒ Object
: (*untyped, **untyped) -> untyped
13 14 15 |
# File 'lib/jsonb_operations/active_record/where_chain.rb', line 13 def contained_by(*args, **kwargs) apply_jsonb_predicate(args, kwargs, single: true) { |attr, rhs| attr.contained_by(rhs) } end |
#contains(*args, **kwargs) ⇒ Object
: (*untyped, **untyped) -> untyped
8 9 10 |
# File 'lib/jsonb_operations/active_record/where_chain.rb', line 8 def contains(*args, **kwargs) apply_jsonb_predicate(args, kwargs, single: true) { |attr, rhs| attr.contains(rhs) } end |
#contains_all_keys(*args, **kwargs) ⇒ Object
: (*untyped, **untyped) -> untyped
30 31 32 |
# File 'lib/jsonb_operations/active_record/where_chain.rb', line 30 def contains_all_keys(*args, **kwargs) apply_jsonb_predicate(args, kwargs, single: false) { |attr, rhs| attr.contains_all_keys(*rhs) } end |
#contains_any_key(*args, **kwargs) ⇒ Object
: (*untyped, **untyped) -> untyped
25 26 27 |
# File 'lib/jsonb_operations/active_record/where_chain.rb', line 25 def contains_any_key(*args, **kwargs) apply_jsonb_predicate(args, kwargs, single: false) { |attr, rhs| attr.contains_any_key(*rhs) } end |
#contains_key(*args, **kwargs) ⇒ Object
: (*untyped, **untyped) -> untyped
20 21 22 |
# File 'lib/jsonb_operations/active_record/where_chain.rb', line 20 def contains_key(*args, **kwargs) apply_jsonb_predicate(args, kwargs, single: true) { |attr, rhs| attr.contains_key(rhs) } end |
#json_element(*args, **kwargs) ⇒ Object
: (*untyped, **untyped) -> JsonbOperations::ActiveRecord::JsonbExpression
47 48 49 |
# File 'lib/jsonb_operations/active_record/where_chain.rb', line 47 def json_element(*args, **kwargs) build_jsonb_expression(args, kwargs, single: true) { |attr, rhs| attr.json_element(rhs) } end |
#json_element_text(*args, **kwargs) ⇒ Object
: (*untyped, **untyped) -> JsonbOperations::ActiveRecord::JsonbExpression
57 58 59 |
# File 'lib/jsonb_operations/active_record/where_chain.rb', line 57 def json_element_text(*args, **kwargs) build_jsonb_expression(args, kwargs, single: true) { |attr, rhs| attr.json_element_text(rhs) } end |
#json_field(*args, **kwargs) ⇒ Object
: (*untyped, **untyped) -> JsonbOperations::ActiveRecord::JsonbExpression
52 53 54 |
# File 'lib/jsonb_operations/active_record/where_chain.rb', line 52 def json_field(*args, **kwargs) build_jsonb_expression(args, kwargs, single: true) { |attr, rhs| attr.json_field(rhs) } end |
#json_field_text(*args, **kwargs) ⇒ Object
: (*untyped, **untyped) -> JsonbOperations::ActiveRecord::JsonbExpression
62 63 64 |
# File 'lib/jsonb_operations/active_record/where_chain.rb', line 62 def json_field_text(*args, **kwargs) build_jsonb_expression(args, kwargs, single: true) { |attr, rhs| attr.json_field_text(rhs) } end |
#json_path(*args, **kwargs) ⇒ Object
: (*untyped, **untyped) -> JsonbOperations::ActiveRecord::JsonbExpression
67 68 69 |
# File 'lib/jsonb_operations/active_record/where_chain.rb', line 67 def json_path(*args, **kwargs) build_jsonb_expression(args, kwargs, single: false) { |attr, rhs| attr.json_path(*rhs) } end |
#json_path_text(*args, **kwargs) ⇒ Object
: (*untyped, **untyped) -> JsonbOperations::ActiveRecord::JsonbExpression
72 73 74 |
# File 'lib/jsonb_operations/active_record/where_chain.rb', line 72 def json_path_text(*args, **kwargs) build_jsonb_expression(args, kwargs, single: false) { |attr, rhs| attr.json_path_text(*rhs) } end |
#path_exists(*args, **kwargs) ⇒ Object
: (*untyped, **untyped) -> untyped
35 36 37 |
# File 'lib/jsonb_operations/active_record/where_chain.rb', line 35 def path_exists(*args, **kwargs) apply_jsonb_predicate(args, kwargs, single: true) { |attr, rhs| attr.path_exists(rhs) } end |
#path_match(*args, **kwargs) ⇒ Object
: (*untyped, **untyped) -> untyped
40 41 42 |
# File 'lib/jsonb_operations/active_record/where_chain.rb', line 40 def path_match(*args, **kwargs) apply_jsonb_predicate(args, kwargs, single: true) { |attr, rhs| attr.path_match(rhs) } end |