Delete Trajectory

Description: Delete a trajectoryv/ a datasets
URI: /datasets/trajectory/<name>?tid=<tid>
httpmethod: DELETE

Code

@app.route('/datasets/trajectory/<string:name>', methods=['DELETE'])
def deleteTrajectory(name):
    args = request.args
    if 'tid' in request.args:
        tid = args['tid']
        query = "DELETE FROM " + name +" WHERE tid=" + tid + ";"
        conn.query(query)
        return "Delete trajectory  :" + tid
    else:
        query = "DROP TABLE " + name + ";"
        conn.query(query)
        return "Delete dataset : " + name

results matching ""

    No results matching ""