@openfn/language-mysql 1.4.14 → 1.5.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.
package/ast.json CHANGED
@@ -99,6 +99,59 @@
99
99
  },
100
100
  "valid": true
101
101
  },
102
+ {
103
+ "name": "fnIf",
104
+ "params": [
105
+ "condition",
106
+ "operation"
107
+ ],
108
+ "docs": {
109
+ "description": "A custom operation that will only execute the function if the condition returns true",
110
+ "tags": [
111
+ {
112
+ "title": "public",
113
+ "description": null,
114
+ "type": null
115
+ },
116
+ {
117
+ "title": "example",
118
+ "description": "fnIf((state) => state?.data?.name, get(\"https://example.com\"));"
119
+ },
120
+ {
121
+ "title": "function",
122
+ "description": null,
123
+ "name": null
124
+ },
125
+ {
126
+ "title": "param",
127
+ "description": "The condition that returns true",
128
+ "type": {
129
+ "type": "NameExpression",
130
+ "name": "Boolean"
131
+ },
132
+ "name": "condition"
133
+ },
134
+ {
135
+ "title": "param",
136
+ "description": "The operation needed to be executed.",
137
+ "type": {
138
+ "type": "NameExpression",
139
+ "name": "Operation"
140
+ },
141
+ "name": "operation"
142
+ },
143
+ {
144
+ "title": "returns",
145
+ "description": null,
146
+ "type": {
147
+ "type": "NameExpression",
148
+ "name": "Operation"
149
+ }
150
+ }
151
+ ]
152
+ },
153
+ "valid": true
154
+ },
102
155
  {
103
156
  "name": "sourceValue",
104
157
  "params": [
package/dist/index.cjs CHANGED
@@ -36,6 +36,7 @@ __export(src_exports, {
36
36
  field: () => import_language_common2.field,
37
37
  fields: () => import_language_common2.fields,
38
38
  fn: () => import_language_common2.fn,
39
+ fnIf: () => import_language_common2.fnIf,
39
40
  http: () => import_language_common2.http,
40
41
  insert: () => insert,
41
42
  lastReferenceValue: () => import_language_common2.lastReferenceValue,
@@ -61,6 +62,7 @@ __export(Adaptor_exports, {
61
62
  field: () => import_language_common2.field,
62
63
  fields: () => import_language_common2.fields,
63
64
  fn: () => import_language_common2.fn,
65
+ fnIf: () => import_language_common2.fnIf,
64
66
  http: () => import_language_common2.http,
65
67
  insert: () => insert,
66
68
  lastReferenceValue: () => import_language_common2.lastReferenceValue,
@@ -258,6 +260,7 @@ var src_default = Adaptor_exports;
258
260
  field,
259
261
  fields,
260
262
  fn,
263
+ fnIf,
261
264
  http,
262
265
  insert,
263
266
  lastReferenceValue,
package/dist/index.js CHANGED
@@ -17,6 +17,7 @@ __export(Adaptor_exports, {
17
17
  field: () => field,
18
18
  fields: () => fields,
19
19
  fn: () => fn,
20
+ fnIf: () => fnIf,
20
21
  http: () => http,
21
22
  insert: () => insert,
22
23
  lastReferenceValue: () => lastReferenceValue,
@@ -39,6 +40,7 @@ import {
39
40
  sourceValue,
40
41
  alterState,
41
42
  fn,
43
+ fnIf,
42
44
  arrayToString,
43
45
  each,
44
46
  combine,
@@ -231,6 +233,7 @@ export {
231
233
  field,
232
234
  fields,
233
235
  fn,
236
+ fnIf,
234
237
  http,
235
238
  insert,
236
239
  lastReferenceValue,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfn/language-mysql",
3
- "version": "1.4.14",
3
+ "version": "1.5.0",
4
4
  "description": "A MySQL Language Pack for OpenFn",
5
5
  "homepage": "https://docs.openfn.org",
6
6
  "main": "dist/index.cjs",
@@ -17,7 +17,7 @@
17
17
  "configuration-schema.json"
18
18
  ],
19
19
  "dependencies": {
20
- "@openfn/language-common": "1.13.4",
20
+ "@openfn/language-common": "1.14.0",
21
21
  "json-sql": "^0.3.10",
22
22
  "mysql": "^2.13.0",
23
23
  "squel": "^5.8.0",
@@ -78,4 +78,4 @@ export function query(options: object): Operation;
78
78
  * @returns {Operation}
79
79
  */
80
80
  export function sqlString(queryString: string): Operation;
81
- export { field, fields, sourceValue, alterState, fn, arrayToString, each, combine, merge, dataPath, dataValue, lastReferenceValue, http } from "@openfn/language-common";
81
+ export { field, fields, sourceValue, alterState, fn, fnIf, arrayToString, each, combine, merge, dataPath, dataValue, lastReferenceValue, http } from "@openfn/language-common";