Please enable JavaScript.
Coggle requires JavaScript to display documents.
convert_file, xml, foreign record - Coggle Diagram
convert_file
noupdate: bool
update registry
False: manifest['data']
True: manifest['demo'] (init_xml not work)
mode: Literal["init", "update"]
update registry
"init": to install
"update": to upgrade
xml
noupdate==True and mode=="update"
no "id"
do nothing
has "id"
record exists
do nothing
record doesn't exist
forcecreate=False (default True)
do nothing
forcecreate=True/undefined
create the record
not (noupdate==True and mode=="update")
create the record
foreign record
noupdate==True and mode=="update"
has "id" and record doesn't exist and forcecreate=True/undefined
else
do nothing
not (noupdate==True and mode=="update")
create the record
record doesn't exist and forcecreate=False/undefined
noupdate and forcecreate=False
do nothing
not noupdate or forcecreate=undefined
raise "Cannot update missing record"
else
_load_records
xml_id
record exists
update _update_xmlids(imd_data_list, update)
mode="update" and dbnoupdate=True
do nothing
mode="init" or dbnoupdate=False
to update
record doesn't exist
to create
id
to update
nothing
mode="update"
raise
mode="init"
to create
else