Tries to connect to an SQLite database using dbConnect()
. If the
initial connection fails, it retries up to max_retries
times, waiting
wait_time
seconds between each attempt. If the connection cannot be
established after the maximum retries, the function stops and throws an
error.
db_connect(db_path, max_retries = 3, wait_time = 5)db_connect(db_path, max_retries = 3, wait_time = 5)
A database connection object if the connection is successful.
[mandatory] (character) A string specifying the file path to the SQLite database.
[mandatory] (integer) The maximum number of retries if
the connection fails (default: 3
).
[mandatory] (numeric) The number of seconds to wait between
retries (default: 5
).