|
| 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 | + */ |
1 | 7 | package com.microsoft.semantickernel.data.jdbc.oracle; |
2 | 8 |
|
3 | 9 | /** |
4 | | - * Defines oracle database type constants for supported field types. |
| 10 | + * Defines oracle database type constants for supported java types. |
5 | 11 | */ |
6 | 12 | 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 | + */ |
8 | 21 | public static final String STRING_CLOB = "CLOB"; |
| 22 | + /** |
| 23 | + * Oracle database type used to map booleans |
| 24 | + */ |
9 | 25 | public static final String BOOLEAN = "BOOLEAN"; |
| 26 | + /** |
| 27 | + * Oracle database type used to map bytes |
| 28 | + */ |
10 | 29 | public static final String BYTE = "NUMBER(3)"; |
| 30 | + /** |
| 31 | + * Oracle database type used to map byte arrays |
| 32 | + */ |
11 | 33 | public static final String BYTE_ARRAY = "RAW(2000)"; |
| 34 | + /** |
| 35 | + * Oracle database type used to map shorts |
| 36 | + */ |
12 | 37 | public static final String SHORT = "NUMBER(5)"; |
| 38 | + /** |
| 39 | + * Oracle database type used to map ints |
| 40 | + */ |
13 | 41 | public static final String INTEGER = "NUMBER(10)"; |
| 42 | + /** |
| 43 | + * Oracle database type used to map longs |
| 44 | + */ |
14 | 45 | public static final String LONG = "NUMBER(19)"; |
| 46 | + /** |
| 47 | + * Oracle database type used to map float |
| 48 | + */ |
15 | 49 | public static final String FLOAT = "BINARY_FLOAT"; |
| 50 | + /** |
| 51 | + * Oracle database type used to map double |
| 52 | + */ |
16 | 53 | public static final String DOUBLE = "BINARY_DOUBLE"; |
| 54 | + /** |
| 55 | + * Oracle database type used to map BigDecimal |
| 56 | + */ |
17 | 57 | public static final String DECIMAL = "NUMBER"; |
| 58 | + /** |
| 59 | + * Oracle database type used to map offset date time |
| 60 | + */ |
18 | 61 | 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 | + */ |
20 | 69 | public static final String JSON = "JSON"; |
| 70 | + /** |
| 71 | + * Oracle database type used to map vectors (the parameter is the dimension of the vector) |
| 72 | + */ |
21 | 73 | public static final String VECTOR_FLOAT = "VECTOR(%s, FLOAT32)"; |
22 | 74 | } |
0 commit comments