Package net.sourceforge.jtds.jdbc

Examples of net.sourceforge.jtds.jdbc.TypeInfo


    public TypeInfoTest(String testName) {
        super(testName);
    }

    public void testCharTypes() {
        TypeInfo charType = new TypeInfo("char", Types.CHAR, false);
        // Following types are normalized to char
        TypeInfo nchar = new TypeInfo("nchar", -8, false);
        TypeInfo uniqueid = new TypeInfo("uniqueidentifier", -11, false);

        assertComparesLessThan(charType, nchar);
        assertComparesLessThan(nchar, uniqueid);
    }
View Full Code Here


        assertComparesLessThan(charType, nchar);
        assertComparesLessThan(nchar, uniqueid);
    }

    public void testVarcharTypes() {
        TypeInfo varchar = new TypeInfo("varchar", Types.VARCHAR, false);
        // Following types are normalized to varchar
        TypeInfo nvarchar = new TypeInfo("nvarchar", -9, false);
        TypeInfo sysname = new TypeInfo("sysname", -9, false);
        TypeInfo variant = new TypeInfo("sql_variant", -150, false);

        assertComparesLessThan(varchar, nvarchar);
        assertComparesLessThan(nvarchar, sysname);
        assertComparesLessThan(sysname, variant);
    }
View Full Code Here

        assertComparesLessThan(nvarchar, sysname);
        assertComparesLessThan(sysname, variant);
    }

    public void testCompareToDifferentDataType() {
        TypeInfo decimal = new TypeInfo("decimal", Types.DECIMAL /* 3 */, false);
        TypeInfo integer = new TypeInfo("integer", Types.INTEGER /* 4 */, false);

        assertComparesLessThan(decimal, integer);
    }
View Full Code Here

        assertComparesLessThan(decimal, integer);
    }

    public void testCompareToIdentity() {
        TypeInfo bigint = new TypeInfo("bigint", Types.BIGINT, false);
        TypeInfo bigintIdentity = new TypeInfo("bigint identity", Types.BIGINT, true);

        assertComparesLessThan(bigint, bigintIdentity);
    }
View Full Code Here

TOP

Related Classes of net.sourceforge.jtds.jdbc.TypeInfo

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.