Skip to content

Commit 0334412

Browse files
committed
Add tslint config and update typescript definition
Credit goes to @kaktus40
1 parent 14f4808 commit 0334412

File tree

8 files changed

+85
-89
lines changed

8 files changed

+85
-89
lines changed

dist/alasql-worker.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
//! AlaSQL v0.2.6-develop-1312 | © 2014-2016 Andrey Gershun & Mathias Rangel Wulff | License: MIT
1+
//! AlaSQL v0.2.6-develop-1314 | © 2014-2016 Andrey Gershun & Mathias Rangel Wulff | License: MIT
22
/*
33
@module alasql
4-
@version 0.2.6-develop-1312
4+
@version 0.2.6-develop-1314
55
66
AlaSQL - JavaScript SQL database
77
© 2014-2016 Andrey Gershun & Mathias Rangel Wulff

dist/alasql-worker.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/alasql.d.ts

+33-34
Original file line numberDiff line numberDiff line change
@@ -4,44 +4,43 @@
44
// Definitions: https://github.com/borisyankov/DefinitelyTyped
55

66

7-
87
interface AlaSQLCallback {
9-
(data?:any,err?:Error):void
8+
(data?: any, err?: Error): void;
109
}
1110

1211
interface AlaSQLOptions {
13-
errorlog: boolean;
14-
valueof :boolean
15-
dropifnotexists :boolean; // DROP database in any case
16-
datetimeformat :string; // How to handle DATE and DATETIME types
17-
casesensitive :boolean; // Table and column names are case sensitive and converted to lower-case
18-
logtarget :string; // target for log. Values: 'console', 'output', 'id' of html tag
19-
logprompt :boolean; // Print SQL at log
20-
modifier :any; // values: RECORDSET, VALUE, ROW, COLUMN, MATRIX, TEXTSTRING, INDEX
21-
columnlookup:number; // How many rows to lookup to define columns
22-
autovertex:boolean;// Create vertex if not found
23-
usedbo:boolean; // Use dbo as current database (for partial T-SQL comaptibility)
24-
autocommit:boolean; // AUTOCOMMIT ON | OFF
25-
cache:boolean; // Use cache
26-
nocount:boolean;// for SET NOCOUNT OFF
27-
nan:boolean;// Check for NaN and convert it to undefined
28-
angularjs :boolean;
29-
tsql:boolean;
30-
mysql:boolean;
31-
postgres:boolean;
32-
oracle:boolean;
33-
sqlite:boolean;
34-
orientdb:boolean;
12+
errorlog: boolean;
13+
valueof: boolean;
14+
dropifnotexists: boolean; // drop database in any case
15+
datetimeformat: string; // how to handle DATE and DATETIME types
16+
casesensitive: boolean; // table and column names are case sensitive and converted to lower-case
17+
logtarget: string; // target for log. Values: 'console', 'output', 'id' of html tag
18+
logprompt: boolean; // print SQL at log
19+
modifier: any; // values: RECORDSET, VALUE, ROW, COLUMN, MATRIX, TEXTSTRING, INDEX
20+
columnlookup: number; // how many rows to lookup to define columns
21+
autovertex: boolean; // create vertex if not found
22+
usedbo: boolean; // use dbo as current database (for partial T-SQL comaptibility)
23+
autocommit: boolean; // the AUTOCOMMIT ON | OFF
24+
cache: boolean; // use cache
25+
nocount: boolean; // for SET NOCOUNT OFF
26+
nan: boolean; // check for NaN and convert it to undefined
27+
angularjs: boolean;
28+
tsql: boolean;
29+
mysql: boolean;
30+
postgres: boolean;
31+
oracle: boolean;
32+
sqlite: boolean;
33+
orientdb: boolean;
3534
}
3635

37-
// Compiled Statement
36+
// compiled Statement
3837
interface AlaSQLStatement {
39-
(params?:any,cb?:AlaSQLCallback,scope?:any):any;
38+
(params?: any, cb?: AlaSQLCallback, scope?: any): any;
4039
}
4140

42-
// Abstract Syntax Tree
41+
// abstract Syntax Tree
4342
interface AlaSQLAST {
44-
compile(databaseid:string):AlaSQLStatement;
43+
compile(databaseid: string): AlaSQLStatement;
4544
}
4645

4746
// https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/es6-promise/es6-promise.d.ts
@@ -52,12 +51,12 @@ interface Thenable<T> {
5251
}
5352

5453
interface AlaSQL {
55-
(sql:any,params?:any,cb?:AlaSQLCallback,scope?:any):any;
56-
parse(sql):AlaSQLAST;
57-
options:AlaSQLOptions;
58-
error: Error;
59-
promise(sql:any,params?:any):Thenable<any>;
54+
options: AlaSQLOptions;
55+
error: Error;
56+
(sql: any, params?: any, cb?: AlaSQLCallback, scope?: any): any;
57+
parse(sql): AlaSQLAST;
58+
promise(sql: any, params?: any): Thenable<any>;
6059
}
6160

62-
declare var alasql : AlaSQL;
61+
declare var alasql: AlaSQL;
6362

dist/alasql.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
//! AlaSQL v0.2.6-develop-1312 | © 2014-2016 Andrey Gershun & Mathias Rangel Wulff | License: MIT
1+
//! AlaSQL v0.2.6-develop-1314 | © 2014-2016 Andrey Gershun & Mathias Rangel Wulff | License: MIT
22
/*
33
@module alasql
4-
@version 0.2.6-develop-1312
4+
@version 0.2.6-develop-1314
55

66
AlaSQL - JavaScript SQL database
77
© 2014-2016 Andrey Gershun & Mathias Rangel Wulff
@@ -140,7 +140,7 @@ var alasql = function(sql, params, cb, scope) {
140140
Current version of alasql
141141
@constant {string}
142142
*/
143-
alasql.version = '0.2.6-develop-1312';
143+
alasql.version = '0.2.6-develop-1314';
144144

