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

[feature] support DO Statement #720

Closed
hustjieke opened this issue Jan 13, 2021 · 0 comments
Closed

[feature] support DO Statement #720

hustjieke opened this issue Jan 13, 2021 · 0 comments
Assignees
Labels
P0 High priority type: feature

Comments

@hustjieke
Copy link
Contributor

MySQL 8.0 syntax:

DO expr [, expr] ...

refer:

DO executes the expressions but does not return any results. In most respects, DO is shorthand for SELECT expr, ..., but has the advantage that it is slightly faster when you do not care about the result.

For more information, see:
https://dev.mysql.com/doc/refman/8.0/en/do.html

Example: This SELECT statement pauses, but also produces a result set:

mysql> SELECT SLEEP(5);
+----------+
| SLEEP(5) |
+----------+
|        0 |
+----------+
1 row in set (5.02 sec)

DO, on the other hand, pauses without producing a result set.:

mysql> DO SLEEP(5);
Query OK, 0 rows affected (4.99 sec)
@hustjieke hustjieke added type: feature P0 High priority labels Jan 13, 2021
@hustjieke hustjieke self-assigned this Jan 13, 2021
hustjieke added a commit to hustjieke/radon that referenced this issue Jan 13, 2021
[summary]
support do statement.

[test case]
src/proxy/do_test.go
sqlparser/parse_test.go

[patch codecov]
src/proxy/do.go    100%
sqlparser/ast.go   96.7%
hustjieke added a commit to hustjieke/radon that referenced this issue Jan 13, 2021
[summary]
support do statement.

[test case]
src/proxy/do_test.go
sqlparser/parse_test.go

[patch codecov]
src/proxy/do.go    100%
sqlparser/ast.go   96.7%
hustjieke added a commit to hustjieke/radon that referenced this issue Jan 14, 2021
[summary]
improve code coverage of query.go
before: 87.9%
Now:    94.5

[test case]
src/proxy/do_test.go
src/proxy/help_test.go
src/proxy/query_test.go
src/proxy/show_test.go

[patch codecov]
src/proxy/query.go    94.5%
BohuTANG added a commit that referenced this issue Jan 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P0 High priority type: feature
Projects
None yet
Development

No branches or pull requests

1 participant