Skip to content

Commit

Permalink
Unify internal helper method name: column_value_expression_builder
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed May 2, 2012
1 parent 5e1b1f2 commit 9bf98a0
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions lib/groonga/expression-builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ def [](name)
"for table <#{@table.inspect}>"
raise ArgumentError, message
end
column_expression_builder(column, name)
column_value_expression_builder(column, name)
end

def id
Expand Down Expand Up @@ -482,7 +482,7 @@ def index(name)
raise ArgumentError,
"different index column: <#{name}>: #{object.inspect}"
end
column_expression_builder(object, name)
column_value_expression_builder(object, name)
end

private
Expand All @@ -493,7 +493,7 @@ def build_match_target(&block)
end
end

def column_expression_builder(column, name)
def column_value_expression_builder(column, name)
ColumnValueExpressionBuilder.new(column,
:table => @table,
:column_name => name)
Expand Down Expand Up @@ -535,55 +535,55 @@ def initialize(column, name, query, options={})
end

def ==(other)
column_value_builder == other
column_value_expression_builder == other
end

def =~(other)
column_value_builder =~ other
column_value_expression_builder =~ other
end

def <(other)
column_value_builder < other
column_value_expression_builder < other
end

def <=(other)
column_value_builder <= other
column_value_expression_builder <= other
end

def >(other)
column_value_builder > other
column_value_expression_builder > other
end

def >=(other)
column_value_builder >= other
column_value_expression_builder >= other
end

def +(other)
column_value_builder + other
column_value_expression_builder + other
end

def -(other)
column_value_builder - other
column_value_expression_builder - other
end

def *(other)
column_value_builder * other
column_value_expression_builder * other
end

def /(other)
column_value_builder / other
column_value_expression_builder / other
end

def %(other)
column_value_builder % other
column_value_expression_builder % other
end

def match(query, options={}, &block)
column_value_builder.match(query, options, &block)
column_value_expression_builder.match(query, options, &block)
end

private
def column_value_builder
def column_value_expression_builder
ColumnValueExpressionBuilder.new(@default_column,
:table => @table,
:column_name => @column_name,
Expand All @@ -594,7 +594,7 @@ def method_missing(name, *args, &block)
return super if block
return super unless args.empty?
if VALID_COLUMN_NAME_RE =~ name.to_s
column_value_builder.send(name)
column_value_expression_builder.send(name)
else
super
end
Expand Down

0 comments on commit 9bf98a0

Please sign in to comment.