Commit d4e81d68 authored by Inkhey's avatar Inkhey

drop view function

parent 79d555d1
......@@ -224,9 +224,19 @@ class sqlGit(object):
c.execute('DROP TABLE ' + table + ' ;')
self.conn.commit()
def dropView(self):
''' drop current view'''
c = self.conn.cursor()
listTable = ('nodes','edges')
for table in listTable:
c.execute('DROP VIEW ' + table + ' ;')
self.conn.commit()
# autotest
if __name__ == '__main__':
db = sqlGit('self.db')
db.clean_DB()
#db.clean_DB()
#db.dropView()
db.create_table()
db.insert_all('.', 0)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment