Comments (6)
We need to address it in both frontend and backend to whitelist EXPLAIN. @boojack PTAL
from bytebase.
@tianzhou @boojack maybe we do not need to validate the SQL statement is correct or not. pass the statement to the back-end. At the front-end, we only validate the query is a SELECT
statement or not.
from bytebase.
For frontend, I think do a simple validation to check whether it's SELECT or EXPLAIN SELECT is sufficient.
from bytebase.
@xiaoluoboding @tianzhou This failure is because of the frontend package node-sql-parser
will throw an SyntaxError with statement explain select * from abc
which is correct. And I think maybe using the simple regex is more efficient than node-sql-parser
in this situation.
from bytebase.
@boojack just remove isValidStatement function, will be fine. I use the noe-sql-parser
to parse the SQL statement, in case we want to use the more info of the query. If we really does not need it. We can remove it.
from bytebase.
Already fixed in the latest version v0.12.0
from bytebase.
Related Issues (20)
- Error sync schema of database clickhouse HOT 1
- Make the GRPC server h2c compatible HOT 2
- Subscribed issue support email delivery
- Support redis6
- CTRL-K not working to open the "kbar" (tested in Chrome,Edge and Firefox)
- Enquiry about RePush of Issue & Disable Sql Advise during Git Review HOT 1
- Editor should escape column names HOT 3
- Can't give access to all users for a project HOT 1
- ERROR: function uuid_generate_v4() does not exist (SQLSTATE 42883) HOT 2
- cant create ldap sso HOT 1
- Make cloud storage backup options available on helm chart
- Image pull secrets support for helm chat
- Extend PostgreSQL support to CockroachDB HOT 1
- Support new databases: Cassandra HOT 6
- Error 404 When Configuring GitOps HOT 3
- Obfuscation not working properly HOT 1
- Feature Request: Support BigQuery HOT 1
- Missing backup/restore feature after upgrade docker into 2.13.2 HOT 5
- pg_dump error with SSL certs after connection HOT 1
- SQL Check warnings for non-transactional statements i migrations HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bytebase.