spanner-data
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseUsage
使用方法
All scripts can be executed using Node.js. Replace and with actual values.
<param_name><param_value>Bash:
node <skill_dir>/scripts/<script_name>.js '{"<param_name>": "<param_value>"}'PowerShell:
node <skill_dir>/scripts/<script_name>.js '{\"<param_name>\": \"<param_value>\"}'Note: The scripts automatically load the environment variables from various .env files. Do not ask the user to set vars unless skill executions fails due to env var absence.
所有脚本均可使用Node.js执行。将和替换为实际值。
<param_name><param_value>Bash:
node <skill_dir>/scripts/<script_name>.js '{"<param_name>": "<param_value>"}'PowerShell:
node <skill_dir>/scripts/<script_name>.js '{\"<param_name>\": \"<param_value>\"}'注意:脚本会自动从多个.env文件加载环境变量。除非因缺少环境变量导致技能执行失败,否则不要要求用户设置变量。
Scripts
脚本
execute_sql
execute_sql
Use this tool to execute DML SQL. Please use the googlesql interface for Spanner.
使用此工具执行DML SQL。对于Spanner,请使用googlesql接口。
Parameters
参数
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| sql | string | The sql to execute. | Yes |
| 名称 | 类型 | 描述 | 是否必填 | 默认值 |
|---|---|---|---|---|
| sql | string | 要执行的SQL语句。 | 是 |
execute_sql_dql
execute_sql_dql
Use this tool to execute DQL SQL. Please use the googlesql interface for Spanner.
使用此工具执行DQL SQL。对于Spanner,请使用googlesql接口。
Parameters
参数
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| sql | string | The sql to execute. | Yes |
| 名称 | 类型 | 描述 | 是否必填 | 默认值 |
|---|---|---|---|---|
| sql | string | 要执行的SQL语句。 | 是 |
list_graphs
list_graphs
Lists detailed graph schema information (node tables, edge tables, labels and property declarations) as JSON for user-created graphs. Filters by a comma-separated list of graph names. If names are omitted, lists all graphs. The output can be 'simple' (graph names only) or 'detailed' (full schema).
列出用户创建的图的详细模式信息(节点表、边表、标签和属性声明),以JSON格式返回。可通过逗号分隔的图名称列表进行筛选。如果省略名称,则列出所有图。输出格式可以是'simple'(仅图名称)或'detailed'(完整模式)。
Parameters
参数
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| graph_names | string | Optional: A comma-separated list of graph names. If empty, details for all graphs in user-accessible schemas will be listed. | No | `` |
| output_format | string | Optional: Use 'simple' to return graph names only or use 'detailed' to return the full information schema. | No | |
| 名称 | 类型 | 描述 | 是否必填 | 默认值 |
|---|---|---|---|---|
| graph_names | string | 可选:逗号分隔的图名称列表。如果为空,将列出用户可访问模式中的所有图的详细信息。 | 否 | `` |
| output_format | string | 可选:使用'simple'仅返回图名称,或使用'detailed'返回完整的信息模式。 | 否 | |
list_tables
list_tables
Lists detailed schema information (object type, columns, constraints, indexes) as JSON for user-created tables (ordinary or partitioned). Filters by a comma-separated list of names. If names are omitted, lists all tables in user schemas. The output can be 'simple' (table names only) or 'detailed' (full schema).
列出用户创建的表(普通表或分区表)的详细模式信息(对象类型、列、约束、索引),以JSON格式返回。可通过逗号分隔的表名称列表进行筛选。如果省略名称,则列出用户模式中的所有表。输出格式可以是'simple'(仅表名称)或'detailed'(完整模式)。
Parameters
参数
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| table_names | string | Optional: A comma-separated list of table names. If empty, details for all tables in user-accessible schemas will be listed. | No | `` |
| output_format | string | Optional: Use 'simple' to return table names only or use 'detailed' to return the full information schema. | No | |
| 名称 | 类型 | 描述 | 是否必填 | 默认值 |
|---|---|---|---|---|
| table_names | string | 可选:逗号分隔的表名称列表。如果为空,将列出用户可访问模式中的所有表的详细信息。 | 否 | `` |
| output_format | string | 可选:使用'simple'仅返回表名称,或使用'detailed'返回完整的信息模式。 | 否 | |