Skip to content

Commit ad88116

Browse files
committed
Add OracleType::Json (JSON data type has not been supported yet.)
1 parent 2fb0d92 commit ad88116

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@ required.
229229
* Scrollable cursors
230230
* Batch DML
231231
* Better Oracle object type support
232+
* [JSON data type](https://oracle-base.com/articles/21c/json-data-type-21c)
232233

233234
## License
234235

src/sql_type/oracle_type.rs

+5
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,9 @@ pub enum OracleType {
197197
/// LONG RAW
198198
LongRaw,
199199

200+
/// JSON data type introduced in Oracle 21c
201+
Json,
202+
200203
/// Integer type in Oracle object type attributes. This will be renamed to Integer in future.
201204
Int64,
202205

@@ -247,6 +250,7 @@ impl OracleType {
247250
)?)),
248251
DPI_ORACLE_TYPE_LONG_VARCHAR => Ok(OracleType::Long),
249252
DPI_ORACLE_TYPE_LONG_RAW => Ok(OracleType::LongRaw),
253+
DPI_ORACLE_TYPE_JSON => Ok(OracleType::Json),
250254
_ => Err(Error::InternalError(format!(
251255
"Unknown oracle type number: {}",
252256
info.oracleTypeNum
@@ -391,6 +395,7 @@ impl fmt::Display for OracleType {
391395
OracleType::Object(ref ty) => write!(f, "{}.{}", ty.schema(), ty.name()),
392396
OracleType::Long => write!(f, "LONG"),
393397
OracleType::LongRaw => write!(f, "LONG RAW"),
398+
OracleType::Json => write!(f, "JSON"),
394399
OracleType::Int64 => write!(f, "INT64 used internally"),
395400
OracleType::UInt64 => write!(f, "UINT64 used internally"),
396401
}

0 commit comments

Comments
 (0)