Sha256: 1e64115410df266fc43ee4319be0b028be0ef3e366381ff7e53acb0b95b9daff

Contents?: true

Size: 998 Bytes

Versions: 3

Compression:

Stored size: 998 Bytes

Contents

grammar SQLSelect
  include SQLRowSupport

  include SQLSelectClause
  include SQLFromClause
  include SQLWhereCondition
  include SQLOrderByClause
  include SQLLimit
  include SQLHelpers

  rule select_expression
    select
    from 
    where_tree
    limit_condition_or_empty
    order_by_condition_or_empty
    {
      def eval
        SelectExpression.new({
          :string => self.text_value,

          :select => select.eval,
          :from   => from.eval,
          :where  => where_tree.where_condition_or_empty.eval,
          :limit  => limit_condition_or_empty.eval,
          :order_by => order_by_condition_or_empty.eval
        })
      end
      
      def query_type
        :select
      end
      
      def tree
        {
          :select => select.columns,
          :from   => from.tables,
          :where  => where_tree.eval,
          :limit  => limit_condition_or_empty.eval,
          :order_by => order_by_condition_or_empty.eval
        }
      end
    }
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
hipster_sql_to_hbase-0.2.0 lib/sql_parser/sql_select.treetop
hipster_sql_to_hbase-0.1.85 lib/sql_parser/sql_select.treetop
hipster_sql_to_hbase-0.1.8 lib/sql_parser/sql_select.treetop