Package com.axelor.ai.tool.data
Class QueryRecordsTool
java.lang.Object
com.axelor.ai.tool.data.QueryRecordsTool
- All Implemented Interfaces:
SystemTool<QueryRecordsTool.Input>
System tool for advanced queries using a structured JSON DSL, returning the rows of the columns a
query selects, computed or grouped.
A query with no select would return whole records, carrying every field whether or not the user may read it: the engine checks only the fields a query names. So one is refused, and every column the model gets has been checked.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncode()Unique code matching AiTool.systemTool field.Brief description of what this tool does.execute(QueryRecordsTool.Input input, ToolContext context) Execute with the given typed input and agent-scoped context.The input record class.name()Human-readable display name (e.g.safety()Safety classification for approval decisions.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.axelor.ai.tool.system.SystemTool
beforeApproval, callTitle, provideContext, refusal, runsOutsideTransaction, undoneByRollback
-
Field Details
-
CODE
- See Also:
-
-
Constructor Details
-
QueryRecordsTool
public QueryRecordsTool()
-
-
Method Details
-
safety
Description copied from interface:SystemToolSafety classification for approval decisions. Tools default toToolSafety.WRITE. Override toToolSafety.READ_ONLYfor safe tools that never require approval orToolSafety.DESTRUCTIVEfor tools that should always require approval.- Specified by:
safetyin interfaceSystemTool<QueryRecordsTool.Input>
-
code
Description copied from interface:SystemToolUnique code matching AiTool.systemTool field.- Specified by:
codein interfaceSystemTool<QueryRecordsTool.Input>
-
name
Description copied from interface:SystemToolHuman-readable display name (e.g. "Search Records").- Specified by:
namein interfaceSystemTool<QueryRecordsTool.Input>
-
description
Description copied from interface:SystemToolBrief description of what this tool does.- Specified by:
descriptionin interfaceSystemTool<QueryRecordsTool.Input>
-
inputType
Description copied from interface:SystemToolThe input record class. ReturnVoid.classfor tools with no input.- Specified by:
inputTypein interfaceSystemTool<QueryRecordsTool.Input>
-
execute
Description copied from interface:SystemToolExecute with the given typed input and agent-scoped context.- Specified by:
executein interfaceSystemTool<QueryRecordsTool.Input>
-