@ -565,22 +565,22 @@ class DBAdapter:
for alias in aliases :
if alias in old_aliases : # is this already set?
continue
self . add_alias_by_ name( name , alias )
self . add_alias_by_ ID( tag_id , alias )
for old_alias in old_aliases :
if old_alias not in aliases : # got to delete an alias?
self . remove_alias_by_ name( name , old_alias )
self . remove_alias_by_ ID( tag_id , old_alias )
if implications is not None :
old_implicants = self . get_tag_implications ( name )
for implicant in implications :
if implicant in old_implicants : # is this already set?
continue
self . add_implication_by_ name( name , implicant )
self . add_implication_by_ ID( tag_id , implicant )
for old_implicant in old_implicants :
if old_implicant not in implications : # got to delete an implicant?
self . remove_implication_by_ name( name , old_implicant )
self . remove_implication_by_ ID( tag_id , old_implicant )
def add_alias_by_name ( self , name : str , alias : str ) :
"""
@ -663,7 +663,7 @@ class DBAdapter:
" tag " : tag ,
" implicant " : implicant
}
self . db_cursor . execute ( " DELETE FROM tag_implication WHERE root_tag = %( name )s " +
self . db_cursor . execute ( " DELETE FROM tag_implication WHERE root_tag = %( tag )s " +
" and implicate = %(implicant)s " , d )
self . db . commit ( )
@ -842,7 +842,7 @@ class DBAdapter:
Search for the tag ' s implications
: param name :
: param output_ID : Don ' t resolve the tag ids into names in the resulting list
: return : List of tag name s
: return : List of tag id s
"""
d = { " ID " : self . get_tag_ID ( name ) }
if d [ " ID " ] is None :