本文整理了Java中org.skife.jdbi.v2.Query.setMaxFieldSize
方法的一些代码示例,展示了Query.setMaxFieldSize
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.setMaxFieldSize
方法的具体详情如下:
包路径:org.skife.jdbi.v2.Query
类名称:Query
方法名:setMaxFieldSize
[英]Specify the maimum field size in the result set. This uses the underlying JDBC Statement#setMaxFieldSize(int)
[中]指定结果集中的最大字段大小。它使用底层JDBC语句#setMaxFieldSize(int)
代码示例来源:origin: org.jdbi/jdbi
@Test
public void testFoo() throws Exception
{
DBI dbi = new DBI("jdbc:h2:mem:" + UUID.randomUUID());
Handle h = dbi.open();
h.execute("create table something (id int primary key, name varchar(32))");
h.attach(BatchInserter.class).insert(new Something(1, "Brian"),
new Something(3, "Patrick"),
new Something(2, "Robert"));
QueryReturningQuery qrq = h.attach(QueryReturningQuery.class);
Query<String> q = qrq.findById(1);
q.setMaxFieldSize(100);
assertThat(q.first(), equalTo("Brian"));
h.close();
}
代码示例来源:origin: org.kill-bill.commons/killbill-jdbi
@Test
public void testFoo() throws Exception
{
DBI dbi = new DBI("jdbc:h2:mem:" + UUID.randomUUID());
Handle h = dbi.open();
h.execute("create table something (id int primary key, name varchar(32))");
h.attach(BatchInserter.class).insert(new Something(1, "Brian"),
new Something(3, "Patrick"),
new Something(2, "Robert"));
QueryReturningQuery qrq = h.attach(QueryReturningQuery.class);
Query<String> q = qrq.findById(1);
q.setMaxFieldSize(100);
assertThat(q.first(), equalTo("Brian"));
h.close();
}
内容来源于网络,如有侵权,请联系作者删除!