Class: Purview::Dialects::MySQL
- Defined in:
- lib/purview/dialects/mysql.rb
Instance Method Summary collapse
- #false_value ⇒ Object
- #null_value ⇒ Object
- #quoted(value) ⇒ Object
- #sanitized(value) ⇒ Object
- #true_value ⇒ Object
Instance Method Details
#false_value ⇒ Object
4 5 6 |
# File 'lib/purview/dialects/mysql.rb', line 4 def false_value '0' end |
#null_value ⇒ Object
8 9 10 |
# File 'lib/purview/dialects/mysql.rb', line 8 def null_value 'NULL' end |
#quoted(value) ⇒ Object
12 13 14 |
# File 'lib/purview/dialects/mysql.rb', line 12 def quoted(value) value.nil? ? null_value : value.quoted end |
#sanitized(value) ⇒ Object
16 17 18 |
# File 'lib/purview/dialects/mysql.rb', line 16 def sanitized(value) value.nil? ? null_value : value.sanitized end |
#true_value ⇒ Object
20 21 22 |
# File 'lib/purview/dialects/mysql.rb', line 20 def true_value '1' end |