MCPcopy Create free account
hub / github.com/astercloud/aster / Delete

Method Delete

pkg/vector/pgvector/store.go:116–124  ·  view source on GitHub ↗

Delete 从 pgvector 表中删除指定文档。

(ctx context.Context, ids []string)

Source from the content-addressed store, hash-verified

114
115// Delete 从 pgvector 表中删除指定文档。
116func (s *Store) Delete(ctx context.Context, ids []string) error {
117 if len(ids) == 0 {
118 return nil
119 }
120 const tmpl = `DELETE FROM %s WHERE id = ANY($1);`
121 query := fmt.Sprintf(tmpl, s.table)
122 _, err := s.pool.Exec(ctx, query, ids)
123 return err
124}
125
126// Query 在指定命名空间内执行向量检索。
127func (s *Store) Query(ctx context.Context, q vector.Query) ([]vector.Hit, error) {

Callers

nothing calls this directly

Calls 1

ExecMethod · 0.65

Tested by

no test coverage detected