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:
@@ -399,7 +399,9 @@ return ",".join(str(r.id) for r in Students.lookupRecords(firstName=fn, lastName
|
||||
self.assertPartialOutActions(out_actions, {
|
||||
"calls": {
|
||||
# No calculations of anything Schools because nothing depends on the incomplete value.
|
||||
"Students": {"#lookup#firstName:lastName": 1, "schoolIds": 1, "schoolCities": 1}
|
||||
"Students": {
|
||||
"#lookup#firstName:lastName": 1, "schoolIds": 1, "schoolCities": 1, "#lookup#": 1
|
||||
}
|
||||
},
|
||||
"retValues": [7],
|
||||
})
|
||||
@@ -408,7 +410,9 @@ return ",".join(str(r.id) for r in Students.lookupRecords(firstName=fn, lastName
|
||||
out_actions = self.add_record("Students", firstName="Chuck", lastName="Norris")
|
||||
self.assertPartialOutActions(out_actions, {
|
||||
"calls": {
|
||||
"Students": {"#lookup#firstName:lastName": 1, "schoolIds": 1, "schoolCities": 1},
|
||||
"Students": {
|
||||
"#lookup#firstName:lastName": 1, "schoolIds": 1, "schoolCities": 1, "#lookup#": 1
|
||||
},
|
||||
"Schools": {"bestStudentId": 1}
|
||||
},
|
||||
"retValues": [8],
|
||||
|
||||
Reference in New Issue
Block a user