Skip to content

Commit

Permalink
database: Remove unused ListAllOperationDocs method
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Barnes committed Feb 3, 2025
1 parent 5aca60c commit 12617b6
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 20 deletions.
6 changes: 0 additions & 6 deletions internal/database/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ type DBClient interface {
CreateOperationDoc(ctx context.Context, doc *OperationDocument) error
UpdateOperationDoc(ctx context.Context, operationID string, callback func(*OperationDocument) bool) (bool, error)
ListOperationDocs(subscriptionID string) DBClientIterator[OperationDocument]
ListAllOperationDocs() DBClientIterator[OperationDocument]

// GetSubscriptionDoc retrieves a SubscriptionDocument from the database given the subscriptionID.
// ErrNotFound is returned if an associated SubscriptionDocument cannot be found.
Expand Down Expand Up @@ -422,11 +421,6 @@ func (d *CosmosDBClient) ListOperationDocs(subscriptionID string) DBClientIterat
return newQueryItemsIterator[OperationDocument](pager)
}

func (d *CosmosDBClient) ListAllOperationDocs() DBClientIterator[OperationDocument] {
pk := azcosmos.NewPartitionKeyString(operationsPartitionKey)
return newQueryItemsIterator[OperationDocument](d.operations.NewQueryItemsPager("SELECT * FROM c", pk, nil))
}

// GetSubscriptionDoc retreives a subscription document from async DB using the subscription ID
func (d *CosmosDBClient) GetSubscriptionDoc(ctx context.Context, subscriptionID string) (*SubscriptionDocument, error) {
// Make sure lookup keys are lowercase.
Expand Down
14 changes: 0 additions & 14 deletions internal/mocks/dbclient.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 12617b6

Please sign in to comment.