Class BigDecimalValueHandler<T extends Number>
java.lang.Object
de.bytefish.pgbulkinsert.pgsql.handlers.BaseValueHandler<T>
de.bytefish.pgbulkinsert.pgsql.handlers.BigDecimalValueHandler<T>
- All Implemented Interfaces:
IValueHandler<T>,ValueHandler
The Algorithm for turning a BigDecimal into a Postgres Numeric is heavily inspired by the Intermine Implementation:
https://github.com/intermine/intermine/blob/master/intermine/objectstore/main/src/org/intermine/sql/writebatch/BatchWriterPostgresCopyImpl.java
please see struct definition of @{link NumericVar} for numeric data type byte structure at: https://github.com/postgres/postgres/blob/master/src/backend/utils/adt/numeric.c
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintprotected voidinternalHandle(DataOutputStream buffer, T value) Methods inherited from class de.bytefish.pgbulkinsert.pgsql.handlers.BaseValueHandler
handle
-
Constructor Details
-
BigDecimalValueHandler
public BigDecimalValueHandler()
-
-
Method Details
-
internalHandle
- Specified by:
internalHandlein classBaseValueHandler<T extends Number>- Throws:
Exception
-
getLength
-