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

重写规则star2columns希望可以支持补全无table列信息 #122

Closed
dongwenpeng opened this issue Nov 23, 2018 · 2 comments
Closed

Comments

@dongwenpeng
Copy link

Please search the existing issues for relevant feature requests, add upvotes to pre-existing requests.

Feature Description

重写规则star2columns,用来为SELECT *补全表的列信息,默认带有table。希望可以再出一个不带table的列信息,供用户自行选择。

Use Case(s)

select table.c1, table.c2 from table;

select c1, c2 from table;

@martianzhang
Copy link
Contributor

@dongwenpeng

简单查询可以将表名省略,多表查询需要将表名补齐,如果让用户选择不免给用户带来误操作的机会。

SELECT film.*, actor.* FROM film, actor

这个需求我是否可以理解为,加上表名的话SQL会显得长,去掉表名是为了让SQL看上去短点?

如果需求理解的没错这里可以做自适应,单表查询不补表名,多表查询将表名补齐如何?

@dongwenpeng
Copy link
Author

可以的,单表省略表名是为了可以快速提取表字段信息,开发就可以直接复制填充到insert语句中(�soar带的insert重写其实没人会那么使用)。

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

No branches or pull requests

2 participants