mirror of
https://github.com/asg017/sqlite-vec.git
synced 2026-04-25 00:36:56 +02:00
format, pragma_table_list -> sqlite_master
This commit is contained in:
parent
feea3bfe43
commit
9dc772e9f9
2 changed files with 30 additions and 17 deletions
18
sqlite-vec.c
18
sqlite-vec.c
|
|
@ -2837,7 +2837,6 @@ struct vec0_vtab {
|
|||
sqlite3_blob *vectorBlobs[VEC0_MAX_VECTOR_COLUMNS];
|
||||
};
|
||||
|
||||
|
||||
void vec0_free_resources(vec0_vtab *p) {
|
||||
for (int i = 0; i < p->numVectorColumns; i++) {
|
||||
sqlite3_blob_close(p->vectorBlobs[i]);
|
||||
|
|
@ -3596,34 +3595,37 @@ static int vec0Destroy(sqlite3_vtab *pVtab) {
|
|||
|
||||
// TODO evidence-of here
|
||||
|
||||
zSql = sqlite3_mprintf("DROP TABLE " VEC0_SHADOW_CHUNKS_NAME, p->schemaName, p->tableName);
|
||||
zSql = sqlite3_mprintf("DROP TABLE " VEC0_SHADOW_CHUNKS_NAME, p->schemaName,
|
||||
p->tableName);
|
||||
rc = sqlite3_prepare_v2(p->db, zSql, -1, &stmt, 0);
|
||||
sqlite3_free((void *)zSql);
|
||||
if((rc != SQLITE_OK) || (sqlite3_step(stmt) != SQLITE_DONE)) {
|
||||
if ((rc != SQLITE_OK) || (sqlite3_step(stmt) != SQLITE_DONE)) {
|
||||
rc = SQLITE_ERROR;
|
||||
goto done;
|
||||
}
|
||||
|
||||
zSql = sqlite3_mprintf("DROP TABLE " VEC0_SHADOW_ROWIDS_NAME, p->schemaName, p->tableName);
|
||||
zSql = sqlite3_mprintf("DROP TABLE " VEC0_SHADOW_ROWIDS_NAME, p->schemaName,
|
||||
p->tableName);
|
||||
rc = sqlite3_prepare_v2(p->db, zSql, -1, &stmt, 0);
|
||||
sqlite3_free((void *)zSql);
|
||||
if((rc != SQLITE_OK) || (sqlite3_step(stmt) != SQLITE_DONE)) {
|
||||
if ((rc != SQLITE_OK) || (sqlite3_step(stmt) != SQLITE_DONE)) {
|
||||
rc = SQLITE_ERROR;
|
||||
goto done;
|
||||
}
|
||||
|
||||
for (int i = 0; i < p->numVectorColumns; i++) {
|
||||
zSql = sqlite3_mprintf("DROP TABLE \"%w\".\"%w\"" , p->schemaName, p->shadowVectorChunksNames[i]);
|
||||
zSql = sqlite3_mprintf("DROP TABLE \"%w\".\"%w\"", p->schemaName,
|
||||
p->shadowVectorChunksNames[i]);
|
||||
rc = sqlite3_prepare_v2(p->db, zSql, -1, &stmt, 0);
|
||||
sqlite3_free((void *)zSql);
|
||||
if((rc != SQLITE_OK) || (sqlite3_step(stmt) != SQLITE_DONE)) {
|
||||
if ((rc != SQLITE_OK) || (sqlite3_step(stmt) != SQLITE_DONE)) {
|
||||
rc = SQLITE_ERROR;
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
|
||||
rc = SQLITE_OK;
|
||||
done:
|
||||
done:
|
||||
sqlite3_free(p);
|
||||
sqlite3_finalize(stmt);
|
||||
return rc;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue