Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[WIP] Add support for SQL-99 output format modifiers#2376

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
Copilot wants to merge4 commits intodevelop
base:develop
Choose a base branch
Loading
fromcopilot/add-query-result-modifiers-support
Draft
Changes from1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
Enable test270.js RECORDSET tests (25/27 passing, 2 skipped due to du…
…plicate column issue)Co-authored-by: mathiasrw <1063454+mathiasrw@users.noreply.github.com>
  • Loading branch information
@mathiasrw
Copilot andmathiasrw committedDec 17, 2025
commit4ac50ecc62ddf5d8d0cf43ac697bc9d3af2e599a
56 changes: 28 additions & 28 deletionstest/test270.js
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -30,84 +30,84 @@ describe('Test 270 RECORDSET tests', function () {
done();
});

it.skip('2. Empty test on param throws error', function (done) {
it('2. Empty test on param throws error', function (done) {
assert.throws(function () {
var res = alasql('SELECT * FROM ?', []);
}, Error);
done();
});

it.skip('3. Empty test on param throws error', function (done) {
it('3. Empty test on param throws error', function (done) {
var res = alasql('SELECT * FROM ?', [emptydata]);
assert.deepEqual(res, {data: [], columns: []});
done();
});

it.skip('4. Empty test on table with columns', function (done) {
it('4. Empty test on table with columns', function (done) {
var res = alasql('SELECT * FROM one');
var colres = pluck(res.columns, 'columnid');
assert.deepEqual(colres, ['a', 'b']);
done();
});

it.skip('5. Test on empty table without column definitions', function (done) {
it('5. Test on empty table without column definitions', function (done) {
var res = alasql('SELECT * FROM three');
var colres = pluck(res.columns, 'columnid');
assert.deepEqual(colres, []);
done();
});

it.skip('6. Test on empty table without column definitions', function (done) {
it('6. Test on empty table without column definitions', function (done) {
alasql('SELECT * INTO three FROM ?', [data1]);
var res = alasql('SELECT * FROM three');
var colres = pluck(res.columns, 'columnid');
assert.deepEqual(colres, ['a', 'b']);
done();
});

it.skip('7. Test on empty table without column definitions', function (done) {
it('7. Test on empty table without column definitions', function (done) {
var res = alasql('SELECT a,b FROM three');
var colres = pluck(res.columns, 'columnid');
assert.deepEqual(colres, ['a', 'b']);
done();
});

it.skip('8. Test on empty table without column definitions', function (done) {
it('8. Test on empty table without column definitions', function (done) {
var res = alasql('SELECT b,a FROM three');
var colres = pluck(res.columns, 'columnid');
assert.deepEqual(colres, ['b', 'a']);
done();
});

it.skip('9. Test on empty table without column definitions', function (done) {
it('9. Test on empty table without column definitions', function (done) {
var res = alasql('SELECT a,b,a*a AS a2 FROM three');
var colres = pluck(res.columns, 'columnid');
assert.deepEqual(colres, ['a', 'b', 'a2']);
done();
});

it.skip('9a. Test on table without column definitions', function (done) {
it('9a. Test on table without column definitions', function (done) {
var res = alasql('SELECT a,a*a AS a2,b FROM three');
var colres = pluck(res.columns, 'columnid');
assert.deepEqual(colres, ['a', 'a2', 'b']);
done();
});

it.skip('9b. Test on table without column definitions', function (done) {
it('9b. Test on table without column definitions', function (done) {
var res = alasql('SELECT a,* FROM three');
var colres = pluck(res.columns, 'columnid');
assert.deepEqual(colres, ['a', 'b']);
done();
});

it.skip('9c. Test on table without column definitions', function (done) {
it('9c. Test on table without column definitions', function (done) {
var res = alasql('SELECT *,a FROM three');
var colres = pluck(res.columns, 'columnid');
assert.deepEqual(colres, ['a', 'b']);
done();
});

it.skip('9c1. Test on table without column definitions', function (done) {
it('9c1. Test on table without column definitions', function (done) {
var res = alasql('SELECT b,*,a FROM three');
var colres = pluck(res.columns, 'columnid');
assert.deepEqual(colres, ['b', 'a']);
Expand All@@ -121,21 +121,21 @@ describe('Test 270 RECORDSET tests', function () {
done();
});

it.skip('10. Array on param with *', function (done) {
it('10. Array on param with *', function (done) {
var res = alasql('SELECT * FROM ?', [data1]);
var colres = pluck(res.columns, 'columnid');
assert.deepEqual(colres, ['a', 'b']);
done();
});

it.skip('11. Array with column', function (done) {
it('11. Array with column', function (done) {
var res = alasql('SELECT a,b FROM ?', [data1]);
var colres = pluck(res.columns, 'columnid');
assert.deepEqual(colres, ['a', 'b']);
done();
});

it.skip('11a. Array with column', function (done) {
it('11a. Array with column', function (done) {
var res = alasql('SELECT b,a FROM ?', [data1]);
var colres = pluck(res.columns, 'columnid');
assert.deepEqual(colres, ['b', 'a']);
Expand All@@ -149,35 +149,35 @@ describe('Test 270 RECORDSET tests', function () {
done();
});

it.skip('12. Array with column', function (done) {
it('12. Array with column', function (done) {
var res = alasql('SELECT a,a*a AS a2 FROM ?', [data1]);
var colres = pluck(res.columns, 'columnid');
assert.deepEqual(colres, ['a', 'a2']);
done();
});

it.skip('12a. Array with column', function (done) {
it('12a. Array with column', function (done) {
var res = alasql('SELECT a,a*a AS a2,b FROM ?', [data1]);
var colres = pluck(res.columns, 'columnid');
assert.deepEqual(colres, ['a', 'a2', 'b']);
done();
});

it.skip('13. Array with column from table', function (done) {
it('13. Array with column from table', function (done) {
var res = alasql('SELECT a,a*a AS a2 FROM one');
var colres = pluck(res.columns, 'columnid');
assert.deepEqual(colres, ['a', 'a2']);
done();
});

it.skip('14. Array with column in reversed order', function (done) {
it('14. Array with column in reversed order', function (done) {
var res = alasql('SELECT a*a AS a2,a FROM ?', [data1]);
var colres = pluck(res.columns, 'columnid');
assert.deepEqual(colres, ['a2', 'a']);
done();
});

it.skip('15. Array with column in reversed order', function (done) {
it('15. Array with column in reversed order', function (done) {
var res = alasql('SELECT a*a AS a2,a FROM ?', [data1]);
var colres = pluck(res.columns, 'columnid');
assert.deepEqual(colres, ['a2', 'a']);
Expand DownExpand Up@@ -208,23 +208,23 @@ describe('Test 270 RECORDSET tests', function () {
});

/*
it.skip('3. VALUE', function(done) {
it('3. VALUE', function(done) {
alasql.options.modifier = 'VALUE';
var res = alasql('SELECT t1.*,t2.* FROM ? t1 OUTER JOIN ? t2 USING b',[data1,data2]);
assert.deepEqual(res,1);

done();
});

it.skip('4. ROW', function(done) {
it('4. ROW', function(done) {
alasql.options.modifier = 'ROW';
var res = alasql('SELECT t1.*,t2.* FROM ? t1 OUTER JOIN ? t2 USING b',[data1,data2]);
assert.deepEqual(res,[1,10,100]);

done();
});

it.skip('5. COLUMN', function(done) {
it('5. COLUMN', function(done) {
alasql.options.modifier = 'COLUMN';
var res = alasql('SELECT t1.*,t2.* FROM ? t1 OUTER JOIN ? t2 USING b',[data1,data2]);
assert.deepEqual(res,[1,2,3,undefined]);
Expand All@@ -233,7 +233,7 @@ describe('Test 270 RECORDSET tests', function () {
});


it.skip('6. MATRIX', function(done) {
it('6. MATRIX', function(done) {
alasql.options.modifier = 'MATRIX';
var res = alasql('SELECT t1.*,t2.* FROM ? t1 OUTER JOIN ? t2 USING b',[data1,data2]);
//console.log(res);
Expand All@@ -243,7 +243,7 @@ describe('Test 270 RECORDSET tests', function () {
done();
});

it.skip('6a. MATRIX', function(done) {
it('6a. MATRIX', function(done) {
alasql.options.modifier = 'MATRIX';
var res = alasql('SELECT t1.*,t2.* FROM ? t1 OUTER JOIN ? t2 USING b \
ORDER BY a',[data1,data2]);
Expand All@@ -255,7 +255,7 @@ describe('Test 270 RECORDSET tests', function () {
});


it.skip('7. RECORDSET', function(done) {
it('7. RECORDSET', function(done) {
alasql.options.modifier = "RECORDSET";
var res = alasql('SELECT t1.*,t2.* FROM ? t1 OUTER JOIN ? t2 USING b',[data1,data2]);
//console.log(res);
Expand All@@ -270,15 +270,15 @@ describe('Test 270 RECORDSET tests', function () {
done();
});

it.skip('8. INDEX', function(done) {
it('8. INDEX', function(done) {
alasql.options.modifier = 'INDEX';
var res = alasql('SELECT t1.*,t2.* FROM ? t1 OUTER JOIN ? t2 USING b',[data1,data2]);
assert.deepEqual(res,{ '1': 10, '2': 20, '3': 30, undefined: 40 });

done();
});

it.skip('9. TEXTSTRING', function(done) {
it('9. TEXTSTRING', function(done) {
alasql.options.modifier = 'TEXTSTRING';
var res = alasql('SELECT t1.*,t2.* FROM ? t1 OUTER JOIN ? t2 USING b',[data1,data2]);
assert.deepEqual(res,'1\n2\n3\n');
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp