pymensago/contactdb.py
def delete_field(db: sqlite3.Connection, id: UUID, fieldname: str) -> RetVal:
	'''Deletes a field from the database. Fieldname is expected to be in dot-separated format.'''

	if not id.is_valid() or not fieldname or not db:
		return RetVal(ErrBadValue)
	
	cursor = db.cursor()
	cursor.execute('''DELETE FROM contactinfo WHERE id=? AND fieldname=?''',
		(id.as_string(),fieldname))
	db.commit()

	return RetVal()
Deletes a field from the database. Fieldname is expected to be in dot-separated format.
Deletes a field from the database. Fieldname is expected to be in dot-separated format.
Deletes a field from the database . Fieldname is expected to be in dot - separated format .
def delete_field(db: sqlite3.Connection, id: UUID, fieldname: 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 id=? AND fieldname=?''',
		(id.as_string(),fieldname))
	db.commit()
	return RetVal()
def delete_field ( db : sqlite3 . Connection , id : UUID , fieldname : 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 id=? AND fieldname=?''' , ( id . as_string ( ) , fieldname ) ) db . commit ( ) return RetVal ( )
Deletes a field from the database.
Deletes a field from the database .
'''Deletes a field from the database. Fieldname is expected to be in dot-separated format.'''
db
sqlite3.Connection
id
UUID
fieldname
str