Package org.gdbms.engine.data.driver

Examples of org.gdbms.engine.data.driver.DBDriver


    }
   
    public void testDriverTypes() throws Exception {
        DriverManager dm = ds.getDriverManager();
        FileDriver fd = (FileDriver) dm.getDriver("csv string");
        DBDriver dd = (DBDriver) dm.getDriver("GDBMS HSQLDB driver");
       
        String[] types = fd.getAvailableTypes();
        String[] params = fd.getParameters(types[0]);
        assertTrue(types.length == 1);
        assertTrue(types[0].equals("STRING"));
        assertTrue(params.length == 0);
       
        types = dd.getAvailableTypes();
        params = dd.getParameters("CHAR");
        assertTrue(types.length > 0);
        for (int i = 0; i < types.length; i++) {
            if (types[i].equals("CHAR")) {
                params = dd.getParameters(types[i]);
                assertTrue(params[0].equals("LENGTH"));
                assertTrue(params.length == 1);
            } else if (types[i].equals("DECIMAL")) {
                params = dd.getParameters(types[i]);
                assertTrue(params[0].equals("PRECISION"));
                assertTrue(params[1].equals("SCALE"));
                assertTrue(params.length == 2);
            }
        }
View Full Code Here

TOP

Related Classes of org.gdbms.engine.data.driver.DBDriver

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.