sql-typechecker 0.0.34 → 0.0.35

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/out/cli.js CHANGED
@@ -241954,6 +241954,9 @@ function unifyCallGeneral(call, argTypes, expectedArgs, returnT) {
241954
241954
  return returnT;
241955
241955
  }
241956
241956
  function castScalars(e, source, target, type) {
241957
+ if (type === "explicit" && eqType(source, BuiltinTypes.Text)) {
241958
+ return;
241959
+ }
241957
241960
  const matchingCast = findMatchingCast([source.name], source, target, type);
241958
241961
  if (matchingCast === null) {
241959
241962
  throw new TypeMismatch(e, {expected: target, actual: source});
@@ -242906,6 +242909,38 @@ function elabCall(g, c, e) {
242906
242909
  throw new InvalidArguments(e, e.function, argTypes);
242907
242910
  }
242908
242911
  }
242912
+ if (eqQNames(e.function, {name: "generate_series"})) {
242913
+ return unifyOverloadedCall(e, argTypes, [
242914
+ {
242915
+ expectedArgs: [BuiltinTypes.Integer, BuiltinTypes.Integer],
242916
+ returnT: BuiltinTypeConstructors.Array(BuiltinTypes.Integer)
242917
+ },
242918
+ {
242919
+ expectedArgs: [
242920
+ BuiltinTypes.Integer,
242921
+ BuiltinTypes.Integer,
242922
+ BuiltinTypes.Integer
242923
+ ],
242924
+ returnT: BuiltinTypeConstructors.Array(BuiltinTypes.Integer)
242925
+ },
242926
+ {
242927
+ expectedArgs: [
242928
+ BuiltinTypes.Timestamp,
242929
+ BuiltinTypes.Timestamp,
242930
+ BuiltinTypes.Interval
242931
+ ],
242932
+ returnT: BuiltinTypeConstructors.Array(BuiltinTypes.Timestamp)
242933
+ },
242934
+ {
242935
+ expectedArgs: [
242936
+ BuiltinTypes.Date,
242937
+ BuiltinTypes.Date,
242938
+ BuiltinTypes.Interval
242939
+ ],
242940
+ returnT: BuiltinTypeConstructors.Array(BuiltinTypes.Date)
242941
+ }
242942
+ ]);
242943
+ }
242909
242944
  if (eqQNames(e.function, {name: "to_char"})) {
242910
242945
  if (isNullable(argTypes[0])) {
242911
242946
  return nullify(unifyOverloadedCall(e, [unnullify(argTypes[0])], [