mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Log number of rows in user tables in data engine
Summary: Adds a method Table._num_rows using an empty lookup map column. Adds a method Engine.count_rows which adds them all up. Returns the count after applying user actions to be logged by ActiveDoc. Test Plan: Added a unit test in Python. Tested log message manually. Reviewers: paulfitz Reviewed By: paulfitz Differential Revision: https://phab.getgrist.com/D3275
This commit is contained in:
@@ -8,6 +8,7 @@ import six
|
||||
from six.moves import xrange
|
||||
|
||||
import acl
|
||||
import gencode
|
||||
from acl_formula import parse_acl_formula_json
|
||||
import actions
|
||||
import column
|
||||
@@ -83,6 +84,10 @@ def is_hidden_table(table_id):
|
||||
return table_id.startswith('GristHidden_')
|
||||
|
||||
|
||||
def is_user_table(table_id):
|
||||
return not (is_hidden_table(table_id) or gencode._is_special_table(table_id))
|
||||
|
||||
|
||||
def useraction(method):
|
||||
"""
|
||||
Decorator for a method, which creates an action class with the same name and arguments.
|
||||
|
||||
Reference in New Issue
Block a user