node-firebird-driver 3.2.2 → 3.3.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.
Files changed (41) hide show
  1. package/README.md +1 -1
  2. package/dist/lib/impl/attachment.d.ts +4 -4
  3. package/dist/lib/impl/attachment.js +8 -6
  4. package/dist/lib/impl/attachment.js.map +1 -1
  5. package/dist/lib/impl/blob.js.map +1 -1
  6. package/dist/lib/impl/client.js +3 -2
  7. package/dist/lib/impl/client.js.map +1 -1
  8. package/dist/lib/impl/date-time.js +2 -1
  9. package/dist/lib/impl/date-time.js.map +1 -1
  10. package/dist/lib/impl/events.js +2 -1
  11. package/dist/lib/impl/events.js.map +1 -1
  12. package/dist/lib/impl/fb-util.d.ts +2 -1
  13. package/dist/lib/impl/fb-util.js +100 -81
  14. package/dist/lib/impl/fb-util.js.map +1 -1
  15. package/dist/lib/impl/resultset.js +11 -5
  16. package/dist/lib/impl/resultset.js.map +1 -1
  17. package/dist/lib/impl/statement.js +4 -2
  18. package/dist/lib/impl/statement.js.map +1 -1
  19. package/dist/lib/impl/time-zones.js +5 -3
  20. package/dist/lib/impl/time-zones.js.map +1 -1
  21. package/dist/lib/impl/transaction.js +2 -1
  22. package/dist/lib/impl/transaction.js.map +1 -1
  23. package/dist/lib/index.d.ts +8 -1
  24. package/dist/lib/index.js +7 -1
  25. package/dist/lib/index.js.map +1 -1
  26. package/dist/test/tests.js +176 -68
  27. package/dist/test/tests.js.map +1 -1
  28. package/package.json +6 -5
  29. package/src/lib/impl/attachment.ts +290 -253
  30. package/src/lib/impl/blob.ts +37 -35
  31. package/src/lib/impl/client.ts +60 -61
  32. package/src/lib/impl/date-time.ts +33 -33
  33. package/src/lib/impl/events.ts +17 -18
  34. package/src/lib/impl/fb-util.ts +552 -448
  35. package/src/lib/impl/resultset.ts +94 -86
  36. package/src/lib/impl/statement.ts +154 -127
  37. package/src/lib/impl/time-zones.ts +643 -641
  38. package/src/lib/impl/transaction.ts +37 -38
  39. package/src/lib/index.ts +325 -285
  40. package/src/test/tests.ts +996 -860
  41. package/tsconfig.json +7 -13
@@ -2,57 +2,56 @@ import { AbstractAttachment } from './attachment';
2
2
 
3
3
  import { Transaction } from '..';
4
4
 
5
-
6
5
  /** AbstractTransaction implementation. */
7
6
  export abstract class AbstractTransaction implements Transaction {
8
- protected constructor(public attachment?: AbstractAttachment) {
9
- }
7
+ protected constructor(public attachment?: AbstractAttachment) {}
10
8
 
11
- /** Commits and release this transaction object. */
12
- async commit(): Promise<void> {
13
- this.check();
9
+ /** Commits and release this transaction object. */
10
+ async commit(): Promise<void> {
11
+ this.check();
14
12
 
15
- await this.internalCommit();
13
+ await this.internalCommit();
16
14
 
17
- this.attachment!.transactions.delete(this);
18
- this.attachment = undefined;
19
- }
15
+ this.attachment!.transactions.delete(this);
16
+ this.attachment = undefined;
17
+ }
20
18
 
21
- /** Commits and maintains this transaction object for subsequent work. */
22
- async commitRetaining(): Promise<void> {
23
- this.check();
19
+ /** Commits and maintains this transaction object for subsequent work. */
20
+ async commitRetaining(): Promise<void> {
21
+ this.check();
24
22
 
25
- return await this.internalCommitRetaining();
26
- }
23
+ return await this.internalCommitRetaining();
24
+ }
27
25
 
28
- /** Rollbacks and release this transaction object. */
29
- async rollback(): Promise<void> {
30
- this.check();
26
+ /** Rollbacks and release this transaction object. */
27
+ async rollback(): Promise<void> {
28
+ this.check();
31
29
 
32
- await this.internalRollback();
30
+ await this.internalRollback();
33
31
 
34
- this.attachment!.transactions.delete(this);
35
- this.attachment = undefined;
36
- }
32
+ this.attachment!.transactions.delete(this);
33
+ this.attachment = undefined;
34
+ }
37
35
 
38
- /** Rollbacks and maintains this transaction object for subsequent work. */
39
- async rollbackRetaining(): Promise<void> {
40
- this.check();
36
+ /** Rollbacks and maintains this transaction object for subsequent work. */
37
+ async rollbackRetaining(): Promise<void> {
38
+ this.check();
41
39
 
42
- return await this.internalRollbackRetaining();
43
- }
40
+ return await this.internalRollbackRetaining();
41
+ }
44
42
 
45
- get isValid(): boolean {
46
- return !!this.attachment;
47
- }
43
+ get isValid(): boolean {
44
+ return !!this.attachment;
45
+ }
48
46
 
49
- private check() {
50
- if (!this.isValid)
51
- throw new Error('Transaction is already committed or rolled back.');
52
- }
47
+ private check() {
48
+ if (!this.isValid) {
49
+ throw new Error('Transaction is already committed or rolled back.');
50
+ }
51
+ }
53
52
 
54
- protected abstract internalCommit(): Promise<void>;
55
- protected abstract internalCommitRetaining(): Promise<void>;
56
- protected abstract internalRollback(): Promise<void>;
57
- protected abstract internalRollbackRetaining(): Promise<void>;
53
+ protected abstract internalCommit(): Promise<void>;
54
+ protected abstract internalCommitRetaining(): Promise<void>;
55
+ protected abstract internalRollback(): Promise<void>;
56
+ protected abstract internalRollbackRetaining(): Promise<void>;
58
57
  }