Ë
    kQêjwä ã                  óò  — d dl mZ d dlmZ d dlZd dlmZ d dlmZ d dl	Z	d dl
mZmZmZmZmZmZmZmZmZmZmZ d dlmZ e	j0                  dk\  rd d	l
mZ  G d
„ d«      Znd dlmZmZ d dlmZmZmZm Z m!Z!m"Z"m#Z# d dl$m%Z% d dl&m'Z'm(Z(m)Z) d dl*m+Z+ d dl,m-Z-m.Z.m/Z/m0Z0m1Z2 d dl3m4Z4m5Z5 ddl6m7Z7 ddl8m1Z9 ddl:m;Z;m<Z< ddl=m>Z>m?Z?m@Z@ ddlAmBZC ddlAmDZE ddlAmFZFmGZGmHZH ddlImJZJmKZKmLZLmMZMmNZN ddlOmPZPmQZQmRZRmSZS ddlTmUZUmVZVmWZWmXZX ddlYmZZZm[Z[ ddl\m]Z] d dl^Z^er0d dl_Z`dd lambZb dd!lcmdZd dd"l8meZf dd#l8mgZg dd$lhmiZimjZj dd%lkmlZl dd&l8mmZm dd'lnmoZompZpmqZq 	 	 	 	 d/d(„Zr G d)„ d*e«      Zs G d+„ d,es«      Zt G d-„ d.eu«      Zvy)0é    )Úannotations)ÚabstractmethodN)Ú	timedelta)ÚPath)ÚTYPE_CHECKINGÚAnyÚDictÚ	GeneratorÚIterableÚListÚLiteralÚOptionalÚSequenceÚTupleÚUnion)ÚUUID)é   é   )Úoverridec                  ó   — e Zd Zy)ÚEnforceOverridesN)Ú__name__Ú
__module__Ú__qualname__© ó    úO/home/oem/CyberBrain26-unified/.venv/lib/python3.12/site-packages/lancedb/db.pyr   r      s   „ Ør   r   )r   r   )ÚAsyncListingÚAsyncNamespaceListingÚAsyncTableListingÚListingÚNamespaceListingÚTableListingÚvalidate_page_limit)ÚEmbeddingFunctionRegistry)Údata_to_readerÚsanitize_uriÚvalidate_schema)ÚLOOP)ÚLanceNamespaceÚCreateNamespaceResponseÚDropNamespaceResponseÚDescribeNamespaceResponseÚconnect)ÚNamespaceNotEmptyErrorÚTableNotFoundErroré   )Ú__version__)r.   )ÚFunctionVersionÚUdfDefinition)ÚAsyncJobÚJobÚ
_typed_job)Ú
AsyncQuery)ÚQuery)ÚQueryDescriptionÚQueryParametersÚto_parameter_batch)ÚAsyncMaterializedViewÚMaterializedViewÚMaterializedViewSourceÚ	SelectArgÚnormalize_select)ÚEnvVarSecretÚ
SecretInfoÚvalidate_namespace_pathÚvalidate_secret_name)Ú
AsyncTableÚ
LanceTableÚTableÚsanitize_create_table)Úget_uri_schemeÚvalidate_table_name©ÚViewDescription)ÚAsyncRecordBatchReader)Ú
LanceModel)Ú
Connection)ÚJobInfo)ÚDATAÚURI)ÚEmbeddingFunctionConfig)ÚSession)Ú _normalize_create_namespace_modeÚ_normalize_drop_namespace_modeÚ"_normalize_drop_namespace_behaviorc                ó6   — | \  }}}}}}t        ||||||¬«      S )z1Name the fields the binding returns positionally.)ÚnameÚqueryÚdefault_databaseÚschemaÚnamespace_pathÚdefault_namespace_pathrL   )Ú	describedrZ   r^   r[   r\   r_   r]   s          r   Ú_view_descriptionra   m   s=   € ð 	ñØØØØØØäØØØ)ØØ%Ø5ôð r   c                  ó  — e Zd ZdZdDd„ZdEd„ZedFd„«       ZedEd„«       Z	 	 	 dG	 	 	 	 	 	 	 dHd„Z		 	 dI	 	 	 	 	 	 	 dJd„Z
	 	 dI	 	 	 	 	 	 	 dKd	„Z	 	 	 	 dLd
„ZdMd„ZdNd„Z	 	 	 dG	 	 	 	 	 	 	 dOd„Ze	 	 dIddœ	 	 	 	 	 	 	 dPd„«       Ze	 	 	 	 	 	 	 dQdddddœ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dRd„«       ZdSd„Zddddddœ	 	 	 	 	 	 	 	 	 	 	 	 	 dTd„Zdddddddœ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dUd„Zdddddddœ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dVd„ZdWd„Zdddœ	 	 	 	 	 dXd„Z	 dY	 	 	 	 	 dZd„Z	 dY	 	 	 	 	 d[d„ZdYd\d„Z	 dY	 	 	 	 	 d]d„Z	 	 dI	 	 	 	 	 	 	 d^d „Zd!„ ZdYd_d"„Zed`d#„«       Z dad$„Z!dbd%„Z"dcd&„Z#ddd'„Z$d`d(„Z%ddd)œ	 	 	 	 	 	 	 ded*„Z&ddd)œ	 	 	 	 	 	 	 dfd+„Z'ddœ	 	 	 	 	 	 	 dgd,„Z(dddd-œ	 	 	 	 	 	 	 dhd.„Z)ddœ	 	 	 	 	 	 	 did/„Z*ddœ	 	 	 	 	 	 	 djd0„Z+ddœ	 	 	 	 	 	 	 dkd1„Z,ddœ	 	 	 	 	 	 	 dkd2„Z-dddd-œ	 	 	 	 	 	 	 dld3„Z.ddœ	 	 	 	 	 dZd4„Z/ddœ	 	 	 	 	 dmd5„Z0ddœ	 	 	 	 	 	 	 dnd6„Z1ddœ	 	 	 	 	 dod7„Z2ddœ	 	 	 	 	 dZd8„Z3ddœ	 	 	 	 	 dpd9„Z4dddd-œ	 	 	 	 	 	 	 dld:„Z5dqd;„Z6dddœ	 	 	 	 	 drd<„Z7dsd=„Z8dtd>„Z9dtd?„Z:ddd@œ	 	 	 	 	 	 	 dudA„Z;ddd@œ	 	 	 	 	 	 	 dvdB„Z<dwdC„Z=y)xÚDBConnectiona¼  An active LanceDB connection interface.

    Use [close][lancedb.db.DBConnection.close] to release the connection's
    underlying resources, or use the connection as a context manager to close it
    automatically when leaving the block, including when an exception is raised.

    Examples
    --------
    >>> import lancedb
    >>> with lancedb.connect("memory://") as db:
    ...     assert db.is_open()
    >>> db.is_open()
    False
    c                ó   — | S ©Nr   ©Úselfs    r   Ú	__enter__zDBConnection.__enter__“   ó   € Øˆr   c                ó$   — | j                  «        y re   ©Úclose©rg   Ú_s     r   Ú__exit__zDBConnection.__exit__–   ó   € Ø�
‰
�r   c                 ó   — y)ú&Return True if the connection is open.Nr   rf   s    r   Úis_openzDBConnection.is_open™   s   € ð 	r   c                 ó   — y)a…  Close the connection, releasing any underlying resources.

        It is safe to call this method multiple times. Database operations on a
        closed connection raise ``RuntimeError: Connection is closed``.

        Examples
        --------
        >>> import lancedb
        >>> db = lancedb.connect("memory://")
        >>> db.close()
        >>> db.is_open()
        False
        Nr   rf   s    r   rl   zDBConnection.closež   s   € ð 	r   Nc                ó6   — |€g }t        t        dd¬«      «      S )a€  List immediate child namespace names in the given namespace.

        Parameters
        ----------
        namespace_path: List[str], default []
            The parent namespace to list namespaces in.
            Empty list represents root namespace.
        page_token: str, optional
            Token for pagination. Use the token from a previous response
            to get the next page of results.
        limit: int, optional
            The maximum number of results to return.

        Returns
        -------
        NamespaceListing
            Response containing namespace names and optional page_token for pagination.
        NT©Úempty)r"   r   ©rg   r^   Ú
page_tokenÚlimits       r   Úlist_namespaceszDBConnection.list_namespaces¯   s"   € ð0 Ð!ØˆNÜÔ 5°dÀ$Ô GÓHÐHr   c                ó   — t        d«      ‚)a2  Create a new namespace.

        Parameters
        ----------
        namespace_path: List[str]
            The namespace identifier to create.
        mode: str, optional
            Creation mode - "create" (fail if exists), "exist_ok" (skip if exists),
            or "overwrite" (replace if exists). Case insensitive.
        properties: Dict[str, str], optional
            Properties to set on the namespace.

        Returns
        -------
        CreateNamespaceResponse
            Response containing the properties of the created namespace.
        ú?Namespace operations are not supported for this connection type©ÚNotImplementedError©rg   r^   ÚmodeÚ
propertiess       r   Úcreate_namespacezDBConnection.create_namespaceË   ó   € ô. "ØMó
ð 	
r   c                ó   — t        d«      ‚)á%  Drop a namespace.

        Parameters
        ----------
        namespace_path: List[str]
            The namespace identifier to drop.
        mode: str, optional
            Whether to skip if not exists ("SKIP") or fail ("FAIL"). Case insensitive.
        behavior: str, optional
            Whether to restrict drop if not empty ("RESTRICT") or cascade ("CASCADE").
            Case insensitive.

        Returns
        -------
        DropNamespaceResponse
            Response containing properties and transaction_id if applicable.
        r}   r~   )rg   r^   r�   Úbehaviors       r   Údrop_namespacezDBConnection.drop_namespaceæ   r„   r   c                ó   — t        d«      ‚)á  Describe a namespace.

        Parameters
        ----------
        namespace_path: List[str]
            The namespace identifier to describe.

        Returns
        -------
        DescribeNamespaceResponse
            Response containing the namespace properties.
        r}   r~   ©rg   r^   s     r   Údescribe_namespacezDBConnection.describe_namespace  s   € ô "ØMó
ð 	
r   c                ó   — t        d«      ‚)a‰  Check if a namespace exists.

        Parameters
        ----------
        namespace_id: List[str]
            The namespace identifier to check.

        Returns
        -------
        bool
            True if the namespace exists, False otherwise.

        Raises
        ------
        NotImplementedError
            If the connection type does not support namespace operations.
        r}   r~   )rg   Únamespace_ids     r   Únamespace_existszDBConnection.namespace_exists  s   € ô$ "ØMó
ð 	
r   c                ó   — t        d«      ‚)a½  Check if a table exists.

        Parameters
        ----------
        table_id: List[str]
            The table identifier to check (full path including namespace
            segments and table name).

        Returns
        -------
        bool
            True if the table exists, False otherwise.

        Raises
        ------
        NotImplementedError
            If the connection type does not support namespace operations.
        r}   r~   )rg   Útable_ids     r   Útable_existszDBConnection.table_exists*  s   € ô& "ØMó
ð 	
r   c                ó   — t        d«      ‚)áº  List tables in this database, one page at a time.

        Parameters
        ----------
        namespace_path: List[str], optional
            The namespace to list tables in.
            None or empty list represents root namespace.
        page_token: str, optional
            Token for pagination. Use the token from a previous response
            to get the next page of results.
        limit: int, optional
            The maximum number of results to return, default 100.
            Zero returns an empty page without a continuation token.

        Returns
        -------
        TableListing
            Response containing table names and optional page_token for pagination.
        z5list_tables is not supported for this connection typer~   rx   s       r   Úlist_tableszDBConnection.list_tablesA  s   € ô2 "ØCó
ð 	
r   ©r^   c                ó   — y)a  List all tables in this database, in sorted order

        Parameters
        ----------
        namespace_path: List[str], default []
            The namespace to list tables in.
            Empty list represents root namespace.
        page_token: str, optional
            The token to use for pagination. If not present, start from the beginning.
            Typically, this token is last table name from the previous page.
        limit: int, optional
            The maximum number of tables to return. None returns all tables;
            zero returns an empty list.

        Returns
        -------
        Iterable of str
        Nr   )rg   ry   rz   r^   s       r   Útable_nameszDBConnection.table_names^  s   € ð4 	r   F©r^   Ústorage_optionsÚdata_storage_versionÚenable_v2_manifest_pathsc	               ó   — t        d«      ‚)aK  Create a [Table][lancedb.table.Table] in the database.

        Parameters
        ----------
        name: str
            The name of the table.
        namespace_path: List[str], default []
            The namespace to create the table in.
            Empty list represents root namespace.
        data: The data to initialize the table, *optional*
            User must provide at least one of `data` or `schema`.
            Acceptable types are:

            - list-of-dict

            - pandas.DataFrame

            - pyarrow.Table or pyarrow.RecordBatch
        schema: The schema of the table, *optional*
            Acceptable types are:

            - pyarrow.Schema

            - [LanceModel][lancedb.pydantic.LanceModel]
        mode: str; default "create"
            The mode to use when creating the table.
            Can be "create", "overwrite", or "exist_ok".
            By default, if the table already exists, an exception is raised.
            If you want to overwrite the table, use mode="overwrite".
            To open an existing table without adding data, use mode="exist_ok".
        exist_ok: bool, default False
            If a table by the same name already exists, then raise an exception
            if exist_ok=False. If exist_ok=True, then open the existing table;
            it will not add the provided data but will validate against any
            schema that's specified.
        on_bad_vectors: str, default "error"
            How to handle vectors with incorrect sizes, NaNs, or null elements.
            One of "error", "drop", "fill", "null".
        fill_value: float
            The value to use when filling vectors. Only used if on_bad_vectors="fill".
            NaN or null elements and missing trailing elements are replaced with this
            value. Valid elements are preserved, and vectors longer than the expected
            dimension are truncated.
        storage_options: dict, optional
            Additional options for the storage backend. Options already set on the
            connection will be inherited by the table, but can be overridden here.
            See available options at
            <https://docs.lancedb.com/storage/>

            To enable stable row IDs (row IDs remain stable after compaction,
            update, delete, and merges), set `new_table_enable_stable_row_ids`
            to `"true"` in storage_options when connecting to the database.
        data_storage_version: optional, str, default "stable"
            Deprecated.  Set `storage_options` when connecting to the database and set
            `new_table_data_storage_version` in the options.
        enable_v2_manifest_paths: optional, bool, default False
            Deprecated.  Set `storage_options` when connecting to the database and set
            `new_table_enable_v2_manifest_paths` in the options.
        Returns
        -------
        LanceTable
            A reference to the newly created table.

        !!! note

            The vector index won't be created by default.
            To create the index, call the `create_index` method on the table.

        Examples
        --------

        Can create with list of tuples or dictionaries:

        >>> import lancedb
        >>> db = lancedb.connect("./.lancedb")
        >>> data = [{"vector": [1.1, 1.2], "lat": 45.5, "long": -122.7},
        ...         {"vector": [0.2, 1.8], "lat": 40.1, "long":  -74.1}]
        >>> db.create_table("my_table", data)
        LanceTable(name='my_table', ...)
        >>> db["my_table"].head()
        pyarrow.Table
        vector: fixed_size_list<item: float>[2]
          child 0, item: float
        lat: double
        long: double
        ----
        vector: [[[1.1,1.2],[0.2,1.8]]]
        lat: [[45.5,40.1]]
        long: [[-122.7,-74.1]]

        You can also pass a pandas DataFrame:

        >>> import pandas as pd
        >>> data = pd.DataFrame({
        ...    "vector": [[1.1, 1.2], [0.2, 1.8]],
        ...    "lat": [45.5, 40.1],
        ...    "long": [-122.7, -74.1]
        ... })
        >>> db.create_table("table2", data)
        LanceTable(name='table2', ...)
        >>> db["table2"].head()
        pyarrow.Table
        vector: fixed_size_list<item: float>[2]
          child 0, item: float
        lat: double
        long: double
        ----
        vector: [[[1.1,1.2],[0.2,1.8]]]
        lat: [[45.5,40.1]]
        long: [[-122.7,-74.1]]

        Data is converted to Arrow before being written to disk. For maximum
        control over how data is saved, either provide the PyArrow schema to
        convert to or else provide a [PyArrow Table][pyarrow.Table] directly.

        >>> import pyarrow as pa
        >>> custom_schema = pa.schema([
        ...   pa.field("vector", pa.list_(pa.float32(), 2)),
        ...   pa.field("lat", pa.float32()),
        ...   pa.field("long", pa.float32())
        ... ])
        >>> db.create_table("table3", data, schema = custom_schema)
        LanceTable(name='table3', ...)
        >>> db["table3"].head()
        pyarrow.Table
        vector: fixed_size_list<item: float>[2]
          child 0, item: float
        lat: float
        long: float
        ----
        vector: [[[1.1,1.2],[0.2,1.8]]]
        lat: [[45.5,40.1]]
        long: [[-122.7,-74.1]]


        It is also possible to create an table from `[Iterable[pa.RecordBatch]]`:


        >>> import pyarrow as pa
        >>> def make_batches():
        ...     for i in range(5):
        ...         yield pa.RecordBatch.from_arrays(
        ...             [
        ...                 pa.array([[3.1, 4.1], [5.9, 26.5]],
        ...                     pa.list_(pa.float32(), 2)),
        ...                 pa.array(["foo", "bar"]),
        ...                 pa.array([10.0, 20.0]),
        ...             ],
        ...             ["vector", "item", "price"],
        ...         )
        >>> schema=pa.schema([
        ...     pa.field("vector", pa.list_(pa.float32(), 2)),
        ...     pa.field("item", pa.utf8()),
        ...     pa.field("price", pa.float32()),
        ... ])
        >>> db.create_table("table4", make_batches(), schema=schema)
        LanceTable(name='table4', ...)

        z6create_table is not supported for this connection typer~   )rg   rZ   Údatar]   r�   Úexist_okÚon_bad_vectorsÚ
