Loading...

Connection

Functions for managing database connections in VAST Orbit.


Functions

Important

For a comprehensive guide to creating connections, see Connection.

Read

auto_connect()

Automatically creates a connection using the auto-connection.

available_connections()

Displays all available connections.

connect(section[, dsn])

Connects to the database.

current_connection()

Returns the current database connection.

current_cursor()

Returns the current database cursor.

get_connection_file()

Gets (and creates, if necessary) the auto-connection file.

get_confparser([dsn])

Parses the input DSN and returns the linked Config Parser.

read_dsn(section[, dsn])

Reads the DSN information from the vastorbit_CONNECTION environment variable or the input file.

vast_connection([section, dsn, config])

Reads the input DSN and creates a VAST DataBase connection using Trino.

vastorbitlab_connection()

Returns the vastorbitLab connection, if possible.

Write

change_auto_connection(name)

Changes the current auto connection.

new_connection(conn_info[, name, auto, ...])

Saves the new connection in the vastorbit connection file.

set_connection(conn)

Saves a custom connection to the vastorbit object.

Close/Delete

close_connection()

Closes the connection to the database.

delete_connection(name)

Deletes a specified connection from the connection file.


Global Connection

global_connection.GlobalConnection()

Main Class to store the Global Connection used by all vastorbit objects.

Methods:

GlobalConnection.get_connection()

Returns the current connection.

GlobalConnection.get_dsn()

Returns the current dsn.

GlobalConnection.get_dsn_section()

Returns the current dsn section.

GlobalConnection.set_connection(conn[, ...])

Sets the current connection.