Sha256: 25fa0e27c280d157011cf35d884a7b037a531b0038dc80b4c1b2aec8c04e6710

Contents?: true

Size: 600 Bytes

Versions: 15

Compression:

Stored size: 600 Bytes

Contents

class Upsert
  # @private
  class Connection
    attr_reader :controller
    attr_reader :metal

    def initialize(controller, metal)
      @controller = controller
      @metal = metal
    end

    def convert_binary(bind_values)
      bind_values.map do |v|
        case v
        when Upsert::Binary
          binary v
        else
          v
        end
      end
    end

    def bind_value(v)
      case v
      when Time, DateTime
        Upsert.utc_iso8601 v
      when Date
        v.strftime ISO8601_DATE
      when Symbol
        v.to_s
      else
        v
      end
    end

  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
upsert-2.9.10-java lib/upsert/connection.rb
upsert-2.9.10 lib/upsert/connection.rb
upsert-2.9.9-universal-java-11 lib/upsert/connection.rb
upsert-2.9.9 lib/upsert/connection.rb
upsert-2.2.1 lib/upsert/connection.rb
upsert-2.2.0 lib/upsert/connection.rb
upsert-2.1.2 lib/upsert/connection.rb
upsert-2.1.1 lib/upsert/connection.rb
upsert-2.1.0 lib/upsert/connection.rb
upsert-2.0.4 lib/upsert/connection.rb
upsert-2.0.3 lib/upsert/connection.rb
upsert-2.0.2 lib/upsert/connection.rb
upsert-2.0.1 lib/upsert/connection.rb
upsert-2.0.0 lib/upsert/connection.rb
upsert-1.2.0 lib/upsert/connection.rb