Class: Purview::Dialects::MySQL

Inherits:
Base show all
Defined in:
lib/purview/dialects/mysql.rb

Instance Method Summary collapse

Instance Method Details

#false_valueObject



4
5
6
# File 'lib/purview/dialects/mysql.rb', line 4

def false_value
  '0'
end

#null_valueObject



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_valueObject



20
21
22
# File 'lib/purview/dialects/mysql.rb', line 20

def true_value
  '1'
end