From 0ac4b2f9b3417a3bd759a47028233dfcd843da0c Mon Sep 17 00:00:00 2001 From: XANTRONIX Development Date: Sun, 10 Nov 2024 10:42:00 -0500 Subject: [PATCH] Use simpler, better name for wrapper function --- lib/nntp/tiny/db.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/nntp/tiny/db.py b/lib/nntp/tiny/db.py index 8542747..2eca781 100644 --- a/lib/nntp/tiny/db.py +++ b/lib/nntp/tiny/db.py @@ -113,7 +113,7 @@ class Database(): def get(self, table, values: dict=dict()): return self.query(table, values).fetchone() - def _sqlite3_function(self, table, fn: str, column: str, values: dict=dict()) -> int: + def _call(self, table, fn: str, column: str, values: dict=dict()) -> int: sql = f"select {fn}({column}) as ret from {table.name}" if len(values) > 0: @@ -125,10 +125,10 @@ class Database(): return row[0] if row is not None else None def min(self, table, column: str, values: dict=dict()) -> int: - return self._sqlite3_function(table, 'min', column, values) + return self._call(table, 'min', column, values) def max(self, table, column: str, values: dict=dict()) -> int: - return self._sqlite3_function(table, 'max', column, values) + return self._call(table, 'max', column, values) def count(self, table, values: dict=dict()) -> int: - return self._sqlite3_function(table, 'count', table.key, values) + return self._call(table, 'count', table.key, values)