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.
545
546
547
548
549
550
551
552
553
|
# File 'lib/groonga/expression-builder.rb', line 545
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
619
620
621
622
623
624
625
626
627
|
# File 'lib/groonga/expression-builder.rb', line 619
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
|
595
596
597
|
# File 'lib/groonga/expression-builder.rb', line 595
def %(other)
column_expression_builder % other
end
|
587
588
589
|
# File 'lib/groonga/expression-builder.rb', line 587
def *(other)
column_expression_builder * other
end
|
579
580
581
|
# File 'lib/groonga/expression-builder.rb', line 579
def +(other)
column_expression_builder + other
end
|
583
584
585
|
# File 'lib/groonga/expression-builder.rb', line 583
def -(other)
column_expression_builder - other
end
|
591
592
593
|
# File 'lib/groonga/expression-builder.rb', line 591
def /(other)
column_expression_builder / other
end
|
563
564
565
|
# File 'lib/groonga/expression-builder.rb', line 563
def <(other)
column_expression_builder < other
end
|
#<=(other) ⇒ Object
567
568
569
|
# File 'lib/groonga/expression-builder.rb', line 567
def <=(other)
column_expression_builder <= other
end
|
#==(other) ⇒ Object
555
556
557
|
# File 'lib/groonga/expression-builder.rb', line 555
def ==(other)
column_expression_builder == other
end
|
#=~(other) ⇒ Object
559
560
561
|
# File 'lib/groonga/expression-builder.rb', line 559
def =~(other)
column_expression_builder =~ other
end
|
571
572
573
|
# File 'lib/groonga/expression-builder.rb', line 571
def >(other)
column_expression_builder > other
end
|
#>=(other) ⇒ Object
575
576
577
|
# File 'lib/groonga/expression-builder.rb', line 575
def >=(other)
column_expression_builder >= other
end
|
#match(query, options = {}, &block) ⇒ Object
599
600
601
|
# File 'lib/groonga/expression-builder.rb', line 599
def match(query, options={}, &block)
column_expression_builder.match(query, options, &block)
end
|
#similar_search(text) ⇒ Object
603
604
605
|
# File 'lib/groonga/expression-builder.rb', line 603
def similar_search(text)
column_expression_builder.similar_search(text)
end
|
607
608
609
|
# File 'lib/groonga/expression-builder.rb', line 607
def (text)
column_expression_builder.(text)
end
|