Class: Groonga::ColumnExpressionBuilder
- Inherits:
-
Object
- Object
- Groonga::ColumnExpressionBuilder
show all
- Includes:
- ExpressionBuildable
- Defined in:
- lib/groonga/expression-builder.rb,
lib/groonga/expression-builder-19.rb
Constant Summary
ExpressionBuildable::VALID_COLUMN_NAME_RE
Instance Attribute Summary
#allow_column, #allow_leading_not, #allow_pragma, #allow_update, #default_column, #query, #syntax, #table
Instance Method Summary
collapse
#&, #build, #|
Constructor Details
#initialize(column, name, query, options = {}) ⇒ ColumnExpressionBuilder
Returns a new instance of ColumnExpressionBuilder.
547
548
549
550
551
552
553
554
555
|
# File 'lib/groonga/expression-builder.rb', line 547
def initialize(column, name, query, options={})
super()
@table = options[:table] || column.table
@default_column = column
@column_name = options[:column_name] || @default_column.local_name
@range = @default_column.range
@name = name
@query = query
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &block) ⇒ Object
621
622
623
624
625
626
627
628
629
|
# File 'lib/groonga/expression-builder.rb', line 621
def method_missing(name, *args, &block)
return super if block
return super unless args.empty?
if VALID_COLUMN_NAME_RE =~ name.to_s
column_expression_builder.send(name)
else
super
end
end
|
Instance Method Details
#!=(other) ⇒ Object
36
37
38
|
# File 'lib/groonga/expression-builder-19.rb', line 36
def !=(other)
column_value_builder != other
end
|
597
598
599
|
# File 'lib/groonga/expression-builder.rb', line 597
def %(other)
column_expression_builder % other
end
|
589
590
591
|
# File 'lib/groonga/expression-builder.rb', line 589
def *(other)
column_expression_builder * other
end
|
581
582
583
|
# File 'lib/groonga/expression-builder.rb', line 581
def +(other)
column_expression_builder + other
end
|
585
586
587
|
# File 'lib/groonga/expression-builder.rb', line 585
def -(other)
column_expression_builder - other
end
|
593
594
595
|
# File 'lib/groonga/expression-builder.rb', line 593
def /(other)
column_expression_builder / other
end
|
565
566
567
|
# File 'lib/groonga/expression-builder.rb', line 565
def <(other)
column_expression_builder < other
end
|
#<=(other) ⇒ Object
569
570
571
|
# File 'lib/groonga/expression-builder.rb', line 569
def <=(other)
column_expression_builder <= other
end
|
#==(other) ⇒ Object
557
558
559
|
# File 'lib/groonga/expression-builder.rb', line 557
def ==(other)
column_expression_builder == other
end
|
#=~(other) ⇒ Object
561
562
563
|
# File 'lib/groonga/expression-builder.rb', line 561
def =~(other)
column_expression_builder =~ other
end
|
573
574
575
|
# File 'lib/groonga/expression-builder.rb', line 573
def >(other)
column_expression_builder > other
end
|
#>=(other) ⇒ Object
577
578
579
|
# File 'lib/groonga/expression-builder.rb', line 577
def >=(other)
column_expression_builder >= other
end
|
#match(query, options = {}, &block) ⇒ Object
601
602
603
|
# File 'lib/groonga/expression-builder.rb', line 601
def match(query, options={}, &block)
column_expression_builder.match(query, options, &block)
end
|
#similar_search(text) ⇒ Object
605
606
607
|
# File 'lib/groonga/expression-builder.rb', line 605
def similar_search(text)
column_expression_builder.similar_search(text)
end
|
609
610
611
|
# File 'lib/groonga/expression-builder.rb', line 609
def (text)
column_expression_builder.(text)
end
|