Skip to content

Commit 2dccd92

Browse files
committed
fixed some dumb shit
1 parent 42ff634 commit 2dccd92

File tree

5 files changed

+16
-16
lines changed

5 files changed

+16
-16
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[![jSQL Logo](http://i.imgur.com/VQlJKOc.png)](http://pamblam.github.io/jSQL/)
22

3-
jSQL (Official) - Version 3.2.1 - *Now available without a prescription!*
3+
jSQL (Official) - Version 3.2.2 - *Now available without a prescription!*
44

55
[![npm version](https://badge.fury.io/js/jsql-official.svg)](https://badge.fury.io/js/jsql-official) [![Build Status](https://travis-ci.org/Pamblam/jSQL.svg?branch=master)](https://travis-ci.org/Pamblam/jSQL) [![Inline docs](http://inch-ci.org/github/Pamblam/jSQL.svg?branch=master)](https://github.com/Pamblam/jSQL/wiki) [![Coverage Status](https://coveralls.io/repos/github/Pamblam/jSQL/badge.svg?branch=master)](https://coveralls.io/github/Pamblam/jSQL?branch=master)
66

jSQL.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* jsql-official - v3.2.1
2+
* jsql-official - v3.2.2
33
* A persistent SQL database.
44
* @author Rob Parham
55
* @website http://pamblam.github.io/jSQL/
@@ -2749,7 +2749,7 @@ function removeQuotes(str){
27492749
}
27502750

27512751
function jsql_export(create_tables, table_names){
2752-
create_tables = create_tables || true;
2752+
create_tables = undefined === create_tables ? true : !!create_tables;
27532753
table_names = table_names || [];
27542754
var dump_buffer = [];
27552755
for(var table in jSQL.tables){
@@ -2793,10 +2793,10 @@ function jsql_export(create_tables, table_names){
27932793
}
27942794
}
27952795
dump_buffer.push('CREATE TABLE `'+table+'` ('+(table_buffer.join(","))+"\n)");
2796-
for(var i=0; i<jSQL.tables[table].data.length; i++){
2797-
var values = JSON.stringify(jSQL.tables[table].data[i]).trim().slice(1, -1).replace(/"jsqlNull"/g, 'null');
2798-
dump_buffer.push("INSERT INTO `"+table+"` (`"+(jSQL.tables[table].columns.join('`,`'))+"`) VALUES ("+values+")");
2799-
}
2796+
}
2797+
for(var i=0; i<jSQL.tables[table].data.length; i++){
2798+
var values = JSON.stringify(jSQL.tables[table].data[i]).trim().slice(1, -1).replace(/"jsqlNull"/g, 'null');
2799+
dump_buffer.push("INSERT INTO `"+table+"` (`"+(jSQL.tables[table].columns.join('`,`'))+"`) VALUES ("+values+")");
28002800
}
28012801
}
28022802
}
@@ -2816,7 +2816,7 @@ function jsql_import(dump){
28162816
}
28172817

28182818
return {
2819-
version: "3.2.1",
2819+
version: "3.2.2",
28202820
tables: {},
28212821
query: jSQLParseQuery,
28222822
createTable: createTable,

jSQL.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jsql-official",
3-
"version": "3.2.1",
3+
"version": "3.2.2",
44
"description": "A persistent SQL database.",
55
"main": "jSQL.min.js",
66
"directories": {

src/import_export/export.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
function jsql_export(create_tables, table_names){
3-
create_tables = create_tables || true;
3+
create_tables = undefined === create_tables ? true : !!create_tables;
44
table_names = table_names || [];
55
var dump_buffer = [];
66
for(var table in jSQL.tables){
@@ -44,10 +44,10 @@ function jsql_export(create_tables, table_names){
4444
}
4545
}
4646
dump_buffer.push('CREATE TABLE `'+table+'` ('+(table_buffer.join(","))+"\n)");
47-
for(var i=0; i<jSQL.tables[table].data.length; i++){
48-
var values = JSON.stringify(jSQL.tables[table].data[i]).trim().slice(1, -1).replace(/"jsqlNull"/g, 'null');
49-
dump_buffer.push("INSERT INTO `"+table+"` (`"+(jSQL.tables[table].columns.join('`,`'))+"`) VALUES ("+values+")");
50-
}
47+
}
48+
for(var i=0; i<jSQL.tables[table].data.length; i++){
49+
var values = JSON.stringify(jSQL.tables[table].data[i]).trim().slice(1, -1).replace(/"jsqlNull"/g, 'null');
50+
dump_buffer.push("INSERT INTO `"+table+"` (`"+(jSQL.tables[table].columns.join('`,`'))+"`) VALUES ("+values+")");
5151
}
5252
}
5353
}

0 commit comments

Comments
 (0)