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

The import_sql_file function will ignore everything after the last ; or everything if no ; #8

Open
allan-simon opened this issue Jan 10, 2013 · 0 comments

Comments

@allan-simon
Copy link
Owner

Due to a workaround for the method create_statement of cppdb that will launch an exception if you're trying to execute a statement containing nothing executable (i.e comments or EOF or set of spaces ) we're splitting the file on the ";" separator and we will not execute what's after the last one

In most of case that should not be a problem but it may be problematics in these two cases

CREATE table foo ( bar integer ) -- no final semicolon so it will not be executed
   INSERT INTO foo VALUES (2);
   TRESNI INTO foo VALUES(3) -- no final semicolon so it's not executed, and we're not seeing we've made a typo 
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

1 participant