Page MenuHomeFeedback Tracker

setN - a set command that sets and returns the array/hashmap it operated on
New, NormalPublic

Description

Introduce a new scripting command setN that sets any number of elements at once, supports optional insertOnly flag and returns the array or hashmap that it operated:

ARRAY = ARRAY setN [INDEX_1, VALUE_1, ..., INDEX_N, VALUE_N, (BOOL insertOnly)];
HASHMAP = HASHMAP setN [KEY_1, VALUE_1, ..., KEY_N, VALUE_N, (BOOL insertOnly)];
  1. Better name idea - setN as in set N elements, in line with existing set command name
  2. Setting several elements in one go for performance gains
  3. No backwards compatibility issues, returns the array or hashmap that it operated

insertOnly should behave the same way as it does with current HASHMAP set behavior, optional and false by default, maybe also have it for arrays.

Details

Severity
Feature
Resolution
Open
Reproducibility
N/A
Operating System
Windows 10 x64
Category
Scripting

Event Timeline

SaMatra created this task.Feb 3 2024, 4:04 AM
SaMatra updated the task description. (Show Details)Feb 3 2024, 12:26 PM
SaMatra renamed this task from A set command that also returns the array/hashmap it operated on to setN - a set command that sets and returns the array/hashmap it operated on.Mar 10 2024, 4:01 AM
SaMatra updated the task description. (Show Details)
h- added a subscriber: h-.Mar 12 2024, 6:53 AM