]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
A few more Oracle to Oracle Database conversions
authorChristopher Jones <christopher.jones@oracle.com>
Tue, 12 Nov 2024 21:45:40 +0000 (08:45 +1100)
committerChristopher Jones <christopher.jones@oracle.com>
Tue, 12 Nov 2024 21:45:40 +0000 (08:45 +1100)
lib/sqlalchemy/dialects/oracle/base.py
test/dialect/oracle/test_compiler.py
test/dialect/oracle/test_types.py

index bb5dde9ce8d212432037ffe7e53c5dbcef83a48c..ae3f765352aa88d95ba2852991cbec9b9cfd3536 100644 (file)
@@ -724,16 +724,16 @@ class OracleTypeCompiler(compiler.GenericTypeCompiler):
                 # https://www.oracletutorial.com/oracle-basics/oracle-float/
                 estimated_binary_precision = int(precision / 0.30103)
                 raise exc.ArgumentError(
-                    "Oracle FLOAT types use 'binary precision', which does "
-                    "not convert cleanly from decimal 'precision'.  Please "
-                    "specify "
-                    f"this type with a separate Oracle variant, such as "
-                    f"{type_.__class__.__name__}(precision={precision})."
+                    "Oracle Database FLOAT types use 'binary precision', "
+                    "which does not convert cleanly from decimal "
+                    "'precision'.  Please specify "
+                    "this type with a separate Oracle Database variant, such "
+                    f"as {type_.__class__.__name__}(precision={precision})."
                     f"with_variant(oracle.FLOAT"
                     f"(binary_precision="
                     f"{estimated_binary_precision}), 'oracle'), so that the "
-                    "Oracle specific 'binary_precision' may be specified "
-                    "accurately."
+                    "Oracle Database specific 'binary_precision' may be "
+                    "specified accurately."
                 )
             else:
                 precision = binary_precision
@@ -1495,8 +1495,8 @@ class OracleDialect(default.DefaultDialect):
     @util.deprecated_params(
         use_binds_for_limits=(
             "1.4",
-            "The ``use_binds_for_limits`` Oracle dialect parameter is "
-            "deprecated. The dialect now renders LIMIT /OFFSET integers "
+            "The ``use_binds_for_limits`` Oracle Database dialect parameter is "
+            "deprecated. The dialect now renders LIMIT / OFFSET integers "
             "inline in all cases using a post-compilation hook, so that the "
             "value is still represented by a 'bound parameter' on the Core "
             "Expression side.",
index ea7012c06da0344a6288201ca9722a11b8aae240..02fc443e76c96cc6816700cb7a925090ad34171a 100644 (file)
@@ -811,8 +811,8 @@ class CompileTest(fixtures.TestBase, AssertsCompiledSQL):
     def test_use_binds_for_limits_disabled_one_legacy(self):
         t = table("sometable", column("col1"), column("col2"))
         with testing.expect_deprecated(
-            "The ``use_binds_for_limits`` Oracle dialect parameter is "
-            "deprecated."
+            "The ``use_binds_for_limits`` Oracle Database dialect parameter "
+            "is deprecated."
         ):
             dialect = oracle.OracleDialect(
                 use_binds_for_limits=False, enable_offset_fetch=False
@@ -830,8 +830,8 @@ class CompileTest(fixtures.TestBase, AssertsCompiledSQL):
     def test_use_binds_for_limits_disabled_two_legacy(self):
         t = table("sometable", column("col1"), column("col2"))
         with testing.expect_deprecated(
-            "The ``use_binds_for_limits`` Oracle dialect parameter is "
-            "deprecated."
+            "The ``use_binds_for_limits`` Oracle Database dialect parameter "
+            "is deprecated."
         ):
             dialect = oracle.OracleDialect(
                 use_binds_for_limits=False, enable_offset_fetch=False
@@ -850,8 +850,8 @@ class CompileTest(fixtures.TestBase, AssertsCompiledSQL):
     def test_use_binds_for_limits_disabled_three_legacy(self):
         t = table("sometable", column("col1"), column("col2"))
         with testing.expect_deprecated(
-            "The ``use_binds_for_limits`` Oracle dialect parameter is "
-            "deprecated."
+            "The ``use_binds_for_limits`` Oracle Database dialect parameter "
+            "is deprecated."
         ):
             dialect = oracle.OracleDialect(
                 use_binds_for_limits=False, enable_offset_fetch=False
@@ -872,8 +872,8 @@ class CompileTest(fixtures.TestBase, AssertsCompiledSQL):
     def test_use_binds_for_limits_enabled_one_legacy(self):
         t = table("sometable", column("col1"), column("col2"))
         with testing.expect_deprecated(
-            "The ``use_binds_for_limits`` Oracle dialect parameter is "
-            "deprecated."
+            "The ``use_binds_for_limits`` Oracle Database dialect parameter "
+            "is deprecated."
         ):
             dialect = oracle.OracleDialect(
                 use_binds_for_limits=True, enable_offset_fetch=False
@@ -891,8 +891,8 @@ class CompileTest(fixtures.TestBase, AssertsCompiledSQL):
     def test_use_binds_for_limits_enabled_two_legacy(self):
         t = table("sometable", column("col1"), column("col2"))
         with testing.expect_deprecated(
-            "The ``use_binds_for_limits`` Oracle dialect parameter is "
-            "deprecated."
+            "The ``use_binds_for_limits`` Oracle Database dialect parameter "
+            "is deprecated."
         ):
             dialect = oracle.OracleDialect(
                 use_binds_for_limits=True, enable_offset_fetch=False
@@ -912,8 +912,8 @@ class CompileTest(fixtures.TestBase, AssertsCompiledSQL):
     def test_use_binds_for_limits_enabled_three_legacy(self):
         t = table("sometable", column("col1"), column("col2"))
         with testing.expect_deprecated(
-            "The ``use_binds_for_limits`` Oracle dialect parameter is "
-            "deprecated."
+            "The ``use_binds_for_limits`` Oracle Database dialect parameter "
+            "is deprecated."
         ):
             dialect = oracle.OracleDialect(
                 use_binds_for_limits=True, enable_offset_fetch=False
index b8396df4fa910e597309de58c1773a545f7badcb..2c9d1c21343d8c85d69f01022b9de85445b8a772 100644 (file)
@@ -375,12 +375,13 @@ class TypesTest(fixtures.TestBase):
     def test_no_decimal_float_precision(self):
         with expect_raises_message(
             exc.ArgumentError,
-            "Oracle FLOAT types use 'binary precision', which does not "
-            "convert cleanly from decimal 'precision'.  Please specify this "
-            "type with a separate Oracle variant, such as "
+            "Oracle Database FLOAT types use 'binary precision', which does "
+            "not convert cleanly from decimal 'precision'.  Please specify "
+            "this type with a separate Oracle Database variant, such as "
             r"FLOAT\(precision=5\).with_variant\(oracle.FLOAT\("
             r"binary_precision=16\), 'oracle'\), so that the Oracle "
-            "specific 'binary_precision' may be specified accurately.",
+            "Database specific 'binary_precision' may be specified "
+            "accurately.",
         ):
             FLOAT(5).compile(dialect=oracle.dialect())
 
@@ -571,7 +572,7 @@ class TypesTest(fixtures.TestBase):
         )
 
     def test_numerics_broken_inspection(self, metadata, connection):
-        """Numeric scenarios where Oracle type info is 'broken',
+        """Numeric scenarios where Oracle Databasee type info is 'broken',
         returning us precision, scale of the form (0, 0) or (0, -127).
         We convert to Decimal and let int()/float() processors take over.