Module: Timescaledb::Database::Quoting
- Included in:
- Timescaledb::Database
- Defined in:
- lib/timescaledb/database/quoting.rb
Instance Method Summary collapse
-
#quote(value) ⇒ String
Quotes given value and escapes single quote and backslash characters.
Instance Method Details
#quote(value) ⇒ String
Quotes given value and escapes single quote and backslash characters.
7 8 9 |
# File 'lib/timescaledb/database/quoting.rb', line 7 def quote(value) "'#{value.gsub("\\", '\&\&').gsub("'", "''")}'" end |