Package org.apache.jena.jdbc.results.metadata.columns

Examples of org.apache.jena.jdbc.results.metadata.columns.ColumnInfo


     * Expect xsd:unsignedInteger to be typed as integers
     * @throws SQLException
     */
    @Test
    public void test_column_type_detection_integer_04() throws SQLException {
        ColumnInfo info = testColumnTypeDetection("x", NodeFactory.createLiteral("1234", XSDDatatype.XSDunsignedInt), true, Types.BIGINT, Long.class.getCanonicalName());
        Assert.assertEquals(0, info.getScale());
        Assert.assertFalse(info.isSigned());
    }
View Full Code Here


     * Expect xsd:unsignedLong to be typed as integers
     * @throws SQLException
     */
    @Test
    public void test_column_type_detection_integer_05() throws SQLException {
        ColumnInfo info = testColumnTypeDetection("x", NodeFactory.createLiteral("1234", XSDDatatype.XSDunsignedLong), true, Types.BIGINT, Long.class.getCanonicalName());
        Assert.assertEquals(0, info.getScale());
        Assert.assertFalse(info.isSigned());
    }
View Full Code Here

     * Expect xsd:short to be typed as integers
     * @throws SQLException
     */
    @Test
    public void test_column_type_detection_integer_06() throws SQLException {
        ColumnInfo info = testColumnTypeDetection("x", NodeFactory.createLiteral("1234", XSDDatatype.XSDshort), true, Types.INTEGER, Integer.class.getCanonicalName());
        Assert.assertEquals(0, info.getScale());
        Assert.assertTrue(info.isSigned());
    }
View Full Code Here

     * Expect xsd:unsignedShort to be typed as integers
     * @throws SQLException
     */
    @Test
    public void test_column_type_detection_integer_07() throws SQLException {
        ColumnInfo info = testColumnTypeDetection("x", NodeFactory.createLiteral("1234", XSDDatatype.XSDunsignedShort), true, Types.INTEGER, Integer.class.getCanonicalName());
        Assert.assertEquals(0, info.getScale());
        Assert.assertFalse(info.isSigned());
    }
View Full Code Here

     * Expect xsd:byte to be typed as bytes
     * @throws SQLException
     */
    @Test
    public void test_column_type_detection_byte_01() throws SQLException {
        ColumnInfo info = testColumnTypeDetection("x", NodeFactory.createLiteral("123", XSDDatatype.XSDbyte), true, Types.TINYINT, Byte.class.getCanonicalName());
        Assert.assertEquals(0, info.getScale());
        Assert.assertTrue(info.isSigned());
    }
View Full Code Here

     * Expect xsd:unsignedByte to be typed as bytes
     * @throws SQLException
     */
    @Test
    public void test_column_type_detection_byte_02() throws SQLException {
        ColumnInfo info = testColumnTypeDetection("x", NodeFactory.createLiteral("123", XSDDatatype.XSDunsignedByte), true, Types.TINYINT, Byte.class.getCanonicalName());
        Assert.assertEquals(0, info.getScale());
        Assert.assertFalse(info.isSigned());
    }
View Full Code Here

     * Expect xsd:decimal to be typed as decimal
     * @throws SQLException
     */
    @Test
    public void test_column_type_detection_decimal() throws SQLException {
        ColumnInfo info = testColumnTypeDetection("x", NodeFactory.createLiteral("123.4", XSDDatatype.XSDdecimal), true, Types.DECIMAL, BigDecimal.class.getCanonicalName());
        Assert.assertEquals(16, info.getScale());
        Assert.assertEquals(16, info.getPrecision());
        Assert.assertTrue(info.isSigned());
    }
View Full Code Here

     * Expect xsd:double to be typed as double
     * @throws SQLException
     */
    @Test
    public void test_column_type_detection_double() throws SQLException {
        ColumnInfo info = testColumnTypeDetection("x", NodeFactory.createLiteral("12.3e4", XSDDatatype.XSDdouble), true, Types.DOUBLE, Double.class.getCanonicalName());
        Assert.assertEquals(16, info.getScale());
        Assert.assertEquals(16, info.getPrecision());
        Assert.assertTrue(info.isSigned());
    }
View Full Code Here

TOP

Related Classes of org.apache.jena.jdbc.results.metadata.columns.ColumnInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.