diff options
| author | Munyoki Kilyungi | 2025-06-24 19:44:58 +0300 |
|---|---|---|
| committer | BonfaceKilz | 2025-07-07 07:58:31 +0300 |
| commit | 0755a43b96299169e00e9ab057d580e99af0070c (patch) | |
| tree | 2af76228e0c8292f285be4b00e876cfab880b30e /gn3/db/case_attributes.py | |
| parent | 5a7aa6c11dcb4bf1a7a91e7bc25bb161f9a8db19 (diff) | |
| download | genenetwork3-0755a43b96299169e00e9ab057d580e99af0070c.tar.gz | |
Move CaseAttributeEdit to gn3.db, rename diff to changes.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
Diffstat (limited to 'gn3/db/case_attributes.py')
| -rw-r--r-- | gn3/db/case_attributes.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gn3/db/case_attributes.py b/gn3/db/case_attributes.py index bb15248..7b56bc4 100644 --- a/gn3/db/case_attributes.py +++ b/gn3/db/case_attributes.py @@ -1,10 +1,28 @@ """Module that contains functions for editing case-attribute data""" from typing import Any, Optional, Tuple +from dataclasses import dataclass import json import MySQLdb +@dataclass +class CaseAttributeEdit: + """Represents an edit operation for case attributes in the database. + + Attributes: + inbredset_id (int): The ID of the inbred set associated with + the edit. + user_id (str): The ID of the user performing the edit. + changes (dict): A dictionary containing the changes to be + applied to the case attributes. + + """ + inbredset_id: int + user_id: str + changes: dict + + def get_case_attributes(conn) -> Optional[Tuple]: """Get all the case attributes from the database.""" with conn.cursor() as cursor: |
