Skip to content

Initializer

init(frequency:query:)

Create a new KeepAliveBehavior.
init(frequency: Duration = .seconds(30), query: PostgresQuery = "SELECT 1;")

Parameters

frequency

The amount of time that shall pass before an idle connection runs a keep-alive query. Defaults to 30 seconds.

query

The query that is run on an idle connection after it has been idle for frequency. Defaults to SELECT 1;.