fill_valueÚembedding_functionsr^   rš   r›   rœ   s                r   Úcreate_tablezDBConnection.create_tablez  s   € ô` "ØDó
ð 	
r   c                ó$   — | j                  |«      S re   )Ú
open_table©rg   rZ   s     r   Ú__getitem__zDBConnection.__getitem__.  s   € Ø�‰˜tÓ$Ð$r   ©r^   rš   Úindex_cache_sizeÚbranchÚversionc               ó   — t        d«      ‚)aT  Open a Lance Table in the database.

        Parameters
        ----------
        name: str
            The name of the table.
        namespace_path: List[str], optional
            The namespace to open the table from.
            None or empty list represents root namespace.
        index_cache_size: int, default 256
            **Deprecated**: Use session-level cache configuration instead.
            Create a Session with custom cache sizes and pass it to lancedb.connect().

            Set the size of the index cache, specified as a number of entries

            The exact meaning of an "entry" will depend on the type of index:
            * IVF - there is one entry for each IVF partition
            * BTREE - there is one entry for the entire index

            This cache applies to the entire opened table, across all indices.
            Setting this value higher will increase performance on larger datasets
            at the expense of more RAM
        storage_options: dict, optional
            Additional options for the storage backend. Options already set on the
            connection will be inherited by the table, but can be overridden here.
            See available options at
            <https://docs.lancedb.com/storage/>
        branch: str, optional
            If provided, open a handle scoped to this branch instead of the
            default branch. Reads and writes operate in the branch's context.
        version: int, optional
            If provided, open the table pinned to this version, producing a
            read-only handle. Composes with ``branch``: when both are given,
            opens that branch at the version; otherwise opens ``main`` at the
            version. Call ``checkout_latest`` to return to a writable state.

        Returns
        -------
        A LanceTable object representing the table.
        z4open_table is not supported for this connection typer~   )rg   rZ   r^   rš   r©   rª   r«   s          r   r¥   zDBConnection.open_table1  s   € ôd "ØBó
ð 	
r   ©ÚselectÚwhererz   Úwith_no_dataÚauto_refresh_enabledÚauto_refresh_interval_secondsc               ó   — t        d«      ‚)a  Define a materialized view named ``name`` over the table ``source``.

        Local creation and refresh require a source build with the
        ``experimental-functions`` Cargo feature. Published packages leave it
        disabled; remote Cloud/Enterprise operations remain available.

        The view is populated before creation returns. Pass
        ``with_no_data=True`` to create only its definition and empty backing
        table. The view is a normal table: it can be queried, indexed and
        searched, and it appears in ``table_names``.

        Parameters
        ----------
        name: str
            The name of the view.
        source: str
            The name of the source table.
        select: list or dict, optional
            The view's columns: column names, ``(alias, SQL expression)``
            pairs, or a dict of the same. Omitting it selects every source
            column, expanded against the source schema at creation time.
        where: str, optional
            SQL predicate; only matching source rows appear in the view.
        limit: int, optional
            Cap the view at this many rows, in materialization order.
        with_no_data: bool, default False
            Skip the initial refresh and leave the backing table empty.
        auto_refresh_enabled: bool, optional
            Enable or disable automatic refresh on Cloud and Enterprise.
            When omitted, the server determines whether automatic refresh is enabled.
            Embedded databases do not support automatic refresh.
        auto_refresh_interval_seconds: float, optional
            Positive, finite refresh interval in seconds on Cloud and Enterprise.
            When omitted, the server determines when to refresh.

        Returns
        -------
        MaterializedView
        ú<materialized views are not supported on this connection typer~   ©	rg   rZ   Úsourcer®   r¯   rz   r°   r±   r²   s	            r   Úcreate_materialized_viewz%DBConnection.create_materialized_viewg  s   € ôf "ØJó
ð 	
r   c               ó   — t        d«      ‚)aš  Submit materialized-view creation and return its job.

        The job may already be complete for a local database. Remote creation
        submits CREATE MATERIALIZED VIEW through the SQL server. Its job has
        ``job_type == "query"`` and ``id`` identifies the connection-scoped
        query. Registry event history is unavailable.
        Wait for the job before opening or querying the view.
        r´   r~   rµ   s	            r   Úcreate_materialized_view_asyncz+DBConnection.create_materialized_view_asyncž  s   € ô( "ØJó
ð 	
r   c                ó   — t        d«      ‚)úŽOpen the materialized view named ``name``.

        Raises ``ValueError`` if the table exists but is not a materialized
        view.
        r´   r~   r¦   s     r   Úopen_materialized_viewz#DBConnection.open_materialized_view¶  s   € ô "ØJó
ð 	
r   ©ry   Ú
page_limitc               ó   — t        d«      ‚)ár  The names of the materialized views in this database.

        Local listings inspect table schemas one page at a time.

        Returns a lazy iterator. ``page_limit`` limits each request, not the total;
        ``page_token`` resumes from a saved token. Requests and errors occur during
        iteration. See [pagination state][lancedb.listing.AsyncListing].
        r´   r~   ©rg   ry   r¾   s      r   Úlist_materialized_viewsz$DBConnection.list_materialized_viewsÀ  s   € ô "ØJó
ð 	
r   c                ó   — t        d«      ‚)ú¦Drop a materialized view.

        Remote drops wait for the SQL command to remove the catalog binding.
        Physical cleanup continues in the background.
        r´   r~   ©rg   rZ   r^   s      r   Údrop_materialized_viewz#DBConnection.drop_materialized_viewÏ  ó   € ô "ØJó
ð 	
r   c                ó   — t        d«      ‚)a"  Start dropping a materialized view and return its job.

        The job may already be complete for a local database. Remote jobs have
        type ``query`` and use the SQL query ID as ``id``. Waiting confirms
        catalog removal; physical cleanup continues in the background.
        r´   r~   rÅ   s      r   Údrop_materialized_view_asyncz)DBConnection.drop_materialized_view_asyncÛ  s   € ô "ØJó
ð 	
r   c                ó    — |€g }t        d«      ‚)a  Drop a table from the database.

        Parameters
        ----------
        name: str
            The name of the table.
        namespace_path: List[str], default []
            The namespace to drop the table from.
            Empty list represents root namespace.
        z4drop_table is not supported for this connection typer~   rÅ   s      r   Ú
drop_tablezDBConnection.drop_tableè  s   € ð Ð!ØˆNÜ!ØBó
ð 	
r   c                ó   — t        d«      ‚)z2Start dropping a table and return its cleanup job.z:drop_table_async is not supported for this connection typer~   rÅ   s      r   Údrop_table_asynczDBConnection.drop_table_asyncù  s   € ô "ØHó
ð 	
r   c                ó(   — |€g }|€g }t        d«      ‚)á  Rename a table in the database.

        Parameters
        ----------
        cur_name: str
            The current name of the table.
        new_name: str
            The new name of the table.
        cur_namespace_path: List[str], optional
            The namespace of the current table.
            None or empty list represents root namespace.
        new_namespace_path: List[str], optional
            The namespace to move the table to.
            If not specified, defaults to the same as cur_namespace.
        z6rename_table is not supported for this connection typer~   ©rg   Úcur_nameÚnew_nameÚcur_namespace_pathÚnew_namespace_paths        r   Úrename_tablezDBConnection.rename_table  s,   € ð, Ð%Ø!#ÐØÐ%Ø!#ÐÜ!ØDó
ð 	
r   c                ó   — t        d«      ‚)úY
        Drop database
        This is the same thing as dropping all the tables
        z7drop_database is not supported for this connection typer~   rf   s    r   Údrop_databasezDBConnection.drop_database  s   € ô
 "ØEó
ð 	
r   c                ó    — |€g }t        d«      ‚)aˆ  
        Drop all tables from the database

        Remote connections do not currently support this operation. Use
        ``list_tables()`` and ``drop_table()`` to drop tables individually.

        Parameters
        ----------
        namespace_path: List[str], optional
            The namespace to drop all tables from.
            None or empty list represents root namespace.
        z9drop_all_tables is not supported for this connection typer~   r‹   s     r   Údrop_all_tableszDBConnection.drop_all_tables(  s   € ð Ð!ØˆNÜ!ØGó
ð 	
r   c                ó   — | j                   S )zThe URI of this database.)Ú_urirf   s    r   ÚurizDBConnection.uri;  s   € ð �y‰yÐr   c              #  ó€   K  — d }	 | j                  |¬«      }|j                  E d {  –—†  |j                  }|sy Œ67 Œ­w)N)ry   )r•   Útablesry   )rg   ry   Úresponses      r   Ú_all_table_nameszDBConnection._all_table_names@  sG   è ø€ Øˆ
ØØ×'Ñ'°:Ð'Ó>ˆHØ—‘×&Ð&Ø!×,Ñ,ˆJÙØð à&ús   ‚%>§<¨>c                óB   — t        d„ | j                  «       D «       «      S )zCReturn the number of tables in the root namespace across all pages.c              3  ó    K  — | ]  }d –— Œ y­w)r1   Nr   )Ú.0rn   s     r   ú	<genexpr>z'DBConnection.__len__.<locals>.<genexpr>K  s   è ø€ Ò6˜”1Ñ6ùs   ‚)Úsumrá   rf   s    r   Ú__len__zDBConnection.__len__I  s   € äÑ6˜d×3Ñ3Ó5Ô6Ó6Ð6r   c                ó&   — || j                  «       v S )z;Return whether the root namespace contains the named table.)rá   r¦   s     r   Ú__contains__zDBConnection.__contains__M  s   € à�t×,Ñ,Ó.Ð.Ð.r   c                ó   — t        d«      ‚)á  Get the equivalent namespace client for this connection.

        For native storage connections, this returns a DirectoryNamespace
        pointing to the same root with the same storage options.

        For namespace connections, this returns the backing namespace client.

        For enterprise (remote) connections, this returns a RestNamespace
        with the same URI and authentication headers.

        Returns
        -------
        LanceNamespace
            The namespace client for this connection.
        z:namespace_client is not supported for this connection typer~   rf   s    r   Únamespace_clientzDBConnection.namespace_clientQ  s   € ô  "ØHó
ð 	
r   c                ó   — t        d«      ‚)a3  Serialize this connection for reconstruction.

        The returned string can be passed to :func:`lancedb.deserialize_conn`
        to recreate an equivalent connection, e.g. in a remote worker.

        Returns
        -------
        str
            Serialized representation of this connection.
        z3serialize is not supported for this connection typer~   rf   s    r   Ú	serializezDBConnection.serializee  s   € ô "Ð"WÓXÐXr   ©Úsecretsr^   c               óF   — | j                  |||¬«      j                  «       S )aÿ  Build and register a scalar Python UDF, then return its version.

        The server builds the OCI image and registers the completed artifact.
        This is the blocking counterpart of :meth:`create_function_async`.
        Local connections raise ``NotImplementedError``.

        Parameters
        ----------
        definition : UdfDefinition
            A callable decorated with [udf][lancedb.udf].
        secrets : sequence of EnvVarSecret, optional
            One [EnvVarSecret][lancedb.secrets.EnvVarSecret] per credential the
            Function needs, each naming a Secret and the environment variable
            its value arrives in. The Function's source is unchanged by this;
            it reads the variable the way it already did.
        namespace_path : list of str, optional
            The namespace holding the Function. None or an empty list is the
            root namespace.

        Examples
        --------
        ```python
        db.create_secret("openai-prod", os.environ["OPENAI_API_KEY"])
        db.create_function(
            analyze_caption,
            secrets=[
                EnvVarSecret(
                    secret_name="openai-prod", env_variable="OPENAI_API_KEY"
                )
            ],
        )
        ```
        rï   )Úcreate_function_asyncÚwait©rg   Ú
definitionrð   r^   s       r   Úcreate_functionzDBConnection.create_functionr  s+   € ðP ×)Ñ)Ø ¸ð *ó 
ç
‰$‹&ð	r   c               ó   — t        d«      ‚)a  Submit a scalar Python UDF for building and registration.

        The server-side job builds the OCI image, then registers the completed
        artifact. Waiting on the job returns the immutable Function version.
        Local connections raise ``NotImplementedError``.
        úFFunction catalog operations are not supported for this connection typer~   rô   s       r   rò   z"DBConnection.create_function_asyncž  s   € ô "ØTó
ð 	
r   c               ó   — t        d«      ‚)úBOpen one exact immutable Function version from the remote catalog.rø   r~   ©rg   rZ   r«   r^   s       r   Úget_functionzDBConnection.get_function¯  s   € ô "ØTó
ð 	
r   ©r^   ry   r¾   c               ó   — t        d«      ‚)aÂ  List every published immutable Function version in a namespace.

        Functions in child namespaces are not included. Results are ordered by
        Function name then version. Local connections raise
        ``NotImplementedError``.

        Examples
        --------
        List the identities available to use in Function-backed columns:

        ```python
        [(function.name, function.version) for function in db.list_functions()]
        ```

        Returns a lazy iterator. ``page_limit`` limits each request, not the total;
        ``page_token`` resumes from a saved token. Requests and errors occur during
        iteration. See [pagination state][lancedb.listing.AsyncListing].
        rø   r~   ©rg   r^   ry   r¾   s       r   Úlist_functionszDBConnection.list_functions»  s   € ô2 "ØTó
ð 	
r   c               ó   — t        d«      ‚)a˜  Drop a Function name and the object it was bound to.

        The requested version must exist in the currently named object. Returns
        True when the name was removed and False when it was absent. The
        object's content is deleted with it, which may finish after this
        returns; use :meth:`drop_function_async` to wait for that. Local
        connections raise NotImplementedError.
        rø   r~   rû   s       r   Údrop_functionzDBConnection.drop_functionØ  ó   € ô "ØTó
ð 	
r   c               ó   — t        d«      ‚)aŠ  Drop a Function name and return its cleanup job.

        The name is unbound before this returns; the object's content may still
        be being deleted. Call :meth:`Job.wait` to wait for that to finish. When
        the server deletes inline, or when nothing was bound, the returned job
        is already finished and has no id. Local connections raise
        NotImplementedError.
        rø   r~   rû   s       r   Údrop_function_asyncz DBConnection.drop_function_asyncë  r  r   c               ó   — t        d«      ‚)aB  Create a named Secret in this database.

        Fails if the name is taken, so a create never silently becomes a
        rotation. Nothing reads the value back: it is bound to a Function by
        name and resolved by the service when that Function runs. Local
        connections raise ``NotImplementedError``.
        ú<Secret operations are not supported for this connection typer~   ©rg   rZ   Úvaluer^   s       r   Úcreate_secretzDBConnection.create_secretþ  ó   € ô "ØJó
ð 	
r   c               ó   — t        d«      ‚)am  Replace the credential behind an existing Secret.

        Fails if it does not exist. Every Function bound to the Secret uses the
        new value from its next job, and no new Function version is created --
        which is how a rotation reaches columns pinned to a version registered
        before it. Local connections raise ``NotImplementedError``.
        r  r~   r  s       r   Úalter_secretzDBConnection.alter_secret  r  r   c               ó   — t        d«      ‚)aÂ  The names of every Secret in this database.

        Names only. No method returns a stored credential, by construction
        rather than by policy. Local connections raise ``NotImplementedError``.

        Returns a lazy iterator. ``page_limit`` limits each request, not the total;
        ``page_token`` resumes from a saved token. Requests and errors occur during
        iteration. See [pagination state][lancedb.listing.AsyncListing].
        r  r~   rÿ   s       r   Úlist_secretszDBConnection.list_secrets  s   € ô  "ØJó
ð 	
r   c               ó   — t        d«      ‚)a6  Drop a Secret.

        Functions bound to it fail at their next job, naming the Secret; that
        is the revocation path. The name becomes free to reuse, and a new
        Secret under it is picked up by everything still bound to that name.
        Local connections raise ``NotImplementedError``.
        r  r~   rÅ   s      r   Údrop_secretzDBConnection.drop_secret.  r  r   c               ó   — t        d«      ‚)zÊWhat this database records about a Secret: name and timestamps.

        Never the value -- there is no code path that could return one. Local
        connections raise ``NotImplementedError``.
        r  r~   rÅ   s      r   Údescribe_secretzDBConnection.describe_secret<  rÇ   r   c               ó   — t        d«      ‚)a  Create a view: a named query the database plans on every read.

        The query is planned once, at creation, so one that cannot be planned
        is refused now rather than at the first read. A view holds no rows, and
        its readers see its sources as they are at read time.

        There is no replace: a name already taken is an error, and changing a
        view is a drop followed by a create. Local connections raise
        ``NotImplementedError``.

        >>> import lancedb
        >>> db = lancedb.connect("db://my_database")  # doctest: +SKIP
        >>> view = db.create_view(
        ...     "adults", "SELECT name FROM people WHERE age >= 18"
        ... )  # doctest: +SKIP
        >>> view.schema  # doctest: +SKIP
        name: string
        ú:View operations are not supported for this connection typer~   ©rg   rZ   r[   r^   s       r   Úcreate_viewzDBConnection.create_viewH  s   € ô* "ØHó
ð 	
r   c               ó   — t        d«      ‚)a%  What this database records about a view: its defining query and the
        schema that query resolved to.

        The schema is the one recorded at creation; a source altered since then
        shows up when the view is read. Local connections raise
        ``NotImplementedError``.
        r  r~   rÅ   s      r   Údescribe_viewzDBConnection.describe_viewa  ó   € ô "ØHó
ð 	
r   c               ó   — t        d«      ‚)a  Drop a view and wait for its definition to be deleted.

        The tables it reads are untouched: a view holds no rows of its own. Use
        :meth:`drop_view_async` to get the cleanup job instead of waiting on it.
        Local connections raise ``NotImplementedError``.
        r  r~   rÅ   s      r   Ú	drop_viewzDBConnection.drop_viewo  s   € ô "ØHó
ð 	
r   c               ó   — t        d«      ‚)ab  Start dropping a view and return the job deleting its definition.

        The name is free before this returns. Call :meth:`Job.wait` to wait for
        the definition dataset to be deleted. When nothing was bound to the
        name, the returned job is already finished and has no id. Local
        connections raise ``NotImplementedError``.
        r  r~   rÅ   s      r   Údrop_view_asynczDBConnection.drop_view_async|  r  r   c               ó   — t        d«      ‚)aÉ  The names of the views in one namespace.

        Names only; a definition comes from
        [describe_view][lancedb.db.DBConnection.describe_view]. Local
        connections raise ``NotImplementedError``.

        Returns a lazy iterator. ``page_limit`` limits each request, not the total;
        ``page_token`` resumes from a saved token. Requests and errors occur during
        iteration. See [pagination state][lancedb.listing.AsyncListing].
        r  r~   rÿ   s       r   Ú
list_viewszDBConnection.list_viewsŠ  s   € ô" "ØHó
ð 	
r   c                ó   — t        d«      ‚)a¨  Open a server-side job by id, returning a handle with its record
        already populated.

        The returned [Job][lancedb.job.Job] answers for its own state,
        specification, result, failure and event history, so there is no
        separate connection-level call for any of them.

        Raises `JobNotFoundError` when the server has no such job, the way
        `open_table` does for a missing table.
        z2open_job is not supported for this connection typer~   ©rg   Újob_ids     r   Úopen_jobzDBConnection.open_jobŸ  s   € ô "Ð"VÓWÐWr   c               ó   — t        d«      ‚)á.  List server-side jobs across the database's tables.

        Returns a lazy iterator. ``page_limit`` limits each request, not the total;
        ``page_token`` resumes from a saved token. Requests and errors occur during
        iteration. See [pagination state][lancedb.listing.AsyncListing].
        z3list_jobs is not supported for this connection typer~   rÁ   s      r   Ú	list_jobszDBConnection.list_jobs¬  s   € ô "Ð"WÓXÐXr   c                ó   — t        d«      ‚)úÜRequest cancellation of a server-side job by id.

        Returns True if the server accepted the cancellation, False if no
        such job exists. Cancelling an already-terminal job is a no-op
        success.
        z4cancel_job is not supported for this connection typer~   r"  s     r   Ú
cancel_jobzDBConnection.cancel_job·  ó   € ô "ØBó
ð 	
r   c                ó   — t        d«      ‚)úñPause a server-side job by id.

        The job's workers drain and it stays parked until resumed. Returns
        "pausing", "already_paused", or "committing" -- a job finalizing its
        results cannot be parked; retry shortly.
        z3pause_job is not supported for this connection typer~   r"  s     r   Ú	pause_jobzDBConnection.pause_jobÂ  s   € ô "Ð"WÓXÐXr   c                ó   — t        d«      ‚)zõResume a paused server-side job by id.

        Its workers pick their work back up from checkpoints. Returns
        "resumed", "still_pausing" -- the pause's worker drain is not
        confirmed yet; retry shortly -- or "not_paused".
        z4resume_job is not supported for this connection typer~   r"  s     r   Ú
resume_jobzDBConnection.resume_jobË  r+  r   ©r_   Ú
parametersc               óF   — | j                  |||¬«      j                  «       S )zèExecute SQL and return a blocking Arrow reader.

        This submits through :meth:`execute_query_async` and waits until the
        initial result stream is readable. It does not wait for the full query
        to finish.
        r1  ©Úexecute_query_asyncÚreader©rg   r[   r_   r2  s       r   Úexecute_queryzDBConnection.execute_queryÖ  s.   € ð ×'Ñ'ØØ#9Ø!ð (ó 
÷ ‰&‹(ð		r   c               ó   — t        d«      ‚)a[  Start executing SQL and return its query handle.

        ``parameters`` binds values to the statement's ``$1`` / ``$name``
        placeholders. They travel as Arrow rather than as SQL text, so a
        float keeps its exact value and type and a vector stays a compact
        fixed-size list. A list binds by position, a dict binds by name, and
        a one-row ``pyarrow.RecordBatch`` or ``pyarrow.Table`` binds both
        ways. A 1-D numpy or pyarrow array becomes a fixed-size list of its
        element type, the shape of a vector column:

        .. code-block:: python

            db.execute_query(
                "SELECT id FROM docs ORDER BY distance(vector, $1) LIMIT $2",
                parameters=[np.array([0.1, 0.2, 0.3], dtype=np.float32), 10],
            )

        Parameters are supported in queries, not in DDL or DML. With or
        without parameters, the server chooses whether to stream rows on the
        initial call or return a polling continuation. The reader follows
        either path transparently. Dropping an unread handle or its reader
        stops a directly streamed query; deferred execution requires explicit
        cancellation. Open ``reader()`` directly: a streamed query needs its
        reader to make progress and reports ``running`` until the stream ends.

        Local connections do not support SQL.
        ú-SQL is not supported for this connection typer~   r7  s       r   r5  z DBConnection.execute_query_asyncé  s   € ôD "Ð"QÓRÐRr   c                ó   — t        d«      ‚)z;Describe a submitted SQL query by its connection-scoped id.r:  r~   ©rg   Úquery_ids     r   Údescribe_queryzDBConnection.describe_query  s   € ä!Ð"QÓRÐRr   )Úreturnrc   ©r?  ÚNone©r?  Úbool©NNN©r^   úOptional[List[str]]ry   úOptional[str]rz   úOptional[int]r?  r"   ©NN©r^   ú	List[str]r�   rG  r‚   úOptional[Dict[str, str]]r?  r+   ©r^   rK  r�   rG  r‡   rG  r?  r,   ©r^   rK  r?  r-   )rŽ   rK  r?  rC  )r‘   rK  r?  rC  ©r^   rF  ry   rG  rz   rH  r?  r#   ©ry   rG  rz   rH  r^   rF  r?  úIterable[str]©NNÚcreateFÚerrorç        N)rZ   Ústrrž   úOptional[DATA]r]   ú&Optional[Union[pa.Schema, LanceModel]]r�   rV  rŸ   rC  r    rV  r¡   Úfloatr¢   ú'Optional[List[EmbeddingFunctionConfig]]r^   rF  rš   rL  r›   rG  rœ   úOptional[bool]r?  rH   )rZ   rV  r?  rG   )rZ   rV  r^   rF  rš   rL  r©   rH  rª   rG  r«   rH  r?  rH   ©rZ   rV  r¶   r?   r®   r@   r¯   rG  rz   rH  r°   rC  r±   r[  r²   úOptional[float]r?  r>   ©rZ   rV  r¶   r?   r®   r@   r¯   rG  rz   rH  r°   rC  r±   r[  r²   r]  r?  ú	Job[None]©rZ   rV  r?  r>   ©ry   rG  r¾   rH  r?  úListing[str]re   ©rZ   rV  r^   rF  r?  rA  ©rZ   rV  r^   rF  r?  r_  )rZ   rV  r^   rF  ©rZ   rV  r^   rF  r?  r6   ©rÑ   rV  rÒ   rV  rÓ   rF  rÔ   rF  ©r^   rF  ©r?  rV  )r?  zGenerator[str, None, None])r?  Úint)rZ   rV  r?  rC  ©r?  r*   )rõ   r4   rð   ú Optional[Sequence[EnvVarSecret]]r^   rF  r?  r3   ©rõ   r4   rð   rk  r^   rF  r?  zJob[FunctionVersion]©rZ   rV  r«   rV  r^   rF  r?  r3   ©r^   rF  ry   rG  r¾   rH  r?  zListing[FunctionVersion]©rZ   rV  r«   rV  r^   rF  r?  rC  ©rZ   rV  r«   rV  r^   rF  r?  zTuple[bool, Job]©rZ   rV  r	  rV  r^   rF  r?  rA  ©r^   rF  ry   rG  r¾   rH  r?  rb  ©rZ   rV  r^   rF  r?  rC   ©rZ   rV  r[   rV  r^   rF  r?  rM   ©rZ   rV  r^   rF  r?  rM   ©rZ   rV  r^   rF  r?  z'Job[None]'©r#  rV  r?  r6   ©ry   rG  r¾   rH  r?  zListing[JobInfo]©r#  rV  r?  rC  ©r#  rV  r?  rV  )r[   rV  r_   rF  r2  úOptional[QueryParameters]r?  zpa.RecordBatchReader)r[   rV  r_   rF  r2  r{  r?  ÚSqlQuery©r=  zUnion[UUID, str]r?  r:   )>r   r   r   Ú__doc__rh   ro   r   rs   rl   r{   rƒ   rˆ   rŒ   r�   r’   r•   r˜   r£   r§   r¥   r·   r¹   r¼   rÂ   rÆ   rÉ   rË   rÍ   rÕ   rØ   rÚ   ÚpropertyrÝ   rá   rç   ré   rì   rî   rö   rò   rü   r   r  r  r
  r  r  r  r  r  r  r  r  r   r$  r'  r*  r.  r0  r8  r5  r>  r   r   r   rc   rc   ƒ   s  „ ñóóð òó ðð òó ðð$ /3Ø$(Ø#ð	Ià+ðIð "ðIð ð	Ið
 
óIð> #Ø/3ð	
à!ð
ð ð
ð -ð	
ð
 
!ó
ð< #Ø"&ð	
à!ð
ð ð
ð  ð	
ð
 
ó
ð6
Ø'ð
à	"ó
ó&
ó,
ð2 /3Ø$(Ø#ð	
à+ð
ð "ð
ð ð	
ð
 
ó
ð: ð %)Ø#ðð
 /3ñà!ðð ðð
 ,ðð 
òó ðð6 ð  $Ø9=ØØØ%ØØGKðq
ð /3Ø48Ø.2Ø37ñq
àðq
ð ðq
ð 7ð	q
ð
 ðq
ð ðq
ð ðq
ð ðq
ð Eðq
ð ,ðq
ð 2ðq
ð ,ðq
ð #1ðq
ð 
òq
ó ðq
óf%ð /3Ø48Ø*.Ø $Ø!%ñ4
àð4
ð ,ð	4
ð
 2ð4
ð (ð4
ð ð4
ð ð4
ð 
ó4
ðv !Ø#Ø#Ø"Ø/3Ø9=ñ5
àð5
ð 'ð5
ð
 ð5
ð ð5
ð ð5
ð ð5
ð -ð5
ð (7ð5
ð 
ó5
ðx !Ø#Ø#Ø"Ø/3Ø9=ñ
àð
ð 'ð
ð
 ð
ð ð
ð ð
ð ð
ð -ð
ð (7ð
ð 
ó
ó0
ð .2Ètñ
Ø*ð
Ø?Lð
à	ó
ð  @Dð

Øð

Ø)<ð

à	ó

ð @Dð
Øð
Ø)<ð
à	ó
ô
ð$ @Dð
Øð
Ø)<ð
à	ó
ð 37Ø26ð
àð
ð ð
ð 0ð	
ð
 0ó
ò<
ô
ð& òó ðóó7ó/ó
ó(Yð" 59Ø.2ñ*à!ð*ð 2ð	*ð
 ,ð*ð 
ó*ð` 59Ø.2ñ
à!ð
ð 2ð	
ð
 ,ð
