Skip to content

Commit

Permalink
was not using VECTORTABLENAMENN where it was needed
Browse files Browse the repository at this point in the history
  • Loading branch information
e-gun committed Aug 10, 2023
1 parent 163531e commit afbbfa2
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions vectordbandfscalls.go
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ func vectordbfetchnn(fp string) embedding.Embeddings {
func vectordbreset() {
const (
MSG1 = "vectordbreset() dropped "
MSG2 = "vectordbreset(): 'DROP TABLE %s' returned an (ignored) error"
MSG2 = "vectordbreset(): 'DROP TABLE %s' returned an (ignored) error: \n\t%s"
E = `DROP TABLE %s`
)
ex := fmt.Sprintf(E, VECTORTABLENAMENN)
Expand All @@ -314,7 +314,8 @@ func vectordbreset() {

_, err := dbconn.Exec(context.Background(), ex)
if err != nil {
msg(fmt.Sprintf(MSG2, VECTORTABLENAMENN), MSGFYI)
m := err.Error()
msg(fmt.Sprintf(MSG2, VECTORTABLENAMENN, m), MSGFYI)
} else {
msg(MSG1+VECTORTABLENAMENN, MSGFYI)
}
Expand All @@ -323,7 +324,7 @@ func vectordbreset() {
// vectordbsizenn - how much space is the vectordb using?
func vectordbsizenn(priority int) {
const (
SZQ = "SELECT SUM(vectorsize) AS total FROM semantic_vectors"
SZQ = "SELECT SUM(vectorsize) AS total FROM " + VECTORTABLENAMENN
MSG4 = "Disk space used by stored vectors is currently %dMB"
)
var size int64
Expand All @@ -336,7 +337,7 @@ func vectordbsizenn(priority int) {

func vectordbcountnn(priority int) {
const (
SZQ = "SELECT COUNT(vectorsize) AS total FROM semantic_vectors"
SZQ = "SELECT COUNT(vectorsize) AS total FROM " + VECTORTABLENAMENN
MSG4 = "Number of stored vector models: %d"
DNE = "does not exist"
)
Expand Down

0 comments on commit afbbfa2

Please sign in to comment.