gristlabs_grist-core/sandbox/grist
Alex Hall 89259371a5 (core) Respect sort_by in lookupOne, and allow reverse sorting
Summary:
Ensure that `lookupOne` (via `RecordSet.get_one`) pays attention to the `sort_by` parameter by picking the first of its sorted list of row IDs.

Allow specifying reverse sort order in `sort_by` by adding `"-"` before the column ID.

Suggested in https://grist.slack.com/archives/C0234CPPXPA/p1665756041063079

Test Plan: Extended Python lookup test

Reviewers: jarek

Reviewed By: jarek

Differential Revision: https://phab.getgrist.com/D3675
2022-10-24 20:10:08 +02:00
..
functions (core) Add PHONE_FORMAT function using the phonenumberslight library 2022-10-21 08:13:18 -04:00
imports (core) Remove messytables completely, particularly for excel imports 2022-09-28 17:15:42 +02:00
acl_formula.py
acl.py
action_obj.py
action_summary.py (core) Fix undo error for automatically removed rows, especially in summary tables 2022-09-09 22:15:45 +02:00
actions.py (core) AddOrUpdateRecord user action 2022-02-03 16:22:51 -05:00
autocomplete_context.py (core) Show example values in formula autocomplete 2022-09-28 19:42:36 +02:00
codebuilder.py
column.py (core) Show example values in formula autocomplete 2022-09-28 19:42:36 +02:00
csv_patch.py
depend.py
docactions.py
docmodel.py (core) Comments 2022-10-17 13:38:21 +02:00
engine.py (core) Show example values in formula autocomplete 2022-09-28 19:42:36 +02:00
friendly_errors.py
gencode.py
grist.py
identifiers.py
import_actions.py
logger.py
lookup.py
main.py (core) Show example values in formula autocomplete 2022-09-28 19:42:36 +02:00
match_counter.py
migrations.py (core) Comments 2022-10-17 13:38:21 +02:00
moment.py
objtypes.py
parse_data.py Add BooleanConverter to map proper boolean cells to a Bool column 2022-09-10 07:07:45 +02:00
records.py (core) Respect sort_by in lookupOne, and allow reverse sorting 2022-10-24 20:10:08 +02:00
relabeling.py
relation.py
runtests.py python(tests): print logging when running tests in verbose mode 2022-09-20 17:22:28 +02:00
sandbox.py (core) communicate with sandbox via standard pipes 2021-07-12 06:45:47 -04:00
schema.py (core) Comments 2022-10-17 13:38:21 +02:00
sort_specs.py
summary.py (core) Allow duplicating tables from Raw Data page 2022-09-29 08:59:42 -07:00
table_data_set.py
table.py (core) Respect sort_by in lookupOne, and allow reverse sorting 2022-10-24 20:10:08 +02:00
test_acl_formula.py
test_acl_renames.py
test_actions.py
test_codebuilder.py
test_column_actions.py
test_completion.py (core) Adding new column in users table "ref" with unique identifier. 2022-10-04 15:19:28 +02:00
test_default_formulas.py
test_depend.py
test_derived.py (core) Fix undo error for automatically removed rows, especially in summary tables 2022-09-09 22:15:45 +02:00
test_display_cols.py
test_docmodel.py
test_engine.py (core) Fix undo error for automatically removed rows, especially in summary tables 2022-09-09 22:15:45 +02:00
test_find_col.py
test_formula_error.py
test_formula_undo.py
test_functions.py
test_gencode.py
test_import_actions.py
test_logger.py
test_lookups.py (core) Respect sort_by in lookupOne, and allow reverse sorting 2022-10-24 20:10:08 +02:00
test_match_counter.py
test_migrations.py
test_moment.py
test_record_func.py
test_recordlist.py
test_reflist_rel.py
test_relabeling.py
test_renames2.py
test_renames.py (core) Adding new column in users table "ref" with unique identifier. 2022-10-04 15:19:28 +02:00
test_replay.py
test_requests.py
test_rules_grid.py
test_rules.py
test_side_effects.py
test_sort_spec.py
test_summary2.py (core) Test undo for all Python summary table tests 2022-09-07 18:02:02 +02:00
test_summary_choicelist.py (core) Test undo for all Python summary table tests 2022-09-07 18:02:02 +02:00
test_summary_undo.py
test_summary.py (core) Fix undo error for automatically removed rows, especially in summary tables 2022-09-09 22:15:45 +02:00
test_table_actions.py
test_table_data_set.py
test_temp_rowids.py
test_textbuilder.py
test_treeview.py
test_trigger_formulas.py (core) Adding new column in users table "ref" with unique identifier. 2022-10-04 15:19:28 +02:00
test_twowaymap.py
test_types.py
test_undo.py (core) Fix undo error for automatically removed rows, especially in summary tables 2022-09-09 22:15:45 +02:00
test_urllib_patch.py
test_user.py (core) Adding new column in users table "ref" with unique identifier. 2022-10-04 15:19:28 +02:00
test_useractions.py (core) Allow duplicating tables from Raw Data page 2022-09-29 08:59:42 -07:00
testsamples.py
testscript.json
testutil.py
textbuilder.py
treeview.py
twowaymap.py
tzdata.data (core) apply some dependabot suggestions 2022-09-07 14:15:34 -04:00
urllib_patch.py
user.py (core) Adding new column in users table "ref" with unique identifier. 2022-10-04 15:19:28 +02:00
useractions.py (core) Allow duplicating tables from Raw Data page 2022-09-29 08:59:42 -07:00
usercode.py
usertypes.py
xmlrunner.py