Re: Does derby have an embedded Mode like Derby ? - Mailing list pgsql-general

From Richard Sickler
Subject Re: Does derby have an embedded Mode like Derby ?
Date
Msg-id f2b12cc10908040848if833768wd81d4711d8187700@mail.gmail.com
Whole thread Raw
In response to Re: Does derby have an embedded Mode like Derby ?  (Paul Taylor <ijabz@fastmail.fm>)
List pgsql-general
On Tue, Aug 4, 2009 at 8:37 AM, Paul Taylor<ijabz@fastmail.fm> wrote:
> Bill Moran wrote:
>>
>> In response to Paul Taylor <ijabz@fastmail.fm>:
>>
>>
>>>
>>> Bill Moran wrote:
>>>
>>>>
>>>> In response to Paul Taylor <ijabz@fastmail.fm>:
>>>>
>>>>
>>>>>
>>>>> Sam Mason wrote:
>>>>>
>>>>>>
>>>>>> On Tue, Aug 04, 2009 at 01:37:34PM +0100, Paul Taylor wrote:
>>>>>>
>>>>>>>
>>>>>>> Does postgres have an embedded mode to allow a database to be
>>>>>>> embedded with Java application without requiring seperate db manager, like
>>>>>>> the derby database does ?
>>>>>>>
>>>>>>
>>>>>> No, and I think the consensus is that this would be bad.  See:
>>>>>>
>>>>>>  http://wiki.postgresql.org/wiki/FAQ#Can_PostgreSQL_be_embedded.3F
>>>>>>
>>>>>
>>>>> Thats a shame, I wanted to write junit test for a java program that
>>>>> queried a database, requiring a full database to be available for unit tests
>>>>> is not really an environment I want to have.
>>>>>
>>>>
>>>> Has it occurred to you that testing a DB client when there's no
>>>> DB isn't really a very accurate or realistic test?
>>>>
>>>
>>> I am testing the code that extracts information from a read only
>>> database. These are UNIT tests so only interested in getting the right
>>> results given a particular set of data, anything else is a distraction.
>>>
>>
>> Then replace the DB client class with a class that returns fabricated
>> data for the purpose of your test.
>>
>
> Won't work because I am writing SQL and I want to test the SQL is correct
>
>

Can you do what you need to in a virtual machine?  I use several
virtual machines in my development environment. One for cranking out
code.  One as a "clean" test environment.

> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

pgsql-general by date:

Previous
From: Karsten Hilbert
Date:
Subject: Re: Does derby have an embedded Mode like Derby ?
Next
From: "pepone.onrez"
Date:
Subject: Re: Does derby have an embedded Mode like Derby ?