Extract columns with null values

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Extract columns with null values

Yan Li-10

Hi,

 

I am new to DBUnit and want to give it a try for our regression test.   

 

While I learn it, I know it will by default not exact the columns with null values in the first row.   But, my question is what if I need to extract these columns?  Can DBUnit do it?   I read using DTD, but I haven’t seen a good, complete, solid java code example for it.  

 

Basically I just like to know how to extract ( not to read, not to replace, …) all the columns in a table – null or not null values in the first row to a xml file.   Is any code example available somewhere? Can some point me to the right direction?    I got stuck here for days.   

 

Thanks much!

 

Yan Li

 


CONFIDENTIALITY NOTICE: This electronic message contains information which may be legally confidential and/or privileged and does not in any case represent a firm ENERGY COMMODITY bid or offer relating thereto which binds the sender without an additional express written confirmation to that effect. The information is intended solely for the individual or entity named above and access by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution, or use of the contents of this information is prohibited and may be unlawful. If you have received this electronic transmission in error, please reply immediately to the sender that you have received the message in error, and delete it. Thank you.


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user
Reply | Threaded
Open this post in threaded view
|

Re: Extract columns with null values

George Dinwiddie
Yan Li,

On 7/6/12 1:49 AM, Yan Li wrote:
> Hi,
>
> I am new to DBUnit and want to give it a try for our regression test.
>
> While I learn it, I know it will by default not exact the columns with
> null values in the first row.   But, my question is what if I need to
> extract these columns?  Can DBUnit do it?   I read using DTD, but I
> haven’t seen a good, complete, solid java code example for it.

My DbUnit experience is years old, now, so I can't give you the details
from memory. The basic point is that, if you want DbUnit to include
these null columns, you have to explicitly tell it all the columns.

  - George

--
  ----------------------------------------------------------------------
   * George Dinwiddie *                      http://blog.gdinwiddie.com
   Software Development                    http://www.idiacomputing.com
   Consultant and Coach                    http://www.agilemaryland.org
  ----------------------------------------------------------------------




------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user