w-orm-reladb 1.0.46 → 1.0.48

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/worm.sqlite CHANGED
Binary file
@@ -1,48 +0,0 @@
1
- //共用測試數據, 對應g-mssql.mjs與g-sqlite.mjs之rs與rsm
2
-
3
-
4
- //genRs, 初始插入數據, 第3筆id為空字串會自動產生主鍵
5
- export let genRs = () => {
6
- return [
7
- {
8
- id: 'id-peter',
9
- name: 'peter',
10
- value: 123,
11
- },
12
- {
13
- id: 'id-rosemary',
14
- name: 'rosemary',
15
- value: 123.456,
16
- },
17
- {
18
- id: '',
19
- name: 'kettle',
20
- value: 456,
21
- },
22
- ]
23
- }
24
-
25
-
26
- //genRsm, 儲存(修改)數據, 第3筆id為空字串需視autoInsert決定是否插入
27
- export let genRsm = () => {
28
- return [
29
- {
30
- id: 'id-peter',
31
- name: 'peter(modify)',
32
- },
33
- {
34
- id: 'id-rosemary',
35
- name: 'rosemary(modify)',
36
- },
37
- {
38
- id: '',
39
- name: 'kettle(modify)',
40
- },
41
- ]
42
- }
43
-
44
-
45
- //sortByName, select結果排序供穩定比對
46
- export let sortByName = (rows) => {
47
- return [...rows].sort((a, b) => (a.name < b.name ? -1 : 1))
48
- }