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

Insert generates invalid SQL when multiple rows and values passed #26

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

balint-balku-scraperapi

insert generates invalid SQL statement when used to fill multiple columns:

db.insert('table',
  [ 'column1', 'column2' ],
  [ [ 'data11', 'data21' ], [ 'data12', 'data22' ] ]
);

delimiters are not added properly so in the final statement parts of the real data get sliced, ending up in statements like this:

INSERT INTO "table" ("column1","column2") VALUES ('data11''data21),('data12''data22);

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

Successfully merging this pull request may close these issues.

None yet

1 participant