dav_tools.database ================== .. py:module:: dav_tools.database .. autoapi-nested-parse:: Database interaction Classes ------- .. autoapisummary:: dav_tools.database.PostgreSQL Module Contents --------------- .. py:class:: PostgreSQL(host, port, database, user, password) Connection with a PostgreSQL database .. py:method:: insert(schema, table, data, return_fields = []) Inserts a row into a specified table within a PostgreSQL database. :param schema: The schema name where the table resides. :param table: The name of the table to insert data into. :param data: A dictionary where keys are column names and values are the data to insert. :param return_fields: A list of fields to return after the insert. Defaults to an empty list. :returns: If `return_fields` is specified, returns a tuple containing the values of the requested fields. Otherwise, returns None. :notes: - The `data` dictionary keys must match the column names of the table.