OctaviusProperties
Holds all configuration properties for establishing a connection to a PostgreSQL database using the Octavius driver.
It provides a strongly-typed representation of common connection properties (e.g., host, port, user, password, ssl settings) and stores any unrecognised properties in a map. This class also provides utility methods for parsing properties from a JDBC URL and converting the properties back into a valid JDBC URL.
Properties
Everything the driver does not recognise, sent to the server as startup parameters. This is what carries search_path, statement_timeout and the rest of PostgreSQL's own settings; the one with a property of its own is applicationName.
The name this connection reports to the server, where it shows up in pg_stat_activity and in any log line written with %a. Left unset, the driver names itself - Octavius Driver - so a connection is never one of a row of blanks.
Seconds allowed for a cancel request, covering both its connect and its reads.
How hard to insist that authentication be bound to the TLS channel. Defaults to ChannelBinding.PREFER: bind when the connection is encrypted and the server offers it.
The database to connect to. Defaults to postgres.
Starting size, in bytes, of the per-connection parameter buffer. Defaults to 1024.
Seconds to wait for the socket connect and login. Falls back to DriverManager.getLoginTimeout(), or 10 seconds when that is 0.
Whether a traced statement carries the values bound to it, rather than only how many there were. Defaults to false.
Largest row, in bytes, kept in the reusable row buffer. Defaults to 65536.
Cap, in bytes, for the per-connection parameter buffer; it shrinks back to initialParameterWriterCapacity after a query that exceeded it. Defaults to 65536.
Fully-qualified class name of a NoticeHandler for server notices. A Kotlin object is reused as a singleton across connections; a class is instantiated per connection through its no-arg constructor.
Capacity of the LISTEN/NOTIFY buffer. Defaults to 256.
Port the server listens on. Defaults to 5432.
Hostname or IP address of the server. Defaults to localhost.
Seconds to wait on a socket read before failing. Defaults to 0, which waits forever.
Shorthand raising the default SSL mode to SslMode.REQUIRE. Ignored when sslmode is set.
How much protection the connection demands. Defaults to SslMode.PREFER.
Decrypts sslkey where that key is encrypted - a PEM file opening on BEGIN ENCRYPTED PRIVATE KEY. An unencrypted key ignores it; an encrypted one without it is refused, naming this property.
Path to the CA certificate the server's chain is verified against, for verify-ca and above. Optional: left unset, the JVM's default trust store is used.
Functions
Returns a complete, independent duplicate of this configuration, password included.
Copies every set property of other over this one.
Sets one property by name, using the same names a JDBC URL would.