X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osm_common%2Fdbbase.py;fp=osm_common%2Fdbbase.py;h=1319fd84e4b86b10bb7fb13694f4d0262b765bf2;hb=ae049d8467e5ce1b1be8487ed93031b594dc0230;hp=e9152e505cfd479833ba9564e2028084e7e00d1c;hpb=6472e2b6e90c263b59c1195a952fbf4b7d35eba0;p=osm%2Fcommon.git diff --git a/osm_common/dbbase.py b/osm_common/dbbase.py index e9152e5..1319fd8 100644 --- a/osm_common/dbbase.py +++ b/osm_common/dbbase.py @@ -88,6 +88,16 @@ class DbBase(object): """ raise DbException("Method 'get_list' not implemented") + def count(self, table, q_filter=None): + """ + Count the number of entries matching q_filter + :param table: collection or table + :param q_filter: Filter + :return: number of entries found (can be zero) + :raise: DbException on error + """ + raise DbException("Method 'count' not implemented") + def get_one(self, table, q_filter=None, fail_on_empty=True, fail_on_more=True): """ Obtain one entry matching q_filter