-
Notifications
You must be signed in to change notification settings - Fork 6
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
error: internal compiler error: prepared statement had 2 statements, expected 1 #79
Comments
Hello, could you revise the SQL that you have in this example? I see that this is an INSERT query against Also, could you provide an example of this code (if possible?) because sqlx-ts wouldn't be able to pick up code that is not contained inside However, But again, an example would be very helpful. In the meantime, please check if you have any raw SQLs |
Also, I will add testing against nest.js source code in https://github.com/JasonShin/sqlx-ts-demo |
Hey @JasonShin sure thing! This is the code that it picked up: Line 1727: const createInterests = (dataSource: DataSource) => {
return dataSource.query(`
insert into public.interest_category (name)
values ('Creativity'),
('Food & Drinks'),
('Going out'),
('Movies & TV'),
('Music'),
('Pets'),
('Sports'),
('Trips');
insert into public.interest (name, category)
values ('A sweet tooth', 'Food & Drinks'),
('Acting', 'Creativity'),
('Action', 'Movies & TV'),
('Animated', 'Movies & TV'),
('Anime', 'Movies & TV'),
('Art', 'Creativity'),
('Athletics', 'Sports'),
('Backpacking', 'Trips'),
('Badminton', 'Sports'),
('Bar', 'Going out'),
('Beach holiday', 'Trips'),
('Beer', 'Food & Drinks'),
('Big city holiday', 'Trips'),
('Birds', 'Pets'),
('Cats', 'Pets'),
('Caviar', 'Food & Drinks'),
('Champagne', 'Food & Drinks'),
('Classic', 'Music'),
('Coffee', 'Food & Drinks'),
('Comedy', 'Movies & TV'),
('Cycling', 'Sports'),
('Design', 'Creativity'),
('Dogs', 'Pets'),
('Doubbledate', 'Going out'),
('Drama', 'Movies & TV'),
('Drinks', 'Going out'),
('Fest', 'Going out'),
('Festival', 'Going out'),
('Fish', 'Pets'),
('Fitness', 'Sports'),
('Foodie', 'Food & Drinks'),
('Football', 'Sports'),
('Golf', 'Sports'),
('Gymnastics', 'Sports'),
('Handball', 'Sports'),
('Handiwork', 'Creativity'),
('Hiking', 'Trips'),
('Hip hop', 'Music'),
('Horror', 'Movies & TV'),
('House', 'Music'),
('In', 'Creativity'),
('Jazz', 'Music'),
('Meditation', 'Sports'),
('Netflix', 'Movies & TV'),
('Nightclub', 'Going out'),
('Photography', 'Creativity'),
('Pop', 'Music'),
('R&B', 'Music'),
('Rabbit', 'Pets'),
('Rap', 'Music'),
('Road trip', 'Trips'),
('Rock', 'Music'),
('Punk', 'Music'),
('Punk rock', 'Music'),
('Hardcore punk', 'Music'),
('Skate punk', 'Music'),
('Romantic', 'Movies & TV'),
('Rowing', 'Sports'),
('Run', 'Sports'),
('Sci-fi', 'Movies & TV'),
('Singing', 'Creativity'),
('Skateboard', 'Sports'),
('Ski', 'Sports'),
('Ski holiday', 'Trips'),
('Snowboard', 'Sports'),
('Swimming', 'Sports'),
('Table tennis', 'Sports'),
('Tennis', 'Sports'),
('Theater', 'Creativity'),
('Vegan', 'Food & Drinks'),
('Vin', 'Food & Drinks'),
('Volleyball', 'Sports'),
('Write', 'Creativity'),
('Yoga', 'Sports');
`);
}; |
Hello @simplenotezy, I've released more fix to enhance support for nest.js project source code and it was released in 0.7.0. I figured out some TS syntax wasn't picked up via sqlx-ts in nest.js codebase #80. In regards to the query above in your last example, I will try to reproduce it on my end. However, that query is not even contained inside |
Amazing! And regarding the last part; sure it's strange, but I just copy pasted the error output, and that's indeed the line 🤔 |
Could you please try v0.9.0? apologies for this - how did I completely miss this (?). Check the PR #85 from @andersthuesen 🚀 |
I will close this for now hoping that it is fixed with the latest updates |
Trying to set it up for a Nest.js project, it fails with the following error:
The text was updated successfully, but these errors were encountered: