'query <SQL query>
Run an <SQL query> against the database.'

def do_query(self, line):

    c = self.myparseline(line)
    if (len(c[0]) < 1):
        self.edprint('Invalid    syntax.')
        return
    query = '    '.join(c[0])
    d = self.request((self.ownopts['cli.server_baseurl'] + '/query'), post={'query': query})
    if (not d):
        return
    j = json.loads(d)
    if (j[0] == 'ERROR'):
        self.edprint(('Error    running    your    query:    ' + j[1]))
        return
    self.send_output(d, line)
