diff --git a/distribution/lib/Standard/Database/0.0.0-dev/src/Data/Dialect/Postgres.enso b/distribution/lib/Standard/Database/0.0.0-dev/src/Data/Dialect/Postgres.enso index d4f6daf09f42..33a6b234fc23 100644 --- a/distribution/lib/Standard/Database/0.0.0-dev/src/Data/Dialect/Postgres.enso +++ b/distribution/lib/Standard/Database/0.0.0-dev/src/Data/Dialect/Postgres.enso @@ -6,6 +6,8 @@ from Standard.Database.Data.Sql import Sql_Type import Standard.Database.Data.Dialect import Standard.Database.Data.Dialect.Helpers import Standard.Database.Data.Internal.Base_Generator +import Standard.Database.Data.Internal.IR +from Standard.Database.Error as Database_Errors import Unsupported_Database_Operation_Error ## PRIVATE @@ -223,7 +225,7 @@ make_order_descriptor internal_column sort_direction text_ordering = case intern True -> ## In the future we can modify this error to suggest using a custom defined collation. if text_ordering.sort_digits_as_numbers then Error.throw (Unsupported_Database_Operation_Error "Natural ordering is currently not supported. You may need to materialize the Table to perform this operation.") else - case case_sensitive of + case text_ordering.case_sensitive of Nothing -> IR.Order_Descriptor internal_column.expression sort_direction collation=Nothing True -> diff --git a/distribution/lib/Standard/Database/0.0.0-dev/src/Data/Dialect/Sqlite.enso b/distribution/lib/Standard/Database/0.0.0-dev/src/Data/Dialect/Sqlite.enso index db94c220935a..5316c962fe8e 100644 --- a/distribution/lib/Standard/Database/0.0.0-dev/src/Data/Dialect/Sqlite.enso +++ b/distribution/lib/Standard/Database/0.0.0-dev/src/Data/Dialect/Sqlite.enso @@ -53,7 +53,7 @@ type Sqlite_Dialect prepare_order_descriptor internal_column sort_direction text_ordering = case internal_column.sql_type.is_likely_text of True -> if text_ordering.sort_digits_as_numbers then Error.throw (Unsupported_Database_Operation_Error "Natural ordering is not supported by the SQLite backend. You may need to materialize the Table to perform this operation.") else - case case_sensitive of + case text_ordering.case_sensitive of Nothing -> IR.Order_Descriptor internal_column.expression sort_direction collation=Nothing True -> diff --git a/test/Table_Tests/src/Database/Sqlite_Spec.enso b/test/Table_Tests/src/Database/Sqlite_Spec.enso index e385e3dcd9f3..1469c1634aa4 100644 --- a/test/Table_Tests/src/Database/Sqlite_Spec.enso +++ b/test/Table_Tests/src/Database/Sqlite_Spec.enso @@ -62,7 +62,7 @@ spec = Common_Spec.spec prefix connection here.sqlite_specific_spec connection - common_selection = Common_Table_Spec.Test_Selection supports_case_sensitive_columns=False order_by=True natural_ordering=False case_insensitive_ordering=False case_insensitive_ascii_only=True + common_selection = Common_Table_Spec.Test_Selection supports_case_sensitive_columns=False order_by=True natural_ordering=False case_insensitive_ordering=True case_insensitive_ascii_only=True Common_Table_Spec.spec prefix table_builder test_selection=common_selection ## For now `advanced_stats`, `first_last`, `text_shortest_longest` and