Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Add single-record deletion/update methods to DefaultVectorDB #2014

Open
blinko-space opened this issue Feb 22, 2025 · 1 comment
Labels
enhancement New feature or request Vectors Issue with Mastra Vectors

Comments

@blinko-space
Copy link

Problem Description :

// Need to access private properties turso has security risks
await (defaultVectorDBas any).turso.execute(`DELETE FROM ...`)

The current DefaultVectorDB class lacks methods for single-record operations. Real-world use cases require:

  1. Deleting specific vector records by ID

  2. Updating record metadata or vectors by ID
    Proposed API additions:

interface DefaultVectorDB {
  deleteById(indexName: string, id: string): Promise<void>;
  updateById(
    indexName: string,
    id: string,
    update: {
      vector?: number[];
      metadata?: Record<string, any>;
    }
  ): Promise<void>;
}

export class DefaultVectorDB extends MastraVector {

@github-actions github-actions bot added enhancement New feature or request Vectors Issue with Mastra Vectors labels Feb 22, 2025
@abhiaiyer91
Copy link
Contributor

Hi @blinko-space, great idea! We're up for a contribution if you'd like but we can do it otherwise!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Vectors Issue with Mastra Vectors
Projects
None yet
Development

No branches or pull requests

2 participants