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

	cursor = db.cursor()
	cursor.execute('''DELETE FROM contactinfo WHERE id=? AND fieldname=?''',
		(id.as_string(),fieldname))
	cursor.execute('''INSERT INTO contactinfo (id, fieldname, fieldvalue, contactgroup) 
			VALUES(?,?,?,?)''',
			(id.as_string(), fieldname, fieldvalue, group))
	db.commit()

	return RetVal()
Saves a field to the database. Fieldname is expected to be in dot-separated format.
Saves a field to the database. Fieldname is expected to be in dot-separated format.
Saves a field to the database . Fieldname is expected to be in dot - separated format .
def save_field(db: sqlite3.Connection, id: UUID, fieldname: str, fieldvalue: str, 
	group: str) -> RetVal:
	cursor = db.cursor()
	cursor.execute('''DELETE FROM contactinfo WHERE id=? AND fieldname=?''',
		(id.as_string(),fieldname))
	cursor.execute('''INSERT INTO contactinfo (id, fieldname, fieldvalue, contactgroup) 
			VALUES(?,?,?,?)''',
			(id.as_string(), fieldname, fieldvalue, group))
	db.commit()
	return RetVal()
def save_field ( db : sqlite3 . Connection , id : UUID , fieldname : str , fieldvalue : str , group : str ) -> RetVal : cursor = db . cursor ( ) cursor . execute ( '''DELETE FROM contactinfo WHERE id=? AND fieldname=?''' , ( id . as_string ( ) , fieldname ) ) cursor . execute ( '''INSERT INTO contactinfo (id, fieldname, fieldvalue, contactgroup) 
			VALUES(?,?,?,?)''' , ( id . as_string ( ) , fieldname , fieldvalue , group ) ) db . commit ( ) return RetVal ( )
Saves a field to the database.
Saves a field to the database .
'''Saves a field to the database. Fieldname is expected to be in dot-separated format.'''
db
sqlite3.Connection
id
UUID
fieldname
str
fieldvalue
str
group
str