Class: Groonga::ColumnExpressionBuilder
- Inherits:
-
Object
- Object
- Groonga::ColumnExpressionBuilder
show all
- Includes:
- ExpressionBuildable
- Defined in:
- lib/groonga/expression-builder.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.
623
624
625
626
627
628
629
630
631
|
# File 'lib/groonga/expression-builder.rb', line 623
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
701
702
703
704
705
706
707
708
709
|
# File 'lib/groonga/expression-builder.rb', line 701
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
637
638
639
|
# File 'lib/groonga/expression-builder.rb', line 637
def !=(other)
column_expression_builder != other
end
|
677
678
679
|
# File 'lib/groonga/expression-builder.rb', line 677
def %(other)
column_expression_builder % other
end
|
669
670
671
|
# File 'lib/groonga/expression-builder.rb', line 669
def *(other)
column_expression_builder * other
end
|
661
662
663
|
# File 'lib/groonga/expression-builder.rb', line 661
def +(other)
column_expression_builder + other
end
|
665
666
667
|
# File 'lib/groonga/expression-builder.rb', line 665
def -(other)
column_expression_builder - other
end
|
673
674
675
|
# File 'lib/groonga/expression-builder.rb', line 673
def /(other)
column_expression_builder / other
end
|
645
646
647
|
# File 'lib/groonga/expression-builder.rb', line 645
def <(other)
column_expression_builder < other
end
|
#<=(other) ⇒ Object
649
650
651
|
# File 'lib/groonga/expression-builder.rb', line 649
def <=(other)
column_expression_builder <= other
end
|
#==(other) ⇒ Object
633
634
635
|
# File 'lib/groonga/expression-builder.rb', line 633
def ==(other)
column_expression_builder == other
end
|
#=~(other) ⇒ Object
641
642
643
|
# File 'lib/groonga/expression-builder.rb', line 641
def =~(other)
column_expression_builder =~ other
end
|
653
654
655
|
# File 'lib/groonga/expression-builder.rb', line 653
def >(other)
column_expression_builder > other
end
|
#>=(other) ⇒ Object
657
658
659
|
# File 'lib/groonga/expression-builder.rb', line 657
def >=(other)
column_expression_builder >= other
end
|
#match(query, options = {}, &block) ⇒ Object
681
682
683
|
# File 'lib/groonga/expression-builder.rb', line 681
def match(query, options={}, &block)
column_expression_builder.match(query, options, &block)
end
|
#similar_search(text) ⇒ Object
685
686
687
|
# File 'lib/groonga/expression-builder.rb', line 685
def similar_search(text)
column_expression_builder.similar_search(text)
end
|
689
690
691
|
# File 'lib/groonga/expression-builder.rb', line 689
def (text)
column_expression_builder.(text)
end
|