application_dao module
- class application_dao.application_dao
Bases:
objectThis is the application_dao class.”
- add_application(email, company_name, location, job_profile, salary, username, password, security_question, security_answer, notes, date_applied, status)
Adds an application with all the specified arguments into the database.
- Parameters
email (string) – Email ID of the user for that application.
company_name (string) – Company to which the user is applying to.
location (string) – Location of the job posting.
job_profile (string) – Type of role.
salary (int) – Salary that the job offers.
username (string) – Login credentials for the application.
password (string) – Password for the application.
security_question (string) – Security question for the application.
security_answer (string) – Answer to the application’s security questions.
notes (string) – Any notes that the user might want to add in regards to their application.
date_applied (date) – Takes in the date of application.
status (string) – Status of this application such as applied or pending.
- Returns
runs the SQL query to add an application into the database, and returns the execution status of the query.
- Return type
self
- change_status(application_id, status)
Changes the status of an existing application.
- Parameters
application_id (string) – An identifier which can link to the required application.
status (string) – New status that the application should be changed into.
- Returns
returns the status of the SQL query execution for changing application status.
- Return type
bool
- delete_application(application_id)
Deletes an existing application.
- Parameters
application_id (string) – An identifier which can link to the required application.
- Returns
returns the status of the SQL query execution for deleting an application.
- Return type
bool
- get_application(email, application_status)
Fetches an application based on keywords from the database.
- Parameters
email (string) – email of the user who created the application in respect.
application_status (string) – Application status such as pending or applied.
- Returns
Returns the result of the SQL query that fetches the application from the database.
- Return type
[tuple]
- update_application(company_name, location, job_profile, salary, username, password, security_question, security_answer, notes, date_applied, status, application_id)
Updates an application with all the specified arguments into the database.
- Parameters
email (string) – Email ID of the user for that application.
company_name (string) – Company to which the user is applying to.
location (string) – Location of the job posting.
job_profile (string) – Type of role.
salary (int) – Salary that the job offers.
username (string) – Login credentials for the application.
password (string) – Password for the application.
security_question (string) – Security question for the application.
security_answer (string) – Answer to the application’s security questions.
notes (string) – Any notes that the user might want to add in regards to their application.
date_applied (date) – Takes in the date of application.
status (string) – Status of this application such as applied or pending.
- Returns
runs the SQL query to update an application in the database, and returns the execution status of the query.
- Return type
self