Class: PG::Connection
- Inherits:
-
Object
- Object
- PG::Connection
- Defined in:
- lib/pglite/pg.rb
Class Method Summary collapse
-
.conndefaults_hash ⇒ Object
TODO: can we support some configuration?.
- .quote_ident(str) ⇒ Object
Class Method Details
.conndefaults_hash ⇒ Object
TODO: can we support some configuration?
29 |
# File 'lib/pglite/pg.rb', line 29 def conndefaults_hash = {} |
.quote_ident(str) ⇒ Object
31 32 33 34 35 36 37 38 39 |
# File 'lib/pglite/pg.rb', line 31 def quote_ident(str) str = str.to_s return '""' if str.empty? if str =~ /[^a-zA-Z_0-9]/ || str =~ /^[0-9]/ '"' + str.gsub('"', '""') + '"' else str end end |