]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
add exclusion for unusual chars in column names
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 19 Dec 2022 13:34:51 +0000 (08:34 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 19 Dec 2022 13:35:53 +0000 (08:35 -0500)
Added new exclusion rule for third party dialects called
``unusual_column_name_characters``, which can be "closed" for third party
dialects that don't support column names with unusual characters such as
dots, slashes, or percent signs in them, even if the name is properly
quoted.

Fixes: #9002
Change-Id: I44b765df4c73ce5ec1907d031fd9c89761fd99d1
References: #8993

doc/build/changelog/unreleased_14/9002.rst [new file with mode: 0644]
lib/sqlalchemy/testing/requirements.py
lib/sqlalchemy/testing/suite/test_dialect.py

diff --git a/doc/build/changelog/unreleased_14/9002.rst b/doc/build/changelog/unreleased_14/9002.rst
new file mode 100644 (file)
index 0000000..c2d3f01
--- /dev/null
@@ -0,0 +1,10 @@
+.. change::
+    :tags: bug, tests
+    :tickets: 9002
+
+    Added new exclusion rule for third party dialects called
+    ``unusual_column_name_characters``, which can be "closed" for third party
+    dialects that don't support column names with unusual characters such as
+    dots, slashes, or percent signs in them, even if the name is properly
+    quoted.
+
index 3c63e93624eefcc926d0574e8cd28e3c54f1b6d3..070665b001a613f75b00bb6b2df5067260a6fe74 100644 (file)
@@ -176,6 +176,17 @@ class SuiteRequirements(Requirements):
 
         return exclusions.open()
 
+    @property
+    def unusual_column_name_characters(self):
+        """target database allows column names that have unusual characters
+        in them, such as dots, spaces, slashes, or percent signs.
+
+        The column names are as always in such a case quoted, however the
+        DB still needs to support those characters in the name somehow.
+
+        """
+        return exclusions.open()
+
     @property
     def subqueries(self):
         """Target database must support subqueries."""
index 38fe8f9c46d69d54e1e0a37fcdec0a032bdafeb6..58a64832607b5d7376fdba94f48ff37e82deabaa 100644 (file)
@@ -447,6 +447,7 @@ class DifficultParametersTest(fixtures.TestBase):
     )
 
     @tough_parameters
+    @config.requirements.unusual_column_name_characters
     def test_round_trip_same_named_column(
         self, paramname, connection, metadata
     ):