Skip to content

Commit 44c79bc

Browse files
committed
bugfix related to having a multi-column compound key in high level syntax
1 parent ad03067 commit 44c79bc

4 files changed

Lines changed: 8 additions & 7 deletions

File tree

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 2.8 - *Now gluten free!*
3+
jSQL (Official) - Version 2.81 - *Now gluten free!*
44
[![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)](http://inch-ci.org/github/Pamblam/jSQL)
55

66
<hr>

jSQL.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* jSQL.js v2.7
2+
* jSQL.js v2.81
33
* A Javascript Query Language Database Engine
44
* @author Robert Parham
55
* @website http://pamblam.github.io/jSQL/
@@ -1394,10 +1394,11 @@
13941394
var parts = conlumnDef.split(",");
13951395
for(var i=0;i<parts.length;i++){
13961396
var str = parts[i];
1397-
while((str.match(/\(/g) || []).length !== (str.match(/\)/g) || []).length){
1397+
while((str.match(/\(/g) || []).length !== (str.match(/\)/g) || []).length && i<parts.length){
13981398
str += ","+parts[i+1];
13991399
parts[i+1] = "";
14001400
parts[i] = str;
1401+
i++;
14011402
}
14021403
if(str.trim()!=="") cols.push(str.trim());
14031404
}
@@ -2507,7 +2508,7 @@
25072508
////////////////////////////////////////////////////////////////////////////
25082509

25092510
return {
2510-
version: 2.8,
2511+
version: 2.81,
25112512
tables: {},
25122513
query: jSQLParseQuery,
25132514
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": "2.8.0",
3+
"version": "2.8.1",
44
"description": "jSQL is a robust and persistent SQL engine written in Javascript for both Node and browser. See: pamblam.github.io/jSQL for details and usage.",
55
"main": "jSQL.min.js",
66
"directories": {

0 commit comments

Comments
 (0)