Skip to content

Commit

Permalink
Merge pull request #13 from sranka/feat/datetimeoffset
Browse files Browse the repository at this point in the history
feat: support MSSQL DATETIMEOFFSET type
  • Loading branch information
sranka authored Oct 6, 2021
2 parents be81d08 + 2da5f99 commit 181ee1c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ public void accept(RowData t) {
break;
case Types.CHAR:
case Types.VARCHAR:
case Mssql.Types.DATETIMEOFFSET:
stmt.setString(pos, (String)value);
break;
case Types.NCHAR:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ public boolean fillData(RowData row) {
case Types.NCHAR:
case Types.VARCHAR:
case Types.NVARCHAR:
case Mssql.Types.DATETIMEOFFSET:
val = kryo.readObjectOrNull(in, String.class);
break;
case Types.DATE:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ public void accept(ResultSet rs) {
break;
case Types.CHAR:
case Types.VARCHAR:
case Mssql.Types.DATETIMEOFFSET:
val = rs.getString(i + 1);
clazz = String.class;
break;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/pz/tool/jdbcimage/main/Mssql.java
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ public TableInfo getTableInfo(String tableName) {
}

public static class Types {

public static final int SQL_VARIANT = -156;
public static final int DATETIMEOFFSET = -155;

private Types() { }
}
Expand Down

0 comments on commit 181ee1c

Please sign in to comment.