• Florian Sachs's avatar
    Support Mass-delete with multiple pks · 1c7b8137
    Florian Sachs authored
    `contrib.sqla.view.ModelView.action_delete()` now is able to mass-delete models with multiple primary keys. Therefore, two new helper functions has been introduced in `contribg.sqla.tools`:
    
    * `tuple_operator_in()` that fakes the `sqlalchemy.tuple_` operator for engines, that do not support the `tuple_` operator. (like sqlite)
    * `get_query_for_ids()` that returns a query, object that contains all objects identified by the `ids`.
    
    Both functions have docstrings with more information.
    
    The logic of the `action_delete()` did not change, as for objects with a single primary key, the codepath did not change at all.
    1c7b8137
Name
Last commit
Last update
babel Loading commit data...
doc Loading commit data...
examples Loading commit data...
flask_admin Loading commit data...
.gitignore Loading commit data...
.gitmodules Loading commit data...
.travis.yml Loading commit data...
AUTHORS Loading commit data...
LICENSE Loading commit data...
MANIFEST.in Loading commit data...
Makefile Loading commit data...
NOTICE Loading commit data...
README.rst Loading commit data...
TODO.txt Loading commit data...
projects.rst Loading commit data...
requirements.txt Loading commit data...
setup.cfg Loading commit data...
setup.py Loading commit data...