Advertisement
Guest User

Untitled

a guest
Apr 24th, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. def run_xquery()
  2. file = ARGV.shift
  3. file_path = "../../" + file
  4. if !File.exist?(File.expand_path(file_path, __FILE__))
  5. @logger.error("Xquery script " + file + " does not exist!")
  6. else
  7. @logger.info("Running xquery script: " + file + " ... ")
  8. query_code = File.read File.expand_path(file_path, __FILE__)
  9. r = execute_query %Q{#{query_code}}, :db_name => @properties["ml.content-db"]
  10. @logger.info(r.body)
  11. @logger.info("Done running migration!")
  12. end
  13. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement