Java Code Examples for java.sql.JDBCType#BOOLEAN

The following examples show how to use java.sql.JDBCType#BOOLEAN . 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 vote down vote up
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 vote down vote up
@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 vote down vote up
@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 vote down vote up
@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 vote down vote up
@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 vote down vote up
@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 vote down vote up
@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 vote down vote up
@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 vote down vote up
@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 vote down vote up
@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}
    };
}