   .catch (error) ->
     console.log "Error running queries: #{error}\nStack:\n#{error.stack}"
 
-runQueries = (config, queries) ->
+runQueries = (partialConfig, queries) ->
+  config =
+    scheme: partialConfig.scheme ? 'postgres'
+    host: partialConfig.host ? 'localhost'
+    port: partialConfig.port ? 5432
+    user: partialConfig.username ? 'postgres'
+    password: partialConfig.password ? 'postgres'
+    database: partialConfig.database ? 'postgres'
+    quiet: partialConfig.quiet ? false
+
   switch config.scheme
     when 'postgres' then runPgQueries config, queries
     when 'mysql' then runMysqlQueries config, queries


# Runs the queries against MySQL
runMysqlQueries = (config, queries) ->
  myCfg =
    host: config.host
    port: config.port


# Runs the queries against PostgreSQL
runPgQueries = (config, queries) ->
  {user, password, host, port, database}
  uri = "postgres://#{user}:#{password}@#{host}:#{port}/#{database}"
  console.log "Connecting to URI '#{uri}'"

  pgConnect uri, config
