Add queryresultmode per issue #1048 - #2183
Conversation
Documents the new query_result_mode optional parameter in SpannerToolSettings, which configures the execute_sql tool to return database query results as a list of dictionaries.
joefernandez
left a comment
There was a problem hiding this comment.
RISK REVIEW: Medium risk — one blocking accuracy issue. The new query_result_mode bullet is added to the SpannerVectorStoreSettings optional-parameter list, but the field lives on SpannerToolSettings, so following this doc silently does nothing. Details inline, plus a minor trailing-whitespace nit. No legal, security, privacy, cost, third-party, customer-naming, or internal-link exposure in this change.
joefernandez
left a comment
There was a problem hiding this comment.
REVIEW CODE: Thanks for picking this up from #1048 — the feature is real and the description of DICT_LIST is accurate, but the bullet is attached to the wrong settings class. query_result_mode is a field of SpannerToolSettings, not SpannerVectorStoreSettings, and because both are plain Pydantic models (default extra="ignore"), a reader who follows this page will pass the argument, see no error, and silently not get the behavior described. Details inline, plus two smaller points (missing default/import, trailing whitespace).
joefernandez
left a comment
There was a problem hiding this comment.
Style review of the new query_result_mode entry. Two things: the parameter is documented under the wrong settings class, and the added lines have trailing whitespace plus phrasing that doesn't match the neighbouring bullets. Details inline.
Resolves comments and feedback.
✅ Deploy Preview for adk-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
joefernandez
left a comment
There was a problem hiding this comment.
Thanks for the update!
* Add queryresultmode per issue google#1048 Documents the new query_result_mode optional parameter in SpannerToolSettings, which configures the execute_sql tool to return database query results as a list of dictionaries. * Update spanner.md Resolves comments and feedback. * Update spanner.md --------- Co-authored-by: Joe Fernandez <931947+joefernandez@users.noreply.github.com>
Staged link> https://deploy-preview-2183--adk-docs-preview.netlify.app/integrations/spanner/
Documents the new query_result_mode optional parameter in SpannerToolSettings, which configures the execute_sql tool to return database query results as a list of dictionaries.
Agent's PR: #1054 and #1055
Citations
QueryResultModeDefinition:src/google/adk/tools/spanner/settings.py#L48-L60SpannerToolSettings.query_result_modeField:src/google/adk/tools/spanner/settings.py#L251-L269execute_sqlQuery Processing (to_dict_list):src/google/adk/tools/spanner/utils.py#L111-L130get_execute_sqlTool Factory & Docstring Wrapper:src/google/adk/tools/spanner/query_tool.py#L171-L196