mirror of
https://github.com/googleapis/genai-toolbox.git
synced 2026-02-05 04:35:14 -05:00
This pull request introduces a new tool, `neo4j-schema`, for extracting and processing comprehensive schema information from Neo4j databases. It includes updates to the documentation, implementation of caching mechanisms, helper utilities for schema transformation, and corresponding unit tests. The most important changes are grouped by theme below: ### Tool Integration: - **`cmd/root.go`**: Added import for the new `neo4j-schema` tool to integrate it into the application. ### Documentation: - **`docs/en/resources/tools/neo4j/neo4j-schema.md`**: Added detailed documentation for the `neo4j-schema` tool, describing its functionality, caching behavior, and usage examples. ### Caching Implementation: - **`internal/tools/neo4j/neo4jschema/cache/cache.go`**: Implemented a thread-safe, in-memory cache with expiration and optional janitor for cleaning expired items. ### Unit Tests: - **`internal/tools/neo4j/neo4jschema/cache/cache_test.go`**: Added comprehensive tests for the caching system, including functionality for setting, retrieving, expiration, janitor cleanup, and concurrent access. ### Helper Utilities: - **`internal/tools/neo4j/neo4jschema/helpers/helpers.go`**: Added utility functions for processing schema data, including support for APOC and native Cypher queries, and converting raw query results into structured formats. --------- Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com>