1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

Add file sqlite3rtree.h.

FossilOrigin-Name: e1d9ffce0f84469eeb926f50030cb772de98a652
This commit is contained in:
dan
2010-08-30 11:34:39 +00:00
parent 710c4841b0
commit 3b5a7a377c
3 changed files with 34 additions and 17 deletions

26
ext/rtree/sqlite3rtree.h Normal file
View File

@ -0,0 +1,26 @@
#include <sqlite3.h>
typedef struct RtreeGeometry RtreeGeometry;
struct RtreeGeometry {
void *pContext; /* Copy of pContext passed to s_r_g_c() */
int nParam; /* Size of array aParam[] */
double *aParam; /* Parameters passed to SQL geom function */
void *pUser; /* Callback implementation user data */
void (*xDelUser)(void *); /* Called by SQLite to clean up pUser */
};
/*
** Register a geometry callback named zGeom that can be used as part of an
** R-Tree geometry query as follows:
**
** SELECT ... FROM <rtree> WHERE <rtree> MATCH $zGeom(... params ...)
*/
int sqlite3_rtree_geometry_callback(
sqlite3 *db,
const char *zGeom,
int (*xGeom)(RtreeGeometry *, int nCoord, double *aCoord, int *piResOut),
void *pContext
);