Class: Sequel::SQL::Blob

Inherits:
String show all
Defined in:
lib/sequel/sql.rb,
lib/sequel/deprecated.rb

Overview

Blob is used to represent binary data in the Ruby environment that is stored as a blob type in the database. In PostgreSQL, the blob type is called bytea. Sequel represents binary data as a Blob object because certain database engines, such as PostgreSQL, require binary data to be escaped.

Instance Method Summary collapse

Methods inherited from String

#blank?, #camelize, #classify, #constantize, #dasherize, #demodulize, #foreign_key, #humanize, inflections, #lit, #pluralize, #singularize, #tableize, #titleize, #to_date, #to_datetime, #to_sequel_time, #to_time, #underscore

Methods included from CastMethods

#cast, #cast_as, #cast_numeric, #cast_string

Methods included from AliasMethods

#as

Instance Method Details

#to_blob(*args) ⇒ Object



237
238
239
240
# File 'lib/sequel/deprecated.rb', line 237

def to_blob(*args)
  Sequel::Deprecation.deprecate('Sequel::SQL::Blob#to_blob', 'Use Sequel::SQL::Blob#to_sequel_blob')
  to_sequel_blob(*args)
end

#to_sequel_blobObject

Returns self



407
408
409
# File 'lib/sequel/sql.rb', line 407

def to_sequel_blob
  self
end