Skip to content

Implement num_entries, all_entries in DataStore #767

Closed
@mylibrar

Description

@mylibrar

Is your feature request related to a problem? Please describe.
To integrate DataStore with DataPack, we want to add a few functions in DataStore to replace the previous implementation of all_annotations, num_annotations, etc.

Describe the solution you'd like
We want to add two functions

all_entries(entry_type_name)
num_entries(entry_type_name)

to DataStore. They should incorporate the functionalities of all the following DataPack methods:

  • all_annotations
  • num_annotations
  • all_links
  • num_links
  • all_groups
  • num_groups
  • all_generic_entries
  • num_generics_entries
  • all_audio_annotations
  • num_audio_annotations

Additional context

  • num_entries should still return an integer. all_entries should now return an iterator of entry data in list format instead of class. To keep the old API signature, DataPack will need to convert the entry data into entry objects.
  • This PR should be made to the master branch.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions