Esempio n. 1
0
 def delete(self, name):
     '''
     Delete a project.
     '''
     res = Database.query_asjson("select * from li3ds.project where name=%s", (name,))
     if not res:
         nsproject.abort(404, 'Project not found')
     Database.query_aslist("delete from li3ds.project where id=%s", (name,))
     return '', 410
Esempio n. 2
0
 def delete(self, name):
     '''
     Delete a project.
     '''
     res = Database.query_asjson("select * from li3ds.project where name=%s", (name,))
     if not res:
         nsproject.abort(404, 'Project not found')
     Database.query_aslist("select li3ds.delete_project(%s)", (name,))
     return '', 410
Esempio n. 3
0
 def get(self):
     '''Sensor type list'''
     return Database.query_aslist(
         '''select unnest(enum_range(enum_first(null::li3ds.sensor_type),
         null::li3ds.sensor_type))''')
Esempio n. 4
0
 def get(self):
     '''Sensor type list'''
     return Database.query_aslist(
         '''select unnest(enum_range(enum_first(null::li3ds.sensor_type),
         null::li3ds.sensor_type))'''
     )