Skip to content
Snippets Groups Projects
Commit bf5dbd15 authored by Rezapu Obed's avatar Rezapu Obed
Browse files

feat(db): add bind to status

parent 7997e414
Branches
Tags
1 merge request!2merge develop
......@@ -3,6 +3,8 @@ package database;
import java.sql.*;
import java.util.Date;
import enums.Status;
public class Database {
private String host = System.getenv("DB_HOST");
private String port = System.getenv("DB_PORT");
......@@ -67,6 +69,9 @@ public class Database {
}
else if(value instanceof Boolean){
this.psmt.setBoolean(index, (Boolean) value);
}else if(value instanceof Status){
Status val = (Status) value;
this.psmt.setString(index, "'"+val.getStatusCode().toUpperCase()+"'");
}
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment