Ejemplo n.º 1
0
def run():
    msg = request.args.get("data", "")
    cur = unquote(msg)
    result = parser.parse(cur, lexer=lexer)
    data = execute_main(result, lexer, spark, datadir)
    print(data)
    return jsonify(data)
Ejemplo n.º 2
0
def runscript():
    script = request.args.get("data", "")
    if script:
        cur = unquote(script)
        result = parser.parse(cur, lexer=lexer)
        data = execute_main(result, lexer, spark, datadir)
        print(data)
        return jsonify(data)
    else:
        return jsonify(list(str({"data": "Invalid Input"})))
Ejemplo n.º 3
0
def client_msg(msg):
    cur = unquote(msg["data"])
    result = parser.parse(cur, lexer=lexer)
    from execute.main import execute_main
    datat_response = execute_main(result, lexer, spark)
    emit('server_response', {'data': datat_response})
Ejemplo n.º 4
0
def exec_sql(sql):
    res = parser.parse(sql, lexer=lex)
    from execute.main import execute_main
    execute_main(res)
Ejemplo n.º 5
0
user_dict = UserDict(USER_PATH)


def login():
    username = raw_input('Enter username: '******'Enter password: '******';' not in command:
            command += " " + raw_input()

        result = parser.parse(command, lexer=lex)
        if not result: continue
        if result.type == "EXIT": break

        # print "OK"
        execute_main(result)
Ejemplo n.º 6
0
def exec_sql(sql, spark):
    res = parser.parse(sql, lexer=lexer)
    from execute.main import execute_main
    execute_main(res, lexer, spark)
Ejemplo n.º 7
0
from handler.user_dict import UserDict

user_dict = UserDict(USER_PATH)


def login():
    username = raw_input('Enter username: '******'Enter password: '******';' not in command:
            command += " " + raw_input()

        result = parser.parse(command, lexer=lex)
        if not result: continue
        if result.type == "EXIT": break

        # print "OK"
        execute_main(result)
Ejemplo n.º 8
0
def exec_sql(sql):
    res = parser.parse(sql, lexer=lex)
    from execute.main import execute_main
    execute_main(res)