Skip to content

Commit

Permalink
reset_db always read only
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian-B committed Dec 3, 2024
1 parent 1916721 commit 0d97058
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,12 @@ class BufferDatabase(BaseDatabase):
__slots__ = ()

@classmethod
def reset_db(cls, reset_number: int,
read_only: Optional[bool] = None) -> "BufferDatabase":
def reset_db(cls, reset_number: int) -> "BufferDatabase":
"""
Retrieves a NeoBufferDatabase for this segment.
"""
database_file = cls.reset_file(reset_number)
return BufferDatabase(database_file, read_only)
return BufferDatabase(database_file)

def clear_recording_region(
self, x: int, y: int, p: int, region: int) -> bool:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,12 @@ def __init__(self, provenance_data_path: Optional[str] = None):
row_factory=None, text_factory=None)

@classmethod
def reset_db(cls, reset_number: int,
read_only: Optional[bool] = None) -> "ProvenanceReader":
def reset_db(cls, reset_number: int) -> "ProvenanceReader":
"""
Retrieves a NeoBufferDatabase for this segment.
"""
database_file = cls.reset_file(reset_number)
return ProvenanceReader(database_file, read_only)
return ProvenanceReader(database_file)

def run_query(self, query: str, params: Iterable[_SqliteTypes] = ()
) -> List[Sequence[_SqliteTypes]]:
Expand Down

0 comments on commit 0d97058

Please sign in to comment.