| Class | URI::PgSQL |
| In: |
lib/uri/pgsql.rb
|
| Parent: | GenericEx |
| SCHEME | = | 'pgsql'.freeze |
| DEFAULT_HOST | = | 'localhost'.freeze |
| DEFAULT_PORT | = | 5432 |
| DEFAULT_QUERY | = | ''.freeze |
| COMPONENT | = | [ :scheme, :userinfo, :host, :path, :query |
# File lib/uri/pgsql.rb, line 24 def mk_connection_opts opts = [] opts << '-h' << @host opts << '-p' << @port if @port != DEFAULT_PORT opts << '-U' << @user if @user opts end
# File lib/uri/pgsql.rb, line 33 def mk_dump_opts ( out=nil ) opts = %w[ -F c -Z 9 -C ] opts << '-f' << out if out base, table = pathname.split base, table = base.to_s, table.to_s if base =~ /[\.\/]/ opts << table else if base =~ /\// raise ArgumentError, "Use database/table not #{pathname}" end opts << '-t' << table << base end opts end