Package org.gdbms.engine.data.db

Examples of org.gdbms.engine.data.db.DBSource


      createFiles(basedir);

    //Setup de las tablas
    dsf.registerDataSource("persona", new FileSourceDefinition(new File(basedir + "/src/test/resources/persona.csvf")));
    dsf.registerDataSource("sort", new FileSourceDefinition(basedir + "/src/test/resources/sort.csv"));
    dsf.registerDataSource("hsqldbpersona", new DBTableSourceDefinition(new DBSource(null, 0, basedir + "/src/test/resources/testdb", "sa", "",
        "persona", "jdbc:hsqldb:file")));
    dsf.registerDataSource("hsqldbpersonatransactional", new DBTableSourceDefinition(new DBSource(null, 0, basedir + "/src/test/resources/testdb", "sa", "",
        "persona", "jdbc:hsqldb:file")));
    dsf.registerDataSource("hsqldbapellido", new DBQuerySourceDefinition(new DBSource(null, 0,
            basedir + "/src/test/resources/testdb", "sa", "", null, "jdbc:hsqldb:file"), "select apellido from persona"));
    dsf.registerDataSource("nulos", new FileSourceDefinition(basedir + "/src/test/resources/nulos.csv"));
   
        dsf.registerDataSource("points0", new SpatialDBTableSourceDefinition(new DBSpatialSource("127.0.0.1", 5432,
                "orbiscad", "postgres", "", "points0", "the_geom", "jdbc:postgresql")));
        dsf.registerDataSource("pgWithGDBMS", new SpatialDBTableSourceDefinition(new DBSpatialSource("127.0.0.1", 5432,
                "orbiscad", "postgres", "", "polygon0", "the_geom", "jdbc:postgresql")));
   
    dsf.registerDataSource("foo", new DBTableSourceDefinition(new DBSource(null, 0, null, null, null, null, "jdbc:foo")));
    dsf.registerDataSource("shppuntos", new SpatialFileSourceDefinition(basedir + "/src/test/resources/puntos.shp"));
    dsf.registerDataSource("shplineas", new SpatialFileSourceDefinition(basedir + "/src/test/resources/lineas.shp"));
    dsf.registerDataSource("shppoligonos", new SpatialFileSourceDefinition(basedir + "/src/test/resources/poligonos.shp"));
    dsf.registerDataSource("dxfprueba", new SpatialFileSourceDefinition(basedir + "/src/test/resources/dxfprueba.dxf"));
    dsf.registerDataSource("spatialobjectpersona", new SpatialObjectSourceDefinition(new FakeSpatialObjectDriver()));
View Full Code Here


        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");
        d.start();
View Full Code Here

  @Override
  public DataSource createDataSource(String tableName, String tableAlias, String driverName) throws DataSourceCreationException {

    ((GDBMSDriver) driver).setDataSourceFactory(getDataSourceFactory());

        DBSource dbs = new DBSource(null, 0, null, null, null, null, null);
    DBTableDataSourceAdapter adapter = new DBTableDataSourceAdapter(
        tableName, tableAlias, dbs, (AlphanumericDBDriver) driver);
    adapter.setDataSourceFactory(getDataSourceFactory());

    getDataSourceFactory().getDelegatingStrategy().registerView(tableName,
        dbs.getTableName());

    return adapter;
  }
View Full Code Here

    /*
     * addDBDataSource("mysql", "192.168.0.1", -1, "root", "root", "mysql",
     * new String[]{"*"}, "user", null, "mysql");
     */

    ds.registerDataSource("pb", new DBTableSourceDefinition(new DBSource(
        "127.0.0.1", 5432, "sigusal", "root", "", "pbedifihistpol",
        "jdbc:postgresql")));
    ds.registerDataSource("person", new DBTableSourceDefinition(
        new DBSource("www.freesql.org", 3306, "fergonco", "fergonco",
            "fergonco", "person", "jdbc:mysql")));
    ds.registerDataSource("fernando", new DBTableSourceDefinition(
        new DBSource("www.freesql.org", 3306, "fergonco", "fergonco",
            "fergonco", "person", "mysql")));
    ds
        .registerDataSource(
            "ages",
            new DBQuerySourceDefinition(
                new DBSource("www.freesql.org", 3306,
                    "elfernan", "elfernan", "elfernan",
                    null, "jdbc:mysql"),
                "select 3*p1.age as tripleage from person p1, person p2, person p3, person p4, person p5"));

    // CustomQueries
View Full Code Here

TOP

Related Classes of org.gdbms.engine.data.db.DBSource

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.