def _run_cmd(self, command):
if self.throttle:<EOL><INDENT>tables = self.engine.describe_all(False)<EOL>limiter = self.throttle.get_limiter(tables)<EOL><DEDENT>else:<EOL><INDENT>limiter = None<EOL><DEDENT>self.engine.rate_limit = limiter<EOL>results = self.engine.execute(command)<EOL>if results is None:<EOL><INDENT>pass<EOL><DEDENT>elif isinstance(results, basestring):<EOL><INDENT>print(results)<EOL><DEDENT>else:<EOL><INDENT>with self.display() as ostream:<EOL><INDENT>formatter = FORMATTERS[self.conf["<STR_LIT>"]](<EOL>results,<EOL>ostream,<EOL>pagesize=self.conf["<STR_LIT>"],<EOL>width=self.conf["<STR_LIT:width>"],<EOL>)<EOL>formatter.display()<EOL><DEDENT><DEDENT>print_count = <NUM_LIT:0><EOL>total = None<EOL>for (cmd_fragment, capacity) in self.engine.consumed_capacities:<EOL><INDENT>total += capacity<EOL>print(cmd_fragment)<EOL>print(indent(str(capacity)))<EOL>print_count += <NUM_LIT:1><EOL><DEDENT>if print_count > <NUM_LIT:1>:<EOL><INDENT>print("<STR_LIT>")<EOL>print(indent(str(total)))<EOL><DEDENT>
Run a DQL command