@travetto/model-mysql 3.1.0-rc.6 → 3.1.0-rc.8

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/README.md CHANGED
@@ -13,7 +13,7 @@ npm install @travetto/model-mysql
13
13
  yarn add @travetto/model-mysql
14
14
  ```
15
15
 
16
- This module provides a [MySQL](https://www.mysql.com/)-based implementation for the [Data Modeling Support](https://github.com/travetto/travetto/tree/main/module/model#readme "Datastore abstraction for core operations.") module. This source allows the [Data Modeling Support](https://github.com/travetto/travetto/tree/main/module/model#readme "Datastore abstraction for core operations.") module to read, write and query against [SQL](https://en.wikipedia.org/wiki/SQL) databases. In development mode, the [SQLModelService](https://github.com/travetto/travetto/tree/main/module/model-sql/src/service.ts#L38) will also modify the database schema in real time to minimize impact to development.
16
+ This module provides a [MySQL](https://www.mysql.com/)-based implementation for the [Data Modeling Support](https://github.com/travetto/travetto/tree/main/module/model#readme "Datastore abstraction for core operations.") module. This source allows the [Data Modeling Support](https://github.com/travetto/travetto/tree/main/module/model#readme "Datastore abstraction for core operations.") module to read, write and query against [SQL](https://en.wikipedia.org/wiki/SQL) databases. In development mode, the [SQLModelService](https://github.com/travetto/travetto/tree/main/module/model-sql/src/service.ts#L39) will also modify the database schema in real time to minimize impact to development.
17
17
 
18
18
  The schema generated will not generally map to existing tables as it is attempting to produce a document store like experience on top of a [SQL](https://en.wikipedia.org/wiki/SQL) database. Every table generated will have a `path_id` which determines it's location in the document hierarchy as well as sub tables will have a `parent_path_id` to associate records with the parent values.
19
19
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@travetto/model-mysql",
3
- "version": "3.1.0-rc.6",
3
+ "version": "3.1.0-rc.8",
4
4
  "description": "MySQL backing for the travetto model module, with real-time modeling support for SQL schemas.",
5
5
  "keywords": [
6
6
  "sql",
@@ -29,9 +29,9 @@
29
29
  "dependencies": {
30
30
  "@travetto/config": "^3.1.0-rc.6",
31
31
  "@travetto/context": "^3.1.0-rc.3",
32
- "@travetto/model": "^3.1.0-rc.6",
33
- "@travetto/model-query": "^3.1.0-rc.6",
34
- "@travetto/model-sql": "^3.1.0-rc.6",
32
+ "@travetto/model": "^3.1.0-rc.8",
33
+ "@travetto/model-query": "^3.1.0-rc.8",
34
+ "@travetto/model-sql": "^3.1.0-rc.8",
35
35
  "@types/mysql": "^2.15.21",
36
36
  "mysql2": "^3.1.2"
37
37
  },
package/src/dialect.ts CHANGED
@@ -28,10 +28,6 @@ export class MySQLDialect extends SQLDialect {
28
28
  JSON: 'TEXT'
29
29
  });
30
30
 
31
- // Word boundary
32
- // Field maxlength
33
- this.idField.minlength = this.idField.maxlength = { n: this.KEY_LEN };
34
-
35
31
  /**
36
32
  * Set string length limit based on version
37
33
  */
@@ -63,7 +59,7 @@ export class MySQLDialect extends SQLDialect {
63
59
  * Compute hash
64
60
  */
65
61
  hash(value: string): string {
66
- return `SHA2('${value}', ${this.KEY_LEN * 4})`;
62
+ return `SHA2('${value}', '256')`;
67
63
  }
68
64
 
69
65
  /**