← Về thư mục
openai4s/storage/datapro_index.py
- DataProIndexCapacity · class · L72-L79 — class DataProIndexCapacity(ValueError)
- create_datapro_index_schema · function · L82-L86 — def create_datapro_index_schema(connection: sqlite3.Connection) -> None
- _canonical · function · L89-L98 — def _canonical(value: Any) -> str
- _json_value · function · L101-L104 — def _json_value(value: Any) -> Any
- _pointer_part · function · L107-L108 — def _pointer_part(value: Any) -> str
- _leaf_tokens · function · L111-L126 — def _leaf_tokens(value: Any, pointer: str = "")
- _manifest · function · L129-L142 — def _manifest(value: Any) -> tuple[int, str]
- _search_tokens · function · L145-L168 — def _search_tokens(value: Any)
- _search_document · function · L171-L195 — def _search_document(value: Any) -> str: # The separator cannot make one source token overwrite another. The # character-level encoding removes NUL (which SQLite LIKE truncates) while # leaving ordinary text unchanged, including ASCII letters, quotes, # newlines, backslashes and wildcard characters.
- _structured_payload · function · L198-L215 — def _structured_payload(value: Any) -> dict[str, Any]
- _logical_entries · function · L218-L260 — def _logical_entries(structured: Any) -> list[tuple[str, Any, Any | None]]
- append · function · L229-L235 — def append(entry: tuple[str, Any, Any | None]) -> None
- _like_pattern · function · L263-L265 — def _like_pattern(value: str) -> str
- _search_escape · function · L273-L291 — def _search_escape(value: str) -> str
- _wrapper_context · function · L294-L311 — def _wrapper_context(structured: Any, pointer: str) -> Any | None
- DataProIndexRepository · class · L314-L719 — class DataProIndexRepository
- init · method · L317-L326 — def init( self, connection: sqlite3.Connection, lock: Any, *, clock_ms: Callable[[], int], ) -> None
- ingest · method · L328-L478 — def ingest( self, *, query: str, structured_content: Mapping[str, Any], project_id: str, root_frame_id: str | None, artifact_id: str | None = None, occurrence_id: str | None = None, source_content: Any | None = None, ) -> dict[str, Any]
- link_artifact · method · L480-L493 — def link_artifact(self, batch_id: str, artifact_id: str | None) -> dict[str, Any]
- delete_for_artifact · method · L495-L520 — def delete_for_artifact(self, artifact_id: str) -> None
- delete_batch · method · L522-L540 — def delete_batch(self, batch_id: str) -> None
- get_batch · method · L542-L562 — def get_batch(self, batch_id: str) -> dict[str, Any] | None
- search · method · L564-L652 — def search( self, query: str, *, limit: int = 20, project_id: str | None = None, root_frame_id: str | None = None, include_context: bool = False, ) -> dict[str, Any]
- _decode_entry · method · L655-L693 — def _decode_entry( row: dict[str, Any], *, structured_content: Any | None = None, include_context: bool = True, ) -> dict[str, Any]
- _decode_batch · method · L696-L699 — def _decode_batch(row: dict[str, Any]) -> dict[str, Any]
- _is_complete · method · L702-L707 — def _is_complete(batch: Mapping[str, Any]) -> bool
- _receipt · method · L710-L719 — def _receipt(cls, batch: Mapping[str, Any]) -> dict[str, Any]