Home / Function/ aexists() — langchain Function Reference

aexists() — langchain Function Reference

Architecture documentation for the aexists() function in _sql_record_manager.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  e21e2dc4_5757_25df_0c4a_48cfe7f45fad["aexists()"]
  9d7938c1_1c25_4cae_be80_9fc00a5ed077["SQLRecordManager"]
  e21e2dc4_5757_25df_0c4a_48cfe7f45fad -->|defined in| 9d7938c1_1c25_4cae_be80_9fc00a5ed077
  d75b3a18_aeb2_cb98_8ca3_1eab11972c74["_amake_session()"]
  e21e2dc4_5757_25df_0c4a_48cfe7f45fad -->|calls| d75b3a18_aeb2_cb98_8ca3_1eab11972c74
  style e21e2dc4_5757_25df_0c4a_48cfe7f45fad fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/langchain/langchain_classic/indexes/_sql_record_manager.py lines 431–449

    async def aexists(self, keys: Sequence[str]) -> list[bool]:
        """Check if the given keys exist in the SQLite database."""
        async with self._amake_session() as session:
            records = (
                (
                    await session.execute(
                        select(UpsertionRecord.key).where(
                            and_(
                                UpsertionRecord.key.in_(keys),
                                UpsertionRecord.namespace == self.namespace,
                            ),
                        ),
                    )
                )
                .scalars()
                .all()
            )
        found_keys = set(records)
        return [k in found_keys for k in keys]

Domain

Subdomains

Frequently Asked Questions

What does aexists() do?
aexists() is a function in the langchain codebase, defined in libs/langchain/langchain_classic/indexes/_sql_record_manager.py.
Where is aexists() defined?
aexists() is defined in libs/langchain/langchain_classic/indexes/_sql_record_manager.py at line 431.
What does aexists() call?
aexists() calls 1 function(s): _amake_session.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free