Skip to content

Commit 881a82b

Browse files
committed
Version 0.0.51
1 parent eb40e52 commit 881a82b

File tree

9 files changed

+26
-23
lines changed

9 files changed

+26
-23
lines changed

alasql.js

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

console/alasql.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.

dist/alasql.js

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

dist/alasql.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/alasql.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.

src/420from.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,10 @@ yy.Select.prototype.compileFrom = function(query) {
105105
// return source.subquery(query.params, cb, idx, query);
106106
var res;
107107
source.subquery(query.params, function(data){
108-
109-
if(cb) res = cb(data,idx,query);
110-
return data;
108+
res = data.data;
109+
if(cb) res = cb(res,idx,query);
110+
return res;
111+
// return data.data;
111112
});
112113
// console.log(515,res);
113114
return res;
@@ -174,6 +175,7 @@ yy.Select.prototype.compileFrom = function(query) {
174175
};
175176

176177
alasql.prepareFromData = function(data,array) {
178+
//console.log(177,data,array);
177179
var res = data;
178180
if(typeof data == "string") {
179181
res = data.split(/\r?\n/);

src/421join.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ yy.Select.prototype.compileJoins = function(query) {
122122
// if(jn instanceof yy.Apply) {
123123
source.datafn = function(query, params, cb, idx, alasql) {
124124
// return cb(null,idx,alasql);
125-
return source.subquery(query.params, null, cb, idx);
125+
return source.subquery(query.params, null, cb, idx).data;
126126
}
127127
// } else {
128128
// source.datafn = function(query, params, cb, idx, alasql) {

src/424select.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ function compileSelectStar (query,alias) {
5757
});
5858
//console.log(999,columns);
5959
} else {
60-
console.log(60,alias,columns);
60+
// console.log(60,alias,columns);
6161

6262
// if column not exists, then copy all
6363
sp += 'var w=p["'+alias+'"];for(var k in w){r[k]=w[k]};';

test/test018.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,13 @@ describe('Test 18', function() {
1717
db.exec('INSERT INTO test VALUES (6)');
1818
db.exec('INSERT INTO test VALUES (7)');
1919
var res = db.exec('SELECT VALUE SUM(a*2+1) AS aa FROM (SELECT a FROM test) q');
20-
// console.log(20,res);
21-
2220
assert.equal(res, 63);
2321

2422
var res = db.exec('SELECT q.x, w.y '+
2523
' FROM '+
2624
' (SELECT test.a AS x FROM test WHERE a<5) q, '+
2725
' (SELECT test.a AS y FROM test WHERE test.a>3) w '
2826
);
29-
3027
assert.equal(res.length, 16);
3128

3229
done();

0 commit comments

Comments
 (0)