Skip to content

Commit

Permalink
0001922: Incorrect conversion of values of type BIT in SQL Server 200…
Browse files Browse the repository at this point in the history
…5 to SQLite
  • Loading branch information
chenson42 committed Aug 21, 2014
1 parent a57adfc commit 0af0d31
Showing 1 changed file with 5 additions and 3 deletions.
Expand Up @@ -478,10 +478,12 @@ public String[] getStringValues(BinaryEncoding encoding, Column[] metaData, Row
int type = column.getJdbcTypeCode();

if (row.get(name) != null) {
if (column.isOfNumericType()) {
if (type == Types.BOOLEAN || type == Types.BIT) {
values[i] = row.getBoolean(name) ? "1" : "0";
} else if (column.isOfNumericType()) {
values[i] = row.getString(name);
} else if (!column.isTimestampWithTimezone() &&
(type == Types.DATE || type == Types.TIMESTAMP || type == Types.TIME)) {
} else if (!column.isTimestampWithTimezone()
&& (type == Types.DATE || type == Types.TIMESTAMP || type == Types.TIME)) {
values[i] = getDateTimeStringValue(name, type, row, useVariableDates);
} else if (column.isOfBinaryType()) {
byte[] bytes = row.getBytes(name);
Expand Down

0 comments on commit 0af0d31

Please sign in to comment.