Skip to content

Commit

Permalink
Implement Butler._query.
Browse files Browse the repository at this point in the history
  • Loading branch information
TallJimbo committed Mar 28, 2024
1 parent 2f0512a commit f629cea
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion python/lsst/daf/butler/direct_butler.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
from ._timespan import Timespan
from .datastore import Datastore, NullDatastore
from .dimensions import DataCoordinate, Dimension
from .direct_query_driver import DirectQueryDriver
from .progress import Progress
from .queries import Query
from .registry import (
Expand Down Expand Up @@ -2134,7 +2135,12 @@ def dimensions(self) -> DimensionUniverse:
@contextlib.contextmanager
def _query(self) -> Iterator[Query]:
# Docstring inherited.
raise NotImplementedError("TODO DM-41159")
driver = DirectQueryDriver(
self._registry._db, self.dimensions, self._registry._managers, self._registry.defaults
)
query = Query(driver)
with driver:
yield query

def _preload_cache(self) -> None:
"""Immediately load caches that are used for common operations."""
Expand Down

0 comments on commit f629cea

Please sign in to comment.