Skip to content

Can't parse escaped double quotes #800

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

Open
DeadNumbers opened this issue Jan 24, 2023 · 7 comments
Open

Can't parse escaped double quotes #800

DeadNumbers opened this issue Jan 24, 2023 · 7 comments

Comments

@DeadNumbers
Copy link

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: TokenizerError("Expected close delimiter '\"' before EOF. at Line: 12920, Column 429")', src/main.rs:8:54

The line contains escaped double quotes:

'S-130, 190 , 290, 390 in 2005, 491 in 2012, 490 in 2017, L-180, 280, 380, WIMS Course, Wildfire Analyst Training, Misc. Ops and Plans Related Courses, Misc. \"I\" Courses.'

@AugustoFKL
Copy link
Contributor

@DeadNumbers can you please post the query you're trying to run, please?

@DeadNumbers
Copy link
Author

@AugustoFKL have no query, i'm read .sql file and try to parse from string. my goal is to convert all tables data from sql dump to csv.

@Jefffrey
Copy link
Contributor

Jefffrey commented Feb 6, 2023

Will need more info on this to reproduce, as \" seems to parse just fine within a literal, e.g.

SELECT '\"test\"'

@AugustoFKL
Copy link
Contributor

@DeadNumbers, can you give us the '.sql' you're trying to read?

Is that the line you're trying to parse?

'S-130, 190      , 290, 390 in 2005, 491 in 2012, 490 in 2017, L-180, 280, 380, WIMS Course, Wildfire Analyst Training, Misc. Ops and Plans Related Courses,       Misc. \"I\" Courses.'

@DeadNumbers
Copy link
Author

@AugustoFKL yes, this line

@appletreeisyellow
Copy link

Just curious, @cobyge added support for backslash escape for MySQL in #844. Why not for all other SQL?

@cobyge
Copy link
Contributor

cobyge commented Aug 24, 2023

Honestly I just had my specific use-case which was blocking my use, and I didn't have the time or setup to check and test every single database supported.

Each database needs it's own escape implementation.

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

5 participants