RDFLib / rdflib-sqlalchemy

RDFLib store using SQLAlchemy dbapi as back-end
Other
148 stars 34 forks source link

suppress SQLA warning of OnConflictDoNothing not using compilation cache #97

Closed ghost closed 2 years ago

ghost commented 2 years ago

I have poked around a bit but haven't found a means of bypassing the fact that the OnConflictDoNothing class from sqlalchemy.dialects.postgresql.dml doesn't seem able to inherit information about the compilation caching.

I can't immediately see how OnConflictDoNothing is going to make significant use of compilation caching, so for an intermediate workaround, just filter out the warning.

mwatts15 commented 2 years ago

Thanks, @gjhiggins, but I'm going to close this as an issue with SQLAlchemy. If an application developer wants to suppress the warning, monkey-patch a cache key function onto OnConflictDoNothing, or set inherit_cache, that's on them, but this library can't really decide on that.