Skip to content

Commit 0e044a0

Browse files
committed
Javadod and comments + map UUID to string and other small changes
1 parent ef2050a commit 0e044a0

14 files changed

Lines changed: 482 additions & 429 deletions

data/semantickernel-data-oracle/pom.xml

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -56,38 +56,10 @@
5656
<artifactId>jackson-datatype-jsr310</artifactId>
5757
<version>2.18.0</version>
5858
</dependency>
59-
<dependency>
60-
<groupId>com.github.jknack</groupId>
61-
<artifactId>handlebars</artifactId>
62-
</dependency>
63-
<dependency>
64-
<groupId>com.google.code.findbugs</groupId>
65-
<artifactId>jsr305</artifactId>
66-
<scope>provided</scope>
67-
</dependency>
68-
<dependency>
69-
<groupId>com.fasterxml.jackson.dataformat</groupId>
70-
<artifactId>jackson-dataformat-yaml</artifactId>
71-
<scope>compile</scope>
72-
</dependency>
7359
<dependency>
7460
<groupId>com.github.spotbugs</groupId>
7561
<artifactId>spotbugs-annotations</artifactId>
7662
</dependency>
77-
<dependency>
78-
<groupId>org.apache.commons</groupId>
79-
<artifactId>commons-text</artifactId>
80-
</dependency>
81-
<dependency>
82-
<groupId>org.postgresql</groupId>
83-
<artifactId>postgresql</artifactId>
84-
<version>42.7.4</version>
85-
</dependency>
86-
<dependency>
87-
<groupId>org.xerial</groupId>
88-
<artifactId>sqlite-jdbc</artifactId>
89-
<version>3.47.0.0</version>
90-
</dependency>
9163
<dependency>
9264
<groupId>com.oracle.database.jdbc</groupId>
9365
<artifactId>ojdbc11</artifactId>
@@ -98,6 +70,7 @@
9870
<artifactId>ojdbc-provider-jackson-oson</artifactId>
9971
<version>1.0.4</version>
10072
</dependency>
73+
<!-- Tests use TestContainers to create an Oracle Database -->
10174
<dependency>
10275
<groupId>org.junit.jupiter</groupId>
10376
<artifactId>junit-jupiter</artifactId>
@@ -108,7 +81,6 @@
10881
<artifactId>junit-jupiter-api</artifactId>
10982
<scope>test</scope>
11083
</dependency>
111-
<!-- Tests use TestContainers to create an Oracle Database -->
11284
<dependency>
11385
<groupId>org.testcontainers</groupId>
11486
<artifactId>testcontainers</artifactId>
Lines changed: 55 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,74 @@
1+
/*
2+
** Semantic Kernel Oracle connector version 1.0.
3+
**
4+
** Copyright (c) 2025 Oracle and/or its affiliates.
5+
** Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
6+
*/
17
package com.microsoft.semantickernel.data.jdbc.oracle;
28

39
/**
4-
* Defines oracle database type constants for supported field types.
10+
* Defines oracle database type constants for supported java types.
511
*/
612
public class OracleDataTypesMapping {
7-
public static final String STRING_VARCHAR = "NVARCHAR2(%s)";
13+
14+
/**
15+
* Oracle database type used when strings are mapped to VARCHAR
16+
*/
17+
public static final String STRING_VARCHAR = "VARCHAR2(%s)";
18+
/**
19+
* Oracle database type used when strings are mapped to CLOB
20+
*/
821
public static final String STRING_CLOB = "CLOB";
22+
/**
23+
* Oracle database type used to map booleans
24+
*/
925
public static final String BOOLEAN = "BOOLEAN";
26+
/**
27+
* Oracle database type used to map bytes
28+
*/
1029
public static final String BYTE = "NUMBER(3)";
30+
/**
31+
* Oracle database type used to map byte arrays
32+
*/
1133
public static final String BYTE_ARRAY = "RAW(2000)";
34+
/**
35+
* Oracle database type used to map shorts
36+
*/
1237
public static final String SHORT = "NUMBER(5)";
38+
/**
39+
* Oracle database type used to map ints
40+
*/
1341
public static final String INTEGER = "NUMBER(10)";
42+
/**
43+
* Oracle database type used to map longs
44+
*/
1445
public static final String LONG = "NUMBER(19)";
46+
/**
47+
* Oracle database type used to map float
48+
*/
1549
public static final String FLOAT = "BINARY_FLOAT";
50+
/**
51+
* Oracle database type used to map double
52+
*/
1653
public static final String DOUBLE = "BINARY_DOUBLE";
54+
/**
55+
* Oracle database type used to map BigDecimal
56+
*/
1757
public static final String DECIMAL = "NUMBER";
58+
/**
59+
* Oracle database type used to map offset date time
60+
*/
1861
public static final String OFFSET_DATE_TIME = "TIMESTAMP(7) WITH TIME ZONE";
19-
public static final String UUID = "RAW(16)";
62+
/**
63+
* Oracle database type used to map UUID
64+
*/
65+
public static final String UUID = "VARCHAR2(36)";
66+
/**
67+
* Oracle database type used to map lists
68+
*/
2069
public static final String JSON = "JSON";
70+
/**
71+
* Oracle database type used to map vectors (the parameter is the dimension of the vector)
72+
*/
2173
public static final String VECTOR_FLOAT = "VECTOR(%s, FLOAT32)";
2274
}

0 commit comments

Comments
 (0)