@technicity/data-service-generator 0.7.0 → 0.7.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/package.json +2 -2
  2. package/CHANGELOG.md +0 -166
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@technicity/data-service-generator",
3
- "version": "0.7.0",
3
+ "version": "0.7.1",
4
4
  "main": "./dist/index.js",
5
5
  "files": [
6
6
  "dist"
@@ -17,7 +17,7 @@
17
17
  "fs-extra": "10.0.0",
18
18
  "graphql": "15.8.0",
19
19
  "graphql-relay": "^0.9.0",
20
- "join-monster": "apalm/join-monster#340bcad96da4c268e874d07552d564c98ecf39ea",
20
+ "join-monster": "git+https://github.com/apalm/join-monster.git#340bcad96da4c268e874d07552d564c98ecf39ea",
21
21
  "json-schema-to-typescript": "10.1.5",
22
22
  "lodash": "^4.17.20",
23
23
  "mssql": "^6.3.1",
package/CHANGELOG.md DELETED
@@ -1,166 +0,0 @@
1
- # 0.7.0 [2022.01.17]
2
-
3
- - Add support for MySQL 8
4
-
5
- # 0.5.12 [2021.11.18]
6
-
7
- - Add `$queryRaw`
8
-
9
- ```ts
10
- await sdk.$queryRaw("SELECT * FROM Foo WHERE id = ?", [2]);
11
- ```
12
-
13
- Use the `?` character as a placeholder for values that need to be escaped.
14
-
15
- # 0.5.12 [2021.11.18]
16
-
17
- - Add support for nested creates. All of the specified creates are wrapped in a transaction.
18
-
19
- ```ts
20
- await sdk.postFoo({
21
- foo: "blah",
22
- barList: {
23
- $create: [
24
- {
25
- note: "blah",
26
- bazList: { $create: [{ baz: "asdf" }, { baz: "zzz" }] },
27
- },
28
- { note: "blah 2" },
29
- ],
30
- },
31
- });
32
- ```
33
-
34
- In the above example, 5 records are created: 1 `Foo` record, 2 `Bar` records, and 2 `Baz` records.
35
-
36
- # 0.5.7 [2021.10.12]
37
-
38
- - Add `$nlike` operator. Equivalent to SQL's `NOT LIKE` operator.
39
-
40
- ```ts
41
- await sdk.getFooList({
42
- $where: { bar: { $nlike: "%baz%" } },
43
- });
44
- ```
45
-
46
- # 0.5.5 [2021.10.12]
47
-
48
- - Add limit + offset pagination
49
-
50
- ```ts
51
- await sdk.getFooListPaginated({
52
- $paginate: { limit: 5, offset: 2 },
53
- });
54
- ```
55
-
56
- # 0.5.0 [2021.10.08]
57
-
58
- - Add support for middleware
59
-
60
- Generated SDKs now have a `$use` method, which takes a single argument: your middleware function.
61
-
62
- Example middleware that logs the amount of time an operation took:
63
-
64
- ```ts
65
- sdk.$use(async (params, next) => {
66
- const start = process.hrtime();
67
- const result = await next(params);
68
- const end = process.hrtime(start);
69
- console.log(`${params.resource}.${params.action} took ${end[1] / 1000000}ms`);
70
- return result;
71
- });
72
- ```
73
-
74
- ## Migrating from 0.4.x
75
-
76
- 1. `npm install -S @technicity/data-service-generator@0.5.0`
77
- 2. Regenerate SDK
78
-
79
- # 0.4.0 [2021.09.17]
80
-
81
- - Implement operations on update for string, number fields
82
-
83
- ## string
84
-
85
- ### `$prepend`
86
-
87
- Prepend a string to the current value. If the current value is `null`, the value is not updated.
88
-
89
- ```ts
90
- await sdk.patchFoo(
91
- { id: 1 },
92
- { bar: { $prepend: `BAZ_` }
93
- );
94
- ```
95
-
96
- ### `$append`
97
-
98
- Append a string to the current value. If the current value is `null`, the value is not updated.
99
-
100
- ```ts
101
- await sdk.patchFoo(
102
- { id: 1 },
103
- { bar: { $append: `_BAZ` }
104
- );
105
- ```
106
-
107
- ## number
108
-
109
- ### `$increment`
110
-
111
- Increment the current value. If the current value is `null`, the value is not updated.
112
-
113
- ```ts
114
- await sdk.patchBar(
115
- { id: 1 },
116
- { foo: { $increment: 5 }
117
- );
118
- ```
119
-
120
- ### `$decrement`
121
-
122
- Decrement the current value. If the current value is `null`, the value is not updated.
123
-
124
- ```ts
125
- await sdk.patchBar(
126
- { id: 1 },
127
- { foo: { $decrement: 5 }
128
- );
129
- ```
130
-
131
- ## Migrating from 0.3.x
132
-
133
- 1. `npm install -S @technicity/data-service-generator@0.4.0`
134
- 2. Regenerate SDK
135
-
136
- # 0.3.1 [2021.09.09]
137
-
138
- - [MSSQL] Allow passing custom `typeCast`
139
-
140
- # 0.3.0 [2021.09.08]
141
-
142
- - For the generated SDK, instead of specifying a `dialect`, specify a `runtime`. This reduces the need to regenerate SDKs, since updates and bugfixes to the runtime side can be obtained solely by updating the `@technicity/data-service-generator` version, instead of both updating the `@technicity/data-service-generator` version and regenerating the SDK. It also allows for custom runtimes that live outside this package. `@technicity/data-service-generator` ships with 3 runtimes: `RuntimeMySQL`, `RuntimeMSSQL`, `RuntimeKSQL`.
143
- - Add KSQL support
144
- - `driverOpts` -> `clientOpts`
145
- - Add `otherOpts` to allow passing extra runtime-specific options
146
-
147
- ## Migrating from 0.2.x
148
-
149
- 1. `npm install -S @technicity/data-service-generator@0.3.0`
150
- 2. Regenerate SDK
151
- 3. Update SDK instantiation:
152
-
153
- ```diff
154
- + import { RuntimeMySQL } from "@technicity/data-service-generator/dist/runtime/RuntimeMySQL";
155
-
156
- const sdk = new SDK({
157
- - dialect: "mysql",
158
- + runtime: RuntimeMySQL,
159
- - driverOpts: {
160
- + clientOpts: {
161
- database: "MY_DATABASE",
162
- user: "MY_USER",
163
- password: "MY_PASSWORD",
164
- },
165
- });
166
- ```