|
@@ -1,9 +1,13 @@
|
|
|
|
+/**
|
|
|
|
+ * DBSyncer Copyright 2020-2023 All Rights Reserved.
|
|
|
|
+ */
|
|
package org.dbsyncer.sdk.connector.schema;
|
|
package org.dbsyncer.sdk.connector.schema;
|
|
|
|
|
|
import org.dbsyncer.sdk.SdkException;
|
|
import org.dbsyncer.sdk.SdkException;
|
|
import org.dbsyncer.sdk.connector.AbstractValueMapper;
|
|
import org.dbsyncer.sdk.connector.AbstractValueMapper;
|
|
import org.dbsyncer.sdk.connector.ConnectorInstance;
|
|
import org.dbsyncer.sdk.connector.ConnectorInstance;
|
|
|
|
|
|
|
|
+import java.math.BigDecimal;
|
|
import java.sql.Date;
|
|
import java.sql.Date;
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -24,6 +28,10 @@ public class LongVarcharValueMapper extends AbstractValueMapper<String> {
|
|
if (val instanceof Integer) {
|
|
if (val instanceof Integer) {
|
|
return String.valueOf(val);
|
|
return String.valueOf(val);
|
|
}
|
|
}
|
|
|
|
+ if (val instanceof BigDecimal) {
|
|
|
|
+ BigDecimal bigDecimal = (BigDecimal) val;
|
|
|
|
+ return bigDecimal.toString();
|
|
|
|
+ }
|
|
throw new SdkException(String.format("%s can not find type [%s], val [%s]", getClass().getSimpleName(), val.getClass(), val));
|
|
throw new SdkException(String.format("%s can not find type [%s], val [%s]", getClass().getSimpleName(), val.getClass(), val));
|
|
}
|
|
}
|
|
}
|
|
}
|