diff options
author | Frederick Muriuki Muriithi | 2024-07-25 11:07:33 -0500 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2024-07-25 14:34:09 -0500 |
commit | 754e8f214b940e05298cb360ed829f5c685d55a5 (patch) | |
tree | 62c2c5b601746621f0949b38937ad232f006dee2 /qc_app/db/species.py | |
parent | de9e1b9fe37928b864bea28b408de6c14d04526b (diff) | |
download | gn-uploader-754e8f214b940e05298cb360ed829f5c685d55a5.tar.gz |
Rename module: qc_app --> uploader
Diffstat (limited to 'qc_app/db/species.py')
-rw-r--r-- | qc_app/db/species.py | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/qc_app/db/species.py b/qc_app/db/species.py deleted file mode 100644 index 653e59b..0000000 --- a/qc_app/db/species.py +++ /dev/null @@ -1,22 +0,0 @@ -"""Database functions for species.""" -import MySQLdb as mdb -from MySQLdb.cursors import DictCursor - -def species(conn: mdb.Connection) -> tuple: - "Retrieve the species from the database." - with conn.cursor(cursorclass=DictCursor) as cursor: - cursor.execute( - "SELECT SpeciesId, SpeciesName, LOWER(Name) AS Name, MenuName, " - "FullName FROM Species") - return tuple(cursor.fetchall()) - - return tuple() - -def species_by_id(conn: mdb.Connection, speciesid) -> dict: - "Retrieve the species from the database by id." - with conn.cursor(cursorclass=DictCursor) as cursor: - cursor.execute( - "SELECT SpeciesId, SpeciesName, LOWER(Name) AS Name, MenuName, " - "FullName FROM Species WHERE SpeciesId=%s", - (speciesid,)) - return cursor.fetchone() |