ð 
ó
ð, /3ñ

àð

ð ð	

ð
 ,ð

ð 
ó

ð /3Ø$(Ø$(ñ
ð ,ð
ð "ð	
ð
 "ð
ð 
"ó
ðD /3ñ
àð
ð ð	
ð
 ,ð
ð 
ó
ð0 /3ñ
àð
ð ð	
ð
 ,ð
ð 
ó
ð( OSñ
Øð
Ø #ð
Ø8Kð
à	ó
ð OSñ
Øð
Ø #ð
Ø8Kð
à	ó
ð" /3Ø$(Ø$(ñ
ð ,ð
ð "ð	
ð
 "ð
ð 
ó
ð* CGñ
Øð
Ø,?ð
à	ó
ð CGñ

Øð

Ø,?ð

à	ó

ð OSñ
Øð
Ø #ð
Ø8Kð
à	ó
ð4 CGñ
Øð
Ø,?ð
à	ó
ð CGñ
Øð
Ø,?ð
à	ó
ð CGñ
Øð
Ø,?ð
à	ó
ð" /3Ø$(Ø$(ñ
ð ,ð
ð "ð	
ð
 "ð
ð 
ó
ó*Xð .2Ètñ	YØ*ð	YØ?Lð	Yà	ó	Yó	
óYó	
ð 7;Ø04ñàðð !4ð	ð
 .ðð 
óð. 7;Ø04ñ"Sàð"Sð !4ð	"Sð
 .ð"Sð 
ó"SôHSr   rc   c                  ó  — e Zd ZdZdddddddœ	 	 	 	 	 	 	 	 	 	 	 	 	 dFd„ZedGd„«       ZedHd„«       ZedId„«       Ze		 	 	 	 dJd	„«       Z
dId
„ZedKd„«       ZedLd„«       ZedId„«       ZdMd„ZedNd„«       Ze	 	 	 dO	 	 	 	 	 	 	 dPd„«       Ze	 	 dQ	 	 	 	 	 	 	 dRd„«       Ze	 	 dQ	 	 	 	 	 	 	 dSd„«       Ze	 	 	 	 dTd„«       Ze	 	 	 dO	 	 	 	 	 	 	 dUd„«       Ze	 	 dQddœ	 	 	 	 	 	 	 dVd„«       Ze	 	 	 	 	 	 	 dWdddddœ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dXd„«       Zeddddddœ	 	 	 	 	 	 	 	 	 	 	 	 	 dYd„«       Zedddddddœ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dZd„«       Zedddddddœ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d[d„«       Zed\d„«       Zedddœ	 	 	 	 	 d]d „«       Ze	 d^	 	 	 	 	 d_d!„«       Ze	 d^	 	 	 	 	 d`d"„«       Zdddd#d$œ	 	 	 	 	 	 	 	 	 	 	 	 	 dad%„Z e	 	 db	 	 	 	 	 dcd&„«       Z!e	 d^	 	 	 	 	 ddd'„«       Z"ed^ded(„«       Z#e	 	 dQ	 	 	 	 	 	 	 dfd)„«       Z$edgd*„«       Z%eddd+œ	 	 	 	 	 	 	 dhd,„«       Z&eddœ	 	 	 	 	 	 	 did-„«       Z'edddd.œ	 	 	 	 	 	 	 djd/„«       Z(eddœ	 	 	 	 	 	 	 dkd0„«       Z)eddœ	 	 	 	 	 	 	 dld1„«       Z*eddœ	 	 	 	 	 	 	 dmd2„«       Z+eddœ	 	 	 	 	 	 	 dmd3„«       Z,edddd.œ	 	 	 	 	 	 	 dnd4„«       Z-eddœ	 	 	 	 	 d_d5„«       Z.eddœ	 	 	 	 	 dod6„«       Z/eddœ	 	 	 	 	 	 	 dpd7„«       Z0eddœ	 	 	 	 	 dqd8„«       Z1eddœ	 	 	 	 	 d_d9„«       Z2eddœ	 	 	 	 	 drd:„«       Z3edddd.œ	 	 	 	 	 	 	 dnd;„«       Z4edddœ	 	 	 	 	 dsd<„«       Z5edtd=„«       Z6edud>„«       Z7edud?„«       Z8edvd@„«       Z9 e:jv                  dAdBe<dC¬D«      edE„ «       «       Z=y)wÚLanceDBConnectionaÈ  
    A connection to a LanceDB database.

    Parameters
    ----------
    uri: str or Path
        The root uri of the database.
    read_consistency_interval: timedelta, default None
        The interval at which to check for updates to the table from other
        processes. If None, then consistency is not checked. For performance
        reasons, this is the default. For strong consistency, set this to
        zero seconds. Then every read will check for updates from other
        processes. As a compromise, you can set this to a non-zero timedelta
        for eventual consistency. If more than that interval has passed since
        the last check, then the table will be checked for updates. Note: this
        consistency only applies to read operations. Write operations are
        always consistent.

    Examples
    --------
    >>> import lancedb
    >>> db = lancedb.connect("./.lancedb")
    >>> db.create_table("my_table", data=[{"vector": [1.1, 1.2], "b": 2},
    ...                                   {"vector": [0.5, 1.3], "b": 4}])
    LanceTable(name='my_table', ...)
    >>> db.create_table("another_table", data=[{"vector": [0.4, 0.4], "b": 6}])
    LanceTable(name='another_table', ...)
    >>> sorted(db.table_names())
    ['another_table', 'my_table']
    >>> len(db)
    2
    >>> db["my_table"]
    LanceTable(name='my_table', ...)
    >>> "my_table" in db
    True
    >>> db.drop_table("my_table")
    >>> db.drop_table("another_table")
    NF)Úread_consistency_intervalrš   ÚsessionÚmanifest_enabledÚnamespace_client_propertiesÚ_innerc               óú  ‡‡‡‡‡‡— ‰| _         ‰| _        ‰| _        ‰| _        |�|| _        || _        d | _        y t        ‰t        «      st        ‰«      }t        ‰t        «      xs dk(  }	|	r¸t        ‰t        «      rn‰j                  d«      r‰dd  Šn‰j                  d«      r‰dd  Št        j                  dk(  r#t        ‰«      dk\  r‰d   d	k(  r‰d
   dk(  r‰dd  Št        ‰«      Š‰j                  «       j!                  «       Št        ‰«      j#                  dd¬«       |�|j%                  «       Šnd Šˆˆˆˆˆˆfd„}
t'        t)        j*                   |
«       «      «      | _        || _        d | _        y )NÚfilezfile://é   zfile:/é   Úwin32r   r   ú/é   ú:r1   T)ÚparentsrŸ   c               “  ó\   •K  — t        t        ‰«      d d d d ‰d ‰‰‰ ‰«      ƒ d {  –—† S 7 Œ­wre   )Úlancedb_connectr'   )r„  r…  Úread_consistency_interval_secsrƒ  rš   rÝ   s   €€€€€€r   Ú
do_connectz.LanceDBConnection.__init__.<locals>.do_connectn  sD   øè ø€ Ü(Ü˜SÓ!ØØØØØ.ØØØØ Ø+ó÷ ð ð ús   ƒ",¥*¦,)rš   Ú_manifest_enabledÚ_namespace_client_propertiesÚ_sessionÚ_connÚ_read_consistency_intervalÚ_cached_namespace_clientÚ
isinstancer   rJ   rV  Ú
startswithÚsysÚplatformÚlenÚ
expanduserÚabsoluteÚmkdirÚtotal_secondsÚAsyncConnectionr)   Úrun)rg   rÝ   r‚  rš   rƒ  r„  r…  r†  ÚschemeÚis_localr“  r’  s    ` ````    @r   Ú__init__zLanceDBConnection.__init__:  si  ý€ ð  /ˆÔØ!1ˆÔØ,GˆÔ)ð  ˆŒØÐØˆDŒJð /HˆDÔ+Ø,0ˆDÔ)Øä˜#œtÔ$Ü# CÓ(ˆFÜ˜c¤4Ó(Ò<¨F°fÑ,<ˆÙÜ˜#œsÔ#ð —>‘> )Ô,Ø˜a˜b˜'‘CØ—^‘^ HÔ-Ø˜a˜b˜'�Cä—<‘< 7Ò*ä˜3“x 1’}¨¨Q©°3ª¸3¸q¹6ÀSº=Ø! ! "˜g˜ä˜3“i�Ø—.‘.Ó"×+Ñ+Ó-ˆCÜ�‹I�O‰O D°4ˆOÔ8à$Ð0Ø-F×-TÑ-TÓ-VÑ*à-1Ð*÷	ñ 	ô( %¤T§X¡X©j«lÓ%;Ó<ˆŒ
ð +DˆÔ'ØBFˆÕ%r   c                ó   — | j                   S re   )r˜  rf   s    r   r‚  z+LanceDBConnection.read_consistency_intervalˆ  s   € à×.Ñ.Ð.r   c                ó   — | j                   S )zÀReturn the session supplied when this connection was opened.

        None when the caller did not pass a session, including connections
        reconstructed with :meth:`from_inner`.
        )r–  rf   s    r   rƒ  zLanceDBConnection.sessionŒ  s   € ð �}‰}Ðr   c                ó.   — | j                   j                  S re   )r—  rÝ   rf   s    r   rÝ   zLanceDBConnection.uri•  s   € à�z‰z�~‰~Ðr   c                ó   —  | d ||¬«      S )N)r‚  r†  r   )ÚclsÚinnerr‚  s      r   Ú
