@openfn/language-mssql 5.0.6 → 5.0.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.
Files changed (2) hide show
  1. package/ast.json +13 -2
  2. package/package.json +3 -3
package/ast.json CHANGED
@@ -898,7 +898,7 @@
898
898
  "operation"
899
899
  ],
900
900
  "docs": {
901
- "description": "Scopes an array of data based on a JSONPath.\nUseful when the source data has `n` items you would like to map to\nan operation.\nThe operation will receive a slice of the data based of each item\nof the JSONPath provided.\n\nIt also ensures the results of an operation make their way back into\nthe state's references.",
901
+ "description": "Iterates over an array of items and invokes an operation upon each one, where the state\nobject is _scoped_ so that state.data is the item under iteration.\nThe rest of the state object is untouched and can be referenced as usual.\nYou can pass an array directly, or use lazy state or a JSONPath string to\nreference a slice of state.",
902
902
  "tags": [
903
903
  {
904
904
  "title": "public",
@@ -912,7 +912,18 @@
912
912
  },
913
913
  {
914
914
  "title": "example",
915
- "description": "each(\"$.[*]\",\n create(\"SObject\",\n field(\"FirstName\", sourceValue(\"$.firstName\"))\n )\n)"
915
+ "description": "each(\n $.data,\n // Inside the callback operation, `$.data` is scoped to the item under iteration\n insert(\"patient\", {\n patient_name: $.data.properties.case_name,\n patient_id: $.data.case_id,\n })\n);",
916
+ "caption": "Using lazy state ($) to iterate over items in state.data and pass each into an \"insert\" operation"
917
+ },
918
+ {
919
+ "title": "example",
920
+ "description": "each(\n $.data,\n insert(\"patient\", (state) => ({\n patient_id: state.data.case_id,\n ...state.data\n }))\n);",
921
+ "caption": "Iterate over items in state.data and pass each one into an \"insert\" operation"
922
+ },
923
+ {
924
+ "title": "example",
925
+ "description": "each(\n \"$.data[*]\",\n insert(\"patient\", (state) => ({\n patient_name: state.data.properties.case_name,\n patient_id: state.data.case_id,\n }))\n);",
926
+ "caption": "Using JSON path to iterate over items in state.data and pass each one into an \"insert\" operation"
916
927
  },
917
928
  {
918
929
  "title": "param",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfn/language-mssql",
3
- "version": "5.0.6",
3
+ "version": "5.0.8",
4
4
  "description": "A Microsoft SQL language pack for OpenFn",
5
5
  "exports": {
6
6
  ".": {
@@ -24,8 +24,8 @@
24
24
  "configuration-schema.json"
25
25
  ],
26
26
  "dependencies": {
27
- "tedious": "15.1.0",
28
- "@openfn/language-common": "2.0.3"
27
+ "tedious": "18.6.1",
28
+ "@openfn/language-common": "2.2.0"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@openfn/simple-ast": "0.4.1",