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

sql2json does not support INSERT INTO ... VALUES(a,b), (c,d) syntax #11

Closed
galz opened this Issue Aug 29, 2016 · 4 comments

Comments

Projects
None yet
2 participants
@galz

galz commented Aug 29, 2016

This came up on StackOverflow.

The following syntax for sql2jaon works well and shows both inserted rows:

CREATE TABLE `geo_tags` (
  `gt_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `gt_page_id` int(10) unsigned NOT NULL,
  PRIMARY KEY (`gt_id`)
) ENGINE=InnoDB AUTO_INCREMENT=4507036 DEFAULT CHARSET=binary ROW_FORMAT=DYNAMIC;

INSERT INTO `geo_tags` VALUES (3,487781);
INSERT INTO `geo_tags` VALUES (4,487781);

But using a shorter syntax for the INSERT, which is usually used by mysqldump, would only show the first value:

CREATE TABLE `geo_tags` (
  `gt_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `gt_page_id` int(10) unsigned NOT NULL,
  PRIMARY KEY (`gt_id`)
) ENGINE=InnoDB AUTO_INCREMENT=4507036 DEFAULT CHARSET=binary ROW_FORMAT=DYNAMIC;

INSERT INTO `geo_tags` VALUES (3,487781),  (4,487781);
@galz

This comment has been minimized.

Show comment
Hide comment
@galz

galz Aug 29, 2016

@martindrapeau - and nice work!! Very useful tool :)

galz commented Aug 29, 2016

@martindrapeau - and nice work!! Very useful tool :)

@martindrapeau

This comment has been minimized.

Show comment
Hide comment
@martindrapeau

martindrapeau Aug 30, 2016

Owner

This format is not currently supported. Good feature request.

Owner

martindrapeau commented Aug 30, 2016

This format is not currently supported. Good feature request.

martindrapeau added a commit that referenced this issue Aug 30, 2016

@martindrapeau

This comment has been minimized.

Show comment
Hide comment
@martindrapeau

martindrapeau Aug 30, 2016

Owner

Fixed. Thanks for reporting. Here is your testcase:
http://www.csvjson.com/sql2json/688575184b1e31c39c1fd8786f0509ec

Owner

martindrapeau commented Aug 30, 2016

Fixed. Thanks for reporting. Here is your testcase:
http://www.csvjson.com/sql2json/688575184b1e31c39c1fd8786f0509ec

@galz

This comment has been minimized.

Show comment
Hide comment
@galz

galz Aug 30, 2016

@martindrapeau - amazing! Thank you!

galz commented Aug 30, 2016

@martindrapeau - amazing! Thank you!

hisabimbola added a commit to hisabimbola/csvjson-app that referenced this issue Oct 7, 2017

feat(json-beautifier): allow single quote around values
This PR allows the user to select whether to allow single quote or double quote around values

martindrapeau/csvjson-app#11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment