forked from gangadhargo/alasql
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest060.js
33 lines (27 loc) · 932 Bytes
/
test060.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
if (typeof exports === 'object') {
var assert = require('assert');
var alasql = require('..');
}
describe('Test 60 - Other minor', function () {
it('DEAFAULT', function (done) {
alasql('DROP TABLE IF EXISTS test');
alasql('CREATE TABLE test (a INT, b INT DEFAULT 100)');
done();
});
it('USE DATABASE', function (done) {
alasql('INSERT INTO test (a) VALUES (5)');
done();
});
it('SELECT INTO and INTO SELECT', function (done) {
alasql('drop table if exists cities');
alasql('create table cities (name string)');
alasql('insert into cities values ("Moscow"),("Roma"),("Minsk")');
alasql('create table towns (name string)');
alasql('insert into towns values ("New York"),("London"),("Paris")');
alasql('create table capitals (name string)');
alasql('insert into capitals select * from cities');
alasql('select * into capitals from cities');
alasql('select * from capitals');
done();
});
});