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:
@@ -64,7 +64,10 @@ def run(sandbox):
|
||||
@export
|
||||
def apply_user_actions(action_reprs, user=None):
|
||||
action_group = eng.apply_user_actions([useractions.from_repr(u) for u in action_reprs], user)
|
||||
return eng.acl_split(action_group).to_json_obj()
|
||||
return dict(
|
||||
rowCount=eng.count_rows(),
|
||||
**eng.acl_split(action_group).to_json_obj()
|
||||
)
|
||||
|
||||
@export
|
||||
def fetch_table(table_id, formulas=True, query=None):
|
||||
|
||||
Reference in New Issue
Block a user