I register a user defined function:
conn.create_function("geocode", 4, geocode)
The function is used in a trigger, and the trigger fires correctly after an insert, but the function isn't found:
sqlite3.OperationalError: no such function: geocode
My understanding of this usage pattern may be wrong, is it possible to persist Python functions in the database?
The documentation says:
If an application uses more than one database connection then application-defined SQL functions must be added to each database connection separately.
And how could your Python code persist when you can open the same database file later on some other machine?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With