         else
           if @time
             result = time 'Execution Time', =>
-              @client.query.sync(@client, query, params)
+              if target == "pg"
+                @client.query.sync(@client, query, params)
+              else
+                affqis.aql @connections[target], query
         @emit 'queryFinish', i, query
         console.log()
       @emit 'stepFinish', queries, view

          @client = pg.createClient host, port, db, user, pass
          @client
      else
        @connections[db] = affqisConnect(db, @config.affqis)

  # Private: Setup the {Quest::adventure} function.
  #

  # or file passed. This object will have a `rows` property.
  sql: (queries, view, cb) ->
    split = true
    target = @databases[0]
    if view instanceof Function
      cb = view
      view = null
    if typeof(queries) != 'string'
      split = queries.split if queries.split?
      db = queries.db if queries.db?
      params = queries.params
      if queries.file
        if queries.file == path.resolve(queries.file)
