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.
Attributes
The string used when creating the literal string (first argument to Sequel::LiteralString.new). This may be nil if no string was provided, or if the litral string was created before this extension was required.
Public Class Methods
Source
# File lib/sequel/extensions/lit_require_frozen.rb 52 def initialize(*a) 53 @source = a.first 54 super 55 end
Calls superclass method
Public Instance Methods
Source
# File lib/sequel/sql.rb 2039 def inspect 2040 "#<#{self.class} #{super}>" 2041 end
Show that the current string is a literal string in addition to the output.
Source
# File lib/sequel/sql.rb 2045 def lit(*args) 2046 args.empty? ? self : SQL::PlaceholderLiteralString.new(self, args) 2047 end
Return self if no args are given, otherwise return a SQL::PlaceholderLiteralString with the current string and the given args.
Source
# File lib/sequel/sql.rb 2050 def to_sequel_blob 2051 SQL::Blob.new(self) 2052 end
Convert a literal string to a SQL::Blob.