favorites.repositories
Repository helpers for user favorites stored in SQLite.
Functions
|
Insert favorites and return the inserted records. |
|
Return favorites and total count for the given filters. |
|
Return all tags sorted alphabetically. |
|
Update a favorite's note and tags. |
|
Return tags associated with one favorite. |
|
Delete one favorite by id. |
|
Serialize all favorites for export. |
Module Contents
- favorites.repositories.insert_favorites(conn, entries)
Insert favorites and return the inserted records.
Each entry should include at minimum
name,source, andmetadata. Optional fields are stored when present.
- favorites.repositories.list_favorites(conn, *, limit, offset, name_query=None, tag=None, name_class=None, package_id=None)
Return favorites and total count for the given filters.
- favorites.repositories.list_tags(conn)
Return all tags sorted alphabetically.
- favorites.repositories.update_favorite(conn, *, favorite_id, note_md, gender, tags)
Update a favorite’s note and tags.
- favorites.repositories.list_tags_for_favorite(conn, favorite_id)
Return tags associated with one favorite.
- favorites.repositories.delete_favorite(conn, favorite_id)
Delete one favorite by id.
- favorites.repositories.export_favorites(conn)
Serialize all favorites for export.