@Override
	public boolean executeScript(Path path) {
		// if the connection does not exist, fail
		if (conn == null)
			return false;

		File file = path.toFile();
		InputStream in;
		try {
			in = new FileInputStream(file);
		} catch (FileNotFoundException e) {
			console.printf("failed: %s\n", e.getMessage());
			return false;
		}
		ScriptReader reader = new ScriptReader(new InputStreamReader(in));
		reader.setSkipQuerySeparator(true);
		reader.setSkipLeadingNewline(true);
		reader.setSkipLeadingWhitespace(true);
		String query = "";
		try {
			while (reader.parseNextQuery()) {
				query = reader.getQuery();

				// skip empty queries
				if (query.isEmpty())
					continue;

				// console.printf("%s\n", query);
				
				// I guess this is pretty inefficient but I don't care for now
				// Optimized code using batches and buffers and cookies is just
				// so much more effort
				Statement stmt = conn.createStatement();
				stmt.execute(query);
				stmt.close();
			}
			return true;
		} catch (IOException e) {
			e.printStackTrace();
			console.printf("failed: %s\n", e.getMessage());
			return false;
		} catch (SQLException e) {
			e.printStackTrace();
			console.printf("Query \"%s\" failed: %s\n", query, e.getMessage());
			return false;
		}
	}