@balena/abstract-sql-compiler 11.1.0-build-computed-fns-2e528889f861161d3cef916529b3e96fcc735fe8-1 → 11.1.0-build-computed-fns-6954f8a1bbe8e6e3bd7c89d7ebfc3cd1821256cf-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.
@@ -194,6 +194,7 @@ ${compileRule(definitionAbstractSql, engine, true).replace(/^/gm, ' ')}
194
194
  const createSqlElements = [];
195
195
  const createIndexes = [];
196
196
  const createComputedFunctions = [];
197
+ const dropComputedFunctions = [];
197
198
  for (const field of table.fields) {
198
199
  const { fieldName, references, dataType, computed } = field;
199
200
  if (computed != null) {
@@ -205,9 +206,9 @@ ${compileRule(definitionAbstractSql, engine, true).replace(/^/gm, ' ')}
205
206
  if (typeof sqlType === 'function') {
206
207
  sqlType = sqlType.castType;
207
208
  }
208
- // TODO: add the corresponding drop
209
+ const fnSignature = `"computed_${table.name}_${fieldName}"("${table.name}" "${table.name}")`;
209
210
  createComputedFunctions.push(`\
210
- CREATE FUNCTION "computed_${table.name}_${fieldName}"("${table.name}" "${table.name}")
211
+ CREATE FUNCTION ${fnSignature}
211
212
  RETURNS ${sqlType} AS $fn$
212
213
  ${compileRule([
213
214
  'SelectQuery',
@@ -222,6 +223,7 @@ RETURNS ${sqlType} AS $fn$
222
223
  ],
223
224
  ], engine, true)}
224
225
  $fn$ LANGUAGE SQL ${computed.volatility} PARALLEL ${computed.parallel};`);
226
+ dropComputedFunctions.push(`DROP FUNCTION IF EXISTS ${fnSignature};`);
225
227
  }
226
228
  }
227
229
  else {
@@ -348,7 +350,11 @@ CREATE TABLE ${ifNotExistsStr}"${table.name}" (
348
350
  ...createIndexes,
349
351
  ...createTriggers,
350
352
  ],
351
- dropSQL: [...dropTriggers, `DROP TABLE "${table.name}";`],
353
+ dropSQL: [
354
+ ...dropTriggers,
355
+ `DROP TABLE "${table.name}";`,
356
+ ...dropComputedFunctions,
357
+ ],
352
358
  depends,
353
359
  };
354
360
  });
@@ -1 +1 @@
1
- {"version":3,"file":"abstract-sql-compiler.js","sourceRoot":"","sources":["../src/abstract-sql-compiler.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAkB,OAMjB;AAND,WAAkB,OAAO;IACxB,4HAA4H;IAC5H,gCAAqB,CAAA;IACrB,0BAAe,CAAA;IACf,4BAAiB,CAAA;IACjB,gDAAgD;AACjD,CAAC,EANiB,OAAO,KAAP,OAAO,QAMxB;AAED,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAEnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AAGtE,OAAO,UAAU,MAAM,oBAAoB,CAAC;AAC5C,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,UAAU,CAAC;AAC1C,OAAO,EACN,cAAc,EACd,gBAAgB,GAChB,MAAM,oCAAoC,CAAC;AAM5C,OAAO,EACN,mBAAmB,EACnB,uBAAuB,EACvB,iBAAiB,EACjB,sBAAsB,GACtB,MAAM,wBAAwB,CAAC;AA4jBhC,MAAM,aAAa,GAAkB,CAAC,GAAG,EAAE;IAC1C,MAAM,MAAM,GAA2B,EAAE,CAAC;IAC1C,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,SAAS,CAAkC,EAAE,CAAC;QAC3E,MAAM,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC,QAAe,CAAC;IAC9C,CAAC;IACD,OAAO,MAAuB,CAAC;AAChC,CAAC,CAAC,EAAE,CAAC;AACL,MAAM,gBAAgB,GAAuC,KAAK,EACjE,KAAK,EACL,KAAK,EACJ,EAAE;IACH,uDAAuD;IACvD,MAAM,EAAE,QAAQ,EAAE,QAAQ,GAAG,KAAK,EAAE,GAAG,KAAK,CAAC;IAC7C,kEAAkE;IAClE,6DAA6D;IAC7D,MAAM,UAAU,GACf,aAAa,CAAC,QAAkC,CAAC,CAAC;IACnD,IAAI,UAAU,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E,gBAAgB,CAAC,aAAa;QAC7C,MAAM,EAAE,gBAAgB,CAAC,MAAM;QAC/B,YAAY,EAAE,sBAAsB;QACpC,UAAU,EAAE,oBAAoB;QAChC,KAAK,EAAE,cAAc;KACrB,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,cAAc,GAAG,CAAC,MAAe,EAAE,WAAoB,EAAE,EAAE;IAChE,OAAO;QACN,cAAc;QACd,gBAAgB;QAChB,aAAa,EAAE,CAAC,gBAAkC,EAAE,EAAE,CACrD,aAAa,CAAC,gBAAgB,EAAE,MAAM,EAAE,WAAW,CAAC;QACrD,WAAW,EAAE,CAAC,WAA6B,EAAE,EAAE,CAC9C,WAAW,CAAC,WAAW,EAAE,MAAM,EAAE,KAAK,CAAC;QACxC,gBAAgB;QAChB,mBAAmB;QACnB,uBAAuB;QACvB,iBAAiB;KACjB,CAAC;AACH,CAAC,CAAC;AACF,OAAO,EAAE,cAAc,EAAE,CAAC;AAC1B,MAAM,CAAC,MAAM,QAAQ,GAAG,cAAc,oCAAmB,IAAI,CAAC,CAAC;AAC/D,MAAM,CAAC,MAAM,KAAK,GAAG,cAAc,8BAAgB,IAAI,CAAC,CAAC;AACzD,MAAM,CAAC,MAAM,MAAM,GAAG,cAAc,gCAAiB,KAAK,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@balena/abstract-sql-compiler",
3
- "version": "11.1.0-build-computed-fns-2e528889f861161d3cef916529b3e96fcc735fe8-1",
3
+ "version": "11.1.0-build-computed-fns-6954f8a1bbe8e6e3bd7c89d7ebfc3cd1821256cf-1",
4
4
  "description": "A translator for abstract sql into sql.",
5
5
  "type": "module",
6
6
  "main": "out/abstract-sql-compiler.js",
@@ -60,6 +60,6 @@
60
60
  "npm": ">=10.7.0"
61
61
  },
62
62
  "versionist": {
63
- "publishedAt": "2025-08-08T14:13:59.589Z"
63
+ "publishedAt": "2025-08-08T15:10:49.120Z"
64
64
  }
65
65
  }