From d92ce0627aa77728ff8dbcdc3a722e75dc625297 Mon Sep 17 00:00:00 2001 From: Adam Riley Date: Fri, 20 Dec 2024 17:57:23 +0200 Subject: [PATCH] Doc comment --- .../src/Database/Redshift/Internal/Redshift_Dialect.enso | 3 +++ .../0.0.0-dev/src/Internal/Postgres/Postgres_Dialect.enso | 3 +++ .../Database/0.0.0-dev/src/Internal/SQLite/SQLite_Dialect.enso | 3 +++ .../Microsoft/0.0.0-dev/src/Internal/SQLServer_Dialect.enso | 3 +++ .../Snowflake/0.0.0-dev/src/Internal/Snowflake_Dialect.enso | 3 +++ 5 files changed, 15 insertions(+) diff --git a/distribution/lib/Standard/AWS/0.0.0-dev/src/Database/Redshift/Internal/Redshift_Dialect.enso b/distribution/lib/Standard/AWS/0.0.0-dev/src/Database/Redshift/Internal/Redshift_Dialect.enso index 8a2a5c625009..36752731167d 100644 --- a/distribution/lib/Standard/AWS/0.0.0-dev/src/Database/Redshift/Internal/Redshift_Dialect.enso +++ b/distribution/lib/Standard/AWS/0.0.0-dev/src/Database/Redshift/Internal/Redshift_Dialect.enso @@ -157,6 +157,9 @@ type Redshift_Dialect _ = [op_kind, args] expression + ## PRIVATE + Add an extra cast to adjust the output type of aggregate operations. + Some DBs do CAST(SUM(x) AS FLOAT) others do SUM(CAST(x AS FLOAT)). cast_aggregate_columns self op_kind:Text columns:(Vector Internal_Column) = self.cast_op_type op_kind columns (SQL_Expression.Operation op_kind (columns.map c->c.expression)) diff --git a/distribution/lib/Standard/Database/0.0.0-dev/src/Internal/Postgres/Postgres_Dialect.enso b/distribution/lib/Standard/Database/0.0.0-dev/src/Internal/Postgres/Postgres_Dialect.enso index 484cbbdd3920..b99fa8bc3c49 100644 --- a/distribution/lib/Standard/Database/0.0.0-dev/src/Internal/Postgres/Postgres_Dialect.enso +++ b/distribution/lib/Standard/Database/0.0.0-dev/src/Internal/Postgres/Postgres_Dialect.enso @@ -231,6 +231,9 @@ type Postgres_Dialect if cast_to.is_nothing then expression else SQL_Expression.Operation "CAST" [expression, SQL_Expression.Literal cast_to] + ## PRIVATE + Add an extra cast to adjust the output type of aggregate operations. + Some DBs do CAST(SUM(x) AS FLOAT) others do SUM(CAST(x AS FLOAT)). cast_aggregate_columns self op_kind:Text columns:(Vector Internal_Column) = self.cast_op_type op_kind columns (SQL_Expression.Operation op_kind (columns.map c->c.expression)) diff --git a/distribution/lib/Standard/Database/0.0.0-dev/src/Internal/SQLite/SQLite_Dialect.enso b/distribution/lib/Standard/Database/0.0.0-dev/src/Internal/SQLite/SQLite_Dialect.enso index 854187e89447..69e4d50e201d 100644 --- a/distribution/lib/Standard/Database/0.0.0-dev/src/Internal/SQLite/SQLite_Dialect.enso +++ b/distribution/lib/Standard/Database/0.0.0-dev/src/Internal/SQLite/SQLite_Dialect.enso @@ -215,6 +215,9 @@ type SQLite_Dialect _ = [op_kind, args] expression + ## PRIVATE + Add an extra cast to adjust the output type of aggregate operations. + Some DBs do CAST(SUM(x) AS FLOAT) others do SUM(CAST(x AS FLOAT)). cast_aggregate_columns self op_kind:Text columns:(Vector Internal_Column) = self.cast_op_type op_kind columns (SQL_Expression.Operation op_kind (columns.map c->c.expression)) diff --git a/distribution/lib/Standard/Microsoft/0.0.0-dev/src/Internal/SQLServer_Dialect.enso b/distribution/lib/Standard/Microsoft/0.0.0-dev/src/Internal/SQLServer_Dialect.enso index fa831eafd534..59585a7649b5 100644 --- a/distribution/lib/Standard/Microsoft/0.0.0-dev/src/Internal/SQLServer_Dialect.enso +++ b/distribution/lib/Standard/Microsoft/0.0.0-dev/src/Internal/SQLServer_Dialect.enso @@ -228,6 +228,9 @@ type SQLServer_Dialect if cast_to.is_nothing then expression else SQL_Expression.Operation "CAST" [expression, SQL_Expression.Literal cast_to] + ## PRIVATE + Add an extra cast to adjust the output type of aggregate operations. + Some DBs do CAST(SUM(x) AS FLOAT) others do SUM(CAST(x AS FLOAT)). cast_aggregate_columns self op_kind:Text columns:(Vector Internal_Column) = SQL_Expression.Operation op_kind (columns.map c->(self.cast_op_type op_kind columns (Internals_Access.column_expression c))) diff --git a/distribution/lib/Standard/Snowflake/0.0.0-dev/src/Internal/Snowflake_Dialect.enso b/distribution/lib/Standard/Snowflake/0.0.0-dev/src/Internal/Snowflake_Dialect.enso index e6de1bc885cc..e5eaf0f7b3dc 100644 --- a/distribution/lib/Standard/Snowflake/0.0.0-dev/src/Internal/Snowflake_Dialect.enso +++ b/distribution/lib/Standard/Snowflake/0.0.0-dev/src/Internal/Snowflake_Dialect.enso @@ -219,6 +219,9 @@ type Snowflake_Dialect _ = [op_kind, args] expression + ## PRIVATE + Add an extra cast to adjust the output type of aggregate operations. + Some DBs do CAST(SUM(x) AS FLOAT) others do SUM(CAST(x AS FLOAT)). cast_aggregate_columns self op_kind:Text columns:(Vector Internal_Column) = self.cast_op_type op_kind columns (SQL_Expression.Operation op_kind (columns.map c->c.expression))