module Jennifer::Adapter::Quoting

Defined in:

jennifer/adapter/quoting.cr

Constant Summary

ARGUMENT_ESCAPE_STRING = "%s"
STRING_QUOTING_PATTERNS = {'\\' => "\\\\", '\'' => "''", '"' => "\\\""}

Instance Method Summary

Instance Method Detail

def escape_string(size : Int32) #

[View source]
def escape_string #

[View source]
def filter_out(arg : Array, single : Bool = true) #

[View source]
def filter_out(arg : QueryBuilder::SQLNode) #

[View source]
def filter_out(arg) #

[View source]
abstract def quote(value : String) #

Quotes the column value to help prevent -[SQL injection attacks][https://en.wikipedia.org/wiki/SQL_injection].


[View source]
def quote(value : Nil) #

[View source]
def quote(value : Bool) #

[View source]
def quote(value : Int | Float | UInt32) #

[View source]
def quote(value : Char) #

[View source]
def quote(value : Time) #

[View source]
def quote(value : Time::Span) #

[View source]
def quote(value : Slice(UInt8)) #

[View source]
def quote(value : JSON::Any) #

[View source]
def quote(value) #

[View source]
abstract def quote_identifier(identifier : String | Symbol) #

Quotes the given identifier according to the language specification to prevent overlappings with predefined keywords.


[View source]
def quote_identifiers(identifiers) #

[View source]
def quote_json_string(value : String) #

Quotes strings of JSON column value to help prevent -[SQL injection attacks][https://en.wikipedia.org/wiki/SQL_injection].


[View source]
abstract def quote_table(table : String) #

Quotes the given table name according to the language specification.

Dot inside of name is allowed to specify schema name.


[View source]