ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Folashade Adeyosoye" <sharda...@gmail.com>
Subject RE: Returning Results from queries of a parameterized table name!!!
Date Wed, 29 Jun 2005 20:31:30 GMT
This works fine,  the problem is it throws an exception at the very last
record that it tries to put in the Map.

What list are you referring to?

-----Original Message-----
From: Larry Meadors [mailto:larry.meadors@gmail.com] 
Sent: Wednesday, June 29, 2005 4:02 PM
To: user-java@ibatis.apache.org
Subject: Re: Returning Results from queries of a parameterized table name!!!

Good grief, why are you reinventing the wheel?

I guess you can iterate through the list, then iterate through the
maps in the list, examining the types of the entries, escaping the
strings/numbers/dates, etc into a text file...but man, that sure seems
like a ton of work.

Larry


On 6/29/05, Folashade Adeyosoye <shardayyy@gmail.com> wrote:
>  
>  
> 
> Hi all, 
> 
>   
> 
> I the last couple of days I have been spinning my wheel on this.. 
> 
>   
> 
> My parameterObject are table names and I can get it to execute 
> 
>   
> 
> JAVA 
> 
>   Map hash = new HashMap(); 
> 
>   hash = (Map)super.getObject("systemDatabaseBackup",
> parameterObject); 
> 
>   
> 
>   
> 
> SQLMAP 
> 
>   <select id="systemDatabaseBackup" resultClass="java.util.Map"
> parameterClass="string" remapResults="true"> 
> 
>     SELECT * FROM $value$ 
> 
>   </select> 
> 
>   
> 
>   
> 
> Am trying to get all the records from the table and its column names, Am
> using this as a small database backup utility, I parse the column names
and
> its corresponding values and write these out to a file in a form of insert
> into $tabel_name$ (1,2,3) value (1a,2a,3a); 
> 
>   
> 
> Has anyone done this before?


Mime
View raw message