c889a57b6b
Test Suites / Build CI Environment (push) Has been cancelled
Test Suites / Basic Tests (push) Has been cancelled
Test Suites / End-to-End Tests (push) Has been cancelled
Test Suites / CLI Tests (push) Has been cancelled
Test Suites / Slow End-to-End Tests (push) Has been cancelled
Test Suites / Graph Database Tests (push) Has been cancelled
Test Suites / Vector DB Tests (push) Has been cancelled
Test Suites / Temporal Graph Test (push) Has been cancelled
Test Suites / Search Test on Different DBs (push) Has been cancelled
Test Suites / Example Tests (push) Has been cancelled
Test Suites / Notebook Tests (push) Has been cancelled
Test Suites / OS and Python Tests Ubuntu (push) Has been cancelled
Test Suites / OS and Python Tests Extended (push) Has been cancelled
Test Suites / LLM Test Suite (push) Has been cancelled
Test Suites / S3 File Storage Test (push) Has been cancelled
Test Suites / Run Integration Tests (push) Has been cancelled
Test Suites / MCP Tests (push) Has been cancelled
Test Suites / Docker Compose Test (push) Has been cancelled
Test Suites / Docker CI test (push) Has been cancelled
Test Suites / Relational DB Migration Tests (push) Has been cancelled
Test Suites / Distributed Cognee Test (push) Has been cancelled
Test Suites / DB Examples Tests (push) Has been cancelled
Test Suites / Test Completion Status (push) Has been cancelled
Test Suites / Claude Code Review (push) Has been cancelled
Test Suites / basic checks (push) Has been cancelled
build | Build and Push Cognee MCP Docker Image to dockerhub / docker-build-and-push (push) Has been cancelled
Scorecard supply-chain security / Scorecard analysis (push) Has been cancelled
build | Build and Push Docker Image to dockerhub / docker-build-and-push (push) Has been cancelled
Weighted Edges Tests / Test Weighted Edges Core Functionality (3.11) (push) Has been cancelled
Weighted Edges Tests / Test Weighted Edges Core Functionality (3.12) (push) Has been cancelled
Weighted Edges Tests / Test Weighted Edges with Different Graph Databases (kuzu, kuzu) (push) Has been cancelled
Weighted Edges Tests / Test Weighted Edges with Different Graph Databases (neo4j, neo4j) (push) Has been cancelled
Weighted Edges Tests / Test Weighted Edges Examples (push) Has been cancelled
Weighted Edges Tests / Code Quality for Weighted Edges (push) Has been cancelled
39 lines
1.8 KiB
Python
39 lines
1.8 KiB
Python
"""Op-codes exchanged between the LanceDB subprocess worker and the main-side
|
|
proxies. Pure stdlib.
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
OP_CONNECT = 100 # kwargs: url, api_key
|
|
|
|
OP_TABLE_NAMES = 110 # no args; returns list[str]
|
|
# args: (name, schema_bytes, exist_ok). ``schema_bytes`` is Arrow IPC
|
|
# serialized (``schema.serialize().to_pybytes()`` on the proxy side,
|
|
# ``pa.ipc.read_schema`` on the worker side). NOT pickled — pickle.loads
|
|
# on a subprocess RPC is an RCE surface, Arrow IPC is a typed format that
|
|
# rejects non-schema bytes.
|
|
OP_CREATE_TABLE = 111
|
|
OP_OPEN_TABLE = 112 # args: (name,); returns handle
|
|
OP_DROP_TABLE = 113 # args: (name,)
|
|
|
|
OP_TABLE_COUNT_ROWS = 120 # handle_id
|
|
OP_TABLE_TO_ARROW = 121 # handle_id; returns pa.Table serialized as IPC stream bytes
|
|
# handle_id; args: (records,) — accepts whatever lancedb's AsyncTable.add
|
|
# accepts. In subprocess mode the cognee adapter sends a pa.Table built by
|
|
# ``LanceDBAdapter._records_for_write`` (so the worker never has to import
|
|
# pydantic). list[dict] / list[pa.RecordBatch] / pa.RecordBatchReader also
|
|
# work because lancedb itself accepts those.
|
|
OP_TABLE_ADD = 122
|
|
OP_TABLE_DELETE = 123 # handle_id; args: (where: str)
|
|
OP_TABLE_RELEASE = 124 # handle_id; release the table handle (no-op if already gone)
|
|
OP_TABLE_OPTIMIZE = 125 # handle_id; compact the table (lancedb AsyncTable.optimize)
|
|
|
|
# Builder ops. args: (root_args, chain_steps, terminal_name, terminal_args,
|
|
# terminal_kwargs) where root_args is the tuple passed to the root call
|
|
# (e.g. ``(vector,)`` for ``vector_search``) and chain_steps is a
|
|
# ``list[(method_name, args, kwargs)]`` of fluent calls applied on top of
|
|
# the initial builder.
|
|
OP_TABLE_QUERY_EXECUTE = 130 # root = table.query()
|
|
OP_TABLE_VECTOR_SEARCH_EXECUTE = 131 # root = table.vector_search(vec)
|
|
OP_TABLE_MERGE_INSERT_EXECUTE = 132 # root = table.merge_insert(key)
|