def del_data_item_by_parent_synced(cls, parent, synced, is_dir=True): with db: DataItem.delete().where( DataItem.parent == parent, DataItem.synced == synced, DataItem.isdir == (1 if is_dir else 0)).execute()
def del_data_item_by_id(cls, pk_id): with db: DataItem.delete().where(DataItem.id == pk_id).execute()
def del_data_item_by_parent_pin(cls, parent, pin, is_dir=True): with db: DataItem.delete().where( DataItem.parent == parent, DataItem.pin == pin, DataItem.isdir == (1 if is_dir else 0)).execute()