Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
126 changes: 97 additions & 29 deletions vertx-db2-client/src/main/asciidoc/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -187,39 +187,107 @@ include::tracing.adoc[]

== DB2 type mapping

Currently the client supports the following DB2 types

* BOOLEAN (`java.lang.Boolean`) (DB2 LUW only)
* SMALLINT (`java.lang.Short`)
* INTEGER (`java.lang.Integer`)
* BIGINT (`java.lang.Long`)
* REAL (`java.lang.Float`)
* DOUBLE (`java.lang.Double`)
* DECIMAL (`io.vertx.sqlclient.data.Numeric`)
* CHAR (`java.lang.String`)
* VARCHAR (`java.lang.String`)
* ENUM (`java.lang.String`)
* DATE (`java.time.LocalDate`)
* TIME (`java.time.LocalTime`)
* TIMESTAMP (`java.time.LocalDateTime`)
* BINARY (`byte[]`)
* VARBINARY (`byte[]`)
* ROWID (`io.vertx.db2client.impl.drda.DB2RowId` or `java.sql.RowId`) (DB2 z/OS only)

Some types that are currently NOT supported are:

* XML
* BLOB
* CLOB
* DBCLOB
* GRAPHIC / VARGRAPHIC

For a further documentation on DB2 data types, see the following resources:
Currently the client supports the following DB2 types:

[cols="<2,<3,<3", options="header"]
|===
| DB2 Type | Java Type | Notes

| `BOOLEAN`
| `java.lang.Boolean`
| DB2 LUW only

| `SMALLINT`
| `java.lang.Short`
|

| `INTEGER`
| `java.lang.Integer`
|

| `BIGINT`
| `java.lang.Long`
|

| `REAL`
| `java.lang.Float`
|

| `DOUBLE`
| `java.lang.Double`
|

| `DECIMAL`
| `io.vertx.sqlclient.data.Numeric`
|

| `CHAR`
| `java.lang.String`
|

| `VARCHAR`
| `java.lang.String`
|

| `ENUM`
| `java.lang.String`
|

| `DATE`
| `java.time.LocalDate`
|

| `TIME`
| `java.time.LocalTime`
|

| `TIMESTAMP`
| `java.time.LocalDateTime`
|

| `BINARY`
| `byte[]`
|

| `VARBINARY`
| `byte[]`
|

| `ROWID`
| `io.vertx.db2client.impl.drda.DB2RowId` or `java.sql.RowId`
| DB2 z/OS only
|===

=== Unsupported types

The following types are not currently supported:

[cols="<2,<4", options="header"]
|===
| Type | Notes

| `XML`
| Not implemented

| `BLOB`
| Not implemented

| `CLOB`
| Not implemented

| `DBCLOB`
| Not implemented

| `GRAPHIC` / `VARGRAPHIC`
| Not implemented
|===

For further documentation on DB2 data types, see:

* https://www.ibm.com/support/knowledgecenter/SSEPGG_11.5.0/com.ibm.db2.luw.sql.ref.doc/doc/r0008483.html[DB2 for LUW 11.5 data types]
* https://www.ibm.com/support/knowledgecenter/SSEPEK_12.0.0/sqlref/src/tpc/db2z_datatypesintro.html[DB2 for z/OS 12.0 data types]

Tuple decoding uses the above types when storing values, it also performs on the fly conversion of the actual value when possible:
Tuple decoding uses the above types when storing values. It also performs on the fly conversion of the actual value when possible:

[source,$lang]
----
Expand Down
112 changes: 88 additions & 24 deletions vertx-mssql-client/src/main/asciidoc/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -162,30 +162,94 @@ include::cursor.adoc[]

include::tracing.adoc[]

== Data types supported

Currently, the client supports the following SQL Server types:

* TINYINT(`java.lang.Short`)
* SMALLINT(`java.lang.Short`)
* INT(`java.lang.Integer`)
* BIGINT(`java.lang.Long`)
* BIT(`java.lang.Boolean`)
* REAL(`java.lang.Float`)
* DOUBLE(`java.lang.Double`)
* NUMERIC/DECIMAL(`{@link java.math.BigDecimal}`)
* CHAR/VARCHAR(`java.lang.String`)
* NCHAR/NVARCHAR(`java.lang.String`)
* DATE(`java.time.LocalDate`)
* TIME(`java.time.LocalTime`)
* SMALLDATETIME(`java.time.LocalDateTime`)
* DATETIME(`java.time.LocalDateTime`)
* DATETIME2(`java.time.LocalDateTime`)
* DATETIMEOFFSET(`java.time.OffsetDateTime`)
* BINARY/VARBINARY(`io.vertx.core.buffer.Buffer`)
* MONEY (`{@link java.math.BigDecimal}`)
* SMALLMONEY (`{@link java.math.BigDecimal}`)
* GUID (`{@link java.util.UUID}`)
== MSSQL type mapping

Currently the client supports the following SQL Server types:

[cols="<2,<3,<3", options="header"]
|===
| SQL Server Type | Java Type | Notes

| `TINYINT`
| `java.lang.Short`
|

| `SMALLINT`
| `java.lang.Short`
|

| `INT`
| `java.lang.Integer`
|

| `BIGINT`
| `java.lang.Long`
|

| `BIT`
| `java.lang.Boolean`
|

| `REAL`
| `java.lang.Float`
|

| `DOUBLE`
| `java.lang.Double`
|

| `NUMERIC` / `DECIMAL`
| `java.math.BigDecimal`
|

| `CHAR` / `VARCHAR`
| `java.lang.String`
|

| `NCHAR` / `NVARCHAR`
| `java.lang.String`
| Unicode strings

| `DATE`
| `java.time.LocalDate`
|

| `TIME`
| `java.time.LocalTime`
|

| `SMALLDATETIME`
| `java.time.LocalDateTime`
|

| `DATETIME`
| `java.time.LocalDateTime`
|

| `DATETIME2`
| `java.time.LocalDateTime`
|

| `DATETIMEOFFSET`
| `java.time.OffsetDateTime`
|

| `BINARY` / `VARBINARY`
| `io.vertx.core.buffer.Buffer`
|

| `MONEY`
| `java.math.BigDecimal`
|

| `SMALLMONEY`
| `java.math.BigDecimal`
|

| `GUID`
| `java.util.UUID`
|
|===

Tuple decoding uses the above types when storing values.

Expand Down
Loading