Beispiel #1
0
def create_space(space_desc: SpaceDesc, sess: Session):
    def exec(stmt):
        response(sess, stmt)

    exec(space_desc.drop_stmt())
    exec(space_desc.create_stmt())
    time.sleep(3)
    exec(space_desc.use_stmt())
Beispiel #2
0
def create_space(space_desc: SpaceDesc, sess: Session):
    def exec(stmt):
        response(sess, stmt)

    stmts = [
        space_desc.drop_stmt(),
        space_desc.create_stmt(),
        space_desc.use_stmt(),
    ]

    exec(";".join(stmts))
Beispiel #3
0
def create_space(space_desc: SpaceDesc, sess: Session):
    resp_ok(sess, space_desc.drop_stmt(), True)
    resp_ok(sess, space_desc.create_stmt(), True)
    resp_ok(sess, space_desc.use_stmt(), True)