Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mock database driver

Is there some kind of JDBC driver which simply ignores database calls?

For the development I am migrating an application to a virtual machine. Here I want to work on the GUI part only. But the application makes several requests to a database which doesn't let the application even start. I don't want to change the application code at this time since the database is pretty much coupled.

So I was thinking there could be a JDBC driver which just returns empty results for queries.

like image 951
Kai Avatar asked Feb 17 '12 10:02

Kai


1 Answers

I decided to write an own simple mock driver. This was pretty much straight forward and did what I want. I can switch the database driver of the application by a configuration file so I could let the application use my driver on a simple way.

Then I extended the driver to return data which it parses from CSV files. I published the code on google code maybe someone else can get use of it: dummyjdbc

like image 52
Kai Avatar answered Sep 24 '22 07:09

Kai