pymensago/dbfs.py
def load_folder_maps(db: sqlite3.Connection) -> RetVal():
	'''Loads from the database all folder maps.

	Parameters:
		db: connection to the SQLite3 database
	
	Returns:
		maps: (dict) dictionary of UUID string keys to workspace-relative paths
	
	Notes:
		Because folders can have the same name due to being in different locations,
		the full path is used. For example 'files attachments' for the attachments
		folder for the workspace.
	'''

	maps = dict()

	cur = db.cursor()
	cur.execute("SELECT fid,path FROM folders")
	for row in cur.fetchall():
		maps[row[0]] = row[1]
	
	if len(maps) == 0:
		return RetVal(ErrNotFound)
	
	return RetVal().set_value('maps', maps)
Loads from the database all folder maps.

	Parameters:
		db: connection to the SQLite3 database
	
	Returns:
		maps: (dict) dictionary of UUID string keys to workspace-relative paths
	
	Notes:
		Because folders can have the same name due to being in different locations,
		the full path is used. For example 'files attachments' for the attachments
		folder for the workspace.
	
Loads from the database all folder maps.
Loads from the database all folder maps .
def load_folder_maps(db: sqlite3.Connection) -> RetVal():
	maps = dict()
	cur = db.cursor()
	cur.execute("SELECT fid,path FROM folders")
	for row in cur.fetchall():
		maps[row[0]] = row[1]
	if len(maps) == 0:
		return RetVal(ErrNotFound)
	return RetVal().set_value('maps', maps)
def load_folder_maps ( db : sqlite3 . Connection ) -> RetVal ( ) : maps = dict ( ) cur = db . cursor ( ) cur . execute ( "SELECT fid,path FROM folders" ) for row in cur . fetchall ( ) : maps [ row [ 0 ] ] = row [ 1 ] if len ( maps ) == 0 : return RetVal ( ErrNotFound ) return RetVal ( ) . set_value ( 'maps' , maps )
Loads from the database all folder maps.
Loads from the database all folder maps .
'''Loads from the database all folder maps.

	Parameters:
		db: connection to the SQLite3 database
	
	Returns:
		maps: (dict) dictionary of UUID string keys to workspace-relative paths
	
	Notes:
		Because folders can have the same name due to being in different locations,
		the full path is used. For example 'files attachments' for the attachments
		folder for the workspace.
	'''
(dict) dictionary of UUID string keys to workspace-relative paths
( dict ) dictionary of UUID string keys to workspace - relative paths
maps
db
sqlite3.Connection
connection to the SQLite3 database
connection to the SQLite3 database