Skip to content

Commit

Permalink
add DSE Types support
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeremya committed Nov 7, 2023
1 parent b3d4c45 commit 1397781
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/java/com/datastax/cdm/data/CqlData.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.datastax.cdm.data;

import com.datastax.dse.driver.api.core.type.DseDataTypes;
import com.datastax.oss.driver.api.core.data.UdtValue;
import com.datastax.oss.driver.api.core.type.*;

Expand Down Expand Up @@ -38,6 +39,9 @@ public enum Type {
primitiveDataTypeToJavaClassMap.put(DataTypes.TIMEUUID, java.util.UUID.class);
primitiveDataTypeToJavaClassMap.put(DataTypes.COUNTER, Long.class);
primitiveDataTypeToJavaClassMap.put(DataTypes.DURATION, com.datastax.oss.driver.api.core.data.CqlDuration.class);
primitiveDataTypeToJavaClassMap.put(DseDataTypes.POLYGON, com.datastax.dse.driver.api.core.data.geometry.Polygon.class);
primitiveDataTypeToJavaClassMap.put(DseDataTypes.POINT, com.datastax.dse.driver.api.core.data.geometry.Point.class);
primitiveDataTypeToJavaClassMap.put(DseDataTypes.LINE_STRING, com.datastax.dse.driver.api.core.data.geometry.LineString.class);
}

public static Type toType(DataType dataType) {
Expand Down

0 comments on commit 1397781

Please sign in to comment.