Sha256: 2efe4f80e4e362863dccb74e17d43197662c79091477f0dc587d876add4bf478

Contents?: true

Size: 301 Bytes

Versions: 19

Compression:

Stored size: 301 Bytes

Contents

module PgSerializable
  module Nodes
    class As < Base
      def initialize(scope, table_alias)
        @scope = scope
        @table_alias = table_alias
      end

      def to_sql
        "(#{@scope.respond_to?(:to_sql) ? @scope.to_sql : @scope.to_s}) #{@table_alias}"
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
pg_serializable-3.1.0 lib/pg_serializable/nodes/as.rb
pg_serializable-3.0.2 lib/pg_serializable/nodes/as.rb
pg_serializable-3.0.1 lib/pg_serializable/nodes/as.rb
pg_serializable-3.0.0 lib/pg_serializable/nodes/as.rb
pg_serializable-2.1.1 lib/pg_serializable/nodes/as.rb
pg_serializable-2.1.0 lib/pg_serializable/nodes/as.rb
pg_serializable-2.0.0 lib/pg_serializable/nodes/as.rb
pg_serializable-1.4.0 lib/pg_serializable/nodes/as.rb
pg_serializable-1.3.2 lib/pg_serializable/nodes/as.rb
pg_serializable-1.3.1 lib/pg_serializable/nodes/as.rb
pg_serializable-1.3.0 lib/pg_serializable/nodes/as.rb
pg_serializable-1.2.2 lib/pg_serializable/nodes/as.rb
pg_serializable-1.2.1 lib/pg_serializable/nodes/as.rb
pg_serializable-1.2.0 lib/pg_serializable/nodes/as.rb
pg_serializable-1.1.0 lib/pg_serializable/nodes/as.rb
pg_serializable-1.0.1 lib/pg_serializable/nodes/as.rb
pg_serializable-1.0.0 lib/pg_serializable/nodes/as.rb
pg_serializable-0.1.1 lib/pg_serializable/nodes/as.rb
pg_serializable-0.1.0 lib/pg_serializable/nodes/as.rb