0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

OData Edm と JDBC Types とのデフォルトの型マッピング (於 Oiyokan v1.14)

Last updated at Posted at 2021-05-16

OData Edm と JDBC Types のデフォルトの型マッピングを Oiyokan v1.14 では以下のように定義しています。

  • 自力で REST API 実装をされる方の参考になればと思います。
  • なお、Oiyokanでは JSON ファイルを編集することによりマッピングの挙動を上書き変更することができます。
Edm type JDBC type h2 type PostgreSQL MySQL SQLSV2008 ORCL18
Edm.SByte Types.TINYINT TINYINT (N/A) TINYINT TINYINT (N/A)
Edm.Int16 Types.SMALLINT SMALLINT smallint (int2) SMALLINT SMALLINT SMALLINT
Edm.Int32 Types.INTEGER INTEGER int (int4) INTEGER INT INT
Edm.Int64 Types.BIGINT BIGINT bigint (int8) BIGINT BIGINT (N/A)
Edm.Decimal Types.DECIMAL DECIMAL decimal(numeric) DECIMAL DECIMAL DECIMAL
Edm.String Types.CHAR CHAR char (bpchar) CHAR CHAR CHAR
Edm.String Types.VARCHAR VARCHAR varchar VARCHAR VARCHAR VARCHAR
Edm.String Types.CLOB CLOB text TEXT TEXT CLOB
Edm.Boolean Types.BOOLEAN BOOLEAN bool (Types.BIT) BOOLEAN BIT(Types.BIT) (N/A)
Edm.Single Types.REAL REAL real (flort4) REAL REAL REAL
Edm.Double Types.DOUBLE DOUBLE double precision DOUBLE FLOAT(53) FLOAT
Edm.Date Types.DATE DATE date DATE DATE DATE
Edm.DateTimeOffset Types.TIMESTAMP TIMESTAMP timestamp TIMESTAMP DATETIME2 TIMESTAMP
Edm.TimeOfDay Types.TIME TIME time TIME TIME (N/A)
Edm.Binary Types.VARBINARY VARBINARY bytea VARBINARY VARBINARY RAW
Edm.Binary Types.BLOB BLOB bytea BLOB VARBINARY BLOB

from: github v1.14.20210510 OiyoMapJdbcEdmUtil.java

  • 更新: 2021-06-06
  • 初出: 2021-05-16
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?