145145
/**
146146
Debug flag

dist/alasql.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

partners/typescript/alasql.d.ts

+33-34
Original file line numberDiff line numberDiff line change
@@ -4,44 +4,43 @@
44
// Definitions: https://github.com/borisyankov/DefinitelyTyped
55

66

7-
87
interface AlaSQLCallback {
9-
(data?:any,err?:Error):void
8+
(data?: any, err?: Error): void;
109
}
1110

1211
interface AlaSQLOptions {
13-
errorlog: boolean;
14-
valueof :boolean
15-
dropifnotexists :boolean; // DROP database in any case
16-
datetimeformat :string; // How to handle DATE and DATETIME types
17-
casesensitive :boolean; // Table and column names are case sensitive and converted to lower-case
18-
logtarget :string; // target for log. Values: 'console', 'output', 'id' of html tag
19-
logprompt :boolean; // Print SQL at log
20-
modifier :any; // values: RECORDSET, VALUE, ROW, COLUMN, MATRIX, TEXTSTRING, INDEX
21-
columnlookup:number; // How many rows to lookup to define columns
22-
autovertex:boolean;// Create vertex if not found
23-
usedbo:boolean; // Use dbo as current database (for partial T-SQL comaptibility)
24-
autocommit:boolean; // AUTOCOMMIT ON | OFF
25-
cache:boolean; // Use cache
26-
nocount:boolean;// for SET NOCOUNT OFF
27-
nan:boolean;// Check for NaN and convert it to undefined
28-
angularjs :boolean;
29-
tsql:boolean;
30-
mysql:boolean;
31-
postgres:boolean;
32-
oracle:boolean;
33-
sqlite:boolean;
34-
orientdb:boolean;
12+
errorlog: boolean;
13+
valueof: boolean;
14+
dropifnotexists: boolean; // drop database in any case
15+
datetimeformat: string; // how to handle DATE and DATETIME types
16+
casesensitive: boolean; // table and column names are case sensitive and converted to lower-case
17+
logtarget: string; // target for log. Values: 'console', 'output', 'id' of html tag
18+
logprompt: boolean; // print SQL at log
19+
modifier: any; // values: RECORDSET, VALUE, ROW, COLUMN, MATRIX, TEXTSTRING, INDEX
20+
columnlookup: number; // how many rows to lookup to define columns
21+
autovertex: boolean; // create vertex if not found
22+
usedbo: boolean; // use dbo as current database (for partial T-SQL comaptibility)
23+
autocommit: boolean; // the AUTOCOMMIT ON | OFF
24+
cache: boolean; // use cache
25+
nocount: boolean; // for SET NOCOUNT OFF
26+
nan: boolean; // check for NaN and convert it to undefined
27+
angularjs: boolean;
28+
tsql: boolean;
29+
mysql: boolean;
30+
postgres: boolean;
31+
oracle: boolean;
32+
sqlite: boolean;
33+
orientdb: boolean;
3534
}
3635

37-
// Compiled Statement
36+
// compiled Statement
3837
interface AlaSQLStatement {
39-
(params?:any,cb?:AlaSQLCallback,scope?:any):any;
38+
(params?: any, cb?: AlaSQLCallback, scope?: any): any;
4039
}
4140

42-
// Abstract Syntax Tree
41+
// abstract Syntax Tree
4342
interface AlaSQLAST {
44-
compile(databaseid:string):AlaSQLStatement;
43+
compile(databaseid: string): AlaSQLStatement;
4544
}
4645

4746
// https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/es6-promise/es6-promise.d.ts
@@ -52,12 +51,12 @@ interface Thenable<T> {
5251
}
5352

5453
interface AlaSQL {
55-
(sql:any,params?:any,cb?:AlaSQLCallback,scope?:any):any;
56-
parse(sql):AlaSQLAST;
57-
options:AlaSQLOptions;
58-
error: Error;
59-
promise(sql:any,params?:any):Thenable;
54+
options: AlaSQLOptions;
55+
error: Error;
56+
(sql: any, params?: any, cb?: AlaSQLCallback, scope?: any): any;
57+
parse(sql): AlaSQLAST;
58+
promise(sql: any, params?: any): Thenable<any>;
6059
}
6160

62-
declare var alasql : AlaSQL;
61+
declare var alasql: AlaSQL;
6362

test/test604.json

-13
Original file line numberDiff line numberDiff line change
@@ -1,13 +0,0 @@
1-
{
2-
"alasql": "{\"databases\":{\"test267\":true,\"Atlas\":true,\"ls379\":true,\"test\":true,\"db604ls\":true}}",
3-
"test267": "{\"databaseid\":\"test267\",\"tables\":{\"test\":true}}",
4-
"test267.test": "{\"columns\":[],\"data\":[],\"identities\":{}}",
5-
"Atlas": "{\"databaseid\":\"Atlas\",\"tables\":{\"transactions\":true}}",
6-
"Atlas.transactions": "{\"columns\":[{\"columnid\":\"transid\",\"dbtypeid\":\"\"},{\"columnid\":\"payee\",\"dbtypeid\":\"\"},{\"columnid\":\"amount\",\"dbtypeid\":\"\"}],\"data\":[],\"identities\":{}}",
7-
"ls379": "{\"databaseid\":\"ls379\",\"tables\":{\"one\":true}}",
8-
"ls379.one": "{\"columns\":[{\"columnid\":\"a\",\"dbtypeid\":\"INT\"},{\"columnid\":\"b\",\"dbtypeid\":\"STRING\"}],\"data\":[],\"identities\":{}}",
9-
"test": "{\"databaseid\":\"test\",\"tables\":{\"one\":true}}",
10-
"test.one": "{\"columns\":[{\"columnid\":\"a\",\"dbtypeid\":\"INT\",\"identity\":{\"value\":1,\"step\":1}},{\"columnid\":\"b\",\"dbtypeid\":\"STRING\"}],\"data\":[{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"}],\"identities\":{\"a\":{\"value\":1,\"step\":1}}}",
11-
"db604ls": "{\"databaseid\":\"db604ls\",\"tables\":{\"t1\":true,\"v1\":true}}",
12-
"db604ls.t1": "{\"columns\":[{\"columnid\":\"a\",\"dbtypeid\":\"INT\"},{\"columnid\":\"b\",\"dbtypeid\":\"STRING\"}],\"data\":[],\"identities\":{}}"
13-
}

tslint.json

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"rules": {
3+
"interface-name": [
4+
true,
5+
"never-prefix"
6+
],
7+
"whitespace": [
8+
false
9+
]
10+
}
11+
}

0 commit comments

Comments
 (0)