from_innerzLanceDBConnection.from_inner™  s   € ñ ØØ&?Øô
ð 	
r   c                ób   — | j                   j                  › d| j                  j                  ›d�S )Nz(uri=ú))Ú	__class__r   r—  rÝ   rf   s    r   Ú__repr__zLanceDBConnection.__repr__¥  s)   € Ø—.‘.×)Ñ)Ð*¨%°·
±
·±Ð/AÀÐCÐCr   c                ó6   — | j                   j                  «       S re   )r—  rs   rf   s    r   rs   zLanceDBConnection.is_open¨  s   € à�z‰z×!Ñ!Ó#Ð#r   c                ó8   — | j                   j                  «        y re   )r—  rl   rf   s    r   rl   zLanceDBConnection.close¬  s   € à�
‰
×ÑÕr   c           	     óÒ   — dd l }| j                  }|j                  d| j                  | j                  | j
                  | j                  |r|j                  «       dœ«      S d dœ«      S )Nr   Úlocal)Úconnection_typerÝ   rš   r„  r…  Ú!read_consistency_interval_seconds)Újsonr‚  ÚdumpsrÝ   rš   r”  r•  r¢  )rg   r¹  Úrcis      r   rî   zLanceDBConnection.serialize°  sm   € ãà×,Ñ,ˆØ�z‰zà#*Ø—x‘xØ#'×#7Ñ#7Ø$(×$:Ñ$:Ø/3×/PÑ/Pá+.�C×%Ñ%Ó'ñ	ó
ð 	
ð 59ñ	ó
ð 	
r   c              ƒ  ó”   K  — t        t        | j                  «      ƒ d {  –—† «      }|j                  ||¬«      ƒ d {  –—† S 7 Œ#7 Œ­w)N)Ústart_afterrz   )r£  r‘  rÝ   r˜   )rg   r½  rz   Úconns       r   Ú_async_get_table_namesz(LanceDBConnection._async_get_table_namesÂ  s>   è ø€ Ü¤_°T·X±XÓ%>×>Ó?ˆØ×%Ñ%°+ÀUÐ%ÓK×KÐKð  ?øØKús    ‚A A¡A¿AÁ AÁAc                ó.   — | j                   j                  S re   )r—  r†  rf   s    r   r†  zLanceDBConnection._innerÆ  s   € à�z‰z× Ñ Ð r   c                óX   — |€g }t        | j                  j                  |||¬«      «      S )a†  List immediate child namespace names in the given namespace.

        Parameters
        ----------
        namespace_path: List[str], optional
            The parent namespace to list namespaces in.
            None or empty list represents root namespace.
        page_token: str, optional
            Token for pagination. Use the token from a previous response
            to get the next page of results.
        limit: int, optional
            The maximum number of results to return.

        Returns
        -------
        NamespaceListing
            Response containing namespace names and optional page_token for pagination.
        ©r^   ry   rz   )r"   r—  r{   rx   s       r   r{   z!LanceDBConnection.list_namespacesÊ  s:   € ð2 Ð!ØˆNÜØ�J‰J×&Ñ&Ø-¸*ÈEð 'ó ó
ð 	
r   c                ód   — t        j                  | j                  j                  |||¬«      «      S )N)r^   r�   r‚   )r)   r¤  r—  rƒ   r€   s       r   rƒ   z"LanceDBConnection.create_namespaceë  s5   € ô �x‰xØ�J‰J×'Ñ'Ø-ØØ%ð (ó ó
ð 	
r   c                óÎ   — 	 t        j                  | j                  j                  |||¬«      «      S # t        $ r(}dt        |«      v rt        t        |«      «      |‚‚ d }~ww xY w)N)r^   r�   r‡   zNamespace not empty)r)   r¤  r—  rˆ   ÚRuntimeErrorrV  r/   )rg   r^   r�   r‡   Úes        r   rˆ   z LanceDBConnection.drop_namespaceú  sj   € ð	Ü—8‘8Ø—
‘
×)Ñ)Ø#1ØØ%ð *ó óð øô ò 	Ø$¬¨A«Ñ.Ü,¬S°«VÓ4¸!Ð;Øûð	ús   ‚03 ³	A$¼#AÁA$c                ó`   — t        j                  | j                  j                  |¬«      «      S ©Nr–   )r)   r¤  r—  rŒ   r‹   s     r   rŒ   z$LanceDBConnection.describe_namespace  s%   € ô �x‰x˜Ÿ
™
×5Ñ5À^Ð5ÓTÓUÐUr   c                óX   — |€g }t        | j                  j                  |||¬«      «      S )r”   rÂ  )r#   r—  r•   rx   s       r   r•   zLanceDBConnection.list_tables  s:   € ð4 Ð!ØˆNÜØ�J‰J×"Ñ"Ø-¸*ÈEð #ó ó
ð 	
r   r–   c               ó¤   — ddl }|j                  dt        d¬«       |€g }t        j                  | j
                  j                  |||¬«      «      S )ay  Get the names of all tables in the database. The names are sorted.

        .. deprecated::
            Use :meth:`list_tables` instead, which provides proper pagination support.

        Parameters
        ----------
        namespace_path: List[str], optional
            The namespace to list tables in.
        page_token: str, optional
            The token to use for pagination.
        limit: int, optional
            The maximum number of tables to return. None returns all tables;
            zero returns an empty list.

        Returns
        -------
        Iterator of str.
            A list of table names.
        r   Nú6table_names() is deprecated, use list_tables() insteadr�  ©Ú
stacklevel©r^   r½  rz   )ÚwarningsÚwarnÚDeprecationWarningr)   r¤  r—  r˜   )rg   ry   rz   r^   rÏ  s        r   r˜   zLanceDBConnection.table_names6  s]   € ó8 	à�‰ØDÜØð 	ô 	
ð
 Ð!ØˆNÜ�x‰xØ�J‰J×"Ñ"Ø-¸:ÈUð #ó ó
ð 	
r   r™   c	               óh   — |	€g }	t        |«       t        j                  | |||||||||	|
||¬«      }|S )zèCreate a table in the database.

        Parameters
        ----------
        namespace_path: List[str], optional
            The namespace to create the table in.

        See
        ---
        DBConnection.create_table
        )	r�   rŸ   r    r¡   r¢   r^   rš   r›   rœ   )rK   rG   rS  )rg   rZ   rž   r]   r�   rŸ   r    r¡   r¢   r^   rš   r›   rœ   Útbls                 r   r£   zLanceDBConnection.create_tablea  sU   € ð8 Ð!ØˆNÜ˜DÔ!ä×ÑØØØØØØØ)Ø!Ø 3Ø)Ø+Ø!5Ø%=ô
ˆð ˆ
r   r¨   c               ó–  — |€g }|�ddl }|j                  dt        d¬«       	 t        j                  | ||||¬«      }|�|j                  j                  ||«      }|S |�|j                  |«       |S # t
        t        f$ rF}	|r>dt        |	«      v sdt        |	«      v r$||gz   }
t        d	d
j                  |
«      › �«      |	‚‚ d}	~	ww xY w)a›  Open a table in the database.

        Parameters
        ----------
        name: str
            The name of the table.
        namespace_path: List[str], optional
            The namespace to open the table from.  When non-empty, the
            table is resolved through the directory namespace client.
        branch: str, optional
            If provided, open a handle scoped to this branch instead of the
            default branch. Reads and writes operate in the branch's context.
        version: int, optional
            If provided, open the table pinned to this version, producing a
            read-only handle. Composes with ``branch``: when both are given,
            opens that branch at the version; otherwise opens ``main`` at the
            version. Call ``checkout_latest`` to return to a writable state.

        Returns
        -------
        A LanceTable object representing the table.
        Nr   z™index_cache_size is deprecated. Use session-level cache configuration instead. Create a Session with custom cache sizes and pass it to lancedb.connect().r�  rÌ  )r^   rš   r©   zTable not foundzwas not foundzTable not found: ú$)rÏ  rÐ  rÑ  rG   ÚopenrÅ  Ú
ValueErrorrV  r0   ÚjoinÚbranchesÚcheckout)rg   rZ   r^   rš   r©   rª   r«   rÏ  rÓ  rÆ  r‘   s              r   r¥   zLanceDBConnection.open_table’  sý   € ðB Ð!ØˆNØÐ'Ûà�M‰Mð4ô #Øð ô ð	Ü—/‘/ØØØ-Ø /Ø!1ôˆCð" ÐØ—,‘,×'Ñ'¨°Ó8ˆCð ˆ
ð Ð Ø�L‰L˜Ô!Øˆ
øô œjÐ)ò 	ÙØ!¤S¨£VÑ+¨Ä#ÀaÃ&Ñ/Hà)¨T¨FÑ2�Ü(Ø'¨¯©°Ó(:Ð';Ð<óàðð ûð	ús   ¤A3 Á3CÂACÃCr­   c               ó¢   — t        j                  | j                  j                  ||||||||¬«      «       t	        | j                  |«      «      S )a   Define a materialized view named ``name`` over the table ``source``.

        Local creation and refresh require a source build with the
        ``experimental-functions`` Cargo feature. Published packages leave it
        disabled; remote Cloud/Enterprise operations remain available.
        See
        [DBConnection.create_materialized_view][lancedb.DBConnection.create_materialized_view].

        Examples
        --------
        >>> import lancedb
        >>> db = lancedb.connect("./.lancedb")
        >>> data = [{"name": "ada", "age": 36}, {"name": "kid", "age": 7}]
        >>> table = db.create_table("people", data)
        >>> view = db.create_materialized_view(  # doctest: +SKIP
        ...     "adults",
        ...     "people",
        ...     select=["name", ("shout", "upper(name)")],
        ...     where="age >= 18",
        ... )
        >>> view.table.count_rows()  # doctest: +SKIP
        1
        r­   )r)   r¤  r—  r·   r>   r¥   rµ   s	            r   r·   z*LanceDBConnection.create_materialized_viewØ  sV   € ôH 	�‰Ø�J‰J×/Ñ/ØØØØØØ)Ø%9Ø.Kð 0ó 	ô	
ô   §¡°Ó 5Ó6Ð6r   c               ó„   — t        j                  | j                  j                  ||||||||¬«      «      }	t	        |	«      S )Nr­   )r)   r¤  r—  r¹   r6   )
rg   rZ   r¶   r®   r¯   rz   r°   r±   r²   Újobs
             r   r¹   z0LanceDBConnection.create_materialized_view_async
  sL   € ô �h‰hØ�J‰J×5Ñ5ØØØØØØ)Ø%9Ø.Kð 6ó 	ó
ˆô �3‹xˆr   c                óR   — t        | j                  |«      «      }|j                   |S )z*Open the materialized view named ``name``.)r>   r¥   rõ   ©rg   rZ   Úviews      r   r¼   z(LanceDBConnection.open_materialized_view%  s#   € ô   §¡°Ó 5Ó6ˆØ�ŠØˆr   r½   c               óN   — t        | j                  j                  ||¬«      «      S )a0  The names of the materialized views in this database.

        Returns a lazy iterator. ``page_limit`` limits each request, not the total;
        ``page_token`` resumes from a saved token. Requests and errors occur during
        iteration. See [pagination state][lancedb.listing.AsyncListing].
        r½   )r!   r—  rÂ   rÁ   s      r   rÂ   z)LanceDBConnection.list_materialized_views,  s-   € ô Ø�J‰J×.Ñ.Ø%°*ð /ó ó
