跳到主要内容

执行mysql命令

POST 

/v1/model/plugin/prod/mysqlCommand

执行mysql命令,身份只支持:管理端TokenAPI Key

Request

Body

required
    sqlTemplate stringrequired

    Sql语句(可以携带参数,参数命名为 {{ var }}),例如:select * from table_name where _id = {{ _id }}

    parameter object[]

    Query参数,非必传,当sqlTemplate携带参数时,需要传该参数

  • Array [
  • key string

    参数key,例如 :_id

    type string

    参数类型,例如:STRING、NUMBER、ARRAY、BOOLEAN、OBJECT

    value string

    参数值,例如:o8L3N6y、123、[1,2,3]、true、{name: 'foo'}'

  • ]
  • config object

    RunMysqlCommand 配置,非必传,例如:{"preparedStatements":true}

    timeout integer

    Possible values: <= 30

    Default value: 5

    超时时间设置5s

    preparedStatements boolean

    是否开启预编译

    dbLinkName string

    数据连接器Name配置

Responses

成功

Schema
    oneOf
    data object
    backendExecute string

    后端执行时间(ms)

    executeResultList array

    执行结果列表

    total integer

    总数

    requestId string

    请求唯一id

Loading...