-
Notifications
You must be signed in to change notification settings - Fork 426
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Binary and Varbinary types for framework #119
Conversation
@@ -251,16 +253,22 @@ String populateTableSql() { | |||
for (int colNum = 0; colNum < totalColumns; colNum++) { | |||
|
|||
// TODO: add betterway to enclose data | |||
if (JDBCType.CHAR == getColumn(colNum).getSqlType().getJdbctype() | |||
if (JDBCType.CHAR == getColumn(colNum).getSqlType().getJdbctype() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: Can we have one utility method to get JDBCType
public JDBCType getJDBCType(DBColumn column) {
return column.getSqlType().getJdbcType();
}
```
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ya, that sounds good.
|| JDBCType.VARCHAR == getColumn(colNum).getSqlType().getJdbctype() | ||
|| JDBCType.NCHAR == getColumn(colNum).getSqlType().getJdbctype() | ||
|| JDBCType.NVARCHAR == getColumn(colNum).getSqlType().getJdbctype() | ||
|| JDBCType.TIMESTAMP == getColumn(colNum).getSqlType().getJdbctype() | ||
|| JDBCType.DATE == getColumn(colNum).getSqlType().getJdbctype() | ||
|| JDBCType.TIME == getColumn(colNum).getSqlType().getJdbctype()) | ||
|| JDBCType.TIME == getColumn(colNum).getSqlType().getJdbctype()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SUGGESTION: In order to reduce complexity it is better to create new method having all conditions and call that method in your if condition.
If method is reusable then you can move this method to Util class. Otherwise create this helper method in same class.
|
||
import java.sql.JDBCType; | ||
import java.util.concurrent.ThreadLocalRandom; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add appropriate java docs?
Support for binary and varbinary type.
The new files have same header as the rest of test framework, we can apply the changes throughout the source once header format is finalized.