Roundup Tracker - Issues

Message8214

Author rouilj
Recipients rouilj, schlatterbeck
Date 2024-12-08.07:36:43
Message-id <1733643403.65.0.636068121225.issue2551068@roundup.psfhosted.org>
In-reply-to
Other tricks:


So this is an easy way of determining if my db class is a Fileclass.

  (Pdb) from roundup.hyperdb import FileClass
  (Pdb) isinstance( self.db.msg, FileClass)
  True
  (Pdb) isinstance( self.db.status, FileClass)
  False
  (Pdb) isinstance( self.db.file, FileClass)
  True

I think this works regardless of the back end as:

   (Pdb) p self.db.msg.__class__
   <class 'roundup.backends.back_sqlite.FileClass'>

could work using string comparison of the right type (ugh).

This should work if I need to access the data by parsing the path/designator.
 
 self.db.getclass('msg').get("2", "binary_content")

but I think just passing it through dispatch will do the trick.
History
Date User Action Args
2024-12-08 07:36:43rouiljsetmessageid: <1733643403.65.0.636068121225.issue2551068@roundup.psfhosted.org>
2024-12-08 07:36:43rouiljsetrecipients: + rouilj, schlatterbeck
2024-12-08 07:36:43rouiljlinkissue2551068 messages
2024-12-08 07:36:43rouiljcreate