parameters: (self, db)
docstring: Test if DB connection is not readonly and doesn't fall off
docstring_summary: Test if DB connection is not readonly and doesn't fall off
docstring_tokens: Test if DB connection is not readonly and doesn t fall off
function: def is_db_ok(self, db):
          """"Test if DB connection is not readonly and doesn't fall off"""
          try: 
              db.execute('CREATE TABLE IF NOT EXISTS test_table (id);')
              db.execute('DROP TABLE IF EXISTS test_table;')
              db.commit()
              return True
          except:
              return False
function_tokens: def is_db_ok ( self , db ) : try : db . execute ( 'CREATE TABLE IF NOT EXISTS test_table (id);' ) db . execute ( 'DROP TABLE IF EXISTS test_table;' ) db . commit ( ) return True except : return False