Skip to content

Commit

Permalink
Add BIT data type support by treating its insertion as a binary type …
Browse files Browse the repository at this point in the history
…(as defined by the JDBC connector). Otherwise fixes all bit fields being flipped to true
  • Loading branch information
Jacob Rowe-Lane committed Nov 18, 2022
1 parent b5d9049 commit 76843fe
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/org/replicadb/manager/MySQLManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ private String getLoadDataSql (String tableName, String allColumns, ResultSetMet
String[] columns = allColumns.split(",");
for (int i = 0; i < columns.length; i++) {
switch (rsmd.getColumnType(i + 1)) {
case Types.BIT:
case Types.BINARY:
case Types.BLOB:
case Types.VARBINARY:
Expand All @@ -204,6 +205,7 @@ private String getLoadDataSql (String tableName, String allColumns, ResultSetMet
String setPrefix = " SET ";
for (int i = 0; i < columns.length; i++) {
switch (rsmd.getColumnType(i + 1)) {
case Types.BIT:
case Types.BINARY:
case Types.BLOB:
case Types.VARBINARY:
Expand Down

0 comments on commit 76843fe

Please sign in to comment.