updatemysql1B module

This is the documentation for updatemysql.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.

updatemysql1B.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.
updatemysql1B.create_tableA(cursor, overwrite=False)[source]

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

Example:
>>> Table= create_table()
updatemysql1B.extracting_SO_PHI()[source]
Example:
>>> Table= extracting_SO_PHI()
updatemysql1B.extracting_composite_maps()[source]
Example:
>>> Table= extracting_composite_maps()
updatemysql1B.extracting_movies()[source]
Example:
>>> Table= extracting_movies()
updatemysql1B.extracting_synoptic_maps()[source]
Example:
>>> Table= extracting_synoptic_maps()
updatemysql1B.extracting_xt_cut()[source]
Example:
>>> Table= extracting_xt_cut()