You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Vinay <vi...@mdp.net> on 2003/04/28 22:28:46 UTC

[OT]: Generic Query Language implementations

Has anybody implemented a generic implementation for querying databases during runtime. I am  using  DAO's for data access layer. But I want to furthur move the database logic to down one more layer of abstraction.I am dealing with different kinds of database (eg. let's say a MySQL, MS Access and another not SQL at all ,index sequential files). I want the DAO to access the database during runtime. So I want my DAO to be independent of the SQL statements.The Database Interfrace would talk to either MySQL,or Oracle or any other database.So that  there is no  need to have  DAO for each database syntax, rather , this should be handled by a API thru an interface.

Here's and examples

Let's say for select statement , we supply table name, column names, where cluase , and's etc

The following method should handle the query

List getSelect(String tablename, List columnnames, List Orderby,.....) etc {


return queryresult
}  


Any ideas appreciated
Thank you 
Vinay

RE: [OT]: Generic Query Language implementations

Posted by Steven Sajous <st...@dotmarketing.com>.
I use hibernate with truts and boy is that a lot of fun!!!!

-----Original Message-----
From: Vinay [mailto:vinay@mdp.net]
Sent: Monday, April 28, 2003 4:29 PM
To: Struts Users Mailing List
Subject: [OT]: Generic Query Language implementations


Has anybody implemented a generic implementation for querying databases
during runtime. I am  using  DAO's for data access layer. But I want to
furthur move the database logic to down one more layer of abstraction.I am
dealing with different kinds of database (eg. let's say a MySQL, MS Access
and another not SQL at all ,index sequential files). I want the DAO to
access the database during runtime. So I want my DAO to be independent of
the SQL statements.The Database Interfrace would talk to either MySQL,or
Oracle or any other database.So that  there is no  need to have  DAO for
each database syntax, rather , this should be handled by a API thru an
interface.

Here's and examples

Let's say for select statement , we supply table name, column names, where
cluase , and's etc

The following method should handle the query

List getSelect(String tablename, List columnnames, List Orderby,.....) etc {


return queryresult
}


Any ideas appreciated
Thank you
Vinay


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org