ð 	
r   c                ól   — |€g }t        j                  | j                  j                  ||¬«      «       y rÈ  )r)   r¤  r—  rÆ   rÅ   s      r   rÆ   z(LanceDBConnection.drop_materialized_view<  s/   € ð Ð!ØˆNÜ�‰�—‘×2Ñ2°4ÈÐ2ÓWÕXr   c                ó€   — |€g }t        j                  | j                  j                  ||¬«      «      }t	        |«      S rÈ  )r)   r¤  r—  rÉ   r6   ©rg   rZ   r^   rÝ  s       r   rÉ   z.LanceDBConnection.drop_materialized_view_asyncD  s?   € ð Ð!ØˆNÜ�h‰hØ�J‰J×3Ñ3°DÈÐ3ÓXó
ˆô �3‹xˆr   T©Útarget_namespace_pathÚsource_versionÚ
source_tagÚ
is_shallowc          
     ó¢   — |€g }t        j                  | j                  j                  ||||||¬«      «       t	        j
                  | ||¬«      S )aw  Clone a table from a source table.

        A shallow clone creates a new table that shares the underlying data files
        with the source table but has its own independent manifest. This allows
        both the source and cloned tables to evolve independently while initially
        sharing the same data, deletion, and index files.

        Parameters
        ----------
        target_table_name: str
            The name of the target table to create.
        source_uri: str
            The URI of the source table to clone from.
        target_namespace_path: List[str], optional
            The namespace for the target table.
            None or empty list represents root namespace.
        source_version: int, optional
            The version of the source table to clone.
        source_tag: str, optional
            The tag of the source table to clone.
        is_shallow: bool, default True
            Whether to perform a shallow clone (True) or deep clone (False).
            Currently only shallow clone is supported.

        Returns
        -------
        A LanceTable object representing the cloned table.
        rå  r–   )r)   r¤  r—  Úclone_tablerG   rÖ  )rg   Útarget_table_nameÚ
source_uriræ  rç  rè  ré  s          r   rë  zLanceDBConnection.clone_tableO  sb   € ðL !Ð(Ø$&Ð!Ü�‰Ø�J‰J×"Ñ"Ø!ØØ&;Ø-Ø%Ø%ð #ó ô		
ô �‰ØØØ0ô
ð 	
r   c                ón   — |€g }t        j                  | j                  j                  |||¬«      «       y)aG  Drop a table from the database.

        Parameters
        ----------
        name: str
            The name of the table.
        namespace_path: List[str], optional
            The namespace to drop the table from.
        ignore_missing: bool, default False
            If True, ignore if the table does not exist.
        N©r^   Úignore_missing)r)   r¤  r—  rË   )rg   rZ   r^   rð  s       r   rË   zLanceDBConnection.drop_table‡  s9   € ð$ Ð!ØˆNÜ�‰Ø�J‰J×!Ñ!Ø ^ÀNð "ó õ	
r   c                ó¾   — |€g }t        j                  | j                  j                  ||¬«      «      }t	        t        |t        «      r|«      S t        |«      «      S )zÅStart dropping a table and return its cleanup job.

        The table may become unavailable before its data files are removed.
        Call :meth:`Job.wait` to wait for cleanup to finish.
        r–   )r)   r¤  r—  rÍ   r6   rš  r5   rä  s       r   rÍ   z"LanceDBConnection.drop_table_async¡  sQ   € ð Ð!ØˆNÜ�h‰h�t—z‘z×2Ñ2°4ÈÐ2ÓWÓXˆÜœ* S¬(Ô3�3ÓGÐG¼À#»ÓGÐGr   c                ój   — |€g }t        j                  | j                  j                  |¬«      «       y rÈ  ©r)   r¤  r—  rÚ   r‹   s     r   rÚ   z!LanceDBConnection.drop_all_tables¯  s+   € àÐ!ØˆNÜ�‰�—‘×+Ñ+¸>Ð+ÓJÕKr   c                óx   — |€g }|€g }t        j                  | j                  j                  ||||¬«      «       y)a�  Rename a table in the database.

        Parameters
        ----------
        cur_name: str
            The current name of the table.
        new_name: str
            The new name of the table.
        cur_namespace_path: List[str], optional
            The namespace of the current table.
        new_namespace_path: List[str], optional
            The namespace to move the table to.
        N©rÓ   rÔ   )r)   r¤  r—  rÕ   rÐ   s        r   rÕ   zLanceDBConnection.rename_tableµ  sK   € ð* Ð%Ø!#ÐØÐ%Ø!#ÐÜ�‰Ø�J‰J×#Ñ#ØØØ#5Ø#5ð	 $ó õ	
r   c                óp   — t        t        j                  | j                  j	                  |«      «      «      S )úmOpen a server-side job by id. See
        [DBConnection.open_job][lancedb.db.DBConnection.open_job].
        )r6   r)   r¤  r—  r$  r"  s     r   r$  zLanceDBConnection.open_job×  s'   € ô
 ”4—8‘8˜DŸJ™J×/Ñ/°Ó7Ó8Ó9Ð9r   rï   c               óz   — t        j                  | j                  j                  |||¬«      «      }t	        |«      S )Nrï   )r)   r¤  r—  rò   r6   )rg   rõ   rð   r^   rÝ  s        r   rò   z'LanceDBConnection.create_function_asyncÞ  s;   € ô �h‰hØ�J‰J×,Ñ,Ø G¸Nð -ó ó
ˆô
 �3‹xˆr   c               ód   — t        j                  | j                  j                  |||¬«      «      S ©N)r«   r^   )r)   r¤  r—  rü   rû   s       r   rü   zLanceDBConnection.get_functioní  s3   € ô �x‰xØ�J‰J×#Ñ#Ø˜g°nð $ó ó
ð 	
r   rý   c               óP   — t        | j                  j                  |||¬«      «      S )a
  List functions.

        Returns a lazy iterator. ``page_limit`` limits each request, not the total;
        ``page_token`` resumes from a saved token. Requests and errors occur during
        iteration. See [pagination state][lancedb.listing.AsyncListing].
        rý   )r!   r—  r   rÿ   s       r   r   z LanceDBConnection.list_functionsû  s1   € ô Ø�J‰J×%Ñ%Ø-Ø%Ø%ð &ó ó
ð 	
r   c               ód   — t        j                  | j                  j                  |||¬«      «      S rú  )r)   r¤  r—  r  rû   s       r   r  zLanceDBConnection.drop_function  s3   € ô �x‰xØ�J‰J×$Ñ$Ø˜g°nð %ó ó
ð 	
r   c               ó„   — t        j                  | j                  j                  |||¬«      «      \  }}|t	        |«      fS rú  )r)   r¤  r—  r  r6   ©rg   rZ   r«   r^   ÚdroppedrÝ  s         r   r  z%LanceDBConnection.drop_function_async  sE   € ô —x‘xØ�J‰J×*Ñ*Ø˜g°nð +ó ó
‰ˆ�ð
 œ˜C›Ð Ð r   c               óf   — t        j                  | j                  j                  |||¬«      «       y rÈ  )r)   r¤  r—  r
  r  s       r   r
  zLanceDBConnection.create_secret.  s&   € ô 	�‰�—‘×)Ñ)¨$°ÀnÐ)ÓUÕVr   c               óf   — t        j                  | j                  j                  |||¬«      «       y rÈ  )r)   r¤  r—  r  r  s       r   r  zLanceDBConnection.alter_secret4  s&   € ô 	�‰�—‘×(Ñ(¨¨uÀ^Ð(ÓTÕUr   c               óP   — t        | j                  j                  |||¬«      «      S )a  List secrets.

        Returns a lazy iterator. ``page_limit`` limits each request, not the total;
        ``page_token`` resumes from a saved token. Requests and errors occur during
        iteration. See [pagination state][lancedb.listing.AsyncListing].
        rý   )r!   r—  r  rÿ   s       r   r  zLanceDBConnection.list_secrets:  s1   € ô Ø�J‰J×#Ñ#Ø-Ø%Ø%ð $ó ó
ð 	
r   c               ód   — t        j                  | j                  j                  ||¬«      «       y rÈ  )r)   r¤  r—  r  rÅ   s      r   r  zLanceDBConnection.drop_secretP  s$   € ô 	�‰�—‘×'Ñ'¨¸^Ð'ÓLÕMr   c               ób   — t        j                  | j                  j                  ||¬«      «      S rÈ  )r)   r¤  r—  r  rÅ   s      r   r  z!LanceDBConnection.describe_secretV  s'   € ô �x‰x˜Ÿ
™
×2Ñ2°4ÈÐ2ÓWÓXÐXr   c               ód   — t        j                  | j                  j                  |||¬«      «      S rÈ  )r)   r¤  r—  r  r  s       r   r  zLanceDBConnection.create_view\  s.   € ô �x‰xØ�J‰J×"Ñ" 4¨¸~Ð"ÓNó
ð 	
r   c               ób   — t        j                  | j                  j                  ||¬«      «      S rÈ  )r)   r¤  r—  r  rÅ   s      r   r  zLanceDBConnection.describe_viewd  s'   € ô �x‰x˜Ÿ
™
×0Ñ0°ÀnÐ0ÓUÓVÐVr   c               ód   — t        j                  | j                  j                  ||¬«      «       y rÈ  )r)   r¤  r—  r  rÅ   s      r   r  zLanceDBConnection.drop_viewj  s$   € ô 	�‰�—‘×%Ñ% d¸>Ð%ÓJÕKr   c               ót   — t        t        j                  | j                  j	                  ||¬«      «      «      S rÈ  )r6   r)   r¤  r—  r  rÅ   s      r   r  z!LanceDBConnection.drop_view_asyncp  s1   € ô Ü�H‰H�T—Z‘Z×/Ñ/°À^Ð/ÓTÓUó
ð 	
r   c               óP   — t        | j                  j                  |||¬«      «      S )a  List views.

        Returns a lazy iterator. ``page_limit`` limits each request, not the total;
        ``page_token`` resumes from a saved token. Requests and errors occur during
        iteration. See [pagination state][lancedb.listing.AsyncListing].
        rý   )r!   r—  r   rÿ   s       r   r   zLanceDBConnection.list_viewsx  s1   € ô Ø�J‰J×!Ñ!Ø-Ø%Ø%ð "ó ó
ð 	
r   c               óN   — t        | j                  j                  ||¬«      «      S ©r&  r½   )r!   r—  r'  rÁ   s      r   r'  zLanceDBConnection.list_jobsŽ  s(   € ô Ø�J‰J× Ñ ¨JÀ:Ð ÓNó
ð 	
r   c                ó^   — t        j                  | j                  j                  |«      «      S )r)  )r)   r¤  r—  r*  r"  s     r   r*  zLanceDBConnection.cancel_jobœ  s"   € ô �x‰x˜Ÿ
™
×-Ñ-¨fÓ5Ó6Ð6r   c                ó^   — t        j                  | j                  j                  |«      «      S )zfPause a server-side job by id.

        Returns "pausing", "already_paused", or "committing".
        )r)   r¤  r—  r.  r"  s     r   r.  zLanceDBConnection.pause_job¦  s"   € ô �x‰x˜Ÿ
™
×,Ñ,¨VÓ4Ó5Ð5r   c                ó^   — t        j                  | j                  j                  |«      «      S )zmResume a paused server-side job by id.

        Returns "resumed", "still_pausing", or "not_paused".
        )r)   r¤  r—  r0  r"  s     r   r0  zLanceDBConnection.resume_job®  s"   € ô �x‰x˜Ÿ
™
×-Ñ-¨fÓ5Ó6Ð6r   c                ó–   — | j                   €2t        j                  | j                  j	                  «       «      | _         | j                   S )aY  Get the equivalent namespace client for this connection.

        Returns a DirectoryNamespace pointing to the same root with the
        same storage options.  The result is cached for the lifetime of
        this connection.

        Returns
        -------
        LanceNamespace
            The namespace client for this connection.
        )r™  r)   r¤  r—  rì   rf   s    r   rì   z"LanceDBConnection.namespace_client¶  s:   € ð ×(Ñ(Ð0Ü,0¯H©H°T·Z±Z×5PÑ5PÓ5RÓ,SˆDÔ)Ø×,Ñ,Ð,r   ú0.15.1ú0.17úUse drop_all_tables() instead©Údeprecated_inÚ
