Skip to content

Commit

Permalink
Version 378 hotfix 2
Browse files Browse the repository at this point in the history
electric boogaloo
  • Loading branch information
hydrusnetwork committed Dec 18, 2019
1 parent 29e59b6 commit 77326ca
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions include/ClientDB.py
Original file line number Diff line number Diff line change
Expand Up @@ -7979,13 +7979,18 @@ def _GetTagSiblingIds( self, service_id, tag_ids ):
service_predicate = ' AND service_id = ' + str( service_id )


good_select = 'SELECT good_tag_id FROM tag_siblings WHERE bad_tag_id = ?' + service_predicate + ';'
bad_select = 'SELECT bad_tag_id FROM tag_siblings WHERE good_tag_id = ?' + service_predicate + ';'

while len( search_tag_ids ) > 0:

goods = self._STS( self._ExecuteManySelectSingleParam( good_select, search_tag_ids ) )
bads = self._STS( self._ExecuteManySelectSingleParam( bad_select, search_tag_ids ) )
with HydrusDB.TemporaryIntegerTable( self._c, search_tag_ids, 'tag_id' ) as temp_table_name:

self._AnalyzeTempTable( temp_table_name )

good_select = 'SELECT good_tag_id FROM tag_siblings, {} ON ( bad_tag_id = tag_id );'.format( temp_table_name )
bad_select = 'SELECT bad_tag_id FROM tag_siblings, {} ON ( good_tag_id = tag_id );'.format( temp_table_name )

goods = self._STS( self._c.execute( good_select ) )
bads = self._STS( self._c.execute( bad_select ) )


searched_tag_ids.update( search_tag_ids )

Expand Down

0 comments on commit 77326ca

Please sign in to comment.