class Sequel::LiteralString

LiteralString is used to represent literal SQL expressions. A LiteralString is copied verbatim into an SQL statement. Instances of LiteralString can be created by calling Sequel.lit.

Public Instance Methods

inspect() click to toggle source

Show that the current string is a literal string in addition to the output.

     # File lib/sequel/sql.rb
2015 def inspect
2016   "#<#{self.class} #{super}>"
2017 end
lit(*args) click to toggle source

Return self if no args are given, otherwise return a SQL::PlaceholderLiteralString with the current string and the given args.

     # File lib/sequel/sql.rb
2021 def lit(*args)
2022   args.empty? ? self : SQL::PlaceholderLiteralString.new(self, args)
2023 end
to_sequel_blob() click to toggle source

Convert a literal string to a SQL::Blob.

     # File lib/sequel/sql.rb
2026 def to_sequel_blob
2027   SQL::Blob.new(self)
2028 end