Re: Setup hsqldb tables in memory?

From: Cris Daniluk (cris.danilu..mail.com)
Date: Thu Nov 02 2006 - 15:30:13 EST

  • Next message: Christian Mittendorf: "Re: Setup hsqldb tables in memory?"

    I use a slightly m more configured version. We use HSQLDB for our
    in-memory unit tests, off the same schema we use on Oracle... so I had
    to tune some of the generator settings a bit to disable things not
    supported in HSQLDB:

    DriverDataSource dataSource = new DriverDataSource(new jdbcDriver(),
    "jdbc:hsqldb:mem:app", "sa", "");
    DbGenerator generator = new DbGenerator(new HSQLDBAdapter(), dataMap);
    generator.setShouldCreateFKConstraints(false);
    generator.setShouldCreatePKSupport(true);
    generator.setShouldCreateTables(true);
    generator.setShouldDropPKSupport(false);
    generator.setShouldDropTables(false);
    generator.runGenerator(dataSource);

    (some of the settings above are actually defaults)

    Cris

    On 11/2/06, Andrus Adamchik <andru..bjectstyle.org> wrote:
    > Here is the latest code example used in our integration tests. Works
    > with any DB, including HSQLDB in-memory URL mentioned earlier:
    >
    > http://tinyurl.com/y6ekbs
    >
    > Andrus
    >
    >



    This archive was generated by hypermail 2.0.0 : Thu Nov 02 2006 - 15:30:42 EST