Sha256: 09d8f3c5e8a8368426960dc59ab90dd556a3aa448c5ac21a3eaf7a74cd86af01

Contents?: true

Size: 402 Bytes

Versions: 7

Compression:

Stored size: 402 Bytes

Contents

class Upsert
  class Connection
    # @private
    module Sqlite3
      def bind_value(v)
        case v
        when BigDecimal
          v.to_s('F')
        when TrueClass
          't'
        when FalseClass
          'f'
        when Time, DateTime
          Upsert.utc_iso8601 v
        when Date
          v.strftime ISO8601_DATE
        else
          v
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
upsert-1.1.7 lib/upsert/connection/sqlite3.rb
upsert-1.1.6 lib/upsert/connection/sqlite3.rb
upsert-1.1.5 lib/upsert/connection/sqlite3.rb
upsert-1.1.4 lib/upsert/connection/sqlite3.rb
upsert-1.1.3 lib/upsert/connection/sqlite3.rb
upsert-1.1.1 lib/upsert/connection/sqlite3.rb
upsert-1.1.0 lib/upsert/connection/sqlite3.rb