JSONB expression. Deletes field or array element specified in the argument array (equivalent of the ``#-`` operator). The input may be a list of strings that will be coerced to an ``ARRAY`` or an instance of :meth:`_postgres.array`. .. versionadded::
(
self, array: Union[List[str], _pg_array[str]]
)
| 367 | ) |
| 368 | |
| 369 | def delete_path( |
| 370 | self, array: Union[List[str], _pg_array[str]] |
| 371 | ) -> ColumnElement[_CT_JSON]: |
| 372 | """JSONB expression. Deletes field or array element specified in |
| 373 | the argument array (equivalent of the ``#-`` operator). |
| 374 | |
| 375 | The input may be a list of strings that will be coerced to an |
| 376 | ``ARRAY`` or an instance of :meth:`_postgres.array`. |
| 377 | |
| 378 | .. versionadded:: 2.0 |
| 379 | """ |
| 380 | if not isinstance(array, _pg_array): |
| 381 | array = _pg_array(array) |
| 382 | right_side = cast(array, ARRAY(sqltypes.TEXT)) |
| 383 | return self.operate(DELETE_PATH, right_side, result_type=JSONB) |
| 384 | |
| 385 | def path_exists(self, other: Any) -> ColumnElement[bool]: |
| 386 | """Boolean expression. Test for presence of item given by the |