use of com.github.mgramin.sqlboot.model.uri.wrappers.SqlPlaceholdersWrapper in project sql-boot by sql-boot.
the class ColumnJdbcResourceTypeTest method read.
@Test
public void read() {
final ResourceType table = new ColumnJdbcResourceType(dataSource);
final Stream<DbResource> tables = table.read(new SqlPlaceholdersWrapper(new DbUri("table", asList("MAIN_SCHEMA", "CITY"))));
tables.forEach(v -> System.out.println(v.name()));
}
use of com.github.mgramin.sqlboot.model.uri.wrappers.SqlPlaceholdersWrapper in project sql-boot by sql-boot.
the class IndexJdbcResourceTypeTest method read.
@Test
public void read() {
final ResourceType index = new IndexJdbcResourceType(dataSource);
final Stream<DbResource> indexes = index.read(new SqlPlaceholdersWrapper(new DbUri("index", asList("*"))));
assertEquals(5, indexes.count());
}
use of com.github.mgramin.sqlboot.model.uri.wrappers.SqlPlaceholdersWrapper in project sql-boot by sql-boot.
the class PkJdbcResourceTypeTest method read.
@Test
public void read() {
final ResourceType pk = new PkJdbcResourceType(dataSource);
final Stream<DbResource> primaryKeys = pk.read(new SqlPlaceholdersWrapper(new DbUri("pk", asList("*"))));
assertEquals(2, primaryKeys.count());
}
use of com.github.mgramin.sqlboot.model.uri.wrappers.SqlPlaceholdersWrapper in project sql-boot by sql-boot.
the class ParentTableJdbcResourceTypeTest method read.
@Test
public void read() {
final ResourceType pk = new ParentTableJdbcResourceType(dataSource);
final Stream<DbResource> primaryKeys = pk.read(new SqlPlaceholdersWrapper(new DbUri("parent_table", asList("*"))));
assertEquals(1, primaryKeys.count());
}
use of com.github.mgramin.sqlboot.model.uri.wrappers.SqlPlaceholdersWrapper in project sql-boot by sql-boot.
the class ViewJdbcResourceTypeTest method read.
@Test
public void read() {
final ResourceType view = new ViewJdbcResourceType(dataSource);
final Stream<DbResource> views = view.read(new SqlPlaceholdersWrapper(new DbUri("view", asList("*"))));
assertEquals(2, views.count());
}
Aggregations