ponyorm / pony

Pony Object Relational Mapper
Apache License 2.0
3.58k stars 242 forks source link

Using sqlite extensions #706

Open mwinokan opened 4 months ago

mwinokan commented 4 months ago

I have just discovered Pony ORM, and I'm considering using it for a drug discovery project. For this it's imperative that there is performant structure based searching of entries in the database. I have had success using the chemicalite extension to sqlite for this purpose. Is it possible to use this extension with Pony?

Without pony I am able to load the extension from python as follows:

conn = sqlite3.connect(self.path)
conn.enable_load_extension(True)
conn.load_extension('chemicalite')
conn.enable_load_extension(False)

I presume this could cause issues when defining attributes in Pony entities that have custom chemicalite datatypes such as MOL.

Thank you