@slickgrid-universal/sql 10.7.0 → 10.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@slickgrid-universal/sql",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.8.0",
|
|
4
4
|
"description": "SlickGrid Universal SQL Backend Service (implements BackendService for SQL)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -31,12 +31,12 @@
|
|
|
31
31
|
"url": "https://github.com/ghiscoding/slickgrid-universal/issues"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@slickgrid-universal/common": "10.
|
|
35
|
-
"@slickgrid-universal/utils": "10.
|
|
34
|
+
"@slickgrid-universal/common": "10.8.0",
|
|
35
|
+
"@slickgrid-universal/utils": "10.8.0"
|
|
36
36
|
},
|
|
37
37
|
"funding": {
|
|
38
38
|
"type": "ko_fi",
|
|
39
39
|
"url": "https://ko-fi.com/ghiscoding"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "df37d75b80d090f55e9837cb6547fe4f2b090d22"
|
|
42
42
|
}
|
|
@@ -111,7 +111,7 @@ describe('SqlService', () => {
|
|
|
111
111
|
|
|
112
112
|
it('should throw an error when no service options exists after service init', () => {
|
|
113
113
|
service.init(undefined as any);
|
|
114
|
-
expect(() => service.buildQuery()).toThrow();
|
|
114
|
+
expect(() => service.buildQuery()).toThrow('');
|
|
115
115
|
});
|
|
116
116
|
|
|
117
117
|
it('should throw an error when no tableName is provided in the service options after service init', () => {
|
|
@@ -121,7 +121,7 @@ describe('SqlService', () => {
|
|
|
121
121
|
|
|
122
122
|
it('should throw an error when no column definitions is provided in the service options after service init', () => {
|
|
123
123
|
service.init({ tableName: 'users' });
|
|
124
|
-
expect(() => service.buildQuery()).toThrow();
|
|
124
|
+
expect(() => service.buildQuery()).toThrow('');
|
|
125
125
|
});
|
|
126
126
|
|
|
127
127
|
it('should return a simple SQL query with pagination set and includes all fields', () => {
|
|
@@ -533,7 +533,7 @@ describe('SqlService', () => {
|
|
|
533
533
|
describe('processOnFilterChanged method', () => {
|
|
534
534
|
it('should throw an error when grid is undefined', () => {
|
|
535
535
|
service.init(serviceOptions, paginationOptions, gridStub);
|
|
536
|
-
expect(() => service.processOnFilterChanged(null as any, { grid: undefined } as any)).toThrow();
|
|
536
|
+
expect(() => service.processOnFilterChanged(null as any, { grid: undefined } as any)).toThrow('');
|
|
537
537
|
});
|
|
538
538
|
|
|
539
539
|
it('should return a query with the new filter', () => {
|
|
@@ -1177,7 +1177,7 @@ describe('SqlService', () => {
|
|
|
1177
1177
|
expect(removeSpaces(query)).toBe(removeSpaces(expectation));
|
|
1178
1178
|
});
|
|
1179
1179
|
|
|
1180
|
-
it('should return a query with a CSV string when the filter operator is IN
|
|
1180
|
+
it('should return a query with a CSV string when the filter operator is IN', () => {
|
|
1181
1181
|
const expectation = `SELECT *, COUNT(*) OVER() AS "totalCount" FROM "users" WHERE "gender" IN ('female','male') LIMIT 10 OFFSET 0`;
|
|
1182
1182
|
const mockColumn = { id: 'gender', field: 'gender' } as Column;
|
|
1183
1183
|
const mockColumnFilters = {
|
|
@@ -1793,12 +1793,12 @@ describe('SqlService', () => {
|
|
|
1793
1793
|
});
|
|
1794
1794
|
|
|
1795
1795
|
it('should throw in _buildOrderByClause if options, tableName, or columns are missing', () => {
|
|
1796
|
-
expect(() => service['buildOrderByClause']()).toThrow();
|
|
1796
|
+
expect(() => service['buildOrderByClause']()).toThrow('');
|
|
1797
1797
|
service.options = { tableName: 'users' };
|
|
1798
|
-
expect(() => service['buildOrderByClause']()).toThrow();
|
|
1798
|
+
expect(() => service['buildOrderByClause']()).toThrow('');
|
|
1799
1799
|
service.options = undefined as any;
|
|
1800
1800
|
service['_columns'] = [{ id: 'foo', field: 'foo' }];
|
|
1801
|
-
expect(() => service['buildOrderByClause']()).toThrow();
|
|
1801
|
+
expect(() => service['buildOrderByClause']()).toThrow('');
|
|
1802
1802
|
});
|
|
1803
1803
|
|
|
1804
1804
|
it('should return empty string from _buildOrderByClause if no valid sorters', () => {
|