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

source command parse error #2103

Closed
hosseinalipour opened this issue Sep 19, 2018 · 1 comment
Closed

source command parse error #2103

hosseinalipour opened this issue Sep 19, 2018 · 1 comment

Comments

@hosseinalipour
Copy link

I got a parse error when I want to source a file in a query:
var result = await connection.query(source "${modelPath}");

I tried putting quotes around it, changing / to \ or \ but no luck. although it does work in the console I wonder why it doesn't work?

ER_PARSE_ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'source "D:\workspace\all.model.ddl"' at line 1

@dougwilson
Copy link
Member

source is a command in the mysql.exe command line tool. Since it is not SQL, your MySQL server is rejecting that. The message you are seeing it coming from your MySQL server itself, not this module.

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

No branches or pull requests

2 participants