mirror of
https://github.com/lancedb/lancedb.git
synced 2026-11-26 20:44:00 +00:00
docs: explain remote tag checkout branch requirements
This commit is contained in:
@@ -307,6 +307,16 @@ class RemoteTable(Table):
|
||||
)
|
||||
|
||||
def checkout(self, version: Union[int, str]):
|
||||
"""Check out a version number or tag as a read-only view in place.
|
||||
|
||||
A tag must belong to this handle's current branch. To read a tag on
|
||||
another branch, first obtain that branch's handle with
|
||||
`table.branches.checkout("branch_name")`, then call `checkout(tag)` on
|
||||
that handle. A tag on another branch raises an error without changing
|
||||
the current selection.
|
||||
|
||||
Call `checkout_latest()` to return to the latest version of this branch.
|
||||
"""
|
||||
result = LOOP.run(self._table.checkout(version))
|
||||
self._checkout_version = self.version
|
||||
return result
|
||||
|
||||
@@ -3464,6 +3464,12 @@ class Table(ABC):
|
||||
out state. To return the table to a normal state use
|
||||
`[Self::checkout_latest]`.
|
||||
|
||||
For remote tables, a tag must belong to this handle's current branch.
|
||||
To read a tag on another branch, first obtain that branch's handle with
|
||||
`table.branches.checkout("branch_name")`, then call `checkout(tag)` on
|
||||
that handle. A tag on another branch raises an error without changing
|
||||
the current selection.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
version: int | str,
|
||||
@@ -7994,6 +8000,12 @@ class AsyncTable:
|
||||
out state. To return the table to a normal state use
|
||||
`[Self::checkout_latest]`.
|
||||
|
||||
For remote tables, a tag must belong to this handle's current branch.
|
||||
To read a tag on another branch, first obtain that branch's handle with
|
||||
`await table.branches.checkout("branch_name")`, then call
|
||||
`await branch_table.checkout(tag)` on that handle. A tag on another
|
||||
branch raises an error without changing the current selection.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
version: int | str,
|
||||
|
||||
Reference in New Issue
Block a user