]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
implement _all_selected_columns for functionelement
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 20 Sep 2021 19:16:56 +0000 (15:16 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 20 Sep 2021 19:18:39 +0000 (15:18 -0400)
Implemented a method in ``FunctionElement`` that is essentially abstract in
an ancestor class (even though not used), leading to pylint complaints.

Fixes: #7052
Change-Id: Iceeeb332fbb3c7187cd2b1969e2f4233a47136b1

doc/build/changelog/unreleased_14/7052.rst [new file with mode: 0644]
lib/sqlalchemy/sql/functions.py

diff --git a/doc/build/changelog/unreleased_14/7052.rst b/doc/build/changelog/unreleased_14/7052.rst
new file mode 100644 (file)
index 0000000..3c927c3
--- /dev/null
@@ -0,0 +1,6 @@
+.. change::
+    :tags: bug, sql
+    :tickets: 7052
+
+    Implemented a method in ``FunctionElement`` that is essentially abstract in
+    an ancestor class (even though not used), leading to pylint complaints.
index 900bc6dbaf4509e8c9b77677f43baa1ae9800734..5729f81f512e9182a2ca3b7c3279d5b2a3e8c1c9 100644 (file)
@@ -297,12 +297,23 @@ class FunctionElement(Executable, ColumnElement, FromClause, Generative):
             SQL function expressions.
 
         """  # noqa E501
+
+        return ColumnCollection(
+            columns=[(col.key, col) for col in self._all_selected_columns]
+        )
+
+    @property
+    def _all_selected_columns(self):
         if self.type._is_table_value:
             cols = self.type._elements
         else:
             cols = [self.label(None)]
 
-        return ColumnCollection(columns=[(col.key, col) for col in cols])
+        return cols
+
+    @property
+    def exported_columns(self):
+        return self.columns
 
     @HasMemoized.memoized_attribute
     def clauses(self):