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

Refactor/2479/simplify databackend contract #2710

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

blythed
Copy link
Collaborator

@blythed blythed commented Jan 2, 2025

Description

  • Only 1 type of query superduper.backends.base.query.Query
  • Implementations based on superduper_<impl>.Databackend
  • Simplifications to query API:
    • t.insert(...) instead of t.insert().execute() since we don't need to serialize insertions
    • t.update, t.delete deprecated
    • read queries have a simpler form t.filter(...).select(...).outputs(...), or t.like().(...) or t.(...).like()
    • t.get() to get one data point (eager)
    • t.ids() to get the ids (eager)
    • t.subset(ids) to subset a query
    • t.limit(n, offset=m) to get a chunk of data
  • .execute() no longer returns a cursor, instead a simple list
  • Remove the error prone t.column == x, replace with t['column'] == x
  • Simpler serialization of "complex items" with q.dict()['documents']

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant