Module database

Module database 

Source
Expand description

Utility functions for managing the PostgreSQL database.

Functionsยง

bulk_upsert_objects ๐Ÿ”’
Inserts all objects into the database, or updates them if they already exist.
create_schema
Sets up the tables of the database.
get_gps
Returns the closest 2 timestamps by their distance to the camera timestamp.
insert_image
Insert image file_path and timestamp into database (currently unused).
smart_update_database
Updates the object table in the database with a dynamic object matching strategy.
start_postgres_container
Starts a PostgreSQL container using Docker.
start_postgres_embedded
Starts a PostgreSQL instance embedded in the application.