Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | When generating sqlite3.h, append the contents of sqlite3rtree.h. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
fc4d75370bad9021d01b76dbb1b8dde9 |
User & Date: | dan 2010-08-30 18:39:50.000 |
Context
2010-08-30
| ||
22:15 | Provide hints to the btree layer during the creation of transient tables for when it is possible for those tables to use a hash rather than a binary tree. No use is currently made of those hints, though assert() statement verify their accuracy. (check-in: 4fead8e714 user: drh tags: trunk) | |
18:39 | When generating sqlite3.h, append the contents of sqlite3rtree.h. (check-in: fc4d75370b user: dan tags: trunk) | |
16:15 | Fix a problem in pagerfault.test uncovered by the previous change. (check-in: b6719ce328 user: dan tags: trunk) | |
Changes
Changes to ext/rtree/rtree.c.
︙ | |||
181 182 183 184 185 186 187 | 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 | - - + + | /* ** A search constraint. */ struct RtreeConstraint { int iCoord; /* Index of constrained coordinate */ int op; /* Constraining operation */ double rValue; /* Constraint value. */ |
︙ | |||
230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 | 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 | + + + + + - + | */ struct RtreeCell { i64 iRowid; RtreeCoord aCoord[RTREE_MAX_DIMENSIONS*2]; }; /* ** Value for the first field of every RtreeGeomBlob object. The MATCH ** operator tests that the first field of a blob operand matches this ** value to avoid operating on invalid blobs (which could cause a segfault). */ #define RTREE_GEOMETRY_MAGIC 0x891245AB /* ** An instance of this structure must be supplied as a blob argument to ** the right-hand-side of an SQL MATCH operator used to constrain an ** r-tree query. */ struct RtreeGeomBlob { u32 magic; /* Always RTREE_GEOMETRY_MAGIC */ |
︙ | |||
741 742 743 744 745 746 747 | 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 | - + | /* ** Free the RtreeCursor.aConstraint[] array and its contents. */ static void freeCursorConstraints(RtreeCursor *pCsr){ if( pCsr->aConstraint ){ int i; /* Used to iterate through constraint array */ for(i=0; i<pCsr->nConstraint; i++){ |
︙ | |||
1098 1099 1100 1101 1102 1103 1104 | 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 | - + - + + + - + | ** This function is called to configure the RtreeConstraint object passed ** as the second argument for a MATCH constraint. The value passed as the ** first argument to this function is the right-hand operand to the MATCH ** operator. */ static int deserializeGeometry(sqlite3_value *pValue, RtreeConstraint *pCons){ RtreeGeomBlob *p; |
︙ | |||
3072 3073 3074 3075 3076 3077 3078 | 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 | - - - - + + + + + - - + + + + + + + + + + + + + + + | void *c = (void *)RTREE_COORD_INT32; rc = sqlite3_create_module_v2(db, "rtree_i32", &rtreeModule, c, 0); } return rc; } |
︙ | |||
3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 | 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 | + + + - + | for(i=0; i<nArg; i++){ pBlob->aParam[i] = sqlite3_value_double(aArg[i]); } sqlite3_result_blob(ctx, pBlob, nBlob, doSqlite3Free); } } /* ** Register a new geometry function for use with the r-tree MATCH operator. */ int sqlite3_rtree_geometry_callback( sqlite3 *db, const char *zGeom, |
︙ |
Changes to ext/rtree/sqlite3rtree.h.
|
Changes to src/test_rtree.c.
︙ | |||
44 45 46 47 48 49 50 | 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | - + | ** coordinates as follows: ** ** cube(x, y, z, width, height, depth) ** ** The width, height and depth parameters must all be greater than zero. */ static int cube_geom( |
︙ |
Changes to tool/mksqlite3h.tcl.
︙ | |||
61 62 63 64 65 66 67 | 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 | - + + - - - - + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + | close $in # Set up patterns for recognizing API declarations. # set varpattern {^[a-zA-Z][a-zA-Z_0-9 *]+sqlite3_[_a-zA-Z0-9]+(\[|;| =)} set declpattern {^ *[a-zA-Z][a-zA-Z_0-9 ]+ \**sqlite3_[_a-zA-Z0-9]+\(} |