summaryrefslogtreecommitdiff
path: root/src/mailman/database/helpers.py
diff options
context:
space:
mode:
authorBarry Warsaw2016-03-24 21:49:37 -0400
committerBarry Warsaw2016-03-24 21:49:37 -0400
commite1876e6f699ab4b212d689786297f6f1e70c1551 (patch)
tree6f3b96a233602451cc6eaf450032a56a3344c85c /src/mailman/database/helpers.py
parent5404f98d90410d69a744d9c0fb71a8a31f3a4a88 (diff)
downloadmailman-e1876e6f699ab4b212d689786297f6f1e70c1551.tar.gz
mailman-e1876e6f699ab4b212d689786297f6f1e70c1551.tar.zst
mailman-e1876e6f699ab4b212d689786297f6f1e70c1551.zip
Diffstat (limited to 'src/mailman/database/helpers.py')
-rw-r--r--src/mailman/database/helpers.py11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/mailman/database/helpers.py b/src/mailman/database/helpers.py
index 7ce3d3f43..f58d559c5 100644
--- a/src/mailman/database/helpers.py
+++ b/src/mailman/database/helpers.py
@@ -17,20 +17,17 @@
"""Common database helpers."""
-__all__ = [
- 'exists_in_db',
- 'is_sqlite',
- ]
-
-
import sqlalchemy as sa
+from mailman import public
+
-
+@public
def is_sqlite(bind):
return bind.dialect.name == 'sqlite'
+@public
def exists_in_db(bind, tablename, columnname=None):
md = sa.MetaData()
md.reflect(bind=bind)