Sha256: aed680af2b8cb1dd1d2fd3b154edf89e0ee1cfc805fece8fbcc0d9b38048d75b

Contents?: true

Size: 1.42 KB

Versions: 48

Compression:

Stored size: 1.42 KB

Contents

module Bmg
  module Sql
    module WithExp
      include Expr
      extend Forwardable

      WITH = "WITH".freeze

      def with_exp?
        true
      end

      def with_spec
        self[1]
      end

      def select_exp
        last
      end
      def_delegators :select_exp, :select_list,
                                  :where_clause,
                                  :predicate,
                                  :from_clause,
                                  :table_spec,
                                  :group_by_clause,
                                  :order_by_clause,
                                  :limit_clause,
                                  :offset_clause,
                                  :desaliaser,
                                  :to_attr_list,
                                  :to_ordering,
                                  :all?,
                                  :distinct?,
                                  :set_operator?,
                                  :limit_or_offset?,
                                  :join?,
                                  :should_be_reused?,
                                  :is_table_dee?

    # to_xxx

      def to_sql(buffer, dialect)
        buffer << WITH << SPACE
        self[1].to_sql(buffer, dialect)
        buffer << SPACE
        self[2].to_sql(buffer, dialect, false)
        buffer
      end

    end # module WithExp
  end # module Sql
end # module Bmg

Version data entries

48 entries across 48 versions & 1 rubygems

Version Path
bmg-0.23.3 lib/bmg/sql/nodes/with_exp.rb
bmg-0.23.2 lib/bmg/sql/nodes/with_exp.rb
bmg-0.23.1 lib/bmg/sql/nodes/with_exp.rb
bmg-0.23.0 lib/bmg/sql/nodes/with_exp.rb
bmg-0.21.5 lib/bmg/sql/nodes/with_exp.rb
bmg-0.21.4 lib/bmg/sql/nodes/with_exp.rb
bmg-0.20.5 lib/bmg/sql/nodes/with_exp.rb
bmg-0.19.3 lib/bmg/sql/nodes/with_exp.rb
bmg-0.21.3 lib/bmg/sql/nodes/with_exp.rb
bmg-0.21.2 lib/bmg/sql/nodes/with_exp.rb
bmg-0.21.0 lib/bmg/sql/nodes/with_exp.rb
bmg-0.20.4 lib/bmg/sql/nodes/with_exp.rb
bmg-0.20.2 lib/bmg/sql/nodes/with_exp.rb
bmg-0.20.1 lib/bmg/sql/nodes/with_exp.rb
bmg-0.20.0 lib/bmg/sql/nodes/with_exp.rb
bmg-0.19.2 lib/bmg/sql/nodes/with_exp.rb
bmg-0.19.1 lib/bmg/sql/nodes/with_exp.rb
bmg-0.19.0 lib/bmg/sql/nodes/with_exp.rb
bmg-0.18.15 lib/bmg/sql/nodes/with_exp.rb
bmg-0.18.14 lib/bmg/sql/nodes/with_exp.rb