Module: Groonga::ExpressionBuildable
- Included in:
- ColumnExpressionBuilder, RecordExpressionBuilder
- Defined in:
- lib/groonga/expression-builder.rb
Defined Under Namespace
Classes: AndExpressionBuilder, AndNotExpressionBuilder, BinaryExpressionBuilder, CallExpressionBuilder, ColumnValueExpressionBuilder, EqualExpressionBuilder, ExpressionBuilder, GreaterEqualExpressionBuilder, GreaterExpressionBuilder, LessEqualExpressionBuilder, LessExpressionBuilder, MatchExpressionBuilder, MatchTargetColumnExpressionBuilder, MatchTargetExpressionBuilder, MinusExpressionBuilder, ModExpressionBuilder, NotEqualExpressionBuilder, OrExpressionBuilder, PlusExpressionBuilder, PrefixSearchExpressionBuilder, RegexpExpressionBuilder, SetExpressionBuilder, SimilarSearchExpressionBuilder, SlashExpressionBuilder, StarExpressionBuilder, SubExpressionBuilder, SuffixSearchExpressionBuilder, TermExtractExpressionBuilder
Constant Summary collapse
- VALID_COLUMN_NAME_RE =
/\A[a-zA-Z\d_]+\z/
Instance Attribute Summary collapse
-
#allow_column ⇒ Object
Returns the value of attribute allow_column.
-
#allow_leading_not ⇒ Object
Returns the value of attribute allow_leading_not.
-
#allow_pragma ⇒ Object
Returns the value of attribute allow_pragma.
-
#allow_update ⇒ Object
Returns the value of attribute allow_update.
-
#default_column ⇒ Object
Returns the value of attribute default_column.
-
#query ⇒ Object
Returns the value of attribute query.
-
#syntax ⇒ Object
Returns the value of attribute syntax.
-
#table ⇒ Object
readonly
Returns the value of attribute table.
Instance Method Summary collapse
- #&(other) ⇒ Object
- #-(other) ⇒ Object
- #build(&block) ⇒ Object
- #initialize ⇒ Object
- #|(other) ⇒ Object
Instance Attribute Details
#allow_column ⇒ Object
Returns the value of attribute allow_column.
24 25 26 |
# File 'lib/groonga/expression-builder.rb', line 24 def allow_column @allow_column end |
#allow_leading_not ⇒ Object
Returns the value of attribute allow_leading_not.
26 27 28 |
# File 'lib/groonga/expression-builder.rb', line 26 def allow_leading_not @allow_leading_not end |
#allow_pragma ⇒ Object
Returns the value of attribute allow_pragma.
23 24 25 |
# File 'lib/groonga/expression-builder.rb', line 23 def allow_pragma @allow_pragma end |
#allow_update ⇒ Object
Returns the value of attribute allow_update.
25 26 27 |
# File 'lib/groonga/expression-builder.rb', line 25 def allow_update @allow_update end |
#default_column ⇒ Object
Returns the value of attribute default_column.
27 28 29 |
# File 'lib/groonga/expression-builder.rb', line 27 def default_column @default_column end |
#query ⇒ Object
Returns the value of attribute query.
21 22 23 |
# File 'lib/groonga/expression-builder.rb', line 21 def query @query end |
#syntax ⇒ Object
Returns the value of attribute syntax.
22 23 24 |
# File 'lib/groonga/expression-builder.rb', line 22 def syntax @syntax end |
#table ⇒ Object (readonly)
Returns the value of attribute table.
20 21 22 |
# File 'lib/groonga/expression-builder.rb', line 20 def table @table end |
Instance Method Details
#&(other) ⇒ Object
49 50 51 |
# File 'lib/groonga/expression-builder.rb', line 49 def &(other) other end |
#-(other) ⇒ Object
57 58 59 |
# File 'lib/groonga/expression-builder.rb', line 57 def -(other) other end |
#build(&block) ⇒ Object
43 44 45 46 47 |
# File 'lib/groonga/expression-builder.rb', line 43 def build(&block) expression = Expression.new(:name => @name, :context => @table.context) variable = expression.define_variable(:domain => @table) build_expression(expression, variable, &block) end |
#initialize ⇒ Object
31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/groonga/expression-builder.rb', line 31 def initialize @table = nil @name = nil @query = nil @syntax = nil @allow_pragma = nil @allow_column = nil @allow_update = nil @allow_leading_not = nil @default_column = nil end |
#|(other) ⇒ Object
53 54 55 |
# File 'lib/groonga/expression-builder.rb', line 53 def |(other) other end |