public interface BlrCalculator
Modifier and Type | Method and Description |
---|---|
int |
calculateBatchMessageLength(RowDescriptor rowDescriptor)
Calculates the batch message length.
|
byte[] |
calculateBlr(RowDescriptor rowDescriptor)
Calculates the blr for the row descriptor.
|
byte[] |
calculateBlr(RowDescriptor rowDescriptor,
RowValue rowValue)
Calculates the blr for a specific row value.
|
int |
calculateIoLength(FieldDescriptor fieldDescriptor)
Calculates the io length for the field descriptor.
|
int |
calculateIoLength(FieldDescriptor fieldDescriptor,
byte[] fieldData)
Calculates the io length for the field descriptor and actual data.
|
byte[] calculateBlr(RowDescriptor rowDescriptor) throws java.sql.SQLException
rowDescriptor
- Row descriptorjava.sql.SQLException
- When the RowDescriptor
contains an unsupported field type.byte[] calculateBlr(RowDescriptor rowDescriptor, RowValue rowValue) throws java.sql.SQLException
This allows to optimize for the actual length of the field.
rowDescriptor
- Row descriptorrowValue
- Row valuejava.sql.SQLException
- When the RowValue
contains an unsupported field type.int calculateIoLength(FieldDescriptor fieldDescriptor) throws java.sql.SQLException
The return value indicates the length and padding of the type in the buffer
fieldDescriptor
- Field descriptorjava.sql.SQLException
int calculateIoLength(FieldDescriptor fieldDescriptor, byte[] fieldData) throws java.sql.SQLException
The return value indicates the length and padding of the type in the buffer
This allows to optimize for the actual length of the field.
For CHAR
(ISCConstants.SQL_TEXT
the implementation should be consistent
with the lengths as given by calculateIoLength(FieldDescriptor)
.
fieldDescriptor
- Field descriptorfieldData
- byte array (can be null
) with field data.java.sql.SQLException
int calculateBatchMessageLength(RowDescriptor rowDescriptor) throws java.sql.SQLException
rowDescriptor
- row descriptorjava.sql.SQLException
- when the RowDescriptor
contains an unsupported field type.Copyright © 2001-2024 Jaybird (Firebird JDBC) team. All rights reserved.