use of com.github.mgramin.sqlboot.model.uri.impl.DbUri in project sql-boot by sql-boot.
the class DbUriTest method testAction.
@Test
public void testAction() {
DbUri dbUri = new DbUri("table/hr.p*/count?limit=10");
System.out.println(dbUri.action());
}
use of com.github.mgramin.sqlboot.model.uri.impl.DbUri in project sql-boot by sql-boot.
the class SelectWrapperTest method read.
@Test
public void read() throws Exception {
final List<DbResource> resources = type.read(new DbUri("table/hr.persons?select=schema")).collect(Collectors.toList());
for (DbResource resource : resources) {
assertEquals(1, resource.headers().size());
}
assertEquals(3, resources.size());
}
use of com.github.mgramin.sqlboot.model.uri.impl.DbUri in project sql-boot by sql-boot.
the class LimitWrapperTest method read.
@Test
public void read() throws Exception {
assertEquals(3, type.read(new DbUri("table/hr.persons")).count());
assertEquals(3, type.read(new DbUri("table/hr.persons?limit=3")).count());
assertEquals(2, type.read(new DbUri("table/hr.persons?limit=2")).count());
assertEquals(1, type.read(new DbUri("table/hr.persons?limit=1")).count());
}
Aggregations