@Test public void removeCommentTest() { String sql = null; String removeComment = instance.removeComment(sql); Assert.assertNull(removeComment); sql = " "; removeComment = instance.removeComment(sql); Assert.assertEquals(removeComment, ""); sql = "toto"; removeComment = instance.removeComment(sql); Assert.assertEquals(removeComment, "toto"); sql = "select Price from products;"; removeComment = instance.removeComment(sql); Assert.assertEquals(removeComment, "select Price from products;"); sql = " select Price from products;"; removeComment = instance.removeComment(sql); Assert.assertEquals(removeComment, "select Price from products;"); sql = " select Price from products; "; removeComment = instance.removeComment(sql); Assert.assertEquals(removeComment, "select Price from products;"); }
public String removeComment(String sql) { sql = StringUtils.removePart(sql, ""); if (sql != null) { sql = sql.trim(); } return sql; }
GenericRdbmsSpecifics implements RdbmsSpecifics { public String removeComment(String sql) { sql = StringUtils.removePart(sql, ""); if (sql != null) { sql = sql.trim(); } return sql; } }
GenericRdbmsSpecifics implements RdbmsSpecifics { public String removeComment(String sql) { sql = StringUtils.removePart(sql, ""); if (sql != null) { sql = sql.trim(); } return sql; } private  GenericRdbmsSpecifics(); }
GenericRdbmsSpecifics implements RdbmsSpecifics { public String removeComment(String sql) { sql = StringUtils.removePart(sql, ""); if (sql != null) { sql = sql.trim(); } return sql; } private  GenericRdbmsSpecifics(); static RdbmsSpecifics getInstance(); boolean isRdbms(final String classType); DataRdbms getData(final Object object); String getTypeQuery(String sql); int beginQuery(String sql, int index); String removeComment(String sql); boolean isCaseSensitive(); String toString(); }
GenericRdbmsSpecifics implements RdbmsSpecifics { public String removeComment(String sql) { sql = StringUtils.removePart(sql, ""); if (sql != null) { sql = sql.trim(); } return sql; } private  GenericRdbmsSpecifics(); static RdbmsSpecifics getInstance(); boolean isRdbms(final String classType); DataRdbms getData(final Object object); String getTypeQuery(String sql); int beginQuery(String sql, int index); String removeComment(String sql); boolean isCaseSensitive(); String toString();  }