Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

希望后续能支持UPDATE、DELETE等sql,最好建表SQL也能支持 #47

Open
otary opened this issue Jul 6, 2021 · 6 comments
Open

Comments

@otary
Copy link

otary commented Jul 6, 2021

如题,希望后续能支持UPDATE、DELETE等sql,最好建表SQL也能支持

@iamazy
Copy link
Owner

iamazy commented Jul 9, 2021

如题,希望后续能支持UPDATE、DELETE等sql,最好建表SQL也能支持

Update, Delete 都有,create 目前没有,有时间我加下。

@otary,如果你愿意,欢迎提pr

@otary
Copy link
Author

otary commented Jul 11, 2021

试了下,UPDATE语句解析报错:[syntax error] indices name must be set

@iamazy
Copy link
Owner

iamazy commented Jul 11, 2021

试了下,UPDATE语句解析报错:[syntax error] indices name must be set

发下语句

@otary
Copy link
Author

otary commented Jul 13, 2021

UPDATE users set age = 10 where id =1 

实际上,任何UPDATE语句都会报错~!

@iamazy
Copy link
Owner

iamazy commented Jul 16, 2021

UPDATE users set age = 10 where id =1

@otary 你是这么获取的吗?parseResult.getUpdateByQueryRequest()

@otary
Copy link
Author

otary commented Oct 6, 2021

ElasticSql2DslParser elasticSql2DslParser = new ElasticSql2DslParser();
ElasticSqlParseResult result = elasticSql2DslParser.parse("UPDATE users set age = 10 where id =1");

result.getUpdateByQueryRequest(); // 返回内容update-by-query [users] updated with Script{type=inline, lang='painless', idOrCode='ctx._source.age=10;', options={}, params={}}
result.getSearchRequest(); // 报错:[syntax error] indices name must be set

我想获取update的dsl,不知道要怎么获取呢?求指教

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants