@@ -2799,7 +2799,8 @@ struct Index {
27992799 u16 nKeyCol ; /* Number of columns forming the key */
28002800 u16 nColumn ; /* Number of columns stored in the index */
28012801 u8 onError ; /* OE_Abort, OE_Ignore, OE_Replace, or OE_None */
2802- unsigned idxType :3 ; /* 0:Normal 1:UNIQUE, 2:PRIMARY KEY, 3:IPK, 4:VECTOR INDEX */
2802+ unsigned idxType :2 ; /* 0:Normal 1:UNIQUE, 2:PRIMARY KEY, 3:IPK */
2803+ unsigned idxIsVector :1 ; /* 0:Normal 1:VECTOR INDEX */
28032804 unsigned bUnordered :1 ; /* Use this index for == or IN queries only */
28042805 unsigned uniqNotNull :1 ; /* True if UNIQUE and NOT NULL for all columns */
28052806 unsigned isResized :1 ; /* True if resizeIndexObject() has been called */
@@ -2831,7 +2832,6 @@ struct Index {
28312832#define SQLITE_IDXTYPE_UNIQUE 1 /* Implements a UNIQUE constraint */
28322833#define SQLITE_IDXTYPE_PRIMARYKEY 2 /* Is the PRIMARY KEY for the table */
28332834#define SQLITE_IDXTYPE_IPK 3 /* INTEGER PRIMARY KEY index */
2834- #define SQLITE_IDXTYPE_VECTOR 4 /* libSQL vector index */
28352835
28362836/* Return true if index X is a PRIMARY KEY index */
28372837#define IsPrimaryKeyIndex (X ) ((X)->idxType==SQLITE_IDXTYPE_PRIMARYKEY)
@@ -2840,10 +2840,7 @@ struct Index {
28402840#define IsUniqueIndex (X ) ((X)->onError!=OE_None)
28412841
28422842/* Return true if index X is a vector index */
2843- #define IsVectorIndex (X ) ((X)->idxType==SQLITE_IDXTYPE_VECTOR)
2844-
2845- /* Return true if index X is an user defined index (APPDEF or VECTOR) */
2846- #define IsAppDefIndex (X ) ((X)->idxType==SQLITE_IDXTYPE_APPDEF||(X)->idxType==SQLITE_IDXTYPE_VECTOR)
2843+ #define IsVectorIndex (X ) ((X)->idxIsVector==1)
28472844
28482845/* The Index.aiColumn[] values are normally positive integer. But
28492846** there are some negative values that have special meaning:
0 commit comments