Skip to content

Commit

Permalink
Cleanup PGProperty, sort values, and add some missing to docs (#1686)
Browse files Browse the repository at this point in the history
* misc: Add PGProperty.getDescription()

* misc: Remove variadic constructor for PGProperty values and split across multiple lines

* perf: Cache PGProperty values in a map by name

* misc: Add PGProperty.isRequired()

* misc: Add PGProperty.isDeprecated()

* docs: Correct receiveBufferSize and remove duplicate sendBufferSize

* docs: Add missing binaryTransfer property to head docs

* docs: Add missing databaseMetadataCacheFields and databaseMetadataCacheFieldsMiB to head docs

* misc: Sort PGProperty enum values
  • Loading branch information
sehrope committed Jan 30, 2020
1 parent 1191076 commit 47e366d
Show file tree
Hide file tree
Showing 6 changed files with 522 additions and 300 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ In addition to the standard connection parameters the driver supports a number o
| sslpasswordcallback | String | null | The name of a class (for use in [Class.forName(String)](https://docs.oracle.com/javase/6/docs/api/java/lang/Class.html#forName%28java.lang.String%29)) that implements javax.security.auth.callback.CallbackHandler and can handle PasswordCallback for the ssl password. |
| sslpassword | String | null | The password for the client's ssl key (ignored if sslpasswordcallback is set) |
| sendBufferSize | Integer | -1 | Socket write buffer size |
| recvBufferSize | Integer | -1 | Socket read buffer size |
| receiveBufferSize | Integer | -1 | Socket read buffer size |
| loggerLevel | String | null | Logger level of the driver using java.util.logging. Allowed values: OFF, DEBUG or TRACE. |
| loggerFile | String | null | File name output of the Logger, if set, the Logger will use a FileHandler to write to a specified file. If the parameter is not set or the file can't be created the ConsoleHandler will be used instead. |
| allowEncodingChanges | Boolean | false | Allow for changes in client_encoding |
Expand Down
2 changes: 1 addition & 1 deletion docs/documentation/92/connect.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ connection.
* `sendBufferSize = int`
Sets SO_SNDBUF on the connection stream

* `recvBufferSize = int`
* `receiveBufferSize = int`
Sets SO_RCVBUF on the connection stream

* `protocolVersion = String`
Expand Down
2 changes: 1 addition & 1 deletion docs/documentation/93/connect.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ connection.
* `sendBufferSize = int`
Sets SO_SNDBUF on the connection stream

* `recvBufferSize = int`
* `receiveBufferSize = int`
Sets SO_RCVBUF on the connection stream

* `protocolVersion = String`
Expand Down
6 changes: 1 addition & 5 deletions docs/documentation/94/connect.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,14 +118,10 @@ connection.

Sets SO_SNDBUF on the connection stream

* `recvBufferSize = int`
* `receiveBufferSize = int`

Sets SO_RCVBUF on the connection stream

* `receiveBufferSize = int`

Sets SO_RCVBUF on the connection stream

* `protocolVersion = String`

The driver supports both the V2 and V3 frontend/backend protocols. The
Expand Down
28 changes: 20 additions & 8 deletions docs/documentation/head/connect.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,14 +158,6 @@ Connection conn = DriverManager.getConnection(url);

If provided will be used by ConsoleCallbackHandler

* **sendBufferSize** = int

Sets SO_SNDBUF on the connection stream

* **recvBufferSize** = int

Sets SO_RCVBUF on the connection stream

* **protocolVersion** = int

The driver supports the V3 frontend/backend protocols. The V3 protocol was introduced in 7.4 and
Expand Down Expand Up @@ -228,6 +220,12 @@ Connection conn = DriverManager.getConnection(url);

The default is 'false'

* **binaryTransfer** = boolean

Use binary format for sending and receiving data if possible.

The default is 'true'

* **binaryTransferEnable** = String

A comma separated list of types to enable binary transfer. Either OID numbers or names.
Expand All @@ -237,6 +235,20 @@ Connection conn = DriverManager.getConnection(url);
A comma separated list of types to disable binary transfer. Either OID numbers or names.
Overrides values in the driver default set and values set with binaryTransferEnable.

* **databaseMetadataCacheFields** = int

Specifies the maximum number of fields to be cached per connection.
A value of 0 disables the cache.

Defaults to 65536.

* **databaseMetadataCacheFieldsMiB** = int

Specifies the maximum size (in megabytes) of fields to be cached per connection.
A value of 0 disables the cache.

Defaults to 5.

* **prepareThreshold** = int

Determine the number of `PreparedStatement` executions required before
Expand Down

0 comments on commit 47e366d

Please sign in to comment.