-
Notifications
You must be signed in to change notification settings - Fork 0
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
add type DATE #98
base: master
Are you sure you want to change the base?
add type DATE #98
Conversation
src/earlgrey/core/ModelCore.java
Outdated
@@ -217,6 +218,9 @@ else if(campo.getType().equals(String.class)){ | |||
else if(campo.getType().equals(Timestamp.class)){ | |||
campo.set(m, set.getString(llave)); | |||
} | |||
else if(campo.getType().equals(DATE.class)){ |
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.
Correct Sintax
if (Condition) {
// Code
} else if (Condition) {
// Code
} else {
// Code
}
this.pstm.setDATE(this.prepared_fields++, (DATE)prepare_fields.get(campo)); | ||
} catch (SQLException e) { | ||
// TODO Auto-generated catch block | ||
e.printStackTrace(); |
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.
Evitar el uso de print stacktrace y codigo try autogenerados
Gestionar el error de mejor forma.
else if(campo.getType().equals(DATE.class)){ | ||
try { | ||
this.pstm.setDATE(this.prepared_fields++, (DATE)prepare_fields.get(campo)); | ||
} catch (SQLException e) { |
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.
Mismo caso, en este caso seria bueno informar al logger de earlgrey que ocurrio
Se añade tipo DATE