config.io_helidon_dbclient_jdbc_JdbcParametersConfig.adoc Maven / Gradle / Ivy
///////////////////////////////////////////////////////////////////////////////
Copyright (c) 2024 Oracle and/or its affiliates.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
///////////////////////////////////////////////////////////////////////////////
ifndef::rootdir[:rootdir: {docdir}/..]
:description: Configuration of io.helidon.dbclient.jdbc.JdbcParametersConfig
:keywords: helidon, config, io.helidon.dbclient.jdbc.JdbcParametersConfig
:basic-table-intro: The table below lists the configuration keys that configure io.helidon.dbclient.jdbc.JdbcParametersConfig
include::{rootdir}/includes/attributes.adoc[]
= JdbcParametersConfig (dbclient.jdbc) Configuration
// tag::config[]
Type: link:{javadoc-base-url}/io.helidon.dbclient.jdbc/io/helidon/dbclient/jdbc/JdbcParametersConfig.html[io.helidon.dbclient.jdbc.JdbcParametersConfig]
[source,text]
.Config key
----
parameters
----
== Configuration options
.Optional configuration options
[cols="3,3a,2,5a"]
|===
|key |type |default value |description
|`set-object-for-java-time` |boolean |`true` |Set all `java.time` Date/Time values directly using java.sql.PreparedStatement.setObject(int, Object).
This option shall work fine for recent JDBC drivers.
Default value is `true`.
Whether to use java.sql.PreparedStatement.setObject(int, Object) for `java.time` Date/Time values
|`string-binding-size` |int |`1024` |String values with length above this limit will be bound
using java.sql.PreparedStatement.setCharacterStream(int, java.io.Reader, int)
if useStringBinding() is set to `true`.
Default value is `1024`.
String values length limit for java.io.CharArrayReader binding
|`timestamp-for-local-time` |boolean |`true` |Use java.sql.PreparedStatement.setTimestamp(int, java.sql.Timestamp)
to set java.time.LocalTime values when `true`
or use java.sql.PreparedStatement.setTime(int, java.sql.Time) when `false`.
Default value is `true`.
This option is vendor specific. Most of the databases are fine with java.sql.Timestamp,
but for example SQL Server requires java.sql.Time.
This option does not apply when setObjectForJavaTime() is set to `true`.
Whether to use java.sql.Timestamp instead of java.sql.Time
for java.time.LocalTime values
|`use-byte-array-binding` |boolean |`true` |Use java.sql.PreparedStatement.setBinaryStream(int, java.io.InputStream, int) binding
for `byte[]` values.
Default value is `true`.
Whether to use java.io.ByteArrayInputStream binding
|`use-n-string` |boolean |`false` |Use SQL `NCHAR`, `NVARCHAR` or `LONGNVARCHAR` value conversion
for String values.
Default value is `false`.
Whether NString conversion is used
|`use-string-binding` |boolean |`true` |Use java.sql.PreparedStatement.setCharacterStream(int, java.io.Reader, int) binding
for String values with length above stringBindingSize() limit.
Default value is `true`.
Whether to use java.io.CharArrayReader binding
|===
// end::config[]