Package org.gdbms.engine.data.metadata

Examples of org.gdbms.engine.data.metadata.DefaultDriverMetadata


    /**
     * @see org.gdbms.engine.data.driver.GDBMSDriver#getDriverMetadata()
     */
    public DriverMetadata getDriverMetadata() throws DriverException {
        DefaultDriverMetadata ret = new DefaultDriverMetadata();
        for (int i = 0; i < getFieldCount(); i++) {
            int type = getFieldType(i);
            ret.addField(getFieldName(i), PTTypes.typesDescription.get(type));           
        }
       
        return ret;
    }
View Full Code Here


    /**
     * @see org.gdbms.engine.data.driver.GDBMSDriver#getDriverMetadata()
     */
    public DriverMetadata getDriverMetadata() throws DriverException {
        DefaultDriverMetadata ret = new DefaultDriverMetadata();
        for (int i = 0; i < getFieldCount(); i++) {
            ret.addField(getFieldName(i), "STRING");
        }

        return ret;
    }
View Full Code Here

    /**
     * @see org.gdbms.engine.data.driver.GDBMSDriver#getDriverMetadata()
     */
    public DriverMetadata getDriverMetadata() throws DriverException {
        DefaultDriverMetadata ret = new DefaultDriverMetadata();
        for (int i = 0; i < getFieldCount(); i++) {
            int type = getFieldType(i);
            ret.addField(getFieldName(i), PTTypes.typesDescription.get(type));           
        }
       
        return ret;
    }
View Full Code Here

   
    public void testFileCreation() throws Exception {

        String path = "src/test/resources/persona.csv";
        new File(path).delete();
        DefaultDriverMetadata ddm = new DefaultDriverMetadata();
        ddm.addField("id", "STRING");
        ddm.addField("nombre", "STRING");
        ds.createDataSource(new FileSourceCreation(new File(path),
                ddm));
        ds.registerDataSource("persona_created", new FileSourceDefinition(path));
       
        Value v1 = ValueFactory.createValue("Fernando");
View Full Code Here

        assertTrue(d.getDriverMetadata().getFieldParam(fc, "LENGTH").equals("5"));
        d.stop();
    }
   
    public void testCheckInput() throws Exception {
        DefaultDriverMetadata ddm = new DefaultDriverMetadata();
        ddm.addField("texto", "VARCHAR", new String[]{"LENGTH"}, new String[]{"5"});
        ddm.addField("entero", "TINYINT");
        ddm.addField("decimal", "DECIMAL", new String[]{"SCALE", "PRECISION"}, new String[]{"2", "5"});
        ddm.addField("decimal2", "DECIMAL");
        ddm.addField("texto2", "CHAR");
        ddm.setPrimaryKey(new String[]{"entero"});
        DBSource dbsd = new DBSource(null, 0, "src/test/resources/testdb", "sa", "",
        "nuevo", "jdbc:hsqldb:file");
        ds.createDataSource(new DBSourceCreation(dbsd, ddm));
        ds.registerDataSource("nuevoDataSource", new DBTableSourceDefinition(dbsd));
        DataSource d = ds.getDataSource("nuevoDataSource");
View Full Code Here

    /**
     * @see org.gdbms.engine.data.driver.GDBMSDriver#getDriverMetadata()
     */
    public DriverMetadata getDriverMetadata() throws DriverException {
        DefaultDriverMetadata ret = new DefaultDriverMetadata();
        for (int i = 0; i < getFieldCount(); i++) {
            int type = getFieldType(i);
            ret.addField(getFieldName(i), PTTypes.typesDescription.get(type));           
        }
       
        return ret;
    }
View Full Code Here

    /**
     * @see org.gdbms.engine.data.driver.GDBMSDriver#getDriverMetadata()
     */
    public DriverMetadata getDriverMetadata() throws DriverException {
        DefaultDriverMetadata ret = new DefaultDriverMetadata();
        for (int i = 0; i < getFieldCount(); i++) {
            int type = getFieldType(i);
            ret.addField(getFieldName(i), PTTypes.typesDescription.get(type));           
        }
       
        return ret;
    }
View Full Code Here

        }
        f = new File("src/test/resources/nuevo2.csv");
        if (f.exists()) {
            assertTrue(f.delete());
        }
        DefaultDriverMetadata ddm = new DefaultDriverMetadata();
        ddm.addField("id", "STRING");
        ddm.addField("name", "STRING");
        DataSourceCreation dsc = new FileSourceCreation(new File("src/test/resources/nuevo.csv"), ddm);
        ds.createDataSource(dsc);
        DataSourceDefinition dsd = new FileSourceDefinition("src/test/resources/nuevo.csv");
        ds.registerDataSource("nuevo", dsd);
        DataSource nuevo = ds.getDataSource("nuevo");
View Full Code Here

    /**
     * @see org.gdbms.engine.data.driver.GDBMSDriver#getDriverMetadata()
     */
    public DriverMetadata getDriverMetadata() throws DriverException {
        DefaultDriverMetadata ret = new DefaultDriverMetadata();
        for (int i = 0; i < getFieldCount(); i++) {
            int type = getFieldType(i);
            ret.addField(getFieldName(i), PTTypes.typesDescription.get(type));           
        }
       
        return ret;
    }
View Full Code Here

    /**
     * @see org.gdbms.engine.data.driver.GDBMSDriver#getDriverMetadata()
     */
    public DriverMetadata getDriverMetadata() throws DriverException {
        DefaultDriverMetadata ret = new DefaultDriverMetadata();
        for (int i = 0; i < getFieldCount(); i++) {
            ret.addField(getFieldName(i), "STRING");           
        }
       
        return ret;
    }
View Full Code Here

TOP

Related Classes of org.gdbms.engine.data.metadata.DefaultDriverMetadata

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.