Java Code Examples for java.sql.JDBCType#VARBINARY
The following examples show how to use
java.sql.JDBCType#VARBINARY .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ColumnIndexStatsUtils.java From presto with Apache License 2.0 | 6 votes |
public static JDBCType jdbcType(Type type) { if (type.equals(BOOLEAN)) { return JDBCType.BOOLEAN; } if (type.equals(BIGINT) || type.equals(TIMESTAMP)) { return JDBCType.BIGINT; } if (type.equals(INTEGER)) { return JDBCType.INTEGER; } if (type.equals(DOUBLE)) { return JDBCType.DOUBLE; } if (type.equals(DATE)) { return JDBCType.INTEGER; } if (type instanceof VarcharType) { return JDBCType.VARBINARY; } return null; }
Example 2
Source File: CommonCachedRowSetTests.java From dragonwell8_jdk with GNU General Public License v2.0 | 6 votes |
@DataProvider(name = "rowsetUsingDataTypes") protected Object[][] rowsetUsingDataTypes() throws Exception { CachedRowSet rs = createDataTypesRowSet(); return new Object[][]{ {rs, JDBCType.INTEGER}, {rs, JDBCType.CHAR}, {rs, JDBCType.VARCHAR}, {rs, JDBCType.BIGINT}, {rs, JDBCType.BOOLEAN}, {rs, JDBCType.SMALLINT}, {rs, JDBCType.DOUBLE}, {rs, JDBCType.DECIMAL}, {rs, JDBCType.REAL}, {rs, JDBCType.TINYINT}, {rs, JDBCType.DATE}, {rs, JDBCType.TIME}, {rs, JDBCType.TIMESTAMP}, {rs, JDBCType.VARBINARY}, {rs, JDBCType.ARRAY}, {rs, JDBCType.REF}, {rs, JDBCType.FLOAT} }; }
Example 3
Source File: CommonCachedRowSetTests.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
@DataProvider(name = "rowsetUsingDataTypes") protected Object[][] rowsetUsingDataTypes() throws Exception { CachedRowSet rs = createDataTypesRowSet(); return new Object[][]{ {rs, JDBCType.INTEGER}, {rs, JDBCType.CHAR}, {rs, JDBCType.VARCHAR}, {rs, JDBCType.BIGINT}, {rs, JDBCType.BOOLEAN}, {rs, JDBCType.SMALLINT}, {rs, JDBCType.DOUBLE}, {rs, JDBCType.DECIMAL}, {rs, JDBCType.REAL}, {rs, JDBCType.TINYINT}, {rs, JDBCType.DATE}, {rs, JDBCType.TIME}, {rs, JDBCType.TIMESTAMP}, {rs, JDBCType.VARBINARY}, {rs, JDBCType.ARRAY}, {rs, JDBCType.REF}, {rs, JDBCType.FLOAT} }; }
Example 4
Source File: CommonCachedRowSetTests.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
@DataProvider(name = "rowsetUsingDataTypes") protected Object[][] rowsetUsingDataTypes() throws Exception { CachedRowSet rs = createDataTypesRowSet(); return new Object[][]{ {rs, JDBCType.INTEGER}, {rs, JDBCType.CHAR}, {rs, JDBCType.VARCHAR}, {rs, JDBCType.BIGINT}, {rs, JDBCType.BOOLEAN}, {rs, JDBCType.SMALLINT}, {rs, JDBCType.DOUBLE}, {rs, JDBCType.DECIMAL}, {rs, JDBCType.REAL}, {rs, JDBCType.TINYINT}, {rs, JDBCType.DATE}, {rs, JDBCType.TIME}, {rs, JDBCType.TIMESTAMP}, {rs, JDBCType.VARBINARY}, {rs, JDBCType.ARRAY}, {rs, JDBCType.REF}, {rs, JDBCType.FLOAT} }; }
Example 5
Source File: CommonCachedRowSetTests.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
@DataProvider(name = "rowsetUsingDataTypes") protected Object[][] rowsetUsingDataTypes() throws Exception { CachedRowSet rs = createDataTypesRowSet(); return new Object[][]{ {rs, JDBCType.INTEGER}, {rs, JDBCType.CHAR}, {rs, JDBCType.VARCHAR}, {rs, JDBCType.BIGINT}, {rs, JDBCType.BOOLEAN}, {rs, JDBCType.SMALLINT}, {rs, JDBCType.DOUBLE}, {rs, JDBCType.DECIMAL}, {rs, JDBCType.REAL}, {rs, JDBCType.TINYINT}, {rs, JDBCType.DATE}, {rs, JDBCType.TIME}, {rs, JDBCType.TIMESTAMP}, {rs, JDBCType.VARBINARY}, {rs, JDBCType.ARRAY}, {rs, JDBCType.REF}, {rs, JDBCType.FLOAT} }; }
Example 6
Source File: CommonCachedRowSetTests.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
@DataProvider(name = "rowsetUsingDataTypes") protected Object[][] rowsetUsingDataTypes() throws Exception { CachedRowSet rs = createDataTypesRowSet(); return new Object[][]{ {rs, JDBCType.INTEGER}, {rs, JDBCType.CHAR}, {rs, JDBCType.VARCHAR}, {rs, JDBCType.BIGINT}, {rs, JDBCType.BOOLEAN}, {rs, JDBCType.SMALLINT}, {rs, JDBCType.DOUBLE}, {rs, JDBCType.DECIMAL}, {rs, JDBCType.REAL}, {rs, JDBCType.TINYINT}, {rs, JDBCType.DATE}, {rs, JDBCType.TIME}, {rs, JDBCType.TIMESTAMP}, {rs, JDBCType.VARBINARY}, {rs, JDBCType.ARRAY}, {rs, JDBCType.REF}, {rs, JDBCType.FLOAT} }; }
Example 7
Source File: CommonCachedRowSetTests.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
@DataProvider(name = "rowsetUsingDataTypes") protected Object[][] rowsetUsingDataTypes() throws Exception { CachedRowSet rs = createDataTypesRowSet(); return new Object[][]{ {rs, JDBCType.INTEGER}, {rs, JDBCType.CHAR}, {rs, JDBCType.VARCHAR}, {rs, JDBCType.BIGINT}, {rs, JDBCType.BOOLEAN}, {rs, JDBCType.SMALLINT}, {rs, JDBCType.DOUBLE}, {rs, JDBCType.DECIMAL}, {rs, JDBCType.REAL}, {rs, JDBCType.TINYINT}, {rs, JDBCType.DATE}, {rs, JDBCType.TIME}, {rs, JDBCType.TIMESTAMP}, {rs, JDBCType.VARBINARY}, {rs, JDBCType.ARRAY}, {rs, JDBCType.REF}, {rs, JDBCType.FLOAT} }; }
Example 8
Source File: CommonCachedRowSetTests.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
@DataProvider(name = "rowsetUsingDataTypes") protected Object[][] rowsetUsingDataTypes() throws Exception { CachedRowSet rs = createDataTypesRowSet(); return new Object[][]{ {rs, JDBCType.INTEGER}, {rs, JDBCType.CHAR}, {rs, JDBCType.VARCHAR}, {rs, JDBCType.BIGINT}, {rs, JDBCType.BOOLEAN}, {rs, JDBCType.SMALLINT}, {rs, JDBCType.DOUBLE}, {rs, JDBCType.DECIMAL}, {rs, JDBCType.REAL}, {rs, JDBCType.TINYINT}, {rs, JDBCType.DATE}, {rs, JDBCType.TIME}, {rs, JDBCType.TIMESTAMP}, {rs, JDBCType.VARBINARY}, {rs, JDBCType.ARRAY}, {rs, JDBCType.REF}, {rs, JDBCType.FLOAT} }; }
Example 9
Source File: CommonCachedRowSetTests.java From hottub with GNU General Public License v2.0 | 6 votes |
@DataProvider(name = "rowsetUsingDataTypes") protected Object[][] rowsetUsingDataTypes() throws Exception { CachedRowSet rs = createDataTypesRowSet(); return new Object[][]{ {rs, JDBCType.INTEGER}, {rs, JDBCType.CHAR}, {rs, JDBCType.VARCHAR}, {rs, JDBCType.BIGINT}, {rs, JDBCType.BOOLEAN}, {rs, JDBCType.SMALLINT}, {rs, JDBCType.DOUBLE}, {rs, JDBCType.DECIMAL}, {rs, JDBCType.REAL}, {rs, JDBCType.TINYINT}, {rs, JDBCType.DATE}, {rs, JDBCType.TIME}, {rs, JDBCType.TIMESTAMP}, {rs, JDBCType.VARBINARY}, {rs, JDBCType.ARRAY}, {rs, JDBCType.REF}, {rs, JDBCType.FLOAT} }; }
Example 10
Source File: CommonCachedRowSetTests.java From jdk8u_jdk with GNU General Public License v2.0 | 6 votes |
@DataProvider(name = "rowsetUsingDataTypes") protected Object[][] rowsetUsingDataTypes() throws Exception { CachedRowSet rs = createDataTypesRowSet(); return new Object[][]{ {rs, JDBCType.INTEGER}, {rs, JDBCType.CHAR}, {rs, JDBCType.VARCHAR}, {rs, JDBCType.BIGINT}, {rs, JDBCType.BOOLEAN}, {rs, JDBCType.SMALLINT}, {rs, JDBCType.DOUBLE}, {rs, JDBCType.DECIMAL}, {rs, JDBCType.REAL}, {rs, JDBCType.TINYINT}, {rs, JDBCType.DATE}, {rs, JDBCType.TIME}, {rs, JDBCType.TIMESTAMP}, {rs, JDBCType.VARBINARY}, {rs, JDBCType.ARRAY}, {rs, JDBCType.REF}, {rs, JDBCType.FLOAT} }; }
Example 11
Source File: ColumnTest.java From das with Apache License 2.0 | 5 votes |
@Test public void testCreateTypeAlias( ) { Table table = new Table("t"); Column c = new Column(table, "col", JDBCType.VARBINARY); assertEquals("col", c.getColumnName()); assertFalse(c.getAlias().isPresent()); c.as("c"); assertTrue(c.getAlias().isPresent()); assertEquals(JDBCType.VARBINARY, c.getType()); assertEquals("t.col AS c", c.build(new DefaultBuilderContext())); }
Example 12
Source File: ColumnTest.java From das with Apache License 2.0 | 5 votes |
@Test public void testReferenceName( ) { Table table = new Table("t"); Column c = new Column(table, "col", JDBCType.VARBINARY); c.as("c"); assertEquals("t.col", c.getReference(new DefaultBuilderContext())); }