Skip to content

Insert improperly compares number of columns and value columns#27

Open
balint-balku-scraperapi wants to merge 1 commit intodb-migrate:masterfrom
balint-balku-scraperapi:patch-2
Open

Insert improperly compares number of columns and value columns#27
balint-balku-scraperapi wants to merge 1 commit intodb-migrate:masterfrom
balint-balku-scraperapi:patch-2

Conversation

@balint-balku-scraperapi
Copy link
Copy Markdown

Insert performs an improper check when multiple columns and multiple rows of data passed to the call.

Example:

insert('table_name',
  [ 'column1', 'column2' ],
  [ [ 'row1_col1', 'row1_col2' ], [ 'row2_col1', 'row2_col2' ], [ 'row3_col1', 'row3_col2' ] ]
);

The above should be ok as the number of columns matches the number of value-columns, but it does throw an error in the current implementation.

Signed-off-by: Balint Balku <balint@scraperapi.com>
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.

1 participant