gpt4 book ai didi

elasticsearch - elasticsearch-jdbc-river 的 sqlparams 的任何示例

转载 作者:行者123 更新时间:2023-12-03 00:28:40 25 4
gpt4 key购买 nike

如文档所述:sqlparams 为 SQL 语句绑定(bind)参数(按顺序)
谁能举个例子?

最佳答案

您可以引用这里:http://elasticsearch-users.115913.n3.nabble.com/Ann-JDBC-River-Plugin-for-ElasticSearch-td4019418.html ,搜索“绑定(bind)参数”和“基于时间的选择”

  curl -XPUT 'localhost:9200/_river/my_jdbc_river/_meta' -d '{
"type" : "jdbc",
"jdbc" : {
"driver" : "com.mysql.jdbc.Driver",
"url" : "jdbc:mysql://localhost:3306/test",
"user" : "",
"password" : "",
"sql" : "select products.name as \"product.name\", orders.customer as \"product.customer.name\", orders.quantity * products.price as \"product.customer.bill\" from products, orders
where products.name = orders.product and orders.quantity * products.price > ?",
"params": [ 5.0 ]
}
}'

关于elasticsearch - elasticsearch-jdbc-river 的 sqlparams 的任何示例,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20369284/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com