removed_inÚcurrent_versionÚdetailsc                ó^   — t        j                  | j                  j                  «       «       y re   ró  rf   s    r   rØ   zLanceDBConnection.drop_databaseÇ  s   € ô 	�‰�—‘×+Ñ+Ó-Õ.r   )rÝ   rS   r‚  úOptional[timedelta]rš   rL  rƒ  úOptional[Session]r„  rC  r…  rL  r†  zOptional[LanceDbConnection]©r?  r  )r?  r  rh  )r­  ÚLanceDbConnectionr‚  r  rB  r@  )r½  rG  rz   ri  )r?  r  rD  rE  rI  rJ  rM  rN  rO  rP  rR  )rZ   rV  rž   rW  r]   rX  r�   rV  rŸ   rC  r    rV  r¡   rY  r¢   rZ  r^   rF  rš   rL  r›   rG  rœ   r[  r?  rG   )rZ   rV  r^   rF  rš   rL  r©   rH  rª   rG  r«   rH  r?  rG   r\  r^  r`  ra  re   rc  rd  )rì  rV  rí  rV  ræ  rF  rç  rH  rè  rG  ré  rC  r?  rG   )NF©rZ   rV  r^   rF  rð  rC  re  rg  rf  rw  rl  rm  rn  ro  rp  rq  rr  rs  rt  ru  rv  rx  ry  rz  rj  )>r   r   r   r~  r§  r  r‚  rƒ  rÝ   Úclassmethodr®  r²  r   rs   rl   rî   r¿  r†  r{   rƒ   rˆ   rŒ   r•   r˜   r£   r¥   r·   r¹   r¼   rÂ   rÆ   rÉ   rë  rË   rÍ   rÚ   rÕ   r$  rò   rü   r   r  r  r
  r  r  r  r  r  r  r  r  r   r'  r*  r.  r0  rì   ÚdeprecationÚ
deprecatedr2   rØ   r   r   r   r�  r�    s  „ ñ%ðV :>Ø48Ø%)Ø!&Ø@DØ.2ñLGàðLGð $7ð	LGð
 2ðLGð #ðLGð ðLGð &>ðLGð ,óLGð\ ò/ó ð/ð òó ðð òó ðð ð	
à ð	
ð $7ò	
ó ð	
óDð ò$ó ð$ð òó ðð ò
ó ð
ó"Lð ò!ó ð!ð ð /3Ø$(Ø#ð	
à+ð
ð "ð
ð ð	
ð
 
ò
ó ð
ð@ ð #Ø/3ð	
à!ð
ð ð
ð -ð	
ð
 
!ò
ó ð
ð ð #Ø"&ð	à!ðð ðð  ð	ð
 
òó ðð& ðVØ'ðVà	"òVó ðVð
 ð /3Ø$(Ø#ð	
à+ð
ð "ð
ð ð	
ð
 
ò
ó ð
ðB ð %)Ø#ð(
ð
 /3ñ(
à!ð(
ð ð(
ð
 ,ð(
ð 
ò(
ó ð(
ðT ð  $Ø9=ØØØ%ØØGKð.ð /3Ø48Ø.2Ø37ñ.àð.ð ð.ð 7ð	.ð
 ð.ð ð.ð ð.ð ð.ð Eð.ð ,ð.ð 2ð.ð ,ð.ð #1ð.ð 
ò.ó ð.ð` ð
 /3Ø48Ø*.Ø $Ø!%ñCàðCð ,ð	Cð
 2ðCð (ðCð ðCð ðCð 
òCó ðCðJ ð !Ø#Ø#Ø"Ø/3Ø9=ñ/7àð/7ð 'ð/7ð
 ð/7ð ð/7ð ð/7ð ð/7ð -ð/7ð (7ð/7ð 
ò/7ó ð/7ðb ð !Ø#Ø#Ø"Ø/3Ø9=ñàðð 'ðð
 ðð ðð ðð ðð -ðð (7ðð 
òó ðð4 òó ðð à-1Ètñ
Ø*ð
Ø?Lð
à	ò
ó ð
ð à?CðYØðYØ)<ðYà	òYó ðYð à?CðØðØ)<ðà	òó ðð 6:Ø(,Ø$(Øñ6
àð6
ð ð6
ð
  3ð6
ð &ð6
ð "ð6
ð ð6
ð 
ó6
ðp ð /3Ø$ð	
àð
ð ,ð
ð ò	
ó ð
ð2 à?CðHØðHØ)<ðHà	òHó ðHð óLó ðLð
 ð
 37Ø26ð
àð
ð ð
ð 0ð	
ð
 0ò
ó ð
ðB ò:ó ð:ð ð
 59Ø.2ñà!ðð 2ð	ð
 ,ðð 
òó ðð ð /3ñ
àð
ð ð	
ð
 ,ð
ð 
ò
ó ð
ð ð /3Ø$(Ø$(ñ
ð ,ð
ð "ð	
ð
 "ð
ð 
"ò
ó ð
ð* ð /3ñ
àð
ð ð	
ð
 ,ð
ð 
ò
ó ð
ð ð /3ñ!àð!ð ð	!ð
 ,ð!ð 
ò!ó ð!ð àNRñWØðWØ #ðWØ8KðWà	òWó ðWð
 àNRñVØðVØ #ðVØ8KðVà	òVó ðVð
 ð /3Ø$(Ø$(ñ
ð ,ð
ð "ð	
ð
 "ð
ð 
ò
ó ð
ð* àBFñNØðNØ,?ðNà	òNó ðNð
 àBFñYØðYØ,?ðYà	òYó ðYð
 àNRñ
Øð
Ø #ð
Ø8Kð
à	ò
ó ð
ð àBFñWØðWØ,?ðWà	òWó ðWð
 àBFñLØðLØ,?ðLà	òLó ðLð
 àBFñ
Øð
Ø,?ð
à	ò
ó ð
ð ð /3Ø$(Ø$(ñ
ð ,ð
ð "ð	
ð
 "ð
ð 
ò
ó ð
ð* à-1Ètñ
Ø*ð
Ø?Lð
à	ò
ó ð
ð ò7ó ð7ð ò6ó ð6ð ò7ó ð7ð ò-ó ð-ð  €[×ÑØØØ#Ø/ô	ð ñ/ó óñ/r   r�  c            	      óP  — e Zd ZdZdId„Zd„ Zd„ Zd„ Zd„ Zd„ Z	e
dJd„«       ZdKd	„Z	 	 	 dL	 	 	 	 	 	 	 dMd„Z	 	 dN	 	 	 	 	 	 	 dOd„Z	 	 dN	 	 	 	 	 	 	 dPd„Z	 	 	 	 dQd„Z	 	 	 dL	 	 	 	 	 	 	 dRd„Zd
d
d
dœ	 	 	 	 	 	 	 dSd„Z	 	 	 	 	 	 	 dTd
d
d
d
dœ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dUd„Zd
d
d
d
d
d
d
d
dœ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dVd„Z	 	 	 	 	 	 	 	 	 	 dWd„Zd
d
d
dd
d
dœ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dXd„Zd
d
d
dd
d
dœ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dYd„ZdZd„Zd
d
dœ	 	 	 	 	 d[d„Zd
dœ	 	 	 	 	 d\d„Zd
dœ	 	 	 	 	 d]d „Zd
d
d
d!d"œ	 	 	 	 	 	 	 	 	 	 	 	 	 d^d#„Z	 	 dN	 	 	 	 	 	 	 d_d$„Zd
dd%œ	 	 	 	 	 d`d&„Zd
dœ	 	 	 	 	 dad'„Zdbdcd(„Z ddd)„Z!d
d
d*œ	 	 	 	 	 	 	 ded+„Z"d
dœ	 	 	 	 	 	 	 dfd,„Z#d
d
d
d-œ	 	 	 	 	 	 	 dgd.„Z$d
dœ	 	 	 	 	 	 	 dhd/„Z%d
dœ	 	 	 	 	 	 	 did0„Z&d
dœ	 	 	 	 	 	 	 djd1„Z'd
dœ	 	 	 	 	 	 	 djd2„Z(d
d
d
d-œ	 	 	 	 	 	 	 dkd3„Z)d
dœ	 	 	 	 	 d\d4„Z*d
dœ	 	 	 	 	 dld5„Z+d
dœ	 	 	 	 	 	 	 dmd6„Z,d
dœ	 	 	 	 	 dnd7„Z-d
dœ	 	 	 	 	 d\d8„Z.d
dœ	 	 	 	 	 d]d9„Z/d
d
d
d-œ	 	 	 	 	 	 	 dkd:„Z0d
d
dœ	 	 	 	 	 dod;„Z1dpd<„Z2dqd=„Z3dqd>„Z4d
d
d?œ	 	 	 	 	 	 	 drd@„Z5d
d
d?œ	 	 	 	 	 	 	 dsdA„Z6dtdB„Z7dudC„Z8 e9jt                  dDdEe;dF¬G«      dH„ «       Z<y
)vr£  a1  An active LanceDB connection

    To obtain a connection you can use the [connect_async][lancedb.connect_async]
    function.

    This could be a native connection (using lance) or a remote connection (e.g. for
    connecting to LanceDb Cloud)

    Local connections do not currently hold any open resources but they may do so in the
    future (for example, for shared cache or connections to catalog services) Remote
    connections represent an open connection to the remote server.  The
    [close][lancedb.db.AsyncConnection.close] method can be used to release any
    underlying resources eagerly.  The connection can also be used as a context manager.

    Connections can be shared on multiple threads and are expected to be long lived.
    Connections can also be used as a context manager, however, in many cases a single
    connection can be used for the lifetime of the application and so this is often
    not needed.  Closing a connection is optional.  If it is not closed then it will
    be automatically closed when the connection object is deleted.

    Examples
    --------

    >>> import lancedb
    >>> async def doctest_example():
    ...   with await lancedb.connect_async("/tmp/my_dataset") as conn:
    ...     # do something with the connection
    ...     pass
    ...   # conn is closed here
    c                ó   — || _         y re   )r†  )rg   Ú
connections     r   r§  zAsyncConnection.__init__ò  s	   € Ø ˆ�r   c                ó6   — | j                   j                  «       S re   )r†  r²  rf   s    r   r²  zAsyncConnection.__repr__õ  s   € Ø�{‰{×#Ñ#Ó%Ð%r   c                ó   — | S re   r   rf   s    r   rh   zAsyncConnection.__enter__ø  ri   r   c                ó$   — | j                  «        y re   rk   rm   s     r   ro   zAsyncConnection.__exit__û  rp   r   c                ó6   — | j                   j                  «       S )rr   )r†  rs   rf   s    r   rs   zAsyncConnection.is_openþ  s   € à�{‰{×"Ñ"Ó$Ð$r   c                ó8   — | j                   j                  «        y)zÈClose the connection, releasing any underlying resources.

        It is safe to call this method multiple times.

        Any attempt to use the connection after it is closed will result in an error.N)r†  rl   rf   s    r   rl   zAsyncConnection.close	  s   € ð 	�‰×ÑÕr   c                ó.   — | j                   j                  S re   )r†  rÝ   rf   s    r   rÝ   zAsyncConnection.uri
	  s   € à�{‰{�‰Ðr   c              ƒ  óp   K  — | j                   j                  «       ƒ d {  –—† }|�t        |¬«      S y 7 Œ­w)N)Úseconds)r†  Úget_read_consistency_intervalr   )rg   Úinterval_secss     r   r,  z-AsyncConnection.get_read_consistency_interval	  s5   è ø€ Ø"Ÿk™k×GÑGÓI×IˆØÐ$Ü ]Ô3Ð3àð	 Jús   ‚6 4¡6Nc                ó˜   — |€g }t        |«       | j                  j                  |||¬«      }|dk(  rt        dd¬«      S t        ||«      S )ab  List immediate child namespace names in the given namespace.

        Parameters
        ----------
        namespace_path: List[str], optional
            The parent namespace to list namespaces in.
            None or empty list represents root namespace.
        page_token: str, optional
            The token to use for pagination. If not present, start from the beginning.
        limit: int, optional
            The maximum number of results to return.

        Returns
        -------
        AsyncNamespaceListing
            Response containing namespace names and optional pagination token
        NrÂ  r   Trv   )r$   r†  r{   r   ©rg   r^   ry   rz   r­  s        r   r{   zAsyncConnection.list_namespaces	  sZ   € ð. Ð!ØˆNÜ˜EÔ"Ø—‘×+Ñ+Ø)°jÈð ,ó 
ˆð �AŠ:Ü(¨°TÔ:Ð:Ü$ U¨JÓ7Ð7r   c              ƒ  ó‚   K  — | j                   j                  |t        |«      |¬«      ƒ d{  –—† }t        di |¤ŽS 7 Œ­w)aã  Create a new namespace.

        Parameters
        ----------
        namespace_path: List[str]
            The namespace identifier to create.
        mode: str, optional
            Creation mode - "create", "exist_ok", or "overwrite". Case insensitive.
        properties: Dict[str, str], optional
            Properties to associate with the namespace

        Returns
        -------
        CreateNamespaceResponse
            Response containing namespace properties
        )r�   r‚   Nr   )r†  rƒ   rV   r+   )rg   r^   r�   r‚   Úresults        r   rƒ   z AsyncConnection.create_namespace6	  sI   è ø€ ð, —{‘{×3Ñ3ØÜ1°$Ó7Ø!ð 4ó 
÷ 
ˆô
 'Ñ0¨Ñ0Ð0ð
ús   ‚+?­=®?c              ƒ  ó”   K  — | j                   j                  |t        |«      t        |«      ¬«      ƒ d{  –—† }t	        di |¤ŽS 7 Œ­w)r†   )r�   r‡   Nr   )r†  rˆ   rW   rX   r,   )rg   r^   r�   r‡   r1  s        r   rˆ   zAsyncConnection.drop_namespaceS	  sN   è ø€ ð. —{‘{×1Ñ1ØÜ/°Ó5Ü7¸ÓAð 2ó 
÷ 
ˆô
 %Ñ. vÑ.Ð.ð
ús   ‚4A¶A·Ac              ƒ  ój   K  — | j                   j                  |«      ƒ d{  –—† }t        di |¤ŽS 7 Œ­w)rŠ   Nr   )r†  rŒ   r-   )rg   r^   r1  s      r   rŒ   z"AsyncConnection.describe_namespaceq	  s3   è ø€ ð —{‘{×5Ñ5°nÓE×EˆÜ(Ñ2¨6Ñ2Ð2ð Fús   ‚3¡1¢3c                ó˜   — |€g }t        |«       | j                  j                  |||¬«      }|dk(  rt        dd¬«      S t        ||«      S )a¿  List tables in this database, one page at a time.

        Parameters
        ----------
        namespace_path: List[str], optional
            The namespace to list tables in.
            None or empty list represents root namespace.
        page_token: str, optional
            Token for pagination. Use the token from a previous response
            to get the next page of results.
        limit: int, optional
            The maximum number of results to return, default 100.
            Zero returns an empty page without a continuation token.

        Returns
        -------
        AsyncTableListing
            Response containing table names and optional page_token for pagination.
        NrÂ  r   Trv   )r$   r†  r•   r    r/  s        r   r•   zAsyncConnection.list_tablesƒ	  sZ   € ð2 Ð!ØˆNÜ˜EÔ"Ø—‘×'Ñ'Ø)°jÈð (ó 
ˆð �AŠ:Ü$ T°Ô6Ð6Ü  ¨
Ó3Ð3r   rÎ  c             ƒ  óš   K  — ddl }|j                  dt        d¬«       |€g }| j                  j	                  |||¬«      ƒ d{  –—† S 7 Œ­w)aN  List all tables in this database, in sorted order

        .. deprecated::
            Use :meth:`list_tables` instead, which provides proper pagination support.

        Parameters
        ----------
        namespace_path: List[str], optional
            The namespace to list tables in.
            None or empty list represents root namespace.
        start_after: str, optional
            If present, only return names that come lexicographically after the supplied
            value.

            This can be combined with limit to implement pagination by setting this to
            the last table name from the previous page.
        limit: int, optional
            The maximum number of tables to return. None returns all tables;
            zero returns an empty list.

        Returns
        -------
        Iterable of str
        r   NrË  r�  rÌ  rÎ  )rÏ  rÐ  rÑ  r†  r˜   )rg   r^   r½  rz   rÏ  s        r   r˜   zAsyncConnection.table_names¦	  s_   è ø€ ó> 	à�‰ØDÜØð 	ô 	
ð
 Ð!ØˆNØ—[‘[×,Ñ,Ø)°{È%ð -ó 
÷ 
ð 	
ð 
ús   ‚AAÁA	ÁA)r^   r¢   Úlocationrì   c	          	   ƒ  óú  K  — |	€g }	d}|
�%t        j                  «       }|j                  |
«      }|€d}|€d}t        j                  t
        |||||«      ƒ d{  –—† \  }}t        |«       |€d}|€d}|dk(  r|rd}|€5| j                  j                  ||||	|||¬«      ƒ d{  –—† }t        |«      S t        ||«      }| j                  j                  ||||	|||¬«      ƒ d{  –—† }t        |«      S 7 Œ›7 ŒR7 Œ­w)a  Create an [AsyncTable][lancedb.table.AsyncTable] in the database.

        Parameters
        ----------
        name: str
            The name of the table.
        namespace_path: List[str], default []
            The namespace to create the table in.
            Empty list represents root namespace.
        data: The data to initialize the table, *optional*
            User must provide at least one of `data` or `schema`.
            Acceptable types are:

            - list-of-dict

            - pandas.DataFrame

            - pyarrow.Table or pyarrow.RecordBatch
        schema: The schema of the table, *optional*
            Acceptable types are:

            - pyarrow.Schema

            - [LanceModel][lancedb.pydantic.LanceModel]
        mode: Literal["create", "overwrite", "exist_ok"]; default "create"
            The mode to use when creating the table.
            Can be "create", "overwrite", or "exist_ok".
            By default, if the table already exists, an exception is raised.
            If you want to overwrite the table, use mode="overwrite".
            To open an existing table without adding data, use mode="exist_ok".
        exist_ok: bool, default False
            If a table by the same name already exists, then raise an exception
            if exist_ok=False. If exist_ok=True, then open the existing table;
            it will not add the provided data but will validate against any
            schema that's specified.
        on_bad_vectors: str, default "error"
            How to handle vectors with incorrect sizes, NaNs, or null elements.
            One of "error", "drop", "fill", "null".
        fill_value: float
            The value to use when filling vectors. Only used if on_bad_vectors="fill".
            NaN or null elements and missing trailing elements are replaced with this
            value. Valid elements are preserved, and vectors longer than the expected
            dimension are truncated.
        storage_options: dict, optional
            Additional options for the storage backend. Options already set on the
            connection will be inherited by the table, but can be overridden here.
            See available options at
            <https://docs.lancedb.com/storage/>

            To enable stable row IDs (row IDs remain stable after compaction,
            update, delete, and merges), set `new_table_enable_stable_row_ids`
            to `"true"` in storage_options when connecting to the database.

        Returns
        -------
        AsyncTable
            A reference to the newly created table.

        !!! note

            The vector index won't be created by default.
            To create the index, call the `create_index` method on the table.

        Examples
        --------

        Can create with list of tuples or dictionaries:

        >>> import lancedb
        >>> async def doctest_example():
        ...     db = await lancedb.connect_async("./.lancedb")
        ...     data = [{"vector": [1.1, 1.2], "lat": 45.5, "long": -122.7},
        ...             {"vector": [0.2, 1.8], "lat": 40.1, "long":  -74.1}]
        ...     my_table = await db.create_table("my_table", data)
        ...     print(await my_table.query().limit(5).to_arrow())
        >>> import asyncio
        >>> asyncio.run(doctest_example())
        pyarrow.Table
        vector: fixed_size_list<item: float>[2]
          child 0, item: float
        lat: double
        long: double
        ----
        vector: [[[1.1,1.2],[0.2,1.8]]]
        lat: [[45.5,40.1]]
        long: [[-122.7,-74.1]]

        You can also pass a pandas DataFrame:

        >>> import pandas as pd
        >>> data = pd.DataFrame({
        ...    "vector": [[1.1, 1.2], [0.2, 1.8]],
        ...    "lat": [45.5, 40.1],
        ...    "long": [-122.7, -74.1]
        ... })
        >>> async def pandas_example():
        ...     db = await lancedb.connect_async("./.lancedb")
        ...     my_table = await db.create_table("table2", data)
        ...     print(await my_table.query().limit(5).to_arrow())
        >>> asyncio.run(pandas_example())
        pyarrow.Table
        vector: fixed_size_list<item: float>[2]
          child 0, item: float
        lat: double
        long: double
        ----
        vector: [[[1.1,1.2],[0.2,1.8]]]
        lat: [[45.5,40.1]]
        long: [[-122.7,-74.1]]

        Data is converted to Arrow before being written to disk. For maximum
        control over how data is saved, either provide the PyArrow schema to
        convert to or else provide a [PyArrow Table][pyarrow.Table] directly.

        >>> import pyarrow as pa
        >>> custom_schema = pa.schema([
        ...   pa.field("vector", pa.list_(pa.float32(), 2)),
        ...   pa.field("lat", pa.float32()),
        ...   pa.field("long", pa.float32())
        ... ])
        >>> async def with_schema():
        ...     db = await lancedb.connect_async("./.lancedb")
        ...     my_table = await db.create_table("table3", data, schema = custom_schema)
        ...     print(await my_table.query().limit(5).to_arrow())
        >>> asyncio.run(with_schema())
        pyarrow.Table
        vector: fixed_size_list<item: float>[2]
          child 0, item: float
        lat: float
        long: float
        ----
        vector: [[[1.1,1.2],[0.2,1.8]]]
        lat: [[45.5,40.1]]
        long: [[-122.7,-74.1]]


        It is also possible to create an table from `[Iterable[pa.RecordBatch]]`:


        >>> import pyarrow as pa
        >>> def make_batches():
        ...     for i in range(5):
        ...         yield pa.RecordBatch.from_arrays(
        ...             [
        ...                 pa.array([[3.1, 4.1], [5.9, 26.5]],
        ...                     pa.list_(pa.float32(), 2)),
        ...                 pa.array(["foo", "bar"]),
        ...                 pa.array([10.0, 20.0]),
        ...             ],
        ...             ["vector", "item", "price"],
        ...         )
        >>> schema=pa.schema([
        ...     pa.field("vector", pa.list_(pa.float32(), 2)),
        ...     pa.field("item", pa.utf8()),
        ...     pa.field("price", pa.float32()),
        ... ])
        >>> async def iterable_example():
        ...     db = await lancedb.connect_async("./.lancedb")
        ...     await db.create_table("table4", make_batches(), schema=schema)
        >>> asyncio.run(iterable_example())
        NrT  rU  FrS  rŸ   )r^   rš   r6  rì   )r%   Úget_instanceÚget_table_metadataÚasyncioÚ	to_threadrI   r(   r†  Úcreate_empty_tabler&   r£   rF   )rg   rZ   rž   r]   r�   rŸ   r    r¡   rš   r^   r¢   r6  rì   ÚmetadataÚregistryÚ	new_tables                   r   r£   zAsyncConnection.create_tableÒ	  sX  è ø€ ðb Ð!ØˆNØˆàÐ*ô 1×=Ñ=Ó?ˆHØ×2Ñ2Ð3FÓGˆHð Ð!Ø$ˆNàÐØˆJô
 %×.Ñ.Ü!ØØØØØó
÷ 
‰ˆˆfô 	˜ÔàÐØˆHØˆ<ØˆDØ�8Ò¡ØˆDàˆ<Ø"Ÿk™k×<Ñ<ØØØØ-Ø /Ø!Ø!1ð =ó ÷ ˆIô* ˜)Ó$Ð$ô " $¨Ó/ˆDØ"Ÿk™k×6Ñ6ØØØØ-Ø /Ø!Ø!1ð 7ó ÷ ˆIô ˜)Ó$Ð$ðO
øð$øðús8   ‚AC;ÁC5ÁA
C;Â$C7Â%A C;Ã%C9Ã&C;Ã7C;Ã9C;)r^   rš   r©   r6  rì   Úmanaged_versioningrª   r«   c          	   ƒ  ó  K  — |€g }| j                   j                  |||||||¬«      ƒ d{  –—† }
t        |
«      }|�+|dk7  r&|j                  j	                  ||	«      ƒ d{  –—† }|S |	�|j	                  |	«      ƒ d{  –—†  |S 7 ŒY7 Œ%7 Œ
­w)a	  Open a Lance Table in the database.

        Parameters
        ----------
        name: str
            The name of the table.
        namespace_path: List[str], optional
            The namespace to open the table from.
            None or empty list represents root namespace.
        storage_options: dict, optional
            Additional options for the storage backend. Options already set on the
            connection will be inherited by the table, but can be overridden here.
            See available options at
            <https://docs.lancedb.com/storage/>
        index_cache_size: int, default 256
            **Deprecated**: Use session-level cache configuration instead.
            Create a Session with custom cache sizes and pass it to lancedb.connect().

            Set the size of the index cache, specified as a number of entries

            The exact meaning of an "entry" will depend on the type of index:
            * IVF - there is one entry for each IVF partition
            * BTREE - there is one entry for the entire index

            This cache applies to the entire opened table, across all indices.
            Setting this value higher will increase performance on larger datasets
            at the expense of more RAM
        location: str, optional
            The explicit location (URI) of the table. If provided, the table will be
            opened from this location instead of deriving it from the database URI
            and table name.
        managed_versioning: bool, optional
            Whether managed versioning is enabled for this table. If provided,
            avoids a redundant describe_table call when namespace_client is set.
        branch: str, optional
            If provided, open a handle scoped to this branch instead of the
            default branch. Reads and writes operate in the branch's context.
        version: int, optional
            If provided, open the table pinned to this version, producing a
            read-only handle. Composes with ``branch``: when both are given,
            opens that branch at the version; otherwise opens ``main`` at the
            version. Call ``checkout_latest`` to return to a writable state.

        Returns
        -------
        A LanceTable object representing the table.
        N)r^   rš   r©   r6  rì   r@  Úmain)r†  r¥   rF   rÙ  rÚ  )rg   rZ   r^   rš   r©   r6  rì   r@  rª   r«   ÚtablerÓ  s               r   r¥   zAsyncConnection.open_tableÂ
  s°   è ø€ ðx Ð!ØˆNØ—k‘k×,Ñ,ØØ)Ø+Ø-ØØ-Ø1ð -ó 
÷ 
ˆô ˜Óˆð Ð &¨FÒ"2ØŸ™×-Ñ-¨f°gÓ>×>ˆCð ˆ
ð Ð Ø—,‘,˜wÓ'×'Ð'Øˆ
ð!
øð ?øà'ús3   ‚*B¬B­5BÁ"BÁ#BÁ?B
Â BÂBÂ
Bc              ƒ  ó   K  — |i fS ­wre   r   )rg   r¶   r®   r¯   rz   s        r   Ú_materialized_view_sourcez)AsyncConnection._materialized_view_source  s   è ø€ ð �rˆzÐùs   ‚Fr­   c          
   ƒ  óä   K  — | j                  ||||«      ƒ d{  –—† \  }}	 | j                  j                  ||ft        |«      |||||dœ|	¤Žƒ d{  –—† }
t	        t        |
«      «      S 7 ŒQ7 Œ­w)a’  Define a materialized view named ``name`` over the table ``source``.

        Local creation and refresh require a source build with the
        ``experimental-functions`` Cargo feature. Published packages leave it
        disabled; remote Cloud/Enterprise operations remain available.
        See
        [DBConnection.create_materialized_view][lancedb.DBConnection.create_materialized_view].
        N©ÚprojectionsÚfilterrz   r°   r±   r²   )rE  r†  r·   rA   r=   rF   ©rg   rZ   r¶   r®   r¯   rz   r°   r±   r²   Únative_optionsr­  s              r   r·   z(AsyncConnection.create_materialized_view  s“   è ø€ ð( (,×'EÑ'EØ�F˜E 5ó(
÷ "
Ñˆ�ð ;�d—k‘k×:Ñ:ØØð

ô )¨Ó0ØØØ%Ø!5Ø*Gñ

ð ñ

÷ 

ˆô %¤Z°Ó%6Ó7Ð7ð"
øð

ús!   ‚A0šA,›8A0ÁA.ÁA0Á.A0c          
   ƒ  óÒ   K  — | j                  ||||«      ƒ d{  –—† \  }}	 | j                  j                  ||ft        |«      |||||dœ|	¤Žƒ d{  –—† }
t	        |
«      S 7 ŒH7 Œ­w)a  Submit materialized-view creation and return its job.

        Wait for the returned job before opening or querying the view. Remote
        creation uses SQL; ``job_type`` is ``"query"`` and ``id``
        identifies that query on this connection.
        NrG  )rE  r†  r¹   rA   r5   rJ  s              r   r¹   z.AsyncConnection.create_materialized_view_async?  sŽ   è ø€ ð$ (,×'EÑ'EØ�F˜E 5ó(
÷ "
Ñˆ�ð A�d—k‘k×@Ñ@ØØð

ô )¨Ó0ØØØ%Ø!5Ø*Gñ

ð ñ

÷ 

ˆô ˜‹Ðð"
øð

ús!   ‚A'šA#›8A'ÁA%ÁA'Á%A'c              ƒ  óŠ   K  — t        | j                  |«      ƒ d{  –—† «      }|j                  «       ƒ d{  –—†  |S 7 Œ"7 Œ­w)r»   N)r=   r¥   rõ   rß  s      r   r¼   z&AsyncConnection.open_materialized_viewa  s=   è ø€ ô %¨4¯?©?¸4Ó+@×%@ÓAˆØ�o‰oÓ×ÐØˆð &AøØús   ‚Aœ?�A¸A¹AÁAr½   c               óN   — t        | j                  j                  ||¬«      «      S )rÀ   r½   )r   r†  rÂ   rÁ   s      r   rÂ   z'AsyncConnection.list_materialized_viewsk  s-   € ô Ø�K‰K×/Ñ/Ø%°*ð 0ó ó
ð 	
r   r–   c             ƒ  ób   K  — |€g }| j                   j                  ||¬«      ƒ d{  –—†  y7 Œ­w)rÄ   Nr–   )r†  rÆ   rÅ   s      r   rÆ   z&AsyncConnection.drop_materialized_view|  s0   è ø€ ð Ð!ØˆNØ�k‰k×0Ñ0°ÀnÐ0ÓU×UÒUús   ‚%/§-¨/c             ƒ  ór   K  — |€g }t        | j                  j                  ||¬«      ƒ d{  –—† «      S 7 Œ­w)a  Start dropping a materialized view and return its job.

        For remote connections, the job has type ``query`` and its ID identifies
        the SQL query. Await :meth:`AsyncJob.wait` for catalog removal; physical
        cleanup continues in the background.
        Nr–   )r5   r†  rÉ   rÅ   s      r   rÉ   z,AsyncConnection.drop_materialized_view_async‹  sF   è ø€ ð Ð!ØˆNÜØ—+‘+×:Ñ:Ø ^ð ;ó ÷ ó
ð 	
ðúó   ‚*7¬5­	7Trå  c             ƒ  ó~   K  — |€g }| j                   j                  ||||||¬«      ƒ d{  –—† }t        |«      S 7 Œ­w)ax  Clone a table from a source table.

        A shallow clone creates a new table that shares the underlying data files
        with the source table but has its own independent manifest. This allows
        both the source and cloned tables to evolve independently while initially
        sharing the same data, deletion, and index files.

        Parameters
        ----------
        target_table_name: str
            The name of the target table to create.
        source_uri: str
            The URI of the source table to clone from.
        target_namespace_path: List[str], optional
            The namespace for the target table.
            None or empty list represents root namespace.
        source_version: int, optional
            The version of the source table to clone.
        source_tag: str, optional
            The tag of the source table to clone.
        is_shallow: bool, default True
            Whether to perform a shallow clone (True) or deep clone (False).
            Currently only shallow clone is supported.

        Returns
        -------
        An AsyncTable object representing the cloned table.
        Nrå  )r†  rë  rF   )rg   rì  rí  ræ  rç  rè  ré  rC  s           r   rë  zAsyncConnection.clone_tableŸ  sW   è ø€ ðL !Ð(Ø$&Ð!Ø—k‘k×-Ñ-ØØØ"7Ø)Ø!Ø!ð .ó 
÷ 
ˆô ˜%Ó Ð ð
ús   ‚)=«;¬=c              ƒ  ón   K  — |€g }|€g }| j                   j                  ||||¬«      ƒ d{  –—†  y7 Œ­w)rÏ   Nrõ  )r†  rÕ   rÐ   s        r   rÕ   zAsyncConnection.rename_tableÑ  sM   è ø€ ð, Ð%Ø!#ÐØÐ%Ø!#ÐØ�k‰k×&Ñ&ØØØ1Ø1ð	 'ó 
÷ 	
ò 	
ús   ‚+5­3®5rï  c             ƒ  ó¾   K  — |€g }	 | j                   j                  ||¬«      ƒ d{  –—†  y7 Œ# t        $ r!}|s|‚d|› d�t        |«      vr|‚Y d}~yd}~ww xY w­w)a{  Drop a table from the database.

        Parameters
        ----------
        name: str
            The name of the table.
        namespace_path: List[str], default []
            The namespace to drop the table from.
            Empty list represents root namespace.
        ignore_missing: bool, default False
            If True, ignore if the table does not exist.
        Nr–   zTable 'z' was not found)r†  rË   r×  rV  )rg   rZ   r^   rð  rÆ  s        r   rË   zAsyncConnection.drop_tableò  sk   è ø€ ð& Ð!ØˆNð	Ø—+‘+×(Ñ(¨¸nÐ(ÓM×MÒMùÜò 	Ù!Ø�Ø˜˜˜oÐ.´c¸!³fÑ<Ø�ô =ûð	üs6   ‚Aˆ 0 ¨.©0 ­A®0 °	A¹AÁAÁAÁAc             ƒ  ór   K  — |€g }t        | j                  j                  ||¬«      ƒ d{  –—† «      S 7 Œ­w)zËStart dropping a table and return its cleanup job.

        The table may become unavailable before its data files are removed.
        Await :meth:`AsyncJob.wait` to wait for cleanup to finish.
        Nr–   )r5   r†  rÍ   rÅ   s      r   rÍ   z AsyncConnection.drop_table_async  s=   è ø€ ð Ð!ØˆNÜØ—+‘+×.Ñ.¨tÀNÐ.ÓS×Só
ð 	
ØSúrQ  c              ƒ  ó`   K  — |€g }| j                   j                  |¬«      ƒ d{  –—†  y7 Œ­w)zëDrop all tables from the database.

        Parameters
        ----------
        namespace_path: List[str], optional
            The namespace to drop all tables from.
            None or empty list represents root namespace.
        Nr–   ©r†  rÚ   r‹   s     r   rÚ   zAsyncConnection.drop_all_tables   s.   è ø€ ð Ð!ØˆNØ�k‰k×)Ñ)¸Ð)ÓH×HÒHús   ‚$.¦,§.c              ƒ  óf   K  — t        | j                  j                  |«      ƒ d{  –—† «      S 7 Œ­w)r÷  N)r5   r†  r$  r"  s     r   r$  zAsyncConnection.open_job-  s(   è ø€ ô ˜dŸk™k×2Ñ2°6Ó:×:Ó;Ð;Ð:ús   ‚$1¦/§	1rï   c             ƒ  óþ   K  — t        |t        «      st        d«      ‚|j                  |«      }| j                  j                  |j                  «       |«      ƒ d{  –—† }t        |t        j                  «      S 7 Œ­w)a1  Submit a scalar Python UDF for building and registration.

        The server-side job builds the OCI image, then registers the completed
        artifact. Waiting on the job returns the immutable Function version.
        ``secrets`` is a sequence of
        [EnvVarSecret][lancedb.secrets.EnvVarSecret], each naming a Secret and
        the environment variable its value arrives in. ``namespace_path`` is
        the namespace the Function is registered in; None or an empty list is
        the root. Local connections raise ``NotImplementedError``.
        z0create_function_async requires a @udf definitionN)
rš  r4   Ú	TypeErrorÚbind_secretsr†  rò   Úto_canonical_jsonr7   r3   Ú	from_json)rg   rõ   rð   r^   Úrequestr­  s         r   rò   z%AsyncConnection.create_function_async3  so   è ø€ ô" ˜*¤mÔ4ÜÐNÓOÐOØ×)Ñ)¨'Ó2ˆØ—k‘k×7Ñ7Ø×%Ñ%Ó'¨ó
÷ 
ˆô ˜%¤×!:Ñ!:Ó;Ð;ð
ús   ‚AA=ÁA;ÁA=c             ƒ  ó~   K  — t        j                  | j                  j                  |||«      ƒ d{  –—† «      S 7 Œ­w)rú   N)r3   r]  r†  rü   rû   s       r   rü   zAsyncConnection.get_functionL  s7   è ø€ ô ×(Ñ(Ø—+‘+×*Ñ*¨4°¸.ÓI×Ió
ð 	
ØIúó   ‚0=²;³	=rý   c               ón   — t        | j                  j                  |||¬«      t        j                  «      S )aç  List every published immutable Function version in a namespace.

        Functions in child namespaces are not included. Results are ordered by
        Function name then version. Local connections raise
        ``NotImplementedError``.

        Returns a lazy iterator. ``page_limit`` limits each request, not the total;
        ``page_token`` resumes from a saved token. Requests and errors occur during
        iteration. See [pagination state][lancedb.listing.AsyncListing].
        rý   )r   r†  r   r3   r]  rÿ   s       r   r   zAsyncConnection.list_functionsX  s<   € ô" Ø�K‰K×&Ñ&Ø-Ø%Ø%ð 'ó ô
 ×%Ñ%ó
