Sha256: 353d8e44d27c53c0d0039f220d3a049dd0ed72ae387a12642ddd8feedf34403a

Contents?: true

Size: 577 Bytes

Versions: 4

Compression:

Stored size: 577 Bytes

Contents

module Swift
  module DB
    class Mysql < Adapter
      def initialize options = {}
        super options.update(driver: 'mysql')
      end

      def returning?
        false
      end
    end # Mysql

    class Postgres < Adapter
      def initialize options = {}
        super options.update(driver: 'postgresql')
      end

      def returning?
        true
      end

      def field_definition attribute
        case attribute
          when Type::IO then '%s bytea' % attribute.field
          else super
        end
      end
    end # Postgres
  end # DB
end # Swift

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
swift-0.6.1 lib/swift/db.rb
swift-0.6.0 lib/swift/db.rb
swift-0.5.1 lib/swift/db.rb
swift-0.5.0 lib/swift/db.rb