class_docstr: A Database connection.
class_docstr_tok: ["A","Database","connection","."]
docstr: Like Connection.query, but takes a filename to load a query from.
docstr_tok: ["Like","Connection.query",",","but","takes","a","filename","to","load","a","query","from","."]
code: def query_file(self, path, fetchall=False, **params):
      """Like Connection.query, but takes a filename to load a query from."""
  
      # If path doesn't exists
      if not os.path.exists(path):
          raise IOError("File '{}' not found!".format(path))
  
      # If it's a directory
      if os.path.isdir(path):
          raise IOError("'{}' is a directory!".format(path))
  
      # Read the given .sql file into memory.
      with open(path) as f:
          query = f.read()
  
      # Defer processing to self.query method.
      return self.query(query=query, fetchall=fetchall, **params)
  
imports: import os
  from sys import stdout
  from collections import OrderedDict
  from contextlib import contextmanager
  from inspect import isclass
  import tablib
  from docopt import docopt
  from sqlalchemy import create_engine, exc, inspect, text
label_desc: Use image node_id 8 for calling the Connection obj's underlying member method code with example usage: obj.query_file(path, fetchall) and returns: self