@deterministic-code/datasources-mysql 0.0.0-stage → 0.1.1

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 (48) hide show
  1. package/dist/MysqlBulkUpdateStatementTextRenderer.d.ts +4 -0
  2. package/dist/MysqlCreateTableStatementRenderer.d.ts +5 -0
  3. package/dist/MysqlDriver.d.ts +12 -0
  4. package/dist/MysqlStatementRenderer.d.ts +7 -0
  5. package/dist/bind.d.ts +5 -0
  6. package/dist/columnTypes.d.ts +1 -0
  7. package/dist/command.d.ts +16 -0
  8. package/dist/connection-options.d.ts +5 -0
  9. package/dist/connection.d.ts +19 -0
  10. package/dist/converters/BinaryConverter.d.ts +5 -0
  11. package/dist/converters/BoolConverter.d.ts +5 -0
  12. package/dist/converters/DateTimeConverter.d.ts +5 -0
  13. package/dist/converters/DecimalConverter.d.ts +5 -0
  14. package/dist/converters/MysqlRowTypeConverters.d.ts +3 -0
  15. package/dist/converters/UuidConverter.d.ts +5 -0
  16. package/dist/i-mysql-engine.d.ts +27 -0
  17. package/dist/index.d.ts +1 -0
  18. package/dist/scalar.d.ts +2 -0
  19. package/dist/transaction.d.ts +9 -0
  20. package/package.json +23 -4
  21. package/src/MysqlBulkUpdateStatementTextRenderer.ts +10 -0
  22. package/src/MysqlCreateTableStatementRenderer.ts +12 -0
  23. package/src/MysqlDriver.ts +54 -0
  24. package/src/MysqlStatementRenderer.test.ts +64 -0
  25. package/src/MysqlStatementRenderer.ts +34 -0
  26. package/src/bind.ts +31 -0
  27. package/src/columnTypes.ts +10 -0
  28. package/src/command.ts +197 -0
  29. package/src/connection-options.ts +6 -0
  30. package/src/connection.ts +91 -0
  31. package/src/converters/BinaryConverter.test.ts +12 -0
  32. package/src/converters/BinaryConverter.ts +9 -0
  33. package/src/converters/BoolConverter.test.ts +14 -0
  34. package/src/converters/BoolConverter.ts +6 -0
  35. package/src/converters/DateTimeConverter.test.ts +14 -0
  36. package/src/converters/DateTimeConverter.ts +15 -0
  37. package/src/converters/DecimalConverter.test.ts +11 -0
  38. package/src/converters/DecimalConverter.ts +7 -0
  39. package/src/converters/MysqlRowTypeConverters.test.ts +19 -0
  40. package/src/converters/MysqlRowTypeConverters.ts +25 -0
  41. package/src/converters/UuidConverter.test.ts +11 -0
  42. package/src/converters/UuidConverter.ts +6 -0
  43. package/src/i-mysql-engine.ts +58 -0
  44. package/src/index.ts +1 -0
  45. package/src/mysql.test.ts +342 -0
  46. package/src/scalar.ts +2 -0
  47. package/src/transaction.ts +21 -0
  48. package/README.md +0 -3
@@ -0,0 +1,21 @@
1
+ import {
2
+ IsolationLevel,
3
+ type ITransaction,
4
+ type IsolationLevelName,
5
+ } from "@datasources/core";
6
+ import type { MysqlConnection } from "./connection.ts";
7
+
8
+ export class MysqlTransaction implements ITransaction {
9
+ constructor(
10
+ readonly connection: MysqlConnection,
11
+ readonly isolation: IsolationLevelName = IsolationLevel.ReadCommitted,
12
+ ) {}
13
+
14
+ async commit(): Promise<void> {
15
+ await this.connection.require().commit();
16
+ }
17
+
18
+ async abort(): Promise<void> {
19
+ await this.connection.require().rollback();
20
+ }
21
+ }
package/README.md DELETED
@@ -1,3 +0,0 @@
1
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.