pymensago/workspace.py
def remove_from_db(self) -> RetVal:
		'''
		Removes ALL DATA associated with a workspace. Don't call this unless you mean to erase
		all evidence that a particular workspace ever existed.
		'''
		cursor = self.db.cursor()
		cursor.execute("SELECT wid FROM workspaces WHERE wid=? AND domain=?", (self.wid,self.domain))
		results = cursor.fetchone()
		if not results or not results[0]:
			return RetVal(ErrNotFound, "%s/%s" % (self.wid, self.domain))
		
		address = '/'.join([self.wid,self.domain])
		cursor.execute("DELETE FROM workspaces WHERE wid=? AND domain=?", (self.wid,self.domain))
		cursor.execute("DELETE FROM folders WHERE address=?", (address,))
		cursor.execute("DELETE FROM sessions WHERE address=?", (address,))
		cursor.execute("DELETE FROM keys WHERE address=?", (address,))
		cursor.execute("DELETE FROM messages WHERE address=?", (address,))
		cursor.execute("DELETE FROM notes WHERE address=?", (address,))
		self.db.commit()
		return RetVal()

		Removes ALL DATA associated with a workspace. Don't call this unless you mean to erase
		all evidence that a particular workspace ever existed.
		
Removes ALL DATA associated with a workspace. Don't call this unless you mean to erase
all evidence that a particular workspace ever existed.
Removes ALL DATA associated with a workspace . Don ' t call this unless you mean to erase all evidence that a particular workspace ever existed .
def remove_from_db(self) -> RetVal:
		cursor = self.db.cursor()
		cursor.execute("SELECT wid FROM workspaces WHERE wid=? AND domain=?", (self.wid,self.domain))
		results = cursor.fetchone()
		if not results or not results[0]:
			return RetVal(ErrNotFound, "%s/%s" % (self.wid, self.domain))
		address = '/'.join([self.wid,self.domain])
		cursor.execute("DELETE FROM workspaces WHERE wid=? AND domain=?", (self.wid,self.domain))
		cursor.execute("DELETE FROM folders WHERE address=?", (address,))
		cursor.execute("DELETE FROM sessions WHERE address=?", (address,))
		cursor.execute("DELETE FROM keys WHERE address=?", (address,))
		cursor.execute("DELETE FROM messages WHERE address=?", (address,))
		cursor.execute("DELETE FROM notes WHERE address=?", (address,))
		self.db.commit()
		return RetVal()
def remove_from_db ( self ) -> RetVal : cursor = self . db . cursor ( ) cursor . execute ( "SELECT wid FROM workspaces WHERE wid=? AND domain=?" , ( self . wid , self . domain ) ) results = cursor . fetchone ( ) if not results or not results [ 0 ] : return RetVal ( ErrNotFound , "%s/%s" % ( self . wid , self . domain ) ) address = '/' . join ( [ self . wid , self . domain ] ) cursor . execute ( "DELETE FROM workspaces WHERE wid=? AND domain=?" , ( self . wid , self . domain ) ) cursor . execute ( "DELETE FROM folders WHERE address=?" , ( address , ) ) cursor . execute ( "DELETE FROM sessions WHERE address=?" , ( address , ) ) cursor . execute ( "DELETE FROM keys WHERE address=?" , ( address , ) ) cursor . execute ( "DELETE FROM messages WHERE address=?" , ( address , ) ) cursor . execute ( "DELETE FROM notes WHERE address=?" , ( address , ) ) self . db . commit ( ) return RetVal ( )
Removes ALL DATA associated with a workspace.
Removes ALL DATA associated with a workspace .
'''
		Removes ALL DATA associated with a workspace. Don't call this unless you mean to erase
		all evidence that a particular workspace ever existed.
		'''
self