Skip to content

Commit 39d04f2

Browse files
authored
Merge pull request #89 from hasura/gavin/oracle-clob-cast-issue
Fix regression in column casting logic that forced VARCHAR(4000)
2 parents 83ed2c8 + 1c5ac3d commit 39d04f2

2 files changed

Lines changed: 12 additions & 5 deletions

File tree

Makefile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,17 @@ run-oracle-connector:
4949
export HASURA_CONFIGURATION_DIRECTORY=$(shell pwd)/ndc-connector-oracle && \
5050
./gradlew :ndc-connector-oracle:quarkusDev --console=plain
5151

52+
run-oracle-cli-introspection:
53+
ifndef JDBC_URL
54+
$(error JDBC_URL is not set)
55+
endif
56+
HASURA_CONFIGURATION_DIRECTORY=./ndc-connector-oracle \
57+
./gradlew :ndc-cli:run --args="\
58+
update $(JDBC_URL) \
59+
--fully-qualify-names=false \
60+
--outfile '../ndc-connector-oracle/configuration.json' \
61+
--database=ORACLE"
62+
5263
build-and-push-cli:
5364
ifndef NDC_JVM_CLI_VERSION
5465
$(error NDC_JVM_CLI_VERSION is not set)

ndc-connector-oracle/src/main/kotlin/io/hasura/oracle/JSONGenerator.kt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,7 @@ object JsonQueryGenerator : BaseQueryGenerator() {
150150
request.collection,
151151
field
152152
)
153-
val castedField = castToSQLDataType(
154-
DatabaseType.ORACLE,
155-
columnField,
156-
ndcScalar
157-
)
153+
val castedField = columnField.cast(columnType)
158154
DSL.jsonEntry(
159155
alias,
160156
// Oracle JSON functions convert DATE to ISO8601 format, which includes a timestamp

0 commit comments

Comments
 (0)