@k3000/store 0.1.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/test/4/type.ts ADDED
@@ -0,0 +1,214 @@
1
+
2
+ interface Admin {
3
+
4
+ /**
5
+ *
6
+ */
7
+ id: Number
8
+ /**
9
+ * 账号
10
+ */
11
+ uid: String
12
+ /**
13
+ * 密码
14
+ */
15
+ pwd: String
16
+ /**
17
+ * 是否有效
18
+ */
19
+ valid: Number
20
+ /**
21
+ * 登录时间
22
+ */
23
+ time: Number | Date
24
+ }
25
+
26
+ interface AdminSet extends Array<Admin> {
27
+
28
+ indexById(id: Number): Array<Admin>
29
+ indexByUid(uid: String): Array<Admin>
30
+ indexByValid(valid: Number): Array<Admin>
31
+ indexByTime({after, before}): Array<Admin>
32
+ /**
33
+ * 分页查询
34
+ */
35
+ page(predicate: Function, index: Number | String, size: Number | String, params: Object): Array<Admin>
36
+ /**
37
+ * 移除数据
38
+ */
39
+ remove(...items: Array<Admin>): void
40
+ /**
41
+ * 联合查询,类似LEFT JOIN
42
+ */
43
+ eachFlat(array: Array<Object>, predicate: Function | String): Array<Object>
44
+ /**
45
+ * 联合查询,类似INNER JOIN
46
+ */
47
+ filterFlat(array: Array<Object>, predicate: Function | String): Array<Object>
48
+ }
49
+
50
+ interface Log {
51
+
52
+ /**
53
+ *
54
+ */
55
+ id: Number
56
+ /**
57
+ * 账号
58
+ */
59
+ uid: String
60
+ /**
61
+ * 类型
62
+ */
63
+ type: Number
64
+ /**
65
+ * 创建时间
66
+ */
67
+ time: Number | Date
68
+ /**
69
+ * 内容
70
+ */
71
+ content: String
72
+ }
73
+
74
+ interface LogSet extends Array<Log> {
75
+
76
+ indexById(id: Number): Array<Log>
77
+ indexByUid(uid: String): Array<Log>
78
+ indexByTime({after, before}): Array<Log>
79
+ /**
80
+ * 分页查询
81
+ */
82
+ page(predicate: Function, index: Number | String, size: Number | String, params: Object): Array<Log>
83
+ /**
84
+ * 移除数据
85
+ */
86
+ remove(...items: Array<Log>): void
87
+ /**
88
+ * 联合查询,类似LEFT JOIN
89
+ */
90
+ eachFlat(array: Array<Object>, predicate: Function | String): Array<Object>
91
+ /**
92
+ * 联合查询,类似INNER JOIN
93
+ */
94
+ filterFlat(array: Array<Object>, predicate: Function | String): Array<Object>
95
+ }
96
+
97
+ interface Test {
98
+
99
+ /**
100
+ *
101
+ */
102
+ id: Number
103
+ /**
104
+ *
105
+ */
106
+ uint: Number
107
+ /**
108
+ *
109
+ */
110
+ int: Number
111
+ /**
112
+ *
113
+ */
114
+ bigint: Number | BigInt
115
+ /**
116
+ *
117
+ */
118
+ bigUint: Number | BigInt
119
+ /**
120
+ *
121
+ */
122
+ time: Number | Date
123
+ /**
124
+ *
125
+ */
126
+ float: Number
127
+ /**
128
+ *
129
+ */
130
+ string: String
131
+ /**
132
+ *
133
+ */
134
+ buffer: Buffer
135
+ /**
136
+ *
137
+ */
138
+ text: String
139
+ }
140
+
141
+ interface TestSet extends Array<Test> {
142
+
143
+ indexById(id: Number): Array<Test>
144
+ /**
145
+ * 分页查询
146
+ */
147
+ page(predicate: Function, index: Number | String, size: Number | String, params: Object): Array<Test>
148
+ /**
149
+ * 移除数据
150
+ */
151
+ remove(...items: Array<Test>): void
152
+ /**
153
+ * 联合查询,类似LEFT JOIN
154
+ */
155
+ eachFlat(array: Array<Object>, predicate: Function | String): Array<Object>
156
+ /**
157
+ * 联合查询,类似INNER JOIN
158
+ */
159
+ filterFlat(array: Array<Object>, predicate: Function | String): Array<Object>
160
+ }
161
+
162
+ interface Test3 {
163
+
164
+ /**
165
+ * 账
166
+ * 户
167
+ */
168
+ uid: String
169
+ /**
170
+ *
171
+ */
172
+ pwd: String
173
+ /**
174
+ *
175
+ */
176
+ test: String
177
+ /**
178
+ *
179
+ */
180
+ test3: Number
181
+ /**
182
+ *
183
+ */
184
+ test2: String
185
+ }
186
+
187
+ interface Test3Set extends Array<Test3> {
188
+
189
+ /**
190
+ * 分页查询
191
+ */
192
+ page(predicate: Function, index: Number | String, size: Number | String, params: Object): Array<Test3>
193
+ /**
194
+ * 移除数据
195
+ */
196
+ remove(...items: Array<Test3>): void
197
+ /**
198
+ * 联合查询,类似LEFT JOIN
199
+ */
200
+ eachFlat(array: Array<Object>, predicate: Function | String): Array<Object>
201
+ /**
202
+ * 联合查询,类似INNER JOIN
203
+ */
204
+ filterFlat(array: Array<Object>, predicate: Function | String): Array<Object>
205
+ }
206
+
207
+
208
+ export interface Storage {
209
+ close(): void
210
+ admin: AdminSet,
211
+ log: LogSet,
212
+ test: TestSet,
213
+ test3: Test3Set
214
+ }
package/test/5/data ADDED
Binary file
package/test/5/index ADDED
Binary file