@nymphjs/driver-sqlite3 1.0.0-beta.5 → 1.0.0-beta.50

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/CHANGELOG.md CHANGED
@@ -3,6 +3,204 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [1.0.0-beta.50](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.49...v1.0.0-beta.50) (2024-04-08)
7
+
8
+ **Note:** Version bump only for package @nymphjs/driver-sqlite3
9
+
10
+ # [1.0.0-beta.49](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.48...v1.0.0-beta.49) (2024-03-04)
11
+
12
+ **Note:** Version bump only for package @nymphjs/driver-sqlite3
13
+
14
+ # [1.0.0-beta.48](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.47...v1.0.0-beta.48) (2023-11-10)
15
+
16
+ ### Bug Fixes
17
+
18
+ - avoid trying to roll back a transaction twice ([e26ef31](https://github.com/sciactive/nymphjs/commit/e26ef312b617edcc715c81e7f92875dfaa7a904a))
19
+
20
+ # [1.0.0-beta.47](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.46...v1.0.0-beta.47) (2023-11-10)
21
+
22
+ **Note:** Version bump only for package @nymphjs/driver-sqlite3
23
+
24
+ # [1.0.0-beta.46](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.45...v1.0.0-beta.46) (2023-08-29)
25
+
26
+ **Note:** Version bump only for package @nymphjs/driver-sqlite3
27
+
28
+ # [1.0.0-beta.45](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.44...v1.0.0-beta.45) (2023-07-17)
29
+
30
+ **Note:** Version bump only for package @nymphjs/driver-sqlite3
31
+
32
+ # [1.0.0-beta.44](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.43...v1.0.0-beta.44) (2023-07-13)
33
+
34
+ **Note:** Version bump only for package @nymphjs/driver-sqlite3
35
+
36
+ # [1.0.0-beta.43](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.42...v1.0.0-beta.43) (2023-07-12)
37
+
38
+ **Note:** Version bump only for package @nymphjs/driver-sqlite3
39
+
40
+ # [1.0.0-beta.42](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.41...v1.0.0-beta.42) (2023-07-12)
41
+
42
+ **Note:** Version bump only for package @nymphjs/driver-sqlite3
43
+
44
+ # [1.0.0-beta.41](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.40...v1.0.0-beta.41) (2023-07-12)
45
+
46
+ ### Features
47
+
48
+ - remove synchronous database queries ([b579fb2](https://github.com/sciactive/nymphjs/commit/b579fb2eacd96cdd1b386a62c5c00cdbb2438f6e))
49
+
50
+ # [1.0.0-beta.40](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.39...v1.0.0-beta.40) (2023-07-10)
51
+
52
+ **Note:** Version bump only for package @nymphjs/driver-sqlite3
53
+
54
+ # [1.0.0-beta.39](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.38...v1.0.0-beta.39) (2023-07-09)
55
+
56
+ **Note:** Version bump only for package @nymphjs/driver-sqlite3
57
+
58
+ # [1.0.0-beta.38](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.37...v1.0.0-beta.38) (2023-07-09)
59
+
60
+ **Note:** Version bump only for package @nymphjs/driver-sqlite3
61
+
62
+ # [1.0.0-beta.37](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.36...v1.0.0-beta.37) (2023-07-09)
63
+
64
+ **Note:** Version bump only for package @nymphjs/driver-sqlite3
65
+
66
+ # [1.0.0-beta.36](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.35...v1.0.0-beta.36) (2023-07-09)
67
+
68
+ **Note:** Version bump only for package @nymphjs/driver-sqlite3
69
+
70
+ # [1.0.0-beta.35](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.34...v1.0.0-beta.35) (2023-06-14)
71
+
72
+ **Note:** Version bump only for package @nymphjs/driver-sqlite3
73
+
74
+ # [1.0.0-beta.34](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.33...v1.0.0-beta.34) (2023-05-13)
75
+
76
+ **Note:** Version bump only for package @nymphjs/driver-sqlite3
77
+
78
+ # [1.0.0-beta.33](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.32...v1.0.0-beta.33) (2023-05-13)
79
+
80
+ **Note:** Version bump only for package @nymphjs/driver-sqlite3
81
+
82
+ # [1.0.0-beta.32](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.31...v1.0.0-beta.32) (2023-05-13)
83
+
84
+ **Note:** Version bump only for package @nymphjs/driver-sqlite3
85
+
86
+ # [1.0.0-beta.31](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.30...v1.0.0-beta.31) (2023-05-12)
87
+
88
+ **Note:** Version bump only for package @nymphjs/driver-sqlite3
89
+
90
+ # [1.0.0-beta.30](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.29...v1.0.0-beta.30) (2023-05-12)
91
+
92
+ **Note:** Version bump only for package @nymphjs/driver-sqlite3
93
+
94
+ # [1.0.0-beta.29](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.28...v1.0.0-beta.29) (2023-05-08)
95
+
96
+ **Note:** Version bump only for package @nymphjs/driver-sqlite3
97
+
98
+ # [1.0.0-beta.28](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.27...v1.0.0-beta.28) (2023-05-05)
99
+
100
+ **Note:** Version bump only for package @nymphjs/driver-sqlite3
101
+
102
+ # [1.0.0-beta.27](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.26...v1.0.0-beta.27) (2023-05-04)
103
+
104
+ **Note:** Version bump only for package @nymphjs/driver-sqlite3
105
+
106
+ # [1.0.0-beta.26](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.25...v1.0.0-beta.26) (2023-05-04)
107
+
108
+ **Note:** Version bump only for package @nymphjs/driver-sqlite3
109
+
110
+ # [1.0.0-beta.25](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.24...v1.0.0-beta.25) (2023-05-04)
111
+
112
+ ### Bug Fixes
113
+
114
+ - don't create empty entities ([1d4d2e9](https://github.com/sciactive/nymphjs/commit/1d4d2e99af2e9cdc647bcf58ac34572836f41176))
115
+
116
+ # [1.0.0-beta.24](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.23...v1.0.0-beta.24) (2023-05-02)
117
+
118
+ **Note:** Version bump only for package @nymphjs/driver-sqlite3
119
+
120
+ # [1.0.0-beta.23](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.22...v1.0.0-beta.23) (2023-05-02)
121
+
122
+ **Note:** Version bump only for package @nymphjs/driver-sqlite3
123
+
124
+ # [1.0.0-beta.22](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.21...v1.0.0-beta.22) (2023-05-01)
125
+
126
+ **Note:** Version bump only for package @nymphjs/driver-sqlite3
127
+
128
+ # [1.0.0-beta.21](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.20...v1.0.0-beta.21) (2023-05-01)
129
+
130
+ **Note:** Version bump only for package @nymphjs/driver-sqlite3
131
+
132
+ # [1.0.0-beta.20](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.19...v1.0.0-beta.20) (2023-04-30)
133
+
134
+ ### Features
135
+
136
+ - let the user revoke all current auth tokens ([63af3b9](https://github.com/sciactive/nymphjs/commit/63af3b9a31c6c221ab40c2c8a69231675f4634a2))
137
+
138
+ # [1.0.0-beta.19](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.18...v1.0.0-beta.19) (2023-04-29)
139
+
140
+ **Note:** Version bump only for package @nymphjs/driver-sqlite3
141
+
142
+ # [1.0.0-beta.18](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.17...v1.0.0-beta.18) (2023-04-27)
143
+
144
+ **Note:** Version bump only for package @nymphjs/driver-sqlite3
145
+
146
+ # [1.0.0-beta.17](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.16...v1.0.0-beta.17) (2023-04-24)
147
+
148
+ **Note:** Version bump only for package @nymphjs/driver-sqlite3
149
+
150
+ # [1.0.0-beta.16](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.15...v1.0.0-beta.16) (2023-03-31)
151
+
152
+ **Note:** Version bump only for package @nymphjs/driver-sqlite3
153
+
154
+ # [1.0.0-beta.15](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.14...v1.0.0-beta.15) (2023-03-23)
155
+
156
+ ### Features
157
+
158
+ - add option to sort results by a property ([16384e7](https://github.com/sciactive/nymphjs/commit/16384e7bdab88abb55ccccabb06ac09f92fa8a03))
159
+
160
+ # [1.0.0-beta.14](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.13...v1.0.0-beta.14) (2023-03-17)
161
+
162
+ ### Bug Fixes
163
+
164
+ - run pragma and function on write link on new sqlite3 db ([6c28ba1](https://github.com/sciactive/nymphjs/commit/6c28ba1a396f7cec098d4e550c7b82c93979eaec))
165
+
166
+ # [1.0.0-beta.13](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.12...v1.0.0-beta.13) (2023-03-16)
167
+
168
+ ### Features
169
+
170
+ - open sqlite in readonly unless actively writing to db ([0443b91](https://github.com/sciactive/nymphjs/commit/0443b9188df3ebd557b96baf873abc4e4ddd9137))
171
+
172
+ # [1.0.0-beta.12](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.11...v1.0.0-beta.12) (2023-03-04)
173
+
174
+ **Note:** Version bump only for package @nymphjs/driver-sqlite3
175
+
176
+ # [1.0.0-beta.11](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.10...v1.0.0-beta.11) (2023-02-27)
177
+
178
+ **Note:** Version bump only for package @nymphjs/driver-sqlite3
179
+
180
+ # [1.0.0-beta.10](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.9...v1.0.0-beta.10) (2023-01-19)
181
+
182
+ ### Features
183
+
184
+ - add wal mode setting to sqlite driver ([0071d66](https://github.com/sciactive/nymphjs/commit/0071d6628534b8b35d49c0238a99fe143fd03207))
185
+
186
+ # [1.0.0-beta.9](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.8...v1.0.0-beta.9) (2023-01-09)
187
+
188
+ **Note:** Version bump only for package @nymphjs/driver-sqlite3
189
+
190
+ # [1.0.0-beta.8](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.7...v1.0.0-beta.8) (2023-01-09)
191
+
192
+ **Note:** Version bump only for package @nymphjs/driver-sqlite3
193
+
194
+ # [1.0.0-beta.7](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.6...v1.0.0-beta.7) (2023-01-05)
195
+
196
+ ### Bug Fixes
197
+
198
+ - sqlite transaction returns wrong instance of nymph if it has been cloned ([b278c76](https://github.com/sciactive/nymphjs/commit/b278c7633722cb1cca7a941187ae2f1ff8ebdc7b))
199
+
200
+ # [1.0.0-beta.6](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.5...v1.0.0-beta.6) (2023-01-05)
201
+
202
+ **Note:** Version bump only for package @nymphjs/driver-sqlite3
203
+
6
204
  # [1.0.0-beta.5](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.4...v1.0.0-beta.5) (2022-11-24)
7
205
 
8
206
  **Note:** Version bump only for package @nymphjs/driver-sqlite3
@@ -1,19 +1,25 @@
1
1
  import SQLite3 from 'better-sqlite3';
2
2
  import { NymphDriver, EntityConstructor, EntityInterface, FormattedSelector, Options, Selector } from '@nymphjs/nymph';
3
3
  import { SQLite3DriverConfig } from './conf';
4
+ declare class InternalStore {
5
+ link: SQLite3.Database;
6
+ linkWrite?: SQLite3.Database;
7
+ connected: boolean;
8
+ transactionsStarted: number;
9
+ constructor(link: SQLite3.Database);
10
+ }
4
11
  export default class SQLite3Driver extends NymphDriver {
5
12
  config: SQLite3DriverConfig;
6
13
  protected prefix: string;
7
- protected connected: boolean;
8
- protected link: SQLite3.Database;
9
- protected transactionsStarted: number;
14
+ protected store: InternalStore;
10
15
  static escape(input: string): string;
11
- constructor(config: Partial<SQLite3DriverConfig>);
12
- connect(): Promise<true>;
16
+ constructor(config: Partial<SQLite3DriverConfig>, store?: InternalStore);
17
+ clone(): SQLite3Driver;
18
+ connect(): Promise<boolean>;
19
+ private _connect;
13
20
  disconnect(): Promise<false>;
14
21
  inTransaction(): Promise<boolean>;
15
22
  isConnected(): boolean;
16
- private checkReadOnlyMode;
17
23
  private createTables;
18
24
  private query;
19
25
  private queryIter;
@@ -34,13 +40,6 @@ export default class SQLite3Driver extends NymphDriver {
34
40
  return: 'guid';
35
41
  }, ...selectors: Selector[]): Promise<string[]>;
36
42
  getEntities<T extends EntityConstructor = EntityConstructor>(options?: Options<T>, ...selectors: Selector[]): Promise<ReturnType<T['factorySync']>[]>;
37
- protected getEntitiesSync<T extends EntityConstructor = EntityConstructor>(options: Options<T> & {
38
- return: 'count';
39
- }, ...selectors: Selector[]): number;
40
- protected getEntitiesSync<T extends EntityConstructor = EntityConstructor>(options: Options<T> & {
41
- return: 'guid';
42
- }, ...selectors: Selector[]): string[];
43
- protected getEntitiesSync<T extends EntityConstructor = EntityConstructor>(options?: Options<T>, ...selectors: Selector[]): ReturnType<T['factorySync']>[];
44
43
  getUID(name: string): Promise<number | null>;
45
44
  import(filename: string): Promise<boolean>;
46
45
  newUID(name: string): Promise<number>;
@@ -50,3 +49,4 @@ export default class SQLite3Driver extends NymphDriver {
50
49
  setUID(name: string, curUid: number): Promise<boolean>;
51
50
  startTransaction(name: string): Promise<import("@nymphjs/nymph").Nymph>;
52
51
  }
52
+ export {};