Module: CloudSesame::Query::DSL::LiteralChainingMethods
- Included in:
- AST::MultiExpressionOperatorChildren
- Defined in:
- lib/cloud_sesame/query/dsl/literal_chaining_methods.rb
Instance Method Summary collapse
- #insert(values = []) ⇒ Object
-
#near(*values) ⇒ Object
(also: #sloppy)
NEAR =======================================.
-
#not(*values) ⇒ Object
(also: #is_not)
NOT =======================================.
-
#prefix(*values) ⇒ Object
(also: #start_with, #begin_with)
PREFIX =======================================.
Instance Method Details
#insert(values = []) ⇒ Object
34 35 36 37 38 39 40 |
# File 'lib/cloud_sesame/query/dsl/literal_chaining_methods.rb', line 34 def insert(values = []) values.each do |value| _scope << create_parents(build_literal(value)) end parents.clear unless values.empty? _return != _scope ? _return : self end |
#near(*values) ⇒ Object Also known as: sloppy
NEAR
17 18 19 20 |
# File 'lib/cloud_sesame/query/dsl/literal_chaining_methods.rb', line 17 def near(*values) parents[0] = { klass: AST::Near, options: (values) } insert values end |