pymensago/contactdb.py
def clear_contacts(db: sqlite3.Connection, fieldname: str, fieldvalue: str) -> RetVal:
	'''Deletes all contacts from the database.'''
	if not id.is_valid() or not fieldname or not db:
		return RetVal(ErrBadValue)
	
	cursor = db.cursor()
	cursor.execute('''DELETE FROM contactinfo WHERE contactgroup!='self' ''',
		(id.as_string(),fieldname))

	return RetVal()
Deletes all contacts from the database.
Deletes all contacts from the database.
Deletes all contacts from the database .
def clear_contacts(db: sqlite3.Connection, fieldname: str, fieldvalue: str) -> RetVal:
	if not id.is_valid() or not fieldname or not db:
		return RetVal(ErrBadValue)
	cursor = db.cursor()
	cursor.execute('''DELETE FROM contactinfo WHERE contactgroup!='self' ''',
		(id.as_string(),fieldname))
	return RetVal()
def clear_contacts ( db : sqlite3 . Connection , fieldname : str , fieldvalue : str ) -> RetVal : if not id . is_valid ( ) or not fieldname or not db : return RetVal ( ErrBadValue ) cursor = db . cursor ( ) cursor . execute ( '''DELETE FROM contactinfo WHERE contactgroup!='self' ''' , ( id . as_string ( ) , fieldname ) ) return RetVal ( )
Deletes all contacts from the database.
Deletes all contacts from the database .
'''Deletes all contacts from the database.'''
db
sqlite3.Connection
fieldname
str
fieldvalue
str