Author erlendaasland
Recipients berker.peksag, erlendaasland
Date 2021-03-09.21:54:25
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1615326865.81.0.691983788342.issue43454@roundup.psfhosted.org>
In-reply-to
Content
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)
History
Date User Action Args
2021-03-09 21:54:25erlendaaslandsetrecipients: + erlendaasland, berker.peksag
2021-03-09 21:54:25erlendaaslandsetmessageid: <1615326865.81.0.691983788342.issue43454@roundup.psfhosted.org>
2021-03-09 21:54:25erlendaaslandlinkissue43454 messages
2021-03-09 21:54:25erlendaaslandcreate