ð 	
r   c             ƒ  óX   K  — | j                   j                  |||«      ƒ d{  –—† S 7 Œ­w)z4Drop a Function name and the object it was bound to.N)r†  r  rû   s       r   r  zAsyncConnection.drop_functionr  s'   è ø€ ð —[‘[×.Ñ.¨t°W¸nÓM×MÐMÐMús   ‚!*£(¤*c             ƒ  óx   K  — | j                   j                  |||«      ƒ d{  –—† \  }}|t        |«      fS 7 Œ­w)zäDrop a Function name and return its cleanup job.

        The name is unbound before this returns; the object's content may still
        be being deleted. Await :meth:`AsyncJob.wait` to wait for that to
        finish.
        N)r†  r  r5   rþ  s         r   r  z#AsyncConnection.drop_function_async|  sB   è ø€ ð "Ÿ[™[×<Ñ<Ø�'˜>ó
÷ 
‰ˆ�ð œ ›Ð%Ð%ð
ús   ‚!:£8¤:c          	   ƒ  ó�   K  — | j                   j                  t        |«      |t        t	        |«      «      «      ƒ d{  –—†  y7 Œ­w)zªCreate a named Secret in this database.

        Fails if the name is taken, so a create never silently becomes a
        rotation. Nothing reads the value back.
        N)r†  r
  rE   ÚlistrD   r  s       r   r
  zAsyncConnection.create_secretŽ  s=   è ø€ ð �k‰k×'Ñ'Ü  Ó&ØÜÔ(¨Ó8Ó9ó
÷ 	
ò 	
úó   ‚<A¾A¿Ac          	   ƒ  ó�   K  — | j                   j                  t        |«      |t        t	        |«      «      «      ƒ d{  –—†  y7 Œ­w)z¼Replace the credential behind an existing Secret.

        Fails if it does not exist. Bound Functions use the new value from
        their next job, with no new Function version.
        N)r†  r  rE   re  rD   r  s       r   r  zAsyncConnection.alter_secretœ  s=   è ø€ ð �k‰k×&Ñ&Ü  Ó&ØÜÔ(¨Ó8Ó9ó
÷ 	
ò 	
úrf  c               óP   — t        | j                  j                  |||¬«      «      S )a2  The names of every Secret in this database. Names only.

        Returns a lazy iterator. ``page_limit`` limits each request, not the total;
        ``page_token`` resumes from a saved token. Requests and errors occur during
        iteration. See [pagination state][lancedb.listing.AsyncListing].
        rý   )r   r†  r  rÿ   s       r   r  zAsyncConnection.list_secretsª  s1   € ô Ø�K‰K×$Ñ$Ø-Ø%Ø%ð %ó ó
