agentscope.service.sql_query.sqlite module

Query in sqlite

agentscope.service.sql_query.sqlite.query_sqlite(database: str, query: str, allow_change_data: bool = False, maxcount_results: int | None = None, **kwargs: Any) ServiceResponse[源代码]

Executes query within sqlite database.

参数:
  • database (str) – The name of the database to use.

  • query (str) – The query to execute.

  • allow_change_data (bool, defaults to False) – Whether to allow changing data in the database. Defaults to False to avoid accidental changes to the database.

  • maxcount_results (int, defaults to None) – The maximum number of results to return.

返回:

A ServiceResponse object that contains execution results or error message.

返回类型:

ServiceResponse