Top Level Namespace
Defined Under Namespace
Modules: PSQL
Instance Method Summary collapse
Instance Method Details
#PSQL(command, params) ⇒ Object
17 18 19 20 21 22 23 24 25 |
# File 'lib/psql.rb', line 17 def PSQL( command, params ) cmd = Cocaine::CommandLine.new 'psql', '-tAc "%s" :dbname' % [ command ] if headers = params.delete( :headers ) CSV.parse cmd.run( params ), :headers => headers, :col_sep => '|' else cmd.run params end end |