ð 	
r   c             ƒ  óŽ   K  — | j                   j                  t        |«      t        t	        |«      «      «      ƒ d{  –—†  y7 Œ­w)z6Drop a Secret. Bound Functions fail at their next job.N)r†  r  rE   re  rD   rÅ   s      r   r  zAsyncConnection.drop_secret¿  s9   è ø€ ð �k‰k×%Ñ%Ü  Ó&¬Ô-DÀ^Ó-TÓ(Uó
÷ 	
ò 	
ús   ‚;A½A¾Ac             ƒ  ó°   K  — | j                   j                  t        |«      t        t	        |«      «      «      ƒ d{  –—† \  }}}t        |||¬«      S 7 Œ­w)z;What this database records about a Secret. Never the value.N)rZ   Úcreated_at_millisÚupdated_at_millis)r†  r  rE   re  rD   rC   )rg   rZ   r^   rk  rl  s        r   r  zAsyncConnection.describe_secretÇ  s^   è ø€ ð <@¿;¹;×;VÑ;VÜ  Ó&ÜÔ(¨Ó8Ó9ó<
÷ 6
Ñ2ˆÐÐ!2ô ØØ/Ø/ô
ð 	
ð	6
ús   ‚;A½A¾Ac          
   ƒ  ó„   K  — t        | j                  j                  ||t        |xs g «      «      ƒ d{  –—† «      S 7 Œ­w)zšCreate a view: a named query the database plans on every read.

        See
        [DBConnection.create_view][lancedb.DBConnection.create_view].
        N)ra   r†  r  re  r  s       r   r  zAsyncConnection.create_viewÕ  s;   è ø€ ô !Ø—+‘+×)Ñ)¨$°´t¸NÒ<PÈbÓ7QÓR×Ró
ð 	
ØRús   ‚3A µ>¶	A c          	   ƒ  ó‚   K  — t        | j                  j                  |t        |xs g «      «      ƒ d{  –—† «      S 7 Œ­w)z:What this database records about a view: query and schema.N)ra   r†  r  re  rÅ   s      r   r  zAsyncConnection.describe_viewá  s9   è ø€ ô !Ø—+‘+×+Ñ+¨D´$°~Ò7KÈÓ2LÓM×Mó
ð 	
ØMús   ‚2?´=µ	?c             ƒ  ór   K  — | j                   j                  |t        |xs g «      «      ƒ d{  –—†  y7 Œ­w)zÀDrop a view and wait for its definition to be deleted.

        The tables it reads are untouched. Use :meth:`drop_view_async` to get
        the cleanup job instead of waiting on it.
        N)r†  r  re  rÅ   s      r   r  zAsyncConnection.drop_viewé  s,   è ø€ ð �k‰k×#Ñ# D¬$¨~Ò/CÀÓ*DÓE×EÒEús   ‚-7¯5°7c             ƒ  ór   K  — |€g }t        | j                  j                  ||¬«      ƒ d{  –—† «      S 7 Œ­w)zÍStart dropping a view and return the job deleting its definition.

        The name is free before this returns. Await :meth:`AsyncJob.wait` before
        assuming the definition dataset is gone.
        Nr–   )r5   r†  r  rÅ   s      r   r  zAsyncConnection.drop_view_asyncó  s=   è ø€ ð Ð!ØˆNÜØ—+‘+×-Ñ-¨dÀ>Ð-ÓR×Ró
ð 	
ØRúrQ  c               óP   — t        | j                  j                  |||¬«      «      S )a#  The names of the views in one namespace.

        Returns a lazy iterator. ``page_limit`` limits each request, not the total;
        ``page_token`` resumes from a saved token. Requests and errors occur during
        iteration. See [pagination state][lancedb.listing.AsyncListing].
        rý   )r   r†  r   rÿ   s       r   r   zAsyncConnection.list_views  s1   € ô Ø�K‰K×"Ñ"Ø-Ø%Ø%ð #ó ó
ð 	
r   c               óN   — t        | j                  j                  ||¬«      «      S r  )r   r†  r'  rÁ   s      r   r'  zAsyncConnection.list_jobs  s(   € ô Ø�K‰K×!Ñ!¨ZÀJÐ!ÓOó
ð 	
r   c              ƒ  óT   K  — | j                   j                  |«      ƒ d{  –—† S 7 Œ­w)r)  N)r†  r*  r"  s     r   r*  zAsyncConnection.cancel_job&  s#   è ø€ ð —[‘[×+Ñ+¨FÓ3×3Ð3Ð3úó   ‚(¡&¢(c              ƒ  óT   K  — | j                   j                  |«      ƒ d{  –—† S 7 Œ­w)r-  N)r†  r.  r"  s     r   r.  zAsyncConnection.pause_job/  s#   è ø€ ð —[‘[×*Ñ*¨6Ó2×2Ð2Ð2úrt  c              ƒ  óT   K  — | j                   j                  |«      ƒ d{  –—† S 7 Œ­w)z¾Resume a paused server-side job by id.

        Its workers pick their work back up from checkpoints. Returns
        "resumed", "still_pausing" -- retry shortly -- or "not_paused".
        N)r†  r0  r"  s     r   r0  zAsyncConnection.resume_job8  s#   è ø€ ð —[‘[×+Ñ+¨FÓ3×3Ð3Ð3úrt  r1  c             ƒ  óz   K  — | j                  |||¬«      ƒ d{  –—† }|j                  «       ƒ d{  –—† S 7 Œ7 Œ­w)zíExecute SQL and return an asynchronous Arrow reader.

        This submits through :meth:`execute_query_async` and waits until the
        initial result stream is readable. It does not wait for the full query
        to finish.
        r1  Nr4  )rg   r[   r_   r2  Ú	submitteds        r   r8  zAsyncConnection.execute_query@  sJ   è ø€ ð ×2Ñ2ØØ#9Ø!ð 3ó 
÷ 
ˆ	ð
 ×%Ñ%Ó'×'Ð'ð
øð
 (ús   ‚;š7›;²9³;¹;c          	   ƒ  ó~   K  — t        | j                  j                  ||t        |«      ¬«      ƒ d{  –—† «      S 7 Œ­w)a£  Start executing SQL and return its query handle.

        The database from ``connect_async`` is used for unqualified database
        references. The namespace defaults to ``["public"]``. ``parameters``
        binds values to ``$1`` / ``$name`` placeholders; see
        [DBConnection.execute_query_async][lancedb.db.DBConnection.execute_query_async].
        Local connections raise ``NotImplementedError``.
        r1  N)ÚAsyncSqlQueryr†  r5  r<   r7  s       r   r5  z#AsyncConnection.execute_query_asyncT  sD   è ø€ ô Ø—+‘+×1Ñ1ØØ'=Ü-¨jÓ9ð 2ó ÷ ó
ð 	
ðúr`  c              ƒ  óŠ   K  — t        |t        «      rt        |«      }| j                  j	                  |«      ƒ d{  –—† S 7 Œ­w)zÖDescribe a submitted SQL query by its UUID or string ID.

        For a handle with ``job_type == "query"``, pass its ``id`` on the
        connection that submitted it. Registry job IDs are not query IDs.
        N)rš  rV  r   r†  r>  r<  s     r   r>  zAsyncConnection.describe_queryk  s6   è ø€ ô �h¤Ô$Ü˜H“~ˆHØ—[‘[×/Ñ/°Ó9×9Ð9Ð9ús   ‚:A¼A½Ac              ƒ  óv   K  — | j                   j                  «       ƒ d{  –—† }t        |d   |d   «      S 7 Œ­w)rë   NÚimplr‚   )r†  Únamespace_client_configÚnamespace_connect)rg   Úconfigs     r   rì   z AsyncConnection.namespace_clientu  s8   è ø€ ð  —{‘{×:Ñ:Ó<×<ˆÜ  ¨¡°¸Ñ1EÓFÐFð =ús   ‚9 7¡9r  r  r  r  c              ƒ  óT   K  — | j                   j                  «       ƒ d{  –—†  y7 Œ­w)r×   NrW  rf   s    r   rØ   zAsyncConnection.drop_databaseˆ  s   è ø€ ð �k‰k×)Ñ)Ó+×+Ò+ús   ‚( &¡()r#  r  rh  r  rD  )r^   rF  ry   rG  rz   rH  r?  r   rI  rJ  rM  rN  )r^   rF  ry   rG  rz   rH  r?  r    )r^   rF  r½  rG  rz   rH  r?  rQ  )NNNNNNN)rZ   rV  rž   rW  r]   rX  r�   z(Optional[Literal['create', 'overwrite']]rŸ   r[  r    rG  r¡   r]  rš   rL  r^   rF  r¢   rZ  r6  rG  rì   úOptional[Any]r?  rF   )rZ   rV  r^   rF  rš   rL  r©   rH  r6  rG  rì   r‚  r@  r[  rª   rG  r«   rH  r?  rF   )
r¶   r?   r®   r@   r¯   rG  rz   rH  r?  zTuple[str, Dict[str, str]])rZ   rV  r¶   r?   r®   r@   r¯   rG  rz   rH  r°   rC  r±   r[  r²   r]  r?  r=   )rZ   rV  r¶   r?   r®   r@   r¯   rG  rz   rH  r°   rC  r±   r[  r²   r]  r?  úAsyncJob[None])rZ   rV  r?  r=   )ry   rG  r¾   rH  r?  úAsyncListing[str]rc  )rZ   rV  r^   rF  r?  rƒ  )rì  rV  rí  rV  ræ  rF  rç  rH  rè  rG  ré  rC  r?  rF   rf  r  )rZ   rV  r^   rF  r?  r5   re   rg  )r#  rV  r?  r5   )rõ   r4   rð   rk  r^   rF  r?  zAsyncJob[FunctionVersion]rm  )r^   rF  ry   rG  r¾   rH  r?  zAsyncListing[FunctionVersion]ro  )rZ   rV  r«   rV  r^   rF  r?  zTuple[bool, AsyncJob]rq  )r^   rF  ry   rG  r¾   rH  r?  r„  rs  rt  ru  )ry   rG  r¾   rH  r?  zAsyncListing[JobInfo]ry  rz  )r[   rV  r_   rF  r2  r{  r?  rN   )r[   rV  r_   rF  r2  r{  r?  rz  r}  rj  )=r   r   r   r~  r§  r²  rh   ro   rs   rl   r  rÝ   r,  r{   rƒ   rˆ   rŒ   r•   r˜   r£   r¥   rE  r·   r¹   r¼   rÂ   rÆ   rÉ   rë  rÕ   rË   rÍ   rÚ   r$  rò   rü   r   r  r  r
  r  r  r  r  r  r  r  r  r   r'  r*  r.  r0  r8  r5  r>  rì   r  r   r2   rØ   r   r   r   r£  r£  Ò  s¦  „ ñó>!ò&òòò%òð òó ðóð /3Ø$(Ø#ð	8à+ð8ð "ð8ð ð	8ð
 
ó8ðH #Ø/3ð	1à!ð1ð ð1ð -ð	1ð
 
!ó1ð@ #Ø"&ð	/à!ð/ð ð/ð  ð	/ð
 
ó/ð<3Ø'ð3à	"ó3ð( /3Ø$(Ø#ð	!4à+ð!4ð "ð!4ð ð	!4ð
 
ó!4ðL /3Ø%)Ø#ñ*
ð ,ð*
ð #ð	*
ð
 ð*
ð 
ó*
ð^  $Ø9=Ø9=Ø#'Ø(,Ø&*Ø48ðn%ð /3ØGKØ"&Ø*.ñn%àðn%ð ðn%ð 7ð	n%ð
 7ðn%ð !ðn%ð &ðn%ð $ðn%ð 2ðn%ð ,ðn%ð Eðn%ð  ðn%ð (ðn%ð 
ón%ðh /3Ø48Ø*.Ø"&Ø*.Ø-1Ø $Ø!%ñNàðNð ,ð	Nð
 2ðNð (ðNð  ðNð (ðNð +ðNð ðNð ðNð 
óNð`à&ðð ðð ð	ð
 ðð 
$óð !Ø#Ø#Ø"Ø/3Ø9=ñ"8àð"8ð 'ð"8ð
 ð"8ð ð"8ð ð"8ð ð"8ð -ð"8ð (7ð"8ð 
ó"8ðR !Ø#Ø#Ø"Ø/3Ø9=ñ àð ð 'ð ð
 ð ð ð ð ð ð ð ð -ð ð (7ð ð 
ó óDð .2Ètñ
Ø*ð
Ø?Lð
à	ó
ð* /3ñ	VàðVð ,ð	Vð
 
óVð& /3ñ	
àð
ð ,ð	
ð
 
ó
ð2 6:Ø(,Ø$(Øñ0!àð0!ð ð0!ð
  3ð0!ð &ð0!ð "ð0!ð ð0!ð 
ó0!ðl 37Ø26ð
àð
ð ð
ð 0ð	
ð
 0ó
ðJ /3Ø$ñàðð ,ð	ð
 óðB /3ñ	
àð
ð ,ð	
ð
 
ó
ô"Ió<ð 59Ø.2ñ<à!ð<ð 2ð	<ð
 ,ð<ð 
#ó<ð< /3ñ

àð

ð ð	

ð
 ,ð

ð 
ó

ð /3Ø$(Ø$(ñ
ð ,ð
ð "ð	
ð
 "ð
ð 
'ó
ð> /3ñNàðNð ð	Nð
 ,ðNð 
óNð /3ñ&àð&ð ð	&ð
 ,ð&ð 
ó&ð& OSñ
Øð
Ø #ð
Ø8Kð
à	ó
ð OSñ
Øð
Ø #ð
Ø8Kð
à	ó
ð" /3Ø$(Ø$(ñ
ð ,ð
ð "ð	
ð
 "ð
ð 
ó
ð, CGñ
Øð
Ø,?ð
à	ó
ð CGñ
Øð
Ø,?ð
à	ó
ð OSñ

Øð

Ø #ð

Ø8Kð

à	ó

ð CGñ
Øð
Ø,?ð
à	ó
ð CGñFØðFØ,?ðFà	óFð /3ñ	
àð
ð ,ð	
ð
 
ó
ð( /3Ø$(Ø$(ñ
ð ,ð
ð "ð	
ð
 "ð
ð 
ó
ð, .2Ètñ
Ø*ð
Ø?Lð
à	ó
ó4ó3ó4ð 7;Ø04ñ(àð(ð !4ð	(ð
 .ð(ð 
 ó(ð0 7;Ø04ñ
àð
ð !4ð	
ð
 .ð
ð 
ó
ó.:óGð& €[×ÑØØØ#Ø/ô	ñ,óñ,r   r£  )r`   z7Tuple[str, List[str], str, str, List[str], 'pa.Schema']r?  rM   )wÚ
__future__r   Úabcr   r:  Údatetimer   Úpathlibr   rœ  Útypingr   r   r	   r
   r   r   r   r   r   r   r   Úuuidr   Úversion_infor   r   Ú	overridesÚlancedb.listingr   r   r    r!   r"   r#   r$   Úlancedb.embeddings.registryr%   Úlancedb.commonr&   r'   r(   Úlancedb.background_loopr)   Úlance_namespacer*   r+   r,   r-   r.   r  Úlance_namespace.errorsr/   r0   Ú r2   Ú_lancedbr‘  Ú	functionsr3   r4   rÝ  r5   r6   r7   Úsqlr8   rz  r9   r|  r:   r;   r<   Úmaterialized_viewr=   r>   r?   r@   rA   rð   rB   rC   rD   rE   rC  rF   rG   rH   rI   ÚutilrJ   rK   rà  rM   r  ÚpyarrowÚpaÚarrowrN   ÚpydanticrO   rP   r  rQ   ÚcommonrR   rS   Ú
embeddingsrT   rU   Únamespace_utilsrV   rW   rX   ra   rc   r�  Úobjectr£  r   r   r   ú<module>r¡     s/  ðõ
 #å Û Ý Ý Û 
÷÷ ÷ ñ õ à×Ñ�wÒÝ÷ò ÷ 5÷÷ ñ õ Bç HÑ HÝ (÷õ ÷ Nå Ý 0ß 5ß *Ñ *Ý ,Ý "ß FÑ F÷õ ÷ó ÷ó ÷õ "ã áÛÝ-Ý$å9Ý!ß!Ý3Ý!÷ñ ðØFðàóô,LSÐ#ô LSô^$}/˜ô }/ô@A,�fõ A,r   