@Test public void testCreateArrayOf() throws Exception {
try (Connection conn = DriverManager.getConnection(url)) {
final String componentName = SqlType.INTEGER.name();
Array a1 = conn.createArrayOf(componentName, new Object[] {1, 2, 3, 4, 5});
Array a2 = conn.createArrayOf(componentName, new Object[] {2, 3, 4, 5, 6});
Array a3 = conn.createArrayOf(componentName, new Object[] {3, 4, 5, 6, 7});
AvaticaType arrayType = ColumnMetaData.array(
ColumnMetaData.scalar(Types.INTEGER, componentName, Rep.INTEGER), "NUMBERS", Rep.ARRAY);
writeAndReadArrays(conn, "CREATE_ARRAY_OF_INTEGERS", componentName, arrayType,
Arrays.asList(a1, a2, a3), PRIMITIVE_LIST_VALIDATOR);
}
}
ArrayTypeTest.java 文件源码
java
阅读 29
收藏 0
点赞 0
评论 0
项目:calcite-avatica
作者:
评论列表
文章目录