electiondata icon indicating copy to clipboard operation
electiondata copied to clipboard

Add option for mysql

Open sfsinger19103 opened this issue 4 years ago • 2 comments

Current version works only with postgresql. Flexibility could be achieved entirely within the database module.

  • [ ] Change run_time.ini to include all database info -- including sql_flavor parameter -- under a [database] hoarder
  • [ ] Make sure system is backwards compatible with old-style run_time.ini files, which had a [postgresql] header and assumed postgresql
  • [ ] Document which routines (e.g., probably removing database, which requires closing connections) use postgres-specific and/or mysql-specific code, so that if folks want to add another kind of database they'll be able to tell what exactly they need to update in database module
  • [ ] Update user documentation
  • [ ] Unit tests

sfsinger19103 avatar Aug 12 '22 17:08 sfsinger19103

This might be a good project for someone who already understands sqlalchemy well.

sfsinger19103 avatar Aug 17 '22 00:08 sfsinger19103

  • [ ] db_pars
  • [ ] get_database_names
  • [ ] remove_database
  • [ ] create_database
  • [ ] restore_to_db
  • [ ] append_to_composing_reporting_unit_join
  • [ ] test_connection_and_tables
  • [ ] append_to_composing_reporting_unit_join
  • [ ] create_or_reset_db
  • [x] sql_alchemy_connect
  • [ ] create_db_if_not_ok
  • [ ] get_cdf_db_table_names
  • [ ] name_from_id_cursor
  • [ ] name_from_id
  • [ ] name_to_id_cursor
  • [ ] name_to_id
  • [ ] get_name_field
  • [ ] get_reporting_unit_type
  • [ ] insert_to_cdf_db
  • [ ] table_named_to_avoid_conflict
  • [ ] append_id_to_dframe
  • [ ] get_column_names
  • [ ] add_records_to_selection_table
  • [ ] jurisdiction_id_list
  • [ ] data_file_list_cursor
  • [ ] data_file_list
  • [ ] active_vote_types_from_ids
  • [ ] active_vote_types
  • [ ] remove_record_from_datafile_table
  • [ ] remove_vote_counts
  • [ ] get_relevant_election
  • [ ] get_relevant_contests
  • [ ] get_jurisdiction_hierarchy
  • [ ] unsummed_vote_counts_with_rollup_subdivision_id
  • [ ] get_contest_with_unknown
  • [ ] selection_ids_from_candidate_id
  • [ ] export_rollup_from_db
  • [ ] read_vote_count
  • [ ] list_to_id
  • [ ] data_file_download
  • [ ] data_file_download_cursor
  • [ ] is_preliminary_cursor
  • [ ] is_preliminary
  • [ ] read_external
  • [ ] read_external_cursor
  • [ ] display_elections
  • [ ] display_jurisdictions
  • [ ] vote_types_by_juris
  • [ ] contest_families_by_juris
  • [ ] parents_by_cursor
  • [ ] parents
  • [ ] get_vote_count_types_cursor
  • [ ] get_vote_count_types
  • [ ] read_vote_count_nist
  • [ ] create_common_data_format_tables
  • [ ] create_table
  • [ ] add_standard_records
  • [x] reset_db -- deleted
  • [x] get_params_from_various -- changed header to [database] and added backwards compatibility for [postgresql] header

sfsinger19103 avatar Aug 17 '22 00:08 sfsinger19103