@travetto/model-sql 3.0.0-rc.9 → 3.0.1-rc.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 (2) hide show
  1. package/README.md +13 -20
  2. package/package.json +7 -7
package/README.md CHANGED
@@ -6,33 +6,26 @@
6
6
  **Install: @travetto/model-sql**
7
7
  ```bash
8
8
  npm install @travetto/model-sql
9
- ```
10
-
11
- **Install: Specific SQL Client: mysql**
12
- ```bash
13
- npm install @travetto/model-mysql
14
- ```
15
9
 
16
- or
10
+ # or
17
11
 
18
- **Install: Specific SQL Client: mysql**
19
- ```bash
20
- npm install @travetto/model-postgres
21
- ```
22
-
23
- or
24
-
25
- **Install: Specific SQL Client: mysql**
26
- ```bash
27
- npm install @travetto/model-sqlite
12
+ yarn add @travetto/model-sql
28
13
  ```
29
14
 
30
15
  The current SQL client support stands at:
31
16
 
32
- * [MySQL](https://www.mysql.com/) - 5.6 and 5.7
33
- * [Postgres](https://postgresql.org) - 11+
34
- * [SQLite](https://www.sqlite.org/) - (bettersqlite 7.6+)
17
+ * [MySQL Model Service](https://github.com/travetto/travetto/tree/main/module/model-mysql#readme "MySQL backing for the travetto model module, with real-time modeling support for SQL schemas.") - MySQL 8.6+
18
+ * [PostgreSQL Model Service](https://github.com/travetto/travetto/tree/main/module/model-postgres#readme "PostgreSQL backing for the travetto model module, with real-time modeling support for SQL schemas.") - Postgres 14+
19
+ * [SQLite Model Service](https://github.com/travetto/travetto/tree/main/module/model-sqlite#readme "SQLite backing for the travetto model module, with real-time modeling support for SQL schemas.") - (bettersqlite 8.0+)
35
20
  * `SQL Server` - Currently unsupported
36
21
  * `Oracle` - Currently unsupported
37
22
 
38
23
  **Note**: Wider client support will roll out as usage increases.
24
+
25
+ ## Assumed Behavior
26
+
27
+ The [SQL Model Service](https://github.com/travetto/travetto/tree/main/module/model-sql#readme "SQL backing for the travetto model module, with real-time modeling support for SQL schemas.") works quite a bit different than the average [Object Relationship Mapping](https://en.wikipedia.org/wiki/Object%E2%80%93relational_mapping) in that it makes assertions about how data is stored in the database. The primary goal of the [SQL](https://en.wikipedia.org/wiki/SQL) support is not to handle every scenario that a relational database can provide, but to integrate with the [Data Modeling Support](https://github.com/travetto/travetto/tree/main/module/model#readme "Datastore abstraction for core operations.") structure, while leverage relational datastores to the best of their abilities.
28
+
29
+ The primary difference is around unique identifiers, and how parent/child relationships are managed. In a normal database primary keys could be composite values between various fields. For example a unique identifier could be a combination of `date` + `orderNumber` + `customerNumber`. This is perfectly normal in a relational model, but [SQL Model Service](https://github.com/travetto/travetto/tree/main/module/model-sql#readme "SQL backing for the travetto model module, with real-time modeling support for SQL schemas.") assumes unique identifiers ([UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier)) as 32-character hexadecimal values. In addition to these unique values, the parent's identifier is required in all children values. This allows for some fairly optimized querying, updates, and deletions on changes.
30
+
31
+ What this translates to, is that the framework here dictates the final schema, and doesn't support adapting to existing relational data stores. In greenfield projects, this is not an issue, but will most likely preclude its use in adapting to existing relational data sets.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@travetto/model-sql",
3
- "version": "3.0.0-rc.9",
3
+ "version": "3.0.1-rc.1",
4
4
  "description": "SQL backing for the travetto model module, with real-time modeling support for SQL schemas.",
5
5
  "keywords": [
6
6
  "sql",
@@ -27,14 +27,14 @@
27
27
  "directory": "module/model-sql"
28
28
  },
29
29
  "dependencies": {
30
- "@travetto/config": "^3.0.0-rc.9",
31
- "@travetto/context": "^3.0.0-rc.9",
32
- "@travetto/model": "^3.0.0-rc.9",
33
- "@travetto/model-query": "^3.0.0-rc.9"
30
+ "@travetto/config": "^3.0.1-rc.1",
31
+ "@travetto/context": "^3.0.1-rc.1",
32
+ "@travetto/model": "^3.0.1-rc.1",
33
+ "@travetto/model-query": "^3.0.1-rc.1"
34
34
  },
35
35
  "peerDependencies": {
36
- "@travetto/command": "^3.0.0-rc.7",
37
- "@travetto/test": "^3.0.0-rc.9"
36
+ "@travetto/command": "^3.0.1-rc.1",
37
+ "@travetto/test": "^3.0.1-rc.1"
38
38
  },
39
39
  "peerDependenciesMeta": {
40
40
  "@travetto/command": {