Class: Groonga::RecordExpressionBuilder
- Inherits:
-
Object
- Object
- Groonga::RecordExpressionBuilder
- Includes:
- ExpressionBuildable
- Defined in:
- lib/groonga/expression-builder.rb
Overview
:nodoc:
Instance Attribute Summary
Attributes included from ExpressionBuildable
#allow_column, #allow_pragma, #allow_update, #default_column, #query, #syntax, #table
Instance Method Summary collapse
- #[](name) ⇒ Object
-
#initialize(table, name) ⇒ RecordExpressionBuilder
constructor
A new instance of RecordExpressionBuilder.
- #match(query, options_or_default_column = {}) ⇒ Object
Methods included from ExpressionBuildable
Constructor Details
#initialize(table, name) ⇒ RecordExpressionBuilder
Returns a new instance of RecordExpressionBuilder.
198 199 200 201 202 |
# File 'lib/groonga/expression-builder.rb', line 198 def initialize(table, name) super() @table = table @name = name end |
Instance Method Details
#[](name) ⇒ Object
204 205 206 207 208 209 210 211 212 213 214 |
# File 'lib/groonga/expression-builder.rb', line 204 def [](name) column = @table.column(name) if column.nil? = "unknown column <#{name.inspect}> " + "for table <#{@table.inspect}>" raise ArgumentError, end ColumnExpressionBuilder.new(column, nil, nil, :table => @table, :column_name => name) end |
#match(query, options_or_default_column = {}) ⇒ Object
216 217 218 219 220 221 222 223 224 225 |
# File 'lib/groonga/expression-builder.rb', line 216 def match(query, ={}) if .is_a?(String) = {:default_column => } else = end = .dup [:syntax] ||= :query SubExpressionBuilder.new(query, ) end |