updatemysql1A module

This is the documentation for updatemysql1A.py.

This file contains a set of functions that:
  1. Create tables in the MySQL database if they do not yet exist.

2. After establishing a connection to the MySQL server, tables for farside, XT-cut, composite map, SO-PHI, and synoptic map can be created and populated with the following information: tag, filename, date_range, latest_date, caption, file_creation_time, and filepath.

updatemysql1A.connect_to_mysqlA()[source]

Summary: Connect to a MySQL server using the provided configuration and return the connection object.

Description: This function establishes a connection to a MySQL server using the parameters specified in the ~/.my.cnf configuration file and connects to the ‘Farside’ database. If the connection is successful, it returns the connection object. If the connection fails, a RuntimeError is raised.

Parameters: None Returns: pymysql.connections.Connection: A connection object to the MySQL server. Raises: RuntimeError: If the connection to the MySQL server is not open.

Example:
>>> connection = connect_to_mysql()
>>> # Perform database operations using the 'connection' object.
updatemysql1A.create_tableA(cursor, overwrite=False)[source]

after the connection to MySQL server is established, create tables in the Farside database.

Example:
>>> Table= create_table()
updatemysql1A.extracting_SO_PHIA()[source]
Example:
>>> Table= extracting_SO_PHI()
updatemysql1A.extracting_composite_mapsA()[source]
Example:
>>> Table= extracting_composite_maps()
updatemysql1A.extracting_moviesA()[source]
Example:
>>> Table= extracting_movies()
updatemysql1A.extracting_synoptic_mapsA()[source]
Example:
>>> Table= extracting_synoptic_maps()
updatemysql1A.extracting_xt_cutA()[source]
Example:
>>> Table= extracting_xt_cut()