(core) Suggest correct table when converting to RefList

Summary: RecordSets now have new encoding and rendering analogous to Records: `['r', 'Table', [1, 2, 3]]` and `Table[[1, 2, 3]]`.

Test Plan: Added to nbrowser/TypeChange.ts.

Reviewers: dsagal

Reviewed By: dsagal

Differential Revision: https://phab.getgrist.com/D2987
This commit is contained in:
Alex Hall
2021-08-20 22:35:41 +02:00
parent f53ab2cb30
commit 9916a2d919
7 changed files with 97 additions and 26 deletions

View File

@@ -185,6 +185,9 @@ class RecordSet(object):
return self._get_col(name)
return self._table._attribute_error(name, self._source_relation)
def __repr__(self):
return "%s[%s]" % (self._table.table_id, self._row_ids)
def _clone_with_relation(self, src_relation):
return self._table.RecordSet(self._row_ids,
relation=src_relation.compose(self._source_relation),