New submission from Erlend Egeberg Aasland <erlend.aasl...@innova.no>:
Ref. bpo-43440 Now that both Windows and macOS builds compile SQLite with R*Tree support, we should consider adding support for R*Tree callbacks. SQLite has two API's: - sqlite3_rtree_query_callback() for SQLite 3.8.5 and newer. - sqlite3_rtree_geometry_callback() for SQLite pre 3.8.5. I suggest using the new API only, because it is more flexible, and it is also the one recommended by SQLite. See https://sqlite.org/rtree.html Python API: sqlite3.Connection.create_rtree_query_function() Too long function name? As for the callback spec, I'm not sure what's the most pythonic approach? callback(coords, *params, **query_info): coords # array of coordinates of node or entry to check *params # parameters passed to the SQL function **query_info # the rest of the relevant sqlite3_rtree_query_info members return (visibility, score) ---------- components: Library (Lib) messages: 388391 nosy: berker.peksag, erlendaasland priority: normal severity: normal status: open title: [sqlite3] Add support for R*Tree callbacks type: enhancement versions: Python 3.10 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue43454> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com