Array functions¶
ArrayCat¶
- class piccolo.query.functions.array.ArrayCat(array_1: Column | QueryString | list[object], array_2: Column | QueryString | list[object])¶
Concatenate two arrays.
- Parameters:
array_1 – These values will be at the start of the new array.
array_2 – These values will be at the end of the new array.
ArrayAppend¶
- class piccolo.query.functions.array.ArrayAppend(array: Column | QueryString | list[object], value: Column | QueryString | object)¶
Append an element to the end of an array.
- Parameters:
column – Identifies the column.
value – The value to append.
ArrayPrepend¶
- class piccolo.query.functions.array.ArrayPrepend(array: Column | QueryString | list[object], value: Column | QueryString | object)¶
Append an element to the beginning of an array.
- Parameters:
value – The value to prepend.
column – Identifies the column.
ArrayRemove¶
- class piccolo.query.functions.array.ArrayRemove(array: Column | QueryString | list[object], value: Column | QueryString | object)¶
Remove all elements equal to the given value from the array (array must be one-dimensional).
- Parameters:
column – Identifies the column.
value – The value to remove.
ArrayReplace¶
- class piccolo.query.functions.array.ArrayReplace(array: Column | QueryString | list[object], old_value: Column | QueryString | object, new_value: Column | QueryString | object)¶
Replace each array element equal to the given value with a new value.
- Parameters:
column – Identifies the column.
old_value – The old value to be replaced.
new_value – The new value we are replacing with.