@pgpm/utils 0.15.2 → 0.15.4
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/Makefile
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pgpm/utils",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.4",
|
|
4
4
|
"description": "General utility functions for PostgreSQL extensions",
|
|
5
5
|
"author": "Dan Lynch <pyramation@gmail.com>",
|
|
6
6
|
"contributors": [
|
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
"test:watch": "jest --watch"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@pgpm/verify": "0.15.
|
|
24
|
+
"@pgpm/verify": "0.15.4"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"pgpm": "^1.
|
|
27
|
+
"pgpm": "^1.2.2"
|
|
28
28
|
},
|
|
29
29
|
"repository": {
|
|
30
30
|
"type": "git",
|
|
@@ -34,5 +34,5 @@
|
|
|
34
34
|
"bugs": {
|
|
35
35
|
"url": "https://github.com/constructive-io/pgpm-modules/issues"
|
|
36
36
|
},
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "aad0dbef0336d6c18d027120ef9addc418822edd"
|
|
38
38
|
}
|
package/pgpm-utils.control
CHANGED
package/__tests__/utils.test.ts
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { getConnections, PgTestClient } from 'pgsql-test';
|
|
2
|
-
|
|
3
|
-
let pg: PgTestClient;
|
|
4
|
-
let teardown: () => Promise<void>;
|
|
5
|
-
|
|
6
|
-
beforeAll(async () => {
|
|
7
|
-
({ pg, teardown } = await getConnections());
|
|
8
|
-
});
|
|
9
|
-
|
|
10
|
-
afterAll(async () => {
|
|
11
|
-
await teardown();
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
it('more', async () => {
|
|
15
|
-
const { mask_pad } = await pg.one(
|
|
16
|
-
`SELECT utils.mask_pad($1, $2) AS mask_pad`,
|
|
17
|
-
['101', 20]
|
|
18
|
-
);
|
|
19
|
-
expect(mask_pad).toMatchSnapshot();
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
it('less', async () => {
|
|
23
|
-
const { mask_pad } = await pg.one(
|
|
24
|
-
`SELECT utils.mask_pad($1, $2) AS mask_pad`,
|
|
25
|
-
['101', 2]
|
|
26
|
-
);
|
|
27
|
-
expect(mask_pad).toMatchSnapshot();
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
describe('bitmask', () => {
|
|
31
|
-
it('more', async () => {
|
|
32
|
-
const { bitmask_pad } = await pg.one(
|
|
33
|
-
`SELECT utils.bitmask_pad($1::varbit, $2) AS bitmask_pad`,
|
|
34
|
-
['101', 20]
|
|
35
|
-
);
|
|
36
|
-
expect(bitmask_pad).toMatchSnapshot();
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
it('less', async () => {
|
|
40
|
-
const { bitmask_pad } = await pg.one(
|
|
41
|
-
`SELECT utils.bitmask_pad($1::varbit, $2) AS bitmask_pad`,
|
|
42
|
-
['101', 2]
|
|
43
|
-
);
|
|
44
|
-
expect(bitmask_pad).toMatchSnapshot();
|
|
45
|
-
});
|
|
46
|
-
});
|
|
File without changes
|