Class | Sequel::SQL::Blob |
In: |
lib/sequel/sql.rb
|
Parent: | ::String |
Return a string showing that this is a blob, the size, and the some or all of the content, depending on the size.
# File lib/sequel/sql.rb, line 1011 1011: def inspect 1012: size = length 1013: 1014: content = if size > 20 1015: "start=#{self[0...10].to_s.inspect} end=#{self[-10..-1].to_s.inspect}" 1016: else 1017: "content=#{super}" 1018: end 1019: 1020: "#<#{self.class}:0x#{"%x" % object_id} bytes=#{size} #{content}>" 1021: end
Return a LiteralString with the same content if no args are given, otherwise return a SQL::PlaceholderLiteralString with the current string and the given args.
# File lib/sequel/sql.rb, line 1005 1005: def lit(*args) 1006: args.empty? ? LiteralString.new(self) : SQL::PlaceholderLiteralString.new(self, args) 1007: end