Skip to content

Commit 37521fa

Browse files
committed
fix comment a bit
1 parent 14102ad commit 37521fa

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

libsql-sqlite3/src/vectorIndex.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -774,7 +774,17 @@ int vectorIndexClear(sqlite3 *db, const char *zDbSName, const char *zIdxName) {
774774
}
775775

776776
/*
777+
* vectorIndexCreate analyzes any index creation expression and create vector index if needed
778+
* it tolerates the situation when insert into VECTOR_INDEX_GLOBAL_META_TABLE failed with conflict
779+
* this made intentionally in order to natively support upload of SQLite dumps
777780
*
781+
* dump populates tables first and create indices after
782+
* so we must omit them because shadow tables already filled
783+
*
784+
* 1. if vector index must not be created : 0 returned and pIdx is unchanged
785+
* 2. if vector index must be created and refilled from base table: 0 returned and pIdx->idxType set to SQLITE_IDXTYPE_VECTOR
786+
* 3. if vector index must be created but refill must be skipped : 1 returned and pIdx->idxType set to SQLITE_IDXTYPE_VECTOR
787+
* 4. in case of any error :-1 returned (and pParse errMsg is populated with some error message)
778788
*/
779789
int vectorIndexCreate(Parse *pParse, Index *pIdx, const char *zDbSName, const IdList *pUsing) {
780790
int i, rc = SQLITE_OK;

0 commit comments

Comments
 (0)