use of com.github.mgramin.sqlboot.sql.SqlQuery in project sql-boot by sql-boot.
the class JdbcSqlQueryTest method medataData.
@Test
public void medataData() throws Exception {
SqlQuery sqlQuery = new JdbcSqlQuery(dataSource, new GroovyTemplateGenerator("select name /* name */, email /* email */ from main_schema.users"));
final Map<String, String> metadata = sqlQuery.metaData();
System.out.println(metadata);
assertEquals("email", metadata.get("email"));
assertEquals("name", metadata.get("name"));
}
Aggregations