com.darwinsys.sql
Class ResultsDecoratorSQL

java.lang.Object
  extended by com.darwinsys.sql.ResultsDecorator
      extended by com.darwinsys.sql.ResultsDecoratorSQL

public class ResultsDecoratorSQL
extends ResultsDecorator

Print an SQL ResultSet in SQL-import format. TODO: check all escaped characters needed! Test on PGSQL and DB2 at least...

Version:
$Id: ResultsDecoratorSQL.java,v 1.10 2006/06/12 16:48:22 ian Exp $

Constructor Summary
ResultsDecoratorSQL(java.io.PrintWriter out, Verbosity v)
           
 
Method Summary
 java.lang.String getName()
          Print the name of this Decorator's output format
 void printRowCount(int rowCount)
           
 int write(java.sql.ResultSet rs)
          Print the contents of a ResultSet
 
Methods inherited from class com.darwinsys.sql.ResultsDecorator
flush, print, println, println, setWriter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResultsDecoratorSQL

public ResultsDecoratorSQL(java.io.PrintWriter out,
                           Verbosity v)
Method Detail

write

public int write(java.sql.ResultSet rs)
          throws java.io.IOException,
                 java.sql.SQLException
Description copied from class: ResultsDecorator
Print the contents of a ResultSet

Specified by:
write in class ResultsDecorator
Throws:
java.io.IOException
java.sql.SQLException

printRowCount

public void printRowCount(int rowCount)
                   throws java.io.IOException
Overrides:
printRowCount in class ResultsDecorator
Throws:
java.io.IOException

getName

public java.lang.String getName()
Description copied from class: ResultsDecorator
Print the name of this Decorator's output format

Specified by:
getName in class ResultsDecorator


Copyright © 1996-2004 Ian F. Darwin. See license.html for usage license.