hsqldb-1.8.0.10.orig/0000755000175000017500000000000011020620763012614 5ustar renerenehsqldb-1.8.0.10.orig/demo/0000755000175000017500000000000010264604522013544 5ustar renerenehsqldb-1.8.0.10.orig/demo/runWebServer.sh0000755000175000017500000000214110075542010016523 0ustar renerene#!/bin/sh # ----------------------------------------------------- # Run with -help for usage. # If $JAVA_HOME is set, editing this script should not be required. # Send any questions to fchoong@user.sourceforge.net # ----------------------------------------------------- # the value set here will override the value passed by $JAVA_HOME or the -jdkhome switch jdkhome="" jargs="" thread_flag="" PRG=$0 # # resolve symlinks # while [ -h "$PRG" ]; do ls=`ls -ld "$PRG"` link=`expr "$ls" : '^.*-> \(.*\)$' 2>/dev/null` if expr "$link" : '^/' 2> /dev/null >/dev/null; then PRG="$link" else PRG="`dirname $PRG`/$link" fi done progdir=`dirname $PRG` progname=`basename $0` # ../ will lead us to the home dbhome="$progdir/.." # absolutize dbhome dbhome=`cd ${dbhome}; pwd` # # bring in needed functions . ${dbhome}/lib/functions #-------------------------------------------------------------------------------------------------------------- pre_main # # let's go # cd $dbhome/data exec "$jdkhome/bin/java" $thread_flag -classpath "$cp" $jargs "org.hsqldb.WebServer" "$@" # and we exit. hsqldb-1.8.0.10.orig/demo/runManager.sh0000755000175000017500000000215410075541644016211 0ustar renerene#!/bin/sh # ----------------------------------------------------- # Run with -help for usage. # If $JAVA_HOME is set, editing this script should not be required. # Send any questions to fchoong@user.sourceforge.net # ----------------------------------------------------- # the value set here will override the value passed by $JAVA_HOME or the -jdkhome switch jdkhome="" jargs="" thread_flag="" PRG=$0 # # resolve symlinks # while [ -h "$PRG" ]; do ls=`ls -ld "$PRG"` link=`expr "$ls" : '^.*-> \(.*\)$' 2>/dev/null` if expr "$link" : '^/' 2> /dev/null >/dev/null; then PRG="$link" else PRG="`dirname $PRG`/$link" fi done progdir=`dirname $PRG` progname=`basename $0` # ../ will lead us to the home dbhome="$progdir/.." # absolutize dbhome dbhome=`cd ${dbhome}; pwd` # # bring in needed functions . ${dbhome}/lib/functions #-------------------------------------------------------------------------------------------------------------- pre_main # # let's go # cd $dbhome/data exec "$jdkhome/bin/java" $thread_flag -classpath "$cp" $jargs "org.hsqldb.util.DatabaseManager" "$@" # and we exit. hsqldb-1.8.0.10.orig/demo/runManager.bat0000644000175000017500000000015307550074034016335 0ustar renerenecd ..\data @java -classpath ..\lib\hsqldb.jar org.hsqldb.util.DatabaseManager %1 %2 %3 %4 %5 %6 %7 %8 %9 hsqldb-1.8.0.10.orig/demo/memoryquery.html0000644000175000017500000000253307550074034017036 0ustar renerene HSQL Database Engine

In-Memory Applet: QueryTool

Description

In this demo, all data is kept in memory.
The data will be lost if the program is closed.
The QueryTool and the database are running
inside the internet browser.

If it does not work

On some browsers (Netscape 4.6?), the version compiled for JDK 1.2 does not work. In the Java Console (Communicator / Extras / Java Console) you will get something like:

# Verifier error org/hsqldb/jdbcConnection.getTypeMap()Ljava/util/Map

This means the class java.util.Map was not found. In JDK 1.1, this class does not exist. When compiled for 1.2, there is a reference to this class required to conform to the JDBC 2.0 interface. This class itself is never used, but the reference is required anyway. It looks like most verifiers have no problems with this, but some have.

The solution for this problem is to recompile (at least the client part) for JDK 1.1. You will need to install JDK 1.1 before you can do this, then see:

Build / How to switch to JDK 1.1 hsqldb-1.8.0.10.orig/demo/servletdemo.html0000644000175000017500000000302707550074034016770 0ustar renerene HSQL Database Engine

HSQL Database Engine Servlet Demo

In this demo, the DatabaseManager uses the Servlet to access the database. The QueryTool is running inside the internet browser as an Applet.

If it does not work

This demo requires a servlet engine to be running and listening to port 8080. The hsqlServlet.java servlet should be installed on the servlet engine in the /examples/servlet/ directory.

On some browsers (Netscape 4.6?), the version compiled for JDK 1.2 does not work. In the Java Console (Communicator / Extras / Java Console) you will get something like:

# Verifier error org/hsqldb/jdbcConnection.getTypeMap()Ljava/util/Map

This means the class java.util.Map was not found. In JDK 1.1, this class does not exist. When compiled for 1.2, there is a reference this class required to conform the JDBC 2.0 interface. This class itself is never used, but the reference is required anyway. It looks like most verifiers have no problem with this, but some have.

The (only) solution for this problem is to recompile (at least the client part) for JDK 1.1. You will need to install JDK 1.1 before you can do this, then see:

Build / How to switch to JDK 1.1 hsqldb-1.8.0.10.orig/demo/runServer.sh0000755000175000017500000000213610075542016016077 0ustar renerene#!/bin/sh # ----------------------------------------------------- # Run with -help for usage. # If $JAVA_HOME is set, editing this script should not be required. # Send any questions to fchoong@user.sourceforge.net # ----------------------------------------------------- # the value set here will override the value passed by $JAVA_HOME or the -jdkhome switch jdkhome="" jargs="" thread_flag="" PRG=$0 # # resolve symlinks # while [ -h "$PRG" ]; do ls=`ls -ld "$PRG"` link=`expr "$ls" : '^.*-> \(.*\)$' 2>/dev/null` if expr "$link" : '^/' 2> /dev/null >/dev/null; then PRG="$link" else PRG="`dirname $PRG`/$link" fi done progdir=`dirname $PRG` progname=`basename $0` # ../ will lead us to the home dbhome="$progdir/.." # absolutize dbhome dbhome=`cd ${dbhome}; pwd` # # bring in needed functions . ${dbhome}/lib/functions #-------------------------------------------------------------------------------------------------------------- pre_main # # let's go # cd $dbhome/data exec "$jdkhome/bin/java" $thread_flag -classpath "$cp" $jargs "org.hsqldb.Server" "$@" # and we exit. hsqldb-1.8.0.10.orig/demo/runUtil.sh0000755000175000017500000000214510075541604015550 0ustar renerene#!/bin/sh # ----------------------------------------------------- # Run with -help for usage. # If $JAVA_HOME is set, editing this script should not be required. # Send any questions to fchoong@user.sourceforge.net # ----------------------------------------------------- # the value set here will override the value passed by $JAVA_HOME or the -jdkhome switch jdkhome="" jdkhome="" jargs="" thread_flag="" PRG=$0 # # resolve symlinks # while [ -h "$PRG" ]; do ls=`ls -ld "$PRG"` link=`expr "$ls" : '^.*-> \(.*\)$' 2>/dev/null` if expr "$link" : '^/' 2> /dev/null >/dev/null; then PRG="$link" else PRG="`dirname $PRG`/$link" fi done progdir=`dirname $PRG` progname=`basename $0` # ../ will lead us to the home dbhome="$progdir/.." # absolutize dbhome dbhome=`cd ${dbhome}; pwd` # # bring in needed functions . ${dbhome}/lib/functions #-------------------------------------------------------------------------------------------------------------- pre_main # # let's go # cd $dbhome/data exec "$jdkhome/bin/java" $thread_flag -classpath "$cp" $jargs "org.hsqldb.util.$@" # and we exit. hsqldb-1.8.0.10.orig/demo/memorydbmanager.html0000644000175000017500000000252407550074034017611 0ustar renerene HSQL Database Engine

In-Memory Applet: Database Manager

In this demo, all data is kept in memory.
The data will be lost if the program is closed.
The Database Manager and the database are running
inside the internet browser.

If it does not work

On some browsers (Netscape 4.6?), the version compiled for JDK 1.2 does not work. In the Java Console (Communicator / Extras / Java Console) you will get something like:

# Verifier error org/hsqldb/jdbcConnection.getTypeMap()Ljava/util/Map

This means the class java.util.Map was not found. In JDK 1.1, this class does not exist. When compiled for 1.2, there is a reference to this class required to conform to the JDBC 2.0 interface. This class itself is never used, but the reference is required anyway. It looks like most verifiers have no problem with this, but some have.

The solution for this problem is to recompile (at least the client part) for JDK 1.1. You will need to install JDK 1.1 before you can do this, then see:

Build / How to switch to JDK 1.1 hsqldb-1.8.0.10.orig/demo/runUtil.bat0000644000175000017500000000013307550074034015676 0ustar renerenecd ..\data @java -classpath ..\lib\hsqldb.jar org.hsqldb.util.%1 %2 %3 %4 %5 %6 %7 %8 %9 hsqldb-1.8.0.10.orig/demo/localhost_clientserver.html0000644000175000017500000000273007550074034021214 0ustar renerene HSQL Database Engine

HSQL Database Engine Client/Server Demo

Client/server version

Currently, the applet is configured to connect to 'http://localhost', but this can be changed in the source code of this HTML page: The applet parameter 'database' is the path where the applet connects to. Close the database and stop the WebServer using the 'SHUTDOWN' command.

If it does not work

On some browsers (Netscape 4.6?), the version compiled for JDK 1.2 does not work. In the Java Console (Communicator / Extras / Java Console) you will get something like:

# Verifier error org/hsqldb/jdbcConnection.getTypeMap()Ljava/util/Map

This means the class java.util.Map was not found. In JDK 1.1, this class does not exist. When compiled for 1.2, there is a reference this class required to conform the JDBC 2.0 interface. This class itself is never used, but the reference is required anyway. It looks like most verifiers have no problem with this, but some have.

The (only) solution for this problem is to recompile (at least the client part) for JDK 1.1. You will need to install JDK 1.1 before you can do this, then see:

Build / How to switch to JDK 1.1 hsqldb-1.8.0.10.orig/demo/runManagerSwing.bat0000644000175000017500000000016010203122753017332 0ustar renerenecd ..\data @java -classpath ..\lib\hsqldb.jar org.hsqldb.util.DatabaseManagerSwing %1 %2 %3 %4 %5 %6 %7 %8 %9 hsqldb-1.8.0.10.orig/demo/runServer.bat0000644000175000017500000000013507550074034016231 0ustar renerenecd ..\data @java -classpath ../lib/hsqldb.jar org.hsqldb.Server %1 %2 %3 %4 %5 %6 %7 %8 %9 hsqldb-1.8.0.10.orig/demo/runWebServer.bat0000644000175000017500000000014007550074034016663 0ustar renerenecd ..\data @java -classpath ..\lib\hsqldb.jar org.hsqldb.WebServer %1 %2 %3 %4 %5 %6 %7 %8 %9 hsqldb-1.8.0.10.orig/readme.txt0000644000175000017500000000061611020522357014615 0ustar renereneReadme File June 2008 This package contains HSQLDB 1.8.0.10 HSQLDB is a relational database engine and a set of tools written in Java.The file index.html in this directory contains the list of directories with their contents.Documentation and license information can be found in the /doc directory.Project home page: http://hsqldb.orgPlease check the site periodically for updated versions. hsqldb-1.8.0.10.orig/lib/0000755000175000017500000000000012121701730013357 5ustar renerenehsqldb-1.8.0.10.orig/lib/functions0000644000175000017500000001554007567747136015353 0ustar renerene # Bourne shell (and compatible) script, to be "source". # $Id: functions,v 1.3 2002/11/23 18:28:17 unsaved Exp $ # functions used by the hsqldb Linux scripts # # using $JAVA_HOME use_java_home() { # jdkhome is an unfortunate name, since it could just as well # be a JRE home. That's probably why Sun calls it JAVA_HOME. if [ ! -z "$JAVA_HOME" -a -z "$jdkhome" ] ; then jdkhome=$JAVA_HOME fi } # use_java_home() # # parse arguments # parse_args() { while [ $# -gt 0 ] ; do # echo "Processing arg: '$1'" case "$1" in -h|-help) cat < specifies the JDK directory -hotspot -client -server -classic -native -green specifies the type of JVM -J passes to JVM -cp:p prepends to classpath -cp:a appends to classpath All other options and arguments are passed to the program. See documentation for details. EOF exit 1 ;; -jdkhome) shift; if [ $# -gt 0 ] ; then jdkhome=$1; fi;; #-mainclass) shift; if [ $# -gt 0 ] ; then db_class=$1; fi;; -cp|-cp:a) shift; if [ $# -gt 0 ] ; then if [ ! -z "$postfixcp" ] ; then postfixcp="$postfixcp:" ; fi postfixcp=$postfixcp$1; fi ;; -cp:p) shift; if [ $# -gt 0 ] ; then if [ ! -z "$prefixcp" ] ; then prefixcp="$prefixcp:" ; fi prefixcp=$prefixcp$1; fi ;; -hotspot|-client|-server|-classic|-native|-green) thread_flag=$1;; -J-hotspot|-J-client|-J-server|-J-classic|-J-native|-J-green) thread_flag=`expr $1 : '-J\(.*\)'`;; -J*) jopt=`expr "$1" : '-J\(.*\)'`; jargs="$jargs \"$jopt\"";; *) args="$args \"$1\"" ;; esac shift done } # parse_args() append_jars_to_cp() { # N.b. This adds all the jars of a directory to $cp. # That may be ok in some other situation, but you probably should # NOT run "append_jars_to_cp $HSQLDB_HOME/lib" (for one thing, that # directory may contain non-inter-compatible libraries). dir="$1" for ex in jar zip ; do if [ "`echo ${dir}/*.$ex`" != "${dir}/*.$ex" ] ; then for x in ${dir}/*.$ex ; do if [ ! -z "$cp" ] ; then cp="$cp:" ; fi cp="$cp$x" done fi done } prefixTo() { # Purpose of this is to conditionally add the : delimiter. # Reason is that an extra delimiter can implicitly add $PWD. # Either arg may be null, but that may add $PWD to the resultant path. # N.b. 1st arg should be (or eval to) a variable NAME, therefore # it should usually be like 'cp', not like '$cp'. [ $# -ne 2 ] && { echo "ERROR. Syntax: origvar=`prefixto newprefix '$origvar'`" 1>&2 return } _VARNAME="$1"; shift _NEWELEMENT="$1"; shift eval _ORIGVAL="\${$_VARNAME}" if [ -n "$_ORIGVAL" ]; then eval "$_VARNAME=${_NEWELEMENT}:${_ORIGVAL}" else eval "$_VARNAME=$_NEWELEMENT" fi unset _VARNAME unset _NEWELEMENT unset _ORIGVAL } appendTo() { # Purpose of this is to conditionally add the : delimiter. # Reason is that an extra delimiter can implicitly add $PWD. # Either arg may be null, but that may add $PWD to the resultant path. # N.b. 1st arg should be (or eval to) a variable NAME, therefore # it should usually be like 'cp', not like '$cp'. [ $# -ne 2 ] && { echo "ERROR. Syntax: origvar=`prefixto newprefix '$origvar'`" 1>&2 return } _VARNAME="$1"; shift _NEWELEMENT="$1"; shift eval _ORIGVAL="\${$_VARNAME}" if [ -n "$_ORIGVAL" ]; then eval "$_VARNAME=${_ORIGVAL}:$_NEWELEMENT" else eval "$_VARNAME=$_NEWELEMENT" fi unset _VARNAME unset _NEWELEMENT unset _ORIGVAL } build_cp() { # N.b. This rebuilds from scratch. Does not add to an existing cp. base="$1" cp= # Clear any previous value # Required for Java v. 1.1. Put Java system libs right up front [ -n "$jdkhome" ] && [ -r "$jdkhome/lib/classes.zip" ] && prefixTo cp "$jdkhome/lib/classes.zip" [ -n "$base" ] || return # Nothing to do if no arg given to this funct. for Lib in hsqldb.jar servlet.jar; do [ -r "$base/lib/$Lib" ] && appendTo cp "$base/lib/$Lib" done } # # check JDK # check_jdk() { if [ -z "$jdkhome" ] ; then echo "Cannot find JDK. Please set the JAVA_HOME environment variable to point" echo "to your JDK installation directory, or use the -jdkhome switch" echo "" exit 1 fi if [ ! -x "${jdkhome}/bin/java" ] ; then echo "Cannot find JDK at ${jdkhome}. Please set the JAVA_HOME" echo "environment variable to point to your JDK installation directory," echo "or use the -jdkhome switch" echo "" exit 1 fi } # check_jdk()check_jdk() # JDK tools build_jdk_cp() { for ex in jar zip ; do # XXX does this still work if ${jdkhome} contains spaces? if [ "`echo ${jdkhome}/lib/*.$ex`" != "${jdkhome}/lib/*.$ex" ] ;then for x in ${jdkhome}/lib/*.$ex ; do if [ ! -z "$cp" ] ; then cp="$cp:" ; fi cp="${cp}$x" done fi done } # build_jdk_cp() # user-specified prefix and postfix CLASSPATH build_usr_cp() { if [ ! -z "${prefixcp}" ] ; then cp="${prefixcp}:$cp" fi if [ ! -z "${postfixcp}" ] ; then cp="$cp:${postfixcp}" fi } # build_usr_cp() # Simple Age Function # Adapted from Blaine Simpson's Age script # Age one file at a time only, so pass it will process only the first parameter # All the files are moved by one age with the overaged ones being deleted # Max is aging is set to 3. # Maybe improved later to add more functionality. age() { MAXAGE=3 let OVERAGE=MAXAGE+1 LOGPATH="$1" DIRNAME=`dirname $LOGPATH` FILE=`basename $LOGPATH` cd $DIRNAME i=$MAXAGE let j=i+1 while [ $i -gt 0 ]; do [ -e $FILE.$i ] && { mv $FILE.$i $FILE.$j 2>&- || { echo "ERROR: Failed to move file '$FILE.$i' to '$FILE.$j'" } } let i=i-1 let j=i+1 done mv $FILE $FILE.$j #delete overaged files [ -a $FILE.$OVERAGE ] && { `rm -rf $FILE.$OVERAGE` } } # age() # Doing the main processing pre_main() { # # defaults # use_java_home # Process arguments given on the command line. #$parse_args "$@" # arguements are handled directly by Java main() check_jdk #ulimit -n 1024 # # main # # # build CLASSPATH # # dbhome comes first build_cp ${dbhome} #build_jdk_cp } # pre_main() NewerThan() { # Must use this in place of the shell "-nt" expression test, because # -nt is very non-portable (e.g. not available in SunOS sh). [ "$#" -eq 2 ] || { echo "SYNTAX: NewerThan file/1 file/2" 1>&2 return 1 } _LINE1_=`ls -1 -d -t "$1" "$2" 2> /dev/null | head -1` [ "$_LINE1_" = "$1" ] } hsqldb-1.8.0.10.orig/lib/hsqldb.jar0000644000175000017500000254422611020611434015347 0ustar renerenePK Ӳ8 META-INF/PK Ҳ8jyMETA-INF/MANIFEST.MFmOk!csиKڦ@Pv}uu uf5ҙRNqVFY@VD4]_՟|A<#QѧK0$w0j(%sym߶ ɒqV> k]ch? ki5fz\59V\Ե_9FG7V$_NVؘev[0PK ϲ8org/PK Ҳ8 org/hsqldb/PK Ѳ8org/hsqldb/index/PK Ҳ8org/hsqldb/jdbc/PK Ѳ8org/hsqldb/lib/PK Ѳ8org/hsqldb/lib/java/PK Ҳ8org/hsqldb/persist/PK Ҳ8org/hsqldb/resources/PK Ѳ8org/hsqldb/rowio/PK Ҳ8org/hsqldb/sample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٭1org/hsqldb/persist/LockFile$HeartbeatRunner.class}Rn@=lIp(RZh >)R%RqW[c_J@>(lS)HΌg߫koFl4ɯ'6bM{X/u=MUOX$8:JEr);BsxiA<^e?",`o  8_\YTTUgrB\e8F=QhZ'8 K=:3w4EL4]I= Z`I"y\ ] u,͵<de0Cmzx7*W}^&5d\9j,wXzR.P _o9nh|OXX: %9nMh1փ4']^wy6_PK Ѳ8>4=org/hsqldb/persist/LockFile$LockHeldExternallyException.classR]oQ=p ҢuU-eVQ1>ko-]]{5GhbhGMKH܇:sgv??~(A3ȧ1KZ\6+:lkk%\j ׵#Z;&\ F$xGjGpŐ|䇾z̰4:QۗwO@ToGe̥HߑnfuHp.gQ/(15*?CdPK Ѳ89TMg>org/hsqldb/persist/LockFile$UnexpectedEndOfFileException.classRN@=8q 4@iKch-TPP+E*&޸hz ⳨T$>Uu \Μ񟿿|g.BnjYYT2_TfIK wd fZGΩcl4:<@4 ?lg?{H2[AxF9³^/rہ WcDR:iʷ L`ـqZduHQxwXdLu5X R\,䝘Mᶻ ?*bz*{\2m9t|$cgϚ0eX3݃kۇGf °2*֡~QHQ L}NYyZ]Y/(H3c22{X)W>@`|I#}(^-BG5xUPK Ѳ8ڦ)^;org/hsqldb/persist/LockFile$UnexpectedFileIOException.classRmkP~nf^nk:f/a_VÆJ2Lce&Fr-lG6Z~9ϓ{OձtkБFEU*zǦy᱆ ; kձ=n |"KOx+f]J~.쀇ғxފG(ۚ̉ Gg }P︔K=lZ" g_./y VQ6 ;]>iEŽsލxOSs2TzF[ )dh&I;OQ3=zﴩl .z {_Z3Ӌ>G~\aLP&PR(M".SV߃8"`XUҦTfb/*)C(@rV`P1r?m: wծ!Gcb =z(_󞒭D ux50.:T|c6a9}y:I_N7?=tO]'pƑ/Vc=PxMtuB~q)]z70U nGjd*>Hi(4`f؜}w /lb?de)vWJ.imWʼnzW6J룘s.z MgPâٙag zҔT-PӰכ#0{KQ"N2UB2 k_!u>n[(PE{FA1Q)IPG ^+#PK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N/nqXG7cn5w3pqmw =yjX*4L*9 =Րz_>u4~zXb Gsș*L{UQ2F4kdѨYO} FSBu8~8dųGoklZ[E=YSz@(E0"R*:i[TAGHY3m,)\hi#c_-y]"L]!]]6a6Xpqpރsƪ5Mt9ՇV PK в8G5org/hsqldb/store/BitMap.class?o`Ɵu[!)+5 Ѕ&:TBLNbWi)/S.HD Tyڂ wo?^؆B BhnfU%S4`{/A+sn aԒPFJ r5g ")D\Pe@OA*,ndޔS::ЉdnH90zxIڑ,9]떹,^[ UboK.'N&WAVPiyH>A92!pF(Ɩ±ҵKWCj^ x%7/}9 "79qK mo%PK в8XS*G org/hsqldb/store/HashIndex.classmRMoW=o?&$u0vRM -lPZJJTM`y${&Hh7AU%oT´P]Tt 5<;Hs{{̟~m&γXOټo0m|KY\@~moMv+P=\E cDpT[uT߈vX`6~7;=l}G2b] s:T[)ұgx"' *cf[$l3jE(#Ps7RUP:ԫ{ PK в8ո%=org/hsqldb/store/ObjectCacheHashMap$ObjectCacheIterator.classQJ@}ƮiVbڢA`.MHHjv/~VEQTZ$;73oϷw'ثÂc5 6fXwO 7YE96YIƗan`߿&R&"NcsIJU=,?)6v \YnK#0MU'Rkv /\I'{+4) ā7tt_nDtY n>U٨o0rQa+?2Id`h2mPK в8tc)org/hsqldb/store/ObjectCacheHashMap.classSmOP~VVUDHQ".@HԐ_춛Q(l;+?@",x{nw<9 `)`$+vtt"3M"i'h21bdHNʺk =" ;}$ $z~a8³hOBzUo@9+ =M^PK в8¨X org/hsqldb/store/ValuePool.classVSgl TTjkh#tI YLjיv:K0 S[L>Oh{η }w|@y0e$#)xY=Be1##Θ ?ͲHcbqyvIsJ&xj^M[֜M\] հw  MDƧ'"Cӧ"! RXBـjm@W/ͪi3+S3D&F%TZ0i;$ZRTh1VZԩ!uC$4j.Jfpn-9Ldp);z9ciF*.ٛʤlzbr OkjR&5#mv;KNKjY'GPBuljRV2T[>%(0G:7ƒi霂#sSA$1|h(^t)%aiޒmxO[񖂷AMּk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3Dx&  5CLxք0D&| AOhw2ỈIMn&|> fA'?Y'?T`a~z\PK Ӳ8 5,org/hsqldb/util/DatabaseManagerSwing$1.classPMK@}Ӧ֪ CgEA(o57][YxIЛ. 37|}|8Ķ"ePs ;V%$! G"\X1F^ -B fJDŽI۱*`ʞڭ[B$*b}#8#n?SዙTjeflzBm#<"]j-^$P"Cz8%WJft<W4|n{|"[Xਧp.#}9W ss",b9Ŕ:/Ƚ#X&}?PK Ӳ8>-org/hsqldb/util/DatabaseManagerSwing$10.classQMK@}h?ZCѶѳ"H DT ޷nL,G7]ffyoޛݯOذG6*ZXPJC7;^ a{X=ZD̗BGݩT#B X*Ol-! L( _P]stF'l5WLV=M!ImlX(XXs:awơYB):c T-j^Fk<k6LBlИEPGǚ;(2ú7䍓9dHNƄĥjOo+2)_̲ ~A ?J:ɼsPK Ӳ8r|-org/hsqldb/util/DatabaseManagerSwing$11.classRNA KVTA]aE5^1&zaFMnl >axP3$3ss/vb*],ẋiYrq+q 3fjŰE^&WˆP"E0UCY4iLS _=0&bj[;y1}U?"&R䵕ɕ㲃pshp4rCтǰQ&)f,:Zj8L$|ەaX^j#ɓaʷ-bM9UtP(*{?8W&w9Rk!*9N/rZge<~QG#EF^ >QBRRbڥ1ѝK@S[CU[A ױvff SGh#\n!;׏0{rr_cPK Ӳ8 r62,org/hsqldb/util/DatabaseManagerSwing$2.classRmOA~worSH\CCoȱ +՟eG/I73|` [lܱQâhb C2҄K^aEk.fZxS .6ФoM$MR "og\kB2."bðڢTAL)MaSIKC]\J.g~/STRm8Z{/i܋7Rc]ଜPQb7";x3%AEwCmjC{*P :ȟ'A~q4?57?DQMĻƬZbKT.1U+L/T`W(tJ?PK Ӳ83,org/hsqldb/util/DatabaseManagerSwing$3.classR]OA=S ]ւ/⊻EY%&i ]@g`D(EbGM&s93w &6=㢆Ewјyݯ၇x` 3f`a4w,w}EK7dbp{ %df^3Dd舡V0)y cUJ9<# !MSBؘ>X1 :X M靾:76|< 4=)EιB3̗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?83,{mq gYA`ΡcgF?2ч9~eʤs*"˔Kd%)>,S>}WXH0ԯL9Q`N_cV2DVXr!}Zlq~X38h7C5|`VZcWZŎ~2kB'heTrJqMUe3ogg,kлXP/\gGz5^VuU5]Cv&|PK Ӳ8O #org/hsqldb/util/TableSorter$2.classePJ@}ӤnVm Dŀ׊6Ĕկ⥂?1څ73fyoα o\cC--!\fEf쁚$1VRst_O sYMGHy2T$E,ˤ$O&tR>FicH6aFY&օkU8dBL;PȒv>#$څj{ CR981I\/IC*1C@+;8с^4k(AWbhA݇ Ce,~$$__N8 QLb,a@:]>}|*ItL\PK Ӳ8u)+org/hsqldb/util/TableSorter$Directive.classPMK@}|51oL@oz *)1$-?%FQ"› CP*a͂uz@>BDUs&YR 0 HeXp!sL4(KQE^Iyơ;Խ TEKx2ƣ* =F ]m;M%

y\tԞUO `袄Q٨0zAU%t{"%|[*$N'Ԝ#-s y$sd #>#1b8V!a4n;c OҎCQO)HЀ^LXB&ELaZČx`Y%*- ҘSODp.piҧ!'p_"m*!)))$1e~Wl A@RH}Bҁpv@=*串:bD}n0@Q`ނPK Ӳ8)㰪s8org/hsqldb/util/TableSorter$SortableHeaderRenderer.classTmOA~n{B !** !i4h?][^/4`?8`]vvgyff~8r01dWZ.`㺁4nAQF -JzYpqf+×"Z `]w}7 pWNf2j3 CKno0/ˆjso#)TP' Lsq(2tV BTkH1;m[$y^u5yD)Ju y@>OT"~ՙietMD?MQ0q my.5p1q$S&!# Wx0\zOaRn }BƁ dDu< )ne+*Ý#+08R?T~v)rp Zzb0XnWהtLX)</bnp7]zt ~R4E "Sr!؇p\Ar26duZi+ߑ~qCz:kgMd*V >dH6A_ .o"c)#1#"4$M]F/PK Ӳ8N} 3org/hsqldb/util/TableSorter$TableModelHandler.classS[OA,ݮX.j,EQ@nj֘1Qvl[@H$Z&>2V,9߹|s̜OxC:zq-J躎4Y F,rld1b\< p[ w:TydU͚ީl[vukÑkuOIoV 몚TvHskT&5B RW_YnUVF2Mk`;[5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r-ʒxF('7>+caM zG;ܧϫCrmCm!oTzS.{%AW1$WAsC-:^ OD0(1z3,T2a0؍wX,"6Ww!41اi"‡*:')wg<{{eΓ, ]mPK Ҳ8VH$'org/hsqldb/util/sqltool/raw.leadin.textM10#VF21tCHr% Dj/Rr=W^l˖=Ċa}šwXZ84ߙ^Y LF,9 7XHAZT$4R3Jq1dHIݪhTљPK Ҳ8}@Z*org/hsqldb/util/sqltool/raw.leadin_de.textJA =$oAd60 >V|W]tVㅊO+x aǑp6&eDQbԢwt6aN9 m?W1P K]';P- l-Wx\8ǂyȕrvc7:(CfU7PK Ҳ8H{0org/hsqldb/util/sqltool/rejectreport.bottom.textSP ;b[\u<[uu;jZ; d֣ YN>@3&-?$/$U.0-3'U(,83?OAڨVFKnGPK Ҳ8H{3org/hsqldb/util/sqltool/rejectreport.bottom_de.textSP ;b[\u<[uu;jZ; d֣ YN>@3&-?$/$U.0-3'U(,83?OAڨVFKnGPK Ҳ8p-org/hsqldb/util/sqltool/rejectreport.row.textSP b[ujZu;^.$`.J+͍OQ(L(QS6q'3/'3/U1A=@`-ɩy%E =&8"XRn TCPK Ҳ8p0org/hsqldb/util/sqltool/rejectreport.row_de.textSP b[ujZu;^.$`.J+͍OQ(L(QS6q'3/'3/U1A=@`-ɩy%E =&8"XRn TCPK Ҳ8Gڷ*-org/hsqldb/util/sqltool/rejectreport.top.textUmO#7ѽӑI$+A Tʡ$t*zx$ޱ pmfgy{ܿzv`t3&$j(ZG4!܀^*i2JHj{?t虖v)d%p Xr. jf7n&lAơ2r5G ,*4Xnjbz."$c096d2z=B z yUjKfB||`]cN]6,y ŌG\ )5 -RMKZ=W"Rje!P^·yOף|j-a8Ɓm\8Cm PRKmpDOw3G\IqpcxJ#TZq~t؋K.Y%f[ϱ& #Vh$߃H eVrhvų;ԝd3+⅑mJg44o &h^'0+i G3oUu955[ѫ..P}gz^vko 2;khĥpprisH+'U3s'Tvz<>9|g=c뫛_hK ;Ct V$V cM0/ ]_~ơASiCE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owio/PK Ҳ8Aorg/hsqldb/sample/PK Ѳ8Aorg/hsqldb/scriptio/PK в8AEorg/hsqldb/store/PK Ѳ8Atorg/hsqldb/types/PK Ӳ8Aorg/hsqldb/util/PK Ҳ8Aorg/hsqldb/util/sqltool/PK Ѳ8cJlhsqlServlet.classPK Ѳ8L9 >org/hsqldb/BaseMemoryNode.classPK Ѳ814&org/hsqldb/BaseTable.classPK Ѳ8qVforg/hsqldb/CachedDataRow.classPK Ѳ8.  org/hsqldb/CachedRow.classPK Ѳ8F ~org/hsqldb/Collation.classPK Ѳ8&cJ?:org/hsqldb/Column.classPK Ѳ8r"":8org/hsqldb/CompiledStatement.classPK Ѳ8߿4\ s*2Gorg/hsqldb/CompiledStatementExecutor.classPK Ѳ8T)Rorg/hsqldb/CompiledStatementManager.classPK Ѳ8=RD@ 9Zorg/hsqldb/Constraint.classPK Ѳ87oeorg/hsqldb/ConstraintCore.classPK Ѳ8q (^gorg/hsqldb/DINameSpace.classPK Ѳ8^Q$ rorg/hsqldb/DIProcedureInfo.classPK Ѳ8j\2 ނorg/hsqldb/DITableInfo.classPK Ѳ86dz Jorg/hsqldb/DITypeInfo.classPK Ѳ8: org/hsqldb/Database.classPK Ѳ8ҟ8t+org/hsqldb/DatabaseCommandInterpreter.classPK Ѳ8@N$org/hsqldb/DatabaseInformation.classPK Ѳ8f)Ta(org/hsqldb/DatabaseInformationFull.classPK Ѳ8WxH#M(org/hsqldb/DatabaseInformationMain.classPK Ѳ8QЏY 5 Y9org/hsqldb/DatabaseManager.classPK Ѳ8s؞",Norg/hsqldb/Library.classPK Ѳ8Ww ?org/hsqldb/Like.classPK Ѳ8*`AAForg/hsqldb/MemoryNode.classPK Ѳ82Horg/hsqldb/Node.classPK Ѳ8i<#Korg/hsqldb/NumberSequence.classPK Ѳ8KB*.iNorg/hsqldb/Parser.classPK Ѳ8n䀂|}org/hsqldb/PointerNode.classPK Ѳ8t|org/hsqldb/Record.classPK Ѳ8i^yorg/hsqldb/Result$1.classPK Ѳ8GBXJ&org/hsqldb/Result$ResultIterator.classPK Ѳ8ނ &̈́org/hsqldb/Result$ResultMetaData.classPK Ѳ82d*org/hsqldb/Result.classPK Ѳ8F*org/hsqldb/ResultBase$ResultIterator.classPK Ѳ8% org/hsqldb/ResultBase.classPK Ѳ8YjTE Πorg/hsqldb/ResultConstants.classPK Ѳ8B4Qorg/hsqldb/Row.classPK Ѳ8y#QX%org/hsqldb/SchemaManager$Schema.classPK Ѳ8p41org/hsqldb/SchemaManager.classPK Ѳ8l;3org/hsqldb/Select.classPK Ѳ87# L ]org/hsqldb/SequenceManager.classPK Ѳ8i\$org/hsqldb/Server$ServerThread.classPK Ѳ8)*$>Norg/hsqldb/Server.classPK Ѳ8$:cC $org/hsqldb/ServerConfiguration.classPK Ѳ8TOu9 ! org/hsqldb/ServerConnection.classPK Ѳ8[-PN org/hsqldb/ServerConstants.classPK Ѳ8p򃾃 $org/hsqldb/Servlet.classPK Ѳ8+@org/hsqldb/Session.classPK Ѳ8@!>;org/hsqldb/SessionInterface.classPK Ѳ8Z =org/hsqldb/SessionManager.classPK Ѳ8jxCorg/hsqldb/SetFunction.classPK Ѳ8υ`J9Lorg/hsqldb/SubQuery.classPK Ѳ8HOorg/hsqldb/Table$RowStore.classPK Ѳ8D?7~,Sorg/hsqldb/Table.classPK Ѳ8 + d%org/hsqldb/TableFilter.classPK Ѳ8&R](org/hsqldb/TableWorks.classPK Ѳ8%corg/hsqldb/TextTable.classPK Ѳ87+1#kUʯorg/hsqldb/Token.classPK Ѳ84$#org/hsqldb/Tokenizer.classPK Ѳ8If)>;org/hsqldb/Trace.classPK Ѳ8I?Rorg/hsqldb/Transaction.classPK Ѳ86 g#org/hsqldb/TransactionManager.classPK Ѳ84S)Korg/hsqldb/Trigger.classPK Ѳ8'* org/hsqldb/TriggerDef$DefaultTrigger.classPK Ѳ8WW' org/hsqldb/TriggerDef$TriggerData.classPK Ѳ8;"H  org/hsqldb/TriggerDef.classPK Ѳ8lC+org/hsqldb/Types.classPK Ѳ8?? J)org/hsqldb/User.classPK Ѳ8wE#d .org/hsqldb/UserManager.classPK Ѳ8fu; 5org/hsqldb/View.classPK Ѳ8HѪ  ?org/hsqldb/WebServer.classPK Ѳ8(6 V$Dorg/hsqldb/WebServerConnection.classPK Ѳ8Wω"Sorg/hsqldb/index/RowIterator.classPK Ѳ8YE!Sorg/hsqldb/jdbcDriver.classPK Ѳ8;p=Xorg/hsqldb/jdbc/Util.classPK Ѳ8 @[org/hsqldb/jdbc/jdbcBlob.classPK Ѳ8(ZWK #+`org/hsqldb/jdbc/jdbcCallableStatement.classPK Ѳ8'6^%Pjorg/hsqldb/jdbc/jdbcClob.classPK Ѳ8i>Ro(norg/hsqldb/jdbc/jdbcColumnMetaData.classPK Ѳ8Awk'$qorg/hsqldb/jdbc/jdbcConnection.classPK Ѳ8$org/hsqldb/jdbc/jdbcDataSource.classPK Ҳ82d+oorg/hsqldb/jdbc/jdbcDataSourceFactory.classPK Ѳ8jaF*шorg/hsqldb/jdbc/jdbcDatabaseMetaData.classPK Ѳ84W̴[ +4org/hsqldb/jdbc/jdbcParameterMetaData.classPK Ѳ8wQ.+korg/hsqldb/jdbc/jdbcPreparedStatement.classPK Ѳ8 ;B#;org/hsqldb/jdbc/jdbcResultSet.classPK Ѳ8Gt+org/hsqldb/jdbc/jdbcResultSetMetaData.classPK Ѳ8y\X#org/hsqldb/jdbc/jdbcSavepoint.classPK Ѳ8ࢬ#org/hsqldb/jdbc/jdbcStatement.classPK Ѳ8)|org/hsqldb/jdbc/jdbcStubs.classPK в8ß$6!org/hsqldb/lib/ArrayCounter.classPK в8[| morg/hsqldb/lib/ArrayUtil.classPK в8n1k+corg/hsqldb/lib/AsciiStringInputStream.classPK в8{8[org/hsqldb/lib/BaseList$1.classPK в8 ; \d.dorg/hsqldb/lib/BaseList$BaseListIterator.classPK в8"ﲻH2 org/hsqldb/lib/BaseList.classPK в8CPorg/hsqldb/lib/Collection.classPK в8!'-#org/hsqldb/lib/DoubleIntIndex.classPK в8ow(org/hsqldb/lib/FileAccess$FileSync.classPK в8=morg/hsqldb/lib/FileAccess.classPK в8.ʊ&org/hsqldb/lib/FileUtil$FileSync.classPK в8^DI M org/hsqldb/lib/FileUtil.classPK в8gCk#: org/hsqldb/lib/HashMap$KeySet.classPK в8 #1#*org/hsqldb/lib/HashMap$Values.classPK в8τ4ߌzorg/hsqldb/lib/HashMap.classPK в8#Torg/hsqldb/lib/HashMappedList.classPK в8rKorg/hsqldb/lib/HashSet.classPK в8q["org/hsqldb/lib/HsqlArrayHeap.classPK в85}? "!#org/hsqldb/lib/HsqlArrayList.classPK Ѳ8r~&S -)org/hsqldb/lib/HsqlByteArrayInputStream.classPK Ѳ8jMs ..org/hsqldb/lib/HsqlByteArrayOutputStream.classPK Ѳ8Q94org/hsqldb/lib/HsqlDeque.classPK в8=]8org/hsqldb/lib/HsqlHeap.classPK Ѳ8nA(9org/hsqldb/lib/HsqlLinkedList$Node.classPK Ѳ8 ao#<;org/hsqldb/lib/HsqlLinkedList.classPK в845>org/hsqldb/lib/HsqlList.classPK Ѳ8N,$@org/hsqldb/lib/HsqlTaskQueue$1.classPK Ѳ8^*B-@org/hsqldb/lib/HsqlTaskQueue$TaskRunner.classPK Ѳ84:3"FCorg/hsqldb/lib/HsqlTaskQueue.classPK Ѳ8?f vp&Forg/hsqldb/lib/HsqlThreadFactory.classPK Ѳ8y#YHorg/hsqldb/lib/HsqlTimer$Task.classPK Ѳ8.2E(Korg/hsqldb/lib/HsqlTimer$TaskQueue.classPK Ѳ8~)wNorg/hsqldb/lib/HsqlTimer$TaskRunner.classPK Ѳ8?R62org/hsqldb/lib/StopWatch.classPK Ѳ8 org/hsqldb/lib/Storage.classPK Ѳ8ɟ$corg/hsqldb/lib/StringConverter.classPK в8|*홌c&porg/hsqldb/lib/StringInputStream.classPK Ѳ8pQq @org/hsqldb/lib/StringUtil.classPK Ѳ8^q"Ξorg/hsqldb/lib/ThreadFactory.classPK Ѳ8뢲M$org/hsqldb/lib/WrapperIterator.classPK Ѳ8R!sorg/hsqldb/lib/ZipUnzipFile.classPK Ѳ8`u$3org/hsqldb/lib/java/JavaSystem.classPK Ѳ8we 5org/hsqldb/persist/Cache$CachedObjectComparator.classPK Ѳ8j2 org/hsqldb/persist/Cache.classPK Ѳ80*9%org/hsqldb/persist/CachedObject.classPK Ѳ8'r41-Horg/hsqldb/persist/DataFileBlockManager.classPK Ѳ8T +&Gorg/hsqldb/persist/DataFileCache.classPK Ѳ8* 'org/hsqldb/persist/DataFileDefrag.classPK Ѳ8rLcY>)/org/hsqldb/persist/HsqlDatabaseProperties.classPK Ѳ84 X'/org/hsqldb/persist/HsqlProperties.classPK Ѳ8*#org/hsqldb/persist/LockFile$1.classPK Ѳ8-Ԛ /lorg/hsqldb/persist/LockFile$BaseException.classPK Ѳ8G[Ef?org/hsqldb/persist/LockFile$FileCanonicalizationException.classPK Ѳ8՜n7org/hsqldb/persist/LockFile$FileSecurityException.classPK Ѳ8,٭1org/hsqldb/persist/LockFile$HeartbeatRunner.classPK Ѳ8>4=org/hsqldb/persist/LockFile$LockHeldExternallyException.classPK Ѳ89TMg>org/hsqldb/persist/LockFile$UnexpectedEndOfFileException.classPK Ѳ8ڦ)^; org/hsqldb/persist/LockFile$UnexpectedFileIOException.classPK Ѳ8 jAorg/hsqldb/persist/LockFile$UnexpectedFileNotFoundException.classPK Ѳ8-h6"org/hsqldb/persist/LockFile$WrongLengthException.classPK Ѳ87' 5 org/hsqldb/persist/LockFile$WrongMagicException.classPK Ѳ8NZ$!p org/hsqldb/persist/LockFile.classPK Ѳ8I=I)org/hsqldb/persist/Log.classPK Ѳ8i.org/hsqldb/persist/Logger.classPK Ҳ8P$6org/hsqldb/persist/NIOLockFile.classPK Ѳ8;%bu(;org/hsqldb/persist/PersistentStore.classPK Ѳ8v[ ^%0=org/hsqldb/persist/ScaledRAFile.classPK Ҳ8uu,+uIorg/hsqldb/persist/ScaledRAFileHybrid.classPK Ѳ8ez= *Morg/hsqldb/persist/ScaledRAFileInJar.classPK Ҳ8RS(/Sorg/hsqldb/persist/ScaledRAFileNIO.classPK Ѳ8*>\org/hsqldb/persist/ScaledRAInterface.classPK Ѳ8, %3]org/hsqldb/persist/ScriptRunner.classPK Ѳ8gs:,corg/hsqldb/persist/TextCache$ByteArray.classPK Ѳ8x}#"forg/hsqldb/persist/TextCache.classPK Ѳ8VU (nworg/hsqldb/resources/BundleHandler.classPK Ҳ8Dt[L&Ҳ. ~org/hsqldb/resources/column-remarks.propertiesPK Ҳ8ӥlc7-org/hsqldb/resources/content-types.propertiesPK Ҳ8^k!LJ;Porg/hsqldb/resources/data-type-create-parameters.propertiesPK Ҳ8k^;S >/org/hsqldb/resources/data-type-names.propertiesPK Ҳ8rh71Norg/hsqldb/resources/data-type-remarks.propertiesPK Ҳ8\Gq^.porg/hsqldb/resources/java_lang_Math.propertiesPK Ҳ8妻Z>org/hsqldb/resources/org_hsqldb_DatabaseClassLoader.propertiesPK Ҳ8C2j2!org/hsqldb/resources/org_hsqldb_Library.propertiesPK Ҳ84Z :org/hsqldb/resources/org_hsqldb_Server_messages.propertiesPK Ҳ8S2Su 0!2org/hsqldb/resources/sql-error-messages.propertiesPK Ҳ8W4&5Jorg/hsqldb/resources/sql-error-messages_it.propertiesPK Ҳ8Jù7[-Jorg/hsqldb/resources/table-remarks.propertiesPK Ҳ8]\6)org/hsqldb/resources/webserver.propertiesPK Ѳ8?_zQr #|org/hsqldb/rowio/RowInputBase.classPK Ѳ8bc % org/hsqldb/rowio/RowInputBinary.classPK Ѳ8*(org/hsqldb/rowio/RowInputInterface.classPK Ѳ8-<org/hsqldb/util/DatabaseManagerSwing$10.classPK Ӳ8r|-=org/hsqldb/util/DatabaseManagerSwing$11.classPK Ӳ8 r62,?org/hsqldb/util/DatabaseManagerSwing$2.classPK Ӳ83,Aorg/hsqldb/util/DatabaseManagerSwing$3.classPK Ӳ8 "ޢ,Corg/hsqldb/util/DatabaseManagerSwing$4.classPK Ӳ8D^b,Eorg/hsqldb/util/DatabaseManagerSwing$5.classPK Ӳ8_"_b,Gorg/hsqldb/util/DatabaseManagerSwing$6.classPK Ӳ8p,+Iorg/hsqldb/util/DatabaseManagerSwing$7.classPK Ӳ8_,Korg/hsqldb/util/DatabaseManagerSwing$8.classPK Ӳ8vW^,Morg/hsqldb/util/DatabaseManagerSwing$9.classPK Ӳ8\^ 3Porg/hsqldb/util/DatabaseManagerSwing$DBMPrefs.classPK Ӳ8~Ģ@Uorg/hsqldb/util/DatabaseManagerSwing$StatementExecRunnable.classPK Ӳ8y߃LS*Xorg/hsqldb/util/DatabaseManagerSwing.classPK Ӳ8>g'org/hsqldb/util/FontDialogSwing$1.classPK Ӳ8Yg'org/hsqldb/util/FontDialogSwing$2.classPK Ӳ8\g'Borg/hsqldb/util/FontDialogSwing$3.classPK Ӳ8,'org/hsqldb/util/FontDialogSwing$4.classPK Ӳ817'org/hsqldb/util/FontDialogSwing$5.classPK Ӳ88Ӧf'{org/hsqldb/util/FontDialogSwing$6.classPK Ӳ8LVL'org/hsqldb/util/FontDialogSwing$7.classPK Ӳ8k#Y %Morg/hsqldb/util/FontDialogSwing.classPK Ҳ8{org/hsqldb/util/GreenCircle.gifPK Ҳ8OHC org/hsqldb/util/Grid.classPK Ӳ85pM rorg/hsqldb/util/GridSwing.classPK Ҳ8E*2org/hsqldb/util/Hourglass.gifPK Ҳ8&!org/hsqldb/util/Italic.gifPK Ҳ8 ]C!rorg/hsqldb/util/MainInvoker.classPK Ҳ8l* corg/hsqldb/util/RCData.classPK Ҳ8m;*porg/hsqldb/util/RedCircle.gifPK Ҳ8BG6uorg/hsqldb/util/RefCapablePropertyResourceBundle.classPK Ҳ87B+ ~ org/hsqldb/util/ScriptTool.classPK Ҳ8f $yorg/hsqldb/util/ShutdownServer.classPK Ҳ8gQ`(org/hsqldb/util/SqlFile$BadSpecial.classPK Ҳ8w%&T org/hsqldb/util/SqlFile$BadSubst.classPK Ҳ8X_+ org/hsqldb/util/SqlFile$BooleanBucket.classPK Ҳ8"}E, org/hsqldb/util/SqlFile$BreakException.classPK Ҳ8i4E/ org/hsqldb/util/SqlFile$ContinueException.classPK Ҳ8׵@ %! org/hsqldb/util/SqlFile$QuitNow.classPK Ҳ8 ,5s& org/hsqldb/util/SqlFile$RowError.classPK Ҳ8+] [ org/hsqldb/util/SqlFile.classPK Ҳ8W!(h org/hsqldb/util/SqlTool$BadCmdline.classPK Ҳ8`< o.Ei org/hsqldb/util/SqlTool$PrivateException.classPK Ҳ8NzJ .j org/hsqldb/util/SqlTool$SqlToolException.classPK Ҳ8z!1l org/hsqldb/util/SqlTool.classPK Ҳ8V"l~ org/hsqldb/util/SqlToolError.classPK Ҳ8õ3vC $ org/hsqldb/util/SqlToolSprayer.classPK Ҳ8%e!L׆ org/hsqldb/util/SqltoolRB.classPK Ӳ8V#y org/hsqldb/util/TableSorter$1.classPK Ӳ8O #ȩ org/hsqldb/util/TableSorter$2.classPK Ӳ8!ԃl' org/hsqldb/util/TableSorter$Arrow.classPK Ӳ8u)+ org/hsqldb/util/TableSorter$Directive.classPK Ӳ85. org/hsqldb/util/TableSorter$MouseHandler.classPK Ӳ8 up%u org/hsqldb/util/TableSorter$Row.classPK Ӳ8)㰪s8 org/hsqldb/util/TableSorter$SortableHeaderRenderer.classPK Ӳ8N} 3V org/hsqldb/util/TableSorter$TableModelHandler.classPK Ӳ8 {!' org/hsqldb/util/TableSorter.classPK Ҳ8 `1+K org/hsqldb/util/Traceable.classPK Ҳ8a ue org/hsqldb/util/Tree.classPK Ҳ8dǀ;. org/hsqldb/util/ValidatingResourceBundle.classPK Ҳ8fa org/hsqldb/util/hsqldb.gifPK Ҳ8A org/hsqldb/util/problems.gifPK Ҳ8 "d org/hsqldb/util/run_exc.gifPK Ҳ85."$ org/hsqldb/util/sqltool.propertiesPK Ҳ8f&+% org/hsqldb/util/sqltool/SqlFile.banner.textPK Ҳ8&aOdy. org/hsqldb/util/sqltool/SqlFile.banner_de.textPK Ҳ8ֿ%+D org/hsqldb/util/sqltool/SqlTool.syntax.textPK Ҳ8DM .c org/hsqldb/util/sqltool/SqlTool.syntax_de.textPK Ҳ8( org/hsqldb/util/sqltool/buffer.help.textPK Ҳ8EJIZ+ org/hsqldb/util/sqltool/buffer.help_de.textPK Ҳ87F$& org/hsqldb/util/sqltool/d.options.textPK Ҳ8ެt) org/hsqldb/util/sqltool/d.options_de.textPK Ҳ8F,( org/hsqldb/util/sqltool/dsv.options.textPK Ҳ8??u+L org/hsqldb/util/sqltool/dsv.options_de.textPK Ҳ8*W}0.$c org/hsqldb/util/sqltool/errorat.textPK Ҳ8:d20' org/hsqldb/util/sqltool/errorat_de.textPK Ҳ8Bsa x $L org/hsqldb/util/sqltool/pl.help.textPK Ҳ8* 9 ' org/hsqldb/util/sqltool/pl.help_de.textPK Ҳ8VH$'U org/hsqldb/util/sqltool/raw.leadin.textPK Ҳ8}@Z* org/hsqldb/util/sqltool/raw.leadin_de.textPK Ҳ8H{0 org/hsqldb/util/sqltool/rejectreport.bottom.textPK Ҳ8H{3 org/hsqldb/util/sqltool/rejectreport.bottom_de.textPK Ҳ8p- org/hsqldb/util/sqltool/rejectreport.row.textPK Ҳ8p0o org/hsqldb/util/sqltool/rejectreport.row_de.textPK Ҳ8Gڷ*-- org/hsqldb/util/sqltool/rejectreport.top.textPK Ҳ8Gڷ*0F org/hsqldb/util/sqltool/rejectreport.top_de.textPK Ҳ8u)b org/hsqldb/util/sqltool/special.help.textPK Ҳ8.%1,x# org/hsqldb/util/sqltool/special.help_de.textPK Ҳ8;K7a3%& org/hsqldb/util/sqltool_de.propertiesPK Ҳ8P*o5%: org/hsqldb/util/sqltool_nl.propertiesPK}zN hsqldb-1.8.0.10.orig/src/0000755000175000017500000000000010242420070013375 5ustar renerenehsqldb-1.8.0.10.orig/src/hsqlServlet.java0000644000175000017500000000677610243124716016605 0ustar renerene/* Copyright (c) 1995-2000, The Hypersonic SQL Group. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the Hypersonic SQL Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE HYPERSONIC SQL GROUP, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * This software consists of voluntary contributions made by many individuals * on behalf of the Hypersonic SQL Group. * * * For work added by the HSQL Development Group: * * Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ // This dummy class is required only because // the Servlets class must be in the root directory import org.hsqldb.Servlet; public class hsqlServlet extends Servlet { public hsqlServlet() { super(); } } hsqldb-1.8.0.10.orig/src/org/0000755000175000017500000000000010242420102014160 5ustar renerenehsqldb-1.8.0.10.orig/src/org/hsqldb/0000755000175000017500000000000010264606641015457 5ustar renerenehsqldb-1.8.0.10.orig/src/org/hsqldb/HsqlSocketFactorySecure.java0000644000175000017500000003222110416742471023102 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb; import java.net.InetAddress; import java.net.ServerSocket; import java.net.Socket; import java.net.UnknownHostException; import java.security.Principal; import java.security.Provider; import java.security.PublicKey; import java.security.Security; import javax.net.ssl.HandshakeCompletedEvent; import javax.net.ssl.HandshakeCompletedListener; import javax.net.ssl.SSLServerSocket; import javax.net.ssl.SSLServerSocketFactory; import javax.net.ssl.SSLSession; import javax.net.ssl.SSLSocket; import javax.net.ssl.SSLSocketFactory; import javax.security.cert.X509Certificate; import org.hsqldb.lib.StringConverter; /** * The default secure socket factory implementation. * * @author unsaved@users * @author boucherb@users * @version 1.7.2 * @since 1.7.2 */ public final class HsqlSocketFactorySecure extends HsqlSocketFactory implements HandshakeCompletedListener { // --------------------------------- members ----------------------------------- /** The underlying socket factory implementation. */ protected Object socketFactory; /** The underlying server socket factory implementation. */ protected Object serverSocketFactory; /** * Monitor object to guard against conncurrent modification * of the underlying socket factory implementation member. */ protected final Object socket_factory_mutex = new Object(); /** * Monitor object to guard against concurrent modification of * the underlying server socket factory implementation member. */ protected final Object server_socket_factory_mutex = new Object(); // ------------------------------ constructors --------------------------------- /** * External construction disabled. New factory instances are retreived * through the newHsqlSocketFactory method instead. */ protected HsqlSocketFactorySecure() throws Exception { super(); Provider p; String cls; if (Security.getProvider("SunJSSE") == null) { try { p = (Provider) Class.forName( "com.sun.net.ssl.internal.ssl.Provider").newInstance(); Security.addProvider(p); } catch (Exception e) {} } } // ----------------------------- subclass overrides ---------------------------- public void configureSocket(Socket socket) { SSLSocket s; super.configureSocket(socket); s = (SSLSocket) socket; s.addHandshakeCompletedListener(this); } /** * Creates a secure server socket bound to the specified port. * The socket is configured with the socket options * given to this factory. * * @return the secure ServerSocket * @param port the port to which to bind the secure ServerSocket * @throws Exception if a network or security provider error occurs */ public ServerSocket createServerSocket(int port) throws Exception { SSLServerSocket ss; ss = (SSLServerSocket) getServerSocketFactoryImpl() .createServerSocket(port); if (Trace.TRACE) { Trace.printSystemOut("[" + this + "]: createServerSocket()"); Trace.printSystemOut("capabilities for " + ss + ":"); Trace.printSystemOut("----------------------------"); dump("supported cipher suites", ss.getSupportedCipherSuites()); dump("enabled cipher suites", ss.getEnabledCipherSuites()); } return ss; } /** * Creates a secure server socket bound to the specified port. * The socket is configured with the socket options * given to this factory. * * @return the secure ServerSocket * @param port the port to which to bind the secure ServerSocket * @throws Exception if a network or security provider error occurs */ public ServerSocket createServerSocket(int port, String address) throws Exception { SSLServerSocket ss; InetAddress addr; addr = InetAddress.getByName(address); ss = (SSLServerSocket) getServerSocketFactoryImpl() .createServerSocket(port, 128, addr); if (Trace.TRACE) { Trace.printSystemOut("[" + this + "]: createServerSocket()"); Trace.printSystemOut("capabilities for " + ss + ":"); Trace.printSystemOut("----------------------------"); dump("supported cipher suites", ss.getSupportedCipherSuites()); dump("enabled cipher suites", ss.getEnabledCipherSuites()); } return ss; } private static void dump(String title, String[] as) { Trace.printSystemOut(title); Trace.printSystemOut("----------------------------"); for (int i = 0; i < as.length; i++) { Trace.printSystemOut(String.valueOf(as[i])); } Trace.printSystemOut("----------------------------"); } /** * Creates a secure Socket and connects it to the specified remote host * at the specified remote port. This socket is configured using the * socket options established for this factory. * * @return the socket * @param host the server host * @param port the server port * @throws Exception if a network or security provider error occurs */ public Socket createSocket(String host, int port) throws Exception { SSLSocket socket; socket = (SSLSocket) getSocketFactoryImpl().createSocket(host, port); socket.addHandshakeCompletedListener(this); socket.startHandshake(); // unsaved@users // For https protocol, the protocol handler should do this verification // (Sun's implementation does), but if we do not use the Protocol // handler (which is only available in Java >= 1.4), then we need to do // the verification: hostname == cert CN // // boucherb@users 20030503: // CHEKME/TODO: // // Stricter verify? Either require SunJSSE (assume its trust manager properly // verifies whole chain), or implement our own TrustManager layer? // // What about v1/v3 and signing checks (re: man-in-the-middle attack), // CRL check, basic constraints? notBefore? notAfter? // // Reference: http://www.securitytracker.com/alerts/2002/Aug/1005030.html // // That is, we can't guarantee that installed/prefered provider trust manager // implementations verify the whole chain properly and there are still // v1 certs out there (i.e. have no basic constraints, etc.), meaning that // we should check for and reject any intermediate certs that are not v3+ // (cannot be checked for basic constraints). Only root and intermediate // certs found in the trust store should be allowed to be v1 (since we must // be trusing them for them to be there). All other intermediate signers, // however, should be required to be v3+, otherwise anybody with any kind // of cert issued somehow via a trust chain from the root can pose as an // intermediate signing CA and hence leave things open to man-in-the-middle // style attack. Also, we should really check CRLs, just in case // it turns out that trust chain has been breached and thus issuer has revoked // on some cert(s). Of course, this really begs the question, as it is not // guaranteed that all CAs in trust store have valid, working CRL URL // // So what to do? // // Maybe best to leave this all up to DBA? verify(host, socket.getSession()); return socket; } /** * Retrieves whether this factory produces secure sockets. * * @return true iff this factory creates secure sockets */ public boolean isSecure() { return true; } // ----------------------- internal implementation ----------------------------- /** * Retrieves the underlying javax.net.ssl.SSLServerSocketFactory. * * @throws Exception if there is a problem retrieving the * underlying factory * @return the underlying javax.net.ssl.SSLServerSocketFactory */ protected SSLServerSocketFactory getServerSocketFactoryImpl() throws Exception { Object factory; synchronized (server_socket_factory_mutex) { factory = serverSocketFactory; if (factory == null) { factory = SSLServerSocketFactory.getDefault(); serverSocketFactory = factory; } } return (SSLServerSocketFactory) factory; } /** * Retrieves the underlying javax.net.ssl.SSLSocketFactory. * * @throws Exception if there is a problem retrieving the * underlying factory * @return the underlying javax.net.ssl.SSLSocketFactory */ protected SSLSocketFactory getSocketFactoryImpl() throws Exception { Object factory; synchronized (socket_factory_mutex) { factory = socketFactory; if (factory == null) { factory = SSLSocketFactory.getDefault(); socketFactory = factory; } } return (SSLSocketFactory) factory; } /** * Verifyies the certificate chain presented by the server to which * a secure Socket has just connected. Specifically, the provided host * name is checked against the Common Name of the server certificate; * additional checks may or may not be performed. * * @param host the requested host name * @param session SSLSession used on the connection to host * @throws Exception if the certificate chain cannot be verified */ protected void verify(String host, SSLSession session) throws Exception { X509Certificate[] chain; X509Certificate certificate; Principal principal; PublicKey publicKey; String DN; String CN; int start; int end; String emsg; chain = session.getPeerCertificateChain(); certificate = chain[0]; principal = certificate.getSubjectDN(); DN = String.valueOf(principal); start = DN.indexOf("CN="); if (start < 0) { throw new UnknownHostException( Trace.getMessage(Trace.HsqlSocketFactorySecure_verify)); } start += 3; end = DN.indexOf(',', start); CN = DN.substring(start, (end > -1) ? end : DN.length()); if (CN.length() < 1) { throw new UnknownHostException( Trace.getMessage(Trace.HsqlSocketFactorySecure_verify2)); } if (!CN.equalsIgnoreCase(host)) { // TLS_HOSTNAME_MISMATCH throw new UnknownHostException( Trace.getMessage( Trace.HsqlSocketFactorySecure_verify3, true, new Object[] { CN, host })); } } public void handshakeCompleted(HandshakeCompletedEvent evt) { SSLSession session; String sessionId; SSLSocket socket; if (Trace.TRACE) { socket = evt.getSocket(); session = evt.getSession(); Trace.printSystemOut("SSL handshake completed:"); Trace.printSystemOut( "------------------------------------------------"); Trace.printSystemOut("socket: : " + socket); Trace.printSystemOut("cipher suite : " + session.getCipherSuite()); sessionId = StringConverter.byteToHex(session.getId()); Trace.printSystemOut("session id : " + sessionId); Trace.printSystemOut( "------------------------------------------------"); } } } hsqldb-1.8.0.10.orig/src/org/hsqldb/scriptio/0000755000175000017500000000000010242420102017271 5ustar renerenehsqldb-1.8.0.10.orig/src/org/hsqldb/scriptio/ScriptReaderText.java0000644000175000017500000001702010621716666023420 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.scriptio; import java.io.BufferedInputStream; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import org.hsqldb.Database; import org.hsqldb.HsqlException; import org.hsqldb.Result; import org.hsqldb.Session; import org.hsqldb.Trace; import org.hsqldb.lib.SimpleLog; import org.hsqldb.lib.StringConverter; import org.hsqldb.rowio.RowInputTextLog; /** * Handles operations involving reading back a script or log file written * out by ScriptWriterText. This implementation * corresponds to ScriptWriterText. * * @author fredt@users * @version 1.8.0 * @since 1.7.2 */ public class ScriptReaderText extends ScriptReaderBase { // this is used only to enable reading one logged line at a time BufferedReader dataStreamIn; RowInputTextLog rowIn; boolean isInsert; ScriptReaderText(Database db, String file) throws HsqlException, IOException { super(db, file); rowIn = new RowInputTextLog(); } protected void openFile() throws IOException { InputStream d = db.isFilesInJar() ? getClass().getResourceAsStream(fileName) : db.getFileAccess().openInputStreamElement(fileName); dataStreamIn = new BufferedReader( new InputStreamReader(new BufferedInputStream(d))); } protected void readDDL(Session session) throws IOException, HsqlException { for (; readLoggedStatement(session); ) { if (rowIn.getStatementType() == INSERT_STATEMENT) { isInsert = true; break; } Result result = session.sqlExecuteDirectNoPreChecks(statement); if (result != null && result.isError()) { db.logger.appLog.logContext(SimpleLog.LOG_ERROR, result.getMainString()); HsqlException error = Trace.error(Trace.ERROR_IN_SCRIPT_FILE, Trace.DatabaseScriptReader_readDDL, new Object[] { new Integer(lineCount), result.getMainString() }); /** @todo fredt - if unavaialble external functions are to be ignored */ throw error; } } } protected void readExistingData(Session session) throws IOException, HsqlException { try { String tablename = null; // fredt - needed for forward referencing FK constraints db.setReferentialIntegrity(false); for (; isInsert || readLoggedStatement(session); isInsert = false) { if (statementType == SCHEMA_STATEMENT) { session.setSchema(currentSchema); continue; } else if (statementType == INSERT_STATEMENT) { if (!rowIn.getTableName().equals(tablename)) { tablename = rowIn.getTableName(); String schema = session.getSchemaName(currentSchema); currentTable = db.schemaManager.getUserTable(session, tablename, schema); } currentTable.insertFromScript(rowData); } } db.setReferentialIntegrity(true); } catch (Exception e) { db.logger.appLog.logContext(e, null); throw Trace.error(Trace.ERROR_IN_SCRIPT_FILE, Trace.DatabaseScriptReader_readExistingData, new Object[] { new Integer(lineCount), e.toString() }); } } public boolean readLoggedStatement(Session session) throws IOException { //fredt temporary solution - should read bytes directly from buffer String s = dataStreamIn.readLine(); lineCount++; // System.out.println(lineCount); statement = StringConverter.asciiToUnicode(s); if (statement == null) { return false; } processStatement(session); return true; } private void processStatement(Session session) throws IOException { try { if (statement.startsWith("/*C")) { int endid = statement.indexOf('*', 4); sessionNumber = Integer.parseInt(statement.substring(3, endid)); statement = statement.substring(endid + 2); } rowIn.setSource(statement); statementType = rowIn.getStatementType(); if (statementType == ANY_STATEMENT) { rowData = null; currentTable = null; return; } else if (statementType == COMMIT_STATEMENT) { rowData = null; currentTable = null; return; } else if (statementType == SCHEMA_STATEMENT) { rowData = null; currentTable = null; currentSchema = rowIn.getSchemaName(); return; } String name = rowIn.getTableName(); String schema = session.getSchemaName(null); currentTable = db.schemaManager.getUserTable(session, name, schema); int[] colTypes; if (statementType == INSERT_STATEMENT) { colTypes = currentTable.getColumnTypes(); } else if (currentTable.hasPrimaryKey()) { colTypes = currentTable.getPrimaryKeyTypes(); } else { colTypes = currentTable.getColumnTypes(); } rowData = rowIn.readData(colTypes); } catch (Exception e) { throw new IOException(e.toString()); } } public void close() { try { dataStreamIn.close(); } catch (Exception e) {} } } hsqldb-1.8.0.10.orig/src/org/hsqldb/scriptio/ScriptWriterZipped.java0000644000175000017500000000626310456536715024011 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.scriptio; import java.io.IOException; import java.util.zip.Deflater; import java.util.zip.DeflaterOutputStream; import org.hsqldb.Database; import org.hsqldb.HsqlException; import org.hsqldb.Trace; import org.hsqldb.lib.FileAccess; /** * * @author fredt@users * @since 1.7.2 * @version 1.7.2 */ class ScriptWriterZipped extends ScriptWriterBinary { private static final int bufferSize = 1 << 15; ScriptWriterZipped(Database db, String file, boolean includeCached, boolean newFile) throws HsqlException { super(db, file, includeCached, newFile); } /** * Override the underlying method with no operation. */ public void sync() {} protected void openFile() throws HsqlException { try { FileAccess fa = database.getFileAccess(); java.io.OutputStream fos = fa.openOutputStreamElement(outFile); outDescriptor = fa.getFileSync(fos); fileStreamOut = new DeflaterOutputStream(fos, new Deflater(Deflater.DEFAULT_COMPRESSION), bufferSize); } catch (IOException e) { throw Trace.error(Trace.FILE_IO_ERROR, Trace.Message_Pair, new Object[] { e.toString(), outFile }); } } /** * This may not really be necessary, unless we add implementations where * non-compressed data is added to the end of the copressed part. */ protected void finishStream() throws IOException { ((DeflaterOutputStream) fileStreamOut).finish(); fileStreamOut.flush(); } } hsqldb-1.8.0.10.orig/src/org/hsqldb/scriptio/ScriptReaderZipped.java0000644000175000017500000000520510766531540023725 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.scriptio; import java.io.BufferedInputStream; import java.io.DataInputStream; import java.io.IOException; import java.io.InputStream; import java.util.zip.Inflater; import java.util.zip.InflaterInputStream; import org.hsqldb.Database; import org.hsqldb.HsqlException; /** * * @author fredt@users * @since 1.7.2 * @version 1.8.0 */ class ScriptReaderZipped extends ScriptReaderBinary { ScriptReaderZipped(Database db, String file) throws HsqlException, IOException { super(db, file); } protected void openFile() throws IOException { InputStream d = db.isFilesInJar() ? getClass().getResourceAsStream(fileName) : db.getFileAccess().openInputStreamElement(fileName); dataStreamIn = new DataInputStream( new BufferedInputStream( new InflaterInputStream(d, new Inflater()), 1 << 13)); } public void close() { try { ((DataInputStream) dataStreamIn).close(); } catch (IOException e) {} } } hsqldb-1.8.0.10.orig/src/org/hsqldb/scriptio/ScriptWriterBinary.java0000644000175000017500000001112010416742477023766 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.scriptio; import java.io.IOException; import org.hsqldb.Database; import org.hsqldb.HsqlException; import org.hsqldb.NumberSequence; import org.hsqldb.Result; import org.hsqldb.Session; import org.hsqldb.Table; import org.hsqldb.rowio.RowOutputBinary; /** * @author fredt@users * @since 1.8.0 * @version 1.7.2 */ class ScriptWriterBinary extends ScriptWriterBase { RowOutputBinary rowOut; ScriptWriterBinary(Database db, String file, boolean includeCached, boolean newFile) throws HsqlException { super(db, file, includeCached, newFile, false); } protected void initBuffers() { rowOut = new RowOutputBinary(); } protected void writeSingleColumnResult(Result r) throws IOException, HsqlException { Result.write(r, rowOut, fileStreamOut); } // int : row size (0 if no more rows) , // RowInput/OutputBinary : row (column values) protected void writeRow(Session session, Table t, Object[] data) throws IOException, HsqlException { rowOut.reset(); rowOut.writeRow(data, t); fileStreamOut.write(rowOut.getBuffer(), 0, rowOut.size()); tableRowCount++; } // int : headersize (0 if no more tables), String : tablename, int : operation, protected void writeTableInit(Table t) throws HsqlException, IOException { tableRowCount = 0; rowOut.reset(); rowOut.writeSize(0); rowOut.writeString(t.getName().name); rowOut.writeIntData(INSERT_WITH_SCHEMA); rowOut.writeString(t.getSchemaName()); rowOut.writeIntData(rowOut.size(), 0); fileStreamOut.write(rowOut.getBuffer(), 0, rowOut.size()); } protected void writeTableTerm(Table t) throws IOException { rowOut.reset(); rowOut.writeSize(0); rowOut.writeIntData(this.tableRowCount); fileStreamOut.write(rowOut.getBuffer(), 0, rowOut.size()); } protected void writeDataTerm() throws IOException { rowOut.reset(); rowOut.writeSize(0); fileStreamOut.write(rowOut.getBuffer(), 0, rowOut.size()); } public void writeLogStatement(Session session, String s) throws IOException, HsqlException {} protected void addSessionId(Session session) throws IOException {} public void writeDeleteStatement(Session session, Table table, Object[] ddata) throws HsqlException, IOException {} public void writeSequenceStatement(Session session, NumberSequence seq) throws HsqlException, IOException {} public void writeInsertStatement(Session session, Table table, Object[] data) throws HsqlException, IOException {} public void writeCommitStatement(Session session) throws HsqlException, IOException {} } hsqldb-1.8.0.10.orig/src/org/hsqldb/scriptio/ScriptWriterBase.java0000644000175000017500000003354110712346721023416 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.scriptio; import java.io.BufferedOutputStream; import java.io.IOException; import java.io.OutputStream; import org.hsqldb.HsqlNameManager.HsqlName; import org.hsqldb.Database; import org.hsqldb.DatabaseManager; import org.hsqldb.DatabaseScript; import org.hsqldb.HsqlException; import org.hsqldb.NumberSequence; import org.hsqldb.Result; import org.hsqldb.Session; import org.hsqldb.Table; import org.hsqldb.Token; import org.hsqldb.Trace; import org.hsqldb.index.RowIterator; import org.hsqldb.lib.FileAccess; import org.hsqldb.lib.FileUtil; import org.hsqldb.lib.HsqlTimer; import org.hsqldb.lib.Iterator; import org.hsqldb.lib.SimpleLog; //import org.hsqldb.lib.StopWatch; // todo - can lock the database engine as readonly in a wrapper for this when // used at checkpoint /** * Handles all logging to file operations. A log consists of three blocks:

* * DDL BLOCK: definition of DB objects, users and rights at startup time
* DATA BLOCK: all data for MEMORY tables at startup time
* LOG BLOCK: SQL statements logged since startup or the last CHECKPOINT
* * The implementation of this class and its subclasses support the formats * used for writing the data. In versions up to 1.7.2, this data is written * to the *.script file for the database. Since 1.7.2 the data can also be * written as binray in order to speed up shutdown and startup.

* * In 1.7.2, two separate files are used, one for the DDL + DATA BLOCK and * the other for the LOG BLOCK.

* * A related use for this class is for saving a current snapshot of the * database data to a user-defined file. This happens in the SHUTDOWN COMPACT * process or done as a result of the SCRIPT command. In this case, the * DATA block contains the CACHED table data as well.

* * DatabaseScriptReader and its subclasses read back the data at startup time. * * @author fredt@users * @version 1.8.0 * @since 1.7.2 */ public abstract class ScriptWriterBase implements Runnable { Database database; String outFile; OutputStream fileStreamOut; FileAccess.FileSync outDescriptor; int tableRowCount; HsqlName schemaToLog; /** * this determines if the script is the normal script (false) used * internally by the engine or a user-initiated snapshot of the DB (true) */ boolean isDump; boolean includeCachedData; long byteCount; volatile boolean needsSync; volatile boolean forceSync; volatile boolean busyWriting; private int syncCount; static final int INSERT = 0; static final int INSERT_WITH_SCHEMA = 1; /** the last schema for last sessionId */ Session currentSession; public static final String[] LIST_SCRIPT_FORMATS = new String[] { Token.T_TEXT, Token.T_BINARY, null, Token.T_COMPRESSED }; public static final int SCRIPT_TEXT_170 = 0; public static final int SCRIPT_BINARY_172 = 1; public static final int SCRIPT_ZIPPED_BINARY_172 = 3; public static ScriptWriterBase newScriptWriter(Database db, String file, boolean includeCachedData, boolean newFile, int scriptType) throws HsqlException { if (scriptType == SCRIPT_TEXT_170) { return new ScriptWriterText(db, file, includeCachedData, newFile, false); } else if (scriptType == SCRIPT_BINARY_172) { return new ScriptWriterBinary(db, file, includeCachedData, newFile); } else { return new ScriptWriterZipped(db, file, includeCachedData, newFile); } } ScriptWriterBase() {} ScriptWriterBase(Database db, String file, boolean includeCachedData, boolean isNewFile, boolean isDump) throws HsqlException { this.isDump = isDump; initBuffers(); boolean exists = false; if (isDump) { exists = FileUtil.getDefaultInstance().exists(file); } else { exists = db.getFileAccess().isStreamElement(file); } if (exists && isNewFile) { throw Trace.error(Trace.FILE_IO_ERROR, file); } this.database = db; this.includeCachedData = includeCachedData; outFile = file; currentSession = database.sessionManager.getSysSession(); // start with neutral schema - no SET SCHEMA to log schemaToLog = currentSession.loggedSchema = currentSession.currentSchema; openFile(); } public void reopen() throws HsqlException { openFile(); } protected abstract void initBuffers(); /** * Called internally or externally in write delay intervals. */ public synchronized void sync() { if (needsSync && fileStreamOut != null) { if (busyWriting) { forceSync = true; return; } try { fileStreamOut.flush(); outDescriptor.sync(); syncCount++; } catch (IOException e) { Trace.printSystemOut("flush() or sync() error: " + e.toString()); } needsSync = false; forceSync = false; } } public void close() throws HsqlException { stop(); try { if (fileStreamOut != null) { fileStreamOut.flush(); outDescriptor.sync(); fileStreamOut.close(); fileStreamOut = null; } } catch (IOException e) { throw Trace.error(Trace.FILE_IO_ERROR); } byteCount = 0; } public long size() { return byteCount; } public void writeAll() throws HsqlException { try { writeDDL(); writeExistingData(); finishStream(); } catch (IOException e) { throw Trace.error(Trace.FILE_IO_ERROR); } } /** * File is opened in append mode although in current usage the file * never pre-exists */ protected void openFile() throws HsqlException { try { FileAccess fa = isDump ? FileUtil.getDefaultInstance() : database.getFileAccess(); OutputStream fos = fa.openOutputStreamElement(outFile); outDescriptor = fa.getFileSync(fos); fileStreamOut = new BufferedOutputStream(fos, 2 << 12); } catch (IOException e) { throw Trace.error(Trace.FILE_IO_ERROR, Trace.Message_Pair, new Object[] { e.toString(), outFile }); } } /** * This is not really useful in the current usage but may be if this * class is used in a different way. */ protected void finishStream() throws IOException {} protected void writeDDL() throws IOException, HsqlException { Result ddlPart = DatabaseScript.getScript(database, !includeCachedData); writeSingleColumnResult(ddlPart); } protected void writeExistingData() throws HsqlException, IOException { // start with blank schema - SET SCHEMA to log currentSession.loggedSchema = null; Iterator schemas = database.schemaManager.userSchemaNameIterator(); while (schemas.hasNext()) { String schema = (String) schemas.next(); Iterator tables = database.schemaManager.tablesIterator(schema); while (tables.hasNext()) { Table t = (Table) tables.next(); // write all memory table data // write cached table data unless index roots have been written // write all text table data apart from readonly text tables // unless index roots have been written boolean script = false; switch (t.getTableType()) { case Table.MEMORY_TABLE : script = true; break; case Table.CACHED_TABLE : script = includeCachedData; break; case Table.TEXT_TABLE : script = includeCachedData &&!t.isReadOnly(); break; } int rowCount = 0; try { if (script) { schemaToLog = t.getName().schema; writeTableInit(t); RowIterator it = t.rowIterator(currentSession); rowCount = 0; while (it.hasNext()) { writeRow(currentSession, t, it.next().getData()); rowCount++; } writeTableTerm(t); } } catch (Throwable e) { this.database.logger.appLog.logContext( SimpleLog.LOG_ERROR, t.getName().name + " problem after row " + rowCount); System.gc(); throw Trace.error(Trace.ASSERT_FAILED, e.toString()); } } } writeDataTerm(); } protected void writeTableInit(Table t) throws HsqlException, IOException {} protected void writeTableTerm(Table t) throws HsqlException, IOException { if (t.isDataReadOnly() &&!t.isTemp() &&!t.isText()) { StringBuffer a = new StringBuffer("SET TABLE "); a.append(t.getName().statementName); a.append(" READONLY TRUE"); writeLogStatement(currentSession, a.toString()); } } protected void writeSingleColumnResult(Result r) throws HsqlException, IOException { Iterator it = r.iterator(); while (it.hasNext()) { Object[] data = (Object[]) it.next(); writeLogStatement(currentSession, (String) data[0]); } } abstract void writeRow(Session session, Table table, Object[] data) throws HsqlException, IOException; protected abstract void writeDataTerm() throws IOException; protected abstract void addSessionId(Session session) throws IOException; public abstract void writeLogStatement(Session session, String s) throws IOException, HsqlException; public abstract void writeInsertStatement(Session session, Table table, Object[] data) throws HsqlException, IOException; public abstract void writeDeleteStatement(Session session, Table table, Object[] data) throws HsqlException, IOException; public abstract void writeSequenceStatement(Session session, NumberSequence seq) throws HsqlException, IOException; public abstract void writeCommitStatement(Session session) throws HsqlException, IOException; // private Object timerTask; // long write delay for scripts : 60s protected volatile int writeDelay = 60000; public void run() { try { if (writeDelay != 0) { sync(); } // todo: try to do Cache.cleanUp() here, too } catch (Exception e) { // ignore exceptions // may be InterruptedException or IOException if (Trace.TRACE) { Trace.printSystemOut(e.toString()); } } } public void setWriteDelay(int delay) { writeDelay = delay; int period = writeDelay == 0 ? 1000 : writeDelay; HsqlTimer.setPeriod(timerTask, period); } public void start() { int period = writeDelay == 0 ? 1000 : writeDelay; timerTask = DatabaseManager.getTimer().schedulePeriodicallyAfter(0, period, this, false); } public void stop() { if (timerTask != null) { HsqlTimer.cancel(timerTask); timerTask = null; } } public int getWriteDelay() { return writeDelay; } } hsqldb-1.8.0.10.orig/src/org/hsqldb/scriptio/ScriptReaderBase.java0000644000175000017500000001067210621707246023346 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.scriptio; import java.io.IOException; import org.hsqldb.Database; import org.hsqldb.HsqlException; import org.hsqldb.NumberSequence; import org.hsqldb.Session; import org.hsqldb.Table; /** * Base class for all script readers. * * @author fredt@users * @version 1.7.2 * @since 1.7.2 */ public abstract class ScriptReaderBase { public static ScriptReaderBase newScriptReader(Database db, String file, int scriptType) throws HsqlException, IOException { if (scriptType == ScriptWriterBase.SCRIPT_TEXT_170) { return new ScriptReaderText(db, file); } else if (scriptType == ScriptWriterBase.SCRIPT_BINARY_172) { return new ScriptReaderBinary(db, file); } else { return new ScriptReaderZipped(db, file); } } public static final int ANY_STATEMENT = 1; public static final int DELETE_STATEMENT = 2; public static final int INSERT_STATEMENT = 3; public static final int SEQUENCE_STATEMENT = 4; public static final int COMMIT_STATEMENT = 5; public static final int SESSION_ID = 6; public static final int SCHEMA_STATEMENT = 7; Database db; int lineCount; // int byteCount; String fileName; ScriptReaderBase(Database db, String file) throws HsqlException, IOException { this.db = db; fileName = file; openFile(); } protected abstract void openFile() throws IOException; public void readAll(Session session) throws IOException, HsqlException { readDDL(session); readExistingData(session); } protected abstract void readDDL(Session session) throws IOException, HsqlException; protected abstract void readExistingData(Session session) throws IOException, HsqlException; public abstract boolean readLoggedStatement(Session session) throws IOException; int statementType; int sessionNumber; Object[] rowData; long sequenceValue; String statement; Table currentTable; NumberSequence currentSequence; String currentSchema; public int getStatementType() { return statementType; } public int getSessionNumber() { return sessionNumber; } public Object[] getData() { return rowData; } public String getLoggedStatement() { return statement; } public NumberSequence getCurrentSequence() { return currentSequence; } public long getSequenceValue() { return sequenceValue; } public Table getCurrentTable() { return currentTable; } public String getCurrentSchema() { return currentSchema; } public int getLineNumber() { return lineCount; } public abstract void close(); } hsqldb-1.8.0.10.orig/src/org/hsqldb/scriptio/ScriptWriterText.java0000644000175000017500000002207510457464205023474 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.scriptio; import java.io.IOException; import org.hsqldb.Database; import org.hsqldb.HsqlException; import org.hsqldb.HsqlNameManager; import org.hsqldb.HsqlNameManager.HsqlName; import org.hsqldb.NumberSequence; import org.hsqldb.Session; import org.hsqldb.Table; import org.hsqldb.rowio.RowOutputTextLog; /** * Handles all scripting and logging operations. A script consists of two blocks:

* * DDL: SQL statements for table and user definitions * DATA: INSERT statements for memory tables * * This happens as part of the CHECKPOINT and SHUTDOWN COMPACT * process. In this case, the * DATA block contains the CACHED table data as well.

* * A related use for this class is for saving a current snapshot of the * database data to a user-defined file with the SCRIPT command * * A log consists of SQL statements of different types. Each statement is * encoded as ASCII and saved. * * * @author fredt@users * @version 1.8.0 * @since 1.7.2 */ public class ScriptWriterText extends ScriptWriterBase { RowOutputTextLog rowOut; // todo - perhaps move this global into a lib utility class public static final byte[] BYTES_LINE_SEP; static { String sLineSep = System.getProperty("line.separator", "\n"); BYTES_LINE_SEP = sLineSep.getBytes(); } static final byte[] BYTES_COMMIT = "COMMIT".getBytes(); static final byte[] BYTES_INSERT_INTO = "INSERT INTO ".getBytes(); static final byte[] BYTES_VALUES = " VALUES(".getBytes(); static final byte[] BYTES_TERM = ")".getBytes(); static final byte[] BYTES_DELETE_FROM = "DELETE FROM ".getBytes(); static final byte[] BYTES_WHERE = " WHERE ".getBytes(); static final byte[] BYTES_SEQUENCE = "ALTER SEQUENCE ".getBytes(); static final byte[] BYTES_SEQUENCE_MID = " RESTART WITH ".getBytes(); static final byte[] BYTES_C_ID_INIT = "/*C".getBytes(); static final byte[] BYTES_C_ID_TERM = "*/".getBytes(); static final byte[] BYTES_SCHEMA = "SET SCHEMA ".getBytes(); ScriptWriterText() {} public ScriptWriterText(Database db, String file, boolean includeCachedData, boolean newFile, boolean isDump) throws HsqlException { super(db, file, includeCachedData, newFile, isDump); } protected void initBuffers() { rowOut = new RowOutputTextLog(); } protected void writeDataTerm() throws IOException {} protected void addSessionId(Session session) throws IOException { if (session == null) { return; } if (session != currentSession) { rowOut.write(BYTES_C_ID_INIT); rowOut.writeIntData(session.getId()); rowOut.write(BYTES_C_ID_TERM); currentSession = session; } if (schemaToLog != session.loggedSchema) { writeSchemaStatement(schemaToLog); session.loggedSchema = schemaToLog; } } private void writeSchemaStatement(HsqlName schema) { rowOut.write(BYTES_SCHEMA); rowOut.writeString(schema.statementName); rowOut.write(BYTES_LINE_SEP); } public void writeLogStatement(Session session, String s) throws IOException, HsqlException { schemaToLog = session.currentSchema; busyWriting = true; rowOut.reset(); addSessionId(session); rowOut.writeString(s); rowOut.write(BYTES_LINE_SEP); fileStreamOut.write(rowOut.getBuffer(), 0, rowOut.size()); byteCount += rowOut.size(); needsSync = true; busyWriting = false; if (forceSync || writeDelay == 0) { sync(); } } protected void writeRow(Session session, Table table, Object[] data) throws HsqlException, IOException { busyWriting = true; rowOut.reset(); ((RowOutputTextLog) rowOut).setMode(RowOutputTextLog.MODE_INSERT); addSessionId(session); rowOut.write(BYTES_INSERT_INTO); rowOut.writeString(table.getName().statementName); rowOut.write(BYTES_VALUES); rowOut.writeData(data, table); rowOut.write(BYTES_TERM); rowOut.write(BYTES_LINE_SEP); fileStreamOut.write(rowOut.getBuffer(), 0, rowOut.size()); byteCount += rowOut.size(); needsSync |= session.isAutoCommit(); busyWriting = false; if (forceSync || writeDelay == 0) { sync(); } } protected void writeTableInit(Table t) throws HsqlException, IOException { if (t.isEmpty(currentSession)) { return; } if (schemaToLog == currentSession.loggedSchema) { return; } rowOut.reset(); writeSchemaStatement(t.getName().schema); fileStreamOut.write(rowOut.getBuffer(), 0, rowOut.size()); currentSession.loggedSchema = schemaToLog; } public void writeInsertStatement(Session session, Table table, Object[] data) throws HsqlException, IOException { schemaToLog = table.getName().schema; writeRow(session, table, data); } public void writeDeleteStatement(Session session, Table table, Object[] data) throws HsqlException, IOException { schemaToLog = table.getName().schema; busyWriting = true; rowOut.reset(); ((RowOutputTextLog) rowOut).setMode(RowOutputTextLog.MODE_DELETE); addSessionId(session); rowOut.write(BYTES_DELETE_FROM); rowOut.writeString(table.getName().statementName); rowOut.write(BYTES_WHERE); rowOut.writeData(table.getColumnCount(), table.getColumnTypes(), data, table.columnList, table.getPrimaryKey()); rowOut.write(BYTES_LINE_SEP); fileStreamOut.write(rowOut.getBuffer(), 0, rowOut.size()); byteCount += rowOut.size(); needsSync |= session.isAutoCommit(); busyWriting = false; if (forceSync || writeDelay == 0) { sync(); } } public void writeSequenceStatement(Session session, NumberSequence seq) throws HsqlException, IOException { schemaToLog = seq.getName().schema; busyWriting = true; rowOut.reset(); addSessionId(session); rowOut.write(BYTES_SEQUENCE); rowOut.writeString(seq.getName().statementName); rowOut.write(BYTES_SEQUENCE_MID); rowOut.writeLongData(seq.peek()); rowOut.write(BYTES_LINE_SEP); fileStreamOut.write(rowOut.getBuffer(), 0, rowOut.size()); byteCount += rowOut.size(); needsSync = true; busyWriting = false; if (forceSync || writeDelay == 0) { sync(); } } public void writeCommitStatement(Session session) throws HsqlException, IOException { busyWriting = true; rowOut.reset(); addSessionId(session); rowOut.write(BYTES_COMMIT); rowOut.write(BYTES_LINE_SEP); fileStreamOut.write(rowOut.getBuffer(), 0, rowOut.size()); byteCount += rowOut.size(); needsSync = true; busyWriting = false; if (forceSync || writeDelay == 0) { sync(); } } protected void finalize() { sync(); } } hsqldb-1.8.0.10.orig/src/org/hsqldb/scriptio/ScriptReaderBinary.java0000644000175000017500000001471510505070743023716 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.scriptio; import java.io.BufferedInputStream; import java.io.DataInputStream; import java.io.EOFException; import java.io.IOException; import java.io.InputStream; import org.hsqldb.Database; import org.hsqldb.HsqlException; import org.hsqldb.Result; import org.hsqldb.ResultConstants; import org.hsqldb.Session; import org.hsqldb.Table; import org.hsqldb.Trace; import org.hsqldb.lib.Iterator; import org.hsqldb.lib.SimpleLog; import org.hsqldb.rowio.RowInputBase; import org.hsqldb.rowio.RowInputBinary; /** * Reader corresponding to BinaryDatabaseScritReader. * * @author fredt@users * @version 1.7.2 * @since 1.7.2 */ class ScriptReaderBinary extends ScriptReaderBase { private RowInputBinary rowIn; protected DataInputStream dataStreamIn; ScriptReaderBinary(Database db, String file) throws HsqlException, IOException { super(db, file); rowIn = new RowInputBinary(); } protected void openFile() throws IOException { InputStream d = db.isFilesInJar() ? getClass().getResourceAsStream(fileName) : db.getFileAccess().openInputStreamElement(fileName); dataStreamIn = new DataInputStream(new BufferedInputStream(d, 1 << 13)); } protected void readDDL(Session session) throws IOException, HsqlException { Result r = Result.read(rowIn, dataStreamIn); Iterator it = r.iterator(); while (it.hasNext()) { Object[] data = (Object[]) it.next(); String s = (String) data[0]; Result result = session.sqlExecuteDirectNoPreChecks(s); if (result.isError()) { db.logger.appLog.logContext(SimpleLog.LOG_ERROR, result.getMainString()); /** @todo fredt - trap if unavaialble external functions are to be ignored */ throw Trace.error(result); } } } protected void readExistingData(Session session) throws IOException, HsqlException { for (;;) { String s = readTableInit(); if (s == null) { break; } String schema = session.getSchemaName(currentSchema); Table t = db.schemaManager.getUserTable(session, s, schema); int j = 0; for (j = 0; ; j++) { if (readRow(t) == false) { break; } } int checkCount = readTableTerm(); if (j != checkCount) { throw Trace.error(Trace.ERROR_IN_SCRIPT_FILE, Trace.ERROR_IN_BINARY_SCRIPT_1, new Object[] { s, new Integer(j), new Integer(checkCount) }); } } } // int : row size (0 if no more rows) , // BinaryServerRowInput : row (column values) protected boolean readRow(Table t) throws IOException, HsqlException { boolean more = readRow(rowIn, 0); if (!more) { return false; } Object[] data = rowIn.readData(t.getColumnTypes()); t.insertFromScript(data); return true; } // int : rowcount protected int readTableTerm() throws IOException, HsqlException { return dataStreamIn.readInt(); } // int : headersize (0 if no more tables), String : tablename, int : operation, // String : schemaname protected String readTableInit() throws IOException, HsqlException { boolean more = readRow(rowIn, 0); if (!more) { return null; } String s = rowIn.readString(); // operation is always INSERT int checkOp = rowIn.readIntData(); if (checkOp == ScriptWriterBase.INSERT_WITH_SCHEMA) { currentSchema = rowIn.readString(); } else { currentSchema = null; } if (checkOp != ScriptWriterBase.INSERT && checkOp != ScriptWriterBase.INSERT_WITH_SCHEMA) { throw Trace.error(Trace.ERROR_IN_SCRIPT_FILE, Trace.ERROR_IN_BINARY_SCRIPT_2); } return s; } boolean readRow(RowInputBase rowin, int pos) throws IOException { try { int length = dataStreamIn.readInt(); int count = 4; if (length == 0) { return false; } rowin.resetRow(pos, length); dataStreamIn.readFully(rowin.getBuffer(), count, length - count); return true; } catch (EOFException e) { return false; } } public boolean readLoggedStatement(Session session) throws IOException { return false; } public void close() { try { dataStreamIn.close(); } catch (IOException e) {} } } hsqldb-1.8.0.10.orig/src/org/hsqldb/SessionInterface.java0000644000175000017500000000572710416742477021610 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb; /** * Interface to Session and its remote proxy objects. Used by the * implementations of JDBC interfaces to communicate with the database at * the session level. * * @author fredt@users * @version 1.7.2 * @since 1.7.2 */ public interface SessionInterface { // fredt@users - marked as used int INFO_DATABASE = 0; int INFO_USER = 1; int INFO_SESSION_ID = 2; int INFO_ISOLATION = 3; int INFO_AUTOCOMMIT = 4; // used int INFO_DATABASE_READONLY = 5; int INFO_CONNECTION_READONLY = 6; // used // int TX_READ_UNCOMMITTED = 1; int TX_READ_COMMITTED = 2; int TX_REPEATABLE_READ = 4; int TX_SERIALIZABLE = 8; Result execute(Result r) throws HsqlException; void close(); boolean isClosed(); boolean isReadOnly() throws HsqlException; void setReadOnly(boolean readonly) throws HsqlException; boolean isAutoCommit() throws HsqlException; void setAutoCommit(boolean autoCommit) throws HsqlException; void setIsolation(int level) throws HsqlException; int getIsolation() throws HsqlException; void startPhasedTransaction() throws HsqlException; void prepareCommit() throws HsqlException; void commit() throws HsqlException; void rollback() throws HsqlException; int getId(); void resetSession() throws HsqlException; } hsqldb-1.8.0.10.orig/src/org/hsqldb/Index.java0000644000175000017500000011043110465063333017367 0ustar renerene/* Copyright (c) 1995-2000, The Hypersonic SQL Group. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the Hypersonic SQL Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE HYPERSONIC SQL GROUP, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * This software consists of voluntary contributions made by many individuals * on behalf of the Hypersonic SQL Group. * * * For work added by the HSQL Development Group: * * Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb; import java.util.NoSuchElementException; import org.hsqldb.HsqlNameManager.HsqlName; import org.hsqldb.index.RowIterator; import org.hsqldb.lib.ArrayUtil; // fredt@users 20020221 - patch 513005 by sqlbob@users - corrections // fredt@users 20020225 - patch 1.7.0 - changes to support cascading deletes // tony_lai@users 20020820 - patch 595052 - better error message // fredt@users 20021205 - patch 1.7.2 - changes to method signature // fredt@users - patch 1.80 - reworked the interface and comparison methods /** * Implementation of an AVL tree with parent pointers in nodes. Subclasses * of Node implement the tree node objects for memory or disk storage. An * Index has a root Node that is linked with other nodes using Java Object * references or file pointers, depending on Node implementation.

* An Index object also holds information on table columns (in the form of int * indexes) that are covered by it.(fredt@users) * * @author Thomas Mueller (Hypersonic SQL Group) * @version 1.8.0 * @since Hypersonic SQL */ public class Index { // types of index static final int MEMORY_INDEX = 0; static final int DISK_INDEX = 1; static final int POINTER_INDEX = 2; // fields private final HsqlName indexName; final boolean[] colCheck; private final int[] colIndex; private final int[] colTypes; final int[] pkCols; final int[] pkTypes; private final boolean isUnique; // DDL uniqueness private final boolean useRowId; final boolean isConstraint; final boolean isForward; final boolean isTemp; private Node root; private int depth; final Collation collation; static IndexRowIterator emptyIterator = new IndexRowIterator(null, null, null); IndexRowIterator updatableIterators; final boolean onCommitPreserve; final Table table; /** * Constructor declaration * * * @param name HsqlName of the index * @param table table of the index * @param column array of column indexes * @param type array of column types * @param unique is this a unique index * @param constraint does this index belonging to a constraint * @param forward is this an auto-index for an FK that refers to a table defined after this table * @param visColumns count of visible columns */ Index(Database database, HsqlName name, Table table, int[] column, int[] colTypes, boolean isPk, boolean unique, boolean constraint, boolean forward, int[] pkcols, int[] pktypes, boolean temp) { this.table = table; this.indexName = name; this.colIndex = column; this.colTypes = colTypes; this.pkCols = pkcols; this.pkTypes = pktypes; isUnique = unique; isConstraint = constraint; isForward = forward; useRowId = (!isUnique && pkCols.length == 0) || (colIndex.length == 0); colCheck = table.getNewColumnCheckList(); ArrayUtil.intIndexesToBooleanArray(colIndex, colCheck); updatableIterators = new IndexRowIterator(null, null, null); updatableIterators.next = updatableIterators.last = updatableIterators; collation = database.collation; isTemp = temp; onCommitPreserve = table.onCommitPreserve; } /** * Returns the HsqlName object */ HsqlName getName() { return indexName; } /** * Changes index name. Used by 'alter index rename to'. Argument isquoted * is true if the name was quoted in the DDL. */ void setName(String name, boolean isquoted) throws HsqlException { indexName.rename(name, isquoted); } /** * Returns the count of visible columns used */ int getVisibleColumns() { return colIndex.length; } /** * Is this a UNIQUE index? */ boolean isUnique() { return isUnique; } /** * Does this index belong to a constraint? */ boolean isConstraint() { return isConstraint; } /** * Returns the array containing column indexes for index */ int[] getColumns() { return colIndex; // todo: this gives back also primary key field(s)! } /** * Returns the array containing column indexes for index */ int[] getColumnTypes() { return colTypes; // todo: this gives back also primary key field(s)! } String getColumnNameList() { String columnNameList = ""; for (int j = 0; j < colIndex.length; ++j) { columnNameList += table.getColumn(colIndex[j]).columnName.statementName; if (j < colIndex.length - 1) { columnNameList += ","; } } return columnNameList; } /** * Returns the node count. */ int size(Session session) throws HsqlException { int count = 0; RowIterator it = firstRow(session); while (it.hasNext()) { it.next(); count++; } return count; } boolean isEmpty(Session session) { return getRoot(session) == null; } public int sizeEstimate() throws HsqlException { firstRow(null); return (int) (1L << depth); } void clearAll(Session session) { setRoot(session, null); depth = 0; updatableIterators.next = updatableIterators.last = updatableIterators; } void clearIterators() { updatableIterators.next = updatableIterators.last = updatableIterators; } void setRoot(Session session, Node node) { if (isTemp) { session.setIndexRoot(indexName, onCommitPreserve, node); } else { root = node; } } int getRoot() { return (root == null) ? -1 : root.getKey(); } private Node getRoot(Session session) { if (isTemp && session != null) { return session.getIndexRoot(indexName, onCommitPreserve); } else { return root; } } /** * Insert a node into the index */ void insert(Session session, Row row, int offset) throws HsqlException { Node n = getRoot(session); Node x = n; boolean isleft = true; int compare = -1; while (true) { if (n == null) { if (x == null) { setRoot(session, row.getNode(offset)); return; } set(x, isleft, row.getNode(offset)); break; } compare = compareRowForInsert(session, row, n.getRow()); if (compare == 0) { int errorCode = Trace.VIOLATION_OF_UNIQUE_INDEX; String name = indexName.statementName; if (isConstraint) { Constraint c = table.getUniqueOrPKConstraintForIndex(this); if (c != null) { name = c.getName().name; errorCode = Trace.VIOLATION_OF_UNIQUE_CONSTRAINT; } } throw Trace.error(errorCode, new Object[] { name, getColumnNameList() }); } isleft = compare < 0; x = n; n = child(x, isleft); } balance(session, x, isleft); } /** * Balances part of the tree after an alteration to the index. */ private void balance(Session session, Node x, boolean isleft) throws HsqlException { while (true) { int sign = isleft ? 1 : -1; x = x.getUpdatedNode(); switch (x.getBalance() * sign) { case 1 : x.setBalance(0); return; case 0 : x.setBalance(-sign); break; case -1 : Node l = child(x, isleft); if (l.getBalance() == -sign) { replace(session, x, l); set(x, isleft, child(l, !isleft)); set(l, !isleft, x); x = x.getUpdatedNode(); x.setBalance(0); l = l.getUpdatedNode(); l.setBalance(0); } else { Node r = child(l, !isleft); replace(session, x, r); set(l, !isleft, child(r.getUpdatedNode(), isleft)); set(r, isleft, l); set(x, isleft, child(r.getUpdatedNode(), !isleft)); set(r, !isleft, x); int rb = r.getUpdatedNode().getBalance(); x.getUpdatedNode().setBalance((rb == -sign) ? sign : 0); l.getUpdatedNode().setBalance((rb == sign) ? -sign : 0); r.getUpdatedNode().setBalance(0); } return; } x = x.getUpdatedNode(); if (x.isRoot()) { return; } isleft = x.isFromLeft(); x = x.getParent(); } } /** * Delete a node from the index */ void delete(Session session, Node x) throws HsqlException { if (x == null) { return; } for (IndexRowIterator it = updatableIterators.next; it != updatableIterators; it = it.next) { it.updateForDelete(x); } Node n; if (x.getLeft() == null) { n = x.getRight(); } else if (x.getRight() == null) { n = x.getLeft(); } else { Node d = x; x = x.getLeft(); /* // todo: this can be improved while (x.getRight() != null) { if (Trace.STOP) { Trace.stop(); } x = x.getRight(); } */ for (Node temp = x; (temp = temp.getRight()) != null; ) { x = temp; } // x will be replaced with n later n = x.getLeft(); // swap d and x int b = x.getBalance(); x = x.getUpdatedNode(); x.setBalance(d.getBalance()); d = d.getUpdatedNode(); d.setBalance(b); // set x.parent Node xp = x.getParent(); Node dp = d.getParent(); x = x.getUpdatedNode(); if (d.isRoot()) { setRoot(session, x); } x.setParent(dp); if (dp != null) { dp = dp.getUpdatedNode(); if (dp.isRight(d)) { dp.setRight(x); } else { dp.setLeft(x); } } // relink d.parent, x.left, x.right d = d.getUpdatedNode(); if (d.equals(xp)) { d.setParent(x); if (d.isLeft(x)) { x = x.getUpdatedNode(); x.setLeft(d); Node dr = d.getRight(); x = x.getUpdatedNode(); x.setRight(dr); } else { x.setRight(d); Node dl = d.getLeft(); x = x.getUpdatedNode(); x.setLeft(dl); } } else { d.setParent(xp); xp = xp.getUpdatedNode(); xp.setRight(d); Node dl = d.getLeft(); Node dr = d.getRight(); x = x.getUpdatedNode(); x.setLeft(dl); x.setRight(dr); } x.getRight().setParent(x); x.getLeft().setParent(x); // set d.left, d.right d = d.getUpdatedNode(); d.setLeft(n); if (n != null) { n = n.getUpdatedNode(); n.setParent(d); } d = d.getUpdatedNode(); d.setRight(null); x = d; } boolean isleft = x.isFromLeft(); replace(session, x, n); n = x.getParent(); x = x.getUpdatedNode(); x.delete(); while (n != null) { x = n; int sign = isleft ? 1 : -1; x = x.getUpdatedNode(); switch (x.getBalance() * sign) { case -1 : x.setBalance(0); break; case 0 : x.setBalance(sign); return; case 1 : Node r = child(x, !isleft); int b = r.getBalance(); if (b * sign >= 0) { replace(session, x, r); set(x, !isleft, child(r, isleft)); set(r, isleft, x); if (b == 0) { x = x.getUpdatedNode(); x.setBalance(sign); r = r.getUpdatedNode(); r.setBalance(-sign); return; } x = x.getUpdatedNode(); x.setBalance(0); r = r.getUpdatedNode(); r.setBalance(0); x = r; } else { Node l = child(r, isleft); replace(session, x, l); l = l.getUpdatedNode(); b = l.getBalance(); set(r, isleft, child(l, !isleft)); set(l, !isleft, r); set(x, !isleft, child(l, isleft)); set(l, isleft, x); x = x.getUpdatedNode(); x.setBalance((b == sign) ? -sign : 0); r = r.getUpdatedNode(); r.setBalance((b == -sign) ? sign : 0); l = l.getUpdatedNode(); l.setBalance(0); x = l; } } isleft = x.isFromLeft(); n = x.getParent(); } } RowIterator findFirstRow(Session session, Object[] rowdata, int[] rowColMap) throws HsqlException { Node node = findNotNull(session, rowdata, rowColMap, true); return getIterator(session, node); } RowIterator findFirstRowForDelete(Session session, Object[] rowdata, int[] rowColMap) throws HsqlException { Node node = findNotNull(session, rowdata, rowColMap, true); IndexRowIterator it = getIterator(session, node); if (node != null) { updatableIterators.link(it); } return it; } /** * Finds an existing row */ Row findRow(Session session, Row row) throws HsqlException { Node node = search(session, row); return node == null ? null : node.getRow(); } boolean exists(Session session, Object[] rowdata, int[] rowColMap) throws HsqlException { return findNotNull(session, rowdata, rowColMap, true) != null; } RowIterator emptyIterator() { return emptyIterator; } /** * Finds a foreign key referencing rows (in child table) * * @param rowdata array containing data for the index columns * @param rowColMap map of the data to columns * @param first true if the first matching node is required, false if any node * @return matching node or null * @throws HsqlException */ private Node findNotNull(Session session, Object[] rowdata, int[] rowColMap, boolean first) throws HsqlException { Node x = getRoot(session); Node n; Node result = null; if (isNull(rowdata, rowColMap)) { return null; } while (x != null) { int i = this.compareRowNonUnique(session, rowdata, rowColMap, x.getData()); if (i == 0) { if (first == false) { result = x; break; } else if (result == x) { break; } result = x; n = x.getLeft(); } else if (i > 0) { n = x.getRight(); } else { n = x.getLeft(); } if (n == null) { break; } x = n; } return result; } /** * Finds any row that matches the rowdata. Use rowColMap to map index * columns to rowdata. Limit to visible columns of data. * * @param rowdata array containing data for the index columns * @param rowColMap map of the data to columns * @return node matching node * @throws HsqlException */ /* Node find(Object[] rowdata, int[] rowColMap) throws HsqlException { Node x = root; while (x != null) { int c = compareRowNonUnique(rowdata, rowColMap, x.getData()); if (c == 0) { return x; } else if (c < 0) { x = x.getLeft(); } else { x = x.getRight(); } } return null; } */ /** * Determines if a table row has a null column for any of the columns given * in the rowColMap array. */ static boolean isNull(Object[] row, int[] rowColMap) { int count = rowColMap.length; for (int i = 0; i < count; i++) { if (row[rowColMap[i]] == null) { return true; } } return false; } /** * Determines if a table row has a null column for any of the indexed * columns. */ boolean isNull(Object[] row) { int count = colIndex.length; for (int i = 0; i < count; i++) { int j = colIndex[i]; if (row[j] == null) { return true; } } return false; } /** * Return the first node equal to the rowdata object. Use visible columns * only. The rowdata has the same column mapping as this table. * * @param rowdata array containing table row data * @return iterator * @throws HsqlException */ RowIterator findFirstRow(Session session, Object[] rowdata) throws HsqlException { Node x = getRoot(session); Node found = null; boolean unique = isUnique &&!isNull(rowdata); while (x != null) { int c = compareRowNonUnique(session, rowdata, colIndex, x.getData()); if (c == 0) { found = x; if (unique) { break; } x = x.getLeft(); } else if (c < 0) { x = x.getLeft(); } else { x = x.getRight(); } } return getIterator(session, found); } /** * Finds the first node that is larger or equal to the given one based * on the first column of the index only. * * @param value value to match * @param compare comparison Expression type * * @return iterator * * @throws HsqlException */ RowIterator findFirstRow(Session session, Object value, int compare) throws HsqlException { boolean isEqual = compare == Expression.EQUAL || compare == Expression.IS_NULL; Node x = getRoot(session); int iTest = 1; if (compare == Expression.BIGGER) { iTest = 0; } if (value == null &&!isEqual) { return emptyIterator; } /* // this method returns the correct node only with the following conditions boolean check = compare == Expression.BIGGER || compare == Expression.EQUAL || compare == Expression.BIGGER_EQUAL; if (!check) { Trace.doAssert(false, "Index.findFirst"); } */ while (x != null) { boolean t = Column.compare( collation, value, x.getData()[colIndex[0]], colTypes[0]) >= iTest; if (t) { Node r = x.getRight(); if (r == null) { break; } x = r; } else { Node l = x.getLeft(); if (l == null) { break; } x = l; } } /* while (x != null && Column.compare(value, x.getData()[colIndex_0], colType_0) >= iTest) { x = next(x); } */ while (x != null) { Object colvalue = x.getData()[colIndex[0]]; int result = Column.compare(collation, value, colvalue, colTypes[0]); if (result >= iTest) { x = next(x); } else { if (isEqual) { if (result != 0) { x = null; } } else if (colvalue == null) { x = next(x); continue; } break; } } return getIterator(session, x); } /** * Finds the first node where the data is not null. * * @return iterator * * @throws HsqlException */ RowIterator findFirstRowNotNull(Session session) throws HsqlException { Node x = getRoot(session); while (x != null) { boolean t = Column.compare( collation, null, x.getData()[colIndex[0]], colTypes[0]) >= 0; if (t) { Node r = x.getRight(); if (r == null) { break; } x = r; } else { Node l = x.getLeft(); if (l == null) { break; } x = l; } } while (x != null) { Object colvalue = x.getData()[colIndex[0]]; if (colvalue == null) { x = next(x); } else { break; } } return getIterator(session, x); } /** * Returns the row for the first node of the index * * @return Iterator for first row * * @throws HsqlException */ RowIterator firstRow(Session session) throws HsqlException { depth = 0; Node x = getRoot(session); Node l = x; while (l != null) { x = l; l = x.getLeft(); depth++; } return getIterator(session, x); } /** * Returns the row for the last node of the index * * @return last row * * @throws HsqlException */ Row lastRow(Session session) throws HsqlException { Node x = getRoot(session); Node l = x; while (l != null) { x = l; l = x.getRight(); } return x == null ? null : x.getRow(); } /** * Returns the node after the given one * * @param x node * * @return next node * * @throws HsqlException */ Node next(Node x) throws HsqlException { if (x == null) { return null; } Node r = x.getRight(); if (r != null) { x = r; Node l = x.getLeft(); while (l != null) { x = l; l = x.getLeft(); } return x; } Node ch = x; x = x.getParent(); while (x != null && ch.equals(x.getRight())) { ch = x; x = x.getParent(); } return x; } /** * Returns either child node * * @param x node * @param isleft boolean * * @return child node * * @throws HsqlException */ private Node child(Node x, boolean isleft) throws HsqlException { return isleft ? x.getLeft() : x.getRight(); } /** * Replace two nodes * * @param x node * @param n node * * @throws HsqlException */ private void replace(Session session, Node x, Node n) throws HsqlException { if (x.isRoot()) { if (n != null) { n = n.getUpdatedNode(); n.setParent(null); } setRoot(session, n); } else { set(x.getParent(), x.isFromLeft(), n); } } /** * Set a node as child of another * * @param x parent node * @param isleft boolean * @param n child node * * @throws HsqlException */ private void set(Node x, boolean isleft, Node n) throws HsqlException { x = x.getUpdatedNode(); if (isleft) { x.setLeft(n); } else { x.setRight(n); } if (n != null) { n = n.getUpdatedNode(); n.setParent(x); } } /** * Find a node with matching data * * @param row row data * * @return matching node * * @throws HsqlException */ private Node search(Session session, Row row) throws HsqlException { Object[] d = row.getData(); Node x = getRoot(session); while (x != null) { int c = compareRowForInsert(session, row, x.getRow()); if (c == 0) { return x; } else if (c < 0) { x = x.getLeft(); } else { x = x.getRight(); } } return null; } /** * Compares two table rows based on the columns of this index. The rowColMap * parameter specifies which columns of the other table are to be compared * with the colIndex columns of this index. The rowColMap can cover all * or only some columns of this index. * * @param a row from another table * @param rowColMap column indexes in the other table * @param b a full row in this table * * @return comparison result, -1,0,+1 * @throws HsqlException */ int compareRowNonUnique(Session session, Object[] a, int[] rowColMap, Object[] b) throws HsqlException { int i = Column.compare(collation, a[rowColMap[0]], b[colIndex[0]], colTypes[0]); if (i != 0) { return i; } int fieldcount = rowColMap.length; for (int j = 1; j < fieldcount; j++) { i = Column.compare(collation, a[rowColMap[j]], b[colIndex[j]], colTypes[j]); if (i != 0) { return i; } } return 0; } /** * compares two full table rows based on a set of columns * * @param a a full row * @param b a full row * @param cols array of column indexes to compare * * @return comparison result, -1,0,+1 * @throws HsqlException */ static int compareRows(Session session, Object[] a, Object[] b, int[] cols, int[] coltypes) throws HsqlException { int fieldcount = cols.length; for (int j = 0; j < fieldcount; j++) { int i = Column.compare(session.database.collation, a[cols[j]], b[cols[j]], coltypes[cols[j]]); if (i != 0) { return i; } } return 0; } /** * Compare two rows of the table for inserting rows into unique indexes * * @param a data * @param b data * * @return comparison result, -1,0,+1 * * @throws HsqlException */ private int compareRowForInsert(Session session, Row newRow, Row existingRow) throws HsqlException { Object[] a = newRow.getData(); Object[] b = existingRow.getData(); int j = 0; boolean hasNull = false; for (; j < colIndex.length; j++) { Object currentvalue = a[colIndex[j]]; int i = Column.compare(collation, currentvalue, b[colIndex[j]], colTypes[j]); if (i != 0) { return i; } if (currentvalue == null) { hasNull = true; } } if (isUnique &&!useRowId &&!hasNull) { return 0; } for (j = 0; j < pkCols.length; j++) { Object currentvalue = a[pkCols[j]]; int i = Column.compare(collation, currentvalue, b[pkCols[j]], pkTypes[j]); if (i != 0) { return i; } } if (useRowId) { int difference = newRow.getPos() - existingRow.getPos(); if (difference < 0) { difference = -1; } else if (difference > 0) { difference = 1; } return difference; } return 0; } /** * Returns a value indicating the order of different types of index in * the list of indexes for a table. The position of the groups of Indexes * in the list in ascending order is as follows: * * primary key index * unique constraint indexes * autogenerated foreign key indexes for FK's that reference this table or * tables created before this table * user created indexes (CREATE INDEX) * autogenerated foreign key indexes for FK's that reference tables created * after this table * * Among a group of indexes, the order is based on the order of creation * of the index. * * @return ordinal value */ int getIndexOrderValue() { int value = 0; if (isConstraint) { return isForward ? 4 : isUnique ? 0 : 1; } else { return 2; } } private IndexRowIterator getIterator(Session session, Node x) { if (x == null) { return emptyIterator; } else { IndexRowIterator it = new IndexRowIterator(session, this, x); return it; } } static class IndexRowIterator implements RowIterator { Session session; Index index; Node nextnode; protected IndexRowIterator last; protected IndexRowIterator next; /** * When session == null, rows from all sessions are returned */ private IndexRowIterator(Session session, Index index, Node node) { if (index == null) { return; } this.session = session; this.index = index; this.nextnode = node; } public boolean hasNext() { return nextnode != null; } public Row next() { if (hasNext()) { try { Row row = nextnode.getRow(); nextnode = index.next(nextnode); return row; } catch (Exception e) { throw new NoSuchElementException(e.getMessage()); } } else { return null; } } void updateForDelete(Node node) { try { if (node.equals(nextnode)) { nextnode = index.next(node); } } catch (Exception e) {} } void link(IndexRowIterator other) { other.next = next; other.last = this; next.last = other; next = other; } public void release() { if (last != null) { last.next = next; } if (next != null) { next.last = last; } } } } hsqldb-1.8.0.10.orig/src/org/hsqldb/CompiledStatementManager.java0000644000175000017500000003472710416742465023257 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb; import org.hsqldb.HsqlNameManager.HsqlName; import org.hsqldb.lib.IntKeyHashMap; import org.hsqldb.lib.IntKeyIntValueHashMap; import org.hsqldb.lib.IntValueHashMap; import org.hsqldb.lib.Iterator; /** * This class manages the reuse of CompiledStatement objects for prepared * statements for a Database instance.

* * A compiled statement is registered by a session to be managed. Once * registered, it is linked with one or more sessions.

* * The sql statement text distinguishes different compiled statements and acts * as lookup key when a session initially looks for an existing instance of * the compiled sql statement.

* * Once a session is linked with a statement, it uses the uniqe compiled * statement id for the sql statement to access the statement.

* * Changes to database structure via DDL statements, will result in all * registered CompiledStatement objects to become invalidated. This is done by * setting to null all the managed CompiledStatement instances, while keeping * their id and sql string. When a session subsequently attempts to use an * invalidated (null) CompiledStatement via its id, it will reinstantiate the * CompiledStatement using its sql statement still held by this class.

* * This class keeps count of the number of different sessions that are linked * to each registered compiled statement, and the number of times each session * is linked. It unregisters a compiled statement when no session remains * linked to it.

* * Modified by fredt@users from the original by boucherb@users to simplify, * support multiple identical prepared statements per session, and avoid * keeping references to CompiledStatement objects after DDL changes which * could result in memory leaks. Modified further to support schemas.

* * @author boucherb@users * @author fredt@users * * @since 1.7.2 * @version 1.8.0 */ final class CompiledStatementManager { /** * The Database for which this object is managing * CompiledStatement objects. */ private Database database; /** Map: Schema id (int) => {Map: SQL String => Compiled Statement id (int)} */ private IntKeyHashMap schemaMap; /** Map: Compiled Statement id (int) => SQL String */ private IntKeyHashMap sqlLookup; /** Map: Compiled statment id (int) => CompiledStatement object. */ private IntKeyHashMap csidMap; /** Map: Session id (int) => {Map: compiled statement id (int) => use count in session} */ private IntKeyHashMap sessionUseMap; /** Map: Compiled statment id (int) => number of sessions that use the statement */ private IntKeyIntValueHashMap useMap; /** * Monotonically increasing counter used to assign unique ids to compiled * statements. */ private int next_cs_id; /** * Constructs a new instance of CompiledStatementManager. * * @param database the Database instance for which this object is to * manage compiled statement objects. */ CompiledStatementManager(Database database) { this.database = database; schemaMap = new IntKeyHashMap(); sqlLookup = new IntKeyHashMap(); csidMap = new IntKeyHashMap(); sessionUseMap = new IntKeyHashMap(); useMap = new IntKeyIntValueHashMap(); next_cs_id = 0; } /** * Clears all internal data structures, removing any references to compiled statements. */ synchronized void reset() { schemaMap.clear(); sqlLookup.clear(); csidMap.clear(); sessionUseMap.clear(); useMap.clear(); next_cs_id = 0; } /** * Used after a DDL change that could impact the compiled statements. * Clears references to CompiledStatement objects while keeping the counts * and references to the sql strings. */ synchronized void resetStatements() { Iterator it = csidMap.values().iterator(); while (it.hasNext()) { CompiledStatement cs = (CompiledStatement) it.next(); cs.clearVariables(); } } /** * Retrieves the next compiled statement identifier in the sequence. * * @return the next compiled statement identifier in the sequence. */ private int nextID() { next_cs_id++; return next_cs_id; } /** * Retrieves the registered compiled statement identifier associated with * the specified SQL String, or a value less than zero, if no such * statement has been registered. * * @param schema the schema id * @param sql the SQL String * @return the compiled statement identifier associated with the * specified SQL String */ private int getStatementID(HsqlName schema, String sql) { IntValueHashMap sqlMap = (IntValueHashMap) schemaMap.get(schema.hashCode()); if (sqlMap == null) { return -1; } return sqlMap.get(sql, -1); } /** * Returns an existing CompiledStatement object with the given * statement identifier. Returns null if the CompiledStatement object * has been invalidated and cannot be recompiled * * @param session the session * @param csid the identifier of the requested CompiledStatement object * @return the requested CompiledStatement object */ synchronized CompiledStatement getStatement(Session session, int csid) { CompiledStatement cs = (CompiledStatement) csidMap.get(csid); if (cs == null) { return null; } if (!cs.isValid) { String sql = (String) sqlLookup.get(csid); // revalidate with the original schema try { cs = compileSql(session, sql, cs.schemaHsqlName.name); cs.id = csid; csidMap.put(csid, cs); } catch (Throwable t) { freeStatement(csid, session.getId(), true); return null; } } return cs; } /** * Links a session with a registered compiled statement. * * If this session has not already been linked with the given * statement, then the statement use count is incremented. * * @param csid the compiled statement identifier * @param sid the session identifier */ private void linkSession(int csid, int sid) { IntKeyIntValueHashMap scsMap; scsMap = (IntKeyIntValueHashMap) sessionUseMap.get(sid); if (scsMap == null) { scsMap = new IntKeyIntValueHashMap(); sessionUseMap.put(sid, scsMap); } int count = scsMap.get(csid, 0); scsMap.put(csid, count + 1); if (count == 0) { useMap.put(csid, useMap.get(csid, 0) + 1); } } /** * Registers a compiled statement to be managed. * * The only caller should be a Session that is attempting to prepare * a statement for the first time or process a statement that has been * invalidated due to DDL changes. * * @param csid existing id or negative if the statement is not yet managed * @param cs The CompiledStatement to add * @return The compiled statement id assigned to the CompiledStatement * object */ private int registerStatement(int csid, CompiledStatement cs) { if (csid < 0) { csid = nextID(); int schemaid = cs.schemaHsqlName.hashCode(); IntValueHashMap sqlMap = (IntValueHashMap) schemaMap.get(schemaid); if (sqlMap == null) { sqlMap = new IntValueHashMap(); schemaMap.put(schemaid, sqlMap); } sqlMap.put(cs.sql, csid); sqlLookup.put(csid, cs.sql); } cs.id = csid; csidMap.put(csid, cs); return csid; } /** * Removes one (or all) of the links between a session and a compiled statement. * * If the statement is not linked with any other session, it is removed * from management. * * @param csid the compiled statment identifier * @param sid the session identifier * @param freeAll if true, remove all links to the session */ void freeStatement(int csid, int sid, boolean freeAll) { if (csid == -1) { // statement was never added return; } IntKeyIntValueHashMap scsMap = (IntKeyIntValueHashMap) sessionUseMap.get(sid); if (scsMap == null) { // statement already removed due to invalidation return; } int sessionUseCount = scsMap.get(csid, 0); if (sessionUseCount == 0) { // statement already removed due to invalidation } else if (sessionUseCount == 1 || freeAll) { scsMap.remove(csid); int usecount = useMap.get(csid, 0); if (usecount == 0) { // statement already removed due to invalidation } else if (usecount == 1) { CompiledStatement cs = (CompiledStatement) csidMap.remove(csid); if (cs != null) { int schemaid = cs.schemaHsqlName.hashCode(); IntValueHashMap sqlMap = (IntValueHashMap) schemaMap.get(schemaid); String sql = (String) sqlLookup.remove(csid); sqlMap.remove(sql); } useMap.remove(csid); } else { useMap.put(csid, usecount - 1); } } else { scsMap.put(csid, sessionUseCount - 1); } } /** * Releases the link betwen the session and all compiled statement objects * it is linked to. * * If any such statement is not linked with any other session, it is * removed from management. * * @param sid the session identifier */ synchronized void removeSession(int sid) { IntKeyIntValueHashMap scsMap; int csid; Iterator i; scsMap = (IntKeyIntValueHashMap) sessionUseMap.remove(sid); if (scsMap == null) { return; } i = scsMap.keySet().iterator(); while (i.hasNext()) { csid = i.nextInt(); int usecount = useMap.get(csid, 1) - 1; if (usecount == 0) { CompiledStatement cs = (CompiledStatement) csidMap.remove(csid); if (cs != null) { int schemaid = cs.schemaHsqlName.hashCode(); IntValueHashMap sqlMap = (IntValueHashMap) schemaMap.get(schemaid); String sql = (String) sqlLookup.remove(csid); sqlMap.remove(sql); } useMap.remove(csid); } else { useMap.put(csid, usecount); } } } /** * Retrieves a MULTI Result describing three aspects of the * CompiledStatement prepared from the SQL argument for execution * in this session context.

* *

    *
  1. A PREPARE_ACK mode Result describing id of the statement * prepared by this request. This is used by the JDBC implementation * to later identify to the engine which prepared statement to execute. * *
  2. A DATA mode result describing the statement's result set metadata. * This is used to generate the JDBC ResultSetMetaData object returned * by PreparedStatement.getMetaData and CallableStatement.getMetaData. * *
  3. A DATA mode result describing the statement's parameter metdata. * This is used to by the JDBC implementation to determine * how to send parameters back to the engine when executing the * statement. It is also used to construct the JDBC ParameterMetaData * object for PreparedStatements and CallableStatements. * * @param session the session * @param sql a string describing the desired statement object * @return a MULTI Result describing the compiled statement. */ synchronized CompiledStatement compile(Session session, String sql) throws Throwable { int csid = getStatementID(session.currentSchema, sql); CompiledStatement cs = (CompiledStatement) csidMap.get(csid); if (cs == null ||!cs.isValid ||!session.isAdmin()) { cs = compileSql(session, sql, session.currentSchema.name); csid = registerStatement(csid, cs); } linkSession(csid, session.getId()); return cs; } private CompiledStatement compileSql(Session session, String sql, String schemaName) throws Throwable { Session sys = database.sessionManager.getSysSession(schemaName, session.getUser()); return sys.sqlCompileStatement(sql); } } hsqldb-1.8.0.10.orig/src/org/hsqldb/Token.java0000644000175000017500000015340110712355545017410 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb; import org.hsqldb.lib.HashSet; import org.hsqldb.lib.IntValueHashMap; /** * Defines and enumerates reserved and non-reserved SQL * keywords.

    * * @author Nitin Chauhan * @author fredt@users * @since 1.7.2 * @version 1.7.2 */ public class Token { private static IntValueHashMap commandSet; // static final String T_ASTERISK = "*"; static final String T_COMMA = ","; static final String T_CLOSEBRACKET = ")"; static final String T_EQUALS = "="; public static final String T_DIVIDE = "/"; static final String T_OPENBRACKET = "("; static final String T_SEMICOLON = ";"; static final String T_MULTIPLY = "*"; static final String T_PERCENT = "%"; static final String T_PLUS = "+"; static final String T_QUESTION = "?"; // SQL 200n reserved tokens static final String T_ADD = "ADD"; //reserved static final String T_ALL = "ALL"; //reserved static final String T_ALLOCATE = "ALLOCATE"; //reserved public static final String T_ALTER = "ALTER"; //reserved static final String T_AND = "AND"; //reserved static final String T_ANY = "ANY"; //reserved static final String T_ARE = "ARE"; //reserved static final String T_ARRAY = "ARRAY"; //reserved static final String T_AS = "AS"; //reserved static final String T_ASENSITIVE = "ASENSITIVE"; //reserved static final String T_ASYMMETRIC = "ASYMMETRIC"; //reserved static final String T_AT = "AT"; //reserved static final String T_ATOMIC = "ATOMIC"; //reserved static final String T_AUTHORIZATION = "AUTHORIZATION"; //reserved static final String T_BEGIN = "BEGIN"; //reserved static final String T_BETWEEN = "BETWEEN"; static final String T_BIGINT = "BIGINT"; //reserved public static final String T_BINARY = "BINARY"; //reserved static final String T_BLOB = "BLOB"; //reserved static final String T_BOOLEAN = "BOOLEAN"; //reserved static final String T_BOTH = "BOTH"; static final String T_BY = "BY"; //reserved static final String T_CALL = "CALL"; //reserved static final String T_CALLED = "CALLED"; //reserved static final String T_CASCADED = "CASCADED"; //reserved static final String T_CASE = "CASE"; //reserved static final String T_CAST = "CAST"; //reserved static final String T_CHAR = "CHAR"; //reserved static final String T_CHARACTER = "CHARACTER"; //reserved static final String T_CHECK = "CHECK"; //reserved static final String T_CLOB = "CLOB"; //reserved static final String T_CLOSE = "CLOSE"; //reserved static final String T_COLLATE = "COLLATE"; //reserved static final String T_COLUMN = "COLUMN"; //reserved public static final String T_COMMIT = "COMMIT"; //reserved static final String T_CONDITION = "CONDIITON"; //reserved static final String T_CONNECT = "CONNECT"; //reserved static final String T_CONSTRAINT = "CONSTRAINT"; //reserved static final String T_CONTINUE = "CONTINUE"; //reserved static final String T_CORRESPONDING = "CORRESPONDING"; //reserved static final String T_CREATE = "CREATE"; //reserved static final String T_CROSS = "CROSS"; //reserved static final String T_CUBE = "CUBE"; //reserved static final String T_CURRENT = "CURRENT"; //reserved static final String T_CURRENT_DATE = "CURRENT_DATE"; //reserved static final String T_CURRENT_DEFAULT_TRANS_GROUP = "CURRENT_DEFAULT_TRANSFORM_GROUP"; //reserved static final String T_CURRENT_PATH = "CURRENT_PATH"; //reserved static final String T_CURRENT_ROLE = "CURRENT_ROLE"; //reserved static final String T_CURRENT_TIME = "CURRENT_TIME"; //reserved static final String T_CURRENT_TIMESTAMP = "CURRENT_TIMESTAMP"; //reserved static final String T_CURRENT_TRANS_GROUP_FOR_TYPE = "CURRENT_TRANSFORM_GROUP_FOR_TYPE"; //reserved static final String T_CURRENT_USER = "CURRENT_USER"; //reserved static final String T_CURSOR = "CURSOR"; //reserved static final String T_CYCLE = "CYCLE"; //reserved static final String T_DATE = "DATE"; //reserved static final String T_DAY = "DAY"; //reserved static final String T_DEALLOCATE = "DEALLOCATE"; //reserved static final String T_DEC = "DEC"; //reserved static final String T_DECIMAL = "DECIMAL"; //reserved static final String T_DECLARE = "DECLARE"; //reserved static final String T_DEFAULT = "DEFAULT"; //reserved public static final String T_DELETE = "DELETE"; //reserved static final String T_DEREF = "DEREF"; //reserved static final String T_DESCRIBE = "DESCRIBE"; //reserved static final String T_DETERMINISTIC = "DETERMINISTIC"; //reserved static final String T_DISCONNECT = "DISCONNECT"; //reserved static final String T_DISTINCT = "DISTINCT"; //reserved static final String T_DO = "DO"; //reserved static final String T_DOUBLE = "DOUBLE"; //reserved static final String T_DOW = "DAYOFWEEK"; //reserved static final String T_DROP = "DROP"; //reserved static final String T_DYNAMIC = "DYNAMIC"; //reserved static final String T_EACH = "EACH"; //reserved static final String T_ELEMENT = "ELEMENT"; //reserved static final String T_ELSE = "ELSE"; //reserved static final String T_ELSEIF = "ELSEIF"; //reserved static final String T_END = "END"; //reserved static final String T_ESCAPE = "ESCAPE"; //reserved static final String T_EXCEPT = "EXCEPT"; //reserved static final String T_EXEC = "EXEC"; //reserved static final String T_EXECUTE = "EXECUTE"; //reserved static final String T_EXISTS = "EXISTS"; //reserved static final String T_EXIT = "EXIT"; //reserved static final String T_EXTERNAL = "EXTERNAL"; //reserved static final String T_FALSE = "FALSE"; //reserved static final String T_FETCH = "FETCH"; //reserved static final String T_FILTER = "FILTER"; //reserved static final String T_FLOAT = "FLOAT"; //reserved static final String T_FOR = "FOR"; //reserved static final String T_FOREIGN = "FOREIGN"; //reserved static final String T_FREE = "FREE"; //reserved static final String T_FROM = "FROM"; //reserved static final String T_FULL = "FULL"; //reserved static final String T_FUNCTION = "FUNCTION"; //reserved static final String T_GET = "GET"; //reserved static final String T_GLOBAL = "GLOBAL"; //reserved static final String T_GRANT = "GRANT"; //reserved static final String T_GROUP = "GROUP"; //reserved static final String T_GROUPING = "GROUPING"; //reserved static final String T_HANDLER = "HANDLER"; //reserved static final String T_HAVING = "HAVING"; //reserved static final String T_HEADER = "HEADER"; //reserved static final String T_HOLD = "HOLD"; //reserved static final String T_HOUR = "HOUR"; //reserved static final String T_IDENTITY = "IDENTITY"; //reserved static final String T_IF = "IF"; //reserved static final String T_IMMEDIATE = "IMMEDIATE"; //reserved static final String T_IN = "IN"; //reserved static final String T_INDICATOR = "INDICATOR"; //reserved static final String T_INNER = "INNER"; //reserved static final String T_INOUT = "INOUT"; //reserved static final String T_INPUT = "INPUT"; //reserved static final String T_INSENSITIVE = "INSENSITIVE"; //reserved public static final String T_INSERT = "INSERT"; //reserved static final String T_INT = "INT"; //reserved static final String T_INTEGER = "INTEGER"; //reserved static final String T_INTERSECT = "INTERSECT"; //reserved static final String T_INTERVAL = "INTERVAL"; //reserved static final String T_INTO = "INTO"; //reserved static final String T_IS = "IS"; //reserved static final String T_ITERATE = "ITERATE"; //reserved static final String T_JOIN = "JOIN"; //reserved static final String T_LANGUAGE = "LANGUAGE"; //reserved static final String T_LARGE = "LARGE"; //reserved static final String T_LATERAL = "LATERAL"; //reserved static final String T_LEADING = "LEADING"; //reserved static final String T_LEAVE = "LEAVE"; //reserved static final String T_LEFT = "LEFT"; //reserved static final String T_LIKE = "LIKE"; //reserved static final String T_LOCAL = "LOCAL"; //reserved static final String T_LOCALTIME = "LOCALTIME"; //reserved static final String T_LOCALTIMESTAMP = "LOCALTIMESTAMP"; //reserved static final String T_LOOP = "LOOP"; //reserved static final String T_MATCH = "MATCH"; //reserved static final String T_MEMBER = "MEMBER"; //reserved static final String T_METHOD = "METHOD"; //reserved static final String T_MINUTE = "MINUTE"; //reserved static final String T_MODIFIES = "MODIFIES"; //reserved static final String T_MODULE = "MODULE"; //reserved static final String T_MONTH = "MONTH"; //reserved static final String T_MULTISET = "MULTISET"; //reserved static final String T_NATIONAL = "NATIONAL"; //reserved static final String T_NATURAL = "NAUTRAL"; //reserved static final String T_NCHAR = "NCHAR"; //reserved static final String T_NCLOB = "NCLOB"; //reserved static final String T_NEW = "NEW"; //reserved static final String T_NEXT = "NEXT"; //reserved static final String T_NO = "NO"; //reserved static final String T_NONE = "NONE"; //reserved static final String T_NOT = "NOT"; //reserved static final String T_NULL = "NULL"; //reserved static final String T_NUMERIC = "NUMERIC"; //reserved static final String T_OF = "OF"; //reserved static final String T_OLD = "OLD"; //reserved static final String T_ON = "ON"; //reserved static final String T_ONLY = "ONLY"; //reserved static final String T_OPEN = "OPEN"; //reserved static final String T_OR = "OR"; //reserved static final String T_ORDER = "ORDER"; //reserved static final String T_OUT = "OUT"; //reserved static final String T_OUTER = "OUTER"; //reserved static final String T_OUTPUT = "OUTPUT"; //reserved static final String T_OVER = "OVER"; //reserved static final String T_OVERLAPS = "OVERLAPS"; //reserved static final String T_PARAMETER = "PARAMETER"; //reserved static final String T_PARTITION = "PARTITION"; //reserved static final String T_PRECISION = "PRECISION"; //reserved static final String T_PREPARE = "PREPARE"; //reserved static final String T_PRIMARY = "PRIMARY"; //reserved static final String T_PROCEDURE = "PROCEDURE"; //reserved static final String T_RANGE = "RANGE"; //reserved static final String T_READS = "READS"; //reserved static final String T_REAL = "REAL"; //reserved static final String T_RECURSIVE = "RECURSIVE"; //reserved static final String T_REF = "REF"; //reserved static final String T_REFERENCES = "REFERENCES"; //reserved static final String T_REFERENCING = "REFERENCING"; //reserved static final String T_RELEASE = "RELEASE"; //reserved static final String T_REPEAT = "REPEAT"; //reserved static final String T_RESIGNAL = "RESIGNAL"; //reserved static final String T_RESULT = "RESULT"; //reserved static final String T_RETURN = "RETURN"; //reserved static final String T_RETURNS = "RETURNS"; //reserved static final String T_REVOKE = "REVOKE"; //reserved static final String T_RIGHT = "RIGHT"; //reserved static final String T_ROLLBACK = "ROLLBACK"; //reserved static final String T_ROLLUP = "ROLLUP"; //reserved static final String T_ROW = "ROW"; //reserved static final String T_ROWS = "ROWS"; //reserved static final String T_SAVEPOINT = "SAVEPOINT"; //reserved static final String T_SCOPE = "SCOPE"; //reserved static final String T_SCROLL = "SCROLL"; //reserved static final String T_SECOND = "SECOND"; //reserved static final String T_SEARCH = "SEARCH"; //reserved static final String T_SELECT = "SELECT"; //reserved static final String T_SENSITIVE = "SENSITIVE"; //reserved static final String T_SESSION_USER = "SESSION_USER"; //reserved public static final String T_SET = "SET"; //reserved static final String T_SIGNAL = "SIGNAL"; //reserved static final String T_SIMILAR = "SIMILAR"; //reserved static final String T_SMALLINT = "SMALLINT"; //reserved static final String T_SOME = "SOME"; //reserved static final String T_SPECIFIC = "SPECIFIC"; //reserved static final String T_SPECIFICTYPE = "SPECIFICTYPE"; //reserved static final String T_SQL = "SQL"; //reserved static final String T_SQLEXCEPTION = "SQLEXCEPTION"; //reserved static final String T_SQLSTATE = "SQLSTATE"; //reserved static final String T_SQLWARNING = "SQLWARNING"; //reserved static final String T_START = "START"; //reserved static final String T_STATIC = "STATIC"; //reserved static final String T_SUBMULTISET = "SUBMULTISET"; //reserved static final String T_SYMMETRIC = "SYMMETRIC"; //reserved static final String T_SYSTEM = "SYSTEM"; //reserved static final String T_SYSTEM_USER = "SYSTEM_USER"; //reserved public static final String T_TABLE = "TABLE"; //reserved static final String T_TABLESAMPLE = "TABLESAMPLE"; //reserved static final String T_THEN = "THEN"; //reserved static final String T_TIME = "TIME"; //reserved static final String T_TIMESTAMP = "TIMESTAMP"; //reserved static final String T_TIMEZONE_HOUR = "TIMEZONE_HOUR"; //reserved static final String T_TIMEZONE_MINUTE = "TIMEZONE_MINUTE"; //reserved static final String T_TO = "TO"; //reserved static final String T_TRAILING = "TRAILING"; //reserved static final String T_TRANSLATION = "TRANSLATION"; //reserved static final String T_TREAT = "TREAT"; //reserved static final String T_TRIGGER = "TRIGGER"; //reserved static final String T_TRUE = "TRUE"; //reserved static final String T_UNDO = "UNDO"; //reserved static final String T_UNION = "UNION"; //reserved static final String T_UNIQUE = "UNIQUE"; //reserved static final String T_UNKNOWN = "UNKNOWN"; //reserved static final String T_UNNEST = "UNNEST"; //reserved static final String T_UNTIL = "UNTIL"; //reserved static final String T_UPDATE = "UPDATE"; //reserved static final String T_USER = "USER"; //reserved static final String T_USING = "USING"; //reserved static final String T_VALUE = "VALUE"; //reserved static final String T_VALUES = "VALUES"; //reserved static final String T_VARCHAR = "VARCHAR"; //reserved static final String T_VARYING = "VARYING"; //reserved static final String T_WHEN = "WHEN"; //reserved static final String T_WHENEVER = "WHENEVER"; //reserved static final String T_WHERE = "WHERE"; //reserved static final String T_WHILE = "WHILE"; //reserved static final String T_WINDOW = "WINDOW"; //reserved static final String T_WITH = "WITH"; //reserved static final String T_WITHIN = "WITHIN"; //reserved static final String T_WITHOUT = "WITHOUT"; //reserved static final String T_YEAR = "YEAR"; //reserved // other tokens static final String T_ALWAYS = "ALWAYS"; static final String T_ACTION = "ACTION"; static final String T_ADMIN = "ADMIN"; static final String T_AFTER = "AFTER"; static final String T_ALIAS = "ALIAS"; static final String T_ASC = "ASC"; static final String T_AUTOCOMMIT = "AUTOCOMMIT"; static final String T_AVG = "AVG"; static final String T_BACKUP = "BACKUP"; static final String T_BEFORE = "BEFORE"; static final String T_CACHED = "CACHED"; static final String T_CASCADE = "CASCADE"; static final String T_CASEWHEN = "CASEWHEN"; static final String T_CHECKPOINT = "CHECKPOINT"; static final String T_CLASS = "CLASS"; static final String T_COALESCE = "COALESCE"; static final String T_COLLATION = "COLLATION"; static final String T_COMPACT = "COMPACT"; public static final String T_COMPRESSED = "COMPRESSED"; static final String T_CONVERT = "CONVERT"; static final String T_COUNT = "COUNT"; static final String T_DATABASE = "DATABASE"; static final String T_DEFRAG = "DEFRAG"; static final String T_DESC = "DESC"; static final String T_EVERY = "EVERY"; static final String T_EXPLAIN = "EXPLAIN"; static final String T_EXTRACT = "EXTRACT"; static final String T_GENERATED = "GENERATED"; static final String T_IFNULL = "IFNULL"; static final String T_IGNORECASE = "IGNORECASE"; static final String T_IMMEDIATELY = "IMMEDIATELY"; static final String T_INCREMENT = "INCREMENT"; static final String T_INDEX = "INDEX"; static final String T_INITIAL = "INITIAL"; static final String T_KEY = "KEY"; static final String T_LIMIT = "LIMIT"; static final String T_LOGSIZE = "LOGSIZE"; static final String T_MAX = "MAX"; static final String T_MAXROWS = "MAXROWS"; static final String T_MEMORY = "MEMORY"; static final String T_MERGE = "MERGE"; static final String T_MIN = "MIN"; static final String T_MINUS = "MINUS"; static final String T_NOW = "NOW"; static final String T_NOWAIT = "NOWAIT"; static final String T_NULLIF = "NULLIF"; static final String T_NVL = "NVL"; static final String T_OFFSET = "OFFSET"; static final String T_PASSWORD = "PASSWORD"; public static final String T_SCHEMA = "SCHEMA"; static final String T_PLAN = "PLAN"; static final String T_PRESERVE = "PRESERVE"; static final String T_PRIVILEGES = "PRIVILEGES"; static final String T_POSITION = "POSITION"; static final String T_PROPERTY = "PROPERTY"; static final String T_PUBLIC = "PUBLIC"; static final String T_QUEUE = "QUEUE"; static final String T_READONLY = "READONLY"; static final String T_REFERENTIAL_INTEGRITY = "REFERENTIAL_INTEGRITY"; static final String T_RENAME = "RENAME"; static final String T_RESTART = "RESTART"; static final String T_RESTRICT = "RESTRICT"; static final String T_ROLE = "ROLE"; static final String T_SCRIPT = "SCRIPT"; static final String T_SCRIPTFORMAT = "SCRIPTFORMAT"; static final String T_SEQUENCE = "SEQUENCE"; static final String T_SHUTDOWN = "SHUTDOWN"; public static final String T_SOURCE = "SOURCE"; static final String T_STDDEV_POP = "STDDEV_POP"; static final String T_STDDEV_SAMP = "STDDEV_SAMP"; static final String T_SUBSTRING = "SUBSTRING"; static final String T_SUM = "SUM"; static final String T_SYSDATE = "SYSDATE"; static final String T_TEMP = "TEMP"; static final String T_TEMPORARY = "TEMPORARY"; public static final String T_TEXT = "TEXT"; static final String T_TODAY = "TODAY"; static final String T_TOP = "TOP"; static final String T_TRIM = "TRIM"; static final String T_VAR_POP = "VAR_POP"; static final String T_VAR_SAMP = "VAR_SAMP"; static final String T_VIEW = "VIEW"; static final String T_WORK = "WORK"; static final String T_WRITE_DELAY = "WRITE_DELAY"; public static final String T_OFF = "OFF"; // SQL 200n token values static final int ADD = 1; static final int ALL = 2; static final int ALLOCATE = 3; static final int ALTER = 4; static final int AND = 5; static final int ANY = 6; static final int ARE = 7; static final int ARRAY = 8; static final int AS = 9; static final int ASENSITIVE = 10; static final int ASYMMETRIC = 11; static final int AT = 12; static final int ATOMIC = 13; static final int AUTHORIZATION = 14; static final int BEGIN = 15; static final int BETWEEN = 16; static final int BIGINT = 17; static final int BINARY = 18; static final int BLOB = 19; static final int BOOLEAN = 20; static final int BOTH = 21; static final int BY = 22; public static final int CALL = 23; static final int CALLED = 24; static final int CASCADED = 25; static final int CASE = 26; static final int CAST = 27; static final int CHAR = 28; static final int CHARACTER = 29; static final int CHECK = 30; static final int CLOB = 31; static final int CLOSE = 32; static final int COLLATE = 33; static final int COLUMN = 34; static final int COMMIT = 35; static final int CONDITION = 36; static final int CONNECT = 37; static final int CONSTRAINT = 38; static final int CONTINUE = 39; static final int CORRESPONDING = 40; static final int CREATE = 41; static final int CROSS = 42; static final int CUBE = 43; static final int CURRENT = 44; static final int CURRENT_DATE = 45; static final int CURRENT_DEFAULT_TRANSFORM_GRO = 46; static final int CURRENT_PATH = 47; static final int CURRENT_ROLE = 48; static final int CURRENT_TIME = 49; static final int CURRENT_TIMESTAMP = 50; static final int CURRENT_TRANSFORM_GROUP_FOR_T = 51; static final int CURRENT_USER = 52; static final int CURSOR = 53; static final int CYCLE = 54; static final int DATE = 55; static final int DAY = 56; static final int DEALLOCATE = 57; static final int DEC = 58; static final int DECIMAL = 59; static final int DECLARE = 60; static final int DEFAULT = 61; public static final int DELETE = 62; static final int DEREF = 63; static final int DESCRIBE = 64; static final int DETERMINISTIC = 65; static final int DISCONNECT = 66; static final int DISTINCT = 67; static final int DO = 68; static final int DOUBLE = 69; static final int DROP = 70; static final int DYNAMIC = 71; static final int EACH = 72; static final int ELEMENT = 73; static final int ELSE = 74; static final int ELSEIF = 75; static final int END = 76; static final int ESCAPE = 77; static final int EXCEPT = 78; static final int EXEC = 79; static final int EXECUTE = 80; static final int EXISTS = 81; static final int EXIT = 82; static final int EXTERNAL = 83; static final int FALSE = 84; static final int FETCH = 85; static final int FILTER = 86; static final int FLOAT = 87; static final int FOR = 88; static final int FOREIGN = 89; static final int FREE = 90; static final int FROM = 91; static final int FULL = 92; static final int FUNCTION = 93; static final int GET = 94; static final int GLOBAL = 95; static final int GRANT = 96; static final int GROUP = 97; static final int GROUPING = 98; static final int HANDLER = 99; static final int HAVING = 100; static final int HOLD = 101; static final int HOUR = 102; static final int IDENTITY = 103; static final int IF = 104; static final int IMMEDIATE = 105; static final int IN = 106; static final int INDICATOR = 107; static final int INNER = 108; static final int INOUT = 109; static final int INPUT = 110; static final int INSENSITIVE = 111; public static final int INSERT = 112; static final int INT = 113; static final int INTEGER = 114; static final int INTERSECT = 115; static final int INTERVAL = 116; static final int INTO = 117; static final int IS = 118; static final int ITERATE = 119; static final int JOIN = 120; static final int LANGUAGE = 121; static final int LARGE = 122; static final int LATERAL = 123; static final int LEADING = 124; static final int LEAVE = 125; static final int LEFT = 126; static final int LIKE = 127; static final int LOCAL = 128; static final int LOCALTIME = 129; static final int LOCALTIMESTAMP = 130; static final int LOOP = 131; static final int MATCH = 132; static final int MEMBER = 133; static final int MERGE = 134; static final int METHOD = 135; static final int MINUTE = 136; static final int MODIFIES = 137; static final int MODULE = 138; static final int MONTH = 139; static final int MULTISET = 140; static final int NATIONAL = 141; static final int NATURAL = 142; static final int NCHAR = 143; static final int NCLOB = 144; static final int NEW = 145; static final int NO = 146; static final int NONE = 147; static final int NOT = 148; static final int NULL = 149; static final int NUMERIC = 150; static final int OF = 151; static final int OLD = 152; static final int ON = 153; static final int ONLY = 154; static final int OPEN = 155; static final int OR = 156; static final int ORDER = 157; static final int OUT = 158; static final int OUTER = 159; static final int OUTPUT = 160; static final int OVER = 161; static final int OVERLAPS = 162; static final int PARAMETER = 163; static final int PARTITION = 164; static final int PRECISION = 165; static final int PREPARE = 166; static final int PRIMARY = 167; static final int PROCEDURE = 168; static final int RANGE = 169; static final int READS = 170; static final int REAL = 171; static final int RECURSIVE = 172; static final int REF = 173; static final int REFERENCES = 174; static final int REFERENCING = 175; static final int RELEASE = 176; static final int REPEAT = 177; static final int RESIGNAL = 178; static final int RESULT = 179; static final int RETURN = 180; static final int RETURNS = 181; static final int REVOKE = 182; static final int RIGHT = 183; static final int ROLLBACK = 184; static final int ROLLUP = 185; static final int ROW = 186; static final int ROWS = 187; static final int SAVEPOINT = 188; static final int SCOPE = 189; static final int SCROLL = 190; static final int SEARCH = 191; static final int SECOND = 192; public static final int SELECT = 193; static final int SENSITIVE = 194; static final int SESSION_USER = 195; static final int SET = 196; static final int SIGNAL = 197; static final int SIMILAR = 198; static final int SMALLINT = 199; static final int SOME = 200; static final int SPECIFIC = 201; static final int SPECIFICTYPE = 202; static final int SQL = 203; static final int SQLEXCEPTION = 204; static final int SQLSTATE = 205; static final int SQLWARNING = 206; static final int START = 207; static final int STATIC = 208; static final int SUBMULTISET = 209; static final int SYMMETRIC = 210; static final int SYSTEM = 211; static final int SYSTEM_USER = 212; static final int TABLE = 213; static final int TABLESAMPLE = 214; static final int THEN = 215; static final int TIME = 216; static final int TIMESTAMP = 217; static final int TIMEZONE_HOUR = 218; static final int TIMEZONE_MINUTE = 219; static final int TO = 220; static final int TRAILING = 221; static final int TRANSLATION = 222; static final int TREAT = 223; static final int TRIGGER = 224; static final int TRUE = 225; static final int UNDO = 226; static final int UNION = 227; static final int UNIQUE = 228; static final int UNKNOWN = 229; static final int UNNEST = 220; static final int UNTIL = 221; public static final int UPDATE = 222; static final int USER = 223; static final int USING = 224; static final int VALUE = 225; static final int VALUES = 226; static final int VARCHAR = 227; static final int VARYING = 228; static final int WHEN = 229; static final int WHENEVER = 230; static final int WHERE = 231; static final int WHILE = 232; static final int WINDOW = 233; static final int WITH = 234; static final int WITHIN = 235; static final int WITHOUT = 236; static final int YEAR = 237; // other token values used as switch cases public static final int UNKNOWNTOKEN = -1; static final int ALIAS = 300; static final int AUTOCOMMIT = 301; static final int CACHED = 302; static final int CHECKPOINT = 303; static final int EXPLAIN = 304; static final int IGNORECASE = 305; static final int INDEX = 306; static final int LOGSIZE = 307; static final int MATCHED = 308; static final int MAXROWS = 309; static final int MEMORY = 310; static final int MINUS = 311; static final int NEXT = 312; static final int OPENBRACKET = 313; static final int PASSWORD = 314; static final int PLAN = 315; static final int PROPERTY = 316; static final int READONLY = 317; static final int REFERENTIAL_INTEGRITY = 318; static final int RENAME = 319; static final int RESTART = 320; static final int SCRIPT = 321; static final int SCRIPTFORMAT = 322; static final int SEMICOLON = 323; static final int SEQUENCE = 324; static final int SHUTDOWN = 325; static final int SOURCE = 326; static final int TEMP = 327; static final int TEXT = 328; static final int VIEW = 329; static final int WRITE_DELAY = 330; // added stuff static final int VAR_POP = 330; static final int VAR_SAMP = 331; static final int STDDEV_POP = 332; static final int STDDEV_SAMP = 333; static final int DEFRAG = 334; static final int INCREMENT = 335; static final int TOCHAR = 336; static final int DATABASE = 337; static final int SCHEMA = 338; static final int ROLE = 339; static final int DOW = 340; static final int INITIAL = 341; // static { commandSet = newCommandSet(); } /** * Retrieves a new map from set of string tokens to numeric tokens for * commonly encountered database command token occurences. * * @return a new map for the database command token set */ private static IntValueHashMap newCommandSet() { IntValueHashMap commandSet; commandSet = new IntValueHashMap(67); commandSet.put(T_ADD, ADD); commandSet.put(T_ALIAS, ALIAS); commandSet.put(T_ALTER, ALTER); commandSet.put(T_AUTOCOMMIT, AUTOCOMMIT); commandSet.put(T_CACHED, CACHED); commandSet.put(T_CALL, CALL); commandSet.put(T_CHECK, CHECK); commandSet.put(T_CHECKPOINT, CHECKPOINT); commandSet.put(T_COLUMN, COLUMN); commandSet.put(T_COMMIT, COMMIT); commandSet.put(T_CONNECT, CONNECT); commandSet.put(T_CONSTRAINT, CONSTRAINT); commandSet.put(T_CREATE, CREATE); commandSet.put(T_DATABASE, DATABASE); commandSet.put(T_DELETE, DELETE); commandSet.put(T_DEFRAG, DEFRAG); commandSet.put(T_DISCONNECT, DISCONNECT); commandSet.put(T_DROP, DROP); commandSet.put(T_EXCEPT, EXCEPT); commandSet.put(T_EXPLAIN, EXPLAIN); commandSet.put(T_FOREIGN, FOREIGN); commandSet.put(T_GRANT, GRANT); commandSet.put(T_IGNORECASE, IGNORECASE); commandSet.put(T_INCREMENT, INCREMENT); commandSet.put(T_INDEX, INDEX); commandSet.put(T_INITIAL, INITIAL); commandSet.put(T_INSERT, INSERT); commandSet.put(T_INTERSECT, INTERSECT); commandSet.put(T_LOGSIZE, LOGSIZE); commandSet.put(T_MAXROWS, MAXROWS); commandSet.put(T_MEMORY, MEMORY); commandSet.put(T_MINUS, MINUS); commandSet.put(T_NEXT, NEXT); commandSet.put(T_NOT, NOT); commandSet.put(T_OPENBRACKET, OPENBRACKET); commandSet.put(T_PASSWORD, PASSWORD); commandSet.put(T_PLAN, PLAN); commandSet.put(T_PRIMARY, PRIMARY); commandSet.put(T_PROPERTY, PROPERTY); commandSet.put(T_READONLY, READONLY); commandSet.put(T_REFERENTIAL_INTEGRITY, REFERENTIAL_INTEGRITY); commandSet.put(T_RELEASE, RELEASE); commandSet.put(T_RENAME, RENAME); commandSet.put(T_RESTART, RESTART); commandSet.put(T_REVOKE, REVOKE); commandSet.put(T_ROLE, ROLE); commandSet.put(T_ROLLBACK, ROLLBACK); commandSet.put(T_SAVEPOINT, SAVEPOINT); commandSet.put(T_SCRIPT, SCRIPT); commandSet.put(T_SCRIPTFORMAT, SCRIPTFORMAT); commandSet.put(T_SELECT, SELECT); commandSet.put(T_SEMICOLON, SEMICOLON); commandSet.put(T_SEQUENCE, SEQUENCE); commandSet.put(T_SET, SET); commandSet.put(T_SHUTDOWN, SHUTDOWN); commandSet.put(T_SOURCE, SOURCE); commandSet.put(T_TABLE, TABLE); commandSet.put(T_TEMP, TEMP); commandSet.put(T_TEXT, TEXT); commandSet.put(T_TRIGGER, TRIGGER); commandSet.put(T_UNIQUE, UNIQUE); commandSet.put(T_UPDATE, UPDATE); commandSet.put(T_UNION, UNION); commandSet.put(T_USER, USER); commandSet.put(T_VALUES, VALUES); commandSet.put(T_VIEW, VIEW); commandSet.put(T_WRITE_DELAY, WRITE_DELAY); commandSet.put(T_SCHEMA, SCHEMA); return commandSet; } public static int get(String token) { return commandSet.get(token, -1); } private static HashSet keywords; static IntValueHashMap valueTokens; static { // literals not allowed as table / column names keywords = new HashSet(67); // fredt - if we add MONTH, DAY, YEAR etc. MONTH(), DAY() et al will no longer work // following tokens are values /* "FALSE",*/ /* "TRUE",*/ /* "NULL", */ /** @todo perhaps rename LEFT() */ // following token is excluded to allow LEFT() function to work /* "LEFT" ,*/ String[] keyword = { Token.T_AS, Token.T_AND, Token.T_ALL, Token.T_ANY, Token.T_AVG, Token.T_BY, Token.T_BETWEEN, Token.T_BOTH, Token.T_CALL, Token.T_CASE, Token.T_CASEWHEN, Token.T_CAST, Token.T_CONVERT, Token.T_COUNT, Token.T_COALESCE, Token.T_DISTINCT, Token.T_ELSE, Token.T_END, Token.T_EVERY, Token.T_EXISTS, Token.T_EXCEPT, Token.T_EXTRACT, Token.T_FOR, Token.T_FROM, Token.T_GROUP, Token.T_HAVING, Token.T_IF, Token.T_INTO, Token.T_IFNULL, Token.T_IS, Token.T_IN, Token.T_INTERSECT, Token.T_JOIN, Token.T_INNER, Token.T_LEADING, Token.T_LIKE, Token.T_MAX, Token.T_MIN, Token.T_NEXT, Token.T_NULLIF, Token.T_NOT, Token.T_NVL, Token.T_MINUS, Token.T_ON, Token.T_ORDER, Token.T_OR, Token.T_OUTER, Token.T_POSITION, Token.T_PRIMARY, Token.T_SELECT, Token.T_SET, Token.T_SOME, Token.T_STDDEV_POP, Token.T_STDDEV_SAMP, Token.T_SUBSTRING, Token.T_SUM, Token.T_THEN, Token.T_TO, Token.T_TRAILING, Token.T_TRIM, Token.T_UNIQUE, Token.T_UNION, Token.T_VALUES, Token.T_VAR_POP, Token.T_VAR_SAMP, Token.T_WHEN, Token.T_WHERE, }; for (int i = 0; i < keyword.length; i++) { keywords.add(keyword[i]); } } public static boolean isKeyword(String token) { return keywords.contains(token); } } hsqldb-1.8.0.10.orig/src/org/hsqldb/jdbc/0000755000175000017500000000000010264606641016361 5ustar renerenehsqldb-1.8.0.10.orig/src/org/hsqldb/jdbc/jdbcPreparedStatement.java0000644000175000017500000026034510770340574023512 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.jdbc; import java.io.IOException; import java.io.InputStream; import java.io.Reader; import java.io.Serializable; import java.math.BigDecimal; import java.sql.Date; //#ifdef JAVA6 /* import java.sql.NClob; import java.sql.RowId; import java.sql.SQLXML; */ //#endif JAVA6 import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.ResultSetMetaData; import java.sql.SQLException; import java.sql.Time; import java.sql.Timestamp; import java.util.Calendar; //#ifdef JAVA2 import java.sql.Array; import java.sql.Blob; import java.sql.Clob; import java.sql.Ref; //#endif JAVA2 //#ifdef JAVA4 import java.sql.ParameterMetaData; //#endif JAVA4 import org.hsqldb.Column; import org.hsqldb.HsqlDateTime; import org.hsqldb.HsqlException; import org.hsqldb.Result; import org.hsqldb.ResultConstants; import org.hsqldb.Trace; import org.hsqldb.Types; import org.hsqldb.lib.ArrayUtil; import org.hsqldb.lib.HsqlByteArrayOutputStream; import org.hsqldb.lib.Iterator; import org.hsqldb.lib.StringConverter; import org.hsqldb.types.Binary; import org.hsqldb.types.JavaObject; // fredt@users 20020320 - patch 1.7.0 - JDBC 2 support and error trapping // JDBC 2 methods can now be called from jdk 1.1.x - see javadoc comments // boucherb@users 20020509 - added "throws SQLException" to all methods where // it was missing here but specified in the java.sql.PreparedStatement and // java.sqlCallableStatement interfaces, updated generic documentation to // JDK 1.4, and added JDBC3 methods and docs // boucherb@users and fredt@users 20020409/20020505 extensive review and update // of docs and behaviour to comply with previous and latest java.sql specification // fredt@users 20030620 - patch 1.7.2 - rewritten to support real prepared statements // boucherb@users 20030801 - patch 1.7.2 - support for batch execution // boucherb@users 20030801 - patch 1.7.2 - support for getMetaData and getParameterMetadata // boucherb@users 20030801 - patch 1.7.2 - updated some setXXX methods // boucherb@users 200403/4xx - doc 1.7.2 - javadoc updates toward 1.7.2 final // boucherb@users 200403/4xx - patch 1.7.2 - eliminate eager buffer allocation from setXXXStream/Blob/Clob // fredt@users 20060215 - patch 1.8.0 - check for unset parameters /** * * * An object that represents a precompiled SQL statement.

    * * An SQL statement is precompiled and stored in a * PreparedStatement object. This object can then be used to * efficiently execute this statement multiple times. * *

    Note: The setter methods (setShort, * setString, and so on) for setting IN parameter values * must specify types that are compatible with the defined SQL type of * the input parameter. For instance, if the IN parameter has SQL type * INTEGER, then the method setInt should be * used.

    * * If arbitrary parameter type conversions are required, the method * setObject should be used with a target SQL type. *

    * In the following example of setting a parameter, con * represents an active connection: *

     * PreparedStatement pstmt = con.prepareStatement("UPDATE EMPLOYEES
     *                               SET SALARY = ? WHERE ID = ?");
     * pstmt.setBigDecimal(1, 153833.00)
     * pstmt.setInt(2, 110592)
     * 

    * * *

    *

    HSQLDB-Specific Information:

    * * Starting with HSQLDB 1.7.2, jdbcPreparedStatement objects are backed by * a true compiled parameteric representation. Hence, there are now significant * performance gains to be had by using a jdbcPreparedStatement object in * preference to a jdbcStatement object, if a short-running SQL statement is * to be executed more than a small number of times.

    * * When it can be otherwise avoided, it is to be considered poor * practice to fully prepare (construct), parameterize, execute, fetch and * close a jdbcPreparedStatement object for each execution cycle. Indeed, under * HSQLDB 1.8.0, this practice is likely to be noticably less * performant for short-running statements than the equivalent process using * jdbcStatement objects, albeit far more convenient, less error prone and * certainly much less resource-intensive, especially when large binary and * character values are involved, due to the optimized parameterization * facility.

    * * Instead, when developing an application that is not totally oriented toward * the execution of ad hoc SQL, it is recommended to expend some effort toward * identifing the SQL statements that are good candidates for regular reuse and * adapting the structure of the application accordingly. Often, this is done * by recording the text of candidate SQL statements in an application resource * object (which has the nice side-benefit of isolating and hiding differences * in SQL dialects across different drivers) and caching for possible reuse the * PreparedStatement objects derived from the recorded text.

    * * Multi thread use:

    * * A PreparedStatement object is stateful and should not normally be shared * by multiple threads. If it has to be shared, the calls to set the * parameters, calls to add batch statements, the execute call and any * post-execute calls should be made within a block synchronized on the * PreparedStatement Object.

    * * JRE 1.1.x Notes:

    * * In general, JDBC 2 support requires Java 1.2 and above, and JDBC3 requires * Java 1.4 and above. In HSQLDB, support for methods introduced in different * versions of JDBC depends on the JDK version used for compiling and building * HSQLDB.

    * * Since 1.7.0, it is possible to build the product so that * all JDBC 2 methods can be called while executing under the version 1.1.x * Java Runtime EnvironmentTM. * However, in addition to requiring explicit casts to the org.hsqldb.jdbcXXX * interface implementations, some of these method calls require * int values that are defined only in the JDBC 2 or greater * version of * * ResultSet interface. For this reason, when the * product is compiled under JDK 1.1.x, these values are defined in * {@link jdbcResultSet jdbcResultSet}.

    * * In a JRE 1.1.x environment, calling JDBC 2 methods that take or return the * JDBC2-only ResultSet values can be achieved by referring * to them in parameter specifications and return value comparisons, * respectively, as follows:

    * *

     * jdbcResultSet.FETCH_FORWARD
     * jdbcResultSet.TYPE_FORWARD_ONLY
     * jdbcResultSet.TYPE_SCROLL_INSENSITIVE
     * jdbcResultSet.CONCUR_READ_ONLY
     * // etc.
     * 
    * * However, please note that code written in such a manner will not be * compatible for use with other JDBC 2 drivers, since they expect and use * ResultSet, rather than jdbcResultSet. Also * note, this feature is offered solely as a convenience to developers * who must work under JDK 1.1.x due to operating constraints, yet wish to * use some of the more advanced features available under the JDBC 2 * specification.

    * * (fredt@users)
    * (boucherb@users) *

    * * * @author boucherb@users * @author fredt@users * @version 1.8.0 * @see jdbcConnection#prepareStatement * @see jdbcResultSet */ public class jdbcPreparedStatement extends jdbcStatement implements PreparedStatement { /** The parameter values for the next non-batch execution. */ protected Object[] parameterValues; /** Flags for bound variables. */ protected boolean[] parameterSet; /** Flags for bound stream variables. */ protected boolean[] parameterStream; /** The SQL types of the parameters. */ protected int[] parameterTypes; /** The (IN, IN OUT, or OUT) modes of parameters */ protected int[] parameterModes; /** Lengths for streams. */ protected int[] streamLengths; /** Has a stream or CLOB / BLOB parameter value. */ protected boolean hasStreams; /** * Description of result set metadata.

    */ protected Result rsmdDescriptor; /** Description of parameter metadata. */ protected Result pmdDescriptor; /** This object's one and one ResultSetMetaData object. */ protected jdbcResultSetMetaData rsmd; // NOTE: pmd is declared as Object to avoid yet another #ifdef. /** This object's one and only ParameterMetaData object. */ protected Object pmd; /** The SQL character sequence that this object represents. */ protected String sql; /** * The id with which this object's corresponding * {@link org.hsqldb.CompiledStatement CompiledStatement} * object is registered in the engine's * {@link org.hsqldb.CompiledStatementManager CompiledStatementManager} * object. */ protected int statementID; /** * Whether this statement generates only a single row update count in * response to execution. */ protected boolean isRowCount; // fredt@users 20020215 - patch 517028 by peterhudson@users - method defined // fredt@users 20020215 - patch 517028 by peterhudson@users - method defined // // changes by fredt // SimpleDateFormat objects moved out of methods to improve performance // this is safe because only one thread at a time should access a // PreparedStatement object until it has finished executing the statement // fredt@users 20020215 - patch 517028 by peterhudson@users - method defined // minor changes by fredt /** * * Sets escape processing on or off.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Since 1.7.0, the implementation follows the standard * behaviour by overriding the same method in jdbcStatement * class.

    * * In other words, calling this method has no effect. *

    * * * @param enable true to enable escape processing; * false to disable it * @exception SQLException if a database access error occurs */ public void setEscapeProcessing(boolean enable) throws SQLException { checkClosed(); } /** * * Executes the SQL statement in this PreparedStatement * object, which may be any kind of SQL statement. * Some prepared statements return multiple results; the * execute method handles these complex statements as well * as the simpler form of statements handled by the methods * executeQueryand executeUpdate.

    * * The execute method returns a boolean to * indicate the form of the first result. You must call either the method * getResultSet or getUpdateCount * to retrieve the result; you must call getMoreResults to * move to any subsequent result(s).

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.8.0, prepared statements do not generate * multiple fetchable results.

    * * In future versions, it will be possible that statements * generate multiple fetchable results under certain conditions. *

    * * @return true if the first result is a ResultSet * object; false if the first result is an update * count or there is no result * @exception SQLException if a database access error occurs or an argument * is supplied to this method * @see jdbcStatement#execute * @see jdbcStatement#getResultSet * @see jdbcStatement#getUpdateCount * @see jdbcStatement#getMoreResults */ public boolean execute() throws SQLException { checkClosed(); connection.clearWarningsNoCheck(); resultIn = null; try { resultOut.setMaxRows(maxRows); resultOut.setParameterData(parameterValues); resultIn = connection.sessionProxy.execute(resultOut); } catch (HsqlException e) { throw Util.sqlException(e); } if (resultIn.isError()) { Util.throwError(resultIn); } return resultIn.isData(); } /** * * Executes the SQL query in this PreparedStatement object * and returns the ResultSet object generated by the query.

    * * * @return a ResultSet object that contains the data produced * by the query; never null * @exception SQLException if a database access error occurs or the SQL * statement does not return a ResultSet object */ public ResultSet executeQuery() throws SQLException { checkClosed(); connection.clearWarningsNoCheck(); checkIsRowCount(false); checkParametersSet(); resultIn = null; try { resultOut.setMaxRows(maxRows); resultOut.setParameterData(parameterValues); resultIn = connection.sessionProxy.execute(resultOut); } catch (HsqlException e) { throw Util.sqlException(e); } if (resultIn.isError()) { Util.throwError(resultIn); } else if (!resultIn.isData()) { String msg = "Expected but did not recieve a result set"; throw Util.sqlException(Trace.UNEXPECTED_EXCEPTION, msg); } return new jdbcResultSet(this, resultIn, connection.connProperties, connection.isNetConn); } /** * * Executes the SQL statement in this PreparedStatement * object, which must be an SQL INSERT, * UPDATE or DELETE statement; or an SQL * statement that returns nothing, such as a DDL statement.

    * * * @return either (1) the row count for INSERT, * UPDATE, or DELETE * statements or (2) 0 for SQL statements that * return nothing * @exception SQLException if a database access error occurs or the SQL * statement returns a ResultSet object */ public int executeUpdate() throws SQLException { checkClosed(); connection.clearWarningsNoCheck(); checkIsRowCount(true); checkParametersSet(); resultIn = null; try { resultOut.setParameterData(parameterValues); resultIn = connection.sessionProxy.execute(resultOut); } catch (HsqlException e) { throw Util.sqlException(e); } if (resultIn.isError()) { Util.throwError(resultIn); } else if (resultIn.mode != ResultConstants.UPDATECOUNT) { String msg = "Expected but did not recieve a row update count"; throw Util.sqlException(Trace.UNEXPECTED_EXCEPTION, msg); } return resultIn.getUpdateCount(); } /** * * Submits a batch of commands to the database for execution and * if all commands execute successfully, returns an array of update counts. * The int elements of the array that is returned are ordered * to correspond to the commands in the batch, which are ordered * according to the order in which they were added to the batch. * The elements in the array returned by the method executeBatch * may be one of the following: *

      *
    1. A number greater than or equal to zero -- indicates that the * command was processed successfully and is an update count giving the * number of rows in the database that were affected by the command's * execution *
    2. A value of SUCCESS_NO_INFO -- indicates that the command was * processed successfully but that the number of rows affected is * unknown *

      * If one of the commands in a batch update fails to execute properly, * this method throws a BatchUpdateException, and a JDBC * driver may or may not continue to process the remaining commands in * the batch. However, the driver's behavior must be consistent with a * particular DBMS, either always continuing to process commands or never * continuing to process commands. If the driver continues processing * after a failure, the array returned by the method * BatchUpdateException.getUpdateCounts * will contain as many elements as there are commands in the batch, and * at least one of the elements will be the following: *

      *

    3. A value of EXECUTE_FAILED -- indicates that the command failed * to execute successfully and occurs only if a driver continues to * process commands after a command fails *
    *

    * A driver is not required to implement this method. * The possible implementations and return values have been modified in * the Java 2 SDK, Standard Edition, version 1.3 to * accommodate the option of continuing to proccess commands in a batch * update after a BatchUpdateException obejct has been thrown.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Starting with HSQLDB 1.7.2, this feature is supported.

    * * HSQLDB stops execution of commands in a batch when one of the commands * results in an exception. The size of the returned array equals the * number of commands that were executed successfully.

    * * When the product is built under the JAVA1 target, an exception * is never thrown and it is the responsibility of the client software to * check the size of the returned update count array to determine if any * batch items failed. To build and run under the JAVA2 target, JDK/JRE * 1.3 or higher must be used. *

    * * * @return an array of update counts containing one element for each * command in the batch. The elements of the array are ordered according * to the order in which commands were added to the batch. * @exception SQLException if a database access error occurs or the * driver does not support batch statements. Throws * {@link java.sql.BatchUpdateException} * (a subclass of java.sql.SQLException) if one of the commands * sent to the database fails to execute properly or attempts to return a * result set. * @since JDK 1.3 (JDK 1.1.x developers: read the new overview * for jdbcStatement) */ public int[] executeBatch() throws SQLException { if (batchResultOut == null) { batchResultOut = new Result(ResultConstants.BATCHEXECUTE, parameterTypes, statementID); } return super.executeBatch(); } /** * * Sets the designated parameter to SQL NULL.

    * * Note: You must specify the parameter's SQL type.

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB ignores the sqlType argument. *

    * * * @param paramIndex the first parameter is 1, the second is 2, ... * @param sqlType the SQL type code defined in java.sql.Types * @exception SQLException if a database access error occurs */ public void setNull(int paramIndex, int sqlType) throws SQLException { setParameter(paramIndex, null); } /** * * Sets the designated parameter to the given Java boolean * value. The driver converts this to an SQL BIT value * when it sends it to the database.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Since 1.7.2, HSQLDB uses the BOOLEAN type instead of BIT, as * per SQL 200n (SQL 3). *

    * * * @param parameterIndex the first parameter is 1, the second is 2, ... * @param x the parameter value * @exception SQLException if a database access error occurs */ public void setBoolean(int parameterIndex, boolean x) throws SQLException { Boolean b = x ? Boolean.TRUE : Boolean.FALSE; setParameter(parameterIndex, b); } /** * * Sets the designated parameter to the given Java byte value. * The driver converts this to an SQL TINYINT value when * it sends it to the database.

    * * * @param parameterIndex the first parameter is 1, the second is 2, ... * @param x the parameter value * @exception SQLException if a database access error occurs */ public void setByte(int parameterIndex, byte x) throws SQLException { setIntParameter(parameterIndex, x); } /** * * Sets the designated parameter to the given Java short * value. The driver converts this to an SQL SMALLINT * value when it sends it to the database.

    * * * @param parameterIndex the first parameter is 1, the second is 2, ... * @param x the parameter value * @exception SQLException if a database access error occurs */ public void setShort(int parameterIndex, short x) throws SQLException { setIntParameter(parameterIndex, x); } /** * * Sets the designated parameter to the given Java int value. * The driver converts this to an SQL INTEGER value when * it sends it to the database.

    * * * @param parameterIndex the first parameter is 1, the second is 2, ... * @param x the parameter value * @exception SQLException if a database access error occurs */ public void setInt(int parameterIndex, int x) throws SQLException { setIntParameter(parameterIndex, x); } /** * * Sets the designated parameter to the given Java long value. * The driver converts this to an SQL BIGINT value when * it sends it to the database.

    * * * @param parameterIndex the first parameter is 1, the second is 2, ... * @param x the parameter value * @exception SQLException if a database access error occurs */ public void setLong(int parameterIndex, long x) throws SQLException { setLongParameter(parameterIndex, x); } /** * * Sets the designated parameter to the given Java float value. * The driver converts this to an SQL FLOAT value when * it sends it to the database.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Since 1.7.1, HSQLDB handles Java positive/negative Infinity * and NaN float values consistent with the Java Language * Specification; these special values are now correctly stored * to and retrieved from the database. *

    * * * @param parameterIndex the first parameter is 1, the second is 2, ... * @param x the parameter value * @exception SQLException if a database access error occurs */ public void setFloat(int parameterIndex, float x) throws SQLException { setDouble(parameterIndex, (double) x); } /** * * Sets the designated parameter to the given Java double value. * The driver converts this to an SQL DOUBLE value when it * sends it to the database.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Since 1.7.1, HSQLDB handles Java positive/negative Infinity * and NaN double values consistent with the Java Language * Specification; these special values are now correctly stored * to and retrieved from the database. *

    * * * @param parameterIndex the first parameter is 1, the second is 2, ... * @param x the parameter value * @exception SQLException if a database access error occurs */ public void setDouble(int parameterIndex, double x) throws SQLException { Double d = new Double(x); setParameter(parameterIndex, d); } /** * * Sets the designated parameter to the given * java.math.BigDecimal value. * The driver converts this to an SQL NUMERIC value when * it sends it to the database.

    * * * @param parameterIndex the first parameter is 1, the second is 2, ... * @param x the parameter value * @exception SQLException if a database access error occurs */ public void setBigDecimal(int parameterIndex, BigDecimal x) throws SQLException { setParameter(parameterIndex, x); } /** * * Sets the designated parameter to the given Java String value. * The driver converts this * to an SQL VARCHAR or LONGVARCHAR value * (depending on the argument's * size relative to the driver's limits on VARCHAR values) * when it sends it to the database.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB stores all XXXCHAR values as java.lang.String * objects; there is no appreciable difference between * CHAR, VARCHAR and LONGVARCHAR. *

    * * * @param parameterIndex the first parameter is 1, the second is 2, ... * @param x the parameter value * @exception SQLException if a database access error occurs */ public void setString(int parameterIndex, String x) throws SQLException { setParameter(parameterIndex, x); } /** * * Sets the designated parameter to the given Java array of bytes. * The driver converts this to an SQL VARBINARY or * LONGVARBINARY (depending on the argument's size relative * to the driver's limits on VARBINARY values) when it * sends it to the database.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB stores all XXXBINARY values the same way; there * is no appreciable difference between BINARY, VARBINARY and * LONGVARBINARY. *

    * * * @param paramIndex the first parameter is 1, the second is 2, ... * @param x the parameter value * @exception SQLException if a database access error occurs */ public void setBytes(int paramIndex, byte[] x) throws SQLException { setParameter(paramIndex, x); } /** * * Sets the designated parameter to the given * java.sql.Date value. The driver converts this * to an SQL DATE value when it sends it to the database.

    * * * @param parameterIndex the first parameter is 1, the second is 2, ... * @param x the parameter value * @exception SQLException if a database access error occurs */ public void setDate(int parameterIndex, Date x) throws SQLException { setParameter(parameterIndex, x); } /** * * Sets the designated parameter to the given java.sql.Time * value. The driver converts this to an SQL TIME value when it * sends it to the database.

    * * * @param parameterIndex the first parameter is 1, the second is 2, ... * @param x the parameter value * @exception SQLException if a database access error occurs */ public void setTime(int parameterIndex, Time x) throws SQLException { setParameter(parameterIndex, x); } /** * * Sets the designated parameter to the given * java.sql.Timestamp value. The driver converts this to * an SQL TIMESTAMP value when it sends it to the * database.

    * * * @param parameterIndex the first parameter is 1, the second is 2, ... * @param x the parameter value * @exception SQLException if a database access error occurs */ public void setTimestamp(int parameterIndex, Timestamp x) throws SQLException { setParameter(parameterIndex, x); } /** * * Sets the designated parameter to the given input stream, which will have * the specified number of bytes. * When a very large ASCII value is input to a LONGVARCHAR * parameter, it may be more practical to send it via a * java.io.InputStream. Data will be read from the stream * as needed until end-of-file is reached. The JDBC driver will * do any necessary conversion from ASCII to the database char format.

    * * Note: This stream object can either be a standard * Java stream object or your own subclass that implements the * standard interface.

    * * *

    *

    HSQLDB-Specific Information:

    * * This method uses the default platform character encoding to convert bytes * from the stream into the characters of a String. In the future this is * likely to change to always treat the stream as ASCII.

    * * Before HSQLDB 1.7.0, setAsciiStream and * setUnicodeStream were identical. *

    * * * @param parameterIndex the first parameter is 1, the second is 2, ... * @param x the Java input stream that contains the ASCII parameter value * @param length the number of bytes in the stream * @exception SQLException if a database access error occurs */ public void setAsciiStream(int parameterIndex, java.io.InputStream x, int length) throws SQLException { checkSetParameterIndex(parameterIndex, true); String s; if (x == null) { s = "input stream is null"; throw Util.sqlException(Trace.INVALID_JDBC_ARGUMENT, s); } try { s = StringConverter.inputStreamToString(x, length); setParameter(parameterIndex, s); } catch (IOException e) { throw Util.sqlException(Trace.INVALID_CHARACTER_ENCODING); } } /** * * Sets the designated parameter to the given input stream, which * will have the specified number of bytes. A Unicode character has * two bytes, with the first byte being the high byte, and the second * being the low byte. * * When a very large Unicode value is input to a LONGVARCHAR * parameter, it may be more practical to send it via a * java.io.InputStream object. The data will be read from the * stream as needed until end-of-file is reached. The JDBC driver will * do any necessary conversion from Unicode to the database char format. * *

    Note: This stream object can either be a standard * Java stream object or your own subclass that implements the * standard interface.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Since 1.7.0, this method complies with behavior as defined by the * JDBC3 specification. *

    * * * @param parameterIndex the first parameter is 1, the second is 2, ... * @param x a java.io.InputStream object that contains the * Unicode parameter value as two-byte Unicode characters * @param length the number of bytes in the stream * @exception SQLException if a database access error occurs * @deprecated Sun does not include a reason, but presumably * this is because setCharacterStream is now prefered */ //#ifdef DEPRECATEDJDBC public void setUnicodeStream(int parameterIndex, java.io.InputStream x, int length) throws SQLException { checkSetParameterIndex(parameterIndex, true); String msg = null; if (x == null) { msg = "input stream is null"; } else if (length % 2 != 0) { msg = "odd length argument"; } if (msg != null) { throw Util.sqlException(Trace.INVALID_JDBC_ARGUMENT, msg); } int chlen = length / 2; int chread = 0; StringBuffer sb = new StringBuffer(); int hi; int lo; try { for (; chread < chlen; chread++) { hi = x.read(); if (hi == -1) { break; } lo = x.read(); if (lo == -1) { break; } sb.append((char) (hi << 8 | lo)); } } catch (IOException e) { throw Util.sqlException(Trace.TRANSFER_CORRUPTED); } setParameter(parameterIndex, sb.toString()); } //#endif /** * * Sets the designated parameter to the given input stream, which will have * the specified number of bytes. * When a very large binary value is input to a LONGVARBINARY * parameter, it may be more practical to send it via a * java.io.InputStream object. The data will be read from the * stream as needed until end-of-file is reached. * *

    Note: This stream object can either be a standard * Java stream object or your own subclass that implements the * standard interface.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Since 1.7.2, this method works according to the standard. *

    * * * @param parameterIndex the first parameter is 1, the second is 2, ... * @param x the java input stream which contains the binary parameter value * @param length the number of bytes in the stream * @exception SQLException if a database access error occurs */ public void setBinaryStream(int parameterIndex, java.io.InputStream x, int length) throws SQLException { checkSetParameterIndex(parameterIndex, true); if (x == null) { throw Util.sqlException(Trace.error(Trace.INVALID_JDBC_ARGUMENT, Trace.JDBC_NULL_STREAM)); } HsqlByteArrayOutputStream out = null; try { out = new HsqlByteArrayOutputStream(); int size = 2048; byte[] buff = new byte[size]; for (int left = length; left > 0; ) { int read = x.read(buff, 0, left > size ? size : left); if (read == -1) { break; } out.write(buff, 0, read); left -= read; } setParameter(parameterIndex, out.toByteArray()); } catch (IOException e) { throw Util.sqlException(Trace.INPUTSTREAM_ERROR, e.toString()); } finally { if (out != null) { try { out.close(); } catch (IOException e) {} } } } /** * * Clears the current parameter values immediately.

    * * In general, parameter values remain in force for repeated use of a * statement. Setting a parameter value automatically clears its * previous value. However, in some cases it is useful to immediately * release the resources used by the current parameter values; this can * be done by calling the method clearParameters.

    * * * @exception SQLException if a database access error occurs */ public void clearParameters() throws SQLException { checkClosed(); ArrayUtil.fillArray(parameterValues, null); ArrayUtil.clearArray(ArrayUtil.CLASS_CODE_BOOLEAN, parameterSet, 0, parameterSet.length); if (parameterStream != null) { ArrayUtil.clearArray(ArrayUtil.CLASS_CODE_BOOLEAN, parameterStream, 0, parameterStream.length); } } //---------------------------------------------------------------------- // Advanced features: /** * * Sets the value of the designated parameter with the given object.

    * * The second argument must be an object type; for integral values, the * java.lang equivalent objects should be used.

    * * The given Java object will be converted to the given targetSqlType * before being sent to the database. * * If the object has a custom mapping (is of a class implementing the * interface SQLData), * the JDBC driver should call the method SQLData.writeSQL to * write it to the SQL data stream. * If, on the other hand, the object is of a class implementing * Ref, Blob, Clob, * Struct, or Array, the driver should pass it * to the database as a value of the corresponding SQL type.

    * * Note that this method may be used to pass database-specific * abstract data types.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Inculding 1.7.1,this method was identical to * {@link #setObject(int, Object, int) setObject(int, Object, int)}. * That is, this method simply called setObject(int, Object, int), * ignoring the scale specification.

    * * Since 1.7.2, this method supports the conversions listed in the * conversion table B-5 of the JDBC 3 specification. The scale argument * is not used. *

    * * * @param parameterIndex the first parameter is 1, the second is 2, ... * @param x the object containing the input parameter value * @param targetSqlType the SQL type (as defined in java.sql.Types) to be * sent to the database. The scale argument may further qualify this type. * @param scale for java.sql.Types.DECIMAL or java.sql.Types.NUMERIC types, * this is the number of digits after the decimal point. For all * other types, this value will be ignored.

    * * Up to and including HSQLDB 1.7.0, this parameter is ignored. * @exception SQLException if a database access error occurs * @see java.sql.Types * @see #setObject(int,Object,int) */ public void setObject(int parameterIndex, Object x, int targetSqlType, int scale) throws SQLException { /** @todo fredt - implement SQLData support */ setObject(parameterIndex, x); } /** * * Sets the value of the designated parameter with the given object. * This method is like the method setObject * above, except that it assumes a scale of zero.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Since 1.7.2, this method supports conversions listed in the * conversion table B-5 of the JDBC 3 specification. *

    * * * @param parameterIndex the first parameter is 1, the second is 2, ... * @param x the object containing the input parameter value * @param targetSqlType the SQL type (as defined in java.sql.Types) to be * sent to the database * @exception SQLException if a database access error occurs * @see #setObject(int,Object) */ public void setObject(int parameterIndex, Object x, int targetSqlType) throws SQLException { setObject(parameterIndex, x); } /** * * Sets the value of the designated parameter using the given object.

    * * The second parameter must be of type Object; therefore, * the java.lang equivalent objects should be used for * built-in types.

    * * The JDBC specification specifies a standard mapping from * Java Object types to SQL types. The given argument * will be converted to the corresponding SQL type before being * sent to the database.

    * * Note that this method may be used to pass datatabase- * specific abstract data types, by using a driver-specific Java * type. If the object is of a class implementing the interface * SQLData, the JDBC driver should call the method * SQLData.writeSQL to write it to the SQL data stream. * If, on the other hand, the object is of a class implementing * Ref, Blob, Clob, * Struct, or Array, the driver should pass * it to the database as a value of the corresponding SQL type.

    * * This method throws an exception if there is an ambiguity, for * example, if the object is of a class implementing more than one * of the interfaces named above.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Since 1.7.2, this method supports conversions listed in the conversion * table B-5 of the JDBC 3 specification.

    * *

    * * @param parameterIndex the first parameter is 1, the second is 2, ... * @param x the object containing the input parameter value * @exception SQLException if a database access error occurs or the type * of the given object is ambiguous */ public void setObject(int parameterIndex, Object x) throws SQLException { setParameter(parameterIndex, x); } //--------------------------JDBC 2.0----------------------------- /** * * Adds a set of parameters to this PreparedStatement * object's batch of commands.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Since 1.7.2, this feature is supported. *

    * * * @exception SQLException if a database access error occurs * @see jdbcStatement#addBatch * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcPreparedStatement) */ // boucherb@users 20030801 - method implemented public void addBatch() throws SQLException { checkClosed(); int len = parameterValues.length; Object[] bpValues = new Object[len]; checkParametersSet(); System.arraycopy(parameterValues, 0, bpValues, 0, len); if (batchResultOut == null) { batchResultOut = new Result(ResultConstants.BATCHEXECUTE, parameterTypes, statementID); } batchResultOut.add(bpValues); } /** * * Sets the designated parameter to the given Reader * object, which is the given number of characters long. * When a very large UNICODE value is input to a LONGVARCHAR * parameter, it may be more practical to send it via a * java.io.Reader object. The data will be read from the * stream as needed until end-of-file is reached. The JDBC driver will * do any necessary conversion from UNICODE to the database char format. * *

    Note: This stream object can either be a standard * Java stream object or your own subclass that implements the * standard interface.

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB stores CHARACTER and related SQL types as Unicode so * this method does not perform any conversion. *

    * * * @param parameterIndex the first parameter is 1, the second is 2, ... * @param reader the java.io.Reader object that contains the * Unicode data * @param length the number of characters in the stream * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcPreparedStatement) */ // fredt@users 20020429 - patch 1.7.0 - method defined // fredt@users 20020627 - patch 574234 by ohioedge@users // boucherb@users 20030801 - patch 1.7.2 - updated public void setCharacterStream(int parameterIndex, java.io.Reader reader, int length) throws SQLException { checkSetParameterIndex(parameterIndex, true); if (reader == null) { String msg = "reader is null"; throw Util.sqlException(Trace.INVALID_JDBC_ARGUMENT, msg); } final StringBuffer sb = new StringBuffer(); final int size = 2048; final char[] buff = new char[size]; try { for (int left = length; left > 0; ) { final int read = reader.read(buff, 0, left > size ? size : left); if (read == -1) { break; } sb.append(buff, 0, read); left -= read; } } catch (IOException e) { throw Util.sqlException(Trace.TRANSFER_CORRUPTED, e.toString()); } setParameter(parameterIndex, sb.toString()); } /** * * Sets the designated parameter to the given * REF(<structured-type>) value. * The driver converts this to an SQL REF value when it * sends it to the database.

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.2 does not support the SQL REF type. Calling this method * throws an exception. * *

    * * @param i the first parameter is 1, the second is 2, ... * @param x an SQL REF value * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcPreparedStatement) */ //#ifdef JAVA2 public void setRef(int i, Ref x) throws SQLException { throw Util.notSupported(); } //#endif JAVA2 /** * * Sets the designated parameter to the given Blob object. * The driver converts this to an SQL BLOB value when it * sends it to the database.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Previous to 1.7.2, this feature was not supported.

    * * Since 1.7.2, setBlob is supported. With 1.7.2, setting Blob objects is * limited to those of length less than or equal to Integer.MAX_VALUE. * In 1.7.2, setBlob(i,x) is roughly equivalent (null and length handling * not shown) to: * *

         * setBinaryStream(i, x.getBinaryStream(), (int) x.length());
         * 
    * * * @param i the first parameter is 1, the second is 2, ... * @param x a Blob object that maps an SQL BLOB * value * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcPreparedStatement) */ // boucherb@users 20030801 - method implemented //#ifdef JAVA2 public void setBlob(int i, Blob x) throws SQLException { if (x instanceof jdbcBlob) { setParameter(i, ((jdbcBlob) x).data); return; } else if (x == null) { setParameter(i, null); return; } checkSetParameterIndex(i, false); final long length = x.length(); if (length > Integer.MAX_VALUE) { String msg = "Maximum Blob input octet length exceeded: " + length; throw Util.sqlException(Trace.INPUTSTREAM_ERROR, msg); } HsqlByteArrayOutputStream out = null; try { out = new HsqlByteArrayOutputStream(); java.io.InputStream in = x.getBinaryStream(); int buffSize = 2048; byte[] buff = new byte[buffSize]; for (int left = (int) length; left > 0; ) { int read = in.read(buff, 0, left > buffSize ? buffSize : left); if (read == -1) { break; } out.write(buff, 0, read); left -= read; } setParameter(i, out.toByteArray()); } catch (IOException e) { throw Util.sqlException(Trace.INPUTSTREAM_ERROR, e.toString()); } finally { if (out != null) { try { out.close(); } catch (IOException e) {} } } } //#endif JAVA2 /** * * Sets the designated parameter to the given Clob object. * The driver converts this to an SQL CLOB value when it * sends it to the database.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Previous to 1.7.2, this feature was not supported.

    * * Since 1.7.2, setClob is supported. With 1.7.2, setting Blob objects is * limited to those of length less than or equal to Integer.MAX_VALUE. * In 1.7.2, setClob(i,x) is rougly equivalent (null and length handling * not shown) to:

    * *

         * setCharacterStream(i, x.getCharacterStream(), (int) x.length());
         * 
    * * @param i the first parameter is 1, the second is 2, ... * @param x a Clob object that maps an SQL CLOB * value * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcPreparedStatement) */ // boucherb@users 20030801 - method implemented //#ifdef JAVA2 public void setClob(int i, Clob x) throws SQLException { if (x instanceof jdbcClob) { setParameter(i, ((jdbcClob) x).data); return; } else if (x == null) { setParameter(i, null); return; } checkSetParameterIndex(i, false); final long length = x.length(); if (length > Integer.MAX_VALUE) { String msg = "Max Clob input character length exceeded: " + length; throw Util.sqlException(Trace.INPUTSTREAM_ERROR, msg); } java.io.Reader reader = x.getCharacterStream(); final StringBuffer sb = new StringBuffer(); final int size = 2048; final char[] buff = new char[size]; try { for (int left = (int) length; left > 0; ) { final int read = reader.read(buff, 0, left > size ? size : left); if (read == -1) { break; } sb.append(buff, 0, read); left -= read; } } catch (IOException e) { throw Util.sqlException(Trace.TRANSFER_CORRUPTED, e.toString()); } setParameter(i, sb.toString()); } //#endif JAVA2 /** * * Sets the designated parameter to the given Array object. * The driver converts this to an SQL ARRAY value when it * sends it to the database.

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.2 does not support the SQL ARRAY type. Calling this method * throws an exception. * *

    * * @param i the first parameter is 1, the second is 2, ... * @param x an Array object that maps an SQL ARRAY * value * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcPreparedStatement) */ //#ifdef JAVA2 public void setArray(int i, Array x) throws SQLException { throw Util.notSupported(); } //#endif JAVA2 /** * * Retrieves a ResultSetMetaData object that contains * information about the columns of the ResultSet object * that will be returned when this PreparedStatement object * is executed. *

    * Because a PreparedStatement object is precompiled, it is * possible to know about the ResultSet object that it will * return without having to execute it. Consequently, it is possible * to invoke the method getMetaData on a * PreparedStatement object rather than waiting to execute * it and then invoking the ResultSet.getMetaData method * on the ResultSet object that is returned. *

    * NOTE: Using this method may be expensive for some drivers due * to the lack of underlying DBMS support.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Since 1.7.2, this feature is supported. If the statement * generates an update count, then null is returned. * *

    * * @return the description of a ResultSet object's columns or * null if the driver cannot return a * ResultSetMetaData object * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcPreparedStatement) */ // boucherb@users 20030801 - method implemented public ResultSetMetaData getMetaData() throws SQLException { checkClosed(); if (isRowCount) { return null; } if (rsmd == null) { rsmd = new jdbcResultSetMetaData(rsmdDescriptor, connection.connProperties); } return rsmd; } /** * * Sets the designated parameter to the given java.sql.Date * value, using the given Calendar object. The driver uses * the Calendar object to construct an SQL DATE * value,which the driver then sends to the database. With a * a Calendar object, the driver can calculate the date * taking into account a custom timezone. If no * Calendar object is specified, the driver uses the default * timezone, which is that of the virtual machine running the * application.

    * * * @param parameterIndex the first parameter is 1, the second is 2, ... * @param x the parameter value * @param cal the Calendar object the driver will use * to construct the date * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcPreparedStatement) */ // fredt@users 20020414 - patch 517028 by peterhudson@users - method defined // changes by fredt - moved conversion to HsqlDateTime public void setDate(int parameterIndex, Date x, Calendar cal) throws SQLException { String s; try { s = HsqlDateTime.getDateString(x, cal); } catch (Exception e) { throw Util.sqlException(Trace.INVALID_ESCAPE, e.toString()); } setParameter(parameterIndex, s); } /** * * Sets the designated parameter to the given java.sql.Time * value, using the given Calendar object. The driver uses * the Calendar object to construct an SQL TIME * value, which the driver then sends to the database. With a * a Calendar object, the driver can calculate the time * taking into account a custom timezone. If no * Calendar object is specified, the driver uses the default * timezone, which is that of the virtual machine running the * application.

    * * * @param parameterIndex the first parameter is 1, the second is 2, ... * @param x the parameter value * @param cal the Calendar object the driver will use * to construct the time * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcPreparedStatement) */ // fredt@users 20020414 - patch 517028 by peterhudson@users - method defined // changes by fredt - moved conversion to HsqlDateTime public void setTime(int parameterIndex, Time x, Calendar cal) throws SQLException { String s; try { s = HsqlDateTime.getTimeString(x, cal); } catch (Exception e) { throw Util.sqlException(Trace.INVALID_ESCAPE, e.toString()); } setParameter(parameterIndex, s); } /** * * Sets the designated parameter to the given java.sql.Timestamp * value, using the given Calendar object. The driver uses * the Calendar object to construct an SQL TIMESTAMP * value, which the driver then sends to the database. With a * Calendar object, the driver can calculate the timestamp * taking into account a custom timezone. If no * Calendar object is specified, the driver uses the default * timezone, which is that of the virtual machine running the application.

    * * * @param parameterIndex the first parameter is 1, the second is 2, ... * @param x the parameter value * @param cal the Calendar object the driver will use * to construct the timestamp * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcPreparedStatement) */ // fredt@users 20020414 - patch 517028 by peterhudson@users - method defined // changes by fredt - moved conversion to HsqlDateTime public void setTimestamp(int parameterIndex, Timestamp x, Calendar cal) throws SQLException { checkSetParameterIndex(parameterIndex, false); if (cal != null && x != null) { int ns = x.getNanos(); x = new Timestamp(HsqlDateTime.getTimeInMillis(x, cal, null)); x.setNanos(ns); } setParameter(parameterIndex, x); } /** * * Sets the designated parameter to SQL NULL. * This version of the method setNull should * be used for user-defined types and REF type parameters. Examples * of user-defined types include: STRUCT, DISTINCT, JAVA_OBJECT, and * named array types. * *

    Note: To be portable, applications must give the * SQL type code and the fully-qualified SQL type name when specifying * a NULL user-defined or REF parameter. In the case of a user-defined * type the name is the type name of the parameter itself. For a REF * parameter, the name is the type name of the referenced type. If * a JDBC driver does not need the type code or type name information, * it may ignore it. * * Although it is intended for user-defined and Ref parameters, * this method may be used to set a null parameter of any JDBC type. * If the parameter does not have a user-defined or REF type, the given * typeName is ignored.

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB ignores the sqlType and typeName arguments. *

    * * * @param paramIndex the first parameter is 1, the second is 2, ... * @param sqlType a value from java.sql.Types * @param typeName the fully-qualified name of an SQL user-defined type; * ignored if the parameter is not a user-defined type or REF * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcPreparedStatement) */ public void setNull(int paramIndex, int sqlType, String typeName) throws SQLException { setParameter(paramIndex, null); } //------------------------- JDBC 3.0 ----------------------------------- /** * * Sets the designated parameter to the given java.net.URL * value. The driver converts this to an SQL DATALINK value * when it sends it to the database.

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.2 does not support the DATALINK SQL type for which this * method is intended. Calling this method throws an exception. * *

    * * @param parameterIndex the first parameter is 1, the second is 2, ... * @param x the java.net.URL object to be set * @exception SQLException if a database access error occurs * @since JDK 1.4, HSQL 1.7.0 */ //#ifdef JAVA4 public void setURL(int parameterIndex, java.net.URL x) throws SQLException { throw Util.notSupported(); } //#endif JAVA4 /** * * Retrieves the number, types and properties of this * PreparedStatement object's parameters.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Since 1.7.2, this feature is supported. *

    * * * @return a ParameterMetaData object that contains information * about the number, types and properties of this * PreparedStatement object's parameters * @exception SQLException if a database access error occurs * @see java.sql.ParameterMetaData * @since JDK 1.4, HSQL 1.7.0 */ // boucherb@users 20030801 - method implemented //#ifdef JAVA4 public ParameterMetaData getParameterMetaData() throws SQLException { checkClosed(); if (pmd == null) { pmd = new jdbcParameterMetaData(pmdDescriptor); } // NOTE: pmd is declared as Object to avoid yet another #ifdef. return (ParameterMetaData) pmd; } //#endif JAVA4 //-------------------- Internal Implementation ----------------------------- /** * Constructs a statement that produces results of the requested * type.

    * * A prepared statement must be a single SQL statement.

    * * @param c the Connection used execute this statement * @param sql the SQL statement this object represents * @param type the type of result this statement will produce * @throws HsqlException if the statement is not accepted by the database * @throws SQLException if preprocessing by driver fails */ jdbcPreparedStatement(jdbcConnection c, String sql, int type) throws HsqlException, SQLException { super(c, type); sql = c.nativeSQL(sql); resultOut.setResultType(ResultConstants.SQLPREPARE); resultOut.setMainString(sql); Result in = connection.sessionProxy.execute(resultOut); if (in.isError()) { Util.throwError(in); } // else it's a MULTI result encapsulating three sub results: // 1.) a PREPARE_ACK // // Indicates the statement id to be communicated in SQLEXECUTE // requests to allow the engine to find the corresponding // CompiledStatement object, parameterize and execute it. // // 2.) a description of the statement's result set metadata // // This is communicated in the same way as for result sets. That is, // the metadata arrays of Result, such as colTypes, are used in the // "conventional" fashion. With some work, it may be possible // to speed up internal execution of prepared statements by // dispensing with generating most rsmd values while generating // the result, safe in the knowlege that the client already // has a copy of the rsmd. In general, only the colTypes array // must be available at the engine, and only for network // communications so that the row output and row input // interfaces can do their work. One caveat is that the // columnDisplaySize values are not accurate, as we do // not consistently enforce column size yet and instead // approximate the value when a result with actual data is // retrieved // // 3.) a description of the statement's parameter metadata // // This is communicated in a similar fashion to 2.), but has // a slighly different layout to allow the parameter modes // to be transmitted. The values of this object are used // to set up the parameter management of this class. The // object is also used to construct the jdbcParameterMetaData // object later, if requested. That is, it holds information // additional to that used by this class, so it should not be // altered or disposed of // // (boucherb@users) Iterator i; i = in.iterator(); try { Object[] row; // PREPARE_ACK row = (Object[]) i.next(); statementID = ((Result) row[0]).getStatementID(); // DATA - isParameterDescription == false row = (Object[]) i.next(); rsmdDescriptor = (Result) row[0]; isRowCount = rsmdDescriptor.mode == ResultConstants.UPDATECOUNT; // DATA - isParameterDescription == true row = (Object[]) i.next(); pmdDescriptor = (Result) row[0]; parameterTypes = pmdDescriptor.metaData.getParameterTypes(); parameterValues = new Object[parameterTypes.length]; parameterSet = new boolean[parameterTypes.length]; parameterModes = pmdDescriptor.metaData.paramMode; } catch (Exception e) { throw Trace.error(Trace.GENERAL_ERROR, e.toString()); } resultOut = new Result(ResultConstants.SQLEXECUTE, parameterTypes, statementID); // for toString() this.sql = sql; } /** * Checks if execution does or does not generate a single row * update count, throwing if the argument, yes, does not match.

    * * @param yes if true, check that execution generates a single * row update count, else check that execution generates * something other than a single row update count. * @throws SQLException if the argument, yes, does not match */ protected void checkIsRowCount(boolean yes) throws SQLException { if (yes != isRowCount) { int msg = yes ? Trace.JDBC_STATEMENT_NOT_ROW_COUNT : Trace.JDBC_STATEMENT_NOT_RESULTSET; throw Util.sqlException(msg); } } /** * Checks if the specified parameter index value is valid in terms of * setting an IN or IN OUT parameter value.

    * * @param i The parameter index to check * @throws SQLException if the specified parameter index is invalid */ protected void checkSetParameterIndex(int i, boolean isStream) throws SQLException { int mode; String msg; checkClosed(); if (i < 1 || i > parameterValues.length) { msg = "parameter index out of range: " + i; throw Util.sqlException(Trace.INVALID_JDBC_ARGUMENT, msg); } if (isStream) { if (parameterStream == null) { parameterStream = new boolean[parameterTypes.length]; } parameterStream[i - 1] = true; parameterSet[i - 1] = false; } else { parameterSet[i - 1] = true; } /* mode = parameterModes[i - 1]; switch (mode) { default : msg = "Not IN or IN OUT mode: " + mode + " for parameter: " + i; throw Util.sqlException(Trace.INVALID_JDBC_ARGUMENT, msg); case Expression.PARAM_IN : case Expression.PARAM_IN_OUT : break; } */ } /** * Called just before execution or adding to batch, this ensures all the * parameters have been set.

    * * If a parameter has been set using a stream method, it should be set * again for the next reuse. When set using other methods, the parameter * setting is retained for the next use. */ private void checkParametersSet() throws SQLException { ; } /* // do not check for compatibility with 1.8.0.x private void checkParametersSet() throws SQLException { if (parameterStream == null) { for (int i = 0; i < parameterSet.length; i++) { if (!parameterSet[i]) { throw Util.sqlException(Trace.JDBC_PARAMETER_NOT_SET); } } } else { for (int i = 0; i < parameterSet.length; i++) { if (!parameterSet[i] &&!parameterStream[i]) { throw Util.sqlException(Trace.JDBC_PARAMETER_NOT_SET); } } ArrayUtil.clearArray(ArrayUtil.CLASS_CODE_BOOLEAN, parameterStream, 0, parameterStream.length); } } */ /** * The internal parameter value setter always converts the parameter to * the Java type required for data transmission. Target BINARY and OTHER * types are converted directly. All other target types are converted * by Column.convertObject(). This also normalizes DATETIME values. * * @param i parameter index * @param o object * @throws SQLException if either argument is not acceptable. */ private void setParameter(int i, Object o) throws SQLException { checkSetParameterIndex(i, false); i--; if (o == null) { parameterValues[i] = null; return; } int outType = parameterTypes[i]; try { switch (outType) { case Types.OTHER : o = new JavaObject((Serializable) o); break; case Types.BINARY : case Types.VARBINARY : case Types.LONGVARBINARY : if (!(o instanceof byte[])) { throw Util.sqlException( Trace.error(Trace.INVALID_CONVERSION)); } o = new Binary((byte[]) o, !connection.isNetConn); break; case Types.DATE : if (o instanceof java.util.Date) { long t = HsqlDateTime.getNormalisedDate( ((java.util.Date) o).getTime()); o = new Date(t); } else { o = Column.convertObject(o, outType); } break; case Types.TIME : if (o instanceof java.util.Date) { long m = HsqlDateTime.getNormalisedTime( ((java.util.Date) o).getTime()); o = new Time(m); } else { o = Column.convertObject(o, outType); } break; case Types.TIMESTAMP : if (o instanceof Timestamp) { long m = ((Timestamp) o).getTime(); int n = ((Timestamp) o).getNanos(); o = new Timestamp(m); ((Timestamp) o).setNanos(n); } else { o = Column.convertObject(o, outType); } break; default : o = Column.convertObject(o, outType); break; } } catch (HsqlException e) { Util.throwError(e); } parameterValues[i] = o; } /** * Used with int and narrower integral primitives * @param i parameter index * @param value object to set * @throws SQLException if either argument is not acceptable */ private void setIntParameter(int i, int value) throws SQLException { checkSetParameterIndex(i, false); int outType = parameterTypes[i - 1]; switch (outType) { case Types.TINYINT : case Types.SMALLINT : case Types.INTEGER : Object o = new Integer(value); parameterValues[i - 1] = o; break; default : setLongParameter(i, value); } } /** * Used with long and narrower integral primitives. Conversion to BINARY * or OTHER types will throw here and not passed to setParameter(). * * @param i parameter index * @param value object to set * @throws SQLException if either argument is not acceptable */ private void setLongParameter(int i, long value) throws SQLException { checkSetParameterIndex(i, false); int outType = parameterTypes[i - 1]; switch (outType) { case Types.BIGINT : Object o = new Long(value); parameterValues[i - 1] = o; break; case Types.BINARY : case Types.OTHER : throw Util.sqlException(Trace.error(Trace.INVALID_CONVERSION)); default : setParameter(i, new Long(value)); } } /** * This method should always throw if called for a PreparedStatement or * CallableStatment. * * @param sql ignored * @throws SQLException always */ public void addBatch(String sql) throws SQLException { throw Util.notSupported(); } /** * This method should always throw if called for a PreparedStatement or * CallableStatment. * * @param sql ignored * @throws SQLException always * @return nothing */ public ResultSet executeQuery(String sql) throws SQLException { throw Util.notSupported(); } /** * This method should always throw if called for a PreparedStatement or * CallableStatment. * * @param sql ignored * @throws SQLException always * @return nothing */ public boolean execute(String sql) throws SQLException { throw Util.notSupported(); } /** * This method should always throw if called for a PreparedStatement or * CallableStatment. * * @param sql ignored * @throws SQLException always * @return nothing */ public int executeUpdate(String sql) throws SQLException { throw Util.notSupported(); } /** * Does the specialized work required to free this object's resources and * that of it's parent class.

    * * @throws SQLException if a database access error occurs */ public synchronized void close() throws SQLException { if (isClosed()) { return; } HsqlException he = null; try { // fredt - if this is called by Connection.close() then there's no // need to free the prepared statements on the server - it is done // by Connection.close() if (!connection.isClosed) { connection.sessionProxy.execute( Result.newFreeStmtRequest(statementID)); } } catch (HsqlException e) { he = e; } parameterValues = null; parameterSet = null; parameterStream = null; parameterTypes = null; parameterModes = null; rsmdDescriptor = null; pmdDescriptor = null; rsmd = null; pmd = null; super.close(); if (he != null) { throw Util.sqlException(he); } } /** * Retrieves a String representation of this object.

    * * The representation is of the form:

    * * class-name@hash[sql=[char-sequence], parameters=[p1, ...pi, ...pn]]

    * * p1, ...pi, ...pn are the String representations of the currently set * parameter values that will be used with the non-batch execution * methods.

    * * @return a String representation of this object */ public String toString() { StringBuffer sb = new StringBuffer(); String sql; Object[] pv; sb.append(super.toString()); sql = this.sql; pv = parameterValues; if (sql == null || pv == null) { sb.append("[closed]"); return sb.toString(); } sb.append("[sql=[").append(sql).append("]"); if (pv.length > 0) { sb.append(", parameters=["); for (int i = 0; i < pv.length; i++) { sb.append('['); sb.append(pv[i]); sb.append("], "); } sb.setLength(sb.length() - 2); sb.append(']'); } sb.append(']'); return sb.toString(); } //#ifdef JAVA6 /* public void setPoolable(boolean poolable) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public boolean isPoolable() throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public T unwrap(Class iface) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public boolean isWrapperFor(Class iface) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void setRowId(int parameterIndex, RowId x) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void setNString(int parameterIndex, String value) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void setNCharacterStream(int parameterIndex, Reader value, long length) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void setNClob(int parameterIndex, NClob value) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void setClob(int parameterIndex, Reader reader, long length) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void setBlob(int parameterIndex, InputStream inputStream, long length) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void setNClob(int parameterIndex, Reader reader, long length) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void setSQLXML(int parameterIndex, SQLXML xmlObject) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void setAsciiStream(int parameterIndex, InputStream x, long length) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void setBinaryStream(int parameterIndex, InputStream x, long length) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void setCharacterStream(int parameterIndex, Reader reader, long length) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void setAsciiStream(int parameterIndex, InputStream x) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void setBinaryStream(int parameterIndex, InputStream x) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void setCharacterStream(int parameterIndex, Reader reader) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void setNCharacterStream(int parameterIndex, Reader value) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void setClob(int parameterIndex, Reader reader) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void setBlob(int parameterIndex, InputStream inputStream) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void setNClob(int parameterIndex, Reader reader) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } */ //#endif JAVA6 } hsqldb-1.8.0.10.orig/src/org/hsqldb/jdbc/jdbcDataSourceFactory.java0000644000175000017500000000632010416742472023434 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.jdbc; import java.util.Hashtable; import javax.naming.Context; import javax.naming.Name; import javax.naming.Reference; import javax.naming.spi.ObjectFactory; // boucherb@users 20040411 - doc 1.7.2 - javadoc updates toward 1.7.2 final /** * A JNDI ObjectFactory for creating {@link jdbcDataSource jdbcDatasource} * object instances. * * @author deforest@users * @version 1.7.2 */ public class jdbcDataSourceFactory implements ObjectFactory { /** * Creates a jdbcDatasource object using the location or reference * information specified.

    * * The Reference object should support the properties, database, user, * password. * * @param obj The reference information used in creating a * jdbcDatasource object. * @param name ignored * @param nameCtx ignored * @param environment ignored * @return A newly created jdbcDataSource object; null if an object * cannot be created. * @exception Exception never */ public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable environment) throws Exception { String dsClass = "org.hsqldb.jdbc.jdbcDataSource"; Reference ref = (Reference) obj; if (ref.getClassName().equals(dsClass)) { jdbcDataSource ds = new jdbcDataSource(); ds.setDatabase((String) ref.get("database").getContent()); ds.setUser((String) ref.get("user").getContent()); ds.setPassword((String) ref.get("password").getContent()); return ds; } else { return null; } } } hsqldb-1.8.0.10.orig/src/org/hsqldb/jdbc/jdbcColumnMetaData.java0000644000175000017500000001141310416742471022706 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.jdbc; import java.lang.reflect.Field; /** * Provides a site for holding the ResultSetMetaData for individual ResultSet * columns.

    * * @author boucherb@users * @version 1.7.2 * @since HSQLDB 1.7.2 */ public final class jdbcColumnMetaData { /** The column's table's catalog name. */ public String catalogName; /** * The fully-qualified name of the Java class whose instances are * manufactured if the method ResultSet.getObject is called to retrieve * a value from the column. */ public String columnClassName; /** The column's normal max width in chars. */ public int columnDisplaySize; /** The suggested column title for use in printouts and displays. */ public String columnLabel; /** The column's name. */ public String columnName; /** The column's SQL type. */ public int columnType; /** The column's database-specific type name. */ public String columnTypeName; /** The column's value's number of decimal digits. */ public int precision; /** The column's value's number of digits to right of the decimal point. */ public int scale; /** The column's table's schema. */ public String schemaName; /** The column's table's name. */ public String tableName; /** Whether the value of the column are automatically numbered. */ public boolean isAutoIncrement; /** Whether the column's value's case matters. */ public boolean isCaseSensitive; /** Whether the values in the column are cash values. */ public boolean isCurrency; /** Whether a write on the column will definitely succeed. */ public boolean isDefinitelyWritable; /** The nullability of values in the column. */ public int isNullable; /** Whether the column's values are definitely not writable. */ public boolean isReadOnly; /** Whether the column's values can be used in a where clause. */ public boolean isSearchable; /** Whether values in the column are signed numbers. */ public boolean isSigned; /** Whether it is possible for a write on the column to succeed. */ public boolean isWritable; /** * Retrieves a String representation of this object. * * @return a Sring representation of this object */ public String toString() { try { return toStringImpl(); } catch (Exception e) { return super.toString() + "[" + e + "]"; } } /** * Provides the implementation of the toString() method. * * @return a Sring representation of this object */ private String toStringImpl() throws Exception { StringBuffer sb; Field[] fields; Field field; sb = new StringBuffer(); sb.append('['); fields = getClass().getFields(); int len = fields.length; for (int i = 0; i < len; i++) { field = fields[i]; sb.append(field.getName()); sb.append('='); sb.append(field.get(this)); if (i + 1 < len) { sb.append(','); sb.append(' '); } } sb.append(']'); return sb.toString(); } } hsqldb-1.8.0.10.orig/src/org/hsqldb/jdbc/jdbcClob.java0000644000175000017500000004336010770340574020736 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.jdbc; import java.io.Reader; import java.io.StringReader; import java.sql.Clob; import java.sql.SQLException; import org.hsqldb.Trace; import org.hsqldb.lib.AsciiStringInputStream; // boucherb@users 2004-03/04-xx - doc 1.7.2 - javadocs updated; methods put in // correct (historical, interface // declared) order // boucherb@users 2004-03/04-xx - patch 1.7.2 - null check for constructor (a // null CLOB value is Java null, // not a Clob object with null // data);moderate thread safety; // simplification; optimization // of operations between jdbcClob // instances /** * The mapping in the JavaTM programming * language for the SQL CLOB type.

    * * Provides methods for getting the length of an SQL CLOB (Character Large * Object) value, for materializing a CLOB value on the client, and for * searching for a substring or CLOB object within a CLOB value.

    * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.8.x, the HSQLDB driver does not implement Clob using an SQL * locator(CLOB). That is, an HSQLDB Clob object does not contain a logical * pointer to SQL CLOB data; rather it directly contains an immutable * representation of the data (a String object). As a result, an HSQLDB * Clob object itself is valid beyond the duration of the transaction in which * is was created, although it does not necessarily represent a corresponding * value on the database.

    * * Currently, the interface methods for updating a CLOB value are * unsupported. However, the truncate method is supported for local use. *

    * * * @author boucherb@users * @version 1.7.2 * @since JDK 1.2, HSQLDB 1.7.2 */ public final class jdbcClob implements Clob { volatile String data; /** * Constructs a new jdbcClob object wrapping the given character * sequence.

    * * This constructor is used internally to retrieve result set values as * Clob objects, yet it must be public to allow access from other packages. * As such (in the interest of efficiency) this object maintains a reference * to the given String object rather than making a copy and so it is * gently suggested (in the interest of effective memory management) that * extenal clients using this constructor either take pause to consider * the implications or at least take care to provide a String object whose * internal character buffer is not much larger than required to represent * the value. * * @param data the character sequence representing the Clob value * @throws SQLException if the argument is null */ public jdbcClob(final String data) throws SQLException { if (data == null) { throw Util.sqlException(Trace.INVALID_JDBC_ARGUMENT, "null"); } this.data = data; } /** * Retrieves the number of characters in the CLOB value * designated by this Clob object. * * @return length of the CLOB in characters * @exception SQLException if there is an error accessing the * length of the CLOB value * * @since JDK 1.2, HSQLDB 1.7.2 */ public long length() throws SQLException { final String ldata = data; return ldata.length(); } /** * Retrieves a copy of the specified substring in the CLOB * value designated by this Clob object. The substring begins * at position pos and has up to length * consecutive characters.

    * * *

    *

    HSQLDB-Specific Information:

    * * The official specification above is ambiguous in that it does not * precisely indicate the policy to be observed when * pos > this.length() - length. One policy would be to retrieve the * characters from pos to this.length(). Another would be to throw * an exception. HSQLDB observes the later policy. *

    * * * @param pos the first character of the substring to be extracted. * The first character is at position 1. * @param length the number of consecutive characters to be copied * @return a String that is the specified substring in * the CLOB value designated by this * Clob object * @exception SQLException if there is an error accessing the * CLOB value * * @since JDK 1.2, HSQLDB 1.7.2 */ public String getSubString(long pos, final int length) throws SQLException { final String ldata = data; final int dlen = ldata.length(); pos--; if (pos < 0 || pos > dlen) { Util.sqlException(Trace.INVALID_JDBC_ARGUMENT, "pos: " + (pos + 1L)); } if (length < 0 || length > dlen - pos) { throw Util.sqlException(Trace.INVALID_JDBC_ARGUMENT, "length: " + length); } if (pos == 0 && length == dlen) { return ldata; } return ldata.substring((int) pos, (int) pos + length); } /** * Retrieves the CLOB value designated by this * Clob object as a java.io.Reader object * (or as a stream of characters). * * @return a java.io.Reader object containing the * CLOB data * @exception SQLException if there is an error accessing the * CLOB value * @see #setCharacterStream * * @since JDK 1.2, HSQLDB 1.7.2 */ public java.io.Reader getCharacterStream() throws SQLException { final String ldata = data; return new StringReader(ldata); } /** * Retrieves the CLOB value designated by this * Clob object as an ascii stream. * * @return a java.io.InputStream object containing the * CLOB data * @exception SQLException if there is an error accessing the * CLOB value * @see #setAsciiStream * * @since JDK 1.2, HSQLDB 1.7.2 */ public java.io.InputStream getAsciiStream() throws SQLException { final String ldata = data; return new AsciiStringInputStream(ldata); } /** * Retrieves the character position at which the specified substring * searchstr appears in the SQL CLOB value * represented by this Clob object. The search * begins at position start. * * @param searchstr the substring for which to search * @param start the position at which to begin searching; the * first position is 1 * @return the position at which the substring appears or -1 if it is not * present; the first position is 1 * @exception SQLException if there is an error accessing the * CLOB value * * @since JDK 1.2, HSQLDB 1.7.2 */ public long position(final String searchstr, long start) throws SQLException { if (searchstr == null || start > Integer.MAX_VALUE) { return -1; } final String ldata = data; final int pos = ldata.indexOf(searchstr, (int) --start); return (pos < 0) ? -1 : pos + 1; } /** * Retrieves the character position at which the specified * Clob object searchstr appears in this * Clob object. The search begins at position * start. * * @param searchstr the Clob object for which to search * @param start the position at which to begin searching; the first * position is 1 * @return the position at which the Clob object appears * or -1 if it is not present; the first position is 1 * @exception SQLException if there is an error accessing the * CLOB value * * @since JDK 1.2, HSQLDB 1.7.2 */ public long position(final Clob searchstr, long start) throws SQLException { if (searchstr == null) { return -1; } final String ldata = data; final long dlen = ldata.length(); final long sslen = searchstr.length(); start--; //***** FOIRGOT THIS ******* // This is potentially much less expensive than materializing a large // substring from some other vendor's CLOB. Indeed, we should probably // do the comparison piecewise, using an in-memory buffer (or temp-files // when available), if it is detected that the input CLOB is very long. if (start > dlen - sslen) { return -1; } // by now, we know sslen and start are both < Integer.MAX_VALUE String s; if (searchstr instanceof jdbcClob) { s = ((jdbcClob) searchstr).data; } else { s = searchstr.getSubString(1L, (int) sslen); } final int pos = ldata.indexOf(s, (int) start); return (pos < 0) ? -1 : pos + 1; } //---------------------------- jdbc 3.0 ----------------------------------- /** * Writes the given Java String to the CLOB * value that this Clob object designates at the position * pos.

    * * *

    *

    HSQLDB-Specific Information:

    * * HSLQDB 1.7.2 does not support this feature.

    * * Calling this method always throws an SQLException. *

    * * * @param pos the position at which to start writing to the * CLOB value that this Clob object * represents * @param str the string to be written to the CLOB * value that this Clob designates * @return the number of characters written * @exception SQLException if there is an error accessing the * CLOB value * * @since JDK 1.4, HSQLDB 1.7.2 */ public int setString(long pos, String str) throws SQLException { throw Util.notSupported(); } /** * Writes len characters of str, starting * at character offset, to the CLOB value * that this Clob represents.

    * * *

    *

    HSQLDB-Specific Information:

    * * HSLQDB 1.7.2 does not support this feature.

    * * Calling this method always throws an SQLException. *

    * * * @param pos the position at which to start writing to this * CLOB object * @param str the string to be written to the CLOB * value that this Clob object represents * @param offset the offset into str to start reading * the characters to be written * @param len the number of characters to be written * @return the number of characters written * @exception SQLException if there is an error accessing the * CLOB value * * @since JDK 1.4, HSQLDB 1.7.2 */ public int setString(long pos, String str, int offset, int len) throws SQLException { throw Util.notSupported(); } /** * Retrieves a stream to be used to write Ascii characters to the * CLOB value that this Clob object represents, * starting at position pos.

    * * *

    *

    HSQLDB-Specific Information:

    * * HSLQDB 1.7.2 does not support this feature.

    * * Calling this method always throws an SQLException. *

    * * * @param pos the position at which to start writing to this * CLOB object * @return the stream to which ASCII encoded characters can be written * @exception SQLException if there is an error accessing the * CLOB value * @see #getAsciiStream * * @since JDK 1.4, HSQLDB 1.7.2 */ public java.io.OutputStream setAsciiStream(long pos) throws SQLException { throw Util.notSupported(); } /** * Retrieves a stream to be used to write a stream of Unicode characters * to the CLOB value that this Clob object * represents, at position pos.

    * * *

    *

    HSQLDB-Specific Information:

    * * HSLQDB 1.7.2 does not support this feature.

    * * Calling this method always throws an SQLException. *

    * * * @param pos the position at which to start writing to the * CLOB value * * @return a stream to which Unicode encoded characters can be written * @exception SQLException if there is an error accessing the * CLOB value * @see #getCharacterStream * * @since JDK 1.4, HSQLDB 1.7.2 */ public java.io.Writer setCharacterStream(long pos) throws SQLException { throw Util.notSupported(); } /** * Truncates the CLOB value that this Clob * designates to have a length of len * characters.

    * * *

    *

    HSQLDB-Specific Information:

    * * This operation affects only the client-side value; it has no effect upon * the value as it is stored in the database. *

    * * * @param len the length, in bytes, to which the CLOB value * should be truncated * @exception SQLException if there is an error accessing the * CLOB value * * @since JDK 1.4, HSQLDB 1.7.2 */ public void truncate(final long len) throws SQLException { final String ldata = data; final long dlen = ldata.length(); final long chars = len >> 1; if (chars == dlen) { // nothing has changed, so there's nothing to be done } else if (len < 0 || chars > dlen) { throw Util.sqlException(Trace.INVALID_JDBC_ARGUMENT, Long.toString(len)); } else { // use new String() to ensure we get rid of slack data = new String(ldata.substring(0, (int) chars)); } } //#ifdef JAVA6 /* public void free() throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public Reader getCharacterStream(long pos, long length) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } */ //#endif JAVA6 } hsqldb-1.8.0.10.orig/src/org/hsqldb/jdbc/jdbcCallableStatement.java0000644000175000017500000037665510770340574023463 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.jdbc; import java.io.InputStream; import java.io.Reader; import java.math.BigDecimal; import java.sql.CallableStatement; import java.sql.Date; //#ifdef JAVA6 /* import java.sql.NClob; import java.sql.RowId; import java.sql.SQLXML; */ //#endif JAVA6 import java.sql.Time; import java.sql.Timestamp; import java.sql.SQLException; import java.util.Calendar; //#ifdef JAVA2 import java.sql.Array; import java.sql.Blob; import java.sql.Clob; import java.sql.Ref; import java.util.Map; //#endif JAVA2 import org.hsqldb.HsqlException; import org.hsqldb.Trace; import org.hsqldb.lib.IntValueHashMap; // boucherb@users patch 1.7.2 - CallableStatement impl removed // from jdbcPreparedStatement and moved here; sundry changes elsewhere to // comply // TODO: 1.7.2 Alpha N :: DONE // maybe implement set-by-parameter-name. We have an informal spec, // being "@p1" => 1, "@p2" => 2, etc. Problems: return value is "@p0" // and there is no support for registering the return value as an out // parameter. // TODO: 1.8.x // engine and client-side mechanisms for adding, retrieving, // navigating (and perhaps controlling holdability of) multiple // results generated from a single execution. // boucherb@users 2004-03/04-xx - patch 1.7.2 - some minor code cleanup // - parameter map NPE correction // - embedded SQL/SQLCLI client usability // (parameter naming changed from @n to @pn) // boucherb@users 2004-04-xx - doc 1.7.2 - javadocs added/updated /** * * * The interface used to execute SQL stored procedures. The JDBC API * provides a stored procedure SQL escape syntax that allows stored * procedures to be called in a standard way for all RDBMSs. This escape * syntax has one form that includes a result parameter and one that does * not. If used, the result parameter must be registered as an OUT parameter. * The other parameters can be used for input, output or both. Parameters * are referred to sequentially, by number, with the first parameter being 1. *
     *   {?= call <procedure-name>[<arg1>,<arg2>, ...]}
     *   {call <procedure-name>[<arg1>,<arg2>, ...]}
     * 
    *

    * IN parameter values are set using the set methods inherited from * {@link PreparedStatement}. The type of all OUT parameters must be * registered prior to executing the stored procedure; their values * are retrieved after execution via the get methods provided here. *

    * A CallableStatement can return one {@link ResultSet} object or * multiple ResultSet objects. Multiple * ResultSet objects are handled using operations * inherited from {@link Statement}. *

    * For maximum portability, a call's ResultSet objects and * update counts should be processed prior to getting the values of output * parameters. *

    * * *

    *

    HSQLDB-Specific Information:

    * * Since 1.7.2, the JDBC CallableStatement interface implementation has been * broken out of the jdbcPreparedStatement class into this one.

    * * With 1.7.2, some of the previously unsupported features of this interface * are now supported, such as the parameterName-based setter methods.

    * * More importantly, jdbcCallableStatement objects are now backed by a true * compiled parameteric representation. Hence, there are now significant * performance gains to be had by using a CallableStatement object instead of * a Statement object, if a short-running CALL statement is to be executed more * than a small number of times. Moreover, the recent work lays the foundation * for work in a subsequenct release to support CallableStatement OUT and * IN OUT style parameters, as well as the generation and retrieval of multiple * results in response to the execution of a CallableStatement object.

    * * For a more in-depth discussion of performance issues regarding 1.7.2 * prepared and callable statement objects, please see overview section of * {@link jdbcPreparedStatement jdbcPreparedStatment}. * *


    * * As with many DBMS, HSQLDB support for stored procedures is not provided in * a completely standard fashion.

    * * Beyond the XOpen/ODBC extended scalar functions, stored procedures are * typically supported in ways that vary greatly from one DBMS implementation * to the next. So, it is almost guaranteed that the code for a stored * procedure written under a specific DBMS product will not work without * at least some modification in the context of another vendor's product * or even across a single vendor's product lines. Moving stored procedures * from one DBMS product line to another almost invariably involves complex * porting issues and often may not be possible at all. Be warned.

    * * At present, HSQLDB stored procedures map directly onto the methods of * compiled Java classes found on the classpath of the engine at runtime. This * is done in a non-standard but fairly efficient way by issuing a class * grant (and possibly method aliases) of the form:

    * *

     * GRANT ALL ON CLASS "package.class" TO [<user-name> | PUBLIC]
     * CREATE ALIAS <call-alias> FOR "package.class.method" -- optional
     * 
    * * This has the effect of allowing the specified user(s) to access the * set of uniquely named public static methods of the specified class, * in either the role of SQL functions or stored procedures. * For example:

    * *

     * CONNECT <admin-user> PASSWORD <admin-user-password>;
     * GRANT ALL ON CLASS "org.myorg.MyClass" TO PUBLIC;
     * CREATE ALIAS sp_my_method FOR "org.myorg.MyClass.myMethod"
     * CONNECT <any-user> PASSWORD <any-user-password>;
     * SELECT "org.myorg.MyClass.myMethod"(column_1) FROM table_1;
     * SELECT sp_my_method(column_1) FROM table_1;
     * CALL 2 + "org.myorg.MyClass.myMethod"(-5);
     * CALL 2 + sp_my_method(-5);
     * 
    * * Please note the use of the term "uniquely named" above. Including * 1.7.2, no support is provided to deterministically resolve overloaded * method names, and there can be issues with inherited methods as well; * currently, it is strongly recommended that developers creating stored * procedure library classes for HSQLDB simply avoid designs such that SQL * stored procedure calls attempt to resolve to:

    * *

      *
    1. inherited public static methods *
    2. overloaded public static methods *
    * * Also, please note that OUT and IN OUT parameters * are not yet supported due to some unresolved low level support issues.

    * * Including 1.7.2, the HSQLDB stored procedure call mechanism is essentially a * thin wrap of the HSQLDB SQL function call mechanism, extended to include the * more general HSQLDB SQL expression evaluation mechanism. In addition to * stored procedure calls that resolve directly to Java method invocations, the * extention provides the ability to evaluate simple SQL expressions, possibly * containing Java method invocations, outside any INSERT, * UPDATE, DELETE or SELECT statement * context.

    * * With HSQLDB, executing a CALL statement that produces an opaque * (OTHER) or known scalar object reference has virtually the same effect as: * *

     * CREATE TABLE DUAL (dummy VARCHAR);
     * INSERT INTO DUAL VALUES(NULL);
     * SELECT <simple-expression> FROM DUAL;
     * 
    * * As a transitional measure, HSQLDB provides the ability to materialize a * general result set in response to stored procedure execution. In this case, * the stored procedure's Java method descriptor must specify a return type of * java.lang.Object for external use (although at any point in the devlopment * cycle, other, proprietary return types may accepted internally for engine * development purposes). * When HSQLDB detects that the runtime class of the resulting Object is * elligible, an automatic internal unwrapping is performed to correctly * expose the underlying result set to the client, whether local or remote.

    * * Additionally, HSQLDB automatically detects if java.sql.Connection is * the class of the first argument of any underlying Java method(s). If so, * then the engine transparently supplies the internal Connection object * corresponding to the Session executing the call, adjusting the positions * of other arguments to suite the SQL context.

    * * The features above are not intended to be permanent. Rather, the intention * is to offer more general and powerful mechanisms in a future release; * it is recommend to use them only as a temporary convenience.

    * * For instance, one might be well advised to future-proof by writing * HSQLDB-specific adapter methods that in turn call the real logic of an * underlying generalized JDBC stored procedure library.

    * * Here is a very simple example of an HSQLDB stored procedure generating a * user-defined result set: * *

     * package mypackage;
     *
     * class MyClass {
     *
     *      public static Object mySp(Connection conn) throws SQLException {
     *          return conn.createStatement().executeQuery("select * from my_table");
     *      }
     * }
     * 
    * * Here is a refinement demonstrating no more than the bare essence of the idea * behind a more portable style: * *
     * package mypackage;
     *
     * import java.sql.ResultSet;
     * import java.sql.SQLException;
     *
     * class MyLibraryClass {
     *
     *      public static ResultSet mySp() throws SQLException {
     *          return ctx.getConnection().createStatement().executeQuery("select * from my_table");
     *      }
     * }
     *
     * //--
     *
     * package myadaptorpackage;
     *
     * import java.sql.Connection;
     * import java.sql.SQLException;
     *
     * class MyAdaptorClass {
     *
     *      public static Object mySp(Connection conn) throws SQLException {
     *          MyLibraryClass.getCtx().setConnection(conn);
     *          return MyLibraryClass.mySp();
     *      }
     * }
     * 
    * * In a future release, it is intended to provided some new features * that will support writing fairly portable JDBC-based stored procedure * code:

    * *

      *
    • Support for the "jdbc:default:connection" * standard database connection url.

      * *

    • A well-defined specification of the behaviour of the HSQLDB execution * stack under stored procedure calls.

      * *

    • A well-defined, pure JDBC specification for generating multiple * results from HSQLDB stored procedures for client retrieval. *
    * * (boucherb@users) *
    * * * @author boucherb@users * @version 1.7.2 * @since 1.7.2 * @see jdbcConnection#prepareCall * @see jdbcResultSet */ public class jdbcCallableStatement extends jdbcPreparedStatement implements CallableStatement { /** parameter name => parameter index */ private IntValueHashMap parameterNameMap; /** parameter index => registered OUT type */ // private IntKeyIntValueHashMap outRegistrationMap; /** * Constructs a new jdbcCallableStatement with the specified connection and * result type. * * @param c the connection on which this statement will execute * @param sql the SQL statement this object represents * @param type the type of result this statement will produce * @throws HsqlException if the statement is not accepted by the database * @throws SQLException if preprocessing by driver fails */ public jdbcCallableStatement(jdbcConnection c, String sql, int type) throws HsqlException, SQLException { super(c, sql, type); String[] names; String name; // outRegistrationMap = new IntKeyIntValueHashMap(); parameterNameMap = new IntValueHashMap(); if (pmdDescriptor != null && pmdDescriptor.metaData != null) { names = pmdDescriptor.metaData.colNames; for (int i = 0; i < names.length; i++) { name = names[i]; // PRE: should never happen in practice if (name == null || name.length() == 0) { continue; // throw? } parameterNameMap.put(name, i); } } } /** * Retrieves the parameter index corresponding to the given * parameter name.

    * * @param parameterName to look up * @throws SQLException if not found * @return index for name */ int findParameterIndex(String parameterName) throws SQLException { checkClosed(); int index = parameterNameMap.get(parameterName, -1); if (index >= 0) { return index + 1; } throw Util.sqlException(Trace.COLUMN_NOT_FOUND, parameterName); } /** * Does the specialized work required to free this object's resources and * that of it's parent classes.

    * * @throws SQLException if a database access error occurs */ public void close() throws SQLException { if (isClosed()) { return; } // outRegistrationMap = null; parameterNameMap = null; super.close(); } /** * Performs an internal check for OUT or IN OUT column index validity.

    * * @param i the one-based column index to check * @throws SQLException if there is no such OUT or IN OUT column */ private void checkGetParameterIndex(int i) throws SQLException { checkClosed(); if (i < 1 || i > parameterModes.length) { String msg = "Parameter index out of bounds: " + i; throw Util.sqlException(Trace.INVALID_JDBC_ARGUMENT, msg); } /* int mode = parameterModes[i - 1]; switch (mode) { default : String msg = "Not OUT or IN OUT mode: " + mode + " for parameter: " + i; throw Util.sqlException(Trace.INVALID_JDBC_ARGUMENT, msg); case Expression.PARAM_IN_OUT : case Expression.PARAM_OUT : break; // this is OK } */ } /** * Checks if the parameter of the given index has been successfully * registered as an OUT parameter.

    * * @param parameterIndex to check * @throws SQLException if not registered */ /* private void checkIsRegisteredParameterIndex(int parameterIndex) throws SQLException { int type; String msg; checkClosed(); type = outRegistrationMap.get(parameterIndex, Integer.MIN_VALUE); if (type == Integer.MIN_VALUE) { msg = "Parameter not registered: " + parameterIndex; throw Util.sqlException(Trace.INVALID_JDBC_ARGUMENT, msg); } } */ // ----------------------------------- JDBC 1 ---------------------------------- /** * * Registers the OUT parameter in ordinal position * parameterIndex to the JDBC type * sqlType. All OUT parameters must be registered * before a stored procedure is executed. *

    * The JDBC type specified by sqlType for an OUT * parameter determines the Java type that must be used * in the get method to read the value of that parameter. *

    * If the JDBC type expected to be returned to this output parameter * is specific to this particular database, sqlType * should be java.sql.Types.OTHER. The method * {@link #getObject} retrieves the value.

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.2 does not support this feature.

    * * Calling this method always throws an SQLException. *

    * * * @param parameterIndex the first parameter is 1, the second is 2, * and so on * @param sqlType the JDBC type code defined by java.sql.Types. * If the parameter is of JDBC type NUMERIC * or DECIMAL, the version of * registerOutParameter that accepts a scale value * should be used. * @exception SQLException if a database access error occurs * @see java.sql.Types */ public void registerOutParameter(int parameterIndex, int sqlType) throws SQLException { throw Util.notSupported(); } /** * * Registers the parameter in ordinal position * parameterIndex to be of JDBC type * sqlType. This method must be called * before a stored procedure is executed. *

    * The JDBC type specified by sqlType for an OUT * parameter determines the Java type that must be used * in the get method to read the value of that parameter. *

    * This version of registerOutParameter should be * used when the parameter is of JDBC type NUMERIC * or DECIMAL.

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.2 does not support this feature.

    * * Calling this method always throws an SQLException. *

    * * * @param parameterIndex the first parameter is 1, the second is 2, * and so on * @param sqlType the SQL type code defined by java.sql.Types. * @param scale the desired number of digits to the right of the * decimal point. It must be greater than or equal to zero. * @exception SQLException if a database access error occurs * @see java.sql.Types */ public void registerOutParameter(int parameterIndex, int sqlType, int scale) throws SQLException { registerOutParameter(parameterIndex, sqlType); } /** * * Retrieves whether the last OUT parameter read had the value of * SQL NULL. Note that this method should be called only * after calling a getter method; otherwise, there is no value to use in * determining whether it is null or not.

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.2 does not support this feature.

    * * Calling this method always throws an SQLException. *

    * * * @return true if the last parameter read was SQL * NULL; false otherwise * @exception SQLException if a database access error occurs */ public boolean wasNull() throws SQLException { throw Util.notSupported(); } /** * * Retrieves the value of the designated JDBC CHAR, * VARCHAR, or LONGVARCHAR parameter as a * String in the Java programming language. *

    * For the fixed-length type JDBC CHAR, * the String object * returned has exactly the same value the (JDBC4 clarification:) SQL * CHAR value had in the * database, including any padding added by the database.

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.2 does not support this feature.

    * * Calling this method always throws an SQLException. *

    * * * @param parameterIndex the first parameter is 1, the second is 2, * and so on * @return the parameter value. If the value is SQL NULL, * the result * is null. * @exception SQLException if a database access error occurs * @see #setString */ public String getString(int parameterIndex) throws SQLException { throw Util.notSupported(); } /** * * Retrieves the value of the designated JDBC BIT parameter * as a boolean in the Java programming language.

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.2 does not support this feature.

    * * Calling this method always throws an SQLException. *

    * * * @param parameterIndex the first parameter is 1, the second is 2, * and so on * @return the parameter value. If the value is SQL NULL, * the result is false. * @exception SQLException if a database access error occurs * @see #setBoolean */ public boolean getBoolean(int parameterIndex) throws SQLException { throw Util.notSupported(); } /** * * Retrieves the value of the designated JDBC TINYINT * parameter as a byte in the Java programming language.

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.2 does not support this feature.

    * * Calling this method always throws an SQLException. *

    * * * @param parameterIndex the first parameter is 1, the second is 2, * and so on * @return the parameter value. If the value is SQL NULL, * the result is 0. * @exception SQLException if a database access error occurs * @see #setByte */ public byte getByte(int parameterIndex) throws SQLException { throw Util.notSupported(); } /** * * Retrieves the value of the designated JDBC SMALLINT * parameter as a short in the Java programming language.

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.2 does not support this feature.

    * * Calling this method always throws an SQLException. *

    * * * @param parameterIndex the first parameter is 1, the second is 2, * and so on * @return the parameter value. If the value is SQL NULL, * the result is 0. * @exception SQLException if a database access error occurs * @see #setShort */ public short getShort(int parameterIndex) throws SQLException { throw Util.notSupported(); } /** * * Retrieves the value of the designated JDBC INTEGER * parameter as an int in the Java programming language.

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.2 does not support this feature.

    * * Calling this method always throws an SQLException. *

    * * * @param parameterIndex the first parameter is 1, the second is 2, * and so on * @return the parameter value. If the value is SQL NULL, * the result is 0. * @exception SQLException if a database access error occurs * @see #setInt */ public int getInt(int parameterIndex) throws SQLException { throw Util.notSupported(); } /** * * Retrieves the value of the designated JDBC BIGINT * parameter as a long in the Java programming language.

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.2 does not support this feature.

    * * Calling this method always throws an SQLException. *

    * * * @param parameterIndex the first parameter is 1, the second is 2, * and so on * @return the parameter value. If the value is SQL NULL, * the result is 0. * @exception SQLException if a database access error occurs * @see #setLong */ public long getLong(int parameterIndex) throws SQLException { throw Util.notSupported(); } /** * * Retrieves the value of the designated JDBC FLOAT * parameter as a float in the Java programming language.

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.2 does not support this feature.

    * * Calling this method always throws an SQLException. *

    * * * @param parameterIndex the first parameter is 1, the second is 2, * and so on * @return the parameter value. If the value is SQL NULL, the * result is 0. * @exception SQLException if a database access error occurs * @see #setFloat */ public float getFloat(int parameterIndex) throws SQLException { throw Util.notSupported(); } /** * * Retrieves the value of the designated JDBC DOUBLE * parameter as a double in the Java programming language.

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.2 does not support this feature.

    * * Calling this method always throws an SQLException. *

    * * * @param parameterIndex the first parameter is 1, the second is 2, * and so on * @return the parameter value. If the value is SQL NULL, * the result is 0. * @exception SQLException if a database access error occurs * @see #setDouble */ public double getDouble(int parameterIndex) throws SQLException { throw Util.notSupported(); } /** * * Retrieves the value of the designated JDBC NUMERIC * parameter as a java.math.BigDecimal object with * scale digits to the right of the decimal point.

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.2 does not support this feature.

    * * Calling this method always throws an SQLException. *

    * * * @param parameterIndex the first parameter is 1, the second is 2, * and so on * @param scale the number of digits to the right of the decimal point * @return the parameter value. If the value is SQL NULL, * the result is null. * @exception SQLException if a database access error occurs * @deprecated use getBigDecimal(int parameterIndex) * or getBigDecimal(String parameterName) * @see #setBigDecimal */ //#ifdef DEPRECATEDJDBC public BigDecimal getBigDecimal(int parameterIndex, int scale) throws SQLException { throw Util.notSupported(); } //#endif /** * * Retrieves the value of the designated JDBC BINARY or * VARBINARY parameter as an array of byte * values in the Java programming language.

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.2 does not support this feature.

    * * Calling this method always throws an SQLException. *

    * * @param parameterIndex the first parameter is 1, the second is 2, * and so on * @return the parameter value. If the value is SQL NULL, * the result is null. * @exception SQLException if a database access error occurs * @see #setBytes */ public byte[] getBytes(int parameterIndex) throws SQLException { throw Util.notSupported(); } /** * * Retrieves the value of the designated JDBC DATE parameter * as a java.sql.Date object.

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.2 does not support this feature.

    * * Calling this method always throws an SQLException. *

    * * @param parameterIndex the first parameter is 1, the second is 2, * and so on * @return the parameter value. If the value is SQL NULL, the * result is null. * @exception SQLException if a database access error occurs * @see #setDate */ public Date getDate(int parameterIndex) throws SQLException { throw Util.notSupported(); } /** * * Retrieves the value of the designated JDBC TIME parameter * as a java.sql.Time object.

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.2 does not support this feature.

    * * Calling this method always throws an SQLException. *

    * * * @param parameterIndex the first parameter is 1, the second is 2, * and so on * @return the parameter value. If the value is SQL NULL, * the result is null. * @exception SQLException if a database access error occurs * @see #setTime */ public Time getTime(int parameterIndex) throws SQLException { throw Util.notSupported(); } /** * * Retrieves the value of the designated JDBC TIMESTAMP * parameter as a java.sql.Timestamp object.

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.2 does not support this feature.

    * * Calling this method always throws an SQLException. *

    * * * @param parameterIndex the first parameter is 1, the second is 2, * and so on * @return the parameter value. If the value is SQL NULL, * the result is null. * @exception SQLException if a database access error occurs * @see #setTimestamp */ public Timestamp getTimestamp(int parameterIndex) throws SQLException { throw Util.notSupported(); } /** * * Retrieves the value of the designated parameter as an Object * in the Java programming language. If the value is an SQL NULL, * the driver returns a Java null. *

    * This method returns a Java object whose type corresponds to the JDBC * type that was registered for this parameter using the method * registerOutParameter. By registering the target JDBC * type as java.sql.Types.OTHER, this method can be used * to read database-specific abstract data types.

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.2 does not support this feature.

    * Calling this method always throws an SQLException. *

    * * * @param parameterIndex the first parameter is 1, the second is 2, * and so on * @return A java.lang.Object holding the OUT parameter value * @exception SQLException if a database access error occurs * @see java.sql.Types * @see #setObject */ public Object getObject(int parameterIndex) throws SQLException { throw Util.notSupported(); } // ----------------------------------- JDBC 2 ---------------------------------- /** * * Retrieves the value of the designated JDBC NUMERIC * parameter as a java.math.BigDecimal object with as many * digits to the right of the decimal point as the value contains.

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.2 does not support this feature.

    * * Calling this method always throws an SQLException. *

    * * * @param parameterIndex the first parameter is 1, the second is 2, * and so on * @return the parameter value in full precision. If the value is * SQL NULL, the result is null. * @exception SQLException if a database access error occurs * @see #setBigDecimal * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcPreparedStatement) */ public BigDecimal getBigDecimal(int parameterIndex) throws SQLException { throw Util.notSupported(); } /** * * Returns an object representing the value of OUT parameter * parameterIndex and uses map for the custom * mapping of the parameter value. *

    * This method returns a Java object whose type corresponds to the * JDBC type that was registered for this parameter using the method * registerOutParameter. By registering the target * JDBC type as java.sql.Types.OTHER, this method can * be used to read database-specific abstract data types.

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.2 does not support this feature.

    * * Calling this method always throws an SQLException. *

    * * * @param parameterIndex the first parameter is 1, the second is 2, and so on * @param map the mapping from SQL type names to Java classes * @return a java.lang.Object holding the OUT parameter value * @exception SQLException if a database access error occurs * @see #setObject * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcPreparedStatement) */ //#ifdef JAVA2 public Object getObject(int parameterIndex, Map map) throws SQLException { throw Util.notSupported(); } //#endif JAVA2 /** * * Retrieves the value of the designated JDBC * REF(<structured-type>) parameter as a * {@link java.sql.Ref} object in the Java programming language.

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.2 does not support this feature.

    * * Calling this method always throws an SQLException. *

    * * * @param parameterIndex the first parameter is 1, the second is 2, * and so on * @return the parameter value as a Ref object in the * Java programming language. If the value was SQL NULL, * the value null is returned. * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcPreparedStatement) */ //#ifdef JAVA2 public Ref getRef(int parameterIndex) throws SQLException { throw Util.notSupported(); } //#endif JAVA2 /** * * Retrieves the value of the designated JDBC BLOB * parameter as a {@link java.sql.Blob} object in the Java * programming language.

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.2 does not support this feature.

    * * Calling this method always throws an SQLException. *

    * * * @param parameterIndex the first parameter is 1, the second is 2, * and so on * @return the parameter value as a Blob object in the * Java programming language. If the value was SQL NULL, * the value null is returned. * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcPreparedStatement) */ //#ifdef JAVA2 public Blob getBlob(int parameterIndex) throws SQLException { throw Util.notSupported(); } //#endif JAVA2 /** * * Retrieves the value of the designated JDBC CLOB * parameter as a {@link java.sql.Clob} object in the Java programming * language.

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.2 does not support this feature.

    * * Calling this method always throws an SQLException. *

    * * * @param parameterIndex the first parameter is 1, the second is 2, and * so on * @return the parameter value as a Clob object in the * Java programming language. If the value was SQL NULL, the * value null is returned. * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcPreparedStatement) */ //#ifdef JAVA2 public Clob getClob(int parameterIndex) throws SQLException { throw Util.notSupported(); } //#endif JAVA2 /** * * Retrieves the value of the designated JDBC ARRAY * parameter as an {@link java.sql.Array} object in the Java programming * language.

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.2 does not support this feature.

    * * Calling this method always throws an SQLException. *

    * * * @param parameterIndex the first parameter is 1, the second is 2, and * so on * @return the parameter value as an Array object in * the Java programming language. If the value was SQL NULL, * the value null is returned. * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcPreparedStatement) */ //#ifdef JAVA2 public Array getArray(int parameterIndex) throws SQLException { throw Util.notSupported(); } //#endif JAVA2 /** * * Retrieves the value of the designated JDBC DATE * parameter as a java.sql.Date object, using * the given Calendar object * to construct the date. * With a Calendar object, the driver * can calculate the date taking into account a custom timezone and * locale. If no Calendar object is specified, the driver * uses the default timezone and locale.

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.2 does not support this feature.

    * * Calling this method always throws an SQLException. *

    * * * @param parameterIndex the first parameter is 1, the second is 2, * and so on * @param cal the Calendar object the driver will use * to construct the date * @return the parameter value. If the value is SQL NULL, * the result is null. * @exception SQLException if a database access error occurs * @see #setDate * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcPreparedStatement) */ public Date getDate(int parameterIndex, Calendar cal) throws SQLException { throw Util.notSupported(); // try { // return HsqlDateTime.getDate(getString(parameterIndex), cal); // } catch (Exception e) { // throw Util.sqlException(Trace.INVALID_ESCAPE, // e.getMessage()); // } } /** * * Retrieves the value of the designated JDBC TIME * parameter as a java.sql.Time object, using * the given Calendar object * to construct the time. * With a Calendar object, the driver * can calculate the time taking into account a custom timezone and locale. * If no Calendar object is specified, the driver uses the * default timezone and locale.

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.2 does not support this feature.

    * * Calling this method always throws an SQLException. *

    * * * @param parameterIndex the first parameter is 1, the second is 2, * and so on * @param cal the Calendar object the driver will use * to construct the time * @return the parameter value; if the value is SQL NULL, * the result is null. * @exception SQLException if a database access error occurs * @see #setTime * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcPreparedStatement) */ public Time getTime(int parameterIndex, Calendar cal) throws SQLException { throw Util.notSupported(); // try { // return HsqlDateTime.getTime(getString(parameterIndex), cal); // } catch (Exception e) { // throw Util.sqlException(Trace.INVALID_ESCAPE, // e.getMessage()); // } } /** * * Retrieves the value of the designated JDBC TIMESTAMP * parameter as a java.sql.Timestamp object, using * the given Calendar object to construct * the Timestamp object. * With a Calendar object, the driver * can calculate the timestamp taking into account a custom timezone and * locale. If no Calendar object is specified, the driver * uses the default timezone and locale.

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.2 does not support this feature.

    * * Calling this method always throws an SQLException. *

    * * * @param parameterIndex the first parameter is 1, the second is 2, * and so on * @param cal the Calendar object the driver will use * to construct the timestamp * @return the parameter value. If the value is SQL NULL, * the result is null. * @exception SQLException if a database access error occurs * @see #setTimestamp * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcPreparedStatement) */ public Timestamp getTimestamp(int parameterIndex, Calendar cal) throws SQLException { throw Util.notSupported(); // try { // return HsqlDateTime.getTimestamp(getString(parameterIndex), cal); // } catch (Exception e) { // throw Util.sqlException(Trace.INVALID_ESCAPE, // e.getMessage()); // } } /** * * Registers the designated output parameter. This version of * the method registerOutParameter * should be used for a user-defined or REF output parameter. * Examples of user-defined types include: STRUCT, * DISTINCT, JAVA_OBJECT, and named array types. *

    * (JDBC4 claraification:) All OUT parameters must be registered * before a stored procedure is executed. *

    For a user-defined parameter, the fully-qualified SQL * type name of the parameter should also be given, while a * REF parameter requires that the fully-qualified type name * of the referenced type be given. A JDBC driver that does not need the * type code and type name information may ignore it. To be portable, * however, applications should always provide these values for * user-defined and REF parameters. * * Although it is intended for user-defined and REF parameters, * this method may be used to register a parameter of any JDBC type. * If the parameter does not have a user-defined or REF type, * the typeName parameter is ignored. * *

    Note: When reading the value of an out parameter, you * must use the getter method whose Java type corresponds to the * parameter's registered SQL type.

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.2 does not support this feature.

    * * Calling this method always throws an SQLException. *

    * * * @param parameterIndex the first parameter is 1, the second is 2,... * @param sqlType a value from {@link java.sql.Types} * @param typeName the fully-qualified name of an SQL structured type * @exception SQLException if a database access error occurs * @see java.sql.Types * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcPreparedStatement) * */ public void registerOutParameter(int parameterIndex, int sqlType, String typeName) throws SQLException { registerOutParameter(parameterIndex, sqlType); } // ----------------------------------- JDBC 3 ---------------------------------- /** * * Registers the OUT parameter named * parameterName to the JDBC type * sqlType. All OUT parameters must be registered * before a stored procedure is executed. *

    * The JDBC type specified by sqlType for an OUT * parameter determines the Java type that must be used * in the get method to read the value of that parameter. *

    * If the JDBC type expected to be returned to this output parameter * is specific to this particular database, sqlType * should be java.sql.Types.OTHER. The method * {@link #getObject} retrieves the value.

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.2 does not support this feature.

    * * Calling this method always throws an SQLException. *

    * * * @param parameterName the name of the parameter * @param sqlType the JDBC type code defined by java.sql.Types. * If the parameter is of JDBC type NUMERIC * or DECIMAL, the version of * registerOutParameter that accepts a scale value * should be used. * @exception SQLException if a database access error occurs * @since JDK 1.4, HSQL 1.7.0 * @see java.sql.Types */ //#ifdef JAVA4 public void registerOutParameter(String parameterName, int sqlType) throws SQLException { registerOutParameter(findParameterIndex(parameterName), sqlType); } //#endif JAVA4 /** * * Registers the parameter named * parameterName to be of JDBC type * sqlType. (JDBC4 clarification:) All OUT parameters must be registered * before a stored procedure is executed. *

    * The JDBC type specified by sqlType for an OUT * parameter determines the Java type that must be used * in the get method to read the value of that parameter. *

    * This version of registerOutParameter should be * used when the parameter is of JDBC type NUMERIC * or DECIMAL.

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.2 does not support this feature.

    * * Calling this method always throws an SQLException. *

    * * * @param parameterName the name of the parameter * @param sqlType SQL type code defined by java.sql.Types. * @param scale the desired number of digits to the right of the * decimal point. It must be greater than or equal to zero. * @exception SQLException if a database access error occurs * @since JDK 1.4, HSQLDB 1.7.0 * @see java.sql.Types */ //#ifdef JAVA4 public void registerOutParameter(String parameterName, int sqlType, int scale) throws SQLException { registerOutParameter(findParameterIndex(parameterName), sqlType); } //#endif JAVA4 /** * * Registers the designated output parameter. This version of * the method registerOutParameter * should be used for a user-named or REF output parameter. Examples * of user-named types include: STRUCT, DISTINCT, JAVA_OBJECT, and * named array types.

    * * (JDBC4 clarification:) All OUT parameters must be registered * before a stored procedure is executed. *

    * For a user-named parameter the fully-qualified SQL * type name of the parameter should also be given, while a REF * parameter requires that the fully-qualified type name of the * referenced type be given. A JDBC driver that does not need the * type code and type name information may ignore it. To be portable, * however, applications should always provide these values for * user-named and REF parameters. * * Although it is intended for user-named and REF parameters, * this method may be used to register a parameter of any JDBC type. * If the parameter does not have a user-named or REF type, the * typeName parameter is ignored. * *

    Note: When reading the value of an out parameter, you * must use the getXXX method whose Java type XXX corresponds * to the parameter's registered SQL type.

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.2 does not support this feature.

    * * Calling this method always throws an SQLException. *

    * * * @param parameterName the name of the parameter * @param sqlType a value from {@link java.sql.Types} * @param typeName the fully-qualified name of an SQL structured type * @exception SQLException if a database access error occurs * @see java.sql.Types * @since JDK 1.4, HSQL 1.7.0 */ //#ifdef JAVA4 public void registerOutParameter(String parameterName, int sqlType, String typeName) throws SQLException { registerOutParameter(findParameterIndex(parameterName), sqlType); } //#endif JAVA4 /** * * Retrieves the value of the designated JDBC DATALINK * parameter as a java.net.URL object.

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.2 does not support this feature.

    * * Calling this method always throws an SQLException. *

    * * * @param parameterIndex the first parameter is 1, the second is 2,... * @return a java.net.URL object that represents the * JDBC DATALINK value used as the designated * parameter * @exception SQLException if a database access error occurs, * or if the URL being returned is * not a valid URL on the Java platform * @see #setURL * @since JDK 1.4, HSQLDB 1.7.0 */ //#ifdef JAVA4 public java.net.URL getURL(int parameterIndex) throws SQLException { throw Util.notSupported(); } //#endif JAVA4 /** * * Sets the designated parameter to the given java.net.URL * object. The driver converts this to an SQL DATALINK * value when it sends it to the database.

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.2 does not support this feature.

    * * Calling this method always throws an SQLException. *

    * * * @param parameterName the name of the parameter * @param val the parameter value * @exception SQLException if a database access error occurs, * or if a URL is malformed * @see #getURL * @since JDK 1.4, HSQLDB 1.7.0 */ //#ifdef JAVA4 public void setURL(String parameterName, java.net.URL val) throws SQLException { setURL(findParameterIndex(parameterName), val); } //#endif JAVA4 /** * * Sets the designated parameter to SQL NULL. * *

    Note: You must specify the parameter's SQL type.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Starting with 1.7.2, HSLQDB supports this. *

    * * * @param parameterName the name of the parameter * @param sqlType the SQL type code defined in java.sql.Types * @exception SQLException if a database access error occurs * @since JDK 1.4, HSQLDB 1.7.0 */ //#ifdef JAVA4 public void setNull(String parameterName, int sqlType) throws SQLException { setNull(findParameterIndex(parameterName), sqlType); } //#endif JAVA4 /** * * Sets the designated parameter to the given Java boolean value. * (JDBC4 clarification:) The driver converts this * to an SQL BIT or BOOLEAN value when it sends * it to the database.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Starting with 1.7.2, HSLQDB supports this. *

    * * * @param parameterName the name of the parameter * @param x the parameter value * @exception SQLException if a database access error occurs * @see #getBoolean * @since JDK 1.4, HSQLDB 1.7.0 */ //#ifdef JAVA4 public void setBoolean(String parameterName, boolean x) throws SQLException { setBoolean(findParameterIndex(parameterName), x); } //#endif JAVA4 /** * * Sets the designated parameter to the given Java byte value. * The driver converts this to an SQL TINYINT value when it * sends it to the database.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Starting with 1.7.2, HSLQDB supports this. *

    * * * @param parameterName the name of the parameter * @param x the parameter value * @exception SQLException if a database access error occurs * @see #getByte * @since JDK 1.4, HSQLDB 1.7.0 */ //#ifdef JAVA4 public void setByte(String parameterName, byte x) throws SQLException { setByte(findParameterIndex(parameterName), x); } //#endif JAVA4 /** * * Sets the designated parameter to the given Java short value. * The driver converts this to an SQL SMALLINT value when * it sends it to the database.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Starting with 1.7.2, HSLQDB supports this. *

    * * * @param parameterName the name of the parameter * @param x the parameter value * @exception SQLException if a database access error occurs * @see #getShort * @since JDK 1.4, HSQLDB 1.7.0 */ //#ifdef JAVA4 public void setShort(String parameterName, short x) throws SQLException { setShort(findParameterIndex(parameterName), x); } //#endif JAVA4 /** * * Sets the designated parameter to the given Java int value. * The driver converts this to an SQL INTEGER value when it * sends it to the database.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Starting with 1.7.2, HSLQDB supports this. *

    * * * @param parameterName the name of the parameter * @param x the parameter value * @exception SQLException if a database access error occurs * @see #getInt * @since JDK 1.4, HSQLDB 1.7.0 */ //#ifdef JAVA4 public void setInt(String parameterName, int x) throws SQLException { setInt(findParameterIndex(parameterName), x); } //#endif JAVA4 /** * * Sets the designated parameter to the given Java long value. * The driver converts this to an SQL BIGINT value when it * sends it to the database.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Starting with 1.7.2, HSLQDB supports this. *

    * * * @param parameterName the name of the parameter * @param x the parameter value * @exception SQLException if a database access error occurs * @see #getLong * @since JDK 1.4, HSQLDB 1.7.0 */ //#ifdef JAVA4 public void setLong(String parameterName, long x) throws SQLException { setLong(findParameterIndex(parameterName), x); } //#endif JAVA4 /** * * Sets the designated parameter to the given Java float value. * The driver converts this to an SQL FLOAT value when it * sends it to the database.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Starting with 1.7.2, HSLQDB supports this. *

    * * * @param parameterName the name of the parameter * @param x the parameter value * @exception SQLException if a database access error occurs * @see #getFloat * @since JDK 1.4, HSQLDB 1.7.0 */ //#ifdef JAVA4 public void setFloat(String parameterName, float x) throws SQLException { setFloat(findParameterIndex(parameterName), x); } //#endif JAVA4 /** * * Sets the designated parameter to the given Java double value. * The driver converts this to an SQL DOUBLE value when it * sends it to the database.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Starting with 1.7.2, HSLQDB supports this. *

    * * * @param parameterName the name of the parameter * @param x the parameter value * @exception SQLException if a database access error occurs * @see #getDouble * @since JDK 1.4, HSQLDB 1.7.0 */ //#ifdef JAVA4 public void setDouble(String parameterName, double x) throws SQLException { setDouble(findParameterIndex(parameterName), x); } //#endif JAVA4 /** * * Sets the designated parameter to the given * java.math.BigDecimal value. * The driver converts this to an SQL NUMERIC value when * it sends it to the database.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Starting with 1.7.2, HSLQDB supports this. *

    * * * @param parameterName the name of the parameter * @param x the parameter value * @exception SQLException if a database access error occurs * @see #getBigDecimal * @since JDK 1.4, HSQLDB 1.7.0 */ //#ifdef JAVA4 public void setBigDecimal(String parameterName, BigDecimal x) throws SQLException { setBigDecimal(findParameterIndex(parameterName), x); } //#endif JAVA4 /** * * Sets the designated parameter to the given Java String * value. The driver converts this to an SQL VARCHAR * or LONGVARCHAR value (depending on the argument's * size relative to the driver's limits on VARCHAR values) * when it sends it to the database.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Starting with 1.7.2, HSLQDB supports this. *

    * * * @param parameterName the name of the parameter * @param x the parameter value * @exception SQLException if a database access error occurs * @see #getString * @since JDK 1.4, HSQLDB 1.7.0 */ //#ifdef JAVA4 public void setString(String parameterName, String x) throws SQLException { setString(findParameterIndex(parameterName), x); } //#endif JAVA4 /** * * Sets the designated parameter to the given Java array of bytes. * The driver converts this to an SQL VARBINARY or * LONGVARBINARY (depending on the argument's size relative * to the driver's limits on VARBINARY values) when it sends * it to the database.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Starting with 1.7.2, HSLQDB supports this. *

    * * * @param parameterName the name of the parameter * @param x the parameter value * @exception SQLException if a database access error occurs * @see #getBytes * @since JDK 1.4, HSQLDB 1.7.0 */ //#ifdef JAVA4 public void setBytes(String parameterName, byte[] x) throws SQLException { setBytes(findParameterIndex(parameterName), x); } //#endif JAVA4 /** * * (JDBC4 clarification:) Sets the designated parameter to the given java.sql.Date value * using the default time zone of the virtual machine that is running * the application. The driver converts this to an SQL DATE value * when it sends it to the database.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Starting with 1.7.2, HSLQDB supports this. *

    * * * @param parameterName the name of the parameter * @param x the parameter value * @exception SQLException if a database access error occurs * @see #getDate * @since JDK 1.4, HSQLDB 1.7.0 */ //#ifdef JAVA4 public void setDate(String parameterName, Date x) throws SQLException { setDate(findParameterIndex(parameterName), x); } //#endif JAVA4 /** * * Sets the designated parameter to the given java.sql.Time * value. The driver converts this to an SQL TIME value * when it sends it to the database.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Starting with 1.7.2, HSLQDB supports this. *

    * * * @param parameterName the name of the parameter * @param x the parameter value * @exception SQLException if a database access error occurs * @see #getTime * @since JDK 1.4, HSQLDB 1.7.0 */ //#ifdef JAVA4 public void setTime(String parameterName, Time x) throws SQLException { setTime(findParameterIndex(parameterName), x); } //#endif JAVA4 /** * * Sets the designated parameter to the given * java.sql.Timestamp value. The driver * converts this to an SQL TIMESTAMP value when it * sends it to the database.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Starting with 1.7.2, HSLQDB supports this. *

    * * * @param parameterName the name of the parameter * @param x the parameter value * @exception SQLException if a database access error occurs * @see #getTimestamp * @since JDK 1.4, HSQLDB 1.7.0 */ //#ifdef JAVA4 public void setTimestamp(String parameterName, Timestamp x) throws SQLException { setTimestamp(findParameterIndex(parameterName), x); } //#endif JAVA4 /** * * Sets the designated parameter to the given input stream, which will * have the specified number of bytes. * When a very large ASCII value is input to a LONGVARCHAR * parameter, it may be more practical to send it via a * java.io.InputStream. Data will be read from the stream * as needed until end-of-file is reached. The JDBC driver will * do any necessary conversion from ASCII to the database char format. * *

    Note: This stream object can either be a standard * Java stream object or your own subclass that implements the * standard interface.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Starting with 1.7.2, HSLQDB supports this. *

    * * * @param parameterName the name of the parameter * @param x the Java input stream that contains the ASCII parameter value * @param length the number of bytes in the stream * @exception SQLException if a database access error occurs * @since JDK 1.4, HSQLDB 1.7.0 */ //#ifdef JAVA4 public void setAsciiStream(String parameterName, java.io.InputStream x, int length) throws SQLException { setAsciiStream(findParameterIndex(parameterName), x, length); } //#endif JAVA4 /** * * Sets the designated parameter to the given input stream, which will * have the specified number of bytes. * When a very large binary value is input to a LONGVARBINARY * parameter, it may be more practical to send it via a * java.io.InputStream object. The data will be read from * the stream as needed until end-of-file is reached. * *

    Note: This stream object can either be a standard * Java stream object or your own subclass that implements the * standard interface.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Starting with 1.7.2, HSLQDB supports this. *

    * * * @param parameterName the name of the parameter * @param x the java input stream which contains the binary parameter value * @param length the number of bytes in the stream * @exception SQLException if a database access error occurs * @since JDK 1.4, HSQLDB 1.7.0 */ //#ifdef JAVA4 public void setBinaryStream(String parameterName, java.io.InputStream x, int length) throws SQLException { setBinaryStream(findParameterIndex(parameterName), x, length); } //#endif JAVA4 /** * * Sets the value of the designated parameter with the given object. * The second argument must be an object type; for integral values, the * java.lang equivalent objects should be used. * *

    The given Java object will be converted to the given targetSqlType * before being sent to the database. * * If the object has a custom mapping (is of a class implementing the * interface SQLData), * the JDBC driver should call the method SQLData.writeSQL * to write it to the SQL data stream. * If, on the other hand, the object is of a class implementing * Ref, Blob, Clob, * Struct, or Array, the driver should pass it * to the database as a value of the corresponding SQL type. *

    * Note that this method may be used to pass datatabase- * specific abstract data types.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Starting with 1.7.2, HSLQDB supports this. *

    * * * @param parameterName the name of the parameter * @param x the object containing the input parameter value * @param targetSqlType the SQL type (as defined in java.sql.Types) to be * sent to the database. The scale argument may further qualify this type. * @param scale for java.sql.Types.DECIMAL or java.sql.Types.NUMERIC types, * this is the number of digits after the decimal point. For all * other types, this value will be ignored. * @exception SQLException if a database access error occurs * @see java.sql.Types * @see #getObject * @since JDK 1.4, HSQLDB 1.7.0 */ //#ifdef JAVA4 public void setObject(String parameterName, Object x, int targetSqlType, int scale) throws SQLException { setObject(findParameterIndex(parameterName), x, targetSqlType, scale); } //#endif JAVA4 /** * * Sets the value of the designated parameter with the given object. * This method is like the method setObject * above, except that it assumes a scale of zero.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Starting with 1.7.2, HSLQDB supports this. *

    * * * @param parameterName the name of the parameter * @param x the object containing the input parameter value * @param targetSqlType the SQL type (as defined in java.sql.Types) to be * sent to the database * @exception SQLException if a database access error occurs * @see #getObject * @since JDK 1.4, HSQLDB 1.7.0 */ //#ifdef JAVA4 public void setObject(String parameterName, Object x, int targetSqlType) throws SQLException { setObject(findParameterIndex(parameterName), x, targetSqlType); } //#endif JAVA4 /** * * Sets the value of the designated parameter with the given object. * The second parameter must be of type Object; therefore, * the java.lang equivalent objects should be used for * built-in types. * *

    The JDBC specification specifies a standard mapping from * Java Object types to SQL types. The given argument * will be converted to the corresponding SQL type before being * sent to the database. * *

    Note that this method may be used to pass datatabase- * specific abstract data types, by using a driver-specific Java * type. * * If the object is of a class implementing the interface * SQLData, the JDBC driver should call the method * SQLData.writeSQL to write it to the SQL data stream. * If, on the other hand, the object is of a class implementing * Ref, Blob, Clob, * Struct, or Array, the driver should pass it * to the database as a value of the corresponding SQL type. *

    * This method throws an exception if there is an ambiguity, for example, * if the object is of a class implementing more than one of the * interfaces named above.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Starting with 1.7.2, HSLQDB supports this. *

    * * * @param parameterName the name of the parameter * @param x the object containing the input parameter value * @exception SQLException if a database access error occurs or if the given * Object parameter is ambiguous * @see #getObject * @since JDK 1.4, HSQLDB 1.7.0 */ //#ifdef JAVA4 public void setObject(String parameterName, Object x) throws SQLException { setObject(findParameterIndex(parameterName), x); } //#endif JAVA4 /** * * Sets the designated parameter to the given Reader * object, which is the given number of characters long. * When a very large UNICODE value is input to a LONGVARCHAR * parameter, it may be more practical to send it via a * java.io.Reader object. The data will be read from the * stream as needed until end-of-file is reached. The JDBC driver will * do any necessary conversion from UNICODE to the database char format. * *

    Note: This stream object can either be a standard * Java stream object or your own subclass that implements the * standard interface.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Starting with 1.7.2, HSLQDB supports this. *

    * * * @param parameterName the name of the parameter * @param reader the java.io.Reader object that * contains the UNICODE data used as the designated parameter * @param length the number of characters in the stream * @exception SQLException if a database access error occurs * @since JDK 1.4, HSQLDB 1.7.0 */ //#ifdef JAVA4 public void setCharacterStream(String parameterName, java.io.Reader reader, int length) throws SQLException { setCharacterStream(findParameterIndex(parameterName), reader, length); } //#endif JAVA4 /** * * Sets the designated parameter to the given java.sql.Date * value, using the given Calendar object. The driver uses * the Calendar object to construct an SQL DATE * value, which the driver then sends to the database. With a * a Calendar object, the driver can calculate the date * taking into account a custom timezone. If no * Calendar object is specified, the driver uses the default * timezone, which is that of the virtual machine running the * application.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Starting with 1.7.2, HSLQDB supports this. *

    * * * @param parameterName the name of the parameter * @param x the parameter value * @param cal the Calendar object the driver will use * to construct the date * @exception SQLException if a database access error occurs * @see #getDate * @since JDK 1.4, HSQLDB 1.7.0 */ //#ifdef JAVA4 public void setDate(String parameterName, Date x, Calendar cal) throws SQLException { setDate(findParameterIndex(parameterName), x, cal); } //#endif JAVA4 /** * * Sets the designated parameter to the given java.sql.Time * value, using the given Calendar object. The driver uses * the Calendar object to construct an SQL TIME * value, which the driver then sends to the database. With a * a Calendar object, the driver can calculate the time * taking into account a custom timezone. If no * Calendar object is specified, the driver uses the default * timezone, which is that of the virtual machine running the * application.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Starting with 1.7.2, HSLQDB supports this. *

    * * * @param parameterName the name of the parameter * @param x the parameter value * @param cal the Calendar object the driver will use * to construct the time * @exception SQLException if a database access error occurs * @see #getTime * @since JDK 1.4, HSQLDB 1.7.0 */ //#ifdef JAVA4 public void setTime(String parameterName, Time x, Calendar cal) throws SQLException { setTime(findParameterIndex(parameterName), x, cal); } //#endif JAVA4 /** * * Sets the designated parameter to the given * java.sql.Timestamp value, using the given * Calendar object. The driver uses the * Calendar object to construct an SQL * TIMESTAMP value, which the driver then sends to the * database. With a Calendar object, the driver can * calculate the timestamp taking into account a custom timezone. If no * Calendar object is specified, the driver uses the default * timezone, which is that of the virtual machine running the * application.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Starting with 1.7.2, HSLQDB supports this. *

    * * * @param parameterName the name of the parameter * @param x the parameter value * @param cal the Calendar object the driver will use * to construct the timestamp * @exception SQLException if a database access error occurs * @see #getTimestamp * @since JDK 1.4, HSQLDB 1.7.0 */ //#ifdef JAVA4 public void setTimestamp(String parameterName, Timestamp x, Calendar cal) throws SQLException { setTimestamp(findParameterIndex(parameterName), x, cal); } //#endif JAVA4 /** * * Sets the designated parameter to SQL NULL. * This version of the method setNull should * be used for user-defined types and REF type parameters. * Examples of user-defined types include: STRUCT, * DISTINCT, JAVA_OBJECT, and * named array types. * *

    Note: To be portable, applications must give the * SQL type code and the fully-qualified SQL type name when specifying * a NULL user-defined or REF parameter. * In the case of a user-defined type the name is the type name of the * parameter itself. For a REF parameter, the name is the * type name of the referenced type. If a JDBC driver does not need * the type code or type name information, it may ignore it. * * Although it is intended for user-defined and Ref * parameters, this method may be used to set a null parameter of * any JDBC type. If the parameter does not have a user-defined or * REF type, the given typeName is ignored.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Starting with 1.7.2, HSLQDB supports this. *

    * * * @param parameterName the name of the parameter * @param sqlType a value from java.sql.Types * @param typeName the fully-qualified name of an SQL user-defined type; * ignored if the parameter is not a user-defined type or * SQL REF value * @exception SQLException if a database access error occurs * @since JDK 1.4, HSQLDB 1.7.0 */ //#ifdef JAVA4 public void setNull(String parameterName, int sqlType, String typeName) throws SQLException { setNull(findParameterIndex(parameterName), sqlType, typeName); } //#endif JAVA4 /** * * Retrieves the value of a JDBC CHAR, VARCHAR, * or LONGVARCHAR parameter as a String in * the Java programming language. *

    * For the fixed-length type JDBC CHAR, * the String object * returned has exactly the same value the (JDBC4 clarification:) SQL * CHAR value had in the * database, including any padding added by the database.

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.2 does not support this feature.

    * * Calling this method always throws an SQLException. *

    * * * @param parameterName the name of the parameter * @return the parameter value. If the value is SQL NULL, * the result is null. * @exception SQLException if a database access error occurs * @see #setString * @since JDK 1.4, HSQLDB 1.7.0 */ //#ifdef JAVA4 public String getString(String parameterName) throws SQLException { return getString(findParameterIndex(parameterName)); } //#endif JAVA4 /** * * (JDBC4 modified:) Retrieves the value of a JDBC BIT or BOOLEAN * parameter as a * boolean in the Java programming language.

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.2 does not support this feature.

    * * Calling this method always throws an SQLException. *

    * * * @param parameterName the name of the parameter * @return the parameter value. If the value is SQL NULL, * the result is false. * @exception SQLException if a database access error occurs * @see #setBoolean * @since JDK 1.4, HSQLDB 1.7.0 */ //#ifdef JAVA4 public boolean getBoolean(String parameterName) throws SQLException { return getBoolean(findParameterIndex(parameterName)); } //#endif JAVA4 /** * * Retrieves the value of a JDBC TINYINT parameter as a * byte in the Java programming language.

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.2 does not support this feature.

    * * Calling this method always throws an SQLException. *

    * * * @param parameterName the name of the parameter * @return the parameter value. If the value is SQL NULL, * the result is 0. * @exception SQLException if a database access error occurs * @see #setByte * @since JDK 1.4, HSQLDB 1.7.0 */ //#ifdef JAVA4 public byte getByte(String parameterName) throws SQLException { return getByte(findParameterIndex(parameterName)); } //#endif JAVA4 /** * * Retrieves the value of a JDBC SMALLINT parameter as * a short in the Java programming language.

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.2 does not support this feature.

    * * Calling this method always throws an SQLException. *

    * * * @param parameterName the name of the parameter * @return the parameter value. If the value is SQL NULL, * the result is 0. * @exception SQLException if a database access error occurs * @see #setShort * @since JDK 1.4, HSQLDB 1.7.0 */ //#ifdef JAVA4 public short getShort(String parameterName) throws SQLException { return getShort(findParameterIndex(parameterName)); } //#endif JAVA4 /** * * Retrieves the value of a JDBC INTEGER parameter as * an int in the Java programming language.

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.2 does not support this feature.

    * * Calling this method always throws an SQLException. *

    * * * @param parameterName the name of the parameter * @return the parameter value. If the value is SQL NULL, * the result is 0. * @exception SQLException if a database access error occurs * @see #setInt * @since JDK 1.4, HSQLDB 1.7.0 */ //#ifdef JAVA4 public int getInt(String parameterName) throws SQLException { return getInt(findParameterIndex(parameterName)); } //#endif JAVA4 /** * * Retrieves the value of a JDBC BIGINT parameter as * a long in the Java programming language.

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.2 does not support this feature.

    * * Calling this method always throws an SQLException. *

    * * * @param parameterName the name of the parameter * @return the parameter value. If the value is SQL NULL, * the result is 0. * @exception SQLException if a database access error occurs * @see #setLong * @since JDK 1.4, HSQLDB 1.7.0 */ //#ifdef JAVA4 public long getLong(String parameterName) throws SQLException { return getLong(findParameterIndex(parameterName)); } //#endif JAVA4 /** * * Retrieves the value of a JDBC FLOAT parameter as * a float in the Java programming language.

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.2 does not support this feature.

    * * Calling this method always throws an SQLException. *

    * * * @param parameterName the name of the parameter * @return the parameter value. If the value is SQL NULL, * the result is 0. * @exception SQLException if a database access error occurs * @see #setFloat * @since JDK 1.4, HSQLDB 1.7.0 */ //#ifdef JAVA4 public float getFloat(String parameterName) throws SQLException { return getFloat(findParameterIndex(parameterName)); } //#endif JAVA4 /** * * Retrieves the value of a JDBC DOUBLE parameter as * a double in the Java programming language.

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.2 does not support this feature.

    * * Calling this method always throws an SQLException. *

    * * * @param parameterName the name of the parameter * @return the parameter value. If the value is SQL NULL, * the result is 0. * @exception SQLException if a database access error occurs * @see #setDouble * @since JDK 1.4, HSQLDB 1.7.0 */ //#ifdef JAVA4 public double getDouble(String parameterName) throws SQLException { return getDouble(findParameterIndex(parameterName)); } //#endif JAVA4 /** * * Retrieves the value of a JDBC BINARY or * VARBINARY parameter as an array of byte * values in the Java programming language.

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.2 does not support this feature.

    * * Calling this method always throws an SQLException. *

    * * * @param parameterName the name of the parameter * @return the parameter value. If the value is SQL NULL, * the result is null. * @exception SQLException if a database access error occurs * @see #setBytes * @since JDK 1.4, HSQLDB 1.7.0 */ //#ifdef JAVA4 public byte[] getBytes(String parameterName) throws SQLException { return getBytes(findParameterIndex(parameterName)); } //#endif JAVA4 /** * * Retrieves the value of a JDBC DATE parameter as a * java.sql.Date object.

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.2 does not support this feature.

    * * Calling this method always throws an SQLException. *

    * * * @param parameterName the name of the parameter * @return the parameter value. If the value is SQL NULL, * the result is null. * @exception SQLException if a database access error occurs * @see #setDate * @since JDK 1.4, HSQLDB 1.7.0 */ //#ifdef JAVA4 public Date getDate(String parameterName) throws SQLException { return getDate(findParameterIndex(parameterName)); } //#endif JAVA4 /** * * Retrieves the value of a JDBC TIME parameter as a * java.sql.Time object.

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.2 does not support this feature.

    * * Calling this method always throws an SQLException. *

    * * * @param parameterName the name of the parameter * @return the parameter value. If the value is SQL NULL, * the result is null. * @exception SQLException if a database access error occurs * @see #setTime * @since JDK 1.4, HSQLDB 1.7.0 */ //#ifdef JAVA4 public Time getTime(String parameterName) throws SQLException { return getTime(findParameterIndex(parameterName)); } //#endif JAVA4 /** * * Retrieves the value of a JDBC TIMESTAMP parameter as a * java.sql.Timestamp object.

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.2 does not support this feature.

    * * Calling this method always throws an SQLException. *

    * * * @param parameterName the name of the parameter * @return the parameter value. If the value is SQL NULL, * the result is null. * @exception SQLException if a database access error occurs * @see #setTimestamp * @since JDK 1.4, HSQLDB 1.7.0 */ //#ifdef JAVA4 public Timestamp getTimestamp(String parameterName) throws SQLException { return getTimestamp(findParameterIndex(parameterName)); } //#endif JAVA4 /** * * Retrieves the value of a parameter as an Object in the Java * programming language. If the value is an SQL NULL, the * driver returns a Java null. *

    * This method returns a Java object whose type corresponds to the JDBC * type that was registered for this parameter using the method * registerOutParameter. By registering the target JDBC * type as java.sql.Types.OTHER, this method can be used * to read database-specific abstract data types.

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.2 does not support this feature.

    * * Calling this method always throws an SQLException. *

    * * * @param parameterName the name of the parameter * @return A java.lang.Object holding the OUT parameter value. * @exception SQLException if a database access error occurs * @see java.sql.Types * @see #setObject * @since JDK 1.4, HSQLDB 1.7.0 */ //#ifdef JAVA4 public Object getObject(String parameterName) throws SQLException { return getObject(findParameterIndex(parameterName)); } //#endif JAVA4 /** * * Retrieves the value of a JDBC NUMERIC parameter as a * java.math.BigDecimal object with as many digits to the * right of the decimal point as the value contains.

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.2 does not support this feature.

    * * Calling this method always throws an SQLException. *

    * * * @param parameterName the name of the parameter * @return the parameter value in full precision. If the value is * SQL NULL, the result is null. * @exception SQLException if a database access error occurs * @see #setBigDecimal * @since JDK 1.4, HSQLDB 1.7.0 */ //#ifdef JAVA4 public BigDecimal getBigDecimal(String parameterName) throws SQLException { return getBigDecimal(findParameterIndex(parameterName)); } //#endif JAVA4 /** * * Returns an object representing the value of OUT parameter * parameterName and uses map for the custom * mapping of the parameter value. *

    * This method returns a Java object whose type corresponds to the * JDBC type that was registered for this parameter using the method * registerOutParameter. By registering the target * JDBC type as java.sql.Types.OTHER, this method can * be used to read database-specific abstract data types.

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.2 does not support this feature.

    * * Calling this method always throws an SQLException. *

    * * * @param parameterName the name of the parameter * @param map the mapping from SQL type names to Java classes * @return a java.lang.Object holding the OUT parameter value * @exception SQLException if a database access error occurs * @see #setObject * @since JDK 1.4, HSQLDB 1.7.0 */ //#ifdef JAVA4 public Object getObject(String parameterName, Map map) throws SQLException { return getObject(findParameterIndex(parameterName), map); } //#endif JAVA4 /** * * Retrieves the value of a JDBC REF(<structured-type>) * parameter as a {@link Ref} object in the Java programming language.

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.2 does not support this feature.

    * * Calling this method always throws an SQLException. *

    * * * @param parameterName the name of the parameter * @return the parameter value as a Ref object in the * Java programming language. If the value was SQL NULL, * the value null is returned. * @exception SQLException if a database access error occurs * @since JDK 1.4, HSQLDB 1.7.0 */ //#ifdef JAVA4 public Ref getRef(String parameterName) throws SQLException { return getRef(findParameterIndex(parameterName)); } //#endif JAVA4 /** * * Retrieves the value of a JDBC BLOB parameter as a * {@link java.sql.Blob} object in the Java programming language.

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.2 does not support this feature.

    * * Calling this method always throws an SQLException. *

    * * * @param parameterName the name of the parameter * @return the parameter value as a Blob object in the * Java programming language. If the value was SQL NULL, * the value null is returned. * @exception SQLException if a database access error occurs * @since JDK 1.4, HSQLDB 1.7.0 */ //#ifdef JAVA4 public Blob getBlob(String parameterName) throws SQLException { return getBlob(findParameterIndex(parameterName)); } //#endif JAVA4 /** * * Retrieves the value of a JDBC CLOB parameter as a * {@link java.sql.Clob} object in the Java programming language.

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.2 does not support this feature.

    * * Calling this method always throws an SQLException. *

    * * * @param parameterName the name of the parameter * @return the parameter value as a Clob object in the * Java programming language. If the value was SQL NULL, * the value null is returned. * @exception SQLException if a database access error occurs * @since JDK 1.4, HSQLDB 1.7.0 */ //#ifdef JAVA4 public Clob getClob(String parameterName) throws SQLException { return getClob(findParameterIndex(parameterName)); } //#endif JAVA4 /** * * Retrieves the value of a JDBC ARRAY parameter as an * {@link Array} object in the Java programming language.

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.2 does not support this feature.

    * * Calling this method always throws an SQLException. *

    * * * @param parameterName the name of the parameter * @return the parameter value as an Array object in * Java programming language. If the value was SQL NULL, * the value null is returned. * @exception SQLException if a database access error occurs * @since JDK 1.4, HSQLDB 1.7.0 */ //#ifdef JAVA4 public Array getArray(String parameterName) throws SQLException { return getArray(findParameterIndex(parameterName)); } //#endif JAVA4 /** * * Retrieves the value of a JDBC DATE parameter as a * java.sql.Date object, using * the given Calendar object * to construct the date. * With a Calendar object, the driver * can calculate the date taking into account a custom timezone and * locale. If no Calendar object is specified, the d * river uses the default timezone and locale.

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.2 does not support this feature.

    * * Calling this method always throws an SQLException. *

    * * * @param parameterName the name of the parameter * @param cal the Calendar object the driver will use * to construct the date * @return the parameter value. If the value is SQL NULL, * the result is null. * @exception SQLException if a database access error occurs * @see #setDate * @since JDK 1.4, HSQLDB 1.7.0 */ //#ifdef JAVA4 public Date getDate(String parameterName, Calendar cal) throws SQLException { return getDate(findParameterIndex(parameterName), cal); } //#endif JAVA4 /** * * Retrieves the value of a JDBC TIME parameter as a * java.sql.Time object, using * the given Calendar object * to construct the time. * With a Calendar object, the driver * can calculate the time taking into account a custom timezone and * locale. If no Calendar object is specified, the driver * uses the default timezone and locale.

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.2 does not support this feature.

    * * Calling this method always throws an SQLException. *

    * * * @param parameterName the name of the parameter * @param cal the Calendar object the driver will use * to construct the time * @return the parameter value; if the value is SQL NULL, * the result is null. * @exception SQLException if a database access error occurs * @see #setTime * @since JDK 1.4, HSQLDB 1.7.0 */ //#ifdef JAVA4 public Time getTime(String parameterName, Calendar cal) throws SQLException { return getTime(findParameterIndex(parameterName), cal); } //#endif JAVA4 /** * * Retrieves the value of a JDBC TIMESTAMP parameter as a * java.sql.Timestamp object, using * the given Calendar object to construct * the Timestamp object. * With a Calendar object, the driver * can calculate the timestamp taking into account a custom timezone * and locale. If no Calendar object is specified, the * driver uses the default timezone and locale.

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.2 does not support this feature.

    * * Calling this method always throws an SQLException. *

    * * * * @param parameterName the name of the parameter * @param cal the Calendar object the driver will use * to construct the timestamp * @return the parameter value. If the value is SQL NULL, * the result is null. * @exception SQLException if a database access error occurs * @see #setTimestamp * @since JDK 1.4, HSQLDB 1.7.0 */ //#ifdef JAVA4 public Timestamp getTimestamp(String parameterName, Calendar cal) throws SQLException { return getTimestamp(findParameterIndex(parameterName), cal); } //#endif JAVA4 /** * * Retrieves the value of a JDBC DATALINK parameter as a * java.net.URL object.

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.2 does not support this feature.

    * * Calling this method always throws an SQLException. *

    * * * @param parameterName the name of the parameter * @return the parameter value as a java.net.URL object in the * Java programming language. If the value was SQL * NULL, the value null is returned. * @exception SQLException if a database access error occurs, * or if there is a problem with the URL * @see #setURL * @since JDK 1.4, HSQLDB 1.7.0 */ //#ifdef JAVA4 public java.net.URL getURL(String parameterName) throws SQLException { return getURL(findParameterIndex(parameterName)); } //#endif JAVA4 //#ifdef JAVA6 /* public void setPoolable(boolean poolable) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public boolean isPoolable() throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public T unwrap(Class iface) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public boolean isWrapperFor(Class iface) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void setRowId(int parameterIndex, RowId x) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void setNString(int parameterIndex, String value) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void setNCharacterStream(int parameterIndex, Reader value, long length) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void setNClob(int parameterIndex, NClob value) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void setClob(int parameterIndex, Reader reader, long length) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void setBlob(int parameterIndex, InputStream inputStream, long length) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void setNClob(int parameterIndex, Reader reader, long length) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void setSQLXML(int parameterIndex, SQLXML xmlObject) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void setAsciiStream(int parameterIndex, InputStream x, long length) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void setBinaryStream(int parameterIndex, InputStream x, long length) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void setCharacterStream(int parameterIndex, Reader reader, long length) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void setAsciiStream(int parameterIndex, InputStream x) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void setBinaryStream(int parameterIndex, InputStream x) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void setCharacterStream(int parameterIndex, Reader reader) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void setNCharacterStream(int parameterIndex, Reader value) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void setClob(int parameterIndex, Reader reader) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void setBlob(int parameterIndex, InputStream inputStream) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void setNClob(int parameterIndex, Reader reader) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public RowId getRowId(int parameterIndex) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public RowId getRowId(String parameterName) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void setRowId(String parameterName, RowId x) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void setNString(String parameterName, String value) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void setNCharacterStream(String parameterName, Reader value, long length) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void setNClob(String parameterName, NClob value) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void setClob(String parameterName, Reader reader, long length) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void setBlob(String parameterName, InputStream inputStream, long length) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void setNClob(String parameterName, Reader reader, long length) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public NClob getNClob(int parameterIndex) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public NClob getNClob(String parameterName) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void setSQLXML(String parameterName, SQLXML xmlObject) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public SQLXML getSQLXML(int parameterIndex) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public SQLXML getSQLXML(String parameterName) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public String getNString(int parameterIndex) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public String getNString(String parameterName) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public Reader getNCharacterStream(int parameterIndex) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public Reader getNCharacterStream(String parameterName) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public Reader getCharacterStream(int parameterIndex) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public Reader getCharacterStream(String parameterName) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void setBlob(String parameterName, Blob x) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void setClob(String parameterName, Clob x) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void setAsciiStream(String parameterName, InputStream x, long length) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void setBinaryStream(String parameterName, InputStream x, long length) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void setCharacterStream(String parameterName, Reader reader, long length) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void setAsciiStream(String parameterName, InputStream x) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void setBinaryStream(String parameterName, InputStream x) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void setCharacterStream(String parameterName, Reader reader) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void setNCharacterStream(String parameterName, Reader value) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void setClob(String parameterName, Reader reader) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void setBlob(String parameterName, InputStream inputStream) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void setNClob(String parameterName, Reader reader) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } */ //#endif JAVA6 } hsqldb-1.8.0.10.orig/src/org/hsqldb/jdbc/Util.java0000644000175000017500000001001110621715046020127 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.jdbc; import java.sql.SQLException; import org.hsqldb.HsqlException; import org.hsqldb.Result; import org.hsqldb.Trace; import java.sql.SQLWarning; /** * Provides driver constants and a gateway from internal HsqlExceptions to * external SQLExceptions. * * @author fredt@users * @version 1.7.2 * @since 1.7.2 */ public class Util { static final void throwError(HsqlException e) throws SQLException { throw new SQLException(e.getMessage(), e.getSQLState(), e.getErrorCode()); } static final void throwError(Result r) throws SQLException { throw new SQLException(r.getMainString(), r.getSubString(), r.getStatementID()); } public static final SQLException sqlException(HsqlException e) { return new SQLException(e.getMessage(), e.getSQLState(), e.getErrorCode()); } public static final SQLWarning sqlWarning(HsqlException e) { return new SQLWarning(e.getMessage(), e.getSQLState(), e.getErrorCode()); } static final SQLException sqlException(int id) { return sqlException(Trace.error(id)); } static final SQLException sqlException(int id, String message) { return sqlException(Trace.error(id, message)); } static final SQLException sqlException(int id, int subId, Object[] add) { return sqlException(Trace.error(id, subId, add)); } static final SQLException notSupported() { return sqlException(Trace.error(Trace.FUNCTION_NOT_SUPPORTED)); } public static SQLException nullArgument() { return sqlException(Trace.INVALID_JDBC_ARGUMENT); } static SQLException nullArgument(String name) { return sqlException(Trace.INVALID_JDBC_ARGUMENT, name + ": null"); } public static SQLException invalidArgument() { return sqlException(Trace.INVALID_JDBC_ARGUMENT); } public static SQLException invalidArgument(String name) { return sqlException(Trace.INVALID_JDBC_ARGUMENT, name); } public static SQLException outOfRangeArgument() { return sqlException(Trace.INVALID_JDBC_ARGUMENT); } public static SQLException outOfRangeArgument(String name) { return sqlException(Trace.INVALID_JDBC_ARGUMENT, name); } public static SQLException connectionClosedException() { return sqlException(Trace.CONNECTION_IS_CLOSED); } } hsqldb-1.8.0.10.orig/src/org/hsqldb/jdbc/jdbcResultSetMetaData.java0000644000175000017500000013071310770340574023411 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.jdbc; import java.sql.ResultSetMetaData; import java.sql.SQLException; import org.hsqldb.Result; import org.hsqldb.ResultConstants; import org.hsqldb.Trace; import org.hsqldb.Types; import org.hsqldb.persist.HsqlProperties; // fredt@users 20040412 - removed DITypeInfo dependencies // boucherb@users - 200404xx - removed unused imports;refinement for better // usability of getColumnDisplaySize; // javadoc updates /** * * An object that can be used to get information about the types * and properties of the columns in a ResultSet object. * The following code fragment creates the ResultSet * object rs, creates the ResultSetMetaData object rsmd, * and uses rsmd to find out how many columns rs has and whether the * first column in rs can be used in a WHERE clause. *
     *
     * ResultSet rs = stmt.executeQuery("SELECT a, b, c FROM TABLE2");
     * ResultSetMetaData rsmd = rs.getMetaData();
     * int numberOfColumns = rsmd.getColumnCount();
     * boolean b = rsmd.isSearchable(1);
     *
     * 
    * * * *
    *

    HSQLDB-Specific Information:

    * * HSQLDB supports a subset of the ResultSetMetaData interface.

    * * The JDBC specification for ResultSetMetaData is in part very * vague. This causes potential incompatibility between interpretations of the * specification as realized in different JDBC driver implementations. As such, * deciding to what degree reporting ResultSetMetaData is accurate has been * considered very carefully. Hopefully, the design decisions made in light of * these considerations have yeilded precisely the subset of full * ResultSetMetaData support that is most commonly needed and that is most * important, while also providing, under the most common use-cases, the * fastest access with the least overhead and the best comprimise between * speed, accuracy, jar-foootprint and retention of JDBC resources.

    * * (fredt@users)
    * (boucherb@users)

    *

    * * * @author boucherb@users * @version 1.7.2 * @see jdbcStatement#executeQuery * @see jdbcStatement#getResultSet * @see java.sql.ResultSetMetaData */ public class jdbcResultSetMetaData implements ResultSetMetaData { /** * An array of objects, each of which represents the reported attributes * for a single column of this object's parent ResultSet. */ private jdbcColumnMetaData[] columnMetaData; /** The number of columns in this object's parent ResultSet. */ private int columnCount; /** * Whether to use the underlying column name or label when reporting * getColumnName(). */ private boolean useColumnName; /** * If true, then timings for init() are printed * to the console. */ private static final boolean TRACE = false; /** * Constructs a new jdbcResultSetMetaData object from the specified * jdbcResultSet and HsqlProprties objects. * * @param rs the jdbcResultSet object from which to construct a new * jdbcResultSetMetaData object * @param props the HsqlProperties object from which to construct a * new jdbcResultSetMetaData object * @throws SQLException if a database access error occurs */ jdbcResultSetMetaData(jdbcResultSet rs, HsqlProperties props) throws SQLException { init(rs, props); } /** * Constructs a new jdbcResultSetMetaData object from the specified * Result and HsqlProprties objects. * * @param r the Result object from which to construct a new * jdbcResultSetMetaData object * @param props the HsqlProperties object from which to construct a * new jdbcResultSetMetaData object * @throws SQLException if a database access error occurs */ jdbcResultSetMetaData(Result r, HsqlProperties props) throws SQLException { init(r, props); } /** * Initializes this jdbcResultSetMetaData object from the specified * jdbcResultSet and HsqlProperties objects. * * @param rs the jdbcResultSet object from which to initialize this * jdbcResultSetMetaData object * @param props the HsqlProperties object from which to initialize this * jdbcResultSetMetaData object * @throws SQLException if a database access error occurs */ void init(jdbcResultSet rs, HsqlProperties props) throws SQLException { if (rs == null) { throw Util.sqlException(Trace.GENERAL_ERROR, Trace.JDBC_NO_RESULT_SET_METADATA, null); } init(rs.rResult, props); } /** * Initializes this jdbcResultSetMetaData object from the specified * Result and HsqlProperties objects. * * @param r the Result object from which to initialize this * jdbcResultSetMetaData object * @param props the HsqlProperties object from which to initialize this * jdbcResultSetMetaData object * @throws SQLException if a database access error occurs */ void init(Result r, HsqlProperties props) throws SQLException { jdbcColumnMetaData cmd; int type; Result.ResultMetaData rmd; if (r == null) { throw Util.sqlException(Trace.GENERAL_ERROR, Trace.JDBC_NO_RESULT_SET, null); } if (!r.isData()) { // implied: columnCount = 0; return; } columnCount = r.getColumnCount(); // fredt - props is null for internal connections, so always use the default behaviour in this case useColumnName = props == null ? true : props.isPropertyTrue( "get_column_name"); columnMetaData = new jdbcColumnMetaData[columnCount]; rmd = r.metaData; for (int i = 0; i < columnCount; i++) { cmd = new jdbcColumnMetaData(); columnMetaData[i] = cmd; // Typically, these null checks are not needed, but as // above, it is not _guaranteed_ that these values // will be non-null. So, it is better to do the work // here than have to perform checks and conversions later. cmd.catalogName = rmd.catalogNames[i] == null ? "" : rmd .catalogNames[i]; cmd.schemaName = rmd.schemaNames[i] == null ? "" : rmd .schemaNames[i]; cmd.tableName = rmd.tableNames[i] == null ? "" : rmd .tableNames[i]; cmd.columnName = rmd.colNames[i] == null ? "" : rmd.colNames[i]; cmd.columnLabel = rmd.colLabels[i] == null ? "" : rmd.colLabels[i]; cmd.columnType = rmd.colTypes[i]; cmd.columnTypeName = Types.getTypeString(cmd.columnType); cmd.isWritable = rmd.isWritable[i]; cmd.isReadOnly = !cmd.isWritable; // default: cmd.isDefinitelyWritable = false; cmd.isAutoIncrement = rmd.isIdentity[i]; cmd.isNullable = rmd.colNullable[i]; type = cmd.columnType; cmd.columnClassName = rmd.classNames[i]; if (cmd.columnClassName == null || cmd.columnClassName.length() == 0) { cmd.columnClassName = Types.getColStClsName(type); } // Some tools, such as PowerBuilder, require that (for char and // varchar types, at any rate) getMaxDisplaySize returns a value // _at least_ as large as the length of the longest value in this // column of the result set, or else an internal error will occur // at retrieve time the instant a longer value is fetched. // // org.hsqldb.Types has been patched to retrieve, by default, either // a large-but-reasonable value or a value defined through system // properties that is expected to be unlikely to cause problems in // the majority of cases. if (Types.acceptsPrecisionCreateParam(type)) { if (rmd.colSizes[i] == 0) { cmd.columnDisplaySize = Types.getMaxDisplaySize(type); } else { cmd.columnDisplaySize = rmd.colSizes[i]; if (Types.acceptsScaleCreateParam(type)) { if (rmd.colScales[i] != 0) { cmd.columnDisplaySize += (1 + rmd.colScales[i]); } } } } else { cmd.columnDisplaySize = Types.getMaxDisplaySize(type); } if (Types.isNumberType(type) && Types.acceptsPrecisionCreateParam(type)) { cmd.precision = rmd.colSizes[i]; if (cmd.precision == 0) { cmd.precision = Types.getPrecision(type); } } else { cmd.precision = Types.getPrecision(type); } // Without a non-zero scale value, some (legacy only?) tools will // simply truncate digits to the right of the decimal point when // retrieving values from the result set. The measure below can // help, but currently only as long as one is connected to an // embedded instance at design time, not via a network connection. if (Types.acceptsScaleCreateParam(type)) { cmd.scale = rmd.colScales[i]; } Boolean iua = Types.isUnsignedAttribute(type); cmd.isSigned = iua != null &&!iua.booleanValue(); Boolean ics = Types.isCaseSensitive(type); cmd.isCaseSensitive = ics != null && ics.booleanValue(); cmd.isSearchable = Types.isSearchable(type); } } /** * * Returns the number of columns in this ResultSet * object.

    * * @return the number of columns * @exception SQLException if a database access error occurs */ public int getColumnCount() throws SQLException { return columnCount; } /** * * Indicates whether the designated column is automatically numbered, * thus read-only.

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.1 did not report this value accurately, * either always throwing or always returning false, depending * upon client property values.

    * * Starting with HSQLDB 1.7.2, this feature is better supported.

    * *


    * * However, it must be stated here that, contrary to the generic * documentation above, HSQLDB automatically numbered columns * (IDENTITY columns, in HSQLDB parlance) are not read-only.

    * * In fact, the generic documentation above seems to contradict the general * definition of what, at minimum, an auto-increment column is:

    * * Simply, an auto-increment column is one that guarantees it has a * unique value after a successful insert or update operation, even if * no value is supplied or NULL is explicitly specified by the application * or a default value expression.

    * * Further, without SQL Feature T176, Sequence generator support, the * attributes of the internal source consulted for unique values are not * defined. That is, unlike for a standard SQL SEQUENCE object or a system * with full SQL 9x or 200n support for SQL Feature T174, Identity columns, * an application must not assume and cannot determine in a standard way * that auto-increment values start at any particular point, increment by * any particular value or have any of the other attributes generally * associated with SQL SEQUENCE generators. Further still, without full * support for both feature T174 and T176, if a unique value is supplied * by an application or provided by a declared or implicit default value * expression, then whether that value is used or substituted with one * from the automatic unique value source is implementation-defined * and cannot be known in a standard way. Finally, without full support * for features T174 and T176, it is also implementation-defined and * cannot be know in a standard way whether an exception is thrown or * a unique value is automatically substituted when an application or * default value expression supplies a non-NULL, * non-unique value.

    * * Up to and including HSQLDB 1.7.2, values supplied by an application or * default value expression are used if they are indeed non-NULL unique * values, while an exception is thrown if either possible value source * for the site attempts to supply a non-NULL, non-unique value. This is * very likely to remain the behaviour of HSQLDB for its foreseable * lifetime and at the very least for the duration of the 1.7.x release * series.

    * *


    * * Regardless of the new and better support for reporting * isAutoIncrement(), it is still possible under certain conditions that * accurate reporting may be impossible. For example, if this object's * parent Connection is closed before the first call to this method or to * any other method of this class that initializes the connection-dependent * ResultSetMetaData values, then it is impossible to report accurately for * result set columns that directly represent table column values.

    * * Under such special circumstances, the driver rethrows the exception that * occured during the initialization, or a SQLException wrapping it.

    * * Those wishing to determine the auto-increment status of a table column * in isolation from ResultSetMetaData can do so by inspecting the * corresponding value of the SYSTEM_COLUMNS.IS_IDENTITY BOOLEAN column which * is also currently included (in a fashion proprietary to HSQLDB) as the * last column of the jdbcDatabaseMetaData.getColumns() result. * *

    * * * @param column the first column is 1, the second is 2, ... * @return true if so; false otherwise * @exception SQLException if a database access error occurs */ public boolean isAutoIncrement(int column) throws SQLException { checkColumn(column); return columnMetaData[--column].isAutoIncrement; } /** * * Indicates whether a column's case matters.

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.1 did not report this value accurately.

    * * Starting with 1.7.2, this feature is better supported.

    * * This method returns true for any column whose data type is a character * type, with the exception of VARCHAR_IGNORECASE for which it returns * false. It also returns false for any column whose data type is a * not a character data type.

    * *

    * * * @param column the first column is 1, the second is 2, ... * @return true if so; false otherwise * @exception SQLException if a database access error occurs */ public boolean isCaseSensitive(int column) throws SQLException { checkColumn(column); return columnMetaData[--column].isCaseSensitive; } /** * * Indicates whether the designated column can be used in a where * clause.

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.1 did not report this value accurately.

    * * Starting with 1.7.2, this feature is better supported.

    * * If the data type of the column is definitely known to be searchable * in any way under HSQLDB, then true is returned, else false. That is, * if the type is reported in DatabaseMetaData.getTypeInfo() as having * DatabaseMetaData.typePredNone or is not reported, then false is * returned, else true. * *

    * * * @param column the first column is 1, the second is 2, ... * @return true if so; false otherwise * @exception SQLException if a database access error occurs */ public boolean isSearchable(int column) throws SQLException { checkColumn(column); return columnMetaData[--column].isSearchable; } /** * * Indicates whether the designated column is a cash value.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Up to and including HSQLDB 1.7.2, this method always returns * false.

    * * This is because true fixed (precision,scale) data types are not yet * supported. That is, DECIMAL and NUMERIC types are implemented * as a thin wrap of java.math.BigDecimal, which cannot, without * additional, as yet unimplemented constraint enforcement code, be * said to be a fixed (precision,scale) types.

    * *

    * * * @param column the first column is 1, the second is 2, ... * @return true if so; false otherwise * @exception SQLException if a database access error occurs */ public boolean isCurrency(int column) throws SQLException { checkColumn(column); return columnMetaData[--column].isCurrency; } /** * * Indicates the nullability of values in the designated column.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Up to 1.7.1, HSQLDB did not report this value accurately.

    * * Starting with 1.7.2, this feature is better supported.

    * * columnNullableUnknown is always returned for result set columns that * do not directly represent table column values (i.e. are calculated), * while the corresponding value in SYSTEM_COLUMNS.NULLABLE is returned * for result set columns that do directly represent table column values.

    * * Those wishing to determine the nullable status of a table column in * isolation from ResultSetMetaData and in a DBMS-independent fashion * can do so by calling DatabaseMetaData.getColumns() with the appropriate * filter values and inspecting the result at the position described in * the API documentation.

    * *

    * * * @param column the first column is 1, the second is 2, ... * @return the nullability status of the given column; one of * columnNoNulls, * columnNullable or columnNullableUnknown * @exception SQLException if a database access error occurs */ public int isNullable(int column) throws SQLException { checkColumn(column); return columnMetaData[--column].isNullable; } /** * * Indicates whether values in the designated column are signed * numbers.

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.1 introduced support for this feature and 1.7.2 * reports identical values (although using a slightly different * implementation).

    * *

    * * * @param column the first column is 1, the second is 2, ... * @return true if so; false otherwise * @exception SQLException if a database access error occurs */ public boolean isSigned(int column) throws SQLException { checkColumn(column); return columnMetaData[--column].isSigned; } /** * * Indicates the designated column's normal maximum width in * characters.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Up to and including HSQLDB 1.7.1, this method always returned * 0, which was intended to convey unknown display size. * Unfortunately, this value is not universally handled by all * clients and in the worst case can cause some applications to * crash.

    * * Starting with 1.7.2, this feature is better supported.

    * * The current calculation follows these rules:

    * *

      *
    1. Long character types and datetime types:

      * * The maximum length/precision, repectively.

      * *

    2. CHAR and VARCHAR types:

      * *

        *
      • If the result set column is a direct pass through of a table * column value, column size was declared and the connection is * to an embedded database instance, then the declared value is * returned.

        * *

      • Otherwise, the value of the system property * hsqldb.max_xxxchar_display_size or the magic value * 32766 (0x7FFE) (tested usable/accepted by most tools and * compatible with assumptions made by java.io read/write * UTF) when the system property is not defined or is not * accessible, due to security constraints.

        * *

      * * It must be noted that the latter value in no way affects the * ability of the HSQLDB JDBC driver to retrieve longer values * and serves only as the current best effort at providing a * value that maximizes usability across a wide range of tools, * given that the HSQLDB database engine does not require the * length to be declared and does not necessarily enforce it, * even if declared.

      * *

    3. Number types:

      * * The max precision, plus the length of the negation character (1), * plus (if applicable) the maximum number of characters that may * occupy the exponent character sequence. Note that some legacy tools * do not correctly handle BIGINT values of greater than 18 digits.

      * *

    4. BOOLEAN (BIT) type:

      * * The length of the character sequence "false" (5), the longer of the * two boolean value String representations.

      * *

    5. Remaining types:

      * * The maximum length/precision, respectively, as reported by * DatabaseMetaData.getTypeInfo(), when applicable. If the maximum * display size is unknown, unknowable or inapplicable, then zero is * returned.

      * *

    * *
    * * * @param column the first column is 1, the second is 2, ... * @return the normal maximum number of characters allowed as the width * of the designated column * @exception SQLException if a database access error occurs */ public int getColumnDisplaySize(int column) throws SQLException { checkColumn(column); return columnMetaData[--column].columnDisplaySize; } /** * * Gets the designated column's suggested title for use in printouts and * displays.

    * * * *

    *

    HSQLDB-Specific Information:

    * * In HSQLDB a ResultSet column label is determined in the * following order of precedence:

    * *

      *
    1. The label (alias) specified in the generating query.
    2. *
    3. The name of the underlying column, if no label is specified.
      * This also applies to aggregate functions.
    4. *
    5. An empty String.
    6. *

    * *

    * * * @param column the first column is 1, the second is 2, ... * @return the suggested column title * @exception SQLException if a database access error occurs */ public String getColumnLabel(int column) throws SQLException { checkColumn(column); return columnMetaData[--column].columnLabel; } /** * * Get the designated column's name.

    * * * *

    *

    HSQLDB-Specific Information:

    * * In HSQLDB a ResultSet column name is determined in the following * order of prcedence:

    * *

      *
    1. The name of the underlying columnm, if the ResultSet column * represents a column in a table.
    2. *
    3. The label or alias specified in the generating query.
    4. *
    5. An empty String.
    6. *

    * * If the jdbc.get_column_name property of the database * has been set to false, this method returns the same value as * {@link #getColumnLabel(int)}.

    * *

    * * * @param column the first column is 1, the second is 2, ... * @return column name * @exception SQLException if a database access error occurs */ public String getColumnName(int column) throws SQLException { checkColumn(column); column--; return useColumnName ? columnMetaData[column].columnName : columnMetaData[column].columnLabel; } /** * * Get the designated column's table's schema.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Up to 1.7.1, HSQLDB did not support the notion of schemas at all, * including schema names in result set metadata; this method always * returned "".

    * * Staring with 1.7.2, schema name reporting is supported only as an * optional, experimental feature that is disabled by default. * Enabling this feature requires setting the database property * "hsqldb.schemas=true".

    * * Specifically, when this feature is enabled under 1.7.2, only very * limited support is provided by the engine for executing SQL containing * schema-qualified database object identifiers. That is, when this * feature is enabled under 1.7.2, it is not yet possible in most cases * to use what would otherwise be the correct, canonical SQL calculated * from ResultSetMetaData.

    * * Regardless, reporting is done only in system table content and is * not yet carried over to ResultSetMetaData.

    * * For greater detail, see discussion at: * {@link jdbcDatabaseMetaData}.

    * *

    * * * @param column the first column is 1, the second is 2, ... * @return schema name or "" if not applicable * @exception SQLException if a database access error occurs */ public String getSchemaName(int column) throws SQLException { checkColumn(column); return columnMetaData[--column].schemaName; } /** * * Get the designated column's number of decimal digits.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Starting with 1.8.0, HSQLDB reports the the declared * length or precision specifiers for table columns (if they are defined, * which up to 1.7.2 is not a requirement in DDL), as these values may or * may not be enforced, depending on the value of the database * property:

    * *

         * sql.enforce_strict_size
         * 
    * * Because the property may change from one instantiation of a Database * to the next and because, when set true, is not applied to existing * values in table columns (only to new values introduced by following * inserts and updates), the length and/or precision specifiers for table * columns still do not neccessarily accurately reflect true constraints * upon the contents of the columns. This situation may or may not change * in a future release.

    * *

    * * * @param column the first column is 1, the second is 2, ... * @return precision * @exception SQLException if a database access error occurs */ public int getPrecision(int column) throws SQLException { checkColumn(column); return columnMetaData[--column].precision; } /** * * Gets the designated column's number of digits to right of the * decimal point.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Starting with 1.8.0, HSQLDB reports the declared * scale for table columns depending on the value of the database * property:

    * *

         * sql.enforce_strict_size
         * 
    * *
    * * * @param column the first column is 1, the second is 2, ... * @return scale * @exception SQLException if a database access error occurs */ public int getScale(int column) throws SQLException { checkColumn(column); return columnMetaData[--column].scale; } /** * * Gets the designated column's table name.

    * * @param column the first column is 1, the second is 2, ... * @return table name or "" if not applicable * @exception SQLException if a database access error occurs */ public String getTableName(int column) throws SQLException { checkColumn(column); return columnMetaData[--column].tableName; } /** * * Gets the designated column's table's catalog name.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Up to and including 1.7.1, HSQLDB did not support the notion of * catalog and this method always returned "".

    * * Starting with 1.7.2, HSQLDB supports catalog reporting only as an * optional, experimental feature that is disabled by default. Enabling * this feature requires setting the database property * "hsqldb.catalogs=true". When enabled, the catalog name for table columns * is reported as the name by which the hosting Database knows itself.

    * * HSQLDB does not yet support any use of catalog qualification in * DLL or DML. This fact is accurately indicated in the corresponding * DatabaseMetaData.supportsXXX() method return values.

    * * Regardless, reporting is done only in system table content and is * not yet carried over to ResultSetMetaData.

    * * For greater detail, see discussion at: * {@link jdbcDatabaseMetaData}.

    * *

    * * * @param column the first column is 1, the second is 2, ... * @return the name of the catalog for the table in which the given column * appears or "" if not applicable * @exception SQLException if a database access error occurs */ public String getCatalogName(int column) throws SQLException { checkColumn(column); return columnMetaData[--column].catalogName; } /** * * Retrieves the designated column's SQL type.

    * * * *

    *

    HSQLDB-Specific Information:

    * * This reports the SQL type of the column. HSQLDB can return Objects in * any Java integral type wider than Integer for an SQL * integral type.

    * *

    * * * * @param column the first column is 1, the second is 2, ... * @return SQL type from java.sql.Types * @exception SQLException if a database access error occurs * @see java.sql.Types */ public int getColumnType(int column) throws SQLException { checkColumn(column); int type = columnMetaData[--column].columnType; return type == Types.VARCHAR_IGNORECASE ? Types.VARCHAR : type; } /** * * Retrieves the designated column's database-specific type name.

    * * * @param column the first column is 1, the second is 2, ... * @return type name used by the database. If the column type is * a user-defined type, then a fully-qualified type name is returned. * @exception SQLException if a database access error occurs */ public String getColumnTypeName(int column) throws SQLException { checkColumn(column); return columnMetaData[--column].columnTypeName; } /** * * Indicates whether the designated column is definitely not writable.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Up to and including 1.7.1, HSQLDB did not report this value accurately. *

    * * Starting with HSQLDB 1.7.2, this feature is better supported.

    * * For result set columns that do not directly * represent table column values (i.e. are calculated), true is reported. * Otherwise, the read only status of the table and the database are used * in the calculation, but not the read-only status of the session.

    * *

    * * * @param column the first column is 1, the second is 2, ... * @return true if so; false otherwise * @exception SQLException if a database access error occurs */ public boolean isReadOnly(int column) throws SQLException { checkColumn(column); return columnMetaData[--column].isReadOnly; } /** * * Indicates whether it is possible for a write on the designated * column to succeed.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Up to and including 1.7.1, HSQLDB did not report this value accurately. *

    * * Starting with HSQLDB 1.7.2, this feature is better supported.

    * * In essense, the negation of isReadOnly() is reported.

    * *

    * * * @param column the first column is 1, the second is 2, ... * @return true if so; false otherwise * @exception SQLException if a database access error occurs */ public boolean isWritable(int column) throws SQLException { checkColumn(column); return columnMetaData[--column].isWritable; } /** * * Indicates whether a write on the designated column will definitely * succeed.

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.1 did not report this value accurately.

    * * Starting with HSQLDB 1.7.2, this method always returns false. The * reason for this is that it is generally either very complex or * simply impossible to calculate deterministically true for table columns * under all concievable conditions. The value is of dubious usefulness, except * perhaps if there were support for updateable result sets using * "SELECT ... FOR UPDATE" style locking. However, this is not anticipated to * occur any time in the 1.7.x release series.

    * *

    * * * @param column the first column is 1, the second is 2, ... * @return true if so; false otherwise * @exception SQLException if a database access error occurs */ public boolean isDefinitelyWritable(int column) throws SQLException { checkColumn(column); // NOTE: // boucherb@users - 20020329 // currently, we can't tell _for sure_ that this is true without a // great deal more work (and even then, not necessarily deterministically), // plus it is of dubious usefulness to know this is true _for sure_ anyway. // It's not like one can do an insert or update without a try-catch block // using JDBC, even if one knows that a column is definitely writable. And // the catch will always let us know if there is a failure and why. Also, // it is typically completely useless to know that, although it is _possible_ // that a write may succeed (as indicated by a true value of isWritable()), // it also might fail (as indicated by a false returned here). // as of 1.7.2, always false return columnMetaData[--column].isDefinitelyWritable; } //--------------------------JDBC 2.0----------------------------------- /** * * Returns the fully-qualified name of the Java class whose instances * are manufactured if the method ResultSet.getObject * is called to retrieve a value from the column. * ResultSet.getObject may return a subclass of the class * returned by this method.

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.1 did not support this feature; calling this method * always caused an SQLException to be thrown, * stating that the function was not supported.

    * *

    * * * @param column the first column is 1, the second is 2, ... * @return the fully-qualified name of the class in the Java programming * language that would be used by the method * ResultSet.getObject to retrieve the value in the * specified column. This is the class name used for custom mapping. * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) */ public String getColumnClassName(int column) throws SQLException { checkColumn(column); return columnMetaData[--column].columnClassName; } public String toString() { StringBuffer sb = new StringBuffer(); sb.append(super.toString()); if (columnCount == 0) { sb.append("[columnCount=0]"); return sb.toString(); } sb.append('['); for (int i = 0; i < columnCount; i++) { sb.append('\n'); sb.append(" column_"); sb.append(i + 1); sb.append('='); sb.append(columnMetaData[i]); if (i + 1 < columnCount) { sb.append(','); sb.append(' '); } } sb.append('\n'); sb.append(']'); return sb.toString(); } // ------------------------- Internal Implementation --------------------------- /** * Performs an internal check for column index validity.

    * * @param column index of column to check * @throws SQLException when this object's parent ResultSet has * no such column */ private void checkColumn(int column) throws SQLException { if (column < 1 || column > columnCount) { throw Util.sqlException(Trace.COLUMN_NOT_FOUND, String.valueOf(column)); } } //#ifdef JAVA6 /* public T unwrap(Class iface) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public boolean isWrapperFor(Class iface) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } */ //#endif JAVA6 } hsqldb-1.8.0.10.orig/src/org/hsqldb/jdbc/jdbcConnection.java0000644000175000017500000032046110770340574022156 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.jdbc; //#ifdef JAVA2 import java.sql.Array; import java.sql.Blob; import java.sql.Clob; import java.sql.Struct; //#endif JAVA2 import java.sql.CallableStatement; import java.sql.Connection; import java.sql.DatabaseMetaData; //#ifdef JAVA6 /* import java.sql.NClob; import java.sql.SQLClientInfoException; import java.sql.SQLXML; */ //#endif JAVA6 import java.sql.PreparedStatement; import java.sql.SQLException; import java.sql.SQLWarning; import java.sql.Statement; //#ifdef JAVA4 import java.sql.Savepoint; //#endif JAVA4 //#ifdef JAVA2 import java.util.Map; //#endif JAVA2 import java.util.Locale; import java.util.Properties; import org.hsqldb.DatabaseManager; import org.hsqldb.DatabaseURL; import org.hsqldb.HSQLClientConnection; import org.hsqldb.HTTPClientConnection; import org.hsqldb.HsqlException; import org.hsqldb.persist.HsqlProperties; import org.hsqldb.Result; import org.hsqldb.ResultConstants; import org.hsqldb.Session; import org.hsqldb.SessionInterface; import org.hsqldb.Trace; import org.hsqldb.lib.StringUtil; // fredt@users 20020320 - patch 1.7.0 - JDBC 2 support and error trapping // JDBC 2 methods can now be called from jdk 1.1.x - see javadoc comments // boucherb@users 20020509 - added "throws SQLException" to all methods where // it was missing here but specified in the java.sql.Connection interface, // updated generic documentation to JDK 1.4, and added JDBC3 methods and docs // boucherb@users and fredt@users 20020505 - extensive review and update // of docs and behaviour to comply with java.sql specification // fredt@users 20020830 - patch 487323 by xclayl@users - better synchronization // fredt@users 20020930 - patch 1.7.1 - support for connection properties // kneedeepincode@users 20021110 - patch 635816 - correction to properties // unsaved@users 20021113 - patch 1.7.2 - SSL support // boucherb@users 2003 ??? - patch 1.7.2 - SSL support moved to factory interface // fredt@users 20030620 - patch 1.7.2 - reworked to use a SessionInterface // boucherb@users 20030801 - JavaDoc updates to reflect new connection urls // boucherb@users 20030819 - patch 1.7.2 - partial fix for broken nativeSQL method // boucherb@users 20030819 - patch 1.7.2 - SQLWarning cases implemented /** * * A connection (session) with a specific database. Within the context * of a Connection, SQL statements are executed and results * are returned.

    * * A Connection's database is able to provide information describing * its tables, its supported SQL grammar, its stored procedures, the * capabilities of this connection, and so on. This information is * obtained with the getMetaData method.

    * * Note: By default the Connection automatically commits * changes after executing each statement. If auto commit has been * disabled, an explicit commit must be done or database changes will * not be saved.

    * * * *

    * *
    * * HSQLDB-Specific Information:

    * * To get a Connection to an HSQLDB database, the * following code may be used (updated to reflect the most recent * recommendations):

    * *


    * * When using HSQLDB, the database connection <url> must start with * 'jdbc:hsqldb:'

    * * Since 1.7.2, connection properties (<key-value-pairs>) may be appended * to the database connection <url>, using the form:

    * *

    * '<url>[;key=value]*' *

    * * Also since 1.7.2, the allowable forms of the HSQLDB database connection * <url> have been extended. However, all legacy forms continue * to work, with unchanged semantics. The extensions are as described in the * following material.

    * *


    * * Network Server Database Connections:

    * * The 1.7.2 {@link Server Server} database connection <url> has * changed to take one of the two following forms:

    * *

    *
      *
    1. 'jdbc:hsqldb:hsql://host[:port][/<alias>][<key-value-pairs>]' * *
    2. 'jdbc:hsqldb:hsqls://host[:port][/<alias>][<key-value-pairs>]' * (with TLS). *
    *

    * * The 1.7.2 {@link WebServer WebServer} database connection <url> * also changes to take one of two following forms:

    * *

    *
      *
    1. 'jdbc:hsqldb:http://host[:port][/<alias>][<key-value-pairs>]' * *
    2. 'jdbc:hsqldb:https://host[:port][/<alias>][<key-value-pairs>]' * (with TLS). *
    *

    * * In both network server database connection <url> forms, the * optional <alias> component is used to identify one of possibly * several database instances available at the indicated host and port. If the * <alias> component is omitted, then a connection is made to the * network server's default database instance.

    * * For more information on server configuration regarding mounting multiple * databases and assigning them <alias> values, please read the * Java API documentation for {@link org.hsqldb.Server Server} and related * chapters in the general documentation, especially the Advanced Users * Guide.

    * *


    * * Transient, In-Process Database Connections:

    * * The 1.7.2 100% in-memory (transient, in-process) database connection * <url> takes one of the two following forms:

    * *

    *
      *
    1. 'jdbc:hsqldb:.[<key-value-pairs>]' * (the legacy form, extended) * *
    2. 'jdbc:hsqldb:mem:<alias>[<key-value-pairs>]' * (the new form) *
    *

    * * With the 1.7.2 transient, in-process database connection <url>, * the <alias> component is the key used to look up a transient, * in-process database instance amongst the collection of all such instances * already in existence within the current class loading context in the * current JVM. If no such instance exists, one may be automatically * created and mapped to the <alias>, as governed by the * 'ifexists=true|false' connection property.

    * *


    * * Persistent, In-Process Database Connections:

    * * The 1.7.2 standalone (persistent, in-process) database connection * <url> takes one of the three following forms:

    * *

    *
      *
    1. 'jdbc:hsqldb:<path>[<key-value-pairs>]' * (the legacy form, extended) * *
    2. 'jdbc:hsqldb:file:<path>[<key-value-pairs>]' * (same semantics as the legacy form) * *
    3. 'jdbc:hsqldb:res:<path>[<key-value-pairs>]' * (new form with 'files_in_jar' semantics) *
    *

    * * For the persistent, in-process database connection <url>, * the <path> component is the path prefix common to all of * the files that compose the database.

    * * As of 1.7.2, although other files may be involved (such as transient working * files and/or TEXT table CSV data source files), the essential set that may, * at any particular point in time, compose an HSQLDB database are:

    * *

    *
      *
    • <path>.properties *
    • <path>.script *
    • <path>.log *
    • <path>.data *
    • <path>.backup *
    • <path>.lck *
    *

    * * For example: 'jdbc:hsqldb:file:test' connects to a database * composed of some subset of the files listed above, where the expansion * of <path> is 'test' prefixed with the path of the * working directory fixed at the time the JVM is started.

    * * Under Windows TM , * 'jdbc:hsqldb:file:c:\databases\test' connects to a database located * on drive 'C:' in the directory 'databases', composed * of some subset of the files:

    * *

     * C:\
     * +--databases\
     *    +--test.properties
     *    +--test.script
     *    +--test.log
     *    +--test.data
     *    +--test.backup
     *    +--test.lck
     * 
    * * Under most variations of UNIX, 'jdbc:hsqldb:file:/databases/test' * connects to a database located in the directory 'databases' directly * under root, once again composed of some subset of the files:

    * *

     * /
     * +--databases/
     *    +--test.properties
     *    +--test.script
     *    +--test.log
     *    +--test.data
     *    +--test.backup
     *    +--test.lck
     * 
    * * Some Guidelines:

    * *

      *
    1. Both relative and absolute database file paths are supported.

      * *

    2. Relative database file paths can be specified in a platform independent * manner as: '[dir1/dir2/.../dirn/]<file-name-prefix>'.

      * *

    3. Specification of absolute file paths is operating-system specific.
      * Please read your OS file system documentation.

      * *

    4. Specification of network mounts may be operating-system specific.
      * Please read your OS file system documentation.

      * *

    5. Special care may be needed w.r.t. file path specifications * containing whitespace, mixed-case, special characters and/or * reserved file names.
      * Please read your OS file system documentation.

      *

    * * Note: Versions of HSQLDB previous to 1.7.0 did not support creating * directories along the file path specified in the persistent, in-process mode * database connection <url> form, in the case that they did * not already exist. Starting with HSQLDB 1.7.0, directories will * be created if they do not already exist., but only if HSQLDB is built under * a version of the compiler greater than JDK 1.1.x.

    * * res: Connections

    * * The new 'jdbc:hsqldb:res:<path>' database connection * <url> has different semantics than the * 'jdbc:hsqldb:file:<path>' form. The semantics are similar to * those of a 'files_readonly' database, but with some additional * points to consider.

    * * Specifically, the '<path>' component of a res: type * database connection <url> is used to obtain resource URL * objects and thereby read the database files as resources on the class path. * Moreover, the URL objects must point only to resources contained * in one or more jars on the class path (must be jar protocol).

    * * This restriction is enforced to avoid the unfortunate situation in which, * because res: database instances do not create a <path>.lck file * (they are strictly files-read-only) and because the <path> * components of res: and file: database URIs are not checked * for file system equivalence, it is possible for the same database files to * be accessed concurrently by both file: and res: database * instances. That is, without this restriction, it is possible that * <path>.data and <path>.properties file content may be written * by a file: database instance without the knowlege or cooperation * of a res: database instance open on the same files, potentially * resulting in unexpected database errors, inconsistent operation * and/or data corruption.

    * * In short, a res: type database connection <url> is * designed specifically to connect to a 'files_in_jar' mode database * instance, which in turn is designed specifically to operate under * Java WebStartTM and * Java AppletTMconfigurations, * where co-locating the database files in the jars that make up the * WebStart application or Applet avoids the need for special security * configuration or code signing.

    * * Note: Since it is difficult and often nearly impossible to determine * or control at runtime from where all classes are being loaded or which class * loader is doing the loading under 'files_in_jar' semantics, the * <path> component of the res: database connection * <url> is always taken to be relative to the default package. * That is, if the <path> component does not start with '/', then * '/' is prepended when obtaining the resource URLs used to read the database * files.

    * *


    * * For more information about HSQLDB file structure, various database modes * and other attributes such as those controlled through the HSQLDB properties * files, please read the general documentation, especially the Advanced Users * Guide.

    * *


    * * JRE 1.1.x Notes:

    * * In general, JDBC 2 support requires Java 1.2 and above, and JDBC3 requires * Java 1.4 and above. In HSQLDB, support for methods introduced in different * versions of JDBC depends on the JDK version used for compiling and building * HSQLDB.

    * * Since 1.7.0, it is possible to build the product so that * all JDBC 2 methods can be called while executing under the version 1.1.x * Java Runtime EnvironmentTM. * However, in addition to this technique requiring explicit casts to the * org.hsqldb.jdbcXXX classes, some of the method calls also require * int values that are defined only in the JDBC 2 or greater * version of * * ResultSet interface. For this reason, when the * product is compiled under JDK 1.1.x, these values are defined * in {@link org.hsqldb.jdbc.jdbcResultSet jdbcResultSet}.

    * * In a JRE 1.1.x environment, calling JDBC 2 methods that take or return the * JDBC2-only ResultSet values can be achieved by referring * to them in parameter specifications and return value comparisons, * respectively, as follows:

    * *

     * jdbcResultSet.FETCH_FORWARD
     * jdbcResultSet.TYPE_FORWARD_ONLY
     * jdbcResultSet.TYPE_SCROLL_INSENSITIVE
     * jdbcResultSet.CONCUR_READ_ONLY
     * // etc.
     * 
    * * However, please note that code written to use HSQLDB JDBC 2 features under * JDK 1.1.x will not be compatible for use with other JDBC 2 drivers. Please * also note that this feature is offered solely as a convenience to developers * who must work under JDK 1.1.x due to operating constraints, yet wish to * use some of the more advanced features available under the JDBC 2 * specification.

    * *


    * * (fredt@users)
    * (boucherb@users)

    * *

    * @author boucherb@users * @author fredt@users * @version 1.7.2 * @see org.hsqldb.jdbcDriver * @see jdbcStatement * @see jdbcPreparedStatement * @see jdbcCallableStatement * @see jdbcResultSet * @see jdbcDatabaseMetaData */ public class jdbcConnection implements Connection { // ---------------------------- Common Attributes -------------------------- /** * Properties for the connection * */ HsqlProperties connProperties; /** * This connection's interface to the corresponding Session * object in the database engine. */ SessionInterface sessionProxy; /** * Is this an internal connection? */ boolean isInternal; /** Is this connection to a network server instance. */ protected boolean isNetConn; /** * Is this connection closed? */ boolean isClosed; /** The first warning in the chain. Null if there are no warnings. */ private SQLWarning rootWarning; /** Synchronizes concurrent modification of the warning chain */ private Object rootWarning_mutex = new Object(); /** * The set of open Statement objects returned by this Connection from * calls to createStatement, prepareCall and prepareStatement. This is * used solely for closing the statements when this Connection is closed. */ /* private org.hsqldb.lib.HashSet statementSet = new org.hsqldb.lib.HashSet(); */ // ----------------------------------- JDBC 1 ------------------------------- /** * * Creates a Statement * object for sending SQL statements to the database. SQL * statements without parameters are normally executed using * Statement objects. If the same SQL statement is * executed many times, it may be more efficient to use a * PreparedStatement object.

    * * Result sets created using the returned Statement * object will by default be type TYPE_FORWARD_ONLY * and have a concurrency level of CONCUR_READ_ONLY.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Starting with HSQLDB 1.7.2, support for precompilation at the engine level * has been implemented, so it is now much more efficient and performant * to use a PreparedStatement object if the same SQL statement * is executed many times.

    * * Up to 1.6.1, HSQLDB supported TYPE_FORWARD_ONLY - * CONCUR_READ_ONLY results only, so ResultSet * objects created using the returned Statement * object would always be type TYPE_FORWARD_ONLY * with CONCUR_READ_ONLY concurrency.

    * * Starting with 1.7.0, HSQLDB also supports * TYPE_SCROLL_INSENSITIVE results.

    * * Notes:

    * * Up to 1.6.1, calling this method returned null if the * connection was already closed. This was possibly counter-intuitive * to the expectation that an exception would be thrown for * closed connections. Starting with 1.7.0. the behaviour is to throw a * SQLException if the connection is closed.

    * *

    * * @return a new default Statement object * @throws SQLException if a database access error occurs

    * @see #createStatement(int,int) * @see #createStatement(int,int,int) */ public synchronized Statement createStatement() throws SQLException { checkClosed(); Statement stmt = new jdbcStatement(this, jdbcResultSet.TYPE_FORWARD_ONLY); return stmt; } /** * * Creates a PreparedStatement * object for sending parameterized SQL statements to the * database.

    * * A SQL statement with or without IN parameters can be * pre-compiled and stored in a PreparedStatement * object. This object can then be used to efficiently execute * this statement multiple times.

    * * Note: This method is optimized for handling parametric * SQL statements that benefit from precompilation. If the driver * supports precompilation, the method prepareStatement * will send the statement to the database for precompilation. * Some drivers may not support precompilation. In this case, the * statement may not be sent to the database until the * PreparedStatement object is executed. This has no * direct effect on users; however, it does affect which methods * throw certain SQLException objects.

    * * Result sets created using the returned PreparedStatement * object will by default be type TYPE_FORWARD_ONLY * and have a concurrency level of CONCUR_READ_ONLY.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Starting with HSQLDB 1.7.2, support for precompilation at the engine level * has been implemented, so it is now much more efficient and performant * to use a PreparedStatement object if the same SQL statement * is executed many times.

    * * Starting with 1.7.2, the support for and behaviour of * PreparedStatment has changed. Please read the introductory section * of the documentation for org.hsqldb.jdbc.jdbcPreparedStatement.

    * *

    * * @param sql an SQL statement that may contain one or more '?' * IN parameter placeholders * @return a new default PreparedStatement object * containing the pre-compiled SQL statement * @exception SQLException if a database access error occurs

    * @see #prepareStatement(String,int,int) */ public synchronized PreparedStatement prepareStatement(String sql) throws SQLException { PreparedStatement stmt; checkClosed(); try { stmt = new jdbcPreparedStatement(this, sql, jdbcResultSet.TYPE_FORWARD_ONLY); return stmt; } catch (HsqlException e) { throw Util.sqlException(e); } } /** * * Creates a CallableStatement * object for calling database stored procedures. The * CallableStatement object provides methods for setting up * its IN and OUT parameters, and methods for executing the call to a * stored procedure.

    * * Note: This method is optimized for handling stored * procedure call statements. Some drivers may send the call * statement to the database when the method prepareCall * is done; others may wait until the CallableStatement * object is executed. This has no direct effect on users; * however, it does affect which method throws certain * SQLExceptions.

    * * Result sets created using the returned CallableStatement * object will by default be type TYPE_FORWARD_ONLY * and have a concurrency level of CONCUR_READ_ONLY.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Starting with 1.7.2, the support for and behaviour of * CallableStatement has changed. Please read the introductory section * of the documentation for org.hsqldb.jdbc.jdbcCallableStatement. * *

    * * @param sql a String object that is the SQL statement to be * sent to the database; may contain one or more ? * parameters.

    * * Note: Typically the SQL statement is a JDBC * function call escape string. * @return a new default CallableStatement object * containing the pre-compiled SQL statement * @exception SQLException if a database access error occurs

    * @see #prepareCall(String,int,int) */ public synchronized CallableStatement prepareCall(String sql) throws SQLException { CallableStatement stmt; checkClosed(); try { stmt = new jdbcCallableStatement(this, sql, jdbcResultSet.TYPE_FORWARD_ONLY); return stmt; } catch (HsqlException e) { throw Util.sqlException(e); } } /** * * Converts the given SQL statement * into the system's native SQL grammar. A driver may convert the * JDBC SQL grammar into its system's native SQL grammar prior to * sending it. This method returns the native form of the * statement that the driver would have sent.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Up to and including 1.7.2, HSQLDB converts the JDBC SQL * grammar into the system's native SQL grammar prior to sending * it, if escape processing is set true; this method returns the * native form of the statement that the driver would send in place * of client-specified JDBC SQL grammar.

    * * Before 1.7.2, escape processing was incomplete and * also broken in terms of support for nested escapes.

    * * Starting with 1.7.2, escape processing is complete and handles nesting * to arbitrary depth, but enforces a very strict interpretation of the * syntax and does not detect or process SQL comments.

    * * In essence, the HSQLDB engine directly handles the prescribed syntax * and date / time formats specified internal to the JDBC escapes. * It also directly offers the XOpen / ODBC extended scalar * functions specified available internal to the {fn ...} JDBC escape. * As such, the driver simply removes the curly braces and JDBC escape * codes in the simplest and fastest fashion possible, by replacing them * with whitespace. * * But to avoid a great deal of complexity, certain forms of input * whitespace are currently not recognised. For instance, * the driver handles "{?= call ...}" but not "{ ?= call ...} or * "{? = call ...}"

    * * Also, comments embedded in SQL are currently not detected or * processed and thus may have unexpected effects on the output * of this method, for instance causing otherwise valid SQL to become * invalid. It is especially important to be aware of this because escape * processing is set true by default for Statement objects and is always * set true when producing a PreparedStatement from prepareStatement() * or CallableStatement from prepareCall(). Currently, it is simply * recommended to avoid submitting SQL having comments containing JDBC * escape sequence patterns and/or single or double quotation marks, * as this will avoid any potential problems. * * It is intended to implement a less strict handling of whitespace and * proper processing of SQL comments at some point in the near future, * perhaps before the final 1.7.2 release. * * In any event, 1.7.2 now correctly processes the following JDBC escape * forms to arbitrary nesting depth, but only if the exact whitespace * layout described below is used:

    * *

      *
    1. {call ...} *
    2. {?= call ...} *
    3. {fn ...} *
    4. {oj ...} *
    5. {d ...} *
    6. {t ...} *
    7. {ts ...} *

    * *

    * * @param sql a SQL statement that may contain one or more '?' * parameter placeholders * @return the native form of this statement * @throws SQLException if a database access error occurs

    */ public synchronized String nativeSQL(final String sql) throws SQLException { // boucherb@users 20030405 // FIXME: does not work properly for nested escapes // e.g. {call ...(...,{ts '...'},....)} does not work // boucherb@users 20030817 // TESTME: First kick at the FIXME cat done. Now lots of testing // and refinment checkClosed(); // CHECKME: Thow or return null if input is null? if (sql == null || sql.length() == 0 || sql.indexOf('{') == -1) { return sql; } // boolean changed = false; int state = 0; int len = sql.length(); int nest = 0; StringBuffer sb = new StringBuffer(sql.length()); //avoid 16 extra String msg; //-- final int outside_all = 0; final int outside_escape_inside_single_quotes = 1; final int outside_escape_inside_double_quotes = 2; //-- final int inside_escape = 3; final int inside_escape_inside_single_quotes = 4; final int inside_escape_inside_double_quotes = 5; // TODO: // final int inside_single_line_comment = 6; // final int inside_multi_line_comment = 7; // Better than old way for large inputs and for avoiding GC overhead; // toString() reuses internal char[], reducing memory requirment // and garbage items 3:2 sb.append(sql); for (int i = 0; i < len; i++) { char c = sb.charAt(i); switch (state) { case outside_all : // Not inside an escape or quotes if (c == '\'') { state = outside_escape_inside_single_quotes; } else if (c == '"') { state = outside_escape_inside_double_quotes; } else if (c == '{') { i = onStartEscapeSequence(sql, sb, i); // changed = true; nest++; state = inside_escape; } break; case outside_escape_inside_single_quotes : // inside ' ' only case inside_escape_inside_single_quotes : // inside { } and ' ' if (c == '\'') { state -= 1; } break; case outside_escape_inside_double_quotes : // inside " " only case inside_escape_inside_double_quotes : // inside { } and " " if (c == '"') { state -= 2; } break; case inside_escape : // inside { } if (c == '\'') { state = inside_escape_inside_single_quotes; } else if (c == '"') { state = inside_escape_inside_double_quotes; } else if (c == '}') { sb.setCharAt(i, ' '); // changed = true; nest--; state = (nest == 0) ? outside_all : inside_escape; } else if (c == '{') { i = onStartEscapeSequence(sql, sb, i); // changed = true; nest++; state = inside_escape; } } } return sb.toString(); } /** * * Sets this connection's auto-commit mode to the given state. * If a connection is in auto-commit mode, then all its SQL * statements will be executed and committed as individual transactions. * Otherwise, its SQL statements are grouped into transactions that * are terminated by a call to either the method commit or * the method rollback. By default, new connections are * in auto-commit mode.

    * * The commit occurs when the statement completes or the next * execute occurs, whichever comes first. In the case of * statements returning a ResultSet object, the * statement completes when the last row of the ResultSet * object has been retrieved or the ResultSet object * has been closed. In advanced cases, a single statement may * return multiple results as well as output parameter values. In * these cases, the commit occurs when all results and output * parameter values have been retrieved.

    * * NOTE: If this method is called during a transaction, * the transaction is committed.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Up to and including HSQLDB 1.7.2,

    * *

      *
    1. All rows of a result set are retrieved internally * before the first row can actually be fetched.
      * Therefore, a statement can be considered complete as soon as * any XXXStatement.executeXXX method returns.
    2. * *
    3. Multiple result sets and output parameters are not yet * supported.
    4. *
    *

    * * (boucherb@users)

    * * @param autoCommit true to enable auto-commit * mode; false to disable it * @exception SQLException if a database access error occurs * @see #getAutoCommit */ public synchronized void setAutoCommit(boolean autoCommit) throws SQLException { checkClosed(); try { sessionProxy.setAutoCommit(autoCommit); } catch (HsqlException e) { throw Util.sqlException(e); } } /** * Gets the current auto-commit state. * * @return the current state of auto-commit mode * @exception SQLException Description of the Exception * @see #setAutoCommit */ public synchronized boolean getAutoCommit() throws SQLException { checkClosed(); try { return sessionProxy.isAutoCommit(); } catch (HsqlException e) { throw Util.sqlException(e); } } /** * * Makes all changes made since the * previous commit/rollback permanent and releases any database * locks currently held by the Connection. This method should be * used only when auto-commit mode has been disabled.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Starting with HSQLDB 1.7.2, savepoints are supported both * in SQL and via the JDBC interface.

    * * Using SQL, savepoints may be set, released and used in rollback * as follows: * *

         * SAVEPOINT <savepoint-name>
         * RELEASE SAVEPOINT <savepoint-name>
         * ROLLBACK TO SAVEPOINT <savepoint-name>
         * 
    * *
    * * @exception SQLException if a database access error occurs * @see #setAutoCommit */ public synchronized void commit() throws SQLException { checkClosed(); try { sessionProxy.commit(); } catch (HsqlException e) { throw Util.sqlException(e); } } /** * * Drops all changes made since the * previous commit/rollback and releases any database locks * currently held by this Connection. This method should be used * only when auto- commit has been disabled.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Starting with HSQLDB 1.7.2, savepoints are fully supported both * in SQL and via the JDBC interface.

    * * Using SQL, savepoints may be set, released and used in rollback * as follows: * *

         * SAVEPOINT <savepoint-name>
         * RELEASE SAVEPOINT <savepoint-name>
         * ROLLBACK TO SAVEPOINT <savepoint-name>
         * 
    * *
    * * @exception SQLException if a database access error occurs * @see #setAutoCommit */ public synchronized void rollback() throws SQLException { checkClosed(); try { sessionProxy.rollback(); } catch (HsqlException e) { throw Util.sqlException(e); } } /** * * Releases this Connection * object's database and JDBC resources immediately instead of * waiting for them to be automatically released.

    * * Calling the method close on a Connection * object that is already closed is a no-op.

    * * Note: A Connection object is automatically * closed when it is garbage collected. Certain fatal errors also * close a Connection object.

    * * * *

    *

    HSQLDB-Specific Information:

    * * In 1.7.2, INTERNAL Connection * objects are not closable from JDBC client code.

    * *

    * * @exception SQLException if a database access error occurs */ public synchronized void close() throws SQLException { // Changed to synchronized above because // we would not want a sessionProxy.close() // operation to occur concurrently with a // statementXXX.executeXXX operation. if (isInternal || isClosed) { return; } isClosed = true; if (sessionProxy != null) { sessionProxy.close(); } sessionProxy = null; rootWarning = null; connProperties = null; } /** * Tests to see if a Connection is closed. * * @return true if the connection is closed; false if it's still * open */ public synchronized boolean isClosed() { return isClosed; } /** * * Gets the metadata regarding this connection's database. * A Connection's database is able to provide information describing * its tables, its supported SQL grammar, its stored procedures, * the capabilities of this connection, and so on. This information * is made available through a DatabaseMetaData object.

    * * * *

    *

    HSQLDB-Specific Information:

    * * JDBC DatabaseMetaData methods returning * ResultSet were not implemented fully before 1.7.2. * Some of these methods always returned empty result sets. * Other methods did not accurately * reflect all of the MetaData for the category. * Also, some method ignored the filters provided as * parameters, returning an unfiltered result each time.

    * * Also, the majority of methods returning ResultSet * threw an SQLException when accessed by a non-admin * user. *


    * * Starting with HSQLDB 1.7.2, essentially full database metadata * is supported.

    * * For discussion in greater detail, please follow the link to the * overview for jdbcDatabaseMetaData, below. * *

    * * @return a DatabaseMetaData object for this Connection * @throws SQLException if a database access error occurs * @see jdbcDatabaseMetaData */ public synchronized DatabaseMetaData getMetaData() throws SQLException { checkClosed(); return new jdbcDatabaseMetaData(this); } /** * * Puts this connection in read-only mode as a hint to enable * database optimizations.

    * * Note: This method should not be called while in the * middle of a transaction.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Up to and including 1.7.2, HSQLDB will commit the current * transaction automatically when this method is called.

    * * Additionally, HSQLDB provides a way to put a whole database in * read-only mode. This is done by manually adding the line * 'readonly=true' to the database's .properties file while the * database is offline. Upon restart, all connections will be * readonly, since the entire database will be readonly. To take * a database out of readonly mode, simply take the database * offline and remove the line 'readonly=true' from the * database's .properties file. Upon restart, the database will * be in regular (read-write) mode.

    * * When a database is put in readonly mode, its files are opened * in readonly mode, making it possible to create CD-based * readonly databases. To create a CD-based readonly database * that has CACHED tables and whose .data file is suspected of * being highly fragmented, it is recommended that the database * first be SHUTDOWN COMPACTed before copying the database * files to CD. This will reduce the space required and may * improve access times against the .data file which holds the * CACHED table data.

    * * Starting with 1.7.2, an alternate approach to opimizing the * .data file before creating a CD-based readonly database is to issue * the CHECKPOINT DEFRAG command followed by SHUTDOWN to take the * database offline in preparation to burn the database files to CD.

    * *

    * * @param readonly The new readOnly value * @exception SQLException if a database access error occurs */ public synchronized void setReadOnly(boolean readonly) throws SQLException { checkClosed(); try { sessionProxy.setReadOnly(readonly); } catch (HsqlException e) { throw Util.sqlException(e); } } /** * Tests to see if the connection is in read-only mode. * * @return true if connection is read-only and false otherwise * @exception SQLException if a database access error occurs */ public synchronized boolean isReadOnly() throws SQLException { try { return sessionProxy.isReadOnly(); } catch (HsqlException e) { throw Util.sqlException(e); } } /** * * Sets a catalog name in order to * select a subspace of this Connection's database in which to * work.

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB does not yet support catalogs and simply ignores this * request.

    *

    * * * @param catalog the name of a catalog (subspace in this * Connection object's database) in which to work (Ignored) * @throws SQLException if a database access error occurs

    */ public synchronized void setCatalog(String catalog) throws SQLException { checkClosed(); } /** * * Returns the Connection's current catalog name.

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB does not yet support catalogs and always returns null. *

    * *

    * * @return the current catalog name or null

    * * For HSQLDB, this is always null. * @exception SQLException Description of the Exception */ public synchronized String getCatalog() throws SQLException { checkClosed(); return null; } /** * * Attempts to change the transaction isolation level for this * Connection object to the one given. The constants * defined in the interface Connection are the * possible transaction isolation levels.

    * * Note: If this method is called during a transaction, * the result is implementation-defined.

    * * * *

    *
    * * @param level one of the following Connection * constants: Connection.TRANSACTION_READ_UNCOMMITTED * , Connection.TRANSACTION_READ_COMMITTED, * Connection.TRANSACTION_REPEATABLE_READ, or * Connection.TRANSACTION_SERIALIZABLE. (Note * that Connection.TRANSACTION_NONE cannot be * used because it specifies that transactions are not * supported.) * @exception SQLException if a database access error occurs or * the given parameter is not one of the Connection * constants

    * @see jdbcDatabaseMetaData#supportsTransactionIsolationLevel * @see #getTransactionIsolation */ public synchronized void setTransactionIsolation(int level) throws SQLException { checkClosed(); switch (level) { case TRANSACTION_READ_UNCOMMITTED : case TRANSACTION_READ_COMMITTED : case TRANSACTION_REPEATABLE_READ : case TRANSACTION_SERIALIZABLE : break; default : throw Util.invalidArgument(); } try { sessionProxy.setIsolation(level); } catch (HsqlException e) { throw Util.sqlException(e); } } /** * * Retrieves this Connection * object's current transaction isolation level.

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB always returns * Connection.TRANSACTION_READ_UNCOMMITED.

    * *

    * * @return the current transaction isolation level, which will be * one of the following constants: * Connection.TRANSACTION_READ_UNCOMMITTED * , Connection.TRANSACTION_READ_COMMITTED, * Connection.TRANSACTION_REPEATABLE_READ, * Connection.TRANSACTION_SERIALIZABLE, or * Connection.TRANSACTION_NONE

    * * Up to and including 1.7.1, TRANSACTION_READ_UNCOMMITTED is * always returned * @exception SQLException if a database access error occurs

    * @see jdbcDatabaseMetaData#supportsTransactionIsolationLevel * @see #setTransactionIsolation setTransactionIsolation */ public synchronized int getTransactionIsolation() throws SQLException { checkClosed(); try { return sessionProxy.getIsolation(); } catch (HsqlException e) { throw Util.sqlException(e); } } /** * * Retrieves the first warning reported by calls on this * Connection object. If there is more than one * warning, subsequent warnings will be chained to the first * one and can be retrieved by calling the method * SQLWarning.getNextWarning on the warning * that was retrieved previously.

    * * This method may not be called on a closed connection; doing so * will cause an SQLException to be thrown.

    * * Note: Subsequent warnings will be chained to this * SQLWarning.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Starting with 1.7.2, HSQLDB produces warnings whenever a createStatement(), * prepareStatement() or prepareCall() invocation requests an unsupported * but defined combination of result set type, concurrency and holdability, * such that another set is substituted. * *

    * @return the first SQLWarning object or null * if there are none

    * @exception SQLException if a database access error occurs or * this method is called on a closed connection

    * @see SQLWarning */ public synchronized SQLWarning getWarnings() throws SQLException { checkClosed(); synchronized (rootWarning_mutex) { if (!isNetConn) { HsqlException[] warnings = ((Session) sessionProxy).getAndClearWarnings(); for (int i = 0; i < warnings.length; i++) { SQLWarning warning = Util.sqlWarning(warnings[i]); addWarning(warning); } // get session warnings and clear the session warnings // translate to SQLWarning objects and add to the Connection chain } return rootWarning; } } /** * * Clears all warnings reported for this Connection * object. After a call to this method, the method * getWarnings returns null until * a new warning is reported for this Connection.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Before HSQLDB 1.7.2, SQLWarning was not * supported, and calls to this method are simply ignored.

    * * Starting with HSQLDB 1.7.2, the standard behaviour is implemented.

    * *

    * * @exception SQLException if a database access error occurs

    */ public synchronized void clearWarnings() throws SQLException { checkClosed(); synchronized (rootWarning_mutex) { rootWarning = null; } } //--------------------------JDBC 2.0----------------------------- /** * * Creates a Statement object that will generate * ResultSet objects with the given type and * concurrency. This method is the same as the * createStatement method above, but it allows the * default result set type and result set concurrency type to be * overridden.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Up to HSQLDB 1.6.1, support was provided only for type * TYPE_FORWARD_ONLY * and concurrency CONCUR_READ_ONLY.

    * * Starting with HSQLDB 1.7.0, support is now provided for types * TYPE_FORWARD_ONLY, and * TYPE_SCROLL_INSENSITIVE, * with concurrency CONCUR_READ_ONLY. * * Starting with HSQLDB 1.7.2, the behaviour regarding the type and * concurrency values has changed to more closely conform to the * specification. That is, if an unsupported combination is requested, * a SQLWarning is issued on this Connection and the closest supported * combination is used instead.

    * * Notes:

    * * Up to 1.6.1, calling this method returned null if the * connection was already closed and a supported combination of type and * concurrency was specified. This was possibly counter-intuitive * to the expectation that an exception would be thrown for * closed connections. Starting with 1.7.0. the behaviour is to throw a * SQLException if the connection is closed.

    * *

    * * @param type a result set type; one of * ResultSet.TYPE_FORWARD_ONLY, * ResultSet.TYPE_SCROLL_INSENSITIVE, or * ResultSet.TYPE_SCROLL_SENSITIVE (not * supported) * @param concurrency a concurrency type; one of * ResultSet.CONCUR_READ_ONLY * or ResultSet.CONCUR_UPDATABLE (not supported) * @return a new Statement object that will, within * the release-specific documented limitations of support, * generate ResultSet objects with the given * type and concurrency * @exception SQLException if a database access error occurs or * the given parameters are not ResultSet constants * indicating a supported type and concurrency * @since JDK 1.2 (JDK 1.1.x developers: read the new overview * for jdbcConnection) */ public synchronized Statement createStatement(int type, int concurrency) throws SQLException { checkClosed(); type = xlateRSType(type); concurrency = xlateRSConcurrency(concurrency); return new jdbcStatement(this, type); } /** * * Creates a PreparedStatement object that will * generate ResultSet objects with the given type * and concurrency. This method is the same as the * prepareStatement method above, but it allows the * default result set type and result set concurrency type to be * overridden.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Starting with HSQLDB 1.7.2, the behaviour regarding the type and * concurrency values has changed to more closely conform to the * specification. That is, if an unsupported combination is requested, * a SQLWarning is issued on this Connection and the closest supported * combination is used instead.

    * * Also starting with 1.7.2, the support for and behaviour of * PreparedStatment has changed. Please read the introductory section * of the documentation for org.hsqldb.jdbc.jdbcPreparedStatement. * *

    * * @param sql a String object that is the SQL statement to be * sent to the database; may contain one or more ? IN * parameters * @param type a result set type; one of * ResultSet.TYPE_FORWARD_ONLY, * ResultSet.TYPE_SCROLL_INSENSITIVE, or * ResultSet.TYPE_SCROLL_SENSITIVE (not * supported) * @param concurrency a concurrency type; one of * ResultSet.CONCUR_READ_ONLY * or ResultSet.CONCUR_UPDATABLE (not supported) * @return a new PreparedStatement object containing the * pre-compiled SQL statement that will produce * ResultSet * objects with the given type and concurrency * @exception SQLException if a database access error occurs or * the given parameters are not ResultSet constants * indicating a supported type and concurrency * @since JDK 1.2 (JDK 1.1.x developers: read the new overview * for jdbcConnection) */ public synchronized PreparedStatement prepareStatement(String sql, int type, int concurrency) throws SQLException { checkClosed(); type = xlateRSType(type); concurrency = xlateRSConcurrency(concurrency); try { return new jdbcPreparedStatement(this, sql, type); } catch (HsqlException e) { throw Util.sqlException(e); } } /** * * Creates a CallableStatement * object that will generate ResultSet objects with * the given type and concurrency. This method is the same as the * prepareCall method above, but it allows the * default result set type and result set concurrency type to be * overridden.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Starting with HSQLDB 1.7.2, the behaviour regarding the type, * concurrency and holdability values has changed to more closely * conform to the specification. That is, if an unsupported * combination is requrested, a SQLWarning is issued on this Connection * and the closest supported combination is used instead.

    * * Also starting with 1.7.2, the support for and behaviour of * CallableStatement has changed. Please read the introdutory section * of the documentation for org.hsqldb.jdbc.jdbcCallableStatement. * *

    * * @param sql a String object that is the SQL statement to be * sent to the database; may contain one or more ? parameters * @param resultSetType a result set type; one of * ResultSet.TYPE_FORWARD_ONLY, * ResultSet.TYPE_SCROLL_INSENSITIVE, (not * supported) or ResultSet.TYPE_SCROLL_SENSITIVE * (not supported) * @param resultSetConcurrency a concurrency type; one of * ResultSet.CONCUR_READ_ONLY * or ResultSet.CONCUR_UPDATABLE (not supported) * @return a new CallableStatement object containing the * pre-compiled SQL statement * @exception SQLException if a database access error occurs or * the given parameters are not ResultSet * constants indicating a supported type and concurrency * @since JDK 1.2 (JDK 1.1.x developers: read the new overview * for jdbcConnection) */ public synchronized CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency) throws SQLException { checkClosed(); resultSetType = xlateRSType(resultSetType); resultSetConcurrency = xlateRSConcurrency(resultSetConcurrency); try { return new jdbcCallableStatement(this, sql, resultSetType); } catch (HsqlException e) { throw Util.sqlException(e); } } /** * * Gets the type map object associated with this connection. Unless * the application has added an entry to the type map, the map * returned will be empty.

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.2 does not support this feature. Calling this * method always throws a SQLException, stating that the * function is not supported.

    * *

    * * @return the java.util.Map object associated with * this Connection object * @exception SQLException if a database access error occurs * (always, up to HSQLDB 1.7.0, inclusive) * @since JDK 1.2 (JDK 1.1.x developers: read the new overview * for jdbcConnection) */ //#ifdef JAVA2 public synchronized Map getTypeMap() throws SQLException { checkClosed(); throw Util.notSupported(); } //#endif JAVA2 /** * * Installs the given TypeMap * object as the type map for this Connection * object. The type map will be used for the custom mapping of * SQL structured types and distinct types.

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.2 does not support this feature. Calling this * method always throws a SQLException, stating that * the function is not supported.

    * *

    * * @param map the java.util.Map object to install as * the replacement for this Connection object's * default type map * @exception SQLException if a database access error occurs or * the given parameter is not a java.util.Map * object (always, up to HSQLDB 1.7.0, inclusive) * @since JDK 1.2 (JDK 1.1.x developers: read the new overview * for jdbcConnection) * @see #getTypeMap */ //#ifdef JAVA2 public synchronized void setTypeMap(Map map) throws SQLException { checkClosed(); throw Util.notSupported(); } //#endif JAVA2 // boucherb@users 20020409 - javadocs for all JDBC 3 methods // boucherb@users 20020509 - todo // start adding implementations where it is easy: Savepoints //--------------------------JDBC 3.0----------------------------- /** * * Changes the holdability of * ResultSet objects created using this * Connection object to the given holdability.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Starting with HSQLDB 1.7.2, this feature is supported.

    * * As of 1.7.2, only HOLD_CURSORS_OVER_COMMIT is supported; supplying * any other value will throw an exception.

    * *

    * * @param holdability a ResultSet holdability * constant; one of ResultSet.HOLD_CURSORS_OVER_COMMIT * or ResultSet.CLOSE_CURSORS_AT_COMMIT * @throws SQLException if a database access occurs, the given * parameter is not a ResultSet constant * indicating holdability, or the given holdability is not * supported * @see #getHoldability * @see ResultSet * @since JDK 1.4, HSQLDB 1.7.2 */ //#ifdef JAVA4 public synchronized void setHoldability(int holdability) throws SQLException { checkClosed(); switch (holdability) { case jdbcResultSet.HOLD_CURSORS_OVER_COMMIT : break; case jdbcResultSet.CLOSE_CURSORS_AT_COMMIT : String msg = "ResultSet holdability: " + holdability; //NOI18N throw Util.sqlException(Trace.FUNCTION_NOT_SUPPORTED, msg); default : throw Util.invalidArgument(); } } //#endif JAVA4 /** * * Retrieves the current * holdability of ResultSet objects created using * this Connection object.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Starting with HSQLDB 1.7.2, this feature is supported.

    * * Calling this method always returns HOLD_CURSORS_OVER_COMMIT.

    * *

    * * @return the holdability, one of * ResultSet.HOLD_CURSORS_OVER_COMMIT * or ResultSet.CLOSE_CURSORS_AT_COMMIT * @throws SQLException if a database access occurs * @see #setHoldability * @see ResultSet * @since JDK 1.4, HSQLDB 1.7.2 */ //#ifdef JAVA4 public synchronized int getHoldability() throws SQLException { checkClosed(); return jdbcResultSet.HOLD_CURSORS_OVER_COMMIT; } //#endif JAVA4 /** * * Creates an unnamed savepoint in * the current transaction and returns the new Savepoint * object that represents it.

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.2 does not support this feature.

    * * Calling this method always throws a SQLException, * stating that the function is not supported.

    * * Use setSavepoint(String name) instead

    * *

    * * @return the new Savepoint object * @exception SQLException if a database access error occurs or * this Connection object is currently in * auto-commit mode * @see jdbcSavepoint * @see java.sql.Savepoint * @since JDK 1.4, HSQLDB 1.7.2 */ //#ifdef JAVA4 public synchronized Savepoint setSavepoint() throws SQLException { checkClosed(); throw Util.notSupported(); } //#endif JAVA4 /** * * Creates a savepoint with the * given name in the current transaction and returns the new * Savepoint object that represents it.

    * * * * @param name a String containing the name of the savepoint * @return the new Savepoint object * @exception SQLException if a database access error occurs or * this Connection object is currently in * auto-commit mode * * @see jdbcSavepoint * @see java.sql.Savepoint * @since JDK 1.4, HSQLDB 1.7.2 */ //#ifdef JAVA4 public synchronized Savepoint setSavepoint(String name) throws SQLException { Result req; checkClosed(); if (name == null) { String msg = "name is null"; throw Util.sqlException(Trace.INVALID_JDBC_ARGUMENT, msg); } req = Result.newSetSavepointRequest(name); try { sessionProxy.execute(req); } catch (HsqlException e) { Util.throwError(e); } return new jdbcSavepoint(name, this); } //#endif JAVA4 /** * * Undoes all changes made after * the given Savepoint object was set.

    * * This method should be used only when auto-commit has been * disabled.

    * * * * @param savepoint the Savepoint object to roll back to * @exception SQLException if a database access error occurs, * the Savepoint object is no longer valid, * or this Connection object is currently in * auto-commit mode * @see jdbcSavepoint * @see java.sql.Savepoint * @see #rollback * @since JDK 1.4, HSQLDB 1.7.2 */ //#ifdef JAVA4 public synchronized void rollback(Savepoint savepoint) throws SQLException { String msg; jdbcSavepoint sp; Result req; checkClosed(); if (savepoint == null) { msg = "savepoint is null"; throw Util.sqlException(Trace.INVALID_JDBC_ARGUMENT, msg); } try { if (sessionProxy.isAutoCommit()) { msg = "connection is autocommit"; throw Util.sqlException(Trace.INVALID_JDBC_ARGUMENT, msg); } } catch (HsqlException e) { throw Util.sqlException(e); } // fredt - might someone call this with a Savepoint from a different driver??? if (!(savepoint instanceof jdbcSavepoint)) { throw Util.sqlException(Trace.INVALID_JDBC_ARGUMENT); } sp = (jdbcSavepoint) savepoint; if (this != sp.connection) { msg = savepoint + " was not issued on this connection"; throw Util.sqlException(Trace.INVALID_JDBC_ARGUMENT, msg); } req = Result.newRollbackToSavepointRequest(sp.name); try { Result result = sessionProxy.execute(req); if (result.isError()) { Util.throwError(result); } } catch (HsqlException e) { Util.throwError(e); } } //#endif JAVA4 /** * * Removes the given Savepoint * object from the current transaction. Any reference to the * savepoint after it have been removed will cause an * SQLException to be thrown.

    * * * * @param savepoint the Savepoint object to be removed * @exception SQLException if a database access error occurs or * the given Savepoint object is not a valid * savepoint in the current transaction * * @see jdbcSavepoint * @see java.sql.Savepoint * @since JDK 1.4, HSQLDB 1.7.2 */ //#ifdef JAVA4 public synchronized void releaseSavepoint(Savepoint savepoint) throws SQLException { String msg; jdbcSavepoint sp; Result req; checkClosed(); if (savepoint == null) { msg = "savepoint is null"; throw Util.sqlException(Trace.INVALID_JDBC_ARGUMENT, msg); } // fredt - might someone call this with a Savepoint from a different driver??? if (!(savepoint instanceof jdbcSavepoint)) { throw Util.sqlException(Trace.INVALID_JDBC_ARGUMENT); } sp = (jdbcSavepoint) savepoint; if (this != sp.connection) { msg = savepoint.getSavepointName() + " was not issued on this connection"; throw Util.sqlException(Trace.INVALID_JDBC_ARGUMENT, msg); } req = Result.newReleaseSavepointRequest(sp.name); try { Result result = sessionProxy.execute(req); if (result.isError()) { Util.throwError(result); } } catch (HsqlException e) { Util.throwError(e); } } //#endif JAVA4 /** * * Creates a Statement * object that will generate ResultSet objects with * the given type, concurrency, and holdability. This method is * the same as the createStatement method above, but * it allows the default result set type, concurrency, and * holdability to be overridden.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Starting with HSQLDB 1.7.2, this feature is supported.

    * * Starting with HSQLDB 1.7.2, the behaviour regarding the type, * concurrency and holdability values has changed to more closely conform * to the specification. That is, if an unsupported combination is requested, * a SQLWarning is issued on this Connection and the closest supported * combination is used instead.

    * *

    * * @param resultSetType one of the following ResultSet * constants: ResultSet.TYPE_FORWARD_ONLY, * ResultSet.TYPE_SCROLL_INSENSITIVE, * or ResultSet.TYPE_SCROLL_SENSITIVE * @param resultSetConcurrency one of the following * ResultSet * constants: ResultSet.CONCUR_READ_ONLY or * ResultSet.CONCUR_UPDATABLE * @param resultSetHoldability one of the following * code>ResultSet * constants: ResultSet.HOLD_CURSORS_OVER_COMMIT * or ResultSet.CLOSE_CURSORS_AT_COMMIT * @return a new Statement object that will generate * ResultSet objects with the given type, * concurrency, and holdability * @exception SQLException if a database access error occurs or * the given parameters are not ResultSet * constants indicating type, concurrency, and holdability * @see ResultSet * @since JDK 1.4, HSQLDB 1.7.2 */ //#ifdef JAVA4 public synchronized Statement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException { checkClosed(); resultSetType = xlateRSType(resultSetType); resultSetConcurrency = xlateRSConcurrency(resultSetConcurrency); resultSetHoldability = xlateRSHoldability(resultSetHoldability); return new jdbcStatement(this, resultSetType); } //#endif JAVA4 /** * * Creates a PreparedStatement * object that will generate ResultSet objects with * the given type, concurrency, and holdability.

    * * This method is the same as the prepareStatement * method above, but it allows the default result set type, * concurrency, and holdability to be overridden.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Starting with HSQLDB 1.7.2, this feature is supported.

    * * Starting with HSQLDB 1.7.2, the behaviour regarding the type, * concurrency and holdability values has changed to more closely * conform to the specification. That is, if an unsupported * combination is requested, a SQLWarning is issued on this Connection * and the closest supported combination is used instead.

    * * Also starting with 1.7.2, the support for and behaviour of * PreparedStatment has changed. Please read the introductory section * of the documentation for org.hsqldb.jdbc.jdbcPreparedStatement. * *

    * * @param sql a String object that is the SQL * statement to be sent to the database; may contain one or * more ? IN parameters * @param resultSetType one of the following ResultSet * constants: ResultSet.TYPE_FORWARD_ONLY, * ResultSet.TYPE_SCROLL_INSENSITIVE, * or ResultSet.TYPE_SCROLL_SENSITIVE * @param resultSetConcurrency one of the following * ResultSet * constants: ResultSet.CONCUR_READ_ONLY or * ResultSet.CONCUR_UPDATABLE * @param resultSetHoldability one of the following * ResultSet * constants: ResultSet.HOLD_CURSORS_OVER_COMMIT * or ResultSet.CLOSE_CURSORS_AT_COMMIT * @return a new PreparedStatement object, * containing the pre-compiled SQL statement, that will * generate ResultSet objects with the given * type, concurrency, and holdability * @exception SQLException if a database access error occurs or * the given parameters are not ResultSet * constants indicating type, concurrency, and holdability * @see ResultSet * @since JDK 1.4, HSQLDB 1.7.2 */ //#ifdef JAVA4 public synchronized PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException { checkClosed(); resultSetType = xlateRSType(resultSetType); resultSetConcurrency = xlateRSConcurrency(resultSetConcurrency); resultSetHoldability = xlateRSHoldability(resultSetHoldability); try { return new jdbcPreparedStatement(this, sql, resultSetType); } catch (HsqlException e) { throw Util.sqlException(e); } } //#endif JAVA4 /** * * Creates a CallableStatement * object that will generate ResultSet objects with * the given type and concurrency. This method is the same as the * prepareCall method above, but it allows the * default result set type, result set concurrency type and * holdability to be overridden.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Starting with HSQLDB 1.7.2, this feature is supported.

    * * Starting with HSQLDB 1.7.2, the behaviour regarding the type, * concurrency and holdability values has changed to more closely * conform to the specification. That is, if an unsupported * combination is requrested, a SQLWarning is issued on this Connection * and the closest supported combination is used instead.

    * * Also starting with 1.7.2, the support for and behaviour of * CallableStatment has changed. Please read the introdutory section * of the documentation for org.hsqldb.jdbc.jdbcCallableStatement. * *

    * * @param sql a String object that is the SQL * statement to be sent to the database; may contain on or * more ? parameters * @param resultSetType one of the following ResultSet * constants: ResultSet.TYPE_FORWARD_ONLY, * ResultSet.TYPE_SCROLL_INSENSITIVE, or * ResultSet.TYPE_SCROLL_SENSITIVE * @param resultSetConcurrency one of the following * ResultSet * constants: ResultSet.CONCUR_READ_ONLY or * ResultSet.CONCUR_UPDATABLE * @param resultSetHoldability one of the following * ResultSet * constants: ResultSet.HOLD_CURSORS_OVER_COMMIT * or ResultSet.CLOSE_CURSORS_AT_COMMIT * @return a new CallableStatement object, * containing the pre-compiled SQL statement, that will * generate ResultSet objects with the given * type, concurrency, and holdability * @exception SQLException if a database access error occurs or * the given parameters are not ResultSet * constants indicating type, concurrency, and holdability * @see ResultSet * @since JDK 1.4, HSQLDB 1.7.2 */ //#ifdef JAVA4 public synchronized CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException { checkClosed(); resultSetType = xlateRSType(resultSetType); resultSetConcurrency = xlateRSConcurrency(resultSetConcurrency); resultSetHoldability = xlateRSHoldability(resultSetHoldability); try { return new jdbcCallableStatement(this, sql, resultSetType); } catch (HsqlException e) { throw Util.sqlException(e); } } //#endif JAVA4 /** * * Creates a default PreparedStatement * object that has the capability to retrieve auto-generated * keys. The given constant tells the driver whether it should * make auto-generated keys available for retrieval. This * parameter is ignored if the SQL statement is not an * INSERT statement.

    * * Note: This method is optimized for handling parametric * SQL statements that benefit from precompilation. If the driver * supports precompilation, the method prepareStatement * will send the statement to the database for precompilation. * Some drivers may not support precompilation. In this case, the * statement may not be sent to the database until the * PreparedStatement * object is executed. This has no direct effect on users; * however, it does affect which methods throw certain * SQLExceptions.

    * * Result sets created using the returned PreparedStatement * object will by default be type TYPE_FORWARD_ONLY * and have a concurrency level of CONCUR_READ_ONLY. *

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.2 does not support this feature.

    * * Calling this method always throws a SQLException, * stating that the function is not supported.

    * *

    * * @param sql an SQL statement that may contain one or more '?' * IN parameter placeholders * @param autoGeneratedKeys a flag indicating that auto-generated * keys should be returned, one of * code>Statement.RETURN_GENERATED_KEYS * or Statement.NO_GENERATED_KEYS. * @return a new PreparedStatement object, * containing the pre-compiled SQL statement, that will have * the capability of returning auto-generated keys * @exception SQLException if a database access error occurs or * the given parameter is not a Statement * constant indicating whether auto-generated keys should be * returned * @since JDK 1.4, HSQLDB 1.7.2 */ //#ifdef JAVA4 public synchronized PreparedStatement prepareStatement(String sql, int autoGeneratedKeys) throws SQLException { checkClosed(); throw Util.notSupported(); } //#endif JAVA4 /** * * Creates a default PreparedStatement * object capable of returning the auto-generated keys designated * by the given array. This array contains the indexes of the * columns in the target table that contain the auto-generated * keys that should be made available. This array is ignored if * the SQL statement is not an INSERT statement.

    * * An SQL statement with or without IN parameters can be * pre-compiled and stored in a PreparedStatement * object. This object can then be used to efficiently execute * this statement multiple times.

    * * Note: This method is optimized for handling parametric * SQL statements that benefit from precompilation. If the driver * supports precompilation, the method prepareStatement * will send the statement to the database for precompilation. * Some drivers may not support precompilation. In this case, the * statement may not be sent to the database until the * PreparedStatement * object is executed. This has no direct effect on users; * however, it does affect which methods throw certain * SQLExceptions.

    * * Result sets created using the returned PreparedStatement * object will by default be type TYPE_FORWARD_ONLY * and have a concurrency level of CONCUR_READ_ONLY. *

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.2 does not support this feature.

    * * Calling this method always throws a SQLException, * stating that the function is not supported.

    * *

    * * @param sql an SQL statement that may contain one or more '?' * IN parameter placeholders * @param columnIndexes an array of column indexes indicating the * columns that should be returned from the inserted row or * rows * @return a new PreparedStatement object, * containing the pre-compiled statement, that is capable of * returning the auto-generated keys designated by the given * array of column indexes * @exception SQLException if a database access error occurs * @since JDK 1.4, HSQLDB 1.7.2 */ //#ifdef JAVA4 public synchronized PreparedStatement prepareStatement(String sql, int[] columnIndexes) throws SQLException { checkClosed(); throw Util.notSupported(); } //#endif JAVA4 /** * * Creates a default PreparedStatement * object capable of returning the auto-generated keys designated * by the given array. This array contains the names of the * columns in the target table that contain the auto-generated * keys that should be returned. This array is ignored if the SQL * statement is not an INSERT statement.

    * * An SQL statement with or without IN parameters can be * pre-compiled and stored in a PreparedStatement * object. This object can then be used to efficiently execute * this statement multiple times.

    * * Note: This method is optimized for handling parametric * SQL statements that benefit from precompilation. If the driver * supports precompilation, the method prepareStatement * will send the statement to the database for precompilation. * Some drivers may not support precompilation. In this case, the * statement may not be sent to the database until the * PreparedStatement * object is executed. This has no direct effect on users; * however, it does affect which methods throw certain * SQLExceptions.

    * * Result sets created using the returned PreparedStatement * object will by default be type TYPE_FORWARD_ONLY * and have a concurrency level of CONCUR_READ_ONLY. *

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.2 does not support this feature.

    * * Calling this method always throws a SQLException, * stating that the function is not supported.

    * *

    * * @param sql an SQL statement that may contain one or more '?' * IN parameter placeholders * @param columnNames an array of column names indicating the * columns that should be returned from the inserted row or * rows * @return a new PreparedStatement object, * containing the pre-compiled statement, that is capable of * returning the auto-generated keys designated by the given * array of column names * @exception SQLException if a database access error occurs * @since JDK 1.4, HSQLDB 1.7.2 */ //#ifdef JAVA4 public synchronized PreparedStatement prepareStatement(String sql, String[] columnNames) throws SQLException { checkClosed(); throw Util.notSupported(); } //#endif JAVA4 //---------------------- internal implementation --------------------------- /** * Constructs a new external Connection to an HSQLDB * Database.

    * * This constructor is called on behalf of the * java.sql.DriverManager when getting a * Connection for use in normal (external) * client code.

    * * Internal client code, that being code located in HSQLDB SQL * functions and stored procedures, receives an INTERNAL * connection constructed by the {@link #jdbcConnection(Session) * jdbcConnection(Session)} constructor.

    * * @param props A Properties object containing the connection * properties * @exception SQLException when the user/password combination is * invalid, the connection url is invalid, or the * Database is unavailable.

    * * The Database may be unavailable for a number * of reasons, including network problems or the fact that it * may already be in use by another process. */ public jdbcConnection(HsqlProperties props) throws SQLException { String user = props.getProperty("user"); String password = props.getProperty("password"); String connType = props.getProperty("connection_type"); String host = props.getProperty("host"); int port = props.getIntegerProperty("port", 0); String path = props.getProperty("path"); String database = props.getProperty("database"); boolean isTLS = (connType == DatabaseURL.S_HSQLS || connType == DatabaseURL.S_HTTPS); if (user == null) { user = "SA"; } if (password == null) { password = ""; } user = user.toUpperCase(Locale.ENGLISH); password = password.toUpperCase(Locale.ENGLISH); try { if (DatabaseURL.isInProcessDatabaseType(connType)) { /** @todo fredt - this should be the only static reference to a core class in * the jdbc package - we may make it dynamic */ sessionProxy = DatabaseManager.newSession(connType, database, user, password, props); } else if (connType == DatabaseURL.S_HSQL || connType == DatabaseURL.S_HSQLS) { sessionProxy = new HSQLClientConnection(host, port, path, database, isTLS, user, password); isNetConn = true; } else if (connType == DatabaseURL.S_HTTP || connType == DatabaseURL.S_HTTPS) { sessionProxy = new HTTPClientConnection(host, port, path, database, isTLS, user, password); isNetConn = true; } else { // alias: type not yet implemented throw Util.sqlException(Trace.INVALID_JDBC_ARGUMENT); } connProperties = props; } catch (HsqlException e) { throw Util.sqlException(e); } } /** * Constructs an INTERNAL Connection, * using the specified {@link Session Session}.

    * * This constructor is called only on behalf of an existing * Session (the internal parallel of a * Connection), to be used as a parameter to a SQL * function or stored procedure that needs to execute in the context * of that Session.

    * * When a Java SQL function or stored procedure is called and its * first parameter is of type Connection, HSQLDB * automatically notices this and constructs an INTERNAL * Connection using the current Session. * HSQLDB then passes this Connection in the first * parameter position, moving any other parameter values * specified in the SQL statement to the right by one position. *

    * * To read more about this, see {@link Function#getValue()}.

    * * Notes:

    * * Starting with HSQLDB 1.7.2, INTERNAL connections are not * closed by a call to close() or by a SQL DISCONNECT. * * For HSQLDB developers not involved with writing database * internals, this change only applies to connections obtained * automatically from the database as the first parameter to * stored procedures and SQL functions. This is mainly an issue * to developers writing custom SQL function and stored procedure * libraries for HSQLDB. Presently, it is recommended that SQL function and * stored procedure code avoid depending on closing or issuing a * DISCONNECT on a connection obtained in this manner.

    * * @param c the Session requesting the construction of this * Connection * @exception HsqlException never (reserved for future use); * @see org.hsqldb.Function */ public jdbcConnection(Session c) throws HsqlException { // PRE: Session is non-null isInternal = true; sessionProxy = c; } /** * The default implementation simply attempts to silently {@link * #close() close()} this Connection */ protected void finalize() { try { close(); } catch (SQLException e) {} } /** * Retrieves this connection's JDBC url. * * This method is in support of the jdbcDatabaseMetaData.getURL() method. * * @return the database connection url with which this object was * constructed */ synchronized String getURL() throws SQLException { checkClosed(); if (isInternal) { return ((Session) sessionProxy).getInternalConnectionURL(); } return connProperties.getProperty("url"); } /** * An internal check for closed connections.

    * * @throws SQLException when the connection is closed */ synchronized void checkClosed() throws SQLException { if (isClosed) { throw Util.sqlException(Trace.CONNECTION_IS_CLOSED); } } /** * Adds another SQLWarning to this Connection object's warning chain. * * @param w the SQLWarning to add to the chain */ void addWarning(SQLWarning w) { // PRE: w is never null synchronized (rootWarning_mutex) { if (rootWarning == null) { rootWarning = w; } else { rootWarning.setNextWarning(w); } } } /** * Clears the warning chain without checking if this Connection is closed. */ void clearWarningsNoCheck() { synchronized (rootWarning_mutex) { rootWarning = null; } } /** * Translates ResultSet type, adding to the warning * chain if the requested type is downgraded.

    * * Up to and including HSQLDB 1.7.2, TYPE_FORWARD_ONLY and * TYPE_SCROLL_INSENSITIVE are passed through.

    * * Starting with 1.7.2, while TYPE_SCROLL_SENSITIVE is * downgraded to TYPE_SCROLL_INSENSITIVE and an SQLWarning is * issued.

    * * @param type of ResultSet; one of * jdbcResultSet.TYPE_XXX * @return the actual type that will be used * @throws SQLException if type is not one of the defined values */ int xlateRSType(int type) throws SQLException { SQLWarning w; String msg; switch (type) { case jdbcResultSet.TYPE_FORWARD_ONLY : case jdbcResultSet.TYPE_SCROLL_INSENSITIVE : { return type; } case jdbcResultSet.TYPE_SCROLL_SENSITIVE : { msg = "TYPE_SCROLL_SENSITIVE => TYPE_SCROLL_SENSITIVE"; w = new SQLWarning(msg, "SOO10", Trace.INVALID_JDBC_ARGUMENT); addWarning(w); return jdbcResultSet.TYPE_SCROLL_INSENSITIVE; } default : { msg = "ResultSet type: " + type; throw Util.sqlException(Trace.INVALID_JDBC_ARGUMENT, msg); } } } /** * Translates ResultSet concurrency, adding to the warning * chain if the requested concurrency is downgraded.

    * * Starting with HSQLDB 1.7.2, CONCUR_READ_ONLY is * passed through while CONCUR_UPDATABLE is downgraded * to CONCUR_READ_ONLY and an SQLWarning is issued. * * @param concurrency of ResultSet; one of * jdbcResultSet.CONCUR_XXX * @return the actual concurrency that will be used * @throws SQLException if concurrency is not one of the defined values */ int xlateRSConcurrency(int concurrency) throws SQLException { SQLWarning w; String msg; switch (concurrency) { case jdbcResultSet.CONCUR_READ_ONLY : { return concurrency; } case jdbcResultSet.CONCUR_UPDATABLE : { msg = "CONCUR_UPDATABLE => CONCUR_READ_ONLY"; w = new SQLWarning(msg, "SOO10", Trace.INVALID_JDBC_ARGUMENT); addWarning(w); return jdbcResultSet.CONCUR_READ_ONLY; } default : { msg = "ResultSet concurrency: " + concurrency; throw Util.sqlException(Trace.INVALID_JDBC_ARGUMENT, msg); } } } /** * Translates ResultSet holdability, adding to the warning * chain if the requested holdability is changed from an unsupported to * a supported value.

    * * Starting with HSQLDB 1.7.2, HOLD_CURSORS_OVER_COMMIT is * passed through while CLOSE_CURSORS_AT_COMMIT is changed * to HOLD_CURSORS_OVER_COMMIT and an SQLWarning is * issued.

    * * @param holdability of ResultSet; one of * jdbcResultSet.HOLD_CURSORS_OVER_COMMIT or * jdbcResultSet.CLOSE_CURSORS_AT_COMMIT * @return the actual holdability that will be used * @throws SQLException if holdability is not one of the defined values */ int xlateRSHoldability(int holdability) throws SQLException { SQLWarning w; String msg; switch (holdability) { case jdbcResultSet.HOLD_CURSORS_OVER_COMMIT : { return holdability; } case jdbcResultSet.CLOSE_CURSORS_AT_COMMIT : { msg = "CLOSE_CURSORS_AT_COMMIT => HOLD_CURSORS_OVER_COMMIT"; w = new SQLWarning(msg, "SOO10", Trace.INVALID_JDBC_ARGUMENT); addWarning(w); return jdbcResultSet.HOLD_CURSORS_OVER_COMMIT; } default : { msg = "ResultSet holdability: " + holdability; throw Util.sqlException(Trace.INVALID_JDBC_ARGUMENT, msg); } } } /** * Resets this connection so it can be used again. Used when connections are * returned to a connection pool. */ public void reset() throws SQLException { try { this.sessionProxy.resetSession(); } catch (HsqlException e) { throw new SQLException("Error resetting connection: " + e.getMessage()); } } /** * is called from within nativeSQL when the start of an JDBC escape sequence is encountered */ private int onStartEscapeSequence(String sql, StringBuffer sb, int i) throws SQLException { sb.setCharAt(i++, ' '); i = StringUtil.skipSpaces(sql, i); if (sql.regionMatches(true, i, "fn ", 0, 3) || sql.regionMatches(true, i, "oj ", 0, 3) || sql.regionMatches(true, i, "ts ", 0, 3)) { sb.setCharAt(i++, ' '); sb.setCharAt(i++, ' '); } else if (sql.regionMatches(true, i, "d ", 0, 2) || sql.regionMatches(true, i, "t ", 0, 2)) { sb.setCharAt(i++, ' '); } else if (sql.regionMatches(true, i, "call ", 0, 5)) { i += 4; } else if (sql.regionMatches(true, i, "?= call ", 0, 8)) { sb.setCharAt(i++, ' '); sb.setCharAt(i++, ' '); i += 5; } else if (sql.regionMatches(true, i, "escape ", 0, 7)) { i += 6; } else { i--; throw new SQLException( Trace.getMessage( Trace.jdbcConnection_nativeSQL, true, new Object[]{ sql.substring(i) }), "S0010", Trace.INVALID_JDBC_ARGUMENT); } return i; } //#ifdef JAVA6 /* public Clob createClob() throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public Blob createBlob() throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public NClob createNClob() throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public SQLXML createSQLXML() throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public boolean isValid(int timeout) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void setClientInfo(String name, String value) throws SQLClientInfoException { throw new UnsupportedOperationException("Not supported yet."); } public void setClientInfo(Properties properties) throws SQLClientInfoException { throw new UnsupportedOperationException("Not supported yet."); } public String getClientInfo(String name) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public Properties getClientInfo() throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public Array createArrayOf(String typeName, Object[] elements) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public Struct createStruct(String typeName, Object[] attributes) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public T unwrap(Class iface) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public boolean isWrapperFor(Class iface) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } */ //#endif JAVA6 } hsqldb-1.8.0.10.orig/src/org/hsqldb/jdbc/jdbcBlob.java0000644000175000017500000004326310770340574020737 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.jdbc; import java.io.ByteArrayInputStream; import java.io.InputStream; import java.io.OutputStream; import java.sql.Blob; import java.sql.SQLException; import org.hsqldb.Trace; // boucherb@users 2004-04-xx - patch 1.7.2 - position and truncate methods // implemented; minor changes for moderate thread // safety and optimal performance // boucherb@users 2004-04-xx - doc 1.7.2 - javadocs updated; methods put in // correct (historical, interface declared) order /** * The representation (mapping) in the JavaTM * programming language of an SQL BLOB value.

    * * Provides methods for getting the length of an SQL BLOB (Binary Large Object) * value, for materializing a BLOB value on the client, and for determining the * position of an octet sequence (byte pattern) within a BLOB value.

    * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.8.x, the HSQLDB driver does not implement Blob using an SQL * locator(BLOB). That is, an HSQLDB Blob object does not contain a logical * pointer to SQL BLOB data; rather it directly contains a representation of * the data (a byte array). As a result, an HSQLDB Blob object is itself * valid beyond the duration of the transaction in which is was created, * although it does not necessarily represent a corresponding value * on the database.

    * * Currently, the interface methods for updating a BLOB value are * unsupported. However, the truncate method is supported for local use. *

    * * * @author james house jhouse@part.net * @author boucherb@users * @version 1.7.2 * @since JDK 1.2, HSQLDB 1.7.2 */ public class jdbcBlob implements Blob { volatile byte[] data; /** * Constructs a new jdbcBlob instance wrapping the given octet sequence.

    * * This constructor is used internally to retrieve result set values as * Blob objects, yet it must be public to allow access from other packages. * As such (in the interest of efficiency) this object maintains a reference * to the given octet sequence rather than making a copy; special care * should be taken by extenal clients never to use this constructor with a * byte array object that may later be modified extenally. * * @param data the octet sequence representing the Blob value * @throws SQLException if the argument is null */ public jdbcBlob(final byte[] data) throws SQLException { if (data == null) { throw Util.sqlException(Trace.INVALID_JDBC_ARGUMENT, "null"); } this.data = data; // (byte[]) data.clone(); } /** * Returns the number of bytes in the BLOB value * designated by this Blob object. * * @return length of the BLOB in bytes * @exception SQLException if there is an error accessing the * length of the BLOB * * @since JDK 1.2, HSQLDB 1.7.2 */ public long length() throws SQLException { final byte[] ldata = data; return ldata.length; } /** * Retrieves all or part of the BLOB value that this * Blob object represents, as an array of bytes. This * byte array contains up to length * consecutive bytes starting at position pos.

    * * *

    *

    HSQLDB-Specific Information:

    * * The official specification above is ambiguous in that it does not * precisely indicate the policy to be observed when * pos > this.length() - length. One policy would be to retrieve the * octets from pos to this.length(). Another would be to throw an * exception. HSQLDB observes the later policy. *

    * * @param pos the ordinal position of the first byte in the * BLOB value to be extracted; the first byte is at * position 1 * @param length the number of consecutive bytes to be copied * @return a byte array containing up to length * consecutive bytes from the BLOB value designated * by this Blob object, starting with the * byte at position pos * @exception SQLException if there is an error accessing the * BLOB value * @see #setBytes * * @since JDK 1.2, HSQLDB 1.7.2 */ public byte[] getBytes(long pos, final int length) throws SQLException { final byte[] ldata = data; final int dlen = ldata.length; pos--; if (pos < 0 || pos > dlen) { throw Util.sqlException(Trace.INVALID_JDBC_ARGUMENT, "pos: " + (pos + 1)); } if (length < 0 || length > dlen - pos) { throw Util.sqlException(Trace.INVALID_JDBC_ARGUMENT, "length: " + length); } final byte[] out = new byte[length]; System.arraycopy(ldata, (int) pos, out, 0, length); return out; } /** * Retrieves the BLOB value designated by this * Blob instance as a stream. * * @return a stream containing the BLOB data * @exception SQLException if there is an error accessing the * BLOB value * @see #setBinaryStream * * @since JDK 1.2, HSQLDB 1.7.2 */ public InputStream getBinaryStream() throws SQLException { final byte[] ldata = data; return new ByteArrayInputStream(ldata); } /** * Retrieves the byte position at which the specified byte array * pattern begins within the BLOB * value that this Blob object represents. The * search for pattern begins at position * start.

    * * @param pattern the byte array for which to search * @param start the position at which to begin searching; the * first position is 1 * @return the position at which the pattern appears, else -1 * @exception SQLException if there is an error accessing the * BLOB * * @since JDK 1.2, HSQLDB 1.7.2 */ public long position(final byte[] pattern, long start) throws SQLException { final byte[] ldata = data; final int dlen = ldata.length; if (start > dlen || pattern == null) { return -1; } else if (start < 1) { start = 0; } else { start--; } final int plen = pattern.length; if (plen == 0 || start > dlen - plen) { return -1; } final int stop = dlen - plen; final byte b0 = pattern[0]; outer_loop: for (int i = (int) start; i <= stop; i++) { if (ldata[i] != b0) { continue; } int len = plen; int doffset = i; int poffset = 0; boolean match = true; while (len-- > 0) { if (ldata[doffset++] != pattern[poffset++]) { continue outer_loop; } } return i + 1; } return -1; } /** * Retrieves the byte position in the BLOB value * designated by this Blob object at which * pattern begins. The search begins at position * start. * * @param pattern the Blob object designating * the BLOB value for which to search * @param start the position in the BLOB value * at which to begin searching; the first position is 1 * @return the position at which the pattern begins, else -1 * @exception SQLException if there is an error accessing the * BLOB value * * @since JDK 1.2, HSQLDB 1.7.2 */ public long position(final Blob pattern, long start) throws SQLException { final byte[] ldata = data; final int dlen = ldata.length; if (start > dlen || pattern == null) { return -1; } else if (start < 1) { start = 0; } else { start--; } final long plen = pattern.length(); if (plen == 0 || start > ((long) dlen) - plen) { return -1; } // by now, we know plen <= Integer.MAX_VALUE final int iplen = (int) plen; byte[] bap; if (pattern instanceof jdbcBlob) { bap = ((jdbcBlob) pattern).data; } else { bap = pattern.getBytes(1, iplen); } final int stop = dlen - iplen; final byte b0 = bap[0]; outer_loop: for (int i = (int) start; i <= stop; i++) { if (ldata[i] != b0) { continue; } int len = iplen; int doffset = i; int poffset = 0; while (len-- > 0) { if (ldata[doffset++] != bap[poffset++]) { continue outer_loop; } } return i + 1; } return -1; } // -------------------------- JDBC 3.0 ----------------------------------- /** * Writes the given array of bytes to the BLOB value that * this Blob object represents, starting at position * pos, and returns the number of bytes written.

    * * *

    *

    HSQLDB-Specific Information:

    * * HSLQDB 1.7.2 does not support this feature.

    * * Calling this method always throws an SQLException. *

    * * * @param pos the position in the BLOB object at which * to start writing * @param bytes the array of bytes to be written to the BLOB * value that this Blob object represents * @return the number of bytes written * @exception SQLException if there is an error accessing the * BLOB value * @see #getBytes * * @since JDK 1.4, HSQLDB 1.7.2 */ public int setBytes(long pos, byte[] bytes) throws SQLException { throw Util.notSupported(); } /** * Writes all or part of the given byte array to the * BLOB value that this Blob object represents * and returns the number of bytes written. * Writing starts at position pos in the BLOB * value; len bytes from the given byte array are written.

    * * *

    *

    HSQLDB-Specific Information:

    * * HSLQDB 1.7.2 does not support this feature.

    * * Calling this method always throws an SQLException. *

    * * * @param pos the position in the BLOB object at which * to start writing * @param bytes the array of bytes to be written to this BLOB * object * @param offset the offset into the array bytes at which * to start reading the bytes to be set * @param len the number of bytes to be written to the BLOB * value from the array of bytes bytes * @return the number of bytes written * @exception SQLException if there is an error accessing the * BLOB value * @see #getBytes * * @since JDK 1.4, HSQLDB 1.7.2 */ public int setBytes(long pos, byte[] bytes, int offset, int len) throws SQLException { throw Util.notSupported(); } /** * Retrieves a stream that can be used to write to the BLOB * value that this Blob object represents. The stream begins * at position pos.

    * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.2 does not support this feature.

    * * Calling this method always throws an SQLException. *

    * * * @param pos the position in the BLOB value at which * to start writing * @return a java.io.OutputStream object to which data can * be written * @exception SQLException if there is an error accessing the * BLOB value * @see #getBinaryStream * * @since JDK 1.4, HSQLDB 1.7.2 */ public OutputStream setBinaryStream(long pos) throws SQLException { throw Util.notSupported(); } /** * Truncates the BLOB value that this Blob * object represents to be len bytes in length. * * *
    *

    HSQLDB-Specific Information:

    * * This operation affects only the client-side value; it has no effect upon * the value as it is stored in the database. *

    * * * @param len the length, in bytes, to which the BLOB value * that this Blob object represents should be truncated * @exception SQLException if there is an error accessing the * BLOB value * * @since JDK 1.4, HSQLDB 1.7.2 */ public void truncate(final long len) throws SQLException { final byte[] ldata = data; if (len < 0 || len > ldata.length) { throw Util.sqlException(Trace.INVALID_JDBC_ARGUMENT, Long.toString(len)); } if (len == ldata.length) { return; } byte[] newData = new byte[(int) len]; System.arraycopy(ldata, 0, newData, 0, (int) len); data = newData; } //#ifdef JAVA6 /* public void free() throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public InputStream getBinaryStream(long pos, long length) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } */ //#endif JAVA6 // public static void main(String[] args) throws Exception { // // System.out.println("--------------------------------"); // System.out.println((new jdbcBlob(new byte[0])).position(new byte[]{1}, 1)); // System.out.println((new jdbcBlob(new byte[]{1})).position(new byte[0], 1)); // System.out.println((new jdbcBlob(new byte[]{1})).position((byte[])null, 1)); // // System.out.println("--------------------------------"); // byte[] data1 = new byte[]{0,1,2,1,2,3,2,3,4,2,3,4,5,2,3,4,5,0,1,2, // 1,2,3,2,3,4,2,3,4,5,2,3,4}; // byte[] pattern = new byte[]{2,3,4,5}; // // jdbcBlob blob1 = new jdbcBlob(data1); // jdbcBlob blob2 = new jdbcBlob(pattern); // // for (int i = -1; i <= data1.length + 1; i++) { // System.out.println(blob1.position(pattern, i)); // } // // System.out.println("--------------------------------"); // // for (int i = -1; i <= data1.length + 1; i++) { // System.out.println(blob1.position(blob2, i)); // } // // System.out.println("--------------------------------"); // // new jdbcBlob(null); // } } hsqldb-1.8.0.10.orig/src/org/hsqldb/jdbc/jdbcDataSource.java0000644000175000017500000002624311017337446022111 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.jdbc; import java.io.PrintWriter; import java.io.Serializable; import java.sql.Connection; import java.sql.SQLException; import java.util.Properties; //#ifdef JAVA4 import javax.naming.NamingException; import javax.naming.Reference; import javax.naming.Referenceable; import javax.naming.StringRefAddr; import javax.sql.DataSource; //#endif JAVA4 import org.hsqldb.jdbcDriver; // boucherb@users 20040411 - doc 1.7.2 - javadoc updates toward 1.7.2 final /** *

    A factory for connections to the physical data source that this * DataSource object represents. An alternative to the * DriverManager facility, a DataSource object * is the preferred means of getting a connection. An object that implements * the DataSource interface will typically be * registered with a naming service based on the * JavaTM Naming and Directory (JNDI) API. *

    * The DataSource interface is implemented by a driver vendor. * There are three types of implementations: *

      *
    1. Basic implementation -- produces a standard Connection * object *
    2. Connection pooling implementation -- produces a Connection * object that will automatically participate in connection pooling. This * implementation works with a middle-tier connection pooling manager. *
    3. Distributed transaction implementation -- produces a * Connection object that may be used for distributed * transactions and almost always participates in connection pooling. * This implementation works with a middle-tier * transaction manager and almost always with a connection * pooling manager. *
    *

    * A DataSource object has properties that can be modified * when necessary. For example, if the data source is moved to a different * server, the property for the server can be changed. The benefit is that * because the data source's properties can be changed, any code accessing * that data source does not need to be changed. *

    * A driver that is accessed via a DataSource object does not * register itself with the DriverManager. Rather, a * DataSource object is retrieved though a lookup operation * and then used to create a Connection object. With a basic * implementation, the connection obtained through a DataSource * object is identical to a connection obtained through the * DriverManager facility. * * @since JDK 1.4 * @author deforest@users * @version 1.7.2 */ //#ifdef JAVA4 public class jdbcDataSource implements Serializable, Referenceable, DataSource { //#else /* public class jdbcDataSource implements Serializable { */ //#endif JAVA4 /** * Login timeout */ private int loginTimeout = 0; /** * Log writer */ private transient PrintWriter logWriter; /** * Default password to use for connections */ private String password = ""; /** * Default user to use for connections */ private String user = ""; /** * Database location */ private String database = ""; /** * Constructor */ public jdbcDataSource() {} /** *

    Attempts to establish a connection with the data source that * this DataSource object represents. * * @return a connection to the data source * @exception SQLException if a database access error occurs */ public Connection getConnection() throws SQLException { return getConnection(user, password); } /** *

    Attempts to establish a connection with the data source that * this DataSource object represents. * * @param username the database user on whose behalf the connection is * being made * @param password the user's password * @return a connection to the data source * @exception SQLException if a database access error occurs */ public Connection getConnection(String username, String password) throws SQLException { Properties props = new Properties(); if (username != null) { props.put("user", username); } if (password != null) { props.put("password", password); } return jdbcDriver.getConnection(database, props); } /** * Retrieves the jdbc database connection url attribute.

    * * @return the jdbc database connection url attribute */ public String getDatabase() { return database; } /** * Gets the maximum time in seconds that this data source can wait * while attempting to connect to a database. A value of zero * means that the timeout is the default system timeout * if there is one; otherwise, it means that there is no timeout. * When a DataSource object is created, the login timeout is * initially zero. * * @return the data source login time limit * @exception SQLException if a database access error occurs. * @see #setLoginTimeout */ public int getLoginTimeout() throws SQLException { return 0; } /** *

    Retrieves the log writer for this DataSource * object. * *

    The log writer is a character output stream to which all logging * and tracing messages for this data source will be * printed. This includes messages printed by the methods of this * object, messages printed by methods of other objects manufactured * by this object, and so on. Messages printed to a data source * specific log writer are not printed to the log writer associated * with the java.sql.Drivermanager class. When a * DataSource object is * created, the log writer is initially null; in other words, the * default is for logging to be disabled. * * @return the log writer for this data source or null if * logging is disabled * @exception SQLException if a database access error occurs * @see #setLogWriter */ public java.io.PrintWriter getLogWriter() throws SQLException { return logWriter; } // javadoc to be copied from javax.naming.Referenceable.getReference() //#ifdef JAVA4 public Reference getReference() throws NamingException { String cname = "org.hsqldb.jdbc.jdbcDataSourceFactory"; Reference ref = new Reference(getClass().getName(), cname, null); ref.add(new StringRefAddr("database", getDatabase())); ref.add(new StringRefAddr("user", getUser())); ref.add(new StringRefAddr("password", password)); return ref; } //#endif JAVA4 /** * Retrieves the user ID for the connection.

    * * @return the user ID for the connection */ public String getUser() { return user; } /** * Assigns the value of this object's jdbc database connection * url attribute.

    * * @param database the new value of this object's jdbc database connection * url attribute */ public void setDatabase(String database) { this.database = database; } /** *

    Sets the maximum time in seconds that this data source will wait * while attempting to connect to a database. A value of zero * specifies that the timeout is the default system timeout * if there is one; otherwise, it specifies that there is no timeout. * When a DataSource object is created, the login timeout is * initially zero. * * @param seconds the data source login time limit * @exception SQLException if a database access error occurs. * @see #getLoginTimeout */ public void setLoginTimeout(int seconds) throws SQLException { loginTimeout = 0; } /** *

    Sets the log writer for this DataSource * object to the given java.io.PrintWriter object. * *

    The log writer is a character output stream to which all logging * and tracing messages for this data source will be * printed. This includes messages printed by the methods of this * object, messages printed by methods of other objects manufactured * by this object, and so on. Messages printed to a data source- * specific log writer are not printed to the log writer associated * with the java.sql.Drivermanager class. When a * DataSource object is created the log writer is * initially null; in other words, the default is for logging to be * disabled. * * @param logWriter the new log writer; to disable logging, set to null * @exception SQLException if a database access error occurs * @see #getLogWriter */ public void setLogWriter(PrintWriter logWriter) throws SQLException { this.logWriter = logWriter; } /** * Sets the password to use for connecting to the database * @param password the password */ public void setPassword(String password) { this.password = password; } /** * Sets the userid * @param user the user id */ public void setUser(String user) { this.user = user; } //#ifdef JAVA6 /* public T unwrap(Class iface) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public boolean isWrapperFor(Class iface) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } */ //#endif JAVA6 } hsqldb-1.8.0.10.orig/src/org/hsqldb/jdbc/jdbcDatabaseMetaData.java0000644000175000017500000072021110770340574023161 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.jdbc; import java.sql.Connection; import java.sql.DatabaseMetaData; import java.sql.ResultSet; import java.sql.SQLException; //#ifdef JAVA6 /* import java.sql.RowIdLifetime; */ //#endif JAVA6 import org.hsqldb.Column; import org.hsqldb.Library; import org.hsqldb.Trace; import org.hsqldb.lib.StringUtil; import org.hsqldb.persist.HsqlDatabaseProperties; // fredt@users 20020320 - patch 1.7.0 - JDBC 2 support and error trapping // JDBC 2 methods can now be called from jdk 1.1.x - see javadoc comments // boucherb@users 20020509 - added "throws SQLException" to all methods where // it was missing here but specified in the java.sql.DatabaseMetaData interface, // updated generic documentation to JDK 1.4, and added JDBC3 methods and docs // boucherb@users and fredt@users 20020409/20020505 extensive review and update // of docs and behaviour to comply with previous and latest java.sql // specification // boucherb@users 2002-20030121 - extensive rewrite to support new // 1.7.2 metadata features. // boucherb@users 20040422 - doc 1.7.2 - javadoc updates toward 1.7.2 final // boucherb@users 200404xx - misc changes // fredt@users 20050505 - patch 1.8.0 - enforced JDBC rules for non-pattern params /** Comprehensive information about the database as a whole. *

    * This interface is implemented by driver vendors to let users know the * capabilities of a Database Management System (DBMS) in combination with * the driver based on JDBCTM technology * ("JDBC driver") that is used with it. Different relational DBMSs often * support different features, implement features in different ways, and use * different data types. In addition, a driver may implement a feature on * top of what the DBMS offers. Information returned by methods in this * interface applies to the capabilities of a particular driver and a * particular DBMS working together. Note that as used in this documentation, * the term "database" is used generically to refer to both the driver and DBMS. *

    * A user for this interface is commonly a tool that needs to discover how to * deal with the underlying DBMS. This is especially true for applications * that are intended to be used with more than one DBMS. For example, a tool * might use the method getTypeInfo to find out what data types * can be used in a CREATE TABLE statement. Or a user might call * the method supportsCorrelatedSubqueries to see if it is possible * to use a correlated subquery or supportsBatchUpdates to see if * it is possible to use batch updates. *

    * Some DatabaseMetaData methods return lists of information * in the form of ResultSet objects. Regular ResultSet * methods, such as getString and getInt, can be used * to retrieve the data from these ResultSet objects. If a given * form of metadata is not available, the ResultSet getter methods * throw an SQLException. *

    * Some DatabaseMetaData methods take arguments that are * String patterns. These arguments all have names such as fooPattern. * Within a pattern String, "%" means match any substring of 0 or more * characters, and "_" means match any one character. Only metadata * entries matching the search pattern are returned. If a search pattern * argument is set to null, that argument's criterion will * be dropped from the search. *

    * A method that gets information about a feature that the driver does not * support will throw an SQLException. * In the case of methods that return a ResultSet * object, either a ResultSet object (which may be empty) is * returned or an SQLException is thrown.

    * * *

    *

    HSQLDB-Specific Information:

    * * Starting with HSQLDB 1.7.2, an option is provided to allow alternate * system table production implementations. In this distribution, there are * three implementations whose behaviour ranges from producing no system * tables at all to producing a richer and more complete body of information * about an HSQLDB database than was previously available. The information * provided through the default implementation is, unlike previous * versions, accessible to all database users, regardless of admin status. * This is now possible because the table content it produces for each * user is pre-filtered, based on the user's access rights. That is, each * system table now acts like a security-aware View.

    * * The process of installing a system table production class is transparent and * occurs dynamically at runtime during the opening sequence of a * Database instance, in the newDatabaseInformation() factory * method of the revised DatabaseInformation class, using the following * steps:

    * *

    *
      *
    1. If a class whose fully qualified name is org.hsqldb.DatabaseInformationFull * can be found and it has an accesible constructor that takes an * org.hsqldb.Database object as its single parameter, then an instance of * that class is reflectively instantiated and is used by the database * instance to produce its system tables.

      * *

    2. If 1.) fails, then the process is repeated, attempting to create an * instance of org.hsqldb.DatabaseInformationMain (which provides just the * core set of system tables required to service this class, but now does * so in a more security aware and comprehensive fashion).

      * *

    3. If 2.) fails, then an instance of org.hsqldb.DatabaseInformation is * installed (that, by default, produces no system tables, meaning that * calls to all related methods in this class will fail, throwing an * SQLException stating that a required system table is not found).

      * *

    *

    * * The process of searching for alternate implementations of database * support classes, ending with the installation of a minimal but functional * default will be refered to henceforth as graceful degradation. * This process is advantageous in that it allows developers and administrators * to easily choose packaging options, simply by adding to or deleting concerned * classes from an HSQLDB installation, without worry over providing complex * initialization properties or disrupting the core operation of the engine. * In this particular context, graceful degradation allows easy choices * regarding database metadata, spanning the range of full (design-time), * custom-written, minimal (production-time) or null * (space-constrained) system table production implementations.

    * * In the default full implementation, a number of new system tables are * provided that, although not used directly by this class, present previously * unavailable information about the database, such as about its triggers and * aliases.

    * * In order to better support graphical database exploration tools and as an * experimental intermediate step toward more fully supporting SQL9n and * SQL200n, the default installed DatabaseInformation implementation * is also capable of reporting pseudo name space information, such as * the catalog (database URI) of database objects.

    * * The catalog reporting feature is turned off by default but * can be turned on by providing the appropriate entries in the database * properties file (see the advanced topics section of the product * documentation).

    * * When the feature is turned on, catalog is reported using * the following conventions:

    * *

      *
    1. All objects are reported as having a catalog equal to the URI of the * database, which is equivalent to the catenation of the * <type> and <path> portions of the HSQLDB * internal JDBC connection URL.

      * * Examples:

      * *

       *     "jdbc:hsqldb:file:test"      => "file:test"
       *     "jdbc:hsqldb:mem:."          => "mem:."
       *     "jdbc:hsqldb:hsql:/host/..." => URI of aliased database
       *     "jdbc:hsqldb:http:/host/..." => URI of aliased database
       *     
      * * Note: No provision is made for qualifying database objects * by catalog in DML or DDL SQL. This feature is functional only with * respect to browsing the database through the DatabaseMetaData and system * table interfaces.

      * *

    * * Again, it should be well understood that this feature provide an * emulation of catalog support and is intended only * as an experimental implementation to enhance the browsing experience * when using graphical database explorers and to make a first foray * into tackling the issue of implementing true catalog support * in the future.

    * * Due the nature of the new database system table production process, fewer * assumptions can be made by this class about what information is made * available in the system tables supporting DatabaseMetaData * methods. Because of this, the SQL queries behind the ResultSet * producing methods have been cleaned up and made to adhere more strictly to * the JDBC contracts specified in relation to the method parameters.

    * * One of the remaining assumptions concerns the approximate * argument of {@link #getIndexInfo getIndexInfo()}. This parameter is still * ignored since there is not yet any process in place to internally gather * and persist table and index statistics. A primitive version of a statistics * gathering and reporting subsystem may be introduced some time in the * 1.7.x series of releases, but no hard decision has yet been made.

    * * Another assumption is that simple select queries against certain system * tables will return rows in JDBC contract order in the absence of an * "ORDER BY" clause. The reason for this is that results * come back much faster when no "ORDER BY" clause is used. * Developers wishing to extend or replace an existing system table production * class should be aware of this, either adding the contract * "ORDER BY" clause to the SQL in corresponding methods in this class, * or, better, by maintaing rows in the correct order in the underlying * system tables, prefereably by creating appropriate primary indices.

    * *


    * * JRE 1.1.x Notes:

    * * In general, JDBC 2 support requires Java 1.2 and above, and JDBC3 requires * Java 1.4 and above. In HSQLDB, support for methods introduced in different * versions of JDBC depends on the JDK version used for compiling and building * HSQLDB.

    * * Since 1.7.0, it is possible to build the product so that * all JDBC 2 methods can be called while executing under the version 1.1.x * Java Runtime EnvironmentTM. * However, some of these method calls require int values that * are defined only in the JDBC 2 or greater version of the * {@link java.sql.ResultSet ResultSet} interface. For this reason, when the * product is compiled under JDK 1.1.x, these values are defined in * {@link jdbcResultSet jdbcResultSet}.

    * * In a JRE 1.1.x environment, calling JDBC 2 methods that take or return the * JDBC2-only ResultSet values can be achieved by referring * to them in parameter specifications and return value comparisons, * respectively, as follows:

    * *

     * jdbcResultSet.FETCH_FORWARD
     * jdbcResultSet.TYPE_FORWARD_ONLY
     * jdbcResultSet.TYPE_SCROLL_INSENSITIVE
     * jdbcResultSet.CONCUR_READ_ONLY
     * // etc
     * 
    * * However, please note that code written in such a manner will not be * compatible for use with other JDBC 2 drivers, since they expect and use * ResultSet, rather than jdbcResultSet. Also * note, this feature is offered solely as a convenience to developers * who must work under JDK 1.1.x due to operating constraints, yet wish to * use some of the more advanced features available under the JDBC 2 * specification.

    * * (fredt@users)
    * (boucherb@users) *

    * * * @author boucherb@users * @author fredt@users * @version 1.7.2 * @see org.hsqldb.DatabaseInformation * @see org.hsqldb.DatabaseInformationMain * @see org.hsqldb.DatabaseInformationFull */ public class jdbcDatabaseMetaData implements DatabaseMetaData { /** Used by getBestRowIdentifier to avoid extra object construction */ static final Integer INT_COLUMNS_NO_NULLS = new Integer(columnNoNulls); // ----------------------------------------------------------------------- // private attributes // ----------------------------------------------------------------------- /** * The connection this object uses to retrieve database instance-specific * metadata. */ private jdbcConnection connection; /** * Connection property for schema reporting. */ private boolean useSchemaDefault; /** * A CSV list representing the SQL IN list to use when generating * queries for getBestRowIdentifier when the * scope argument is bestRowSession. * @since HSQLDB 1.7.2 */ private static final String BRI_SESSION_SCOPE_IN_LIST = "(" + bestRowSession + ")"; /** * A CSV list representing the SQL IN list to use when generating * queries for getBestRowIdentifier when the * scope argument is bestRowTemporary. * @since HSQLDB 1.7.2 */ private static final String BRI_TEMPORARY_SCOPE_IN_LIST = "(" + bestRowTemporary + "," + bestRowTransaction + "," + bestRowSession + ")"; /** * A CSV list representing the SQL IN list to use when generating * queries for getBestRowIdentifier when the * scope argument is bestRowTransaction. * @since HSQLDB 1.7.2 */ private static final String BRI_TRANSACTION_SCOPE_IN_LIST = "(" + bestRowTransaction + "," + bestRowSession + ")"; /** * "SELECT * FROM ".

    * * This attribute is in support of methods that use SQL SELECT statements to * generate returned ResultSet objects.

    * * @since HSQLDB 1.7.2 */ private static final String selstar = "SELECT * FROM INFORMATION_SCHEMA."; /** * " WHERE 1=1 ".

    * * This attribute is in support of methods that use SQL SELECT statements to * generate returned ResultSet objects.

    * * A good optimizer will simply drop this when parsing a condition * expression. And it makes our code much easier to write, since we don't * have to check our "WHERE" clause productions as strictly for proper * conjunction: we just stick additional conjunctive predicates on the * end of this and Presto! Everything works :-)

    * @since HSQLDB 1.7.2 */ private static final String whereTrue = " WHERE 1=1"; //---------------------------------------------------------------------- // First, a variety of minor information about the target database. /** * Retrieves whether the current user can call all the procedures * returned by the method getProcedures.

    * * *

    *

    HSQLDB-Specific Information:

    * * This method still always returns * true.

    * * In a future release, the plugin interface may be modified to allow * implementors to report different values here, based on their * implementations. *

    * * * @return true if so; false otherwise * @exception SQLException if a database access error occurs */ public boolean allProceduresAreCallable() throws SQLException { return true; } /** * Retrieves whether the current user can use all the tables returned * by the method getTables in a SELECT * statement.

    * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB always reports true.

    * * Please note that the default 1.7.2 getTables behaviour is * omit from the list of requested tables only those to which the * invoking user has no access of any kind.

    * *

    * * * @return true if so; false otherwise * @exception SQLException if a database access error occurs */ public boolean allTablesAreSelectable() throws SQLException { return true; } /** * Retrieves the URL for this DBMS. * * * @return the URL for this DBMS or null if it cannot be * generated * @exception SQLException if a database access error occurs */ public String getURL() throws SQLException { return connection.getURL(); } /** * Retrieves the user name as known to this database. * * * @return the database user name * @exception SQLException if a database access error occurs */ public String getUserName() throws SQLException { ResultSet rs = execute("CALL USER()"); rs.next(); String result = rs.getString(1); rs.close(); return result; } /** * Retrieves whether this database is in read-only mode.

    * * *

    *

    HSQLDB-Specific Information:

    * * Starting with 1.7.2, this makes * an SQL call to the new {@link Library#isReadOnlyDatabase} method * which provides correct determination of the read-only status for * both local and remote database instances. *

    * * @return true if so; false otherwise * @exception SQLException if a database access error occurs */ public boolean isReadOnly() throws SQLException { ResultSet rs = execute("CALL \"org.hsqldb.Library.isReadOnlyDatabase\"()"); rs.next(); boolean result = rs.getBoolean(1); rs.close(); return result; } /** * Retrieves whether NULL values are sorted high. * Sorted high means that NULL values * sort higher than any other value in a domain. In an ascending order, * if this method returns true, NULL values * will appear at the end. By contrast, the method * nullsAreSortedAtEnd indicates whether NULL values * are sorted at the end regardless of sort order.

    * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB sorts null low; this method always returns false. *

    * * * * @return true if so; false otherwise * @exception SQLException if a database access error occurs */ public boolean nullsAreSortedHigh() throws SQLException { return false; } /** * Retrieves whether NULL values are sorted low. * Sorted low means that NULL values * sort lower than any other value in a domain. In an ascending order, * if this method returns true, NULL values * will appear at the beginning. By contrast, the method * nullsAreSortedAtStart indicates whether NULL values * are sorted at the beginning regardless of sort order.

    * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB sorts null low; this method always returns true. *

    * * * * @return true if so; false otherwise * @exception SQLException if a database access error occurs */ public boolean nullsAreSortedLow() throws SQLException { return true; } /** * Retrieves whether NULL values are sorted at the start regardless * of sort order.

    * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB sorts null low; this method always returns false. *

    * * * * @return true if so; false otherwise * @exception SQLException if a database access error occurs */ public boolean nullsAreSortedAtStart() throws SQLException { return false; } /** * Retrieves whether NULL values are sorted at the end regardless of * sort order.

    * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB sorts null low; this method always returns false. *

    * * * * @return true if so; false otherwise * @exception SQLException if a database access error occurs */ public boolean nullsAreSortedAtEnd() throws SQLException { return false; } /** * Retrieves the name of this database product.

    * *

    *

    HSQLDB-Specific Information:

    * * Starting with HSQLDB 1.7.2, this value is retrieved through an * SQL call to the new {@link Library#getDatabaseProductName} method * which allows correct determination of the database product name * for both local and remote database instances. *

    * * @return database product name * @exception SQLException if a database access error occurs */ public String getDatabaseProductName() throws SQLException { ResultSet rs = execute("call \"org.hsqldb.Library.getDatabaseProductName\"()"); rs.next(); String result = rs.getString(1); rs.close(); return result; } /** * Retrieves the version number of this database product.

    * *

    *

    HSQLDB-Specific Information:

    * * Starting with HSQLDB 1.7.2, this value is retrieved through an * SQL call to the new {@link Library#getDatabaseProductVersion} method * which allows correct determination of the database product name * for both local and remote database instances. *

    * * @return database version number * @exception SQLException if a database access error occurs */ public String getDatabaseProductVersion() throws SQLException { ResultSet rs = execute("call \"org.hsqldb.Library.getDatabaseProductVersion\"()"); rs.next(); String result = rs.getString(1); rs.close(); return result; } /** * Retrieves the name of this JDBC driver. * * @return JDBC driver name * @exception SQLException if a database access error occurs */ public String getDriverName() throws SQLException { return HsqlDatabaseProperties.PRODUCT_NAME + " Driver"; } /** * Retrieves the version number of this JDBC driver as a String. * * @return JDBC driver version * @exception SQLException if a database access error occurs */ public String getDriverVersion() throws SQLException { return HsqlDatabaseProperties.THIS_VERSION; } /** * Retrieves this JDBC driver's major version number. * * @return JDBC driver major version */ public int getDriverMajorVersion() { return HsqlDatabaseProperties.MAJOR; } /** * Retrieves this JDBC driver's minor version number. * * @return JDBC driver minor version number */ public int getDriverMinorVersion() { return HsqlDatabaseProperties.MINOR; } /** * Retrieves whether this database stores tables in a local file.

    * * *

    *

    HSQLDB-Specific Information:

    * * From HSQLDB 1.7.2 it is assumed that this refers to data being stored * by the JDBC client. This method always returns false. *

    * * @return true if so; false otherwise * @exception SQLException if a database access error occurs */ public boolean usesLocalFiles() throws SQLException { return false; } /** * Retrieves whether this database uses a file for each table.

    * * *

    *

    HSQLDB-Specific Information:

    * * Up to and including 1.7.2, HSQLDB does not use a file for each table. * This method always returns false. *

    * * @return true if this database uses a local file for each table; * false otherwise * @exception SQLException if a database access error occurs */ public boolean usesLocalFilePerTable() throws SQLException { return false; } /** * Retrieves whether this database treats mixed case unquoted SQL identifiers as * case sensitive and as a result stores them in mixed case.

    * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB treats unquoted identifiers as case insensitive and stores * them in upper case. It treats quoted identifiers as case sensitive and * stores them verbatim; this method always returns false. *

    * * * * @return true if so; false otherwise * @exception SQLException if a database access error occurs */ public boolean supportsMixedCaseIdentifiers() throws SQLException { return false; } /** * Retrieves whether this database treats mixed case unquoted SQL identifiers as * case insensitive and stores them in upper case.

    * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB treats unquoted identifiers as case insensitive and stores * them in upper case. It treats quoted identifiers as case sensitive and * stores them verbatim; this method always returns true. *

    * * * * @return true if so; false otherwise * @exception SQLException if a database access error occurs */ public boolean storesUpperCaseIdentifiers() throws SQLException { return true; } /** * Retrieves whether this database treats mixed case unquoted SQL identifiers as * case insensitive and stores them in lower case.

    * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB treats unquoted identifiers as case insensitive and stores * them in upper case. It treats quoted identifiers as case sensitive and * stores them verbatim; this method always returns false. *

    * * * * @return true if so; false otherwise * @exception SQLException if a database access error occurs */ public boolean storesLowerCaseIdentifiers() throws SQLException { return false; } /** * Retrieves whether this database treats mixed case unquoted SQL identifiers as * case insensitive and stores them in mixed case.

    * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB treats unquoted identifiers as case insensitive and stores * them in upper case. It treats quoted identifiers as case sensitive and * stores them verbatim; this method always returns false. *

    * * * * @return true if so; false otherwise * @exception SQLException if a database access error occurs */ public boolean storesMixedCaseIdentifiers() throws SQLException { return false; } /** * Retrieves whether this database treats mixed case quoted SQL identifiers as * case sensitive and as a result stores them in mixed case.

    * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB treats unquoted identifiers as case insensitive and stores * them in upper case. It treats quoted identifiers as case sensitive and * stores them verbatim; this method always returns true. *

    * * * * @return true if so; false otherwise * @exception SQLException if a database access error occurs */ public boolean supportsMixedCaseQuotedIdentifiers() throws SQLException { return true; } /** * Retrieves whether this database treats mixed case quoted SQL identifiers as * case insensitive and stores them in upper case.

    * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB treats unquoted identifiers as case insensitive and stores * them in upper case. It treats quoted identifiers as case sensitive and * stores them verbatim; this method always returns false. *

    * * * * @return true if so; false otherwise * @exception SQLException if a database access error occurs */ public boolean storesUpperCaseQuotedIdentifiers() throws SQLException { return false; } /** * Retrieves whether this database treats mixed case quoted SQL identifiers as * case insensitive and stores them in lower case.

    * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB treats unquoted identifiers as case insensitive and stores * them in upper case. It treats quoted identifiers as case sensitive and * stores them verbatim; this method always returns false. *

    * * @return true if so; false otherwise * @exception SQLException if a database access error occurs */ public boolean storesLowerCaseQuotedIdentifiers() throws SQLException { return false; } /** * Retrieves whether this database treats mixed case quoted SQL identifiers as * case insensitive and stores them in mixed case.

    * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB treats unquoted identifiers as case insensitive and stores * them in upper case. It treats quoted identifiers as case sensitive and * stores them verbatim; this method always returns false. *

    * * * * @return true if so; false otherwise * @exception SQLException if a database access error occurs */ public boolean storesMixedCaseQuotedIdentifiers() throws SQLException { return false; } /** * Retrieves the string used to quote SQL identifiers. * This method returns a space " " if identifier quoting is not supported.

    * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB uses the standard SQL identifier quote character * (the double quote character); this method always returns ". *

    * * @return the quoting string or a space if quoting is not supported * @exception SQLException if a database access error occurs */ public String getIdentifierQuoteString() throws SQLException { return "\""; } //fredt@users 20020429 - JavaDoc comment - in 1.7.1 there are keywords such // as TEMP, TEXT, CACHED that are not SQL 92 keywords /** * Retrieves a comma-separated list of all of this database's SQL keywords * that are NOT also SQL92 keywords.

    * * *

    *

    HSQLDB-Specific Information:

    * * The list returned contains HSQLDB keywords that are not in the list * of reserved words. Some of these are in the list reserved * words for SQL 2003 but are not SQL92 keywords. *

    * * * * @return the list of this database's keywords that are not also * SQL92 keywords * @exception SQLException if a database access error occurs */ public String getSQLKeywords() throws SQLException { return "BEFORE,BIGINT,BINARY,CACHED,DATETIME," + "LIMIT,LONGVARBINARY,LONGVARCHAR,OBJECT,OTHER,SAVEPOINT," + "TEMP,TEXT,TOP,TRIGGER,TINYINT,VARBINARY,VARCHAR_IGNORECASE"; } /** * Retrieves a comma-separated list of math functions available with * this database. These are the Open Group CLI math function names used in * the JDBC function escape clause. * @return the list of math functions supported by this database * @exception SQLException if a database access error occurs */ public String getNumericFunctions() throws SQLException { return StringUtil.getList(Library.sNumeric, ",", ""); } /** * Retrieves a comma-separated list of string functions available with * this database. These are the Open Group CLI string function names used * in the JDBC function escape clause. * @return the list of string functions supported by this database * @exception SQLException if a database access error occurs */ public String getStringFunctions() throws SQLException { return StringUtil.getList(Library.sString, ",", ""); } /** * Retrieves a comma-separated list of system functions available with * this database. These are the Open Group CLI system function names used * in the JDBC function escape clause. * @return a list of system functions supported by this database * @exception SQLException if a database access error occurs */ public String getSystemFunctions() throws SQLException { return StringUtil.getList(Library.sSystem, ",", ""); } /** * Retrieves a comma-separated list of the time and date functions available * with this database. * @return the list of time and date functions supported by this database * @exception SQLException if a database access error occurs */ public String getTimeDateFunctions() throws SQLException { return StringUtil.getList(Library.sTimeDate, ",", ""); } /** * Retrieves the string that can be used to escape wildcard characters. * This is the string that can be used to escape '_' or '%' in * the catalog search parameters that are a pattern (and therefore use one * of the wildcard characters). * *

    The '_' character represents any single character; * the '%' character represents any sequence of zero or * more characters.

    * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB uses the "\" character to escape wildcard characters. *

    * * * * @return the string used to escape wildcard characters * @exception SQLException if a database access error occurs */ public String getSearchStringEscape() throws SQLException { return "\\"; } /** * Retrieves all the "extra" characters that can be used in unquoted * identifier names (those beyond a-z, A-Z, 0-9 and _).

    * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB does not support using any "extra" characters in unquoted * identifier names; this method always returns the empty String. *

    * * * * @return the string containing the extra characters * @exception SQLException if a database access error occurs */ public String getExtraNameCharacters() throws SQLException { return ""; } //-------------------------------------------------------------------- // Functions describing which features are supported. /** * Retrieves whether this database supports ALTER TABLE * with add column.

    * * *

    *

    HSQLDB-Specific Information:

    * * From 1.7.0, HSQLDB supports this type of * ALTER TABLE statement; this method always * returns true. *

    * * @return true if so; false otherwise * @exception SQLException if a database access error occurs */ public boolean supportsAlterTableWithAddColumn() throws SQLException { return true; } /** * Retrieves whether this database supports ALTER TABLE * with drop column.

    * * *

    *

    HSQLDB-Specific Information:

    * * From 1.7.0, HSQLDB supports this type of * ALTER TABLE statement; this method always * returns true. *

    * * @return true if so; false otherwise * @exception SQLException if a database access error occurs */ public boolean supportsAlterTableWithDropColumn() throws SQLException { return true; } /** * Retrieves whether this database supports column aliasing. * *

    If so, the SQL AS clause can be used to provide names for * computed columns or to provide alias names for columns as * required.

    * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB supports column aliasing; this method always * returns true. *

    * * * * @return true if so; false otherwise * @exception SQLException if a database access error occurs */ public boolean supportsColumnAliasing() throws SQLException { return true; } /** * Retrieves whether this database supports concatenations between * NULL and non-NULL values being * NULL.

    * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB supports this; this method always * returns true. *

    * * * * @return true if so; false otherwise * @exception SQLException if a database access error occurs */ public boolean nullPlusNonNullIsNull() throws SQLException { return true; } /** * Retrieves whether this database supports the CONVERT * function between SQL types.

    * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB supports conversions; this method always * returns true. *

    * * * * @return true if so; false otherwise * @exception SQLException if a database access error occurs */ public boolean supportsConvert() throws SQLException { return true; } // fredt@users - JD comment - I think this is unsupported at the moment // because SQL92 says conversion is implementation dependent, so if // conversion from DOUBLE to INTEGER were possbible we would return the // whole number part, but we currently throw. I'm not so sure about // conversions between string and numeric where it is logically possible // only if the string represents a numeric value /** * Retrieves whether this database supports the CONVERT * for two given SQL types.

    * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB supports conversion though String intermediates, so everything * should be possible, short of number format errors (all Java objects * have a toString method); this method always returns true. *

    * * * * @param fromType the type to convert from; one of the type codes from * the class java.sql.Types * @param toType the type to convert to; one of the type codes from * the class java.sql.Types * @return true if so; false otherwise * @exception SQLException if a database access error occurs * @see java.sql.Types */ public boolean supportsConvert(int fromType, int toType) throws SQLException { return true; } /** * Retrieves whether this database supports table correlation names.

    * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB supports table correlation names; this method always * returns true. *

    * * * * @return true if so; false otherwise * @exception SQLException if a database access error occurs */ public boolean supportsTableCorrelationNames() throws SQLException { return true; } /** * Retrieves whether, when table correlation names are supported, they * are restricted to being different from the names of the tables.

    * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB requires that table correlation names are different from the * names of the tables; this method always returns true. *

    * * * * @return true if so; false otherwise * @exception SQLException if a database access error occurs */ public boolean supportsDifferentTableCorrelationNames() throws SQLException { return true; } /** * Retrieves whether this database supports expressions in * ORDER BY lists.

    * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB supports expressions in ORDER BY lists; this * method always returns true. *

    * * * * @return true if so; false otherwise * @exception SQLException if a database access error occurs */ public boolean supportsExpressionsInOrderBy() throws SQLException { return true; } /** * Retrieves whether this database supports using a column that is * not in the SELECT statement in an * ORDER BY clause.

    * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB supports using a column that is not in the SELECT * statement in an ORDER BY clause; this method always * returns true. *

    * * * * @return true if so; false otherwise * @exception SQLException if a database access error occurs */ public boolean supportsOrderByUnrelated() throws SQLException { return true; } /** * Retrieves whether this database supports some form of * GROUP BY clause.

    * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB supports using the GROUP BY clause; this method * always returns true. *

    * * * * @return true if so; false otherwise * @exception SQLException if a database access error occurs */ public boolean supportsGroupBy() throws SQLException { return true; } /** * Retrieves whether this database supports using a column that is * not in the SELECT statement in a * GROUP BY clause.

    * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB supports using a column that is * not in the SELECT statement in a * GROUP BY clause; this method * always returns true. *

    * * * * @return true if so; false otherwise * @exception SQLException if a database access error occurs */ public boolean supportsGroupByUnrelated() throws SQLException { return true; } /** * Retrieves whether this database supports using columns not included in * the SELECT statement in a GROUP BY clause * provided that all of the columns in the SELECT statement * are included in the GROUP BY clause.

    * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB supports using columns not included in * the SELECT statement in a GROUP BY clause * provided that all of the columns in the SELECT statement * are included in the GROUP BY clause; this method * always returns true. *

    * * * * @return true if so; false otherwise * @exception SQLException if a database access error occurs */ public boolean supportsGroupByBeyondSelect() throws SQLException { return true; } /** * Retrieves whether this database supports specifying a * LIKE escape clause.

    * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB supports specifying a * LIKE escape clause; this method * always returns true. *

    * * * * @return true if so; false otherwise * @exception SQLException if a database access error occurs */ public boolean supportsLikeEscapeClause() throws SQLException { return true; } /** * Retrieves whether this database supports getting multiple * ResultSet objects from a single call to the * method execute.

    * * *

    *

    HSQLDB-Specific Information:

    * * Up to and including 1.7.2, HSQLDB does not support getting multiple * ResultSet objects from a single call to the * method execute; this method * always returns false.

    * * This behaviour may change in a future release. *

    * * @return true if so; false otherwise * @exception SQLException if a database access error occurs */ public boolean supportsMultipleResultSets() throws SQLException { return false; } /** * Retrieves whether this database allows having multiple * transactions open at once (on different connections).

    * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB allows having multiple * transactions open at once (on different connections); this method * always returns true. *

    * * * * @return true if so; false otherwise * @exception SQLException if a database access error occurs */ public boolean supportsMultipleTransactions() throws SQLException { return true; } /** * Retrieves whether columns in this database may be defined as * non-nullable.

    * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB supports the specification of non-nullable columns; this method * always returns true. *

    * * * * @return true if so; false otherwise * @exception SQLException if a database access error occurs */ public boolean supportsNonNullableColumns() throws SQLException { return true; } /** * Retrieves whether this database supports the ODBC Minimum SQL grammar.

    * * *

    *

    HSQLDB-Specific Information:

    * * Up to and including 1.7.2, HSQLDB does not support the ODBC * Minimum SQL grammar; this method * always returns false. *

    * * @return true if so; false otherwise * @exception SQLException if a database access error occurs */ public boolean supportsMinimumSQLGrammar() throws SQLException { return false; } /** * Retrieves whether this database supports the ODBC Core SQL grammar.

    * * *

    *

    HSQLDB-Specific Information:

    * * From 1.7.2 this method always returns true. *

    * * @return true if so; false otherwise * @exception SQLException if a database access error occurs */ public boolean supportsCoreSQLGrammar() throws SQLException { return true; } /** * Retrieves whether this database supports the ODBC Extended SQL grammar.

    * * *

    *

    HSQLDB-Specific Information:

    * * Up to and including 1.7.2, HSQLDB does not support the ODBC * Extended SQL grammar; this method * always returns false. *

    * * @return true if so; false otherwise * @exception SQLException if a database access error occurs */ public boolean supportsExtendedSQLGrammar() throws SQLException { return false; } /** * Retrieves whether this database supports the ANSI92 entry level SQL * grammar.

    * * *

    *

    HSQLDB-Specific Information:

    * * Up to and including 1.7.2, HSQLDB does not support the ANSI92 entry * level SQL grammar; this method * always returns false. *

    * * @return true if so; false otherwise * @exception SQLException if a database access error occurs */ public boolean supportsANSI92EntryLevelSQL() throws SQLException { return false; } /** * Retrieves whether this database supports the ANSI92 intermediate SQL * grammar supported.

    * * *

    *

    HSQLDB-Specific Information:

    * * Up to and including 1.7.2, HSQLDB does not support the ANSI92 * intermediate SQL grammar; this method always returns * false. *

    * * @return true if so; false otherwise * @exception SQLException if a database access error occurs */ public boolean supportsANSI92IntermediateSQL() throws SQLException { return false; } /** * Retrieves whether this database supports the ANSI92 full SQL * grammar supported.

    * * *

    *

    HSQLDB-Specific Information:

    * * Up to and including 1.7.2, HSQLDB does not support the ANSI92 * full SQL grammar; this method always returns * false. *

    * * @return true if so; false otherwise * @exception SQLException if a database access error occurs */ public boolean supportsANSI92FullSQL() throws SQLException { return false; } // fredt@users 20030413 - return value change to support OpenOffice.org /** * Retrieves whether this database supports the SQL Integrity * Enhancement Facility.

    * * *

    *

    HSQLDB-Specific Information:

    * * From 1.7.2, this method always returns * true. *

    * * @return true if so; false otherwise * @exception SQLException if a database access error occurs */ public boolean supportsIntegrityEnhancementFacility() throws SQLException { return true; } /** * Retrieves whether this database supports some form of outer join.

    * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB supports outer joins; this method always returns * true. *

    * * * * @return true if so; false otherwise * @exception SQLException if a database access error occurs */ public boolean supportsOuterJoins() throws SQLException { return true; } /** * Retrieves whether this database supports full nested outer joins.

    * * *

    *

    HSQLDB-Specific Information:

    * * Up to and including 1.7.2, HSQLDB does not support full nested outer * joins; this method always returns false.

    * * This behaviour may change in a future release. *

    * * @return true if so; false otherwise * @exception SQLException if a database access error occurs */ public boolean supportsFullOuterJoins() throws SQLException { return false; } /** * Retrieves whether this database provides limited support for outer * joins. (This will be true if the method * supportsFullOuterJoins returns true).

    * * *

    *

    HSQLDB-Specific Information:

    * * Up to and including 1.7.2, HSQLDB support the LEFT OUTER join syntax; * this method always returns true. *

    * * @return true if so; false otherwise * @exception SQLException if a database access error occurs */ public boolean supportsLimitedOuterJoins() throws SQLException { return true; } /** * Retrieves the database vendor's preferred term for "schema".

    * * *

    *

    HSQLDB-Specific Information:

    * * Starting with 1.8.0, HSQLDB provides support for schemas. *

    * * @return the vendor term for "schema" * @exception SQLException if a database access error occurs */ public String getSchemaTerm() throws SQLException { return "SCHEMA"; } /** * Retrieves the database vendor's preferred term for "procedure".

    * * *

    *

    HSQLDB-Specific Information:

    * * Up to and including 1.7.2, HSQLDB does not support declaration of * functions or procedures directly in SQL but instead relies on the * HSQLDB-specific CLASS grant mechanism to make public static * Java methods available as SQL routines; this method always returns * an empty String. *

    * * @return the vendor term for "procedure" * @exception SQLException if a database access error occurs */ public String getProcedureTerm() throws SQLException { return ""; } /** * Retrieves the database vendor's preferred term for "catalog".

    * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB does not support catalogs in DDL or DML; * this method always returns the empty String. *

    * * * @return the vendor term for "catalog" * @exception SQLException if a database access error occurs */ public String getCatalogTerm() throws SQLException { return ""; } /** * Retrieves whether a catalog appears at the start of a fully qualified * table name. If not, the catalog appears at the end.

    * * *

    *

    HSQLDB-Specific Information:

    * * Up to and including 1.7.2, HSQLDB does not support catalogs in DDL or DML; * this method always returns false. *

    * * @return true if the catalog name appears at the beginning * of a fully qualified table name; false otherwise * @exception SQLException if a database access error occurs */ public boolean isCatalogAtStart() throws SQLException { return false; } /** * Retrieves the String that this database uses as the * separator between a catalog and table name.

    * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB does not support catalogs in DDL or DML; * this method always returns an empty String. *

    * * * @return the separator string * @exception SQLException if a database access error occurs */ public String getCatalogSeparator() throws SQLException { return ""; } /** * Retrieves whether a schema name can be used in a data * manipulation statement.

    * * *

    *

    HSQLDB-Specific Information:

    * * In 1.8.0, HSQLDB supports schemas in table names but not in column names; * this method always returns false. * *

    * * @return true if so; false otherwise * @exception SQLException if a database access error occurs */ public boolean supportsSchemasInDataManipulation() throws SQLException { // false for OOo client server compatibility // otherwise schema name is used by OOo in column references return false; } /** * Retrieves whether a schema name can be used in a procedure call * statement.

    * * *

    *

    HSQLDB-Specific Information:

    * * Up to and including 1.7.2, HSQLDB does not support schema-qualified * procedure identifiers; this method always returns false. *

    * * @return true if so; false otherwise * @exception SQLException if a database access error occurs */ public boolean supportsSchemasInProcedureCalls() throws SQLException { return false; } /** * Retrieves whether a schema name can be used in a table * definition statement.

    * * *

    *

    HSQLDB-Specific Information:

    * * In 1.8.0, HSQLDB supports schemas; * By default, this method returns true. * *

    * * @return true if so; false otherwise * @exception SQLException if a database access error occurs */ public boolean supportsSchemasInTableDefinitions() throws SQLException { return !useSchemaDefault; } /** * Retrieves whether a schema name can be used in an index * definition statement.

    * * *

    *

    HSQLDB-Specific Information:

    * * In 1.8.0, HSQLDB supports schemas; * By default, this method returns true. * *

    * * @return true if so; false otherwise * @exception SQLException if a database access error occurs */ public boolean supportsSchemasInIndexDefinitions() throws SQLException { return !useSchemaDefault; } /** * Retrieves whether a schema name can be used in a privilege * definition statement.

    * * *

    *

    HSQLDB-Specific Information:

    * * In 1.8.0, HSQLDB supports schemas; * By default, this method returns true. * *

    * * @return true if so; false otherwise * @exception SQLException if a database access error occurs */ public boolean supportsSchemasInPrivilegeDefinitions() throws SQLException { return !useSchemaDefault; } /** * Retrieves whether a catalog name can be used in a data * manipulation statement.

    * * *

    *

    HSQLDB-Specific Information:

    * * Up to and including 1.7.2, HSQLDB does not support catalog-qualified; * data manipulation; this method always returns false. *

    * * @return true if so; false otherwise * @exception SQLException if a database access error occurs */ public boolean supportsCatalogsInDataManipulation() throws SQLException { return false; } /** * Retrieves whether a catalog name can be used in a * procedure call statement.

    * * *

    *

    HSQLDB-Specific Information:

    * * Up to and including 1.7.2, HSQLDB does not support catalog-qualified * procedure calls; this method always returns false. *

    * * @return true if so; false otherwise * @exception SQLException if a database access error occurs */ public boolean supportsCatalogsInProcedureCalls() throws SQLException { return false; } /** * Retrieves whether a catalog name can be used in a * table definition statement.

    * * *

    *

    HSQLDB-Specific Information:

    * * Up to and including 1.7.2, HSQLDB does not support catalog-qualified * table definitions; this method always returns false. *

    * * @return true if so; false otherwise * @exception SQLException if a database access error occurs */ public boolean supportsCatalogsInTableDefinitions() throws SQLException { return false; } /** * Retrieves whether a catalog name can be used in an * index definition statement.

    * * *

    *

    HSQLDB-Specific Information:

    * * Up to and including 1.7.2, HSQLDB does not support catalog-qualified * index definitions; this method always returns false. *

    * * @return true if so; false otherwise * @exception SQLException if a database access error occurs */ public boolean supportsCatalogsInIndexDefinitions() throws SQLException { return false; } /** * Retrieves whether a catalog name can be used in a * privilege definition statement.

    * * *

    *

    HSQLDB-Specific Information:

    * * Up to and including 1.7.2, HSQLDB does not support catalog-qualified * privilege definitions; this method always returns false. *

    * * @return true if so; false otherwise * @exception SQLException if a database access error occurs */ public boolean supportsCatalogsInPrivilegeDefinitions() throws SQLException { return false; } /** * Retrieves whether this database supports positioned DELETE * statements.

    * * *

    *

    HSQLDB-Specific Information:

    * * Up to and including 1.7.2, HSQLDB does not support updateable * result sets; this method always returns false. *

    * * @return true if so; false otherwise * @exception SQLException if a database access error occurs */ public boolean supportsPositionedDelete() throws SQLException { return false; } /** * Retrieves whether this database supports positioned UPDATE * statements.

    * * *

    *

    HSQLDB-Specific Information:

    * * Up to and including 1.7.2, HSQLDB does not support updateable * result sets; this method always returns false. *

    * * @return true if so; false otherwise * @exception SQLException if a database access error occurs */ public boolean supportsPositionedUpdate() throws SQLException { return false; } /** * Retrieves whether this database supports SELECT FOR UPDATE * statements.

    * * *

    *

    HSQLDB-Specific Information:

    * * Up to and including 1.7.2, HSQLDB does not support explicit locking; * this method always returns false. *

    * * @return true if so; false otherwise * @exception SQLException if a database access error occurs */ public boolean supportsSelectForUpdate() throws SQLException { return false; } /** * Retrieves whether this database supports stored procedure calls * that use the stored procedure escape syntax.

    * * *

    *

    HSQLDB-Specific Information:

    * * Up to and including 1.7.2, HSQLDB supports calling public static * Java methods in the context of SQL Stored Procedures; this method * always returns true. *

    * * @return true if so; false otherwise * @exception SQLException if a database access error occurs * @see jdbcPreparedStatement * @see jdbcConnection#prepareCall */ public boolean supportsStoredProcedures() throws SQLException { return true; } /** * Retrieves whether this database supports subqueries in comparison * expressions.

    * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB has always supported subqueries in comparison expressions; * this method always returns true. *

    * * * * @return true if so; false otherwise * @exception SQLException if a database access error occurs */ public boolean supportsSubqueriesInComparisons() throws SQLException { return true; } /** * Retrieves whether this database supports subqueries in * EXISTS expressions.

    * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB has always supported subqueries in EXISTS * expressions; this method always returns true. *

    * * * * @return true if so; false otherwise * @exception SQLException if a database access error occurs */ public boolean supportsSubqueriesInExists() throws SQLException { return true; } /** * JDBC4 correction: Retrieves whether this database supports subqueries in * IN expressions.

    * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB has always supported subqueries in IN * statements; this method always returns true. *

    * * * * @return true if so; false otherwise * @exception SQLException if a database access error occurs */ public boolean supportsSubqueriesInIns() throws SQLException { return true; } /** * Retrieves whether this database supports subqueries in quantified * expressions.

    * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB has always supported subqueries in quantified * expressions; this method always returns true. *

    * * * * @return true if so; false otherwise * @exception SQLException if a database access error occurs */ public boolean supportsSubqueriesInQuantifieds() throws SQLException { return true; } /** * Retrieves whether this database supports correlated subqueries.

    * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB has always supported correlated subqueries; * this method always returns true. *

    * * * * @return true if so; false otherwise * @exception SQLException if a database access error occurs */ public boolean supportsCorrelatedSubqueries() throws SQLException { return true; } /** * Retrieves whether this database supports SQL UNION.

    * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB supports SQL UNION; * this method always returns true. *

    * * * * @return true if so; false otherwise * @exception SQLException if a database access error occurs */ public boolean supportsUnion() throws SQLException { return true; } /** * Retrieves whether this database supports SQL UNION ALL.

    * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB supports SQL UNION ALL; * this method always returns true. *

    * * * * @return true if so; false otherwise * @exception SQLException if a database access error occurs */ public boolean supportsUnionAll() throws SQLException { return true; } /** * Retrieves whether this database supports keeping cursors open * across commits.

    * * *

    *

    HSQLDB-Specific Information:

    * * Up to and including 1.7.2, HSQLDB does not support keeping * cursors open across commits; this method always returns * false. *

    * * @return true if cursors always remain open; * false if they might not remain open * @exception SQLException if a database access error occurs */ public boolean supportsOpenCursorsAcrossCommit() throws SQLException { return false; } /** * Retrieves whether this database supports keeping cursors open * across rollbacks.

    * * *

    *

    HSQLDB-Specific Information:

    * * Up to and including 1.7.2, HSQLDB does not support keeping * cursors open across rollbacks; * this method always returns false. *

    * * @return true if cursors always remain open; * false if they might not remain open * @exception SQLException if a database access error occurs */ public boolean supportsOpenCursorsAcrossRollback() throws SQLException { return false; } /** * Retrieves whether this database supports keeping statements open * across commits.

    * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB supports keeping statements open * across commits; * this method always returns true. *

    * * * * @return true if statements always remain open; * false if they might not remain open * @exception SQLException if a database access error occurs */ public boolean supportsOpenStatementsAcrossCommit() throws SQLException { return true; } /** * Retrieves whether this database supports keeping statements open * across rollbacks.

    * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB supports keeping statements open * across commits; * this method always returns true. *

    * * * * @return true if statements always remain open; * false if they might not remain open * @exception SQLException if a database access error occurs */ public boolean supportsOpenStatementsAcrossRollback() throws SQLException { return true; } //---------------------------------------------------------------------- // The following group of methods exposes various limitations // based on the target database with the current driver. // Unless otherwise specified, a result of zero means there is no // limit, or the limit is not known. /** * Retrieves the maximum number of hex characters this database allows in an * inline binary literal.

    * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB does not impose a "known" limit. The hard limit is the maximum * length of a java.lang.String (java.lang.Integer.MAX_VALUE); * this method always returns 0. *

    * * * * @return max the maximum length (in hex characters) for a binary literal; * a result of zero means that there is no limit or the limit * is not known * @exception SQLException if a database access error occurs */ public int getMaxBinaryLiteralLength() throws SQLException { // hard limit is Integer.MAX_VALUE return 0; } /** * Retrieves the maximum number of characters this database allows * for a character literal.

    * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB does not impose a "known" limit. The hard limit is the maximum * length of a java.lang.String (java.lang.Integer.MAX_VALUE); * this method always returns 0. *

    * * * @return the maximum number of characters allowed for a character literal; * a result of zero means that there is no limit or the limit is * not known * @exception SQLException if a database access error occurs */ public int getMaxCharLiteralLength() throws SQLException { // hard limit is Integer.MAX_VALUE return 0; } /** * Retrieves the maximum number of characters this database allows * for a column name.

    * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB does not impose a "known" limit. The hard limit is the maximum * length of a java.lang.String (java.lang.Integer.MAX_VALUE); * this method always returns 0. *

    * * * @return the maximum number of characters allowed for a column name; * a result of zero means that there is no limit or the limit * is not known * @exception SQLException if a database access error occurs */ public int getMaxColumnNameLength() throws SQLException { // hard limit is Integer.MAX_VALUE return 0; } /** * Retrieves the maximum number of columns this database allows in a * GROUP BY clause.

    * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB does not impose a "known" limit. The hard limit is the maximum * length of a Java array (java.lang.Integer.MAX_VALUE); * this method always returns 0. *

    * * * @return the maximum number of columns allowed; * a result of zero means that there is no limit or the limit * is not known * @exception SQLException if a database access error occurs */ public int getMaxColumnsInGroupBy() throws SQLException { // hard limit is Integer.MAX_VALUE return 0; } /** * Retrieves the maximum number of columns this database allows in * an index.

    * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB does not impose a "known" limit. The hard limit is the maximum * length of a Java array (java.lang.Integer.MAX_VALUE); * this method always returns 0. *

    * * * @return the maximum number of columns allowed; * a result of zero means that there is no limit or the limit * is not known * @exception SQLException if a database access error occurs */ public int getMaxColumnsInIndex() throws SQLException { // hard limit is Integer.MAX_VALUE return 0; } /** * Retrieves the maximum number of columns this database allows in an * ORDER BY clause.

    * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB does not impose a "known" limit. The hard limit is the maximum * length of a Java array (java.lang.Integer.MAX_VALUE); * this method always returns 0. *

    * * * @return the maximum number of columns allowed; * a result of zero means that there is no limit or the limit * is not known * @exception SQLException if a database access error occurs */ public int getMaxColumnsInOrderBy() throws SQLException { // hard limit is Integer.MAX_VALUE return 0; } /** * Retrieves the maximum number of columns this database allows in a * SELECT list.

    * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB does not impose a "known" limit. The hard limit is the maximum * length of a Java array (java.lang.Integer.MAX_VALUE); * this method always returns 0. *

    * * * @return the maximum number of columns allowed; * a result of zero means that there is no limit or the limit * is not known * @exception SQLException if a database access error occurs */ public int getMaxColumnsInSelect() throws SQLException { // hard limit is Integer.MAX_VALUE return 0; } /** * Retrieves the maximum number of columns this database allows in * a table.

    * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB does not impose a "known" limit. The hard limit is the maximum * length of a Java array (java.lang.Integer.MAX_VALUE); * this method always returns 0. *

    * * * @return the maximum number of columns allowed; * a result of zero means that there is no limit or the limit * is not known * @exception SQLException if a database access error occurs */ public int getMaxColumnsInTable() throws SQLException { // hard limit is Integer.MAX_VALUE return 0; } /** * Retrieves the maximum number of concurrent connections to this * database that are possible.

    * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB does not impose a "known" limit. The hard limit is the maximum * length of a Java array (java.lang.Integer.MAX_VALUE); * this method always returns 0. *

    * * * @return the maximum number of active connections possible at one time; * a result of zero means that there is no limit or the limit * is not known * @exception SQLException if a database access error occurs */ public int getMaxConnections() throws SQLException { // hard limit is (probably) Integer.MAX_VALUE return 0; } /** * Retrieves the maximum number of characters that this database allows in a * cursor name.

    * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB does not impose a "known" limit. The hard limit is the maximum * length of a java.lang.String (java.lang.Integer.MAX_VALUE); * this method always returns 0. *

    * * * @return the maximum number of characters allowed in a cursor name; * a result of zero means that there is no limit or the limit * is not known * @exception SQLException if a database access error occurs */ public int getMaxCursorNameLength() throws SQLException { return 0; } /** * Retrieves the maximum number of bytes this database allows for an * index, including all of the parts of the index.

    * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB does not impose a "known" limit; * this method always returns 0. *

    * * * @return the maximum number of bytes allowed; this limit includes the * composite of all the constituent parts of the index; * a result of zero means that there is no limit or the limit * is not known * @exception SQLException if a database access error occurs */ public int getMaxIndexLength() throws SQLException { return 0; } /** * Retrieves the maximum number of characters that this database allows in a * schema name.

    * * *

    *

    HSQLDB-Specific Information:

    * * 1.8.0 supports schema names with no known limit imposed, * so this method always returns 0. *

    * * @return the maximum number of characters allowed in a schema name; * a result of zero means that there is no limit or the limit * is not known * @exception SQLException if a database access error occurs */ public int getMaxSchemaNameLength() throws SQLException { return 0; } /** * Retrieves the maximum number of characters that this database allows in a * procedure name.

    * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB does not impose a "known" limit. The hard limit is the maximum * length of a java.lang.String (java.lang.Integer.MAX_VALUE); * this method always returns 0. *

    * * * @return the maximum number of characters allowed in a procedure name; * a result of zero means that there is no limit or the limit * is not known * @exception SQLException if a database access error occurs */ public int getMaxProcedureNameLength() throws SQLException { return 0; } /** * Retrieves the maximum number of characters that this database allows in a * catalog name.

    * * *

    *

    HSQLDB-Specific Information:

    * * Up to and including 1.7.2, HSQLDB does not support catalogs in * DDL or DML; this method always returns 0. *

    * * * @return the maximum number of characters allowed in a catalog name; * a result of zero means that there is no limit or the limit * is not known * @exception SQLException if a database access error occurs */ public int getMaxCatalogNameLength() throws SQLException { return 0; } /** * Retrieves the maximum number of bytes this database allows in * a single row.

    * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB does not impose a "known" limit; * this method always returns 0. *

    * * * @return the maximum number of bytes allowed for a row; a result of * zero means that there is no limit or the limit is not known * @exception SQLException if a database access error occurs */ public int getMaxRowSize() throws SQLException { return 0; } /** * Retrieves whether the return value for the method * getMaxRowSize includes the SQL data types * LONGVARCHAR and LONGVARBINARY.

    * * *

    *

    HSQLDB-Specific Indormation:

    * * Including 1.7.2, {@link #getMaxRowSize} always returns * 0, indicating that the maximum row size is unknown or has no limit. * This applies to the above types as well; this method always * returns true. *

    * * * * @return true if so; false otherwise * @exception SQLException if a database access error occurs */ public boolean doesMaxRowSizeIncludeBlobs() throws SQLException { return true; } /** * Retrieves the maximum number of characters this database allows in * an SQL statement.

    * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB does not impose a "known" limit. The hard limit is the maximum * length of a java.lang.String (java.lang.Integer.MAX_VALUE); * this method always returns 0. *

    * * * @return the maximum number of characters allowed for an SQL statement; * a result of zero means that there is no limit or the limit * is not known * @exception SQLException if a database access error occurs */ public int getMaxStatementLength() throws SQLException { return 0; } /** * Retrieves the maximum number of active statements to this database * that can be open at the same time.

    * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB does not impose a "known" limit; * this method always returns 0. *

    * * * @return the maximum number of statements that can be open at one time; * a result of zero means that there is no limit or the limit * is not known * @exception SQLException if a database access error occurs */ public int getMaxStatements() throws SQLException { return 0; } /** * Retrieves the maximum number of characters this database allows in * a table name.

    * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB does not impose a "known" limit. The hard limit is the maximum * length of a java.lang.String (java.lang.Integer.MAX_VALUE); * this method always returns 0. *

    * * * @return the maximum number of characters allowed for a table name; * a result of zero means that there is no limit or the limit * is not known * @exception SQLException if a database access error occurs */ public int getMaxTableNameLength() throws SQLException { return 0; } /** * Retrieves the maximum number of tables this database allows in a * SELECT statement.

    * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB does not impose a "known" limit. The hard limit is the maximum * length of a Java array (java.lang.Integer.MAX_VALUE); * this method always returns 0. *

    * * * @return the maximum number of tables allowed in a SELECT * statement; a result of zero means that there is no limit or * the limit is not known * @exception SQLException if a database access error occurs */ public int getMaxTablesInSelect() throws SQLException { // - soft limit is >>> than will ever be seen in any real stmnt // - exists a fixed (non statement dependent) hard limit? No. // - depends totally on number of table idents that can fit in // Integer.MAX_VALUE characters, minus the rest of the stmnt return 0; } /** * Retrieves the maximum number of characters this database allows in * a user name.

    * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB does not impose a "known" limit. The hard limit is the maximum * length of a java.lang.String (java.lang.Integer.MAX_VALUE); * this method always returns 0. *

    * * * @return the maximum number of characters allowed for a user name; * a result of zero means that there is no limit or the limit * is not known * @exception SQLException if a database access error occurs */ public int getMaxUserNameLength() throws SQLException { // hard limit is Integer.MAX_VALUE return 0; } //---------------------------------------------------------------------- /** * Retrieves this database's default transaction isolation level. The * possible values are defined in java.sql.Connection.

    * * *

    *

    HSQLDB-Specific Information

    * * Including 1.7.2, HSQLDB supports only TRANSACTION_READ_UNCOMMITED * and always returns this value here. *
    * * * @return the default isolation level * @exception SQLException if a database access error occurs * @see jdbcConnection */ public int getDefaultTransactionIsolation() throws SQLException { return Connection.TRANSACTION_READ_UNCOMMITTED; } /** * Retrieves whether this database supports transactions. If not, invoking the * method commit is a noop, and the isolation level is * TRANSACTION_NONE.

    * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB supports transactions; * this method always returns true. *

    * * @return true if transactions are supported; * false otherwise * @exception SQLException if a database access error occurs */ public boolean supportsTransactions() throws SQLException { return true; } /** * Retrieves whether this database supports the given transaction * isolation level.

    * * *

    *

    HSQLDB-Specific Information

    * HSQLDB supports TRANSACTION_READ_UNCOMMITED in all cases * and the rest of the isolation levels where there is only one connection * to the database. *
    * * * * @param level one of the transaction isolation levels defined in * java.sql.Connection * @return true if so; false otherwise * @exception SQLException if a database access error occurs * @see jdbcConnection */ public boolean supportsTransactionIsolationLevel(int level) throws SQLException { return level == Connection.TRANSACTION_READ_UNCOMMITTED || level == Connection.TRANSACTION_READ_COMMITTED || level == Connection.TRANSACTION_REPEATABLE_READ || level == Connection.TRANSACTION_SERIALIZABLE; } /** * Retrieves whether this database supports both data definition and * data manipulation statements within a transaction.

    * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB does not support a mix of both data definition and * data manipulation statements within a transaction. DDL commits the * current transaction before proceding; * this method always returns false. *

    * * * * @return true if so; false otherwise * @exception SQLException if a database access error occurs */ public boolean supportsDataDefinitionAndDataManipulationTransactions() throws SQLException { return false; } /** * Retrieves whether this database supports only data manipulation * statements within a transaction.

    * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB supports only data manipulation * statements within a transaction. DDL commits the * current transaction before proceeding, while DML does not; * this method always returns true. *

    * * * * @return true if so; false otherwise * @exception SQLException if a database access error occurs */ public boolean supportsDataManipulationTransactionsOnly() throws SQLException { return true; } /** * Retrieves whether a data definition statement within a transaction forces * the transaction to commit.

    * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, a data definition statement within a transaction forces * the transaction to commit; this method always returns true. *

    * * * * @return true if so; false otherwise * @exception SQLException if a database access error occurs */ public boolean dataDefinitionCausesTransactionCommit() throws SQLException { return true; } /** * Retrieves whether this database ignores a data definition statement * within a transaction.

    * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, a data definition statement is not ignored within a * transaction. Rather, a data definition statement within a * transaction forces the transaction to commit; this method * always returns false. *

    * * * * @return true if so; false otherwise * @exception SQLException if a database access error occurs */ public boolean dataDefinitionIgnoredInTransactions() throws SQLException { return false; } /** * Retrieves a description of the stored procedures available in the given * catalog. *

    * Only procedure descriptions matching the schema and * procedure name criteria are returned. They are ordered by * PROCEDURE_SCHEM and PROCEDURE_NAME. * *

    Each procedure description has the the following columns: *

      *
    1. PROCEDURE_CAT String => procedure catalog (may be null) *
    2. PROCEDURE_SCHEM String => procedure schema (may be null) *
    3. PROCEDURE_NAME String => procedure name *
    4. reserved for future use *
    5. reserved for future use *
    6. reserved for future use *
    7. REMARKS String => explanatory comment on the procedure *
    8. PROCEDURE_TYPE short => kind of procedure: *
        *
      • procedureResultUnknown - May return a result *
      • procedureNoResult - Does not return a result *
      • procedureReturnsResult - Returns a result *
      *

    * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB treats unquoted identifiers as case insensitive in SQL but stores * them in upper case; it treats quoted identifiers as case sensitive and * stores them verbatim. All jdbcDatabaseMetaData methods perform * case-sensitive comparison between name (pattern) arguments and the * corresponding identifier values as they are stored in the database. * Therefore, care must be taken to specify name arguments precisely * (including case) as they are stored in the database.

    * * Since 1.7.2, this feature is supported by default. If the jar is * compiled without org.hsqldb.DatabaseInformationFull or * org.hsqldb.DatabaseInformationMain, the feature is * not supported. The default implementation is * {@link org.hsqldb.DatabaseInformationFull}. *

    * * * @param catalog a catalog name; must match the catalog name as it * is stored in the database; "" retrieves those without a catalog; * null means that the catalog name should not be used * to narrow the search * @param schemaPattern a schema name pattern; must match the schema name * as it is stored in the database; "" retrieves those without a * schema; null means that the schema name should not be * used to narrow the search * @param procedureNamePattern a procedure name pattern; must match the * procedure name as it is stored in the database * @return ResultSet - each row is a procedure description * @exception SQLException if a database access error occurs * @see #getSearchStringEscape */ public ResultSet getProcedures(String catalog, String schemaPattern, String procedureNamePattern) throws SQLException { if (wantsIsNull(procedureNamePattern)) { return executeSelect("SYSTEM_PROCEDURES", "0=1"); } schemaPattern = translateSchema(schemaPattern); StringBuffer select = toQueryPrefix("SYSTEM_PROCEDURES").append( and("PROCEDURE_CAT", "=", catalog)).append( and("PROCEDURE_SCHEM", "LIKE", schemaPattern)).append( and("PROCEDURE_NAME", "LIKE", procedureNamePattern)); // By default, query already returns the result ordered by // PROCEDURE_SCHEM, PROCEDURE_NAME... return execute(select.toString()); } /** * Retrieves a description of the given catalog's stored procedure parameter * and result columns. * *

    Only descriptions matching the schema, procedure and * parameter name criteria are returned. They are ordered by * PROCEDURE_SCHEM and PROCEDURE_NAME. Within this, the return value, * if any, is first. Next are the parameter descriptions in call * order. The column descriptions follow in column number order. * *

    Each row in the ResultSet is a parameter description or * column description with the following fields: *

      *
    1. PROCEDURE_CAT String => procedure catalog (may be null) *
    2. PROCEDURE_SCHEM String => procedure schema (may be null) *
    3. PROCEDURE_NAME String => procedure name *
    4. COLUMN_NAME String => column/parameter name *
    5. COLUMN_TYPE Short => kind of column/parameter: *
        *
      • procedureColumnUnknown - nobody knows *
      • procedureColumnIn - IN parameter *
      • procedureColumnInOut - INOUT parameter *
      • procedureColumnOut - OUT parameter *
      • procedureColumnReturn - procedure return value *
      • procedureColumnResult - result column in ResultSet *
      *
    6. DATA_TYPE short => SQL type from java.sql.Types *
    7. TYPE_NAME String => SQL type name, for a UDT type the * type name is fully qualified *
    8. PRECISION int => precision *
    9. LENGTH int => length in bytes of data *
    10. SCALE short => scale *
    11. RADIX short => radix *
    12. NULLABLE short => can it contain NULL. *
        *
      • procedureNoNulls - does not allow NULL values *
      • procedureNullable - allows NULL values *
      • procedureNullableUnknown - nullability unknown *
      *
    13. REMARKS String => comment describing parameter/column *
    * *

    Note: Some databases may not return the column * descriptions for a procedure. Additional columns beyond * REMARKS can be defined by the database.

    * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB treats unquoted identifiers as case insensitive in SQL but stores * them in upper case; it treats quoted identifiers as case sensitive and * stores them verbatim. All jdbcDatabaseMetaData methods perform * case-sensitive comparison between name (pattern) arguments and the * corresponding identifier values as they are stored in the database. * Therefore, care must be taken to specify name arguments precisely * (including case) as they are stored in the database.

    * * Since 1.7.2, this feature is supported by default. If the jar is * compiled without org.hsqldb.DatabaseInformationFull or * org.hsqldb.DatabaseInformationMain, the feature is * not supported. The default implementation is * {@link org.hsqldb.DatabaseInformationFull}. *

    * * * @param catalog a catalog name; must match the catalog name as it * is stored in the database; "" retrieves those without a catalog; * null means that the catalog name should not be used * to narrow the search * @param schemaPattern a schema name pattern; must match the schema name * as it is stored in the database; "" retrieves those without a * schema; null means that the schema name should not be * used to narrow the search * @param procedureNamePattern a procedure name pattern; must match the * procedure name as it is stored in the database * @param columnNamePattern a column name pattern; must match the column * name as it is stored in the database * @return ResultSet - each row describes a stored procedure * parameter or column * @exception SQLException if a database access error occurs * @see #getSearchStringEscape */ public ResultSet getProcedureColumns(String catalog, String schemaPattern, String procedureNamePattern, String columnNamePattern) throws SQLException { if (wantsIsNull(procedureNamePattern) || wantsIsNull(columnNamePattern)) { return executeSelect("SYSTEM_PROCEDURECOLUMNS", "0=1"); } schemaPattern = translateSchema(schemaPattern); StringBuffer select = toQueryPrefix("SYSTEM_PROCEDURECOLUMNS").append( and("PROCEDURE_CAT", "=", catalog)).append( and("PROCEDURE_SCHEM", "LIKE", schemaPattern)).append( and("PROCEDURE_NAME", "LIKE", procedureNamePattern)).append( and("COLUMN_NAME", "LIKE", columnNamePattern)); // By default, query already returns result ordered by // PROCEDURE_SCHEM and PROCEDURE_NAME... return execute(select.toString()); } /** * Retrieves a description of the tables available in the given catalog. * Only table descriptions matching the catalog, schema, table * name and type criteria are returned. They are ordered by * TABLE_TYPE, TABLE_SCHEM and TABLE_NAME. *

    * Each table description has the following columns: *

      *
    1. TABLE_CAT String => table catalog (may be null) *
    2. TABLE_SCHEM String => table schema (may be null) *
    3. TABLE_NAME String => table name *
    4. TABLE_TYPE String => table type. Typical types are "TABLE", * "VIEW", "SYSTEM TABLE", "GLOBAL TEMPORARY", * "LOCAL TEMPORARY", "ALIAS", "SYNONYM". *
    5. REMARKS String => explanatory comment on the table *
    6. TYPE_CAT String => the types catalog (may be null) *
    7. TYPE_SCHEM String => the types schema (may be null) *
    8. TYPE_NAME String => type name (may be null) *
    9. SELF_REFERENCING_COL_NAME String => name of the designated * "identifier" column of a typed table (may be null) *
    10. REF_GENERATION String => specifies how values in * SELF_REFERENCING_COL_NAME are created. Values are * "SYSTEM", "USER", "DERIVED". (may be null) *
    * *

    Note: Some databases may not return information for * all tables.

    * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB treats unquoted identifiers as case insensitive in SQL but stores * them in upper case; it treats quoted identifiers as case sensitive and * stores them verbatim. All jdbcDatabaseMetaData methods perform * case-sensitive comparison between name (pattern) arguments and the * corresponding identifier values as they are stored in the database. * Therefore, care must be taken to specify name arguments precisely * (including case) as they are stored in the database.

    * * Since 1.7.0, HSQLDB returns extra information on TEXT tables * in the REMARKS column.

    * * Since 1.7.0, HSQLDB includes the new JDBC3 columns TYPE_CAT, * TYPE_SCHEM, TYPE_NAME and SELF_REFERENCING_COL_NAME in anticipation * of JDBC3 compliant tools.

    * * Since 1.7.2, this feature is supported by default. If the jar is * compiled without org.hsqldb.DatabaseInformationFull or * org.hsqldb.DatabaseInformationMain, the feature is * not supported. The default implementation is * {@link org.hsqldb.DatabaseInformationFull}. *

    * * * @param catalog a catalog name; must match the catalog name as it * is stored in the database; "" retrieves those without a catalog; * null means that the catalog name should not be used * to narrow the search * @param schemaPattern a schema name pattern; must match the schema name * as it is stored in the database; "" retrieves those without a * schema; null means that the schema name should not be * used to narrow the search * @param tableNamePattern a table name pattern; must match the * table name as it is stored in the database * @param types a list of table types to include; null returns * all types * @return ResultSet - each row is a table description * @exception SQLException if a database access error occurs * @see #getSearchStringEscape */ public ResultSet getTables(String catalog, String schemaPattern, String tableNamePattern, String[] types) throws SQLException { if (wantsIsNull(tableNamePattern) || (types != null && types.length == 0)) { return executeSelect("SYSTEM_TABLES", "0=1"); } schemaPattern = translateSchema(schemaPattern); StringBuffer select = toQueryPrefix("SYSTEM_TABLES").append(and("TABLE_CAT", "=", catalog)).append(and("TABLE_SCHEM", "LIKE", schemaPattern)).append(and("TABLE_NAME", "LIKE", tableNamePattern)); if (types == null) { // do not use to narrow search } else { select.append(" AND TABLE_TYPE IN (").append( StringUtil.getList(types, ",", "'")).append(')'); } // By default, query already returns result ordered by // TABLE_TYPE, TABLE_SCHEM and TABLE_NAME... return execute(select.toString()); } /** * Retrieves the schema names available in this database. The results * are ordered by schema name. * *

    The schema column is: *

      *
    1. TABLE_SCHEM String => schema name *
    2. TABLE_CATALOG String => catalog name (may be null) *

    * * *

    *

    HSQLDB-Specific Information:

    * * In 1.8.0, the list of schemas is returned. *

    * * * @return a ResultSet object in which each row is a * schema decription * @exception SQLException if a database access error occurs */ public ResultSet getSchemas() throws SQLException { // By default, query already returns the result in contract order return executeSelect("SYSTEM_SCHEMAS", null); } /** * Retrieves the catalog names available in this database. The results * are ordered by catalog name. * *

    The catalog column is: *

      *
    1. TABLE_CAT String => catalog name *

    * * *

    *

    HSQLDB-Specific Information:

    * * Since 1.7.2, this feature is supported by default. If the jar is * compiled without org.hsqldb.DatabaseInformationFull or * org.hsqldb.DatabaseInformationMain, the feature is * not supported. The default implementation is * {@link org.hsqldb.DatabaseInformationFull}. *

    * * * @return a ResultSet object in which each row has a * single String column that is a catalog name * @exception SQLException if a database access error occurs */ public ResultSet getCatalogs() throws SQLException { return executeSelect("SYSTEM_CATALOGS", null); } /** * Retrieves the table types available in this database. The results * are ordered by table type. * *

    The table type is: *

      *
    1. TABLE_TYPE String => table type. Typical types are "TABLE", * "VIEW", "SYSTEM TABLE", "GLOBAL TEMPORARY", * "LOCAL TEMPORARY", "ALIAS", "SYNONYM". *

    * * *

    *

    HSQLDB-Specific Information:

    * * Since 1.7.1, HSQLDB reports: "TABLE", "VIEW" and "GLOBAL TEMPORARY" * types. * * Since 1.7.2, this feature is supported by default. If the jar is * compiled without org.hsqldb.DatabaseInformationFull or * org.hsqldb.DatabaseInformationMain, the feature is * not supported. The default implementation is * {@link org.hsqldb.DatabaseInformationFull}. *

    * * @return a ResultSet object in which each row has a * single String column that is a table type * @exception SQLException if a database access error occurs */ public ResultSet getTableTypes() throws SQLException { // system table producer returns rows in contract order return executeSelect("SYSTEM_TABLETYPES", null); } /** * Retrieves a description of table columns available in * the specified catalog. * *

    Only column descriptions matching the catalog, schema, table * and column name criteria are returned. They are ordered by * TABLE_SCHEM, TABLE_NAME, and * ORDINAL_POSITION. * *

    Each column description has the following columns: *

      *
    1. TABLE_CAT String => table catalog (may be null) *
    2. TABLE_SCHEM String => table schema (may be null) *
    3. TABLE_NAME String => table name *
    4. COLUMN_NAME String => column name *
    5. DATA_TYPE short => SQL type from java.sql.Types *
    6. TYPE_NAME String => Data source dependent type name, * for a UDT the type name is fully qualified *
    7. COLUMN_SIZE int => column size. For char or date * types this is the maximum number of characters, for numeric or * decimal types this is precision. *
    8. BUFFER_LENGTH is not used. *
    9. DECIMAL_DIGITS int => the number of fractional digits *
    10. NUM_PREC_RADIX int => Radix (typically either 10 or 2) *
    11. NULLABLE int => is NULL allowed. *
        *
      • columnNoNulls - might not allow NULL values *
      • columnNullable - definitely allows NULL values *
      • columnNullableUnknown - nullability unknown *
      *
    12. REMARKS String => comment describing column (may be null) *
    13. COLUMN_DEF String => default value (may be null) *
    14. SQL_DATA_TYPE int => unused *
    15. SQL_DATETIME_SUB int => unused *
    16. CHAR_OCTET_LENGTH int => for char types the * maximum number of bytes in the column *
    17. ORDINAL_POSITION int => index of column in table * (starting at 1) *
    18. IS_NULLABLE String => "NO" means column definitely * does not allow NULL values; "YES" means the column might * allow NULL values. An empty string means nobody knows. *
    19. SCOPE_CATLOG String => catalog of table that is the scope * of a reference attribute (null if DATA_TYPE isn't REF) *
    20. SCOPE_SCHEMA String => schema of table that is the scope * of a reference attribute (null if the DATA_TYPE isn't REF) *
    21. SCOPE_TABLE String => table name that this the scope * of a reference attribure (null if the DATA_TYPE isn't REF) *
    22. SOURCE_DATA_TYPE short => source type of a distinct type or user-generated * Ref type, SQL type from java.sql.Types (null if DATA_TYPE * isn't DISTINCT or user-generated REF) *

    * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB treats unquoted identifiers as case insensitive in SQL but stores * them in upper case; it treats quoted identifiers as case sensitive and * stores them verbatim. All jdbcDatabaseMetaData methods perform * case-sensitive comparison between name (pattern) arguments and the * corresponding identifier values as they are stored in the database. * Therefore, care must be taken to specify name arguments precisely * (including case) as they are stored in the database.

    * * Since 1.7.0, HSQLDB includes the new JDBC 3 columns SCOPE_CATLOG, * SCOPE_SCHEMA, SCOPE_TABLE and SOURCE_DATA_TYPE in anticipation * of JDBC 3 compliant tools. However, these columns are never filled in; * the engine does not support the related features.

    * * Since 1.7.2, this feature is supported by default. If the jar is * compiled without org.hsqldb.DatabaseInformationFull or * org.hsqldb.DatabaseInformationMain, the feature is * not supported. The default implementation is * {@link org.hsqldb.DatabaseInformationFull}. *

    * * * @param catalog a catalog name; must match the catalog name as it * is stored in the database; "" retrieves those without a catalog; * null means that the catalog name should not be used * to narrow the search * @param schemaPattern a schema name pattern; must match the schema name * as it is stored in the database; "" retrieves those without a * schema; null means that the schema name should not be * used to narrow the search * @param tableNamePattern a table name pattern; must match the * table name as it is stored in the database * @param columnNamePattern a column name pattern; must match the column * name as it is stored in the database * @return ResultSet - each row is a column description * @exception SQLException if a database access error occurs * @see #getSearchStringEscape */ public ResultSet getColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern) throws SQLException { if (wantsIsNull(tableNamePattern) || wantsIsNull(columnNamePattern)) { return executeSelect("SYSTEM_COLUMNS", "0=1"); } schemaPattern = translateSchema(schemaPattern); StringBuffer select = toQueryPrefix("SYSTEM_COLUMNS").append( and("TABLE_CAT", "=", catalog)).append( and("TABLE_SCHEM", "LIKE", schemaPattern)).append( and("TABLE_NAME", "LIKE", tableNamePattern)).append( and("COLUMN_NAME", "LIKE", columnNamePattern)); // by default, query already returns the result ordered // by TABLE_SCHEM, TABLE_NAME and ORDINAL_POSITION return execute(select.toString()); } /** * Retrieves a description of the access rights for a table's columns. * *

    Only privileges matching the column name criteria are * returned. They are ordered by COLUMN_NAME and PRIVILEGE. * *

    Each privilige description has the following columns: *

      *
    1. TABLE_CAT String => table catalog (may be null) *
    2. TABLE_SCHEM String => table schema (may be null) *
    3. TABLE_NAME String => table name *
    4. COLUMN_NAME String => column name *
    5. GRANTOR => grantor of access (may be null) *
    6. GRANTEE String => grantee of access *
    7. PRIVILEGE String => name of access (SELECT, * INSERT, UPDATE, REFRENCES, ...) *
    8. IS_GRANTABLE String => "YES" if grantee is permitted * to grant to others; "NO" if not; null if unknown *

    * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB treats unquoted identifiers as case insensitive in SQL but stores * them in upper case; it treats quoted identifiers as case sensitive and * stores them verbatim. All jdbcDatabaseMetaData methods perform * case-sensitive comparison between name (pattern) arguments and the * corresponding identifier values as they are stored in the database. * Therefore, care must be taken to specify name arguments precisely * (including case) as they are stored in the database.

    * * Since 1.7.2, this feature is supported by default. If the jar is * compiled without org.hsqldb.DatabaseInformationFull or * org.hsqldb.DatabaseInformationMain, the feature is * not supported. The default implementation is * {@link org.hsqldb.DatabaseInformationFull}. *

    * * * @param catalog a catalog name; must match the catalog name as it * is stored in the database; "" retrieves those without a catalog; * null means that the catalog name should not be used * to narrow the search * @param schema a schema name; must match the schema name as it is * stored in the database; "" retrieves those without a schema; * null means that the schema name should not be used * to narrow the search * @param table a table name; must match the table name as it is * stored in the database * @param columnNamePattern a column name pattern; must match the column * name as it is stored in the database * @return ResultSet - each row is a column privilege * description * @exception SQLException if a database access error occurs * @see #getSearchStringEscape */ public ResultSet getColumnPrivileges(String catalog, String schema, String table, String columnNamePattern) throws SQLException { if (table == null) { Util.sqlException(Trace.INVALID_JDBC_ARGUMENT); } if (wantsIsNull(columnNamePattern)) { return executeSelect("SYSTEM_COLUMNPRIVILEGES", "0=1"); } schema = translateSchema(schema); StringBuffer select = toQueryPrefix("SYSTEM_COLUMNPRIVILEGES").append(and("TABLE_CAT", "=", catalog)).append(and("TABLE_SCHEM", "=", schema)).append(and("TABLE_NAME", "=", table)).append(and("COLUMN_NAME", "LIKE", columnNamePattern)); // By default, the query already returns the result // ordered by column name, privilege... return execute(select.toString()); } /** * Retrieves a description of the access rights for each table available * in a catalog. Note that a table privilege applies to one or * more columns in the table. It would be wrong to assume that * this privilege applies to all columns (this may be true for * some systems but is not true for all.) * *

    Only privileges matching the schema and table name * criteria are returned. They are ordered by TABLE_SCHEM, * TABLE_NAME, and PRIVILEGE. * *

    Each privilige description has the following columns: *

      *
    1. TABLE_CAT String => table catalog (may be null) *
    2. TABLE_SCHEM String => table schema (may be null) *
    3. TABLE_NAME String => table name *
    4. GRANTOR => grantor of access (may be null) *
    5. GRANTEE String => grantee of access *
    6. PRIVILEGE String => name of access (SELECT, * INSERT, UPDATE, REFRENCES, ...) *
    7. IS_GRANTABLE String => "YES" if grantee is permitted * to grant to others; "NO" if not; null if unknown *

    * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB treats unquoted identifiers as case insensitive in SQL but stores * them in upper case; it treats quoted identifiers as case sensitive and * stores them verbatim. All jdbcDatabaseMetaData methods perform * case-sensitive comparison between name (pattern) arguments and the * corresponding identifier values as they are stored in the database. * Therefore, care must be taken to specify name arguments precisely * (including case) as they are stored in the database.

    * * Since 1.7.2, this feature is supported by default. If the jar is * compiled without org.hsqldb.DatabaseInformationFull or * org.hsqldb.DatabaseInformationMain, the feature is * not supported. The default implementation is * {@link org.hsqldb.DatabaseInformationFull}. *

    * * * @param catalog a catalog name; must match the catalog name as it * is stored in the database; "" retrieves those without a catalog; * null means that the catalog name should not be used * to narrow the search * @param schemaPattern a schema name pattern; must match the schema name * as it is stored in the database; "" retrieves those without a * schema; null means that the schema name should not be * used to narrow the search * @param tableNamePattern a table name pattern; must match the * table name as it is stored in the database * @return ResultSet - each row is a table privilege * description * @exception SQLException if a database access error occurs * @see #getSearchStringEscape */ public ResultSet getTablePrivileges(String catalog, String schemaPattern, String tableNamePattern) throws SQLException { if (wantsIsNull(tableNamePattern)) { return executeSelect("SYSTEM_TABLEPRIVILEGES", "0=1"); } schemaPattern = translateSchema(schemaPattern); StringBuffer select = toQueryPrefix("SYSTEM_TABLEPRIVILEGES").append( and("TABLE_CAT", "=", catalog)).append( and("TABLE_SCHEM", "LIKE", schemaPattern)).append( and("TABLE_NAME", "LIKE", tableNamePattern)); // By default, the query already returns a result ordered by // TABLE_SCHEM, TABLE_NAME, and PRIVILEGE... return execute(select.toString()); } /** * Retrieves a description of a table's optimal set of columns that * uniquely identifies a row. They are ordered by SCOPE. * *

    Each column description has the following columns: *

      *
    1. SCOPE short => actual scope of result *
        *
      • bestRowTemporary - very temporary, while using row *
      • bestRowTransaction - valid for remainder of current transaction *
      • bestRowSession - valid for remainder of current session *
      *
    2. COLUMN_NAME String => column name *
    3. DATA_TYPE short => SQL data type from java.sql.Types *
    4. TYPE_NAME String => Data source dependent type name, * for a UDT the type name is fully qualified *
    5. COLUMN_SIZE int => precision *
    6. BUFFER_LENGTH int => not used *
    7. DECIMAL_DIGITS short => scale *
    8. PSEUDO_COLUMN short => is this a pseudo column * like an Oracle ROWID *
        *
      • bestRowUnknown - may or may not be pseudo column *
      • bestRowNotPseudo - is NOT a pseudo column *
      • bestRowPseudo - is a pseudo column *
      *

    * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB treats unquoted identifiers as case insensitive in SQL but stores * them in upper case; it treats quoted identifiers as case sensitive and * stores them verbatim. All jdbcDatabaseMetaData methods perform * case-sensitive comparison between name (pattern) arguments and the * corresponding identifier values as they are stored in the database. * Therefore, care must be taken to specify name arguments precisely * (including case) as they are stored in the database.

    * * If the name of a column is defined in the database without double * quotes, an all-uppercase name must be specified when calling this * method. Otherwise, the name must be specified in the exact case of * the column definition in the database.

    * * Since 1.7.2, this feature is supported by default. If the jar is * compiled without org.hsqldb.DatabaseInformationFull or * org.hsqldb.DatabaseInformationMain, the feature is * not supported. The default implementation is * {@link org.hsqldb.DatabaseInformationFull}. *

    * * * @param catalog a catalog name; must match the catalog name as it * is stored in the database; "" retrieves those without a catalog; * null means that the catalog name should not be used * to narrow the search * @param schema a schema name; must match the schema name * as it is stored in the database; "" retrieves those without a * schema; null means that the schema name should not * be used to narrow the search * @param table a table name; must match the table name as it is stored * in the database * @param scope the scope of interest; use same values as SCOPE * @param nullable include columns that are nullable. * @return ResultSet - each row is a column description * @exception SQLException if a database access error occurs */ public ResultSet getBestRowIdentifier(String catalog, String schema, String table, int scope, boolean nullable) throws SQLException { String scopeIn; switch (scope) { case bestRowTemporary : scopeIn = BRI_TEMPORARY_SCOPE_IN_LIST; break; case bestRowTransaction : scopeIn = BRI_TRANSACTION_SCOPE_IN_LIST; break; case bestRowSession : scopeIn = BRI_SESSION_SCOPE_IN_LIST; break; default : throw Util.sqlException(Trace.ASSERT_FAILED, Trace.JDBC_INVALID_BRI_SCOPE, null); } if (table == null) { Util.sqlException(Trace.INVALID_JDBC_ARGUMENT); } schema = translateSchema(schema); Integer Nullable = (nullable) ? null : INT_COLUMNS_NO_NULLS; StringBuffer select = toQueryPrefix("SYSTEM_BESTROWIDENTIFIER").append( and("TABLE_CAT", "=", catalog)).append( and("TABLE_SCHEM", "=", schema)).append( and("TABLE_NAME", "=", table)).append( and("NULLABLE", "=", Nullable)).append(" AND SCOPE IN " + scopeIn); // By default, query already returns rows in contract order. // However, the way things are set up, there should never be // a result where there is > 1 distinct scope value: most requests // will want only one table and the system table producer (for // now) guarantees that a maximum of one BRI scope column set is // produced for each table return execute(select.toString()); } /** * Retrieves a description of a table's columns that are automatically * updated when any value in a row is updated. They are * unordered. * *

    Each column description has the following columns: *

      *
    1. SCOPE short => is not used *
    2. COLUMN_NAME String => column name *
    3. DATA_TYPE short => SQL data type from java.sql.Types *
    4. TYPE_NAME String => Data source-dependent type name *
    5. COLUMN_SIZE int => precision *
    6. BUFFER_LENGTH int => length of column value in bytes *
    7. DECIMAL_DIGITS short => scale *
    8. PSEUDO_COLUMN short => whether this is pseudo column * like an Oracle ROWID *
        *
      • versionColumnUnknown - may or may not be pseudo column *
      • versionColumnNotPseudo - is NOT a pseudo column *
      • versionColumnPseudo - is a pseudo column *
      *

    * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB treats unquoted identifiers as case insensitive in SQL but stores * them in upper case; it treats quoted identifiers as case sensitive and * stores them verbatim. All jdbcDatabaseMetaData methods perform * case-sensitive comparison between name (pattern) arguments and the * corresponding identifier values as they are stored in the database. * Therefore, care must be taken to specify name arguments precisely * (including case) as they are stored in the database.

    * * Since 1.7.2, this feature is supported by default. If the jar is * compiled without org.hsqldb.DatabaseInformationFull or * org.hsqldb.DatabaseInformationMain, the feature is * not supported. The default implementation is * {@link org.hsqldb.DatabaseInformationFull}. *

    * * * @param catalog a catalog name; must match the catalog name as it * is stored in the database; "" retrieves those without a catalog; * null means that the catalog name should not be used * to narrow the search * @param schema a schema name; must match the schema name * as it is stored in the database; "" retrieves those without a * schema; null means that the schema name should not be * used to narrow the search * @param table a table name; must match the table name as it is stored * in the database * @return a ResultSet object in which each row is a * column description * @exception SQLException if a database access error occurs */ public ResultSet getVersionColumns(String catalog, String schema, String table) throws SQLException { if (table == null) { Util.sqlException(Trace.INVALID_JDBC_ARGUMENT); } schema = translateSchema(schema); StringBuffer select = toQueryPrefix("SYSTEM_VERSIONCOLUMNS").append(and("TABLE_CAT", "=", catalog)).append(and("TABLE_SCHEM", "=", schema)).append(and("TABLE_NAME", "=", table)); // result does not need to be ordered return execute(select.toString()); } /** * Retrieves a description of the given table's primary key columns. They * are ordered by COLUMN_NAME. * *

    Each primary key column description has the following columns: *

      *
    1. TABLE_CAT String => table catalog (may be null) *
    2. TABLE_SCHEM String => table schema (may be null) *
    3. TABLE_NAME String => table name *
    4. COLUMN_NAME String => column name *
    5. KEY_SEQ short => sequence number within primary key *
    6. PK_NAME String => primary key name (may be null) *

    * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB treats unquoted identifiers as case insensitive in SQL but stores * them in upper case; it treats quoted identifiers as case sensitive and * stores them verbatim. All jdbcDatabaseMetaData methods perform * case-sensitive comparison between name (pattern) arguments and the * corresponding identifier values as they are stored in the database. * Therefore, care must be taken to specify name arguments precisely * (including case) as they are stored in the database.

    * * Since 1.7.2, this feature is supported by default. If the jar is * compiled without org.hsqldb.DatabaseInformationFull or * org.hsqldb.DatabaseInformationMain, the feature is * not supported. The default implementation is * {@link org.hsqldb.DatabaseInformationFull}. *

    * * * @param catalog a catalog name; must match the catalog name as it * is stored in the database; "" retrieves those without a catalog; * null means that the catalog name should not be used * to narrow the search * @param schema a schema name; must match the schema name * as it is stored in the database; "" retrieves those without a * schema; null means that the schema name should not * be used to narrow the search * @param table a table name; must match the table name as it is stored * in the database * @return ResultSet - each row is a primary key column * description * @exception SQLException if a database access error occurs * @see #supportsMixedCaseQuotedIdentifiers * @see #storesUpperCaseIdentifiers */ // fredt@users 20020226 - comment - changed query to exact name public ResultSet getPrimaryKeys(String catalog, String schema, String table) throws SQLException { if (table == null) { Util.sqlException(Trace.INVALID_JDBC_ARGUMENT); } schema = translateSchema(schema); StringBuffer select = toQueryPrefix("SYSTEM_PRIMARYKEYS").append(and("TABLE_CAT", "=", catalog)).append(and("TABLE_SCHEM", "=", schema)).append(and("TABLE_NAME", "=", table)); // By default, query already returns result in contract order return execute(select.toString()); } /** * Retrieves a description of the primary key columns that are * referenced by a table's foreign key columns (the primary keys * imported by a table). They are ordered by PKTABLE_CAT, * PKTABLE_SCHEM, PKTABLE_NAME, and KEY_SEQ. * *

    Each primary key column description has the following columns: *

      *
    1. PKTABLE_CAT String => primary key table catalog * being imported (may be null) *
    2. PKTABLE_SCHEM String => primary key table schema * being imported (may be null) *
    3. PKTABLE_NAME String => primary key table name * being imported *
    4. PKCOLUMN_NAME String => primary key column name * being imported *
    5. FKTABLE_CAT String => foreign key table catalog (may be null) *
    6. FKTABLE_SCHEM String => foreign key table schema (may be null) *
    7. FKTABLE_NAME String => foreign key table name *
    8. FKCOLUMN_NAME String => foreign key column name *
    9. KEY_SEQ short => sequence number within a foreign key *
    10. UPDATE_RULE short => What happens to a * foreign key when the primary key is updated: *
        *
      • importedNoAction - do not allow update of primary * key if it has been imported *
      • importedKeyCascade - change imported key to agree * with primary key update *
      • importedKeySetNull - change imported key to NULL * if its primary key has been updated *
      • importedKeySetDefault - change imported key to default values * if its primary key has been updated *
      • importedKeyRestrict - same as importedKeyNoAction * (for ODBC 2.x compatibility) *
      *
    11. DELETE_RULE short => What happens to * the foreign key when primary is deleted. *
        *
      • importedKeyNoAction - do not allow delete of primary * key if it has been imported *
      • importedKeyCascade - delete rows that import a deleted key *
      • importedKeySetNull - change imported key to NULL if * its primary key has been deleted *
      • importedKeyRestrict - same as importedKeyNoAction * (for ODBC 2.x compatibility) *
      • importedKeySetDefault - change imported key to default if * its primary key has been deleted *
      *
    12. FK_NAME String => foreign key name (may be null) *
    13. PK_NAME String => primary key name (may be null) *
    14. DEFERRABILITY short => can the evaluation of foreign key * constraints be deferred until commit *
        *
      • importedKeyInitiallyDeferred - see SQL92 for definition *
      • importedKeyInitiallyImmediate - see SQL92 for definition *
      • importedKeyNotDeferrable - see SQL92 for definition *
      *

    * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB treats unquoted identifiers as case insensitive in SQL but stores * them in upper case; it treats quoted identifiers as case sensitive and * stores them verbatim. All jdbcDatabaseMetaData methods perform * case-sensitive comparison between name (pattern) arguments and the * corresponding identifier values as they are stored in the database. * Therefore, care must be taken to specify name arguments precisely * (including case) as they are stored in the database.

    * * Since 1.7.2, this feature is supported by default. If the jar is * compiled without org.hsqldb.DatabaseInformationFull or * org.hsqldb.DatabaseInformationMain, the feature is * not supported. The default implementation is * {@link org.hsqldb.DatabaseInformationFull}. *

    * * * @param catalog a catalog name; must match the catalog name as it * is stored in the database; "" retrieves those without a catalog; * null means that the catalog name should not be used * to narrow the search * @param schema a schema name; must match the schema name * as it is stored in the database; "" retrieves those without a * schema; null means that the schema name should not be * used to narrow the search * @param table a table name; must match the table name as it is stored * in the database * @return ResultSet - each row is a primary key column * description * @exception SQLException if a database access error occurs * @see #getExportedKeys * @see #supportsMixedCaseQuotedIdentifiers * @see #storesUpperCaseIdentifiers */ public ResultSet getImportedKeys(String catalog, String schema, String table) throws SQLException { if (table == null) { Util.sqlException(Trace.INVALID_JDBC_ARGUMENT); } schema = translateSchema(schema); StringBuffer select = toQueryPrefix("SYSTEM_CROSSREFERENCE").append( and("FKTABLE_CAT", "=", catalog)).append( and("FKTABLE_SCHEM", "=", schema)).append( and("FKTABLE_NAME", "=", table)).append( " ORDER BY PKTABLE_CAT, PKTABLE_SCHEM, PKTABLE_NAME, KEY_SEQ"); return execute(select.toString()); } /** * Retrieves a description of the foreign key columns that reference the * given table's primary key columns (the foreign keys exported by a * table). They are ordered by FKTABLE_CAT, FKTABLE_SCHEM, * FKTABLE_NAME, and KEY_SEQ. * *

    Each foreign key column description has the following columns: *

      *
    1. PKTABLE_CAT String => primary key table catalog (may be null) *
    2. PKTABLE_SCHEM String => primary key table schema (may be null) *
    3. PKTABLE_NAME String => primary key table name *
    4. PKCOLUMN_NAME String => primary key column name *
    5. FKTABLE_CAT String => foreign key table catalog (may be null) * being exported (may be null) *
    6. FKTABLE_SCHEM String => foreign key table schema (may be null) * being exported (may be null) *
    7. FKTABLE_NAME String => foreign key table name * being exported *
    8. FKCOLUMN_NAME String => foreign key column name * being exported *
    9. KEY_SEQ short => sequence number within foreign key *
    10. UPDATE_RULE short => What happens to * foreign key when primary is updated: *
        *
      • importedNoAction - do not allow update of primary * key if it has been imported *
      • importedKeyCascade - change imported key to agree * with primary key update *
      • importedKeySetNull - change imported key to NULL if * its primary key has been updated *
      • importedKeySetDefault - change imported key to default values * if its primary key has been updated *
      • importedKeyRestrict - same as importedKeyNoAction * (for ODBC 2.x compatibility) *
      *
    11. DELETE_RULE short => What happens to * the foreign key when primary is deleted. *
        *
      • importedKeyNoAction - do not allow delete of primary * key if it has been imported *
      • importedKeyCascade - delete rows that import a deleted key *
      • importedKeySetNull - change imported key to NULL if * its primary key has been deleted *
      • importedKeyRestrict - same as importedKeyNoAction * (for ODBC 2.x compatibility) *
      • importedKeySetDefault - change imported key to default if * its primary key has been deleted *
      *
    12. FK_NAME String => foreign key name (may be null) *
    13. PK_NAME String => primary key name (may be null) *
    14. DEFERRABILITY short => can the evaluation of foreign key * constraints be deferred until commit *
        *
      • importedKeyInitiallyDeferred - see SQL92 for definition *
      • importedKeyInitiallyImmediate - see SQL92 for definition *
      • importedKeyNotDeferrable - see SQL92 for definition *
      *

    * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB treats unquoted identifiers as case insensitive in SQL but stores * them in upper case; it treats quoted identifiers as case sensitive and * stores them verbatim. All jdbcDatabaseMetaData methods perform * case-sensitive comparison between name (pattern) arguments and the * corresponding identifier values as they are stored in the database. * Therefore, care must be taken to specify name arguments precisely * (including case) as they are stored in the database.

    * * Since 1.7.2, this feature is supported by default. If the jar is * compiled without org.hsqldb.DatabaseInformationFull or * org.hsqldb.DatabaseInformationMain, the feature is * not supported. The default implementation is * {@link org.hsqldb.DatabaseInformationFull}. *

    * * * @param catalog a catalog name; must match the catalog name as it * is stored in this database; "" retrieves those without a catalog; * null means that the catalog name should not be used * to narrow the search * @param schema a schema name; must match the schema name * as it is stored in the database; "" retrieves those without a * schema; null means that the schema name should not be * used to narrow the search * @param table a table name; must match the table name as it is stored * in this database * @return a ResultSet object in which each row is a * foreign key column description * @exception SQLException if a database access error occurs * @see #getImportedKeys * @see #supportsMixedCaseQuotedIdentifiers * @see #storesUpperCaseIdentifiers */ public ResultSet getExportedKeys(String catalog, String schema, String table) throws SQLException { if (table == null) { Util.sqlException(Trace.INVALID_JDBC_ARGUMENT); } schema = translateSchema(schema); StringBuffer select = toQueryPrefix("SYSTEM_CROSSREFERENCE").append(and("PKTABLE_CAT", "=", catalog)).append(and("PKTABLE_SCHEM", "=", schema)).append(and("PKTABLE_NAME", "=", table)); // By default, query already returns the table ordered by // FKTABLE_CAT, FKTABLE_SCHEM, FKTABLE_NAME, and KEY_SEQ. return execute(select.toString()); } /** * Retrieves a description of the foreign key columns in the given foreign key * table that reference the primary key columns of the given primary key * table (describe how one table imports another's key). This * should normally return a single foreign key/primary key pair because * most tables import a foreign key from a table only once. They * are ordered by FKTABLE_CAT, FKTABLE_SCHEM, FKTABLE_NAME, and * KEY_SEQ. * *

    Each foreign key column description has the following columns: *

      *
    1. PKTABLE_CAT String => primary key table catalog (may be null) *
    2. PKTABLE_SCHEM String => primary key table schema (may be null) *
    3. PKTABLE_NAME String => primary key table name *
    4. PKCOLUMN_NAME String => primary key column name *
    5. FKTABLE_CAT String => foreign key table catalog (may be null) * being exported (may be null) *
    6. FKTABLE_SCHEM String => foreign key table schema (may be null) * being exported (may be null) *
    7. FKTABLE_NAME String => foreign key table name * being exported *
    8. FKCOLUMN_NAME String => foreign key column name * being exported *
    9. KEY_SEQ short => sequence number within foreign key *
    10. UPDATE_RULE short => What happens to * foreign key when primary is updated: *
        *
      • importedNoAction - do not allow update of primary * key if it has been imported *
      • importedKeyCascade - change imported key to agree * with primary key update *
      • importedKeySetNull - change imported key to NULL if * its primary key has been updated *
      • importedKeySetDefault - change imported key to default values * if its primary key has been updated *
      • importedKeyRestrict - same as importedKeyNoAction * (for ODBC 2.x compatibility) *
      *
    11. DELETE_RULE short => What happens to * the foreign key when primary is deleted. *
        *
      • importedKeyNoAction - do not allow delete of primary * key if it has been imported *
      • importedKeyCascade - delete rows that import a deleted key *
      • importedKeySetNull - change imported key to NULL if * its primary key has been deleted *
      • importedKeyRestrict - same as importedKeyNoAction * (for ODBC 2.x compatibility) *
      • importedKeySetDefault - change imported key to default if * its primary key has been deleted *
      *
    12. FK_NAME String => foreign key name (may be null) *
    13. PK_NAME String => primary key name (may be null) *
    14. DEFERRABILITY short => can the evaluation of foreign key * constraints be deferred until commit *
        *
      • importedKeyInitiallyDeferred - see SQL92 for definition *
      • importedKeyInitiallyImmediate - see SQL92 for definition *
      • importedKeyNotDeferrable - see SQL92 for definition *
      *

    * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB treats unquoted identifiers as case insensitive in SQL but stores * them in upper case; it treats quoted identifiers as case sensitive and * stores them verbatim. All jdbcDatabaseMetaData methods perform * case-sensitive comparison between name (pattern) arguments and the * corresponding identifier values as they are stored in the database. * Therefore, care must be taken to specify name arguments precisely * (including case) as they are stored in the database.

    * * Since 1.7.2, this feature is supported by default. If the jar is * compiled without org.hsqldb.DatabaseInformationFull or * org.hsqldb.DatabaseInformationMain, the feature is * not supported. The default implementation is * {@link org.hsqldb.DatabaseInformationFull}. *

    * * * @param primaryCatalog a catalog name; must match the catalog name * as it is stored in the database; "" retrieves those without a * catalog; null means drop catalog name from the * selection criteria * @param primarySchema a schema name; must match the schema name as * it is stored in the database; "" retrieves those without a schema; * null means drop schema name from the selection criteria * @param primaryTable the name of the table that exports the key; must * match the table name as it is stored in the database * @param foreignCatalog a catalog name; must match the catalog name as * it is stored in the database; "" retrieves those without a * catalog; null means drop catalog name from the * selection criteria * @param foreignSchema a schema name; must match the schema name as it * is stored in the database; "" retrieves those without a schema; * null means drop schema name from the selection criteria * @param foreignTable the name of the table that imports the key; must * match the table name as it is stored in the database * @return ResultSet - each row is a foreign key column * description * @exception SQLException if a database access error occurs * @see #getImportedKeys * @see #supportsMixedCaseQuotedIdentifiers * @see #storesUpperCaseIdentifiers */ public ResultSet getCrossReference(String primaryCatalog, String primarySchema, String primaryTable, String foreignCatalog, String foreignSchema, String foreignTable) throws SQLException { if (primaryTable == null || foreignTable == null) { Util.sqlException(Trace.INVALID_JDBC_ARGUMENT); } primarySchema = translateSchema(primarySchema); foreignSchema = translateSchema(foreignSchema); StringBuffer select = toQueryPrefix("SYSTEM_CROSSREFERENCE").append( and("PKTABLE_CAT", "=", primaryCatalog)).append( and("PKTABLE_SCHEM", "=", primarySchema)).append( and("PKTABLE_NAME", "=", primaryTable)).append( and("FKTABLE_CAT", "=", foreignCatalog)).append( and("FKTABLE_SCHEM", "=", foreignSchema)).append( and("FKTABLE_NAME", "=", foreignTable)); // by default, query already returns the table ordered by // FKTABLE_CAT, FKTABLE_SCHEM, FKTABLE_NAME, and KEY_SEQ. return execute(select.toString()); } /** * Retrieves a description of all the standard SQL types supported by * this database. They are ordered by DATA_TYPE and then by how * closely the data type maps to the corresponding JDBC SQL type. * *

    Each type description has the following columns: *

      *
    1. TYPE_NAME String => Type name *
    2. DATA_TYPE short => SQL data type from java.sql.Types *
    3. PRECISION int => maximum precision *
    4. LITERAL_PREFIX String => prefix used to quote a literal * (may be null) *
    5. LITERAL_SUFFIX String => suffix used to quote a literal * (may be null) *
    6. CREATE_PARAMS String => parameters used in creating * the type (may be null) *
    7. NULLABLE short => can you use NULL for this type. *
        *
      • typeNoNulls - does not allow NULL values *
      • typeNullable - allows NULL values *
      • typeNullableUnknown - nullability unknown *
      *
    8. CASE_SENSITIVE boolean=> is it case sensitive. *
    9. SEARCHABLE short => can you use "WHERE" based on this type: *
        *
      • typePredNone - No support *
      • typePredChar - Only supported with WHERE .. LIKE *
      • typePredBasic - Supported except for WHERE .. LIKE *
      • typeSearchable - Supported for all WHERE .. *
      *
    10. UNSIGNED_ATTRIBUTE boolean => is it unsigned. *
    11. FIXED_PREC_SCALE boolean => can it be a money value. *
    12. AUTO_INCREMENT boolean => can it be used for an * auto-increment value. *
    13. LOCAL_TYPE_NAME String => localized version of type name * (may be null) *
    14. MINIMUM_SCALE short => minimum scale supported *
    15. MAXIMUM_SCALE short => maximum scale supported *
    16. SQL_DATA_TYPE int => unused *
    17. SQL_DATETIME_SUB int => unused *
    18. NUM_PREC_RADIX int => usually 2 or 10 *

    * * *

    *

    HSQLDB-Specific Information:

    * * Since 1.7.2, this feature is supported by default. If the jar is * compiled without org.hsqldb.DatabaseInformationFull or * org.hsqldb.DatabaseInformationMain, the feature is * not supported. The default implementation is * {@link org.hsqldb.DatabaseInformationFull}. *

    * * * @return a ResultSet object in which each row is an SQL * type description * @exception SQLException if a database access error occurs */ public ResultSet getTypeInfo() throws SQLException { // system table producer returns rows in contract order return executeSelect("SYSTEM_TYPEINFO", null); } /** * Retrieves a description of the given table's indices and statistics. They are * ordered by NON_UNIQUE, TYPE, INDEX_NAME, and ORDINAL_POSITION. * *

    Each index column description has the following columns: *

      *
    1. TABLE_CAT String => table catalog (may be null) *
    2. TABLE_SCHEM String => table schema (may be null) *
    3. TABLE_NAME String => table name *
    4. NON_UNIQUE boolean => Can index values be non-unique. * false when TYPE is tableIndexStatistic *
    5. INDEX_QUALIFIER String => index catalog (may be null); * null when TYPE is tableIndexStatistic *
    6. INDEX_NAME String => index name; null when TYPE is * tableIndexStatistic *
    7. TYPE short => index type: *
        *
      • tableIndexStatistic - this identifies table statistics that are * returned in conjuction with a table's index descriptions *
      • tableIndexClustered - this is a clustered index *
      • tableIndexHashed - this is a hashed index *
      • tableIndexOther - this is some other style of index *
      *
    8. ORDINAL_POSITION short => column sequence number * within index; zero when TYPE is tableIndexStatistic *
    9. COLUMN_NAME String => column name; null when TYPE is * tableIndexStatistic *
    10. ASC_OR_DESC String => column sort sequence, "A" => ascending, * "D" => descending, may be null if sort sequence is not supported; * null when TYPE is tableIndexStatistic *
    11. CARDINALITY int => When TYPE is tableIndexStatistic, then * this is the number of rows in the table; otherwise, it is the * number of unique values in the index. *
    12. PAGES int => When TYPE is tableIndexStatisic then * this is the number of pages used for the table, otherwise it * is the number of pages used for the current index. *
    13. FILTER_CONDITION String => Filter condition, if any. * (may be null) *

    * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB treats unquoted identifiers as case insensitive in SQL but stores * them in upper case; it treats quoted identifiers as case sensitive and * stores them verbatim. All jdbcDatabaseMetaData methods perform * case-sensitive comparison between name (pattern) arguments and the * corresponding identifier values as they are stored in the database. * Therefore, care must be taken to specify name arguments precisely * (including case) as they are stored in the database.

    * * Since 1.7.2, this feature is supported by default. If the jar is * compiled without org.hsqldb.DatabaseInformationFull or * org.hsqldb.DatabaseInformationMain, the feature is * not supported. The default implementation is * {@link org.hsqldb.DatabaseInformationFull}. *

    * * * @param catalog a catalog name; must match the catalog name as it * is stored in this database; "" retrieves those without a catalog; * null means that the catalog name should not be used * to narrow the search * @param schema a schema name; must match the schema name * as it is stored in this database; "" retrieves those without a * schema; null means that the schema name should not be * used to narrow the search * @param table a table name; must match the table name as it is stored * in this database * @param unique when true, return only indices for unique values; * when false, return indices regardless of whether unique or not * @param approximate when true, result is allowed to reflect approximate * or out of date values; when false, results are requested to be * accurate * @return ResultSet - each row is an index column description * @exception SQLException if a database access error occurs * @see #supportsMixedCaseQuotedIdentifiers * @see #storesUpperCaseIdentifiers */ // fredt@users 20020526 - comment - changed to exact table name public ResultSet getIndexInfo(String catalog, String schema, String table, boolean unique, boolean approximate) throws SQLException { if (table == null) { Util.sqlException(Trace.INVALID_JDBC_ARGUMENT); } schema = translateSchema(schema); Boolean nu = (unique) ? Boolean.FALSE : null; StringBuffer select = toQueryPrefix("SYSTEM_INDEXINFO").append(and("TABLE_CAT", "=", catalog)).append(and("TABLE_SCHEM", "=", schema)).append(and("TABLE_NAME", "=", table)).append(and("NON_UNIQUE", "=", nu)); // By default, this query already returns the table ordered by // NON_UNIQUE, TYPE, INDEX_NAME, and ORDINAL_POSITION... return execute(select.toString()); } //--------------------------JDBC 2.0----------------------------- /** * Retrieves whether this database supports the given result set type.

    * * @param type defined in java.sql.ResultSet * @return true if so; false otherwise * @exception SQLException if a database access error occurs * @see jdbcConnection * @since JDK 1.2 (JDK 1.1.x developers: read the new overview * for jdbcDatabaseMetaData) */ public boolean supportsResultSetType(int type) throws SQLException { return (type == jdbcResultSet.TYPE_FORWARD_ONLY || type == jdbcResultSet.TYPE_SCROLL_INSENSITIVE); } /** * Retrieves whether this database supports the given concurrency type * in combination with the given result set type.

    * * @param type defined in java.sql.ResultSet * @param concurrency type defined in java.sql.ResultSet * @return true if so; false otherwise * @exception SQLException if a database access error occurs * @see jdbcConnection * @since JDK 1.2 (JDK 1.1.x developers: read the new overview * for jdbcDatabaseMetaData) */ public boolean supportsResultSetConcurrency(int type, int concurrency) throws SQLException { return supportsResultSetType(type) && concurrency == jdbcResultSet.CONCUR_READ_ONLY; } /** * Retrieves whether for the given type of ResultSet object, * the result set's own updates are visible.

    * * *

    *

    HSQLDB-Specific Information:

    * * Up to and including 1.7.2, HSQLDB does not support updateable * result sets; this method always returns false. *

    * * @param type the ResultSet type; one of * ResultSet.TYPE_FORWARD_ONLY, * ResultSet.TYPE_SCROLL_INSENSITIVE, or * ResultSet.TYPE_SCROLL_SENSITIVE * @return true if updates are visible for the given result set type; * false otherwise * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview * for jdbcDatabaseMetaData) */ public boolean ownUpdatesAreVisible(int type) throws SQLException { return false; } /** * Retrieves whether a result set's own deletes are visible.

    * * *

    *

    HSQLDB-Specific Information:

    * * Up to and including 1.7.2, HSQLDB does not support updateable * result sets; this method always returns false. *

    * * @param type the ResultSet type; one of * ResultSet.TYPE_FORWARD_ONLY, * ResultSet.TYPE_SCROLL_INSENSITIVE, or * ResultSet.TYPE_SCROLL_SENSITIVE * @return true if deletes are visible for the given result set type; * false otherwise * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview * for jdbcDatabaseMetaData) */ public boolean ownDeletesAreVisible(int type) throws SQLException { return false; } /** * Retrieves whether a result set's own inserts are visible.

    * * *

    *

    HSQLDB-Specific Information:

    * * Up to and including 1.7.2, HSQLDB does not support updateable * result sets; this method always returns false. *

    * * @param type the ResultSet type; one of * ResultSet.TYPE_FORWARD_ONLY, * ResultSet.TYPE_SCROLL_INSENSITIVE, or * ResultSet.TYPE_SCROLL_SENSITIVE * @return true if inserts are visible for the given result set type; * false otherwise * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview * for jdbcDatabaseMetaData) */ public boolean ownInsertsAreVisible(int type) throws SQLException { return false; } /** * Retrieves whether updates made by others are visible.

    * * *

    *

    HSQLDB-Specific Information:

    * * Up to and including 1.7.2, HSQLDB does not support updateable * result sets; this method always returns false. *

    * * @param type the ResultSet type; one of * ResultSet.TYPE_FORWARD_ONLY, * ResultSet.TYPE_SCROLL_INSENSITIVE, or * ResultSet.TYPE_SCROLL_SENSITIVE * @return true if updates made by others * are visible for the given result set type; * false otherwise * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview * for jdbcDatabaseMetaData) */ public boolean othersUpdatesAreVisible(int type) throws SQLException { return false; } /** * Retrieves whether deletes made by others are visible.

    * * *

    *

    HSQLDB-Specific Information:

    * * Up to and including 1.7.2, HSQLDB does not support updateable * result sets; this method always returns false. *

    * * @param type the ResultSet type; one of * ResultSet.TYPE_FORWARD_ONLY, * ResultSet.TYPE_SCROLL_INSENSITIVE, or * ResultSet.TYPE_SCROLL_SENSITIVE * @return true if deletes made by others * are visible for the given result set type; * false otherwise * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview * for jdbcDatabaseMetaData) */ public boolean othersDeletesAreVisible(int type) throws SQLException { return false; } /** * Retrieves whether inserts made by others are visible.

    * * *

    *

    HSQLDB-Specific Information:

    * * Up to and including 1.7.2, HSQLDB does not support updateable * result sets; this method always returns false. *

    * * @param type the ResultSet type; one of * ResultSet.TYPE_FORWARD_ONLY, * ResultSet.TYPE_SCROLL_INSENSITIVE, or * ResultSet.TYPE_SCROLL_SENSITIVE * @return true if inserts made by others * are visible for the given result set type; * false otherwise * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview * for jdbcDatabaseMetaData) */ public boolean othersInsertsAreVisible(int type) throws SQLException { return false; } /** * Retrieves whether or not a visible row update can be detected by * calling the method ResultSet.rowUpdated.

    * * *

    *

    HSQLDB-Specific Information:

    * * Up to and including 1.7.2, HSQLDB does not support updateable * result sets; this method always returns false. *

    * * @param type the ResultSet type; one of * ResultSet.TYPE_FORWARD_ONLY, * ResultSet.TYPE_SCROLL_INSENSITIVE, or * ResultSet.TYPE_SCROLL_SENSITIVE * @return true if changes are detected by the result set type; * false otherwise * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview * for jdbcDatabaseMetaData) */ public boolean updatesAreDetected(int type) throws SQLException { return false; } /** * Retrieves whether or not a visible row delete can be detected by * calling the method ResultSet.rowDeleted. If the method * deletesAreDetected returns false, it means that * deleted rows are removed from the result set.

    * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB does not support updateable * result sets; this method always returns false. *

    * * * * @param type the ResultSet type; one of * ResultSet.TYPE_FORWARD_ONLY, * ResultSet.TYPE_SCROLL_INSENSITIVE, or * ResultSet.TYPE_SCROLL_SENSITIVE * @return true if deletes are detected by the given result set type; * false otherwise * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview * for jdbcDatabaseMetaData) */ public boolean deletesAreDetected(int type) throws SQLException { return false; } /** * Retrieves whether or not a visible row insert can be detected * by calling the method ResultSet.rowInserted.

    * * *

    *

    HSQLDB-Specific Information:

    * * Up to and including 1.7.2, HSQLDB does not support updateable * result sets; this method always returns false. *

    * * @param type the ResultSet type; one of * ResultSet.TYPE_FORWARD_ONLY, * ResultSet.TYPE_SCROLL_INSENSITIVE, or * ResultSet.TYPE_SCROLL_SENSITIVE * @return true if changes are detected by the specified result * set type; false otherwise * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview * for jdbcDatabaseMetaData) */ public boolean insertsAreDetected(int type) throws SQLException { return false; } /** * Retrieves whether this database supports batch updates.

    * * *

    *

    HSQLDB-Specific Information:

    * * Starting with 1.7.2, HSQLDB supports batch updates; * this method always returns true. *

    * * @return true if this database supports batch upcates; * false otherwise * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview * for jdbcDatabaseMetaData) */ public boolean supportsBatchUpdates() throws SQLException { return true; } /** * Retrieves a description of the user-defined types (UDTs) defined * in a particular schema. Schema-specific UDTs may have type * JAVA_OBJECT, STRUCT, * or DISTINCT. * *

    Only types matching the catalog, schema, type name and type * criteria are returned. They are ordered by DATA_TYPE, TYPE_SCHEM * and TYPE_NAME. The type name parameter may be a fully-qualified * name. In this case, the catalog and schemaPattern parameters are * ignored. * *

    Each type description has the following columns: *

      *
    1. TYPE_CAT String => the type's catalog (may be null) *
    2. TYPE_SCHEM String => type's schema (may be null) *
    3. TYPE_NAME String => type name *
    4. CLASS_NAME String => Java class name *
    5. DATA_TYPE String => type value defined in java.sql.Types. * One of JAVA_OBJECT, STRUCT, or DISTINCT *
    6. REMARKS String => explanatory comment on the type *
    7. BASE_TYPE short => type code of the source type of a * DISTINCT type or the type that implements the user-generated * reference type of the SELF_REFERENCING_COLUMN of a structured * type as defined in java.sql.Types (null if DATA_TYPE is not * DISTINCT or not STRUCT with REFERENCE_GENERATION = USER_DEFINED) *
    * *

    Note: If the driver does not support UDTs, an empty * result set is returned.

    * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB treats unquoted identifiers as case insensitive in SQL but stores * them in upper case; it treats quoted identifiers as case sensitive and * stores them verbatim. All jdbcDatabaseMetaData methods perform * case-sensitive comparison between name (pattern) arguments and the * corresponding identifier values as they are stored in the database. * Therefore, care must be taken to specify name arguments precisely * (including case) as they are stored in the database.

    * * Up to and including 1.7.1, HSQLDB does not support UDTs and * thus produces an empty result.

    * * Starting with 1.7.2, there is an option to support this feature * to greater or lesser degrees. See the documentation specific to the * selected system table provider implementation. The default implementation * is org.hsqldb.DatabaseInformationFull. *

    * * @param catalog a catalog name; must match the catalog name as it * is stored in the database; "" retrieves those without a catalog; * null means that the catalog name should not be used * to narrow the search * @param schemaPattern a schema pattern name; must match the schema name * as it is stored in the database; "" retrieves those without a * schema; null means that the schema name should not be * used to narrow the search * @param typeNamePattern a type name pattern; must match the type name * as it is stored in the database; may be a fully qualified name * @param types a list of user-defined types (JAVA_OBJECT, * STRUCT, or DISTINCT) to include; null returns * all types * @return ResultSet object in which each row describes a UDT * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview * for jdbcDatabaseMetaData) */ public ResultSet getUDTs(String catalog, String schemaPattern, String typeNamePattern, int[] types) throws SQLException { if (wantsIsNull(typeNamePattern) || (types != null && types.length == 0)) { executeSelect("SYSTEM_UDTS", "0=1"); } schemaPattern = translateSchema(schemaPattern); StringBuffer select = toQueryPrefix("SYSTEM_UDTS").append(and("TYPE_CAT", "=", catalog)).append(and("TYPE_SCHEM", "LIKE", schemaPattern)).append(and("TYPE_NAME", "LIKE", typeNamePattern)); if (types == null) { // do not use to narrow search } else { select.append(" AND DATA_TYPE IN (").append( StringUtil.getList(types, ",", "'")).append(')'); } // By default, the query already returns a result ordered by // DATA_TYPE, TYPE_SCHEM, and TYPE_NAME... return execute(select.toString()); } /** * Retrieves the connection that produced this metadata object.

    * * @return the connection that produced this metadata object * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview * for jdbcDatabaseMetaData) */ public Connection getConnection() throws SQLException { return connection; } // boucherb@users 20020426 - javadocs for all JDBC 3 methods // boucherb@users 20020426 - todos // ------------------- JDBC 3.0 ------------------------- /** * Retrieves whether this database supports savepoints.

    * * *

    *

    HSQLDB-Specific Information:

    * * Beginning with 1.7.2, this SQL feature is supported * through JDBC as well as SQL.

    * *

    * * @return true if savepoints are supported; * false otherwise * @exception SQLException if a database access error occurs * @since JDK 1.4, HSQLDB 1.7 */ //#ifdef JAVA4 public boolean supportsSavepoints() throws SQLException { return true; } //#endif JAVA4 /** * Retrieves whether this database supports named parameters to callable * statements.

    * * *

    *

    HSQLDB-Specific Information:

    * * Starting with 1.7.2, HSQLDB supports JDBC named parameters to * callable statements; this method returns true.

    * *

    * * @return true if named parameters are supported; * false otherwise * @exception SQLException if a database access error occurs * @since JDK 1.4, HSQLDB 1.7 */ //#ifdef JAVA4 public boolean supportsNamedParameters() throws SQLException { return true; } //#endif JAVA4 /** * Retrieves whether it is possible to have multiple ResultSet * objects returned from a CallableStatement object * simultaneously.

    * * *

    *

    HSQLDB-Specific Information:

    * * Up to and including 1.7.2, HSQLDB does not support multiple ResultSet * objects returned from a CallableStatement object at all; * this method always returns false.

    * *

    * * @return true if a CallableStatement object * can return multiple ResultSet objects * simultaneously; false otherwise * @exception SQLException if a database access error occurs * @since JDK 1.4, HSQLDB 1.7 */ //#ifdef JAVA4 public boolean supportsMultipleOpenResults() throws SQLException { return false; } //#endif JAVA4 /** * Retrieves whether auto-generated keys can be retrieved after * a statement has been executed.

    * * *

    *

    HSQLDB-Specific Information:

    * * Up to and including 1.7.2, HSQLDB does not support retrieving * autogenerated keys through the JDBC interface at all, although * it is possible to retrieve them in a proprietary fashion; * this method always returns false.

    * *

    * * @return true if auto-generated keys can be retrieved * after a statement has executed; false otherwise * @exception SQLException if a database access error occurs * @since JDK 1.4, HSQLDB 1.7 */ //#ifdef JAVA4 public boolean supportsGetGeneratedKeys() throws SQLException { return false; } //#endif JAVA4 /** * Retrieves a description of the user-defined type (UDT) hierarchies defined in a * particular schema in this database. Only the immediate super type * sub type relationship is modeled. *

    * Only supertype information for UDTs matching the catalog, * schema, and type name is returned. The type name parameter * may be a fully-qualified name. When the UDT name supplied is a * fully-qualified name, the catalog and schemaPattern parameters are * ignored. *

    * If a UDT does not have a direct super type, it is not listed here. * A row of the ResultSet object returned by this method * describes the designated UDT and a direct supertype. A row has the following * columns: *

      *
    1. TYPE_CAT String => the UDT's catalog (may be null) *
    2. TYPE_SCHEM String => UDT's schema (may be null) *
    3. TYPE_NAME String => type name of the UDT *
    4. SUPERTYPE_CAT String => the direct super type's catalog * (may be null) *
    5. SUPERTYPE_SCHEM String => the direct super type's schema * (may be null) *
    6. SUPERTYPE_NAME String => the direct super type's name *
    * *

    Note: If the driver does not support type hierarchies, an * empty result set is returned.

    * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB treats unquoted identifiers as case insensitive in SQL but stores * them in upper case; it treats quoted identifiers as case sensitive and * stores them verbatim. All jdbcDatabaseMetaData methods perform * case-sensitive comparison between name (pattern) arguments and the * corresponding identifier values as they are stored in the database. * Therefore, care must be taken to specify name arguments precisely * (including case) as they are stored in the database.

    * * Including 1.7.1, this JDBC feature is not supported; calling * this method throws a SQLException stating that the operation * is not supported.

    * * Since 1.7.2, this feature is supported by default. If the jar is * compiled without org.hsqldb.DatabaseInformationFull or * org.hsqldb.DatabaseInformationMain, the feature is * not supported. The default implementation is * {@link org.hsqldb.DatabaseInformationFull}. *

    * * * @param catalog a catalog name; "" retrieves those without a catalog; * null means drop catalog name from the selection * criteria * @param schemaPattern a schema name pattern; "" retrieves those * without a schema * @param typeNamePattern a UDT name pattern; may be a fully-qualified * name * @return a ResultSet object in which a row gives information * about the designated UDT * @throws SQLException if a database access error occurs * @since JDK 1.4, HSQLDB 1.7 */ //#ifdef JAVA4 public ResultSet getSuperTypes(String catalog, String schemaPattern, String typeNamePattern) throws SQLException { if (wantsIsNull(typeNamePattern)) { return executeSelect("SYSTEM_SUPERTYPES", "0=1"); } schemaPattern = translateSchema(schemaPattern); StringBuffer select = toQueryPrefix("SYSTEM_SUPERTYPES").append(and("TYPE_CAT", "=", catalog)).append(and("TYPE_SCHEM", "LIKE", schemaPattern)).append(and("TYPE_NAME", "LIKE", typeNamePattern)); return execute(select.toString()); } //#endif JAVA4 /** * Retrieves a description of the table hierarchies defined in a particular * schema in this database. * *

    Only supertable information for tables matching the catalog, schema * and table name are returned. The table name parameter may be a fully- * qualified name, in which case, the catalog and schemaPattern parameters * are ignored. If a table does not have a super table, it is not listed here. * Supertables have to be defined in the same catalog and schema as the * sub tables. Therefore, the type description does not need to include * this information for the supertable. * *

    Each type description has the following columns: *

      *
    1. TABLE_CAT String => the type's catalog (may be null) *
    2. TABLE_SCHEM String => type's schema (may be null) *
    3. TABLE_NAME String => type name *
    4. SUPERTABLE_NAME String => the direct super type's name *
    * *

    Note: If the driver does not support type hierarchies, an * empty result set is returned.

    * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB treats unquoted identifiers as case insensitive in SQL but stores * them in upper case; it treats quoted identifiers as case sensitive and * stores them verbatim. All jdbcDatabaseMetaData methods perform * case-sensitive comparison between name (pattern) arguments and the * corresponding identifier values as they are stored in the database. * Therefore, care must be taken to specify name arguments precisely * (including case) as they are stored in the database.

    * * Since 1.7.2, this feature is supported by default. If the jar is * compiled without org.hsqldb.DatabaseInformationFull or * org.hsqldb.DatabaseInformationMain, the feature is * not supported. The default implementation is * {@link org.hsqldb.DatabaseInformationFull}. *

    * * * @param catalog a catalog name; "" retrieves those without a catalog; * null means drop catalog name from the selection * criteria * @param schemaPattern a schema name pattern; "" retrieves those * without a schema * @param tableNamePattern a table name pattern; may be a fully-qualified * name * @return a ResultSet object in which each row is a type * description * @throws SQLException if a database access error occurs * @since JDK 1.4, HSQLDB 1.7 */ //#ifdef JAVA4 public ResultSet getSuperTables(String catalog, String schemaPattern, String tableNamePattern) throws SQLException { if (wantsIsNull(tableNamePattern)) { return executeSelect("SYSTEM_SUPERTABLES", "0=1"); } schemaPattern = translateSchema(schemaPattern); StringBuffer select = toQueryPrefix("SYSTEM_SUPERTABLES").append(and("TABLE_CAT", "=", catalog)).append(and("TABLE_SCHEM", "LIKE", schemaPattern)).append(and("TABLE_NAME", "LIKE", tableNamePattern)); return execute(select.toString()); } //#endif JAVA4 /** * Retrieves a description of the given attribute of the given type * for a user-defined type (UDT) that is available in the given schema * and catalog. *

    * Descriptions are returned only for attributes of UDTs matching the * catalog, schema, type, and attribute name criteria. They are ordered by * TYPE_SCHEM, TYPE_NAME and ORDINAL_POSITION. This description * does not contain inherited attributes. *

    * The ResultSet object that is returned has the following * columns: *

      *
    1. TYPE_CAT String => type catalog (may be null) *
    2. TYPE_SCHEM String => type schema (may be null) *
    3. TYPE_NAME String => type name *
    4. ATTR_NAME String => attribute name *
    5. DATA_TYPE short => attribute type SQL type from java.sql.Types *
    6. ATTR_TYPE_NAME String => Data source dependent type name. * For a UDT, the type name is fully qualified. For a REF, the type name is * fully qualified and represents the target type of the reference type. *
    7. ATTR_SIZE int => column size. For char or date * types this is the maximum number of characters; for numeric or * decimal types this is precision. *
    8. DECIMAL_DIGITS int => the number of fractional digits *
    9. NUM_PREC_RADIX int => Radix (typically either 10 or 2) *
    10. NULLABLE int => whether NULL is allowed *
        *
      • attributeNoNulls - might not allow NULL values *
      • attributeNullable - definitely allows NULL values *
      • attributeNullableUnknown - nullability unknown *
      *
    11. REMARKS String => comment describing column (may be null) *
    12. ATTR_DEF String => default value (may be null) *
    13. SQL_DATA_TYPE int => unused *
    14. SQL_DATETIME_SUB int => unused *
    15. CHAR_OCTET_LENGTH int => for char types the * maximum number of bytes in the column *
    16. ORDINAL_POSITION int => index of column in table * (starting at 1) *
    17. IS_NULLABLE String => "NO" means column definitely * does not allow NULL values; "YES" means the column might * allow NULL values. An empty string means unknown. *
    18. SCOPE_CATALOG String => catalog of table that is the * scope of a reference attribute (null if DATA_TYPE isn't REF) *
    19. SCOPE_SCHEMA String => schema of table that is the * scope of a reference attribute (null if DATA_TYPE isn't REF) *
    20. SCOPE_TABLE String => table name that is the scope of a * reference attribute (null if the DATA_TYPE isn't REF) *
    21. SOURCE_DATA_TYPE short => source type of a distinct type or user-generated * Ref type,SQL type from java.sql.Types (null if DATA_TYPE * isn't DISTINCT or user-generated REF) *

    * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB treats unquoted identifiers as case insensitive in SQL but stores * them in upper case; it treats quoted identifiers as case sensitive and * stores them verbatim. All jdbcDatabaseMetaData methods perform * case-sensitive comparison between name (pattern) arguments and the * corresponding identifier values as they are stored in the database. * Therefore, care must be taken to specify name arguments precisely * (including case) as they are stored in the database.

    * * Including 1.7.1, this JDBC feature is not supported; calling * this method throws a SQLException stating that the operation * is not supported.

    * * Since 1.7.2, this feature is supported by default. If the jar is * compiled without org.hsqldb.DatabaseInformationFull or * org.hsqldb.DatabaseInformationMain, the feature is * not supported. The default implementation is * {@link org.hsqldb.DatabaseInformationFull}. *

    * * * @param catalog a catalog name; must match the catalog name as it * is stored in the database; "" retrieves those without a catalog; * null means that the catalog name should not be used * to narrow the search * @param schemaPattern a schema name pattern; must match the schema name * as it is stored in the database; "" retrieves those without a * schema; null means that the schema name should not be * used to narrow the search * @param typeNamePattern a type name pattern; must match the * type name as it is stored in the database * @param attributeNamePattern an attribute name pattern; must match the * attribute name as it is declared in the database * @return a ResultSet object in which each row is an * attribute description * @exception SQLException if a database access error occurs * @since JDK 1.4, HSQLDB 1.7 */ //#ifdef JAVA4 public ResultSet getAttributes(String catalog, String schemaPattern, String typeNamePattern, String attributeNamePattern) throws SQLException { if (wantsIsNull(typeNamePattern) || wantsIsNull(attributeNamePattern)) { return executeSelect("SYSTEM_UDTATTRIBUTES", "0=1"); } schemaPattern = translateSchema(schemaPattern); StringBuffer select = toQueryPrefix("SYSTEM_UDTATTRIBUTES").append( and("TYPE_CAT", "=", catalog)).append( and("TYPE_SCHEM", "LIKE", schemaPattern)).append( and("TYPE_NAME", "LIKE", typeNamePattern)).append( and("ATTR_NAME", "LIKE", attributeNamePattern)); return execute(select.toString()); } //#endif JAVA4 /** * Retrieves whether this database supports the given result * set holdability.

    * * *

    *

    HSQLDB-Specific Information:

    * * Starting with 1.7.2, HSQLDB returns true for * HOLD_CURSORS_OVER_COMMIT, else false.

    * *

    * * @param holdability one of the following constants: * ResultSet.HOLD_CURSORS_OVER_COMMIT or * ResultSet.CLOSE_CURSORS_AT_COMMIT * @return true if so; false otherwise * @exception SQLException if a database access error occurs * @see jdbcConnection * @since JDK 1.4, HSQLDB 1.7 */ //#ifdef JAVA4 public boolean supportsResultSetHoldability(int holdability) throws SQLException { return holdability == jdbcResultSet.HOLD_CURSORS_OVER_COMMIT; } //#endif JAVA4 /** * Retrieves the default holdability of this ResultSet * object.

    * * *

    *

    HSQLDB-Specific Information:

    * * Starting with HSQLDB 1.7.2, this JDBC feature is supported.

    * * Calling this method returns HOLD_CURSORS_OVER_COMMIT, since HSQLDB * ResultSet objects are never closed as the result of an implicit * or explicit commit operation.

    * *

    * * * @return the default holdability; either * ResultSet.HOLD_CURSORS_OVER_COMMIT or * ResultSet.CLOSE_CURSORS_AT_COMMIT * @exception SQLException if a database access error occurs * @since JDK 1.4, HSQLDB 1.7 */ //#ifdef JAVA4 public int getResultSetHoldability() throws SQLException { // JDBC 3.0 fr spec: // 14.1.3 ResultSet Holdability // // Calling the method Connection.commit can close the ResultSet objects that // have been created during the current transaction. In some cases, however, // this may not be the desired behaviour. The ResultSet property holdability // gives the application control over whether ResultSet objects (cursors) are // closed when a commit operation is implicity or explictly performed. // The following ResultSet constants may be supplied to the Connection methods // createStatement, prepareStatement, and prepareCall: // // 1. HOLD_CURSORS_OVER_COMMIT // // * ResultSet objects (cursors) are not closed; they are held open when a // commit operation is implicity or explicity performed. // // 2. CLOSE_CURSORS_AT_COMMIT // // * ResultSet objects (cursors) are closed when a commit operation is // implicity or explicity performed. Closing cursors at commit can result // in better performance for some applications. // // The default holdability of ResultSet objects is implementation defined. // The DatabaseMetaData method getResultSetHoldability can be called to // determine the default holdability of result sets returned by the // underlying data source. // -- // boucherb@users 20030819 // Our ResultSet objects are never closed as the result of a commit return jdbcResultSet.HOLD_CURSORS_OVER_COMMIT; } //#endif JAVA4 /** * Retrieves the major version number of the underlying database.

    * * *

    *

    HSQLDB-Specific Information:

    * * Starting with 1.7.2, the feature is supported under JDK14 builds.

    * * This value is retrieved through an SQL call to the new * {@link Library#getDatabaseMajorVersion} method which allows * correct determination of the database major version for both local * and remote database instances. *

    * * @return the underlying database's major version * @exception SQLException if a database access error occurs * @since JDK 1.4, HSQLDB 1.7 */ //#ifdef JAVA4 public int getDatabaseMajorVersion() throws SQLException { ResultSet rs = execute("call \"org.hsqldb.Library.getDatabaseMajorVersion\"()"); rs.next(); int result = rs.getInt(1); rs.close(); return result; } //#endif JAVA4 /** * Retrieves the minor version number of the underlying database.

    * * *

    *

    HSQLDB-Specific Information:

    * * Starting with 1.7.2, the feature is supported under JDK14 builds.

    * * This value is retrieved through an SQL call to the new * {@link Library#getDatabaseMinorVersion} method which allows * correct determination of the database minor version for both local * and remote database instances. *

    * * @return underlying database's minor version * @exception SQLException if a database access error occurs * @since JDK 1.4, HSQLDB 1.7 */ //#ifdef JAVA4 public int getDatabaseMinorVersion() throws SQLException { ResultSet rs = execute("call \"org.hsqldb.Library.getDatabaseMinorVersion\"()"); rs.next(); int result = rs.getInt(1); rs.close(); return result; } //#endif JAVA4 /** * Retrieves the major JDBC version number for this * driver.

    * * *

    *

    HSQLDB-Specific Information:

    * * Starting with 1.7.2, the feature is supported under JDK14 builds. *

    * * * @return JDBC version major number * @exception SQLException if a database access error occurs * @since JDK 1.4, HSQLDB 1.7 */ //#ifdef JAVA4 public int getJDBCMajorVersion() throws SQLException { return 3; } //#endif JAVA4 /** * Retrieves the minor JDBC version number for this * driver.

    * * *

    *

    HSQLDB-Specific Information:

    * * Starting with 1.7.2, the feature is supported under JDK14 builds. *

    * * @return JDBC version minor number * @exception SQLException if a database access error occurs * @since JDK 1.4, HSQLDB 1.7 */ //#ifdef JAVA4 public int getJDBCMinorVersion() throws SQLException { return 0; } //#endif JAVA4 /** * @todo fredt@users we haven't checked it all but should aim at * sqlStateSQL99; Need to review the codes. */ /** * Indicates whether the SQLSTATEs returned by * SQLException.getSQLState is X/Open (now known as Open Group) * SQL CLI or SQL99.

    * * *

    *

    HSQLDB-Specific Information:

    * * Starting with 1.7.2, HSQLDB returns sqlStateSQL99. *

    * * @return the type of SQLSTATEs, one of: * sqlStateXOpen or * sqlStateSQL99 * @throws SQLException if a database access error occurs * @since JDK 1.4, HSQLDB 1.7 */ //#ifdef JAVA4 public int getSQLStateType() throws SQLException { return sqlStateSQL99; } //#endif JAVA4 /** * Indicates whether updates made to a LOB are made on a copy or directly * to the LOB.

    * * *

    *

    HSQLDB-Specific Information:

    * * Up to and including 1.7.2, HSQLDB updates the LOB directly. This * method return false. *

    * * * @return true if updates are made to a copy of the LOB; * false if updates are made directly to the LOB * @throws SQLException if a database access error occurs * @since JDK 1.4, HSQLDB 1.7 */ //#ifdef JAVA4 public boolean locatorsUpdateCopy() throws SQLException { return false; } //#endif JAVA4 /** * Retrieves whether this database supports statement pooling.

    * * *

    *

    HSQLDB-Specific Information:

    * * Up to and including 1.7.2, HSQLDB does not support statement pooling. * This method returns false. *

    * * * @return true is so; * false otherwise * @throws SQLException if a database access error occurs * @since JDK 1.4, HSQLDB 1.7 */ //#ifdef JAVA4 public boolean supportsStatementPooling() throws SQLException { return false; } //#endif JAVA4 //----------------------- Internal Implementation -------------------------- /** * Constructs a new jdbcDatabaseMetaData object using the * specified connection. This contructor is used by jdbcConnection * when producing a DatabaseMetaData object from a call to * {@link jdbcConnection#getMetaData() getMetaData}. * @param c the connection this object will use to retrieve * instance-specific metadata * @throws SQLException never - reserved for future use */ jdbcDatabaseMetaData(jdbcConnection c) throws SQLException { // PRE: is non-null and not closed connection = c; if (c.connProperties != null) { useSchemaDefault = c.connProperties.isPropertyTrue("default_schema"); } } /** * Retrieves an "AND" predicate based on the (column) id, * op(erator) andval(ue) arguments to be * included in an SQL "WHERE" clause, using the conventions laid out for * JDBC DatabaseMetaData filter parameter values.

    * * @return an "AND" predicate built from the arguments * @param id the simple, non-quoted identifier of a system table * column upon which to filter.

    * * No checking is done for column name validity.
    * It is assumed the system table column name is correct.

    * * @param op the conditional operation to perform using the system table * column name value and the val argument.

    * * @param val an object representing the value to use in some conditional * operation, op, between the column identified by the id argument * and this argument.

    * *

      *
    • null causes the empty string to be returned.

      * *

    • toString().length() == 0 causes the returned expression * to be built so that the IS NULL operation will occur * against the specified column.

      * *

    • instanceof String causes the returned expression to be * built so that the specified operation will occur between * the specified column and the specified value, converted to * an SQL string (single quoted, with internal single quotes * escaped by doubling). If op is "LIKE" and * val does not contain any "%" or "_" wild * card characters, then op is silently * converted to "=".

      * *

    • !instanceof String causes an expression to built so that * the specified operation will occur between the specified * column and String.valueOf(val).

      * *

    */ private static String and(String id, String op, Object val) { // The JDBC standard for pattern arguments seems to be: // // - pass null to mean ignore (do not include in query), // - pass "" to mean filter on IS NULL, // - pass "%" to filter on IS NOT NULL. // - pass sequence with "%" and "_" for wildcard matches // - when searching on values reported directly from DatabaseMetaData // results, typically an exact match is desired. In this case, it // is the client's responsibility to escape any reported "%" and "_" // characters using whatever DatabaseMetaData returns from // getSearchEscapeString(). In our case, this is the standard escape // character: '\'. Typically, '%' will rarely be encountered, but // certainly '_' is to be expected on a regular basis. // - checkme: what about the (silly) case where an identifier // has been declared such as: 'create table "xxx\_yyy"(...)'? // Must the client still escape the Java string like this: // "xxx\\\\_yyy"? // Yes: because otherwise the driver is expected to // construct something like: // select ... where ... like 'xxx\_yyy' escape '\' // which will try to match 'xxx_yyy', not 'xxx\_yyy' // Testing indicates that indeed, higher quality popular JDBC // database browsers do the escapes "properly." if (val == null) { return ""; } StringBuffer sb = new StringBuffer(); boolean isStr = (val instanceof String); if (isStr && ((String) val).length() == 0) { return sb.append(" AND ").append(id).append(" IS NULL").toString(); } String v = isStr ? Column.createSQLString((String) val) : String.valueOf(val); sb.append(" AND ").append(id).append(' '); // add the escape to like if required if (isStr && "LIKE".equalsIgnoreCase(op)) { if (v.indexOf('_') < 0 && v.indexOf('%') < 0) { // then we can optimize. sb.append("=").append(' ').append(v); } else { sb.append("LIKE").append(' ').append(v); if ((v.indexOf("\\_") >= 0) || (v.indexOf("\\%") >= 0)) { // then client has requested at least one escape. sb.append(" ESCAPE '\\'"); } } } else { sb.append(op).append(' ').append(v); } return sb.toString(); } /** * The main SQL statement executor. All SQL destined for execution * ultimately goes through this method.

    * * The sqlStatement field for the result is set autoClose to comply with * ResultSet.getStatement() semantics for result sets that are not from * a user supplied Statement object. (fredt)

    * * @param sql SQL statement to execute * @return the result of issuing the statement * @throws SQLException is a database error occurs */ private ResultSet execute(String sql) throws SQLException { // NOTE: // Need to create a jdbcStatement here so jdbcResultSet can return // its Statement object on call to getStatement(). // The native jdbcConnection.execute() method does not // automatically assign a Statement object for the ResultSet, but // jdbcStatement does. That is, without this, there is no way for the // jdbcResultSet to find its way back to its Connection (or Statement) // Also, cannot use single, shared jdbcStatement object, as each // fetchResult() closes any old jdbcResultSet before fetching the // next, causing the jdbcResultSet's Result object to be nullified final int scroll = jdbcResultSet.TYPE_SCROLL_INSENSITIVE; final int concur = jdbcResultSet.CONCUR_READ_ONLY; ResultSet r = connection.createStatement(scroll, concur).executeQuery(sql); ((jdbcResultSet) r).autoClose = true; return r; } /** * An SQL statement executor that knows how to create a "SELECT * * FROM" statement, given a table name and a where clause.

    * * If the where clause is null, it is ommited.

    * * It is assumed that the table name is non-null, since this is a private * method. No check is performed.

    * * @return the result of executing "SELECT * FROM " + table " " + where * @param table the name of a table to "select * from" * @param where the where condition for the select * @throws SQLException if database error occurs */ private ResultSet executeSelect(String table, String where) throws SQLException { String select = selstar + table; if (where != null) { select += " WHERE " + where; } return execute(select); } /** * Retrieves "SELECT * FROM <table> WHERE 1=1" in string * buffer form.

    * * This is a convenience method provided because, for most * DatabaseMetaData queries, this is the most suitable * thing upon which to start building.

    * * @return an StringBuffer whose content is: * "SELECT * FROM <table> WHERE 1=1" * @param t the name of the table */ private StringBuffer toQueryPrefix(String t) { StringBuffer sb = new StringBuffer(255); return sb.append(selstar).append(t).append(whereTrue); } /** * Retrieves whether the JDBC DatabaseMetaData contract * specifies that the argument scode> is filter parameter * value that requires a corresponding IS NULL predicate.

    * * @param s the filter parameter to test * @return true if the argument, s, is filter paramter value that * requires a corresponding IS NULL predicate */ private static boolean wantsIsNull(String s) { return (s != null && s.length() == 0); } /** * For compatibility, when the connection property "default_schame=true" * is present, any DatabaseMetaData call with an empty string as the * schema parameter will use the default schema (noramlly "PUBLIC"). */ private String translateSchema(String schemaName) throws SQLException { if (useSchemaDefault && schemaName != null && schemaName.length() == 0) { ResultSet rs = executeSelect("SYSTEM_SCHEMAS", "IS_DEFAULT=TRUE"); if (rs.next()) { return rs.getString(1); } return schemaName; } return schemaName; } //#ifdef JAVA6 /* public RowIdLifetime getRowIdLifetime() throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public ResultSet getSchemas(String catalog, String schemaPattern) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public boolean supportsStoredFunctionsUsingCallSyntax() throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public boolean autoCommitFailureClosesAllResultSets() throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public ResultSet getClientInfoProperties() throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public ResultSet getFunctions(String catalog, String schemaPattern, String functionNamePattern) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public ResultSet getFunctionColumns(String catalog, String schemaPattern, String functionNamePattern, String columnNamePattern) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public T unwrap(Class iface) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public boolean isWrapperFor(Class iface) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } */ //#endif JAVA6 } hsqldb-1.8.0.10.orig/src/org/hsqldb/jdbc/jdbcStubs.java0000644000175000017500000000766310416742474021167 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.jdbc; import java.sql.ResultSet; import java.sql.SQLException; /** * Provides a site for conditional compilation of stub classes supporting * the JDBC 2 imterface implementation under the JDBC 1 runtime.

    */ class jdbcStubs {} //#ifdef JAVA2 //#else /* // surrogate for java.util.Map interface interface Map { int size(); boolean isEmpty(); boolean containsKey(Object key); boolean containsValue(Object value); Object get(Object key); Object put(Object key, Object value); Object remove(Object key); void putAll(Map t); void clear(); // public Set keySet(); // public Collection values(); // public Set entrySet(); interface Entry { Object getKey(); Object getValue(); Object setValue(Object value); boolean equals(Object o); int hashCode(); } boolean equals(Object o); int hashCode(); } // surrogates for java.SQL type interfaces interface Array { String getBaseTypeName() throws SQLException; int getBaseType() throws SQLException; Object getArray() throws SQLException; Object getArray(Map map) throws SQLException; Object getArray(long index, int count) throws SQLException; Object getArray(long index, int count, Map map) throws SQLException; ResultSet getResultSet() throws SQLException; ResultSet getResultSet(Map map) throws SQLException; ResultSet getResultSet(long index, int count) throws SQLException; ResultSet getResultSet(long index, int count, Map map) throws SQLException; } interface Blob { long length() throws SQLException; byte[] getBytes(long pos, int length) throws SQLException; java.io.InputStream getBinaryStream() throws SQLException; long position(byte pattern[], long start) throws SQLException; long position(Blob pattern, long start) throws SQLException; } interface Clob { long length() throws SQLException; String getSubString(long pos, int length) throws SQLException; java.io.Reader getCharacterStream() throws SQLException; java.io.InputStream getAsciiStream() throws SQLException; long position(String searchstr, long start) throws SQLException; long position(Clob searchstr, long start) throws SQLException; } interface Ref { String getBaseTypeName() throws SQLException; } */ //#endif JAVA2 hsqldb-1.8.0.10.orig/src/org/hsqldb/jdbc/jdbcSavepoint.java0000644000175000017500000000745210416742473022032 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.jdbc; import java.sql.SQLException; import java.sql.Savepoint; import org.hsqldb.Trace; /** * The representation of a savepoint, which is a point within * the current transaction that can be referenced from the * Connection.rollback method. When a transaction * is rolled back to a savepoint all changes made after that * savepoint are undone. *

    * Savepoints can be either named or unnamed. Unnamed * savepoints * are identified by an ID generated by the underlying * data source. * * * *

    *

    HSQLDB-Specific Information:

    * * As the SQL 2003 standard does not provide for unnamed savepoints, * this feature is not supported.

    * * If the connection is autoCommit, setting savepoints has no effect as any * such savepoint is cleared upon the execution of the first transactional * statement.

    *

    * * * * @author boucherb@users * @since JDK 1.4, HSQLDB 1.7.2 */ public class jdbcSavepoint implements Savepoint { String name; jdbcConnection connection; jdbcSavepoint(String name, jdbcConnection conn) throws SQLException { if (name == null) { throw Util.sqlException(Trace.INVALID_JDBC_ARGUMENT, "name is null"); } this.name = name; connection = conn; } /** * Retrieves the generated ID for the savepoint * that this Savepoint object represents. * @return the numeric ID of this savepoint * @exception SQLException if this is a named * savepoint * @since 1.4 */ public int getSavepointId() throws SQLException { throw Util.notSupported(); } /** * Retrieves the name of the savepoint that this * Savepoint object represents.

    * * @return the name of this savepoint * @exception SQLException if this is an un-named * savepoint * @since 1.4 */ public String getSavepointName() throws SQLException { return name; } public String toString() { return super.toString() + "[name=" + name + "]"; } } hsqldb-1.8.0.10.orig/src/org/hsqldb/jdbc/jdbcStatement.java0000644000175000017500000017371210770340574022030 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.jdbc; //#ifdef JAVA2 import java.sql.BatchUpdateException; //#endif JAVA2 import java.sql.Connection; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.SQLWarning; import java.sql.Statement; import org.hsqldb.HsqlException; import org.hsqldb.Result; import org.hsqldb.ResultConstants; import org.hsqldb.Trace; import org.hsqldb.Types; // fredt@users 20020320 - patch 1.7.0 - JDBC 2 support and error trapping // JDBC 2 methods can now be called from jdk 1.1.x - see javadoc comments // SCROLL_INSENSITIVE and FORWARD_ONLY types for ResultSet are now supported // boucherb@users 20020509 - added "throws SQLException" to all methods where // it was missing here but specified in the java.sql.Statement interface, // updated generic documentation to JDK 1.4, and added JDBC3 methods and docs // boucherb@users and fredt@users - 20020505 extensive review and update // of docs and behaviour to comply with java.sql specification // fredt@users 20030620 - patch 1.7.2 - rewritten and simplified // boucherb@users 200404xx - javadoc updates toward 1.7.2 final /** * * The object used for executing a static SQL statement * and returning the results it produces. *

    * By default, only one ResultSet object per Statement * object can be open at the same time. Therefore, if the reading of one * ResultSet object is interleaved * with the reading of another, each must have been generated by * different Statement objects. All execution methods in the * Statement interface implicitly close a statment's current * ResultSet object if an open one exists.

    * * * *

    *

    HSQLDB-Specific Information:

    * * JRE 1.1.x Notes:

    * * In general, JDBC 2 support requires Java 1.2 and above, and JDBC3 requires * Java 1.4 and above. In HSQLDB, support for methods introduced in different * versions of JDBC depends on the JDK version used for compiling and building * HSQLDB.

    * * Since 1.7.0, all JDBC 2 methods can be called while executing under the * version 1.1.x * Java Runtime EnvironmentTM. * However, in addition to this technique requiring explicit casts to the * org.hsqldb.jdbcXXX classes, some of these method calls require * int values that are defined only in the JDBC 2 or greater * version of the {@link java.sql.ResultSet ResultSet} interface. For this * reason these values are defined in {@link jdbcResultSet jdbcResultSet}.

    * * In a JRE 1.1.x environment, calling JDBC 2 methods that take or return the * JDBC2-only ResultSet values can be achieved by referring * to them in parameter specifications and return value comparisons, * respectively, as follows:

    * *

     * jdbcResultSet.FETCH_FORWARD
     * jdbcResultSet.TYPE_FORWARD_ONLY
     * jdbcResultSet.TYPE_SCROLL_INSENSITIVE
     * jdbcResultSet.CONCUR_READ_ONLY
     * //etc.
     * 

    * * However, please note that code written to use HSQLDB JDBC 2 features under * JDK 1.1.x will not be compatible for use with other JDBC 2 drivers. Please * also note that this feature is offered solely as a convenience to developers * who must work under JDK 1.1.x due to operating constraints, yet wish to * use some of the more advanced features available under the JDBC 2 * specification.

    * * (fredt@users)
    * (boucherb@users)

    * *

    * * * @author boucherb@users * @author fredt@user * @version 1.8.0 * @see jdbcConnection#createStatement * @see jdbcResultSet */ public class jdbcStatement implements Statement { /** * Whether this Statement has been explicitly closed. A jdbcConnection * object now explicitly closes all of its open jdbcXXXStatement objects * when it is closed. */ volatile boolean isClosed; /** Is escape processing enabled? */ private boolean isEscapeProcessing = true; /** The connection used to execute this statement. */ protected jdbcConnection connection; /** The maximum number of rows to generate when executing this statement. */ protected int maxRows; /** The result of executing this statement. */ protected Result resultIn; /** The result set type obtained by executing this statement. */ protected int rsType = jdbcResultSet.TYPE_FORWARD_ONLY; /** Used by this statement to communicate non-batched requests. */ protected Result resultOut = new Result(ResultConstants.SQLEXECDIRECT); /** Use by this statement to communicate batched execution requests */ protected Result batchResultOut = null; // boucherb@users // NOTE: // This method is synchronized since resultIn is an instance attribute // and thus it is theoretically possible that a race condition occurs // in which a different thread executes fetchResult(sql), replacing // resultIn before it gets assigned propery to the new result set. // fredt - this class is not supposed to be called multi-threaded - // For example, if two threads call execute() then both call getResult() in // the wrong order, the ResultSet object for one call could actually belong // to the other call. /** * * Executes the given SQL statement, which returns a single * ResultSet object.

    * * *

    *

    HSQLDB-Specific Information:

    * * This method should not be used for statements other than SELECT queries.

    * * Including 1.7.2, HSQLDB does not throw an exception when the statement * is a DDL statement or an UPDATE or DELETE statement. This will certainly * change in future version. *

    * * * @param sql an SQL statement to be sent to the database, typically a * static SQL SELECT statement * @return a ResultSet object that contains the data produced * by the given query; never null * @exception SQLException if a database access error occurs or the given * SQL statement produces anything other than a single * ResultSet object */ public ResultSet executeQuery(String sql) throws SQLException { checkClosed(); connection.clearWarningsNoCheck(); fetchResult(sql); return new jdbcResultSet(this, resultIn, connection.connProperties, connection.isNetConn); } /** * * Executes the given SQL statement, which may be an INSERT, * UPDATE, or DELETE statement or an * SQL statement that returns nothing, such as an SQL DDL statement.

    * * * @param sql an SQL INSERT, UPDATE or * DELETE statement or an SQL statement that returns nothing * @return either the row count for INSERT, UPDATE * or DELETE statements, or 0 for SQL statements * that return nothing * @exception SQLException if a database access error occurs or the given * SQL statement produces a ResultSet object */ public int executeUpdate(String sql) throws SQLException { checkClosed(); connection.clearWarningsNoCheck(); fetchResult(sql); if (resultIn == null || resultIn.isData()) { /** * @todo: - fredt@users - check for type of statement _must_ be done * in the engine and error returned _without_ executing */ throw new SQLException( Trace.getMessage(Trace.jdbcStatement_executeUpdate)); } else if (resultIn.isError()) { Util.throwError(resultIn); } return resultIn.getUpdateCount(); } /** * * Releases this Statement object's database * and JDBC resources immediately instead of waiting for * this to happen when it is automatically closed. * It is generally good practice to release resources as soon as * you are finished with them to avoid tying up database * resources. *

    * Calling the method close on a Statement * object that is already closed has no effect. *

    * Note: A Statement object is automatically closed * when it is garbage collected. When a Statement object is * closed, its current ResultSet object, if one exists, is * also closed.

    * * * @exception SQLException if a database access error occurs */ public synchronized void close() throws SQLException { if (isClosed) { return; } batchResultOut = null; connection = null; resultIn = null; resultOut = null; isClosed = true; } //---------------------------------------------------------------------- /** * * Retrieves the maximum number of bytes that can be * returned for character and binary column values in a ResultSet * object produced by this Statement object. * This limit applies only to BINARY, * VARBINARY, LONGVARBINARY, CHAR, * VARCHAR, and LONGVARCHAR * columns. If the limit is exceeded, the excess data is silently * discarded.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB always returns zero, meaning there * is no limit. *

    * * * @return the current column size limit for columns storing character and * binary values; zero means there is no limit * @exception SQLException if a database access error occurs * @see #setMaxFieldSize */ public int getMaxFieldSize() throws SQLException { checkClosed(); return 0; } /** * * Sets the limit for the maximum number of bytes in a ResultSet * column storing character or binary values to * the given number of bytes. This limit applies * only to BINARY, VARBINARY, * LONGVARBINARY, CHAR, VARCHAR, and * LONGVARCHAR fields. If the limit is exceeded, the excess data * is silently discarded. For maximum portability, use values * greater than 256.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, calls to this method are simply ignored; HSQLDB always * stores the full number of bytes when dealing with any of the field types * mentioned above. These types all have an absolute maximum element upper * bound determined by the Java array index limit * java.lang.Integer.MAX_VALUE. For XXXBINARY types, this translates to * Integer.MAX_VALUE bytes. For XXXCHAR types, this translates to * 2 * Integer.MAX_VALUE bytes (2 bytes / character) *

    * * * @param max the new column size limit in bytes; zero means there is no limit * @exception SQLException if a database access error occurs * or the condition max >= 0 is not satisfied * @see #getMaxFieldSize */ public void setMaxFieldSize(int max) throws SQLException { checkClosed(); if (max < 0) { throw Util.sqlException(Trace.INVALID_JDBC_ARGUMENT); } } /** * * Retrieves the maximum number of rows that a * ResultSet object produced by this * Statement object can contain. If this limit is exceeded, * the excess rows are silently dropped.

    * * * @return the current maximum number of rows for a ResultSet * object produced by this Statement object; * zero means there is no limit * @exception SQLException if a database access error occurs * @see #setMaxRows */ public int getMaxRows() throws SQLException { checkClosed(); return maxRows; } /** * * Sets the limit for the maximum number of rows that any * ResultSet object can contain to the given number. * If the limit is exceeded, the excess * rows are silently dropped.

    * * * @param max the new max rows limit; zero means there is no limit * @exception SQLException if a database access error occurs * or the condition max >= 0 is not satisfied * @see #getMaxRows */ public void setMaxRows(int max) throws SQLException { checkClosed(); if (max < 0) { throw Util.sqlException(Trace.INVALID_JDBC_ARGUMENT); } maxRows = max; } /** * * Sets escape processing on or off. * If escape scanning is on (the default), the driver will do * escape substitution before sending the SQL statement to the database. * * Note: Since prepared statements have usually been parsed prior * to making this call, disabling escape processing for * PreparedStatements objects will have no effect.

    * * * @param enable true to enable escape processing; * false to disable it * @exception SQLException if a database access error occurs */ public void setEscapeProcessing(boolean enable) throws SQLException { checkClosed(); isEscapeProcessing = enable; } /** * * Retrieves the number of seconds the driver will * wait for a Statement object to execute. If the * limit is exceeded, an SQLException is thrown.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB always returns zero, meaning there * is no limit. *

    * * * @return the current query timeout limit in seconds; zero means there is * no limit * @exception SQLException if a database access error occurs * @see #setQueryTimeout */ public int getQueryTimeout() throws SQLException { checkClosed(); return 0; } /** * * Sets the number of seconds the driver will wait for a * Statement object to execute to the given number of seconds. * If the limit is exceeded, an SQLException is thrown.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, calls to this method are ignored; HSQLDB waits an * unlimited amount of time for statement execution * requests to return. *

    * * * @param seconds the new query timeout limit in seconds; zero means * there is no limit * @exception SQLException if a database access error occurs * or the condition seconds >= 0 is not satisfied * @see #getQueryTimeout */ public void setQueryTimeout(int seconds) throws SQLException { checkClosed(); if (seconds < 0) { throw Util.sqlException(Trace.INVALID_JDBC_ARGUMENT); } } /** * * Cancels this Statement object if both the DBMS and * driver support aborting an SQL statement. * This method can be used by one thread to cancel a statement that * is being executed by another thread.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB does not support aborting a SQL * statement; calls to this method are ignored. *

    * * * @exception SQLException if a database access error occurs */ public void cancel() throws SQLException { checkClosed(); } /** * * Retrieves the first warning reported by calls on this Statement object. * Subsequent Statement object warnings will be chained to this * SQLWarning object. * *

    The warning chain is automatically cleared each time * a statement is (re)executed. This method may not be called on a closed * Statement object; doing so will cause an SQLException * to be thrown. * *

    Note: If you are processing a ResultSet object, any * warnings associated with reads on that ResultSet object * will be chained on it rather than on the Statement * object that produced it.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB never produces Statement warnings; * this method always returns null. *

    * * * @return the first SQLWarning object or null * if there are no warnings * @exception SQLException if a database access error occurs or this * method is called on a closed statement */ public SQLWarning getWarnings() throws SQLException { checkClosed(); return null; } /** * * Clears all the warnings reported on this Statement * object. After a call to this method, * the method getWarnings will return * null until a new warning is reported for this * Statement object.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including HSQLDB 1.7.2, SQLWarning objects are * never produced for Statement Objects; calls to this method are * ignored. *

    * * * @exception SQLException if a database access error occurs */ public void clearWarnings() throws SQLException { checkClosed(); } /** * * Sets the SQL cursor name to the given String, which * will be used by subsequent Statement object * execute methods. This name can then be * used in SQL positioned update or delete statements to identify the * current row in the ResultSet object generated by this * statement. If the database does not support positioned update/delete, * this method is a noop. To insure that a cursor has the proper isolation * level to support updates, the cursor's SELECT statement * should have the form SELECT FOR UPDATE. If * FOR UPDATE is not present, positioned updates may fail. * *

    Note: By definition, the execution of positioned updates and * deletes must be done by a different Statement object than * the one that generated the ResultSet object being used for * positioning. Also, cursor names must be unique within a connection.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB does not support named cursors, * updateable results or table locking via SELECT FOR UPDATE; * calls to this method are ignored. *

    * * * @param name the new cursor name, which must be unique within * a connection * @exception SQLException if a database access error occurs */ public void setCursorName(String name) throws SQLException { checkClosed(); } //----------------------- Multiple Results -------------------------- /** * * Executes the given SQL statement, which may return multiple results. * In some (uncommon) situations, a single SQL statement may return * multiple result sets and/or update counts. Normally you can ignore * this unless you are (1) executing a stored procedure that you know may * return multiple results or (2) you are dynamically executing an * unknown SQL string. *

    * The execute method executes an SQL statement and indicates the * form of the first result. You must then use the methods * getResultSet or getUpdateCount * to retrieve the result, and getMoreResults to * move to any subsequent result(s).

    * * * @param sql any SQL statement * @return true if the first result is a ResultSet * object; false if it is an update count or there are * no results * @exception SQLException if a database access error occurs * @see #getResultSet * @see #getUpdateCount * @see #getMoreResults */ public boolean execute(String sql) throws SQLException { checkClosed(); connection.clearWarningsNoCheck(); fetchResult(sql); return resultIn.isData(); } /** * * Retrieves the current result as a ResultSet object. * This method should be called only once per result.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Without an interceding call to executeXXX, each invocation of this * method will produce a new, initialized ResultSet instance referring to * the current result, if any. *

    * * * @return the current result as a ResultSet object or * null if the result is an update count or there * are no more results * @exception SQLException if a database access error occurs * @see #execute */ public ResultSet getResultSet() throws SQLException { checkClosed(); return resultIn == null || !resultIn.isData() ? null : new jdbcResultSet(this, resultIn, connection.connProperties, connection.isNetConn); } /** * * Retrieves the current result as an update count; * if the result is a ResultSet object or there are no more results, -1 * is returned. This method should be called only once per result.

    * * * @return the current result as an update count; -1 if the current result is a * ResultSet object or there are no more results * @exception SQLException if a database access error occurs * @see #execute */ public int getUpdateCount() throws SQLException { // fredt - omit checkClosed() in order to be able to handle the result of a // SHUTDOWN query // checkClosed(); return (resultIn == null || resultIn.isData()) ? -1 : resultIn .getUpdateCount(); } /** * * Moves to this Statement object's next result, returns * true if it is a ResultSet object, and * implicitly closes any current ResultSet * object(s) obtained with the method getResultSet. * *

    There are no more results when the following is true: *

         *    (!getMoreResults() && (getUpdateCount() == -1)
         * 

    * * * @return true if the next result is a ResultSet * object; false if it is an update count or there are * no more results * @exception SQLException if a database access error occurs * @see #execute */ public boolean getMoreResults() throws SQLException { checkClosed(); resultIn = null; return false; } //--------------------------JDBC 2.0----------------------------- /** * * Gives the driver a hint as to the direction in which * rows will be processed in ResultSet * objects created using this Statement object. The * default value is ResultSet.FETCH_FORWARD. *

    * Note that this method sets the default fetch direction for * result sets generated by this Statement object. * Each result set has its own methods for getting and setting * its own fetch direction.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB supports only FETCH_FORWARD.

    * * Setting any other value will throw an SQLException * stating that the operation is not supported. *

    * * * @param direction the initial direction for processing rows * @exception SQLException if a database access error occurs * or the given direction * is not one of ResultSet.FETCH_FORWARD, * ResultSet.FETCH_REVERSE, or * ResultSet.FETCH_UNKNOWN

    * * HSQLDB throws for all values except FETCH_FORWARD * @since JDK 1.2 (JDK 1.1.x developers: read the new overview * for jdbcStatement) * @see #getFetchDirection */ public void setFetchDirection(int direction) throws SQLException { checkClosed(); if (direction != jdbcResultSet.FETCH_FORWARD) { throw Util.notSupported(); } } /** * * Retrieves the direction for fetching rows from * database tables that is the default for result sets * generated from this Statement object. * If this Statement object has not set * a fetch direction by calling the method setFetchDirection, * the return value is implementation-specific.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB always returns FETCH_FORWARD. *

    * * * @return the default fetch direction for result sets generated * from this Statement object * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview * for jdbcStatement) * @see #setFetchDirection */ public int getFetchDirection() throws SQLException { checkClosed(); return jdbcResultSet.FETCH_FORWARD; } /** * * Gives the JDBC driver a hint as to the number of rows that should * be fetched from the database when more rows are needed. The number * of rows specified affects only result sets created using this * statement. If the value specified is zero, then the hint is ignored. * The default value is zero.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, calls to this method are ignored; * HSQLDB fetches each result completely as part of * executing its statement. *

    * * * @param rows the number of rows to fetch * @exception SQLException if a database access error occurs, or the * condition 0 <= rows <= this.getMaxRows() * is not satisfied.

    * * HSQLDB never throws an exception, since calls to this method * are always ignored. * @since JDK 1.2 (JDK 1.1.x developers: read the new overview * for jdbcStatement) * @see #getFetchSize */ public void setFetchSize(int rows) throws SQLException { checkClosed(); } /** * * Retrieves the number of result set rows that is the default * fetch size for ResultSet objects * generated from this Statement object. * If this Statement object has not set * a fetch size by calling the method setFetchSize, * the return value is implementation-specific.

    * * * *

    * HSQLDB-Specific Information

    * * Including 1.7.2, this method always returns 0. * HSQLDB fetches each result completely as part of * executing its statement *

    * * * @return the default fetch size for result sets generated * from this Statement object * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview * for jdbcStatement) * @see #setFetchSize */ public int getFetchSize() throws SQLException { checkClosed(); return 0; } /** * * Retrieves the result set concurrency for ResultSet objects * generated by this Statement object.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB supports only * CONCUR_READ_ONLY concurrency. *

    * * * @return either ResultSet.CONCUR_READ_ONLY or * ResultSet.CONCUR_UPDATABLE (not supported) * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview * for jdbcStatement) */ public int getResultSetConcurrency() throws SQLException { checkClosed(); return jdbcResultSet.CONCUR_READ_ONLY; } /** * * Retrieves the result set type for ResultSet objects * generated by this Statement object.

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.0 and later versions support TYPE_FORWARD_ONLY * and TYPE_SCROLL_INSENSITIVE. *

    * * * @return one of ResultSet.TYPE_FORWARD_ONLY, * ResultSet.TYPE_SCROLL_INSENSITIVE, or * ResultSet.TYPE_SCROLL_SENSITIVE (not supported)

    * * Note: Up to and including 1.7.1, HSQLDB never returns * TYPE_SCROLL_SENSITIVE * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview * for jdbcStatement) */ public int getResultSetType() throws SQLException { // fredt - omit checkClosed() in order to be able to handle the result of a // SHUTDOWN query // checkClosed(); return rsType; } /** * * Adds the given SQL command to the current list of commmands for this * Statement object. The commands in this list can be * executed as a batch by calling the method executeBatch. *

    * NOTE: This method is optional.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Starting with 1.7.2, this feature is supported. *

    * * * @param sql typically this is a static SQL INSERT or * UPDATE statement * @exception SQLException if a database access error occurs, or the * driver does not support batch updates * @see #executeBatch * @since JDK 1.2 (JDK 1.1.x developers: read the new overview * for jdbcStatement) */ public void addBatch(String sql) throws SQLException { checkClosed(); if (isEscapeProcessing) { sql = connection.nativeSQL(sql); } if (batchResultOut == null) { batchResultOut = new Result(ResultConstants.BATCHEXECDIRECT, new int[]{ Types.VARCHAR }, 0); } batchResultOut.add(new Object[]{ sql }); } /** * * Empties this Statement object's current list of * SQL commands. *

    * NOTE: This method is optional.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Starting with HSQLDB 1.7.2, this feature is supported. *

    * * * @exception SQLException if a database access error occurs or the * driver does not support batch updates * @see #addBatch * @since JDK 1.2 (JDK 1.1.x developers: read the new overview * for jdbcStatement) */ public void clearBatch() throws SQLException { checkClosed(); if (batchResultOut != null) { batchResultOut.clear(); } } /** * * Submits a batch of commands to the database for execution and * if all commands execute successfully, returns an array of update counts. * The int elements of the array that is returned are ordered * to correspond to the commands in the batch, which are ordered * according to the order in which they were added to the batch. * The elements in the array returned by the method executeBatch * may be one of the following: *
      *
    1. A number greater than or equal to zero -- indicates that the * command was processed successfully and is an update count giving the * number of rows in the database that were affected by the command's * execution *
    2. A value of SUCCESS_NO_INFO -- indicates that the command was * processed successfully but that the number of rows affected is * unknown *

      * If one of the commands in a batch update fails to execute properly, * this method throws a BatchUpdateException, and a JDBC * driver may or may not continue to process the remaining commands in * the batch. However, the driver's behavior must be consistent with a * particular DBMS, either always continuing to process commands or never * continuing to process commands. If the driver continues processing * after a failure, the array returned by the method * BatchUpdateException.getUpdateCounts * will contain as many elements as there are commands in the batch, and * at least one of the elements will be the following: *

      *

    3. A value of EXECUTE_FAILED -- indicates that the command failed * to execute successfully and occurs only if a driver continues to * process commands after a command fails *
    *

    * A driver is not required to implement this method. * The possible implementations and return values have been modified in * the Java 2 SDK, Standard Edition, version 1.3 to * accommodate the option of continuing to proccess commands in a batch * update after a BatchUpdateException obejct has been thrown.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Starting with HSQLDB 1.7.2, this feature is supported.

    * * HSQLDB stops execution of commands in a batch when one of the commands * results in an exception. The size of the returned array equals the * number of commands that were executed successfully.

    * * When the product is built under the JAVA1 target, an exception * is never thrown and it is the responsibility of the client software to * check the size of the returned update count array to determine if any * batch items failed. To build and run under the JAVA2 target, JDK/JRE * 1.3 or higher must be used. *

    * * * @return an array of update counts containing one element for each * command in the batch. The elements of the array are ordered according * to the order in which commands were added to the batch. * @exception SQLException if a database access error occurs or the * driver does not support batch statements. Throws * {@link java.sql.BatchUpdateException} * (a subclass of java.sql.SQLException) if one of the commands * sent to the database fails to execute properly or attempts to return a * result set. * @since JDK 1.3 (JDK 1.1.x developers: read the new overview * for jdbcStatement) */ public int[] executeBatch() throws SQLException { int[] updateCounts; int batchCount; HsqlException he; checkClosed(); connection.clearWarningsNoCheck(); if (batchResultOut == null) { batchResultOut = new Result(ResultConstants.BATCHEXECDIRECT, new int[]{ Types.VARCHAR }, 0); } batchCount = batchResultOut.getSize(); try { resultIn = connection.sessionProxy.execute(batchResultOut); } catch (HsqlException e) { batchResultOut.clear(); throw Util.sqlException(e); } batchResultOut.clear(); if (resultIn.isError()) { Util.throwError(resultIn); } updateCounts = resultIn.getUpdateCounts(); //#ifdef JAVA2FULL if (updateCounts.length != batchCount) { throw new BatchUpdateException("failed batch", updateCounts); } //#else /* if (updateCounts.length != batchCount) { throw new SQLException("failed batch, update count: " + updateCounts, ""); } */ //#endif JAVA2 return updateCounts; } /** * * Retrieves the Connection object * that produced this Statement object.

    * * * @return the connection that produced this statement * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview * for jdbcStatement) */ public Connection getConnection() throws SQLException { checkClosed(); return connection; } //--------------------------JDBC 3.0----------------------------- /** * * Moves to this Statement object's next result, deals with * any current ResultSet object(s) according to the instructions * specified by the given flag, and returns * true if the next result is a ResultSet object. * *

    There are no more results when the following is true: *

         *   (!getMoreResults() && (getUpdateCount() == -1)
         * 

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.2 does not support this feature.

    * * Calling this method always throws an SQLException, * stating that the function is not supported. *

    * * * @param current one of the following Statement * constants indicating what should happen to current * ResultSet objects obtained using the method * getResultSetCLOSE_CURRENT_RESULT, * KEEP_CURRENT_RESULT, or * CLOSE_ALL_RESULTS * @return true if the next result is a ResultSet * object; false if it is an update count or there are no * more results * @exception SQLException if a database access error occurs * @since JDK 1.4, HSQLDB 1.7 * @see #execute */ //#ifdef JAVA4 public boolean getMoreResults(int current) throws SQLException { throw Util.notSupported(); } //#endif JAVA4 /** * * Retrieves any auto-generated keys created as a result of executing this * Statement object. If this Statement object did * not generate any keys, an empty ResultSet * object is returned.

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.2 does not support this feature.

    * * Calling this method always throws an SQLException, * stating that the function is not supported. *

    * * * @return a ResultSet object containing the auto-generated key(s) * generated by the execution of this Statement object * @exception SQLException if a database access error occurs * @since JDK 1.4, HSQLDB 1.7 */ //#ifdef JAVA4 public ResultSet getGeneratedKeys() throws SQLException { throw Util.notSupported(); } //#endif JAVA4 /** * * Executes the given SQL statement and signals the driver with the * given flag about whether the * auto-generated keys produced by this Statement object * should be made available for retrieval.

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.2 does not support this feature.

    * * Calling this method always throws an SQLException, * stating that the function is not supported. *

    * * * @param sql must be an SQL INSERT, UPDATE or * DELETE statement or an SQL statement that * returns nothing * @param autoGeneratedKeys a flag indicating whether auto-generated keys * should be made available for retrieval; * one of the following constants: * Statement.RETURN_GENERATED_KEYS * Statement.NO_GENERATED_KEYS * @return either the row count for INSERT, UPDATE * or DELETE statements, or 0 for SQL * statements that return nothing * @exception SQLException if a database access error occurs, the given * SQL statement returns a ResultSet object, or * the given constant is not one of those allowed * @since JDK 1.4, HSQLDB 1.7 */ //#ifdef JAVA4 public int executeUpdate(String sql, int autoGeneratedKeys) throws SQLException { throw Util.notSupported(); } //#endif JAVA4 /** * * Executes the given SQL statement and signals the driver that the * auto-generated keys indicated in the given array should be made available * for retrieval. The driver will ignore the array if the SQL statement * is not an INSERT statement.

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.2 does not support this feature.

    * * Calling this method always throws an SQLException, * stating that the function is not supported. *

    * * * @param sql an SQL INSERT, UPDATE or * DELETE statement or an SQL statement that returns nothing, * such as an SQL DDL statement * @param columnIndexes an array of column indexes indicating the columns * that should be returned from the inserted row * @return either the row count for INSERT, UPDATE, * or DELETE statements, or 0 for SQL statements * that return nothing * @exception SQLException if a database access error occurs or the SQL * statement returns a ResultSet object * @since JDK 1.4, HSQLDB 1.7 */ //#ifdef JAVA4 public int executeUpdate(String sql, int[] columnIndexes) throws SQLException { throw Util.notSupported(); } //#endif JAVA4 /** * * Executes the given SQL statement and signals the driver that the * auto-generated keys indicated in the given array should be made available * for retrieval. The driver will ignore the array if the SQL statement * is not an INSERT statement.

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.2 does not support this feature.

    * * Calling this method always throws an SQLException, * stating that the function is not supported. *

    * * * @param sql an SQL INSERT, UPDATE or * DELETE statement or an SQL statement that returns nothing * @param columnNames an array of the names of the columns that should be * returned from the inserted row * @return either the row count for INSERT, UPDATE, * or DELETE statements, or 0 for SQL statements * that return nothing * @exception SQLException if a database access error occurs * @since JDK 1.4, HSQLDB 1.7 */ //#ifdef JAVA4 public int executeUpdate(String sql, String[] columnNames) throws SQLException { throw Util.notSupported(); } //#endif JAVA4 /** * * Executes the given SQL statement, which may return multiple results, * and signals the driver that any * auto-generated keys should be made available * for retrieval. The driver will ignore this signal if the SQL statement * is not an INSERT statement. *

    * In some (uncommon) situations, a single SQL statement may return * multiple result sets and/or update counts. Normally you can ignore * this unless you are (1) executing a stored procedure that you know may * return multiple results or (2) you are dynamically executing an * unknown SQL string. *

    * The execute method executes an SQL statement and indicates the * form of the first result. You must then use the methods * getResultSet or getUpdateCount * to retrieve the result, and getMoreResults to * move to any subsequent result(s).

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.2 does not support this feature.

    * * Calling this method always throws an SQLException, * stating that the function is not supported. *

    * * * @param sql any SQL statement * @param autoGeneratedKeys a constant indicating whether auto-generated * keys should be made available for retrieval using the method * getGeneratedKeys; one of the following constants: * Statement.RETURN_GENERATED_KEYS or * Statement.NO_GENERATED_KEYS * @return true if the first result is a ResultSet * object; false if it is an update count or there are * no results * @exception SQLException if a database access error occurs * @see #getResultSet * @see #getUpdateCount * @see #getMoreResults * @see #getGeneratedKeys * @since JDK 1.4, HSQLDB 1.7 */ //#ifdef JAVA4 public boolean execute(String sql, int autoGeneratedKeys) throws SQLException { throw Util.notSupported(); } //#endif JAVA4 /** * * Executes the given SQL statement, which may return multiple results, * and signals the driver that the * auto-generated keys indicated in the given array should be made available * for retrieval. This array contains the indexes of the columns in the * target table that contain the auto-generated keys that should be made * available. The driver will ignore the array if the given SQL statement * is not an INSERT statement. *

    * Under some (uncommon) situations, a single SQL statement may return * multiple result sets and/or update counts. Normally you can ignore * this unless you are (1) executing a stored procedure that you know may * return multiple results or (2) you are dynamically executing an * unknown SQL string. *

    * The execute method executes an SQL statement and indicates the * form of the first result. You must then use the methods * getResultSet or getUpdateCount * to retrieve the result, and getMoreResults to * move to any subsequent result(s).

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.2 does not support this feature.

    * * Calling this method always throws an SQLException, * stating that the function is not supported. *

    * * * @param sql any SQL statement * @param columnIndexes an array of the indexes of the columns in the * inserted row that should be made available for retrieval by a * call to the method getGeneratedKeys * @return true if the first result is a ResultSet * object; false if it is an update count or there * are no results * @exception SQLException if a database access error occurs * @see #getResultSet * @see #getUpdateCount * @see #getMoreResults * @since JDK 1.4, HSQLDB 1.7 */ //#ifdef JAVA4 public boolean execute(String sql, int[] columnIndexes) throws SQLException { throw Util.notSupported(); } //#endif JAVA4 /** * * Executes the given SQL statement, which may return multiple results, * and signals the driver that the * auto-generated keys indicated in the given array should be made available * for retrieval. This array contains the names of the columns in the * target table that contain the auto-generated keys that should be made * available. The driver will ignore the array if the given SQL statement * is not an INSERT statement. *

    * In some (uncommon) situations, a single SQL statement may return * multiple result sets and/or update counts. Normally you can ignore * this unless you are (1) executing a stored procedure that you know may * return multiple results or (2) you are dynamically executing an * unknown SQL string. *

    * The execute method executes an SQL statement and indicates the * form of the first result. You must then use the methods * getResultSet or getUpdateCount * to retrieve the result, and getMoreResults to * move to any subsequent result(s).

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB 1.7.2 does not support this feature.

    * * Calling this method always throws an SQLException, * stating that the function is not supported. *

    * * * @param sql any SQL statement * @param columnNames an array of the names of the columns in the inserted * row that should be made available for retrieval by a call to the * method getGeneratedKeys * @return true if the next result is a ResultSet * object; false if it is an update count or there * are no more results * @exception SQLException if a database access error occurs * @see #getResultSet * @see #getUpdateCount * @see #getMoreResults * @see #getGeneratedKeys * @since JDK 1.4, HSQLDB 1.7 */ //#ifdef JAVA4 public boolean execute(String sql, String[] columnNames) throws SQLException { throw Util.notSupported(); } //#endif JAVA4 /** * * Retrieves the result set holdability for ResultSet objects * generated by this Statement object.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Starting with 1.7.2, this method returns HOLD_CURSORS_OVER_COMMIT *

    * * * @return either ResultSet.HOLD_CURSORS_OVER_COMMIT or * ResultSet.CLOSE_CURSORS_AT_COMMIT * @exception SQLException if a database access error occurs * @since JDK 1.4, HSQLDB 1.7 */ //#ifdef JAVA4 public int getResultSetHoldability() throws SQLException { return jdbcResultSet.HOLD_CURSORS_OVER_COMMIT; } //#endif JAVA4 // -------------------- Internal Implementation ---------------------------- /** * Constructs a new jdbcStatement with the specified connection and * result type. * * @param c the connection on which this statement will execute * @param type the kind of results this will return */ jdbcStatement(jdbcConnection c, int type) { // PRE: assume connection is not null and is not closed // PRE: assume type is a valid result set type code connection = c; rsType = type; } /** * Retrieves whether this statement is closed. */ synchronized public boolean isClosed() { return isClosed; } /** * An internal check for closed statements. * * @throws SQLException when the connection is closed */ void checkClosed() throws SQLException { if (isClosed) { throw Util.sqlException(Trace.STATEMENT_IS_CLOSED); } if (connection.isClosed) { throw Util.sqlException(Trace.CONNECTION_IS_CLOSED); } } /** * Internal result producer for jdbcStatement (sqlExecDirect mode).

    * * @param sql a character sequence representing the SQL to be executed * @throws SQLException when a database access error occurs */ private void fetchResult(String sql) throws SQLException { if (isEscapeProcessing) { sql = connection.nativeSQL(sql); } resultIn = null; resultOut.setMainString(sql); resultOut.setMaxRows(maxRows); try { resultIn = connection.sessionProxy.execute(resultOut); if (resultIn.isError()) { throw new HsqlException(resultIn); } } catch (HsqlException e) { throw Util.sqlException(e); } } //#ifdef JAVA6 /* public void setPoolable(boolean poolable) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public boolean isPoolable() throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public T unwrap(Class iface) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public boolean isWrapperFor(Class iface) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } */ //#endif JAVA6 } hsqldb-1.8.0.10.orig/src/org/hsqldb/jdbc/jdbcParameterMetaData.java0000644000175000017500000003035410770340574023377 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.jdbc; import java.lang.reflect.Method; import java.lang.reflect.Modifier; import java.sql.ParameterMetaData; import java.sql.SQLException; import org.hsqldb.Result; import org.hsqldb.Trace; import org.hsqldb.Types; // fredt@users 20040412 - removed DITypeInfo dependencies // TODO: implement internal support for at least OUT return parameter /** * An object that can be used to get information about the types and * properties of the parameters in a PreparedStatement object. * * @author boucherb@users * @version 1.7.2 * @since JDK 1.4, HSQLDB 1.7.2 */ public class jdbcParameterMetaData implements ParameterMetaData { /** The metadata object with which this object is constructed */ Result.ResultMetaData rmd; /** The numeric data type codes of the parameters. */ int[] types; /** Parameter mode values */ int[] modes; /** whether param is assigned directly to identity column */ boolean[] isIdentity; /** nullability code for site to which param is bound */ int[] nullability; /** * The fully-qualified name of the Java class whose instances should * be passed to the method PreparedStatement.setObject.

    * * Note that changes to Function.java and Types.java allow passing * objects of any class implementing java.io.Serializable and that, * as such, the parameter expression resolution mechanism has been * upgraded to provide the precise FQN for SQL function and stored * procedure arguments, rather than the more generic * org.hsqldb.JavaObject class that is used internally to represent * and transport objects whose class is not in the standard mapping. */ String[] classNames; /** The number of parameters in the described statement */ int parameterCount; /** * Creates a new instance of jdbcParameterMetaData.

    * * @param r A Result object describing the statement parameters * @throws SQLException never - reserved for future use */ jdbcParameterMetaData(Result r) throws SQLException { if (r == null) { parameterCount = 0; return; } rmd = r.metaData; types = rmd.colTypes; parameterCount = types.length; nullability = rmd.colNullable; isIdentity = rmd.isIdentity; classNames = rmd.classNames; modes = rmd.paramMode; } /** * Checks if the value of the param argument is a valid parameter * position.

    * * @param param position to check * @throws SQLException if the value of the param argument is not a * valid parameter position */ void checkRange(int param) throws SQLException { if (param < 1 || param > parameterCount) { String msg = param + " is out of range"; throw Util.sqlException(Trace.INVALID_JDBC_ARGUMENT, msg); } } /** * Retrieves the fully-qualified name of the Java class whose instances * should be passed to the method PreparedStatement.setObject.

    * * @param param the first parameter is 1, the second is 2, ... * @throws SQLException if a database access error occurs * @return the fully-qualified name of the class in the * Java programming language that would be * used by the method PreparedStatement.setObject * to set the value in the specified parameter. * This is the class name used for custom mapping. * @since JDK 1.4, HSQLDB 1.7.2 */ public String getParameterClassName(int param) throws SQLException { checkRange(param); return classNames[--param]; } /** * Retrieves the number of parameters in the PreparedStatement object for * which this ParameterMetaData object provides information.

    * * @throws SQLException if a database access error occurs * @return the number of parameters * @since JDK 1.4, HSQLDB 1.7.2 */ public int getParameterCount() throws SQLException { return parameterCount; } /** * Retrieves the designated parameter's mode.

    * * @param param the first parameter is 1, the second is 2, ... * @throws SQLException if a database access error occurs * @return mode of the parameter; one of * ParameterMetaData.parameterModeIn, * ParameterMetaData.parameterModeOut, * ParameterMetaData.parameterModeInOut, * ParameterMetaData.parameterModeUnknown * @since JDK 1.4, HSQLDB 1.7.2 */ public int getParameterMode(int param) throws SQLException { checkRange(param); return modes[--param]; } /** * Retrieves the designated parameter's SQL type.

    * * @param param the first parameter is 1, the second is 2, ... * @throws SQLException if a database access error occurs * @return SQL type from java.sql.Types * @since JDK 1.4, HSQLDB 1.7.2 * @see java.sql.Types */ public int getParameterType(int param) throws SQLException { int t; checkRange(param); t = types[--param]; return t == Types.VARCHAR_IGNORECASE ? Types.VARCHAR : t; } /** * Retrieves the designated parameter's database-specific type name.

    * * @param param the first parameter is 1, the second is 2, ... * @throws SQLException if a database access error occurs * @return type the name used by the database. * If the parameter type is a user-defined * type, then a fully-qualified type name is * returned. * @since JDK 1.4, HSQLDB 1.7.2 */ public String getParameterTypeName(int param) throws SQLException { int t; int ts; checkRange(param); return Types.getTypeName(types[--param]); } /** * Retrieves the designated parameter's number of decimal digits.

    * * @param param the first parameter is 1, the second is 2, ... * @throws SQLException if a database access error occurs * @return precision * @since JDK 1.4, HSQLDB 1.7.2 */ public int getPrecision(int param) throws SQLException { checkRange(param); // TODO: // parameters assigned directly to table columns // should report the precision of the column if it is // defined, otherwise the default (intrinsic) precision // of the undecorated type return Types.getPrecision(types[--param]); } /** * Retrieves the designated parameter's number of digits to right of * the decimal point.

    * * @param param the first parameter is 1, the second is 2, ... * @throws SQLException if a database access error occurs * @return scale * @since JDK 1.4, HSQLDB 1.7.2 */ public int getScale(int param) throws SQLException { checkRange(param); // TODO: // parameters assigned directly to DECIMAL/NUMERIC columns // should report the declared scale of the column // For now, to be taken as "default or unknown" return 0; } /** * Retrieves whether null values are allowed in the designated parameter.

    * * @param param the first parameter is 1, the second is 2, ... * @throws SQLException if a database access error occurs * @return the nullability status of the given parameter; one of * ParameterMetaData.parameterNoNulls, * ParameterMetaData.parameterNullable or * ParameterMetaData.parameterNullableUnknown * @since JDK 1.4, HSQLDB 1.7.2 */ public int isNullable(int param) throws SQLException { checkRange(param); return nullability[--param]; } /** * Retrieves whether values for the designated parameter can be * signed numbers.

    * * @param param the first parameter is 1, the second is 2, ... * @throws SQLException if a database access error occurs * @return true if so; false otherwise * @since JDK 1.4, HSQLDB 1.7.2 */ public boolean isSigned(int param) throws SQLException { checkRange(param); Boolean b = Types.isUnsignedAttribute(types[--param]); return b != null &&!b.booleanValue() &&!isIdentity[param]; } /** * Retrieves a String repsentation of this object.

    * * @return a String repsentation of this object */ public String toString() { try { return toStringImpl(); } catch (Throwable t) { return super.toString() + "[toStringImpl_exception=" + t + "]"; } } /** * Provides the implementation of the toString() method.

    * * @return a String representation of this object * @throws Exception if a reflection error occurs */ private String toStringImpl() throws Exception { StringBuffer sb; Method[] methods; Method method; int count; sb = new StringBuffer(); sb.append(super.toString()); count = getParameterCount(); if (count == 0) { sb.append("[parameterCount=0]"); return sb.toString(); } methods = getClass().getDeclaredMethods(); sb.append('['); int len = methods.length; for (int i = 0; i < count; i++) { sb.append('\n'); sb.append(" parameter_"); sb.append(i + 1); sb.append('='); sb.append('['); for (int j = 0; j < len; j++) { method = methods[j]; if (!Modifier.isPublic(method.getModifiers())) { continue; } if (method.getParameterTypes().length != 1) { continue; } sb.append(method.getName()); sb.append('='); sb.append(method.invoke(this, new Object[]{ new Integer(i + 1) })); if (j + 1 < len) { sb.append(','); sb.append(' '); } } sb.append(']'); if (i + 1 < count) { sb.append(','); sb.append(' '); } } sb.append('\n'); sb.append(']'); return sb.toString(); } //#ifdef JAVA6 /* public T unwrap(Class iface) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public boolean isWrapperFor(Class iface) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } */ //#endif JAVA6 } hsqldb-1.8.0.10.orig/src/org/hsqldb/jdbc/jdbcResultSet.java0000644000175000017500000062666010770340574022023 0ustar renerene/* Copyright (c) 1995-2000, The Hypersonic SQL Group. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the Hypersonic SQL Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE HYPERSONIC SQL GROUP, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * This software consists of voluntary contributions made by many individuals * on behalf of the Hypersonic SQL Group. * * * For work added by the HSQL Development Group: * * Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.jdbc; import java.io.ByteArrayInputStream; import java.io.InputStream; import java.io.Reader; import java.io.StringReader; import java.math.BigDecimal; import java.sql.Date; import java.sql.ResultSet; import java.sql.ResultSetMetaData; //#ifdef JAVA6 /* import java.sql.RowId; import java.sql.NClob; import java.sql.SQLXML; */ //#endif JAVA6 import java.sql.SQLException; import java.sql.SQLWarning; import java.sql.Statement; import java.sql.Time; import java.sql.Timestamp; import java.util.Calendar; //#ifdef JAVA2 import java.sql.Array; import java.sql.Blob; import java.sql.Clob; import java.sql.Ref; import java.util.Map; //#endif JAVA2 import org.hsqldb.Column; import org.hsqldb.HsqlDateTime; import org.hsqldb.HsqlException; import org.hsqldb.Record; import org.hsqldb.Result; import org.hsqldb.ResultConstants; import org.hsqldb.Trace; import org.hsqldb.Types; import org.hsqldb.lib.AsciiStringInputStream; import org.hsqldb.lib.StringInputStream; import org.hsqldb.persist.HsqlProperties; import org.hsqldb.types.Binary; import org.hsqldb.types.JavaObject; // fredt@users 20020320 - patch 1.7.0 - JDBC 2 support and error trapping // JDBC 2 methods can now be called from jdk 1.1.x - see javadoc comments // SCROLL_INSENSITIVE and FORWARD_ONLY types for ResultSet are now supported // fredt@users 20020315 - patch 497714 by lakuhns@users - scrollable ResultSet // all absolute and relative positioning methods defined // boucherb@users 20020409 - added "throws SQLException" to all methods where // it was missing here but specified in the java.sql.ResultSet and // java.sql.ResultSetMetaData interfaces, updated generic documentation to // JDK 1.4, and added JDBC3 methods and docs // boucherb@users and fredt@users 20020505 extensive review and update // of docs and behaviour to comply with java.sql specification // tony_lai@users 20020820 - patch 595073 - duplicated exception msg // fredt@users 20030622 - patch 1.7.2 - columns and labels are case sensitive // boucherb@users 200404xx - javadoc updates /** * * A table of data representing a database result set, which * is usually generated by executing a statement that queries the database. * *

    A ResultSet object maintains a cursor pointing * to its current row of data. Initially the cursor is positioned * before the first row. The next method moves the * cursor to the next row, and because it returns false * when there are no more rows in the ResultSet object, * it can be used in a while loop to iterate through * the result set. *

    * A default ResultSet object is not updatable and * has a cursor that moves forward only. Thus, you can * iterate through it only once and only from the first row to the * last row. It is possible to * produce ResultSet objects that are scrollable and/or * updatable. The following code fragment, in which con * is a valid Connection object, illustrates how to make * a result set that is scrollable and insensitive to updates by others, * and that is updatable. See ResultSet fields for other * options. *

     *
     * Statement stmt = con.createStatement(
     *                            ResultSet.TYPE_SCROLL_INSENSITIVE,
     *                            ResultSet.CONCUR_UPDATABLE);
     * ResultSet rs = stmt.executeQuery("SELECT a, b FROM TABLE2");
     * // rs will be scrollable, will not show changes made by others,
     * // and will be updatable
     *
     * 
    * The ResultSet interface provides * getter methods (getBoolean, getLong, * and so on) for retrieving column values from the current row. * Values can be retrieved using either the index number of the * column or the name of the column. In general, using the * column index will be more efficient. Columns are numbered from 1. * For maximum portability, result set columns within each row should be * read in left-to-right order, and each column should be read only once. * *

    For the getter methods, a JDBC driver attempts * to convert the underlying data to the Java type specified in the * getter method and returns a suitable Java value. The JDBC specification * has a table showing the allowable mappings from SQL types to Java types * that can be used by the ResultSet getter methods. *

    *

    Column names used as input to getter methods are case * insensitive. When a getter method is called with * a column name and several columns have the same name, * the value of the first matching column will be returned. * The column name option is * designed to be used when column names are used in the SQL * query that generated the result set. * For columns that are NOT explicitly named in the query, it * is best to use column numbers. If column names are used, there is * no way for the programmer to guarantee that they actually refer to * the intended columns. *

    * A set of updater methods were added to this interface * in the JDBC 2.0 API (JavaTM 2 SDK, * Standard Edition, version 1.2). The comments regarding parameters * to the getter methods also apply to parameters to the * updater methods. *

    * The updater methods may be used in two ways: *

      *
    1. to update a column value in the current row. In a scrollable * ResultSet object, the cursor can be moved backwards * and forwards, to an absolute position, or to a position * relative to the current row. * The following code fragment updates the NAME column * in the fifth row of the ResultSet object * rs and then uses the method updateRow * to update the data source table from which rs was * derived. *
       *
       * rs.absolute(5); // moves the cursor to the fifth row of rs
       * rs.updateString("NAME", "AINSWORTH"); // updates the
       * // NAME column of row 5 to be AINSWORTH
       * rs.updateRow(); // updates the row in the data source
       *
       * 
      *
    2. to insert column values into the insert row. An updatable * ResultSet object has a special row associated with * it that serves as a staging area for building a row to be inserted. * The following code fragment moves the cursor to the insert row, builds * a three-column row, and inserts it into rs and into * the data source table using the method insertRow. *
       *
       * rs.moveToInsertRow(); // moves cursor to the insert row
       * rs.updateString(1, "AINSWORTH"); // updates the
       * // first column of the insert row to be AINSWORTH
       * rs.updateInt(2,35); // updates the second column to be 35
       * rs.updateBoolean(3, true); // updates the third row to true
       * rs.insertRow();
       * rs.moveToCurrentRow();
       *
       * 
      *
    *

    A ResultSet object is automatically closed when the * Statement object that * generated it is closed, re-executed, or used * to retrieve the next result from a sequence of multiple results. * *

    The number, types and properties of a ResultSet * object's columns are provided by the ResulSetMetaData * object returned by the ResultSet.getMetaData method.

    * * * *

    *

    HSQLDB-Specific Information:

    * * A ResultSet object generated by HSQLDB is by default of * ResultSet.TYPE_FORWARD_ONLY (as is standard JDBC behavior) * and does not allow the use of absolute and relative positioning * methods. However, since 1.7.0, if a statement is created * with:

    * *

     * Statement stmt = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
     * 
    * * then the ResultSet objects it produces support * using all of the absolute and relative positioning methods of JDBC2 * to set the position of the current row, for example:

    * *

     * rs.absolute(5);
     * String fifthRowValue = rs.getString(1);
     * rs.relative(4);
     * String ninthRowValue = rs.getString(1);
     * 
    * * Note: An HSQLDB ResultSet object persists, even after its * connection is closed. This is regardless of the operational mode of * the {@link Database Database} from which it came. That is, they * persist whether originating from a Server, * WebServer or in-process mode Database. *

    * * Including HSQLDB 1.7.2, there is no support for any of the methods * introduced in JDBC 2 relating to updateable result sets. These methods * include all updateXXX methods, as well as the {@link #insertRow}, * {@link #updateRow}, {@link #deleteRow}, {@link #moveToInsertRow} (and so on) * methods; invoking any such method throws an SQLException * stating that the operation is not supported. * * JRE 1.1.x Notes:

    * * In general, JDBC 2 support requires Java 1.2 and above, and JDBC 3 requires * Java 1.4 and above. In HSQLDB, support for methods introduced in different * versions of JDBC depends on the JDK version used for compiling and building * HSQLDB.

    * * Since 1.7.0, it is possible to build the product so that * all JDBC 2 methods can be called while executing under the version 1.1.x * Java Runtime EnvironmentTM. * However, some of these method calls require int values that * are defined only in the JDBC 2 or greater version of the * * ResultSet interface. For this reason, when the * product is compiled under JDK 1.1.x, these values are defined here, in this * class.

    * * In a JRE 1.1.x environment, calling JDBC 2 methods that take or return the * JDBC2-only ResultSet values can be achieved by referring * to them in parameter specifications and return value comparisons, * respectively, as follows:

    * *

     * jdbcResultSet.FETCH_FORWARD
     * jdbcResultSet.TYPE_FORWARD_ONLY
     * jdbcResultSet.TYPE_SCROLL_INSENSITIVE
     * jdbcResultSet.CONCUR_READ_ONLY
     * // etc.
     * 
    * * However, please note that code written in such a manner will not be * compatible for use with other JDBC 2 drivers, since they expect and use * ResultSet, rather than jdbcResultSet. Also * note, this feature is offered solely as a convenience to developers * who must work under JDK 1.1.x due to operating constraints, yet wish to * use some of the more advanced features available under the JDBC 2 * specification.

    * * (fredt@users)
    * (boucherb@users)

    * *

    * @see jdbcStatement#executeQuery * @see jdbcStatement#getResultSet * @see * ResultSetMetaData * * Extensively rewritten and extended in successive versions of HSQLDB. * * @author Thomas Mueller (Hypersonic SQL Group) * @version 1.8.0 * @since Hypersonic SQL */ public class jdbcResultSet implements ResultSet { // fredt@users 20020320 - patch 497714 by lakuhns@users - scrollable ResultSet // variable values in different states // Condition definitions // bInit iCurrentRow nCurrent nCurrent.next // ----- ----------- -------- ------------- // beforeFirst false 0 N/A N/A // first true 1 !null next or null // last true last row # !null null // afterLast true last row + 1 N/A N/A //------------------------ Private Attributes -------------------------- /* * Campbell's comments * Future Development Information for Developers and Contributors

    * Providing a * full and robust implementation guaranteeing consistently accurate * results and behaviour depends upon introducing several new engine * features for which the internals of the product currently have no * infrastructure:

    * *

      *
    1. a unique rowid for each row in the database which lasts the life * of a row, independent of any updates made to that row
    2. *
    3. the ability to explicitly lock either the tables or the * individual rows of an updateable result, for the duration that * the result is open
    4. *
    5. the ability to choose between transactions supporting repeatable * reads, committed reads, and uncommitted reads *
    6. the ability to map an updated result row's columns back to * specific updateable objects on the database.

      * * Note: Typically, it is easy to do this mapping if all the * rows of a result consist of columns from a single table. And it * is especially easy if the result's columns are a superset of the * primary key columns of that table. The ability to * update a result consisting of any combintation of join, union, * intersect, difference and grouping operations, however, is much more * complex to implement and often impossible, especially under * grouping and non-natural joins. Also, it is not even guaranteed * that the columns of a result map back to *any* updateable object * on the database, for instance in the cases where the * result's column values are general expressions or the result * comes from a stored procedure where the data may not even come, * directly or indirectly, from updateable database objects such as * columns in table rows. *

    * * For developers working under a JDBC3 environment, * it is gently recommended to take a look at Sun's early access * * RowSet implementation, as this can be used to add * JDBC driver independent scrollablility and updateability. * However, as a driver independent implementation, it obviously cannot * guarantee to use the traditional table and/or row locking features * that many DBMS make available to ensure the success of all * valid updates against updateable results sets. As such, performing * updates through Sun's early access RowSet implementation * may not always succeed, even when it is generally expected that they * should. This is because the condition used to find the original row * on the database to update (which, for a driver independent * implementation, would have to be equality on all columns values of * the originally retrieved row) can become invalid if another * transaction modifies or deletes that row on the database at some * point between the time the row was last retrieved or refreshed in * the RowSet and the time the RowSet attempts to make its next * update to that row. Also, any driver independent implementation * of RowSet is still dependent on each driver guaranteeing that its * ResultSet objects return completely accurate * ResultSetMetaData that fulfills all of the * JDBC ResultSetMetaData contracts under all circumstances. * However, up to and including 1.7.0, HSQLDB does not make such guarantees * under all conditions. See the discussion at {@link #getMetaData}. * (boucherb@users) (version 1.7.0)

    */ // boucherb@users/hiep256@users 20010829 - patch 1.7.2 - allow expression to // return Results as Object, where object is Result or jdbcResultSet. // - rResult access changed to allow getting internal result object // from Parser.processCall() /** Statement is closed when its result set is closed */ boolean autoClose; /** The internal representation. */ public Result rResult; /** * The current record containing the data for the row */ private Record nCurrent; /** The row upon which this ResultSet is currently positioned. */ private int iCurrentRow; /** When the result of updating the database, the number of updated rows. */ private int iUpdateCount; /** Is current row before the first row? */ private boolean bInit; // false if before first row /** How many columns does this ResultSet have? */ int iColumnCount; /** Did the last getXXX method encounter a null value? */ private boolean bWasNull; /** The ResultSetMetaData object for this ResultSet */ private ResultSetMetaData rsmd; /** Properties of this ResultSet's parent Connection. */ private HsqlProperties connProperties; /** is the connection via network */ private boolean isNetConn; /** * The Statement that generated this result. Null if the result is * from DatabaseMetaData

    */ jdbcStatement sqlStatement; //------------------------ Package Attributes -------------------------- /** * The scrollability / scroll sensitivity type of this result. */ int rsType = TYPE_FORWARD_ONLY; /** * * Moves the cursor down one row from its current position. * A ResultSet cursor is initially positioned * before the first row; the first call to the method * next makes the first row the current row; the * second call makes the second row the current row, and so on. * *

    If an input stream is open for the current row, a call * to the method next will * implicitly close it. A ResultSet object's * warning chain is cleared when a new row is read.

    * * * * @return true if the new current row is valid; * false if there are no more rows * @exception SQLException if a database access error occurs */ public boolean next() throws SQLException { bWasNull = false; // Have an empty resultset so exit with false if (rResult == null || rResult.isEmpty()) { return false; } if (!bInit) { // The resultset has not been traversed, so set the cursor // to the first row (1) nCurrent = rResult.rRoot; bInit = true; iCurrentRow = 1; } else { // The resultset has been traversed, if afterLast, return false if (nCurrent == null) { return false; } // On a valid row so go to next nCurrent = nCurrent.next; iCurrentRow++; } // finally test to see if we are in an afterLast situation if (nCurrent == null) { // Yes, set the current row to after last and exit with false iCurrentRow = rResult.getSize() + 1; return false; } else { // Not afterLast, so success return true; } } /** * * Releases this ResultSet object's database and * JDBC resources immediately instead of waiting for * this to happen when it is automatically closed. * *

    Note: A ResultSet object * is automatically closed by the * Statement object that generated it when * that Statement object is closed, * re-executed, or is used to retrieve the next result from a * sequence of multiple results. A ResultSet object * is also automatically closed when it is garbage collected.

    * * * @exception SQLException if a database access error occurs */ public void close() throws SQLException { iUpdateCount = -1; rResult = null; if (autoClose) { sqlStatement.close(); } } /** * * Reports whether * the last column read had a value of SQL NULL. * Note that you must first call one of the getter methods * on a column to try to read its value and then call * the method wasNull to see if the value read was * SQL NULL.

    * * * @return true if the last column value read was SQL * NULL and false otherwise * @exception SQLException if a database access error occurs */ public boolean wasNull() throws SQLException { return bWasNull; } //====================================================================== // Methods for accessing results by column index //====================================================================== /** * * Retrieves the value of the designated column in the current row * of this ResultSet object as * a String in the Java programming language.

    * * * @param columnIndex the first column is 1, the second is 2, ... * @return the column value; if the value is SQL NULL, the * value returned is null * @exception SQLException if a database access error occurs */ public String getString(int columnIndex) throws SQLException { return (String) getColumnInType(columnIndex, Types.CHAR); } /** * * Retrieves the value of the designated column in the current row * of this ResultSet object as * a boolean in the Java programming language.

    * * * @param columnIndex the first column is 1, the second is 2, ... * @return the column value; if the value is SQL NULL, the * value returned is false * @exception SQLException if a database access error occurs */ public boolean getBoolean(int columnIndex) throws SQLException { Object o = getColumnInType(columnIndex, Types.BOOLEAN); return o == null ? false : ((Boolean) o).booleanValue(); } /** * * Retrieves the value of the designated column in the current row * of this ResultSet object as * a byte in the Java programming language.

    * * * @param columnIndex the first column is 1, the second is 2, ... * @return the column value; if the value is SQL NULL, the * value returned is 0 * @exception SQLException if a database access error occurs */ public byte getByte(int columnIndex) throws SQLException { Object o = getColumnInType(columnIndex, Types.TINYINT); return o == null ? 0 : ((Number) o).byteValue(); } /** * * Retrieves the value of the designated column in the current row * of this ResultSet object as * a short in the Java programming language.

    * * * @param columnIndex the first column is 1, the second is 2, ... * @return the column value; if the value is SQL NULL, the * value returned is 0 * @exception SQLException if a database access error occurs */ public short getShort(int columnIndex) throws SQLException { Object o = getColumnInType(columnIndex, Types.SMALLINT); return o == null ? 0 : ((Number) o).shortValue(); } /** * * Retrieves the value of the designated column in the current row * of this ResultSet object as * an int in the Java programming language.

    * * * @param columnIndex the first column is 1, the second is 2, ... * @return the column value; if the value is SQL NULL, the * value returned is 0 * @exception SQLException if a database access error occurs */ public int getInt(int columnIndex) throws SQLException { Object o = getColumnInType(columnIndex, Types.INTEGER); return o == null ? 0 : ((Number) o).intValue(); } /** * * Retrieves the value of the designated column in the current row * of this ResultSet object as * a long in the Java programming language.

    * * * @param columnIndex the first column is 1, the second is 2, ... * @return the column value; if the value is SQL NULL, the * value returned is 0 * @exception SQLException if a database access error occurs */ public long getLong(int columnIndex) throws SQLException { Object o = getColumnInType(columnIndex, Types.BIGINT); return o == null ? 0 : ((Number) o).longValue(); } /** * * Retrieves the value of the designated column in the current row * of this ResultSet object as * a float in the Java programming language.

    * * * @param columnIndex the first column is 1, the second is 2, ... * @return the column value; if the value is SQL NULL, the * value returned is 0 * @exception SQLException if a database access error occurs */ public float getFloat(int columnIndex) throws SQLException { Object o = getColumnInType(columnIndex, Types.REAL); return o == null ? (float) 0.0 : ((Number) o).floatValue(); } /** * * Retrieves the value of the designated column in the current row * of this ResultSet object as * a double in the Java programming language.

    * * * @param columnIndex the first column is 1, the second is 2, ... * @return the column value; if the value is SQL NULL, the * value returned is 0 * @exception SQLException if a database access error occurs */ public double getDouble(int columnIndex) throws SQLException { Object o = getColumnInType(columnIndex, Types.DOUBLE); return o == null ? 0.0 : ((Number) o).doubleValue(); } /** * * Retrieves the value of the designated column in the current row * of this ResultSet object as * a java.sql.BigDecimal in the Java programming language.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Beginning with 1.7.0, HSQLDB converts the result and sets the scale * with BigDecimal.ROUND_HALF_DOWN. *

    * * * @param columnIndex the first column is 1, the second is 2, ... * @param scale the number of digits to the right of the decimal point * @return the column value; if the value is SQL NULL, the * value returned is null * @exception SQLException if a database access error occurs * @deprecated by java.sun.com as of JDK 1.2 */ //#ifdef DEPRECATEDJDBC public BigDecimal getBigDecimal(int columnIndex, int scale) throws SQLException { // boucherb@users 20020502 - added conversion BigDecimal bd = (BigDecimal) getColumnInType(columnIndex, Types.DECIMAL); if (scale < 0) { throw Util.sqlException(Trace.INVALID_JDBC_ARGUMENT); } if (bd != null) { bd = bd.setScale(scale, BigDecimal.ROUND_HALF_DOWN); } return bd; } //#endif /** * * Retrieves the value of the designated column in the current row * of this ResultSet object as * a byte array in the Java programming language. * The bytes represent the raw values returned by the driver.

    * * * *

    *

    HSQLDB-Specific Information:

    * * HSQLDB returns correct values for columns of type BINARY, * CHAR and their variations. For other types, it returns * the byte[] for the String representation * of the value. *

    * * * @param columnIndex the first column is 1, the second is 2, ... * @return the column value; if the value is SQL NULL, the * value returned is null * @exception SQLException if a database access error occurs */ public byte[] getBytes(int columnIndex) throws SQLException { Object x = getObject(columnIndex); if (x == null) { return null; } if (x instanceof byte[]) { return (byte[]) x; } if (x instanceof java.lang.String) { return ((String) x).getBytes(); } x = getColumnInType(columnIndex, Types.BINARY); return (byte[]) x; } /** * * Retrieves the value of the designated column in the current row * of this ResultSet object as a * java.sql.Date object in the Java programming language.

    * * * @param columnIndex the first column is 1, the second is 2, ... * @return the column value; if the value is SQL NULL, the * value returned is null * @exception SQLException if a database access error occurs */ public Date getDate(int columnIndex) throws SQLException { return (Date) getColumnInType(columnIndex, Types.DATE); } /** * * Retrieves the value of the designated column in the current row * of this ResultSet object as a java.sql.Time * object in the Java programming language.

    * * * @param columnIndex the first column is 1, the second is 2, ... * @return the column value; if the value is SQL NULL, the * value returned is null * @exception SQLException if a database access error occurs */ public Time getTime(int columnIndex) throws SQLException { return (Time) getColumnInType(columnIndex, Types.TIME); } /** * * Retrieves the value of the designated column in the current row * of this ResultSet object as * a java.sql.Timestamp object in the Java programming * language.

    * * * @param columnIndex the first column is 1, the second is 2, ... * @return the column value; if the value is SQL NULL, the * value returned is null * @exception SQLException if a database access error occurs */ public Timestamp getTimestamp(int columnIndex) throws SQLException { return (Timestamp) getColumnInType(columnIndex, Types.TIMESTAMP); } /** * * Retrieves the value of the designated column in the current row * of this ResultSet object as * a stream of ASCII characters. The value can then be read in chunks * from the stream. This method is particularly * suitable for retrieving large LONGVARCHAR values. * The JDBC driver will * do any necessary conversion from the database format into ASCII. * *

    Note: All the data in the returned stream must be * read prior to getting the value of any other column. The next * call to a getter method implicitly closes the stream. Also, a * stream may return 0 when the method * InputStream.available * is called whether there is data available or not.

    * * * *

    *

    HSQLDB-Specific Information:

    * * The limitation noted above does not apply to HSQLDB.

    * * In 1.6.1 and previous, getAsciiStream was identical to * getUnicodeStream and both simply returned a byte stream * constructed from the raw {@link #getBytes(int) getBytes} * representation. * * Starting with 1.7.0, this has been updated to comply with the * java.sql specification. * * When the column is of type CHAR and its variations, it requires no * conversion since it is represented internally already as a * Java String object. When the column is not of type CHAR and its * variations, the returned stream is based on a conversion to the * Java String representation of the value. In either case, * the obtained stream is always equivalent to a stream of the low order * bytes from the value's String representation.

    * * HSQLDB SQL CHAR and its variations are all Unicode strings * internally, so the recommended alternatives to this method are * {@link #getString(int) getString}, * {@link #getUnicodeStream(int) getUnicodeStream} (deprecated) * and new to 1.7.0: {@link #getCharacterStream(int) getCharacterStream} * (now prefered over the deprecated getUnicodeStream alternative). *

    * * * @param columnIndex the first column is 1, the second is 2, ... * @return a Java input stream that delivers the database column value * as a stream of one-byte ASCII characters; * if the value is SQL NULL, the * value returned is null * @exception SQLException if a database access error occurs */ public java.io.InputStream getAsciiStream(int columnIndex) throws SQLException { String s = getString(columnIndex); if (s == null) { return null; } return new AsciiStringInputStream(s); } /** * * Retrieves the value of the designated column in the current row * of this ResultSet object as * as a stream of two-byte Unicode characters. The first byte is * the high byte; the second byte is the low byte. * * The value can then be read in chunks from the * stream. This method is particularly * suitable for retrieving large LONGVARCHARvalues. The * JDBC driver will do any necessary conversion from the database * format into Unicode. * *

    Note: All the data in the returned stream must be * read prior to getting the value of any other column. The next * call to a getter method implicitly closes the stream. * Also, a stream may return 0 when the method * InputStream.available * is called, whether there is data available or not.

    * * * *

    *

    HSQLDB-Specific Information:

    * * The limitation noted above does not apply to HSQLDB.

    * * Up to and including 1.6.1, getUnicodeStream (and getAsciiStream) * both simply returned a byte stream constructed from the * raw {@link #getBytes(int) getBytes} representation. * * Starting with 1.7.0, this has been corrected to comply with the * java.sql specification. * * When the column is of type CHAR and its variations, it requires no * conversion since it is represented internally already as * Java Strings. When the column is not of type CHAR and its variations, * the returned stream is based on a conversion to the * Java String representation of the value. In either case, * the obtained stream is always equivalent to a stream of * bytes from the value's String representation, with high-byte first. *

    * * * @param columnIndex the first column is 1, the second is 2, ... * @return a Java input stream that delivers the database column value * as a stream of two-byte Unicode characters; * if the value is SQL NULL, the value returned is * null * @exception SQLException if a database access error occurs * @deprecated use getCharacterStream in place of * getUnicodeStream */ //#ifdef DEPRECATEDJDBC public java.io.InputStream getUnicodeStream(int columnIndex) throws SQLException { String s = getString(columnIndex); if (s == null) { return null; } return new StringInputStream(s); } //#endif /** * * Retrieves the value of the designated column in the current row * of this ResultSet object as a binary stream of * uninterpreted bytes. The value can then be read in chunks from the * stream. This method is particularly * suitable for retrieving large LONGVARBINARY values. * *

    Note: All the data in the returned stream must be * read prior to getting the value of any other column. The next * call to a getter method implicitly closes the stream. Also, a * stream may return 0 when the method * InputStream.available * is called whether there is data available or not.

    * * * @param columnIndex the first column is 1, the second is 2, ... * @return a Java input stream that delivers the database column value * as a stream of uninterpreted bytes; * if the value is SQL NULL, the value returned is * null * @exception SQLException if a database access error occurs */ // fredt@users 20020215 - patch 485704 by boucherb@users public java.io.InputStream getBinaryStream(int columnIndex) throws SQLException { byte[] b = getBytes(columnIndex); return wasNull() ? null : new ByteArrayInputStream(b); } //====================================================================== // Methods for accessing results by column name //====================================================================== /** * * Retrieves the value of the designated column in the current row * of this ResultSet object as * a String in the Java programming language.

    * * * @param columnName the SQL name of the column * @return the column value; if the value is SQL NULL, the * value returned is null * @exception SQLException if a database access error occurs */ public String getString(String columnName) throws SQLException { return getString(findColumn(columnName)); } /** * * Retrieves the value of the designated column in the current row * of this ResultSet object as * a boolean in the Java programming language.

    * * * @param columnName the SQL name of the column * @return the column value; if the value is SQL NULL, the * value returned is false * @exception SQLException if a database access error occurs */ public boolean getBoolean(String columnName) throws SQLException { return getBoolean(findColumn(columnName)); } /** * * Retrieves the value of the designated column in the current row * of this ResultSet object as * a byte in the Java programming language.

    * * * @param columnName the SQL name of the column * @return the column value; if the value is SQL NULL, the * value returned is 0 * @exception SQLException if a database access error occurs */ public byte getByte(String columnName) throws SQLException { return getByte(findColumn(columnName)); } /** * * Retrieves the value of the designated column in the current row * of this ResultSet object as * a short in the Java programming language.

    * * * @param columnName the SQL name of the column * @return the column value; if the value is SQL NULL, the * value returned is 0 * @exception SQLException if a database access error occurs */ public short getShort(String columnName) throws SQLException { return getShort(findColumn(columnName)); } /** * * Retrieves the value of the designated column in the current row * of this ResultSet object as * an int in the Java programming language.

    * * * @param columnName the SQL name of the column * @return the column value; if the value is SQL NULL, the * value returned is 0 * @exception SQLException if a database access error occurs */ public int getInt(String columnName) throws SQLException { return getInt(findColumn(columnName)); } /** * * Retrieves the value of the designated column in the current row * of this ResultSet object as * a long in the Java programming language.

    * * * @param columnName the SQL name of the column * @return the column value; if the value is SQL NULL, the * value returned is 0 * @exception SQLException if a database access error occurs */ public long getLong(String columnName) throws SQLException { return getLong(findColumn(columnName)); } /** * * Retrieves the value of the designated column in the current row * of this ResultSet object as * a float in the Java programming language.

    * * * @param columnName the SQL name of the column * @return the column value; if the value is SQL NULL, the * value returned is 0 * @exception SQLException if a database access error occurs */ public float getFloat(String columnName) throws SQLException { return getFloat(findColumn(columnName)); } /** * * Retrieves the value of the designated column in the current row * of this ResultSet object as * a double in the Java programming language.

    * * * @param columnName the SQL name of the column * @return the column value; if the value is SQL NULL, the * value returned is 0 * @exception SQLException if a database access error occurs */ public double getDouble(String columnName) throws SQLException { return getDouble(findColumn(columnName)); } /** * * Retrieves the value of the designated column in the current row * of this ResultSet object as a * java.math.BigDecimal in the Java programming language.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Beginning with 1.7.0, HSQLDB converts the result and sets the scale * with BigDecimal.ROUND_HALF_DOWN. *

    * * * @param columnName the SQL name of the column * @param scale the number of digits to the right of the decimal point * @return the column value; if the value is SQL NULL, the * value returned is null * @exception SQLException if a database access error occurs * @deprecated by java.sun.com as of JDK 1.2 */ //#ifdef DEPRECATEDJDBC public BigDecimal getBigDecimal(String columnName, int scale) throws SQLException { return getBigDecimal(findColumn(columnName), scale); } //#endif /** * * Retrieves the value of the designated column in the current row * of this ResultSet object as * a byte array in the Java programming language. * The bytes represent the raw values returned by the driver.

    * * * @param columnName the SQL name of the column * @return the column value; if the value is SQL NULL, the * value returned is null * @exception SQLException if a database access error occurs */ public byte[] getBytes(String columnName) throws SQLException { return getBytes(findColumn(columnName)); } /** * * Retrieves the value of the designated column in the current row * of this ResultSet object as a * java.sql.Date object in the Java programming language.

    * * * @param columnName the SQL name of the column * @return the column value; if the value is SQL NULL, the * value returned is null * @exception SQLException if a database access error occurs */ public Date getDate(String columnName) throws SQLException { return getDate(findColumn(columnName)); } /** * * Retrieves the value of the designated column in the current row * of this ResultSet object as a java.sql.Time * object in the Java programming language.

    * * * @param columnName the SQL name of the column * @return the column value; * if the value is SQL NULL, * the value returned is null * @exception SQLException if a database access error occurs */ public Time getTime(String columnName) throws SQLException { return getTime(findColumn(columnName)); } /** * * Retrieves the value of the designated column in the current row * of this ResultSet object as * a java.sql.Timestamp object.

    * * * @param columnName the SQL name of the column * @return the column value; if the value is SQL NULL, the * value returned is null * @exception SQLException if a database access error occurs */ public Timestamp getTimestamp(String columnName) throws SQLException { return getTimestamp(findColumn(columnName)); } /** * * Retrieves the value of the designated column in the current row * of this ResultSet object as a stream of * ASCII characters. The value can then be read in chunks from the * stream. This method is particularly * suitable for retrieving large LONGVARCHAR values. * The JDBC driver will * do any necessary conversion from the database format into ASCII. * *

    Note: All the data in the returned stream must be * read prior to getting the value of any other column. The next * call to a getter method implicitly closes the stream. Also, a * stream may return 0 when the method available * is called whether there is data available or not.

    * * * @param columnName the SQL name of the column * @return a Java input stream that delivers the database column value * as a stream of one-byte ASCII characters. * If the value is SQL NULL, * the value returned is null. * @exception SQLException if a database access error occurs * @see #getAsciiStream(int) */ public java.io.InputStream getAsciiStream(String columnName) throws SQLException { return getAsciiStream(findColumn(columnName)); } /** * * Retrieves the value of the designated column in the current row * of this ResultSet object as a stream of two-byte * Unicode characters. The first byte is the high byte; the second * byte is the low byte. * * The value can then be read in chunks from the * stream. This method is particularly * suitable for retrieving large LONGVARCHAR values. * The JDBC technology-enabled driver will * do any necessary conversion from the database format into Unicode. * *

    Note: All the data in the returned stream must be * read prior to getting the value of any other column. The next * call to a getter method implicitly closes the stream. * Also, a stream may return 0 when the method * InputStream.available is called, whether there * is data available or not.

    * * * @param columnName the SQL name of the column * @return a Java input stream that delivers the database column value * as a stream of two-byte Unicode characters. * If the value is SQL NULL, the value returned * is null. * @exception SQLException if a database access error occurs * @deprecated use getCharacterStream instead * @see #getUnicodeStream(int) */ //#ifdef DEPRECATEDJDBC public java.io.InputStream getUnicodeStream(String columnName) throws SQLException { return getUnicodeStream(findColumn(columnName)); } //#endif /** * * Retrieves the value of the designated column in the current row * of this ResultSet object as a stream of uninterpreted * bytes. * The value can then be read in chunks from the * stream. This method is particularly * suitable for retrieving large LONGVARBINARY * values. * *

    Note: All the data in the returned stream must be * read prior to getting the value of any other column. The next * call to a getter method implicitly closes the stream. Also, a * stream may return 0 when the method available * is called whether there is data available or not.

    * * * @param columnName the SQL name of the column * @return a Java input stream that delivers the database column value * as a stream of uninterpreted bytes; * if the value is SQL NULL, the result is null * @exception SQLException if a database access error occurs */ public java.io.InputStream getBinaryStream(String columnName) throws SQLException { return getBinaryStream(findColumn(columnName)); } //===================================================================== // Advanced features: //===================================================================== /** * * Retrieves the first warning reported by calls on this * ResultSet object. * Subsequent warnings on this ResultSet object * will be chained to the SQLWarning object that * this method returns. * *

    The warning chain is automatically cleared each time a new * row is read. This method may not be called on a ResultSet * object that has been closed; doing so will cause an * SQLException to be thrown. *

    * Note: This warning chain only covers warnings caused * by ResultSet methods. Any warning caused by * Statement methods * (such as reading OUT parameters) will be chained on the * Statement object.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Up to and including 1.7.1, HSQLDB does not produce * SQLWarning objects. This method always returns * null. *

    * * * @return the first SQLWarning object reported or * null if there are none

    * * Up to and including 1.7.1, HSQLDB always returns null.

    * @exception SQLException if a database access error occurs or this * method is called on a closed result set */ public SQLWarning getWarnings() throws SQLException { return null; } /** * * Clears all warnings reported on this ResultSet object. * After this method is called, the method getWarnings * returns null until a new warning is * reported for this ResultSet object.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.1, HSQLDB does not produce SQLWarning * objects on any ResultSet object warning chain; calls to this method * are ignored. *

    * * * @exception SQLException if a database access error occurs */ public void clearWarnings() throws SQLException {} /** * * Retrieves the name of the SQL cursor used by this * ResultSet object. * *

    In SQL, a result table is retrieved through a cursor that is * named. The current row of a result set can be updated or deleted * using a positioned update/delete statement that references the * cursor name. To insure that the cursor has the proper isolation * level to support update, the cursor's SELECT statement * should be of the form SELECT FOR UPDATE. If * FOR UPDATE is omitted, the positioned updates may fail. * *

    The JDBC API supports this SQL feature by providing the name of the * SQL cursor used by a ResultSet object. * The current row of a ResultSet object * is also the current row of this SQL cursor. * *

    Note: If positioned update is not supported, a * SQLException is thrown.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB does not support this feature.

    * * Calling this method always throws an SQLException, * stating that the operation is not supported. *

    * * * @return the SQL name for this ResultSet object's cursor * @exception SQLException if a database access error occurs */ public String getCursorName() throws SQLException { throw Util.notSupported(); } /** * * Retrieves the number, types and properties of * this ResultSet object's columns.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Example:

    * * The following code fragment creates a ResultSet object rs, * creates a ResultSetMetaData object rsmd, and uses rsmd * to find out how many columns rs has and whether the first column * in rs can be used in a WHERE clause.

    * *

         * ResultSet         rs              = stmt.executeQuery("SELECT a, b, c FROM TABLE2");
         * ResultSetMetaData rsmd = rs.getMetaData();
    * int numberOfColumns = rsmd.getColumnCount();
    * boolean b = rsmd.isSearchable(1);
    *
    * *
    * * Warning:

    * * Including 1.7.1, HSQLDB did not generate accurate * ResultSetMetaData. Below were the the most important * methods to consider:

    * *

      *
    1. isAutoIncrement(int) always returned false
    2. *
    3. isCurrency(int) always returned false
    4. *
    5. isNullable(int) always returned * columnNullableUnknown
    6. *
    7. getColumnDisplaySize(int) returned zero for all valid column * numbers
    8. *
    9. getSchemaName(int) always returned * ""
    10. *
    11. getPrecision(int) always returned zero
    12. *
    13. getScale(int) always returned zero
    14. *
    15. getCatalogName(int) always returned * ""
    16. *

    * *


    * * Starting with 1.7.2, ResultSetMetaData has been split out into its own * interface implemenation (jdbcResultSetMetaData), support has been * improved considerably for a number of methods and behaviour has * been altered slightly in many areas. *
    * * * @return the description of this ResultSet object's columns * @exception SQLException if a database access error occurs * @see jdbcResultSetMetaData */ public ResultSetMetaData getMetaData() throws SQLException { if (rsmd == null) { rsmd = new jdbcResultSetMetaData(this, connProperties); } return rsmd; } /** * * Gets the value of the designated column in the current row * of this ResultSet object as * an Object in the Java programming language. * *

    This method will return the value of the given column as a * Java object. The type of the Java object will be the default * Java object type corresponding to the column's SQL type, * following the mapping for built-in types specified in the JDBC * specification. If the value is an SQL NULL, * the driver returns a Java null. * *

    This method may also be used to read datatabase-specific * abstract data types. * * In the JDBC 2.0 API, the behavior of method * getObject is extended to materialize * data of SQL user-defined types. When a column contains * a structured or distinct value, the behavior of this method is as * if it were a call to: getObject(columnIndex, * this.getStatement().getConnection().getTypeMap()).

    * * * @param columnIndex the first column is 1, the second is 2, ... * @return a java.lang.Object holding the column value * @exception SQLException if a database access error occurs */ public Object getObject(int columnIndex) throws SQLException { checkAvailable(); Object o; int t; try { o = nCurrent.data[--columnIndex]; t = rResult.metaData.colTypes[columnIndex]; } catch (ArrayIndexOutOfBoundsException e) { throw Util.sqlException(Trace.COLUMN_NOT_FOUND, String.valueOf(++columnIndex)); } // use checknull because getColumnInType is not used if (checkNull(o)) { return null; } switch (t) { case Types.DATE : return new Date(((Date) o).getTime()); case Types.TIME : return new Time(((Time) o).getTime()); case Types.TIMESTAMP : long m = ((Timestamp) o).getTime(); int n = ((Timestamp) o).getNanos(); Timestamp ts = new Timestamp(m); ts.setNanos(n); return ts; case Types.OTHER : case Types.JAVA_OBJECT : try { return ((JavaObject) o).getObject(); } catch (HsqlException e) { throw Util.sqlException( Trace.error(Trace.SERIALIZATION_FAILURE)); } case Types.BINARY : case Types.VARBINARY : case Types.LONGVARBINARY : return ((Binary) o).getClonedBytes(); default : return o; } } /** * * Gets the value of the designated column in the current row * of this ResultSet object as * an Object in the Java programming language. * *

    This method will return the value of the given column as a * Java object. The type of the Java object will be the default * Java object type corresponding to the column's SQL type, * following the mapping for built-in types specified in the JDBC * specification. If the value is an SQL NULL, * the driver returns a Java null. *

    * This method may also be used to read datatabase-specific * abstract data types. *

    * In the JDBC 2.0 API, the behavior of the method * getObject is extended to materialize * data of SQL user-defined types. When a column contains * a structured or distinct value, the behavior of this method is as * if it were a call to: getObject(columnIndex, * this.getStatement().getConnection().getTypeMap()).

    * * * @param columnName the SQL name of the column * @return a java.lang.Object holding the column value * @exception SQLException if a database access error occurs */ public Object getObject(String columnName) throws SQLException { return getObject(findColumn(columnName)); } //---------------------------------------------------------------- /** * * Maps the given ResultSet column name to its * ResultSet column index.

    * * * @param columnName the name of the column * @return the column index of the given column name * @exception SQLException if the ResultSet object does not * contain columnName or a database access error occurs */ public int findColumn(String columnName) throws SQLException { for (int i = 0; i < iColumnCount; i++) { String name = rResult.metaData.colLabels[i]; if (columnName.equalsIgnoreCase(name)) { return i + 1; } } throw Util.sqlException(Trace.COLUMN_NOT_FOUND, columnName); } //--------------------------JDBC 2.0----------------------------------- //--------------------------------------------------------------------- // Getters and Setters //--------------------------------------------------------------------- /** * * Retrieves the value of the designated column in the current row * of this ResultSet object as a * java.io.Reader object.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Starting with 1.7.0. HSQLDB supports this. *

    * * * @return a java.io.Reader object that contains the column * value; if the value is SQL NULL, the value returned * is null in the Java programming language. * @param columnIndex the first column is 1, the second is 2, ... * @exception SQLException if a database access error occurs * @since JDK 1.2 */ public java.io.Reader getCharacterStream(int columnIndex) throws SQLException { String s = getString(columnIndex); if (s == null) { return null; } return new StringReader(s); } /** * * Retrieves the value of the designated column in the current row * of this ResultSet object as a * java.io.Reader object.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Starting with 1.7.0, HSQLDB supports this. *

    * * * @param columnName the name of the column * @return a java.io.Reader object that contains the column * value; if the value is SQL NULL, the value returned is * null in the Java programming language * @exception SQLException if a database access error occurs * @since JDK 1.2 */ public java.io.Reader getCharacterStream(String columnName) throws SQLException { return getCharacterStream(findColumn(columnName)); } /** * * Retrieves the value of the designated column in the current row * of this ResultSet object as a * java.math.BigDecimal with full precision.

    * * * @param columnIndex the first column is 1, the second is 2, ... * @return the column value (full precision); * if the value is SQL NULL, the value returned is * null in the Java programming language. * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) */ public BigDecimal getBigDecimal(int columnIndex) throws SQLException { return (BigDecimal) getColumnInType(columnIndex, Types.DECIMAL); } /** * * Retrieves the value of the designated column in the current row * of this ResultSet object as a * java.math.BigDecimal with full precision.

    * * * @param columnName the column name * @return the column value (full precision); * if the value is SQL NULL, the value returned is * null in the Java programming language. * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) */ public BigDecimal getBigDecimal(String columnName) throws SQLException { return getBigDecimal(findColumn(columnName)); } //--------------------------------------------------------------------- // Traversal/Positioning //--------------------------------------------------------------------- /** * * Retrieves whether the cursor is before the first row in * this ResultSet object.

    * * * @return true if the cursor is before the first row; * false if the cursor is at any other position or the * result set contains no rows * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) */ public boolean isBeforeFirst() throws SQLException { // bInit indicates whether the resultset has not been traversed or not // true - it has ---- false it hasn't checkClosed(); return rResult.rRoot != null && !bInit; // End New Cose } /** * * Retrieves whether the cursor is after the last row in * this ResultSet object.

    * * * @return true if the cursor is after the last row; * false if the cursor is at any other position or the * result set contains no rows * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) */ public boolean isAfterLast() throws SQLException { // At afterLast condition exists when resultset has been traversed and // the current row is null. iCurrentRow should also be set to // afterlast but no need to test checkClosed(); return rResult.rRoot != null && bInit && nCurrent == null; } /** * * Retrieves whether the cursor is on the first row of * this ResultSet object.

    * * * @return true if the cursor is on the first row; * false otherwise * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) */ public boolean isFirst() throws SQLException { checkClosed(); return iCurrentRow == 1; } /** * * Retrieves whether the cursor is on the last row of * this ResultSet object. * Note: Calling the method isLast may be expensive * because the JDBC driver * might need to fetch ahead one row in order to determine * whether the current row is the last row in the result set.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, this method is not terribly expensive; * the entire result is fetched internally before this object * is returned to a caller. *

    * * * @return true if the cursor is on the last row; * false otherwise * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) */ public boolean isLast() throws SQLException { checkClosed(); // If the resultset has not been traversed, then exit with false // At the last row if the next row is null return rResult.rRoot != null && bInit && nCurrent != null && nCurrent.next == null; } /** * * Moves the cursor to the front of * this ResultSet object, just before the * first row. This method has no effect if the result set contains * no rows.

    * * * @exception SQLException if a database access error * occurs or the result set type is TYPE_FORWARD_ONLY * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) */ public void beforeFirst() throws SQLException { checkClosed(); if (this.getType() == TYPE_FORWARD_ONLY) { throw Util.sqlException(Trace.RESULTSET_FORWARD_ONLY); } // Set to beforeFirst status bInit = false; nCurrent = null; iCurrentRow = 0; } /** * * Moves the cursor to the end of * this ResultSet object, just after the last row. This * method has no effect if the result set contains no rows.

    * * * @exception SQLException if a database access error * occurs or the result set type is TYPE_FORWARD_ONLY * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) */ public void afterLast() throws SQLException { checkClosed(); if (this.getType() == TYPE_FORWARD_ONLY) { throw Util.sqlException(Trace.RESULTSET_FORWARD_ONLY); } if (rResult != null && rResult.rRoot != null) { // not an empty resultset, so set the afterLast status bInit = true; iCurrentRow = rResult.getSize() + 1; nCurrent = null; } } /** * * Moves the cursor to the first row in * this ResultSet object.

    * * * @return true if the cursor is on a valid row; * false if there are no rows in the result set * @exception SQLException if a database access error * occurs or the result set type is TYPE_FORWARD_ONLY * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) */ public boolean first() throws SQLException { checkClosed(); if (this.getType() == TYPE_FORWARD_ONLY) { throw Util.sqlException(Trace.RESULTSET_FORWARD_ONLY); } if (rResult == null) { return false; } bInit = false; if (rResult.rRoot != null) { bInit = true; nCurrent = rResult.rRoot; iCurrentRow = 1; } return bInit; } /** * * Moves the cursor to the last row in * this ResultSet object.

    * * * @return true if the cursor is on a valid row; * false if there are no rows in the result set * @exception SQLException if a database access error * occurs or the result set type is TYPE_FORWARD_ONLY * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) */ public boolean last() throws SQLException { checkClosed(); if (this.getType() == TYPE_FORWARD_ONLY) { throw Util.sqlException(Trace.RESULTSET_FORWARD_ONLY); } if (rResult == null) { return false; } if (rResult.rRoot == null) { return false; } // it resultset not traversed yet, set to first row if (!bInit || nCurrent == null) { first(); } // go to the last row while (nCurrent.next != null) { iCurrentRow++; nCurrent = nCurrent.next; } return true; } /** * * Retrieves the current row number. The first row is number 1, the * second number 2, and so on.

    * * * @return the current row number; 0 if there is no current * row * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) */ public int getRow() throws SQLException { checkClosed(); return iCurrentRow; } /** * * Moves the cursor to the given row number in * this ResultSet object. * *

    If the row number is positive, the cursor moves to * the given row number with respect to the * beginning of the result set. The first row is row 1, the second * is row 2, and so on. * *

    If the given row number is negative, the cursor moves to * an absolute row position with respect to * the end of the result set. For example, calling the method * absolute(-1) positions the * cursor on the last row; calling the method absolute(-2) * moves the cursor to the next-to-last row, and so on. * *

    An attempt to position the cursor beyond the first/last row in * the result set leaves the cursor before the first row or after * the last row. * *

    Note: Calling absolute(1) is the same * as calling first(). Calling absolute(-1) * is the same as calling last().

    * * * @param row the number of the row to which the cursor should move. * A positive number indicates the row number counting from the * beginning of the result set; a negative number indicates the * row number counting from the end of the result set * @return true if the cursor is on the result set; * false otherwise * @exception SQLException if a database access error * occurs, or the result set type is TYPE_FORWARD_ONLY * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) */ public boolean absolute(int row) throws SQLException { checkClosed(); if (this.getType() == TYPE_FORWARD_ONLY) { throw Util.sqlException(Trace.RESULTSET_FORWARD_ONLY); } if (rResult == null) { return false; } if (rResult.rRoot == null || row == 0) { // No rows in the resultset or tried to execute absolute(0) // which is not valid return false; } // A couple of special cases switch (row) { case 1 : return first(); // absolute(1) is same as first() case -1 : return last(); // absolute(-1) is same as last() } // If the row variable is negative, calculate the target // row from the end of the resultset. if (row < 0) { // we know there are rows in resultset, so get the last last(); // calculate the target row row = iCurrentRow + row + 1; // Exit if the target row is before the beginning of the resultset if (row <= 0) { beforeFirst(); return false; } } if (row < iCurrentRow || iCurrentRow == 0) { // Need to go back and start from the beginning of the resultset beforeFirst(); } // go to the tagget row; while (row > iCurrentRow) { next(); if (nCurrent == null) { break; } } return nCurrent != null; } /** * * Moves the cursor a relative number of rows, either positive or * negative. Attempting to move beyond the first/last row in the * result set positions the cursor before/after the * the first/last row. Calling relative(0) is valid, but does * not change the cursor position. * *

    Note: Calling the method relative(1) * is identical to calling the method next() and * calling the method relative(-1) is identical * to calling the method previous().

    * * * @param rows an int specifying the number of rows to * move from the current row; a positive number moves the cursor * forward; a negative number moves the cursor backward * @return true if the cursor is on a row; * false otherwise * @exception SQLException if a database access error occurs, * there is no current row, or the result set type is * TYPE_FORWARD_ONLY * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) */ public boolean relative(int rows) throws SQLException { checkClosed(); if (this.getType() == TYPE_FORWARD_ONLY) { throw Util.sqlException(Trace.RESULTSET_FORWARD_ONLY); } if (rResult == null) { return false; } if (rResult.rRoot == null) { return false; } // if the direction is backward calculate the target row if (rows < 0) { rows = iCurrentRow + rows; // set status to beforeFirst status beforeFirst(); // Exit if the target row is before the beginning of the resultset if (rows <= 0) { return false; } } while (rows-- > 0) { next(); if (nCurrent == null) { break; } } // if nCurrent is null, the postion will be afterLast return nCurrent != null; } /** * * Moves the cursor to the previous row in this * ResultSet object.

    * * * @return true if the cursor is on a valid row; * false if it is off the result set * @exception SQLException if a database access error * occurs or the result set type is TYPE_FORWARD_ONLY * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) */ public boolean previous() throws SQLException { checkClosed(); if (this.getType() == TYPE_FORWARD_ONLY) { throw Util.sqlException(Trace.RESULTSET_FORWARD_ONLY); } if (rResult == null || rResult.rRoot == null || iCurrentRow == 0) { // Empty resultset or no valid row return false; } if (bInit && nCurrent == null) { // Special condition: in an afterlast condition so go to last // row in the resultset return last(); } int targetRow = iCurrentRow - 1; if (targetRow == 0) { // Have gone to a beforeFirst status. Not sure if the // beforeFirst status should be set or not. // The spec is not very clear. beforeFirst(); return false; } // Go to the target row. We always have to start from the first row // since the resultset is a forward direction list only first(); while (targetRow != iCurrentRow) { nCurrent = nCurrent.next; iCurrentRow++; } return nCurrent != null; } //--------------------------------------------------------------------- // Properties //--------------------------------------------------------------------- // fredt@users - 20020902 - patch 1.7.1 - fetch size and direction // We now interpret fetch size and direction as irrelevent to HSQLDB because // the result set is built and returned as one whole data structure. // Exceptions thrown are adjusted to mimimal and the javadoc updated. /** * * Gives a hint as to the direction in which the rows in this * ResultSet object will be processed. * The initial value is determined by the * Statement object * that produced this ResultSet object. * The fetch direction may be changed at any time.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB builds and returns result sets as a whole; * this method does nothing. However, as mandated by the JDBC standard, * an SQLException is thrown if the result set type is TYPE_FORWARD_ONLY * and a fetch direction other than FETCH_FORWARD is requested. *

    * * * @param direction an int specifying the suggested * fetch direction; one of ResultSet.FETCH_FORWARD, * ResultSet.FETCH_REVERSE, or * ResultSet.FETCH_UNKNOWN * @exception SQLException if a database access error occurs or * the result set type is TYPE_FORWARD_ONLY and the * fetch direction is not FETCH_FORWARD * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) * @see jdbcStatement#setFetchDirection * @see #getFetchDirection */ public void setFetchDirection(int direction) throws SQLException { checkClosed(); if (rsType == TYPE_FORWARD_ONLY && direction != FETCH_FORWARD) { throw Util.notSupported(); } } /** * * Retrieves the fetch direction for this * ResultSet object.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB builds and returns result sets as a whole; * this method always returns FETCH_FORWARD, but the value * has no real meaning. *

    * * * @return the current fetch direction for this ResultSet * object * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) * @see #setFetchDirection */ public int getFetchDirection() throws SQLException { checkClosed(); return FETCH_FORWARD; } /** * * Gives the JDBC driver a hint as to the number of rows that should * be fetched from the database when more rows are needed for this * ResultSet object. * If the fetch size specified is zero, the JDBC driver * ignores the value and is free to make its own best guess as to what * the fetch size should be. The default value is set by the * Statement object * that created the result set. The fetch size may be changed at any * time.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB builds and returns result sets * as a whole; this method does nothing. *

    * * * @param rows the number of rows to fetch * @exception SQLException if a database access error occurs or the * condition 0 <= rows <= this.getMaxRows() is not satisfied * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) * @see #getFetchSize * @see jdbcStatement#setFetchSize * @see jdbcStatement#getFetchSize */ public void setFetchSize(int rows) throws SQLException { if (rows < 0) { throw Util.sqlException(Trace.INVALID_JDBC_ARGUMENT); } } /** * * Retrieves the fetch size for this * ResultSet object.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB builds and returns result sets * as a whole; the value returned (always 1) has no significance. *

    * * * @return the current fetch size for this ResultSet object * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) * @see #setFetchSize * @see jdbcStatement#getFetchSize * @see jdbcStatement#setFetchSize */ public int getFetchSize() throws SQLException { checkClosed(); return 1; } /** * * Retrieves the type of this ResultSet object. * The type is determined by the Statement object * that created the result set.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB does not support and thus * never returns ResultSet.TYPE_SCROLL_SENSITIVE. *

    * * * @return ResultSet.TYPE_FORWARD_ONLY, * ResultSet.TYPE_SCROLL_INSENSITIVE, * or ResultSet.TYPE_SCROLL_SENSITIVE (not supported) * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) */ public int getType() throws SQLException { checkClosed(); return rsType; } /** * * Retrieves the concurrency mode of this ResultSet object. * The concurrency used is determined by the * Statement object that created the result set.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB supports only CONCUR_READ_ONLY; * this method always returns CONCUR_READ_ONLY. *

    * * * @return the concurrency type, either * ResultSet.CONCUR_READ_ONLY * or ResultSet.CONCUR_UPDATABLE * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) */ public int getConcurrency() throws SQLException { checkClosed(); return CONCUR_READ_ONLY; } //--------------------------------------------------------------------- // Updates //--------------------------------------------------------------------- /** * * Retrieves whether the current row has been updated. The value returned * depends on whether or not the result set can detect updates.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB does not support updateable results.

    * * This method always returns false. *

    * * * @return true if both (1) the row has been visibly updated * by the owner or another and (2) updates are detected * @exception SQLException if a database access error occurs * @see DatabaseMetaData#updatesAreDetected * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) */ public boolean rowUpdated() throws SQLException { checkClosed(); return false; } /** * * Retrieves whether the current row has had an insertion. * The value returned depends on whether or not this * ResultSet object can detect visible inserts.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB does not support updateable results.

    * * This method always returns false. *

    * * * @return true if a row has had an insertion * and insertions are detected; false otherwise * @exception SQLException if a database access error occurs * @see DatabaseMetaData#insertsAreDetected * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) */ public boolean rowInserted() throws SQLException { checkClosed(); return false; } /** * * Retrieves whether a row has been deleted. A deleted row may leave * a visible "hole" in a result set. This method can be used to * detect holes in a result set. The value returned depends on whether * or not this ResultSet object can detect deletions.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB does not support updateable results.

    * * This method always returns false. *

    * * @return true if a row was deleted and deletions are * detected; false otherwise * @exception SQLException if a database access error occurs * @see DatabaseMetaData#deletesAreDetected * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) */ public boolean rowDeleted() throws SQLException { checkClosed(); return false; } /** * * Gives a nullable column a null value. * * The updater methods are used to update column values in the * current row or the insert row. The updater methods do not * update the underlying database; instead the updateRow * or insertRow methods are called to update the database.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.1, HSQLDB does not support updateable results.

    * * This method always throws an SQLException stating that * the operation is not supported. *

    * * * @param columnIndex the first column is 1, the second is 2, ... * @exception SQLException if a database access error occurs * @since JDK 1.2 */ public void updateNull(int columnIndex) throws SQLException { throw Util.notSupported(); } /** * * Updates the designated column with a boolean value. * The updater methods are used to update column values in the * current row or the insert row. The updater methods do not * update the underlying database; instead the updateRow or * insertRow methods are called to update the database.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB does not support updateable results.

    * * This method always throws an SQLException, stating that * the operation is not supported. *

    * * * @param columnIndex the first column is 1, the second is 2, ... * @param x the new column value * @exception SQLException if a database access error occurs * @since JDK 1.2 */ public void updateBoolean(int columnIndex, boolean x) throws SQLException { throw Util.notSupported(); } /** * * Updates the designated column with a byte value. * The updater methods are used to update column values in the * current row or the insert row. The updater methods do not * update the underlying database; instead the updateRow or * insertRow methods are called to update the database.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB does not support updateable results.

    * * This method always throws an SQLException, stating that * the operation is not supported. *

    * * * @param columnIndex the first column is 1, the second is 2, ... * @param x the new column value * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) */ public void updateByte(int columnIndex, byte x) throws SQLException { throw Util.notSupported(); } /** * * Updates the designated column with a short value. * The updater methods are used to update column values in the * current row or the insert row. The updater methods do not * update the underlying database; instead the updateRow or * insertRow methods are called to update the database.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB does not support updateable results.

    * * This method always throws an SQLException stating that * the operation is not supported. *

    * * * @param columnIndex the first column is 1, the second is 2, ... * @param x the new column value * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) */ public void updateShort(int columnIndex, short x) throws SQLException { throw Util.notSupported(); } /** * * Updates the designated column with an int value. * The updater methods are used to update column values in the * current row or the insert row. The updater methods do not * update the underlying database; instead the updateRow or * insertRow methods are called to update the database.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB does not support updateable results.

    * * This method always throws an SQLException stating that * the operation is not supported. *

    * * * @param columnIndex the first column is 1, the second is 2, ... * @param x the new column value * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) */ public void updateInt(int columnIndex, int x) throws SQLException { throw Util.notSupported(); } /** * * Updates the designated column with a long value. * The updater methods are used to update column values in the * current row or the insert row. The updater methods do not * update the underlying database; instead the updateRow or * insertRow methods are called to update the database.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB does not support updateable results.

    * * This method always throws an SQLException stating that * the operation is not supported. *

    * * * @param columnIndex the first column is 1, the second is 2, ... * @param x the new column value * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) */ public void updateLong(int columnIndex, long x) throws SQLException { throw Util.notSupported(); } /** * * Updates the designated column with a float value. * The updater methods are used to update column values in the * current row or the insert row. The updater methods do not * update the underlying database; instead the updateRow or * insertRow methods are called to update the database.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB does not support updateable results.

    * * This method always throws an SQLException, stating that * the operation is not supported. *

    * * * @param columnIndex the first column is 1, the second is 2, ... * @param x the new column value * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) */ public void updateFloat(int columnIndex, float x) throws SQLException { throw Util.notSupported(); } /** * * Updates the designated column with a double value. * The updater methods are used to update column values in the * current row or the insert row. The updater methods do not * update the underlying database; instead the updateRow or * insertRow methods are called to update the database.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB does not support updateable results.

    * * This method always throws an SQLException, stating that * the operation is not supported. *

    * * * @param columnIndex the first column is 1, the second is 2, ... * @param x the new column value * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) */ public void updateDouble(int columnIndex, double x) throws SQLException { throw Util.notSupported(); } /** * * Updates the designated column with a java.math.BigDecimal * value. * The updater methods are used to update column values in the * current row or the insert row. The updater methods do not * update the underlying database; instead the updateRow or * insertRow methods are called to update the database.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB does not support updateable results.

    * * This method always throws an SQLException stating that * the operation is not supported. *

    * * * @param columnIndex the first column is 1, the second is 2, ... * @param x the new column value * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) */ public void updateBigDecimal(int columnIndex, BigDecimal x) throws SQLException { throw Util.notSupported(); } /** * * Updates the designated column with a String value. * The updater methods are used to update column values in the * current row or the insert row. The updater methods do not * update the underlying database; instead the updateRow or * insertRow methods are called to update the database.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB does not support updateable results.

    * * This method always throws an SQLException, stating that * the operation is not supported. *

    * * * @param columnIndex the first column is 1, the second is 2, ... * @param x the new column value * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) */ public void updateString(int columnIndex, String x) throws SQLException { throw Util.notSupported(); } /** * * Updates the designated column with a byte array value. * The updater methods are used to update column values in the * current row or the insert row. The updater methods do not * update the underlying database; instead the updateRow or * insertRow methods are called to update the database.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB does not support updateable result sets.

    * * This method always throws an SQLException, stating that * the operation is not supported. *

    * * * @param columnIndex the first column is 1, the second is 2, ... * @param x the new column value * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) */ public void updateBytes(int columnIndex, byte[] x) throws SQLException { throw Util.notSupported(); } /** * * Updates the designated column with a java.sql.Date value. * The updater methods are used to update column values in the * current row or the insert row. The updater methods do not * update the underlying database; instead the updateRow or * insertRow methods are called to update the database.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB does not support updateable result sets.

    * * This method always throws an SQLException, stating that * the operation is not supported. *

    * * * @param columnIndex the first column is 1, the second is 2, ... * @param x the new column value * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) */ public void updateDate(int columnIndex, Date x) throws SQLException { throw Util.notSupported(); } /** * * Updates the designated column with a java.sql.Time value. * The updater methods are used to update column values in the * current row or the insert row. The updater methods do not * update the underlying database; instead the updateRow or * insertRow methods are called to update the database.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB does not support updateable result sets.

    * * This method always throws an SQLException stating that * the operation is not supported. *

    * * * @param columnIndex the first column is 1, the second is 2, ... * @param x the new column value * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) */ public void updateTime(int columnIndex, Time x) throws SQLException { throw Util.notSupported(); } /** * * Updates the designated column with a java.sql.Timestamp * value. * The updater methods are used to update column values in the * current row or the insert row. The updater methods do not * update the underlying database; instead the updateRow or * insertRow methods are called to update the database.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB does not support updateable result sets.

    * * This method always throws an SQLException stating that * the operation is not supported. *

    * * * @param columnIndex the first column is 1, the second is 2, ... * @param x the new column value * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) */ public void updateTimestamp(int columnIndex, Timestamp x) throws SQLException { throw Util.notSupported(); } /** * * Updates the designated column with an ascii stream value. * The updater methods are used to update column values in the * current row or the insert row. The updater methods do not * update the underlying database; instead the updateRow or * insertRow methods are called to update the database.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB does not support updateable result sets.

    * * This method always throws an SQLException stating that * the operation is not supported. *

    * * @param columnIndex the first column is 1, the second is 2, ... * @param x the new column value * @param length the length of the stream * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) */ public void updateAsciiStream(int columnIndex, java.io.InputStream x, int length) throws SQLException { throw Util.notSupported(); } /** * * Updates the designated column with a binary stream value. * The updater methods are used to update column values in the * current row or the insert row. The updater methods do not * update the underlying database; instead the updateRow or * insertRow methods are called to update the database.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB does not support updateable result sets.

    * * This method always throws an SQLException stating that * the operation is not supported. *

    * * * @param columnIndex the first column is 1, the second is 2, ... * @param x the new column value * @param length the length of the stream * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) */ public void updateBinaryStream(int columnIndex, java.io.InputStream x, int length) throws SQLException { throw Util.notSupported(); } /** * * Updates the designated column with a character stream value. * The updater methods are used to update column values in the * current row or the insert row. The updater methods do not * update the underlying database; instead the updateRow or * insertRow methods are called to update the database.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB does not support updateable result sets.

    * * This method always throws an SQLException stating that * the operation is not supported. *

    * * * @param columnIndex the first column is 1, the second is 2, ... * @param x the new column value * @param length the length of the stream * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) */ public void updateCharacterStream(int columnIndex, java.io.Reader x, int length) throws SQLException { throw Util.notSupported(); } /** * * Updates the designated column with an Object value. * The updater methods are used to update column values in the * current row or the insert row. The updater methods do not * update the underlying database; instead the updateRow or * insertRow methods are called to update the database.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB does not support updateable result sets.

    * * This method always throws an SQLException stating that * the operation is not supported. *

    * * * @param columnIndex the first column is 1, the second is 2, ... * @param x the new column value * @param scale for java.sql.Types.DECIMA * or java.sql.Types.NUMERIC types, * this is the number of digits after the decimal point. For all other * types this value will be ignored. * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) */ public void updateObject(int columnIndex, Object x, int scale) throws SQLException { throw Util.notSupported(); } /** * * Updates the designated column with an Object value. * The updater methods are used to update column values in the * current row or the insert row. The updater methods do not * update the underlying database; instead the updateRow or * insertRow methods are called to update the database.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB does not support updateable result sets.

    * * This method always throws an SQLException stating that * the operation is not supported. *

    * * * @param columnIndex the first column is 1, the second is 2, ... * @param x the new column value * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) */ public void updateObject(int columnIndex, Object x) throws SQLException { throw Util.notSupported(); } /** * * Updates the designated column with a null value. * The updater methods are used to update column values in the * current row or the insert row. The updater methods do not * update the underlying database; instead the updateRow or * insertRow methods are called to update the database.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB does not support updateable result sets.

    * * This method always throws an SQLException stating that * the operation is not supported. *

    * * * @param columnName the name of the column * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) */ public void updateNull(String columnName) throws SQLException { updateNull(findColumn(columnName)); } /** * * Updates the designated column with a boolean value. * The updater methods are used to update column values in the * current row or the insert row. The updater methods do not * update the underlying database; instead the updateRow or * insertRow methods are called to update the database.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB does not support updateable result sets.

    * * This method always throws an SQLException stating that * the operation is not supported. *

    * * * @param columnName the name of the column * @param x the new column value * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) */ public void updateBoolean(String columnName, boolean x) throws SQLException { updateBoolean(findColumn(columnName), x); } /** * * Updates the designated column with a byte value. * The updater methods are used to update column values in the * current row or the insert row. The updater methods do not * update the underlying database; instead the updateRow or * insertRow methods are called to update the database.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB does not support updateable result sets.

    * * This method always throws an SQLException stating that * the operation is not supported. *

    * * * @param columnName the name of the column * @param x the new column value * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) */ public void updateByte(String columnName, byte x) throws SQLException { updateByte(findColumn(columnName), x); } /** * * Updates the designated column with a short value. * The updater methods are used to update column values in the * current row or the insert row. The updater methods do not * update the underlying database; instead the updateRow or * insertRow methods are called to update the database.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB does not support updateable result sets.

    * * This method always throws an SQLException stating that * the operation is not supported. *

    * * * @param columnName the name of the column * @param x the new column value * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) */ public void updateShort(String columnName, short x) throws SQLException { updateShort(findColumn(columnName), x); } /** * * Updates the designated column with an int value. * The updater methods are used to update column values in the * current row or the insert row. The updater methods do not * update the underlying database; instead the updateRow or * insertRow methods are called to update the database.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB does not support updateable result sets.

    * * This method always throws an SQLException stating that * the operation is not supported. *

    * * * @param columnName the name of the column * @param x the new column value * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) */ public void updateInt(String columnName, int x) throws SQLException { updateInt(findColumn(columnName), x); } /** * * Updates the designated column with a long value. * The updater methods are used to update column values in the * current row or the insert row. The updater methods do not * update the underlying database; instead the updateRow or * insertRow methods are called to update the database.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB does not support updateable result sets.

    * * This method always throws an SQLException stating that * the operation is not supported. *

    * * * @param columnName the name of the column * @param x the new column value * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) */ public void updateLong(String columnName, long x) throws SQLException { updateLong(findColumn(columnName), x); } /** * * Updates the designated column with a float value. * The updater methods are used to update column values in the * current row or the insert row. The updater methods do not * update the underlying database; instead the updateRow or * insertRow methods are called to update the database.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB does not support updateable result sets.

    * * This method always throws an SQLException stating that * the operation is not supported. *

    * * * @param columnName the name of the column * @param x the new column value * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) */ public void updateFloat(String columnName, float x) throws SQLException { updateFloat(findColumn(columnName), x); } /** * * Updates the designated column with a double value. * The updater methods are used to update column values in the * current row or the insert row. The updater methods do not * update the underlying database; instead the updateRow or * insertRow methods are called to update the database.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB does not support updateable result sets.

    * * This method always throws an SQLException stating that * the operation is not supported. *

    * * * @param columnName the name of the column * @param x the new column value * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) */ public void updateDouble(String columnName, double x) throws SQLException { updateDouble(findColumn(columnName), x); } /** * * Updates the designated column with a java.sql.BigDecimal * value. * The updater methods are used to update column values in the * current row or the insert row. The updater methods do not * update the underlying database; instead the updateRow or * insertRow methods are called to update the database.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB does not support updateable result sets.

    * * This method always throws an SQLException stating that * the operation is not supported. *

    * * * @param columnName the name of the column * @param x the new column value * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) */ public void updateBigDecimal(String columnName, BigDecimal x) throws SQLException { updateBigDecimal(findColumn(columnName), x); } /** * * Updates the designated column with a String value. * The updater methods are used to update column values in the * current row or the insert row. The updater methods do not * update the underlying database; instead the updateRow or * insertRow methods are called to update the database.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB does not support updateable result sets.

    * * This method always throws an SQLException stating that * the operation is not supported. *

    * * * @param columnName the name of the column * @param x the new column value * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) */ public void updateString(String columnName, String x) throws SQLException { updateString(findColumn(columnName), x); } /** * * Updates the designated column with a byte array value. * * The updater methods are used to update column values in the * current row or the insert row. The updater methods do not * update the underlying database; instead the updateRow or * insertRow methods are called to update the database.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB does not support updateable result sets.

    * * This method always throws an SQLException stating that * the operation is not supported. *

    * * * @param columnName the name of the column * @param x the new column value * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) */ public void updateBytes(String columnName, byte[] x) throws SQLException { updateBytes(findColumn(columnName), x); } /** * * Updates the designated column with a java.sql.Date value. * The updater methods are used to update column values in the * current row or the insert row. The updater methods do not * update the underlying database; instead the updateRow or * insertRow methods are called to update the database.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB does not support updateable result sets.

    * * This method always throws an SQLException stating that * the operation is not supported. *

    * * * @param columnName the name of the column * @param x the new column value * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) */ public void updateDate(String columnName, Date x) throws SQLException { updateDate(findColumn(columnName), x); } /** * * Updates the designated column with a java.sql.Time value. * The updater methods are used to update column values in the * current row or the insert row. The updater methods do not * update the underlying database; instead the updateRow or * insertRow methods are called to update the database.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB does not support updateable result sets.

    * * This method always throws an SQLException stating that * the operation is not supported. *

    * * * @param columnName the name of the column * @param x the new column value * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) */ public void updateTime(String columnName, Time x) throws SQLException { updateTime(findColumn(columnName), x); } /** * * Updates the designated column with a java.sql.Timestamp * value. * The updater methods are used to update column values in the * current row or the insert row. The updater methods do not * update the underlying database; instead the updateRow or * insertRow methods are called to update the database.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB does not support updateable result sets.

    * * This method always throws an SQLException stating that * the operation is not supported. *

    * * * @param columnName the name of the column * @param x the new column value * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) */ public void updateTimestamp(String columnName, Timestamp x) throws SQLException { updateTimestamp(findColumn(columnName), x); } /** * * Updates the designated column with an ascii stream value. * The updater methods are used to update column values in the * current row or the insert row. The updater methods do not * update the underlying database; instead the updateRow or * insertRow methods are called to update the database.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB does not support updateable result sets.

    * * This method always throws an SQLException stating that * the operation is not supported. *

    * * * @param columnName the name of the column * @param x the new column value * @param length the length of the stream * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) */ public void updateAsciiStream(String columnName, java.io.InputStream x, int length) throws SQLException { updateAsciiStream(findColumn(columnName), x, length); } /** * * Updates the designated column with a binary stream value. * The updater methods are used to update column values in the * current row or the insert row. The updater methods do not * update the underlying database; instead the updateRow or * insertRow methods are called to update the database.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB does not support updateable result sets.

    * * This method always throws an SQLException stating that * the operation is not supported. *

    * * * @param columnName the name of the column * @param x the new column value * @param length the length of the stream * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) */ public void updateBinaryStream(String columnName, java.io.InputStream x, int length) throws SQLException { updateBinaryStream(findColumn(columnName), x, length); } /** * * Updates the designated column with a character stream value. * The updater methods are used to update column values in the * current row or the insert row. The updater methods do not * update the underlying database; instead the updateRow or * insertRow methods are called to update the database.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB does not support updateable result sets.

    * * This method always throws an SQLException stating that * the operation is not supported. *

    * * * @param columnName the name of the column * @param reader the java.io.Reader object containing * the new column value * @param length the length of the stream * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) */ public void updateCharacterStream(String columnName, java.io.Reader reader, int length) throws SQLException { updateCharacterStream(findColumn(columnName), reader, length); } /** * * Updates the designated column with an Object value. * The updater methods are used to update column values in the * current row or the insert row. The updater methods do not * update the underlying database; instead the updateRow or * insertRow methods are called to update the database.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB does not support updateable result sets.

    * * This method always throws an SQLException stating that * the operation is not supported. *

    * * * @param columnName the name of the column * @param x the new column value * @param scale for java.sql.Types.DECIMAL * or java.sql.Types.NUMERIC types, * this is the number of digits after the decimal point. For all other * types this value will be ignored. * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) */ public void updateObject(String columnName, Object x, int scale) throws SQLException { updateObject(findColumn(columnName), x, scale); } /** * * Updates the designated column with an Object value. * The updater methods are used to update column values in the * current row or the insert row. The updater methods do not * update the underlying database; instead the updateRow or * insertRow methods are called to update the database.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB does not support updateable result sets.

    * * This method always throws an SQLException stating that * the operation is not supported. *

    * * * @param columnName the name of the column * @param x the new column value * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) */ public void updateObject(String columnName, Object x) throws SQLException { updateObject(findColumn(columnName), x); } /** * * Inserts the contents of the insert row into this * ResultSet object and into the database. * The cursor must be on the insert row when this method is called.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB does not support updateable result sets.

    * * This method always throws an SQLException stating that * the operation is not supported. *

    * * * @exception SQLException if a database access error occurs, * if this method is called when the cursor is not on the insert row, * or if not all of non-nullable columns in * the insert row have been given a value * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) */ public void insertRow() throws SQLException { throw Util.notSupported(); } /** * * Updates the underlying database with the new contents of the * current row of this ResultSet object. * This method cannot be called when the cursor is on the insert row.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB does not support updateable result sets.

    * * This method always throws an SQLException stating that * the operation is not supported. *

    * * * @exception SQLException if a database access error occurs or * if this method is called when the cursor is on the insert row * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) */ public void updateRow() throws SQLException { throw Util.notSupported(); } /** * * Deletes the current row from this ResultSet object * and from the underlying database. This method cannot be called when * the cursor is on the insert row.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB does not support updateable result sets.

    * * This method always throws an SQLException stating that * the operation is not supported. *

    * * * @exception SQLException if a database access error occurs * or if this method is called when the cursor is on the insert row * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) */ public void deleteRow() throws SQLException { throw Util.notSupported(); } /** * * Refreshes the current row with its most recent value in * the database. This method cannot be called when * the cursor is on the insert row. * *

    The refreshRow method provides a way for an * application to * explicitly tell the JDBC driver to refetch a row(s) from the * database. An application may want to call refreshRow when * caching or prefetching is being done by the JDBC driver to * fetch the latest value of a row from the database. The JDBC driver * may actually refresh multiple rows at once if the fetch size is * greater than one. * *

    All values are refetched subject to the transaction isolation * level and cursor sensitivity. If refreshRow is called * after calling an updater method, but before calling * the method updateRow, then the * updates made to the row are lost. Calling the method * refreshRow frequently will likely slow performance.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB does not support updateable result sets.

    * * This method always throws an SQLException stating that * the operation is not supported. *

    * * * @exception SQLException if a database access error * occurs or if this method is called when the cursor is on the insert row * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) */ public void refreshRow() throws SQLException { throw Util.notSupported(); } /** * * Cancels the updates made to the current row in this * ResultSet object. * This method may be called after calling an * updater method(s) and before calling * the method updateRow to roll back * the updates made to a row. If no updates have been made or * updateRow has already been called, this method has no * effect.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB does not support updateable result sets.

    * * This method always throws an SQLException stating that * the operation is not supported. *

    * * * @exception SQLException if a database access error * occurs or if this method is called when the cursor is * on the insert row * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) */ public void cancelRowUpdates() throws SQLException { throw Util.notSupported(); } /** * * Moves the cursor to the insert row. The current cursor position is * remembered while the cursor is positioned on the insert row. * * The insert row is a special row associated with an updatable * result set. It is essentially a buffer where a new row may * be constructed by calling the updater methods prior to * inserting the row into the result set. * * Only the updater, getter, * and insertRow methods may be * called when the cursor is on the insert row. All of the columns in * a result set must be given a value each time this method is * called before calling insertRow. * An updater method must be called before a * getter method can be called on a column value.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB does not support updateable result sets.

    * * This method always throws an SQLException stating that * the operation is not supported. *

    * * * @exception SQLException if a database access error occurs * or the result set is not updatable * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) */ public void moveToInsertRow() throws SQLException { throw Util.notSupported(); } /** * * Moves the cursor to the remembered cursor position, usually the * current row. This method has no effect if the cursor is not on * the insert row.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB does not support updateable result sets.

    * * This method is ignored. *

    * * @exception SQLException if a database access error occurs * or the result set is not updatable * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) */ public void moveToCurrentRow() throws SQLException {} /** * * Retrieves the Statement object that produced this * ResultSet object. * If the result set was generated some other way, such as by a * DatabaseMetaData method, this method returns * null.

    * * * @return the Statment object that produced * this ResultSet object or null * if the result set was produced some other way * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) */ public Statement getStatement() throws SQLException { return (Statement) sqlStatement; } /** * * Retrieves the value of the designated column in the current row * of this ResultSet object as an Object * in the Java programming language. * If the value is an SQL NULL, * the driver returns a Java null. * This method uses the given Map object * for the custom mapping of the * SQL structured or distinct type that is being retrieved.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB does not support this feature.

    * * This method always throws an SQLException, * stating that the operation is not supported. *

    * * * @param i the first column is 1, the second is 2, ... * @param map a java.util.Map object that contains the * mapping from SQL type names to classes in the Java programming * language * @return an Object in the Java programming language * representing the SQL value * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) */ //#ifdef JAVA2 public Object getObject(int i, Map map) throws SQLException { throw Util.notSupported(); } //#endif JAVA2 /** * * Retrieves the value of the designated column in the current row * of this ResultSet object as a Ref object * in the Java programming language.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB does not support this feature.

    * * This method always throws an SQLException * stating that the operation is not supported. *

    * * * @param i the first column is 1, the second is 2, ... * @return a Ref object representing an SQL REF * value * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) */ //#ifdef JAVA2 public Ref getRef(int i) throws SQLException { throw Util.notSupported(); } //#endif JAVA2 /** * * Retrieves the value of the designated column in the current row * of this ResultSet object as a Blob object * in the Java programming language.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Starting with 1.7.2, this feature is supported. *

    * * * @param i the first column is 1, the second is 2, ... * @return a Blob object representing the SQL * BLOB value in the specified column * @exception SQLException if a database access error occurs * @since JDK 1.2 */ //#ifdef JAVA2 public Blob getBlob(int i) throws SQLException { byte[] b = getBytes(i); return b == null ? null : new jdbcBlob(b); } //#endif JAVA2 /** * * Retrieves the value of the designated column in the current row * of this ResultSet object as a Clob object * in the Java programming language.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Starting with 1.7.2, this feature is supported.

    *

    * * * @param i the first column is 1, the second is 2, ... * @return a Clob object representing the SQL * CLOB value in the specified column * @exception SQLException if a database access error occurs * @since JDK 1.2 */ //#ifdef JAVA2 public Clob getClob(int i) throws SQLException { String s = getString(i); return s == null ? null : new jdbcClob(s); } //#endif JAVA2 /** * * Retrieves the value of the designated column in the current row * of this ResultSet object as an Array object * in the Java programming language.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB does not support this feature.

    * * This method always throws an SQLException * stating that the operation is not supported. *

    * * * @param i the first column is 1, the second is 2, ... * @return an Array object representing the SQL * ARRAY value in the specified column * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) */ //#ifdef JAVA2 public Array getArray(int i) throws SQLException { throw Util.notSupported(); } //#endif JAVA2 /** * * Retrieves the value of the designated column in the current row * of this ResultSet object as an Object * in the Java programming language. * If the value is an SQL NULL, * the driver returns a Java null. * This method uses the specified Map object for * custom mapping if appropriate.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB does not support this feature.

    * * This method always throws an SQLException * stating that the operation is not supported. *

    * * * @param colName the name of the column from which to retrieve the value * @param map a java.util.Map object that contains the * mapping from SQL type names to classes in the Java programming * language * @return an Object representing the SQL value in the * specified column * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) */ //#ifdef JAVA2 public Object getObject(String colName, Map map) throws SQLException { // MODIFIED: // made this consistent with all other // column name oriented methods // boucherb@users 2002013 return getObject(findColumn(colName), map); } //#endif JAVA2 /** * * Retrieves the value of the designated column in the current row * of this ResultSet object as a Ref object * in the Java programming language.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB does not support this feature.

    * * This method always throws an SQLException, * stating that the operartion is not supported. *

    * * @param colName the column name * @return a Ref object representing the SQL REF * value in the specified column * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) */ //#ifdef JAVA2 public Ref getRef(String colName) throws SQLException { return getRef(findColumn(colName)); } //#endif JAVA2 /** * * Retrieves the value of the designated column in the current row * of this ResultSet object as a Blob object * in the Java programming language.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Starting with 1.7.2, this feature is supported. *

    * * * @param colName the name of the column from which to retrieve the value * @return a Blob object representing the * SQL BLOB value in the specified column * @exception SQLException if a database access error occurs * @since JDK 1.2 */ //#ifdef JAVA2 public Blob getBlob(String colName) throws SQLException { return getBlob(findColumn(colName)); } //#endif JAVA2 /** * * Retrieves the value of the designated column in the current row * of this ResultSet object as a Clob object * in the Java programming language.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Starting with 1.7.2, this feature is supported. *

    * * * @param colName the name of the column from which to retrieve the value * @return a Clob object representing the SQL * CLOB value in the specified column * @exception SQLException if a database access error occurs * @since JDK 1.2 */ //#ifdef JAVA2 public Clob getClob(String colName) throws SQLException { return getClob(findColumn(colName)); } //#endif JAVA2 /** * * Retrieves the value of the designated column in the current row * of this ResultSet object as an Array object * in the Java programming language.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB does not support this feature.

    * * This method always throws an SQLException * stating that the operation is not supported. *

    * * * @param colName the name of the column from which to retrieve the value * @return an Array object representing the SQL * ARRAY value in the specified column * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) */ //#ifdef JAVA2 public Array getArray(String colName) throws SQLException { return getArray(findColumn(colName)); } //#endif JAVA2 /** * * Retrieves the value of the designated column in the current row * of this ResultSet object as a * java.sql.Date object * in the Java programming language. * This method uses the given calendar to construct an appropriate * millisecond value for the date if the underlying database does * not store timezone information.

    * * * @param columnIndex the first column is 1, the second is 2, ... * @param cal the java.util.Calendar object * to use in constructing the date * @return the column value as a java.sql.Date object; * if the value is SQL NULL, the value returned is * null in the Java programming language * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) */ public Date getDate(int columnIndex, Calendar cal) throws SQLException { Date date = getDate(columnIndex); if (date == null) { return null; } if (cal == null) { return date; } cal.setTime(date); HsqlDateTime.resetToDate(cal); return new Date(cal.getTime().getTime()); } /** * * Retrieves the value of the designated column in the current row * of this ResultSet object as a java.sql.Date * object in the Java programming language. * This method uses the given calendar to construct an appropriate * millisecond * value for the date if the underlying database does not store * timezone information.

    * * * @param columnName the SQL name of the column from which to retrieve the * value * @param cal the java.util.Calendar object * to use in constructing the date * @return the column value as a java.sql.Date object; * if the value is SQL NULL, * the value returned is null in the Java programming * language * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) */ public Date getDate(String columnName, Calendar cal) throws SQLException { return getDate(findColumn(columnName), cal); } /** * * Retrieves the value of the designated column in the current row * of this ResultSet object as a java.sql.Time * object in the Java programming language. * This method uses the given calendar to construct an appropriate * millisecond value for the time if the underlying database does not * store timezone information.

    * * * @param columnIndex the first column is 1, the second is 2, ... * @param cal the java.util.Calendar object * to use in constructing the time * @return the column value as a java.sql.Time object; * if the value is SQL NULL, * the value returned is null in the Java programming * language * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) */ public Time getTime(int columnIndex, Calendar cal) throws SQLException { Time t = getTime(columnIndex); if (t == null) { return null; } if (cal == null) { return t; } cal.setTime(t); HsqlDateTime.resetToTime(cal); return new Time(cal.getTime().getTime()); } /** * * Retrieves the value of the designated column in the current row * of this ResultSet object as * a java.sql.Time object * in the Java programming language. * This method uses the given calendar to construct an appropriate * millisecond * value for the time if the underlying database does not store * timezone information.

    * * * @param columnName the SQL name of the column * @param cal the java.util.Calendar object * to use in constructing the time * @return the column value as a java.sql.Time object; * if the value is SQL NULL, * the value returned is null in the Java programming * language * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) */ public Time getTime(String columnName, Calendar cal) throws SQLException { return getTime(findColumn(columnName), cal); } /** * * Retrieves the value of the designated column in the current row * of this ResultSet object as a * java.sql.Timestamp object in the Java programming * anguage. * This method uses the given calendar to construct an appropriate * millisecond value for the timestamp if the underlying database does * not store timezone information.

    * * * @param columnIndex the first column is 1, the second is 2, ... * @param cal the java.util.Calendar object * to use in constructing the timestamp * @return the column value as a java.sql.Timestamp object; * if the value is SQL NULL, * the value returned is null in the Java programming * language * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) */ public Timestamp getTimestamp(int columnIndex, Calendar cal) throws SQLException { Timestamp ts = getTimestamp(columnIndex); if (cal != null && ts != null) { ts.setTime(HsqlDateTime.getTimeInMillis(ts, null, cal)); } return ts; } /** * * Retrieves the value of the designated column in the current row * of this ResultSet object as a * java.sql.Timestamp object in the Java programming * language. * This method uses the given calendar to construct an appropriate * millisecond value for the timestamp if the underlying database does * not store timezone information.

    * * * @param columnName the SQL name of the column * @param cal the java.util.Calendar object * to use in constructing the date * @return the column value as a java.sql.Timestamp object; * if the value is SQL NULL, * the value returned is null in the Java programming * language * @exception SQLException if a database access error occurs * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for * jdbcResultSet) */ public Timestamp getTimestamp(String columnName, Calendar cal) throws SQLException { return getTimestamp(findColumn(columnName), cal); } //-------------------------- JDBC 3.0 ---------------------------------------- /** * * Retrieves the value of the designated column in the current row * of this ResultSet object as a java.net.URL * object in the Java programming language.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB does not support this feature.

    * * This method always throws an SQLException * stating that the operation is not supported. *

    * * * @param columnIndex the index of the column 1 is the first, 2 * is the second,... * @return the column value as a java.net.URL object; * if the value is SQL NULL, the value returned * is null in the Java programming language * @exception SQLException if a database access error occurs, * or if a URL is malformed * @since JDK 1.4, HSQLDB 1.7.0 */ //#ifdef JAVA4 public java.net.URL getURL(int columnIndex) throws SQLException { throw Util.notSupported(); } //#endif JAVA4 /** * * Retrieves the value of the designated column in the current row * of this ResultSet object as a java.net.URL * object in the Java programming language.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB does not support this feature.

    * * This method always throws an SQLException * stating that the operation is not supported. *

    * * * @param columnName the SQL name of the column * @return the column value as a java.net.URL object; * if the value is SQL NULL, the value returned * is null in the Java programming language * @exception SQLException if a database access error occurs * or if a URL is malformed * @since JDK 1.4, HSQLDB 1.7.0 */ //#ifdef JAVA4 public java.net.URL getURL(String columnName) throws SQLException { throw Util.notSupported(); } //#endif JAVA4 /** * * Updates the designated column with a java.sql.Ref value. * The updater methods are used to update column values in the * current row or the insert row. The updater methods do not * update the underlying database; instead the updateRow or * insertRow methods are called to update the database.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB does not support updateable result sets.

    * * This method always throws an SQLException, stating that * the operation is not supported. *

    * * * @param columnIndex the first column is 1, the second is 2, ... * @param x the new column value * @exception SQLException if a database access error occurs * @since JDK 1.4, HSQLDB 1.7.0 */ //#ifdef JAVA4 public void updateRef(int columnIndex, java.sql.Ref x) throws SQLException { throw Util.notSupported(); } //#endif JAVA4 /** * * Updates the designated column with a java.sql.Ref value. * The updater methods are used to update column values in the * current row or the insert row. The updater methods do not * update the underlying database; instead the updateRow or * insertRow methods are called to update the database.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB does not support updateable result sets.

    * * This method always throws an SQLException, stating that * the operation is not supported. *

    * * * @param columnName the name of the column * @param x the new column value * @exception SQLException if a database access error occurs * @since JDK 1.4, HSQLDB 1.7.0 */ //#ifdef JAVA4 public void updateRef(String columnName, java.sql.Ref x) throws SQLException { throw Util.notSupported(); } //#endif JAVA4 /** * * Updates the designated column with a java.sql.Blob value. * The updater methods are used to update column values in the * current row or the insert row. The updater methods do not * update the underlying database; instead the updateRow or * insertRow methods are called to update the database.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB does not support updateable result sets.

    * * This method always throws an SQLException, stating that * the operation is not supported. *

    * * * @param columnIndex the first column is 1, the second is 2, ... * @param x the new column value * @exception SQLException if a database access error occurs * @since JDK 1.4, HSQLDB 1.7.0 */ //#ifdef JAVA4 public void updateBlob(int columnIndex, java.sql.Blob x) throws SQLException { throw Util.notSupported(); } //#endif JAVA4 /** * * Updates the designated column with a java.sql.Blob value. * The updater methods are used to update column values in the * current row or the insert row. The updater methods do not * update the underlying database; instead the updateRow or * insertRow methods are called to update the database.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB does not support updateable result sets.

    * * This method always throws an SQLException, stating that * the operation is not supported. *

    * * * @param columnName the name of the column * @param x the new column value * @exception SQLException if a database access error occurs * @since JDK 1.4, HSQLDB 1.7.0 */ //#ifdef JAVA4 public void updateBlob(String columnName, java.sql.Blob x) throws SQLException { throw Util.notSupported(); } //#endif JAVA4 /** * * Updates the designated column with a java.sql.Clob value. * The updater methods are used to update column values in the * current row or the insert row. The updater methods do not * update the underlying database; instead the updateRow or * insertRow methods are called to update the database.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB does not support updateable result sets.

    * * This method always throws an SQLException, stating that * the operation is not supported. *

    * * * @param columnIndex the first column is 1, the second is 2, ... * @param x the new column value * @exception SQLException if a database access error occurs * @since JDK 1.4, HSQLDB 1.7.0 */ //#ifdef JAVA4 public void updateClob(int columnIndex, java.sql.Clob x) throws SQLException { throw Util.notSupported(); } //#endif JAVA4 /** * * Updates the designated column with a java.sql.Clob value. * The updater methods are used to update column values in the * current row or the insert row. The updater methods do not * update the underlying database; instead the updateRow or * insertRow methods are called to update the database.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB does not support updateable result sets.

    * * This method always throws an SQLException, stating that * the operation is not supported. *

    * * * @param columnName the name of the column * @param x the new column value * @exception SQLException if a database access error occurs * @since JDK 1.4, HSQLDB 1.7.0 */ //#ifdef JAVA4 public void updateClob(String columnName, java.sql.Clob x) throws SQLException { throw Util.notSupported(); } //#endif JAVA4 /** * * Updates the designated column with a java.sql.Array value. * The updater methods are used to update column values in the * current row or the insert row. The updater methods do not * update the underlying database; instead the updateRow or * insertRow methods are called to update the database.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB does not support updateable result sets.

    * * This method always throws an SQLException stating that * the operation is not supported. *

    * * * @param columnIndex the first column is 1, the second is 2, ... * @param x the new column value * @exception SQLException if a database access error occurs * @since JDK 1.4, HSQLDB 1.7.0 */ //#ifdef JAVA4 public void updateArray(int columnIndex, java.sql.Array x) throws SQLException { throw Util.notSupported(); } //#endif JAVA4 /** * * Updates the designated column with a java.sql.Array value. * The updater methods are used to update column values in the * current row or the insert row. The updater methods do not * update the underlying database; instead the updateRow or * insertRow methods are called to update the database.

    * * * *

    *

    HSQLDB-Specific Information:

    * * Including 1.7.2, HSQLDB does not support updateable result sets.

    * * This method always throws an SQLException, stating that * the operation is not supported. *

    * * * @param columnName the name of the column * @param x the new column value * @exception SQLException if a database access error occurs * @since JDK 1.4, HSQLDB 1.7.0 */ //#ifdef JAVA4 public void updateArray(String columnName, java.sql.Array x) throws SQLException { throw Util.notSupported(); } //#endif JAVA4 //-------------------- Internal Implementation ------------------------- // Support for JDBC 2 from JRE 1.1.x /** Copy of java.sql.ResultSet constant, for JDK 1.1 clients. */ public static final int FETCH_FORWARD = 1000; /** Copy of java.sql.ResultSet constant, for JDK 1.1 clients. */ public static final int FETCH_REVERSE = 1001; /** Copy of java.sql.ResultSet constant, for JDK 1.1 clients. */ public static final int FETCH_UNKNOWN = 1002; /** Copy of java.sql.ResultSet constant, for JDK 1.1 clients. */ public static final int TYPE_FORWARD_ONLY = 1003; /** Copy of java.sql.ResultSet constant, for JDK 1.1 clients. */ public static final int TYPE_SCROLL_INSENSITIVE = 1004; /** Copy of java.sql.ResultSet constant, for JDK 1.1 clients. */ public static final int TYPE_SCROLL_SENSITIVE = 1005; /** Copy of java.sql.ResultSet constant, for JDK 1.1 clients. */ public static final int CONCUR_READ_ONLY = 1007; /** Copy of java.sql.ResultSet constant, for JDK 1.1 clients. */ public static final int CONCUR_UPDATABLE = 1008; /** Copy of java.sql.ResultSet constant, for JDK 1.1 clients. */ public static final int HOLD_CURSORS_OVER_COMMIT = 1; /** Copy of java.sql.ResultSet constant, for JDK 1.1 clients. */ public static final int CLOSE_CURSORS_AT_COMMIT = 2; //---------------------------- Private --------------------------------- /** * Internal row data availability check. * * @throws SQLException when no row data is available */ private void checkAvailable() throws SQLException { if (rResult == null || !bInit || nCurrent == null) { throw Util.sqlException(Trace.NO_DATA_IS_AVAILABLE); } } /** * Internal closed state check. * * @throws SQLException when this result set is closed */ private void checkClosed() throws SQLException { if (rResult == null || (sqlStatement != null && sqlStatement.isClosed)) { throw Util.sqlException(Trace.JDBC_RESULTSET_IS_CLOSED); } } /** * Internal column index validity check. * * @param columnIndex to check * @throws SQLException when this ResultSet has no such column */ void checkColumn(int columnIndex) throws SQLException { if (columnIndex < 1 || columnIndex > iColumnCount) { throw Util.sqlException(Trace.COLUMN_NOT_FOUND, String.valueOf(columnIndex)); } } /** * Internal wasNull tracker. * * @param o the Object to track */ private boolean checkNull(Object o) { if (o == null) { bWasNull = true; return true; } else { bWasNull = false; return false; } } /** * Internal value converter.

    * * All trivially successful getXXX methods eventually go through this * method, converting if neccessary from the hsqldb-native representation * of a column's value to the requested representation.

    * * @return an Object of the requested type, representing the value of the * specified column * @param columnIndex of the column value for which to perform the * conversion * @param type the org.hsqldb.Types code for type * @throws SQLException when there is no data, the column index is * invalid, or the conversion cannot be performed */ private Object getColumnInType(int columnIndex, int type) throws SQLException { checkAvailable(); int t; Object o; try { t = rResult.metaData.colTypes[--columnIndex]; o = nCurrent.data[columnIndex]; } catch (ArrayIndexOutOfBoundsException e) { throw Util.sqlException(Trace.COLUMN_NOT_FOUND, String.valueOf(++columnIndex)); } if (checkNull(o)) { return null; } if (t != type) { if (o instanceof Binary && type != Types.CHAR) { throw Util.sqlException(Trace.WRONG_DATA_TYPE); } // try to convert try { o = Column.convertObject(o, type); } catch (Exception e) { String s = "type: " + Types.getTypeString(t) + " (" + t + ") expected: " + Types.getTypeString(type) + " value: " + o.toString(); throw Util.sqlException(Trace.WRONG_DATA_TYPE, s); } } // treat datetime stuff switch (type) { case Types.DATE : return new Date(((Date) o).getTime()); case Types.TIME : return new Time(((Time) o).getTime()); case Types.TIMESTAMP : long m = ((Timestamp) o).getTime(); int n = ((Timestamp) o).getNanos(); Timestamp ts = new Timestamp(m); ts.setNanos(n); return ts; } return o; } //-------------------------- Package Private --------------------------- /** * Constructs a new jdbcResultSet object using the specified * org.hsqldb.Result.

    * * @param s the statement * @param r the internal result form that the new * jdbcResultSet represents * @param props the connection properties * @exception SQLException when the supplied Result is of type * org.hsqldb.Result.ERROR */ jdbcResultSet(jdbcStatement s, Result r, HsqlProperties props, boolean isNetConnection) throws SQLException { sqlStatement = s; connProperties = props; this.isNetConn = isNetConnection; if (r.mode == ResultConstants.UPDATECOUNT) { iUpdateCount = r.getUpdateCount(); } else if (r.isError()) { Util.throwError(r); } else { if (s != null) { this.rsType = s.rsType; } iUpdateCount = -1; rResult = r; iColumnCount = r.getColumnCount(); } bWasNull = false; } /** * If executing the statement updated rows on the database, how many were * affected? * * @return the number of rows affected by executing my statement */ int getUpdateCount() { return iUpdateCount; } /** * Does this Result contain actual row data?

    * * Not all results have row data. Some are ERROR results * (an execption occured while executing my statement), and * some are UPDATE results, in which case updates occured to rows * on the database, but no rows were actually returned. * * @return true if Result has row data, false if not. */ boolean isResult() { return rResult == null ? false : true; } //#ifdef JAVA6 /* public RowId getRowId(int columnIndex) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public RowId getRowId(String columnLabel) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void updateRowId(int columnIndex, RowId x) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void updateRowId(String columnLabel, RowId x) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public int getHoldability() throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public boolean isClosed() throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void updateNString(int columnIndex, String nString) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void updateNString(String columnLabel, String nString) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void updateNClob(int columnIndex, NClob nClob) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void updateNClob(String columnLabel, NClob nClob) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public NClob getNClob(int columnIndex) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public NClob getNClob(String columnLabel) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public SQLXML getSQLXML(int columnIndex) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public SQLXML getSQLXML(String columnLabel) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void updateSQLXML(int columnIndex, SQLXML xmlObject) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void updateSQLXML(String columnLabel, SQLXML xmlObject) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public String getNString(int columnIndex) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public String getNString(String columnLabel) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public Reader getNCharacterStream(int columnIndex) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public Reader getNCharacterStream(String columnLabel) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void updateNCharacterStream(int columnIndex, Reader x, long length) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void updateNCharacterStream(String columnLabel, Reader reader, long length) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void updateAsciiStream(int columnIndex, InputStream x, long length) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void updateBinaryStream(int columnIndex, InputStream x, long length) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void updateCharacterStream(int columnIndex, Reader x, long length) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void updateAsciiStream(String columnLabel, InputStream x, long length) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void updateBinaryStream(String columnLabel, InputStream x, long length) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void updateCharacterStream(String columnLabel, Reader reader, long length) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void updateBlob(int columnIndex, InputStream inputStream, long length) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void updateBlob(String columnLabel, InputStream inputStream, long length) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void updateClob(int columnIndex, Reader reader, long length) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void updateClob(String columnLabel, Reader reader, long length) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void updateNClob(int columnIndex, Reader reader, long length) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void updateNClob(String columnLabel, Reader reader, long length) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void updateNCharacterStream(int columnIndex, Reader x) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void updateNCharacterStream(String columnLabel, Reader reader) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void updateAsciiStream(int columnIndex, InputStream x) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void updateBinaryStream(int columnIndex, InputStream x) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void updateCharacterStream(int columnIndex, Reader x) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void updateAsciiStream(String columnLabel, InputStream x) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void updateBinaryStream(String columnLabel, InputStream x) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void updateCharacterStream(String columnLabel, Reader reader) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void updateBlob(int columnIndex, InputStream inputStream) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void updateBlob(String columnLabel, InputStream inputStream) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void updateClob(int columnIndex, Reader reader) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void updateClob(String columnLabel, Reader reader) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void updateNClob(int columnIndex, Reader reader) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public void updateNClob(String columnLabel, Reader reader) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public T unwrap(Class iface) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } public boolean isWrapperFor(Class iface) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); } */ //#endif JAVA6 } hsqldb-1.8.0.10.orig/src/org/hsqldb/Types.java0000644000175000017500000012425211003561616017426 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb; import org.hsqldb.lib.IntKeyHashMap; import org.hsqldb.lib.IntValueHashMap; import org.hsqldb.lib.HashMap; /** * Defines the constants that are used to identify SQL types for HSQLDB JDBC * inteface type reporting. The actual type constant values are equivalent * to those defined in the latest java.sql.Types, where available, * or those defined by ansi/iso SQL 200n otherwise. A type sub-identifer * has been added to differentiate HSQLDB-specific type specializations. * * @author boucherb@users * @version 1.7.2 * @since 1.7.2 */ public class Types { /** * Names of types. * Used for external, JDBC reporting * Used for library and user function arguments */ public static final String DecimalClassName = "java.math.BigDecimal"; public static final String DateClassName = "java.sql.Date"; public static final String TimeClassName = "java.sql.Time"; public static final String TimestampClassName = "java.sql.Timestamp"; /** * The constant in the Java programming language, sometimes referred to * as a type code, that identifies the generic SQL type * ARRAY. * * @since JDK 1.2 */ public static final int ARRAY = 2003; /** *

    The constant in the Java programming language, sometimes referred * to as a type code, that identifies the generic SQL type * BIGINT. */ public static final int BIGINT = -5; /** *

    The constant in the Java programming language, sometimes referred * to as a type code, that identifies the generic SQL type * BINARY. */ public static final int BINARY = -2; /** * The constant in the Java programming language, sometimes referred to * as a type code, that identifies the generic SQL type * BLOB. * * @since JDK 1.2 */ public static final int BLOB = 2004; /** * The constant in the Java programming language, somtimes referred to * as a type code, that identifies the generic SQL type * BOOLEAN. * * @since JDK 1.4 */ public static final int BOOLEAN = 16; /** *

    The constant in the Java programming language, sometimes referred * to as a type code, that identifies the generic SQL type * CHAR. */ public static final int CHAR = 1; /** * The constant in the Java programming language, sometimes referred to * as a type code, that identifies the generic SQL type * CLOB * * @since JDK 1.2 */ public static final int CLOB = 2005; /** * The constant in the Java programming language, somtimes referred to * as a type code, that identifies the generic SQL type DATALINK. * * @since JDK 1.4 */ public static final int DATALINK = 70; /** *

    The constant in the Java programming language, sometimes referred * to as a type code, that identifies the generic SQL type * DATE. */ public static final int DATE = 91; /** *

    The constant in the Java programming language, sometimes referred * to as a type code, that identifies the generic SQL type * DECIMAL. */ public static final int DECIMAL = 3; /** * The constant in the Java programming language, sometimes referred to * as a type code, that identifies the generic SQL type * DISTINCT. * * @since JDK 1.2 */ public static final int DISTINCT = 2001; /** *

    The constant in the Java programming language, sometimes referred * to as a type code, that identifies the generic SQL type * DOUBLE. */ public static final int DOUBLE = 8; /** *

    The constant in the Java programming language, sometimes referred * to as a type code, that identifies the generic SQL type * FLOAT. */ public static final int FLOAT = 6; /** *

    The constant in the Java programming language, sometimes referred * to as a type code, that identifies the generic SQL type * INTEGER. */ public static final int INTEGER = 4; /** * The constant in the Java programming language, sometimes referred to * as a type code, that identifies the generic SQL type * JAVA_OBJECT. * * @since JDK 1.2 */ public static final int JAVA_OBJECT = 2000; /** *

    The constant in the Java programming language, sometimes referred * to as a type code, that identifies the generic SQL type * LONGVARBINARY. */ public static final int LONGVARBINARY = -4; /** *

    The constant in the Java programming language, sometimes referred * to as a type code, that identifies the generic SQL type * LONGVARCHAR. */ public static final int LONGVARCHAR = -1; /** *

    The constant in the Java programming language, sometimes referred * to as a type code, that identifies the generic SQL type * NULL. */ public static final int NULL = 0; /** *

    The constant in the Java programming language, sometimes referred * to as a type code, that identifies the generic SQL type * NUMERIC. */ public static final int NUMERIC = 2; /** * The constant in the Java programming language that indicates * that the SQL type is database-specific and * gets mapped to a Java object that can be accessed via * the methods getObject and setObject. */ public static final int OTHER = 1111; /** *

    The constant in the Java programming language, sometimes referred * to as a type code, that identifies the generic SQL type * REAL. */ public static final int REAL = 7; /** * The constant in the Java programming language, sometimes referred to * as a type code, that identifies the generic SQL type * REF. * * @since JDK 1.2 */ public static final int REF = 2006; /** *

    The constant in the Java programming language, sometimes referred * to as a type code, that identifies the generic SQL type * SMALLINT. */ public static final int SMALLINT = 5; /** * The constant in the Java programming language, sometimes referred to * as a type code, that identifies the generic SQL type * STRUCT. * * @since JDK 1.2 */ public static final int STRUCT = 2002; /** *

    The constant in the Java programming language, sometimes referred * to as a type code, that identifies the generic SQL type * TIME. */ public static final int TIME = 92; /** *

    The constant in the Java programming language, sometimes referred * to as a type code, that identifies the generic SQL type * TIMESTAMP. */ public static final int TIMESTAMP = 93; /** *

    The constant in the Java programming language, sometimes referred * to as a type code, that identifies the generic SQL type * TINYINT. */ public static final int TINYINT = -6; /** *

    The constant in the Java programming language, sometimes referred * to as a type code, that identifies the generic SQL type * VARBINARY. */ public static final int VARBINARY = -3; /** *

    The constant in the Java programming language, sometimes referred * to as a type code, that identifies the generic SQL type * VARCHAR. */ public static final int VARCHAR = 12; /** *

    The constant in the Java programming language, sometimes referred * to as a type code, that identifies the recent SQL 200n SQL type * XML. * * @since SQL 200n */ public static final int XML = 137; /** * The default HSQLODB type sub-identifier. This indicates that an * HSQLDB type with this sub-type, if supported, is the very closest * thing HSQLDB offerers to the JDBC/SQL200n type */ public static final int TYPE_SUB_DEFAULT = 1; /** * The IGNORECASE type sub-identifier. This indicates that an HSQLDB type * with this sub-type, if supported, is the closest thing HSQLDB offerers * to the JDBC/SQL200n type, except that case is ignored in comparisons */ public static final int TYPE_SUB_IGNORECASE = TYPE_SUB_DEFAULT << 2; /** * Every (type,type-sub) combination known in the HSQLDB context. * Not every combination need be supported as a table or procedure * column type -- such determinations are handled in DITypeInfo. */ static final int[][] ALL_TYPES = { { ARRAY, TYPE_SUB_DEFAULT }, { BIGINT, TYPE_SUB_DEFAULT }, { BINARY, TYPE_SUB_DEFAULT }, { BLOB, TYPE_SUB_DEFAULT }, { BOOLEAN, TYPE_SUB_DEFAULT }, { CHAR, TYPE_SUB_DEFAULT }, { CLOB, TYPE_SUB_DEFAULT }, { DATALINK, TYPE_SUB_DEFAULT }, { DATE, TYPE_SUB_DEFAULT }, { DECIMAL, TYPE_SUB_DEFAULT }, { DISTINCT, TYPE_SUB_DEFAULT }, { DOUBLE, TYPE_SUB_DEFAULT }, { FLOAT, TYPE_SUB_DEFAULT }, { INTEGER, TYPE_SUB_DEFAULT }, { JAVA_OBJECT, TYPE_SUB_DEFAULT }, { LONGVARBINARY, TYPE_SUB_DEFAULT }, { LONGVARCHAR, TYPE_SUB_DEFAULT }, { NULL, TYPE_SUB_DEFAULT }, { NUMERIC, TYPE_SUB_DEFAULT }, { OTHER, TYPE_SUB_DEFAULT }, { REAL, TYPE_SUB_DEFAULT }, { REF, TYPE_SUB_DEFAULT }, { SMALLINT, TYPE_SUB_DEFAULT }, { STRUCT, TYPE_SUB_DEFAULT }, { TIME, TYPE_SUB_DEFAULT }, { TIMESTAMP, TYPE_SUB_DEFAULT }, { TINYINT, TYPE_SUB_DEFAULT }, { VARBINARY, TYPE_SUB_DEFAULT }, { VARCHAR, TYPE_SUB_DEFAULT }, { VARCHAR, TYPE_SUB_IGNORECASE }, { XML, TYPE_SUB_DEFAULT } }; /* SQL specifies predefined data types named by the following s: CHARACTER, CHARACTER VARYING, CHARACTER LARGE OBJECT, BINARY LARGE OBJECT, NUMERIC, DECIMAL, SMALLINT, INTEGER, BIGINT, FLOAT, REAL, DOUBLE PRECISION, BOOLEAN, DATE, TIME, TIMESTAMP, and INTERVAL. SQL 200n adds DATALINK in Part 9: Management of External Data (SQL/MED) and adds XML in Part 14: XML-Related Specifications (SQL/XML) */ // CLI type list from Table 37 static final int SQL_CHARACTER = 1; static final int SQL_CHAR = 1; static final int SQL_NUMERIC = 2; static final int SQL_DECIMAL = 3; static final int SQL_DEC = 3; static final int SQL_INTEGER = 4; static final int SQL_INT = 4; static final int SQL_SMALLINT = 5; static final int SQL_FLOAT = 6; static final int SQL_REAL = 7; static final int SQL_DOUBLE = 8; static final int SQL_CHARACTER_VARYING = 12; static final int SQL_CHAR_VARYING = 12; static final int SQL_VARCHAR = 12; static final int SQL_BOOLEAN = 16; static final int SQL_USER_DEFINED_TYPE = 17; static final int SQL_ROW = 19; static final int SQL_REF = 20; static final int SQL_BIGINT = 25; static final int SQL_BINARY_LARGE_OBJECT = 30; static final int SQL_BLOB = 30; static final int SQL_CHARACTER_LARGE_OBJECT = 40; static final int SQL_CLOB = 40; static final int SQL_ARRAY = 50; // not predefined static final int SQL_MULTISET = 55; // static final int SQL_DATE = 91; static final int SQL_TIME = 92; static final int SQL_TIMESTAMP = 93; // static final int SQL_TIME_WITH_TIME_ZONE = 94; static final int SQL_TIMESTAMP_WITH_TIME_ZONE = 95; // static final int SQL_INTERVAL_YEAR = 101; // static final int SQL_INTERVAL_MONTH = 102; static final int SQL_INTERVAL_DAY = 103; static final int SQL_INTERVAL_HOUR = 104; static final int SQL_INTERVAL_MINUTE = 105; static final int SQL_INTERVAL_SECOND = 106; static final int SQL_INTERVAL_YEAR_TO_MONTH = 107; static final int SQL_INTERVAL_DAY_TO_HOUR = 108; static final int SQL_INTERVAL_DAY_TO_MINUTE = 109; static final int SQL_INTERVAL_DAY_TO_SECOND = 110; static final int SQL_INTERVAL_HOUR_TO_MINUTE = 111; static final int SQL_INTERVAL_HOUR_TO_SECOND = 112; static final int SQL_INTERVAL_MINUTE_TO_SECOND = 113; // These values are not in table 37 of the SQL CLI 200n FCD, but some // are found in tables 6-9 and some are found in Annex A1: // c Header File SQLCLI.H and/or addendums in other documents, // such as: // SQL 200n Part 9: Management of External Data (SQL/MED) : DATALINK // SQL 200n Part 14: XML-Related Specifications (SQL/XML) : XML static final int SQL_BIT_VARYING = 15; // is in SQL99 but removed from 200n static final int SQL_DATALINK = 70; static final int SQL_UDT = 17; static final int SQL_UDT_LOCATOR = 18; static final int SQL_BLOB_LOCATOR = 31; static final int SQL_CLOB_LOCATOR = 41; static final int SQL_ARRAY_LOCATOR = 51; static final int SQL_MULTISET_LOCATOR = 56; static final int SQL_ALL_TYPES = 0; static final int SQL_DATETIME = 9; // collective name static final int SQL_INTERVAL = 10; // collective name static final int SQL_XML = 137; // SQL_UDT subcodes static final int SQL_DISTINCT = 1; static final int SQL_SCTRUCTURED = 2; // non-standard type not in JDBC or SQL CLI public static final int VARCHAR_IGNORECASE = 100; // lookup for types // boucherb@users - access changed for metadata 1.7.2 static IntValueHashMap typeAliases; static IntKeyHashMap typeNames; static HashMap javaTypeNames; // boucherb@users - We can't handle method invocations in // Function.java or user-defined methods whose parameters // number class is // narrower than the corresponding internal // wrapper private static org.hsqldb.lib.HashSet illegalParameterClasses; static { typeAliases = new IntValueHashMap(50); typeAliases.put("INTEGER", Types.INTEGER); typeAliases.put("INT", Types.INTEGER); typeAliases.put("int", Types.INTEGER); typeAliases.put("java.lang.Integer", Types.INTEGER); typeAliases.put("IDENTITY", Types.INTEGER); typeAliases.put("DOUBLE", Types.DOUBLE); typeAliases.put("double", Types.DOUBLE); typeAliases.put("java.lang.Double", Types.DOUBLE); typeAliases.put("FLOAT", Types.FLOAT); typeAliases.put("REAL", Types.REAL); typeAliases.put("VARCHAR", Types.VARCHAR); typeAliases.put("java.lang.String", Types.VARCHAR); typeAliases.put("CHAR", Types.CHAR); typeAliases.put("CHARACTER", Types.CHAR); typeAliases.put("LONGVARCHAR", Types.LONGVARCHAR); typeAliases.put("VARCHAR_IGNORECASE", VARCHAR_IGNORECASE); typeAliases.put("DATE", Types.DATE); typeAliases.put(DateClassName, Types.DATE); typeAliases.put("TIME", Types.TIME); typeAliases.put(TimeClassName, Types.TIME); typeAliases.put("TIMESTAMP", Types.TIMESTAMP); typeAliases.put(TimestampClassName, Types.TIMESTAMP); typeAliases.put("DATETIME", Types.TIMESTAMP); typeAliases.put("DECIMAL", Types.DECIMAL); typeAliases.put(DecimalClassName, Types.DECIMAL); typeAliases.put("NUMERIC", Types.NUMERIC); typeAliases.put("BIT", Types.BOOLEAN); typeAliases.put("BOOLEAN", Types.BOOLEAN); typeAliases.put("boolean", Types.BOOLEAN); typeAliases.put("java.lang.Boolean", Types.BOOLEAN); typeAliases.put("TINYINT", Types.TINYINT); typeAliases.put("byte", Types.TINYINT); typeAliases.put("java.lang.Byte", Types.TINYINT); typeAliases.put("SMALLINT", Types.SMALLINT); typeAliases.put("short", Types.SMALLINT); typeAliases.put("java.lang.Short", Types.SMALLINT); typeAliases.put("BIGINT", Types.BIGINT); typeAliases.put("long", Types.BIGINT); typeAliases.put("java.lang.Long", Types.BIGINT); typeAliases.put("BINARY", Types.BINARY); typeAliases.put("[B", Types.BINARY); typeAliases.put("VARBINARY", Types.VARBINARY); typeAliases.put("LONGVARBINARY", Types.LONGVARBINARY); typeAliases.put("OTHER", Types.OTHER); typeAliases.put("OBJECT", Types.OTHER); typeAliases.put("java.lang.Object", Types.OTHER); typeAliases.put("NULL", Types.NULL); typeAliases.put("void", Types.NULL); typeAliases.put("java.lang.Void", Types.NULL); // typeNames = new IntKeyHashMap(); typeNames.put(Types.NULL, "NULL"); typeNames.put(Types.INTEGER, "INTEGER"); typeNames.put(Types.DOUBLE, "DOUBLE"); typeNames.put(VARCHAR_IGNORECASE, "VARCHAR_IGNORECASE"); typeNames.put(Types.VARCHAR, "VARCHAR"); typeNames.put(Types.CHAR, "CHAR"); typeNames.put(Types.LONGVARCHAR, "LONGVARCHAR"); typeNames.put(Types.DATE, "DATE"); typeNames.put(Types.TIME, "TIME"); typeNames.put(Types.DECIMAL, "DECIMAL"); typeNames.put(Types.BOOLEAN, "BOOLEAN"); typeNames.put(Types.TINYINT, "TINYINT"); typeNames.put(Types.SMALLINT, "SMALLINT"); typeNames.put(Types.BIGINT, "BIGINT"); typeNames.put(Types.REAL, "REAL"); typeNames.put(Types.FLOAT, "FLOAT"); typeNames.put(Types.NUMERIC, "NUMERIC"); typeNames.put(Types.TIMESTAMP, "TIMESTAMP"); typeNames.put(Types.BINARY, "BINARY"); typeNames.put(Types.VARBINARY, "VARBINARY"); typeNames.put(Types.LONGVARBINARY, "LONGVARBINARY"); typeNames.put(Types.OTHER, "OBJECT"); // illegalParameterClasses = new org.hsqldb.lib.HashSet(); illegalParameterClasses.add(Byte.TYPE); illegalParameterClasses.add(Short.TYPE); illegalParameterClasses.add(Float.TYPE); illegalParameterClasses.add(Byte.class); illegalParameterClasses.add(Short.class); illegalParameterClasses.add(Float.class); // javaTypeNames = new HashMap(); javaTypeNames.put(DateClassName, "java.sql.Date"); javaTypeNames.put(TimeClassName, "java.sql.Time"); javaTypeNames.put(TimestampClassName, "java.sql.Timestamp"); javaTypeNames.put(DecimalClassName, "java.math.BigDecimal"); javaTypeNames.put("byte", "java.lang.Integer"); javaTypeNames.put("java.lang.Byte", "java.lang.Integer"); javaTypeNames.put("short", "java.lang.Integer"); javaTypeNames.put("java.lang.Short", "java.lang.Integer"); javaTypeNames.put("int", "java.lang.Integer"); javaTypeNames.put("java.lang.Integer", "java.lang.Integer"); javaTypeNames.put("long", "java.lang.Long"); javaTypeNames.put("java.lang.Long", "java.lang.Long"); javaTypeNames.put("double", "java.lang.Double"); javaTypeNames.put("java.lang.Double", "java.lang.Double"); javaTypeNames.put("boolean", "java.lang.Boolean"); javaTypeNames.put("java.lang.Boolean", "java.lang.Boolean"); javaTypeNames.put("java.lang.String", "java.lang.String"); javaTypeNames.put("void", "java.lang.Void"); javaTypeNames.put("[B", "[B"); } /** * Translates a type name returned from a method into the name of type * returned in a ResultSet */ static String getFunctionReturnClassName(String methodReturnType) { String name = (String) javaTypeNames.get(methodReturnType); return name == null ? methodReturnType : name; } /** * ` * * @param type string * @return java.sql.Types int value * @throws HsqlException */ static int getTypeNr(String type) throws HsqlException { int i = typeAliases.get(type, Integer.MIN_VALUE); Trace.check(i != Integer.MIN_VALUE, Trace.WRONG_DATA_TYPE, type); return i; } /** * Returns SQL type string for a java.sql.Types int value */ public static String getTypeString(int type) { return (String) typeNames.get(type); } /** * Returns SQL type string for a java.sql.Types int value */ public static String getTypeString(int type, int precision, int scale) { String s = (String) typeNames.get(type); if (precision != 0 && acceptsPrecisionCreateParam(type)) { StringBuffer sb = new StringBuffer(s); sb.append(Token.T_OPENBRACKET); sb.append(precision); if (scale != 0 && acceptsScaleCreateParam(type)) { sb.append(Token.T_COMMA); sb.append(scale); } sb.append(Token.T_CLOSEBRACKET); return sb.toString(); } return s; } /** * Retieves the type number corresponding to the class * of an IN, IN OUT or OUT parameter.

    * * This method extends getTypeNr to return OTHER for * primitive arrays, classes that directly implement * java.io.Serializable and non-primitive arrays whose * base component implements java.io.Serializable, * allowing, for instance, arguments and return types of * primitive arrays, Serializable objects and arrays, * of Serializable objects. Direct primitive types * other than those mapping directly to the internal * wrapper form are not yet handled. That is, HSQLDB * cannot yet properly deal with CALLs involving methods * with primitive byte, short, float or their * corresponding wrappers, due to the way internal * conversion works and lack of detection and narrowing * code in Function to allow this. In other words, * passing in or retrieving any of the mentioned types * always causes conversion to a wider internal wrapper * which is genrally incompatible under reflective * invocation, resulting in an IllegalArgumentException. * * @param c a Class instance * @return java.sql.Types int value * @throws HsqlException */ static int getParameterTypeNr(Class c) throws HsqlException { String name; int type; if (c == null) { Trace.doAssert(false, "c is null"); } if (Void.TYPE.equals(c)) { return Types.NULL; } if (illegalParameterClasses.contains(c)) { throw Trace.error(Trace.WRONG_DATA_TYPE, Trace.UNSUPPORTED_PARAM_CLASS, c.getName()); } name = c.getName(); type = typeAliases.get(name, Integer.MIN_VALUE); if (type == Integer.MIN_VALUE) { // ensure all nested types are serializable // byte[] is already covered as BINARY in typeAliases if (c.isArray()) { while (c.isArray()) { c = c.getComponentType(); } if (c.isPrimitive() || java.io.Serializable.class.isAssignableFrom(c)) { type = OTHER; } } else if (java.io.Serializable.class.isAssignableFrom(c)) { type = OTHER; } } Trace.check(type != Integer.MIN_VALUE, Trace.WRONG_DATA_TYPE, name); return type; } /* static boolean areSimilar(int t1, int t2) { if (t1 == t2) { return true; } if (isNumberType(t1)) { return isNumberType(t2); } if (isCharacterType(t1)) { return isCharacterType(t2); } if (isBinaryType(t1)) { return isBinaryType(t2); } return false; } static boolean haveSameInternalRepresentation(int t1, int t2) { if (t1 == t2) { return true; } if (isCharacterType(t1)) { return isCharacterType(t2); } if (isBinaryType(t1)) { return isBinaryType(t2); } switch (t1) { case TINYINT : case SMALLINT : case INTEGER : { switch (t2) { case TINYINT : case SMALLINT : case INTEGER : { return true; } default : { return false; } } } case FLOAT : case REAL : case DOUBLE : { switch (t2) { case FLOAT : case REAL : case DOUBLE : { return true; } default : { return false; } } } case DECIMAL : case NUMERIC : { switch (t2) { case DECIMAL : case NUMERIC : { return true; } default : { return false; } } } default : { return false; } } } static boolean isExactNumberType(int type) { switch (type) { case BIGINT : case DECIMAL : case INTEGER : case NUMERIC : case SMALLINT : case TINYINT : return true; default : return false; } } static boolean isStrictlyIntegralNumberType(int type) { switch (type) { case BIGINT : case INTEGER : case SMALLINT : case TINYINT : return true; default : return false; } } static boolean isApproximateNumberType(int type) { switch (type) { case DOUBLE : case FLOAT : case REAL : return true; default : return false; } } public static boolean isBinaryType(int type) { switch (type) { case BINARY : case BLOB : case LONGVARBINARY : case VARBINARY : return true; default : return false; } } */ static boolean isDatetimeType(int type) { switch (type) { case DATE : case TIME : case TIMESTAMP : return true; default : return false; } } /** * Types that accept precition params in column definition or casts. * We ignore the parameter in many cases but accept it for compatibility * with other engines. CHAR, VARCHAR and VARCHAR_IGNORECASE params * are used when the sql.enforce_strict_types is true. * */ public static boolean acceptsPrecisionCreateParam(int type) { switch (type) { case BINARY : case BLOB : case CHAR : case CLOB : // case LONGVARBINARY : // case LONGVARCHAR : case VARBINARY : case VARCHAR : case VARCHAR_IGNORECASE : case DECIMAL : case NUMERIC : case FLOAT : case TIMESTAMP : case TIME : return true; default : return false; } } public static int numericPrecisionCreateParamRadix(int type) { switch (type) { case Types.DECIMAL : case Types.NUMERIC : return 10; case FLOAT : return 2; default : // to mean NOT APPLICABLE (i.e. NULL) return 0; } } public static boolean acceptsScaleCreateParam(int type) { switch (type) { case Types.DECIMAL : case Types.NUMERIC : return true; default : return false; } } public static boolean isNumberType(int type) { switch (type) { case BIGINT : case DECIMAL : case DOUBLE : case FLOAT : case INTEGER : case NUMERIC : case REAL : case SMALLINT : case TINYINT : return true; default : return false; } } public static boolean isCharacterType(int type) { switch (type) { case CHAR : case CLOB : case LONGVARCHAR : case VARCHAR : case VARCHAR_IGNORECASE : return true; default : return false; } } public static String getTypeName(int type) { switch (type) { case Types.ARRAY : return "ARRAY"; case Types.BIGINT : return "BIGINT"; case Types.BINARY : return "BINARY"; case Types.BLOB : return "BLOB"; case Types.BOOLEAN : return "BOOLEAN"; case Types.CHAR : return "CHAR"; case Types.CLOB : return "CLOB"; case Types.DATALINK : return "DATALINK"; case Types.DATE : return "DATE"; case Types.DECIMAL : return "DECIMAL"; case Types.DISTINCT : return "DISTINCT"; case Types.DOUBLE : return "DOUBLE"; case Types.FLOAT : return "FLOAT"; case Types.INTEGER : return "INTEGER"; case Types.JAVA_OBJECT : return "JAVA_OBJECT"; case Types.LONGVARBINARY : return "LONGVARBINARY"; case Types.LONGVARCHAR : return "LONGVARCHAR"; case Types.NULL : return "NULL"; case Types.NUMERIC : return "NUMERIC"; case Types.OTHER : return "OTHER"; case Types.REAL : return "REAL"; case Types.REF : return "REF"; case Types.SMALLINT : return "SMALLINT"; case Types.STRUCT : return "STRUCT"; case Types.TIME : return "TIME"; case Types.TIMESTAMP : return "TIMESTAMP"; case Types.TINYINT : return "TINYINT"; case Types.VARBINARY : return "VARBINARY"; case Types.VARCHAR : return "VARCHAR"; case Types.VARCHAR_IGNORECASE : return "VARCHAR_IGNORECASE"; case Types.XML : return "XML"; default : return null; } } /** * A reasonable/customizable number to avoid the shortcomings/defects * associated with doing a dynamic scan of results to determine * the value. In practice, it turns out that single query yielding * widely varying values for display size of CHAR and VARCHAR columns * on repeated execution results in patently poor usability, as some fairly * high-profile, otherwise "enterprise-quality" RAD tools depend on * on the first value returned to lay out forms and limit the size of * single line edit controls, set corresponding local datastore storage * sizes, etc. In practice, It also turns out that many tools (due to * the original lack of PreparedStatement.getMetaData() in JDK 1.1) emulate * a SQL_DESCRIBE by executing a query hopefully guaranteed to return no * or very few rows for example: select ... from ... where 1=0. * Using the dynamic scan of 1.7.2 RC5 and previous, therefore, the * minimum display size value (1) was often being generated during * a tool's describe phase. Upon subsequent "real" retrievals, some * tools complain that CHAR and VARCHAR result values exceeded the * originally reported display size and refused to fetch further values. */ public static final int MAX_CHAR_OR_VARCHAR_DISPLAY_SIZE = MAX_CHAR_OR_VARCHAR_DISPLAY_SIZE(); // So that the variable can be both public static final and // customizable through system properties if required. // // 32766 (0x7ffe) seems to be a magic number over which several // rather high-profile RAD tools start to have problems // regarding layout and allocation stress. It is gently // recommended that LONGVARCHAR be used for larger values in RAD // tool layout & presentation use cases until such time as we provide // true BLOB support (at which point, LONGVARCHAR will most likely become // an alias for CLOB). // // Most GUI tools seem to handle LONGVARCHAR gracefully by: // // 1.) refusing to directly display such columns in graphical query results // 2.) providing other means to retrieve and display such values private static int MAX_CHAR_OR_VARCHAR_DISPLAY_SIZE() { try { return Integer.getInteger( "hsqldb.max_char_or_varchar_display_size", 32766).intValue(); } catch (SecurityException e) { return 32766; } } public static int getMaxDisplaySize(int type) { switch (type) { case Types.BINARY : case Types.LONGVARBINARY : case Types.LONGVARCHAR : case Types.OTHER : case Types.VARBINARY : case Types.XML : return Integer.MAX_VALUE; // max string length case Types.CHAR : case Types.VARCHAR : return MAX_CHAR_OR_VARCHAR_DISPLAY_SIZE; case Types.BIGINT : // PowerBuilder barfs, wants 19 // ...not our problem, tho, // according to JDBC return 20; // precision + "-".length(); case Types.BOOLEAN : return 5; // Math.max("true".length(),"false".length); case Types.DATALINK : return 20004; // same as precision case Types.DECIMAL : case Types.NUMERIC : return 646456995; // precision + "-.".length() case Types.DATE : return 10; // same as precision case Types.INTEGER : return 11; // precision + "-".length(); case Types.FLOAT : case Types.REAL : case Types.DOUBLE : return 23; // String.valueOf(-Double.MAX_VALUE).length(); case Types.TIME : return 8; // same as precision case Types.SMALLINT : return 6; // precision + "-".length(); case Types.TIMESTAMP : return 29; // same as precision case Types.TINYINT : return 4; // precision + "-".length(); default : return 0; // unknown } } public static boolean isSearchable(int type) { switch (type) { case Types.ARRAY : case Types.BLOB : case Types.CLOB : case Types.JAVA_OBJECT : case Types.STRUCT : case Types.OTHER : return false; default : return true; } } public static Boolean isCaseSensitive(int type) { switch (type) { case Types.ARRAY : case Types.BLOB : case Types.CLOB : case Types.DISTINCT : case Types.JAVA_OBJECT : case Types.NULL : case Types.REF : case Types.STRUCT : return null; case Types.CHAR : case Types.VARCHAR : case Types.DATALINK : case Types.LONGVARCHAR : case Types.OTHER : case Types.XML : return Boolean.TRUE; case Types.VARCHAR_IGNORECASE : default : return Boolean.FALSE; } } public static Boolean isUnsignedAttribute(int type) { switch (type) { case Types.BIGINT : case Types.DECIMAL : case Types.DOUBLE : case Types.FLOAT : case Types.INTEGER : case Types.NUMERIC : case Types.REAL : case Types.SMALLINT : case Types.TINYINT : return Boolean.FALSE; default : return null; } } public static int getPrecision(int type) { switch (type) { case Types.BINARY : case Types.CHAR : case Types.LONGVARBINARY : case Types.LONGVARCHAR : case Types.OTHER : case Types.VARBINARY : case Types.VARCHAR : case Types.XML : return Integer.MAX_VALUE; case Types.BIGINT : return 19; case Types.BOOLEAN : return 1; case Types.DATALINK : // from SQL CLI spec. TODO: Interpretation? return 20004; case Types.DECIMAL : case Types.NUMERIC : // Integer.MAX_VALUE bit 2's complement number: // (Integer.MAX_VALUE-1) / ((ln(10)/ln(2)) bits per decimal digit) // See: java.math.BigInteger // - the other alternative is that we could report the numprecradix as 2 and // report Integer.MAX_VALUE here return 646456993; case Types.DATE : case Types.INTEGER : return 10; case Types.FLOAT : case Types.REAL : case Types.DOUBLE : return 17; case Types.TIME : return 8; case Types.SMALLINT : return 5; case Types.TIMESTAMP : return 29; case Types.TINYINT : return 3; default : return 0; } } public static String getColStClsName(int type) { switch (type) { case Types.BIGINT : return "java.lang.Long"; case Types.BINARY : case Types.LONGVARBINARY : case Types.VARBINARY : // but wrapped by org.hsqldb.Binary return "[B"; case Types.OTHER : // but wrapped by org.hsqldb.JavaObject return "java.lang.Object"; case Types.BOOLEAN : return "java.lang.Boolean"; case Types.CHAR : case Types.LONGVARCHAR : case Types.VARCHAR : case Types.XML : //? return "java.lang.String"; case Types.DATALINK : return "java.net.URL"; case Types.DATE : return DateClassName; case Types.DECIMAL : case Types.NUMERIC : return DecimalClassName; case Types.DOUBLE : case Types.FLOAT : case Types.REAL : return "java.lang.Double"; case Types.INTEGER : case Types.SMALLINT : case Types.TINYINT : return "java.lang.Integer"; case Types.TIME : return TimeClassName; case Types.TIMESTAMP : return TimestampClassName; default : return null; } } } hsqldb-1.8.0.10.orig/src/org/hsqldb/User.java0000644000175000017500000003105210416742503017236 0ustar renerene/* Copyright (c) 1995-2000, The Hypersonic SQL Group. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the Hypersonic SQL Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE HYPERSONIC SQL GROUP, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * This software consists of voluntary contributions made by many individuals * on behalf of the Hypersonic SQL Group. * * * For work added by the HSQL Development Group: * * Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb; import org.hsqldb.HsqlNameManager.HsqlName; import org.hsqldb.lib.HashSet; import org.hsqldb.lib.IntValueHashMap; // fredt@users 20021103 - patch 1.7.2 - fix bug in revokeAll() // fredt@users 20021103 - patch 1.7.2 - allow for drop table, etc. // when tables are dropped or renamed, changes are reflected in the // permissions held in User objects. // boucherb@users 200208-200212 - doc 1.7.2 - update // boucherb@users 200208-200212 - patch 1.7.2 - metadata // unsaved@users - patch 1.8.0 moved right managament to new classes /** * A User Object holds the name, password for a * particular database user.

    * * Enhanced in successive versions of HSQLDB. * * @author Thomas Mueller (Hypersonic SQL Group) * @version 1.8.0 * @since Hypersonic SQL */ public class User { /** true if this user is the sys user. */ private boolean isSys; /** true if this user is the public user. */ private boolean isPublic; /** user name. */ private String sName; /** password. */ private String sPassword; /** default schema when new Sessions started (defaults to PUBLIC schema) */ private HsqlName initialSchema = null; /** grantee object. */ private Grantee grantee; /** * Constructor */ User(String name, String password, Grantee inGrantee) throws HsqlException { sName = name; grantee = inGrantee; boolean granteeOk = grantee != null || GranteeManager.isReserved(name); if (!granteeOk) { Trace.doAssert(false, Trace.getMessage(Trace.MISSING_GRANTEE) + ": " + name); } setPassword(password); isSys = name.equals(GranteeManager.SYSTEM_AUTHORIZATION_NAME); isPublic = name.equals(GranteeManager.PUBLIC_ROLE_NAME); } String getName() { return sName; } void setPassword(String password) throws HsqlException { // TODO: // checkComplexity(password); // requires: UserManager.createSAUser(), UserManager.createPublicUser() sPassword = password; } /** * Checks if this object's password attibute equals * specified argument, else throws. */ void checkPassword(String test) throws HsqlException { Trace.check(test.equals(sPassword), Trace.ACCESS_IS_DENIED); } /** * Returns true if this User object is for a user with the * database administrator role. */ boolean isSys() { return isSys; } /** * Returns the initial schema for the user */ HsqlName getInitialSchema() { return initialSchema; } /** * This class does not have access to the SchemaManager, therefore * caller should verify that the given schemaName exists. * * @param schemaName Name of an existing schema. Null value allowed, * which means use the DB default session schema. */ void setInitialSchema(HsqlName schema) { initialSchema = schema; } /** * Returns true if this User object represents the PUBLIC user */ boolean isPublic() { return isPublic; } /** * Returns the ALTER USER DDL character sequence that preserves the * this user's current password value and mode.

    * * @return the DDL */ String getAlterUserDDL() { StringBuffer sb = new StringBuffer(); sb.append(Token.T_ALTER).append(' '); sb.append(Token.T_USER).append(' '); sb.append(sName).append(' '); sb.append(Token.T_SET).append(' '); sb.append(Token.T_PASSWORD).append(' '); sb.append('"').append(sPassword).append('"'); return sb.toString(); } /** * returns the DDL string * sequence that creates this user. * */ String getCreateUserDDL() { StringBuffer sb = new StringBuffer(64); sb.append(Token.T_CREATE).append(' '); sb.append(Token.T_USER).append(' '); sb.append(sName).append(' '); sb.append(Token.T_PASSWORD).append(' '); sb.append('"').append(sPassword).append('"'); return sb.toString(); } /** * Retrieves the redo log character sequence for connecting * this user * * @return the redo log character sequence for connecting * this user */ public String getConnectStatement() { StringBuffer sb = new StringBuffer(); sb.append(Token.T_CONNECT).append(' '); sb.append(Token.T_USER).append(' '); sb.append(sName); return sb.toString(); } /** * Retrieves the Grantee object for this User. */ Grantee getGrantee() { return grantee; } /** * Sets the Grantee object for this User. * This is done in the constructor for all users except the special * users SYSTEM and PUBLIC, which have to be set up before the * Managers are initialized. */ void setGrantee(Grantee inGrantee) throws HsqlException { if (grantee != null) { Trace.doAssert(false, Trace.getMessage(Trace.CHANGE_GRANTEE) + ": " + sName); } grantee = inGrantee; } // Legacy wrappers /** * Returns true if this User object is for a user with the * database administrator role. */ boolean isAdmin() { return grantee.isAdmin(); } /** * Retrieves a string[] whose elements are the names, of the rights * explicitly granted with the GRANT command to this User * object on the Table object identified by the * name argument. * * @return array of Strings naming the rights granted to this * User object on the Table object * identified by the name argument. * @param name a Table object identifier * */ String[] listGrantedTablePrivileges(HsqlName name) { return grantee.listGrantedTablePrivileges(name); } /** * Retrieves the distinct set of Java Class FQNs * for which this User object has been * granted ALL (the Class execution privilege).

    * @param andToPublic if true, then the set includes the * names of classes accessible to this User object * through grants to its PUBLIC User * object attribute, else only direct grants are inlcuded. * @return the distinct set of Java Class FQNs for which this * this User object has been granted * ALL. * */ HashSet getGrantedClassNames(boolean andToPublic) throws HsqlException { return grantee.getGrantedClassNames(andToPublic); } /** * Retrieves the map object that represents the rights that have been * granted on database objects.

    * * The map has keys and values with the following interpretation:

    * *

      *
    • The keys are generally (but not limited to) objects having * an attribute or value equal to the name of an actual database * object. * *
    • Specifically, the keys act as database object identifiers. * *
    • The values are always Integer objects, each formed by combining * a set of flags, one for each of the access rights defined in * UserManager: {SELECT, INSERT, UPDATE and DELETE}. *
    */ IntValueHashMap getRights() { return grantee.getRights(); } /** * Checks that this User object is for a user with the * database administrator role. Otherwise it throws. */ void checkAdmin() throws HsqlException { grantee.checkAdmin(); } /** * Checks if any of the rights represented by the rights * argument have been granted on the specified database object.

    * * This is done by checking that a mapping exists in the rights map * from the dbobject argument for at least one of the rights * contained in the rights argument. Otherwise, it throws. */ void check(HsqlName dbobject, int rights) throws HsqlException { grantee.check(dbobject, rights); } void check(String dbobject) throws HsqlException { grantee.check(dbobject); } /** * Returns true if any of the rights represented by the * rights argument has been granted on the database object identified * by the dbobject argument.

    * * This is done by checking that a mapping exists in the rights map * from the dbobject argument for at least one of the rights * contained in the rights argument. */ boolean isAccessible(HsqlName dbobject, int rights) throws HsqlException { return grantee.isAccessible(dbobject, rights); } /** * Returns true if any right at all has been granted to this User object * on the database object identified by the dbobject argument. */ boolean isAccessible(String dbobject) throws HsqlException { return grantee.isAccessible(dbobject); } boolean isAccessible(HsqlName dbobject) throws HsqlException { return grantee.isAccessible(dbobject); } } hsqldb-1.8.0.10.orig/src/org/hsqldb/DatabaseManager.java0000644000175000017500000003735310771702623021334 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb; import java.util.Vector; import org.hsqldb.lib.FileUtil; import org.hsqldb.lib.HashMap; import org.hsqldb.lib.HashSet; import org.hsqldb.lib.HsqlTimer; import org.hsqldb.lib.IntKeyHashMap; import org.hsqldb.lib.Iterator; import org.hsqldb.persist.HsqlProperties; import org.hsqldb.store.ValuePool; /** * Handles initial attempts to connect to HSQLDB databases within the JVM * (or a classloader within the JVM). Opens the database if it is not open * or connects to it if it is already open. This allows the same database to * be used by different instances of Server and by direct connections.

    * * Maintains a map of Server instances and notifies each server when its * database has shut down.

    * * Maintains a reference to the timer used for file locks and logging.

    * * @author fredt@users * @version 1.8.0 * @since 1.7.2 */ public class DatabaseManager { // Database and Server registry /** provides unique ID's for the Databases currently in registry */ private static int dbIDCounter; /** name to Database mapping for mem: databases */ static final HashMap memDatabaseMap = new HashMap(); /** File to Database mapping for file: databases */ static final HashMap fileDatabaseMap = new HashMap(); /** File to Database mapping for res: databases */ static final HashMap resDatabaseMap = new HashMap(); /** id number to Database for Databases currently in registry */ static final IntKeyHashMap databaseIDMap = new IntKeyHashMap(); /** * Returns a vector containing the URI (type + path) for all the databases. */ public static Vector getDatabaseURIs() { Vector v = new Vector(); Iterator it = databaseIDMap.values().iterator(); while (it.hasNext()) { Database db = (Database) it.next(); v.addElement(db.getURI()); } return v; } /** * Closes all the databases using the given mode.

    * * CLOSEMODE_IMMEDIATELY = -1; * CLOSEMODE_NORMAL = 0; * CLOSEMODE_COMPACT = 1; * CLOSEMODE_SCRIPT = 2; */ public static void closeDatabases(int mode) { Iterator it = databaseIDMap.values().iterator(); while (it.hasNext()) { Database db = (Database) it.next(); try { db.close(mode); } catch (HsqlException e) {} } } /** * Used by server to open a new session */ static Session newSession(int dbID, String user, String password) throws HsqlException { Database db = (Database) databaseIDMap.get(dbID); return db == null ? null : db.connect(user, password); } /** * Used by in-process connections and by Servlet */ // loosecannon1@users 1.7.2 patch properties on the JDBC URL public static Session newSession(String type, String path, String user, String password, HsqlProperties props) throws HsqlException { Database db = getDatabase(type, path, props); return db == null ? null : db.connect(user, password); } /** * Returns an existing session. Used with repeat HTTP connections * belonging to the same JDBC Conenction / HSQL Session pair. */ static Session getSession(int dbId, int sessionId) { Database db = (Database) databaseIDMap.get(dbId); return db == null ? null : db.sessionManager.getSession(sessionId); } /** * Used by server to open or create a database */ // loosecannon1@users 1.7.2 patch properties on the JDBC URL static int getDatabase(String type, String path, Server server, HsqlProperties props) throws HsqlException { Database db = getDatabase(type, path, props); registerServer(server, db); return db.databaseID; } /** * This has to be improved once a threading model is in place. * Current behaviour: * * Attempts to connect to different databases do not block. Two db's can * open simultaneously. * * Attempts to connect to a db while it is opening or closing will block * until the db is open or closed. At this point the db state is either * DATABASE_ONLINE (after db.open() has returned) which allows a new * connection to be made, or the state is DATABASE_SHUTDOWN which means * the db can be reopened for the new connection). * */ // loosecannon1@users 1.7.2 patch properties on the JDBC URL static Database getDatabase(String type, String path, HsqlProperties props) throws HsqlException { // If the (type, path) pair does not correspond to a registered // instance, then getDatabaseObject() returns a newly constructed // and registered Database instance. // The database state will be DATABASE_SHUTDOWN, // which means that the switch below will attempt to // open the database instance. Database db = getDatabaseObject(type, path, props); synchronized (db) { switch (db.getState()) { case Database.DATABASE_ONLINE : break; case Database.DATABASE_SHUTDOWN : // if the database was shutdown while this attempt // was waiting, add the database back to the registry if (lookupDatabaseObject(type, path) == null) { addDatabaseObject(type, path, db); } db.open(); break; // This state will currently not be reached as Database.Close() is // called while a lock is held on the database. // If we remove the lock from this method and a database is // being shutdown by a thread and in the meantime another thread // attempts to connect to the db. The threads could belong to // different server instances or be in-process. case Database.DATABASE_CLOSING : // this case will not be reached as the state is set and // cleared within the db.open() call above, which is called // from this synchronized block // it is here simply as a placeholder for future development case Database.DATABASE_OPENING : throw Trace.error(Trace.LOCK_FILE_ACQUISITION_FAILURE, Trace.DatabaseManager_getDatabase); } } return db; } // loosecannon1@users 1.7.2 patch properties on the JDBC URL private static synchronized Database getDatabaseObject(String type, String path, HsqlProperties props) throws HsqlException { Database db; String key = path; HashMap databaseMap; if (type == DatabaseURL.S_FILE) { databaseMap = fileDatabaseMap; key = filePathToKey(path); } else if (type == DatabaseURL.S_RES) { databaseMap = resDatabaseMap; } else if (type == DatabaseURL.S_MEM) { databaseMap = memDatabaseMap; } else { throw Trace.runtimeError(Trace.UNSUPPORTED_INTERNAL_OPERATION, "DatabaseManager.getDatabaseObject"); } db = (Database) databaseMap.get(key); if (db == null) { db = new Database(type, path, type + key, props); db.databaseID = dbIDCounter; databaseIDMap.put(dbIDCounter, db); dbIDCounter++; databaseMap.put(key, db); } return db; } /** * Looks up database of a given type and path in the registry. Returns * null if there is none. */ private static synchronized Database lookupDatabaseObject(String type, String path) throws HsqlException { Object key = path; HashMap databaseMap; if (type == DatabaseURL.S_FILE) { databaseMap = fileDatabaseMap; key = filePathToKey(path); } else if (type == DatabaseURL.S_RES) { databaseMap = resDatabaseMap; } else if (type == DatabaseURL.S_MEM) { databaseMap = memDatabaseMap; } else { throw (Trace.runtimeError( Trace.UNSUPPORTED_INTERNAL_OPERATION, "DatabaseManager.lookupDatabaseObject()")); } return (Database) databaseMap.get(key); } /** * Adds a database to the registry. Returns * null if there is none. */ private static synchronized void addDatabaseObject(String type, String path, Database db) throws HsqlException { Object key = path; HashMap databaseMap; if (type == DatabaseURL.S_FILE) { databaseMap = fileDatabaseMap; key = filePathToKey(path); } else if (type == DatabaseURL.S_RES) { databaseMap = resDatabaseMap; } else if (type == DatabaseURL.S_MEM) { databaseMap = memDatabaseMap; } else { throw Trace.runtimeError(Trace.UNSUPPORTED_INTERNAL_OPERATION, "DatabaseManager.addDatabaseObject()"); } databaseIDMap.put(db.databaseID, db); databaseMap.put(key, db); } /** * Removes the database from registry. */ static void removeDatabase(Database database) { int dbID = database.databaseID; String type = database.getType(); String path = database.getPath(); Object key = path; HashMap databaseMap; notifyServers(database); if (type == DatabaseURL.S_FILE) { databaseMap = fileDatabaseMap; // boucherb@users 20040124 - patch 1.7.2 // Under the current contract, it's essentially impossible for an // exception to get thrown here, because the database could not // have been registered successfully before hand using the same // path // // Eventually, we might think about storing the key with the // database instance so as to avoid this unnecessary additional // conversion and highly unlikely corner case handling. try { key = filePathToKey(path); } catch (HsqlException e) { Iterator it = databaseMap.keySet().iterator(); Object foundKey = null; while (it.hasNext()) { Object currentKey = it.next(); if (databaseMap.get(currentKey) == database) { foundKey = currentKey; break; } } if (foundKey == null) { // ??? return; } else { key = foundKey; } } } else if (type == DatabaseURL.S_RES) { databaseMap = resDatabaseMap; } else if (type == DatabaseURL.S_MEM) { databaseMap = memDatabaseMap; } else { throw (Trace.runtimeError( Trace.UNSUPPORTED_INTERNAL_OPERATION, "DatabaseManager.lookupDatabaseObject()")); } databaseIDMap.remove(dbID); databaseMap.remove(key); if (databaseIDMap.isEmpty()) { ValuePool.resetPool(); } } /** * Maintains a map of servers to sets of databases. * Servers register each of their databases. * When a database is shutdown, all the servers accessing it are notified. * The database is then removed form the sets for all servers and the * servers that have no other database are removed from the map. */ static HashMap serverMap = new HashMap(); /** * Deregisters a server completely. */ static void deRegisterServer(Server server) { serverMap.remove(server); } /** * Deregisters a server as serving a given database. Not yet used. */ private static void deRegisterServer(Server server, Database db) { Iterator it = serverMap.values().iterator(); for (; it.hasNext(); ) { HashSet databases = (HashSet) it.next(); databases.remove(db); if (databases.isEmpty()) { it.remove(); } } } /** * Registers a server as serving a given database. */ private static void registerServer(Server server, Database db) { if (!serverMap.containsKey(server)) { serverMap.put(server, new HashSet()); } HashSet databases = (HashSet) serverMap.get(server); databases.add(db); } /** * Notifies all servers that serve the database that the database has been * shutdown. */ private static void notifyServers(Database db) { Iterator it = serverMap.keySet().iterator(); for (; it.hasNext(); ) { Server server = (Server) it.next(); HashSet databases = (HashSet) serverMap.get(server); if (databases.contains(db)) { server.notify(ServerConstants.SC_DATABASE_SHUTDOWN, db.databaseID); } } } static boolean isServerDB(Database db) { Iterator it = serverMap.keySet().iterator(); for (; it.hasNext(); ) { Server server = (Server) it.next(); HashSet databases = (HashSet) serverMap.get(server); if (databases.contains(db)) { return true; } } return false; } // Timer private static final HsqlTimer timer = new HsqlTimer(); public static HsqlTimer getTimer() { return timer; } // converts file path to database lookup key, converting any // thrown exception to an HsqlException in the process private static String filePathToKey(String path) throws HsqlException { try { return FileUtil.getDefaultInstance().canonicalOrAbsolutePath(path); } catch (Exception e) { throw Trace.error(Trace.FILE_IO_ERROR, e.toString()); } } } hsqldb-1.8.0.10.orig/src/org/hsqldb/DiskNode.java0000644000175000017500000002652710447630160020032 0ustar renerene/* Copyright (c) 1995-2000, The Hypersonic SQL Group. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the Hypersonic SQL Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE HYPERSONIC SQL GROUP, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * This software consists of voluntary contributions made by many individuals * on behalf of the Hypersonic SQL Group. * * * For work added by the HSQL Development Group: * * Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb; import java.io.IOException; import org.hsqldb.lib.IntLookup; import org.hsqldb.rowio.RowInputInterface; import org.hsqldb.rowio.RowOutputInterface; // fredt@users 20020221 - patch 513005 by sqlbob@users (RMP) // fredt@users 20020920 - path 1.7.1 - refactoring to cut mamory footprint // fredt@users 20021205 - path 1.7.2 - enhancements /** * Cached table Node implementation.

    * Only integral references to left, right and parent nodes in the AVL tree * are held and used as pointers data.

    * * iId is a reference to the Index object that contains this node.
    * This fields can be eliminated in the future, by changing the * method signatures to take a Index parameter from Index.java (fredt@users) * * New class derived from the Hypersonic code * * @author Thomas Mueller (Hypersonic SQL Group) * @version 1.7.2 * @since Hypersonic SQL */ class DiskNode extends Node { protected Row rData; private int iLeft = NO_POS; private int iRight = NO_POS; private int iParent = NO_POS; private int iId; // id of Index object for this Node static final int SIZE_IN_BYTE = 4 * 4; DiskNode(CachedRow r, RowInputInterface in, int id) throws IOException, HsqlException { iId = id; rData = r; iBalance = in.readIntData(); iLeft = in.readIntData(); if (iLeft <= 0) { iLeft = NO_POS; } iRight = in.readIntData(); if (iRight <= 0) { iRight = NO_POS; } iParent = in.readIntData(); if (iParent <= 0) { iParent = NO_POS; } if (Trace.DOASSERT) { // fredt - assert not correct - row can be deleted from one index but // not yet deleted from other indexes while the process of finding // the node is in progress which may require saving the row // to make way for new rows in the cache and loading it back // Trace.doAssert(iBalance != -2); } } DiskNode(CachedRow r, int id) { iId = id; rData = r; } void delete() { rData = null; iBalance = -2; } int getKey() { if (rData != null) { return ((CachedRow) rData).iPos; } return NO_POS; } Row getRow() throws HsqlException { if (Trace.DOASSERT) { Trace.doAssert(rData != null); } return rData; } private Node findNode(int pos) throws HsqlException { Node ret = null; Row r = ((CachedRow) rData).getTable().getRow(pos); if (r != null) { ret = r.getNode(iId); } return ret; } boolean isLeft(Node node) throws HsqlException { if (node == null) { return iLeft == NO_POS; } return iLeft == ((DiskNode) node).getKey(); } boolean isRight(Node node) throws HsqlException { if (node == null) { return iRight == NO_POS; } return iRight == ((DiskNode) node).getKey(); } Node getLeft() throws HsqlException { if (Trace.DOASSERT) { Trace.doAssert(iBalance != -2); } if (iLeft == NO_POS) { return null; } return findNode(iLeft); } Node getRight() throws HsqlException { if (Trace.DOASSERT) { Trace.doAssert(iBalance != -2); } if (iRight == NO_POS) { return null; } return findNode(iRight); } Node getParent() throws HsqlException { if (Trace.DOASSERT) { Trace.doAssert(iBalance != -2); } if (iParent == NO_POS) { return null; } return findNode(iParent); } boolean isRoot() { return iParent == Node.NO_POS; } boolean isFromLeft() throws HsqlException { if (this.isRoot()) { return true; } if (Trace.DOASSERT) { Trace.doAssert(getParent() != null); } DiskNode parent = (DiskNode) getParent(); return getKey() == parent.iLeft; } Object[] getData() throws HsqlException { if (Trace.DOASSERT) { Trace.doAssert(iBalance != -2); } return rData.getData(); } void setParent(Node n) throws HsqlException { if (Trace.DOASSERT) { Trace.doAssert(iBalance != -2); } ((CachedRow) rData).setChanged(); iParent = n == null ? NO_POS : n.getKey(); } void setBalance(int b) throws HsqlException { if (Trace.DOASSERT) { Trace.doAssert(iBalance != -2); } if (iBalance != b) { ((CachedRow) rData).setChanged(); iBalance = b; } } void setLeft(Node n) throws HsqlException { if (Trace.DOASSERT) { Trace.doAssert(iBalance != -2); } ((CachedRow) rData).setChanged(); iLeft = n == null ? NO_POS : n.getKey(); } void setRight(Node n) throws HsqlException { if (Trace.DOASSERT) { Trace.doAssert(iBalance != -2); } ((CachedRow) rData).setChanged(); iRight = n == null ? NO_POS : n.getKey(); } boolean equals(Node n) { /* if (Trace.DOASSERT) { Trace.doAssert(iBalance != -2); if (n != this) { boolean test = (getKey() == NO_POS) || (n == null) || (n.getKey() != getKey()); if (test == false) { test = iParent == ((DiskNode) n).iParent && iLeft == ((DiskNode) n).iLeft && iRight == ((DiskNode) n).iRight; if (test == false) { int aA = ((CachedRow) getRow()).iLastAccess; int bA = ((CachedRow) n.getRow()).iLastAccess; Trace.doAssert(test, "a: " + aA + ", " + iParent + ", " + iLeft + ", " + iRight + " b: " + bA + ", " + ((DiskNode) n).iParent + ", " + ((DiskNode) n).iLeft + ", " + ((DiskNode) n).iRight); } } } } */ return this == n || (n != null && getKey() == ((DiskNode) n).getKey()); } void write(RowOutputInterface out) throws IOException { if (Trace.DOASSERT) { // fredt - assert not correct - row can be deleted from one index but // not yet deleted from other indexes while the process of finding // the node is in progress which may require saving the row // to make way for new rows in the cache // Trace.doAssert(iBalance != -2); } out.writeIntData(iBalance); out.writeIntData((iLeft == NO_POS) ? 0 : iLeft); out.writeIntData((iRight == NO_POS) ? 0 : iRight); out.writeIntData((iParent == NO_POS) ? 0 : iParent); } Node getUpdatedNode() throws HsqlException { Row row = rData.getUpdatedRow(); return row == null ? null : row.getNode(iId); } void writeTranslate(RowOutputInterface out, IntLookup lookup) { out.writeIntData(iBalance); writeTranslatePointer(iLeft, out, lookup); writeTranslatePointer(iRight, out, lookup); writeTranslatePointer(iParent, out, lookup); } private void writeTranslatePointer(int pointer, RowOutputInterface out, IntLookup lookup) { int newPointer = 0; if (pointer != Node.NO_POS) { newPointer = lookup.lookupFirstEqual(pointer); } out.writeIntData(newPointer); } } hsqldb-1.8.0.10.orig/src/org/hsqldb/ResultBase.java0000644000175000017500000000715410416742476020410 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb; /* * This class introduces iterator functionality to Result. * * @author fredt@users * @version 1.7.2 * @since 1.7.2 */ public class ResultBase { public Record rRoot; protected Record rTail; protected int iSize; public ResultBase() {} public ResultIterator iterator() { return new ResultIterator(); } public class ResultIterator { boolean removed; int counter; Record current = rRoot; Record last; public boolean hasNext() { return counter < iSize; } public boolean next() { if (hasNext()) { removed = false; if (counter != 0) { last = current; current = current.next; } counter++; return true; } else { return false; } } public boolean previous() { return false; } public boolean absolute(int rows) { return false; } public boolean relative(int rows) { return false; } public boolean beforeFirst() { return false; } public boolean afterLast() { return false; } public boolean isBeforeFirst() { return false; } public boolean isAfterLast() { return false; } public void remove() { if (counter <= iSize && counter != 0 &&!removed) { removed = true; if (current == rTail) { rTail = last; } if (current == rRoot) { current = rRoot = rRoot.next; } else { current = last; last = null; current.next = current.next.next; } iSize--; counter--; return; } } } } hsqldb-1.8.0.10.orig/src/org/hsqldb/UserManager.java0000644000175000017500000003166110416742503020537 0ustar renerene/* Copyright (c) 1995-2000, The Hypersonic SQL Group. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the Hypersonic SQL Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE HYPERSONIC SQL GROUP, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * This software consists of voluntary contributions made by many individuals * on behalf of the Hypersonic SQL Group. * * * For work added by the HSQL Development Group: * * Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb; import org.hsqldb.lib.HashMappedList; import org.hsqldb.lib.HsqlArrayList; import org.hsqldb.HsqlNameManager.HsqlName; import org.hsqldb.SchemaManager.Schema; // fredt@users 20020130 - patch 497872 by Nitin Chauhan - loop optimisation // fredt@users 20020320 - doc 1.7.0 - update // fredt@users 20021103 - patch 1.7.2 - allow for drop table, etc. // fredt@users 20030613 - patch 1.7.2 - simplified data structures and reporting // unsaved@users - patch 1.8.0 moved right managament to new classes /** * * Manages the User objects for a Database instance. * The special users PUBLIC_USER_NAME and SYSTEM_AUTHORIZATION_NAME * are created and managed here. SYSTEM_AUTHORIZATION_NAME is also * special in that the name is not kept in the user "list" * (PUBLIC_USER_NAME is kept in the list because it's needed by MetaData * routines via "listVisibleUsers(x, true)"). * * Partly based on Hypersonic code. * * @author Thomas Mueller (Hypersonic SQL Group) * @author boucherb@users * @author fredt@users * * @version 1.8.0 * @since 1.7.2 * @see User */ class UserManager implements GrantConstants { /** * We keep a link to the SYSTEM_AUTHORIZATION_NAME user because it is * the only User with no entry in the User map. */ User sysUser = null; /** * This object's set of User objects.

    * * Note: The special _SYSTEM role * is not included in this list but the special PUBLIC * User object is kept in the list because it's needed by MetaData * routines via "listVisibleUsers(x, true)". */ private HashMappedList userList; private GranteeManager granteeManager; /** * Construction happens once for each Database object. * * Creates special users PUBLIC_USER_NAME and SYSTEM_AUTHORIZATION_NAME. * Sets up association with the GranteeManager for this database. */ UserManager(Database database) throws HsqlException { granteeManager = database.getGranteeManager(); userList = new HashMappedList(); createUser(GranteeManager.PUBLIC_ROLE_NAME, null); sysUser = createUser(GranteeManager.SYSTEM_AUTHORIZATION_NAME, null); // Don't know whether to grant ADMIN to SYS directly, or to grant // role DBA. The former seems safer as it doesn't depend on any role. //granteeManager.grant(SYSTEM_AUTHORIZATION_NAME, RoleManager.ADMIN_ROLE_NAME); sysUser.getGrantee().setAdminDirect(); } /** * Creates a new User object under management of this object.

    * * A set of constraints regarding user creation is imposed:

    * *

      *
    1. If the specified name is null, then an * ASSERTION_FAILED exception is thrown stating that * the name is null. * *
    2. If this object's collection already contains an element whose * name attribute equals the name argument, then * a GRANTEE_ALREADY_EXISTS exception is thrown. * (This will catch attempts to create Reserved grantee names). *
    */ User createUser(String name, String password) throws HsqlException { if (name == null) { Trace.doAssert(false, Trace.getMessage(Trace.NULL_NAME)); } // TODO: // checkComplexity(password); // requires special: createSAUser(), createPublicUser() // boucherb@users 20020815 - disallow user-land creation of SYS user // ------------------------------------------------------- // This will throw an appropriate Trace if grantee already exists, // regardless of whether the name is in any User, Role, etc. list. Grantee g = granteeManager.addGrantee(name); User u = new User(name, password, g); // ONLY!! SYSTEM_AUTHORIZATION_NAME is not stored in our User list. if (GranteeManager.SYSTEM_AUTHORIZATION_NAME.equals(name)) { return u; } boolean success = userList.add(name, u); if (!success) { throw Trace.error(Trace.USER_ALREADY_EXISTS, name); } return u; } /** * Attempts to drop a User object with the specified name * from this object's set.

    * * A successful drop action consists of:

    * *

      * *
    • removing the User object with the specified name * from the set. * *
    • revoking all rights from the removed object
      * (this ensures that in case there are still references to the * just dropped User object, those references * cannot be used to erronously access database objects). * *

    * */ void dropUser(String name) throws HsqlException { boolean reservedUser = GranteeManager.isReserved(name); Trace.check(!reservedUser, Trace.NONMOD_ACCOUNT, name); boolean result = granteeManager.removeGrantee(name); Trace.check(result, Trace.NO_SUCH_GRANTEE, name); User u = (User) userList.remove(name); Trace.check(u != null, Trace.USER_NOT_FOUND, name); } /** * Returns the User object with the specified name and * password from this object's set. */ User getUser(String name, String password) throws HsqlException { if (name == null) { name = ""; } if (password == null) { password = ""; } // Don't have to worry about SYSTEM_AUTHORIZATION_NAME, since get() // will fail below (because it's not in the list). if (name.equals(GranteeManager.PUBLIC_ROLE_NAME)) { throw Trace.error(Trace.ACCESS_IS_DENIED); } name = name.toUpperCase(); password = password.toUpperCase(); User u = get(name); u.checkPassword(password); return u; } /** * Retrieves this object's set of User objects as * an HsqlArrayList.

    */ HashMappedList getUsers() { return userList; } boolean exists(String name) { return userList.get(name) == null ? false : true; } /** * Returns the User object identified by the * name argument.

    */ User get(String name) throws HsqlException { User u = (User) userList.get(name); if (u == null) { throw Trace.error(Trace.USER_NOT_FOUND, name); } return u; } /** * Retrieves the User objects representing the database * users that are visible to the User object * represented by the session argument.

    * * If the session argument's User object * attribute has isAdmin() true (directly or by virtue of a Role), * then all of the * User objects in this collection are considered visible. * Otherwise, only this object's special PUBLIC * User object attribute and the session User * object, if it exists in this collection, are considered visible.

    * * @param session The Session object used to determine * visibility * @param andPublicUser whether to include the special PUBLIC * User object in the retrieved list * @return a list of User objects visible to * the User object contained by the * session argument. * */ HsqlArrayList listVisibleUsers(Session session, boolean andPublicUser) { HsqlArrayList list; User user; boolean isAdmin; String sessName; String userName; list = new HsqlArrayList(); isAdmin = session.isAdmin(); sessName = session.getUsername(); if (userList == null || userList.size() == 0) { return list; } for (int i = 0; i < userList.size(); i++) { user = (User) userList.get(i); if (user == null) { continue; } userName = user.getName(); if (GranteeManager.PUBLIC_ROLE_NAME.equals(userName)) { if (andPublicUser) { list.add(user); } } else if (isAdmin) { list.add(user); } else if (sessName.equals(userName)) { list.add(user); } } return list; } // Legacy wrappers static String[] getRightsArray(int rights) { return GranteeManager.getRightsArray(rights); } /** * Removes all rights mappings for the database object identified by * the dbobject argument from all Grantee objects in the set. */ void removeDbObject(Object dbobject) { granteeManager.removeDbObject(dbobject); } /** * Returns the specially constructed * SYSTEM_AUTHORIZATION_NAME * User object for the current Database object. * * @throws HsqlException - if the specified Database * has no SYS_AUTHORIZATION_NAME * User object. * @return the SYS_AUTHORIZATION_NAME * User object * */ User getSysUser() { return sysUser; } public synchronized void removeSchemaReference(Schema schema) { for (int i = 0; i < userList.size(); i++) { User user = (User) userList.get(i); if (user.getInitialSchema() == schema.name) { user.setInitialSchema(null); } } } } hsqldb-1.8.0.10.orig/src/org/hsqldb/Table.java0000644000175000017500000032673110706224253017361 0ustar renerene/* Copyright (c) 1995-2000, The Hypersonic SQL Group. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the Hypersonic SQL Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE HYPERSONIC SQL GROUP, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * This software consists of voluntary contributions made by many individuals * on behalf of the Hypersonic SQL Group. * * * For work added by the HSQL Development Group: * * Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb; import java.io.IOException; import org.hsqldb.HsqlNameManager.HsqlName; import org.hsqldb.index.RowIterator; import org.hsqldb.lib.ArrayUtil; import org.hsqldb.lib.HashMappedList; import org.hsqldb.lib.HashSet; import org.hsqldb.lib.HsqlArrayList; import org.hsqldb.lib.Iterator; import org.hsqldb.lib.StringUtil; import org.hsqldb.persist.CachedObject; import org.hsqldb.persist.DataFileCache; import org.hsqldb.persist.PersistentStore; import org.hsqldb.rowio.RowInputInterface; import org.hsqldb.store.ValuePool; // fredt@users 20020130 - patch 491987 by jimbag@users - made optional // fredt@users 20020405 - patch 1.7.0 by fredt - quoted identifiers // for sql standard quoted identifiers for column and table names and aliases // applied to different places // fredt@users 20020225 - patch 1.7.0 - restructuring // some methods moved from Database.java, some rewritten // changes to several methods // fredt@users 20020225 - patch 1.7.0 - ON DELETE CASCADE // fredt@users 20020225 - patch 1.7.0 - named constraints // boucherb@users 20020225 - patch 1.7.0 - multi-column primary keys // fredt@users 20020221 - patch 513005 by sqlbob@users (RMP) // tony_lai@users 20020820 - patch 595099 - user defined PK name // tony_lai@users 20020820 - patch 595172 - drop constraint fix // kloska@users 20021030 - patch 1.7.2 - ON UPDATE CASCADE | SET NULL | SET DEFAULT // kloska@users 20021112 - patch 1.7.2 - ON DELETE SET NULL | SET DEFAULT // fredt@users 20021210 - patch 1.7.2 - better ADD / DROP INDEX for non-CACHED tables // fredt@users 20030901 - patch 1.7.2 - allow multiple nulls for UNIQUE columns // fredt@users 20030901 - patch 1.7.2 - reworked IDENTITY support // achnettest@users 20040130 - patch 878288 - bug fix for new indexes in memory tables by Arne Christensen // boucherb@users 20040327 - doc 1.7.2 - javadoc updates // boucherb@users 200404xx - patch 1.7.2 - proper uri for getCatalogName // fredt@users 20050000 - 1.8.0 updates in several areas // fredt@users 20050220 - patch 1.8.0 enforcement of DECIMAL precision/scale /** * Holds the data structures and methods for creation of a database table. * * * Extensively rewritten and extended in successive versions of HSQLDB. * * @author Thomas Mueller (Hypersonic SQL Group) * @version 1.8.0 * @since Hypersonic SQL */ public class Table extends BaseTable { // types of table public static final int SYSTEM_TABLE = 0; public static final int SYSTEM_SUBQUERY = 1; public static final int TEMP_TABLE = 2; public static final int MEMORY_TABLE = 3; public static final int CACHED_TABLE = 4; public static final int TEMP_TEXT_TABLE = 5; public static final int TEXT_TABLE = 6; public static final int VIEW = 7; // boucherb@users - for future implementation of SQL standard INFORMATION_SCHEMA static final int SYSTEM_VIEW = 8; // main properties // boucherb@users - access changed in support of metadata 1.7.2 public HashMappedList columnList; // columns in table private int[] primaryKeyCols; // column numbers for primary key private int[] primaryKeyTypes; // types for primary key private int[] primaryKeyColsSequence; // {0,1,2,...} int[] bestRowIdentifierCols; // column set for best index boolean bestRowIdentifierStrict; // true if it has no nullable column int[] bestIndexForColumn; // index of the 'best' index for each column Index bestIndex; // the best index overall - null if there is no user-defined index int identityColumn; // -1 means no such row NumberSequence identitySequence; // next value of identity column NumberSequence rowIdSequence; // next value of optional rowid // ----------------------------------------------------------------------- Constraint[] constraintList; // constrainst for the table HsqlArrayList[] triggerLists; // array of trigger lists private int[] colTypes; // fredt - types of columns private int[] colSizes; // fredt - copy of SIZE values for columns private int[] colScales; // fredt - copy of SCALE values for columns private boolean[] colNullable; // fredt - modified copy of isNullable() values private Expression[] colDefaults; // fredt - expressions of DEFAULT values private int[] defaultColumnMap; // fred - holding 0,1,2,3,... private boolean hasDefaultValues; //fredt - shortcut for above boolean sqlEnforceSize; // inherited from the database - // properties for subclasses protected int columnCount; // inclusive the hidden primary key public Database database; protected DataFileCache cache; protected HsqlName tableName; // SQL name private int tableType; protected boolean isReadOnly; protected boolean isTemp; protected boolean isCached; protected boolean isText; protected boolean isMemory; private boolean isView; protected boolean isLogged; protected int indexType; // fredt - type of index used protected boolean onCommitPreserve; // for temp tables // PersistentStore rowStore; Index[] indexList; // vIndex(0) is the primary key index /** * Constructor * * @param db * @param name * @param type * @param sessionid * @exception HsqlException */ Table(Database db, HsqlName name, int type) throws HsqlException { database = db; sqlEnforceSize = db.sqlEnforceStrictSize; identitySequence = new NumberSequence(null, 0, 1, Types.BIGINT); rowIdSequence = new NumberSequence(null, 0, 1, Types.BIGINT); switch (type) { case SYSTEM_SUBQUERY : isTemp = true; isMemory = true; break; case SYSTEM_TABLE : isMemory = true; break; case CACHED_TABLE : if (DatabaseURL.isFileBasedDatabaseType(db.getType())) { cache = db.logger.getCache(); isCached = true; isLogged = !database.isFilesReadOnly(); indexType = Index.DISK_INDEX; rowStore = new RowStore(); break; } type = MEMORY_TABLE; case MEMORY_TABLE : isMemory = true; isLogged = !database.isFilesReadOnly(); break; case TEMP_TABLE : isMemory = true; isTemp = true; break; case TEMP_TEXT_TABLE : if (!DatabaseURL.isFileBasedDatabaseType(db.getType())) { throw Trace.error(Trace.DATABASE_IS_MEMORY_ONLY); } isTemp = true; isText = true; isReadOnly = true; indexType = Index.POINTER_INDEX; rowStore = new RowStore(); break; case TEXT_TABLE : if (!DatabaseURL.isFileBasedDatabaseType(db.getType())) { throw Trace.error(Trace.DATABASE_IS_MEMORY_ONLY); } isText = true; indexType = Index.POINTER_INDEX; rowStore = new RowStore(); break; case VIEW : case SYSTEM_VIEW : isView = true; break; } // type may have changed above for CACHED tables tableType = type; tableName = name; primaryKeyCols = null; primaryKeyTypes = null; identityColumn = -1; columnList = new HashMappedList(); indexList = new Index[0]; constraintList = new Constraint[0]; triggerLists = new HsqlArrayList[TriggerDef.NUM_TRIGS]; // ---------------------------------------------------------------------------- // akede@users - 1.7.2 patch Files readonly // Changing the mode of the table if necessary if (db.isFilesReadOnly() && isFileBased()) { setIsReadOnly(true); } // ---------------------------------------------------------------------------- } boolean equals(Session session, String name) { /* if (isTemp && (session != null && session.getId() != ownerSessionId)) { return false; } */ return (tableName.name.equals(name)); } boolean equals(String name) { return (tableName.name.equals(name)); } boolean equals(HsqlName name) { return (tableName.equals(name)); } public final boolean isText() { return isText; } public final boolean isTemp() { return isTemp; } public final boolean isReadOnly() { return isDataReadOnly(); } final boolean isView() { return isView; } final int getIndexType() { return indexType; } public final int getTableType() { return tableType; } public boolean isDataReadOnly() { return isReadOnly; } /** * sets the isReadOnly flag, and invalidates the database's system tables as needed */ protected void setIsReadOnly(boolean newReadOnly) { isReadOnly = newReadOnly; database.setMetaDirty(true); } /** * Used by INSERT, DELETE, UPDATE operations */ void checkDataReadOnly() throws HsqlException { if (isDataReadOnly()) { throw Trace.error(Trace.DATA_IS_READONLY); } } // ---------------------------------------------------------------------------- // akede@users - 1.7.2 patch Files readonly void setDataReadOnly(boolean value) throws HsqlException { // Changing the Read-Only mode for the table is only allowed if // the database can realize it. if (!value && database.isFilesReadOnly() && isFileBased()) { throw Trace.error(Trace.DATA_IS_READONLY); } isReadOnly = value; } /** * Text or Cached Tables are normally file based */ boolean isFileBased() { return isCached || isText; } /** * For text tables */ protected void setDataSource(Session s, String source, boolean isDesc, boolean newFile) throws HsqlException { throw (Trace.error(Trace.TABLE_NOT_FOUND)); } /** * For text tables */ protected String getDataSource() { return null; } /** * For text tables. */ protected boolean isDescDataSource() { return false; } /** * For text tables. */ public void setHeader(String header) throws HsqlException { throw Trace.error(Trace.TEXT_TABLE_HEADER); } /** * For text tables. */ public String getHeader() { return null; } /** * determines whether the table is actually connected to the underlying data source. * *

    This method is available for text tables only.

    * * @see setDataSource * @see disconnect * @see isConnected */ public boolean isConnected() { return true; } /** * connects the table to the underlying data source. * *

    This method is available for text tables only.

    * * @param session * denotes the current session. Might be null. * * @see setDataSource * @see disconnect * @see isConnected */ public void connect(Session session) throws HsqlException { throw Trace.error(Trace.CANNOT_CONNECT_TABLE); } /** * disconnects the table from the underlying data source. * *

    This method is available for text tables only.

    * * @param session * denotes the current session. Might be null. * * @see setDataSource * @see connect * @see isConnected */ public void disconnect(Session session) throws HsqlException { throw Trace.error(Trace.CANNOT_CONNECT_TABLE); } /** * Adds a constraint. */ void addConstraint(Constraint c) { constraintList = (Constraint[]) ArrayUtil.toAdjustedArray(constraintList, c, constraintList.length, 1); } /** * Returns the list of constraints. */ Constraint[] getConstraints() { return constraintList; } /** * Returns the primary constraint. */ Constraint getPrimaryConstraint() { return primaryKeyCols.length == 0 ? null : constraintList[0]; } /** @todo fredt - this can be improved to ignore order of columns in * multi-column indexes */ /** * Returns the index supporting a constraint with the given column signature. * Only Unique constraints are considered. */ Index getUniqueConstraintIndexForColumns(int[] col) { if (ArrayUtil.areEqual(getPrimaryIndex().getColumns(), col, col.length, true)) { return getPrimaryIndex(); } for (int i = 0, size = constraintList.length; i < size; i++) { Constraint c = constraintList[i]; if (c.getType() != Constraint.UNIQUE) { continue; } if (ArrayUtil.areEqual(c.getMainColumns(), col, col.length, true)) { return c.getMainIndex(); } } return null; } /** * Returns any foreign key constraint equivalent to the column sets */ Constraint getConstraintForColumns(Table tablemain, int[] colmain, int[] colref) { for (int i = 0, size = constraintList.length; i < size; i++) { Constraint c = constraintList[i]; if (c.isEquivalent(tablemain, colmain, this, colref)) { return c; } } return null; } /** * Returns any unique constraint equivalent to the column set */ Constraint getUniqueConstraintForColumns(int[] cols) { for (int i = 0, size = constraintList.length; i < size; i++) { Constraint c = constraintList[i]; if (c.isEquivalent(cols, Constraint.UNIQUE)) { return c; } } return null; } /** * Returns any unique Constraint using this index * * @param index * @return */ Constraint getUniqueOrPKConstraintForIndex(Index index) { for (int i = 0, size = constraintList.length; i < size; i++) { Constraint c = constraintList[i]; if (c.getMainIndex() == index && (c.getType() == Constraint.UNIQUE || c.getType() == Constraint.PRIMARY_KEY)) { return c; } } return null; } /** * Returns the next constraint of a given type * * @param from * @param type * @return */ int getNextConstraintIndex(int from, int type) { for (int i = from, size = constraintList.length; i < size; i++) { Constraint c = constraintList[i]; if (c.getType() == type) { return i; } } return -1; } // fredt@users 20020220 - patch 475199 - duplicate column /** * Performs the table level checks and adds a column to the table at the * DDL level. Only used at table creation, not at alter column. */ void addColumn(Column column) throws HsqlException { if (findColumn(column.columnName.name) >= 0) { throw Trace.error(Trace.COLUMN_ALREADY_EXISTS, column.columnName.name); } if (column.isIdentity()) { Trace.check( column.getType() == Types.INTEGER || column.getType() == Types.BIGINT, Trace.WRONG_DATA_TYPE, column.columnName.name); Trace.check(identityColumn == -1, Trace.SECOND_PRIMARY_KEY, column.columnName.name); identityColumn = columnCount; } if (primaryKeyCols != null) { Trace.doAssert(false, "Table.addColumn"); } columnList.add(column.columnName.name, column); columnCount++; } /** * Add a set of columns based on a ResultMetaData */ void addColumns(Result.ResultMetaData metadata, int count) throws HsqlException { for (int i = 0; i < count; i++) { Column column = new Column( database.nameManager.newHsqlName( metadata.colLabels[i], metadata.isLabelQuoted[i]), true, metadata.colTypes[i], metadata.colSizes[i], metadata.colScales[i], false, null); addColumn(column); } } /** * Adds a set of columns based on a compiled Select */ void addColumns(Select select) throws HsqlException { int colCount = select.iResultLen; for (int i = 0; i < colCount; i++) { Expression e = select.exprColumns[i]; Column column = new Column( database.nameManager.newHsqlName( e.getAlias(), e.isAliasQuoted()), true, e.getDataType(), e.getColumnSize(), e.getColumnScale(), false, null); addColumn(column); } } /** * Returns the HsqlName object fo the table */ public HsqlName getName() { return tableName; } public int getId() { return tableName.hashCode(); } /** * Changes table name. Used by 'alter table rename to'. * Essential to use the existing HsqlName as this is is referenced by * intances of Constraint etc. */ void rename(Session session, String newname, boolean isquoted) throws HsqlException { String oldname = tableName.name; tableName.rename(newname, isquoted); renameTableInCheckConstraints(session, oldname, newname); } /** * Returns total column counts, including hidden ones. */ int getInternalColumnCount() { return columnCount; } /** * returns a basic duplicate of the table without the data structures. */ protected Table duplicate() throws HsqlException { Table t = new Table(database, tableName, tableType); t.onCommitPreserve = onCommitPreserve; return t; } /** * Match two columns arrays for length and type of columns * * @param col column array from this Table * @param other the other Table object * @param othercol column array from the other Table * @throws HsqlException if there is a mismatch */ void checkColumnsMatch(int[] col, Table other, int[] othercol) throws HsqlException { if (col.length != othercol.length) { throw Trace.error(Trace.COLUMN_COUNT_DOES_NOT_MATCH); } for (int i = 0; i < col.length; i++) { // integrity check - should not throw in normal operation if (col[i] >= columnCount || othercol[i] >= other.columnCount) { throw Trace.error(Trace.COLUMN_COUNT_DOES_NOT_MATCH); } if (getColumn(col[i]).getType() != other.getColumn(othercol[i]).getType()) { throw Trace.error(Trace.COLUMN_TYPE_MISMATCH); } } } // fredt@users 20020405 - patch 1.7.0 by fredt - DROP and CREATE INDEX bug /** * Constraints that need removing are removed outside this method.
    * removeIndex is the index of an index to be removed, in which case * no change is made to columns
    * When withoutindex is null, adjust {-1 | 0 | +1} indicates if a * column is {removed | replaced | added} * */ Table moveDefinition(int[] removeIndex, Column newColumn, int colIndex, int adjust) throws HsqlException { Table tn = duplicate(); // loop beyond the end in order to be able to add a column to the end // of the list for (int i = 0; i < columnCount + 1; i++) { if (i == colIndex) { if (adjust == 0) { if (newColumn != null) { tn.addColumn(newColumn); continue; } } else if (adjust > 0) { tn.addColumn(newColumn); } else if (adjust < 0) { continue; } } if (i == columnCount) { break; } tn.addColumn(getColumn(i)); } // treat it the same as new table creation and int[] primarykey = primaryKeyCols.length == 0 ? null : primaryKeyCols; if (primarykey != null) { int[] newpk = ArrayUtil.toAdjustedColumnArray(primarykey, colIndex, adjust); if (primarykey.length != newpk.length) { throw Trace.error(Trace.DROP_PRIMARY_KEY); } else { primarykey = newpk; } } tn.createPrimaryKey(getIndex(0).getName(), primarykey, false); tn.constraintList = constraintList; Index idx = null; if (removeIndex != null) { idx = getIndex(removeIndex, colIndex); } if (idx != null) { if (idx.isConstraint()) { throw Trace.error(Trace.COLUMN_IS_IN_CONSTRAINT); } else { throw Trace.error(Trace.COLUMN_IS_IN_INDEX); } } for (int i = 1; i < indexList.length; i++) { if (removeIndex != null && ArrayUtil.find(removeIndex, i) != -1) { continue; } tn.createAdjustedIndex(indexList[i], colIndex, adjust); } tn.triggerLists = triggerLists; return tn; } Index getIndex(int[] exclude, int colIndex) { for (int i = 1; i < indexList.length; i++) { if (exclude != null && ArrayUtil.find(exclude, i) != -1) { continue; } Index idx = indexList[i]; int[] cols = idx.getColumns(); if (ArrayUtil.find(cols, colIndex) != -1) { return idx; } } return null; } private void copyIndexes(Table tn, int removeIndex, int colIndex, int adjust) throws HsqlException { for (int i = 1; i < getIndexCount(); i++) { Index idx = indexList[i]; if (removeIndex == i) { continue; } Index newidx = tn.createAdjustedIndex(idx, colIndex, adjust); if (newidx == null) { // column to remove is part of an index throw Trace.error(Trace.COLUMN_IS_IN_INDEX); } } } /** * cols == null means drop */ Table moveDefinitionPK(int[] pkCols, boolean withIdentity) throws HsqlException { // some checks if ((hasPrimaryKey() && pkCols != null) || (!hasPrimaryKey() && pkCols == null)) { throw Trace.error(Trace.DROP_PRIMARY_KEY); } Table tn = duplicate(); for (int i = 0; i < columnCount; i++) { tn.addColumn(getColumn(i).duplicate(withIdentity)); } tn.createPrimaryKey(getIndex(0).getName(), pkCols, true); tn.constraintList = constraintList; for (int i = 1; i < getIndexCount(); i++) { Index idx = getIndex(i); tn.createAdjustedIndex(idx, -1, 0); } tn.triggerLists = triggerLists; return tn; } /** * Updates the constraint and replaces references to the old table with * the new one, adjusting column index arrays by the given amount. */ void updateConstraintsTables(Session session, Table old, int colindex, int adjust) throws HsqlException { for (int i = 0, size = constraintList.length; i < size; i++) { Constraint c = constraintList[i]; c.replaceTable(old, this, colindex, adjust); if (c.constType == Constraint.CHECK) { recompileCheckConstraint(session, c); } } } private void recompileCheckConstraints(Session session) throws HsqlException { for (int i = 0, size = constraintList.length; i < size; i++) { Constraint c = constraintList[i]; if (c.constType == Constraint.CHECK) { recompileCheckConstraint(session, c); } } } /** * Used after adding columns or indexes to the table. */ private void recompileCheckConstraint(Session session, Constraint c) throws HsqlException { String ddl = c.core.check.getDDL(); Tokenizer tokenizer = new Tokenizer(ddl); Parser parser = new Parser(session, database, tokenizer); Expression condition = parser.parseExpression(); c.core.check = condition; // this workaround is here to stop LIKE optimisation (for proper scripting) condition.setLikeOptimised(); Select s = Expression.getCheckSelect(session, this, condition); c.core.checkFilter = s.tFilter[0]; c.core.checkFilter.setAsCheckFilter(); c.core.mainTable = this; } /** * Used for drop column. */ void checkColumnInCheckConstraint(String colname) throws HsqlException { for (int i = 0, size = constraintList.length; i < size; i++) { Constraint c = constraintList[i]; if (c.constType == Constraint.CHECK) { if (c.hasColumn(this, colname)) { throw Trace.error(Trace.COLUMN_IS_REFERENCED, c.getName()); } } } } /** * Used for retype column. Checks whether column is in an FK or is * referenced by a FK * @param colIndex index */ void checkColumnInFKConstraint(int colIndex) throws HsqlException { for (int i = 0, size = constraintList.length; i < size; i++) { Constraint c = constraintList[i]; if (c.hasColumn(colIndex) && (c.getType() == Constraint.MAIN || c.getType() == Constraint.FOREIGN_KEY)) { throw Trace.error(Trace.COLUMN_IS_REFERENCED, c.getName().name); } } } /** * Used for column defaults and nullability. Checks whether column is in an FK. * @param colIndex index of column * @param refOnly only check FK columns, not referenced columns */ void checkColumnInFKConstraint(int colIndex, int actionType) throws HsqlException { for (int i = 0, size = constraintList.length; i < size; i++) { Constraint c = constraintList[i]; if (c.hasColumn(colIndex)) { if (c.getType() == Constraint.FOREIGN_KEY && (actionType == c.getUpdateAction() || actionType == c.getDeleteAction())) { throw Trace.error(Trace.COLUMN_IS_REFERENCED, c.getName().name); } } } } /** * Used for rename column. */ private void renameColumnInCheckConstraints(String oldname, String newname, boolean isquoted) throws HsqlException { for (int i = 0, size = constraintList.length; i < size; i++) { Constraint c = constraintList[i]; if (c.constType == Constraint.CHECK) { Expression.Collector coll = new Expression.Collector(); coll.addAll(c.core.check, Expression.COLUMN); Iterator it = coll.iterator(); for (; it.hasNext(); ) { Expression e = (Expression) it.next(); if (e.getColumnName() == oldname) { e.setColumnName(newname, isquoted); } } } } } /** * Used for drop column. */ private void renameTableInCheckConstraints(Session session, String oldname, String newname) throws HsqlException { for (int i = 0, size = constraintList.length; i < size; i++) { Constraint c = constraintList[i]; if (c.constType == Constraint.CHECK) { Expression.Collector coll = new Expression.Collector(); coll.addAll(c.core.check, Expression.COLUMN); Iterator it = coll.iterator(); for (; it.hasNext(); ) { Expression e = (Expression) it.next(); if (e.getTableName() == oldname) { e.setTableName(newname); } } } } recompileCheckConstraints(session); } /** * Returns the count of user defined columns. */ public int getColumnCount() { return columnCount; } /** * Returns the count of indexes on this table. */ public int getIndexCount() { return indexList.length; } /** * Returns the identity column or null. */ int getIdentityColumn() { return identityColumn; } /** * Returns the index of given column name or throws if not found */ int getColumnNr(String c) throws HsqlException { int i = findColumn(c); if (i == -1) { throw Trace.error(Trace.COLUMN_NOT_FOUND, c); } return i; } /** * Returns the index of given column name or -1 if not found. */ int findColumn(String c) { int index = columnList.getIndex(c); return index; } /** * Returns the primary index (user defined or system defined) */ public Index getPrimaryIndex() { return getIndex(0); } /** * Return the user defined primary key column indexes, or empty array for system PK's. */ public int[] getPrimaryKey() { return primaryKeyCols; } public int[] getPrimaryKeyTypes() { return primaryKeyTypes; } public boolean hasPrimaryKey() { return !(primaryKeyCols.length == 0); } int[] getBestRowIdentifiers() { return bestRowIdentifierCols; } boolean isBestRowIdentifiersStrict() { return bestRowIdentifierStrict; } /** * This method is called whenever there is a change to table structure and * serves two porposes: (a) to reset the best set of columns that identify * the rows of the table (b) to reset the best index that can be used * to find rows of the table given a column value. * * (a) gives most weight to a primary key index, followed by a unique * address with the lowest count of nullable columns. Otherwise there is * no best row identifier. * * (b) finds for each column an index with a corresponding first column. * It uses any type of visible index and accepts the first one (it doesn't * make any difference to performance). * * bestIndex is the user defined, primary key, the first unique index, or * the first non-unique index. NULL if there is no user-defined index. * */ void setBestRowIdentifiers() { int[] briCols = null; int briColsCount = 0; boolean isStrict = false; int nNullCount = 0; // ignore if called prior to completion of primary key construction if (colNullable == null) { return; } bestIndex = null; bestIndexForColumn = new int[columnList.size()]; ArrayUtil.fillArray(bestIndexForColumn, -1); for (int i = 0; i < indexList.length; i++) { Index index = indexList[i]; int[] cols = index.getColumns(); int colsCount = index.getVisibleColumns(); if (i == 0) { // ignore system primary keys if (hasPrimaryKey()) { isStrict = true; } else { continue; } } if (bestIndexForColumn[cols[0]] == -1) { bestIndexForColumn[cols[0]] = i; } if (!index.isUnique()) { if (bestIndex == null) { bestIndex = index; } continue; } int nnullc = 0; for (int j = 0; j < colsCount; j++) { if (!colNullable[cols[j]]) { nnullc++; } } if (bestIndex != null) { bestIndex = index; } if (nnullc == colsCount) { if (briCols == null || briColsCount != nNullCount || colsCount < briColsCount) { // nothing found before || // found but has null columns || // found but has more columns than this index briCols = cols; briColsCount = colsCount; nNullCount = colsCount; isStrict = true; } continue; } else if (isStrict) { continue; } else if (briCols == null || colsCount < briColsCount || nnullc > nNullCount) { // nothing found before || // found but has more columns than this index|| // found but has fewer not null columns than this index briCols = cols; briColsCount = colsCount; nNullCount = nnullc; } } // remove rowID column from bestRowIdentiferCols bestRowIdentifierCols = briCols == null || briColsCount == briCols.length ? briCols : ArrayUtil .arraySlice(briCols, 0, briColsCount); bestRowIdentifierStrict = isStrict; if (hasPrimaryKey()) { bestIndex = getPrimaryIndex(); } } /** * Sets the SQL default value for a columm. */ void setDefaultExpression(int columnIndex, Expression def) { Column column = getColumn(columnIndex); column.setDefaultExpression(def); colDefaults[columnIndex] = column.getDefaultExpression(); resetDefaultsFlag(); } /** * sets the flag for the presence of any default expression */ void resetDefaultsFlag() { hasDefaultValues = false; for (int i = 0; i < columnCount; i++) { hasDefaultValues = hasDefaultValues || colDefaults[i] != null; } } DataFileCache getCache() { return cache; } /** * Used in TableFilter to get an index for the column. * An index is created automatically for system tables or subqueries. */ Index getIndexForColumn(Session session, int column) { int i = bestIndexForColumn[column]; if (i == -1 && (tableType == Table.SYSTEM_SUBQUERY || tableType == Table.SYSTEM_TABLE)) { try { HsqlName indexName = database.nameManager.newAutoName("IDX"); createIndex(session, new int[]{ column }, indexName, false, false, false); i = bestIndexForColumn[column]; } catch (Exception e) {} } return i == -1 ? null : getIndex(i); } /** * Used for TableFilter to get an index for the columns */ Index getIndexForColumns(boolean[] columnCheck) { Index indexChoice = null; int colCount = 0; for (int i = 0; i < indexList.length; i++) { Index index = indexList[i]; boolean result = ArrayUtil.containsAllTrueElements(columnCheck, index.colCheck); if (result && index.getVisibleColumns() > colCount) { colCount = index.getVisibleColumns(); indexChoice = index; } } return indexChoice; } /** * Finds an existing index for a foreign key column group */ Index getIndexForColumns(int[] col, boolean unique) throws HsqlException { for (int i = 0, count = getIndexCount(); i < count; i++) { Index currentindex = getIndex(i); int[] indexcol = currentindex.getColumns(); if (ArrayUtil.haveEqualArrays(indexcol, col, col.length)) { if (!unique || currentindex.isUnique()) { return currentindex; } } } return null; } /** * Return the list of file pointers to root nodes for this table's * indexes. */ public int[] getIndexRootsArray() { int[] roots = new int[getIndexCount()]; for (int i = 0; i < getIndexCount(); i++) { roots[i] = indexList[i].getRoot(); } return roots; } /** * Returns the string consisting of file pointers to roots of indexes * plus the next identity value (hidden or user defined). This is used * with CACHED tables. */ String getIndexRoots() { String roots = StringUtil.getList(getIndexRootsArray(), " ", ""); StringBuffer s = new StringBuffer(roots); s.append(' '); s.append(identitySequence.peek()); return s.toString(); } /** * Sets the index roots of a cached/text table to specified file * pointers. If a * file pointer is -1 then the particular index root is null. A null index * root signifies an empty table. Accordingly, all index roots should be * null or all should be a valid file pointer/reference. */ public void setIndexRoots(int[] roots) throws HsqlException { Trace.check(isCached, Trace.TABLE_NOT_FOUND); for (int i = 0; i < getIndexCount(); i++) { int p = roots[i]; Row r = null; if (p != -1) { r = (CachedRow) rowStore.get(p); } Node f = null; if (r != null) { f = r.getNode(i); } indexList[i].setRoot(null, f); } } /** * Sets the index roots and next identity. */ void setIndexRoots(String s) throws HsqlException { // the user may try to set this; this is not only internal problem Trace.check(isCached, Trace.TABLE_NOT_FOUND); Tokenizer t = new Tokenizer(s); int[] roots = new int[getIndexCount()]; for (int i = 0; i < getIndexCount(); i++) { int v = t.getInt(); roots[i] = v; } setIndexRoots(roots); long v = t.getBigint(); identitySequence.reset(v); } /** * Shortcut for creating system table PK's. */ void createPrimaryKey(int[] cols) throws HsqlException { createPrimaryKey(null, cols, false); } /** * Shortcut for creating default PK's. */ void createPrimaryKey() throws HsqlException { createPrimaryKey(null, null, false); } /** * Creates a single or multi-column primary key and index. sets the * colTypes array. Finalises the creation of the table. (fredt@users) */ // tony_lai@users 20020820 - patch 595099 void createPrimaryKey(HsqlName indexName, int[] columns, boolean columnsNotNull) throws HsqlException { if (primaryKeyCols != null) { Trace.doAssert(false, "Table.createPrimaryKey(column)"); } if (columns == null) { columns = new int[0]; } else { for (int i = 0; i < columns.length; i++) { if (columnsNotNull) { getColumn(columns[i]).setNullable(false); } getColumn(columns[i]).setPrimaryKey(true); } } primaryKeyCols = columns; colTypes = new int[columnCount]; colDefaults = new Expression[columnCount]; colSizes = new int[columnCount]; colScales = new int[columnCount]; colNullable = new boolean[columnCount]; defaultColumnMap = new int[columnCount]; for (int i = 0; i < columnCount; i++) { setColumnTypeVars(i); } primaryKeyTypes = new int[primaryKeyCols.length]; ArrayUtil.copyColumnValues(colTypes, primaryKeyCols, primaryKeyTypes); primaryKeyColsSequence = new int[primaryKeyCols.length]; ArrayUtil.fillSequence(primaryKeyColsSequence); resetDefaultsFlag(); // tony_lai@users 20020820 - patch 595099 HsqlName name = indexName != null ? indexName : database.nameManager.newAutoName( "IDX"); createPrimaryIndex(columns, name); setBestRowIdentifiers(); } void setColumnTypeVars(int i) { Column column = getColumn(i); colTypes[i] = column.getType(); colSizes[i] = column.getSize(); colScales[i] = column.getScale(); colNullable[i] = column.isNullable(); defaultColumnMap[i] = i; if (column.isIdentity()) { identitySequence.reset(column.identityStart, column.identityIncrement); } colDefaults[i] = column.getDefaultExpression(); } HsqlName makeSysPKName() throws HsqlException { return database.nameManager.newAutoName("PK"); } void createPrimaryIndex(int[] pkcols, HsqlName name) throws HsqlException { int[] pkcoltypes = new int[pkcols.length]; for (int j = 0; j < pkcols.length; j++) { pkcoltypes[j] = colTypes[pkcols[j]]; } Index newindex = new Index(database, name, this, pkcols, pkcoltypes, true, true, true, false, pkcols, pkcoltypes, isTemp); addIndex(newindex); } /** * Create new index taking into account removal or addition of a column * to the table. */ private Index createAdjustedIndex(Index index, int colindex, int adjust) throws HsqlException { int[] indexcolumns = (int[]) ArrayUtil.resizeArray(index.getColumns(), index.getVisibleColumns()); int[] colarr = ArrayUtil.toAdjustedColumnArray(indexcolumns, colindex, adjust); // if a column to remove is one of the Index columns if (colarr.length != index.getVisibleColumns()) { return null; } return createIndexStructure(colarr, index.getName(), index.isUnique(), index.isConstraint, index.isForward); } /** * Create new memory-resident index. For MEMORY and TEXT tables. */ Index createIndex(Session session, int[] column, HsqlName name, boolean unique, boolean constraint, boolean forward) throws HsqlException { int newindexNo = createIndexStructureGetNo(column, name, unique, constraint, forward); Index newindex = indexList[newindexNo]; Index primaryindex = getPrimaryIndex(); RowIterator it = primaryindex.firstRow(session); int rowCount = 0; HsqlException error = null; try { while (it.hasNext()) { Row row = it.next(); Node backnode = row.getNode(newindexNo - 1); Node newnode = Node.newNode(row, newindexNo, this); newnode.nNext = backnode.nNext; backnode.nNext = newnode; // count before inserting rowCount++; newindex.insert(session, row, newindexNo); } return newindex; } catch (java.lang.OutOfMemoryError e) { error = Trace.error(Trace.OUT_OF_MEMORY); } catch (HsqlException e) { error = e; } // backtrack on error // rowCount rows have been modified it = primaryindex.firstRow(session); for (int i = 0; i < rowCount; i++) { Row row = it.next(); Node backnode = row.getNode(0); int j = newindexNo; while (--j > 0) { backnode = backnode.nNext; } backnode.nNext = backnode.nNext.nNext; } indexList = (Index[]) ArrayUtil.toAdjustedArray(indexList, null, newindexNo, -1); setBestRowIdentifiers(); throw error; } /** * Creates the internal structures for an index. */ Index createIndexStructure(int[] columns, HsqlName name, boolean unique, boolean constraint, boolean forward) throws HsqlException { int i = createIndexStructureGetNo(columns, name, unique, constraint, forward); return indexList[i]; } int createIndexStructureGetNo(int[] column, HsqlName name, boolean unique, boolean constraint, boolean forward) throws HsqlException { if (primaryKeyCols == null) { Trace.doAssert(false, "createIndex"); } int s = column.length; int[] col = new int[s]; int[] type = new int[s]; for (int j = 0; j < s; j++) { col[j] = column[j]; type[j] = colTypes[col[j]]; } int[] pkcols = getPrimaryKey(); int[] pktypes = getPrimaryKeyTypes(); Index newindex = new Index(database, name, this, col, type, false, unique, constraint, forward, pkcols, pktypes, isTemp); int indexNo = addIndex(newindex); setBestRowIdentifiers(); return indexNo; } private int addIndex(Index index) { int i = 0; for (; i < indexList.length; i++) { Index current = indexList[i]; int order = index.getIndexOrderValue() - current.getIndexOrderValue(); if (order < 0) { break; } } indexList = (Index[]) ArrayUtil.toAdjustedArray(indexList, index, i, 1); return i; } /** * returns false if the table has to be recreated in order to add / drop * indexes. Only CACHED tables return false. */ boolean isIndexingMutable() { return !isIndexCached(); } /** * Checks for use of a named index in table constraints, * while ignorring a given set of constraints. * @throws HsqlException if index is used in a constraint */ void checkDropIndex(String indexname, HashSet ignore, boolean dropPK) throws HsqlException { Index index = this.getIndex(indexname); if (index == null) { throw Trace.error(Trace.INDEX_NOT_FOUND, indexname); } if (!dropPK && index.equals(getIndex(0))) { throw Trace.error(Trace.DROP_PRIMARY_KEY, indexname); } for (int i = 0, size = constraintList.length; i < size; i++) { Constraint c = constraintList[i]; if (ignore != null && ignore.contains(c)) { continue; } if (c.isIndexFK(index)) { throw Trace.error(Trace.DROP_FK_INDEX, indexname); } if (c.isIndexUnique(index)) { throw Trace.error(Trace.SYSTEM_INDEX, indexname); } } return; } /** * Returns true if the table has any rows at all. */ public boolean isEmpty(Session session) { if (getIndexCount() == 0) { return true; } return getIndex(0).isEmpty(session); } /** * Returns direct mapping array. */ int[] getColumnMap() { return defaultColumnMap; } /** * Returns empty mapping array. */ int[] getNewColumnMap() { return new int[columnCount]; } /** * Returns empty boolean array. */ boolean[] getNewColumnCheckList() { return new boolean[columnCount]; } /** * Returns empty Object array for a new row. */ public Object[] getEmptyRowData() { return new Object[columnCount]; } /** * Returns array for a new row with SQL DEFAULT value for each column n * where exists[n] is false. This provides default values only where * required and avoids evaluating these values where they will be * overwritten. */ Object[] getNewRowData(Session session, boolean[] exists) throws HsqlException { Object[] data = new Object[columnCount]; int i; if (exists != null && hasDefaultValues) { for (i = 0; i < columnCount; i++) { Expression def = colDefaults[i]; if (exists[i] == false && def != null) { data[i] = def.getValue(session, colTypes[i]); } } } return data; } /** * Performs Table structure modification and changes to the index nodes * to remove a given index from a MEMORY or TEXT table. Not for PK index. * */ void dropIndex(Session session, String indexname) throws HsqlException { // find the array index for indexname and remove int todrop = getIndexIndex(indexname); indexList = (Index[]) ArrayUtil.toAdjustedArray(indexList, null, todrop, -1); setBestRowIdentifiers(); dropIndexFromRows(session, todrop); } void dropIndexFromRows(Session session, int index) throws HsqlException { RowIterator it = getPrimaryIndex().firstRow(session); while (it.hasNext()) { Row row = it.next(); int i = index - 1; Node backnode = row.getNode(0); while (i-- > 0) { backnode = backnode.nNext; } backnode.nNext = backnode.nNext.nNext; } } /** * Moves the data from table to table. * The colindex argument is the index of the column that was * added or removed. The adjust argument is {-1 | 0 | +1} */ void moveData(Session session, Table from, int colindex, int adjust) throws HsqlException { Object colvalue = null; Column column = null; if (adjust >= 0 && colindex != -1) { column = getColumn(colindex); colvalue = column.getDefaultValue(session); } RowIterator it = from.getPrimaryIndex().firstRow(session); while (it.hasNext()) { Row row = it.next(); Object[] o = row.getData(); Object[] data = getEmptyRowData(); if (adjust == 0 && colindex != -1) { colvalue = Column.convertObject(session, o[colindex], column.getType(), column.getSize(), column.getScale()); } ArrayUtil.copyAdjustArray(o, data, colvalue, colindex, adjust); setIdentityColumn(session, data); enforceNullConstraints(data); Row newrow = newRow(data); indexRow(session, newrow); } from.drop(); } /** * Highest level multiple row insert method. Corresponds to an SQL * INSERT INTO ... SELECT ... statement. */ int insert(Session session, Result ins) throws HsqlException { Record ni = ins.rRoot; int count = 0; fireAll(session, Trigger.INSERT_BEFORE); while (ni != null) { insertRow(session, ni.data); ni = ni.next; count++; } fireAll(session, Trigger.INSERT_AFTER); return count; } /** * Highest level method for inserting a single row. Corresponds to an * SQL INSERT INTO .... VALUES(,,) statement. * fires triggers. */ void insert(Session session, Object[] data) throws HsqlException { fireAll(session, Trigger.INSERT_BEFORE); insertRow(session, data); fireAll(session, Trigger.INSERT_AFTER); } /** * Mid level method for inserting rows. Performs constraint checks and * fires row level triggers. */ private void insertRow(Session session, Object[] data) throws HsqlException { if (triggerLists[Trigger.INSERT_BEFORE_ROW] != null) { fireAll(session, Trigger.INSERT_BEFORE_ROW, null, data); } setIdentityColumn(session, data); checkRowDataInsert(session, data); insertNoCheck(session, data); if (triggerLists[Trigger.INSERT_AFTER_ROW] != null) { fireAll(session, Trigger.INSERT_AFTER_ROW, null, data); checkRowDataInsert(session, data); } } /** * Multi-row insert method. Used for SELECT ... INTO tablename queries. * These tables are new, empty tables, with no constraints, triggers * column default values, column size enforcement whatsoever. * * Not used for INSERT INTO .... SELECT ... FROM queries */ void insertIntoTable(Session session, Result result) throws HsqlException { insertResult(session, result); if (!isLogged) { return; } Record r = result.rRoot; while (r != null) { database.logger.writeInsertStatement(session, this, r.data); r = r.next; } } /** * Low level method for row insert. * UNIQUE or PRIMARY constraints are enforced by attempting to * add the row to the indexes. */ private void insertNoCheck(Session session, Object[] data) throws HsqlException { Row row = newRow(data); // this handles the UNIQUE constraints indexRow(session, row); if (session != null) { session.addInsertAction(this, row); } if (isLogged) { database.logger.writeInsertStatement(session, this, data); } } /** * */ public void insertNoCheckFromLog(Session session, Object[] data) throws HsqlException { Row r = newRow(data); updateIdentityValue(data); indexRow(session, r); if (session != null) { session.addInsertAction(this, r); } } /** * Low level method for restoring deleted rows */ void insertNoCheckRollback(Session session, Row row, boolean log) throws HsqlException { Row newrow = restoreRow(row); // instead of new row, use new routine so that the row does not use // rowstore.add(), which will allocate new space and different pos indexRow(session, newrow); if (log && isLogged) { database.logger.writeInsertStatement(session, this, row.getData()); } } /** * Used for system table inserts. No checks. No identity * columns. */ int insertSys(Result ins) throws HsqlException { Record ni = ins.rRoot; int count = 0; while (ni != null) { insertData(null, ni.data); ni = ni.next; count++; } return count; } /** * Used for subquery inserts. No checks. No identity * columns. */ int insertResult(Session session, Result ins) throws HsqlException { Record ni = ins.rRoot; int count = 0; while (ni != null) { Object[] newData = (Object[]) ArrayUtil.resizeArrayIfDifferent(ni.data, columnCount); insertData(session, newData); ni = ni.next; count++; } return count; } /** * Not for general use. * Used by ScriptReader to unconditionally insert a row into * the table when the .script file is read. */ public void insertFromScript(Object[] data) throws HsqlException { updateIdentityValue(data); insertData(null, data); } /** * Used by the methods above. */ public void insertData(Session session, Object[] data) throws HsqlException { Row row = newRow(data); indexRow(session, row); commitRowToStore(row); } /** * Used by the system tables */ public void insertSys(Object[] data) throws HsqlException { Row row = newRow(data); indexRow(null, row); } /** * Used by TextCache to insert a row into the indexes when the source * file is first read. */ protected void insertFromTextSource(CachedRow row) throws HsqlException { Object[] data = row.getData(); updateIdentityValue(data); enforceFieldValueLimits(data, defaultColumnMap); enforceNullConstraints(data); indexRow(null, row); } /** * Checks a row against NOT NULL constraints on columns. */ protected void enforceNullConstraints(Object[] data) throws HsqlException { for (int i = 0; i < columnCount; i++) { if (data[i] == null && !colNullable[i]) { Trace.throwerror(Trace.TRY_TO_INSERT_NULL, "column: " + getColumn(i).columnName.name + " table: " + tableName.name); } } } /** * If there is an identity column (visible or hidden) on the table, sets * the value and/or adjusts the iIdentiy value for the table. */ protected void setIdentityColumn(Session session, Object[] data) throws HsqlException { if (identityColumn != -1) { Number id = (Number) data[identityColumn]; if (id == null) { if (colTypes[identityColumn] == Types.INTEGER) { id = ValuePool.getInt((int) identitySequence.getValue()); } else { id = ValuePool.getLong(identitySequence.getValue()); } data[identityColumn] = id; } else { identitySequence.getValue(id.longValue()); } if (session != null) { session.setLastIdentity(id); } } } /** * If there is an identity column (visible or hidden) on the table, sets * the max identity value. */ protected void updateIdentityValue(Object[] data) throws HsqlException { if (identityColumn != -1) { Number id = (Number) data[identityColumn]; if (id != null) { identitySequence.getValue(id.longValue()); } } } /** * Enforce max field sizes according to SQL column definition. * SQL92 13.8 */ void enforceFieldValueLimits(Object[] data, int[] cols) throws HsqlException { int i; int colindex; if (sqlEnforceSize) { if (cols == null) { cols = defaultColumnMap; } for (i = 0; i < cols.length; i++) { colindex = cols[i]; if ((colTypes[colindex] == Types.TIMESTAMP || colSizes[colindex] != 0) && data[colindex] != null) { data[colindex] = Column.enforceSize(data[colindex], colTypes[colindex], colSizes[colindex], colScales[colindex], true); } } } } // fredt@users 20020130 - patch 491987 by jimbag@users - modified /** * Fires all row-level triggers of the given set (trigger type) * */ void fireAll(Session session, int trigVecIndx, Object[] oldrow, Object[] newrow) { if (!database.isReferentialIntegrity()) { // isReferentialIntegrity is false when reloading db return; } HsqlArrayList trigVec = triggerLists[trigVecIndx]; if (trigVec == null) { return; } for (int i = 0, size = trigVec.size(); i < size; i++) { TriggerDef td = (TriggerDef) trigVec.get(i); td.pushPair(session, oldrow, newrow); // tell the trigger thread to fire with this row } } /** * Statement level triggers. */ void fireAll(Session session, int trigVecIndex) { if (triggerLists[trigVecIndex] != null) { fireAll(session, trigVecIndex, null, null); } } /** * Adds a trigger. */ void addTrigger(TriggerDef trigDef) { if (triggerLists[trigDef.vectorIndex] == null) { triggerLists[trigDef.vectorIndex] = new HsqlArrayList(); } triggerLists[trigDef.vectorIndex].add(trigDef); } /** * Drops a trigger. */ void dropTrigger(String name) { // look in each trigger list of each type of trigger int numTrigs = TriggerDef.NUM_TRIGS; for (int tv = 0; tv < numTrigs; tv++) { HsqlArrayList v = triggerLists[tv]; if (v == null) { continue; } for (int tr = v.size() - 1; tr >= 0; tr--) { TriggerDef td = (TriggerDef) v.get(tr); if (td.name.name.equals(name)) { v.remove(tr); td.terminate(); } } if (v.isEmpty()) { triggerLists[tv] = null; } } } /** * Drops all triggers. */ void dropTriggers() { // look in each trigger list of each type of trigger int numTrigs = TriggerDef.NUM_TRIGS; for (int tv = 0; tv < numTrigs; tv++) { HsqlArrayList v = triggerLists[tv]; if (v == null) { continue; } for (int tr = v.size() - 1; tr >= 0; tr--) { TriggerDef td = (TriggerDef) v.get(tr); td.terminate(); } triggerLists[tv] = null; } } /** @todo fredt - reused structures to be reviewed for multi-threading */ /** * Reusable set of all FK constraints that have so far been enforced while * a cascading insert or delete is in progress. This is emptied and passed * with the first call to checkCascadeDelete or checkCascadeUpdate. During * recursion, if an FK constraint is encountered and is already present * in the set, the recursion stops. */ HashSet constraintPath; /** * Current list of updates on this table. This is emptied once a cascading * operation is over. */ HashMappedList tableUpdateList; // fredt@users 20020225 - patch 1.7.0 - CASCADING DELETES /** * Method is called recursively on a tree of tables from the current one * until no referring foreign-key table is left. In the process, if a * non-cascading foreign-key referring table contains data, an exception * is thrown. Parameter delete indicates whether to delete refering rows. * The method is called first to check if the row can be deleted, then to * delete the row and all the refering rows.

    * * Support added for SET NULL and SET DEFAULT by kloska@users involves * switching to checkCascadeUpdate(,,,,) when these rules are encountered * in the constraint.(fredt@users) * * @table table table to update * @param tableUpdateLists list of update lists * @param row row to delete * @param session * @param delete * @param path * @throws HsqlException */ static void checkCascadeDelete(Session session, Table table, HashMappedList tableUpdateLists, Row row, boolean delete, HashSet path) throws HsqlException { for (int i = 0, size = table.constraintList.length; i < size; i++) { Constraint c = table.constraintList[i]; if (c.getType() != Constraint.MAIN || c.getRef() == null) { continue; } RowIterator refiterator = c.findFkRef(session, row.getData(), delete); if (!refiterator.hasNext()) { continue; } try { if (c.core.deleteAction == Constraint.NO_ACTION) { if (c.core.mainTable == c.core.refTable) { Row refrow = refiterator.next(); // fredt - it's the same row // this supports deleting a single row // in future we can iterate over and check against // the full delete row list to enable multi-row // with self-referencing FK's deletes if (row.equals(refrow)) { continue; } } throw Trace.error(Trace.INTEGRITY_CONSTRAINT_VIOLATION, Trace.Constraint_violation, new Object[] { c.core.fkName.name, c.core.refTable.getName().name }); } Table reftable = c.getRef(); // shortcut when deltable has no imported constraint boolean hasref = reftable.getNextConstraintIndex(0, Constraint.MAIN) != -1; // if (reftable == this) we don't need to go further and can return ?? if (delete == false && hasref == false) { continue; } Index refindex = c.getRefIndex(); int[] m_columns = c.getMainColumns(); int[] r_columns = c.getRefColumns(); Object[] mdata = row.getData(); boolean isUpdate = c.getDeleteAction() == Constraint.SET_NULL || c.getDeleteAction() == Constraint.SET_DEFAULT; // -- list for records to be inserted if this is // -- a 'ON DELETE SET [NULL|DEFAULT]' constraint HashMappedList rowSet = null; if (isUpdate) { rowSet = (HashMappedList) tableUpdateLists.get(reftable); if (rowSet == null) { rowSet = new HashMappedList(); tableUpdateLists.add(reftable, rowSet); } } // walk the index for all the nodes that reference delnode for (;;) { Row refrow = refiterator.next(); if (refrow == null || refrow.isCascadeDeleted() || refindex.compareRowNonUnique( session, mdata, m_columns, refrow.getData()) != 0) { break; } // -- if the constraint is a 'SET [DEFAULT|NULL]' constraint we have to keep // -- a new record to be inserted after deleting the current. We also have to // -- switch over to the 'checkCascadeUpdate' method below this level if (isUpdate) { Object[] rnd = reftable.getEmptyRowData(); System.arraycopy(refrow.getData(), 0, rnd, 0, rnd.length); if (c.getDeleteAction() == Constraint.SET_NULL) { for (int j = 0; j < r_columns.length; j++) { rnd[r_columns[j]] = null; } } else { for (int j = 0; j < r_columns.length; j++) { Column col = reftable.getColumn(r_columns[j]); rnd[r_columns[j]] = col.getDefaultValue(session); } } if (hasref && path.add(c)) { // fredt - avoid infinite recursion on circular references // these can be rings of two or more mutually dependent tables // so only one visit per constraint is allowed checkCascadeUpdate(session, reftable, null, refrow, rnd, r_columns, null, path); path.remove(c); } if (delete) { // foreign key referencing own table - do not update the row to be deleted if (reftable != table || !refrow.equals(row)) { mergeUpdate(rowSet, refrow, rnd, r_columns); } } } else if (hasref) { if (reftable != table) { if (path.add(c)) { checkCascadeDelete(session, reftable, tableUpdateLists, refrow, delete, path); path.remove(c); } } else { // fredt - we avoid infinite recursion on the fk's referencing the same table // but chained rows can result in very deep recursion and StackOverflowError if (refrow != row) { checkCascadeDelete(session, reftable, tableUpdateLists, refrow, delete, path); } } } if (delete && !isUpdate && !refrow.isCascadeDeleted()) { reftable.deleteNoRefCheck(session, refrow); } } } finally { refiterator.release(); } } } /** * Check or perform an update cascade operation on a single row. * Check or cascade an update (delete/insert) operation. * The method takes a pair of rows (new data,old data) and checks * if Constraints permit the update operation. * A boolean arguement determines if the operation should * realy take place or if we just have to check for constraint violation. * fredt - cyclic conditions are now avoided by checking for second visit * to each constraint. The set of list of updates for all tables is passed * and filled in recursive calls. * * @param session current database session * @param table * @param tableUpdateLists lists of updates * @param orow old row data to be deleted. * @param nrow new row data to be inserted. * @param cols indices of the columns actually changed. * @param ref This should be initialized to null when the * method is called from the 'outside'. During recursion this will be the * current table (i.e. this) to indicate from where we came. * Foreign keys to this table do not have to be checked since they have * triggered the update and are valid by definition. * * @short Check or perform and update cascade operation on a single row. * * */ static void checkCascadeUpdate(Session session, Table table, HashMappedList tableUpdateLists, Row orow, Object[] nrow, int[] cols, Table ref, HashSet path) throws HsqlException { // -- We iterate through all constraints associated with this table // -- for (int i = 0, size = table.constraintList.length; i < size; i++) { Constraint c = table.constraintList[i]; if (c.getType() == Constraint.FOREIGN_KEY && c.getRef() != null) { // -- (1) If it is a foreign key constraint we have to check if the // -- main table still holds a record which allows the new values // -- to be set in the updated columns. This test however will be // -- skipped if the reference table is the main table since changes // -- in the reference table triggered the update and therefor // -- the referential integrity is guaranteed to be valid. // -- if (ref == null || c.getMain() != ref) { // -- common indexes of the changed columns and the main/ref constraint if (ArrayUtil.countCommonElements(cols, c.getRefColumns()) == 0) { // -- Table::checkCascadeUpdate -- NO common cols; reiterating continue; } c.hasMainRef(session, nrow); } } else if (c.getType() == Constraint.MAIN && c.getRef() != null) { // -- (2) If it happens to be a main constraint we check if the slave // -- table holds any records refering to the old contents. If so, // -- the constraint has to support an 'on update' action or we // -- throw an exception (all via a call to Constraint.findFkRef). // -- // -- If there are no common columns between the reference constraint // -- and the changed columns, we reiterate. int[] common = ArrayUtil.commonElements(cols, c.getMainColumns()); if (common == null) { // -- NO common cols between; reiterating continue; } int[] m_columns = c.getMainColumns(); int[] r_columns = c.getRefColumns(); // fredt - find out if the FK columns have actually changed boolean nochange = true; for (int j = 0; j < m_columns.length; j++) { if (!orow.getData()[m_columns[j]].equals( nrow[m_columns[j]])) { nochange = false; break; } } if (nochange) { continue; } // there must be no record in the 'slave' table // sebastian@scienion -- dependent on forDelete | forUpdate RowIterator refiterator = c.findFkRef(session, orow.getData(), false); if (refiterator.hasNext()) { if (c.core.updateAction == Constraint.NO_ACTION) { throw Trace.error(Trace.INTEGRITY_CONSTRAINT_VIOLATION, Trace.Constraint_violation, new Object[] { c.core.fkName.name, c.core.refTable.getName().name }); } } else { // no referencing row found continue; } Table reftable = c.getRef(); // -- unused shortcut when update table has no imported constraint boolean hasref = reftable.getNextConstraintIndex(0, Constraint.MAIN) != -1; Index refindex = c.getRefIndex(); // -- walk the index for all the nodes that reference update node HashMappedList rowSet = (HashMappedList) tableUpdateLists.get(reftable); if (rowSet == null) { rowSet = new HashMappedList(); tableUpdateLists.add(reftable, rowSet); } for (Row refrow = refiterator.next(); ; refrow = refiterator.next()) { if (refrow == null || refindex.compareRowNonUnique( session, orow.getData(), m_columns, refrow.getData()) != 0) { break; } Object[] rnd = reftable.getEmptyRowData(); System.arraycopy(refrow.getData(), 0, rnd, 0, rnd.length); // -- Depending on the type constraint we are dealing with we have to // -- fill up the forign key of the current record with different values // -- And handle the insertion procedure differently. if (c.getUpdateAction() == Constraint.SET_NULL) { // -- set null; we do not have to check referential integrity any further // -- since we are setting null values for (int j = 0; j < r_columns.length; j++) { rnd[r_columns[j]] = null; } } else if (c.getUpdateAction() == Constraint.SET_DEFAULT) { // -- set default; we check referential integrity with ref==null; since we manipulated // -- the values and referential integrity is no longer guaranteed to be valid for (int j = 0; j < r_columns.length; j++) { Column col = reftable.getColumn(r_columns[j]); rnd[r_columns[j]] = col.getDefaultValue(session); } if (path.add(c)) { checkCascadeUpdate(session, reftable, tableUpdateLists, refrow, rnd, r_columns, null, path); path.remove(c); } } else { // -- cascade; standard recursive call. We inherit values from the foreign key // -- table therefor we set ref==this. for (int j = 0; j < m_columns.length; j++) { rnd[r_columns[j]] = nrow[m_columns[j]]; } if (path.add(c)) { checkCascadeUpdate(session, reftable, tableUpdateLists, refrow, rnd, common, table, path); path.remove(c); } } mergeUpdate(rowSet, refrow, rnd, r_columns); } } } } /** * Merges a triggered change with a previous triggered change, or adds to * list. */ static void mergeUpdate(HashMappedList rowSet, Row row, Object[] newData, int[] cols) { Object[] data = (Object[]) rowSet.get(row); if (data != null) { for (int j = 0; j < cols.length; j++) { data[cols[j]] = newData[cols[j]]; } } else { rowSet.add(row, newData); } } /** * Merge the full triggered change with the updated row, or add to list. * Return false if changes conflict. */ static boolean mergeKeepUpdate(Session session, HashMappedList rowSet, int[] cols, int[] colTypes, Row row, Object[] newData) throws HsqlException { Object[] data = (Object[]) rowSet.get(row); if (data != null) { if (Index.compareRows( session, row .getData(), newData, cols, colTypes) != 0 && Index .compareRows( session, newData, data, cols, colTypes) != 0) { return false; } for (int j = 0; j < cols.length; j++) { newData[cols[j]] = data[cols[j]]; } rowSet.put(row, newData); } else { rowSet.add(row, newData); } return true; } static void clearUpdateLists(HashMappedList tableUpdateList) { for (int i = 0; i < tableUpdateList.size(); i++) { HashMappedList updateList = (HashMappedList) tableUpdateList.get(i); updateList.clear(); } } /** * Highest level multiple row delete method. Corresponds to an SQL * DELETE. */ int delete(Session session, HsqlArrayList deleteList) throws HsqlException { HashSet path = constraintPath == null ? new HashSet() : constraintPath; constraintPath = null; HashMappedList tUpdateList = tableUpdateList == null ? new HashMappedList() : tableUpdateList; tableUpdateList = null; if (database.isReferentialIntegrity()) { for (int i = 0; i < deleteList.size(); i++) { Row row = (Row) deleteList.get(i); path.clear(); checkCascadeDelete(session, this, tUpdateList, row, false, path); } } // check transactions database.txManager.checkDelete(session, deleteList); for (int i = 0; i < tUpdateList.size(); i++) { Table table = (Table) tUpdateList.getKey(i); HashMappedList updateList = (HashMappedList) tUpdateList.get(i); database.txManager.checkDelete(session, updateList); } // perform delete fireAll(session, Trigger.DELETE_BEFORE); if (database.isReferentialIntegrity()) { for (int i = 0; i < deleteList.size(); i++) { Row row = (Row) deleteList.get(i); path.clear(); checkCascadeDelete(session, this, tUpdateList, row, true, path); } } for (int i = 0; i < deleteList.size(); i++) { Row row = (Row) deleteList.get(i); if (!row.isCascadeDeleted()) { deleteNoRefCheck(session, row); } } for (int i = 0; i < tUpdateList.size(); i++) { Table table = (Table) tUpdateList.getKey(i); HashMappedList updateList = (HashMappedList) tUpdateList.get(i); table.updateRowSet(session, updateList, null, false); updateList.clear(); } fireAll(session, Trigger.DELETE_AFTER); path.clear(); constraintPath = path; tableUpdateList = tUpdateList; return deleteList.size(); } /** * Mid level row delete method. Fires triggers but no integrity * constraint checks. */ private void deleteNoRefCheck(Session session, Row row) throws HsqlException { Object[] data = row.getData(); fireAll(session, Trigger.DELETE_BEFORE_ROW, data, null); deleteNoCheck(session, row, true); // fire the delete after statement trigger fireAll(session, Trigger.DELETE_AFTER_ROW, data, null); } /** * Low level row delete method. Removes the row from the indexes and * from the Cache. */ private void deleteNoCheck(Session session, Row row, boolean log) throws HsqlException { if (row.isCascadeDeleted()) { return; } Object[] data = row.getData(); row = row.getUpdatedRow(); for (int i = indexList.length - 1; i >= 0; i--) { Node node = row.getNode(i); indexList[i].delete(session, node); } row.delete(); if (session != null) { session.addDeleteAction(this, row); } if (log && isLogged) { database.logger.writeDeleteStatement(session, this, data); } } /** * For log statements. */ public void deleteNoCheckFromLog(Session session, Object[] data) throws HsqlException { Row row = null; if (hasPrimaryKey()) { RowIterator it = getPrimaryIndex().findFirstRow(session, data, primaryKeyColsSequence); row = it.next(); } else if (bestIndex == null) { RowIterator it = getPrimaryIndex().firstRow(session); while (true) { row = it.next(); if (row == null) { break; } if (Index.compareRows( session, row.getData(), data, defaultColumnMap, colTypes) == 0) { break; } } } else { RowIterator it = bestIndex.findFirstRow(session, data); while (true) { row = it.next(); if (row == null) { break; } Object[] rowdata = row.getData(); // reached end of range if (bestIndex.compareRowNonUnique( session, data, bestIndex.getColumns(), rowdata) != 0) { row = null; break; } if (Index.compareRows( session, rowdata, data, defaultColumnMap, colTypes) == 0) { break; } } } if (row == null) { return; } // not necessary for log deletes database.txManager.checkDelete(session, row); for (int i = indexList.length - 1; i >= 0; i--) { Node node = row.getNode(i); indexList[i].delete(session, node); } row.delete(); if (session != null) { session.addDeleteAction(this, row); } } /** * Low level row delete method. Removes the row from the indexes and * from the Cache. Used by rollback. */ void deleteNoCheckRollback(Session session, Row row, boolean log) throws HsqlException { row = indexList[0].findRow(session, row); for (int i = indexList.length - 1; i >= 0; i--) { Node node = row.getNode(i); indexList[i].delete(session, node); } row.delete(); removeRowFromStore(row); if (log && isLogged) { database.logger.writeDeleteStatement(session, this, row.getData()); } } /** * Highest level multiple row update method. Corresponds to an SQL * UPDATE. To DEAL with unique constraints we need to perform all * deletes at once before the inserts. If there is a UNIQUE constraint * violation limited only to the duration of updating multiple rows, * we don't want to abort the operation. Example: * UPDATE MYTABLE SET UNIQUECOL = UNIQUECOL + 1 * After performing each cascade update, delete the main row. * After all cascade ops and deletes have been performed, insert new * rows. * * The following clauses from SQL Standard section 11.8 are enforced * 9) Let ISS be the innermost SQL-statement being executed. * 10) If evaluation of these General Rules during the execution of ISS * would cause an update of some site to a value that is distinct from the * value to which that site was previously updated during the execution of * ISS, then an exception condition is raised: triggered data change * violation. * 11) If evaluation of these General Rules during the execution of ISS * would cause deletion of a row containing a site that is identified for * replacement in that row, then an exception condition is raised: * triggered data change violation. * * (fredt) */ int update(Session session, HashMappedList updateList, int[] cols) throws HsqlException { HashSet path = constraintPath == null ? new HashSet() : constraintPath; constraintPath = null; HashMappedList tUpdateList = tableUpdateList == null ? new HashMappedList() : tableUpdateList; tableUpdateList = null; // set identity column where null and check columns for (int i = 0; i < updateList.size(); i++) { Object[] data = (Object[]) updateList.get(i); // this means the identity column can be set to null to force // creation of a new identity value setIdentityColumn(session, data); enforceFieldValueLimits(data, cols); enforceNullConstraints(data); } // perform check/cascade operations if (database.isReferentialIntegrity()) { for (int i = 0; i < updateList.size(); i++) { Object[] data = (Object[]) updateList.get(i); Row row = (Row) updateList.getKey(i); checkCascadeUpdate(session, this, tUpdateList, row, data, cols, null, path); } } fireAll(session, Trigger.UPDATE_BEFORE); // merge any triggered change to this table with the update list HashMappedList triggeredList = (HashMappedList) tUpdateList.get(this); if (triggeredList != null) { for (int i = 0; i < triggeredList.size(); i++) { Row row = (Row) triggeredList.getKey(i); Object[] data = (Object[]) triggeredList.get(i); mergeKeepUpdate(session, updateList, cols, colTypes, row, data); } triggeredList.clear(); } // check transactions for (int i = 0; i < tUpdateList.size(); i++) { Table table = (Table) tUpdateList.getKey(i); HashMappedList updateListT = (HashMappedList) tUpdateList.get(i); database.txManager.checkDelete(session, updateListT); } database.txManager.checkDelete(session, updateList); // update lists - main list last for (int i = 0; i < tUpdateList.size(); i++) { Table table = (Table) tUpdateList.getKey(i); HashMappedList updateListT = (HashMappedList) tUpdateList.get(i); table.updateRowSet(session, updateListT, null, false); updateListT.clear(); } updateRowSet(session, updateList, cols, true); fireAll(session, Trigger.UPDATE_AFTER); path.clear(); constraintPath = path; tableUpdateList = tUpdateList; clearUpdateLists(tableUpdateList); return updateList.size(); } void updateRowSet(Session session, HashMappedList rowSet, int[] cols, boolean nodelete) throws HsqlException { for (int i = rowSet.size() - 1; i >= 0; i--) { Row row = (Row) rowSet.getKey(i); Object[] data = (Object[]) rowSet.get(i); if (row.isCascadeDeleted()) { if (nodelete) { throw Trace.error(Trace.TRIGGERED_DATA_CHANGE); } else { rowSet.remove(i); continue; } } for (int j = 0; j < constraintList.length; j++) { Constraint c = constraintList[j]; if (c.getType() == Constraint.CHECK) { c.checkCheckConstraint(session, data); continue; } } deleteNoCheck(session, row, true); } for (int i = 0; i < rowSet.size(); i++) { Row row = (Row) rowSet.getKey(i); Object[] data = (Object[]) rowSet.get(i); if (triggerLists[Trigger.UPDATE_BEFORE_ROW] != null) { fireAll(session, Trigger.UPDATE_BEFORE_ROW, row.getData(), data); checkRowDataUpdate(session, data, cols); } insertNoCheck(session, data); if (triggerLists[Trigger.UPDATE_AFTER_ROW] != null) { fireAll(session, Trigger.UPDATE_AFTER_ROW, row.getData(), data); checkRowDataUpdate(session, data, cols); } } } void checkRowDataInsert(Session session, Object[] data) throws HsqlException { enforceFieldValueLimits(data, null); enforceNullConstraints(data); if (database.isReferentialIntegrity()) { for (int i = 0, size = constraintList.length; i < size; i++) { constraintList[i].checkInsert(session, data); } } } void checkRowDataUpdate(Session session, Object[] data, int[] cols) throws HsqlException { enforceFieldValueLimits(data, cols); enforceNullConstraints(data); for (int j = 0; j < constraintList.length; j++) { Constraint c = constraintList[j]; if (c.getType() == Constraint.CHECK) { c.checkCheckConstraint(session, data); } } } /** * True if table is CACHED or TEXT * * @return */ public boolean isCached() { return isCached; } /** * Returns true if table is CACHED */ boolean isIndexCached() { return isCached; } /** * Returns the index of the Index object of the given name or -1 if not found. */ int getIndexIndex(String indexName) { Index[] indexes = indexList; for (int i = 0; i < indexes.length; i++) { if (indexName.equals(indexes[i].getName().name)) { return i; } } // no such index return -1; } /** * Returns the Index object of the given name or null if not found. */ Index getIndex(String indexName) { Index[] indexes = indexList; int i = getIndexIndex(indexName); return i == -1 ? null : indexes[i]; } /** * Return the position of the constraint within the list */ int getConstraintIndex(String constraintName) { for (int i = 0, size = constraintList.length; i < size; i++) { if (constraintList[i].getName().name.equals(constraintName)) { return i; } } return -1; } /** * return the named constriant */ Constraint getConstraint(String constraintName) { int i = getConstraintIndex(constraintName); return (i < 0) ? null : (Constraint) constraintList[i]; } /** * remove a named constraint */ void removeConstraint(String name) { int index = getConstraintIndex(name); constraintList = (Constraint[]) ArrayUtil.toAdjustedArray(constraintList, null, index, -1); } /** * Returns the Column object at the given index */ Column getColumn(int i) { return (Column) columnList.get(i); } void renameColumn(Column column, String newName, boolean isquoted) throws HsqlException { String oldname = column.columnName.name; int i = getColumnNr(oldname); columnList.setKey(i, newName); column.columnName.rename(newName, isquoted); renameColumnInCheckConstraints(oldname, newName, isquoted); } /** * Returns an array of int valuse indicating the SQL type of the columns */ public int[] getColumnTypes() { return colTypes; } /** * Returns the Index object at the given index */ public Index getIndex(int i) { return indexList[i]; } public Index[] getIndexes() { return indexList; } /** * Used by CACHED tables to fetch a Row from the Cache, resulting in the * Row being read from disk if it is not in the Cache. * * TEXT tables pass the memory resident Node parameter so that the Row * and its index Nodes can be relinked. */ CachedRow getRow(int pos, Node primarynode) throws HsqlException { if (isText) { CachedDataRow row = (CachedDataRow) rowStore.get(pos); row.nPrimaryNode = primarynode; return row; } else if (isCached) { return (CachedRow) rowStore.get(pos); } return null; } /** * As above, only for CACHED tables */ CachedRow getRow(int pos) { return (CachedRow) rowStore.get(pos); } /** * As above, only for CACHED tables */ CachedRow getRow(long id) { return (CachedRow) rowStore.get((int) id); } /** * called in autocommit mode or by transaction manager when a a delete is committed */ void removeRowFromStore(Row row) throws HsqlException { if (isCached || isText && cache != null) { rowStore.remove(row.getPos()); } } void releaseRowFromStore(Row row) throws HsqlException { if (isCached || isText && cache != null) { rowStore.release(row.getPos()); } } void commitRowToStore(Row row) { if (isText && cache != null) { rowStore.commit(row); } } void indexRow(Session session, Row row) throws HsqlException { int i = 0; try { for (; i < indexList.length; i++) { indexList[i].insert(session, row, i); } } catch (HsqlException e) { // unique index violation - rollback insert for (--i; i >= 0; i--) { Node n = row.getNode(i); indexList[i].delete(session, n); } row.delete(); removeRowFromStore(row); throw e; } } /** * */ void clearAllRows(Session session) { for (int i = 0; i < indexList.length; i++) { indexList[i].clearAll(session); } if (!isTemp) { identitySequence.reset(); rowIdSequence.reset(); } } /** @todo -- release the rows */ void drop() throws HsqlException {} boolean isWritable() { return !isDataReadOnly() && !database.databaseReadOnly && !(database.isFilesReadOnly() && (isCached || isText)); } /** * Returns the catalog name or null, depending on a database property. */ String getCatalogName() { // PRE: database is never null return database.getProperties().isPropertyTrue("hsqldb.catalogs") ? database.getURI() : null; } /** * Returns the schema name. */ public String getSchemaName() { return tableName.schema.name; } public int getRowCount(Session session) throws HsqlException { return getPrimaryIndex().size(session); } /** * Necessary when over Integer.MAX_VALUE Row objects have been generated * for a memory table. */ public void resetRowId(Session session) throws HsqlException { if (isCached) { return; } rowIdSequence = new NumberSequence(null, 0, 1, Types.BIGINT); RowIterator it = getPrimaryIndex().firstRow(session);; while (it.hasNext()) { Row row = it.next(); int pos = (int) rowIdSequence.getValue(); row.setPos(pos); } } /** * Factory method instantiates a Row based on table type. */ Row newRow(Object[] o) throws HsqlException { Row row; try { if (isMemory) { row = new Row(this, o); int pos = (int) rowIdSequence.getValue(); row.setPos(pos); } else { row = CachedRow.newCachedRow(this, o); rowStore.add(row); } } catch (IOException e) { throw new HsqlException( e, Trace.getMessage(Trace.GENERAL_IO_ERROR), Trace.GENERAL_IO_ERROR); } return row; } Row restoreRow(Row oldrow) throws HsqlException { Row row; try { if (isMemory) { row = new Row(this, oldrow.oData); row.setPos(oldrow.getPos()); } else { row = CachedRow.newCachedRow(this, oldrow.oData); row.setStorageSize(oldrow.getStorageSize()); row.setPos(oldrow.getPos()); rowStore.restore(row); } } catch (IOException e) { throw new HsqlException( e, Trace.getMessage(Trace.GENERAL_IO_ERROR), Trace.GENERAL_IO_ERROR); } return row; } public class RowStore implements PersistentStore { public CachedObject get(int i) { try { return cache.get(i, this, false); } catch (HsqlException e) { return null; } } public CachedObject getKeep(int i) { try { return cache.get(i, this, true); } catch (HsqlException e) { return null; } } public int getStorageSize(int i) { try { return cache.get(i, this, false).getStorageSize(); } catch (HsqlException e) { return 0; } } public void add(CachedObject row) throws IOException { cache.add(row); } public void restore(CachedObject row) throws IOException { cache.restore(row); } public CachedObject get(RowInputInterface in) { try { if (Table.this.isText) { return new CachedDataRow(Table.this, in); } CachedObject row = new CachedRow(Table.this, in); return row; } catch (HsqlException e) { return null; } catch (IOException e) { return null; } } public CachedObject getNewInstance(int size) { return null; } public void remove(int i) { try { cache.remove(i, this); } catch (IOException e) {} } public void removePersistence(int i) { try { cache.removePersistence(i, this); } catch (IOException e) { // } } public void release(int i) { cache.release(i); } public void commit(CachedObject row) { try { if (Table.this.isText) { cache.saveRow(row); } } catch (IOException e) { // } } } } hsqldb-1.8.0.10.orig/src/org/hsqldb/CachedDataRow.java0000644000175000017500000001236210456235246020761 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb; import java.io.IOException; import org.hsqldb.rowio.RowInputInterface; import org.hsqldb.rowio.RowOutputInterface; // fredt@users 20021205 - path 1.7.2 - enhancements // fredt@users 20021215 - doc 1.7.2 - javadoc comments /** * Implementation of rows for tables with memory resident indexes and * disk-based data, such as TEXT tables. * * @version 1.7.2 */ class CachedDataRow extends CachedRow { /** * Constructor for new rows. */ CachedDataRow(Table t, Object[] o) throws HsqlException { super(t, o); hasDataChanged = true; } /** * Constructor when read from the disk into the Cache. The link with * the Nodes is made separetly. */ CachedDataRow(Table t, RowInputInterface in) throws IOException, HsqlException { tTable = t; iPos = in.getPos(); storageSize = in.getSize(); oData = in.readData(tTable.getColumnTypes()); hasDataChanged = false; } /** * As the indexes are in-memory, this passes the existing primary node * for the construction of the new Row */ Row getUpdatedRow() throws HsqlException { return tTable.getRow(iPos, nPrimaryNode); } /** * Used when data is read from the disk into the Cache the first time. * New Nodes are created which are then indexed. */ void setNewNodes() { int index = tTable.getIndexCount(); nPrimaryNode = Node.newNode(this, 0, tTable); Node n = nPrimaryNode; for (int i = 1; i < index; i++) { n.nNext = Node.newNode(this, i, tTable); n = n.nNext; } } /** * Used when data is re-read from the disk into the Cache. The Row is * already indexed so it is linked with the Node in the primary index. * the Nodes is made separetly. */ void setPrimaryNode(Node primary) { nPrimaryNode = primary; } /** * returned size does not include the row size written at the beginning */ public int getRealSize(RowOutputInterface out) { return out.getSize(this); } /** * Writes the data to disk. Unlike CachedRow, hasChanged is never set * to true when changes are made to the Nodes. (Nodes are in-memory). * The only time this is used is when a new Row is added to the Caches. */ public void write(RowOutputInterface out) { out.writeSize(storageSize); out.writeData(oData, tTable); out.writeEnd(); hasDataChanged = false; } public boolean hasChanged() { return hasDataChanged; } /** * Sets the file position for the row and registers the row with * the table. * * @param pos position in data file */ public void setPos(int pos) { iPos = pos; Node n = nPrimaryNode; while (n != null) { ((PointerNode) n).iData = iPos; n = n.nNext; } } /** * With the current implementation of TEXT table updates and inserts, * the lifetime scope of this method extends until redefinition of table * data source or shutdown. * * @param obj the reference object with which to compare. * @return true if this object is the same as the obj argument; * false otherwise. */ public boolean equals(Object obj) { if (obj == this) { return true; } if (obj instanceof CachedDataRow) { return ((CachedDataRow) obj).iPos == iPos && ((CachedDataRow) obj).tTable == tTable; } return false; } } hsqldb-1.8.0.10.orig/src/org/hsqldb/persist/0000755000175000017500000000000010462225160017141 5ustar renerenehsqldb-1.8.0.10.orig/src/org/hsqldb/persist/Cache.java0000644000175000017500000002030610504365441021014 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.persist; import java.io.IOException; import org.hsqldb.Trace; import org.hsqldb.lib.Iterator; import org.hsqldb.lib.ObjectComparator; import org.hsqldb.lib.Sort; import org.hsqldb.lib.StopWatch; import org.hsqldb.store.ObjectCacheHashMap; /** * New implementation of row caching for CACHED tables.

    * * Manages memory for the cache map and its contents based on least recently * used clearup.

    * Also provides services for selecting rows to be saved and passing them * to DataFileCache.

    * * @author fredt@users * @version 1.8.0 */ public class Cache { final DataFileCache dataFileCache; private int capacity; // number of Rows private long bytesCapacity; // number of bytes private final CachedObjectComparator rowComparator; // private CachedObject[] rowTable; // private final ObjectCacheHashMap cacheMap; long cacheBytesLength; // for testing StopWatch saveAllTimer = new StopWatch(false); StopWatch makeRowTimer = new StopWatch(false); StopWatch sortTimer = new StopWatch(false); int makeRowCount = 0; int saveRowCount = 0; Cache(DataFileCache dfc) { dataFileCache = dfc; capacity = dfc.capacity(); bytesCapacity = dfc.bytesCapacity(); rowComparator = new CachedObjectComparator(); rowTable = new CachedObject[capacity]; cacheMap = new ObjectCacheHashMap(capacity); cacheBytesLength = 0; } /** * Structural initialisations take place here. This allows the Cache to * be resized while the database is in operation. */ void init(int capacity, long bytesCapacity) {} int size() { return cacheMap.size(); } long getTotalCachedBlockSize() { return cacheBytesLength; } /** * Returns a row if in memory cache. */ synchronized CachedObject get(int pos) { return (CachedObject) cacheMap.get(pos); } /** * Adds a row to the cache. */ synchronized void put(int key, CachedObject row) throws IOException { int storageSize = row.getStorageSize(); if (cacheMap.size() >= capacity || storageSize + cacheBytesLength > bytesCapacity) { cleanUp(); } cacheMap.put(key, row); cacheBytesLength += storageSize; } /** * Removes an object from memory cache. Does not release the file storage. */ synchronized CachedObject release(int i) { CachedObject r = (CachedObject) cacheMap.remove(i); if (r == null) { return null; } cacheBytesLength -= r.getStorageSize(); return r; } /** * Reduces the number of rows held in this Cache object.

    * * Cleanup is done by checking the accessCount of the Rows and removing * the rows with the lowest access count. * * Index operations require that up to 5 recently accessed rows remain * in the cache. * */ private synchronized void cleanUp() throws IOException { int removeCount = cacheMap.size() / 2; int accessTarget = cacheMap.getAccessCountCeiling(removeCount, removeCount / 8); ObjectCacheHashMap.ObjectCacheIterator it = cacheMap.iterator(); int savecount = 0; for (; it.hasNext(); ) { CachedObject r = (CachedObject) it.next(); if (it.getAccessCount() <= accessTarget) { if (!r.isKeepInMemory()) { if (r.hasChanged()) { rowTable[savecount++] = r; } it.remove(); cacheBytesLength -= r.getStorageSize(); } } } cacheMap.setAccessCountFloor(accessTarget); saveRows(savecount); } private synchronized void saveRows(int count) throws IOException { if (count == 0) { return; } rowComparator.setType(rowComparator.COMPARE_POSITION); sortTimer.start(); Sort.sort(rowTable, rowComparator, 0, count - 1); sortTimer.stop(); saveAllTimer.start(); dataFileCache.saveRows(rowTable, 0, count); saveRowCount += count; /* // not necessary if the full storage size of each object is written out try { dataFile.file.seek(fileFreePosition); } catch (IOException e){} */ saveAllTimer.stop(); } /** * Writes out all modified cached Rows. */ synchronized void saveAll() throws IOException { Iterator it = cacheMap.iterator(); int savecount = 0; for (; it.hasNext(); ) { CachedObject r = (CachedObject) it.next(); if (r.hasChanged()) { rowTable[savecount++] = r; } } saveRows(savecount); Trace.printSystemOut( saveAllTimer.elapsedTimeToMessage( "Cache.saveRow() total row save time")); Trace.printSystemOut("Cache.saveRow() total row save count = " + saveRowCount); Trace.printSystemOut( makeRowTimer.elapsedTimeToMessage( "Cache.makeRow() total row load time")); Trace.printSystemOut("Cache.makeRow() total row load count = " + makeRowCount); Trace.printSystemOut( sortTimer.elapsedTimeToMessage("Cache.sort() total time")); } /** * clears out the memory cache */ synchronized void clear() { cacheMap.clear(); cacheBytesLength = 0; } static class CachedObjectComparator implements ObjectComparator { static final int COMPARE_LAST_ACCESS = 0; static final int COMPARE_POSITION = 1; static final int COMPARE_SIZE = 2; private int compareType; CachedObjectComparator() {} void setType(int type) { compareType = type; } public int compare(Object a, Object b) { switch (compareType) { case COMPARE_POSITION : return ((CachedObject) a).getPos() - ((CachedObject) b).getPos(); case COMPARE_SIZE : return ((CachedObject) a).getStorageSize() - ((CachedObject) b).getStorageSize(); default : return 0; } } } } hsqldb-1.8.0.10.orig/src/org/hsqldb/persist/CachedObject.java0000644000175000017500000000434410416742475022323 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.persist; import org.hsqldb.lib.IntLookup; import org.hsqldb.rowio.RowOutputInterface; /** * Interface for an object stored in the memory cache. * * @author fredt@users * @version 1.8.0 * @since 1.8.0 */ public interface CachedObject { int getRealSize(RowOutputInterface out); void setStorageSize(int size); int getStorageSize(); int getPos(); void setPos(int pos); boolean hasChanged(); boolean isKeepInMemory(); void keepInMemory(boolean keep); boolean isInMemory(); void setInMemory(boolean in); void write(RowOutputInterface out); void write(RowOutputInterface out, IntLookup lookup); } hsqldb-1.8.0.10.orig/src/org/hsqldb/persist/NIOLockFile.java0000644000175000017500000004756610454247742022077 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.persist; import java.io.RandomAccessFile; import java.nio.channels.FileLock; /** * LockFile variant that capitalizes upon the availability of * {@link java.nio.channels.FileLock FileLock}.

    * * Configuration:

    * * To enable POSIX mandatory file lock tagging, set the system property * {@link #POSIX_MANDITORY_FILELOCK_PROPERTY} true.

    * *


    * * Windowstm File Locking Notes:

    * * There are two major differences between Unix and Windows locking.

    * * First, Windowstm supports a share reservation programming * interface. Share reservations apply to the entire file and are specified at * the time a file is created or opened. A share reservation consists of a pair * of modes. The first is the access mode, which is how the application will * access the file: read, write, or read/write. The second is the access * that the application will deny to other applications: none, read, write, * or read/write. When the application attempts to open a file, the operating * system checks to see if there are any other open requests on the file. If so, * it first compares the application's access mode with the deny mode of the * other openers. If there is a match, then the open is denied. If not, then * the operating system compares the application's deny mode with the access * mode of the other openers. Again, if there is a match, the open is denied.

    * * Second, there is no advisory locking under Windows. Whole file * locking, byte range locking, and share reservation locking are all * mandatory.

    * * As a side note, research indicates that very few Windows programs * actually rely on byte range mandatory locking.

    * * POSIX File Locking Notes:

    * * There are three commonly found locking functions under POSIX - flock, lockf, * and fcntl.

    * * These functions, while managed by the kernel, are advisory locking mechanisms * by default. That is, the kernel does not actually stop programs from reading, * writing or deleting locked files. Instead, each program must check to see if * a lock is in place and act accordingly (be cooperative).

    * * This might be problematic when some programs are cooperative and others are * not, especially if you do not have the ability to recompile the uncooperative * code, yet it must be allowed to run.

    * * As POSIX has evolved, provisions have been made to allow locks to be enforced * at the kernel level with mandatory locking semantics. For historical reasons * [1] and for practical reasons * [2], POSIX mandatory locking is generally * implemented such that it must be configured on a file-by-file basis. When a * program attempts to lock a file with lockf or fcntl, the kernel will prevent * other programs from accessing the file if and only if the file has mandatory * locking set (note: processes which use flock never trigger a mandatory * lock).

    * * In addition, to enable mandatory locking under Linux, the target filesystem * device must be mounted with the mand option, for example:

    * *

     * # mount -omand /dev/hdb3 /mnt/data
     *
     * # mount | grep /mnt/data
     * /dev/hdb3 on /mnt/data type ext3 (rw,mand)
     *
    * * To automate this across reboots, mand must be added to the * appropriate /etc/fstab entry.

    * * Although Linux, Solaris and HP/UX are known to support kernel-enforced * mandatory locking semantics, some POSIX systems may provide no support at all, * while others may have system-specific configuration prerequisites. Some may * even enforce manditory locking semantics by default under certain conditions * while others may silently ignore mandatory locking directives or consistently * raise exception conditions in response to such directives.

    * * Regardless of any wider scoped prerequisites, restrictions and behavioural * variations, it is generally true under POSIX that only specifically tagged * files will exhibit mandatory locks.

    * * And it is generally accepted that the way to designate a file to be governed * by mandatory locking semantics is to set its sgid (setgroupid) bit and unset * its group execute bit. This has become the commonly accepted practice * specifically because the combination is devoid of meaning in the regular * sense.

    * * As a specific illustration, if mandatory locking is required on all * pre-existing files in a certain directory, then the corresponding * chmod invocation would be:

    * *

     * $ chmod g+s,g-x /path/to/directory/*
     * 
    * *
    * * [1] * The earliest versions of Unix had no way to lock files except to create * lock files. The idea is that two or more processes would more or less * simultaneously try to create a lock file in exclusive mode, via the * O_EXCL flag of the open( ) system call. The operating system would * return success to the process that won the race, and a "file exists" * error to losing processes. One problem with this scheme is that it * relies on the winning process to remove the lock file before it exits. * If the process is running buggy software, this might not happen. * Some applications mitigate this problem by recording the process ID of * the winner into the contents of the lock file. A process that finds that * it gets a "file exists" error can then read the lock file to see if the * owning process is still running.

    * * Still, lock files can be clumsy. In the 1980s, Unix versions were * released with file locking support built into the operating system. * The System V branch of Unix offered file locking via the fcntl( ) system * call, whereas the BSD branch provided the flock( ) system call. In both * cases, when the process that creates the lock dies, the lock will be * automatically released.

    * * In a perfect world all processes would use and honour a cooperative, or * "advisory" locking scheme. However, the world isn't perfect, and there's * a lot of poorly written code out there.

    * * In trying to address this problem, the designers of System V UNIX came up * with a "mandatory" locking scheme, whereby the operating system kernel * would block attempts by a process to write to a file upon which another * process holds a "read" -or- "shared" lock, and block attempts both to * read and to write a file upon which a process holds a "write " -or- * "exclusive" lock.

    * * The System V mandatory locking scheme was intended to have as little * impact as possible on existing user code. The scheme is based on marking * individual files as candidates for mandatory locking, and using the * existing fcntl()/lockf() interface for applying locks, just as if they * were normal, advisory locks.

    * * [2] * Even with mandatory locks, conflicts can occur. If program A reads in a * file, program B locks, edits, and unlocks the file, and program A then * writes out what it originally read, this may still be less than * desirable.

    * * As well, it is generally true that nothing can override a mandatory * lock, not even root-owned processes. In this situation, the best root * can do is kill the process that has the lock upon the file.

    * * And this can be especially problematic if a file upon which a mandatory * lock exists is also available via NFS or some other remotely-accessible * filesystem, specifically because the entire fileserver process may be * forced to block until the lock is released.

    * * Indeed, these effects of mandatory locking policy are commonly encountered in * the Windowstm environment, where all locks are of the * mandatory style.

    * *


    * * Research Results:

    * * After some experimentation under JDK 1.5/6 and Linux (at least Fedora * Core 4), research results indicate that, after mounting the target file * system device using the described mand option and doing a * chmod g+s,g-x on the lock file before issuing a * FileChannel.tryLock(...), it is still possible to delete the lock * file from another process while the resulting FileLock is held, * although mandatory locking does appear to be in effect for read/write * operations.

    * * This result was actually the one anticipated, because deletion of open files * is generally possible under POSIX. In turn, this is because POSIX file * deletion simply removes the iNode entry from the file's parent directory, * while any processes with open file handles continue to have access to the * deleted file. Only when all file handles have been released does the space * occupied by the file become elligible for reuse.

    * * In other words, under both Windowstm and Linux (at lease * FC 4), it appears this class is a practically useless extension to the base. * Under Java for Windows, the act of holding a file handle open is * enough to produce a mandatory lock on the underlying file and also prevents * the file's deletion (i.e. the ultimately desired behavior occurs with or * without NIOLockFile), while under Java for Linux it appears * impossible to use NIO to produce a lock that prevents file deletion, yeilding * protection against inadvertent modification of the lock file practically * useless.

    * * To put it another way, even after the much-heralded introduction of Java * NIO, without further resorting to platform-specific JNI alternatives, we * might as well still be back in the early 80's, because we cannot guarantee, * in a cross-platform manner, conditions better than offered by the earliest * known lock file approach, even on systems that do support mandatory file * locking semantics. Instead, we must simply still trust that all software is * well written and cooperative in nature.

    * * @author boucherb@users * @version 1.8.0.3 * @since 1.7.2 */ final class NIOLockFile extends LockFile { /** The largest lock region that can be specified with java.nio. */ public static final long MAX_LOCK_REGION = Long.MAX_VALUE; /** * Generally, the largest lock region that can be specified for files on * network file systems.

    * * From the java.nio.channels.FileLock API JavaDocs:

    * * Some network filesystems do not implement file locks on regions * that extend past a certain position, often 2**30 or 2**31. * In general, great care should be taken when locking files that * reside on network filesystems. */ public static final long MAX_NFS_LOCK_REGION = (1L << 30); /** * The smallest lock region that still protects the area actually used to * record lock information. */ public static final long MIN_LOCK_REGION = LockFile.USED_REGION; /** * Whether POSIX mandatory file lock tagging is performed by default.

    * * Under the default build, this is false, but custom * distributions are free to rebuild with a default true * value.

    * * For Windows targets, distributions should build with this set * false. */ public static final boolean POSIX_MANDITORY_FILELOCK_DEFAULT = false; /** * System property that can be used to control whether POSIX mandatory * file lock tagging is performed. */ public static final String POSIX_MANDITORY_FILELOCK_PROPERTY = "hsqldb.lockfile.posix.manditory.filelock"; /** * Represents an OS-enforced lock region upon this object's lock file. */ private volatile FileLock fileLock; /** * Retrieves whether POSIX mandatory file lock tagging is performed.

    * * The value is obtained in the following manner:

    * *

      *
    1. manditory is assigned POSIX_MANDITORY_FILELOCK_DEFAULT *
    2. manditory is assigned "true".equalsIgnoreCase( * System.getProperty(POSIX_MANDITORY_FILELOCK_PROPERTY, * manditory ? "true" : "false")); * , inside a try-catch block, to silently ignore any security * exception. *
    * @return true if POSIX mandatory file lock tagging is performed */ public boolean isPosixManditoryFileLock() { boolean manditory = POSIX_MANDITORY_FILELOCK_DEFAULT; try { manditory = "true".equalsIgnoreCase( System.getProperty( POSIX_MANDITORY_FILELOCK_PROPERTY, manditory ? "true" : "false")); } catch (Exception e) {} return manditory; } /** * Does work toward ensuring that a {@link #fileLock FileLock} exists upon * this object's lock file.

    * * POST:

    * * Upon exit, if a valid fileLock could not be aquired for any * reason, then a best effort has also been expended toward releasing and * nullifying any resources obtained in the process. * * @return true if there is valid FileLock on exit, else false. */ protected boolean doOptionalLockActions() { // override return this.aquireFileLock(); } /** * Peforms best effort work toward releasing this object's * {@link #fileLock FileLock}, nullifying it in the process. * * @return true if fileLock is released successfully, else false */ protected boolean doOptionalReleaseActions() { // override return this.releaseFileLock(); } /** * Retrieves whether this object's {@link #fileLock FileLock} * represents a valid lock region upon this object's lock file. * * @return true if this object's {@link #fileLock FileLock} attribute is * valid, else false * @throws SecurityException if a required system property value cannot * be accessed, or if a security manager exists and its {@link * java.lang.SecurityManager#checkRead} method denies * read access to the lock file; */ public boolean isValid() { // override try { return super.isValid() && (this.fileLock != null && this.fileLock.isValid()); } catch (Exception e) { return false; } } /** * Retrieves the String value: "fileLock = " + {@link #fileLock FileLock}.

    * * @return the String value: "fileLock = " + fileLock */ protected String toStringImpl() { // override return "fileLock = " + this.fileLock; } // ------------------------- Internal Implementation------------------------ // does the real work of aquiring the FileLock private boolean aquireFileLock() { // PRE: // // raf is never null and is never closed upon entry. // // Rhetorical question to self: How does one tell if a RandomAccessFile // is closed, short of invoking an operation and getting an IOException // the says its closed (assuming you can control the Locale of the error // message)? // final RandomAccessFile lraf = super.raf; // In an ideal world, we would use a lock region back off approach, // starting with region MAX_LOCK_REGION, then MAX_NFS_LOCK_REGION, // then MIN_LOCK_REGION. // // In practice, however, it is just generally unwise to mount network // file system database instances. Be warned. // // In general, it is probably also unwise to mount removable media // database instances that are not read-only. boolean success = false; try { if (this.fileLock != null) { // API says never throws exception, but I suspect // it's quite possible some research / FOSS JVMs might // still throw unsupported operation exceptions on certain // NIO classes...better to be safe than sorry. if (this.fileLock.isValid()) { return true; } else { // It's not valid, so releasing it is a no-op. // // However, we should still clean up the referenceand hope // no previous complications exist (a hung FileLock in a // flaky JVM) or that gc kicks in and saves the day... // (unlikely, though). this.releaseFileLock(); } } if (isPosixManditoryFileLock()) { try { Runtime.getRuntime().exec(new String[] { "chmod", "g+s,g-x", file.getPath() }); } catch (Exception ex) { //ex.printStackTrace(); } } // Note: from FileChannel.tryLock(...) JavaDoc: // // @return A lock object representing the newly-acquired lock, // or null if the lock could not be acquired // because another program holds an overlapping lock this.fileLock = lraf.getChannel().tryLock(0, MIN_LOCK_REGION, false); // According to the API, if it's non-null, it must be valid. // This may not actually yet be the full truth of the matter under // all commonly available JVM implementations. // fileLock.isValid() API says it never throws, though, so // with fingers crossed... success = (this.fileLock != null && this.fileLock.isValid()); } catch (Exception e) {} if (!success) { this.releaseFileLock(); } return success; } // does the real work of releasing the FileLock private boolean releaseFileLock() { // Note: Closing the super class RandomAccessFile has the // side-effect of closing the file lock's FileChannel, // so we do not deal with this here. boolean success = false; if (this.fileLock == null) { success = true; } else { try { this.fileLock.release(); success = true; } catch (Exception e) {} finally { this.fileLock = null; } } return success; } } hsqldb-1.8.0.10.orig/src/org/hsqldb/persist/Logger.java0000644000175000017500000003261010767507347021247 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.persist; import org.hsqldb.Database; import org.hsqldb.HsqlException; import org.hsqldb.NumberSequence; import org.hsqldb.Session; import org.hsqldb.Table; import org.hsqldb.Trace; import org.hsqldb.lib.SimpleLog; // boucherb@users 20030510 - patch 1.7.2 - added cooperative file locking /** * The public interface of logging and cache classes.

    * * Implements a storage manager wrapper that provides a consistent, * always available interface to storage management for the Database * class, despite the fact not all Database objects actually use file * storage.

    * * The Logger class makes it possible to avoid testing for a * null Log Database attribute again and again, in many different places, * and generally avoids tight coupling between Database and Log, opening * the doors for multiple logs/caches in the future. In this way, the * Database class does not need to know the details of the Logging/Cache * implementation, lowering its breakability factor and promoting * long-term code flexibility. * * @author fredt@users * @version 1.8.0 * @since 1.7.0 */ public class Logger { public SimpleLog appLog; /** * The Log object this Logger object wraps */ private Log log; /** * The LockFile object this Logger uses to cooperatively lock * the database files */ private LockFile lockFile; boolean needsCheckpoint; private boolean logStatements; private boolean syncFile = false; public Logger() { appLog = new SimpleLog(null, SimpleLog.LOG_NONE, false); } /** * Opens the specified Database object's database files and starts up * the logging process.

    * * If the specified Database object is a new database, its database * files are first created. * * @param db the Database * @throws HsqlException if there is a problem, such as the case when * the specified files are in use by another process */ public void openLog(Database db) throws HsqlException { needsCheckpoint = false; String path = db.getPath(); int loglevel = db.getProperties().getIntegerProperty( HsqlDatabaseProperties.hsqldb_applog, 0); if (loglevel != SimpleLog.LOG_NONE) { appLog = new SimpleLog(path + ".app.log", loglevel, !db.isFilesReadOnly()); } appLog.sendLine(SimpleLog.LOG_ERROR, "Database (re)opened"); logStatements = false; boolean useLock = db.getProperties().isPropertyTrue( HsqlDatabaseProperties.hsqldb_lock_file); if (useLock && !db.isFilesReadOnly()) { acquireLock(path); } log = new Log(db); log.open(); logStatements = !db.isFilesReadOnly(); } // fredt@users 20020130 - patch 495484 by boucherb@users /** * Shuts down the logging process using the specified mode.

    * * @param closemode The mode in which to shut down the logging * process *

      *
    1. closemode -1 performs SHUTDOWN IMMEDIATELY, equivalent * to a poweroff or crash. *
    2. closemode 0 performs a normal SHUTDOWN that * checkpoints the database normally. *
    3. closemode 1 performs a shutdown compact that scripts * out the contents of any CACHED tables to the log then * deletes the existing *.data file that contains the data * for all CACHED table before the normal checkpoint process * which in turn creates a new, compact *.data file. *
    4. closemode 2 performs a SHUTDOWN SCRIPT. *
    * * @return true if closed with no problems or false if a problem was * encountered. */ public boolean closeLog(int closemode) { if (log == null) { appLog.sendLine(SimpleLog.LOG_ERROR, "Database closed"); appLog.close(); return true; } try { switch (closemode) { case Database.CLOSEMODE_IMMEDIATELY : log.shutdown(); break; case Database.CLOSEMODE_NORMAL : log.close(false); break; case Database.CLOSEMODE_COMPACT : case Database.CLOSEMODE_SCRIPT : log.close(true); break; } } catch (Throwable e) { appLog.logContext(e, "error closing log"); appLog.close(); log = null; return false; } appLog.sendLine(SimpleLog.LOG_ERROR, "Database closed"); appLog.close(); log = null; return true; } /** * Determines if the logging process actually does anything.

    * * In-memory Database objects do not need to log anything. This * method is essentially equivalent to testing whether this logger's * database is an in-memory mode database. * * @return true if this object encapsulates a non-null Log instance, * else false */ public boolean hasLog() { return log != null; } /** * Returns the Cache object or null if one doesn't exist. */ public DataFileCache getCache() throws HsqlException { if (log == null) { return null; } else { return log.getCache(); } } /** * Returns the Cache object or null if one doesn't exist. */ public boolean hasCache() { if (log == null) { return false; } else { return log.hasCache(); } } /** * Records a Log entry representing a new connection action on the * specified Session object. * * @param session the Session object for which to record the log * entry * @throws HsqlException if there is a problem recording the Log * entry */ public synchronized void logConnectUser(Session session) throws HsqlException { if (logStatements) { writeToLog(session, session.getUser().getConnectStatement()); } } /** * Records a Log entry for the specified SQL statement, on behalf of * the specified Session object. * * @param session the Session object for which to record the Log * entry * @param statement the SQL statement to Log * @throws HsqlException if there is a problem recording the entry */ public synchronized void writeToLog(Session session, String statement) throws HsqlException { if (logStatements && log != null) { log.writeStatement(session, statement); } } public synchronized void writeInsertStatement(Session session, Table table, Object[] row) throws HsqlException { if (logStatements) { log.writeInsertStatement(session, table, row); } } public synchronized void writeDeleteStatement(Session session, Table t, Object[] row) throws HsqlException { if (logStatements) { log.writeDeleteStatement(session, t, row); } } public synchronized void writeSequenceStatement(Session session, NumberSequence s) throws HsqlException { if (logStatements) { log.writeSequenceStatement(session, s); } } public synchronized void writeCommitStatement(Session session) throws HsqlException { if (logStatements) { log.writeCommitStatement(session); synchLog(); } } /** * Called after commits or after each statement when autocommit is on */ public synchronized void synchLog() { if (logStatements && syncFile) { log.synchLog(); } } public synchronized void synchLogForce() { if (logStatements) { log.synchLog(); } } /** * Checkpoints the database.

    * * The most important effect of calling this method is to cause the * log file to be rewritten in the most efficient form to * reflect the current state of the database, i.e. only the DDL and * insert DML required to recreate the database in its present state. * Other house-keeping duties are performed w.r.t. other database * files, in order to ensure as much as possible the ACID properites * of the database. * * @throws HsqlException if there is a problem checkpointing the * database */ public synchronized void checkpoint(boolean mode) throws HsqlException { if (logStatements) { appLog.logContext(appLog.LOG_NORMAL, "start"); needsCheckpoint = false; log.checkpoint(mode); appLog.logContext(appLog.LOG_NORMAL, "end"); } } /** * Sets the maximum size to which the log file can grow * before being automatically checkpointed. * * @param megas size in MB */ public synchronized void setLogSize(int megas) { if (log != null) { log.setLogSize(megas); } } /** * Sets the type of script file, currently 0 for text (default) * 1 for binary and 3 for compressed * * @param i The type */ public synchronized void setScriptType(int i) throws HsqlException { if (log != null) { log.setScriptType(i); } } /** * Sets the log write delay mode to number of seconds. By default * executed commands written to the log are committed fully at most * 60 second after they are executed. This improves performance for * applications that execute a large number * of short running statements in a short period of time, but risks * failing to log some possibly large number of statements in the * event of a crash. A small value improves recovery. * A value of 0 will severly slow down logging when autocommit is on, * or many short transactions are committed. * * @param delay in seconds */ public synchronized void setWriteDelay(int delay) { if (log != null) { syncFile = (delay == 0); log.setWriteDelay(delay); } } public int getWriteDelay() { return log != null ? log.getWriteDelay() : 0; } public int getLogSize() { return log != null ? log.getLogSize() : 0; } public int getScriptType() { return log != null ? log.getScriptType() : 0; } /** * Opens the TextCache object. */ public DataFileCache openTextCache(Table table, String source, boolean readOnlyData, boolean reversed) throws HsqlException { return log.openTextCache(table, source, readOnlyData, reversed); } /** * Closes the TextCache object. */ public void closeTextCache(Table table) throws HsqlException { log.closeTextCache(table); } public boolean needsCheckpoint() { return needsCheckpoint; } /** * Attempts to aquire a cooperative lock condition on the database files */ public void acquireLock(String path) throws HsqlException { if (lockFile != null) { return; } //#ifdef JAVA2FULL lockFile = LockFile.newLockFileLock(path); //#endif } public void releaseLock() { try { if (lockFile != null) { lockFile.tryRelease(); } } catch (Exception e) { if (Trace.TRACE) { Trace.printSystemOut(e.toString()); } } lockFile = null; } } hsqldb-1.8.0.10.orig/src/org/hsqldb/persist/ScaledRAFileNIO.java0000644000175000017500000002373410504365071022604 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.persist; import java.io.IOException; import java.io.RandomAccessFile; import java.nio.MappedByteBuffer; import java.nio.channels.FileChannel; import org.hsqldb.Database; import org.hsqldb.Trace; import org.hsqldb.lib.SimpleLog; /** * New NIO version of ScaledRAFile. This class is used only for storing a CACHED * TABLE .data file and cannot be used for TEXT TABLE source files. * * Due to various issues with java.nio classes, this class will use a mapped * channel of fixed size. After reaching this size, the file and channel are * closed. * * @author fredt@users * @version 1.8.0.5 * @since 1.8.0.5 */ class ScaledRAFileNIO implements ScaledRAInterface { private final boolean readOnly; private final long bufferLength; private RandomAccessFile file; private MappedByteBuffer buffer; private FileChannel channel; private boolean bufferModified; private SimpleLog appLog; private final static String JVM_ERROR = "JVM threw unsupported Exception"; ScaledRAFileNIO(Database database, String name, boolean readOnly, int bufferLength) throws Throwable { long fileLength; if (bufferLength < 1 << 18) { bufferLength = 1 << 18; } try { file = new RandomAccessFile(name, readOnly ? "r" : "rw"); } catch (Throwable e) { throw e; } try { fileLength = file.length(); } catch (Throwable e) { file.close(); throw e; } if (fileLength > ScaledRAFile.MAX_NIO_LENGTH) { file.close(); throw new IOException("length exceeds nio limit"); } if (bufferLength < fileLength) { bufferLength = (int) fileLength; } bufferLength = newNIOBufferSize(bufferLength); if (readOnly) { bufferLength = (int) fileLength; } if (fileLength < bufferLength) { try { file.seek(bufferLength - 1); file.writeByte(0); file.getFD().sync(); file.close(); file = new RandomAccessFile(name, readOnly ? "r" : "rw"); } catch (Throwable e) { file.close(); throw e; } } this.appLog = database.logger.appLog; this.readOnly = readOnly; this.bufferLength = bufferLength; this.channel = file.getChannel(); try { buffer = channel.map(readOnly ? FileChannel.MapMode.READ_ONLY : FileChannel.MapMode.READ_WRITE, 0, bufferLength); Trace.printSystemOut("NIO file instance created. mode: " + readOnly); if (!readOnly) { long tempSize = bufferLength - fileLength; if (tempSize > 1 << 18) { tempSize = 1 << 18; } byte[] temp = new byte[(int) tempSize]; try { long pos = fileLength; for (; pos < bufferLength - tempSize; pos += tempSize) { buffer.position((int) pos); buffer.put(temp, 0, temp.length); } buffer.position((int) pos); buffer.put(temp, 0, (int) (bufferLength - pos)); buffer.force(); } catch (Throwable t) { appLog.logContext(t, JVM_ERROR + " " + "length: " + bufferLength); } buffer.position(0); } } catch (Throwable e) { Trace.printSystemOut("NIO constructor failed: " + bufferLength); buffer = null; channel = null; file.close(); System.gc(); throw e; } } public long length() throws IOException { try { return file.length(); } catch (IOException e) { appLog.logContext(e, "nio"); throw e; } catch (Throwable e) { appLog.logContext(e, JVM_ERROR); throw new IOException(e.toString()); } } public void seek(long newPos) throws IOException { try { buffer.position((int) newPos); } catch (IllegalArgumentException e) { appLog.logContext(e, "nio"); throw new IOException(e.toString()); } catch (Throwable e) { appLog.logContext(e, JVM_ERROR); throw new IOException(e.toString()); } } public long getFilePointer() throws IOException { try { return buffer.position(); } catch (Throwable e) { appLog.logContext(e, JVM_ERROR); throw new IOException(e.toString()); } } public int read() throws IOException { try { return buffer.get(); } catch (Throwable e) { appLog.logContext(e, JVM_ERROR); throw new IOException(e.toString()); } } public void read(byte[] b, int offset, int length) throws IOException { try { buffer.get(b, offset, length); } catch (Throwable e) { appLog.logContext(e, JVM_ERROR); throw new IOException(e.toString()); } } public int readInt() throws IOException { try { return buffer.getInt(); } catch (Throwable e) { appLog.logContext(e, JVM_ERROR); throw new IOException(e.toString()); } } public long readLong() throws IOException { try { return buffer.getLong(); } catch (Throwable e) { appLog.logContext(e, JVM_ERROR); throw new IOException(e.toString()); } } public void write(byte[] b, int offset, int len) throws IOException { try { bufferModified = true; buffer.put(b, offset, len); } catch (Throwable e) { appLog.logContext(e, JVM_ERROR); throw new IOException(e.toString()); } } public void writeInt(int i) throws IOException { try { bufferModified = true; buffer.putInt(i); } catch (Throwable e) { appLog.logContext(e, JVM_ERROR); throw new IOException(e.toString()); } } public void writeLong(long i) throws IOException { try { bufferModified = true; buffer.putLong(i); } catch (Throwable e) { appLog.logContext(e, JVM_ERROR); throw new IOException(e.toString()); } } public void close() throws IOException { try { Trace.printSystemOut("NIO close() start - fileLength = " + bufferLength); if (buffer != null && bufferModified) { try { buffer.force(); } catch (Throwable t) { try { buffer.force(); } catch (Throwable t1) { appLog.logContext(t, JVM_ERROR + " " + "length: " + bufferLength); } } } buffer = null; channel = null; file.close(); System.gc(); } catch (Throwable e) { appLog.logContext(e, "length: " + bufferLength); throw new IOException(e.toString()); } } public boolean isReadOnly() { return readOnly; } public boolean wasNio() { return true; } public boolean canAccess(int length) { return buffer.position() + length <= bufferLength; } public boolean canSeek(long position) { return position <= bufferLength; } public Database getDatabase() { return null; } static int newNIOBufferSize(int newSize) { int bufSize = 0; for (int scale = 20; scale < 30; scale++) { bufSize = 1 << scale; if (bufSize >= newSize) { break; } } return bufSize; } } hsqldb-1.8.0.10.orig/src/org/hsqldb/persist/PersistentStore.java0000644000175000017500000000531010416742476023175 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.persist; import java.io.IOException; import org.hsqldb.rowio.RowInputInterface; /** * Interface for a store for CachedObject object. * * @author fredt@users * @version 1.8.0 * @since 1.8.0 */ public interface PersistentStore { int INT_STORE_SIZE = 4; int LONG_STORE_SIZE = 8; /** get object */ CachedObject get(int key); /** get object, ensuring future gets will return the same instance of the object */ CachedObject getKeep(int key); int getStorageSize(int key); /** add new object */ void add(CachedObject object) throws IOException; /** add object previously removed from persistnce */ void restore(CachedObject object) throws IOException; CachedObject get(RowInputInterface in) throws IOException; CachedObject getNewInstance(int size) throws IOException; /** remove the persisted image but not the cached copy */ void removePersistence(int i); /** remove both persisted and cached copies */ void remove(int i); /** remove the cached copies */ void release(int i); /** commit persisted image */ void commit(CachedObject object); } hsqldb-1.8.0.10.orig/src/org/hsqldb/persist/ScaledRAFileInJar.java0000644000175000017500000001513010462200143023140 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.persist; import java.io.DataInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import org.hsqldb.Database; import org.hsqldb.lib.HsqlByteArrayInputStream; /** * This class is a random access wrapper around a DataInputStream object and * enables access to cached tables when a database is included in a jar. * * A proof-of-concept prototype was first contributed by winfriedthom@users. * * @author fredt@users * @version 1.8.0 * @since 1.8.0 */ class ScaledRAFileInJar implements ScaledRAInterface { DataInputStream file; final String fileName; long fileLength; boolean bufferDirty = true; byte[] buffer = new byte[4096]; HsqlByteArrayInputStream ba = new HsqlByteArrayInputStream(buffer); long bufferOffset; // long seekPosition; long realPosition; ScaledRAFileInJar(String name) throws FileNotFoundException, IOException { fileName = name; resetStream(); file.skip(DataFileCache.LONG_FREE_POS_POS); fileLength = file.readLong(); resetStream(); } public long length() throws IOException { return fileLength; } /** * Some JVM's do not allow seek beyond end of file, so zeros are written * first in that case. Reported by bohgammer@users in Open Disucssion * Forum. */ public void seek(long position) throws IOException { seekPosition = position; } public long getFilePointer() throws IOException { return seekPosition; } private void readIntoBuffer() throws IOException { long filePos = seekPosition; bufferDirty = false; long subOffset = filePos % buffer.length; long readLength = fileLength - (filePos - subOffset); if (readLength <= 0) { throw new IOException("read beyond end of file"); } if (readLength > buffer.length) { readLength = buffer.length; } fileSeek(filePos - subOffset); file.readFully(buffer, 0, (int) readLength); bufferOffset = filePos - subOffset; realPosition = bufferOffset + readLength; } public int read() throws IOException { if (seekPosition >= fileLength) { return -1; } if (bufferDirty || seekPosition < bufferOffset || seekPosition >= bufferOffset + buffer.length) { readIntoBuffer(); } ba.reset(); ba.skip(seekPosition - bufferOffset); int val = ba.read(); seekPosition++; return val; } public long readLong() throws IOException { long hi = readInt(); long lo = readInt(); return (hi << 32) + (lo & 0xffffffffL); } public int readInt() throws IOException { if (bufferDirty || seekPosition < bufferOffset || seekPosition >= bufferOffset + buffer.length) { readIntoBuffer(); } ba.reset(); ba.skip(seekPosition - bufferOffset); int val = ba.readInt(); seekPosition += 4; return val; } public void read(byte[] b, int offset, int length) throws IOException { if (bufferDirty || seekPosition < bufferOffset || seekPosition >= bufferOffset + buffer.length) { readIntoBuffer(); } ba.reset(); ba.skip(seekPosition - bufferOffset); int bytesRead = ba.read(b, offset, length); seekPosition += bytesRead; if (bytesRead < length) { if (seekPosition != realPosition) { fileSeek(seekPosition); } file.readFully(b, offset + bytesRead, length - bytesRead); seekPosition += (length - bytesRead); realPosition = seekPosition; } } public void write(byte[] b, int off, int len) throws IOException {} public void writeInt(int i) throws IOException {} public void writeLong(long i) throws IOException {} public void close() throws IOException { file.close(); } public boolean isReadOnly() { return true; } public boolean wasNio() { return false; } private void resetStream() throws IOException { if (file != null) { file.close(); } InputStream fis = getClass().getResourceAsStream(fileName); file = new DataInputStream(fis); } private void fileSeek(long position) throws IOException { long skipPosition = realPosition; if (position < skipPosition) { resetStream(); skipPosition = 0; } while (position > skipPosition) { skipPosition += file.skip(position - skipPosition); } } public boolean canAccess(int length) { return false; } public boolean canSeek(long position) { return false; } public Database getDatabase() { return null; } } hsqldb-1.8.0.10.orig/src/org/hsqldb/persist/ScaledRAFileHybrid.java0000644000175000017500000001230110504364726023372 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.persist; import java.io.IOException; import org.hsqldb.Database; /** * Mixe NIO / non-NIO version of ScaledRAFile. * This class is used only for storing a CACHED * TABLE .data file and cannot be used for TEXT TABLE source files. * * Due to various issues with java.nio classes, this class will use a mapped * channel of fixed size. After reaching this size, the file and channel are * closed and a new one opened, up to the maximum size. * * @author fredt@users * @version 1.8.0.5 * @since 1.7.2 */ public class ScaledRAFileHybrid implements ScaledRAInterface { final Database database; final String fileName; final boolean isReadOnly; final boolean wasNio; long maxLength; ScaledRAInterface store; public ScaledRAFileHybrid(Database database, String name, boolean readOnly) throws IOException { this.database = database; this.fileName = name; this.isReadOnly = readOnly; newStore(0); this.wasNio = store.wasNio(); } public long length() throws IOException { return store.length(); } public void seek(long position) throws IOException { checkSeek(position); store.seek(position); } public long getFilePointer() throws IOException { return store.getFilePointer(); } public int read() throws IOException { checkLength(1); return store.read(); } public void read(byte[] b, int offset, int length) throws IOException { checkLength(length); store.read(b, offset, length); } public void write(byte[] b, int offset, int length) throws IOException { checkLength(length); store.write(b, offset, length); } public int readInt() throws IOException { checkLength(4); return store.readInt(); } public void writeInt(int i) throws IOException { checkLength(4); store.writeInt(i); } public long readLong() throws IOException { checkLength(8); return store.readLong(); } public void writeLong(long i) throws IOException { checkLength(8); store.writeLong(i); } public void close() throws IOException { store.close(); } public boolean isReadOnly() { return store.isReadOnly(); } public boolean wasNio() { return wasNio; } public boolean canAccess(int length) { return true; } public boolean canSeek(long position) { return true; } public Database getDatabase() { return null; } private void checkLength(int length) throws IOException { if (store.canAccess(length)) { return; } newStore(store.getFilePointer() + length); } private void checkSeek(long position) throws IOException { if (store.canSeek(position)) { return; } newStore(position); } void newStore(long requiredPosition) throws IOException { long currentPosition = 0; if (store != null) { currentPosition = store.getFilePointer(); store.close(); } if (requiredPosition <= ScaledRAFile.MAX_NIO_LENGTH) { try { store = new ScaledRAFileNIO(database, fileName, isReadOnly, (int) requiredPosition); store.seek(currentPosition); return; } catch (Throwable e) {} } store = new ScaledRAFile(database, fileName, isReadOnly); store.seek(currentPosition); } } hsqldb-1.8.0.10.orig/src/org/hsqldb/persist/TextCache.java0000644000175000017500000005431410705160406021664 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.persist; import java.io.IOException; import java.io.UnsupportedEncodingException; import org.hsqldb.Database; import org.hsqldb.HsqlException; import org.hsqldb.Table; import org.hsqldb.Trace; import org.hsqldb.lib.FileUtil; import org.hsqldb.lib.HsqlByteArrayOutputStream; import org.hsqldb.rowio.RowInputInterface; import org.hsqldb.rowio.RowInputText; import org.hsqldb.rowio.RowInputTextQuoted; import org.hsqldb.rowio.RowOutputText; import org.hsqldb.rowio.RowOutputTextQuoted; import org.hsqldb.scriptio.ScriptWriterText; import org.hsqldb.store.ObjectCacheHashMap; // Ito Kazumitsu 20030328 - patch 1.7.2 - character encoding support // Dimitri Maziuk - patch for NL in string support // sqlbob@users - updated for 1.8.0 to allow new-lines in fields // fredt@users - updated for 1.8.0 to allow correct behaviour with transactions /** * Acts as a buffer manager for a single TEXT table with respect its Row data.

    * * Handles read/write operations on the table's text format data file using a * compatible pair of org.hsqldb.rowio input/output class instances. * * * @author sqlbob@users (RMP) * @version 1.8.0 * @since 1.7.0 */ public class TextCache extends DataFileCache { //state of Cache public static final String NL = System.getProperty("line.separator"); public String fs; public String vs; public String lvs; public String stringEncoding; public boolean isQuoted; public boolean isAllQuoted; public boolean ignoreFirst; protected String header; protected Table table; private ObjectCacheHashMap uncommittedCache; // final static char DOUBLE_QUOTE_CHAR = '\"'; final static char BACKSLASH_CHAR = '\\'; final static char LF_CHAR = '\n'; final static char CR_CHAR = '\r'; /** * The source string for a cached table is evaluated and the parameters * are used to open the source file.

    * * Settings are used in this order: (1) settings specified in the * source string for the table (2) global database settings in * *.properties file (3) program defaults * * fredt - this used to write rows as soon as they are inserted * but now this is subject to session autoCommit / or commit * storeOnInsert = true; */ TextCache(Table table, String name) throws HsqlException { super(table.database, name); this.table = table; uncommittedCache = new ObjectCacheHashMap(5); } protected void initParams(Database database, String baseFileName) throws HsqlException { fileName = baseFileName; this.database = database; fa = FileUtil.getDefaultInstance(); HsqlProperties tableprops = HsqlProperties.delimitedArgPairsToProps(fileName, "=", ";", null); //-- Get file name switch (tableprops.errorCodes.length) { case 0 : throw Trace.error(Trace.TEXT_TABLE_SOURCE, Trace.TEXT_TABLE_SOURCE_FILENAME); case 1 : // source file name is the only key without a value fileName = tableprops.errorKeys[0].trim(); break; default : throw Trace.error(Trace.TEXT_TABLE_SOURCE, Trace.TEXT_TABLE_SOURCE_VALUE_MISSING, tableprops.errorKeys[1]); } //-- Get separators: HsqlDatabaseProperties dbProps = database.getProperties(); fs = translateSep(tableprops.getProperty("fs", dbProps.getProperty(HsqlDatabaseProperties.textdb_fs, ","))); vs = translateSep(tableprops.getProperty("vs", dbProps.getProperty(HsqlDatabaseProperties.textdb_vs, fs))); lvs = translateSep(tableprops.getProperty("lvs", dbProps.getProperty(HsqlDatabaseProperties.textdb_lvs, fs))); if (fs.length() == 0 || vs.length() == 0 || lvs.length() == 0) { throw Trace.error(Trace.TEXT_TABLE_SOURCE, Trace.TEXT_TABLE_SOURCE_SEPARATOR); } //-- Get booleans ignoreFirst = tableprops.isPropertyTrue( "ignore_first", dbProps.isPropertyTrue( HsqlDatabaseProperties.textdb_ignore_first, false)); isQuoted = tableprops.isPropertyTrue( "quoted", dbProps.isPropertyTrue( HsqlDatabaseProperties.textdb_quoted, true)); isAllQuoted = tableprops.isPropertyTrue( "all_quoted", dbProps.isPropertyTrue( HsqlDatabaseProperties.textdb_all_quoted, false)); //-- Get encoding stringEncoding = translateSep(tableprops.getProperty("encoding", dbProps.getProperty(HsqlDatabaseProperties.textdb_encoding, "ASCII"))); //-- Get size and scale int cacheScale = tableprops.getIntegerProperty( "cache_scale", dbProps.getIntegerProperty( HsqlDatabaseProperties.textdb_cache_scale, 10, 8, 16)); int cacheSizeScale = tableprops.getIntegerProperty( "cache_size_scale", dbProps.getIntegerProperty( HsqlDatabaseProperties.textdb_cache_size_scale, 10, 8, 20)); int lookupTableLength = 1 << cacheScale; int avgRowBytes = 1 << cacheSizeScale; maxCacheSize = lookupTableLength * 3; maxCacheBytes = maxCacheSize * avgRowBytes; maxDataFileSize = Integer.MAX_VALUE; cachedRowPadding = 1; cacheFileScale = 1; } protected void initBuffers() { if (isQuoted || isAllQuoted) { rowIn = new RowInputTextQuoted(fs, vs, lvs, isAllQuoted); rowOut = new RowOutputTextQuoted(fs, vs, lvs, isAllQuoted, stringEncoding); } else { rowIn = new RowInputText(fs, vs, lvs, false); rowOut = new RowOutputText(fs, vs, lvs, false, stringEncoding); } } private String translateSep(String sep) { return translateSep(sep, false); } /** * Translates the escaped characters in a separator string and returns * the non-escaped string. */ private String translateSep(String sep, boolean isProperty) { if (sep == null) { return (null); } int next = 0; if ((next = sep.indexOf(BACKSLASH_CHAR)) != -1) { int start = 0; char[] sepArray = sep.toCharArray(); char ch = 0; int len = sep.length(); StringBuffer realSep = new StringBuffer(len); do { realSep.append(sepArray, start, next - start); start = ++next; if (next >= len) { realSep.append(BACKSLASH_CHAR); break; } if (!isProperty) { ch = sepArray[next]; } if (ch == 'n') { realSep.append(LF_CHAR); start++; } else if (ch == 'r') { realSep.append(CR_CHAR); start++; } else if (ch == 't') { realSep.append('\t'); start++; } else if (ch == BACKSLASH_CHAR) { realSep.append(BACKSLASH_CHAR); start++; } else if (ch == 'u') { start++; realSep.append( (char) Integer.parseInt( sep.substring(start, start + 4), 16)); start += 4; } else if (sep.startsWith("semi", next)) { realSep.append(';'); start += 4; } else if (sep.startsWith("space", next)) { realSep.append(' '); start += 5; } else if (sep.startsWith("quote", next)) { realSep.append(DOUBLE_QUOTE_CHAR); start += 5; } else if (sep.startsWith("apos", next)) { realSep.append('\''); start += 4; } else { realSep.append(BACKSLASH_CHAR); realSep.append(sepArray[next]); start++; } } while ((next = sep.indexOf(BACKSLASH_CHAR, start)) != -1); realSep.append(sepArray, start, len - start); sep = realSep.toString(); } return sep; } /** * Opens a data source file. */ public void open(boolean readonly) throws HsqlException { fileFreePosition = 0; try { dataFile = ScaledRAFile.newScaledRAFile(database, fileName, readonly, ScaledRAFile.DATA_FILE_RAF, null, null); fileFreePosition = dataFile.length(); if (fileFreePosition > Integer.MAX_VALUE) { throw new IOException(); } initBuffers(); } catch (Exception e) { throw Trace.error(Trace.FILE_IO_ERROR, Trace.TextCache_openning_file_error, new Object[] { fileName, e }); } cacheReadonly = readonly; } void reopen() throws HsqlException { open(cacheReadonly); } /** * Writes newly created rows to disk. In the current implentation, * such rows have already been saved, so this method just removes a * source file that has no rows. */ public void close(boolean write) throws HsqlException { if (dataFile == null) { return; } try { cache.saveAll(); boolean empty = (dataFile.length() <= NL.length()); dataFile.close(); dataFile = null; if (empty && !cacheReadonly) { FileUtil.getDefaultInstance().delete(fileName); } } catch (Exception e) { throw Trace.error(Trace.FILE_IO_ERROR, Trace.TextCache_closing_file_error, new Object[] { fileName, e }); } } /** * Closes the source file and deletes it if it is not read-only. */ void purge() throws HsqlException { uncommittedCache.clear(); try { if (cacheReadonly) { close(false); } else { if (dataFile != null) { dataFile.close(); dataFile = null; } FileUtil.getDefaultInstance().delete(fileName); } } catch (Exception e) { throw Trace.error(Trace.FILE_IO_ERROR, Trace.TextCache_purging_file_error, new Object[] { fileName, e }); } } /** * */ public synchronized void remove(int pos, PersistentStore store) throws IOException { CachedObject row = (CachedObject) uncommittedCache.remove(pos); if (row != null) { return; } row = cache.release(pos); clearRowImage(row); release(pos); } private void clearRowImage(CachedObject row) throws IOException { int length = row.getStorageSize() - ScriptWriterText.BYTES_LINE_SEP.length; rowOut.reset(); HsqlByteArrayOutputStream out = rowOut.getOutputStream(); out.fill(' ', length); out.write(ScriptWriterText.BYTES_LINE_SEP); dataFile.seek(row.getPos()); dataFile.write(out.getBuffer(), 0, out.size()); } public synchronized void removePersistence(int pos, PersistentStore store) throws IOException { CachedObject row = (CachedObject) uncommittedCache.get(pos); if (row != null) { return; } row = cache.get(pos); clearRowImage(row); } protected synchronized RowInputInterface readObject(int pos) throws IOException { ByteArray buffer = new ByteArray(80); boolean complete = false; boolean wasCR = false; int c; boolean hasQuote = false; boolean wasNormal = false; pos = findNextUsedLinePos(pos); if (pos == -1) { return null; } dataFile.seek(pos); while (!complete) { wasNormal = false; c = dataFile.read(); if (c == -1) { if (buffer.length() == 0) { return null; } complete = true; if (wasCR) { break; } if (!cacheReadonly) { dataFile.write(ScriptWriterText.BYTES_LINE_SEP, 0, ScriptWriterText.BYTES_LINE_SEP.length); } break; } switch (c) { case DOUBLE_QUOTE_CHAR : wasNormal = true; complete = wasCR; wasCR = false; if (isQuoted) { hasQuote = !hasQuote; } break; case CR_CHAR : wasCR = !hasQuote; break; case LF_CHAR : complete = !hasQuote; break; default : wasNormal = true; complete = wasCR; wasCR = false; } buffer.append(c); } if (complete) { int length = (int) dataFile.getFilePointer() - pos; if (wasNormal) { length--; } ((RowInputText) rowIn).setSource(buffer.toString(), pos, length); return rowIn; } return null; } public int readHeaderLine() throws HsqlException { boolean complete = false; boolean wasCR = false; boolean wasNormal = false; ByteArray buffer = new ByteArray(80); while (!complete) { wasNormal = false; int c; try { c = dataFile.read(); if (c == -1) { if (buffer.length() == 0) { return 0; } complete = true; if (!cacheReadonly) { dataFile.write(ScriptWriterText.BYTES_LINE_SEP, 0, ScriptWriterText.BYTES_LINE_SEP.length); } break; } } catch (IOException e) { throw Trace.error(Trace.TEXT_FILE); } switch (c) { case CR_CHAR : wasCR = true; break; case LF_CHAR : complete = true; break; default : wasNormal = true; complete = wasCR; wasCR = false; } buffer.append(c); } header = buffer.toString(); try { int length = (int) dataFile.getFilePointer(); if (wasNormal) { length--; } return length; } catch (IOException e) { throw Trace.error(Trace.TEXT_FILE); } } // fredt - new method /** * Searches from file pointer, pos, and finds the beginning of the first * line that contains any non-space character. Increments the row counter * when a blank line is skipped. * * If none found return -1 */ int findNextUsedLinePos(int pos) throws IOException { int firstPos = pos; int currentPos = pos; boolean wasCR = false; dataFile.seek(pos); while (true) { int c = dataFile.read(); currentPos++; switch (c) { case CR_CHAR : wasCR = true; break; case LF_CHAR : wasCR = false; ((RowInputText) rowIn).skippedLine(); firstPos = currentPos; break; case ' ' : if (wasCR) { wasCR = false; ((RowInputText) rowIn).skippedLine(); } break; case -1 : return -1; default : return firstPos; } } } public synchronized void add(CachedObject object) throws IOException { super.add(object); clearRowImage(object); } public synchronized CachedObject get(int i, PersistentStore store, boolean keep) throws HsqlException { if (i < 0) { return null; } CachedObject o = (CachedObject) uncommittedCache.get(i); if (o == null) { o = super.get(i, store, keep); } /* if (o == null) { o = super.get(i, store, keep); } */ return o; } /** * This is called internally when old rows need to be removed from the * cache. Text table rows that have not been saved are those that have not * been committed yet. So we don't save them but add them to the * uncommitted cache until such time that they are committed or rolled * back- fredt */ protected synchronized void saveRows(CachedObject[] rows, int offset, int count) throws IOException { if (count == 0) { return; } for (int i = offset; i < offset + count; i++) { CachedObject r = rows[i]; uncommittedCache.put(r.getPos(), r); rows[i] = null; } } /** * In case the row has been moved to the uncommittedCache, removes it. * Then saves the row as normal. */ public synchronized void saveRow(CachedObject row) throws IOException { uncommittedCache.remove(row.getPos()); super.saveRow(row); } public String getHeader() { return header; } public void setHeader(String header) throws HsqlException { if (ignoreFirst && fileFreePosition == 0) { try { writeHeader(header); this.header = header; } catch (IOException e) { throw new HsqlException( e, Trace.getMessage(Trace.GENERAL_IO_ERROR), Trace.GENERAL_IO_ERROR); } return; } throw Trace.error(Trace.TEXT_TABLE_HEADER); } private void writeHeader(String header) throws IOException { byte[] buf = null; String firstLine = header + NL; try { buf = firstLine.getBytes(stringEncoding); } catch (UnsupportedEncodingException e) { buf = firstLine.getBytes(); } dataFile.write(buf, 0, buf.length); fileFreePosition = buf.length; } private class ByteArray { private byte[] buffer; private int buflen; public ByteArray(int n) { buffer = new byte[n]; buflen = 0; } public void append(int c) { if (buflen >= buffer.length) { byte[] newbuf = new byte[buflen + 80]; System.arraycopy(buffer, 0, newbuf, 0, buflen); buffer = newbuf; } buffer[buflen] = (byte) c; buflen++; } public int length() { return buflen; } public void setLength(int l) { buflen = l; } public String toString() { try { return new String(buffer, 0, buflen, stringEncoding); } catch (UnsupportedEncodingException e) { return new String(buffer, 0, buflen); } } } public int getLineNumber() { return ((RowInputText) rowIn).getLineNumber(); } protected void setFileModified() throws IOException { fileModified = true; } } hsqldb-1.8.0.10.orig/src/org/hsqldb/persist/ScaledRAInterface.java0000644000175000017500000000352310461315701023246 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.persist; import org.hsqldb.lib.Storage; import java.io.IOException; import org.hsqldb.Database; public interface ScaledRAInterface extends Storage { boolean canAccess(int length); boolean canSeek(long position); Database getDatabase(); } hsqldb-1.8.0.10.orig/src/org/hsqldb/persist/LockFile.java0000644000175000017500000027552410767504032021521 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.persist; import java.io.DataInputStream; import java.io.EOFException; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.RandomAccessFile; import org.hsqldb.DatabaseManager; import org.hsqldb.HsqlDateTime; import org.hsqldb.HsqlException; import org.hsqldb.Trace; import org.hsqldb.lib.FileUtil; import org.hsqldb.lib.HsqlTimer; import org.hsqldb.lib.StringConverter; import org.hsqldb.lib.java.JavaSystem; /** * Base cooperative file locking implementation and LockFile * factory.

    * *


    * * Provides a facility for cooperative file locking across process boundaries * and isolated in-process class loader contexts.

    * * The need is obvious for inter-process cases, but it is no less essential for * in-process Java clients whose classes have been loaded by isolated class * loaders. This is because static fields--the conventional * * means for supporting in-process global discovery--become * distinct and inaccessible across Java class loader context boundaries when * the contexts do not share a common parent class loader or do not implement * normal parent class loader delegation semantics.

    * * * * The only purely in-process global discovery alternative known to the author * is to reflect upon objects found while traversing up the Java runtime thread * hierarchy. However, this method is often subject to Java security * restrictions whose collective purpose is essentially dissimilar to that of * restrictions in effect relative to cooperative file locking requirements, * making it a generally unacceptable option in this context.

    * *


    * * Here is the way this class presently operates:

    * *

      *
    1. A file with a commonly agreed-upon path is used to implement * cooperative locking semantics regarding another set of files with * commonly agreed-upon paths.

      * *

    2. In particular, a background thread periodically writes a timestamp * value, which acts as a heartbeat that indicates to others whether a * cooperative lock condition is currently held.

      * *

    3. In addition, a magic value is written so that it is possible to * distinguish with a reasonably high degree of accuracy between the * existence of a lock file and some other type of file.

      * *

    4. The generic rules used to aquire a cooperative lock condition are * as follows:

      * *

        *
      1. If a lock condition is already held by this object, do nothing and * signify that the lock attempt was successful, else...

        * *

      2. Poll the underlying file, using a configured maximum number of * retries and a configured interval between the end of a failed * poll and the beginning of the next.

        * *

      3. For each poll:

        * *

          * *
        1. Attempt to atomically create the underlying file if and only * if it does not yet exist, exit the polling loop immediately * indicating success if the attempt succeeds, else fast fail * the current poll if a security exeption is thrown in response * to the attempt, else...

          * *

        2. Test if the underlying file exists, fast failing the current * poll if it is impossible to determine (i.e. if a security * exeption is thrown).

          * *

        3. If the file does not exist, exit the polling loop immediately * indicating success.

          * * This can occur only under pre-JDK 1.2 runtimes; or when the * underlying platform does not correctly support {@link * java.io.File#createNewFile()}; or when the underlying file is * deleted within a very short time after i.), above (typically * on the order of microseconds).

          * * If the underlying platform employs a kernel-enforced mandatory * file locking blanket policy for open files (e.g. Windows * tm), then this is likely a non-issue. And if * this case makes possible a race condition with another * LockFile object (because the test for existence and * subsequent file creation is not atomic relative to all other * file system actions), it is still very unlikely that * so unfortunate a timing will occur as to allow simultaneous * lock conditions to be established. Finally, if some * non-LockFile entity deleted the file, then there are * much worse things to worry about, in particular that the files * this object is supposed to protect are in reality subject to * arbitrary external modification and deletion.

          * *

        4. Test the file's length, fast failing the current poll if the * length cannot be determined or it is not the expected * value.

          * *

        5. Open a stream to read the file's MAGIC and heartbeat * timestamp values, fast failing the current poll if the stream * cannot be opened.

          * *

        6. Test the file's MAGIC value, failing the current poll * if the value cannot be read or it is not the expected * value.

          * *

        7. Test the file's heartbeat timestamp value, fast failing the * current poll if it cannot be read or it is less than a * commonly agreed-upon value into the past (or future, to * overcome a caveat observed by a patch contributor).

          *

        *
      4. If the polling phase exits with a failure indication, then one or * more of the following cases must have been true at every poll * iteration:

        * *

          *
        • The file had the wrong length or MAGIC value (was * not an HSQLDB lock file). * *
        • The file was deleted externally after a poll's initial * test for existence and recreated at some point before * the next poll's initial test for existence. * *
        • An incompatible OS-enforced security restriction was in * effect. * *
        • An incompatible Java-enforced security restriction was * in effect. * *
        • The target file system media was effectively inaccessible. *
        • A cooperative lock condition was held by some other * LockFile. * *
        • A kernel-enforced manditory or advisory file lock was held. *

        * * In this case, signify failure indicating the last encountered * reason, else...

        * *

      5. Open the file for reading and writing, write the magic value and * an initial heartbeat timestamp, schedule a periodic heartbeat * timestamp writer task and signify success.

        *

      *
    5. The generic rules used to release a cooperative lock condition are:

      *

        *
      1. If a lock condition is not currently held, do nothing and signify * success, else...

        * *

      2. A lock condition is currently held by this object, so try to * release it.

        * * By default, releasing the lock condition consists of closing and * nullifying any objects that have a file descriptor open on the * lock file, cancelling the periodic heartbeat timestamp writer * task and deleting the lock file. If the release occurs without * raising an exception, signify success, else signify that the * release attempt might have failed.

        *

      *

    * *


    * * Additionally, {@link #doOptionalLockActions() doOptionalLockActions()} and * {@link #doOptionalReleaseActions() doOptionalReleaseActions()} are invoked * during lock and release attempts, respectively. This enables integration of * extended lock and release strategies based on subclassing. Subclass * availability is automatically detected and exposed by the factory method * {@link #newLockFile newLockFile()}.

    * * In particular, if {@link #USE_NIO_FILELOCK_PROPERTY} is true and the required * classes are available at static initialization, then newLockFile() * produces {@link org.hsqldb.NIOLockFile NIOLockFile} instances.

    * * When NIOLockFile instances are produced, then it is possible that * true kernel-enforced advisory or manditory file locking is used to protect * the underlying lock file from inadvertent modification (and possibly even * from deletion, including deletion by the system superuser). * * Otherwise, newLockFile() produces vanilla LockFile * instances, which exhibit just the elementary cooperative locking behavior on * platforms that do not, by default, implement kernel-enforced manditory * locking for open files.

    * * At this point, it must be noted that not every target platform upon which * Java can run actually provides true kernel-enforced manditory (or even * advisory) file locking. Indeed, even when a target platform does * provide such locking guarantees for local file systems, it may not be able * to do so for network file systems, or it may only be able to do so safely * (or at all) with certain restrictions. Further, external system configuration * may be a prerequisite to enable manditory locking on systems that support it * but employ advisory locking by default.

    * * In recognition of these facts, the official Java NIO package specification * explicitly states basically the same information. What is unfortunate, * however, is that no capabilities API is yet provided as part of the package. * What is even more unfortunate is that without something like a capabilities * API, it is impossible for an implementation to indicate or clients to * distiguish between simple lack of platform support and cases involving * immature Java runtimes that do not fully or correctly implement all NIO * features (and hence may throw exceptions at unexpected times or in places * where the API specification indicates none can be thrown).

    * * It is for the preceding reasons that, as of HSQLDB 1.8.0.3, * FileLock's use of Java NIO has been made a purely optional feature. * Previous to HSQLDB 1.8.0.3, if NIO was detected available, used to create a * FileLock and failed, then the enclosing cooperative lock attempt * failed also, despite the fact that a vanilla locking approach could * succeed.

    * * Polling Configuration:

    * * Although the {@link #HEARTBEAT_INTERVAL} and default polling values may * seem quite conservative, they are the result of ongoing research into * generally reasonable concerns regarding normal timing and resource * availability fluctuations experienced frequently under most, if not all * operating systems.

    * * Regardless, flexibility is almost always a good thing, so this class is * designed to allow polling interval and retry count values to be configured * at run-time.

    * * At present, this can be done at any time by setting the system properties * whose names are {@link #POLL_RETRIES_PROPERTY} and {@link * #POLL_INTERVAL_PROPERTY}.

    * * Some consideration has also been given to modifying the polling scheme so * that run-time configuration of the HEARTBEAT_INTERVAL is possible. For now, * however, this option has been rejected due to the relative complexity of * guaranteeing acceptably safe, deterministic behaviour. On the other hand, * if it can be guaranteed that certain site invariants hold (in particular, * that only one version of the hsqldb jar will ever be used to open database * instances at the site) and it is desirable or required to experiment with * a lower interval, then it is recommended for now simply to recompile the * jar using a different value in the static field assignment. Note that great * care should be taken to avoid assigning too low a value, or else it may * become possible that even very short-lived timing and resource availability * fluctuations will cause incorrect operation of this class.

    * * NIO Configuration:

    * * Starting with 1.8.0.3, NIO-enhanced file lock attempts are turned off by * default. The general reasons for this are discussed above. Anyone interested * in the reading the detailed research notes should refer to the overview of * {@link NIOLockFile}. If, after reviewing the notes and the capabilities of * the intended target platform, one should still wish to enable NIO-enhanced * file lock attempts, it can be done by setting the system property {@link * #USE_NIO_FILELOCK_PROPERTY} true at JVM startup (for example, by using a * command-line -D<property-name>=true directive). Be aware that * the system property value is read only once, in the static initializer block * for this class.

    * * Design Notes:

    * * First, it should be noted that no thread synchronization occurs in * this class. Primarily, this is because the standard entry point, * {@link #newLockFileLock(String)}, is always called from within a block * synchronized upon an HSQLDB Database instance. If this class is to be used * elsewhere and it could be accessed concurrently, then access should be * synchronized on an appropriate monitor. That said, certain members of this * class have been declared volatile to minimize possibility of inconsistent * views under concurrent read-only access.

    * * Second, to the limit of the author's present understanding, the * implementation details of this class represent a good comprimse under varying * and generally uncontrollable JVM, OS and hardware platform * limitations/capabilites, as well as under usability considerations and * external security or operating constraints that may need to be imposed.

    * * Alternate approaches that have been considered and rejected for now * include:

    * *

      *
    • Socket-based locks (with/without broadcast protocol) *
    • Pure NIO locking *
    • Simple lock file (no heartbeat or polling) *
    • JNI and native configuration alternatives *
    * * Of course, discussions involving and patches implementing improvements * or better alternatives are always welcome.

    * * As a final note and sign post for developers starting to work with * Java NIO:

    * * A separate NIOLockFile descendent exists specifically * because it was determined though experimenatation that * java.nio.channels.FileLock does not always exhibit the correct * or desired behaviour under reflective method invocation. That is, it was * discovered that under some operating system/JVM combinations, after calling * FileLock.release() via a reflective method invocation, the lock is * not released properly, deletion of the lock file is not possible even from * the owning object (this) and it is impossible for other LockFile * instances, other in-process objects or other processes to successfully obtain * a lock condition on the lock file, despite the fact that the * FileLock object reports that its lock is invalid (was released * successfully). Frustratingly, this condition appears to persist until full * exit of the process hosting the JVM in which the FileLock.tryLock() * method was reflectively invoked.

    * * To solve this, the original LockFile class was split in two and * instead of reflective method invocation, subclass instantiation is now * performed at the level of the newLockFile() factory method. * Similarly, the HSQLDB ANT build script now detects the presence or abscence * of JDK 1.4+ features such as java.nio and only attempts to build and deploy * NIOLockFile to the hsqldb.jar if such features are reported * present.

    * * @author boucherb@users * @version 1.8.0.10 * @since 1.7.2 */ public class LockFile { /** * Arbitary period, in milliseconds, at which heartbeat timestamps are * written to this object's lock file.

    * * This value was selected to be very conservative, just in case timing * jitters are experienced on the order introduced by brief network * partitions, accidentally removed media and transient high load * CPU bursts. */ public static final long HEARTBEAT_INTERVAL = 10000; /** * {@link #HEARTBEAT_INTERVAL} + 100.

    * * Interval used by {@link #checkHeartbeat(boolean) checkHeartbeat} to * test whether the timestamp in the underlying lock file is live or stale. * Padding added in the hope of reducing potential timing jitter issues * under the polling scheme introduced in 1.8.0.3 */ public static final long HEARTBEAT_INTERVAL_PADDED = 10100; /** * Value written at the beginning of an HSQLDB lock file to distinguish it * from other file types.

    * * The value is the octet sequence: {0x48, 0x53, 0x51, 0x4c, 0x4c, 0x4f, * 0x43, 0x4b}, which is the ASCII sequence {'H', 'S', 'Q', 'L', 'L', 'O', * 'C', 'K'}.

    * * Design Note:

    * * "HSQLLOCK".getBytes() is no longer used because it is dependent on the * underlying platform's default character set. */ protected static final byte[] MAGIC = { 0x48, 0x53, 0x51, 0x4c, 0x4c, 0x4f, 0x43, 0x4b }; /** * Size, in bytes, of the region at the beginning of a lock file that is * actually used to record lock information.

    * * Value is currently MAGIC.length + sizeof(long) = (8 + 8) = 16 */ public static final int USED_REGION = 16; /** * Number of retries used by default in {@link #pollHeartbeat() * pollHeartbeat}. */ public static final int POLL_RETRIES_DEFAULT = 10; /** * System property that can be used to override the default number of * heartbeat poll retries. */ public static final String POLL_RETRIES_PROPERTY = "hsqldb.lockfile.poll.retries"; /** * System property that can be used to override the default number of * milliseconds between each heartbeat poll retry. */ public static final String POLL_INTERVAL_PROPERTY = "hsqldb.lockfile.poll.interval"; /** Whether java.nio file locking is attempted by default. */ public static final boolean USE_NIO_FILELOCK_DEFAULT = false; /** * System property that can be used to control whether nio file locking is * attempted. */ public static final String USE_NIO_FILELOCK_PROPERTY = "hsqldb.lockfile.nio.filelock"; /** * Statically computed indication of java.nio.channels.FileLock * runtime availability.

    * * Design Note:

    * * Computed in a static initializer block. Will be false if * USE_NIO_FILELOCK_PROPERTY is false at static * initialization, regardless of actual availability. */ public static final boolean NIO_FILELOCK_AVAILABLE; /** * Statically computed reference to the NIOLockFile class.

    * * Design Note:

    * * Computed in a static initializer block. Will be null if * USE_NIO_FILELOCK_PROPERTY is false at static * initialization, regardless of actual availability. */ public static final Class NIO_LOCKFILE_CLASS; /** * The timed scheduler with which to register this object's * heartbeat task. */ protected static final HsqlTimer timer = DatabaseManager.getTimer(); // This static initializer comes last, since it references a subclass // // That is, it is best practice to ensure the static fields of this class // are all initialized before referecing a subclass whose static // field initializtion may in turn reference static fields in this class. static { synchronized (LockFile.class) { boolean use = USE_NIO_FILELOCK_DEFAULT; try { use = "true".equalsIgnoreCase( System.getProperty(USE_NIO_FILELOCK_PROPERTY, use ? "true" : "false")); } catch (Exception e) {} boolean avail = false; Class clazz = null; if (use) { try { Class.forName("java.nio.channels.FileLock"); clazz = Class.forName("org.hsqldb.persist.NIOLockFile"); avail = true; } catch (Exception e) {} } NIO_FILELOCK_AVAILABLE = avail; NIO_LOCKFILE_CLASS = clazz; } } /** * Canonical reference to this object's lock file.

    * * Design Note:

    * * Should really be final, but finality makes reflective construction * and adherence to desirable LockFile factory method event * sequence more complicated. */ protected File file; /** * Cached value of the lock file's canonical path * * Design Note:

    * * Should really be final, but finality makes reflective construction * and adherence to desirable LockFile factory method event * sequence much more complicated. */ private String cpath; /** * A RandomAccessFile constructed from this object's canonical file * reference.

    * * This RandomAccessFile is used to periodically write out the * heartbeat timestamp to this object's lock file. */ protected volatile RandomAccessFile raf; /** Indicates presence or absence of the cooperative lock condition. */ protected volatile boolean locked; /** Opaque reference to this object's heatbeat task. */ private volatile Object timerTask; /** * Retrieves a new NIOLockFile, or null if not available * under the current runtime environment. * * @return a new NIOLockFile, or null if not available * under the current runtime environment */ private static final LockFile newNIOLockFile() { if (NIO_FILELOCK_AVAILABLE && NIO_LOCKFILE_CLASS != null) { try { return (LockFile) NIO_LOCKFILE_CLASS.newInstance(); } catch (Exception e) { // e.printStackTrace() } } return null; } /** * To allow subclassing without exposing a public constructor. */ protected LockFile() {} /** * Retrieves a LockFile instance, initialized with a File * object whose path is the canonical form of the one specified by the * given path argument.

    * * The resulting LockFile instance does not yet hold a lock * condition on the file with the given path, nor does it guarantee that the * file pre-exists or is created. * * However, upon successful execution, it is guaranteed that all required * parent directories have been created and that the underlying platform has * verified the specified path is legal on the file system of the underlying * storage partition. * * @return a LockFile instance initialized with a File * object whose path is the one specified by the given path * argument. * @param path the path of the File object with which the retrieved * LockFile object is to be initialized * @throws FileCanonicalizationException if an I/O error occurs upon * canonicalization of the given path, which is possible because * it may be illegal on the runtime file system or because * construction of the canonical path name may require native file * system queries * @throws FileSecurityException if a required system property value cannot * be accessed, or if a security manager exists and its {@link * java.lang.SecurityManager#checkRead} method denies read * access to the file; or if its {@link * java.lang.SecurityManager#checkRead(java.lang.String)} * method does not permit verification of the existence of all * necessary parent directories; or if the {@link * java.lang.SecurityManager#checkWrite(java.lang.String)} * method does not permit all necessary parent directories to be * created */ public static final LockFile newLockFile(final String path) throws FileCanonicalizationException, FileSecurityException { LockFile lockFile = newNIOLockFile(); if (lockFile == null) { lockFile = new LockFile(); } lockFile.setPath(path); return lockFile; } /** * {@link org.hsqldb.persist.Logger#acquireLock(java.lang.String)} * delegate.

    * * Retrieves a new LockFile object holding a cooperative lock * condition upon the file with the given path, appended with the * extension '.lck'.

    * * @param path of the lock file, to which will be appended '.lck' * @throws org.hsqldb.HsqlException if the lock condition cannot * be obtained for any reason. * @return a new LockFile object holding a cooperative lock * condition upon the file with the given path, appended with the * extension '.lck' */ public static final LockFile newLockFileLock(final String path) throws HsqlException { LockFile lockFile = null; try { lockFile = LockFile.newLockFile(path + ".lck"); } catch (LockFile.BaseException e) { throw Trace.error(Trace.LOCK_FILE_ACQUISITION_FAILURE, e.getMessage()); } boolean locked = false; try { locked = lockFile.tryLock(); } catch (LockFile.BaseException e) { throw Trace.error(Trace.LOCK_FILE_ACQUISITION_FAILURE, e.getMessage()); } // Paranoia mode: In theory, this case can't happen, given the way // tryLock now works; by all current understanding of the involved API // contracts, an exception will always be thrown instead by the code // above. if (!locked) { throw Trace.error(Trace.LOCK_FILE_ACQUISITION_FAILURE, lockFile.toString()); } return lockFile; } /** * Checks whether the underlying file is an HSQLDB lock file and, if so, * whether its heartbeat timestamp is live (is, as far as can be known, * presumably in use by another LockFile instance) or stale.

    * * The check conforms to the following rules:

    * *

      *
    1. If the parameter withCreateNewFile is true, {@link * java.io.File#createNewFile()} is available and its invocation * upon this object's file object indicates the underlying * file was atomically created if and only if it did not yet exist, * then return immediately (we have won the race to establish * a lock file).

      * *

    2. Test again if the file exists, returning immediately if it does not * (there's no file and hence no heartbeat to check).

      * * An immediate return can occur here only under pre-JDK 1.2 runtimes; * or when the underlying platform does not correctly support * File.createNewFile(); or when the underlying file is deleted * within a very short time after i.), above (typically on the order of * microseconds).

      * * If the underlying platform employs a kernel-enforced mandatory file * locking blanket policy for open files (e.g. Windowstm * ), then this is likely a non-issue. And if this case makes * possible a race condition with another LockFile object * (because the test for existence yeilds false and subsequent file * creation is not atomic relative to all other file system actions), it * is still very unlikely that so unfortunate a timing will * occur as to allow simultaneous lock conditions to be established. * Finally, if some non-LockFile entity deleted the file, then * there are much worse things to worry about, in particular that the * files this object is supposed to protect are in reality subject to * arbitrary external modification and deletion by some uncooperative * process.

      * *

    3. If a Java security exception is thrown while testing for existence, * it is rethrown as a FileSecurityException. * *
    4. Read the file's length. * *
    5. If a Java security exception is thrown reading length, it is rethrown * as a FileSecurityException (it is possible somebody * concurrently refreshed the system Policy in the interim). * *
    6. If the file does not have the expected length, a * WrongLengthException is thrown (we're trying to check * something that is not an HSQLDB lock file). * *
    7. Open an input steam to read the file's MAGIC and heartbeat * timestamp values. * *
    8. If a file not found exception is thrown above, it is rethrown as an * UnexpectedFileNotFoundException (we've already tested for * existence). * *
    9. If a Java security exception is thrown above, it is rethrown as a * FileSecurityException (it is possible somebody * concurrently refreshed the system Policy in the interim). * *
    10. Read the MAGIC value. * *
    11. If an end of file exepction is thrown above, it is rethrown as an * UnexpectedEndOfFileException (we've already tested the * length... did someone truncate the file in the interim?). * *
    12. If an I/O exception is thrown, it is rethrown as an * UnexpectedFileIOException (we've already tested for * existence, length and successfully opened a stream...did someone, * for example, force unmount or physically remove the underlying device * in the interim?) * *
    13. If the value read in does not match the expected MAGIC value, * a WrongMagicException is thrown (we're trying to check * something that is not an HSQLDB lock file). * *
    14. Read the heartbeat timestamp. * *
    15. If a Java security exception is thrown above, it is rethrown as a * FileSecurityException (it is possible somebody * concurrently refreshed the system Policy in the interim). * *
    16. If an end of file exection is thrown above, it is rethrown as an * UnexpectedEndOfFileException (we've already tested the * length... did someone truncate the file in the interim?). * *
    17. If an I/O exception is thrown, it is rethrown as an * UnexpectedFileIOException (we've already tested for * existence, length and successfully opened a stream...did someone, * for example, force unmount or physically remove the underlying device * in the interim?) * *
    18. If the timestamp read in is less than or equal to * {@link #HEARTBEAT_INTERVAL_PADDED} milliseconds into the past or * future, then a LockHeldExternallyException is thrown. * *
    19. Otherwise, this method simply returns. *
    * * @param withCreateNewFile if true, attempt to employ * File.createNewFile() as part of the check so as to * eliminate potential race conditions when establising a new * lock file * @throws FileSecurityException if the check fails due to a Java * security permission check failure * @throws LockHeldExternallyException if it is determined that the * file's heartbeat timestamp is less than * HEARTBEAT_INTERVAL_PADDED into the past (or future) * @throws UnexpectedEndOfFileException if an EOFExceoption is * thrown while reading either the magic or heartbeat timestamp values * @throws UnexpectedFileIOException if an IOException other than * EOFException is thrown while reading either the magic or * heartbeat timestamp values * @throws UnexpectedFileNotFoundException if a * FileNotFoundException is thrown while attempting to open a * stream to read the underlying file's magic and heartbeat timestamp * values * @throws WrongLengthException if it is determined that the length * of the file does not equal {@link #USED_REGION} * @throws WrongMagicException if it is determined that the file's * content does not start with {@link #MAGIC}. */ private final void checkHeartbeat(boolean withCreateNewFile) throws LockFile.FileSecurityException, LockFile.LockHeldExternallyException, LockFile.UnexpectedEndOfFileException, LockFile.UnexpectedFileIOException, LockFile.UnexpectedFileNotFoundException, LockFile.WrongLengthException, LockFile.WrongMagicException { long now; long lastHeartbeat; long length = 0; //#ifdef JAVA2FULL try { if (withCreateNewFile) { try { file.createNewFile(); return; } catch (IOException ioe) {} } if (!file.exists()) { return; } length = file.length(); } catch (SecurityException se) { throw new FileSecurityException(this, "checkHeartbeat", se); } //#else /* if (!file.exists()) { return; } length = file.length(); */ //#endif JAVA2 if (length != USED_REGION) { throw new WrongLengthException(this, "checkHeartbeat", length); } // Compute the current wall clock time *first* to reduce possibility // of unwanted time dilation effects introduced, for example, // by intervening thread or process context switches under CPU // bursts. // // Example: // // Say currentTimeMillis is actually somewhere in (-0.5 and 0.5] // and another LockFile concurrently writes a 0-valued heartbeat // timestamp. // // Then, if readHeartbeat comes first here, happens to 'win the race // condition' (reads the previous heartbeat: -10,000) and an intervening // switch causes greater than ~0.5 millisecond elapsed time to // be experienced between readHeartbeat and currentTimeMillis, then // currentTimeMillis will be computed as n (n > 0), and (now - // lastHearbeat) will be HEARTBEAT_INTERVAL + n, instead of // HEARTBEAT_INTERVAL. // // Now, let n be greater than (HEARTBEAT_INTERVAL_PADDED - // HEARTBEAT_INTERVAL). // // Then the check will succeed, although it should fail. // // On the other hand, if currentTimeMillis is computed first, the // worst than can happen is a false positive indication that // the read heartbeat timestamp value was written by a live LockFile // instance. // now = System.currentTimeMillis(); lastHeartbeat = readHeartbeat(); // Using padded interval to further reduce corner case effects, // now that heartbeat polling is in effect. // // Basically, it is absolutely essential to fail when a lock really is // still held elsewhere, so it is OK to fail on corner cases where // the last written heartbeat is very close to HEARTBEAT_INTERVAL // in the past and it is possible that timing jitters make it uncertain // whether the lock really is still held. if (Math.abs(now - lastHeartbeat) <= (HEARTBEAT_INTERVAL_PADDED)) { throw new LockHeldExternallyException(this, "checkHeartbeat", now, lastHeartbeat); } } /** * Closes this object's {@link #raf RandomAccessFile}.

    * * As a side-effect, the associated FileChannel object, if any, * is closed as well. * * @throws UnexpectedFileIOException if an IOException is thrown */ private final void closeRAF() throws LockFile.UnexpectedFileIOException { if (raf != null) { try { raf.close(); } catch (IOException ex) { throw new UnexpectedFileIOException(this, "closeRAF", ex); } finally { raf = null; } } } /** * Provides any optional locking actions for the {@link #tryLock() * tryLock()} template method.

    * * Descendents are free to provide additional functionality here, * using the following rules:

    * * PRE:

    * * This method is called only from tryLock() and it is called if * and only if tryLock() successfully invokes * pollHeartbeat() and openRAF() first.

    * * From this, it can be inferred that upon entry:

    * *

      *
    1. locked == false. *
    2. raf is a non-null instance that can be used to get a * FileChannel instance, if desired. *
    3. the underlying file either did not exist before invoking * openRAF() or it was a valid but stale HSQLDB lock file * because it: * *
        *
      1. did exist, *
      2. was readable on USED_REGION, *
      3. had the expected length and MAGIC value and *
      4. had a stale heartbeat timestamp value. *
      *

    * * Further, it can be assumed that this object's heatbeat task is definitely * cancelled and/or has never been scheduled at this point, so whatever * timestamp is recorded in the lock file, if it did pre-exist, was written * by a different LockFile instance or as the result of a previous, * successful tryLock() invocation upon this LockFile * instance.

    * * Finally, it is important that this method does not rethrow any exceptions * it encounters as unchecked exceptions to the calling context.

    * * POST:

    * * This method should return false if optional locking work is not * performed or if it fails, else true.

    * * In general, if optional locking work fails, then any resources * acquired in the process should be freed before this method returns. * In this way, the surrounding implementation can take advantage of a * false return value to avoid calling {@link * #doOptionalReleaseActions() doOptionalReleaseActions()} as part of the * {@link #tryRelease() tryRelease()} method.

    * * Note:

    * * The default implementation does nothing and always returns * false.

    * * @return true if optional lock actions are performed and they * succeed, else false */ protected boolean doOptionalLockActions() { return false; } /** * Provides any optional release actions for the {@link #tryRelease() * tryRelease()} template method.

    * * PRE:

    * * It is important that this method does not rethrow any exceptions * it encounters as unchecked exceptions to the calling context.

    * * POST:

    * * In general, false should be returned if optional locking work * is not performed or if it fails, else true. However, the return * value is currenly treated as purely informative.

    * * Note:

    * * The default implementation does nothing and always returns false.

    * * @return true if optional release actions are performed and they * succeed, else false */ protected boolean doOptionalReleaseActions() { return false; } /** * Initializes this object with a File object whose path has the * canonical form of the given path argument.

    * * PRE:

    * *

      *
    1. This method is called once and only once per * Lockfile instance. * *
    2. It is always the first method called after * LockFile construction * *
    3. The supplied path argument is never * null. *
    * * @param path the abstract path representing the file this object is to * use as its lock file * @throws FileCanonicalizationException if an I/O error occurs upon * canonicalization of the given path, which is possible because * the given path may be illegal on the runtime file system or * because construction of the canonical pathname may require * native file system queries * @throws FileSecurityException if a required system property value cannot * be accessed, or if a Java security manager exists and its * {@link java.lang.SecurityManager#checkRead} method denies * read access to the file; or if its {@link * java.lang.SecurityManager#checkRead(java.lang.String)} * method does not permit verification of the existence of * all necessary parent directories; or if * its {@link * java.lang.SecurityManager#checkWrite(java.lang.String)} * method does not permit all necessary parent directories to be * created */ private final void setPath(String path) throws LockFile.FileCanonicalizationException, LockFile.FileSecurityException { // Should at least be absolutized for reporting purposes, just in case // a security or canonicalization exception gets thrown. path = FileUtil.getDefaultInstance().canonicalOrAbsolutePath(path); this.file = new File(path); try { FileUtil.getDefaultInstance().makeParentDirectories(this.file); } catch (SecurityException ex) { throw new FileSecurityException(this, "setPath", ex); } try { this.file = FileUtil.getDefaultInstance().canonicalFile(path); } catch (SecurityException ex) { throw new FileSecurityException(this, "setPath", ex); } catch (IOException ex) { throw new FileCanonicalizationException(this, "setPath", ex); } this.cpath = this.file.getPath(); } /** * Opens (constructs) this object's {@link #raf RandomAccessFile}.

    * * @throws UnexpectedFileNotFoundException if a * FileNotFoundException is thrown in reponse to * constructing the RandomAccessFile object. * @throws FileSecurityException if a required system property value cannot * be accessed, or if a Java security manager exists and its * {@link java.lang.SecurityManager#checkRead} method * denies read access to the file; or if its {@link * java.lang.SecurityManager#checkWrite(java.lang.String)} * method denies write access to the file */ private final void openRAF() throws LockFile.UnexpectedFileNotFoundException, LockFile.FileSecurityException { try { raf = new RandomAccessFile(file, "rw"); } catch (SecurityException ex) { throw new FileSecurityException(this, "openRAF", ex); } catch (FileNotFoundException ex) { throw new UnexpectedFileNotFoundException(this, "openRAF", ex); } catch (IOException ex) { throw new UnexpectedFileNotFoundException(this, "openRAF", ex); } } /** * Checks whether the given DataInputStream contains the * {@link #MAGIC} value. * * @param dis the stream to check * @throws FileSecurityException if a required system property value cannot * be accessed, or if a Java security manager exists and its * {@link java.lang.SecurityManager#checkRead} method * denies read access to the file * @throws UnexpectedEndOfFileException if an EOFException is * thrown while reading the DataInputStream * @throws UnexpectedFileIOException if an IOException other than * EOFException is thrown while reading the * DataInputStream * @throws WrongMagicException if a value other than MAGIC is read * from the DataInputStream */ private final void checkMagic(final DataInputStream dis) throws LockFile.FileSecurityException, LockFile.UnexpectedEndOfFileException, LockFile.UnexpectedFileIOException, LockFile.WrongMagicException { boolean success = true; final byte[] magic = new byte[MAGIC.length]; try { for (int i = 0; i < MAGIC.length; i++) { magic[i] = dis.readByte(); if (MAGIC[i] != magic[i]) { success = false; } } } catch (SecurityException ex) { throw new FileSecurityException(this, "checkMagic", ex); } catch (EOFException ex) { throw new UnexpectedEndOfFileException(this, "checkMagic", ex); } catch (IOException ex) { throw new UnexpectedFileIOException(this, "checkMagic", ex); } if (!success) { throw new WrongMagicException(this, "checkMagic", magic); } } /** * Retrieves the last written hearbeat timestamp from this object's lock * file. If this object's lock file does not exist, then Long.MIN_VALUE * (the earliest time representable as a long in Java) is * returned immediately.

    * * @return the hearbeat timestamp read from this object's lock file, * as a long value or, if this object's lock * file does not exist, Long.MIN_VALUE, the earliest time * representable as a long in Java. * @throws FileSecurityException if a required system property value cannot * be accessed, or if a Java security manager exists and its * {@link java.lang.SecurityManager#checkRead} method * denies read access to the file * @throws UnexpectedEndOfFileException if an EOFException is * thrown while attempting to read the target file's MAGIC * or heartbeat timestamp value * @throws UnexpectedFileNotFoundException if, after successfully testing * for existence, the target file is not found a moment later while * attempting to read its MAGIC and heartbeat timestamp * values * @throws UnexpectedFileIOException if any other input stream error occurs * @throws WrongMagicException if the lock file does not start with the * the {@link #MAGIC} value */ private final long readHeartbeat() throws LockFile.FileSecurityException, LockFile.UnexpectedFileNotFoundException, LockFile.UnexpectedEndOfFileException, LockFile.UnexpectedFileIOException, LockFile.WrongMagicException { FileInputStream fis = null; DataInputStream dis = null; try { if (!file.exists()) { return Long.MIN_VALUE; } fis = new FileInputStream(file); dis = new DataInputStream(fis); checkMagic(dis); return dis.readLong(); } catch (SecurityException ex) { throw new FileSecurityException(this, "readHeartbeat", ex); } catch (FileNotFoundException ex) { throw new UnexpectedFileNotFoundException(this, "readHeartbeat", ex); } catch (EOFException ex) { throw new UnexpectedEndOfFileException(this, "readHeartbeat", ex); } catch (IOException ex) { throw new UnexpectedFileIOException(this, "readHeartbeat", ex); } finally { if (fis != null) { try { fis.close(); } catch (IOException ioe) { // ioe.printStackTrace(); } } } } /** * Schedules the lock heartbeat task. */ private final void startHeartbeat() { if (timerTask == null || HsqlTimer.isCancelled(timerTask)) { Runnable runner = new HeartbeatRunner(); timerTask = timer.schedulePeriodicallyAfter(0, HEARTBEAT_INTERVAL, runner, true); } } /** * Cancels the lock heartbeat task. */ private final void stopHeartbeat() { if (timerTask != null && !HsqlTimer.isCancelled(timerTask)) { HsqlTimer.cancel(timerTask); timerTask = null; } } /** * Writes the {@link #MAGIC} value to this object's lock file that * distiguishes it as an HSQLDB lock file.

    * * @throws FileSecurityException possibly never (seek and write are native * methods whose JavaDoc entries do not actually specify throwing * SecurityException). However, it is conceivable that these * native methods may, in turn, access Java methods that do * throw SecurityException. In this case, a * SecurityException might be thrown if a required system * property value cannot be accessed, or if a security manager exists * and its {@link * java.lang.SecurityManager#checkWrite(java.io.FileDescriptor)} * method denies write access to the file * @throws UnexpectedEndOfFileException if an end of file exception is * thrown while attempting to write the MAGIC value to the * target file (typically, this cannot happen, but the case is * included to distiguish it from the general IOException * case). * @throws UnexpectedFileIOException if any other I/O error occurs while * attepting to write the MAGIC value to the target file. */ private final void writeMagic() throws LockFile.FileSecurityException, LockFile.UnexpectedEndOfFileException, LockFile.UnexpectedFileIOException { try { raf.seek(0); raf.write(MAGIC); } catch (SecurityException ex) { throw new FileSecurityException(this, "writeMagic", ex); } catch (EOFException ex) { throw new UnexpectedEndOfFileException(this, "writeMagic", ex); } catch (IOException ex) { throw new UnexpectedFileIOException(this, "writeMagic", ex); } } /** * Writes the current hearbeat timestamp value to this object's lock * file.

    * * @throws FileSecurityException possibly never (seek and write are native * methods whose JavaDoc entries do not actually specifiy throwing * SecurityException). However, it is conceivable that these * native methods may, in turn, access Java methods that do throw * SecurityException. In this case, a * SecurityException might be thrown if a required system * property value cannot be accessed, or if a security manager exists * and its {@link * java.lang.SecurityManager#checkWrite(java.io.FileDescriptor)} * method denies write access to the file * @throws UnexpectedEndOfFileException if an end of file exception is * thrown while attepting to write the heartbeat timestamp value to * the target file (typically, this cannot happen, but the case is * included to distiguish it from the general IOException case). * @throws UnexpectedFileIOException if the current heartbeat timestamp * value cannot be written due to an underlying I/O error */ private final void writeHeartbeat() throws LockFile.FileSecurityException, LockFile.UnexpectedEndOfFileException, LockFile.UnexpectedFileIOException { try { raf.seek(MAGIC.length); raf.writeLong(System.currentTimeMillis()); } catch (SecurityException ex) { throw new FileSecurityException(this, "writeHeartbeat", ex); } catch (EOFException ex) { throw new UnexpectedEndOfFileException(this, "writeHeartbeat", ex); } catch (IOException ex) { throw new UnexpectedFileIOException(this, "writeHeartbeat", ex); } } /** * Tests whether some other object is "equal to" this one.

    * * An object is considered equal to a LockFile object if and * only if it is not null, it is an instance of LockFile and * either it is the identical instance or it has the same lock file. More * formally, is is considered equal if and only if it is not null, it is an * instance of LockFile, and the expression:

    * *

         * this == other ||
         * this.file == null ? other.file == null : this.file.equals(other.file);
         * 
    * * yeilds true.

    * * Note that file must be a canonical reference to correctly * satisfy this contract.

    * * @param obj the reference object with which to compare. * @return true if this object is equal to the obj * argument; false otherwise. * @see #hashCode */ public final boolean equals(final Object obj) { if (this == obj) { return true; } else if (obj instanceof LockFile) { LockFile other = (LockFile) obj; return (this.file == null) ? other.file == null : this.file.equals(other.file); } return false; } /** * Retrieves the canonical path of this object's lock file, as a * String object.

    * * @return the canonical path of this object's lock file. */ public final String getCanonicalPath() { return cpath; } /** * Retrieves the hash code value for this object.

    * * The value is zero if file is null, else the * hashCode of file. That is, two LockFile * objects have the same hashCode value if they refer to the * same lock file.

    * * Note that file must be a canonical reference to correctly * satisfy this contract.

    * * @return a hash code value for this object. * @see #equals(java.lang.Object) */ public final int hashCode() { return file == null ? 0 : file.hashCode(); } /** * Retrieves whether this object has successfully obtained and is still * holding (has not yet released) a cooperative lock condition on its * lock file.

    * * Note:

    * * Due to platform-independence retrictions placed on a JVM, it is quite * possible to successfully acquire a lock condition and yet for the * condition to become invalid while still held.

    * * For instance, under JVMs with no java.nio package or under * operating systems that do not apply mandatory file locking (espcially * mandatory locking that precludes deletion), it is quite possible for * another process or even an uncooperative bit of code running in the same * JVM to overwrite or delete the target lock file while this object holds * a lock condition.

    * * Because of this, the isValid() method is provided in the public * interface in order to allow clients to detect at least a subset of such * situations.

    * * @return true if this object has successfully obtained and is * still holding (has not yet released) a lock condition, else * false * @see #isValid */ public final boolean isLocked() { return locked; } /** * Retrieves whether there is potentially already a cooperative lock, * operating system lock or some other situation preventing a cooperative * lock condition from being aquired using the specified path. * * @param path the path to test * @return true if there is currently something preventing the * acquisition of a cooperative lock condition using the specified * path, else false */ public final static boolean isLocked(final String path) { boolean locked = true; try { LockFile lockFile = LockFile.newLockFile(path); lockFile.checkHeartbeat(false); locked = false; } catch (Exception e) {} return locked; } /** * Retrieves whether this object holds a valid lock condition on its * lock file.

    * * More formally, this method retrieves true if and only if:

    * *

         * isLocked() && file != null && file.exists() && raf != null
         * 
    * * @return true if this object holds a valid lock condition on its * lock file; else false * @throws SecurityException if a required system property value cannot * be accessed, or if a Java security manager exists and its * checkRead method denies read access to the lock file; */ public boolean isValid() { return isLocked() && file != null && file.exists() && raf != null; } /** * Retrieves a String representation of this object.

    * * The String is of the form:

    * *

         * super.toString() +
         * "[file=" + getCanonicalPath() +
         * ", exists=" + file.exists() +
         * ", locked=" + isLocked() +
         * ", valid=" + isValid() +
         * ", " + toStringImpl() +
         * "]";
         * 
    * * * @return a String representation of this object. * @see #toStringImpl * @throws SecurityException if a required system property value cannot * be accessed, or if a security manager exists and its {@link * java.lang.SecurityManager#checkRead} method denies * read access to the lock file; */ public String toString() { return new StringBuffer(super.toString()).append("[file =").append( cpath).append(", exists=").append(file.exists()).append( ", locked=").append(isLocked()).append(", valid=").append( isValid()).append(", ").append(toStringImpl()).append( "]").toString(); } /** * Retrieves an implementation-specific tail value for the * toString() method.

    * * The default implementation returns the empty string. * * @return an implementation-specific tail value for the toString() * method * @see #toString */ protected String toStringImpl() { return ""; } /** * Retrieves the number of times checkHeartbeat may fail before * pollHeartbeat fails as a consequence.

    * * The value is obtained in the following manner:

    * *

      *
    1. retries is assigned POLL_RETRIES_DEFAULT. * *
    2. retries is assigned Integer.getInteger(POLL_RETRIES_PROPERTY, * retries) inside a try-catch block to silently ignore any security * exception. * *
    3. If retries is less than one (1), retries is assigned one (1). *
    * * @return the number of times checkHeartbeat may fail before * pollHeartbeat fails as a consequence. */ public int getPollHeartbeatRetries() { int retries = POLL_RETRIES_DEFAULT; try { retries = Integer.getInteger( HsqlDatabaseProperties.system_lockfile_poll_retries_property, retries).intValue(); } catch (Exception e) {} if (retries < 1) { retries = 1; } return retries; } /** * Retrieves the interval, in milliseconds, that pollHeartbeat * waits between failed invocations of checkHeartbeat. * * The value is obtained in the following manner:

    * *

      *
    1. interval is assigned 10 + (HEARTBEAT_INTERVAL_PADDED * getPollHeartbeatRetries()) * *
    2. interval is assigned Long.getLong(POLL_INTERVAL_PROPERTY, * interval), inside a try-catch block, to silently ignore any security * exception. * *
    3. If interval is less than or equal to zero (0), interval is reassigned * 10 + (HEARTBEAT_INTERVAL_PADDED / getPollHeartbeatRetries()) *
    * * @return the interval, in milliseconds, that pollHeartbeat * waits between failed invocations of checkHeartbeat */ public long getPollHeartbeatInterval() { int retries = getPollHeartbeatRetries(); long interval = 10 + (HEARTBEAT_INTERVAL_PADDED / retries); try { interval = Long.getLong(POLL_INTERVAL_PROPERTY, interval).longValue(); } catch (Exception e) {} if (interval <= 0) { interval = 10 + (HEARTBEAT_INTERVAL_PADDED / retries); } return interval; } /** * Polls the underlying lock file to determine if a lock condition * exists.

    * * Specifically, polls {@link #checkHeartbeat(boolean) checkHeartbeat} at * the configured interval until the check passes, the current poll interval * wait state is interrupted or the configured number of poll retries is * reached.

    * * The last exception thrown by checkHeartbeat is re-thrown if no * check passes.

    * * @throws FileSecurityException if the Java security system denied read * to the target file * @throws LockHeldExternallyException if the target file's heartbeat * timestamp indicated that a lock condition was held by another * LockFile. * @throws UnexpectedFileNotFoundException if the target file became * unavailable between a test for existence and an attempt to read * the MAGIC or heartbeat timestamp value. * @throws UnexpectedEndOfFileException if an EOFException was * raised while trying to read the MAGIC or heartbeat * timestamp value of the target file * @throws UnexpectedFileIOException if an EOFException other than * EOFException was raised while trying to read the * MAGIC or heartbeat timestamp value of the target file * @throws WrongLengthException if the target file did not have the * expected length * @throws WrongMagicException if the target file did not begin with the * expected MAGIC value */ private final void pollHeartbeat() throws LockFile.FileSecurityException, LockFile.LockHeldExternallyException, LockFile.UnexpectedFileNotFoundException, LockFile.UnexpectedEndOfFileException, LockFile.UnexpectedFileIOException, LockFile.WrongLengthException, LockFile.WrongMagicException { boolean success = false; int retries = getPollHeartbeatRetries(); long interval = getPollHeartbeatInterval(); LockFile.BaseException reason = null; for (int i = retries; i > 0; i--) { try { checkHeartbeat(true); // withCreateNewFile == true success = true; break; } catch (LockFile.BaseException ex) { reason = ex; } // We get here if and only if success == false and reason != null, // so its OK to 'break' try { Thread.sleep(interval); } catch (InterruptedException ex) { break; } } // TODO: // Do not want to specify just BaseException in the throws clause. // Is this really the cleanest way? if (!success) { if (reason instanceof FileSecurityException) { throw (FileSecurityException) reason; } else if (reason instanceof LockHeldExternallyException) { throw (LockHeldExternallyException) reason; } else if (reason instanceof UnexpectedFileNotFoundException) { throw (UnexpectedFileNotFoundException) reason; } else if (reason instanceof UnexpectedEndOfFileException) { throw (UnexpectedEndOfFileException) reason; } else if (reason instanceof UnexpectedFileIOException) { throw (UnexpectedFileIOException) reason; } else if (reason instanceof WrongLengthException) { throw (WrongLengthException) reason; } else if (reason instanceof WrongMagicException) { throw (WrongMagicException) reason; } } } /** * Attempts to obtain a cooperative lock condition upon this object's lock * file.

    * * @return true if this object already holds a lock or the lock was * obtained successfully, else false * @throws FileSecurityException if the lock condition could not be * obtained due to a Java security permission violation * @throws LockHeldExternallyException if the lock condition could not * be obtained because the target file's heartbeat timestamp indicated * that a lock condition was held by another LockFile. * @throws UnexpectedFileNotFoundException if the lock condition could not * be obtained because the target file became unavailable between a * successful test for existence and an attempt to read its * MAGIC or heartbeat timestamp value. * @throws UnexpectedEndOfFileException if the lock condition could not be * obtained because EOFException was raised while trying to * read the MAGIC or heartbeat timestamp value of the target * file * @throws UnexpectedFileIOException if the lock condition could not be * obtained due to an IOException other than * EOFException * @throws WrongLengthException if the lock condition could not be obtained * because the target file was the wrong length * @throws WrongMagicException if the lock condition could not be obtained * because the target file had the wrong MAGIC value * @return true if and only if a lock condition is obtained; * false otherwise. In general, an exception will * always be thrown if a lock condition cannot be obtained for * any reason */ public final boolean tryLock() throws LockFile.FileSecurityException, LockFile.LockHeldExternallyException, LockFile.UnexpectedFileNotFoundException, LockFile.UnexpectedEndOfFileException, LockFile.UnexpectedFileIOException, LockFile.WrongLengthException, LockFile.WrongMagicException { if (this.locked) { return true; } try { pollHeartbeat(); openRAF(); // Must come *after* openRAF to comply with the // doOptionalLockActions() PRE: assertion contract. // // In an ideal world, it would be possible from Java to open // a file handle and obtain at least one associated NIO FileLock in // one kernel-enforced atomic operation. However, we can't even // guarantee that NIO is available. // // Note: // The NIOLockFile version of this operation is 'self cleaning'... // if it fails for some reason, then it does a 'best effort' to // eagerly release and nullify its FileLock object before // returning. doOptionalLockActions(); // Inlined the following to reduce potential for timing issues // such as initial timer thread startup induced delay of first // pulse. // // In general, what we'll get is two initial pulses in rapid // sucession: one here and one an instant later as a result of // startHeartbeat (which is OK... no harm, and it's one-shot // behaviour, not repeated on every writeHeartbeat) // // Unfortunately, we may occasionally encounter astronomic (at least // in computer time) delays between invocation of startHeartbeat // and the time at which effort is actually expended toward writing // the initial MAGIC and heartbeat timestamp values. // // Another good reason to inline the first writeHeartbeat is to // provide a last line of defence against inter-process as well // as inter-thread race conditions. That is, exceptions thrown in // HeartbeatRunner.run() do yet get propagated anywhere useful. // // Of course, if we are operating under a fully-featured and correct // NIO implementation, the concerns described above are really // non-issues... at this point, we will have (at least in theory) a // valid OS-enforced file lock. // // But in an ideal world (with or without NIO), any pulse failure in // HeartbeatRunner.run() would flag the database Logger that a // database lock condition violation has occured, preventing further // ad-hoc operation of the database. // // The problem is, if a lock condition has been violated that is // being used by a database instance, what mechanism can be used to // safely checkpoint, backup and/or shut down that instance? For // all we know, the violation indicates that another instance is now // happily writing to the other database files... // // A prudent course of action to take under detection of a // cooperative lock condition violation in the heartbeatRunner task // would be to perform a 'SCRIPT ' to some pre-ordained 'safe' // backup location using a globally unique file name and then do a // 'SHUTDOWN IMMEDIATELY' in one database-scope atomic context (e.g. // a single JDBC statement execution). // // However, by the time a lock condition violation has been detected, // the data cache file (and log/script) may already be quite // corrupted, meaning the resulting script may be totally inaccurate // or worse. // // Bottom line: // // Regardless of this inlining measure, if a lock violation occurs // after startHeartbeat, it's almost certain there's much worse in // store... writeMagic(); writeHeartbeat(); FileUtil.getDefaultInstance().deleteOnExit(file); this.locked = true; startHeartbeat(); } finally { if (!locked) { // No harm in this... // // If this LockFile is an NIOLockFile instance and // doOptionalLockActions() failed above, then a 'best // effort' optional release was already perfomed and // this will be a no-op. // // On the other hand, if doOptionalLockActions() succeeded, best // to undo them here right away, since the core locking work // failed. // // In practice, however, it is very unlikely for the core // locking work to fail if this LockFile is an NIOLockFile // instance and doOptionalLockActions() succeeded, except // under JVM implementations whose NIO package is broken in // a very specific way. // // Other possibilities include unfortunate timing of events // under certain network file system or removable media // configurations, device umounts, physical removal of storage // media, Java security or file system security policy // updates, etc. doOptionalReleaseActions(); try { closeRAF(); } catch (Exception ex) { // It's too late to do anything useful with this exception. // // we've already/ failed and will let the caller know the // reason via the exception thrown in the try block. // // ex.printStackTrace(); } } } return this.locked; } /** * Attempts to release any cooperative lock condition this object * may hold upon its lock file.

    * * * @return true if this object does not currently hold a * lock condition or the lock is released completely (including * successful file deletion), else false. * @throws FileSecurityException if a SecurityException is raised * in the process of releasing the lock condition * @throws UnexpectedFileIOException if an IoException is raised in the * process of releasing the lock condition */ public final boolean tryRelease() throws LockFile.FileSecurityException, LockFile.UnexpectedFileIOException { boolean released = !locked; if (released) { return true; } stopHeartbeat(); doOptionalReleaseActions(); UnexpectedFileIOException closeRAFReason = null; FileSecurityException securityReason = null; try { try { closeRAF(); } catch (UnexpectedFileIOException ex) { closeRAFReason = ex; } try { // Hack Alert: // // Even without the presence of concurrent locking attempts, // the delete or exists invocations below occasionally return // false otherwise, perhaps due to a race condition with the // heartbeat timestamp writer task or some nio file lock release // timing issue? // // TODO: // // determine if this is an external constraint or if we can // solve it instead by waiting for any in-progress // writeHeartbeat operation to conclude. Thread.sleep(100); } catch (Exception ex) { // ex.printStackTrace(); } try { released = file.delete(); // Perhaps excessive... // // Another Lockfile may recreate the file an instant after it is // deleted above (if it it deleted successfully, that is) // released = !file.exists(); } catch (SecurityException ex) { securityReason = new FileSecurityException(this, "tryRelease", ex); } } finally { // Regardless of whether all release work succeeds, it is important // to indicate that, from the perspective of this instance, a lock // condition is no longer held. // // However, in a world of concurrent execution, we do not want to // to expose this fact extenally until *after* all release work has // been at least attempted. this.locked = false; } if (closeRAFReason != null) { throw closeRAFReason; } else if (securityReason != null) { throw securityReason; } return released; } /** * Attempts to release this object's cooperative lock condition.

    * * @throws Throwable if this object encounters an unhandled exception * while trying to release the cooperative lock condition */ protected final void finalize() throws Throwable { this.tryRelease(); } /** * For internal use only.

    * * This Runnable class provides the implementation for the timed task * that periodically writes out a heartbeat timestamp to the lock file.

    */ private final class HeartbeatRunner implements Runnable { public void run() { try { LockFile.this.writeHeartbeat(); } catch (Throwable t) { Trace.printSystemOut(t.toString()); } } } /** * Base exception class for lock condition specific exceptions.

    * */ public abstract static class BaseException extends Exception { private final LockFile lockFile; private final String inMethod; /** * Constructs a new LockFile.BaseException.

    * * @param lockFile the underlying LockFile object * @param inMethod the name of the method in which the exception * was originally thrown (may be passed up serveral levels) */ public BaseException(final LockFile lockFile, final String inMethod) { super(); if (lockFile == null) { throw new NullPointerException("lockFile"); } if (inMethod == null) { throw new NullPointerException("inMethod"); } this.lockFile = lockFile; this.inMethod = inMethod; } /** * Subclass-specific override.

    * * @return representation of lockFile and * inMethod, as String object */ public String getMessage() { // override return "lockFile: " + lockFile + " method: " + inMethod; } /** * Getter for inMethod property.

    * * @return name of method in which exception originally occured */ public String getInMethod() { return this.inMethod; } /** * Getter for lockFile property.

    * * @return the underlying LockFile object */ public LockFile getLockFile() { return this.lockFile; } } /** * Thrown when canonicalization of a LockFile object's target * file path fails.

    * * This is possible because the given path may be illegal on the runtime * file system or because construction of the canonical pathname may require * filesystem queries. */ public static final class FileCanonicalizationException extends BaseException { private final IOException reason; /** * Constructs a new FileCanonicalizationException.

    * * @param lockFile the underlying LockFile object * @param inMethod the name of the method in which the exception * was originally thrown (may be passed up serveral levels) * @param reason the exception thrown during canonicalization */ public FileCanonicalizationException(final LockFile lockFile, final String inMethod, final IOException reason) { super(lockFile, inMethod); this.reason = reason; } /** * Retrieves the underlying IOException.

    * * @return Value of property reason. */ public IOException getReason() { return this.reason; } /** * Subclass-specific override.

    * * @return representation of lockFile, inMethod and * reason, as a String object */ public String getMessage() { // override return super.getMessage() + " reason: " + reason; } } /** * Thrown when access to a LockFile object's target file raises a * Java SecurityEception.

    * * This can occur if a required system property value cannot be accessed, or * if a security manager exists and its {@link * java.lang.SecurityManager#checkRead} method denies read access to a * file; or if its {@link * java.lang.SecurityManager#checkRead(java.lang.String)} * method does not permit verification of the existence of all necessary * parent directories; or if its {@link * java.lang.SecurityManager#checkWrite(java.lang.String)} * method does not permit all necessary parent directories to be * created.

    * */ public static final class FileSecurityException extends BaseException { private final SecurityException reason; /** * Constructs a new FileSecurityException.

    * * @param lockFile the underlying LockFile object * @param inMethod the name of the method in which the exception * was originally thrown (may be passed up serveral levels) * @param reason the underlying Java security exception */ public FileSecurityException(final LockFile lockFile, final String inMethod, final SecurityException reason) { super(lockFile, inMethod); this.reason = reason; } /** * Retrieves the underlying SecurityException.

    * * @return Value of property reason. */ public SecurityException getReason() { return this.reason; } /** * Subclass-specific override. * * @return representation of lockFile, inMethod and reason, as * a String object */ public String getMessage() { // override return super.getMessage() + " reason: " + reason; } } /** * Thrown when an externally held lock condition prevents lock * aquisition.

    * * Specifically, this exception is thrown when polling fails because the * lock file's heartbeat timestamp value indicates that another LockFile * object still holds the lock condition.

    * */ public static final class LockHeldExternallyException extends BaseException { private final long read; private final long heartbeat; /** * Constructs a new LockHeldExternallyException.

    * * @param lockFile the underlying LockFile object * @param inMethod the name of the method in which the exception * was originally thrown (may be passed up serveral levels) * @param read the time, in milliseconds since 1970-01-01, at which * the heartbeat timestamp value was read from the lock file * @param heartbeat the heartbeat timestamp value, in milliseconds * since 1970-01-01, that was read from the lock file. */ public LockHeldExternallyException(final LockFile lockFile, final String inMethod, final long read, final long heartbeat) { super(lockFile, inMethod); this.read = read; this.heartbeat = heartbeat; } /** * Getter for the heartbeat attribute.

    * * @return the heartbeat timestamp value, in milliseconds since * 1970-01-01, that was read from the lock file. */ public long getHeartbeat() { return this.heartbeat; } /** * Getter for the read attribute.

    * * @return the time, in milliseconds since 1970-01-01, that * the heartbeat timestamp value was read from the lock file. */ public long getRead() { return this.read; } /** * Subclass-specific override.

    * * @return representation of lockFile, inMethod, * read and heartbeat, as a String * object */ public String getMessage() { // override return super.getMessage() + " read: " + HsqlDateTime.getTimestampString(this.read) + " heartbeat - read: " + (this.heartbeat - this.read) + " ms."; } } /** * Thrown when access to a LockFile object's target file raises an * unexpected EOFException. */ public static final class UnexpectedEndOfFileException extends BaseException { private final EOFException reason; /** * Constructs a new UnexpectedEndOfFileException.

    * * @param lockFile the underlying LockFile object * @param inMethod the name of the method in which the exception * was originally thrown (may be passed up serveral levels) * @param reason the underlying exception */ public UnexpectedEndOfFileException(final LockFile lockFile, final String inMethod, final EOFException reason) { super(lockFile, inMethod); this.reason = reason; } /** * Retrieves the underlying EOFException.

    * * @return Value of property reason. */ public EOFException getReason() { return this.reason; } /** * Subclass-specific override.

    * * @return representation of lockFile, inMethod and * reason, as a String object */ public String getMessage() { // override return super.getMessage() + " reason: " + reason; } } /** * Thrown when access to a LockFile object's target file raises an * unexpected IOException other than EOFException. */ public static final class UnexpectedFileIOException extends BaseException { private final IOException reason; /** * Constructs a new UnexpectedFileIOException. * * @param lockFile the underlying LockFile object * @param inMethod the name of the method in which the exception * was originally thrown (may be passed up serveral levels) * @param reason the underlying exception */ public UnexpectedFileIOException(final LockFile lockFile, final String inMethod, final IOException reason) { super(lockFile, inMethod); this.reason = reason; } /** * Retrieves the underlying IOException. * * @return Value of property reason. */ public IOException getReason() { return this.reason; } /** * Subclass-specific override. * * @return representation of lockFile, inMethod and * reason, as a String object */ public String getMessage() { // override return super.getMessage() + " reason: " + reason; } } /** * Thrown when access to a LockFile object's target file raises an * unexpected FileNotFoundException. */ public static final class UnexpectedFileNotFoundException extends BaseException { private final IOException reason; /** * Constructs a new UnexpectedFileNotFoundException.

    * * @param lockFile the underlying LockFile object * @param inMethod the name of the method in which the exception * was originally thrown (may be passed up serveral levels) * @param reason the underlying exception */ public UnexpectedFileNotFoundException(final LockFile lockFile, final String inMethod, final IOException reason) { super(lockFile, inMethod); this.reason = reason; } /** * Retrieves the underlying FileNotFoundException. * * @return Value of property reason. */ public IOException getReason() { return this.reason; } /** * Subclass-specific override. * * @return representation of lockFile, inMethod and reason, as * a String object */ public String getMessage() { // override return super.getMessage() + " reason: " + reason; } } /** * Thrown when it is detected that a LockFile object's target file does not * have the expected length. */ public static final class WrongLengthException extends BaseException { private final long length; /** * Constructs a new WrongLengthException. * * @param lockFile the underlying LockFile object * @param inMethod the name of the method in which the exception * was originally thrown (may be passed up serveral levels) * @param length the actual length reported by the file system */ public WrongLengthException(final LockFile lockFile, final String inMethod, final long length) { super(lockFile, inMethod); this.length = length; } /** * Retreives the actual length reported by the file system. * * @return the actual length reported by the file system */ public long getLength() { return this.length; } /** * Subclass-specific override. * * @return representation of lockFile, inMethod and length, as * a String object */ public String getMessage() { // override return super.getMessage() + " length: " + length; } } /** * Thrown when it is detected that a LockFile object's target file does not * start with the expected MAGIC value. */ public static final class WrongMagicException extends BaseException { private final byte[] magic; /** * Constructs a new WrongMagicException. * * @param lockFile the underlying LockFile object * @param inMethod the name of the method in which the exception * was originally thrown (may be passed up serveral levels) * @param magic the actual magic value read from the file */ public WrongMagicException(final LockFile lockFile, final String inMethod, final byte[] magic) { super(lockFile, inMethod); this.magic = magic; } /** * Subclass-specific override. * * @return representation of inMethod, file and magic, * as a String object */ public String getMessage() { // override String message = super.getMessage() + " magic: "; message = message + ((magic == null) ? "null" : "'" + StringConverter.byteToHex(magic) + "'"); return message; } /** * Retrieves a copy of the actual MAGIC value read from the * file.

    * * @return a copy of the actual MAGIC value read from the file */ public byte[] getMagic() { return (magic == null) ? null : (byte[]) this.magic.clone(); } } } hsqldb-1.8.0.10.orig/src/org/hsqldb/persist/DataFileDefrag.java0000644000175000017500000002361110735721641022601 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.persist; import java.io.BufferedOutputStream; import java.io.IOException; import java.io.OutputStream; import org.hsqldb.Database; import org.hsqldb.HsqlException; import org.hsqldb.Session; import org.hsqldb.Table; import org.hsqldb.Trace; import org.hsqldb.index.RowIterator; import org.hsqldb.lib.DoubleIntIndex; import org.hsqldb.lib.HsqlArrayList; import org.hsqldb.lib.StopWatch; import org.hsqldb.lib.Storage; import org.hsqldb.rowio.RowInputInterface; import org.hsqldb.rowio.RowOutputBinary; // oj@openoffice.org - changed to file access api /** * Routine to defrag the *.data file. * * This method iterates over the primary index of a table to find the * disk position for each row and stores it, together with the new position * in an array. * * A second pass over the primary index writes each row to the new disk * image after translating the old pointers to the new. * * @author fredt@users * @version 1.8.0 * @since 1.7.2 */ final class DataFileDefrag { BufferedOutputStream fileStreamOut; long fileOffset; StopWatch stopw = new StopWatch(); String filename; int[][] rootsList; Database database; DataFileCache cache; int scale; DoubleIntIndex transactionRowLookup; DataFileDefrag(Database db, DataFileCache cache, String filename) { this.database = db; this.cache = cache; this.scale = cache.cacheFileScale; this.filename = filename; } void process() throws HsqlException, IOException { boolean complete = false; Trace.printSystemOut("Defrag Transfer begins"); transactionRowLookup = database.txManager.getTransactionIDList(); HsqlArrayList allTables = database.schemaManager.getAllTables(); rootsList = new int[allTables.size()][]; Storage dest = null; try { OutputStream fos = database.getFileAccess().openOutputStreamElement(filename + ".new"); fileStreamOut = new BufferedOutputStream(fos, 1 << 12); for (int i = 0; i < DataFileCache.INITIAL_FREE_POS; i++) { fileStreamOut.write(0); } fileOffset = DataFileCache.INITIAL_FREE_POS; for (int i = 0, tSize = allTables.size(); i < tSize; i++) { Table t = (Table) allTables.get(i); if (t.getTableType() == Table.CACHED_TABLE) { int[] rootsArray = writeTableToDataFile(t); rootsList[i] = rootsArray; } else { rootsList[i] = null; } Trace.printSystemOut(t.getName().name + " complete"); } writeTransactionRows(); fileStreamOut.flush(); fileStreamOut.close(); fileStreamOut = null; // write out the end of file position dest = ScaledRAFile.newScaledRAFile( database, filename + ".new", false, ScaledRAFile.DATA_FILE_RAF, database .getURLProperties().getProperty( "storage_class_name"), database.getURLProperties() .getProperty("storage_key")); dest.seek(DataFileCache.LONG_FREE_POS_POS); dest.writeLong(fileOffset); dest.close(); dest = null; for (int i = 0, size = rootsList.length; i < size; i++) { int[] roots = rootsList[i]; if (roots != null) { Trace.printSystemOut( org.hsqldb.lib.StringUtil.getList(roots, ",", "")); } } complete = true; } catch (IOException e) { throw Trace.error(Trace.FILE_IO_ERROR, filename + ".new"); } catch (OutOfMemoryError e) { throw Trace.error(Trace.OUT_OF_MEMORY); } finally { if (fileStreamOut != null) { fileStreamOut.close(); } if (dest != null) { dest.close(); } if (!complete) { database.getFileAccess().removeElement(filename + ".new"); } } //Trace.printSystemOut("Transfer complete: ", stopw.elapsedTime()); } /** * called from outside after the complete end of defrag */ void updateTableIndexRoots() throws HsqlException { HsqlArrayList allTables = database.schemaManager.getAllTables(); for (int i = 0, size = allTables.size(); i < size; i++) { Table t = (Table) allTables.get(i); if (t.getTableType() == Table.CACHED_TABLE) { int[] rootsArray = rootsList[i]; t.setIndexRoots(rootsArray); } } } /** * called from outside after the complete end of defrag */ void updateTransactionRowIDs() throws HsqlException { database.txManager.convertTransactionIDs(transactionRowLookup); } int[] writeTableToDataFile(Table table) throws IOException, HsqlException { Session session = database.getSessionManager().getSysSession(); RowOutputBinary rowOut = new RowOutputBinary(); DoubleIntIndex pointerLookup = new DoubleIntIndex(table.getPrimaryIndex().sizeEstimate(), false); int[] rootsArray = table.getIndexRootsArray(); long pos = fileOffset; int count = 0; pointerLookup.setKeysSearchTarget(); Trace.printSystemOut("lookup begins: " + stopw.elapsedTime()); RowIterator it = table.rowIterator(session); for (; it.hasNext(); count++) { CachedObject row = (CachedObject) it.next(); pointerLookup.addUnsorted(row.getPos(), (int) (pos / scale)); if (count % 50000 == 0) { Trace.printSystemOut("pointer pair for row " + count + " " + row.getPos() + " " + pos); } pos += row.getStorageSize(); } Trace.printSystemOut(table.getName().name + " list done ", stopw.elapsedTime()); count = 0; it = table.rowIterator(session); for (; it.hasNext(); count++) { CachedObject row = it.next(); rowOut.reset(); row.write(rowOut, pointerLookup); fileStreamOut.write(rowOut.getOutputStream().getBuffer(), 0, rowOut.size()); fileOffset += row.getStorageSize(); if ((count) % 50000 == 0) { Trace.printSystemOut(count + " rows " + stopw.elapsedTime()); } } for (int i = 0; i < rootsArray.length; i++) { if (rootsArray[i] == -1) { continue; } int lookupIndex = pointerLookup.findFirstEqualKeyIndex(rootsArray[i]); if (lookupIndex == -1) { throw Trace.error(Trace.DATA_FILE_ERROR); } rootsArray[i] = pointerLookup.getValue(lookupIndex); } setTransactionRowLookups(pointerLookup); Trace.printSystemOut(table.getName().name + " : table converted"); return rootsArray; } void setTransactionRowLookups(DoubleIntIndex pointerLookup) { for (int i = 0, size = transactionRowLookup.size(); i < size; i++) { int key = transactionRowLookup.getKey(i); int lookupIndex = pointerLookup.findFirstEqualKeyIndex(key); if (lookupIndex != -1) { transactionRowLookup.setValue( i, pointerLookup.getValue(lookupIndex)); } } } void writeTransactionRows() { for (int i = 0, size = transactionRowLookup.size(); i < size; i++) { if (transactionRowLookup.getValue(i) != 0) { continue; } int key = transactionRowLookup.getKey(i); try { transactionRowLookup.setValue(i, (int) (fileOffset / scale)); RowInputInterface rowIn = cache.readObject(key); fileStreamOut.write(rowIn.getBuffer(), 0, rowIn.getSize()); fileOffset += rowIn.getSize(); } catch (IOException e) {} } } } hsqldb-1.8.0.10.orig/src/org/hsqldb/persist/ScriptRunner.java0000644000175000017500000001515710653175300022455 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.persist; import java.io.EOFException; import org.hsqldb.Database; import org.hsqldb.HsqlException; import org.hsqldb.Result; import org.hsqldb.Session; import org.hsqldb.Trace; import org.hsqldb.lib.IntKeyHashMap; import org.hsqldb.lib.SimpleLog; import org.hsqldb.lib.StopWatch; import org.hsqldb.scriptio.ScriptReaderBase; /** * Restores the state of a Database instance from an SQL log file.

    * * If there is an error, processing stops at that line and the message is * logged to the application log. If memory runs out, an exception is thrown. * * @author fredt@users * @version 1.8.0 * @since 1.7.2 */ public class ScriptRunner { /** * This is used to read the *.log file and manage any necessary * transaction rollback. * * @throws HsqlException */ public static void runScript(Database database, String logFilename, int logType) throws HsqlException { IntKeyHashMap sessionMap = new IntKeyHashMap(); Session sysSession = database.getSessionManager().getSysSession(); Session current = sysSession; int currentId = 0; database.setReferentialIntegrity(false); ScriptReaderBase scr = null; try { StopWatch sw = new StopWatch(); scr = ScriptReaderBase.newScriptReader(database, logFilename, logType); while (scr.readLoggedStatement(current)) { int sessionId = scr.getSessionNumber(); if (currentId != sessionId) { currentId = sessionId; current = (Session) sessionMap.get(currentId); if (current == null) { current = database.getSessionManager().newSession(database, sysSession.getUser(), false, true); sessionMap.put(currentId, current); } } if (current.isClosed()) { sessionMap.remove(currentId); continue; } Result result = null; switch (scr.getStatementType()) { case ScriptReaderBase.ANY_STATEMENT : result = current.sqlExecuteDirectNoPreChecks( scr.getLoggedStatement()); if (result != null && result.isError()) { if (result.getException() != null) { throw result.getException(); } throw Trace.error(result); } break; case ScriptReaderBase.SEQUENCE_STATEMENT : scr.getCurrentSequence().reset( scr.getSequenceValue()); break; case ScriptReaderBase.COMMIT_STATEMENT : current.commit(); break; case ScriptReaderBase.INSERT_STATEMENT : { Object[] data = scr.getData(); scr.getCurrentTable().insertNoCheckFromLog(current, data); break; } case ScriptReaderBase.DELETE_STATEMENT : { Object[] data = scr.getData(); scr.getCurrentTable().deleteNoCheckFromLog(current, data); break; } case ScriptReaderBase.SCHEMA_STATEMENT : { current.setSchema(scr.getCurrentSchema()); } } if (current.isClosed()) { sessionMap.remove(currentId); } } } catch (Throwable e) { String message; // catch out-of-memory errors and terminate if (e instanceof EOFException) { // end of file - normal end } else if (e instanceof OutOfMemoryError) { message = "out of memory processing " + logFilename + " line: " + scr.getLineNumber(); database.logger.appLog.logContext(SimpleLog.LOG_ERROR, message); throw Trace.error(Trace.OUT_OF_MEMORY); } else { // stop processing on bad log line message = logFilename + " line: " + scr.getLineNumber() + " " + e.toString(); database.logger.appLog.logContext(SimpleLog.LOG_ERROR, message); } } finally { if (scr != null) { scr.close(); } database.getSessionManager().closeAllSessions(); database.setReferentialIntegrity(true); } } } hsqldb-1.8.0.10.orig/src/org/hsqldb/persist/Log.java0000644000175000017500000006242510766517036020553 0ustar renerene/* Copyright (c) 1995-2000, The Hypersonic SQL Group. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the Hypersonic SQL Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE HYPERSONIC SQL GROUP, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * This software consists of voluntary contributions made by many individuals * on behalf of the Hypersonic SQL Group. * * * For work added by the HSQL Development Group: * * Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.persist; import java.io.File; import java.io.IOException; import org.hsqldb.Database; import org.hsqldb.HsqlException; import org.hsqldb.NumberSequence; import org.hsqldb.Session; import org.hsqldb.Table; import org.hsqldb.Trace; import org.hsqldb.lib.FileAccess; import org.hsqldb.lib.HashMap; import org.hsqldb.lib.Iterator; import org.hsqldb.lib.SimpleLog; import org.hsqldb.lib.ZipUnzipFile; import org.hsqldb.scriptio.ScriptReaderBase; import org.hsqldb.scriptio.ScriptWriterBase; // fredt@users 20020215 - patch 1.7.0 by fredt // to move operations on the database.properties files to new // class HsqlDatabaseProperties // fredt@users 20020220 - patch 488200 by xclayl@users - throw exception // throw addded to all methods relying on file io // fredt@users 20020221 - patch 513005 by sqlbob@users (RMP) // fredt@users 20020405 - patch 1.7.0 by fredt - no change in db location // because important information about the database is now stored in the // *.properties file, all database files should be in the same folder as the // *.properties file // tony_lai@users 20020820 - export hsqldb.log_size to .properties file // tony_lai@users 20020820 - changes to shutdown compact to save memory // fredt@users 20020910 - patch 1.7.1 by Nitin Chauhan - code improvements // fredt@users 20021208 - ongoing revamp // fredt@users 20021212 - do not rewrite the *.backup file if the *.data // file has not been updated in the current session. // boucherb@users 20030510 - patch 1.7.2 consolidated all periodic database // tasks in one timed task queue // fredt@users - 20050102 patch 1.8.0 - refactoring and clearer separation of concerns /** * This class is responsible for managing the database files. An HSQLDB database * consists of a .properties file, a .script file (contains an SQL script), * a .data file (contains data of cached tables) a .backup file * and a .log file.

    * When using TEXT tables, a data source for each table is also present.

    * * Notes on OpenOffice.org integration. * * A Storage API is used when HSQLDB is integrated into OpenOffice.org. All * file operations on the 4 main files are performed by OOo, which integrates * the contents of these files into its database file. The script format is * always TEXT in this case. * * Extensively rewritten and extended in successive versions of HSQLDB. * * @author Thomas Mueller (Hypersonic SQL Group) * @author fredt@users. * @version 1.8.0 * @since Hypersonic SQL */ public class Log { private HsqlDatabaseProperties properties; private String fileName; private Database database; private FileAccess fa; private ScriptWriterBase dbLogWriter; private String scriptFileName; private String logFileName; private boolean filesReadOnly; private long maxLogSize; private int writeDelay; private int scriptFormat; private DataFileCache cache; Log(Database db) throws HsqlException { database = db; fa = db.getFileAccess(); fileName = db.getPath(); properties = db.getProperties(); } void initParams() { // Allows the user to set log size in the properties file. int logMegas = properties.getIntegerProperty( HsqlDatabaseProperties.hsqldb_log_size, 0); maxLogSize = logMegas * 1024 * 1024; scriptFormat = properties.getIntegerProperty( HsqlDatabaseProperties.hsqldb_script_format, ScriptWriterBase.SCRIPT_TEXT_170); writeDelay = properties.getDefaultWriteDelay(); filesReadOnly = database.isFilesReadOnly(); scriptFileName = fileName + ".script"; logFileName = fileName + ".log"; } /** * When opening a database, the hsqldb.compatible_version property is * used to determine if this version of the engine is equal to or greater * than the earliest version of the engine capable of opening that * database.

    * * @throws HsqlException */ void open() throws HsqlException { initParams(); int state = properties.getDBModified(); switch (state) { case HsqlDatabaseProperties.FILES_MODIFIED : deleteNewAndOldFiles(); restoreBackup(); processScript(); processDataFile(); processLog(); close(false); if (cache != null) { cache.open(filesReadOnly); } reopenAllTextCaches(); break; case HsqlDatabaseProperties.FILES_NEW : try { deleteBackup(); backupData(); renameNewBackup(); renameNewScript(); deleteLog(); properties.setDBModified( HsqlDatabaseProperties.FILES_NOT_MODIFIED); } catch (IOException e) { database.logger.appLog.logContext(e, null); } // continue as non-modified files case HsqlDatabaseProperties.FILES_NOT_MODIFIED : /** * if startup is after a SHUTDOWN SCRIPT and there are CACHED * or TEXT tables, perform a checkpoint so that the .script * file no longer contains CACHED or TEXT table rows. */ processScript(); if (isAnyCacheModified()) { properties.setDBModified( HsqlDatabaseProperties.FILES_MODIFIED); close(false); if (cache != null) { cache.open(filesReadOnly); } reopenAllTextCaches(); } break; } openLog(); if (!filesReadOnly) { properties.setDBModified(HsqlDatabaseProperties.FILES_MODIFIED); } } /** * Close all the database files. If script argument is true, no .data * or .backup file will remain and the .script file will contain all the * data of the cached tables as well as memory tables. * * This is not used for filesReadOnly databases which use shutdown. */ void close(boolean script) throws HsqlException { closeLog(); deleteNewAndOldFiles(); writeScript(script); closeAllTextCaches(script); if (cache != null) { cache.close(true); } properties.setProperty(HsqlDatabaseProperties.db_version, HsqlDatabaseProperties.THIS_VERSION); properties.setProperty( HsqlDatabaseProperties.hsqldb_compatible_version, HsqlDatabaseProperties.FIRST_COMPATIBLE_VERSION); // set this one last to save the props properties.setDBModified(HsqlDatabaseProperties.FILES_NEW); deleteLog(); if (script) { deleteBackup(); deleteData(); } else { try { backupData(); renameNewBackup(); } catch (IOException e) {} } renameNewScript(); properties.setProperty(HsqlDatabaseProperties.hsqldb_cache_version, HsqlDatabaseProperties.THIS_CACHE_VERSION); properties.setDBModified(HsqlDatabaseProperties.FILES_NOT_MODIFIED); } /** * Fast counterpart to close(). Does not perform a checkpoint or a backup * of the .data file. */ void shutdown() throws HsqlException { synchLog(); if (cache != null) { cache.close(false); } closeAllTextCaches(false); closeLog(); } /** * Deletes the leftovers from any previous unfinished operations. */ void deleteNewAndOldFiles() { fa.removeElement(fileName + ".data" + ".old"); fa.removeElement(fileName + ".data" + ".new"); fa.removeElement(fileName + ".backup" + ".new"); fa.removeElement(scriptFileName + ".new"); } void deleteBackup() { fa.removeElement(fileName + ".backup"); } void deleteData() { fa.removeElement(fileName + ".data"); } void backupData() throws IOException { if (fa.isStreamElement(fileName + ".data")) { ZipUnzipFile.compressFile(fileName + ".data", fileName + ".backup.new", database.getFileAccess()); } } void renameNewBackup() { if (fa.isStreamElement(fileName + ".backup.new")) { fa.renameElement(fileName + ".backup.new", fileName + ".backup"); } } void renameNewScript() { if (fa.isStreamElement(scriptFileName + ".new")) { fa.renameElement(scriptFileName + ".new", scriptFileName); } } void deleteNewScript() { fa.removeElement(scriptFileName + ".new"); } void deleteNewBackup() { fa.removeElement(scriptFileName + ".backup.new"); } void deleteLog() { fa.removeElement(logFileName); } /** * Checks all the caches and returns true if the modified flag is set for any */ boolean isAnyCacheModified() { if (cache != null && cache.isFileModified()) { return true; } return isAnyTextCacheModified(); } /** * Performs checkpoint including pre and post operations. Returns to the * same state as before the checkpoint. */ void checkpoint(boolean defrag) throws HsqlException { if (filesReadOnly) { return; } database.logger.appLog.logContext(SimpleLog.LOG_NORMAL, "start"); deleteNewAndOldFiles(); if (cache != null) { if (forceDefrag()) { defrag = true; } if (defrag) { try { cache.defrag(); } catch (Exception e) {} } else { cache.close(true); try { cache.backupFile(); } catch (IOException e1) { deleteNewBackup(); cache.open(false); return; } cache.open(false); } } writeScript(false); properties.setDBModified(HsqlDatabaseProperties.FILES_NEW); closeLog(); deleteLog(); renameNewScript(); renameNewBackup(); properties.setDBModified(HsqlDatabaseProperties.FILES_MODIFIED); if (dbLogWriter == null) { return; } openLog(); Session[] sessions = database.sessionManager.getAllSessions(); try { for (int i = 0; i < sessions.length; i++) { Session session = sessions[i]; if (session.isAutoCommit() == false) { dbLogWriter.writeLogStatement( session, session.getAutoCommitStatement()); } } } catch (IOException e) { throw Trace.error(Trace.FILE_IO_ERROR, logFileName); } database.logger.appLog.logContext(SimpleLog.LOG_NORMAL, "end"); } /** * Returns true if lost space is above the threshold */ boolean forceDefrag() { long megas = properties.getIntegerProperty( HsqlDatabaseProperties.hsqldb_defrag_limit, 200); long defraglimit = megas * 1024 * 1024; long lostSize = cache.freeBlocks.getLostBlocksSize(); return lostSize > defraglimit; } /** * */ boolean hasCache() { return cache != null; } /** * Responsible for creating the cache instance. */ DataFileCache getCache() throws HsqlException { /* if (database.isFilesInJar()) { return null; } */ if (cache == null) { cache = new DataFileCache(database, fileName); cache.open(filesReadOnly); } return cache; } int getLogSize() { return (int) (maxLogSize / (1024 * 1024)); } void setLogSize(int megas) { properties.setProperty(HsqlDatabaseProperties.hsqldb_log_size, String.valueOf(megas)); maxLogSize = megas * 1024 * 1024; } int getScriptType() { return scriptFormat; } /** * Changing the script format results in a checkpoint, with the .script * file written in the new format. */ void setScriptType(int type) throws HsqlException { // OOo related code if (database.isStoredFileAccess()) { return; } // end OOo boolean needsCheckpoint = scriptFormat != type; scriptFormat = type; properties.setProperty(HsqlDatabaseProperties.hsqldb_script_format, String.valueOf(scriptFormat)); if (needsCheckpoint) { database.logger.needsCheckpoint = true; } } /** * Write delay specifies the frequency of FileDescriptor.sync() calls. */ int getWriteDelay() { return writeDelay; } void setWriteDelay(int delay) { writeDelay = delay; if (dbLogWriter != null) { synchLog(); dbLogWriter.setWriteDelay(delay); } } /** * Various writeXXX() methods are used for logging statements. */ void writeStatement(Session session, String s) throws HsqlException { if (s == null || s.length() == 0) { return; } try { dbLogWriter.writeLogStatement(session, s); } catch (IOException e) { throw Trace.error(Trace.FILE_IO_ERROR, logFileName); } if (maxLogSize > 0 && dbLogWriter.size() > maxLogSize) { database.logger.needsCheckpoint = true; } } void writeInsertStatement(Session session, Table t, Object[] row) throws HsqlException { try { dbLogWriter.writeInsertStatement(session, t, row); } catch (IOException e) { throw Trace.error(Trace.FILE_IO_ERROR, logFileName); } if (maxLogSize > 0 && dbLogWriter.size() > maxLogSize) { database.logger.needsCheckpoint = true; } } void writeDeleteStatement(Session session, Table t, Object[] row) throws HsqlException { try { dbLogWriter.writeDeleteStatement(session, t, row); } catch (IOException e) { throw Trace.error(Trace.FILE_IO_ERROR, logFileName); } if (maxLogSize > 0 && dbLogWriter.size() > maxLogSize) { database.logger.needsCheckpoint = true; } } void writeSequenceStatement(Session session, NumberSequence s) throws HsqlException { try { dbLogWriter.writeSequenceStatement(session, s); } catch (IOException e) { throw Trace.error(Trace.FILE_IO_ERROR, logFileName); } if (maxLogSize > 0 && dbLogWriter.size() > maxLogSize) { database.logger.needsCheckpoint = true; } } void writeCommitStatement(Session session) throws HsqlException { try { dbLogWriter.writeCommitStatement(session); } catch (IOException e) { throw Trace.error(Trace.FILE_IO_ERROR, logFileName); } if (maxLogSize > 0 && dbLogWriter.size() > maxLogSize) { database.logger.needsCheckpoint = true; } } void synchLog() { if (dbLogWriter != null) { dbLogWriter.sync(); } } /** * Wrappers for openning-starting / stoping-closing the log file and * writer. */ private void openLog() throws HsqlException { if (filesReadOnly) { return; } try { dbLogWriter = ScriptWriterBase.newScriptWriter(database, logFileName, false, false, ScriptWriterBase.SCRIPT_TEXT_170); dbLogWriter.setWriteDelay(writeDelay); dbLogWriter.start(); } catch (Exception e) { throw Trace.error(Trace.FILE_IO_ERROR, logFileName); } } private synchronized void closeLog() throws HsqlException { if (dbLogWriter != null) { dbLogWriter.close(); } } /** * Write the .script file as .script.new. */ private void writeScript(boolean full) throws HsqlException { deleteNewScript(); //fredt - to do - flag for chache set index ScriptWriterBase scw = ScriptWriterBase.newScriptWriter(database, scriptFileName + ".new", full, true, scriptFormat); scw.writeAll(); scw.close(); } /** * Performs all the commands in the .script file. */ private void processScript() throws HsqlException { ScriptReaderBase scr = null; try { if (database.isFilesInJar() || fa.isStreamElement(scriptFileName)) { scr = ScriptReaderBase.newScriptReader(database, scriptFileName, scriptFormat); scr.readAll(database.sessionManager.getSysSession(null, true)); scr.close(); } } catch (Throwable e) { if (scr != null) { scr.close(); if (cache != null) { cache.close(false); } closeAllTextCaches(false); } database.logger.appLog.logContext(e, null); if (e instanceof HsqlException) { throw (HsqlException) e; } else if (e instanceof IOException) { throw Trace.error(Trace.FILE_IO_ERROR, e.toString()); } else if (e instanceof OutOfMemoryError) { throw Trace.error(Trace.OUT_OF_MEMORY); } else { throw Trace.error(Trace.GENERAL_ERROR, e.toString()); } } } /** * Defrag large data files when the sum of .log and .data files is large. */ private void processDataFile() throws HsqlException { // OOo related code if (database.isStoredFileAccess()) { return; } // OOo end if (cache == null || filesReadOnly || !fa.isStreamElement(logFileName)) { return; } File file = new File(logFileName); long logLength = file.length(); long dataLength = cache.getFileFreePos(); if (logLength + dataLength > cache.maxDataFileSize) { database.logger.needsCheckpoint = true; } } /** * Performs all the commands in the .log file. */ private void processLog() throws HsqlException { if (!database.isFilesInJar() && fa.isStreamElement(logFileName)) { ScriptRunner.runScript(database, logFileName, ScriptWriterBase.SCRIPT_TEXT_170); } } /** * Restores a compressed backup or the .data file. */ private void restoreBackup() throws HsqlException { // in case data file cannot be deleted, reset it DataFileCache.deleteOrResetFreePos(database, fileName + ".data"); try { ZipUnzipFile.decompressFile(fileName + ".backup", fileName + ".data", database.getFileAccess()); } catch (Exception e) { throw Trace.error(Trace.FILE_IO_ERROR, Trace.Message_Pair, new Object[] { fileName + ".backup", e.toString() }); } } // fredt@users 20020221 - patch 513005 by sqlbob@users (RMP) - text tables private HashMap textCacheList = new HashMap(); DataFileCache openTextCache(Table table, String source, boolean readOnlyData, boolean reversed) throws HsqlException { closeTextCache(table); if (!properties.isPropertyTrue( HsqlDatabaseProperties.textdb_allow_full_path)) { if (source.indexOf("..") != -1) { throw (Trace.error(Trace.ACCESS_IS_DENIED, source)); } String path = new File( new File( database.getPath() + ".properties").getAbsolutePath()).getParent(); if (path != null) { source = path + File.separator + source; } } TextCache c; int type; if (reversed) { c = new TextCache(table, source); } else { c = new TextCache(table, source); } c.open(readOnlyData || filesReadOnly); textCacheList.put(table.getName(), c); return c; } void closeTextCache(Table table) throws HsqlException { TextCache c = (TextCache) textCacheList.remove(table.getName()); if (c != null) { c.close(true); } } private void closeAllTextCaches(boolean compact) throws HsqlException { Iterator it = textCacheList.values().iterator(); while (it.hasNext()) { if (compact) { ((TextCache) it.next()).purge(); } else { ((TextCache) it.next()).close(true); } } } private void reopenAllTextCaches() throws HsqlException { Iterator it = textCacheList.values().iterator(); while (it.hasNext()) { ((TextCache) it.next()).reopen(); } } private boolean isAnyTextCacheModified() { Iterator it = textCacheList.values().iterator(); while (it.hasNext()) { if (((TextCache) it.next()).isFileModified()) { return true; } } return false; } } hsqldb-1.8.0.10.orig/src/org/hsqldb/persist/ScaledRAFile.java0000644000175000017500000003610310767512763022245 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.persist; import java.io.EOFException; import java.io.FileNotFoundException; import java.io.IOException; import java.io.RandomAccessFile; import java.lang.reflect.Constructor; import org.hsqldb.Database; import org.hsqldb.Trace; import org.hsqldb.lib.HsqlByteArrayInputStream; import org.hsqldb.lib.SimpleLog; import org.hsqldb.lib.Storage; // fredt@users 20030111 - patch 1.7.2 by bohgammer@users - pad file before seek() beyond end // some incompatible JVM implementations do not allow seek beyond the existing end of file /** * This class is a wapper for a random access file such as that used for * CACHED table storage. * * @author fredt@users * @version 1.8.0 * @since 1.7.2 */ class ScaledRAFile implements ScaledRAInterface { static final int DATA_FILE_RAF = 0; static final int DATA_FILE_NIO = 1; static final int DATA_FILE_JAR = 2; static final long MAX_NIO_LENGTH = (1L << 28); // final SimpleLog appLog; final RandomAccessFile file; private final boolean readOnly; final String fileName; boolean isNio; boolean bufferDirty = true; final byte[] buffer; final HsqlByteArrayInputStream ba; long bufferOffset; // long seekPosition; long realPosition; static int cacheHit; /** * seekPosition is the position in seek() calls or after reading or writing * realPosition is the file position */ static Storage newScaledRAFile(Database database, String name, boolean readonly, int type, String classname, String key) throws FileNotFoundException, IOException { //#ifdef JAVA4 if (classname != null) { try { Class storageClass = null; try { ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); storageClass = classLoader.loadClass(classname); } catch (ClassNotFoundException e) { storageClass = Class.forName(classname); } Constructor constructor = storageClass.getConstructor(new Class[] { String.class, Boolean.class, Object.class }); return (Storage) constructor.newInstance(new Object[] { name, new Boolean(readonly), key }); } catch (Exception e) { throw new IOException( Trace.getMessage( Trace.INVALID_STORAGE_CLASS, true, new Object[]{ e.toString() })); } } //#endif if (type == DATA_FILE_JAR) { return new ScaledRAFileInJar(name); } else if (type == DATA_FILE_RAF) { return new ScaledRAFile(database, name, readonly); } else { RandomAccessFile file = new RandomAccessFile(name, readonly ? "r" : "rw"); if (file.length() > MAX_NIO_LENGTH) { return new ScaledRAFile(database, name, file, readonly); } else { file.close(); } try { Class.forName("java.nio.MappedByteBuffer"); Class c = Class.forName("org.hsqldb.persist.ScaledRAFileHybrid"); Constructor constructor = c.getConstructor(new Class[] { Database.class, String.class, boolean.class }); return (ScaledRAInterface) constructor.newInstance( new Object[] { database, name, new Boolean(readonly) }); } catch (Exception e) { return new ScaledRAFile(database, name, readonly); } } } ScaledRAFile(Database database, String name, RandomAccessFile file, boolean readonly) throws FileNotFoundException, IOException { this.appLog = database.logger.appLog; this.readOnly = readonly; this.fileName = name; this.file = file; int bufferScale = database.getProperties().getIntegerProperty( HsqlDatabaseProperties.hsqldb_raf_buffer_scale, 12, 8, 13); int bufferSize = 1 << bufferScale; buffer = new byte[bufferSize]; ba = new HsqlByteArrayInputStream(buffer); } ScaledRAFile(Database database, String name, boolean readonly) throws FileNotFoundException, IOException { this.appLog = database.logger.appLog; this.readOnly = readonly; this.fileName = name; this.file = new RandomAccessFile(name, readonly ? "r" : "rw"); int bufferScale = database.getProperties().getIntegerProperty( HsqlDatabaseProperties.hsqldb_raf_buffer_scale, 12); int bufferSize = 1 << bufferScale; buffer = new byte[bufferSize]; ba = new HsqlByteArrayInputStream(buffer); } public long length() throws IOException { return file.length(); } /** * Some JVM's do not allow seek beyond end of file, so zeros are written * first in that case. Reported by bohgammer@users in Open Disucssion * Forum. */ public void seek(long position) throws IOException { if (!readOnly && file.length() < position) { long tempSize = position - file.length(); if (tempSize > 1 << 18) { tempSize = 1 << 18; } byte[] temp = new byte[(int) tempSize]; try { long pos = file.length(); for (; pos < position - tempSize; pos += tempSize) { file.seek(pos); file.write(temp, 0, (int) tempSize); } file.seek(pos); file.write(temp, 0, (int) (position - pos)); realPosition = position; } catch (IOException e) { appLog.logContext(e, null); throw e; } } seekPosition = position; } public long getFilePointer() throws IOException { return seekPosition; } private void readIntoBuffer() throws IOException { long filePos = seekPosition; long subOffset = filePos % buffer.length; long fileLength = file.length(); long readLength = fileLength - (filePos - subOffset); try { if (readLength <= 0) { throw new IOException("read beyond end of file"); } if (readLength > buffer.length) { readLength = buffer.length; } file.seek(filePos - subOffset); file.readFully(buffer, 0, (int) readLength); bufferOffset = filePos - subOffset; realPosition = bufferOffset + readLength; bufferDirty = false; } catch (IOException e) { resetPointer(); appLog.logContext(e, "" + realPosition + " " + readLength); throw e; } } public int read() throws IOException { try { long fileLength = file.length(); if (seekPosition >= fileLength) { return -1; } if (bufferDirty || seekPosition < bufferOffset || seekPosition >= bufferOffset + buffer.length) { readIntoBuffer(); } else { cacheHit++; } ba.reset(); ba.skip(seekPosition - bufferOffset); int val = ba.read(); seekPosition++; return val; } catch (IOException e) { resetPointer(); appLog.logContext(e, null); throw e; } } public long readLong() throws IOException { try { if (bufferDirty || seekPosition < bufferOffset || seekPosition >= bufferOffset + buffer.length) { readIntoBuffer(); } else { cacheHit++; } ba.reset(); if (seekPosition - bufferOffset != ba.skip(seekPosition - bufferOffset)) { throw new EOFException(); } long val; try { val = ba.readLong(); } catch (EOFException e) { file.seek(seekPosition); val = file.readLong(); realPosition = file.getFilePointer(); } seekPosition += 8; return val; } catch (IOException e) { resetPointer(); appLog.logContext(e, null); throw e; } } public int readInt() throws IOException { try { if (bufferDirty || seekPosition < bufferOffset || seekPosition >= bufferOffset + buffer.length) { readIntoBuffer(); } else { cacheHit++; } ba.reset(); if (seekPosition - bufferOffset != ba.skip(seekPosition - bufferOffset)) { throw new EOFException(); } int val; try { val = ba.readInt(); } catch (EOFException e) { file.seek(seekPosition); val = file.readInt(); realPosition = file.getFilePointer(); } seekPosition += 4; return val; } catch (IOException e) { resetPointer(); appLog.logContext(e, null); throw e; } } public void read(byte[] b, int offset, int length) throws IOException { try { if (bufferDirty || seekPosition < bufferOffset || seekPosition >= bufferOffset + buffer.length) { readIntoBuffer(); } else { cacheHit++; } ba.reset(); if (seekPosition - bufferOffset != ba.skip(seekPosition - bufferOffset)) { throw new EOFException(); } int bytesRead = ba.read(b, offset, length); seekPosition += bytesRead; if (bytesRead < length) { if (seekPosition != realPosition) { file.seek(seekPosition); } file.readFully(b, offset + bytesRead, length - bytesRead); seekPosition += (length - bytesRead); realPosition = seekPosition; } } catch (IOException e) { resetPointer(); appLog.logContext(e, null); throw e; } } public void write(byte[] b, int off, int len) throws IOException { try { if (realPosition != seekPosition) { file.seek(seekPosition); realPosition = seekPosition; } if (seekPosition >= bufferOffset && seekPosition < bufferOffset + buffer.length) { bufferDirty = true; } file.write(b, off, len); seekPosition += len; realPosition = seekPosition; } catch (IOException e) { resetPointer(); appLog.logContext(e, null); throw e; } } public void writeInt(int i) throws IOException { try { if (realPosition != seekPosition) { file.seek(seekPosition); realPosition = seekPosition; } if (seekPosition >= bufferOffset && seekPosition < bufferOffset + buffer.length) { bufferDirty = true; } file.writeInt(i); seekPosition += 4; realPosition = seekPosition; } catch (IOException e) { resetPointer(); appLog.logContext(e, null); throw e; } } public void writeLong(long i) throws IOException { try { if (realPosition != seekPosition) { file.seek(seekPosition); realPosition = seekPosition; } if (seekPosition >= bufferOffset && seekPosition < bufferOffset + buffer.length) { bufferDirty = true; } file.writeLong(i); seekPosition += 8; realPosition = seekPosition; } catch (IOException e) { resetPointer(); appLog.logContext(e, null); throw e; } } public void close() throws IOException { Trace.printSystemOut("cache hit " + cacheHit); file.close(); } public boolean isReadOnly() { return readOnly; } public boolean wasNio() { return false; } public boolean canAccess(int length) { return true; } public boolean canSeek(long position) { return true; } public Database getDatabase() { return null; } private void resetPointer() { try { bufferDirty = true; file.seek(seekPosition); realPosition = seekPosition; } catch (Throwable e) {} } } hsqldb-1.8.0.10.orig/src/org/hsqldb/persist/HsqlProperties.java0000644000175000017500000003035311017021713022767 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.persist; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.Enumeration; import java.util.Properties; import org.hsqldb.Trace; import org.hsqldb.lib.ArrayUtil; import org.hsqldb.lib.FileAccess; import org.hsqldb.lib.FileUtil; import org.hsqldb.lib.java.JavaSystem; /** * Wrapper for java.util.Properties to limit values to Specific types and * allow saving and loading.

    * * @author fredt@users * @version 1.7.2 * @since 1.7.0 */ public class HsqlProperties { public static final int NO_VALUE_FOR_KEY = 1; protected String fileName; protected Properties stringProps; protected int[] errorCodes = new int[0]; protected String[] errorKeys = new String[0]; protected boolean resource = false; protected FileAccess fa; public HsqlProperties() { stringProps = new Properties(); fileName = null; } public HsqlProperties(String name) { stringProps = new Properties(); fileName = name; fa = FileUtil.getDefaultInstance(); } public HsqlProperties(String name, FileAccess accessor, boolean b) { stringProps = new Properties(); fileName = name; resource = b; fa = accessor; } public HsqlProperties(Properties props) { stringProps = props; } public void setFileName(String name) { fileName = name; } public String setProperty(String key, int value) { return setProperty(key, Integer.toString(value)); } public String setProperty(String key, boolean value) { return setProperty(key, String.valueOf(value)); } public String setProperty(String key, String value) { return (String) stringProps.put(key, value); } public String setPropertyIfNotExists(String key, String value) { value = getProperty(key, value); return setProperty(key, value); } public Properties getProperties() { return stringProps; } public String getProperty(String key) { return stringProps.getProperty(key); } public String getProperty(String key, String defaultValue) { return stringProps.getProperty(key, defaultValue); } public int getIntegerProperty(String key, int defaultValue) { String prop = getProperty(key); try { if (prop != null) { defaultValue = Integer.parseInt(prop); } } catch (NumberFormatException e) {} return defaultValue; } public int getIntegerProperty(String key, int defaultValue, int minimum, int maximum) { String prop = getProperty(key); boolean badvalue = false; try { defaultValue = Integer.parseInt(prop); } catch (NumberFormatException e) {} if (defaultValue < minimum) { defaultValue = minimum; badvalue = true; } else if (defaultValue > maximum) { defaultValue = maximum; badvalue = true; } return defaultValue; } /** * Choice limited to values list, defaultValue must be in the values list. */ public int getIntegerProperty(String key, int defaultValue, int[] values) { String prop = getProperty(key); int value = defaultValue; try { if (prop != null) { value = Integer.parseInt(prop); } } catch (NumberFormatException e) {} if (ArrayUtil.find(values, value) == -1) { return defaultValue; } return value; } public boolean isPropertyTrue(String key) { return isPropertyTrue(key, false); } public boolean isPropertyTrue(String key, boolean defaultValue) { String value = stringProps.getProperty(key); if (value == null) { return defaultValue; } return value.toLowerCase().equals("true"); } public void removeProperty(String key) { stringProps.remove(key); } public void addProperties(Properties props) { if (props == null) { return; } Enumeration keys = props.keys(); while (keys.hasMoreElements()) { Object key = keys.nextElement(); this.stringProps.put(key, props.get(key)); } } public void addProperties(HsqlProperties props) { if (props == null) { return; } addProperties(props.stringProps); } // oj@openoffice.org public boolean checkFileExists() throws IOException { String propFilename = fileName + ".properties"; return fa.isStreamElement(propFilename); } public boolean load() throws Exception { if (!checkFileExists()) { return false; } if (fileName == null || fileName.length() == 0) { throw new FileNotFoundException( Trace.getMessage(Trace.HsqlProperties_load)); } InputStream fis = null; String propsFilename = fileName + ".properties"; // oj@openoffice.org try { fis = resource ? getClass().getResourceAsStream(propsFilename) : fa.openInputStreamElement(propsFilename); stringProps.load(fis); } finally { if (fis != null) { fis.close(); } } return true; } /** * Saves the properties. */ public void save() throws Exception { if (fileName == null || fileName.length() == 0) { throw new java.io.FileNotFoundException( Trace.getMessage(Trace.HsqlProperties_load)); } String filestring = fileName + ".properties"; save(filestring); } /** * Saves the properties using JDK2 method if present, otherwise JDK1. */ public void save(String fileString) throws Exception { // oj@openoffice.org fa.createParentDirs(fileString); OutputStream fos = fa.openOutputStreamElement(fileString); FileAccess.FileSync outDescriptor = fa.getFileSync(fos); JavaSystem.saveProperties( stringProps, HsqlDatabaseProperties.PRODUCT_NAME + " " + HsqlDatabaseProperties.THIS_FULL_VERSION, fos); fos.flush(); outDescriptor.sync(); fos.close(); return; } /** * Adds the error code and the key to the list of errors. This list * is populated during construction or addition of elements and is used * outside this class to act upon the errors. */ private void addError(int code, String key) { errorCodes = (int[]) ArrayUtil.resizeArray(errorCodes, errorCodes.length + 1); errorKeys = (String[]) ArrayUtil.resizeArray(errorKeys, errorKeys.length + 1); errorCodes[errorCodes.length - 1] = code; errorKeys[errorKeys.length - 1] = key; } /** * Creates and populates an HsqlProperties Object from the arguments * array of a Main method. Properties are in the form of "-key value" * pairs. Each key is prefixed with the type argument and a dot before * being inserted into the properties Object.

    * * "-?" is treated as a key with no value and not inserted. */ public static HsqlProperties argArrayToProps(String[] arg, String type) { HsqlProperties props = new HsqlProperties(); for (int i = 0; i < arg.length; i++) { String p = arg[i]; if (p.startsWith("-?")) { props.addError(NO_VALUE_FOR_KEY, p.substring(1)); } else if (p.charAt(0) == '-') { String value = i + 1 < arg.length ? arg[i + 1] : ""; props.setProperty(type + "." + p.substring(1), value); i++; } } return props; } /** * Creates and populates a new HsqlProperties Object using a string * such as "key1=value1;key2=value2".

    * * The string that represents the = sign above is specified as pairsep * and the one that represents the semicolon is specified as delimiter, * allowing any string to be used for either.

    * * Leading / trailing spaces around the keys and values are discarded.

    * * The string is parsed by (1) subdividing into segments by delimiter * (2) subdividing each segment in two by finding the first instance of * the pairsep (3) trimming each pair of segments from step 2 and * inserting into the properties object.

    * * Each key is prefixed with the type argument and a dot before being * inserted.

    * * Any key without a value is added to the list of errors. */ public static HsqlProperties delimitedArgPairsToProps(String s, String pairsep, String dlimiter, String type) { HsqlProperties props = new HsqlProperties(); int currentpair = 0; while (true) { int nextpair = s.indexOf(dlimiter, currentpair); if (nextpair == -1) { nextpair = s.length(); } // find value within the segment int valindex = s.substring(0, nextpair).indexOf(pairsep, currentpair); if (valindex == -1) { props.addError(NO_VALUE_FOR_KEY, s.substring(currentpair, nextpair).trim()); } else { String key = s.substring(currentpair, valindex).trim(); String value = s.substring(valindex + pairsep.length(), nextpair).trim(); if (type != null) { key = type + "." + key; } props.setProperty(key, value); } if (nextpair == s.length()) { break; } currentpair = nextpair + dlimiter.length(); } return props; } public Enumeration propertyNames() { return stringProps.propertyNames(); } public boolean isEmpty() { return stringProps.isEmpty(); } public String[] getErrorKeys() { return errorKeys; } /* public static void main(String[] argv) { HsqlProperties props1 = delimitedArgPairsToProps("-dbname.0", "=", ";", "server"); HsqlProperties props2 = delimitedArgPairsToProps( "filename.cvs;a=123 ; b=\\delta ;c= another; derrorkey;", "=", ";", "textdb"); } */ } hsqldb-1.8.0.10.orig/src/org/hsqldb/persist/DataFileCache.java0000644000175000017500000005723711014151765022422 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.persist; import java.io.File; import java.io.IOException; import org.hsqldb.Database; import org.hsqldb.HsqlException; import org.hsqldb.Trace; import org.hsqldb.lib.FileAccess; import org.hsqldb.lib.FileUtil; import org.hsqldb.lib.SimpleLog; import org.hsqldb.lib.StopWatch; import org.hsqldb.lib.Storage; import org.hsqldb.lib.ZipUnzipFile; import org.hsqldb.rowio.RowInputBinary; import org.hsqldb.rowio.RowInputInterface; import org.hsqldb.rowio.RowOutputBinary; import org.hsqldb.rowio.RowOutputInterface; import org.hsqldb.store.BitMap; /** * Acts as a manager for CACHED table persistence.

    * * This contains the top level functionality. Provides file management services * and access.

    * * Rewritten for 1.8.0 together with Cache. * * @author fredt@users * @version 1.8.0 * @since 1.7.2 */ public class DataFileCache { protected FileAccess fa; // flags public static final int FLAG_ISSAVED = 2; public static final int FLAG_ROWINFO = 3; // file format fields static final int LONG_EMPTY_SIZE = 4; // empty space size static final int LONG_FREE_POS_POS = 12; // where iFreePos is saved static final int LONG_EMPTY_INDEX_POS = 20; // empty space index static final int FLAGS_POS = 28; static final int INITIAL_FREE_POS = 32; // DataFileBlockManager freeBlocks; private static final int initIOBufferSize = 256; // protected String fileName; protected String backupFileName; protected Database database; // this flag is used externally to determine if a backup is required protected boolean fileModified; protected int cacheFileScale; // post openning constant fields protected boolean cacheReadonly; // cache operation mode protected boolean storeOnInsert; // protected int cachedRowPadding = 8; protected boolean hasRowInfo = false; // reusable input / output streams protected RowInputInterface rowIn; protected RowOutputInterface rowOut; // public long maxDataFileSize; // protected Storage dataFile; protected long fileFreePosition; protected int maxCacheSize; // number of Rows protected long maxCacheBytes; // number of bytes protected int maxFreeBlocks; protected Cache cache; public DataFileCache(Database db, String baseFileName) throws HsqlException { initParams(db, baseFileName); cache = new Cache(this); } /** * initial external parameters are set here. */ protected void initParams(Database database, String baseFileName) throws HsqlException { HsqlDatabaseProperties props = database.getProperties(); fileName = baseFileName + ".data"; backupFileName = baseFileName + ".backup"; this.database = database; fa = database.getFileAccess(); int cacheScale = props.getIntegerProperty(HsqlDatabaseProperties.hsqldb_cache_scale, 14, 8, 18); int cacheSizeScale = props.getIntegerProperty( HsqlDatabaseProperties.hsqldb_cache_size_scale, 10, 6, 20); int cacheFreeCountScale = props.getIntegerProperty( HsqlDatabaseProperties.hsqldb_cache_free_count_scale, 9, 6, 12); cacheFileScale = database.getProperties().getIntegerProperty( HsqlDatabaseProperties.hsqldb_cache_file_scale, 1); if (cacheFileScale != 1) { cacheFileScale = 8; } cacheReadonly = database.isFilesReadOnly(); int lookupTableLength = 1 << cacheScale; int avgRowBytes = 1 << cacheSizeScale; maxCacheSize = lookupTableLength * 3; maxCacheBytes = maxCacheSize * avgRowBytes; maxDataFileSize = cacheFileScale == 1 ? Integer.MAX_VALUE : (long) Integer.MAX_VALUE * 4; maxFreeBlocks = 1 << cacheFreeCountScale; dataFile = null; } /** * Opens the *.data file for this cache, setting the variables that * allow access to the particular database version of the *.data file. */ public void open(boolean readonly) throws HsqlException { fileFreePosition = 0; database.logger.appLog.logContext(SimpleLog.LOG_NORMAL, "start"); try { boolean preexists = database.isFilesInJar(); long freesize = 0; if (!preexists && fa.isStreamElement(fileName)) { // OOo related code if (database.isStoredFileAccess()) { preexists = true; } // OOo end; if (!preexists) { // discard "empty" databases File f = new File(fileName); preexists = f.length() > INITIAL_FREE_POS; } } if (preexists) { String version = database.getProperties().getProperty( HsqlDatabaseProperties.hsqldb_cache_version); boolean v17 = HsqlDatabaseProperties.VERSION_STRING_1_7_0.equals( version); // for later versions boolean v18 = HsqlDatabaseProperties.VERSION_STRING_1_8_0.equals( version); if (!v17) { throw Trace.error(Trace.WRONG_DATABASE_FILE_VERSION); } } boolean isNio = database.getProperties().isPropertyTrue( HsqlDatabaseProperties.hsqldb_nio_data_file); int fileType = isNio ? ScaledRAFile.DATA_FILE_NIO : ScaledRAFile.DATA_FILE_RAF; if (database.isFilesInJar()) { fileType = ScaledRAFile.DATA_FILE_JAR; } // oj@openofice.org - change to file access api String cname = database.getURLProperties().getProperty("storage_class_name"); String skey = database.getURLProperties().getProperty("storage_key"); dataFile = ScaledRAFile.newScaledRAFile(database, fileName, readonly, fileType, cname, skey); if (preexists) { dataFile.seek(FLAGS_POS); int flags = dataFile.readInt(); hasRowInfo = BitMap.isSet(flags, FLAG_ROWINFO); dataFile.seek(LONG_EMPTY_SIZE); freesize = dataFile.readLong(); dataFile.seek(LONG_FREE_POS_POS); fileFreePosition = dataFile.readLong(); if (fileFreePosition < INITIAL_FREE_POS) { fileFreePosition = INITIAL_FREE_POS; } } else { fileFreePosition = INITIAL_FREE_POS; dataFile.seek(LONG_FREE_POS_POS); dataFile.writeLong(INITIAL_FREE_POS); // set unsaved flag; dataFile.seek(FLAGS_POS); dataFile.writeInt(0); } initBuffers(); fileModified = false; freeBlocks = new DataFileBlockManager(maxFreeBlocks, cacheFileScale, freesize); database.logger.appLog.logContext(SimpleLog.LOG_NORMAL, "end"); } catch (Throwable e) { database.logger.appLog.logContext(e, "failed"); close(false); throw Trace.error(Trace.FILE_IO_ERROR, Trace.DataFileCache_open, new Object[] { e, fileName }); } } /** * Parameter write indicates either an orderly close, or a fast close * without backup. * * When false, just closes the file. * * When true, writes out all cached rows that have been modified and the * free position pointer for the *.data file and then closes the file. */ public void close(boolean write) throws HsqlException { SimpleLog appLog = database.logger.appLog; try { if (cacheReadonly) { if (dataFile != null) { dataFile.close(); } return; } StopWatch sw = new StopWatch(); appLog.sendLine(SimpleLog.LOG_NORMAL, "DataFileCache.close(" + write + ") : start"); if (write) { cache.saveAll(); Trace.printSystemOut("saveAll: " + sw.elapsedTime()); appLog.sendLine(SimpleLog.LOG_NORMAL, "DataFileCache.close() : save data"); if (fileModified || freeBlocks.isModified()) { // set empty dataFile.seek(LONG_EMPTY_SIZE); dataFile.writeLong(freeBlocks.getLostBlocksSize()); // set end dataFile.seek(LONG_FREE_POS_POS); dataFile.writeLong(fileFreePosition); // set saved flag; dataFile.seek(FLAGS_POS); int flag = BitMap.set(0, FLAG_ISSAVED); if (hasRowInfo) { flag = BitMap.set(flag, FLAG_ROWINFO); } dataFile.writeInt(flag); appLog.sendLine(SimpleLog.LOG_NORMAL, "DataFileCache.close() : flags"); // if (dataFile.length() != fileFreePosition) { dataFile.seek(fileFreePosition); } appLog.sendLine(SimpleLog.LOG_NORMAL, "DataFileCache.close() : seek end"); Trace.printSystemOut("pos and flags: " + sw.elapsedTime()); } } if (dataFile != null) { dataFile.close(); appLog.sendLine(SimpleLog.LOG_NORMAL, "DataFileCache.close() : close"); dataFile = null; Trace.printSystemOut("close: " + sw.elapsedTime()); } boolean empty = fileFreePosition == INITIAL_FREE_POS; if (empty) { fa.removeElement(fileName); fa.removeElement(backupFileName); } } catch (Throwable e) { appLog.logContext(e, null); throw Trace.error(Trace.FILE_IO_ERROR, Trace.DataFileCache_close, new Object[] { e, fileName }); } } protected void initBuffers() { if (rowOut == null || ((RowOutputBinary) rowOut).getBuffer().length > initIOBufferSize) { rowOut = new RowOutputBinary(256); } if (rowIn == null || ((RowInputBinary) rowIn).getBuffer().length > initIOBufferSize) { rowIn = new RowInputBinary(new byte[256]); } } /** * Writes out all the rows to a new file without fragmentation. */ public void defrag() throws HsqlException { if (cacheReadonly) { return; } if (fileFreePosition == INITIAL_FREE_POS) { return; } database.logger.appLog.logContext(SimpleLog.LOG_NORMAL, "start"); try { boolean wasNio = dataFile.wasNio(); cache.saveAll(); DataFileDefrag dfd = new DataFileDefrag(database, this, fileName); dfd.process(); close(false); deleteFile(wasNio); renameDataFile(); backupFile(); database.getProperties().setProperty( HsqlDatabaseProperties.hsqldb_cache_version, HsqlDatabaseProperties.THIS_CACHE_VERSION); database.getProperties().save(); cache.clear(); cache = new Cache(this); open(cacheReadonly); dfd.updateTableIndexRoots(); dfd.updateTransactionRowIDs(); } catch (Throwable e) { database.logger.appLog.logContext(e, null); throw new HsqlException( e, Trace.getMessage(Trace.GENERAL_IO_ERROR), Trace.GENERAL_IO_ERROR); } database.logger.appLog.logContext(SimpleLog.LOG_NORMAL, "end"); } /** * Used when a row is deleted as a result of some DML or DDL command. * Removes the row from the cache data structures. * Adds the file space for the row to the list of free positions. */ public synchronized void remove(int i, PersistentStore store) throws IOException { CachedObject r = release(i); // bug fix for 1.8.0.10 // if r is not in the cache, it is not known if the space has already // been reallocated to multiple rows, therefore we no longer read the // space size from file if (r != null) { int size = r.getStorageSize(); freeBlocks.add(i, size); } } public synchronized void removePersistence(int i, PersistentStore store) throws IOException {} /** * Allocates file space for the row.

    * * Free space is requested from the block manager if it exists. * Otherwise the file is grown to accommodate it. */ private int setFilePos(CachedObject r) throws IOException { int rowSize = r.getStorageSize(); int i = freeBlocks == null ? -1 : freeBlocks.get(rowSize); if (i == -1) { i = (int) (fileFreePosition / cacheFileScale); long newFreePosition = fileFreePosition + rowSize; if (newFreePosition > maxDataFileSize) { throw new IOException( Trace.getMessage(Trace.DATA_FILE_IS_FULL)); } fileFreePosition = newFreePosition; } r.setPos(i); return i; } public synchronized void add(CachedObject object) throws IOException { int size = object.getRealSize(rowOut); size = ((size + cachedRowPadding - 1) / cachedRowPadding) * cachedRowPadding; object.setStorageSize(size); int i = setFilePos(object); cache.put(i, object); // was previously used for text tables if (storeOnInsert) { saveRow(object); } } /** * For a CacheObject that had been previously released from the cache. * A new version is introduced, using the preallocated space for the object. */ public synchronized void restore(CachedObject object) throws IOException { int i = object.getPos(); cache.put(i, object); // was previously used for text tables if (storeOnInsert) { saveRow(object); } } public synchronized int getStorageSize(int i) throws IOException { CachedObject value = cache.get(i); if (value != null) { return value.getStorageSize(); } return readSize(i); } public synchronized CachedObject get(int i, PersistentStore store, boolean keep) throws HsqlException { if (i < 0) { return null; } try { CachedObject object = cache.get(i); if (object == null) { RowInputInterface rowInput = readObject(i); if (rowInput == null) { return null; } object = store.get(rowInput); if (object == null) { throw new IOException("cannot build object from file"); } // for text tables with empty rows at the beginning, // pos may move forward in readObject i = object.getPos(); cache.put(i, object); } if (keep) { object.keepInMemory(true); } return object; } catch (IOException e) { database.logger.appLog.logContext(e, fileName + " get pos: " + i); throw Trace.error(Trace.DATA_FILE_ERROR, Trace.DataFileCache_makeRow, new Object[] { e, fileName }); } } synchronized RowInputInterface getRaw(int i) throws IOException { return readObject(i); } protected synchronized int readSize(int pos) throws IOException { dataFile.seek((long) pos * cacheFileScale); return dataFile.readInt(); } protected synchronized RowInputInterface readObject(int pos) throws IOException { dataFile.seek((long) pos * cacheFileScale); int size = dataFile.readInt(); rowIn.resetRow(pos, size); dataFile.read(rowIn.getBuffer(), 4, size - 4); return rowIn; } public synchronized CachedObject release(int i) { return cache.release(i); } protected synchronized void saveRows(CachedObject[] rows, int offset, int count) throws IOException { if (count == 0) { return; } try { for (int i = offset; i < offset + count; i++) { CachedObject r = rows[i]; saveRow(r); rows[i] = null; } } catch (IOException e) { database.logger.appLog.logContext(e, null); throw e; } catch (Throwable e) { database.logger.appLog.logContext(e, null); throw new IOException(e.toString()); } finally { initBuffers(); } } /** * Writes out the specified Row. Will write only the Nodes or both Nodes * and table row data depending on what is not already persisted to disk. */ public synchronized void saveRow(CachedObject row) throws IOException { setFileModified(); rowOut.reset(); row.write(rowOut); dataFile.seek((long) row.getPos() * cacheFileScale); dataFile.write(rowOut.getOutputStream().getBuffer(), 0, rowOut.getOutputStream().size()); } /** * Saves the *.data file as compressed *.backup. * * @throws HsqlException */ void backupFile() throws IOException { try { if (fa.isStreamElement(fileName)) { ZipUnzipFile.compressFile(fileName, backupFileName + ".new", database.getFileAccess()); } } catch (IOException e) { database.logger.appLog.logContext(e, null); throw e; } } void renameBackupFile() { if (fa.isStreamElement(backupFileName + ".new")) { fa.removeElement(backupFileName); fa.renameElement(backupFileName + ".new", backupFileName); } } /** * Renames the *.data.new file. * * @throws HsqlException */ void renameDataFile() { if (fa.isStreamElement(fileName + ".new")) { fa.removeElement(fileName); fa.renameElement(fileName + ".new", fileName); } } void deleteFile(boolean wasNio) { // first attemp to delete fa.removeElement(fileName); // OOo related code if (database.isStoredFileAccess()) { return; } // OOo end if (fa.isStreamElement(fileName)) { if (wasNio) { System.gc(); fa.removeElement(fileName); } if (fa.isStreamElement(fileName)) { fa.renameElement(fileName, fileName + ".old"); File oldfile = new File(fileName + ".old"); FileUtil.getDefaultInstance().deleteOnExit(oldfile); } } } void deleteBackup() { fa.removeElement(backupFileName); } /** * This method deletes a data file or resets its free position. * this is used only for nio files - not OOo files */ static void deleteOrResetFreePos(Database database, String filename) { ScaledRAFile raFile = null; database.getFileAccess().removeElement(filename); // OOo related code if (database.isStoredFileAccess()) { return; } // OOo end if (!database.getFileAccess().isStreamElement(filename)) { return; } try { raFile = new ScaledRAFile(database, filename, false); raFile.seek(LONG_FREE_POS_POS); raFile.writeLong(INITIAL_FREE_POS); } catch (IOException e) { database.logger.appLog.logContext(e, null); } finally { if (raFile != null) { try { raFile.close(); } catch (IOException e) { database.logger.appLog.logContext(e, null); } } } } public int capacity() { return maxCacheSize; } public long bytesCapacity() { return maxCacheBytes; } public long getTotalCachedBlockSize() { return cache.getTotalCachedBlockSize(); } public int getFreeBlockCount() { return freeBlocks.size(); } public int getTotalFreeBlockSize() { return 0; } public long getFileFreePos() { return fileFreePosition; } public int getCachedObjectCount() { return cache.size(); } public String getFileName() { return fileName; } public boolean hasRowInfo() { return hasRowInfo; } public boolean isFileModified() { return fileModified; } protected synchronized void setFileModified() throws IOException { if (!fileModified) { /* // unset saved flag; dataFile.seek(FLAGS_POS); int flag = BitMap.set(0, FLAG_ISSAVED); if (hasRowInfo) { flag = BitMap.set(flag, FLAG_ROWINFO); } dataFile.writeInt(flag); */ fileModified = true; } } } hsqldb-1.8.0.10.orig/src/org/hsqldb/persist/DataFileBlockManager.java0000644000175000017500000001075110504365314023732 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.persist; import org.hsqldb.lib.DoubleIntIndex; /** * Maintains a list of free file blocks with fixed capacity.

    * * @author fredt@users * @version 1.8.0 * @since 1.8.0 */ public class DataFileBlockManager { private DoubleIntIndex lookup; private final int capacity; private int midSize; private final int scale; private long releaseCount; private long requestCount; private long requestSize; // reporting vars long lostFreeBlockSize; boolean isModified; /** * */ public DataFileBlockManager(int capacity, int scale, long lostSize) { lookup = new DoubleIntIndex(capacity, true); lookup.setValuesSearchTarget(); this.capacity = capacity; this.scale = scale; this.lostFreeBlockSize = lostSize; this.midSize = 128; // arbitrary initial value } /** */ void add(int pos, int rowSize) { isModified = true; if (capacity == 0) { lostFreeBlockSize += rowSize; return; } releaseCount++; // if (lookup.size() == capacity) { resetList(); } lookup.add(pos, rowSize); } /** * Returns the position of a free block or 0. */ int get(int rowSize) { if (lookup.size() == 0) { return -1; } int index = lookup.findFirstGreaterEqualKeyIndex(rowSize); if (index == -1) { return -1; } // statistics for successful requests only - to be used later for midSize requestCount++; requestSize += rowSize; int length = lookup.getValue(index); int difference = length - rowSize; int key = lookup.getKey(index); lookup.remove(index); if (difference >= midSize) { int pos = key + (rowSize / scale); lookup.add(pos, difference); } else { lostFreeBlockSize += difference; } return key; } int size() { return lookup.size(); } long getLostBlocksSize() { return lostFreeBlockSize; } boolean isModified() { return isModified; } void clear() { removeBlocks(lookup.size()); } private void resetList() { if (requestCount != 0) { midSize = (int) (requestSize / requestCount); } int first = lookup.findFirstGreaterEqualSlotIndex(midSize); if (first < lookup.size() / 4) { first = lookup.size() / 4; } removeBlocks(first); } private void removeBlocks(int blocks) { for (int i = 0; i < blocks; i++) { lostFreeBlockSize += lookup.getValue(i); } lookup.removeRange(0, blocks); } private void checkIntegrity() throws NullPointerException {} } hsqldb-1.8.0.10.orig/src/org/hsqldb/persist/HsqlDatabaseProperties.java0000644000175000017500000006373510767513325024446 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.persist; import java.util.Enumeration; import org.hsqldb.Database; import org.hsqldb.DatabaseURL; import org.hsqldb.HsqlException; import org.hsqldb.Trace; import org.hsqldb.lib.HashMap; import org.hsqldb.lib.HashSet; import org.hsqldb.lib.Iterator; import org.hsqldb.lib.Set; import org.hsqldb.lib.SimpleLog; import org.hsqldb.lib.StringUtil; import org.hsqldb.lib.java.JavaSystem; import org.hsqldb.store.ValuePool; /** * Manages a .properties file for a database. * * @author fredt@users * @version 1.8.0 * @since 1.7.0 */ public class HsqlDatabaseProperties extends HsqlProperties { private static String hsqldb_method_class_names = "hsqldb.method_class_names"; private static HashSet accessibleJavaMethodNames; static { try { String prop = System.getProperty(hsqldb_method_class_names); if (prop != null) { accessibleJavaMethodNames = new HashSet(); String[] names = StringUtil.split(prop, ";"); for (int i = 0; i < names.length; i++) { accessibleJavaMethodNames.add(names[i]); } } } catch (Exception e) {} } /** * If the system property "hsqldb.method_class_names" is not set, then * static methods of all available Java classes can be accessed as functions * in HSQLDB. If the property is set, then only the list of semicolon * seperated method names becomes accessible. An empty property value means * no class is accessible.

    * * A property value that ends with .* is treated as a wild card and allows * access to all classe or method names formed by substitution of the * asterisk.

    * * All methods of org.hsqldb.Library and java.lang.Math are always * accessible. * * */ public static boolean supportsJavaMethod(String name) { if (accessibleJavaMethodNames == null) { return true; } if (name.startsWith("org.hsqldb.Library.")) { return true; } if (name.startsWith("java.lang.Math.")) { return true; } if (accessibleJavaMethodNames.contains(name)) { return true; } Iterator it = accessibleJavaMethodNames.iterator(); while (it.hasNext()) { String className = (String) it.next(); int limit = className.lastIndexOf(".*"); if (limit < 1) { continue; } if (name.startsWith(className.substring(0, limit + 1))) { return true; } } return false; } // column number mappings public static final int indexName = 0; public static final int indexAccess = 1; public static final int indexClass = 2; public static final int indexIsRange = 3; public static final int indexDefaultValue = 4; public static final int indexRangeLow = 5; public static final int indexRangeHigh = 6; public static final int indexValues = 7; public static final int indexLimit = 8; // accessibility private static final int SET_PROPERTY = 0; private static final int SQL_PROPERTY = 1; private static final int FILE_PROPERTY = 2; // db files modified public static final int FILES_NOT_MODIFIED = 0; public static final int FILES_MODIFIED = 1; public static final int FILES_NEW = 2; private static final String MODIFIED_NO = "no"; private static final String MODIFIED_YES = "yes"; private static final String MODIFIED_NEW = "no-new-files"; // allowed property metadata private static HashMap meta = new HashMap(); // versions public static final String VERSION_STRING_1_7_0 = "1.7.0"; public static final String VERSION_STRING_1_8_0 = "1.8.0"; public static final String FIRST_COMPATIBLE_VERSION = "1.8.0"; public static final String THIS_VERSION = "1.8.0"; public static final String THIS_FULL_VERSION = "1.8.0.10"; public static final String THIS_CACHE_VERSION = "1.7.0"; public static final String PRODUCT_NAME = "HSQL Database Engine"; public static final int MAJOR = 1, MINOR = 8, REVISION = 0; /** * system properties supported by HSQLDB */ public static final String system_lockfile_poll_retries_property = "hsqldb.lockfile_poll_retries"; public static final String system_max_char_or_varchar_display_size = "hsqldb.max_char_or_varchar_display_size"; // public static final String db_version = "version"; private static final String db_readonly = "readonly"; private static final String db_modified = "modified"; // private static final String runtime_gc_interval = "runtime.gc_interval"; public static final String hsqldb_applog = "hsqldb.applog"; public static final String hsqldb_cache_file_scale = "hsqldb.cache_file_scale"; public static final String hsqldb_cache_free_count_scale = "hsqldb.cache_free_count_scale"; public static final String hsqldb_cache_scale = "hsqldb.cache_scale"; public static final String hsqldb_cache_size_scale = "hsqldb.cache_size_scale"; public static final String hsqldb_cache_version = "hsqldb.cache_version"; private static final String hsqldb_catalogs = "hsqldb.catalogs"; public static final String hsqldb_compatible_version = "hsqldb.compatible_version"; public static final String hsqldb_default_table_type = "hsqldb.default_table_type"; public static final String hsqldb_defrag_limit = "hsqldb.defrag_limit"; private static final String hsqldb_files_readonly = "hsqldb.files_readonly"; public static final String hsqldb_lock_file = "hsqldb.lock_file"; public static final String hsqldb_log_size = "hsqldb.log_size"; public static final String hsqldb_nio_data_file = "hsqldb.nio_data_file"; public static final String hsqldb_max_nio_scale = "hsqldb.max_nio_scale"; public static final String hsqldb_raf_buffer_scale = "hsqldb.raf_buffer_scale"; private static final String hsqldb_original_version = "hsqldb.original_version"; public static final String hsqldb_script_format = "hsqldb.script_format"; // private static final String sql_compare_in_locale = "sql.compare_in_locale"; private static final String sql_enforce_strict_size = "sql.enforce_strict_size"; public static final String sql_tx_no_multi_write = "sql.tx_no_multi_rewrite"; // public static final String textdb_cache_scale = "textdb.cache_scale"; public static final String textdb_cache_size_scale = "textdb.cache_size_scale"; public static final String textdb_all_quoted = "textdb.all_quoted"; public static final String textdb_allow_full_path = "textdb.allow_full_path"; public static final String textdb_encoding = "textdb.encoding"; public static final String textdb_ignore_first = "textdb.ignore_first"; public static final String textdb_quoted = "textdb.quoted"; public static final String textdb_fs = "textdb.fs"; public static final String textdb_vs = "textdb.vs"; public static final String textdb_lvs = "textdb.lvs"; static { // string defaults for protected props meta.put(db_version, getMeta(db_version, FILE_PROPERTY, null)); meta.put(hsqldb_compatible_version, getMeta(hsqldb_compatible_version, FILE_PROPERTY, null)); meta.put(hsqldb_cache_version, getMeta(hsqldb_cache_version, FILE_PROPERTY, null)); meta.put(hsqldb_original_version, getMeta(hsqldb_original_version, FILE_PROPERTY, null)); meta.put(db_modified, getMeta(db_modified, FILE_PROPERTY, null)); // string defaults for user defined props meta.put(hsqldb_default_table_type, getMeta(hsqldb_default_table_type, SET_PROPERTY, "memory")); meta.put(textdb_fs, getMeta(textdb_fs, SET_PROPERTY, ",")); meta.put(textdb_vs, getMeta(textdb_vs, SET_PROPERTY, null)); meta.put(textdb_lvs, getMeta(textdb_lvs, SET_PROPERTY, null)); meta.put(textdb_encoding, getMeta(textdb_encoding, SET_PROPERTY, null)); // boolean defaults for protected props meta.put(db_readonly, getMeta(db_readonly, FILE_PROPERTY, false)); meta.put(hsqldb_files_readonly, getMeta(hsqldb_files_readonly, FILE_PROPERTY, false)); meta.put(textdb_allow_full_path, getMeta(textdb_allow_full_path, FILE_PROPERTY, false)); // boolean defaults for user defined props meta.put(hsqldb_lock_file, getMeta(hsqldb_lock_file, SET_PROPERTY, true)); meta.put(hsqldb_nio_data_file, getMeta(hsqldb_nio_data_file, SET_PROPERTY, false)); meta.put(hsqldb_catalogs, getMeta(hsqldb_catalogs, SET_PROPERTY, false)); meta.put(sql_enforce_strict_size, getMeta(sql_enforce_strict_size, SET_PROPERTY, false)); meta.put(sql_tx_no_multi_write, getMeta(sql_tx_no_multi_write, SET_PROPERTY, false)); meta.put(textdb_quoted, getMeta(textdb_quoted, SET_PROPERTY, false)); meta.put(textdb_all_quoted, getMeta(textdb_all_quoted, SET_PROPERTY, false)); meta.put(textdb_ignore_first, getMeta(textdb_ignore_first, SET_PROPERTY, false)); // integral defaults for user-defined set props meta.put(hsqldb_applog, getMeta(hsqldb_applog, SET_PROPERTY, 0, new byte[] { 0, 1, 2 })); meta.put(hsqldb_cache_file_scale, getMeta(hsqldb_cache_file_scale, SET_PROPERTY, 1, new byte[] { 1, 8 })); meta.put(hsqldb_script_format, getMeta(hsqldb_script_format, SET_PROPERTY, 0, new byte[] { 0, 1, 3 })); // integral defaults for proteced range props meta.put(hsqldb_log_size, getMeta(hsqldb_log_size, SQL_PROPERTY, 0, 0, 16000)); meta.put(hsqldb_defrag_limit, getMeta(hsqldb_defrag_limit, SQL_PROPERTY, 200, 0, 16000)); // integral defaults for user defined range props meta.put(runtime_gc_interval, getMeta(runtime_gc_interval, SET_PROPERTY, 0, 0, 1000000)); meta.put(hsqldb_cache_free_count_scale, getMeta(hsqldb_cache_free_count_scale, SET_PROPERTY, 9, 6, 12)); meta.put(hsqldb_cache_scale, getMeta(hsqldb_cache_scale, SET_PROPERTY, 14, 8, 18)); meta.put(hsqldb_cache_size_scale, getMeta(hsqldb_cache_size_scale, SET_PROPERTY, 10, 6, 20)); meta.put(hsqldb_max_nio_scale, getMeta(hsqldb_max_nio_scale, SET_PROPERTY, 28, 24, 31)); meta.put(hsqldb_raf_buffer_scale, getMeta(hsqldb_raf_buffer_scale, SET_PROPERTY, 12, 8, 13)); meta.put(textdb_cache_scale, getMeta(textdb_cache_scale, SET_PROPERTY, 10, 8, 16)); meta.put(textdb_cache_size_scale, getMeta(textdb_cache_size_scale, SET_PROPERTY, 10, 6, 20)); } private Database database; public HsqlDatabaseProperties(Database db) { super(db.getPath(), db.getFileAccess(), db.isFilesInJar()); database = db; // char padding to size and exception if data is too long setProperty(sql_enforce_strict_size, false); // removed from 1.7.2 - sql.month is always true (1-12) // removed from 1.7.2 - sql.strict_fk is always enforced // if true, requires a pre-existing unique index for foreign key // referenced column and returns an error if index does not exist // 1.61 creates a non-unique index if no index exists // setProperty("sql.strict_fk", false); // removed from 1.7.2 // has no effect if sql_strict_fk is true, otherwise if true, // creates a unique index for foreign keys instead of non-unique // setProperty("sql.strong_fk", true); // the two properties below are meant for attempting to open an // existing database with all its files *.properties, *script and // *.data. // version of a new database setProperty(db_version, THIS_VERSION); // the earliest version that can open this database // this is set to 1.7.2 when the db is written to setProperty(hsqldb_compatible_version, FIRST_COMPATIBLE_VERSION); // data format of the cache file // this is set to 1.7.0 when a new *.data file is created setProperty(hsqldb_cache_version, THIS_CACHE_VERSION); // the version that created this database // once created, this won't change if db is used with a future version setProperty(hsqldb_original_version, THIS_VERSION); /* garbage collection with gc_interval Setting this value can be useful when HSQLDB is used as an in-process part of an application. The minimum practical amount is probably "10000" and the maximum "1000000" In some versions of Java, such as 1.3.1_02 on windows, when the application runs out of memory it runs the gc AND requests more memory from the OS. Setting this property forces the DB to live inside its memory budget but the maximum amount of memory can still be set with the java -Xmx argument to provide the memory needed by other parts of the app to do graphics and networking. Of course there is a speed penalty for setting the value too low and doing garbage collection too often. This was introduced as a result of tests by Karl Meissner (meissnersd@users) */ // garbage collect per Record or Cache Row objects created // the default, "0" means no garbage collection is forced by // hsqldb (the Java Runtime will do it's own garbage collection // in any case). setProperty(runtime_gc_interval, 0); // this property is either 1 or 8 setProperty(hsqldb_cache_file_scale, 1); // this property is between 6 - 20, default 8 setProperty(hsqldb_cache_size_scale, 8); // number of rows from CACHED tables kept constantly in memory // the number of rows in up to 3 * (2 to the power of // cache_scale value). // reduce the default 14 (3*16K rows) if memory is limited and rows // are large. // values between 8-16 are allowed setProperty(hsqldb_cache_scale, 14); // maximum size of .log file in megabytes setProperty(hsqldb_log_size, 200); // type of logging (0 : text , 1 : binary, 3 : compressed) setProperty(hsqldb_script_format, 0); setProperty(db_readonly, false); setProperty(db_modified, "no-new-files"); // initial method of data file access setProperty(hsqldb_nio_data_file, true); // set default table type to MEMORY setProperty(hsqldb_default_table_type, "memory"); // the property "version" is also set to the current version // // the following properties can be set by the user as defaults for // text tables. the default values are shown. // "textdb.fs", "," // "textdb.vs", ","; // "textdb.lvs", "," // "textdb.ignore_first", false // "textdb.quoted", true // "textdb.all_quoted", false // "textdb.encoding", "ASCII" // "textdb.cache_scale", 10 -- allowed range 8-16 // "textdb.cache_size_scale", 10 -- allowed range 8-20 // // OOo related code if (db.isStoredFileAccess()) { setProperty(hsqldb_default_table_type, "cached"); setProperty(hsqldb_cache_scale, 13); setProperty(hsqldb_log_size, 10); setProperty(sql_enforce_strict_size, true); setProperty(hsqldb_nio_data_file, false); } // OOo end } /** * Creates file with defaults if it didn't exist. * Returns false if file already existed. */ public boolean load() throws HsqlException { boolean exists; if (!DatabaseURL.isFileBasedDatabaseType(database.getType())) { return true; } try { exists = super.load(); } catch (Exception e) { throw Trace.error(Trace.FILE_IO_ERROR, Trace.LOAD_SAVE_PROPERTIES, new Object[] { fileName, e }); } if (!exists) { return false; } filterLoadedProperties(); String version = getProperty(hsqldb_compatible_version); // do not open if the database belongs to a later (future) version int check = version.substring(0, 5).compareTo(THIS_VERSION); if (check > 0) { throw Trace.error(Trace.WRONG_DATABASE_FILE_VERSION); } version = getProperty(db_version); if (version.charAt(2) == '6') { setProperty(hsqldb_cache_version, "1.6.0"); } JavaSystem.gcFrequency = getIntegerProperty(runtime_gc_interval, 0); return true; } /** * Sets the database member variables after creating the properties object, * openning a properties file, or changing a property with a command */ public void setDatabaseVariables() { if (isPropertyTrue(db_readonly)) { database.setReadOnly(); } if (isPropertyTrue(hsqldb_files_readonly)) { database.setFilesReadOnly(); } database.sqlEnforceStrictSize = isPropertyTrue(sql_enforce_strict_size); if (isPropertyTrue(sql_compare_in_locale)) { stringProps.remove(sql_compare_in_locale); database.collation.setCollationAsLocale(); } database.txManager.setReWriteProtection( isPropertyTrue(sql_tx_no_multi_write)); database.setMetaDirty(false); } public void save() throws HsqlException { if (!DatabaseURL.isFileBasedDatabaseType(database.getType()) || database.isFilesReadOnly() || database.isFilesInJar()) { return; } try { super.save(fileName + ".properties" + ".new"); fa.renameElement(fileName + ".properties" + ".new", fileName + ".properties"); } catch (Exception e) { database.logger.appLog.logContext(SimpleLog.LOG_ERROR, "failed"); throw Trace.error(Trace.FILE_IO_ERROR, Trace.LOAD_SAVE_PROPERTIES, new Object[] { fileName, e }); } } void filterLoadedProperties() { Enumeration en = stringProps.propertyNames(); while (en.hasMoreElements()) { String key = (String) en.nextElement(); boolean accept = meta.containsKey(key); if (!accept) { stringProps.remove(key); } } } /** * overload file database properties with any passed on URL line * do not store password etc */ public void setURLProperties(HsqlProperties p) { if (p != null) { for (Enumeration e = p.propertyNames(); e.hasMoreElements(); ) { String propertyName = (String) e.nextElement(); Object[] row = (Object[]) meta.get(propertyName); if (row != null && (db_readonly.equals(propertyName) || ((Integer) row[indexAccess]).intValue() == SET_PROPERTY)) { // can add error checking with defaults setProperty(propertyName, p.getProperty(propertyName)); } } } } public Set getUserDefinedPropertyData() { Set set = new HashSet(); Iterator it = meta.values().iterator(); while (it.hasNext()) { Object[] row = (Object[]) it.next(); if (((Integer) row[indexAccess]).intValue() == SET_PROPERTY) { set.add(row); } } return set; } public boolean isUserDefinedProperty(String key) { Object[] row = (Object[]) meta.get(key); return row != null && ((Integer) row[indexAccess]).intValue() == SET_PROPERTY; } public boolean isBoolean(String key) { Object[] row = (Object[]) meta.get(key); return row != null && row[indexClass].equals("boolean") && ((Integer) row[indexAccess]).intValue() == SET_PROPERTY; } public boolean isIntegral(String key) { Object[] row = (Object[]) meta.get(key); return row != null && row[indexClass].equals("int") && ((Integer) row[indexAccess]).intValue() == SET_PROPERTY; } public boolean isString(String key) { Object[] row = (Object[]) meta.get(key); return row != null && row[indexClass].equals("java.lang.String") && ((Integer) row[indexAccess]).intValue() == SET_PROPERTY; } public String setDatabaseProperty(String key, String value) throws HsqlException { Object[] row = (Object[]) meta.get(key); // can check bounds here value = super.setProperty(key, value); return value; } public int getDefaultWriteDelay() { // OOo related code if (database.isStoredFileAccess()) { return 2000; } // OOo end return 10000; } public void setDBModified(int mode) throws HsqlException { String value = MODIFIED_NO; if (mode == FILES_MODIFIED) { value = MODIFIED_YES; } else if (mode == FILES_NEW) { value = MODIFIED_NEW; } setProperty(db_modified, value); save(); } public int getDBModified() throws HsqlException { String value = getProperty("modified"); if (MODIFIED_YES.equals(value)) { return FILES_MODIFIED; } else if (MODIFIED_NEW.equals(value)) { return FILES_NEW; } return FILES_NOT_MODIFIED; } private static Object[] getMeta(String name, int accessLevel, String defaultValue) { Object[] row = new Object[indexLimit]; row[indexName] = name; row[indexAccess] = ValuePool.getInt(accessLevel); row[indexClass] = "java.lang.String"; row[indexDefaultValue] = defaultValue; return row; } private static Object[] getMeta(String name, int accessLevel, boolean defaultValue) { Object[] row = new Object[indexLimit]; row[indexName] = name; row[indexAccess] = ValuePool.getInt(accessLevel); row[indexClass] = "boolean"; row[indexDefaultValue] = defaultValue ? Boolean.TRUE : Boolean.FALSE; return row; } private static Object[] getMeta(String name, int accessLevel, int defaultValue, byte[] values) { Object[] row = new Object[indexLimit]; row[indexName] = name; row[indexAccess] = ValuePool.getInt(accessLevel); row[indexClass] = "int"; row[indexDefaultValue] = ValuePool.getInt(defaultValue); row[indexValues] = values; return row; } private static Object[] getMeta(String name, int accessLevel, int defaultValue, int rangeLow, int rangeHigh) { Object[] row = new Object[indexLimit]; row[indexName] = name; row[indexAccess] = ValuePool.getInt(accessLevel); row[indexClass] = "int"; row[indexDefaultValue] = ValuePool.getInt(defaultValue); row[indexIsRange] = Boolean.TRUE; row[indexRangeLow] = ValuePool.getInt(rangeLow); row[indexRangeHigh] = ValuePool.getInt(rangeHigh); return row; } } hsqldb-1.8.0.10.orig/src/org/hsqldb/HsqlDateTime.java0000644000175000017500000004772610767512763020677 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb; import java.sql.Date; import java.sql.Time; import java.sql.Timestamp; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.GregorianCalendar; import java.util.TimeZone; // fredt@users 20020130 - patch 1.7.0 by fredt - new class // replaces patch by deforest@users // fredt@users 20020414 - patch 517028 by peterhudson@users - use of calendar // fredt@users 20020414 - patch 828957 by tjcrowder@users - JDK 1.3 compatibility // fredt@users 20040105 - patch 870957 by Gerhard Hiller - JDK bug workaround /** * collection of static methods to convert Date, Time and Timestamp strings * into corresponding Java objects. Also accepts SQL literals such as NOW, * TODAY as valid strings and returns the current date / time / datetime. * Compatible with jdk 1.1.x.

    * * Was reviewed for 1.7.2 resulting in centralising all DATETIME related * operstions.

    * * HSQLDB uses the client and server's default timezone for all DATETIME * operations. It stores the DATETIME values in .log and .script files using * the default locale of the server. The same values are stored as binary * UTC timestamps in .data files. If the database is trasported from one * timezone to another, then the DATETIME values in cached tables will be * handled as UTC but those in other tables will be treated as local. So * a timestamp representing 12 noon stored in Tokyo timezone will be treated * as 9 pm in London when stored in a cached table but the same value stored * in a memory table will be treated as 12 noon. * * @author fredt@users * @version 1.7.2 * @since 1.7.0 */ public class HsqlDateTime { /** * A reusable static value for today's date. Should only be accessed * by getToday() */ private static Calendar today = new GregorianCalendar(); private static Calendar tempCal = new GregorianCalendar(); private static Calendar tempCalDefault = new GregorianCalendar(); private static Calendar tempCalGMT = new GregorianCalendar(TimeZone.getTimeZone("GMT")); private static Date tempDate = new Date(0); private static Date currentDate; static { resetToday(System.currentTimeMillis()); } static final String zerodatetime = "1970-01-01 00:00:00.000000000"; static final String zeronanos = "000000000"; /** * Converts a string in JDBC timestamp escape format to a * Timestamp value. * * @param s timestamp in format yyyy-mm-dd hh:mm:ss.fffffffff * where end part can be omitted, or "NOW" (case insensitive) * @return corresponding Timestamp value * @exception java.lang.IllegalArgumentException if the given argument * does not have the format yyyy-mm-dd hh:mm:ss.fffffffff */ public static Timestamp timestampValue(String s) throws HsqlException { if (s == null) { throw Trace.error(Trace.HsqlDateTime_null_string); } if (s.length() > zerodatetime.length()) { throw Trace.error(Trace.STRING_DATA_TRUNCATION); } s = s + zerodatetime.substring(s.length()); return Timestamp.valueOf(s); } /** * For use with .script file, simpler than above */ public static Timestamp simpleTimestampValue(String s) { return Timestamp.valueOf(s); } /** * @param time milliseconds * @param nano nanoseconds * @return Timestamp object */ public static Timestamp timestampValue(long time, int nano) { Timestamp ts = new Timestamp(time); ts.setNanos(nano); return ts; } /** * Converts a string in JDBC date escape format to a Date * value. Also accepts Timestamp values. * * @param s date in format yyyy-mm-dd, * @return corresponding Date value * @exception java.lang.IllegalArgumentException if the given argument * does not have the format yyyy-mm-dd */ public static Date dateValue(String s) throws HsqlException { if (s == null) { throw Trace.error(Trace.HsqlDateTime_null_string); } if (s.length() > sdfdPattern.length()) { s = s.substring(0, sdfdPattern.length()); } return Date.valueOf(s); } /** * Converts a string in JDBC date escape format to a * Time value. * * @param s date in format hh:mm:ss * @return corresponding Time value * @exception java.lang.IllegalArgumentException if the given argument * does not have the format hh:mm:ss */ public static Time timeValue(String s) { if (s == null) { throw new java.lang.IllegalArgumentException( Trace.getMessage(Trace.HsqlDateTime_null_string)); } return Time.valueOf(s); } static int compare(Date a, Date b) { long atime = a.getTime(); long btime = b.getTime(); if (atime == btime) { return 0; } return atime > btime ? 1 : -1; } static int compare(Time a, Time b) { long atime = a.getTime(); long btime = b.getTime(); if (atime == btime) { return 0; } return atime > btime ? 1 : -1; } static int compare(Timestamp a, Timestamp b) { long atime = a.getTime(); long btime = b.getTime(); if (atime == btime) { if (a.getNanos() == b.getNanos()) { return 0; } return a.getNanos() > b.getNanos() ? 1 : -1; } return atime > btime ? 1 : -1; } public static synchronized Date getCurrentDate(long millis) { getToday(millis); return currentDate; } public static Timestamp getTimestamp(long millis) { return new Timestamp(millis); } private static final String sdftPattern = "HH:mm:ss"; private static final String sdfdPattern = "yyyy-MM-dd"; private static final String sdftsPattern = "yyyy-MM-dd HH:mm:ss."; private static final String sdftsSysPattern = "yyyy-MM-dd HH:mm:ss.SSS"; static SimpleDateFormat sdfd = new SimpleDateFormat(sdfdPattern); static SimpleDateFormat sdft = new SimpleDateFormat(sdftPattern); static SimpleDateFormat sdfts = new SimpleDateFormat(sdftsPattern); static SimpleDateFormat sdftsSys = new SimpleDateFormat(sdftsSysPattern); /** * Creates a valid timestamp string - jre 1.3 returns incorrect date part * for Timestamp.toString(); */ public static String getTimestampString(Timestamp x) { synchronized (sdfts) { sdfts.setCalendar(tempCalDefault); String n = String.valueOf(x.getNanos()); return sdfts.format(x) + zeronanos.substring(n.length()) + n; } } /** * Creates a full length timestamp string, with 9 digist for nanos */ public static String getTimestampString(Timestamp x, Calendar cal) { synchronized (sdfts) { sdfts.setCalendar(cal == null ? tempCalDefault : cal); String n = String.valueOf(x.getNanos()); return sdfts.format(x) + zeronanos.substring(n.length()) + n; } } private static java.util.Date sysDate = new java.util.Date(); public static String getSytemTimeString() { synchronized (sdftsSys) { sysDate.setTime(System.currentTimeMillis()); return sdftsSys.format(sysDate); } } public static String getTimestampString(long timestamp) { synchronized (sdftsSys) { sysDate.setTime(timestamp); return sdftsSys.format(sysDate); } } public static String getTimeString(java.util.Date x, Calendar cal) { synchronized (sdft) { sdft.setCalendar(cal == null ? tempCalDefault : cal); return sdft.format(x); } } public static String getDateString(java.util.Date x, Calendar cal) { synchronized (sdfd) { sdfd.setCalendar(cal == null ? tempCalDefault : cal); return sdfd.format(x); } } /** * Returns the same Date Object. This object should be treated as * read-only. */ static synchronized Calendar getToday(long millis) { if (millis - getTimeInMillis(today) >= 24 * 3600 * 1000) { resetToday(millis); } return today; } public static void resetToDate(Calendar cal) { cal.set(Calendar.HOUR_OF_DAY, 0); cal.set(Calendar.MINUTE, 0); cal.set(Calendar.SECOND, 0); cal.set(Calendar.MILLISECOND, 0); } public static void resetToTime(Calendar cal) { cal.set(Calendar.YEAR, 1970); cal.set(Calendar.MONTH, 0); cal.set(Calendar.DATE, 1); cal.set(Calendar.MILLISECOND, 0); } /** * resets the static reusable value today */ private static synchronized void resetToday(long millis) { //#ifdef JAVA4 // Use method directly today.setTimeInMillis(millis); //#else /* // Have to go indirect tempDate.setTime(millis); today.setTime(tempDate); */ //#endif JAVA4 resetToDate(today); currentDate = new Date(getTimeInMillis(today)); } /** * Sets the time in the given Calendar using the given milliseconds value; wrapper method to * allow use of more efficient JDK1.4 method on JDK1.4 (was protected in earlier versions). * * @param cal the Calendar * @param millis the time value in milliseconds */ private static void setTimeInMillis(Calendar cal, long millis) { //#ifdef JAVA4 // Use method directly cal.setTimeInMillis(millis); //#else /* // Have to go indirect synchronized (tempDate) { tempDate.setTime(millis); cal.setTime(tempDate); } */ //#endif JAVA4 } public static long getTimeInMillis(java.util.Date dt, Calendar source, Calendar target) { if (source == null) { source = tempCalDefault; } if (target == null) { target = tempCalDefault; } synchronized (tempCal) { tempCal.setTimeZone(source.getTimeZone()); tempCal.setTime(dt); tempCal.setTimeZone(target.getTimeZone()); return getTimeInMillis(tempCal); } } /** * Gets the time from the given Calendar as a milliseconds value; wrapper method to * allow use of more efficient JDK1.4 method on JDK1.4 (was protected in earlier versions). * * @param cal the Calendar * @return the time value in milliseconds */ public static long getTimeInMillis(Calendar cal) { //#ifdef JAVA4 // Use method directly return (cal.getTimeInMillis()); //#else /* // Have to go indirect return (cal.getTime().getTime()); */ //#endif JAVA4 } public static long getNormalisedTime(long t) { synchronized (tempCalDefault) { setTimeInMillis(tempCalDefault, t); resetToTime(tempCalDefault); return getTimeInMillis(tempCalDefault); } } public static Time getNormalisedTime(Time t) { return new Time(getNormalisedTime(t.getTime())); } public static Time getNormalisedTime(Timestamp ts) { return new Time(getNormalisedTime(ts.getTime())); } public static long getNormalisedDate(long d) { synchronized (tempCalDefault) { setTimeInMillis(tempCalDefault, d); resetToDate(tempCalDefault); return getTimeInMillis(tempCalDefault); } } public static Date getNormalisedDate(Timestamp ts) { synchronized (tempCalDefault) { setTimeInMillis(tempCalDefault, ts.getTime()); resetToDate(tempCalDefault); long value = getTimeInMillis(tempCalDefault); return new Date(value); } } public static Date getNormalisedDate(Date d) { synchronized (tempCalDefault) { setTimeInMillis(tempCalDefault, d.getTime()); resetToDate(tempCalDefault); long value = getTimeInMillis(tempCalDefault); return new Date(value); } } public static Timestamp getNormalisedTimestamp(Time t) { synchronized (tempCalDefault) { setTimeInMillis(tempCalDefault, System.currentTimeMillis()); resetToDate(tempCalDefault); long value = getTimeInMillis(tempCalDefault) + t.getTime(); return new Timestamp(value); } } public static Timestamp getNormalisedTimestamp(Date d) { synchronized (tempCalDefault) { setTimeInMillis(tempCalDefault, d.getTime()); resetToDate(tempCalDefault); long value = getTimeInMillis(tempCalDefault); return new Timestamp(value); } } /** * Returns the indicated part of the given java.util.Date object. * @param d the Date object from which to extract the indicated part * @param part an integer code corresponding to the desired date part * @return the indicated part of the given java.util.Date object */ static int getDateTimePart(java.util.Date d, int part) { synchronized (tempCalDefault) { tempCalDefault.setTime(d); return tempCalDefault.get(part); } } private static final char[][] dateTokens = { { 'R', 'R', 'R', 'R' }, { 'I', 'Y', 'Y', 'Y' }, { 'Y', 'Y', 'Y', 'Y' }, { 'I', 'Y' }, { 'Y', 'Y' }, { 'B', 'C' }, { 'B', '.', 'C', '.' }, { 'A', 'D' }, { 'A', '.', 'D', '.' }, { 'M', 'O', 'N' }, { 'M', 'O', 'N', 'T', 'H' }, { 'D' }, { 'I', 'W' }, { 'D', 'D' }, { 'D', 'D', 'D' }, { 'H', 'H', '2', '4' }, { 'H', 'H', '1', '2' }, { 'H', 'H' }, { 'M', 'I', }, { 'S', 'S' }, { 'A', 'M' }, { 'P', 'M', }, { 'A', '.', 'M', '.' }, { 'P', '.', 'M', '.' } }; private static final String[] javaDateTokens = { "yyyy", "yyyy", "yyyy", "yy", "yy", "G", "G", "G", "G", "MMM", "MMMMM", "E", "w", "dd", "D", "k", "K", "K", "mm", "ss", "aaa", "aaa", "aaa", "aaa" }; /** Indicates end-of-input */ public static final char e = 0xffff; /** * Converts the given format into a pattern accepted by java.text.SimpleDataFormat * @param format * @return */ public static String toJavaDatePattern(String format) { int len = format.length(); char ch; StringBuffer pattern = new StringBuffer(len); Tokenizer tokenizer = new Tokenizer(); for (int i = 0; i <= len; i++) { ch = (i == len) ? e : format.charAt(i); if (!tokenizer.next(ch, dateTokens)) { int index = tokenizer.getLastMatch(); if (index >= 0) { pattern.setLength(pattern.length() - tokenizer.length()); pattern.append(javaDateTokens[index]); } tokenizer.reset(); if (tokenizer.isConsumed()) { continue; } } pattern.append(ch); } pattern.setLength(pattern.length() - 1); return pattern.toString(); } /** * This class can match 64 tokens at maximum. */ static class Tokenizer { private int last; private int offset; private long state; private boolean consumed; public Tokenizer() { reset(); } /** * Resets for next reuse. * */ public void reset() { last = -1; offset = -1; state = 0; } /** * Returns a length of a token to match. * @return */ public int length() { return offset; } /** * Returns an index of the last matched token. * @return */ public int getLastMatch() { return last; } /** * Indicates whethe the last character has been consumed by the matcher. * @return */ public boolean isConsumed() { return consumed; } /** * Checks whether the specified bit is not set. * @param bit * @return */ private boolean isZeroBit(int bit) { return (state & (1L << bit)) == 0; } /** * Sets the specified bit. * @param bit */ private void setBit(int bit) { state |= (1L << bit); } /** * Matches the specified character against tokens. * @param ch * @param tokens * @return */ public boolean next(char ch, char[][] tokens) { // Use local variable for performance int index = ++offset; int len = offset + 1; int left = 0; consumed = false; for (int i = tokens.length; --i >= 0; ) { if (isZeroBit(i)) { if (tokens[i][index] == ch) { consumed = true; if (tokens[i].length == len) { setBit(i); last = i; } else { ++left; } } else { setBit(i); } } } return left > 0; } } } hsqldb-1.8.0.10.orig/src/org/hsqldb/CompiledStatement.java0000644000175000017500000005446110504635464021757 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb; import org.hsqldb.HsqlNameManager.HsqlName; /** * A simple structure class for holding the products of * statement compilation for later execution. * * @author boucherb@users * @version 1.7.2 * @since 1.7.2 */ // fredt@users 20040404 - patch 1.7.2 - fixed type resolution for parameters // boucherb@users 200404xx - patch 1.7.2 - changed parameter naming scheme for SQLCI client usability/support // fredt@users 20050609 - 1.8.0 - fixed EXPLAIN PLAN by implementing describe(Session) final class CompiledStatement { static final String PCOL_PREFIX = "@p"; static final String RETURN_COLUMN_NAME = "@p0"; static final int UNKNOWN = 0; // enumeration of allowable CompiledStatement types static final int INSERT_VALUES = 1; static final int INSERT_SELECT = 2; static final int UPDATE = 3; static final int DELETE = 4; static final int SELECT = 5; static final int SELECT_INTO = 6; static final int CALL = 7; // enumeration of catagories static final int DML = 7; static final int DQL = 8; static final int DDL = 9; /** id in CompiledStatementManager */ int id; /** false when cleared */ boolean isValid = true; /** target table for INSERT_XXX, UPDATE and DELETE */ Table targetTable; /** table filter for UPDATE and DELETE */ TableFilter targetFilter; /** condition expression for UPDATE and DELETE */ Expression condition; /** column map for INSERT_XXX, UPDATE */ int[] columnMap; /** Column value Expressions for INSERT_VALUES and UPDATE. */ Expression[] columnValues; /** * Flags indicating which columns' values will/will not be * explicitly set. */ boolean[] checkColumns; /** Expression to be evaluated when this is a CALL statement. */ Expression expression; /** * Select to be evaluated when this is an INSERT_SELECT or * SELECT statement */ Select select; /** * Parse-order array of Expression objects, all of iType == PARAM , * involved in some way in any INSERT_XXX, UPDATE, DELETE, SELECT or * CALL CompiledStatement */ Expression[] parameters; /** * int[] contains type of each parameter */ int[] paramTypes; /** * Subqueries inverse parse depth order */ SubQuery[] subqueries; /** * The type of this CompiledStatement.

    * * One of:

    * *

      *
    1. UNKNOWN *
    2. INSERT_VALUES *
    3. INSERT_SELECT *
    4. UPDATE *
    5. DELETE *
    6. SELECT *
    7. CALL *
    8. DDL *
    */ int type; /** * The SQL string that produced this compiled statement */ String sql; /** * The default schema name used to resolve names in the sql */ final HsqlName schemaHsqlName; /** * Creates a new instance of CompiledStatement for DDL * */ CompiledStatement(HsqlName schema) { parameters = new Expression[0]; paramTypes = new int[0]; subqueries = new SubQuery[0]; type = DDL; schemaHsqlName = schema; } /** * Initializes this as a DELETE statement * * @param targetFilter * @param deleteCondition * @param parameters */ CompiledStatement(Session session, Database database, HsqlName schema, TableFilter targetFilter, Expression deleteCondition, SubQuery[] subqueries, Expression[] params) throws HsqlException { schemaHsqlName = schema; this.targetFilter = targetFilter; targetTable = targetFilter.filterTable; if (deleteCondition != null) { condition = new Expression(deleteCondition); condition.resolveTables(targetFilter); condition.resolveTypes(session); targetFilter.setConditions(session, condition); } setParameters(params); setSubqueries(subqueries); type = DELETE; } /** * Instantiate this as an UPDATE statement. * * @param targetTable * @param columnMap * @param columnValues * @param updateCondition * @param params */ CompiledStatement(Session session, Database database, HsqlName schema, TableFilter targetFilter, int[] columnMap, Expression[] columnValues, Expression updateCondition, SubQuery[] subqueries, Expression[] params) throws HsqlException { schemaHsqlName = schema; this.targetFilter = targetFilter; targetTable = targetFilter.filterTable; this.columnMap = columnMap; this.columnValues = columnValues; for (int i = 0; i < columnValues.length; i++) { Expression cve = columnValues[i]; if (cve.isParam()) { cve.setTableColumnAttributes(targetTable, columnMap[i]); } else { cve.resolveTables(targetFilter); cve.resolveTypes(session); } } if (updateCondition != null) { condition = new Expression(updateCondition); condition.resolveTables(targetFilter); condition.resolveTypes(session); targetFilter.setConditions(session, condition); } setParameters(params); setSubqueries(subqueries); type = UPDATE; } /** * Instantiate this as an INSERT_VALUES statement. * * @param targetTable * @param columnMap * @param columnValues * @param checkColumns * @param params */ CompiledStatement(HsqlName schema, Table targetTable, int[] columnMap, Expression[] columnValues, boolean[] checkColumns, SubQuery[] subqueries, Expression[] params) throws HsqlException { schemaHsqlName = schema; this.targetTable = targetTable; this.columnMap = columnMap; this.checkColumns = checkColumns; this.columnValues = columnValues; for (int i = 0; i < columnValues.length; i++) { Expression cve = columnValues[i]; // If its not a param, it's already been resolved in // Parser.getColumnValueExpressions if (cve.isParam()) { cve.setTableColumnAttributes(targetTable, columnMap[i]); } } setParameters(params); setSubqueries(subqueries); type = INSERT_VALUES; } /** * Instantiate this as an INSERT_SELECT statement. * * @param targetTable * @param columnMap * @param checkColumns * @param select * @param params */ CompiledStatement(Session session, Database database, HsqlName schema, Table targetTable, int[] columnMap, boolean[] checkColumns, Select select, SubQuery[] subqueries, Expression[] params) throws HsqlException { schemaHsqlName = schema; this.targetTable = targetTable; this.columnMap = columnMap; this.checkColumns = checkColumns; this.select = select; // resolve any parameters in SELECT resolveInsertParameterTypes(); // set select result metadata etc. select.prepareResult(session); setParameters(params); setSubqueries(subqueries); type = INSERT_SELECT; } /** * Instantiate this as a SELECT statement. * * @param select * @param params */ CompiledStatement(Session session, Database database, HsqlName schema, Select select, SubQuery[] subqueries, Expression[] params) throws HsqlException { schemaHsqlName = schema; this.select = select; // resolve any parameters in SELECT as VARCHAR for (int i = 0; i < select.iResultLen; i++) { Expression colexpr = select.exprColumns[i]; if (colexpr.getDataType() == Types.NULL) { colexpr.setDataType(Types.VARCHAR); } } // set select result metadata etc. select.prepareResult(session); setParameters(params); setSubqueries(subqueries); type = SELECT; } /** * Instantiate this as a CALL statement. * * @param expression * @param params */ CompiledStatement(Session session, Database database, HsqlName schema, Expression expression, SubQuery[] subqueries, Expression[] params) throws HsqlException { schemaHsqlName = schema; this.expression = expression; expression.resolveTypes(session); expression.paramMode = Expression.PARAM_OUT; setParameters(params); setSubqueries(subqueries); type = CALL; } /** * For parameters in INSERT_VALUES and INSERT_SELECT lists */ private void resolveInsertParameterTypes() { for (int i = 0; i < select.iResultLen; i++) { Expression colexpr = select.exprColumns[i]; if (colexpr.getDataType() == Types.NULL) { Column col = targetTable.getColumn(columnMap[i]); colexpr.setDataType(col.getType()); } } } private void setParameters(Expression[] params) { this.parameters = params; int[] types = new int[parameters.length]; for (int i = 0; i < parameters.length; i++) { types[i] = parameters[i].getDataType(); } this.paramTypes = types; } private void setSubqueries(SubQuery[] subqueries) { this.subqueries = subqueries; } void materializeSubQueries(Session session) throws HsqlException { for (int i = 0; i < subqueries.length; i++) { SubQuery sq = subqueries[i]; // VIEW working table contents are filled only once per query and reused if (sq.isMaterialised) { continue; } if (sq.isResolved) { sq.populateTable(session); sq.isMaterialised = true; } } } void dematerializeSubQueries(Session session) { if (subqueries == null) { return; } for (int i = 0; i < subqueries.length; i++) { subqueries[i].table.clearAllRows(session); subqueries[i].isMaterialised = false; } } void clearVariables() { isValid = false; targetTable = null; targetFilter = null; condition = null; columnMap = null; columnValues = null; checkColumns = null; expression = null; select = null; parameters = null; paramTypes = null; subqueries = null; } boolean canExecute(Session session) throws HsqlException { switch (type) { case CALL : {} case SELECT : for (int i = 0; i < select.tFilter.length; i++) { HsqlName name = select.tFilter[i].filterTable.getName(); session.check(name, UserManager.SELECT); } break; case INSERT_SELECT : break; case DELETE : session.check(targetTable.getName(), UserManager.DELETE); break; case INSERT_VALUES : session.check(targetTable.getName(), UserManager.INSERT); break; case UPDATE : session.check(targetTable.getName(), UserManager.UPDATE); break; case DDL : } return true; } void checkTableWriteAccess(Session session, Table table) throws HsqlException { // session level user rights session.checkReadWrite(); // object type if (table.isView()) { throw Trace.error(Trace.NOT_A_TABLE, table.getName().name); } // object readonly table.checkDataReadOnly(); } private static final Result updateCountResult = new Result(ResultConstants.UPDATECOUNT); Result describeResult() { switch (type) { case CALL : { // TODO: // // 1.) standard to register metadata for columns of // the primary result set, if any, generated by call // // 2.) Represent the return value, if any (which is // not, in truth, a result set), as an OUT parameter // // For now, I've reverted a bunch of code I had in place // and instead simply reflect things as the are, describing // a single column result set that communicates // the return value. If the expression generating the // return value has a void return type, a result set // is described whose single column is of type NULL Expression e; Result r; e = expression; r = Result.newSingleColumnResult( CompiledStatement.RETURN_COLUMN_NAME, e.getDataType()); r.metaData.classNames[0] = e.getValueClassName(); // no more setup for r; all the defaults apply return r; } case SELECT : return select.sIntoTable == null ? select.describeResult() : updateCountResult; case DELETE : case INSERT_SELECT : case INSERT_VALUES : case UPDATE : case DDL : // will result in return updateCountResult; default : return new Result( Trace.runtimeError( Trace.UNSUPPORTED_INTERNAL_OPERATION, "CompiledStatement.describeResult()"), null); } } Result describeParameters() { Result out; Expression e; int outlen; int offset; int idx; boolean hasReturnValue; outlen = parameters.length; offset = 0; // NO: Not yet // hasReturnValue = (type == CALL && !expression.isProcedureCall()); // // if (hasReturnValue) { // outlen++; // offset = 1; // } out = Result.newParameterDescriptionResult(outlen); // NO: Not yet // if (hasReturnValue) { // e = expression; // out.sName[0] = DIProcedureInfo.RETURN_COLUMN_NAME; // out.sClassName[0] = e.getValueClassName(); // out.colType[0] = e.getDataType(); // out.colSize[0] = e.getColumnSize(); // out.colScale[0] = e.getColumnScale(); // out.nullability[0] = e.nullability; // out.isIdentity[0] = false; // out.paramMode[0] = expression.PARAM_OUT; // } for (int i = 0; i < parameters.length; i++) { e = parameters[i]; idx = i + offset; // always i + 1. We currently use the convention of @p0 to name the // return value OUT parameter out.metaData.colNames[idx] = CompiledStatement.PCOL_PREFIX + (i + 1); // sLabel is meaningless in this context. out.metaData.classNames[idx] = e.getValueClassName(); out.metaData.colTypes[idx] = e.getDataType(); out.metaData.colSizes[idx] = e.getColumnSize(); out.metaData.colScales[idx] = e.getColumnScale(); out.metaData.colNullable[idx] = e.nullability; out.metaData.isIdentity[idx] = e.isIdentity; // currently will always be Expression.PARAM_IN out.metaData.paramMode[idx] = e.paramMode; } return out; } /** * Retrieves a String representation of this object. * * @return the String representation of this object */ public String describe(Session session) { try { return describeImpl(session); } catch (Exception e) { return e.toString(); } } /** * Provides the toString() implementation. * * @throws Exception if a database access or io error occurs * @return the String representation of this object */ private String describeImpl(Session session) throws Exception { StringBuffer sb; sb = new StringBuffer(); switch (type) { case SELECT : { sb.append(select.describe(session)); appendParms(sb).append('\n'); appendSubqueries(sb); return sb.toString(); } case INSERT_VALUES : { sb.append("INSERT VALUES"); sb.append('[').append('\n'); appendColumns(sb).append('\n'); appendTable(sb).append('\n'); appendParms(sb).append('\n'); appendSubqueries(sb).append(']'); return sb.toString(); } case INSERT_SELECT : { sb.append("INSERT SELECT"); sb.append('[').append('\n'); appendColumns(sb).append('\n'); appendTable(sb).append('\n'); sb.append(select.describe(session)).append('\n'); appendParms(sb).append('\n'); appendSubqueries(sb).append(']'); return sb.toString(); } case UPDATE : { sb.append("UPDATE"); sb.append('[').append('\n'); appendColumns(sb).append('\n'); appendTable(sb).append('\n'); appendCondition(session, sb); sb.append(targetFilter.describe(session)).append('\n'); appendParms(sb).append('\n'); appendSubqueries(sb).append(']'); return sb.toString(); } case DELETE : { sb.append("DELETE"); sb.append('[').append('\n'); appendTable(sb).append('\n'); appendCondition(session, sb); sb.append(targetFilter.describe(session)).append('\n'); appendParms(sb).append('\n'); appendSubqueries(sb).append(']'); return sb.toString(); } case CALL : { sb.append("CALL"); sb.append('['); sb.append(expression.describe(session)).append('\n'); appendParms(sb).append('\n'); appendSubqueries(sb).append(']'); return sb.toString(); } default : { return "UNKNOWN"; } } } private StringBuffer appendSubqueries(StringBuffer sb) { sb.append("SUBQUERIES["); for (int i = 0; i < subqueries.length; i++) { sb.append("\n[level=").append(subqueries[i].level).append( '\n').append("hasParams=").append( subqueries[i].hasParams).append('\n'); if (subqueries[i].select != null) { sb.append("org.hsqldb.Select@").append( Integer.toHexString(subqueries[i].select.hashCode())); } sb.append("]"); } sb.append(']'); return sb; } private StringBuffer appendTable(StringBuffer sb) { sb.append("TABLE[").append(targetTable.getName().name).append(']'); return sb; } private StringBuffer appendColumns(StringBuffer sb) { sb.append("COLUMNS=["); for (int i = 0; i < columnMap.length; i++) { sb.append('\n').append(columnMap[i]).append(':').append( ' ').append( targetTable.getColumn(columnMap[i]).columnName.name).append( '[').append(columnValues[i]).append(']'); } sb.append(']'); return sb; } private StringBuffer appendParms(StringBuffer sb) { sb.append("PARAMETERS=["); for (int i = 0; i < parameters.length; i++) { sb.append('\n').append('@').append(i).append('[').append( parameters[i]).append(']'); } sb.append(']'); return sb; } private StringBuffer appendCondition(Session session, StringBuffer sb) { return condition == null ? sb.append("CONDITION[]\n") : sb.append("CONDITION[").append( condition.describe(session)).append( "]\n"); } } hsqldb-1.8.0.10.orig/src/org/hsqldb/Constraint.java0000644000175000017500000005062110476375034020456 0ustar renerene/* Copyright (c) 1995-2000, The Hypersonic SQL Group. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the Hypersonic SQL Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE HYPERSONIC SQL GROUP, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * This software consists of voluntary contributions made by many individuals * on behalf of the Hypersonic SQL Group. * * * For work added by the HSQL Development Group: * * Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb; import org.hsqldb.HsqlNameManager.HsqlName; import org.hsqldb.index.RowIterator; import org.hsqldb.lib.ArrayUtil; import org.hsqldb.lib.Iterator; // fredt@users 20020225 - patch 1.7.0 by boucherb@users - named constraints // fredt@users 20020320 - doc 1.7.0 - update // tony_lai@users 20020820 - patch 595156 - violation of Integrity constraint name /** * Implementation of a table constraint with references to the indexes used * by the constraint.

    * * @author Thomas Mueller (Hypersonic SQL Group) * @version 1.8.0 * @since Hypersonic SQL */ class Constraint { /* SQL CLI codes Referential Constraint 0 CASCADE Referential Constraint 1 RESTRICT Referential Constraint 2 SET NULL Referential Constraint 3 NO ACTION Referential Constraint 4 SET DEFAULT */ static final int CASCADE = 0, SET_NULL = 2, NO_ACTION = 3, SET_DEFAULT = 4, INIT_DEFERRED = 5, INIT_IMMEDIATE = 6, NOT_DEFERRABLE = 7; static final int FOREIGN_KEY = 0, MAIN = 1, UNIQUE = 2, CHECK = 3, PRIMARY_KEY = 4; ConstraintCore core; HsqlName constName; int constType; /** * Constructor declaration for PK and UNIQUE */ Constraint(HsqlName name, Table t, Index index, int type) { core = new ConstraintCore(); constName = name; constType = type; core.mainTable = t; core.mainIndex = index; /* fredt - in unique constraints column list for iColMain is the visible columns of iMain */ core.mainColArray = ArrayUtil.arraySlice(index.getColumns(), 0, index.getVisibleColumns()); core.colLen = core.mainColArray.length; } /** * Constructor for main constraints (foreign key references in PK table) */ Constraint(HsqlName name, Constraint fkconstraint) { constName = name; constType = MAIN; core = fkconstraint.core; } /** * Constructor for foreign key constraints. * * @param pkname name in the main (referenced) table, used internally * @param name name in the referencing table, public name of the constraint * @param mainTable referenced table * @param refTable referencing talbe * @param mainCols array of column indexes in main table * @param refCols array of column indexes in referencing table * @param mainIndex index on the main table * @param refIndex index on the referencing table * @param deleteAction triggered action on delete * @param updateAction triggered action on update * @exception HsqlException */ Constraint(HsqlName pkname, HsqlName name, Table mainTable, Table refTable, int[] mainCols, int[] refCols, Index mainIndex, Index refIndex, int deleteAction, int updateAction) throws HsqlException { core = new ConstraintCore(); core.pkName = pkname; core.fkName = name; constName = name; constType = FOREIGN_KEY; core.mainTable = mainTable; core.refTable = refTable; /* fredt - in FK constraints column lists for iColMain and iColRef have identical sets to visible columns of iMain and iRef respectively but the order of columns can be different and must be preserved */ core.mainColArray = mainCols; core.colLen = core.mainColArray.length; core.refColArray = refCols; core.mainIndex = mainIndex; core.refIndex = refIndex; core.deleteAction = deleteAction; core.updateAction = updateAction; } /** * temp constraint constructor */ Constraint(HsqlName name, int[] mainCols, Table refTable, int[] refCols, int type, int deleteAction, int updateAction) { core = new ConstraintCore(); constName = name; constType = type; core.mainColArray = mainCols; core.refTable = refTable; core.refColArray = refCols; core.deleteAction = deleteAction; core.updateAction = updateAction; } private Constraint() {} /** * Returns the HsqlName. */ HsqlName getName() { return constName; } /** * Changes constraint name. */ private void setName(String name, boolean isquoted) throws HsqlException { constName.rename(name, isquoted); } /** * probably a misnomer, but DatabaseMetaData.getCrossReference specifies * it this way (I suppose because most FKs are declared against the PK of * another table) * * @return name of the index refereneced by a foreign key */ String getPkName() { return core.pkName == null ? null : core.pkName.name; } /** * probably a misnomer, but DatabaseMetaData.getCrossReference specifies * it this way (I suppose because most FKs are declared against the PK of * another table) * * @return name of the index for the referencing foreign key */ String getFkName() { return core.fkName == null ? null : core.fkName.name; } /** * Returns the type of constraint */ int getType() { return constType; } /** * Returns the main table */ Table getMain() { return core.mainTable; } /** * Returns the main index */ Index getMainIndex() { return core.mainIndex; } /** * Returns the reference table */ Table getRef() { return core.refTable; } /** * Returns the reference index */ Index getRefIndex() { return core.refIndex; } /** * The ON DELETE triggered action of (foreign key) constraint */ int getDeleteAction() { return core.deleteAction; } /** * The ON UPDATE triggered action of (foreign key) constraint */ int getUpdateAction() { return core.updateAction; } /** * Returns the main table column index array */ int[] getMainColumns() { return core.mainColArray; } /** * Returns the reference table column index array */ int[] getRefColumns() { return core.refColArray; } /** * Returns true if an index is part this constraint and the constraint is set for * a foreign key. Used for tests before dropping an index. */ boolean isIndexFK(Index index) { if (constType == FOREIGN_KEY || constType == MAIN) { if (core.mainIndex == index || core.refIndex == index) { return true; } } return false; } /** * Returns true if an index is part this constraint and the constraint is set for * a unique constraint. Used for tests before dropping an index. */ boolean isIndexUnique(Index index) { return (constType == UNIQUE && core.mainIndex == index); } /** * Only for check constraints */ boolean hasColumn(Table table, String colname) { if (constType != CHECK) { return false; } Expression.Collector coll = new Expression.Collector(); coll.addAll(core.check, Expression.COLUMN); Iterator it = coll.iterator(); for (; it.hasNext(); ) { Expression e = (Expression) it.next(); if (e.getColumnName().equals(colname) && table.tableName.name.equals(e.getTableName())) { return true; } } return false; } boolean hasColumn(int colIndex) { if (constType == MAIN) { return ArrayUtil.find(core.mainColArray, colIndex) != -1; } else if (constType == FOREIGN_KEY) { return ArrayUtil.find(core.refColArray, colIndex) != -1; } return false; } // fredt@users 20020225 - patch 1.7.0 by fredt - duplicate constraints /** * Compares this with another constraint column set. This implementation * only checks UNIQUE constraints. */ boolean isEquivalent(int[] col, int type) { if (type != constType || constType != UNIQUE || core.colLen != col.length) { return false; } return ArrayUtil.haveEqualSets(core.mainColArray, col, core.colLen); } /** * Compares this with another constraint column set. This implementation * only checks FOREIGN KEY constraints. */ boolean isEquivalent(Table tablemain, int[] colmain, Table tableref, int[] colref) { if (constType != Constraint.MAIN && constType != Constraint.FOREIGN_KEY) { return false; } if (tablemain != core.mainTable || tableref != core.refTable) { return false; } return ArrayUtil.areEqualSets(core.mainColArray, colmain) && ArrayUtil.areEqualSets(core.refColArray, colref); } /** * Used to update constrains to reflect structural changes in a table. * Prior checks must ensure that this method does not throw. * * @param oldt reference to the old version of the table * @param newt referenct to the new version of the table * @param colindex index at which table column is added or removed * @param adjust -1, 0, +1 to indicate if column is added or removed * @throws HsqlException */ void replaceTable(Table oldt, Table newt, int colindex, int adjust) throws HsqlException { if (oldt == core.mainTable) { core.mainTable = newt; // exclude CHECK if (core.mainIndex != null) { core.mainIndex = core.mainTable.getIndex(core.mainIndex.getName().name); core.mainColArray = ArrayUtil.toAdjustedColumnArray(core.mainColArray, colindex, adjust); } } if (oldt == core.refTable) { core.refTable = newt; if (core.refIndex != null) { core.refIndex = core.refTable.getIndex(core.refIndex.getName().name); if (core.refIndex != core.mainIndex) { core.refColArray = ArrayUtil.toAdjustedColumnArray(core.refColArray, colindex, adjust); } } } } /** * Checks for foreign key or check constraint violation when * inserting a row into the child table. */ void checkInsert(Session session, Object[] row) throws HsqlException { if (constType == Constraint.MAIN || constType == Constraint.UNIQUE || constType == Constraint.PRIMARY_KEY) { // inserts in the main table are never a problem // unique constraints are checked by the unique index return; } if (constType == Constraint.CHECK) { checkCheckConstraint(session, row); return; } if (Index.isNull(row, core.refColArray)) { return; } // a record must exist in the main table boolean exists = core.mainIndex.exists(session, row, core.refColArray); if (!exists) { // special case: self referencing table and self referencing row if (core.mainTable == core.refTable) { boolean match = true; for (int i = 0; i < core.colLen; i++) { if (!row[core.refColArray[i]].equals( row[core.mainColArray[i]])) { match = false; break; } } if (match) { return; } } throw Trace.error(Trace.INTEGRITY_CONSTRAINT_VIOLATION_NOPARENT, Trace.Constraint_violation, new Object[] { core.fkName.name, core.mainTable.getName().name }); } } /* * Tests a row against this CHECK constraint. */ void checkCheckConstraint(Session session, Object[] row) throws HsqlException { core.checkFilter.currentData = row; boolean nomatch = Boolean.FALSE.equals(core.check.test(session)); core.checkFilter.currentData = null; if (nomatch) { throw Trace.error(Trace.CHECK_CONSTRAINT_VIOLATION, Trace.Constraint_violation, new Object[] { constName.name, core.mainTable.tableName.name }); } } // fredt@users 20020225 - patch 1.7.0 - cascading deletes /** * New method to find any referencing row for a * foreign key (finds row in child table). If ON DELETE CASCADE is * supported by this constraint, then the method finds the first row * among the rows of the table ordered by the index and doesn't throw. * Without ON DELETE CASCADE, the method attempts to finds any row that * exists, in which case it throws an exception. If no row is found, * null is returned. * (fredt@users) * * @param row array of objects for a database row * @param forDelete should we allow 'ON DELETE CASCADE' or 'ON UPDATE CASCADE' * @return Node object or null * @throws HsqlException */ RowIterator findFkRef(Session session, Object[] row, boolean delete) throws HsqlException { if (row == null || Index.isNull(row, core.mainColArray)) { return core.refIndex.emptyIterator(); } return delete ? core.refIndex.findFirstRowForDelete(session, row, core.mainColArray) : core.refIndex.findFirstRow(session, row, core.mainColArray); } /** * For the candidate table row, finds any referring node in the main table. * This is used to check referential integrity when updating a node. We * have to make sure that the main table still holds a valid main record. * If a valid row is found the corresponding Node is returned. * Otherwise a 'INTEGRITY VIOLATION' Exception gets thrown. */ boolean hasMainRef(Session session, Object[] row) throws HsqlException { if (Index.isNull(row, core.refColArray)) { return false; } boolean exists = core.mainIndex.exists(session, row, core.refColArray); // -- there has to be a valid node in the main table // -- if (!exists) { throw Trace.error(Trace.INTEGRITY_CONSTRAINT_VIOLATION_NOPARENT, Trace.Constraint_violation, new Object[] { core.fkName.name, core.refTable.getName().name }); } return exists; } /** * Test used before adding a new foreign key constraint. This method * returns true if the given row has a corresponding row in the main * table. Also returns true if any column covered by the foreign key * constraint has a null value. */ private static boolean hasReferencedRow(Session session, Object[] rowdata, int[] rowColArray, Index mainIndex) throws HsqlException { if (Index.isNull(rowdata, rowColArray)) { return true; } // else a record must exist in the main index return mainIndex.exists(session, rowdata, rowColArray); } /** * Check used before creating a new foreign key cosntraint, this method * checks all rows of a table to ensure they all have a corresponding * row in the main table. */ static void checkReferencedRows(Session session, Table table, int[] rowColArray, Index mainIndex) throws HsqlException { RowIterator it = table.getPrimaryIndex().firstRow(session); while (true) { Row row = it.next(); if (row == null) { break; } Object[] rowdata = row.getData(); if (!Constraint.hasReferencedRow(session, rowdata, rowColArray, mainIndex)) { String colvalues = ""; for (int i = 0; i < rowColArray.length; i++) { Object o = rowdata[rowColArray[i]]; colvalues += o; colvalues += ","; } throw Trace.error( Trace.INTEGRITY_CONSTRAINT_VIOLATION_NOPARENT, Trace.Constraint_violation, new Object[] { colvalues, table.getName().name }); } } } } hsqldb-1.8.0.10.orig/src/org/hsqldb/DINameSpace.java0000644000175000017500000005024110416742467020403 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb; import java.lang.reflect.Method; import java.lang.reflect.Modifier; import org.hsqldb.lib.HashMap; import org.hsqldb.lib.HashSet; import org.hsqldb.lib.HsqlArrayList; import org.hsqldb.lib.Iterator; import org.hsqldb.lib.WrapperIterator; // boucherb@users - 2004xxxx - patch 1.7.2 // -- canonical database uri for catalog name reporting // -- enumXXX methods to iterateXXX // -- simple support for SEQUENCE schema reporting // -- report built-in procedures/procedure columns without dependency on user grants; /** * Provides catalog and schema related definitions and functionality.

    * * Additional features include accessibility tests, class loading, filtered * iteration and inverted alias mapping functionality regarding Java Classes * and Methods defined within the context of this database name space support * object.

    * * @author boucherb@users * @version 1.8.0 * @since 1.7.2 */ final class DINameSpace { /** The Database for which the name space functionality is provided */ private Database database; /** The catalog name reported by this namespace */ private String catalogName; /** * Set { Class FQN String objects }.

    * * The Set contains the names of the classes providing the public static * methods that are automatically made accessible to the PUBLIC user in * support of the expected SQL CLI scalar functions and other core * HSQLDB SQL functions and stored procedures.

    */ private static HashSet builtin = new HashSet(); // procedure columns // make temporary ad-hoc spec a little more "official" // until better system in place static { builtin.add("org.hsqldb.Library"); builtin.add("java.lang.Math"); } /** * Constructs a new name space support object for the * specified Database object.

    * * @param database The Database object for which to provide name * space support * @throws HsqlException if a database access error occurs */ public DINameSpace(Database database) throws HsqlException { try { this.database = database; this.catalogName = database.getURI(); } catch (Exception e) { Trace.throwerror(Trace.GENERAL_ERROR, e.toString()); } } /** * Retrieves the declaring Class object for the specified * fully qualified method name, using (if possible) the classLoader * attribute of this object's database.

    * * @param fqn the fully qualified name of the method for which to * retrieve the declaring Class object. * @return the declaring Class object for the * specified fully qualified method name */ Class classForMethodFQN(String fqn) { try { return classForName(fqn.substring(0, fqn.lastIndexOf('.'))); } catch (Exception e) { return null; } } /** * Retrieves the Class object specified by the * name argument, using, if possible, the * classLoader attribute of the database.

    * * @param name the fully qualified name of the Class * object to retrieve. * @throws ClassNotFoundException if the specified class object * cannot be found in the context of this name space * @return the Class object specified by the * name argument */ Class classForName(String name) throws ClassNotFoundException { try { if (database.classLoader == null) { return Class.forName(name); } else { if (name != null) { return database.classLoader.loadClass(name); } else { throw new ClassNotFoundException(); } } } catch (NoClassDefFoundError err) { throw new ClassNotFoundException(err.toString()); } } /** * Retrieves an Iterator whose elements form the set of * distinct names of all visible catalogs, relative to this object's * database.

    * * If catalog reporting is turned off, then the empty Iterator is * returned.

    * * Note: in the present implementation, if catalog reporting is * turned on, then the iteration consists of a single element that is the * uri of this object's database; HSQLDB currently does not support the * concept a single engine hosting multiple catalogs.

    * * @return An Iterator whose elements are String objects * naming all visible catalogs, relative to this object's database. * @throws HsqlException never (reserved for future use) */ Iterator iterateCatalogNames() throws HsqlException { return isReportCatalogs() ? new WrapperIterator(catalogName) : new WrapperIterator(); } /** * Retrieves the name of the catalog corresponding to the indicated * object.

    * * Note: the uri of this object's database is returned whenever * catalog reporting is turned on.

    * * This a stub that will be used until such time (if ever) that the * engine actually supports the concept of multiple hosted * catalogs.

    * * @return the name of specified object's qualifying catalog, or null if * catalog reporting is turned off. * @param o the object for which the name of its qualifying catalog * is to be retrieved */ String getCatalogName(Object o) { return isReportCatalogs() ? catalogName : null; } /** * Retrieves a map from each distinct value of this object's database * SQL routine CALL alias map to the list of keys in the input map * mapping to that value.

    * * @return The requested map */ HashMap getInverseAliasMap() { HashMap mapIn; HashMap mapOut; Iterator keys; Object key; Object value; HsqlArrayList keyList; // TODO: // update Database to dynamically maintain its own // inverse alias map. This will make things *much* // faster for our purposes here, without appreciably // slowing down Database mapIn = database.getAliasMap(); mapOut = new HashMap(); keys = mapIn.keySet().iterator(); while (keys.hasNext()) { key = keys.next(); value = mapIn.get(key); keyList = (HsqlArrayList) mapOut.get(value); if (keyList == null) { keyList = new HsqlArrayList(); mapOut.put(value, keyList); } keyList.add(key); } return mapOut; } /** * Retrieves the fully qualified name of the given Method object.

    * * @param m The Method object for which to retreive the fully * qualified name * @return the fully qualified name of the specified Method object. */ static String getMethodFQN(Method m) { return m == null ? null : m.getDeclaringClass().getName() + '.' + m.getName(); } /** * Retrieves the specific name of the given Method object.

    * * @param m The Method object for which to retreive the specific name * @return the specific name of the specified Method object. */ static String getMethodSpecificName(Method m) { return m == null ? null : m.getDeclaringClass().getName() + '.' + getSignature(m); } static String getSignature(Method method) { StringBuffer sb; String signature; Class[] parmTypes; int len; int last; sb = new StringBuffer(); parmTypes = method.getParameterTypes(); len = parmTypes.length; last = len - 1; sb.append(method.getName()).append('('); for (int i = 0; i < len; i++) { sb.append(parmTypes[i].getName()); if (i < last) { sb.append(','); } } sb.append(')'); signature = sb.toString(); return signature; } /** * Deprecated */ String getSchemaName(Object o) { return database.schemaManager.PUBLIC_SCHEMA; } /** * Adds to the given Set the fully qualified names of the Class objects * internally granted to PUBLIC in support of core operation. * * @param the HashSet to which to add the fully qualified names of * the Class objects internally granted to PUBLIC in support of * core operation. */ void addBuiltinToSet(HashSet set) { set.addAll(builtin.toArray(new String[builtin.size()])); } /** * Retrieves whether the indicated Class object is systematically * granted to PUBLIC in support of core operation.

    * * @return whether the indicated Class object is systematically * granted to PUBLIC in support of core operation * @param clazz The Class object for which to make the determination */ boolean isBuiltin(Class clazz) { return clazz == null ? false : builtin.contains(clazz.getName()); } /** * Retrieves whether the Class object indicated by the fully qualified * class name is systematically granted to PUBLIC in support of * core operation.

    * * @return true if system makes grant, else false * @param name fully qualified name of a Class */ boolean isBuiltin(String name) { return (name == null) ? false : builtin.contains(name); } /** * Retrieves an Iterator object describing the Java * Method objects that are both the entry points * to executable SQL database objects (such as SQL functions and * stored procedures) within the context of this name space.

    * * Each element of the Iterator is an Object[3] array * whose elements are:

    * *

      *
    1. a Method object. *
    2. an HsqlArrayList object whose elements are the SQL call * aliases for the method. *
    3. the String "ROUTINE" *
    * * Note: Admin users are actually free to invoke *any* public * static non-abstract Java Method that can be found through the database * class loading process, either as a SQL stored procedure or SQL function, * as long as its parameters and return type are compatible with the * engine's supported SQL type / Java Class mappings.

    * * @return An Iterator object whose elements form the set * of distinct Method objects accessible as * executable as SQL routines within the current execution * context.

    * * Elements are Object[3] instances, with [0] being a * Method object, [1] being an alias list object and * [2] being the String "ROUTINE"

    * * If the Method object at index [0] has aliases, * and the andAliases parameter is specified * as true, then there is an HsqlArrayList * at index [1] whose elements are String objects * whose values are the SQL call aliases for the method. * Otherwise, the value of index [1] is null. * @param className The fully qualified name of the class for which to * retrieve the iteration * @param andAliases if true, alias lists for qualifying * methods are additionally retrieved. * @throws HsqlException if a database access error occurs * */ Iterator iterateRoutineMethods(String className, boolean andAliases) throws HsqlException { Class clazz; Method[] methods; Method method; int mods; Object[] info; HsqlArrayList aliasList; HsqlArrayList methodList; HashMap invAliasMap; try { clazz = classForName(className); } catch (ClassNotFoundException e) { return new WrapperIterator(); } invAliasMap = andAliases ? getInverseAliasMap() : null; // we are interested in inherited methods too, // so we use getDeclaredMethods() first. // However, under Applet execution or // under restrictive SecurityManager policies // this may fail, so we use getMethods() // if getDeclaredMethods() fails. try { methods = clazz.getDeclaredMethods(); } catch (Exception e) { methods = clazz.getMethods(); } methodList = new HsqlArrayList(methods.length); // add all public static methods to the set for (int i = 0; i < methods.length; i++) { method = methods[i]; mods = method.getModifiers(); if (!(Modifier.isPublic(mods) && Modifier.isStatic(mods))) { continue; } info = new Object[] { method, null, "ROUTINE" }; if (andAliases) { info[1] = invAliasMap.get(getMethodFQN(method)); } methodList.add(info); } // return the iterator return methodList.iterator(); } /** * Retrieves an Iterator object describing the * fully qualified names of all Java Class objects * that are both trigger body implementations and that are accessible * (whose fire method can potentially be invoked) by actions upon this * object's database by the specified User.

    * * @param user the User for which to retrieve the * Iterator * @throws HsqlException if a database access error occurs * @return an Iterator object describing the * fully qualified names of all Java Class * objects that are both trigger body implementations * and that are accessible (whose fire method can * potentially be invoked) by actions upon this object's database * by the specified User. */ Iterator iterateAccessibleTriggerClassNames(User user) throws HsqlException { Table table; Class clazz; HashSet classSet; TriggerDef triggerDef; HsqlArrayList[] triggerLists; HsqlArrayList triggerList; HsqlArrayList tableList; int listSize; classSet = new HashSet(); Iterator schemas = database.schemaManager.userSchemaNameIterator(); while (schemas.hasNext()) { String schema = (String) schemas.next(); Iterator tables = database.schemaManager.tablesIterator(schema); while (tables.hasNext()) { table = (Table) tables.next(); if (!user.isAccessible(table.getName())) { continue; } triggerLists = table.triggerLists; if (triggerLists == null) { continue; } for (int j = 0; j < triggerLists.length; j++) { triggerList = triggerLists[j]; if (triggerList == null) { continue; } listSize = triggerList.size(); for (int k = 0; k < listSize; k++) { triggerDef = (TriggerDef) triggerList.get(k); if (triggerDef == null ||!triggerDef.valid || triggerDef.trigger == null ||!user.isAccessible( table.getName(), TriggerDef.indexToRight(k))) { continue; } classSet.add(triggerDef.trigger.getClass().getName()); } } } } return classSet.iterator(); } /** * Retrieves a composite Iterator consisting of the elements * from {@link #iterateRoutineMethods} for each Class granted to the * specified session.

    * * @return a composite Iterator consisting of the elements * from {@link #iterateRoutineMethods} and * {@link #iterateAccessibleTriggerMethods} * @param session The context in which to produce the iterator * @param andAliases true if the alias lists for the "ROUTINE" type method * elements are to be generated. * @throws HsqlException if a database access error occurs */ Iterator iterateAllAccessibleMethods(Session session, boolean andAliases) throws HsqlException { Iterator out; HashSet classNameSet; Iterator classNames; Iterator methods; String className; out = new WrapperIterator(); classNameSet = session.getUser().getGrantedClassNames(true); addBuiltinToSet(classNameSet); classNames = classNameSet.iterator(); while (classNames.hasNext()) { className = (String) classNames.next(); methods = iterateRoutineMethods(className, andAliases); out = new WrapperIterator(out, methods); } return out; } /** * Retrieves the set of distinct, visible sessions connected to this * object's database, as a list.

    * * @param session The context in which to produce the list * @return the set of distinct, visible sessions connected * to this object's database, as a list. */ Session[] listVisibleSessions(Session session) { return database.sessionManager.getVisibleSessions(session); } /** * Retrieves whether this object is reporting catalog qualifiers. * @return true if this object is reporting catalog qualifiers, else false. */ boolean isReportCatalogs() { return database.getProperties().isPropertyTrue("hsqldb.catalogs"); } } hsqldb-1.8.0.10.orig/src/org/hsqldb/Like.java0000644000175000017500000002462710416742475017226 0ustar renerene/* Copyright (c) 1995-2000, The Hypersonic SQL Group. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the Hypersonic SQL Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE HYPERSONIC SQL GROUP, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * This software consists of voluntary contributions made by many individuals * on behalf of the Hypersonic SQL Group. * * * For work added by the HSQL Development Group: * * Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb; import org.hsqldb.lib.StringUtil; /** * Reusable object for processing LIKE queries. * * Enhanced in successive versions of HSQLDB. * * @author Thomas Mueller (Hypersonic SQL Group) * @version 1.8.0 * @since Hypersonic SQL */ // boucherb@users 20030930 - patch 1.7.2 - optimize into joins if possible // fredt@users 20031006 - patch 1.7.2 - reuse Like objects for all rows class Like { private char[] cLike; private int[] wildCardType; private int iLen; private boolean isIgnoreCase; private int iFirstWildCard; private boolean isNull; Character escapeChar; boolean hasCollation; boolean optimised; static final int UNDERSCORE_CHAR = 1; static final int PERCENT_CHAR = 2; Like(Character escape, boolean collation) { escapeChar = escape; hasCollation = collation; } /** * param setter * * @param s * @param ignorecase */ void setParams(Session session, String s, boolean ignorecase) { isIgnoreCase = ignorecase; normalize(session, s); optimised = true; } /** * Resets the search pattern; */ void resetPattern(Session session, String s) { normalize(session, s); } private String getStartsWith() { if (iLen == 0) { return ""; } StringBuffer s = new StringBuffer(); int i = 0; for (; (i < iLen) && (wildCardType[i] == 0); i++) { s.append(cLike[i]); } if (i == 0) { return null; } return s.toString(); } /** * Method declaration * * * @param o * * @return */ Boolean compare(Session session, String s) { if (s == null) { return null; } if (isIgnoreCase) { s = session.database.collation.toUpperCase(s); } return compareAt(s, 0, 0, s.length()) ? Boolean.TRUE : Boolean.FALSE; } /** * Method declaration * * * @param s * @param i * @param j * @param jLen * * @return */ private boolean compareAt(String s, int i, int j, int jLen) { for (; i < iLen; i++) { switch (wildCardType[i]) { case 0 : // general character if ((j >= jLen) || (cLike[i] != s.charAt(j++))) { return false; } break; case UNDERSCORE_CHAR : // underscore: do not test this character if (j++ >= jLen) { return false; } break; case PERCENT_CHAR : // percent: none or any character(s) if (++i >= iLen) { return true; } while (j < jLen) { if ((cLike[i] == s.charAt(j)) && compareAt(s, i, j, jLen)) { return true; } j++; } return false; } } if (j != jLen) { return false; } return true; } /** * Method declaration * * * @param pattern * @param b */ private void normalize(Session session, String pattern) { isNull = pattern == null; if (!isNull && isIgnoreCase) { pattern = session.database.collation.toUpperCase(pattern); } iLen = 0; iFirstWildCard = -1; int l = pattern == null ? 0 : pattern.length(); cLike = new char[l]; wildCardType = new int[l]; boolean bEscaping = false, bPercent = false; for (int i = 0; i < l; i++) { char c = pattern.charAt(i); if (bEscaping == false) { if (escapeChar != null && escapeChar.charValue() == c) { bEscaping = true; continue; } else if (c == '_') { wildCardType[iLen] = UNDERSCORE_CHAR; if (iFirstWildCard == -1) { iFirstWildCard = iLen; } } else if (c == '%') { if (bPercent) { continue; } bPercent = true; wildCardType[iLen] = PERCENT_CHAR; if (iFirstWildCard == -1) { iFirstWildCard = iLen; } } else { bPercent = false; } } else { bPercent = false; bEscaping = false; } cLike[iLen++] = c; } for (int i = 0; i < iLen - 1; i++) { if ((wildCardType[i] == PERCENT_CHAR) && (wildCardType[i + 1] == UNDERSCORE_CHAR)) { wildCardType[i] = UNDERSCORE_CHAR; wildCardType[i + 1] = PERCENT_CHAR; } } } boolean hasWildcards() { return iFirstWildCard != -1; } boolean isEquivalentToFalsePredicate() { return isNull; } boolean isEquivalentToEqualsPredicate() { return iFirstWildCard == -1; } boolean isEquivalentToNotNullPredicate() { if (isNull ||!hasWildcards()) { return false; } for (int i = 0; i < wildCardType.length; i++) { if (wildCardType[i] != PERCENT_CHAR) { return false; } } return true; } boolean isEquivalentToBetweenPredicate() { return iFirstWildCard > 0 && iFirstWildCard == wildCardType.length - 1 && cLike[iFirstWildCard] == '%'; } boolean isEquivalentToBetweenPredicateAugmentedWithLike() { return iFirstWildCard > 0 && cLike[iFirstWildCard] == '%'; } String getRangeLow() { return getStartsWith(); } String getRangeHigh() { String s = getStartsWith(); return s == null ? null : s.concat("\uffff"); } public String describe(Session session) { StringBuffer sb = new StringBuffer(); sb.append(super.toString()).append("[\n"); sb.append("escapeChar=").append(escapeChar).append('\n'); sb.append("isNull=").append(isNull).append('\n'); sb.append("optimised=").append(optimised).append('\n'); sb.append("isIgnoreCase=").append(isIgnoreCase).append('\n'); sb.append("iLen=").append(iLen).append('\n'); sb.append("iFirstWildCard=").append(iFirstWildCard).append('\n'); sb.append("cLike="); sb.append(StringUtil.arrayToString(cLike)); sb.append('\n'); sb.append("wildCardType="); sb.append(StringUtil.arrayToString(wildCardType)); sb.append(']'); return sb.toString(); } } hsqldb-1.8.0.10.orig/src/org/hsqldb/HsqlSocketRequestHandler.java0000644000175000017500000000367310416742471023263 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb; import java.net.Socket; /** * Interface HsqlSocketRequestHandler * * @author paul-h@users * @version 1.70 * @since 1.7.0 * @see HsqlSocketRequestHandlerImplementation */ // fredt@users - patch 461556 by paul-h@users public interface HsqlSocketRequestHandler { void handleConnection(Socket socket); void signalCloseAllServerConnections(); } hsqldb-1.8.0.10.orig/src/org/hsqldb/TextTable.java0000644000175000017500000002235410701666560020226 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb; import org.hsqldb.lib.FileUtil; import org.hsqldb.lib.StringConverter; import org.hsqldb.persist.TextCache; // tony_lai@users 20020820 - patch 595099 - user define PK name /** * Subclass of Table to handle TEXT data source.

    * * Extends Table to provide the notion of an SQL base table object whose * data is read from and written to a text format data file. * * @author sqlbob@users (RMP) * @version 1.8.0 */ class TextTable extends org.hsqldb.Table { private String dataSource = ""; private boolean isReversed = false; private boolean isConnected = false; /** * Constructs a new TextTable from the given arguments. * * @param db the owning database * @param name the table's HsqlName * @param type (normal or temp text table) * @param sessionid the id of the owning session (for temp table) * @exception HsqlException Description of the Exception */ TextTable(Database db, HsqlNameManager.HsqlName name, int type) throws HsqlException { super(db, name, type); } /** * common handling for all errors during connect */ private void onConnectError(Session session) { if (cache != null) { try { cache.close(false); } catch (HsqlException ex) {} } cache = null; clearAllRows(session); } public boolean isConnected() { return isConnected; } /** * connects to the data source */ public void connect(Session session) throws HsqlException { connect(session, isReadOnly); } /** * connects to the data source */ private void connect(Session session, boolean withReadOnlyData) throws HsqlException { // Open new cache: if ((dataSource.length() == 0) || isConnected) { // nothing to do return; } try { cache = database.logger.openTextCache(this, dataSource, withReadOnlyData, isReversed); // read and insert all the rows from the source file CachedRow row = null; int nextpos = 0; if (((TextCache) cache).ignoreFirst) { nextpos += ((TextCache) cache).readHeaderLine(); } while (true) { row = (CachedRow) rowStore.get(nextpos); if (row == null) { break; } nextpos = row.getPos() + row.getStorageSize(); row.setNewNodes(); insertFromTextSource(row); } } catch (HsqlException e) { int linenumber = cache == null ? 0 : ((TextCache) cache) .getLineNumber(); onConnectError(session); // everything is in order here. // At this point table should either have a valid (old) data // source and cache or have an empty source and null cache. throw Trace.error(Trace.TEXT_FILE, new Object[] { new Integer(linenumber), e.getMessage() }); } catch (java.lang.RuntimeException t) { int linenumber = cache == null ? 0 : ((TextCache) cache) .getLineNumber(); onConnectError(session); throw Trace.error(Trace.TEXT_FILE, new Object[] { new Integer(linenumber), t.getClass().getName() + ": " + t.getMessage() }); } isConnected = true; setIsReadOnly(withReadOnlyData); } /** * disconnects from the data source */ public void disconnect(Session session) throws HsqlException { // Close old cache: database.logger.closeTextCache(this); cache = null; clearAllRows(session); isConnected = false; } /** * This method does some of the work involved with managing the creation * and openning of the cache, the rest is done in Log.java and * TextCache.java. * * Better clarification of the role of the methods is needed. */ private void openCache(Session session, String dataSourceNew, boolean isReversedNew, boolean isReadOnlyNew) throws HsqlException { if (dataSourceNew == null) { dataSourceNew = ""; } disconnect(session); dataSource = dataSourceNew; isReversed = (isReversedNew && dataSource.length() > 0); connect(session, isReadOnlyNew); } /** * High level command to assign a data source to the table definition. * Reassigns only if the data source or direction has changed. */ protected void setDataSource(Session session, String dataSourceNew, boolean isReversedNew, boolean newFile) throws HsqlException { if (getTableType() == Table.TEMP_TEXT_TABLE) { ; } else { session.checkAdmin(); } dataSourceNew = dataSourceNew.trim(); if (newFile && FileUtil.getDefaultInstance().exists(dataSourceNew)) { throw Trace.error(Trace.TEXT_SOURCE_EXISTS, dataSourceNew); } //-- Open if descending, direction changed, file changed, or not connected currently if (isReversedNew || (isReversedNew != isReversed) || !dataSource.equals(dataSourceNew) || !isConnected) { openCache(session, dataSourceNew, isReversedNew, isReadOnly); } if (isReversed) { setIsReadOnly(true); } } protected String getDataSource() { return dataSource; } protected boolean isDescDataSource() { return isReversed; } public void setHeader(String header) throws HsqlException { if (cache != null && ((TextCache) cache).ignoreFirst) { ((TextCache) cache).setHeader(header); return; } throw Trace.error(Trace.TEXT_TABLE_HEADER); } public String getHeader() { String header = cache == null ? null : ((TextCache) cache).getHeader(); return header == null ? null : StringConverter.toQuotedString(header, '\"', true); } /** * Used by INSERT, DELETE, UPDATE operations. This class will return * a more appropriate message when there is no data source. */ void checkDataReadOnly() throws HsqlException { if (dataSource.length() == 0) { throw Trace.error(Trace.UNKNOWN_DATA_SOURCE); } if (isDataReadOnly()) { throw Trace.error(Trace.DATA_IS_READONLY); } } public boolean isDataReadOnly() { return !isConnected() || super.isDataReadOnly(); } void setDataReadOnly(boolean value) throws HsqlException { if (isReversed && value == false) { throw Trace.error(Trace.DATA_IS_READONLY); } openCache(null, dataSource, isReversed, value); setIsReadOnly(value); } boolean isIndexCached() { return false; } protected Table duplicate() throws HsqlException { return new TextTable(database, tableName, getTableType()); } void drop() throws HsqlException { openCache(null, "", false, false); } void setIndexRoots(String s) throws HsqlException { // do nothing } } hsqldb-1.8.0.10.orig/src/org/hsqldb/DatabaseObjectNames.java0000644000175000017500000000634610416742467022160 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb; import org.hsqldb.HsqlNameManager.HsqlName; import org.hsqldb.lib.HashMap; import org.hsqldb.lib.Iterator; /** * Transitional container for object names that are unique across the * DB instance but are owned by different DB objects. Currently names for * Index and Trigger objects.

    * * @author fredt@users * @version 1.7.2 * @since 1.7.2 */ class DatabaseObjectNames { HashMap nameList = new HashMap(); DatabaseObjectNames() {} boolean containsName(String name) { return nameList.containsKey(name); } HsqlName getOwner(String name) { return (HsqlName) nameList.get(name); } void addName(String name, HsqlName owner, int errorcode) throws HsqlException { // should not contain name if (containsName(name)) { throw Trace.error(errorcode, name); } nameList.put(name, owner); } void rename(String name, String newname, int errorcode) throws HsqlException { HsqlName owner = (HsqlName) nameList.get(name); addName(newname, owner, errorcode); nameList.remove(name); } Object removeName(String name) throws HsqlException { Object owner = nameList.remove(name); if (owner == null) { // should contain name throw Trace.error(Trace.GENERAL_ERROR); } return owner; } void removeOwner(HsqlName owner) { Iterator it = nameList.values().iterator(); while (it.hasNext()) { Object currentvalue = it.next(); if (owner.equals(currentvalue)) { it.remove(); } } } } hsqldb-1.8.0.10.orig/src/org/hsqldb/Servlet.java0000644000175000017500000002714210766740010017750 0ustar renerene/* Copyright (c) 1995-2000, The Hypersonic SQL Group. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the Hypersonic SQL Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE HYPERSONIC SQL GROUP, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * This software consists of voluntary contributions made by many individuals * on behalf of the Hypersonic SQL Group. * * * For work added by the HSQL Development Group: * * Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb; import java.io.DataInputStream; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletConfig; import javax.servlet.ServletException; import javax.servlet.ServletOutputStream; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.hsqldb.persist.HsqlProperties; import org.hsqldb.rowio.RowInputBinary; import org.hsqldb.rowio.RowOutputBinary; // fredt@users 20020130 - patch 475586 by wreissen@users // fredt@users 20020328 - patch 1.7.0 by fredt - error trapping // fredt@users 20030630 - patch 1.7.2 - new protocol, persistent sessions // fredt@users 20041112 - patch by Willian Crick - use web_inf directory /** * Servlet can act as an interface between the client and the database for the * the client / server mode of HSQL Database Engine. It uses the HTTP protocol * for communication. This class is not required if the included HSQLDB * Weberver is used on the server host. But if the host is running a J2EE * application server or a servlet container such as Tomcat, the Servlet class * can be hosted on this server / container to serve external requests from * external hosts.

    * The remote applet / application should * use the normal JDBC interfaces to connect to the URL of this servlet. An * example URL is: *

     * jdbc:hsqldb:http://myhost.com:8080/servlet/org.hsqldb.Servlet
     * 
    * The database path/name is taken from the servlet engine property: *
     * hsqldb.server.database
     * 
    *

    * If the database is deployed in the WEB-INF directory of the servlet container, * the property: *

     *  hsqldb.server.use_web-inf_path
     * 
    * should be set "true" in the web.xml file of the servlet container. * In this case, the database path should not begin with a "/". * * From version 1.7.2 JDBC connections via the HTTP protocol are persistent * in the JDBC sense. The JDBC Connection that is established can support * transactions spanning several Statement calls and real PreparedStatement * calls are supported. This class has been rewritten to support the new * features.

    * (fredt@users)

    * * Extensively rewritten for HSQLDB. * * @author Thomas Mueller (Hypersonic SQL Group) * @version 1.7.2 * @since Hypersonic SQL */ public class Servlet extends javax.servlet.http.HttpServlet { private static final int BUFFER_SIZE = 256; private String dbType; private String dbPath; private String errorStr; private RowOutputBinary rowOut; private RowInputBinary rowIn; private int iQueries; /** * Method declaration * * * @param config */ public void init(ServletConfig config) { try { super.init(config); rowOut = new RowOutputBinary(BUFFER_SIZE); rowIn = new RowInputBinary(rowOut); } catch (ServletException e) { log(e.toString()); } String dbStr = getInitParameter("hsqldb.server.database"); if (dbStr == null) { dbStr = "."; } // begin WEB-INF patch */ String useWebInfStr = getInitParameter("hsqldb.server.use_web-inf_path"); if (!dbStr.equals(".") && "true".equalsIgnoreCase(useWebInfStr)) { dbStr = getServletContext().getRealPath("/") + "WEB-INF" + dbStr; } // end WEB-INF patch HsqlProperties dbURL = DatabaseURL.parseURL(dbStr, false); log("Database filename = " + dbStr); if (dbURL == null) { errorStr = "Bad Database name"; } else { dbPath = dbURL.getProperty("database"); dbType = dbURL.getProperty("connection_type"); try { // loosecannon1@users 1.7.2 patch properties on the JDBC URL DatabaseManager.getDatabase(dbType, dbPath, dbURL); } catch (HsqlException e) { errorStr = e.getMessage(); } } log(errorStr); log("Initialization completed."); } private static long lModified = 0; /** * Method declaration * * * @param req * * @return */ protected long getLastModified(HttpServletRequest req) { // this is made so that the cache of the http server is not used // maybe there is some other way return lModified++; } /** * Method declaration * * * @param request * @param response * * @throws IOException * @throws ServletException */ public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { String query = request.getQueryString(); if ((query == null) || (query.length() == 0)) { response.setContentType("text/html"); // fredt@users 20020130 - patch 1.7.0 by fredt // to avoid caching on the browser response.setHeader("Pragma", "no-cache"); PrintWriter out = response.getWriter(); out.println( "HSQL Database Engine Servlet"); out.println("

    HSQL Database Engine Servlet

    "); out.println("The servlet is running.

    "); if (errorStr == null) { out.println("The database is also running.

    "); out.println("Database name: " + dbType + dbPath + "

    "); out.println("Queries processed: " + iQueries + "

    "); } else { out.println("

    The database is not running!

    "); out.println("The error message is:

    "); out.println(errorStr); } out.println(""); } } /** * Method declaration * * * @param request * @param response * * @throws IOException * @throws ServletException */ public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { synchronized (this) { DataInputStream inStream = null; ServletOutputStream outStream = null; try { // fredt@users - the servlet container, Resin does not return all // the bytes with one call to input.read(b,0,len) when len > 8192 // bytes, the loop in the Result.read() method handles this inStream = new DataInputStream(request.getInputStream()); Result resultIn = Result.read(rowIn, inStream); Result resultOut; if (resultIn.mode == ResultConstants.SQLCONNECT) { try { Session session = DatabaseManager.newSession(dbType, dbPath, resultIn.getMainString(), resultIn.getSubString(), new HsqlProperties()); resultOut = new Result(ResultConstants.UPDATECOUNT); resultOut.sessionID = session.getId(); } catch (HsqlException e) { resultOut = new Result(e, null); } } else { int dbId = resultIn.databaseID; int sessionId = resultIn.sessionID; Session session = DatabaseManager.getSession(dbId, sessionId); resultOut = session.execute(resultIn); } rowOut.reset(); resultOut.write(rowOut); // response.setContentType("application/octet-stream"); response.setContentLength(rowOut.size()); // outStream = response.getOutputStream(); outStream.write(rowOut.getOutputStream().getBuffer(), 0, rowOut.getOutputStream().size()); iQueries++; } catch (HsqlException e) {} finally { if (outStream != null) { outStream.flush(); outStream.close(); } if (inStream != null) { inStream.close(); } } } // Trace.printSystemOut("Queries processed: "+iQueries+" \n"); } } hsqldb-1.8.0.10.orig/src/org/hsqldb/TableFilter.java0000644000175000017500000005556010416742500020524 0ustar renerene/* Copyright (c) 1995-2000, The Hypersonic SQL Group. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the Hypersonic SQL Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE HYPERSONIC SQL GROUP, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * This software consists of voluntary contributions made by many individuals * on behalf of the Hypersonic SQL Group. * * * For work added by the HSQL Development Group: * * Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb; import org.hsqldb.index.RowIterator; import org.hsqldb.lib.ArrayUtil; import org.hsqldb.lib.HashMappedList; // fredt@users 20030813 - patch 1.7.2 - fix for column comparison within same table bugs #572075 and 722443 // fredt@users 20031012 - patch 1.7.2 - better OUTER JOIN implementation // fredt@users 20031026 - patch 1.7.2 - more efficient findfirst - especially for multi-column equijoins // implemented optimisations similart to patch 465542 by hjbush@users /** * This class iterates over table rows to select the rows that fulfil join * or other conditions. It uses indexes if they are availabe. * * Extended in successive versions of HSQLDB. * * @author Thomas Mueller (Hypersonic SQL Group) * @version 1.8.0 * @since Hypersonic SQL */ final class TableFilter { static final int CONDITION_NONE = -1; // not a condition expression static final int CONDITION_UNORDERED = 0; // not candidate for eStart or eEnd static final int CONDITION_START_END = 1; // candidate for eStart and eEnd static final int CONDITION_START = 2; // candidate for eStart static final int CONDITION_END = 3; // candidate for eEnd static final int CONDITION_OUTER = 4; // add to this Table filterTable; private String tableAlias; HashMappedList columnAliases; Index filterIndex; private Object[] emptyData; boolean[] usedColumns; private Expression eStart, eEnd; // Expression eAnd; // boolean isOuterJoin; // table joined with OUTER JOIN boolean isAssigned; // conditions have been assigned to this boolean isMultiFindFirst; // findFirst() uses multi-column index Expression[] findFirstExpressions; // expressions for column values // private RowIterator it; Object[] currentData; Row currentRow; // Object[] currentJoinData; // addendum to the result of findFirst() and next() with isOuterJoin==true // when the result is false, it indicates if a non-join condition caused the failure boolean nonJoinIsNull; // indicates current data is empty data produced for an outer join boolean isCurrentOuter; /** * Constructor declaration * * * @param t * @param alias * @param outerjoin */ TableFilter(Table t, String alias, HashMappedList columnList, boolean outerjoin) { filterTable = t; tableAlias = alias == null ? t.getName().name : alias; columnAliases = columnList; isOuterJoin = outerjoin; emptyData = filterTable.getEmptyRowData(); usedColumns = filterTable.getNewColumnCheckList(); } /** * Returns the alias or the table name. * Never returns null; * @return */ String getName() { return tableAlias; } /** * Retrieves this object's filter Table object. * * @return this object's filter Table object */ Table getTable() { return filterTable; } /** * Retrieves a CONDITION_XXX code indicating how a condition * expression can be used for a TableFilter. * * @param exprType an expression type code * @return */ static int getConditionType(Expression e) { int exprType = e.getType(); switch (exprType) { case Expression.NOT_EQUAL : case Expression.LIKE : return CONDITION_UNORDERED; case Expression.IN : { return e.isQueryCorrelated ? CONDITION_NONE : CONDITION_UNORDERED; } case Expression.IS_NULL : case Expression.EQUAL : { return CONDITION_START_END; } case Expression.BIGGER : case Expression.BIGGER_EQUAL : { return CONDITION_START; } case Expression.SMALLER : case Expression.SMALLER_EQUAL : { return CONDITION_END; } default : { // not a condition so forget it return CONDITION_NONE; } } } // TODO: Optimize // // The current way always chooses eStart, eEnd conditions // using first encountered eligible index // // We should check if current index offers better selectivity/access // path than previously assigned iIndex. // // EXAMPLE 1: // // CREATE TABLE t (c1 int, c2 int primary key) // CREATE INDEX I1 ON t(c1) // SELECT // * // FROM // t // WHERE // c1 = | < | <= | >= | > ... // AND // c2 = | < | <= | >= | > ... // // currently always chooses iIndex / condition (c1/I1), over // index / condition (c2/pk), whereas index / condition (c2/pk) // may well be better, especially if condition on c2 is equality // (condition_start_end) and conditionon(s) on c1 involve range // (condition_start, condition_end, or some composite). // // Currently, the developer/client software must somehow know facts // both about the table, the query and the way HSQLDB forms its // plans and, based on this knowlege, perhaps decide to reverse // order by explicitly issuing instead: // // SELECT // * // FROM // t // WHERE // c2 = | < | <= | >= | > ... // AND // c1 = | < | <= | >= | > ... // // to get optimal index choice. // // The same thing applies to and is even worse for joins. // // Consider the following (highly artificial, but easy to // understand) case: // // CREATE TABLE T1(ID INTEGER PRIMARY KEY, C1 INTEGER) // CREATE INDEX I1 ON T1(C1) // CREATE TABLE T2(ID INTEGER PRIMARY KEY, C1 INTEGER) // CREATE INDEX I2 ON T2(C1) // // select * from t1, t2 where t1.c1 = t2.c1 and t1.id = t2.id // // Consider the worst value distribution where t1 and t2 are both // 10,000 rows, c1 selectivity is nil (all values are identical) // for both tables, and, say, id values span the range 0..9999 // for both tables. // // Then time to completion on 500 MHz Athlon testbed using memory // tables is: // // 10000 row(s) in 309114 ms // // whereas for: // // select * from t1, t2 where t1.id = t2.id and t1.c1 = t2.c1 // // time to completion is: // // 10000 row(s) in 471 ms // // Hence, the unoptimized query takes 656 times as long as the // optimized one!!! // // EXAMPLE 2: // // If there are, say, two non-unique candidate indexes, // and some range or equality predicates against // them, preference should be given to the one with // better selectivity (if the total row count of the // table is large, otherwise the overhead of making // the choice is probably large w.r.t. any possible // savings). Might require maintaining some basic // statistics or performing appropriate index probes // at the time the plan is being generated. /** * Chooses certain query conditions and assigns a copy of them to this * filter. The original condition is set to Expression.TRUE once assigned. * * @param condition * * @throws HsqlException */ void setConditions(Session session, Expression condition) throws HsqlException { setCondition(session, condition); if (filterIndex == null) { filterIndex = filterTable.getPrimaryIndex(); } if (filterIndex.getVisibleColumns() == 1 || eStart == null || eAnd == null || eStart.exprType != Expression.EQUAL) { return; } boolean[] check = filterTable.getNewColumnCheckList(); Expression[] expr = new Expression[check.length]; int colindex = eStart.getArg().getColumnNr(); check[colindex] = true; expr[colindex] = eStart.getArg2(); eAnd.getEquiJoinColumns(this, check, expr); if (ArrayUtil.containsAllTrueElements(check, filterIndex.colCheck)) { isMultiFindFirst = true; findFirstExpressions = expr; } } private void setCondition(Session session, Expression e) throws HsqlException { int type = e.getType(); Expression e1 = e.getArg(); Expression e2 = e.getArg2(); isAssigned = true; if (type == Expression.AND) { setCondition(session, e1); setCondition(session, e2); return; } if (type == Expression.OR && isOuterJoin && e.isInJoin && e.outerFilter == this) { addAndCondition(e); e.setTrue(); return; } int conditionType = getConditionType(e); if (conditionType == CONDITION_NONE) { // not a condition expression return; } // fredt@users 20030813 - patch 1.7.2 - fix for column comparison within same table bugs #572075 and 722443 if (e1.getFilter() == this && e2.getFilter() == this) { conditionType = CONDITION_UNORDERED; } else if (e1.getFilter() == this) { if (!e.isInJoin && isOuterJoin) { // do not use a where condition on the second table in outer joins return; } // ok include this } else if ((e2.getFilter() == this) && (conditionType != CONDITION_UNORDERED)) { // swap and try again to allow index usage e.swapCondition(); setCondition(session, e); return; } else if (e1.outerFilter == this) { // fredt - this test is last to allow swapping the terms above conditionType = CONDITION_OUTER; } else { // unrelated: don't include return; } // Trace.doAssert(e1.getFilter() == this, "setCondition"); if (!e2.isResolved()) { return; } // fredt - condition defined in outer but not this one if (e1.outerFilter != null && e1.outerFilter != this) { return; } if (conditionType == CONDITION_UNORDERED) { addAndCondition(e); return; } if (conditionType == CONDITION_OUTER) { addAndCondition(e); return; } int i = e1.getColumnNr(); Index index = filterTable.getIndexForColumn(session, i); if (index == null || (filterIndex != index && filterIndex != null)) { addAndCondition(e); return; } filterIndex = index; switch (conditionType) { case CONDITION_START_END : { // candidate for both start and end if ((eStart != null) || (eEnd != null)) { addAndCondition(e); return; } eStart = new Expression(e); eEnd = eStart; break; } case CONDITION_START : { // candidate for start if (eStart != null) { addAndCondition(e); return; } eStart = new Expression(e); break; } case CONDITION_END : { // candidate for end if (eEnd != null) { addAndCondition(e); return; } eEnd = new Expression(e); break; } } e.setTrue(); } /** * Finds the first row in the table (using an index if there is one) and * checks it against the eEnd (range) and eAnd (other conditions) * Expression objects. (fredt) * * @return true if first row was found, else false */ boolean findFirst(Session session) throws HsqlException { nonJoinIsNull = false; isCurrentOuter = false; if (filterIndex == null) { filterIndex = filterTable.getPrimaryIndex(); } if (isMultiFindFirst) { boolean convertible = true; int[] types = filterTable.getColumnTypes(); currentJoinData = filterTable.getEmptyRowData(); for (int i = 0; i < findFirstExpressions.length; i++) { Expression e = findFirstExpressions[i]; if (e != null) { Object value = e.getValue(session); if (Column.compareToTypeRange(value, types[i]) != 0) { convertible = false; break; } value = Column.convertObject(value, types[i]); currentJoinData[i] = e.getValue(session, types[i]); } } it = convertible ? filterIndex.findFirstRow(session, currentJoinData) : filterIndex.emptyIterator(); if (!it.hasNext()) { ArrayUtil.clearArray(ArrayUtil.CLASS_CODE_OBJECT, currentJoinData, 0, currentJoinData.length); } } else if (eStart == null) { it = eEnd == null ? filterIndex.firstRow(session) : filterIndex.findFirstRowNotNull(session); } else { Object value = eStart.getArg2().getValue(session); int valuetype = eStart.getArg2().getDataType(); int targettype = eStart.getArg().getDataType(); it = getFirstIterator(session, eStart.getType(), value, valuetype, filterIndex, targettype); } while (true) { currentRow = it.next(); if (currentRow == null) { break; } currentData = currentRow.getData(); if (!(eEnd == null || eEnd.testCondition(session))) { break; } if (eAnd == null || eAnd.testCondition(session)) { return true; } } currentRow = null; currentData = emptyData; return false; } static RowIterator getFirstIterator(Session session, int eType, Object value, int valueType, Index index, int targetType) throws HsqlException { RowIterator it; int range = 0; if (targetType != valueType) { range = Column.compareToTypeRange(value, targetType); } if (range == 0) { value = Column.convertObject(value, targetType); it = index.findFirstRow(session, value, eType); } else { switch (eType) { case Expression.BIGGER_EQUAL : case Expression.BIGGER : if (range < 0) { it = index.findFirstRowNotNull(session); break; } default : it = index.emptyIterator(); } } return it; } /** * Advances to the next available value.

    * * @return true if a next value is available upon exit * * @throws HsqlException if a database access error occurs */ boolean next(Session session) throws HsqlException { boolean result = false; nonJoinIsNull = false; isCurrentOuter = false; while (true) { currentRow = it.next(); if (currentRow == null) { break; } currentData = currentRow.getData(); if (!(eEnd == null || eEnd.testCondition(session))) { break; } if (eAnd == null || eAnd.testCondition(session)) { result = true; break; } } if (result) { return true; } currentRow = null; currentData = emptyData; return false; } boolean nextOuter(Session session) throws HsqlException { nonJoinIsNull = false; isCurrentOuter = true; currentData = emptyData; currentRow = null; return eAnd == null || (eAnd.getFilter() != this && eAnd.isInJoin) || eAnd.testCondition(session); } /** * Forms a new conjunction using the given condition and this filter's * pre-existing AND condition, or sets the given condition as this filter's * AND condition when there is no such pre-exisiting object. * * @param e the condition to add */ private void addAndCondition(Expression e) { Expression e2 = new Expression(e); if (eAnd == null) { eAnd = e2; } else { Expression and = new Expression(Expression.AND, eAnd, e2); eAnd = and; } e.setTrue(); } /** * Removes reference to Index to avoid possible memory leaks after alter * table or drop index */ void setAsCheckFilter() { filterIndex = null; } // boucheb@users 20030415 - added for debugging support /** * Retreives a String representation of this obejct.

    * * The returned String describes this object's table, alias * access mode, index, join mode, Start, End and And conditions. * * @return a String representation of this object */ public String describe(Session session) { StringBuffer sb; String temp; Index index; Index primaryIndex; int[] primaryKey; boolean hidden; boolean fullScan; sb = new StringBuffer(); index = filterIndex; primaryIndex = filterTable.getPrimaryIndex(); primaryKey = filterTable.getPrimaryKey(); hidden = false; fullScan = (eStart == null && eEnd == null); if (index == null) { index = primaryIndex; } if (index == primaryIndex && primaryKey.length == 0) { hidden = true; fullScan = true; } sb.append(super.toString()).append('\n'); sb.append("table=[").append(filterTable.getName().name).append("]\n"); sb.append("alias=[").append(tableAlias).append("]\n"); sb.append("access=[").append(fullScan ? "FULL SCAN" : "INDEX PRED").append("]\n"); sb.append("index=["); sb.append(index == null ? "NONE" : index.getName() == null ? "UNNAMED" : index.getName() .name); sb.append(hidden ? "[HIDDEN]]\n" : "]\n"); sb.append("isOuterJoin=[").append(isOuterJoin).append("]\n"); temp = eStart == null ? "null" : eStart.describe(session); sb.append("eStart=[").append(temp).append("]\n"); temp = eEnd == null ? "null" : eEnd.describe(session); sb.append("eEnd=[").append(temp).append("]\n"); temp = eAnd == null ? "null" : eAnd.describe(session); sb.append("eAnd=[").append(temp).append("]"); return sb.toString(); } } hsqldb-1.8.0.10.orig/src/org/hsqldb/Server.java0000644000175000017500000021511011020341575017561 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb; import java.io.File; import java.io.IOException; import java.io.PrintWriter; import java.net.ServerSocket; import java.net.Socket; import java.net.UnknownHostException; import java.util.Enumeration; import java.util.StringTokenizer; import org.hsqldb.lib.ArrayUtil; import org.hsqldb.lib.FileUtil; import org.hsqldb.lib.HashSet; import org.hsqldb.lib.Iterator; import org.hsqldb.lib.StopWatch; import org.hsqldb.lib.StringUtil; import org.hsqldb.lib.WrapperIterator; import org.hsqldb.lib.java.JavaSystem; import org.hsqldb.persist.HsqlDatabaseProperties; import org.hsqldb.persist.HsqlProperties; import org.hsqldb.resources.BundleHandler; // fredt@users 20020215 - patch 1.7.0 // methods reorganised to use new HsqlProperties class // fredt@users 20020424 - patch 1.7.0 - shutdown without exit // see the comments in ServerConnection.java // unsaved@users 20021113 - patch 1.7.2 - SSL support // boucherb@users 20030510-14 - 1.7.2 - SSL support moved to factory interface // boucherb@users 20030510-14 - 1.7.2 - service control, JavaBean API // fredt@users 20030916 - 1.7.2 - review, simplification and multiple DB's // fredt@users 20040320 - 1.7.2 - review and correction // fredt@users 20050225 - 1.8.0 - minor corrections // fredt@users 20051231 - 1.8.1 - support for remote opening of databases // fredt@users 20080531 - 1.8.1 - removed synchronized from print methods // unnecessary and could cause deadlock /** * The HSQLDB HSQL protocol network database server.

    * * A Server object acts as a network database server and is one way of using * the client-server mode of HSQLDB Database Engine. Instances of this * class handle native HSQL protocol connections exclusively, allowing database * queries to be performed efficienly across the network. Server's direct * descendent, WebServer, handles HTTP protocol connections exclusively, * allowing HSQL protocol to be tunneled over HTTP to avoid sandbox and * firewall issues, albeit less efficiently.

    * * There are a number of ways to configure and start a Server instance.

    * * When started from the command line or programatically via the main(String[]) * method, configuration occurs in three phases, with later phases overriding * properties set by previous phases: * *

      *
    1. Upon construction, a Server object is assigned a set of default * properties.

      * *

    2. If it exists, properties are loaded from a file named * 'server.properties' in the present working directory.

      * *

    3. The command line arguments (alternatively, the String[] passed to * main()) are parsed and used to further configure the Server's * properties.

      * *

    * * From the command line, the options are as follows:

    *

     * +----------------+-------------+----------+------------------------------+
     * |    OPTION      |    TYPE     | DEFAULT  |         DESCRIPTION          |
     * +----------------+-------------+----------+------------------------------|
     * | -?             | --          | --       | prints this message          |
     * | -address       | name|number | any      | server inet address          |
     * | -port          | number      | 9001/544 | port at which server listens |
     * | -database.i    | [type]spec  | 0=test   | path of database i           |
     * | -dbname.i      | alias       | --       | url alias for database i     |
     * | -silent        | true|false  | true     | false => display all queries |
     * | -trace         | true|false  | false    | display JDBC trace messages  |
     * | -tls           | true|false  | false    | TLS/SSL (secure) sockets     |
     * | -no_system_exit| true|false  | false    | do not issue System.exit()   |
     * | -remote_open   | true|false  | false    | can open databases remotely  |
     * +----------------+-------------+----------+------------------------------+
     * 
    * * The database.i and dbname.i options need further * explanation: * *
      *
    • Multiple databases can be served by each instance of the Server. * The value of i is currently limited to the range 0..9, * allowing up to 10 different databases. Any number is this range * can be used.

      * *

    • The value assigned to database.i is interpreted using the * format '[type]spec', where the optional type component * is one of 'file:', 'res:' or 'mem:' and the * spec component is interpreted in the context of the * type component.

      * * If omitted, the type component is taken to be * 'file:'.

      * * A full description of how * '[type]spec' values are interpreted appears in the overview for * {@link org.hsqldb.jdbc.jdbcConnection jdbcConnection}.

      * *

    • The value assigned to dbname.i is taken to be the key used to * look up the desired database instance and thus corresponds to the * <alias> component of the HSQLDB HSQL protocol database * connection url: * 'jdbc:hsqldb:hsql[s]://host[port][/<alias>]'.

      * *

    • The value of database.0 is special. If dbname.0 * is not specified, then this defaults to an empty string and * a connection is made to database.0 path when * the <alias> component of an HSQLDB HSQL protocol database * connection url is omitted. If a database key/value pair is * found in the properties when the main method is called, this * pair is supersedes the database.0 setting

      * * This behaviour allows the previous * database connection url format to work with essentially unchanged * semantics.

      * *

    • When the remote_open property is true, a connection attempt * to an unopened database results in the database being opened. The URL * for connection should include the property filepath to specify the path. * 'jdbc:hsqldb:hsql[s]://host[port]/<alias>;filepath=hsqldb:file:<database path>'. * the given alias and filepath value will be associated together. The * database user and password to start this connection must be valid. * If this form of connection is used again, after the database has been * opened, the filepath property is ignored.

      * *

    • Once an alias such as "mydb" has been associated with a path, it cannot * be reassigned to a different path.

      * *

    • If a database is closed with the SHUTDOWN command, its * alias is removed. It is then possible to connect to this database again * with a different (or the same) alias.

      * *

    • If the same database is connected to via two different * aliases, and then one of the is closed with the SHUTDOWN command, the * other is also closed.

      *

    * * From the 'server.properties' file, options can be set similarly, using a * slightly different format.

    * * Here is an example 'server.properties' file: * *

     * server.port=9001
     * server.database.0=test
     * server.dbname.0=...
     * ...
     * server.database.n=...
     * server.dbname.n=...
     * server.silent=true
     * 
    * * Starting with 1.7.2, Server has been refactored to become a simple JavaBean * with non-blocking start() and stop() service methods. It is possible to * configure a Server instance through the JavaBean API as well, but this * part of the public interface is still under review and will not be finalized * or documented fully until the final 1.7.2 release.

    * * Note:

    * * The 'no_system_exit' property is of particular interest.

    * * If a Server instance is to run embedded in, say, an application server, * such as when the jdbcDataSource or HsqlServerFactory classes are used, it * is typically necessary to avoid calling System.exit() when the Server * instance shuts down.

    * * By default, 'no_system_exit' is set:

    * *

      *
    1. true when a Server is started directly from the start() * method.

      * *

    2. false when a Server is started from the main(String[]) * method. *

    * * These values are natural to their context because the first case allows * the JVM to exit by default on Server shutdown when a Server instance is * started from a command line environment, whereas the second case prevents * a typically unwanted JVM exit on Server shutdown when a Server intance * is started as part of a larger framework.

    * * Replaces original Hypersonic source of the same name. * * @author fredt@users * @version 1.8.0 * @since 1.7.2 * * @jmx.mbean * description="HSQLDB Server" * extends="org.hsqldb.mx.mbean.RegistrationSupportBaseMBean" * * @jboss.xmbean */ public class Server implements HsqlSocketRequestHandler { // protected static final int serverBundleHandle = BundleHandler.getBundleHandle("org_hsqldb_Server_messages", null); // HsqlProperties serverProperties; // HashSet serverConnSet; // private String[] dbAlias; private String[] dbType; private String[] dbPath; private HsqlProperties[] dbProps; private int[] dbID; // Currently unused private int maxConnections; // protected String serverId; protected int serverProtocol; protected ThreadGroup serverConnectionThreadGroup; protected HsqlSocketFactory socketFactory; protected ServerSocket socket; // private Thread serverThread; private Throwable serverError; private volatile int serverState; private volatile boolean isSilent; private volatile boolean isRemoteOpen; private PrintWriter logWriter; private PrintWriter errWriter; // /** * A specialized Thread inner class in which the run() method of this * server executes. */ private class ServerThread extends Thread { /** * Constructs a new thread in which to execute the run method * of this server. * * @param name The thread name */ ServerThread(String name) { super(name); setName(name + '@' + Integer.toString(Server.this.hashCode(), 16)); } /** * Executes the run() method of this server */ public void run() { Server.this.run(); printWithThread("ServerThread.run() exited"); } } /** * Creates a new Server instance handling HSQL protocol connections. */ public Server() { this(ServerConstants.SC_PROTOCOL_HSQL); } /** * Creates a new Server instance handling the specified connection * protocol.

    * * For example, the no-args WebServer constructor invokes this constructor * with ServerConstants.SC_PROTOCOL_HTTP, while the Server() no args * contructor invokes this constructor with * ServerConstants.SC_PROTOCOL_HSQL.

    * * @param protocol the ServerConstants code indicating which * connection protocol to handle */ protected Server(int protocol) { init(protocol); } /** * Creates and starts a new Server.

    * * Allows starting a Server via the command line interface.

    * * @param args the command line arguments for the Server instance */ public static void main(String[] args) { String propsPath = FileUtil.getDefaultInstance().canonicalOrAbsolutePath("server"); HsqlProperties fileProps = ServerConfiguration.getPropertiesFromFile(propsPath); HsqlProperties props = fileProps == null ? new HsqlProperties() : fileProps; HsqlProperties stringProps = null; try { stringProps = HsqlProperties.argArrayToProps(args, ServerConstants.SC_KEY_PREFIX); } catch (ArrayIndexOutOfBoundsException aioob) { // I'd like to exit with 0 here, but it's possible that user // has called main() programmatically and does not want us to // exit. printHelp("server.help"); return; } if (stringProps != null) { if (stringProps.getErrorKeys().length != 0) { printHelp("server.help"); return; } props.addProperties(stringProps); } ServerConfiguration.translateDefaultDatabaseProperty(props); // Standard behaviour when started from the command line // is to halt the VM when the server shuts down. This may, of // course, be overridden by whatever, if any, security policy // is in place. ServerConfiguration.translateDefaultNoSystemExitProperty(props); // finished setting up properties; Server server = new Server(); try { server.setProperties(props); } catch (Exception e) { server.printError("Failed to set properties"); server.printStackTrace(e); return; } // now messages go to the channel specified in properties server.print("Startup sequence initiated from main() method"); if (fileProps != null) { server.print("Loaded properties from [" + propsPath + ".properties]"); } else { server.print("Could not load properties from file"); server.print("Using cli/default properties only"); } server.start(); } /** * Checks if this Server object is or is not running and throws if the * current state does not match the specified value. * * @param running if true, ensure the server is running, else ensure the * server is not running * @throws RuntimeException if the supplied value does not match the * current running status */ public void checkRunning(boolean running) throws RuntimeException { int state; boolean error; printWithThread("checkRunning(" + running + ") entered"); state = getState(); error = (running && state != ServerConstants.SERVER_STATE_ONLINE) || (!running && state != ServerConstants.SERVER_STATE_SHUTDOWN); if (error) { String msg = "server is " + (running ? "not " : "") + "running"; throw new RuntimeException(msg); } printWithThread("checkRunning(" + running + ") exited"); } /** * Closes all connections to this Server. * * @jmx.managed-operation * impact="ACTION" * description="Closes all open connections" */ public synchronized void signalCloseAllServerConnections() { Iterator it; printWithThread("signalCloseAllServerConnections() entered"); synchronized (serverConnSet) { // snapshot it = new WrapperIterator(serverConnSet.toArray(null)); } for (; it.hasNext(); ) { ServerConnection sc = (ServerConnection) it.next(); printWithThread("Closing " + sc); // also removes all but one connection from serverConnSet sc.signalClose(); } printWithThread("signalCloseAllServerConnections() exited"); } protected void finalize() throws Throwable { if (serverThread != null) { releaseServerSocket(); } } /** * Retrieves, in string form, this server's host address. * * @return this server's host address * * @jmx.managed-attribute * access="read-write" * description="Host InetAddress" */ public String getAddress() { return socket == null ? serverProperties.getProperty(ServerConstants.SC_KEY_ADDRESS) : socket.getInetAddress().getHostAddress(); } /** * Retrieves the url alias (network name) of the i'th database * that this Server hosts. * * @param index the index of the url alias upon which to report * @param asconfigured if true, report the configured value, else * the live value * @return the url alias component of the i'th database * that this Server hosts, or null if no such name exists. * * @jmx.managed-operation * impact="INFO" * description="url alias component of the i'th hosted Database" * * @jmx.managed-operation-parameter * name="index" * type="int" * position="0" * description="This Server's index for the hosted Database" * * @jmx.managed-operation-parameter * name="asconfigured" * type="boolean" * position="1" * description="if true, the configured value, else the live value" */ public String getDatabaseName(int index, boolean asconfigured) { if (asconfigured) { return serverProperties.getProperty(ServerConstants.SC_KEY_DBNAME + "." + index); } else if (getState() == ServerConstants.SERVER_STATE_ONLINE) { return (dbAlias == null || index < 0 || index >= dbAlias.length) ? null : dbAlias[index]; } else { return null; } } /** * Retrieves the HSQLDB path descriptor (uri) of the i'th * Database that this Server hosts. * * @param index the index of the uri upon which to report * @param asconfigured if true, report the configured value, else * the live value * @return the HSQLDB database path descriptor of the i'th database * that this Server hosts, or null if no such path descriptor * exists * * @jmx.managed-operation * impact="INFO" * description="For i'th hosted database" * * @jmx.managed-operation-parameter * name="index" * type="int" * position="0" * description="This Server's index for the hosted Database" * * @jmx.managed-operation-parameter * name="asconfigured" * type="boolean" * position="1" * description="if true, the configured value, else the live value" */ public String getDatabasePath(int index, boolean asconfigured) { if (asconfigured) { return serverProperties.getProperty(ServerConstants.SC_KEY_DATABASE + "." + index); } else if (getState() == ServerConstants.SERVER_STATE_ONLINE) { return (dbPath == null || index < 0 || index >= dbPath.length) ? null : dbPath[index]; } else { return null; } } public String getDatabaseType(int index) { return (dbType == null || index < 0 || index >= dbType.length) ? null : dbType[index]; } /** * Retrieves the name of the web page served when no page is specified. * This attribute is relevant only when server protocol is HTTP(S). * * @return the name of the web page served when no page is specified * * @jmx.managed-attribute * access="read-write" * description="Used when server protocol is HTTP(S)" */ public String getDefaultWebPage() { return "[IGNORED]"; } /** * Retrieves a String object describing the command line and * properties options for this Server. * * @return the command line and properties options help for this Server */ public String getHelpString() { return BundleHandler.getString(serverBundleHandle, "server.help"); } /** * Retrieves the PrintWriter to which server errors are printed. * * @return the PrintWriter to which server errors are printed. */ public PrintWriter getErrWriter() { return errWriter; } /** * Retrieves the PrintWriter to which server messages are printed. * * @return the PrintWriter to which server messages are printed. */ public PrintWriter getLogWriter() { return logWriter; } /** * Retrieves this server's host port. * * @return this server's host port * * @jmx.managed-attribute * access="read-write" * description="At which ServerSocket listens for connections" */ public int getPort() { return serverProperties.getIntegerProperty(ServerConstants.SC_KEY_PORT, ServerConfiguration.getDefaultPort(serverProtocol, isTls())); } /** * Retrieves this server's product name.

    * * Typically, this will be something like: "HSQLDB xxx server". * * @return the product name of this server * * @jmx.managed-attribute * access="read-only" * description="Of Server" */ public String getProductName() { return "HSQLDB server"; } /** * Retrieves the server's product version, as a String.

    * * Typically, this will be something like: "1.x.x" or "2.x.x" and so on. * * @return the product version of the server * * @jmx.managed-attribute * access="read-only" * description="Of Server" */ public String getProductVersion() { return HsqlDatabaseProperties.THIS_VERSION; } /** * Retrieves a string respresentaion of the network protocol * this server offers, typically one of 'HTTP', HTTPS', 'HSQL' or 'HSQLS'. * * @return string respresentation of this server's protocol * * @jmx.managed-attribute * access="read-only" * description="Used to handle connections" */ public String getProtocol() { return isTls() ? "HSQLS" : "HSQL"; } /** * Retrieves a Throwable indicating the last server error, if any.

    * * @return a Throwable indicating the last server error * * @jmx.managed-attribute * access="read-only" * description="Indicating last exception state" */ public Throwable getServerError() { return serverError; } /** * Retrieves a String identifying this Server object. * * @return a String identifying this Server object * * @jmx.managed-attribute * access="read-only" * description="Identifying Server" */ public String getServerId() { return serverId; } /** * Retrieves current state of this server in numerically coded form.

    * * Typically, this will be one of:

    * *

      *
    1. ServerProperties.SERVER_STATE_ONLINE (1) *
    2. ServerProperties.SERVER_STATE_OPENING (4) *
    3. ServerProperties.SERVER_STATE_CLOSING (8) *
    4. ServerProperties.SERVER_STATE_SHUTDOWN (16) *
    * * @return this server's state code. * * @jmx.managed-attribute * access="read-only" * description="1:ONLINE 4:OPENING 8:CLOSING, 16:SHUTDOWN" */ public int getState() { return serverState; } /** * Retrieves a character sequence describing this server's current state, * including the message of the last exception, if there is one and it * is still in context. * * @return this server's state represented as a character sequence. * * @jmx.managed-attribute * access="read-only" * description="State as string" */ public String getStateDescriptor() { String state; Throwable t = getServerError(); switch (serverState) { case ServerConstants.SERVER_STATE_SHUTDOWN : state = "SHUTDOWN"; break; case ServerConstants.SERVER_STATE_OPENING : state = "OPENING"; break; case ServerConstants.SERVER_STATE_CLOSING : state = "CLOSING"; break; case ServerConstants.SERVER_STATE_ONLINE : state = "ONLINE"; break; default : state = "UNKNOWN"; break; } return state; } /** * Retrieves the root context (directory) from which web content * is served. This property is relevant only when the server * protocol is HTTP(S). Although unlikely, it may be that in the future * other contexts, such as jar urls may be supported, so that pages can * be served from the contents of a jar or from the JVM class path. * * @return the root context (directory) from which web content is served * * @jmx.managed-attribute * access="read-write" * description="Context (directory)" */ public String getWebRoot() { return "[IGNORED]"; } /** * Assigns the specified socket to a new conection handler and * starts the handler in a new Thread. * * @param s the socket to connect */ public void handleConnection(Socket s) { Thread t; Runnable r; String ctn; printWithThread("handleConnection(" + s + ") entered"); if (!allowConnection(s)) { try { s.close(); } catch (Exception e) {} printWithThread("allowConnection(): connection refused"); printWithThread("handleConnection() exited"); return; } // Maybe set up socket options, SSL // Session tracing/callbacks, etc. if (socketFactory != null) { socketFactory.configureSocket(s); } if (serverProtocol == ServerConstants.SC_PROTOCOL_HSQL) { r = new ServerConnection(s, this); ctn = ((ServerConnection) r).getConnectionThreadName(); synchronized (serverConnSet) { serverConnSet.add(r); } } else { r = new WebServerConnection(s, (WebServer) this); ctn = ((WebServerConnection) r).getConnectionThreadName(); } t = new Thread(serverConnectionThreadGroup, r, ctn); t.start(); printWithThread("handleConnection() exited"); } /** * Retrieves whether this server calls System.exit() when shutdown. * * @return true if this server does not call System.exit() * * @jmx.managed-attribute * access="read-write" * description="When Shutdown" */ public boolean isNoSystemExit() { return serverProperties.isPropertyTrue( ServerConstants.SC_KEY_NO_SYSTEM_EXIT); } /** * Retrieves whether this server restarts on shutdown. * * @return true this server restarts on shutdown * * @jmx.managed-attribute * access="read-write" * description="Automatically?" */ public boolean isRestartOnShutdown() { return serverProperties.isPropertyTrue( ServerConstants.SC_KEY_AUTORESTART_SERVER); } /** * Retrieves whether silent mode operation was requested in * the server properties. * * @return if true, silent mode was requested, else trace messages * are to be printed * * @jmx.managed-attribute * access="read-write" * description="No trace messages?" */ public boolean isSilent() { return isSilent; } /** * Retrieves whether the use of secure sockets was requested in the * server properties. * * @return if true, secure sockets are requested, else not * * @jmx.managed-attribute * access="read-write" * description="Use TLS/SSL sockets?" */ public boolean isTls() { return serverProperties.isPropertyTrue(ServerConstants.SC_KEY_TLS); } /** * Retrieves whether JDBC trace messages are to go to System.out or the * DriverManger PrintStream/PrintWriter, if any. * * @return true if tracing is on (JDBC trace messages to system out) * * @jmx.managed-attribute * access="read-write" * description="JDBC trace messages to System.out?" */ public boolean isTrace() { return serverProperties.isPropertyTrue(ServerConstants.SC_KEY_TRACE); } /** * Attempts to put properties from the file * with the specified path. The file * extension '.properties' is implicit and should not * be included in the path specification. * * @param path the path of the desired properties file, without the * '.properties' file extension * @throws RuntimeException if this server is running * @return true if the indicated file was read sucessfully, else false * * @jmx.managed-operation * impact="ACTION" * description="Reads in properties" * * @jmx.managed-operation-parameter * name="path" * type="java.lang.String" * position="0" * description="(optional) returns false if path is empty" */ public boolean putPropertiesFromFile(String path) { if (getState() != ServerConstants.SERVER_STATE_SHUTDOWN) { throw new RuntimeException(); } path = FileUtil.getDefaultInstance().canonicalOrAbsolutePath(path); HsqlProperties p = ServerConfiguration.getPropertiesFromFile(path); if (p == null || p.isEmpty()) { return false; } printWithThread("putPropertiesFromFile(): [" + path + ".properties]"); try { setProperties(p); } catch (Exception e) { throw new RuntimeException("Failed to set properties: " + e); } return true; } /** * Puts properties from the supplied string argument. The relevant * key value pairs are the same as those for the (web)server.properties * file format, except that the 'server.' prefix should not be specified. * * @param s semicolon-delimited key=value pair string, * e.g. k1=v1;k2=v2;k3=v3... * @throws RuntimeException if this server is running * * @jmx.managed-operation * impact="ACTION" * description="'server.' key prefix automatically supplied" * * @jmx.managed-operation-parameter * name="s" * type="java.lang.String" * position="0" * description="semicolon-delimited key=value pairs" */ public void putPropertiesFromString(String s) { if (getState() != ServerConstants.SERVER_STATE_SHUTDOWN) { throw new RuntimeException(); } if (StringUtil.isEmpty(s)) { return; } printWithThread("putPropertiesFromString(): [" + s + "]"); HsqlProperties p = HsqlProperties.delimitedArgPairsToProps(s, "=", ";", ServerConstants.SC_KEY_PREFIX); try { setProperties(p); } catch (Exception e) { throw new RuntimeException("Failed to set properties: " + e); } } /** * Sets the InetAddress with which this server's ServerSocket will be * constructed. A null or empty string or the special value "0.0.0.0" * can be used to bypass explicit selection, causing the ServerSocket * to be constructed without specifying an InetAddress. * * @param address A string representing the desired InetAddress as would * be retrieved by InetAddres.getByName(), or a null or empty string * or "0.0.0.0" to signify that the server socket should be constructed * using the signature that does not specify the InetAddress. * @throws RuntimeException if this server is running * * @jmx.managed-attribute */ public void setAddress(String address) throws RuntimeException { checkRunning(false); if (org.hsqldb.lib.StringUtil.isEmpty(address)) { address = ServerConstants.SC_DEFAULT_ADDRESS; } printWithThread("setAddress(" + address + ")"); serverProperties.setProperty(ServerConstants.SC_KEY_ADDRESS, address); } /** * Sets the external name (url alias) of the i'th hosted database. * * @param name external name (url alias) of the i'th HSQLDB database * instance this server is to host. * @throws RuntimeException if this server is running * * @jmx.managed-operation * impact="ACTION" * description="Sets the url alias by which is known the i'th hosted Database" * * @jmx.managed-operation-parameter * name="index" * type="int" * position="0" * description="This Server's index for the hosted Database" * * @jmx.managed-operation-parameter * name="name" * type="java.lang.String" * position="1" * description="url alias component for the hosted Database" */ public void setDatabaseName(int index, String name) throws RuntimeException { checkRunning(false); printWithThread("setDatabaseName(" + index + "," + name + ")"); serverProperties.setProperty(ServerConstants.SC_KEY_DBNAME + "." + index, name); } /** * Sets the path of the hosted database. * * @param path The path of the i'th HSQLDB database instance this server * is to host. * * @jmx.managed-operation * impact="ACTION" * description="Sets the database uri path for the i'th hosted Database" * * @jmx.managed-operation-parameter * name="index" * type="int" * position="0" * description="This Server's index for the hosted Database" * * @jmx.managed-operation-parameter * name="path" * type="java.lang.String" * position="1" * description="database uri path of the hosted Database" */ public void setDatabasePath(int index, String path) throws RuntimeException { checkRunning(false); printWithThread("setDatabasePath(" + index + "," + path + ")"); serverProperties.setProperty(ServerConstants.SC_KEY_DATABASE + "." + index, path); } /** * Sets the name of the web page served when no page is specified. * * @param file the name of the web page served when no page is specified * * @jmx.managed-attribute */ public void setDefaultWebPage(String file) { checkRunning(false); printWithThread("setDefaultWebPage(" + file + ")"); if (serverProtocol != ServerConstants.SC_PROTOCOL_HTTP) { return; } serverProperties.setProperty(ServerConstants.SC_KEY_WEB_DEFAULT_PAGE, file); } /** * Sets the server listen port. * * @param port the port at which this server listens * * @jmx.managed-attribute */ public void setPort(int port) throws RuntimeException { checkRunning(false); printWithThread("setPort(" + port + ")"); serverProperties.setProperty(ServerConstants.SC_KEY_PORT, port); } /** * Sets the PrintWriter to which server errors are logged.

    * * Setting this attribute to null disables server error logging * * @param pw the PrintWriter to which server messages are logged */ public void setErrWriter(PrintWriter pw) { errWriter = pw; } /** * Sets the PrintWriter to which server messages are logged.

    * * Setting this attribute to null disables server message logging * * @param pw the PrintWriter to which server messages are logged */ public void setLogWriter(PrintWriter pw) { logWriter = pw; } /** * Sets whether this server calls System.exit() when shutdown. * * @param noExit if true, System.exit() will not be called. * * @jmx.managed-attribute */ public void setNoSystemExit(boolean noExit) { printWithThread("setNoSystemExit(" + noExit + ")"); serverProperties.setProperty(ServerConstants.SC_KEY_NO_SYSTEM_EXIT, noExit); } /** * Sets whether this server restarts on shutdown. * * @param restart if true, this server restarts on shutdown * * @jmx.managed-attribute */ public void setRestartOnShutdown(boolean restart) { printWithThread("setRestartOnShutdown(" + restart + ")"); serverProperties.setProperty(ServerConstants.SC_KEY_AUTORESTART_SERVER, restart); } /** * Sets silent mode operation * * @param silent if true, then silent mode, else trace messages * are to be printed * * @jmx.managed-attribute */ public void setSilent(boolean silent) { printWithThread("setSilent(" + silent + ")"); serverProperties.setProperty(ServerConstants.SC_KEY_SILENT, silent); isSilent = silent; } /** * Sets whether to use secure sockets * * @param tls true for secure sockets, else false * @throws RuntimeException if this server is running * * @jmx.managed-attribute */ public void setTls(boolean tls) { checkRunning(false); printWithThread("setTls(" + tls + ")"); serverProperties.setProperty(ServerConstants.SC_KEY_TLS, tls); } /** * Sets whether trace messages go to System.out or the * DriverManger PrintStream/PrintWriter, if any. * * @param trace if true, route JDBC trace messages to System.out * * @jmx.managed-attribute */ public void setTrace(boolean trace) { printWithThread("setTrace(" + trace + ")"); serverProperties.setProperty(ServerConstants.SC_KEY_TRACE, trace); JavaSystem.setLogToSystem(trace); } /** * Sets the path of the root directory from which web content is served. * * @param root the root (context) directory from which web content * is served * * @jmx.managed-attribute */ public void setWebRoot(String root) { checkRunning(false); root = (new File(root)).getAbsolutePath(); printWithThread("setWebRoot(" + root + ")"); if (serverProtocol != ServerConstants.SC_PROTOCOL_HTTP) { return; } serverProperties.setProperty(ServerConstants.SC_KEY_WEB_ROOT, root); } /** * Sets server properties using the specified properties object * * @param p The object containing properties to set */ public void setProperties(HsqlProperties p) { checkRunning(false); if (p != null) { serverProperties.addProperties(p); ServerConfiguration.translateAddressProperty(serverProperties); } maxConnections = serverProperties.getIntegerProperty( ServerConstants.SC_KEY_MAX_CONNECTIONS, 16); JavaSystem.setLogToSystem(isTrace()); isSilent = serverProperties.isPropertyTrue(ServerConstants.SC_KEY_SILENT); isRemoteOpen = serverProperties.isPropertyTrue( ServerConstants.SC_KEY_REMOTE_OPEN_DB); } /** * Starts this server synchronously.

    * * This method waits for current state to change from * SERVER_STATE_OPENNING. In order to discover the success or failure * of this operation, server state must be polled or a subclass of Server * must be used that overrides the setState method to provide state * change notification. * * @return the server state noted at entry to this method * * @jmx.managed-operation * impact="ACTION_INFO" * description="Invokes asynchronous startup sequence; returns previous state" */ public int start() { printWithThread("start() entered"); int previousState = getState(); if (serverThread != null) { printWithThread("start(): serverThread != null; no action taken"); return previousState; } setState(ServerConstants.SERVER_STATE_OPENING); serverThread = new ServerThread("HSQLDB Server "); serverThread.start(); // call synchronized getState() to become owner of the Server Object's monitor while (getState() == ServerConstants.SERVER_STATE_OPENING) { try { Thread.sleep(100); } catch (InterruptedException e) {} } printWithThread("start() exiting"); return previousState; } /** * Stops this server asynchronously.

    * * This method returns immediately, regardless of current state. In order * to discover the success or failure of this operation, server state must * be polled or a subclass of Server must be used that overrides the * setState method to provide state change notification. * * @return the server state noted at entry to this method * * @jmx.managed-operation * impact="ACTION_INFO" * description="Invokes asynchronous shutdown sequence; returns previous state" */ public int stop() { printWithThread("stop() entered"); int previousState = getState(); if (serverThread == null) { printWithThread("stop() serverThread is null; no action taken"); return previousState; } releaseServerSocket(); printWithThread("stop() exiting"); return previousState; } /** * Retrieves whether the specified socket should be allowed * to make a connection. By default, this method always returns * true, but it can be overidden to implement hosts allow-deny * functionality. * * @param socket the socket to test. */ protected boolean allowConnection(Socket socket) { return true; } /** * Initializes this server, setting the accepted connection protocol. * * @param protocol typically either SC_PROTOCOL_HTTP or SC_PROTOCOL_HSQL */ protected void init(int protocol) { // PRE: This method is only called from the constructor serverState = ServerConstants.SERVER_STATE_SHUTDOWN; serverConnSet = new HashSet(); serverId = toString(); serverId = serverId.substring(serverId.lastIndexOf('.') + 1); serverProtocol = protocol; serverProperties = ServerConfiguration.newDefaultProperties(protocol); logWriter = new PrintWriter(System.out); errWriter = new PrintWriter(System.err); JavaSystem.setLogToSystem(isTrace()); } /** * Sets the server state value. * * @param state the new value */ protected synchronized void setState(int state) { serverState = state; } /** * This is called from org.hsqldb.DatabaseManager when a database is * shutdown. This shuts the server down if it is the last database * * @param action a code indicating what has happend */ final void notify(int action, int id) { printWithThread("notifiy(" + action + "," + id + ") entered"); if (action != ServerConstants.SC_DATABASE_SHUTDOWN) { return; } releaseDatabase(id); boolean shutdown = true; for (int i = 0; i < dbID.length; i++) { if (dbAlias[i] != null) { shutdown = false; } } if (!isRemoteOpen && shutdown) { stop(); } } /** * This releases the resources used for a database. * Is called with id 0 multiple times for non-existent databases */ final synchronized void releaseDatabase(int id) { Iterator it; boolean found = false; printWithThread("releaseDatabase(" + id + ") entered"); // check all slots as a database may be opened by multiple aliases for (int i = 0; i < dbID.length; i++) { if (dbID[i] == id && dbAlias[i] != null) { dbID[i] = 0; dbAlias[i] = null; dbPath[i] = null; dbType[i] = null; dbProps[i] = null; } } synchronized (serverConnSet) { it = new WrapperIterator(serverConnSet.toArray(null)); } while (it.hasNext()) { ServerConnection sc = (ServerConnection) it.next(); if (sc.dbID == id) { sc.signalClose(); serverConnSet.remove(sc); } } printWithThread("releaseDatabase(" + id + ") exiting"); } /** * Prints the specified message, s, formatted to identify that the print * operation is against this server instance. * * @param msg The message to print */ protected void print(String msg) { PrintWriter writer = logWriter; if (writer != null) { writer.println("[" + serverId + "]: " + msg); writer.flush(); } } /** * Prints value from server's resource bundle, formatted to * identify that the print operation is against this server instance. * Value may be localized according to the default JVM locale * * @param key the resource key */ final void printResource(String key) { String resource; StringTokenizer st; if (serverBundleHandle < 0) { return; } resource = BundleHandler.getString(serverBundleHandle, key); if (resource == null) { return; } st = new StringTokenizer(resource, "\n\r"); while (st.hasMoreTokens()) { print(st.nextToken()); } } /** * Prints the stack trace of the Throwable, t, to this Server object's * errWriter.

    * * @param t the Throwable whose stack trace is to be printed */ protected void printStackTrace(Throwable t) { if (errWriter != null) { t.printStackTrace(errWriter); errWriter.flush(); } } /** * Prints the specified message, s, prepended with a timestamp representing * the current date and time, formatted to identify that the print * operation is against this server instance. * * @param msg the message to print */ final void printWithTimestamp(String msg) { print(HsqlDateTime.getSytemTimeString() + " " + msg); } /** * Prints a message formatted similarly to print(String), additionally * identifying the current (calling) thread. Replaces old method * trace(String msg). * * @param msg the message to print */ protected void printWithThread(String msg) { if (!isSilent()) { print("[" + Thread.currentThread() + "]: " + msg); } } /** * Prints an error message to this Server object's errWriter. * The message is formatted similarly to print(String), * additionally identifying the current (calling) thread. * * @param msg the message to print */ protected void printError(String msg) { PrintWriter writer = errWriter; if (writer != null) { writer.print("[" + serverId + "]: "); writer.print("[" + Thread.currentThread() + "]: "); writer.println(msg); writer.flush(); } } /** * Prints a description of the request encapsulated by the * Result argument, r. * * Printing occurs iff isSilent() is false.

    * * The message is formatted similarly to print(String), additionally * indicating the connection identifier.

    * * For Server instances, cid is typically the value assigned to each * ServerConnection object that is unique amongst all such identifiers * in each distinct JVM session / class loader * context.

    * * For WebServer instances, a single logical connection actually spawns * a new physical WebServerConnection object for each request, so the * cid is typically the underlying session id, since that does not * change for the duration of the logical connection. * * @param cid the connection identifier * @param r the request whose description is to be printed */ final void printRequest(int cid, Result r) { if (isSilent()) { return; } StringBuffer sb = new StringBuffer(); sb.append(cid); sb.append(':'); switch (r.mode) { case ResultConstants.SQLPREPARE : { sb.append("SQLCLI:SQLPREPARE "); sb.append(r.getMainString()); break; } case ResultConstants.SQLEXECDIRECT : { if (r.getSize() < 2) { sb.append(r.getMainString()); } else { sb.append("SQLCLI:SQLEXECDIRECT:BATCHMODE\n"); Iterator it = r.iterator(); while (it.hasNext()) { Object[] data = (Object[]) it.next(); sb.append(data[0]).append('\n'); } } break; } case ResultConstants.SQLEXECUTE : { sb.append("SQLCLI:SQLEXECUTE:"); if (r.getSize() > 1) { sb.append("BATCHMODE:"); } sb.append(r.getStatementID()); /** * todo - fredt - NOW - fix this without appendStringValueOf */ /* if (r.getSize() == 1) { sb.append('\n'); StringUtil.appendStringValueOf(r.getParameterData(), sb, true); } */ break; } case ResultConstants.SQLFREESTMT : { sb.append("SQLCLI:SQLFREESTMT:"); sb.append(r.getStatementID()); break; } case ResultConstants.GETSESSIONATTR : { sb.append("HSQLCLI:GETSESSIONATTR"); break; } case ResultConstants.SETSESSIONATTR : { sb.append("HSQLCLI:SETSESSIONATTR:"); sb.append("AUTOCOMMIT "); sb.append(r.rRoot.data[Session.INFO_AUTOCOMMIT]); sb.append(" CONNECTION_READONLY "); sb.append(r.rRoot.data[Session.INFO_CONNECTION_READONLY]); break; } case ResultConstants.SQLENDTRAN : { sb.append("SQLCLI:SQLENDTRAN:"); switch (r.getEndTranType()) { case ResultConstants.COMMIT : sb.append("COMMIT"); break; case ResultConstants.ROLLBACK : sb.append("ROLLBACK"); break; case ResultConstants.SAVEPOINT_NAME_RELEASE : sb.append("SAVEPOINT_NAME_RELEASE "); sb.append(r.getMainString()); break; case ResultConstants.SAVEPOINT_NAME_ROLLBACK : sb.append("SAVEPOINT_NAME_ROLLBACK "); sb.append(r.getMainString()); break; default : sb.append(r.getEndTranType()); } break; } case ResultConstants.SQLSTARTTRAN : { sb.append("SQLCLI:SQLSTARTTRAN"); break; } case ResultConstants.SQLDISCONNECT : { sb.append("SQLCLI:SQLDISCONNECT"); break; } case ResultConstants.SQLSETCONNECTATTR : { sb.append("SQLCLI:SQLSETCONNECTATTR:"); switch (r.getConnectionAttrType()) { case ResultConstants.SQL_ATTR_SAVEPOINT_NAME : { sb.append("SQL_ATTR_SAVEPOINT_NAME "); sb.append(r.getMainString()); break; } default : { sb.append(r.getConnectionAttrType()); } } break; } default : { sb.append("SQLCLI:MODE:"); sb.append(r.mode); break; } } print(sb.toString()); } /** * return database ID */ synchronized final int getDBID(String aliasPath) throws HsqlException { int semipos = aliasPath.indexOf(';'); String alias = aliasPath; String filepath = null; if (semipos != -1) { alias = aliasPath.substring(0, semipos); filepath = aliasPath.substring(semipos + 1); } int dbIndex = ArrayUtil.find(dbAlias, alias); if (dbIndex == -1) { if (filepath == null) { RuntimeException e = new RuntimeException("database alias does not exist"); printError("database alias=" + alias + " does not exist"); setServerError(e); throw e; } else { return openDatabase(alias, filepath); } } else { return dbID[dbIndex]; } } /** * Open and return database ID */ final int openDatabase(String alias, String filepath) throws HsqlException { if (!isRemoteOpen) { RuntimeException e = new RuntimeException("remote open not allowed"); printError("Remote database open not allowed"); setServerError(e); throw e; } int i = getFirstEmptyDatabaseIndex(); if (i < -1) { RuntimeException e = new RuntimeException("limit of open databases reached"); printError("limit of open databases reached"); setServerError(e); throw e; } HsqlProperties newprops = DatabaseURL.parseURL(filepath, false); if (newprops == null) { RuntimeException e = new RuntimeException("invalid database path"); printError("invalid database path"); setServerError(e); throw e; } String path = newprops.getProperty("database"); String type = newprops.getProperty("connection_type"); try { int dbid = DatabaseManager.getDatabase(type, path, this, newprops); dbID[i] = dbid; dbAlias[i] = alias; dbPath[i] = path; dbType[i] = type; dbProps[i] = newprops; return dbid; } catch (HsqlException e) { printError("Database [index=" + i + "db=" + dbType[i] + dbPath[i] + ", alias=" + dbAlias[i] + "] did not open: " + e.toString()); setServerError(e); throw e; } } final int getFirstEmptyDatabaseIndex() { for (int i = 0; i < dbAlias.length; i++) { if (dbAlias[i] == null) { return i; } } return -1; } /** * Opens this server's database instances. This method returns true If * at least one database goes online, otherwise it returns false. * * If openning any of the databases is attempted and an exception is * thrown, the server error is set to this exception. * * @throws HsqlException if a database access error occurs */ final boolean openDatabases() { printWithThread("openDatabases() entered"); boolean success = false; setDBInfoArrays(); for (int i = 0; i < dbAlias.length; i++) { if (dbAlias[i] == null) { continue; } printWithThread("Opening database: [" + dbType[i] + dbPath[i] + "]"); StopWatch sw = new StopWatch(); int id; try { id = DatabaseManager.getDatabase(dbType[i], dbPath[i], this, dbProps[i]); dbID[i] = id; success = true; } catch (HsqlException e) { printError("Database [index=" + i + "db=" + dbType[i] + dbPath[i] + ", alias=" + dbAlias[i] + "] did not open: " + e.toString()); setServerError(e); dbAlias[i] = null; dbPath[i] = null; dbType[i] = null; dbProps[i] = null; continue; } sw.stop(); String msg = "Database [index=" + i + ", id=" + id + ", " + "db=" + dbType[i] + dbPath[i] + ", alias=" + dbAlias[i] + "] opened sucessfully"; print(sw.elapsedTimeToMessage(msg)); } printWithThread("openDatabases() exiting"); if (isRemoteOpen) { success = true; } if (!success && getServerError() == null) { // database alias / path list is empty or without full info for any DB setServerError(Trace.error(Trace.SERVER_NO_DATABASE)); } return success; } /** * Initialises the database attributes lists from the server properties object. */ private void setDBInfoArrays() { dbAlias = getDBNameArray(); dbPath = new String[dbAlias.length]; dbType = new String[dbAlias.length]; dbID = new int[dbAlias.length]; dbProps = new HsqlProperties[dbAlias.length]; for (int i = 0; i < dbAlias.length; i++) { if (dbAlias[i] == null) { continue; } String path = getDatabasePath(i, true); if (path == null) { dbAlias[i] = null; continue; } HsqlProperties dbURL = DatabaseURL.parseURL(path, false); if (dbURL == null) { dbAlias[i] = null; continue; } dbPath[i] = dbURL.getProperty("database"); dbType[i] = dbURL.getProperty("connection_type"); dbProps[i] = dbURL; } } /** * Returns a possibly sparse array of all server.dbname.n values * from the properties object. */ private String[] getDBNameArray() { final String prefix = ServerConstants.SC_KEY_DBNAME + "."; final int prefixLen = prefix.length(); String[] dblist = new String[10]; int maxindex = 0; try { Enumeration en = serverProperties.propertyNames(); for (; en.hasMoreElements(); ) { String key = (String) en.nextElement(); if (!key.startsWith(prefix)) { continue; } try { int dbnum = Integer.parseInt(key.substring(prefixLen)); maxindex = dbnum < maxindex ? maxindex : dbnum; dblist[dbnum] = serverProperties.getProperty(key).toLowerCase(); } catch (NumberFormatException e) { printWithThread("dblist: " + e.toString()); } } } catch (ArrayIndexOutOfBoundsException e) { printWithThread("dblist: " + e.toString()); } return dblist; } /** * Constructs and installs a new ServerSocket instance for this server. * * @throws Exception if it is not possible to construct and install * a new ServerSocket */ private void openServerSocket() throws Exception { String address; int port; String[] candidateAddrs; String emsg; StopWatch sw; printWithThread("openServerSocket() entered"); if (isTls()) { printWithThread("Requesting TLS/SSL-encrypted JDBC"); } sw = new StopWatch(); socketFactory = HsqlSocketFactory.getInstance(isTls()); address = getAddress(); port = getPort(); if (org.hsqldb.lib.StringUtil.isEmpty(address) || ServerConstants.SC_DEFAULT_ADDRESS.equalsIgnoreCase( address.trim())) { socket = socketFactory.createServerSocket(port); } else { try { socket = socketFactory.createServerSocket(port, address); } catch (UnknownHostException e) { candidateAddrs = ServerConfiguration.listLocalInetAddressNames(); int messageID; Object[] messageParameters; if (candidateAddrs.length > 0) { messageID = Trace.Server_openServerSocket; messageParameters = new Object[] { address, candidateAddrs }; } else { messageID = Trace.Server_openServerSocket2; messageParameters = new Object[]{ address }; } throw new UnknownHostException(Trace.getMessage(messageID, true, messageParameters)); } } /* * Following line necessary for Java 1.3 on UNIX. See accept() * comment elsewhere in this file. */ socket.setSoTimeout(1000); printWithThread("Got server socket: " + socket); print(sw.elapsedTimeToMessage("Server socket opened successfully")); if (socketFactory.isSecure()) { print("Using TLS/SSL-encrypted JDBC"); } printWithThread("openServerSocket() exiting"); } /** Prints a timestamped message indicating that this server is online */ private void printServerOnlineMessage() { String s = getProductName() + " " + getProductVersion() + " is online"; printWithTimestamp(s); printResource("online.help"); } /** * Prints a description of the server properties iff !isSilent(). */ protected void printProperties() { Enumeration e; String key; String value; // Avoid the waste of generating each description, // only for trace() to silently discard it if (isSilent()) { return; } e = serverProperties.propertyNames(); while (e.hasMoreElements()) { key = (String) e.nextElement(); value = serverProperties.getProperty(key); printWithThread(key + "=" + value); } } /** * Puts this server into the SERVER_CLOSING state, closes the ServerSocket * and nullifies the reference to it. If the ServerSocket is already null, * this method exists immediately, otherwise, the result is to fully * shut down the server. */ private void releaseServerSocket() { printWithThread("releaseServerSocket() entered"); if (socket != null) { printWithThread("Releasing server socket: [" + socket + "]"); setState(ServerConstants.SERVER_STATE_CLOSING); try { socket.close(); } catch (IOException e) { printError("Exception closing server socket"); printError("releaseServerSocket(): " + e); } socket = null; } printWithThread("releaseServerSocket() exited"); } /** * Attempts to bring this server fully online by opening * a new ServerSocket, obtaining the hosted databases, * notifying the status waiter thread (if any) and * finally entering the listen loop if all else succeeds. * If any part of the process fails, then this server enters * its shutdown sequence. */ private void run() { StopWatch sw; ThreadGroup tg; String tgName; printWithThread("run() entered"); print("Initiating startup sequence..."); printProperties(); sw = new StopWatch(); setServerError(null); try { // Faster init first: // It is huge waste to fully open the databases, only // to find that the socket address is already in use openServerSocket(); } catch (Exception e) { setServerError(e); printError("run()/openServerSocket(): "); printStackTrace(e); shutdown(true); return; } tgName = "HSQLDB Connections @" + Integer.toString(this.hashCode(), 16); tg = new ThreadGroup(tgName); tg.setDaemon(false); serverConnectionThreadGroup = tg; // Mount the databases this server is supposed to host. // This may take some time if the databases are not all // already open. if (openDatabases() == false) { setServerError(null); printError("Shutting down because there are no open databases"); shutdown(true); return; } // At this point, we have a valid server socket and // a valid hosted database set, so its OK to start // listening for connections. setState(ServerConstants.SERVER_STATE_ONLINE); print(sw.elapsedTimeToMessage("Startup sequence completed")); printServerOnlineMessage(); try { /* * This loop is necessary for UNIX w/ Sun Java 1.3 because * in that case the socket.close() elsewhere will not * interrupt this accept(). */ while (true) { try { handleConnection(socket.accept()); } catch (java.io.InterruptedIOException e) {} } } catch (IOException e) { if (getState() == ServerConstants.SERVER_STATE_ONLINE) { setServerError(e); printError(this + ".run()/handleConnection(): "); printStackTrace(e); } } catch (Throwable t) { printWithThread(t.toString()); } finally { shutdown(false); // or maybe getServerError() != null? } } /** * Sets this Server's last encountered error state. * * @param t The new value for the server error */ protected void setServerError(Throwable t) { serverError = t; } /** * External method to shut down this server. */ public void shutdown() { shutdown(false); } /** * Shuts down this server. * * @param error true if shutdown is in response to an error * state, else false */ protected synchronized void shutdown(boolean error) { if (serverState == ServerConstants.SERVER_STATE_SHUTDOWN) { return; } StopWatch sw; printWithThread("shutdown() entered"); sw = new StopWatch(); print("Initiating shutdown sequence..."); releaseServerSocket(); DatabaseManager.deRegisterServer(this); if (dbPath != null) { for (int i = 0; i < dbPath.length; i++) { releaseDatabase(dbID[i]); } } // Be nice and let applications exit if there are no // running connection threads if (serverConnectionThreadGroup != null) { if (!serverConnectionThreadGroup.isDestroyed()) { for (int i = 0; serverConnectionThreadGroup.activeCount() > 0; i++) { int count; try { Thread.sleep(100); } catch (Exception e) { // e.getMessage(); } } try { serverConnectionThreadGroup.destroy(); printWithThread(serverConnectionThreadGroup.getName() + " destroyed"); } catch (Throwable t) { printWithThread(serverConnectionThreadGroup.getName() + " not destroyed"); printWithThread(t.toString()); } } serverConnectionThreadGroup = null; } serverThread = null; setState(ServerConstants.SERVER_STATE_SHUTDOWN); print(sw.elapsedTimeToMessage("Shutdown sequence completed")); if (isNoSystemExit()) { printWithTimestamp("SHUTDOWN : System.exit() was not called"); printWithThread("shutdown() exited"); } else { printWithTimestamp("SHUTDOWN : System.exit() is called next"); printWithThread("shutdown() exiting..."); try { System.exit(0); } catch (Throwable t) { printWithThread(t.toString()); } } } /** * Prints message for the specified key, without any special * formatting. The message content comes from the server * resource bundle and thus may localized according to the default * JVM locale.

    * * Uses System.out directly instead of Trace.printSystemOut() so it * always prints, regardless of Trace settings. * * @param key for message */ protected static void printHelp(String key) { System.out.print(BundleHandler.getString(serverBundleHandle, key)); } } hsqldb-1.8.0.10.orig/src/org/hsqldb/TriggerDef.java0000644000175000017500000003342110416742502020343 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb; import org.hsqldb.HsqlNameManager.HsqlName; import org.hsqldb.lib.HsqlDeque; import org.hsqldb.lib.StringConverter; import org.hsqldb.lib.StringUtil; // peterhudson@users 20020130 - patch 478657 by peterhudson - triggers support // fredt@users 20020130 - patch 1.7.0 by fredt // added new class as jdk 1.1 does not allow use of LinkedList // fredt@users 20030727 - signature and other alterations // fredt@users 20040430 - changes by mattshaw@users to allow termination of the // trigger thread - /** * Represents an HSQLDB Trigger definition.

    * * Provides services regarding HSLDB Trigger execution and metadata.

    * * Development of the trigger implementation sponsored by Logicscope * Realisations Ltd * * @author Peter Hudson - Logicscope Realisations Ltd * @version 1.7.0 (1.0.0.3) * Revision History: 1.0.0.1 First release in hsqldb 1.61 * 1.0.0.2 'nowait' support to prevent deadlock 1.0.0.3 multiple row * queue for each trigger */ class TriggerDef extends Thread { /** * member variables */ static final int NUM_TRIGGER_OPS = 3; // {ins,del,upd} static final int NUM_TRIGS = NUM_TRIGGER_OPS * 2 * 2; // {b, a},{fer, fes} // other variables HsqlName name; String when; String operation; boolean forEachRow; boolean nowait; // block or overwrite if queue full int maxRowsQueued; // max size of queue of pending triggers /** * Retrieves the queue size assigned to trigger definitions when no * queue size is explicitly declared.

    * * @return the queue size assigned to trigger definitions when no * queue size is explicitly declared */ public static int getDefaultQueueSize() { return defaultQueueSize; } protected static int defaultQueueSize = 1024; Table table; Trigger trigger; String triggerClassName; int vectorIndex; // index into HsqlArrayList[] //protected boolean busy; // firing trigger in progress protected HsqlDeque pendingQueue; // row triggers pending protected int rowsQueued; // rows in pendingQueue protected boolean valid = true; // parsing valid protected volatile boolean keepGoing = true; /** * Constructs a new TriggerDef object to represent an HSQLDB trigger * declared in an SQL CREATE TRIGGER statement. * * Changes in 1.7.2 allow the queue size to be specified as 0. A zero * queue size causes the Trigger.fire() code to run in the main thread of * execution (fully inside the enclosing transaction). Otherwise, the code * is run in the Trigger's own thread. * (fredt@users) * * @param name The trigger object's HsqlName * @param when the String representation of whether the trigger fires * before or after the triggering event * @param operation the String representation of the triggering operation; * currently insert, update, or delete * @param forEach indicates whether the trigger is fired for each row * (true) or statement (false) * @param table the Table object upon which the indicated operation * fires the trigger * @param triggerClassName the fully qualified named of the class implementing * the org.hsqldb.Trigger (trigger body) interface * @param noWait do not wait for available space on the pending queue; if * the pending queue does not have fewer than nQueueSize queued items, * then overwrite the current tail instead * @param queueSize the length to which the pending queue may grow before * further additions are either blocked or overwrite the tail entry, * as determined by noWait * @throws HsqlException - Invalid input parameter */ public TriggerDef(HsqlNameManager.HsqlName name, String when, String operation, boolean forEach, Table table, String triggerClassName, boolean noWait, int queueSize, ClassLoader loader) throws HsqlException { this.name = name; this.when = when; this.operation = operation; this.forEachRow = forEach; this.nowait = noWait; this.maxRowsQueued = queueSize; this.table = table; vectorIndex = SqlToIndex(); this.triggerClassName = triggerClassName; rowsQueued = 0; pendingQueue = new HsqlDeque(); if (vectorIndex < 0) { throw Trace.error(Trace.UNEXPECTED_TOKEN, Trace.CREATE_TRIGGER_COMMAND_1); } Class cl; try { cl = loader == null ? Class.forName(triggerClassName) : loader.loadClass(triggerClassName); } catch (ClassNotFoundException e) { valid = false; cl = DefaultTrigger.class; } try { // dynamically instantiate it trigger = (Trigger) cl.newInstance(); } catch (Exception e) { valid = false; cl = DefaultTrigger.class; } } /** * Retrieves the SQL character sequence required to (re)create the * trigger, as a StringBuffer * * @return the SQL character sequence required to (re)create the * trigger */ public StringBuffer getDDL() { StringBuffer a = new StringBuffer(256); a.append(Token.T_CREATE).append(' '); a.append(Token.T_TRIGGER).append(' '); a.append(name.statementName).append(' '); a.append(when).append(' '); a.append(operation).append(' '); a.append(Token.T_ON).append(' '); a.append(table.getName().statementName).append(' '); if (forEachRow) { a.append(Token.T_FOR).append(' '); a.append(Token.T_EACH).append(' '); a.append(Token.T_ROW).append(' '); } if (nowait) { a.append(Token.T_NOWAIT).append(' '); } if (maxRowsQueued != getDefaultQueueSize()) { a.append(Token.T_QUEUE).append(' '); a.append(maxRowsQueued).append(' '); } a.append(Token.T_CALL).append(' '); a.append(StringConverter.toQuotedString(triggerClassName, '"', false)); return a; } /** * SqlToIndex method declaration

    * * Given the SQL creating the trigger, say what the index to the * HsqlArrayList[] is * * @return index to the HsqlArrayList[] */ public int SqlToIndex() { int indx; if (operation.equals(Token.T_INSERT)) { indx = Trigger.INSERT_AFTER; } else if (operation.equals(Token.T_DELETE)) { indx = Trigger.DELETE_AFTER; } else if (operation.equals(Token.T_UPDATE)) { indx = Trigger.UPDATE_AFTER; } else { return -1; } if (when.equals(Token.T_BEFORE)) { indx += NUM_TRIGGER_OPS; // number of operations } else if (!when.equals(Token.T_AFTER)) { return -1; } if (forEachRow) { indx += 2 * NUM_TRIGGER_OPS; } return indx; } public static int indexToRight(int idx) { switch (idx) { case Trigger.DELETE_AFTER : case Trigger.DELETE_AFTER_ROW : case Trigger.DELETE_BEFORE : case Trigger.DELETE_BEFORE_ROW : return UserManager.DELETE; case Trigger.INSERT_AFTER : case Trigger.INSERT_AFTER_ROW : case Trigger.INSERT_BEFORE : case Trigger.INSERT_BEFORE_ROW : return UserManager.INSERT; case Trigger.UPDATE_AFTER : case Trigger.UPDATE_AFTER_ROW : case Trigger.UPDATE_BEFORE : case Trigger.UPDATE_BEFORE_ROW : return UserManager.UPDATE; default : return 0; } } /** * run method declaration

    * * the trigger JSP is run in its own thread here. Its job is simply to * wait until it is told by the main thread that it should fire the * trigger. */ public void run() { while (keepGoing) { TriggerData triggerData = popPair(); if (triggerData != null) { if (triggerData.username != null) { trigger.fire(this.vectorIndex, name.name, table.getName().name, triggerData.oldRow, triggerData.newRow); } } } } /** * start the thread if this is threaded */ public synchronized void start() { if (maxRowsQueued != 0) { super.start(); } } /** * signal the thread to stop */ public synchronized void terminate() { keepGoing = false; notify(); } /** * pop2 method declaration

    * * The consumer (trigger) thread waits for an event to be queued

    * * Note: This push/pop pairing assumes a single producer thread * and a single consumer thread _only_. * * @return Description of the Return Value */ synchronized TriggerData popPair() { if (rowsQueued == 0) { try { wait(); // this releases the lock monitor } catch (InterruptedException e) { /* ignore and resume */ } } rowsQueued--; notify(); // notify push's wait if (pendingQueue.size() == 0) { return null; } else { return (TriggerData) pendingQueue.removeFirst(); } } /** * The main thread tells the trigger thread to fire by this call. * If this Trigger is not threaded then the fire method is caled * immediately and executed by the main thread. Otherwise, the row * data objects are added to the queue to be used by the Trigger thread. * * @param row1 * @param row2 */ synchronized void pushPair(Session session, Object[] row1, Object[] row2) { if (maxRowsQueued == 0) { trigger.fire(vectorIndex, name.name, table.getName().name, row1, row2); return; } if (rowsQueued >= maxRowsQueued) { if (nowait) { pendingQueue.removeLast(); // overwrite last } else { try { wait(); } catch (InterruptedException e) { /* ignore and resume */ } rowsQueued++; } } else { rowsQueued++; } pendingQueue.add(new TriggerData(session, row1, row2)); notify(); // notify pop's wait } /** * Method declaration * * @return */ public boolean isBusy() { return rowsQueued != 0; } /** * Method declaration * * @return */ public boolean isValid() { return valid; } /** * Class to store the data used to fire a trigger. The username attribute * is not used but it allows developers to change the signature of the * fire method of the Trigger class and pass the user name to the Trigger. */ class TriggerData { public Object[] oldRow; public Object[] newRow; public String username; public TriggerData(Session session, Object[] oldRow, Object[] newRow) { this.oldRow = oldRow; this.newRow = newRow; this.username = session.getUsername(); } } static class DefaultTrigger implements org.hsqldb.Trigger { public void fire(int i, String name, String table, Object[] row1, Object[] row2) { throw new RuntimeException("Missing Trigger class!"); } } } hsqldb-1.8.0.10.orig/src/org/hsqldb/Library.java0000644000175000017500000023350310456536715017743 0ustar renerene/* Copyright (c) 1995-2000, The Hypersonic SQL Group. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the Hypersonic SQL Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE HYPERSONIC SQL GROUP, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * This software consists of voluntary contributions made by many individuals * on behalf of the Hypersonic SQL Group. * * * For work added by the HSQL Development Group: * * Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb; import java.sql.Connection; import java.sql.Date; import java.sql.Time; import java.sql.Timestamp; import java.text.FieldPosition; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Locale; import java.util.Random; import org.hsqldb.lib.HashMap; import org.hsqldb.lib.IntValueHashMap; import org.hsqldb.persist.HsqlDatabaseProperties; import org.hsqldb.store.ValuePool; // fredt@users 20020210 - patch 513005 by sqlbob@users (RMP) - ABS function // fredt@users 20020305 - patch 1.7.0 - change to 2D string arrays // sqlbob@users 20020420- patch 1.7.0 - added HEXTORAW and RAWTOHEX. // boucherb@user 20020918 - doc 1.7.2 - added JavaDoc and code comments // fredt@user 20021021 - doc 1.7.2 - modified JavaDoc // boucherb@users 20030201 - patch 1.7.2 - direct calls for org.hsqldb.Library // fredt@users - patch 1.8.0 - new functions added /** * fredt - todo - since the introduction of SQL built-in functions and * evaluation of several session-dependent methods outside this class, * several methods here are dummies. These methods are still reported in * system tables incorrectly as corresponding to the SQL function names. */ /** * Provides the HSQLDB implementation of standard Open Group SQL CLI * Extended Scalar Functions and other public HSQLDB SQL functions.

    * * All methods here that have a Connection parameter are dummies and should * not be called from user supplied Java procedure or trigger code. Use real * SQL functions should be called instead in these instances. * * Extensively rewritten and extended in successive versions of HSQLDB. * * @author Thomas Mueller (Hypersonic SQL Group) * @version 1.8.0 * @since Hypersonic SQL */ public class Library { static final SimpleDateFormat tocharFormat = new SimpleDateFormat(); static final SimpleDateFormat daynameFormat = new SimpleDateFormat("EEEE", Locale.ENGLISH); static final SimpleDateFormat monthnameFormat = new SimpleDateFormat("MMMM", Locale.ENGLISH); static final StringBuffer daynameBuffer = new StringBuffer(); static final StringBuffer monthnameBuffer = new StringBuffer(); static final FieldPosition monthPosition = new FieldPosition(SimpleDateFormat.MONTH_FIELD); static final FieldPosition dayPosition = new FieldPosition(SimpleDateFormat.DAY_OF_WEEK_FIELD); public static final String[][] sNumeric = { { "ABS", "org.hsqldb.Library.abs" }, { "ACOS", "java.lang.Math.acos" }, { "ASIN", "java.lang.Math.asin" }, { "ATAN", "java.lang.Math.atan" }, { "ATAN2", "java.lang.Math.atan2" }, { "CEILING", "java.lang.Math.ceil" }, { "COS", "java.lang.Math.cos" }, { "COT", "org.hsqldb.Library.cot" }, { "DEGREES", "java.lang.Math.toDegrees" }, { "EXP", "java.lang.Math.exp" }, { "FLOOR", "java.lang.Math.floor" }, { "LOG", "java.lang.Math.log" }, { "LOG10", "org.hsqldb.Library.log10" }, { "MOD", "org.hsqldb.Library.mod" }, { "PI", "org.hsqldb.Library.pi" }, { "POWER", "java.lang.Math.pow" }, { "RADIANS", "java.lang.Math.toRadians" }, { "RAND", "java.lang.Math.random" }, { "ROUND", "org.hsqldb.Library.round" }, { "SIGN", "org.hsqldb.Library.sign" }, { "SIN", "java.lang.Math.sin" }, { "SQRT", "java.lang.Math.sqrt" }, { "TAN", "java.lang.Math.tan" }, { "TRUNCATE", "org.hsqldb.Library.truncate" }, { "BITAND", "org.hsqldb.Library.bitand" }, { "BITOR", "org.hsqldb.Library.bitor" }, { "BITXOR", "org.hsqldb.Library.bitxor" }, { "ROUNDMAGIC", "org.hsqldb.Library.roundMagic" } }; // fredt@users 20010701 - patch 418023 by deforest@users // the definition for SUBSTR was added public static final String[][] sString = { { "ASCII", "org.hsqldb.Library.ascii" }, { "BIT_LENGTH", "org.hsqldb.Library.bitLength" }, { "CHAR", "org.hsqldb.Library.character" }, { "CHAR_LENGTH", "org.hsqldb.Library.length" }, { "CHARACTER_LENGTH", "org.hsqldb.Library.length" }, { "CONCAT", "org.hsqldb.Library.concat" }, { "DIFFERENCE", "org.hsqldb.Library.difference" }, { "HEXTORAW", "org.hsqldb.Library.hexToRaw" }, { "INSERT", "org.hsqldb.Library.insert" }, { "LCASE", "org.hsqldb.Library.lcase" }, { "LEFT", "org.hsqldb.Library.left" }, { "LENGTH", "org.hsqldb.Library.length" }, { "LOCATE", "org.hsqldb.Library.locate" }, { "LTRIM", "org.hsqldb.Library.ltrim" }, { "OCTET_LENGTH", "org.hsqldb.Library.octetLength" }, { "RAWTOHEX", "org.hsqldb.Library.rawToHex" }, { "REPEAT", "org.hsqldb.Library.repeat" }, { "REPLACE", "org.hsqldb.Library.replace" }, { "RIGHT", "org.hsqldb.Library.right" }, { "RTRIM", "org.hsqldb.Library.rtrim" }, { "SOUNDEX", "org.hsqldb.Library.soundex" }, { "SPACE", "org.hsqldb.Library.space" }, { "SUBSTR", "org.hsqldb.Library.substring" }, { "SUBSTRING", "org.hsqldb.Library.substring" }, { "UCASE", "org.hsqldb.Library.ucase" }, { "LOWER", "org.hsqldb.Library.lcase" }, { "UPPER", "org.hsqldb.Library.ucase" } }; public static final String[][] sTimeDate = { { "CURDATE", "org.hsqldb.Library.curdate" }, { "CURTIME", "org.hsqldb.Library.curtime" }, { "DATEDIFF", "org.hsqldb.Library.datediff" }, { "DAYNAME", "org.hsqldb.Library.dayname" }, { "DAY", "org.hsqldb.Library.dayofmonth" }, { "DAYOFMONTH", "org.hsqldb.Library.dayofmonth" }, { "DAYOFWEEK", "org.hsqldb.Library.dayofweek" }, { "DAYOFYEAR", "org.hsqldb.Library.dayofyear" }, { "HOUR", "org.hsqldb.Library.hour" }, { "MINUTE", "org.hsqldb.Library.minute" }, { "MONTH", "org.hsqldb.Library.month" }, { "MONTHNAME", "org.hsqldb.Library.monthname" }, { "NOW", "org.hsqldb.Library.now" }, { "QUARTER", "org.hsqldb.Library.quarter" }, { "SECOND", "org.hsqldb.Library.second" }, { "WEEK", "org.hsqldb.Library.week" }, { "YEAR", "org.hsqldb.Library.year" }, { "TO_CHAR", "org.hsqldb.Library.to_char" } }; public static final String[][] sSystem = { { "DATABASE", "org.hsqldb.Library.database" }, { "USER", "org.hsqldb.Library.user" }, { "IDENTITY", "org.hsqldb.Library.identity" } }; private Library() {} static HashMap getAliasMap() { HashMap h = new HashMap(83, 1); register(h, sNumeric); register(h, sString); register(h, sTimeDate); register(h, sSystem); return h; } private static void register(HashMap h, String[][] s) { for (int i = 0; i < s.length; i++) { h.put(s[i][0], s[i][1]); } } private static final Random rRandom = new Random(); // NUMERIC FUNCTIONS // fredt@users 20020220 - patch 489184 by xclayl@users - thread safety /** * Returns the next pseudorandom, uniformly distributed double value * between 0.0 and 1.0 from a single, system-wide random number generator's * sequence, optionally re-seeding (and thus resetting) the generator sequence. * * If the seed value is null, then the underlying random number * generator retrieves the next value in its current sequence, else the seed * alters the state of the generator object so as to be in exactly the same state * as if it had just been created with the seed value. * @param seed an optional parameter with which to reseed the underlying * pseudorandom number generator * @return the next pseudorandom, uniformly distributed double value between * 0.0 and 1.0 */ public static double rand(Integer seed) { // boucherb@users 20020918 // CHECKME: perhaps rRandom should be a member of Session, // since otherwise connections are *not* guranteed to get the // same pseudorandom sequence, given the same set of calls to this // SQL function. This makes comparitive analysis difficult. // In fact, rRandom will be shared across multiple in-process // database instances, so it is not even guaranteed that the // sole connection to one instance will get the same sequence given // the same set of calls to this SQL function. synchronized (rRandom) { if (seed != null) { rRandom.setSeed(seed.intValue()); } return rRandom.nextDouble(); } } /** * Returns the absolute value of the given double value. * @param d the number for which to determine the absolute value * @return the absolute value of d, as a double */ public static double abs(double d) { return Math.abs(d); } // this magic number works for 100000000000000; but not for 0.1 and 0.01 private static final double LOG10_FACTOR = 0.43429448190325183; /** * Returns the base 10 logarithm of the given double value. * @param x the value for which to calculate the base 10 logarithm * @return the base 10 logarithm of x, as a double */ public static double log10(double x) { return roundMagic(Math.log(x) * LOG10_FACTOR); } /** * Retrieves a magically rounded double value produced * from the given double value. This method provides special * handling for numbers close to zero and performs rounding only for * numbers within a specific range, returning precisely the given value * if it does not lie in this range.

    * * Special handling includes:

    * *

      *
    • input in the interval -0.0000000000001..0.0000000000001 returns 0.0 *
    • input outside the interval -1000000000000..1000000000000 returns * input unchanged *
    • input is converted to String form *
    • input with a String form length greater than 16 returns * input unchaged *
    • String form with last four characters of '...000x' where * x != '.' is converted to '...0000' *
    • String form with last four characters of '...9999' is * converted to '...999999' *
    • the java.lang.Double.doubleValue of the String * form is returned *
    * @param d the double value for which to retrieve the magically * rounded value * @return the magically rounded value produced */ public static double roundMagic(double d) { // this function rounds numbers in a good way but slow: // - special handling for numbers around 0 // - only numbers <= +/-1000000000000 // - convert to a string // - check the last 4 characters: // '000x' becomes '0000' // '999x' becomes '999999' (this is rounded automatically) if ((d < 0.0000000000001) && (d > -0.0000000000001)) { return 0.0; } if ((d > 1000000000000.) || (d < -1000000000000.)) { return d; } StringBuffer s = new StringBuffer(); s.append(d); int len = s.length(); if (len < 16) { return d; } char cx = s.charAt(len - 1); char c1 = s.charAt(len - 2); char c2 = s.charAt(len - 3); char c3 = s.charAt(len - 4); if ((c1 == '0') && (c2 == '0') && (c3 == '0') && (cx != '.')) { s.setCharAt(len - 1, '0'); } else if ((c1 == '9') && (c2 == '9') && (c3 == '9') && (cx != '.')) { s.setCharAt(len - 1, '9'); s.append('9'); s.append('9'); } return Double.valueOf(s.toString()).doubleValue(); } /** * Returns the cotangent of the given double value * expressed in radians. * @param d the angle, expressed in radians * @return the cotangent */ public static double cot(double d) { return 1. / Math.tan(d); } /** * Returns the remainder (modulus) of the first given integer divided * by the second.

    * * @param i1 the numerator * @param i2 the divisor * @return i1 % i2, as an int */ public static int mod(int i1, int i2) { return i1 % i2; } /** * Returns the constant value, pi. * @return pi as a double value */ public static double pi() { return Math.PI; } /** * Returns the given double value, rounded to the given * int places right of the decimal point. If * the supplied rounding place value is negative, rounding is performed * to the left of the decimal point, using its magnitude (absolute value). * @param d the value to be rounded * @param p the rounding place value * @return d rounded */ public static double round(double d, int p) { double f = Math.pow(10., p); return Math.round(d * f) / f; } /** * Returns an indicator of the sign of the given double * value. If the value is less than zero, -1 is returned. If the value * equals zero, 0 is returned. If the value is greater than zero, 1 is * returned. * @param d the value * @return the sign of d */ public static int sign(double d) { return (d < 0) ? -1 : ((d > 0) ? 1 : 0); } /** * Returns the given double value, truncated to * the given int places right of the decimal point. * If the given place value is negative, the given double * value is truncated to the left of the decimal point, using the * magnitude (aboslute value) of the place value. * @param d the value to truncate * @param p the places left or right of the decimal point at which to * truncate * @return d, truncated */ public static double truncate(double d, int p) { double f = Math.pow(10., p); double g = d * f; return ((d < 0) ? Math.ceil(g) : Math.floor(g)) / f; } /** * Returns the bit-wise logical and of the given * integer values. * @param i the first value * @param j the second value * @return the bit-wise logical and of * i and j */ public static int bitand(int i, int j) { return i & j; } /** * Returns the bit-wise logical or of the given * integer values. * * @param i the first value * @param j the second value * @return the bit-wise logical or of * i and j */ public static int bitor(int i, int j) { return i | j; } /** * Returns the bit-wise logical xor of the given * integer values. * * @param i the first value * @param j the second value * @return the bit-wise logical xor of * i and j * * @since 1.8.0 */ public static int bitxor(int i, int j) { return i ^ j; } // STRING FUNCTIONS /** * Returns the Unicode code value of the leftmost character of * s as an int. This is the same as the * ASCII value if the string contains only ASCII characters. * @param s the String to evaluate * @return the integer Unicode value of the * leftmost character */ public static Integer ascii(String s) { if ((s == null) || (s.length() == 0)) { return null; } return ValuePool.getInt(s.charAt(0)); } /** * Returns the character string corresponding to the given ASCII * (or Unicode) value. * * Note:

    * * In some SQL CLI * implementations, a null is returned if the range is outside 0..255. * In HSQLDB, the corresponding Unicode character is returned * unchecked. * @param code the character code for which to return a String * representation * @return the String representation of the character */ public static String character(int code) { return String.valueOf((char) code); } /** * Returns a String object that is the result of an * concatenation of the given String objects.

    * * When only one string is NULL, the result is different from that * returned by an (string1 || string2) expression: * *

      *
    • if both String objects are null, return * null *
    • if only one string is null, return the other *
    • if both String objects are non-null, return as a * String object the character sequence obtained by listing, * in left to right order, the characters of the first string followed by * the characters of the second *
    * @param s1 the first String * @param s2 the second String * @return s1 concatentated with s2 */ public static String concat(String s1, String s2) { if (s1 == null) { if (s2 == null) { return null; } return s2; } if (s2 == null) { return s1; } return s1.concat(s2); } /** * Returns a count of the characters that do not match when comparing * the 4 digit numeric SOUNDEX character sequences for the * given String objects. If either String object is * null, zero is returned. * @param s1 the first String * @param s2 the second String * @return the number of differences between the SOUNDEX of * s1 and the SOUNDEX of s2 */ // fredt@users 20020305 - patch 460907 by fredt - soundex public static int difference(String s1, String s2) { // todo: check if this is the standard algorithm if ((s1 == null) || (s2 == null)) { return 0; } s1 = soundex(s1); s2 = soundex(s2); int e = 0; for (int i = 0; i < 4; i++) { if (s1.charAt(i) != s2.charAt(i)) { e++; } } return e; } /** * Converts a String of hexidecimal digit characters to a raw * binary value, represented as a String.

    * * The given String object must consist of a sequence of * 4 digit hexidecimal character substrings.

    If its length is not * evenly divisible by 4, null is returned. If any of * its 4 character subsequences cannot be parsed as a * 4 digit, base 16 value, then a NumberFormatException is thrown. * * This conversion has the effect of reducing the character count 4:1. * * @param s a String of hexidecimal digit characters * @return an equivalent raw binary value, represented as a * String */ public static String hexToRaw(String s) { if (s == null) { return null; } char raw; StringBuffer to = new StringBuffer(); int len = s.length(); if (len % 4 != 0) { return null; } for (int i = 0; i < len; i += 4) { raw = (char) Integer.parseInt(s.substring(i, i + 4), 16); to.append(raw); } return (to.toString()); } /** * Returns a character sequence which is the result of writing the * first length number of characters from the second * given String over the first string. The start position * in the first string where the characters are overwritten is given by * start.

    * * Note: In order of precedence, boundry conditions are handled as * follows:

    * *

      *
    • if either supplied String is null, then the other is * returned; the check starts with the first given String. *
    • if start is less than one, s1 is returned *
    • if length is less than or equal to zero, * s1 is returned *
    • if the length of s2 is zero, s1 is returned *
    • if start is greater than the length of s1, * s1 is returned *
    • if length is such that, taken together with * start, the indicated interval extends * beyond the end of s1, then the insertion is performed * precisely as if upon a copy of s1 extended in length * to just include the indicated interval *
    * @param s1 the String into which to insert s2 * @param start the position, with origin one, at which to start the insertion * @param length the number of characters in s1 to replace * @param s2 the String to insert into s1 * @return s2 inserted into s1, as indicated * by start and length and adjusted for * boundry conditions */ public static String insert(String s1, int start, int length, String s2) { if (s1 == null) { return s2; } if (s2 == null) { return s1; } int len1 = s1.length(); int len2 = s2.length(); start--; if (start < 0 || length <= 0 || len2 == 0 || start > len1) { return s1; } if (start + length > len1) { length = len1 - start; } return s1.substring(0, start) + s2 + s1.substring(start + length); } /** * Returns a copy of the given String, with all upper case * characters converted to lower case. This uses the default Java String * conversion. * @param s the String from which to produce a lower case * version * @return a lower case version of s */ public static String lcase(String s) { return (s == null) ? null : s.toLowerCase(); } /** * Returns the leftmost count characters from the given * String.

    * * Note: boundry conditions are handled in the following order of * precedence: * *

      *
    • if s is null, then null * is returned *
    • if count is less than 1, then a zero-length * String is returned *
    • if count is greater than the length of s, * then a copy of s is returned *
    * @param s the String from which to retrieve the leftmost * characters * @param count the count of leftmost characters to retrieve * @return the leftmost count characters of s */ public static String left(String s, int count) { if (s == null) { return null; } return s.substring(0, ((count < 0) ? 0 : (count < s.length()) ? count : s.length())); } // fredt@users - 20020819 - patch 595854 by thomasm@users /** * Returns the number of characters in the given String. * This includes trailing blanks. * * @param s the String for which to determine length * @return the length of s, including trailing blanks */ public static Integer length(String s) { return s == null ? null : ValuePool.getInt(s.length()); } /** * Returns the number of bytes in the given String. * This includes trailing blanks. * * @param s the String for which to determine the octet length * @return the octet length of s, including trailing blanks * @since 1.7.2 */ public static Integer octetLength(String s) { return s == null ? null : ValuePool.getInt(s.length() * 2); } /** * Returns the number of bits in the given String. * This includes trailing blanks. * * @param s the String for which to determine the bit length * @return the bit length of s, including trailing blanks * @since 1.7.2 */ public static Integer bitLength(String s) { return s == null ? null : ValuePool.getInt(s.length() * 16); } /** * Returns the starting position of the first occurrence of * the given search String object within * the given String object, s. * * The search for the first occurrence of search begins with * the first character position in s, unless the optional * argument, start, is specified (non-null). If * start is specified, the search begins with the character * position indicated by the value of start, where the * first character position in s is indicated by the value 1. * If search is not found within s, the * value 0 is returned. * @param search the String occurence to find in s * @param s the String within which to find the first * occurence of search * @param start the optional character position from which to start * looking in s * @return the one-based starting position of the first occurrence of * search within s, or 0 if not found */ public static int locate(String search, String s, Integer start) { if (s == null || search == null) { return 0; } int i = (start == null) ? 0 : start.intValue() - 1; return s.indexOf(search, (i < 0) ? 0 : i) + 1; } /** * As locate but from start position l.

    * * @param search the String occurence to find in s * @param s the String within which to find the first * occurence of search * @return the one-based starting position of the first occurrence of * search within s, or 0 if not found */ public static int position(String search, String s) { return locate(search, s, null); } /** * Returns the characters of the given String, with the * leading spaces removed. Characters such as TAB are not removed. * * @param s the String from which to remove the leading blanks * @return the characters of the given String, with the leading * spaces removed */ public static String ltrim(String s) { if (s == null) { return s; } int len = s.length(), i = 0; while (i < len && s.charAt(i) <= ' ') { i++; } return (i == 0) ? s : s.substring(i); } /** * Converts a raw binary value, as represented by the given * String, to the equivalent String * of hexidecimal digit characters.

    * * This conversion has the effect of expanding the character count 1:4. * * @param s the raw binary value, as a String * @return an equivalent String of hexidecimal digit characters */ public static String rawToHex(String s) { if (s == null) { return null; } char[] from = s.toCharArray(); String hex; StringBuffer to = new StringBuffer(4 * s.length()); for (int i = 0; i < from.length; i++) { hex = Integer.toHexString(from[i] & 0xffff); for (int j = hex.length(); j < 4; j++) { to.append('0'); } to.append(hex); } return (to.toString()); } /** * Returns a String composed of the given String, * repeated count times. * * @param s the String to repeat * @param count the number of repetitions * @return the given String, repeated count times */ public static String repeat(String s, Integer count) { if (s == null || count == null || count.intValue() < 0) { return null; } int i = count.intValue(); StringBuffer b = new StringBuffer(s.length() * i); while (i-- > 0) { b.append(s); } return b.toString(); } // fredt@users - 20020903 - patch 1.7.1 - bug fix to allow multiple replaces /** * Replaces all occurrences of replace in s * with the String object: with * @param s the target for replacement * @param replace the substring(s), if any, in s to replace * @param with the value to substitute for replace * @return s, with all occurences of replace * replaced by with */ public static String replace(String s, String replace, String with) { if (s == null || replace == null) { return s; } if (with == null) { with = ""; } StringBuffer b = new StringBuffer(); int start = 0; int lenreplace = replace.length(); while (true) { int i = s.indexOf(replace, start); if (i == -1) { b.append(s.substring(start)); break; } b.append(s.substring(start, i)); b.append(with); start = i + lenreplace; } return b.toString(); } /** * Returns the rightmost count characters of the given * String, s.

    * * Note: boundry conditions are handled in the following order of * precedence:

    * *

      *
    • if s is null, null is returned *
    • if count is less than one, a zero-length * String is returned *
    • if count is greater than the length of s, * a copy of s is returned *
    * @param s the String from which to retrieve the rightmost * count characters * @param count the number of rightmost characters to retrieve * @return the rightmost count characters of s */ public static String right(String s, int count) { if (s == null) { return null; } count = s.length() - count; return s.substring((count < 0) ? 0 : (count < s.length()) ? count : s.length()); } // fredt@users 20020530 - patch 1.7.0 fredt - trim only the space character /** * Returns the characters of the given String, with trailing * spaces removed. * @param s the String from which to remove the trailing blanks * @return the characters of the given String, with the * trailing spaces removed */ public static String rtrim(String s) { if (s == null) { return s; } int endindex = s.length() - 1; int i = endindex; for (; i >= 0 && s.charAt(i) == ' '; i--) {} return i == endindex ? s : s.substring(0, i + 1); } /** * Returns the character sequence s, with the leading, * trailing or both the leading and trailing occurences of the first * character of the character sequence trimstr removed.

    * * This method is in support of the standard SQL String function TRIM. * Ordinarily, the functionality of this method is accessed from SQL using * the following syntax:

    * *

         * <trim function> ::= TRIM <left paren> <trim operands> <right paren>
         * <trim operands> ::= [ [ <trim specification> ] [ <trim character> ] FROM ] <trim source>
         * <trim source> ::= <character value expression>
         * <trim specification> ::= LEADING | TRAILING | BOTH
         * <trim character> ::= <character value expression>
         * 
    * * @param s the string to trim * @param trimstr the character whose occurences will be removed * @param leading if true, remove leading occurences * @param trailing if true, remove trailing occurences * @return s, with the leading, trailing or both the leading and trailing * occurences of the first character of trimstr removed * @since 1.7.2 */ public static String trim(String s, String trimstr, boolean leading, boolean trailing) { if (s == null) { return s; } int trim = trimstr.charAt(0); int endindex = s.length(); if (trailing) { for (--endindex; endindex >= 0 && s.charAt(endindex) == trim; endindex--) {} endindex++; } if (endindex == 0) { return ""; } int startindex = 0; if (leading) { while (startindex < endindex && s.charAt(startindex) == trim) { startindex++; } } if (startindex == 0 && endindex == s.length()) { return s; } else { return s.substring(startindex, endindex); } } // fredt@users 20011010 - patch 460907 by fredt - soundex /** * Returns a four character code representing the sound of the given * String. Non-ASCCI characters in the * input String are ignored.

    * * This method was * rewritten for HSQLDB by fredt@users to comply with the description at * * http://www.nara.gov/genealogy/coding.html.

    * @param s the String for which to calculate the 4 character * SOUNDEX value * @return the 4 character SOUNDEX value for the given * String */ public static String soundex(String s) { if (s == null) { return s; } s = s.toUpperCase(Locale.ENGLISH); int len = s.length(); char[] b = new char[] { '0', '0', '0', '0' }; char lastdigit = '0'; for (int i = 0, j = 0; i < len && j < 4; i++) { char c = s.charAt(i); char newdigit; if ("AEIOUY".indexOf(c) != -1) { newdigit = '7'; } else if (c == 'H' || c == 'W') { newdigit = '8'; } else if ("BFPV".indexOf(c) != -1) { newdigit = '1'; } else if ("CGJKQSXZ".indexOf(c) != -1) { newdigit = '2'; } else if (c == 'D' || c == 'T') { newdigit = '3'; } else if (c == 'L') { newdigit = '4'; } else if (c == 'M' || c == 'N') { newdigit = '5'; } else if (c == 'R') { newdigit = '6'; } else { continue; } if (j == 0) { b[j++] = c; lastdigit = newdigit; } else if (newdigit <= '6') { if (newdigit != lastdigit) { b[j++] = newdigit; lastdigit = newdigit; } } else if (newdigit == '7') { lastdigit = newdigit; } } return new String(b, 0, 4); } /** * Returns a String consisting of count spaces, or * null if count is less than zero.

    * * @param count the number of spaces to produce * @return a String of count spaces */ public static String space(int count) { if (count < 0) { return null; } char[] c = new char[count]; while (count > 0) { c[--count] = ' '; } return new String(c); } /** * Returns the characters from the given String, starting at * the indicated one-based start position and extending the * (optional) indicated length. If length is not * specified (is null), the remainder of s is * implied. * * The rules for boundary conditions on s, start and length are, * in order of precedence:

    * * 1.) if s is null, return null * * 2.) If length is less than 1, return null. * * 3.) If start is 0, it is treated as 1. * * 4.) If start is positive, count from the beginning of s to find * the first character postion. * * 5.) If start is negative, count backwards from the end of s * to find the first character. * * 6.) If, after applying 2.) or 3.), the start position lies outside s, * then return null * * 7.) if length is ommited or is greated than the number of characters * from the start position to the end of s, return the remaineder of s, * starting with the start position. * * @param s the String from which to produce the indicated * substring * @param start the starting position of the desired substring * @param length the length of the desired substring * @return the indicted substring of s. */ // fredt@users 20020210 - patch 500767 by adjbirch@users - modified // boucherb@users 20050205 - patch to correct bug 1107477 public static String substring(final String s, int start, final Integer length) { if (s == null) { return null; } int sl = s.length(); int ol = (length == null) ? sl : length.intValue(); if (ol < 1) { return null; } if (start < 0) { start = sl + start; } else if (start > 0) { start--; } if (start < 0 || start >= sl) { return null; } else if (start > sl - ol) { ol = sl - start; } return s.substring(start, start + ol); } /** * Returns a copy of the given String, with all lower case * characters converted to upper case using the default Java method. * @param s the String from which to produce an upper case * version * @return an upper case version of s */ public static String ucase(String s) { return (s == null) ? null : s.toUpperCase(); } // TIME AND DATE /** * Returns the current date as a date value.

    * * Dummy mehtod.

    * * @return a date value representing the current date */ public static Date curdate(Connection c) { return null; } /** * Returns the current local time as a time value.

    * * Dummy mehtod.

    * * @return a time value representing the current local time */ public static Time curtime(Connection c) { return null; } /** * Returns a character string containing the name of the day * (Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday ) * for the day portion of the given java.sql.Date. * @param d the date value from which to extract the day name * @return the name of the day corresponding to the given * java.sql.Date */ public static String dayname(Date d) { if (d == null) { return null; } synchronized (daynameBuffer) { daynameBuffer.setLength(0); return daynameFormat.format(d, daynameBuffer, dayPosition).toString(); } } /** * Returns the day of the month from the given date value, as an integer * value in the range of 1-31. * * @param d the date value from which to extract the day of month * @return the day of the month from the given date value */ public static Integer dayofmonth(Date d) { if (d == null) { return null; } return ValuePool.getInt(HsqlDateTime.getDateTimePart(d, Calendar.DAY_OF_MONTH)); } /** * Returns the day of the week from the given date value, as an integer * value in the range 1-7, where 1 represents Sunday. * * @param d the date value from which to extract the day of week * @return the day of the week from the given date value */ public static Integer dayofweek(Date d) { if (d == null) { return null; } return ValuePool.getInt(HsqlDateTime.getDateTimePart(d, Calendar.DAY_OF_WEEK)); } /** * Returns the day of the year from the given date value, as an integer * value in the range 1-366. * * @param d the date value from which to extract the day of year * @return the day of the year from the given date value */ public static Integer dayofyear(Date d) { if (d == null) { return null; } return ValuePool.getInt(HsqlDateTime.getDateTimePart(d, Calendar.DAY_OF_YEAR)); } /** * Returns the hour from the given time value, as an integer value in * the range of 0-23. * * @param t the time value from which to extract the hour of day * @return the hour of day from the given time value */ // fredt@users 20020210 - patch 513005 by sqlbob@users (RMP) - hour public static Integer hour(Time t) { if (t == null) { return null; } return ValuePool.getInt(HsqlDateTime.getDateTimePart(t, Calendar.HOUR_OF_DAY)); } /** * Returns the minute from the given time value, as integer value in * the range of 0-59. * * @param t the time value from which to extract the minute value * @return the minute value from the given time value */ public static Integer minute(Time t) { if (t == null) { return null; } return ValuePool.getInt(HsqlDateTime.getDateTimePart(t, Calendar.MINUTE)); } /** * Returns the month from the given date value, as an integer value in the * range of 1-12.

    * * The sql_month database property is now obsolete. * The function always returns the SQL (1-12) value for month. * * @param d the date value from which to extract the month value * @return the month value from the given date value */ public static Integer month(Date d) { if (d == null) { return null; } return ValuePool.getInt( HsqlDateTime.getDateTimePart(d, Calendar.MONTH) + 1); } /** * Returns a character string containing the name of month * (January, February, March, April, May, June, July, August, * September, October, November, December) for the month portion of * the given date value. * * @param d the date value from which to extract the month name * @return a String representing the month name from the given date value */ public static String monthname(Date d) { if (d == null) { return null; } synchronized (monthnameBuffer) { monthnameBuffer.setLength(0); return monthnameFormat.format(d, monthnameBuffer, monthPosition).toString(); } } /** * Returns the current date and time as a timestamp value.

    * * Dummy mehtod.

    * * @return a timestamp value representing the current date and time */ public static Timestamp now(Connection c) { return null; } /** * Returns the quarter of the year in the given date value, as an integer * value in the range of 1-4.

    * * @param d the date value from which to extract the quarter of the year * @return an integer representing the quater of the year from the given * date value */ public static Integer quarter(Date d) { if (d == null) { return null; } return ValuePool.getInt( (HsqlDateTime.getDateTimePart(d, Calendar.MONTH) / 3) + 1); } /** * Returns the second of the given time value, as an integer value in * the range of 0-59. * * @param d the date value from which to extract the second of the hour * @return an integer representing the second of the hour from the * given time value */ public static Integer second(Time d) { if (d == null) { return null; } return ValuePool.getInt(HsqlDateTime.getDateTimePart(d, Calendar.SECOND)); } /** * Returns the week of the year from the given date value, as an integer * value in the range of 1-53.

    * * @param d the date value from which to extract the week of the year * @return an integer representing the week of the year from the given * date value */ public static Integer week(Date d) { if (d == null) { return null; } return ValuePool.getInt(HsqlDateTime.getDateTimePart(d, Calendar.WEEK_OF_YEAR)); } /** * Returns the year from the given date value, as an integer value in * the range of 1-9999.

    * * @param d the date value from which to extract the year * @return an integer value representing the year from the given * date value */ public static Integer year(Date d) { if (d == null) { return null; } return ValuePool.getInt(HsqlDateTime.getDateTimePart(d, Calendar.YEAR)); } /** * @since 1.8.0 */ public static String to_char(java.util.Date d, String format) { if (d == null || format == null) { return null; } synchronized (tocharFormat) { tocharFormat.applyPattern(HsqlDateTime.toJavaDatePattern(format)); return tocharFormat.format(d); } } // date calculations. /** * Returns the number of units elapsed between two dates.

    * The datapart parameter indicates the part to be used for computing the * difference. Supported types include: 'year', 'yy', 'month', 'mm' * 'day', 'dd', 'hour', 'hh', 'minute', 'mi', 'second', 'ss', 'millisecond', * 'ms'. * * Contributed by Michael Landon

    * * @param datepart Specifies the unit in which the interval is to be measured. * @param d1 The starting datetime value for the interval. This value is * subtracted from d2 to return the number of * date-parts between the two arguments. * @param d2 The ending datetime for the interval. d1 is subtracted * from this value to return the number of date-parts * between the two arguments. * * since 1.7.3 */ public static Long datediff(String datepart, Timestamp d1, Timestamp d2) throws HsqlException { // make sure we've got valid data if (d1 == null || d2 == null) { return null; } if ("yy".equalsIgnoreCase(datepart) || "year".equalsIgnoreCase(datepart)) { return ValuePool.getLong(getElapsed(Calendar.YEAR, d1, d2)); } else if ("mm".equalsIgnoreCase(datepart) || "month".equalsIgnoreCase(datepart)) { return ValuePool.getLong(getElapsed(Calendar.MONTH, d1, d2)); } else if ("dd".equalsIgnoreCase(datepart) || "day".equalsIgnoreCase(datepart)) { return ValuePool.getLong(getElapsed(Calendar.DATE, d1, d2)); } else if ("hh".equalsIgnoreCase(datepart) || "hour".equalsIgnoreCase(datepart)) { return ValuePool.getLong(getElapsed(Calendar.HOUR, d1, d2)); } else if ("mi".equalsIgnoreCase(datepart) || "minute".equalsIgnoreCase(datepart)) { return ValuePool.getLong(getElapsed(Calendar.MINUTE, d1, d2)); } else if ("ss".equalsIgnoreCase(datepart) || "second".equalsIgnoreCase(datepart)) { return ValuePool.getLong(getElapsed(Calendar.SECOND, d1, d2)); } else if ("ms".equalsIgnoreCase(datepart) || "millisecond".equalsIgnoreCase(datepart)) { return ValuePool.getLong(getElapsed(Calendar.MILLISECOND, d1, d2)); } else { throw Trace.error(Trace.INVALID_CONVERSION); } } /** * Private method used to do actual calculation units elapsed between * two given dates.

    * * @param field Calendar field to use to calculate elapsed time * @param d1 The starting date for the interval. This value is * subtracted from d2 to return the number of * date-parts between the two arguments. * @param d2 The ending date for the interval. d1 is subtracted * from this value to return the number of date-parts * between the two arguments. */ private static long getElapsed(int field, java.util.Date d1, java.util.Date d2) { // can we do this very simply? if (field == Calendar.MILLISECOND) { return d2.getTime() - d1.getTime(); } // ok, let's work a little harder: Calendar g1 = Calendar.getInstance(), g2 = Calendar.getInstance(); g1.setTime(d1); g2.setTime(d2); g1.set(Calendar.MILLISECOND, 0); g2.set(Calendar.MILLISECOND, 0); if (field == Calendar.SECOND) { return (g2.getTime().getTime() - g1.getTime().getTime()) / 1000; } g1.set(Calendar.SECOND, 0); g2.set(Calendar.SECOND, 0); if (field == Calendar.MINUTE) { return (g2.getTime().getTime() - g1.getTime().getTime()) / (1000 * 60); } g1.set(Calendar.MINUTE, 0); g2.set(Calendar.MINUTE, 0); if (field == Calendar.HOUR) { return (g2.getTime().getTime() - g1.getTime().getTime()) / (1000 * 60 * 60); } // end if-else // if we got here, then we really need to work: long elapsed = 0; short sign = 1; if (g2.before(g1)) { sign = -1; Calendar tmp = g1; g1 = g2; g2 = tmp; } // end if g1.set(Calendar.HOUR_OF_DAY, 0); g2.set(Calendar.HOUR_OF_DAY, 0); if (field == Calendar.MONTH || field == Calendar.YEAR) { g1.set(Calendar.DATE, 1); g2.set(Calendar.DATE, 1); } if (field == Calendar.YEAR) { g1.set(Calendar.MONTH, 1); g2.set(Calendar.MONTH, 1); } // end if-else // then calculate elapsed units while (g1.before(g2)) { g1.add(field, 1); elapsed++; } return sign * elapsed; } // end getElapsed // SYSTEM /* * All system functions that return Session dependent information are * dummies here. */ /** * Returns the name of the database corresponding to this connection. * * @param conn the connection for which to retrieve the database name * @return the name of the database for the given connection * @throws HsqlException if a database access error occurs */ public static String database(Connection conn) throws HsqlException { return null; } /** * Returns the user's authorization name (the user's name as known to this * database). * * @param conn the connection for which to retrieve the user name * @return the user's name as known to the database * @throws HsqlException if a database access error occurs */ public static String user(Connection conn) throws HsqlException { return null; } /** * Retrieves the last auto-generated integer indentity value * used by this connection.

    * * Dummy mehtod.

    * * @return the connection's the last generated integer identity value * @throws HsqlException if a database access error occurs */ public static int identity() throws HsqlException { return 0; } // JDBC SYSTEM /** * Retrieves the autocommit status of this connection.

    * * @param conn the Connection object for which to retrieve * the current autocommit status * @return a boolean value representing the connection's autocommit status * @since 1.7.0 */ public static boolean getAutoCommit(Connection conn) { return false; } /** * Retrieves the full version number of this database product.

    * * @return database version number as a String object * @since 1.8.0.4 */ public static String getDatabaseFullProductVersion() { return HsqlDatabaseProperties.THIS_FULL_VERSION; } /** * Retrieves the name of this database product.

    * * @return database product name as a String object * @since 1.7.2 */ public static String getDatabaseProductName() { return HsqlDatabaseProperties.PRODUCT_NAME; } /** * Retrieves the version number of this database product.

    * * @return database version number as a String object * @since 1.7.2 */ public static String getDatabaseProductVersion() { return HsqlDatabaseProperties.THIS_VERSION; } /** * Retrieves the major version number of this database.

    * * @return the database's major version as an int value * @since 1.7.2 */ public static int getDatabaseMajorVersion() { return HsqlDatabaseProperties.MAJOR; } /** * Retrieves the major version number of this database.

    * * @return the database's major version as an int value * @since 1.7.2 */ public static int getDatabaseMinorVersion() { return HsqlDatabaseProperties.MINOR; } /** * Retrieves whether this connection is in read-only mode.

    * * Dummy mehtod.

    * * @param conn the Connection object for which to retrieve * the current read-only status * @return true if connection is read-only and * false otherwise * @since 1.7.2 */ public static boolean isReadOnlyConnection(Connection conn) { return false; } /** * Dummy method. Retrieves whether this database is in read-only mode.

    * * @param c the Connection object for which to retrieve * the current database read-only status * @return true if so; false otherwise * @since 1.7.2 */ public static boolean isReadOnlyDatabase(Connection c) { return false; } /** * Retrieves whether the files of this database are in read-only mode.

    * * Dummy mehtod.

    * * @param c the Connection object for which to retrieve * the current database files read-only status * @return true if so; false otherwise * @since 1.7.2 */ public static boolean isReadOnlyDatabaseFiles(Connection c) { return false; } static final int abs = 0; static final int ascii = 1; static final int bitand = 2; static final int bitLength = 3; static final int bitor = 4; static final int bitxor = 5; static final int character = 6; static final int concat = 7; static final int cot = 8; static final int curdate = 9; static final int curtime = 10; static final int database = 11; static final int datediff = 12; static final int day = 13; static final int dayname = 14; static final int dayofmonth = 15; static final int dayofweek = 16; static final int dayofyear = 17; static final int difference = 18; static final int getAutoCommit = 19; static final int getDatabaseFullProductVersion = 20; static final int getDatabaseMajorVersion = 21; static final int getDatabaseMinorVersion = 22; static final int getDatabaseProductName = 23; static final int getDatabaseProductVersion = 24; static final int hexToRaw = 25; static final int hour = 26; static final int identity = 27; static final int insert = 28; static final int isReadOnlyConnection = 29; static final int isReadOnlyDatabase = 30; static final int isReadOnlyDatabaseFiles = 31; static final int lcase = 32; static final int left = 33; static final int length = 34; static final int locate = 35; static final int log10 = 36; static final int ltrim = 37; static final int minute = 38; static final int mod = 39; static final int month = 40; static final int monthname = 41; static final int now = 42; static final int octetLength = 43; static final int pi = 44; static final int position = 45; static final int quarter = 46; static final int rand = 47; static final int rawToHex = 48; static final int repeat = 49; static final int replace = 50; static final int right = 51; static final int round = 52; static final int roundMagic = 53; static final int rtrim = 54; static final int second = 55; static final int sign = 56; static final int soundex = 57; static final int space = 58; static final int substring = 59; static final int to_char = 60; static final int trim = 61; static final int truncate = 62; static final int ucase = 63; static final int user = 64; static final int week = 65; static final int year = 66; /** @todo see bitxor and datediff numbering */ // private static final IntValueHashMap functionMap = new IntValueHashMap(67); static final Double piValue = new Double(Library.pi()); static { functionMap.put("abs", abs); functionMap.put("ascii", ascii); functionMap.put("bitand", bitand); functionMap.put("bitlength", bitLength); functionMap.put("bitor", bitor); functionMap.put("bitxor", bitor); functionMap.put("character", character); functionMap.put("concat", concat); functionMap.put("cot", cot); functionMap.put("curdate", curdate); functionMap.put("curtime", curtime); functionMap.put("database", database); functionMap.put("datediff", datediff); functionMap.put("dayname", dayname); functionMap.put("day", day); functionMap.put("dayofmonth", dayofmonth); functionMap.put("dayofweek", dayofweek); functionMap.put("dayofyear", dayofyear); functionMap.put("difference", difference); functionMap.put("getAutoCommit", getAutoCommit); functionMap.put("getDatabaseFullProductVersion", getDatabaseFullProductVersion); functionMap.put("getDatabaseMajorVersion", getDatabaseMajorVersion); functionMap.put("getDatabaseMinorVersion", getDatabaseMinorVersion); functionMap.put("getDatabaseProductName", getDatabaseProductName); functionMap.put("getDatabaseProductVersion", getDatabaseProductVersion); functionMap.put("hexToRaw", hexToRaw); functionMap.put("hour", hour); functionMap.put("identity", identity); functionMap.put("insert", insert); functionMap.put("isReadOnlyConnection", isReadOnlyConnection); functionMap.put("isReadOnlyDatabase", isReadOnlyDatabase); functionMap.put("isReadOnlyDatabaseFiles", isReadOnlyDatabaseFiles); functionMap.put("lcase", lcase); functionMap.put("left", left); functionMap.put("length", length); functionMap.put("locate", locate); functionMap.put("log10", log10); functionMap.put("ltrim", ltrim); functionMap.put("minute", minute); functionMap.put("mod", mod); functionMap.put("month", month); functionMap.put("monthname", monthname); functionMap.put("now", now); functionMap.put("octetLength", octetLength); functionMap.put("pi", pi); functionMap.put("position", position); functionMap.put("quarter", quarter); functionMap.put("rand", rand); functionMap.put("rawToHex", rawToHex); functionMap.put("repeat", repeat); functionMap.put("replace", replace); functionMap.put("right", right); functionMap.put("round", round); functionMap.put("roundMagic", roundMagic); functionMap.put("rtrim", rtrim); functionMap.put("second", second); functionMap.put("sign", sign); functionMap.put("soundex", soundex); functionMap.put("space", space); functionMap.put("substring", substring); functionMap.put("to_char", to_char); functionMap.put("trim", trim); functionMap.put("truncate", truncate); functionMap.put("ucase", ucase); functionMap.put("user", user); functionMap.put("week", week); functionMap.put("year", year); } static Object invoke(int fID, Object[] params) throws HsqlException { try { switch (fID) { case abs : { return new Double( Library.abs(((Number) params[0]).doubleValue())); } case ascii : { return ascii((String) params[0]); } case bitand : { return ValuePool.getInt( bitand(((Number) params[0]).intValue(), ((Number) params[1]).intValue())); } case bitLength : { return bitLength((String) params[0]); } case bitor : { return ValuePool.getInt( bitor(((Number) params[0]).intValue(), ((Number) params[1]).intValue())); } case bitxor : { return ValuePool.getInt( bitxor(((Number) params[0]).intValue(), ((Number) params[1]).intValue())); } case character : { return character(((Number) params[0]).intValue()); } case concat : { return concat((String) params[0], (String) params[1]); } case cot : { return new Double( cot(((Number) params[0]).doubleValue())); } case curdate : { return null; } case curtime : { return null; } case database : { return null; } case datediff : { return datediff((String) params[0], (Timestamp) params[1], (Timestamp) params[2]); } case dayname : { return dayname((Date) params[0]); } case dayofmonth : case day : { return dayofmonth((Date) params[0]); } case dayofweek : { return dayofweek((Date) params[0]); } case dayofyear : { return dayofyear((Date) params[0]); } case difference : { return ValuePool.getInt(difference((String) params[0], (String) params[1])); } case getAutoCommit : { return null; } case getDatabaseFullProductVersion : { return getDatabaseFullProductVersion(); } case getDatabaseMajorVersion : { return ValuePool.getInt(getDatabaseMajorVersion()); } case getDatabaseMinorVersion : { return ValuePool.getInt(getDatabaseMinorVersion()); } case getDatabaseProductName : { return getDatabaseProductName(); } case getDatabaseProductVersion : { return getDatabaseProductVersion(); } case hexToRaw : { return hexToRaw((String) params[0]); } case hour : { return hour((Time) params[0]); } case identity : { return null; } case insert : { return insert((String) params[0], ((Number) params[1]).intValue(), ((Number) params[2]).intValue(), (String) params[3]); } case isReadOnlyConnection : { return null; } case isReadOnlyDatabase : { return null; } case lcase : { return lcase((String) params[0]); } case left : { return left((String) params[0], ((Number) params[1]).intValue()); } case length : { return length((String) params[0]); } case locate : { return ValuePool.getInt(locate((String) params[0], (String) params[1], (Integer) params[2])); } case log10 : { return new Double( log10(((Number) params[0]).doubleValue())); } case ltrim : { return ltrim((String) params[0]); } case minute : { return minute((Time) params[0]); } case mod : { return ValuePool.getInt( mod( ((Number) params[0]).intValue(), ((Number) params[1]).intValue())); } case month : { return month((Date) params[0]); } case monthname : { return ValuePool.getString(monthname((Date) params[0])); } case now : { return null; } case octetLength : { return octetLength((String) params[0]); } case position : { return ValuePool.getInt(position((String) params[0], (String) params[1])); } case pi : { return piValue; } case quarter : { return quarter((Date) params[0]); } case rand : { return new Double(rand((Integer) params[0])); } case rawToHex : { return rawToHex((String) params[0]); } case repeat : { return repeat((String) params[0], (Integer) params[1]); } case replace : { return replace((String) params[0], (String) params[1], (String) params[2]); } case right : { return right((String) params[0], ((Number) params[1]).intValue()); } case round : { return new Double( round(((Number) params[0]).doubleValue(), ((Number) params[1]).intValue())); } case roundMagic : { return new Double( roundMagic(((Number) params[0]).doubleValue())); } case rtrim : { return rtrim((String) params[0]); } case second : { return second((Time) params[0]); } case sign : { return ValuePool.getInt( sign(((Number) params[0]).doubleValue())); } case soundex : { return soundex((String) params[0]); } case space : { return space(((Number) params[0]).intValue()); } case substring : { return substring((String) params[0], ((Number) params[1]).intValue(), (Integer) params[2]); } case trim : { return trim((String) params[0], (String) params[1], ((Boolean) params[2]).booleanValue(), ((Boolean) params[3]).booleanValue()); } case truncate : { return new Double( truncate( ((Number) params[0]).doubleValue(), ((Number) params[1]).intValue())); } case ucase : { return ucase((String) params[0]); } case user : { return null; } case week : { return week((Date) params[0]); } case year : { return year((Date) params[0]); } case to_char : { return to_char((java.util.Date) params[0], (String) params[1]); } case isReadOnlyDatabaseFiles : { return null; } default : { // coding error Trace.doAssert(false); return null; } } } catch (Exception e) { throw Trace.error(Trace.FUNCTION_CALL_ERROR, e.toString()); } } static final String prefix = "org.hsqldb.Library."; static final int prefixLength = prefix.length(); static int functionID(String fname) { return fname.startsWith(prefix) ? functionMap.get(fname.substring(prefixLength), -1) : -1; } } hsqldb-1.8.0.10.orig/src/org/hsqldb/GranteeManager.java0000644000175000017500000004524510416742470021214 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb; import org.hsqldb.lib.HashMappedList; import org.hsqldb.lib.HashSet; import org.hsqldb.lib.HsqlArrayList; import org.hsqldb.lib.IntKeyHashMap; import org.hsqldb.lib.IntValueHashMap; import org.hsqldb.lib.Iterator; import org.hsqldb.lib.StringUtil; import org.hsqldb.lib.Collection; import org.hsqldb.lib.Set; /** * Contains a set of Grantee objects, and supports operations for creating, * finding, modifying and deleting Grantee objects for a Database; plus * Administrative privileges. * * @author boucherb@users * @author fredt@users * @author unsaved@users * * @version 1.8.0 * @since 1.8.0 * @see Grantee */ class GranteeManager implements GrantConstants { /** * The role name reserved for authorization of INFORMATION_SCHEMA and * system objects. */ static final String SYSTEM_AUTHORIZATION_NAME = "_SYSTEM"; /** The role name reserved for ADMIN users. */ static final String DBA_ADMIN_ROLE_NAME = "DBA"; /** The role name reserved for the special PUBLIC pseudo-user. */ static final String PUBLIC_ROLE_NAME = "PUBLIC"; /** * An empty list that is returned from * {@link #listTablePrivileges listTablePrivileges} when * it is detected that neither this User object or * its PUBLIC User object attribute have been * granted any rights on the Table object identified by * the specified HsqlName object. * */ static final String[] emptyRightsList = new String[0]; /** * MAP: int => HsqlArrayList.

    * * This map caches the lists of String objects naming the rights * corresponding to each valid set of rights flags, as returned by * {@link #listRightNames listRightNames} * */ static final IntKeyHashMap hRightsLists = new IntKeyHashMap(); /** * Used to provide access to the RoleManager for Grantee.isAccessible() * lookups */ /* * Our map here has the same keys as the UserManager map * EXCEPT that we include all roles, including the SYSTEM_AUTHORIZATION_NAME * because we need o keep track of those permissions, but not his identity. * I.e., our list here is all-inclusive, whether the User or Role is * visible to database users or not. */ /** * Map of String-to-Grantee-objects.

    * Primary object maintained by this class */ private HashMappedList map = new HashMappedList(); /** * This object's set of Role objects.

    * role-Strings-to-Grantee-object */ private HashMappedList roleMap = new HashMappedList(); /** * Construct the GranteeManager for a Database. * * Construct special Grantee objects for PUBLIC and SYS, and add them * to the Grantee map. * We depend on the corresponding User accounts being created * independently so as to remove a dependency to the UserManager class. * * @param inDatabase Only needed to link to the RoleManager later on. */ public GranteeManager(Database inDatabase) throws HsqlException { addRole(GranteeManager.DBA_ADMIN_ROLE_NAME); getRole(GranteeManager.DBA_ADMIN_ROLE_NAME).setAdminDirect(); } static final IntValueHashMap rightsStringLookup = new IntValueHashMap(7); static { rightsStringLookup.put(S_R_ALL, ALL); rightsStringLookup.put(S_R_SELECT, SELECT); rightsStringLookup.put(S_R_UPDATE, UPDATE); rightsStringLookup.put(S_R_DELETE, DELETE); rightsStringLookup.put(S_R_INSERT, INSERT); } /** * Grants the rights represented by the rights argument on * the database object identified by the dbobject argument * to the Grantee object identified by name argument.

    * * Note: For the dbobject argument, Java Class objects are identified * using a String object whose value is the fully qualified name * of the Class, while Table and other objects are * identified by an HsqlName object. A Table * object identifier must be precisely the one obtained by calling * table.getName(); if a different HsqlName * object with an identical name attribute is specified, then * rights checks and tests will fail, since the HsqlName * class implements its {@link HsqlName#hashCode hashCode} and * {@link HsqlName#equals equals} methods based on pure object * identity, rather than on attribute values.

    */ void grant(String name, Object dbobject, int rights) throws HsqlException { Grantee g = get(name); if (g == null) { throw Trace.error(Trace.NO_SUCH_GRANTEE, name); } if (isImmutable(name)) { throw Trace.error(Trace.NONMOD_GRANTEE, name); } g.grant(dbobject, rights); g.updateAllRights(); if (g.isRole) { updateAllRights(g); } } /** * Grant a role to this Grantee. */ void grant(String name, String role) throws HsqlException { Grantee grantee = get(name); if (grantee == null) { throw Trace.error(Trace.NO_SUCH_GRANTEE, name); } if (isImmutable(name)) { throw Trace.error(Trace.NONMOD_GRANTEE, name); } Grantee r = get(role); if (r == null) { throw Trace.error(Trace.NO_SUCH_ROLE, role); } if (role.equals(name)) { throw Trace.error(Trace.CIRCULAR_GRANT, name); } // boucherb@users 20050515 // SQL 2003 Foundation, 4.34.3 // No cycles of role grants are allowed. if (r.hasRole(name)) { // boucherb@users // TODO: Correct reporting of actual grant path throw Trace.error(Trace.CIRCULAR_GRANT, Trace.getMessage(Trace.ALREADY_HAVE_ROLE) + " GRANT " + name + " TO " + role); } if (grantee.getDirectRoles().contains(role)) { throw Trace.error(Trace.ALREADY_HAVE_ROLE, role); } grantee.grant(role); grantee.updateAllRights(); if (grantee.isRole) { updateAllRights(grantee); } } /** * Revoke a role from a Grantee */ void revoke(String name, String role) throws HsqlException { Grantee g = get(name); if (g == null) { throw Trace.error(Trace.NO_SUCH_GRANTEE, name); } g.revoke(role); g.updateAllRights(); if (g.isRole) { updateAllRights(g); } } /** * Revokes the rights represented by the rights argument on * the database object identified by the dbobject argument * from the User object identified by the name * argument.

    * @see #grant */ void revoke(String name, Object dbobject, int rights) throws HsqlException { Grantee g = get(name); g.revoke(dbobject, rights); g.updateAllRights(); if (g.isRole) { updateAllRights(g); } } /** * Removes a role without any privileges from all grantees */ void removeEmptyRole(Grantee role) { String name = role.getName(); for (int i = 0; i < map.size(); i++) { Grantee grantee = (Grantee) map.get(i); grantee.roles.remove(name); } } /** * Removes all rights mappings for the database object identified by * the dbobject argument from all Grantee objects in the set. */ void removeDbObject(Object dbobject) { for (int i = 0; i < map.size(); i++) { Grantee g = (Grantee) map.get(i); g.revokeDbObject(dbobject); } } /** * First updates all ROLE Grantee objects. Then updates all USER Grantee * Objects. */ void updateAllRights(Grantee role) { String name = role.getName(); for (int i = 0; i < map.size(); i++) { Grantee grantee = (Grantee) map.get(i); if (grantee.isRole) { grantee.updateNestedRoles(name); } } for (int i = 0; i < map.size(); i++) { Grantee grantee = (Grantee) map.get(i); if (!grantee.isRole) { grantee.updateAllRights(); } } } /** */ public boolean removeGrantee(String name) { /* * Explicitly can't remove PUBLIC_USER_NAME and system grantees. */ if (isReserved(name)) { return false; } Grantee g = (Grantee) map.remove(name); if (g == null) { return false; } g.clearPrivileges(); updateAllRights(g); if (g.isRole) { roleMap.remove(name); removeEmptyRole(g); } return true; } /** * We don't have to worry about anything manually creating a reserved * account, because the reserved accounts are created upon DB * initialization. If somebody tries to create one of these accounts * after that, it will fail because the account will already exist. * (We do prevent them from being removed, elsewhere!) */ public Grantee addGrantee(String name) throws HsqlException { if (map.containsKey(name)) { throw Trace.error(Trace.GRANTEE_ALREADY_EXISTS, name); } Grantee pubGrantee = null; if (!isReserved(name)) { pubGrantee = get(PUBLIC_ROLE_NAME); if (pubGrantee == null) { Trace.doAssert( false, Trace.getMessage(Trace.MISSING_PUBLIC_GRANTEE)); } } Grantee g = new Grantee(name, pubGrantee, this); map.put(name, g); return g; } /** * Returns true if named Grantee object exists. * This will return true for reserved Grantees * SYSTEM_AUTHORIZATION_NAME, ADMIN_ROLE_NAME, PUBLIC_USER_NAME. */ boolean isGrantee(String name) { return (map.containsKey(name)); } static int getCheckRight(String right) throws HsqlException { int r = getRight(right); if (r != 0) { return r; } throw Trace.error(Trace.NO_SUCH_RIGHT, right); } /** * Translate a string representation or right(s) into its numeric form. */ static int getRight(String right) { return rightsStringLookup.get(right, 0); } /** * Returns a comma separated list of right names corresponding to the * right flags set in the right argument.

    */ static String getRightsList(int rights) { // checkValidFlags(right); if (rights == 0) { return null; } if (rights == ALL) { return S_R_ALL; } return StringUtil.getList(getRightsArray(rights), ",", ""); } /** * Retrieves the list of right names represented by the right flags * set in the specified Integer object's int * value.

    * * @param rights An Integer representing a set of right flags * @return an empty list if the specified Integer object is * null, else a list of rights, as String objects, * represented by the rights flag bits set in the specified * Integer object's int value. * */ static String[] getRightsArray(int rights) { if (rights == 0) { return emptyRightsList; } String[] list = (String[]) hRightsLists.get(rights); if (list != null) { return list; } list = getRightsArraySub(rights); hRightsLists.put(rights, list); return list; } private static String[] getRightsArraySub(int right) { // checkValidFlags(right); if (right == 0) { return emptyRightsList; } HsqlArrayList a = new HsqlArrayList(); Iterator it = rightsStringLookup.keySet().iterator(); for (; it.hasNext(); ) { String rightString = (String) it.next(); if (rightString.equals(S_R_ALL)) { continue; } int i = rightsStringLookup.get(rightString, 0); if ((right & i) != 0) { a.add(rightString); } } return (String[]) a.toArray(new String[a.size()]); } /** * Retrieves the set of distinct, fully qualified Java Class * names upon which any grants currently exist to elements in * this collection.

    * @return the set of distinct, fully qualified Java Class names, as * String objects, upon which grants currently exist * to the elements of this collection * */ HashSet getGrantedClassNames() throws HsqlException { int size; Grantee grantee; HashSet out; Iterator e; size = map.size(); out = new HashSet(); for (int i = 0; i < size; i++) { grantee = (Grantee) map.get(i); if (grantee == null) { continue; } e = grantee.getGrantedClassNames(false).iterator(); while (e.hasNext()) { out.add(e.next()); } } return out; } public Grantee get(String name) { return (Grantee) map.get(name); } public Collection getGrantees() { return map.values(); } public static boolean validRightString(String rightString) { return getRight(rightString) != 0; } public static boolean isImmutable(String name) { return name.equals(SYSTEM_AUTHORIZATION_NAME) || name.equals(DBA_ADMIN_ROLE_NAME); } public static boolean isReserved(String name) { return name.equals(SYSTEM_AUTHORIZATION_NAME) || name.equals(DBA_ADMIN_ROLE_NAME) || name.equals(PUBLIC_ROLE_NAME); } /** * Creates a new Role object under management of this object.

    * * A set of constraints regarding user creation is imposed:

    * *

      *
    1. Can't create a role with name same as any right. * *
    2. If the specified name is null, then an * ASSERTION_FAILED exception is thrown stating that * the name is null. * *
    3. If this object's collection already contains an element whose * name attribute equals the name argument, then * a GRANTEE_ALREADY_EXISTS or ROLE_ALREADY_EXISTS Trace * is thrown. * (This will catch attempts to create Reserved grantee names). *
    */ String addRole(String name) throws HsqlException { /* * Role names can't be right names because that would cause * conflicts with "GRANT name TO...". This doesn't apply to * User names or Grantee names in general, since you can't * "GRANT username TO...". That's why this check is only here. */ if (name == null) { Trace.doAssert(false, Trace.getMessage(Trace.NULL_NAME)); } Grantee g = null; if (GranteeManager.validRightString(name)) { throw Trace.error(Trace.ILLEGAL_ROLE_NAME, name); } g = addGrantee(name); g.isRole = true; boolean result = roleMap.add(name, g); if (!result) { throw Trace.error(Trace.ROLE_ALREADY_EXISTS, name); } // I don't think can get this trace since every roleMap element // will have a Grantee element which was already verified // above. Easier to leave this check here than research it. return name; } /** * Attempts to drop a Role with the specified name * from this object's set.

    * * A successful drop action consists of:

    * *

      * *
    • removing the Grantee object with the specified name * from the set. * *
    • revoking all rights from the removed object
      * (this ensures that in case there are still references to the * just dropped Grantee object, those references * cannot be used to erronously access database objects). * *

    * */ void dropRole(String name) throws HsqlException { if (name.equals(GranteeManager.DBA_ADMIN_ROLE_NAME)) { throw Trace.error(Trace.ACCESS_IS_DENIED); } if (!isRole(name)) { throw Trace.error(Trace.NO_SUCH_ROLE, name); } removeGrantee(name); roleMap.remove(name); } public Set getRoleNames() { return roleMap.keySet(); } /** * Returns Grantee for the named Role */ Grantee getRole(String name) throws HsqlException { if (!isRole(name)) { Trace.doAssert(false, "No role '" + name + "'"); } Grantee g = (Grantee) roleMap.get(name); if (g == null) { throw Trace.error(Trace.MISSING_GRANTEE, name); } return g; } boolean isRole(String name) throws HsqlException { return roleMap.containsKey(name); } } hsqldb-1.8.0.10.orig/src/org/hsqldb/Database.java0000644000175000017500000005526610706503763020046 0ustar renerene/* Copyright (c) 1995-2000, The Hypersonic SQL Group. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the Hypersonic SQL Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE HYPERSONIC SQL GROUP, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * This software consists of voluntary contributions made by many individuals * on behalf of the Hypersonic SQL Group. * * * For work added by the HSQL Development Group: * * Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb; import java.lang.reflect.Constructor; import org.hsqldb.lib.FileAccess; import org.hsqldb.lib.FileUtil; import org.hsqldb.lib.HashMap; import org.hsqldb.persist.HsqlDatabaseProperties; import org.hsqldb.persist.HsqlProperties; import org.hsqldb.persist.Logger; // fredt@users 20020130 - patch 476694 by velichko - transaction savepoints // additions to different parts to support savepoint transactions // fredt@users 20020215 - patch 1.7.0 - new HsqlProperties class // support use of properties from database.properties file // fredt@users 20020218 - patch 1.7.0 - DEFAULT keyword // support for default values for table columns // fredt@users 20020305 - patch 1.7.0 - restructuring // some methods move to Table.java, some removed // fredt@users 20020221 - patch 513005 by sqlbob@users (RMP) - restructuring // fredt@users 20020221 - patch 513005 by sqlbob@users (RMP) - error trapping // boucherb@users 20020130 - patch 1.7.0 - use lookup for speed // idents listed in alpha-order for easy check of stats... // fredt@users 20020420 - patch523880 by leptipre@users - VIEW support // boucherb@users - doc 1.7.0 - added javadoc comments // tony_lai@users 20020820 - patch 595073 - duplicated exception msg // tony_lai@users 20020820 - changes to shutdown compact to save memory // boucherb@users 20020828 - allow reconnect to local db that has shutdown // fredt@users 20020912 - patch 1.7.1 by fredt - drop duplicate name triggers // fredt@users 20021112 - patch 1.7.2 by Nitin Chauhan - use of switch // rewrite of the majority of multiple if(){}else if(){} chains with switch() // boucherb@users 20020310 - class loader update for JDK 1.1 compliance // fredt@users 20030401 - patch 1.7.2 by akede@users - data files readonly // fredt@users 20030401 - patch 1.7.2 by Brendan Ryan - data files in Jar // boucherb@users 20030405 - removed 1.7.2 lint - updated JavaDocs // boucherb@users 20030425 - DDL methods are moved to DatabaseCommandInterpreter.java // boucherb@users - fredt@users 200305..200307 - patch 1.7.2 - DatabaseManager upgrade // loosecannon1@users - patch 1.7.2 - properties on the JDBC URL // oj@openoffice.org - changed to file access api /** * Database is the root class for HSQL Database Engine database.

    * * It holds the data structure that form an HSQLDB database instance. * * Modified significantly from the Hypersonic original in successive * HSQLDB versions. * * @author Thomas Mueller (Hypersonic SQL Group) * @version 1.8.0 * @since Hypersonic SQL */ public class Database { // int databaseID; String sType; String sName; // loosecannon1@users 1.7.2 patch properties on the JDBC URL private HsqlProperties urlProperties; private String sPath; DatabaseInformation dbInfo; ClassLoader classLoader; /** indicates the state of the database */ private int dbState; public Logger logger; /** true means that all tables are readonly. */ boolean databaseReadOnly; /** * true means that all CACHED and TEXT tables are readonly. * MEMORY tables are updatable but updates are not persisted. */ private boolean filesReadOnly; /** true means filesReadOnly but CACHED and TEXT tables are disallowed */ private boolean filesInJar; public boolean sqlEnforceStrictSize; public int firstIdentity; private boolean bIgnoreCase; private boolean bReferentialIntegrity; private HsqlDatabaseProperties databaseProperties; private boolean shutdownOnNoConnection; // schema invarient objects private HashMap hAlias; public UserManager userManager; public GranteeManager granteeManager; public HsqlNameManager nameManager; // session related objects public SessionManager sessionManager; public TransactionManager txManager; CompiledStatementManager compiledStatementManager; // schema objects public SchemaManager schemaManager; public Collation collation; // public static final int DATABASE_ONLINE = 1; public static final int DATABASE_OPENING = 4; public static final int DATABASE_CLOSING = 8; public static final int DATABASE_SHUTDOWN = 16; public static final int CLOSEMODE_IMMEDIATELY = -1; public static final int CLOSEMODE_NORMAL = 0; public static final int CLOSEMODE_COMPACT = 1; public static final int CLOSEMODE_SCRIPT = 2; /** * Constructs a new Database object. * * @param type is the type of the database: "mem", "file", "res" * @param path is the fiven path to the database files * @param name is the combination of type and canonical path * @param props property overrides placed on the connect URL * @exception HsqlException if the specified name and path * combination is illegal or unavailable, or the database files the * name and path resolves to are in use by another process */ Database(String type, String path, String name, HsqlProperties props) throws HsqlException { urlProperties = props; setState(Database.DATABASE_SHUTDOWN); sName = name; sType = type; sPath = path; if (sType == DatabaseURL.S_RES) { filesInJar = true; filesReadOnly = true; } // does not need to be done more than once try { classLoader = getClass().getClassLoader(); } catch (Exception e) { // strict security policy: just use the system/boot loader classLoader = null; } // oj@openoffice.org - changed to file access api String fileaccess_class_name = (String) urlProperties.getProperty("fileaccess_class_name"); if (fileaccess_class_name != null) { String storagekey = urlProperties.getProperty("storage_key"); try { Class fileAccessClass = null; try { ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); fileAccessClass = classLoader.loadClass(fileaccess_class_name); } catch (ClassNotFoundException e) { fileAccessClass = Class.forName(fileaccess_class_name); } Constructor constructor = fileAccessClass.getConstructor(new Class[]{ Object.class }); fileaccess = (FileAccess) constructor.newInstance(new Object[]{ storagekey }); isStoredFileAccess = true; } catch (Exception e) { throw Trace.error(Trace.INVALID_FILE_ACCESS_CLASS, new Object[]{ e.toString() }); } } else { fileaccess = FileUtil.getDefaultInstance(); } shutdownOnNoConnection = urlProperties.getProperty("shutdown", "false").equals("true"); logger = new Logger(); compiledStatementManager = new CompiledStatementManager(this); } /** * Opens this database. The database should be opened after construction. */ synchronized void open() throws HsqlException { if (!isShutdown()) { return; } reopen(); } /** * Opens this database. The database should be opened after construction. * or reopened by the close(int closemode) method during a * "shutdown compact". Closes the log if there is an error. */ void reopen() throws HsqlException { boolean isNew; setState(DATABASE_OPENING); try { databaseProperties = new HsqlDatabaseProperties(this); isNew = !DatabaseURL.isFileBasedDatabaseType(sType) || !databaseProperties.checkFileExists(); if (isNew && urlProperties.isPropertyTrue("ifexists")) { throw Trace.error(Trace.DATABASE_NOT_EXISTS, sName); } databaseProperties.load(); databaseProperties.setURLProperties(urlProperties); compiledStatementManager.reset(); nameManager = new HsqlNameManager(); granteeManager = new GranteeManager(this); userManager = new UserManager(this); hAlias = Library.getAliasMap(); schemaManager = new SchemaManager(this); bReferentialIntegrity = true; sessionManager = new SessionManager(this); txManager = new TransactionManager(this); collation = new Collation(); dbInfo = DatabaseInformation.newDatabaseInformation(this); databaseProperties.setDatabaseVariables(); if (DatabaseURL.isFileBasedDatabaseType(sType)) { logger.openLog(this); } if (isNew) { sessionManager.getSysSession().sqlExecuteDirectNoPreChecks( "CREATE USER SA PASSWORD \"\" ADMIN"); logger.synchLogForce(); } dbInfo.setWithContent(true); } catch (Throwable e) { logger.closeLog(Database.CLOSEMODE_IMMEDIATELY); logger.releaseLock(); setState(DATABASE_SHUTDOWN); clearStructures(); DatabaseManager.removeDatabase(this); if (!(e instanceof HsqlException)) { e = Trace.error(Trace.GENERAL_ERROR, e.toString()); } throw (HsqlException) e; } setState(DATABASE_ONLINE); } /** * Clears the data structuress, making them elligible for garbage collection. */ void clearStructures() { if (schemaManager != null) { schemaManager.clearStructures(); } granteeManager = null; userManager = null; hAlias = null; nameManager = null; schemaManager = null; sessionManager = null; dbInfo = null; } /** * Returns the type of the database: "mem", "file", "res" */ public String getType() { return sType; } /** * Returns the path of the database */ public String getPath() { return sPath; } /** * Returns the database properties. */ public HsqlDatabaseProperties getProperties() { return databaseProperties; } /** * Returns the SessionManager for the database. */ public SessionManager getSessionManager() { return sessionManager; } /** * Returns true if database has been shut down, false otherwise */ synchronized boolean isShutdown() { return dbState == DATABASE_SHUTDOWN; } /** * Constructs a new Session that operates within (is connected to) the * context of this Database object.

    * * If successful, the new Session object initially operates on behalf of * the user specified by the supplied user name. * * Throws if username or password is invalid. */ synchronized Session connect(String username, String password) throws HsqlException { User user = userManager.getUser(username, password); Session session = sessionManager.newSession(this, user, databaseReadOnly, false); logger.logConnectUser(session); return session; } /** * Puts this Database object in global read-only mode. After * this call, all existing and future sessions are limited to read-only * transactions. Any following attempts to update the state of the * database will result in throwing an HsqlException. */ public void setReadOnly() { databaseReadOnly = true; filesReadOnly = true; } /** * After this call all CACHED and TEXT tables will be set to read-only * mode. Changes to MEMORY tables will NOT * be stored or updated in the script file. This mode is intended for * use with read-only media where data should not be persisted. */ public void setFilesReadOnly() { filesReadOnly = true; } /** * Is this in filesReadOnly mode? */ public boolean isFilesReadOnly() { return filesReadOnly; } /** * Is this in filesInJar mode? */ public boolean isFilesInJar() { return filesInJar; } /** * Returns the UserManager for this Database. */ UserManager getUserManager() { return userManager; } /** * Returns the GranteeManager for this Database. */ GranteeManager getGranteeManager() { return granteeManager; } /** * Sets the isReferentialIntegrity attribute. */ public void setReferentialIntegrity(boolean ref) { bReferentialIntegrity = ref; } /** * Is referential integrity currently enforced? */ boolean isReferentialIntegrity() { return bReferentialIntegrity; } /** * Returns a map from Java method-call name aliases to the * fully-qualified names of the Java methods themsleves. */ HashMap getAliasMap() { return hAlias; } /** * Returns the fully qualified name for the Java method corresponding to * the given method alias. If there is no Java method, then returns the * alias itself. */ String getJavaName(String name) throws HsqlException { String target = (String) hAlias.get(name); if (target == null) { target = name; } if (HsqlDatabaseProperties.supportsJavaMethod(target)) { return target; } throw Trace.error(Trace.ACCESS_IS_DENIED, target); } /** * Sets the database to treat any new VARCHAR column declarations as * VARCHAR_IGNORECASE. */ void setIgnoreCase(boolean b) { bIgnoreCase = b; } /** * Does the database treat any new VARCHAR column declarations as * VARCHAR_IGNORECASE. */ boolean isIgnoreCase() { return bIgnoreCase; } /** * Obtain default table types from database properties */ int getDefaultTableType() { String dttName = getProperties().getProperty( HsqlDatabaseProperties.hsqldb_default_table_type); return Token.T_CACHED.equalsIgnoreCase(dttName) ? Table.CACHED_TABLE : Table.MEMORY_TABLE; } /** * Called by the garbage collector on this Databases object when garbage * collection determines that there are no more references to it. */ protected void finalize() { if (getState() != DATABASE_ONLINE) { return; } try { close(CLOSEMODE_IMMEDIATELY); } catch (HsqlException e) { // it's too late now } } void closeIfLast() { if (shutdownOnNoConnection && sessionManager.isEmpty() && dbState == this.DATABASE_ONLINE) { try { close(CLOSEMODE_NORMAL); } catch (HsqlException e) {} } } /** * Closes this Database using the specified mode.

    * *

      *
    1. closemode -1 performs SHUTDOWN IMMEDIATELY, equivalent * to a poweroff or crash. * *
    2. closemode 0 performs a normal SHUTDOWN that * checkpoints the database normally. * *
    3. closemode 1 performs a shutdown compact that scripts * out the contents of any CACHED tables to the log then * deletes the existing *.data file that contains the data * for all CACHED table before the normal checkpoint process * which in turn creates a new, compact *.data file. *
    */ void close(int closemode) throws HsqlException { HsqlException he = null; setState(DATABASE_CLOSING); sessionManager.closeAllSessions(); sessionManager.clearAll(); if (filesReadOnly) { closemode = CLOSEMODE_IMMEDIATELY; } // fredt - impact of possible error conditions in closing the log // should be investigated for the CLOSEMODE_COMPACT mode logger.closeLog(closemode); try { if (closemode == CLOSEMODE_COMPACT) { clearStructures(); reopen(); setState(DATABASE_CLOSING); logger.closeLog(CLOSEMODE_NORMAL); } } catch (Throwable t) { if (t instanceof HsqlException) { he = (HsqlException) t; } else { he = Trace.error(Trace.GENERAL_ERROR, t.toString()); } } classLoader = null; logger.releaseLock(); setState(DATABASE_SHUTDOWN); clearStructures(); // fredt - this could change to avoid removing a db from the // DatabaseManager repository if there are pending getDatabase() // calls DatabaseManager.removeDatabase(this); if (he != null) { throw he; } } /** * Ensures system table producer's table cache, if it exists, is set dirty. * After this call up-to-date versions are generated in response to * system table requests.

    * * Also resets all prepared statements if a change to database structure * can possibly affect any existing prepared statement's validity.

    * * The argument is false if the change to the database structure does not * affect the prepared statement, such as when a new table is added.

    * * The argument is typically true when a database object is dropped, * altered or a permission was revoked. * * @param resetPrepared If true, reset all prepared statements. */ public void setMetaDirty(boolean resetPrepared) { if (dbInfo != null) { dbInfo.setDirty(); } if (resetPrepared) { compiledStatementManager.resetStatements(); } } private synchronized void setState(int state) { dbState = state; } synchronized int getState() { return dbState; } String getStateString() { int state = getState(); switch (state) { case DATABASE_CLOSING : return "DATABASE_CLOSING"; case DATABASE_ONLINE : return "DATABASE_ONLINE"; case DATABASE_OPENING : return "DATABASE_OPENING"; case DATABASE_SHUTDOWN : return "DATABASE_SHUTDOWN"; default : return "UNKNOWN"; } } // boucherb@users - 200403?? - patch 1.7.2 - metadata //------------------------------------------------------------------------------ /** * Retrieves the uri portion of this object's in-process JDBC url. * * @return the uri portion of this object's in-process JDBC url */ public String getURI() { return sName; } // oj@openoffice.org - changed to file access api public HsqlProperties getURLProperties() { return urlProperties; } private FileAccess fileaccess; private boolean isStoredFileAccess; public synchronized FileAccess getFileAccess() { return fileaccess; } public synchronized boolean isStoredFileAccess() { return isStoredFileAccess; } } hsqldb-1.8.0.10.orig/src/org/hsqldb/GrantConstants.java0000644000175000017500000000511710416742470021276 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb; import org.hsqldb.store.ValuePool; /** * The constants for grants. * * @author boucherb@users * @version 1.7.2 * @since 1.7.2 */ public interface GrantConstants { /** Flag required to SELECT from a table. */ int SELECT = 1 << 0; /** Flag required to DELETE from a table. */ int DELETE = 1 << 1; /** flag required to INSERT into a table. */ int INSERT = 1 << 2; /** Flag required to UPDATE a table. */ int UPDATE = 1 << 3; /** Flag required to use a sequence. */ int USAGE = 1 << 4; /** Flag required to execute a routine. */ int EXECUTE = 1 << 5; /** Combined flag permitting any action. */ int ALL = SELECT | DELETE | INSERT | UPDATE; Integer INTEGER_ALL = ValuePool.getInt(ALL); // String S_R_ALL = "ALL"; String S_R_SELECT = "SELECT"; String S_R_UPDATE = "UPDATE"; String S_R_DELETE = "DELETE"; String S_R_INSERT = "INSERT"; String S_R_USAGE = "USAGE"; String S_R_EXECUTE = "EXECUTE"; } hsqldb-1.8.0.10.orig/src/org/hsqldb/PointerNode.java0000644000175000017500000001151010416742476020554 0ustar renerene/* Copyright (c) 1995-2000, The Hypersonic SQL Group. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the Hypersonic SQL Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE HYPERSONIC SQL GROUP, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * This software consists of voluntary contributions made by many individuals * on behalf of the Hypersonic SQL Group. * * * For work added by the HSQL Development Group: * * Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb; // fredt@users 20020221 - patch 513005 by sqlbob@users (RMP) // fredt@users 20020920 - path 1.7.1 - refactoring to cut mamory footprint // fredt@users 20021205 - path 1.7.2 - enhancements // fredt@users 20021215 - doc 1.7.2 - javadoc comments /** * Text table node implementation.

    * Nodes for the AVL tree are all built and kept in memory while the actual * row data is accessed via TextCache from disk.

    * This differs from MemoryNode by maintaining an integral pointer for the * Row data instead of a Java reference. * * New class based on Hypersonic SQL code. * * @author fredt@users * @version 1.8.0 * @since 1.7.1 */ class PointerNode extends BaseMemoryNode { int iData = NO_POS; private Table tTable; private Node nPrimary; // node of key / primary index for this row PointerNode(CachedRow r, int id) { tTable = r.getTable(); iData = r.iPos; nPrimary = r.nPrimaryNode == null ? this : r.nPrimaryNode; } void delete() { super.delete(); nPrimary = null; tTable = null; } int getKey() { return iData; } Row getRow() throws HsqlException { if (iData == NO_POS) { return null; } CachedRow r = tTable.getRow(iData, nPrimary); return r; } Object[] getData() throws HsqlException { if (Trace.DOASSERT) { Trace.doAssert(iBalance != -2); } return getRow().getData(); } } hsqldb-1.8.0.10.orig/src/org/hsqldb/Transaction.java0000644000175000017500000001351710416742502020612 0ustar renerene/* Copyright (c) 1995-2000, The Hypersonic SQL Group. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the Hypersonic SQL Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE HYPERSONIC SQL GROUP, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * This software consists of voluntary contributions made by many individuals * on behalf of the Hypersonic SQL Group. * * * For work added by the HSQL Development Group: * * Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb; /** * Represents a single row table operation. * * @author Thomas Mueller (Hypersonic SQL Group) * @version 1.8.0 * @since Hypersonic SQL */ class Transaction { boolean isDelete; Table tTable; Row row; long SCN; /** * Constructor.

    * * @param delete if true, this represents a single row delete action, else * a single row insert action * @param nested true if this action is part of a transaction initiated * within an INSERT INTO or UPDATE statement * @param table the Table object against which the operation occured * @param row the row data that iis inserted or deleted */ Transaction(boolean delete, Table table, Row row, long SCN) { isDelete = delete; tTable = table; this.row = row; } /** * Undoes the single row delete or insert represented by this object. * * @param session the session context in which to perform the undo * @param log if true log the work * @throws HsqlException if a database access error occurs */ void rollback(Session session, boolean log) { try { if (isDelete) { tTable.insertNoCheckRollback(session, row, log); } else { tTable.deleteNoCheckRollback(session, row, log); } } catch (Exception e) { // System.out.println("rollback error: isDelete " + isDelete); } } void commit(Session session) { try { if (isDelete) { tTable.removeRowFromStore(row); } else { tTable.commitRowToStore(row); } } catch (Exception e) { // System.out.println("rollback error: isDelete " + isDelete); } } void logRollback(Session session) { try { if (isDelete) { tTable.database.logger.writeInsertStatement(session, tTable, row.getData()); } else { tTable.database.logger.writeDeleteStatement(session, tTable, row.getData()); } } catch (Exception e) {} } void logAction(Session session) { try { if (isDelete) { tTable.database.logger.writeDeleteStatement(session, tTable, row.getData()); } else { tTable.database.logger.writeInsertStatement(session, tTable, row.getData()); } } catch (Exception e) {} } } hsqldb-1.8.0.10.orig/src/org/hsqldb/MemoryNode.java0000644000175000017500000001021610416742475020405 0ustar renerene/* Copyright (c) 1995-2000, The Hypersonic SQL Group. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the Hypersonic SQL Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE HYPERSONIC SQL GROUP, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * This software consists of voluntary contributions made by many individuals * on behalf of the Hypersonic SQL Group. * * * For work added by the HSQL Development Group: * * Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb; // fredt@users 20020221 - patch 513005 by sqlbob@users (RMP) /** * Memory table node implementation. * * New class by fredt@users based on original Hypersonic code. * * @author Thomas Mueller (Hypersonic SQL Group) * @version 1.7.1 * @since 1.7.1 */ class MemoryNode extends BaseMemoryNode { protected Row rData; /** * A MemoreyNode is permenently linked with the row it refers to. * * @param r */ public MemoryNode(Row r) { rData = r; } int getKey() { return 0; } Row getRow() throws HsqlException { return rData; } Object[] getData() throws HsqlException { if (Trace.DOASSERT) { Trace.doAssert(iBalance != -2); } return rData.getData(); } void delete() { super.delete(); rData = null; } } hsqldb-1.8.0.10.orig/src/org/hsqldb/SchemaManager.java0000644000175000017500000010344210427102622021010 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb; import org.hsqldb.HsqlNameManager.HsqlName; import org.hsqldb.lib.ArrayUtil; import org.hsqldb.lib.HsqlArrayList; import org.hsqldb.lib.HashMappedList; import org.hsqldb.lib.Iterator; import org.hsqldb.lib.WrapperIterator; import org.hsqldb.persist.Logger; /** * Manages all SCHEMA related database objects * * @author fredt@users * @version 1.8.0 * @since 1.8.0 */ public class SchemaManager { static final String SYSTEM_SCHEMA = "SYSTEM_SCHEMA"; static final String DEFINITION_SCHEMA = "DEFINITION_SCHEMA"; static final String INFORMATION_SCHEMA = "INFORMATION_SCHEMA"; static final String PUBLIC_SCHEMA = "PUBLIC"; static HsqlName INFORMATION_SCHEMA_HSQLNAME = HsqlNameManager.newHsqlSystemObjectName(INFORMATION_SCHEMA); static HsqlName SYSTEM_SCHEMA_HSQLNAME = HsqlNameManager.newHsqlSystemObjectName(SYSTEM_SCHEMA); Database database; HsqlName defaultSchemaHsqlName; HashMappedList schemaMap = new HashMappedList(); SchemaManager(Database database) { this.database = database; Schema schema = new Schema(PUBLIC_SCHEMA, false); defaultSchemaHsqlName = schema.name; schemaMap.put(PUBLIC_SCHEMA, schema); } void createSchema(String name, boolean isQuoted) throws HsqlException { if (DEFINITION_SCHEMA.equals(name) || INFORMATION_SCHEMA.equals(name) || SYSTEM_SCHEMA.equals(name)) { throw Trace.error(Trace.INVALID_SCHEMA_NAME_NO_SUBCLASS); } Schema schema = new Schema(name, isQuoted); schemaMap.add(name, schema); } void dropSchema(String name, boolean cascade) throws HsqlException { Schema schema = (Schema) schemaMap.get(name); if (schema == null) { throw Trace.error(Trace.INVALID_SCHEMA_NAME_NO_SUBCLASS); } if (!cascade &&!schema.isEmpty()) { throw Trace.error(Trace.DEPENDENT_DATABASE_OBJECT_EXISTS); } Iterator tableIterator = schema.tablesIterator(); while (tableIterator.hasNext()) { Table table = ((Table) tableIterator.next()); database.getUserManager().removeDbObject(table.getName()); table.drop(); } Iterator sequenceIterator = schema.sequencesIterator(); while (tableIterator.hasNext()) { NumberSequence sequence = ((NumberSequence) sequenceIterator.next()); database.getUserManager().removeDbObject(sequence.getName()); } schema.clearStructures(); schemaMap.remove(name); if (defaultSchemaHsqlName.name.equals(name)) { if (schemaMap.isEmpty()) { schema = new Schema(PUBLIC_SCHEMA, false); } else { schema = (Schema) schemaMap.get(0); } defaultSchemaHsqlName = schema.name; schemaMap.put(defaultSchemaHsqlName.name, schema); } // these are called last and in this particular order database.getUserManager().removeSchemaReference(schema); database.getSessionManager().removeSchemaReference(schema); } void renameSchema(String name, String newName, boolean isQuoted) throws HsqlException { Schema schema = (Schema) schemaMap.get(name); Schema exists = (Schema) schemaMap.get(newName); if (schema == null || exists != null || INFORMATION_SCHEMA.equals(newName)) { throw Trace.error(Trace.INVALID_SCHEMA_NAME_NO_SUBCLASS, schema == null ? name : newName); } schema.name.rename(newName, isQuoted); int index = schemaMap.getIndex(name); schemaMap.set(index, newName, schema); } void clearStructures() { Iterator it = schemaMap.values().iterator(); while (it.hasNext()) { Schema schema = (Schema) it.next(); schema.clearStructures(); } } public Iterator userSchemaNameIterator() { return schemaMap.keySet().iterator(); } HsqlName toSchemaHsqlName(String name) { Schema schema = (Schema) schemaMap.get(name); return schema == null ? null : schema.name; } HsqlName getDefaultSchemaHsqlName() { return defaultSchemaHsqlName; } public String getDefaultSchemaName() { return defaultSchemaHsqlName.name; } boolean schemaExists(String name) { if (INFORMATION_SCHEMA.equals(name)) { return true; } return schemaMap.containsKey(name); } /** * If schemaName is null, return the current schema name, else return * the HsqlName object for the schema. If schemaName does not exist, * throw. */ HsqlName getSchemaHsqlName(String name) throws HsqlException { if (name == null) { return defaultSchemaHsqlName; } if (INFORMATION_SCHEMA.equals(name)) { return INFORMATION_SCHEMA_HSQLNAME; } Schema schema = ((Schema) schemaMap.get(name)); if (schema == null) { throw Trace.error(Trace.INVALID_SCHEMA_NAME_NO_SUBCLASS, name); } return schema.name; } /** * Same as above, but return string */ String getSchemaName(String name) throws HsqlException { return getSchemaHsqlName(name).name; } /** * Iterator includes INFORMATION_SCHEMA */ Iterator fullSchemaNamesIterator() { return new WrapperIterator(new WrapperIterator(INFORMATION_SCHEMA), schemaMap.keySet().iterator()); } /** * is a schema read-only */ public boolean isSystemSchema(HsqlName schema) { return (INFORMATION_SCHEMA_HSQLNAME.equals(schema) || SYSTEM_SCHEMA_HSQLNAME.equals(schema)) ? true : false; } public Iterator tablesIterator(String schema) { Schema temp = (Schema) schemaMap.get(schema); return temp.tablesIterator(); } public Iterator allTablesIterator() { Iterator schemas = userSchemaNameIterator(); Iterator tables = new WrapperIterator(); while (schemas.hasNext()) { String name = (String) schemas.next(); Iterator t = tablesIterator(name); tables = new WrapperIterator(tables, t); } return tables; } Iterator sequenceIterator(String schema) { Schema temp = (Schema) schemaMap.get(schema); return temp.sequencesIterator(); } public Iterator allSequencesIterator() { Iterator it = schemaMap.values().iterator(); Iterator sequences = new WrapperIterator(); while (it.hasNext()) { Schema temp = (Schema) it.next(); sequences = new WrapperIterator(sequences, temp.sequencesIterator()); } return sequences; } /** * Returns an HsqlArrayList containing references to all non-system * tables and views. This includes all tables and views registered with * this Database. */ public HsqlArrayList getAllTables() { Iterator schemas = userSchemaNameIterator(); HsqlArrayList alltables = new HsqlArrayList(); while (schemas.hasNext()) { String name = (String) schemas.next(); HashMappedList current = getTables(name); alltables.addAll(current.values()); } return alltables; } public HashMappedList getTables(String schema) { Schema temp = (Schema) schemaMap.get(schema); return temp.tableList; } /** * @throws HsqlException if exists. */ void checkUserViewNotExists(Session session, String viewName, String schema) throws HsqlException { boolean exists = database.schemaManager.findUserTable(session, viewName, schema) != null; if (exists) { throw Trace.error(Trace.VIEW_ALREADY_EXISTS, viewName); } } /** * @throws HsqlException if exists */ void checkUserTableNotExists(Session session, String tableName, String schema) throws HsqlException { boolean exists = findUserTable(session, tableName, schema) != null; if (exists) { throw Trace.error(Trace.TABLE_ALREADY_EXISTS, tableName); } } /** * Returns the specified user-defined table or view visible within the * context of the specified Session, or any system table of the given * name. It excludes any temp tables created in other Sessions. * Throws if the table does not exist in the context. */ public Table getTable(Session session, String name, String schema) throws HsqlException { Table t = findUserTable(session, name, schema); if (t == null) { if (!INFORMATION_SCHEMA.equals(schema)) { throw Trace.error(Trace.TABLE_NOT_FOUND); } if (database.dbInfo != null) { t = database.dbInfo.getSystemTable(session, name); } } if (t == null) { throw Trace.error(Trace.TABLE_NOT_FOUND, name); } return t; } /** * Returns the specified user-defined table or view visible within the * context of the specified Session. It excludes system tables and * any temp tables created in different Sessions. * Throws if the table does not exist in the context. */ public Table getUserTable(Session session, String name, String schema) throws HsqlException { Table t = findUserTable(session, name, schema); if (t == null) { throw Trace.error(Trace.TABLE_NOT_FOUND, name); } return t; } /** * Returns the specified user-defined table or view visible within the * context of the specified schema. It excludes system tables. * Returns null if the table does not exist in the context. */ Table findUserTable(Session session, String name, String schemaName) { Schema schema = (Schema) schemaMap.get(schemaName); if (schema == null) { return null; } for (int i = 0, tsize = schema.tableList.size(); i < tsize; i++) { Table t = (Table) schema.tableList.get(i); if (t.equals(session, name)) { return t; } } return null; } /** * Registers the specified table or view with this Database. */ void linkTable(Table t) { Schema schema = (Schema) schemaMap.get(t.getSchemaName()); schema.tableList.add(t.getName().name, t); } NumberSequence getSequence(String name, String schemaName) throws HsqlException { NumberSequence sequence = findSequence(name, schemaName); if (sequence == null) { throw Trace.error(Trace.SEQUENCE_NOT_FOUND, name); } return sequence; } /** * Returns the specified Sequence visible within the * context of the specified Session. */ public NumberSequence findSequence(String name, String schemaName) throws HsqlException { Schema schema = (Schema) schemaMap.get(schemaName); NumberSequence sequence = schema.sequenceManager.getSequence(name); return sequence; } /** * Returns the table that has an index with the given name and schema. */ Table findUserTableForIndex(Session session, String name, String schemaName) { Schema schema = (Schema) schemaMap.get(schemaName); HsqlName tablename = schema.indexNameList.getOwner(name); if (tablename == null) { return null; } return findUserTable(session, tablename.name, schemaName); } /** * Returns index of a table or view in the HsqlArrayList that * contains the table objects for this Database. * * @param table the Table object * @return the index of the specified table or view, or -1 if not found */ int getTableIndex(Table table) { Schema schema = (Schema) schemaMap.get(table.getSchemaName()); for (int i = 0, tsize = schema.tableList.size(); i < tsize; i++) { Table t = (Table) schema.tableList.get(i); if (t == table) { return i; } } return -1; } /** * Drops the index with the specified name. */ void dropIndex(Session session, String indexname, String schema, boolean ifExists) throws HsqlException { Table t = findUserTableForIndex(session, indexname, schema); if (t == null) { if (ifExists) { return; } else { throw Trace.error(Trace.INDEX_NOT_FOUND, indexname); } } t.checkDropIndex(indexname, null, false); session.commit(); session.setScripting(true); TableWorks tw = new TableWorks(session, t); tw.dropIndex(indexname); } //------------ name management /** * Checks if a Trigger with given name either exists or does not, based on * the value of the argument, yes. */ void checkTriggerExists(String name, String schemaName, boolean yes) throws HsqlException { Schema schema = (Schema) schemaMap.get(schemaName); boolean exists = schema.triggerNameList.containsName(name); if (exists != yes) { int code = yes ? Trace.TRIGGER_NOT_FOUND : Trace.TRIGGER_ALREADY_EXISTS; throw Trace.error(code, name); } } void registerTriggerName(String name, HsqlName tableName) throws HsqlException { Schema schema = (Schema) schemaMap.get(tableName.schema.name); schema.triggerNameList.addName(name, tableName, Trace.TRIGGER_ALREADY_EXISTS); } void checkIndexExists(String name, String schemaName, boolean yes) throws HsqlException { Schema schema = (Schema) schemaMap.get(schemaName); boolean exists = schema.indexNameList.containsName(name); if (exists != yes) { int code = yes ? Trace.INDEX_NOT_FOUND : Trace.INDEX_ALREADY_EXISTS; throw Trace.error(code, name); } } void registerIndexName(String name, HsqlName tableName) throws HsqlException { Schema schema = (Schema) schemaMap.get(tableName.schema.name); schema.indexNameList.addName(name, tableName, Trace.INDEX_ALREADY_EXISTS); } void removeIndexName(String name, HsqlName tableName) throws HsqlException { Schema schema = (Schema) schemaMap.get(tableName.schema.name); schema.indexNameList.removeName(name); } void removeIndexNames(HsqlName tableName) { Schema schema = (Schema) schemaMap.get(tableName.schema.name); schema.indexNameList.removeOwner(tableName); } void renameIndex(String oldName, String newName, HsqlName tableName) throws HsqlException { Schema schema = (Schema) schemaMap.get(tableName.schema.name); schema.indexNameList.rename(oldName, newName, Trace.INDEX_ALREADY_EXISTS); } void checkConstraintExists(String name, String schemaName, boolean yes) throws HsqlException { Schema schema = (Schema) schemaMap.get(schemaName); boolean exists = schema.constraintNameList.containsName(name); if (exists != yes) { int code = yes ? Trace.CONSTRAINT_NOT_FOUND : Trace.CONSTRAINT_ALREADY_EXISTS; throw Trace.error(code, name); } } void registerConstraintName(String name, HsqlName tableName) throws HsqlException { Schema schema = (Schema) schemaMap.get(tableName.schema.name); schema.constraintNameList.addName(name, tableName, Trace.CONSTRAINT_ALREADY_EXISTS); } void removeConstraintName(String name, HsqlName tableName) throws HsqlException { Schema schema = (Schema) schemaMap.get(tableName.schema.name); schema.constraintNameList.removeName(name); } void removeConstraintNames(HsqlName tableName) { Schema schema = (Schema) schemaMap.get(tableName.schema.name); schema.constraintNameList.removeOwner(tableName); } // sequence NumberSequence createSequence(HsqlName hsqlname, long start, long increment, int type) throws HsqlException { Schema schema = (Schema) schemaMap.get(hsqlname.schema.name); return schema.sequenceManager.createSequence(hsqlname, start, increment, type); } void dropSequence(NumberSequence sequence) throws HsqlException { Schema schema = (Schema) schemaMap.get(sequence.getSchemaName()); schema.sequenceManager.dropSequence(sequence.getName().name); } void logSequences(Session session, Logger logger) throws HsqlException { for (int i = 0, size = schemaMap.size(); i < size; i++) { Schema schema = (Schema) schemaMap.get(i); schema.sequenceManager.logSequences(session, logger); } } /** * Clear copies of a temporary table from all sessions apart from one. */ void clearTempTables(Session exclude, Table table) { Session[] sessions = database.sessionManager.getAllSessions(); Index[] indexes = table.getIndexes(); for (int i = 0; i < sessions.length; i++) { if (sessions[i] != exclude) { for (int j = 0; j < indexes.length; j++) { sessions[i].dropIndex(indexes[j].getName(), false); } } } } /** * Drops the specified user-defined view or table from this Database * object.

    * * The process of dropping a table or view includes: *

      *
    1. checking that the specified Session's currently connected User * has the right to perform this operation and refusing to proceed if * not by throwing. *
    2. checking for referential constraints that conflict with this * operation and refusing to proceed if they exist by throwing.
    3. * *
    4. removing the specified Table from this Database object. *
    5. removing any exported foreign keys Constraint objects held by * any tables referenced by the table to be dropped. This is especially * important so that the dropped Table ceases to be referenced, * eventually allowing its full garbage collection. *
    6. *
    *

    * * @param name of the table or view to drop * @param ifExists if true and if the Table to drop does not exist, fail * silently, else throw * @param isView true if the name argument refers to a View * @param session the connected context in which to perform this * operation * @throws HsqlException if any of the checks listed above fail */ void dropTable(Session session, String name, String schemaName, boolean ifExists, boolean isView, boolean cascade) throws HsqlException { Table table = null; int dropIndex = -1; Schema schema = (Schema) schemaMap.get(schemaName); for (int i = 0; i < schema.tableList.size(); i++) { table = (Table) schema.tableList.get(i); if (table.equals(session, name) && isView == table.isView()) { dropIndex = i; break; } else { table = null; } } if (dropIndex == -1) { if (ifExists) { return; } else { throw Trace.error(isView ? Trace.VIEW_NOT_FOUND : Trace.TABLE_NOT_FOUND, name); } } session.checkAdmin(); session.checkDDLWrite(); // ft - concurrent session.commit(); dropTable(table, cascade); session.setScripting(true); } void dropTable(Table table, boolean cascade) throws HsqlException { Schema schema = (Schema) schemaMap.get(table.getSchemaName()); int dropIndex = schema.tableList.getIndex(table.getName().name); if (table.isView()) { checkCascadeDropViews((View) table, cascade); } else { checkCascadeDropReferenced(table, cascade); checkCascadeDropViews(table, cascade); } // get it again as table object might be a different one table = (Table) schema.tableList.remove(dropIndex); removeExportedKeys(table); database.getUserManager().removeDbObject(table.getName()); schema.triggerNameList.removeOwner(table.tableName); schema.indexNameList.removeOwner(table.tableName); schema.constraintNameList.removeOwner(table.tableName); table.dropTriggers(); table.drop(); } void setTable(int index, Table table) { Schema schema = (Schema) schemaMap.get(table.getSchemaName()); schema.tableList.set(index, table.getName().name, table); } void renameTable(Session session, Table table, String newName, boolean isQuoted) throws HsqlException { Schema schema = (Schema) schemaMap.get(table.tableName.schema.name); int i = schema.tableList.getIndex(table.tableName.name); checkCascadeDropViews(table, false); table.rename(session, newName, isQuoted); schema.tableList.setKey(i, newName); } /** * Throws if the table is referenced in a foreign key constraint. */ private void checkCascadeDropReferenced(Table table, boolean cascade) throws HsqlException { Constraint[] constraints = table.getConstraints(); Constraint currentConstraint = null; Table refTable = null; boolean isSelfRef = false; for (int i = constraints.length - 1; i >= 0; i--) { currentConstraint = constraints[i]; if (currentConstraint.getType() != Constraint.MAIN) { continue; } refTable = currentConstraint.getRef(); isSelfRef = (refTable != null && table.equals(refTable)); if (isSelfRef) { continue; } if (cascade) { Constraint refConst = refTable.getConstraint(currentConstraint.getFkName()); TableWorks tw = new TableWorks(null, refTable); tw.dropFKConstraint(refConst); constraints = table.constraintList; i = constraints.length; } else { throw Trace.error(Trace.TABLE_REFERENCED_CONSTRAINT, Trace.Database_dropTable, new Object[] { currentConstraint.getName().name, refTable.getName().name }); } } } /** * Throws if the view is referenced in a view. */ void checkCascadeDropViews(View view, boolean cascade) throws HsqlException { View[] views = getViewsWithView(view); if (views != null) { if (cascade) { // drop from end to avoid repeat drop for (int i = views.length - 1; i >= 0; i--) { dropTable(views[i], cascade); } } else { throw Trace.error(Trace.TABLE_REFERENCED_VIEW, views[0].getName().name); } } } /** * Throws if the table is referenced in a view. */ void checkCascadeDropViews(Table table, boolean cascade) throws HsqlException { View[] views = getViewsWithTable(table, null); if (views != null) { if (cascade) { // drop from end to avoid repeat drop for (int i = views.length - 1; i >= 0; i--) { dropTable(views[i], cascade); } } else { throw Trace.error(Trace.TABLE_REFERENCED_VIEW, views[0].getName().name); } } } /** * Throws if the sequence is referenced in a view. */ void checkCascadeDropViews(NumberSequence sequence, boolean cascade) throws HsqlException { View[] views = getViewsWithSequence(sequence); if (views != null) { if (cascade) { // drop from end to avoid repeat drop for (int i = views.length - 1; i >= 0; i--) { dropTable(views[i], cascade); } } else { throw Trace.error(Trace.SEQUENCE_REFERENCED_BY_VIEW, views[0].getName().name); } } } /** * Throws if the column is referenced in a view. */ void checkColumnIsInView(Table table, String column) throws HsqlException { View[] views = getViewsWithTable(table, column); if (views != null) { throw Trace.error(Trace.COLUMN_IS_REFERENCED, views[0].getName().name); } } /** * Returns an array of views that reference another view. */ private View[] getViewsWithView(View view) { HsqlArrayList list = null; Schema schema = (Schema) schemaMap.get(view.getSchemaName()); for (int i = 0; i < schema.tableList.size(); i++) { Table t = (Table) schema.tableList.get(i); if (t.isView()) { boolean found = ((View) t).hasView(view); if (found) { if (list == null) { list = new HsqlArrayList(); } list.add(t); } } } return list == null ? null : (View[]) list.toArray(new View[list.size()]); } /** * Returns an array of views that reference the specified table or * the specified column if column parameter is not null. */ private View[] getViewsWithTable(Table table, String column) { HsqlArrayList list = null; Iterator it = allTablesIterator(); while (it.hasNext()) { Table t = (Table) it.next(); if (t.isView()) { boolean found = column == null ? ((View) t).hasTable(table) : ((View) t).hasColumn(table, column); if (found) { if (list == null) { list = new HsqlArrayList(); } list.add(t); } } } return list == null ? null : (View[]) list.toArray(new View[list.size()]); } /** * Returns an array of views that reference a sequence. */ View[] getViewsWithSequence(NumberSequence sequence) { HsqlArrayList list = null; Iterator it = allTablesIterator(); while (it.hasNext()) { Table t = (Table) it.next(); if (t.isView()) { boolean found = ((View) t).hasSequence(sequence); if (found) { if (list == null) { list = new HsqlArrayList(); } list.add(t); } } } return list == null ? null : (View[]) list.toArray(new View[list.size()]); } /** * After addition or removal of columns and indexes all views that * reference the table should be recompiled. */ void recompileViews(Table table) throws HsqlException { View[] viewlist = getViewsWithTable(table, null); if (viewlist != null) { for (int i = 0; i < viewlist.length; i++) { String schema = viewlist[i].compileTimeSchema.name; if (!schemaExists(schema)) { schema = null; } Session session = database.sessionManager.getSysSession(schema, false); viewlist[i].compile(session); } } } /** * Removes any foreign key Constraint objects (exported keys) held by any * tables referenced by the specified table.

    * * This method is called as the last step of a successful call to * dropTable() in order to ensure that the dropped Table ceases to be * referenced when enforcing referential integrity. * * @param toDrop The table to which other tables may be holding keys. * This is a table that is in the process of being dropped. */ void removeExportedKeys(Table toDrop) { Schema schema = (Schema) schemaMap.get(toDrop.getSchemaName()); for (int i = 0; i < schema.tableList.size(); i++) { Table table = (Table) schema.tableList.get(i); for (int j = table.constraintList.length - 1; j >= 0; j--) { Table refTable = table.constraintList[j].getRef(); if (toDrop == refTable) { table.constraintList = (Constraint[]) ArrayUtil.toAdjustedArray( table.constraintList, null, j, -1); } } } } /** * Drops a trigger with the specified name in the given context. */ void dropTrigger(Session session, String name, String schemaName) throws HsqlException { Schema schema = (Schema) schemaMap.get(schemaName); boolean found = schema.triggerNameList.containsName(name); Trace.check(found, Trace.TRIGGER_NOT_FOUND, name); HsqlName tableName = (HsqlName) schema.triggerNameList.removeName(name); Table t = this.findUserTable(session, tableName.name, schemaName); t.dropTrigger(name); session.setScripting(true); } public class Schema { HsqlName name; DatabaseObjectNames triggerNameList; DatabaseObjectNames constraintNameList; DatabaseObjectNames indexNameList; SequenceManager sequenceManager; HashMappedList tableList; Schema(String name, boolean isquoted) { this.name = database.nameManager.newHsqlName(name, isquoted); triggerNameList = new DatabaseObjectNames(); indexNameList = new DatabaseObjectNames(); constraintNameList = new DatabaseObjectNames(); sequenceManager = new SequenceManager(); tableList = new HashMappedList(); } boolean isEmpty() { return sequenceManager.sequenceMap.isEmpty() && tableList.isEmpty(); } Iterator tablesIterator() { return tableList.values().iterator(); } Iterator sequencesIterator() { return sequenceManager.sequenceMap.values().iterator(); } void clearStructures() { if (tableList != null) { for (int i = 0; i < tableList.size(); i++) { Table table = (Table) tableList.get(i); table.dropTriggers(); } } triggerNameList = null; indexNameList = null; constraintNameList = null; sequenceManager = null; tableList = null; } } } hsqldb-1.8.0.10.orig/src/org/hsqldb/DatabaseCommandInterpreter.java0000644000175000017500000032173111016777004023556 0ustar renerene/* Copyright (c) 1995-2000, The Hypersonic SQL Group. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the Hypersonic SQL Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE HYPERSONIC SQL GROUP, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * This software consists of voluntary contributions made by many individuals * on behalf of the Hypersonic SQL Group. * * * For work added by the HSQL Development Group: * * Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb; import java.io.IOException; import java.io.LineNumberReader; import java.io.StringReader; import java.util.Locale; import org.hsqldb.HsqlNameManager.HsqlName; import org.hsqldb.lib.ArrayUtil; import org.hsqldb.lib.HashMappedList; import org.hsqldb.lib.HsqlArrayList; import org.hsqldb.lib.StringUtil; import org.hsqldb.lib.java.JavaSystem; import org.hsqldb.persist.HsqlDatabaseProperties; import org.hsqldb.scriptio.ScriptWriterBase; import org.hsqldb.scriptio.ScriptWriterText; import org.hsqldb.lib.StringConverter; /** * Provides SQL Interpreter services relative to a Session and * its Database. * * The core functionality of this class was inherited from Hypersonic and * extensively rewritten and extended in successive versions of HSQLDB. * * @author Thomas Mueller (Hypersonic SQL Group) * @version 1.8.0 * @since 1.7.2 */ // fredt@users 20020221 - patch 513005 by sqlbob@users (RMP) - various corrections // fredt@users 20020430 - patch 549741 by velichko - ALTER TABLE RENAME // fredt@users 20020405 - patch 1.7.0 - other ALTER TABLE statements // tony_lai@users 20020820 - patch 595099 - use user-defined PK name // tony_lai@users 20020820 - patch 595156 - violation of constraint name // fredt@users 20020912 - patch 1.7.1 by fredt - log alter statements // kloska@users 20021030 - patch 1.7.2 - ON UPDATE CASCADE | SET NULL | SET DEFAULT // kloska@users 20021112 - patch 1.7.2 - ON DELETE SET NULL | SET DEFAULT // boucherb@users 20020310 - disable ALTER TABLE DDL on VIEWs (avoid NPE) // fredt@users 20030314 - patch 1.7.2 by gilead@users - drop table if exists syntax // boucherb@users 20030425 - DDL methods are moved to DatabaseCommandInterpreter.java // boucherb@users 20030425 - refactoring DDL methods into smaller units // fredt@users 20030609 - support for ALTER COLUMN SET/DROP DEFAULT / RENAME TO // wondersonic@users 20031205 - IF EXISTS support for DROP INDEX // fredt@users 20031224 - support for CREATE SEQUENCE ... // fredt@users 20041209 - patch by tytar@users to set default table type class DatabaseCommandInterpreter { private Tokenizer tokenizer = new Tokenizer(); private Database database; private Session session; /** * Constructs a new DatabaseCommandInterpreter for the given Session * * @param s session */ DatabaseCommandInterpreter(Session s) { session = s; database = s.getDatabase(); } /** * Executes the SQL String. This method is always called from a block * synchronized on the database object. * * @param sql query * @return the result of executing the given SQL String */ Result execute(String sql) { Result result; String token; int cmd; JavaSystem.gc(); result = null; cmd = Token.UNKNOWNTOKEN; try { tokenizer.reset(sql); while (true) { tokenizer.setPartMarker(); session.setScripting(false); token = tokenizer.getSimpleToken(); if (token.length() == 0) { session.endSchemaDefinition(); break; } cmd = Token.get(token); if (cmd == Token.SEMICOLON) { session.endSchemaDefinition(); continue; } result = executePart(cmd, token); if (result.isError()) { session.endSchemaDefinition(); break; } if (session.getScripting()) { database.logger.writeToLog(session, tokenizer.getLastPart()); } } } catch (Throwable t) { try { if (session.isSchemaDefintion()) { HsqlName schemaName = session.getSchemaHsqlName(null); database.schemaManager.dropSchema(schemaName.name, true); database.logger.writeToLog(session, Token.T_DROP + ' ' + Token.T_SCHEMA + ' ' + schemaName.statementName + ' ' + Token.T_CASCADE); session.endSchemaDefinition(); } } catch (HsqlException e) {} result = new Result(t, tokenizer.getLastPart()); } return result == null ? Session.emptyUpdateCount : result; } private Result executePart(int cmd, String token) throws Throwable { Result result = Session.emptyUpdateCount; int brackets = 0; if (session.isSchemaDefintion()) { switch (cmd) { case Token.CREATE : case Token.GRANT : break; default : throw Trace.error(Trace.INVALID_IDENTIFIER, Trace.IN_SCHEMA_DEFINITION, new Object[]{ token }); } } switch (cmd) { case Token.OPENBRACKET : { Parser parser = new Parser(session, database, tokenizer); brackets = parser.parseOpenBracketsSelect() + 1; } case Token.SELECT : { Parser parser = new Parser(session, database, tokenizer); CompiledStatement cStatement = parser.compileSelectStatement(brackets); if (cStatement.parameters.length != 0) { Trace.doAssert( false, Trace.getMessage(Trace.ASSERT_DIRECT_EXEC_WITH_PARAM)); } result = session.sqlExecuteCompiledNoPreChecks(cStatement, null); break; } case Token.INSERT : { Parser parser = new Parser(session, database, tokenizer); CompiledStatement cStatement = parser.compileInsertStatement(); if (cStatement.parameters.length != 0) { Trace.doAssert( false, Trace.getMessage(Trace.ASSERT_DIRECT_EXEC_WITH_PARAM)); } result = session.sqlExecuteCompiledNoPreChecks(cStatement, null); break; } case Token.UPDATE : { Parser parser = new Parser(session, database, tokenizer); CompiledStatement cStatement = parser.compileUpdateStatement(); if (cStatement.parameters.length != 0) { Trace.doAssert( false, Trace.getMessage(Trace.ASSERT_DIRECT_EXEC_WITH_PARAM)); } result = session.sqlExecuteCompiledNoPreChecks(cStatement, null); break; } case Token.DELETE : { Parser parser = new Parser(session, database, tokenizer); CompiledStatement cStatement = parser.compileDeleteStatement(); if (cStatement.parameters.length != 0) { Trace.doAssert( false, Trace.getMessage(Trace.ASSERT_DIRECT_EXEC_WITH_PARAM)); } result = session.sqlExecuteCompiledNoPreChecks(cStatement, null); break; } case Token.CALL : { Parser parser = new Parser(session, database, tokenizer); CompiledStatement cStatement = parser.compileCallStatement(); if (cStatement.parameters.length != 0) { Trace.doAssert( false, Trace.getMessage(Trace.ASSERT_DIRECT_EXEC_WITH_PARAM)); } result = session.sqlExecuteCompiledNoPreChecks(cStatement, null); break; } case Token.SET : processSet(); break; case Token.COMMIT : processCommit(); break; case Token.ROLLBACK : processRollback(); break; case Token.SAVEPOINT : processSavepoint(); break; case Token.RELEASE : processReleaseSavepoint(); break; case Token.CREATE : processCreate(); database.setMetaDirty(false); break; case Token.ALTER : processAlter(); database.setMetaDirty(true); break; case Token.DROP : processDrop(); database.setMetaDirty(true); break; case Token.GRANT : processGrantOrRevoke(true); database.setMetaDirty(false); break; case Token.REVOKE : processGrantOrRevoke(false); database.setMetaDirty(true); break; case Token.CONNECT : processConnect(); database.setMetaDirty(false); session.setScripting(false); break; case Token.DISCONNECT : processDisconnect(); session.setScripting(true); break; case Token.SCRIPT : result = processScript(); break; case Token.SHUTDOWN : processShutdown(); break; case Token.CHECKPOINT : processCheckpoint(); break; case Token.EXPLAIN : result = processExplainPlan(); break; default : throw Trace.error(Trace.UNEXPECTED_TOKEN, token); } return result; } /** * Responsible for parsing and executing the SCRIPT SQL statement * * @return either an empty result or one in which each row is a DDL or DML * @throws IOException * @throws HsqlException */ private Result processScript() throws IOException, HsqlException { String token = tokenizer.getString(); ScriptWriterText dsw = null; session.checkAdmin(); try { if (tokenizer.wasValue()) { if (tokenizer.getType() != Types.VARCHAR) { throw Trace.error(Trace.INVALID_IDENTIFIER); } dsw = new ScriptWriterText(database, token, true, true, true); dsw.writeAll(); return new Result(ResultConstants.UPDATECOUNT); } else { tokenizer.back(); return DatabaseScript.getScript(database, false); } } finally { if (dsw != null) { dsw.close(); } } } /** * Responsible for handling CREATE ... * * All CREATE command require an ADMIN user except:

    * *

         * CREATE TEMP [MEMORY] TABLE
         * 
    * * @throws HsqlException */ private void processCreate() throws HsqlException { boolean unique = false; int tableType; boolean isTempTable = false; String token; session.checkAdmin(); session.checkDDLWrite(); session.setScripting(true); if (tokenizer.isGetThis(Token.T_GLOBAL)) { tokenizer.getThis(Token.T_TEMPORARY); isTempTable = true; } else if (tokenizer.isGetThis(Token.T_TEMP)) { isTempTable = true; } else if (tokenizer.isGetThis(Token.T_TEMPORARY)) { isTempTable = true; } token = tokenizer.getSimpleToken(); switch (Token.get(token)) { // table case Token.MEMORY : tokenizer.getThis(Token.T_TABLE); case Token.TABLE : tableType = isTempTable ? Table.TEMP_TABLE : database.getDefaultTableType(); processCreateTable(tableType); return; case Token.CACHED : if (isTempTable) { throw Trace.error(Trace.UNEXPECTED_TOKEN, token); } tokenizer.getThis(Token.T_TABLE); processCreateTable(Table.CACHED_TABLE); return; case Token.TEXT : if (isTempTable) { throw Trace.error(Trace.UNEXPECTED_TOKEN, token); } tokenizer.getThis(Token.T_TABLE); processCreateTable(Table.TEXT_TABLE); return; default : if (isTempTable) { throw Trace.error(Trace.UNEXPECTED_TOKEN, token); } } switch (Token.get(token)) { // other objects case Token.ALIAS : processCreateAlias(); break; case Token.SEQUENCE : processCreateSequence(); break; case Token.SCHEMA : session.setScripting(false); processCreateSchema(); break; case Token.TRIGGER : processCreateTrigger(); break; case Token.USER : processCreateUser(); break; case Token.ROLE : database.getGranteeManager().addRole(getUserIdentifier()); break; case Token.VIEW : processCreateView(); break; // index case Token.UNIQUE : unique = true; tokenizer.getThis(Token.T_INDEX); //fall thru case Token.INDEX : processCreateIndex(unique); break; default : { throw Trace.error(Trace.UNEXPECTED_TOKEN, token); } } } /** * Process a bracketed column list as used in the declaration of SQL * CONSTRAINTS and return an array containing the indexes of the columns * within the table. * * @param t table that contains the columns * @return column index map * @throws HsqlException if a column is not found or is duplicate */ private int[] processColumnList(Table t, boolean acceptAscDesc) throws HsqlException { HashMappedList list = Parser.processColumnList(tokenizer, acceptAscDesc); int size = list.size(); int[] col = new int[size]; for (int i = 0; i < size; i++) { col[i] = t.getColumnNr((String) list.getKey(i)); } return col; } /** * Responsible for handling the execution of CREATE TRIGGER SQL * statements.

    * * typical sql is: CREATE TRIGGER tr1 AFTER INSERT ON tab1 CALL "pkg.cls" * * @throws HsqlException */ private void processCreateTrigger() throws HsqlException { Table t; boolean isForEach; boolean isNowait; int queueSize; String triggerName; boolean isQuoted; String sWhen; String sOper; String tableName; String token; String className; TriggerDef td; Trigger o; triggerName = tokenizer.getName(); String schemaname = tokenizer.getLongNameFirst(); database.schemaManager.checkTriggerExists(triggerName, session.getSchemaNameForWrite(schemaname), false); isQuoted = tokenizer.wasQuotedIdentifier(); isForEach = false; isNowait = false; queueSize = TriggerDef.getDefaultQueueSize(); sWhen = tokenizer.getSimpleToken(); sOper = tokenizer.getSimpleToken(); tokenizer.getThis(Token.T_ON); tableName = tokenizer.getName(); if (schemaname == null) { schemaname = session.getSchemaNameForWrite(tokenizer.getLongNameFirst()); } else if (!schemaname.equals( session.getSchemaNameForWrite(tokenizer.getLongNameFirst()))) { throw Trace.error(Trace.INVALID_SCHEMA_NAME_NO_SUBCLASS); } t = database.schemaManager.getUserTable(session, tableName, schemaname); if (t.isView()) { throw Trace.error(Trace.NOT_A_TABLE); } session.setScripting(true); // "FOR EACH ROW" or "CALL" token = tokenizer.getSimpleToken(); if (token.equals(Token.T_FOR)) { token = tokenizer.getSimpleToken(); if (token.equals(Token.T_EACH)) { token = tokenizer.getSimpleToken(); if (token.equals(Token.T_ROW)) { isForEach = true; // should be 'NOWAIT' or 'QUEUE' or 'CALL' token = tokenizer.getSimpleToken(); } else { throw Trace.error(Trace.UNEXPECTED_END_OF_COMMAND, token); } } else { throw Trace.error(Trace.UNEXPECTED_END_OF_COMMAND, token); } } if (token.equals(Token.T_NOWAIT)) { isNowait = true; // should be 'CALL' or 'QUEUE' token = tokenizer.getSimpleToken(); } if (token.equals(Token.T_QUEUE)) { queueSize = tokenizer.getInt(); // should be 'CALL' token = tokenizer.getSimpleToken(); } if (!token.equals(Token.T_CALL)) { throw Trace.error(Trace.UNEXPECTED_END_OF_COMMAND, token); } className = tokenizer.getSimpleName(); if (!tokenizer.wasQuotedIdentifier()) { throw Trace.error(Trace.UNEXPECTED_END_OF_COMMAND, className); } HsqlName name = database.nameManager.newHsqlName(triggerName, isQuoted); td = new TriggerDef(name, sWhen, sOper, isForEach, t, className, isNowait, queueSize, database.classLoader); t.addTrigger(td); if (td.isValid()) { try { // start the trigger thread td.start(); } catch (Exception e) { throw Trace.error(Trace.UNKNOWN_FUNCTION, e.toString()); } } database.schemaManager.registerTriggerName(triggerName, t.getName()); // -- } private Column processCreateColumn() throws HsqlException { String token = tokenizer.getSimpleName(); boolean isQuoted = tokenizer.wasQuotedIdentifier(); HsqlName hsqlName = database.nameManager.newHsqlName(token, isQuoted); return processCreateColumn(hsqlName); } /** * Responsible for handling the creation of table columns during the * process of executing CREATE TABLE DDL statements. * * @param hsqlName name of the column * @return a Column object with indicated attributes * @throws HsqlException */ private Column processCreateColumn(HsqlName hsqlName) throws HsqlException { boolean isIdentity = false; long identityStart = database.firstIdentity; long identityIncrement = 1; boolean isPrimaryKey = false; String typeName; int type; int length = 0; int scale = 0; boolean hasLength = false; boolean isNullable = true; Expression defaultExpr = null; String token; typeName = tokenizer.getSimpleToken(); type = Types.getTypeNr(typeName); if (type == Types.CHAR) { if (tokenizer.isGetThis(Token.T_VARYING)) { type = Types.VARCHAR; } } if (typeName.equals(Token.T_IDENTITY)) { isIdentity = true; isPrimaryKey = true; } // fredt - when SET IGNORECASE is in effect, all new VARCHAR columns are defined as VARCHAR_IGNORECASE if (type == Types.DOUBLE) { tokenizer.isGetThis(Token.T_PRECISION); } if (tokenizer.isGetThis(Token.T_OPENBRACKET)) { hasLength = true; length = tokenizer.getInt(); Trace.check(Types.acceptsPrecisionCreateParam(type), Trace.UNEXPECTED_TOKEN); if (type != Types.TIMESTAMP && type != Types.TIME && length == 0) { throw Trace.error(Trace.INVALID_SIZE_PRECISION); } if (tokenizer.isGetThis(Token.T_COMMA)) { Trace.check(Types.acceptsScaleCreateParam(type), Trace.UNEXPECTED_TOKEN); scale = tokenizer.getInt(); } tokenizer.getThis(Token.T_CLOSEBRACKET); } else if (type == Types.CHAR && database.sqlEnforceStrictSize) { length = 1; } else if (type == Types.VARCHAR && database.sqlEnforceStrictSize) { throw Trace.error(Trace.COLUMN_SIZE_REQUIRED); } /** * @todo fredt - drop support for SET IGNORECASE and replace the * type name with a qualifier specifying the case sensitivity of VARCHAR */ if (type == Types.VARCHAR && database.isIgnoreCase()) { type = Types.VARCHAR_IGNORECASE; } if (type == Types.FLOAT && length > 53) { throw Trace.error(Trace.NUMERIC_VALUE_OUT_OF_RANGE); } if (type == Types.TIMESTAMP) { if (!hasLength) { length = 6; } else if (length != 0 && length != 6) { throw Trace.error(Trace.NUMERIC_VALUE_OUT_OF_RANGE); } } if (type == Types.TIME) { if (length != 0) { throw Trace.error(Trace.NUMERIC_VALUE_OUT_OF_RANGE); } } token = tokenizer.getSimpleToken(); if (token.equals(Token.T_DEFAULT)) { defaultExpr = processCreateDefaultExpression(type, length, scale); token = tokenizer.getSimpleToken(); } else if (token.equals(Token.T_GENERATED)) { tokenizer.getThis(Token.T_BY); tokenizer.getThis(Token.T_DEFAULT); tokenizer.getThis(Token.T_AS); tokenizer.getThis(Token.T_IDENTITY); if (tokenizer.isGetThis(Token.T_OPENBRACKET)) { tokenizer.getThis(Token.T_START); tokenizer.getThis(Token.T_WITH); identityStart = tokenizer.getBigint(); if (tokenizer.isGetThis(Token.T_COMMA)) { tokenizer.getThis(Token.T_INCREMENT); tokenizer.getThis(Token.T_BY); identityIncrement = tokenizer.getBigint(); } tokenizer.getThis(Token.T_CLOSEBRACKET); } isIdentity = true; isPrimaryKey = true; token = tokenizer.getSimpleToken(); } // fredt@users - accept IDENTITY before or after NOT NULL if (token.equals(Token.T_IDENTITY)) { isIdentity = true; isPrimaryKey = true; token = tokenizer.getSimpleToken(); } if (token.equals(Token.T_NULL)) { token = tokenizer.getSimpleToken(); } else if (token.equals(Token.T_NOT)) { tokenizer.getThis(Token.T_NULL); isNullable = false; token = tokenizer.getSimpleToken(); } if (token.equals(Token.T_IDENTITY)) { if (isIdentity) { throw Trace.error(Trace.SECOND_PRIMARY_KEY, Token.T_IDENTITY); } isIdentity = true; isPrimaryKey = true; token = tokenizer.getSimpleToken(); } if (token.equals(Token.T_PRIMARY)) { tokenizer.getThis(Token.T_KEY); isPrimaryKey = true; } else { tokenizer.back(); } // make sure IDENTITY and DEFAULT are not used together if (isIdentity && defaultExpr != null) { throw Trace.error(Trace.UNEXPECTED_TOKEN, Token.T_DEFAULT); } Column column = new Column(hsqlName, isNullable, type, length, scale, isPrimaryKey, defaultExpr); column.setIdentity(isIdentity, identityStart, identityIncrement); return column; } /** * @param type data type of column * @param length maximum length of column * @throws HsqlException * @return new Expression */ private Expression processCreateDefaultExpression(int type, int length, int scale) throws HsqlException { if (type == Types.OTHER) { throw Trace.error(Trace.WRONG_DEFAULT_CLAUSE); } Parser parser = new Parser(session, database, tokenizer); Expression expr = parser.readDefaultClause(type); expr.resolveTypes(session); int newType = expr.getType(); if (newType == Expression.VALUE || newType == Expression.TRUE || newType == Expression.FALSE || (newType == Expression.FUNCTION && expr.function.isSimple)) { Object defValTemp; try { defValTemp = expr.getValue(session, type); } catch (HsqlException e) { throw Trace.error(Trace.WRONG_DEFAULT_CLAUSE); } if (defValTemp != null && database.sqlEnforceStrictSize) { try { Column.enforceSize(defValTemp, type, length, scale, true); } catch (HsqlException e) { // default value is too long for fixed size column throw Trace.error(Trace.WRONG_DEFAULT_CLAUSE); } } return expr; } throw Trace.error(Trace.WRONG_DEFAULT_CLAUSE); } public static void checkBooleanDefault(String s, int type) throws HsqlException { if (type != Types.BOOLEAN || s == null) { return; } s = s.toUpperCase(); if (s.equals(Token.T_TRUE) || s.equals(Token.T_FALSE)) { return; } if (s.equals("0") || s.equals("1")) { return; } throw Trace.error(Trace.WRONG_DEFAULT_CLAUSE, s); } /** * Responsible for handling constraints section of CREATE TABLE ... * * @param t table * @param constraint CONSTRAINT keyword used * @param primarykeycolumn primary columns * @throws HsqlException * @return list of constraints */ private HsqlArrayList processCreateConstraints(Table t, boolean constraint, int[] primarykeycolumn) throws HsqlException { String token; HsqlArrayList tcList; Constraint tempConst; HsqlName pkHsqlName; // fredt@users 20020225 - comment // HSQLDB relies on primary index to be the first one defined // and needs original or system added primary key before any // non-unique index is created tcList = new HsqlArrayList(); tempConst = new Constraint(null, primarykeycolumn, null, null, Constraint.MAIN, Constraint.NO_ACTION, Constraint.NO_ACTION); // tony_lai@users 20020820 - patch 595099 pkHsqlName = null; tcList.add(tempConst); if (!constraint) { return tcList; } while (true) { HsqlName cname = null; if (tokenizer.isGetThis(Token.T_CONSTRAINT)) { token = tokenizer.getName(); String constraintSchema = tokenizer.getLongNameFirst(); if (constraintSchema != null) { constraintSchema = session.getSchemaNameForWrite( tokenizer.getLongNameFirst()); if (!t.getSchemaName().equals(constraintSchema)) { throw Trace.error( Trace.INVALID_SCHEMA_NAME_NO_SUBCLASS, constraintSchema); } } cname = database.nameManager.newHsqlName(token, tokenizer.wasQuotedIdentifier()); } token = tokenizer.getSimpleToken(); switch (Token.get(token)) { case Token.PRIMARY : { tokenizer.getThis(Token.T_KEY); // tony_lai@users 20020820 - patch 595099 pkHsqlName = cname; int[] cols = processColumnList(t, false); Constraint mainConst; mainConst = (Constraint) tcList.get(0); if (mainConst.core.mainColArray != null) { if (!ArrayUtil.areEqual(mainConst.core.mainColArray, cols, cols.length, true)) { throw Trace.error(Trace.SECOND_PRIMARY_KEY); } } mainConst.core.mainColArray = cols; mainConst.constName = pkHsqlName; break; } case Token.UNIQUE : { int[] col = processColumnList(t, false); if (cname == null) { cname = database.nameManager.newAutoName("CT"); } tempConst = new Constraint(cname, col, null, null, Constraint.UNIQUE, Constraint.NO_ACTION, Constraint.NO_ACTION); tcList.add(tempConst); break; } case Token.FOREIGN : { tokenizer.getThis(Token.T_KEY); tempConst = processCreateFK(t, cname); if (tempConst.core.refColArray == null) { Constraint mainConst = (Constraint) tcList.get(0); tempConst.core.refColArray = mainConst.core.mainColArray; if (tempConst.core.refColArray == null) { throw Trace.error(Trace.CONSTRAINT_NOT_FOUND, Trace.TABLE_HAS_NO_PRIMARY_KEY); } } checkFKColumnDefaults(t, tempConst); t.checkColumnsMatch(tempConst.core.mainColArray, tempConst.core.refTable, tempConst.core.refColArray); tcList.add(tempConst); break; } case Token.CHECK : { if (cname == null) { cname = database.nameManager.newAutoName("CT"); } tempConst = new Constraint(cname, null, null, null, Constraint.CHECK, Constraint.NO_ACTION, Constraint.NO_ACTION); processCreateCheckConstraintCondition(tempConst); tcList.add(tempConst); break; } } token = tokenizer.getSimpleToken(); if (token.equals(Token.T_COMMA)) { continue; } if (token.equals(Token.T_CLOSEBRACKET)) { break; } throw Trace.error(Trace.UNEXPECTED_TOKEN, token); } return tcList; } /** * Responsible for handling check constraints section of CREATE TABLE ... * * @param c check constraint * @throws HsqlException */ private void processCreateCheckConstraintCondition(Constraint c) throws HsqlException { tokenizer.getThis(Token.T_OPENBRACKET); Parser parser = new Parser(session, database, tokenizer); Expression condition = parser.parseExpression(); tokenizer.getThis(Token.T_CLOSEBRACKET); c.core.check = condition; } /** * Responsible for handling the execution CREATE TABLE SQL statements. * * @param type Description of the Parameter * @throws HsqlException */ private void processCreateTable(int type) throws HsqlException { String token = tokenizer.getName(); HsqlName schemaname = session.getSchemaHsqlNameForWrite(tokenizer.getLongNameFirst()); database.schemaManager.checkUserTableNotExists(session, token, schemaname.name); boolean isnamequoted = tokenizer.wasQuotedIdentifier(); int[] pkCols = null; int colIndex = 0; boolean constraint = false; Table t = newTable(type, token, isnamequoted, schemaname); tokenizer.getThis(Token.T_OPENBRACKET); while (true) { token = tokenizer.getString(); switch (Token.get(token)) { case Token.CONSTRAINT : case Token.PRIMARY : case Token.FOREIGN : case Token.UNIQUE : case Token.CHECK : // fredt@users : check for quoted reserved words used as column names constraint = !tokenizer.wasQuotedIdentifier() && !tokenizer.wasLongName(); } tokenizer.back(); if (constraint) { break; } Column newcolumn = processCreateColumn(); t.addColumn(newcolumn); if (newcolumn.isPrimaryKey()) { Trace.check(pkCols == null, Trace.SECOND_PRIMARY_KEY, newcolumn.columnName.name); pkCols = new int[]{ colIndex }; } token = tokenizer.getSimpleToken(); if (token.equals(Token.T_COMMA)) { colIndex++; continue; } if (token.equals(Token.T_CLOSEBRACKET)) { break; } throw Trace.error(Trace.UNEXPECTED_TOKEN, token); } HsqlArrayList tempConstraints = processCreateConstraints(t, constraint, pkCols); if (tokenizer.isGetThis(Token.T_ON)) { if (!t.isTemp) { throw Trace.error(Trace.UNEXPECTED_TOKEN, Token.T_ON); } tokenizer.getThis(Token.T_COMMIT); token = tokenizer.getSimpleToken(); if (token.equals(Token.T_DELETE)) {} else if (token.equals(Token.T_PRESERVE)) { t.onCommitPreserve = true; } else { throw Trace.error(Trace.UNEXPECTED_TOKEN, token); } tokenizer.getThis(Token.T_ROWS); } try { session.commit(); Constraint primaryConst = (Constraint) tempConstraints.get(0); t.createPrimaryKey(null, primaryConst.core.mainColArray, true); if (primaryConst.core.mainColArray != null) { if (primaryConst.constName == null) { primaryConst.constName = t.makeSysPKName(); } Constraint newconstraint = new Constraint(primaryConst.constName, t, t.getPrimaryIndex(), Constraint.PRIMARY_KEY); t.addConstraint(newconstraint); database.schemaManager.registerConstraintName( primaryConst.constName.name, t.getName()); } for (int i = 1; i < tempConstraints.size(); i++) { Constraint tempConst = (Constraint) tempConstraints.get(i); if (tempConst.constType == Constraint.UNIQUE) { TableWorks tableWorks = new TableWorks(session, t); tableWorks.createUniqueConstraint( tempConst.core.mainColArray, tempConst.constName); t = tableWorks.getTable(); } if (tempConst.constType == Constraint.FOREIGN_KEY) { TableWorks tableWorks = new TableWorks(session, t); tableWorks.createForeignKey(tempConst.core.mainColArray, tempConst.core.refColArray, tempConst.constName, tempConst.core.refTable, tempConst.core.deleteAction, tempConst.core.updateAction); t = tableWorks.getTable(); } if (tempConst.constType == Constraint.CHECK) { TableWorks tableWorks = new TableWorks(session, t); tableWorks.createCheckConstraint(tempConst, tempConst.constName); t = tableWorks.getTable(); } } database.schemaManager.linkTable(t); } catch (HsqlException e) { // fredt@users 20020225 - comment // if a HsqlException is thrown while creating table, any foreign key that has // been created leaves it modification to the expTable in place // need to undo those modifications. This should not happen in practice. database.schemaManager.removeExportedKeys(t); database.schemaManager.removeIndexNames(t.tableName); database.schemaManager.removeConstraintNames(t.tableName); throw e; } } // fredt@users 20020221 - patch 520213 by boucherb@users - self reference FK // allows foreign keys that reference a column in the same table /** * @param t table * @param cname foreign key name * @throws HsqlException * @return constraint */ private Constraint processCreateFK(Table t, HsqlName cname) throws HsqlException { int[] localcol; int[] expcol; String expTableName; Table expTable; String token; localcol = processColumnList(t, false); tokenizer.getThis(Token.T_REFERENCES); expTableName = tokenizer.getName(); String constraintSchema = tokenizer.getLongNameFirst(); if (constraintSchema != null) { constraintSchema = session.getSchemaNameForWrite(tokenizer.getLongNameFirst()); if (!t.getSchemaName().equals(constraintSchema)) { throw Trace.error(Trace.INVALID_SCHEMA_NAME_NO_SUBCLASS, constraintSchema); } } if (t.getName().name.equals(expTableName)) { expTable = t; } else { expTable = database.schemaManager.getTable(session, expTableName, t.getSchemaName()); } expcol = null; token = tokenizer.getSimpleToken(); tokenizer.back(); if (token.equals(Token.T_OPENBRACKET)) { expcol = processColumnList(expTable, false); } else { if (expTable.getPrimaryKey() == null) { // getPrimaryKey() == null is true while creating the table // fredt - FK statement is part of CREATE TABLE and is self-referencing // reference must be to same table being created // it is resolved in the calling method Trace.check(t == expTable, Trace.TABLE_HAS_NO_PRIMARY_KEY); } else { if (expTable.hasPrimaryKey()) { expcol = expTable.getPrimaryKey(); } else { throw Trace.error(Trace.CONSTRAINT_NOT_FOUND, Trace.TABLE_HAS_NO_PRIMARY_KEY); } } } token = tokenizer.getSimpleToken(); // -- In a while loop we parse a maximium of two // -- "ON" statements following the foreign key // -- definition this can be // -- ON [UPDATE|DELETE] [NO ACTION|RESTRICT|CASCADE|SET [NULL|DEFAULT]] int deleteAction = Constraint.NO_ACTION; int updateAction = Constraint.NO_ACTION; while (token.equals(Token.T_ON)) { token = tokenizer.getSimpleToken(); if (deleteAction == Constraint.NO_ACTION && token.equals(Token.T_DELETE)) { token = tokenizer.getSimpleToken(); if (token.equals(Token.T_SET)) { token = tokenizer.getSimpleToken(); if (token.equals(Token.T_DEFAULT)) { deleteAction = Constraint.SET_DEFAULT; } else if (token.equals(Token.T_NULL)) { deleteAction = Constraint.SET_NULL; } else { throw Trace.error(Trace.UNEXPECTED_TOKEN, token); } } else if (token.equals(Token.T_CASCADE)) { deleteAction = Constraint.CASCADE; } else if (token.equals(Token.T_RESTRICT)) { // LEGACY compatibility/usability // - same as NO ACTION or nothing at all } else { tokenizer.matchThis(Token.T_NO); tokenizer.getThis(Token.T_ACTION); } } else if (updateAction == Constraint.NO_ACTION && token.equals(Token.T_UPDATE)) { token = tokenizer.getSimpleToken(); if (token.equals(Token.T_SET)) { token = tokenizer.getSimpleToken(); if (token.equals(Token.T_DEFAULT)) { updateAction = Constraint.SET_DEFAULT; } else if (token.equals(Token.T_NULL)) { updateAction = Constraint.SET_NULL; } else { throw Trace.error(Trace.UNEXPECTED_TOKEN, token); } } else if (token.equals(Token.T_CASCADE)) { updateAction = Constraint.CASCADE; } else if (token.equals(Token.T_RESTRICT)) { // LEGACY compatibility/usability // - same as NO ACTION or nothing at all } else { tokenizer.matchThis(Token.T_NO); tokenizer.getThis(Token.T_ACTION); } } else { throw Trace.error(Trace.UNEXPECTED_TOKEN, token); } token = tokenizer.getSimpleToken(); } tokenizer.back(); if (cname == null) { cname = database.nameManager.newAutoName("FK"); } return new Constraint(cname, localcol, expTable, expcol, Constraint.FOREIGN_KEY, deleteAction, updateAction); } /** * Responsible for handling the execution CREATE VIEW SQL statements. * * @throws HsqlException */ private void processCreateView() throws HsqlException { String name = tokenizer.getName(); HsqlName schemaname = session.getSchemaHsqlNameForWrite(tokenizer.getLongNameFirst()); int logposition = tokenizer.getPartMarker(); database.schemaManager.checkUserViewNotExists(session, name, schemaname.name); HsqlName viewHsqlName = database.nameManager.newHsqlName(name, tokenizer.wasQuotedIdentifier()); viewHsqlName.schema = schemaname; HsqlName[] colList = null; if (tokenizer.isGetThis(Token.T_OPENBRACKET)) { try { HsqlArrayList list = Parser.getColumnNames(database, null, tokenizer, true); colList = new HsqlName[list.size()]; colList = (HsqlName[]) list.toArray(colList); } catch (HsqlException e) { // fredt - a bug in 1.8.0.0 and previous versions causes view // definitions to script without double quotes around column names // in certain cases; the workaround here discards the column // names if (database.isStoredFileAccess() && session.isProcessingScript()) { while (true) { String token = tokenizer.getString(); if (token.equals(Token.T_CLOSEBRACKET) || token.equals("")) { break; } } } else { throw e; } } } tokenizer.getThis(Token.T_AS); tokenizer.setPartMarker(); Parser parser = new Parser(session, database, tokenizer); int brackets = parser.parseOpenBracketsSelect(); Select select; // accept ORDER BY or ORDRY BY with LIMIT - accept unions select = parser.parseSelect(brackets, true, false, true, true); if (select.sIntoTable != null) { throw (Trace.error(Trace.INVALID_IDENTIFIER, Token.INTO)); } select.prepareResult(session); View view = new View(session, database, viewHsqlName, tokenizer.getLastPart(), colList); session.commit(); database.schemaManager.linkTable(view); tokenizer.setPartMarker(logposition); } /** * Responsible for handling tail of ALTER TABLE ... RENAME ... * @param t table * @throws HsqlException */ private void processAlterTableRename(Table t) throws HsqlException { String schema = t.getSchemaName(); String newName; boolean isquoted; // ensures that if temp table, it also belongs to this session /* if (!t.equals(session, name)) { throw Trace.error(Trace.TABLE_NOT_FOUND); } */ tokenizer.getThis(Token.T_TO); newName = tokenizer.getName(); String newSchema = tokenizer.getLongNameFirst(); isquoted = tokenizer.wasQuotedIdentifier(); newSchema = newSchema == null ? schema : session.getSchemaNameForWrite( newSchema); if (!schema.equals(newSchema)) { throw Trace.error(Trace.INVALID_SCHEMA_NAME_NO_SUBCLASS); } database.schemaManager.checkUserTableNotExists(session, newName, schema); session.commit(); session.setScripting(true); database.schemaManager.renameTable(session, t, newName, isquoted); } /** * Handles ALTER TABLE statements.

    * * ALTER TABLE RENAME TO * ALTER INDEX RENAME TO * * ALTER TABLE ADD CONSTRAINT FOREIGN KEY (, ...) * REFERENCE (, ...) [ON DELETE CASCADE] * * ALTER TABLE ADD CONSTRAINT UNIQUE (, ...) * * @throws HsqlException */ private void processAlter() throws HsqlException { String token; session.checkAdmin(); session.checkDDLWrite(); session.setScripting(true); token = tokenizer.getSimpleToken(); switch (Token.get(token)) { case Token.INDEX : { processAlterIndex(); break; } case Token.SCHEMA : { processAlterSchema(); break; } case Token.SEQUENCE : { processAlterSequence(); break; } case Token.TABLE : { processAlterTable(); break; } case Token.USER : { processAlterUser(); break; } default : { throw Trace.error(Trace.UNEXPECTED_TOKEN, token); } } } /** * Handles ALTER TABLE DDL. * * @throws HsqlException */ private void processAlterTable() throws HsqlException { String tableName = tokenizer.getName(); String schema = session.getSchemaNameForWrite(tokenizer.getLongNameFirst()); Table t = database.schemaManager.getUserTable(session, tableName, schema); String token; if (t.isView()) { throw Trace.error(Trace.NOT_A_TABLE); } session.setScripting(true); token = tokenizer.getSimpleToken(); switch (Token.get(token)) { case Token.RENAME : { processAlterTableRename(t); return; } case Token.ADD : { HsqlName cname = null; if (tokenizer.isGetThis(Token.T_CONSTRAINT)) { token = tokenizer.getName(); String constraintSchema = tokenizer.getLongNameFirst(); if (constraintSchema != null) { constraintSchema = session.getSchemaNameForWrite( tokenizer.getLongNameFirst()); if (!t.getSchemaName().equals(constraintSchema)) { throw Trace.error( Trace.INVALID_SCHEMA_NAME_NO_SUBCLASS, constraintSchema); } } cname = database.nameManager.newHsqlName(token, tokenizer.wasQuotedIdentifier()); } token = tokenizer.getString(); if (tokenizer.wasQuotedIdentifier() && tokenizer.wasSimpleName()) { tokenizer.back(); processAlterTableAddColumn(t); return; } if (!tokenizer.wasSimpleToken()) { throw Trace.error(Trace.UNEXPECTED_TOKEN, token); } switch (Token.get(token)) { case Token.FOREIGN : tokenizer.getThis(Token.T_KEY); processAlterTableAddForeignKeyConstraint(t, cname); return; case Token.UNIQUE : processAlterTableAddUniqueConstraint(t, cname); return; case Token.CHECK : processAlterTableAddCheckConstraint(t, cname); return; case Token.PRIMARY : tokenizer.getThis(Token.T_KEY); processAlterTableAddPrimaryKey(t, cname); return; default : if (cname != null) { throw Trace.error(Trace.UNEXPECTED_TOKEN, token); } tokenizer.back(); case Token.COLUMN : processAlterTableAddColumn(t); return; } } case Token.DROP : { token = tokenizer.getString(); if (tokenizer.wasQuotedIdentifier() && tokenizer.wasSimpleName()) { tokenizer.back(); processAlterTableDropColumn(t); return; } if (!tokenizer.wasSimpleToken()) { throw Trace.error(Trace.UNEXPECTED_TOKEN, token); } switch (Token.get(token)) { case Token.PRIMARY : tokenizer.getThis(Token.T_KEY); if (t.hasPrimaryKey()) { processAlterTableDropConstraint( t, t.getPrimaryConstraint().getName().name); } else { throw Trace.error(Trace.CONSTRAINT_NOT_FOUND, Trace.TABLE_HAS_NO_PRIMARY_KEY, new Object[] { "PRIMARY KEY", t.getName().name }); } return; case Token.CONSTRAINT : processAlterTableDropConstraint(t); return; default : tokenizer.back(); case Token.COLUMN : processAlterTableDropColumn(t); return; } } case Token.ALTER : { tokenizer.isGetThis(Token.T_COLUMN); processAlterColumn(t); return; } default : { throw Trace.error(Trace.UNEXPECTED_TOKEN, token); } } } /** * Handles ALTER COLUMN * * @param t table * @throws HsqlException */ private void processAlterColumn(Table t) throws HsqlException { String columnName = tokenizer.getSimpleName(); int columnIndex = t.getColumnNr(columnName); Column column = t.getColumn(columnIndex); String token = tokenizer.getSimpleToken(); switch (Token.get(token)) { case Token.RENAME : { tokenizer.getThis(Token.T_TO); processAlterColumnRename(t, column); return; } case Token.DROP : { tokenizer.getThis(Token.T_DEFAULT); TableWorks tw = new TableWorks(session, t); tw.setColDefaultExpression(columnIndex, null); return; } case Token.SET : { //4-8-2005 MarcH and HuugO ALTER TABLE ALTER COLUMN SET [NOT] NULL support added token = tokenizer.getSimpleToken(); if (token.equals(Token.T_NOT)) { tokenizer.getThis(Token.T_NULL); TableWorks tw = new TableWorks(session, t); tw.setColNullability(column, false); } else if (token.equals(Token.T_NULL)) { TableWorks tw = new TableWorks(session, t); tw.setColNullability(column, true); } else if (token.equals(Token.T_DEFAULT)) { //alter table alter column set default TableWorks tw = new TableWorks(session, t); int type = column.getType(); int length = column.getSize(); int scale = column.getScale(); Expression expr = processCreateDefaultExpression(type, length, scale); tw.setColDefaultExpression(columnIndex, expr); } else { throw Trace.error(Trace.UNEXPECTED_TOKEN, token); } return; } case Token.RESTART : { tokenizer.getThis(Token.T_WITH); long identityStart = tokenizer.getBigint(); int id = t.getIdentityColumn(); if (id == -1) { throw Trace.error(Trace.OPERATION_NOT_SUPPORTED); } t.identitySequence.reset(identityStart); return; } default : { tokenizer.back(); processAlterColumnType(t, column); } } } private void processAlterColumnType(Table table, Column oldCol) throws HsqlException { Column newCol = processCreateColumn(oldCol.columnName); TableWorks tw = new TableWorks(session, table); tw.reTypeColumn(oldCol, newCol); } /** * Responsible for handling tail of ALTER COLUMN ... RENAME ... * @param t table * @param column column * @throws HsqlException */ private void processAlterColumnRename(Table t, Column column) throws HsqlException { String newName = tokenizer.getSimpleName(); boolean isquoted = tokenizer.wasQuotedIdentifier(); if (t.findColumn(newName) > -1) { throw Trace.error(Trace.COLUMN_ALREADY_EXISTS, newName); } t.database.schemaManager.checkColumnIsInView(t, column.columnName.name); session.commit(); session.setScripting(true); t.renameColumn(column, newName, isquoted); } /** * Handles ALTER INDEX. * * @throws HsqlException */ private void processAlterIndex() throws HsqlException { // only the one supported operation, so far processAlterIndexRename(); } private void processAlterSchema() throws HsqlException { // only the one supported operation, so far processAlterSchemaRename(); } /** * Responsible for handling parse and execute of SQL DROP DDL * * @throws HsqlException */ private void processDrop() throws HsqlException { String token; boolean isview; session.checkReadWrite(); session.checkAdmin(); session.setScripting(true); token = tokenizer.getSimpleToken(); isview = false; switch (Token.get(token)) { case Token.INDEX : { processDropIndex(); break; } case Token.SCHEMA : { processDropSchema(); break; } case Token.SEQUENCE : { processDropSequence(); break; } case Token.TRIGGER : { processDropTrigger(); break; } case Token.USER : { processDropUser(); break; } case Token.ROLE : { database.getGranteeManager().dropRole( tokenizer.getSimpleName()); break; } case Token.VIEW : { isview = true; } //fall thru case Token.TABLE : { processDropTable(isview); break; } default : { throw Trace.error(Trace.UNEXPECTED_TOKEN, token); } } } /** * Responsible for handling the execution of GRANT and REVOKE SQL * statements. * * @param grant true if grant, false if revoke * @throws HsqlException */ private void processGrantOrRevoke(boolean grant) throws HsqlException { int right; Object accessKey; String token; session.checkAdmin(); session.checkDDLWrite(); session.setScripting(true); right = 0; token = tokenizer.getSimpleToken(); tokenizer.back(); if (!GranteeManager.validRightString(token)) { processRoleGrantOrRevoke(grant); return; } do { token = tokenizer.getSimpleToken(); right |= GranteeManager.getCheckRight(token); } while (tokenizer.isGetThis(Token.T_COMMA)); tokenizer.getThis(Token.T_ON); accessKey = null; if (tokenizer.isGetThis(Token.T_CLASS)) { accessKey = tokenizer.getSimpleName(); if (!tokenizer.wasQuotedIdentifier()) { throw Trace.error(Trace.QUOTED_IDENTIFIER_REQUIRED); } } else { token = tokenizer.getName(); String schema = session.getSchemaName(tokenizer.getLongNameFirst()); Table t = database.schemaManager.getTable(session, token, schema); accessKey = t.getName(); session.setScripting(true); } tokenizer.getThis(grant ? Token.T_TO : Token.T_FROM); token = getUserIdentifier(); GranteeManager gm = database.getGranteeManager(); if (grant) { gm.grant(token, accessKey, right); } else { gm.revoke(token, accessKey, right); } } /** * Responsible for handling CONNECT * * @throws HsqlException */ private void processConnect() throws HsqlException { String userName; String password; User user; tokenizer.getThis(Token.T_USER); userName = getUserIdentifier(); if (tokenizer.isGetThis(Token.T_PASSWORD)) { // legacy log statement or connect statement issued by user password = getPassword(); user = database.getUserManager().getUser(userName, password); session.commit(); session.setUser(user); database.logger.logConnectUser(session); } else if (session.isProcessingLog) { // processing log statement // do not change the user, as isSys() must remain true when processing log session.commit(); } else { // force throw if not log statement tokenizer.getThis(Token.T_PASSWORD); } } /** * Responsible for handling the execution of SET SQL statements * * @throws HsqlException */ private void processSet() throws HsqlException { String token; session.setScripting(true); token = tokenizer.getSimpleToken(); switch (Token.get(token)) { case Token.PROPERTY : { HsqlDatabaseProperties p; session.checkAdmin(); token = tokenizer.getSimpleName(); if (!tokenizer.wasQuotedIdentifier()) { throw Trace.error(Trace.QUOTED_IDENTIFIER_REQUIRED); } p = database.getProperties(); boolean isboolean = p.isBoolean(token); boolean isintegral = p.isIntegral(token); boolean isstring = p.isString(token); Trace.check(isboolean || isintegral || isstring, Trace.ACCESS_IS_DENIED, token); int type = isboolean ? Types.BOOLEAN : isintegral ? Types.INTEGER : Types.VARCHAR; Object value = tokenizer.getInType(type); if (HsqlDatabaseProperties.hsqldb_cache_file_scale.equals( token)) { if (database.logger.hasCache() || ((Integer) value).intValue() != 8) { Trace.throwerror(Trace.ACCESS_IS_DENIED, token); } } p.setDatabaseProperty(token, value.toString().toLowerCase()); p.setDatabaseVariables(); break; } case Token.SCHEMA : { session.setScripting(false); session.setSchema(tokenizer.getSimpleName()); break; } case Token.PASSWORD : { session.checkDDLWrite(); session.getUser().setPassword(getPassword()); break; } case Token.READONLY : { session.commit(); session.setReadOnly(processTrueOrFalse()); break; } case Token.LOGSIZE : { session.checkAdmin(); session.checkDDLWrite(); int i = tokenizer.getInt(); database.logger.setLogSize(i); break; } case Token.SCRIPTFORMAT : { session.checkAdmin(); session.checkDDLWrite(); session.setScripting(false); token = tokenizer.getSimpleToken(); int i = ArrayUtil.find(ScriptWriterBase.LIST_SCRIPT_FORMATS, token); if (i == 0 || i == 1 || i == 3) { database.logger.setScriptType(i); } else { throw Trace.error(Trace.UNEXPECTED_TOKEN, token); } break; } case Token.IGNORECASE : { session.checkAdmin(); session.checkDDLWrite(); database.setIgnoreCase(processTrueOrFalse()); break; } case Token.MAXROWS : { session.setScripting(false); int i = tokenizer.getInt(); session.setSQLMaxRows(i); break; } case Token.AUTOCOMMIT : { session.setAutoCommit(processTrueOrFalse()); break; } case Token.TABLE : { session.checkAdmin(); session.checkDDLWrite(); token = tokenizer.getName(); String schema = session.getSchemaNameForWrite( tokenizer.getLongNameFirst()); Table t = database.schemaManager.getTable(session, token, schema); token = tokenizer.getSimpleToken(); session.setScripting(true); switch (Token.get(token)) { default : { throw Trace.error(Trace.UNEXPECTED_TOKEN, token); } case Token.SOURCE : { session.checkAdmin(); // SET TABLE SOURCE HEADER if (tokenizer.isGetThis(Token.T_HEADER)) { token = tokenizer.getString(); if (!tokenizer.wasQuotedIdentifier()) { throw Trace.error(Trace.TEXT_TABLE_SOURCE); } try { t.setHeader(token); } catch (Throwable e) { if (session.isProcessingLog() || session.isProcessingScript()) { HsqlException warning = Trace.error(Trace.GENERAL_IO_ERROR, e.getMessage()); session.addWarning(warning); // add an entry to applog too } else { if (e instanceof HsqlException) { throw (HsqlException) e; } else { throw Trace.error( Trace.GENERAL_IO_ERROR, e.getMessage()); } } } break; } // SET TABLE
    SOURCE ON if (tokenizer.isGetThis(Token.T_ON)) { t.connect(session); database.setMetaDirty(false); break; } // SET TABLE
    SOURCE OFF if (tokenizer.isGetThis(Token.T_OFF)) { t.disconnect(session); database.setMetaDirty(false); break; } // SET TABLE
    SOURCE token = tokenizer.getString(); if (!tokenizer.wasQuotedIdentifier()) { throw Trace.error(Trace.TEXT_TABLE_SOURCE); } boolean isDesc = false; isDesc = tokenizer.isGetThis(Token.T_DESC); try { t.setDataSource(session, token, isDesc, false); } catch (Throwable e) { if (session.isProcessingLog() || session.isProcessingScript()) { HsqlException warning = Trace.error(Trace.GENERAL_IO_ERROR, e.getMessage()); session.addWarning(warning); // add an entry to applog too } else { if (e instanceof HsqlException) { throw (HsqlException) e; } else { throw Trace.error(Trace.GENERAL_IO_ERROR, e.getMessage()); } } } break; } case Token.READONLY : { session.checkAdmin(); t.setDataReadOnly(processTrueOrFalse()); database.setMetaDirty(false); break; } case Token.INDEX : { session.checkAdmin(); String roots = (String) tokenizer.getInType(Types.VARCHAR); t.setIndexRoots(roots); break; } } break; } case Token.REFERENTIAL_INTEGRITY : { session.checkAdmin(); session.checkDDLWrite(); session.setScripting(false); database.setReferentialIntegrity(processTrueOrFalse()); break; } case Token.CHECKPOINT : { session.checkAdmin(); session.checkDDLWrite(); tokenizer.getThis(Token.T_DEFRAG); int size = tokenizer.getInt(); database.getProperties().setProperty( HsqlDatabaseProperties.hsqldb_defrag_limit, size); break; } case Token.WRITE_DELAY : { session.checkAdmin(); session.checkDDLWrite(); int delay = 0; tokenizer.getString(); Object value = tokenizer.getAsValue(); if (tokenizer.getType() == Types.INTEGER) { delay = ((Integer) value).intValue(); } else if (Boolean.TRUE.equals(value)) { delay = database.getProperties().getDefaultWriteDelay(); } else if (Boolean.FALSE.equals(value)) { delay = 0; } else { throw Trace.error(Trace.UNEXPECTED_TOKEN); } if (!tokenizer.isGetThis("MILLIS")) { delay *= 1000; } database.logger.setWriteDelay(delay); break; } case Token.DATABASE : { session.checkAdmin(); session.checkDDLWrite(); tokenizer.getThis(Token.T_COLLATION); String cname = tokenizer.getSimpleName(); if (!tokenizer.wasQuotedIdentifier()) { throw Trace.error(Trace.INVALID_IDENTIFIER); } database.collation.setCollation(cname); break; } default : { throw Trace.error(Trace.UNEXPECTED_TOKEN, token); } } } /** * Retrieves boolean value corresponding to the next token. * * @return true if next token is "TRUE"; false if next token is "FALSE" * @throws HsqlException if the next token is neither "TRUE" or "FALSE" */ private boolean processTrueOrFalse() throws HsqlException { String sToken = tokenizer.getSimpleToken(); if (sToken.equals(Token.T_TRUE)) { return true; } else if (sToken.equals(Token.T_FALSE)) { return false; } else { throw Trace.error(Trace.UNEXPECTED_TOKEN, sToken); } } /** * Responsible for handling the execution of COMMIT [WORK] * * @throws HsqlException */ private void processCommit() throws HsqlException { tokenizer.isGetThis(Token.T_WORK); session.commit(); } /** * Responsible for handling the execution of ROLLBACK SQL statements. * * @throws HsqlException */ private void processRollback() throws HsqlException { String token; boolean toSavepoint; token = tokenizer.getSimpleToken(); toSavepoint = false; if (token.equals(Token.T_WORK)) { // do nothing } else if (token.equals(Token.T_TO)) { tokenizer.getThis(Token.T_SAVEPOINT); token = tokenizer.getSimpleName(); toSavepoint = true; } else { tokenizer.back(); } if (toSavepoint) { session.rollbackToSavepoint(token); } else { session.rollback(); } } /** * Responsible for handling the execution of SAVEPOINT SQL statements. * * @throws HsqlException */ private void processSavepoint() throws HsqlException { String token; token = tokenizer.getSimpleName(); session.savepoint(token); } /** * Responsible for handling the execution of SHUTDOWN SQL statements * * @throws HsqlException */ private void processShutdown() throws HsqlException { int closemode; String token; // HUH? We should *NEVER* be able to get here if session is closed if (!session.isClosed()) { session.checkAdmin(); } closemode = Database.CLOSEMODE_NORMAL; token = tokenizer.getSimpleToken(); // fredt - todo - catch misspelt qualifiers here and elsewhere if (token.equals(Token.T_IMMEDIATELY)) { closemode = Database.CLOSEMODE_IMMEDIATELY; } else if (token.equals(Token.T_COMPACT)) { closemode = Database.CLOSEMODE_COMPACT; } else if (token.equals(Token.T_SCRIPT)) { closemode = Database.CLOSEMODE_SCRIPT; } else if (token.equals(Token.T_SEMICOLON)) { // only semicolon is accepted here } else if (token.length() != 0) { throw Trace.error(Trace.UNEXPECTED_TOKEN, token); } database.close(closemode); } /** * Responsible for handling CHECKPOINT [DEFRAG]. * * @throws HsqlException */ private void processCheckpoint() throws HsqlException { boolean defrag; String token; session.checkAdmin(); session.checkDDLWrite(); defrag = false; token = tokenizer.getSimpleToken(); if (token.equals(Token.T_DEFRAG)) { defrag = true; } else if (token.equals(Token.T_SEMICOLON)) { // only semicolon is accepted here } else if (token.length() != 0) { throw Trace.error(Trace.UNEXPECTED_TOKEN, token); } database.logger.checkpoint(defrag); } // --------------------- new methods / simplifications ------------------------ private HsqlName newIndexHsqlName(String name, boolean isQuoted) throws HsqlException { return HsqlName.isReservedName(name) ? database.nameManager.newAutoName("USER", name) : database.nameManager.newHsqlName(name, isQuoted); } private Table newTable(int type, String name, boolean quoted, HsqlName schema) throws HsqlException { HsqlName tableHsqlName = database.nameManager.newHsqlName(name, quoted); tableHsqlName.schema = schema; switch (type) { case Table.TEMP_TEXT_TABLE : case Table.TEXT_TABLE : { return new TextTable(database, tableHsqlName, type); } default : { return new Table(database, tableHsqlName, type); } } } /** * Checks if the attributes of the Column argument, c, are compatible with * the operation of adding such a Column to the Table argument, t. * * @param t to which to add the Column, c * @param c the Column to add to the Table, t * @throws HsqlException if the operation of adding the Column, c, to * the table t is not valid */ private void checkAddColumn(Table t, Column c) throws HsqlException { boolean canAdd = true; if (t.findColumn(c.columnName.name) != -1) { throw Trace.error(Trace.COLUMN_ALREADY_EXISTS, c.columnName.name); } if (c.isPrimaryKey() && t.hasPrimaryKey()) { canAdd = false; } if (canAdd && !t.isEmpty(session)) { canAdd = c.isNullable() || c.getDefaultExpression() != null; } if (!canAdd) { throw Trace.error(Trace.BAD_ADD_COLUMN_DEFINITION); } } private void checkFKColumnDefaults(Table t, Constraint tc) throws HsqlException { boolean check = tc.core.updateAction == Constraint.SET_DEFAULT; check = check || tc.core.deleteAction == Constraint.SET_DEFAULT; if (check) { int[] localCol = tc.core.mainColArray; for (int j = 0; j < localCol.length; j++) { Column column = t.getColumn(localCol[j]); Expression defExpr = column.getDefaultExpression(); if (defExpr == null) { String columnName = column.columnName.name; throw Trace.error(Trace.NO_DEFAULT_VALUE_FOR_COLUMN, new Object[]{ columnName }); } } } } private void processAlterSequence() throws HsqlException { long start; String name = tokenizer.getName(); String schemaname = tokenizer.getLongNameFirst(); schemaname = session.getSchemaNameForWrite(schemaname); tokenizer.getThis(Token.T_RESTART); tokenizer.getThis(Token.T_WITH); start = tokenizer.getBigint(); NumberSequence seq = database.schemaManager.getSequence(name, schemaname); seq.reset(start); } /** * Handles ALTER INDEX <index-name> RENAME. * * @throws HsqlException */ private void processAlterIndexRename() throws HsqlException { String name = tokenizer.getName(); String schema = session.getSchemaNameForWrite(tokenizer.getLongNameFirst()); tokenizer.getThis(Token.T_RENAME); tokenizer.getThis(Token.T_TO); String newName = tokenizer.getName(); String newSchema = tokenizer.getLongNameFirst(); newSchema = newSchema == null ? schema : session.getSchemaNameForWrite( newSchema); boolean isQuoted = tokenizer.wasQuotedIdentifier(); if (!schema.equals(newSchema)) { throw Trace.error(Trace.INVALID_SCHEMA_NAME_NO_SUBCLASS); } Table t = database.schemaManager.findUserTableForIndex(session, name, schema); if (t == null) { throw Trace.error(Trace.INDEX_NOT_FOUND, name); } database.schemaManager.checkIndexExists(name, t.getSchemaName(), true); if (HsqlName.isReservedName(name)) { throw Trace.error(Trace.SYSTEM_INDEX, name); } if (HsqlName.isReservedName(newName)) { throw Trace.error(Trace.BAD_INDEX_CONSTRAINT_NAME, newName); } session.setScripting(true); session.commit(); t.getIndex(name).setName(newName, isQuoted); database.schemaManager.renameIndex(name, newName, t.getName()); } /** * Handles ALTER SCHEMA ... RENAME TO . * * @throws HsqlException */ private void processAlterSchemaRename() throws HsqlException { String name = tokenizer.getSimpleName(); tokenizer.getThis(Token.T_RENAME); tokenizer.getThis(Token.T_TO); String newName = tokenizer.getSimpleName(); boolean isQuoted = tokenizer.wasQuotedIdentifier(); database.schemaManager.renameSchema(name, newName, isQuoted); } /** * * @param t table * @throws HsqlException */ private void processAlterTableAddColumn(Table t) throws HsqlException { String token; int colindex = t.getColumnCount(); Column column = processCreateColumn(); checkAddColumn(t, column); if (tokenizer.isGetThis(Token.T_BEFORE)) { token = tokenizer.getSimpleName(); colindex = t.getColumnNr(token); } session.commit(); TableWorks tableWorks = new TableWorks(session, t); tableWorks.addColumn(column, colindex); return; } /** * Responsible for handling tail of ALTER TABLE ... DROP COLUMN ... * * @param t table * @throws HsqlException */ private void processAlterTableDropColumn(Table t) throws HsqlException { String token; int colindex; token = tokenizer.getName(); colindex = t.getColumnNr(token); session.commit(); TableWorks tableWorks = new TableWorks(session, t); tableWorks.dropColumn(colindex); } /** * Responsible for handling tail of ALTER TABLE ... DROP CONSTRAINT ... * * @param t table * @throws HsqlException */ private void processAlterTableDropConstraint(Table t) throws HsqlException { processAlterTableDropConstraint(t, tokenizer.getName()); } /** * Responsible for handling tail of ALTER TABLE ... DROP CONSTRAINT ... * * @param t table * @param name * @throws HsqlException */ private void processAlterTableDropConstraint(Table t, String cname) throws HsqlException { session.commit(); TableWorks tableWorks = new TableWorks(session, t); tableWorks.dropConstraint(cname); return; } /** * If an invalid alias is encountered while processing an old script, * simply discard it. */ private void processCreateAlias() throws HsqlException { String alias; String methodFQN; try { alias = tokenizer.getSimpleName(); } catch (HsqlException e) { if (session.isProcessingScript()) { alias = null; } else { throw e; } } tokenizer.getThis(Token.T_FOR); methodFQN = upgradeMethodFQN(tokenizer.getSimpleName()); if (alias != null) { database.getAliasMap().put(alias, methodFQN); } } private void processCreateIndex(boolean unique) throws HsqlException { Table t; String indexName = tokenizer.getName(); String schema = tokenizer.getLongNameFirst(); boolean indexNameQuoted = tokenizer.wasQuotedIdentifier(); tokenizer.getThis(Token.T_ON); String tablename = tokenizer.getName(); String tableschema = session.getSchemaNameForWrite(tokenizer.getLongNameFirst()); if (schema != null && !schema.equals(tableschema)) { throw Trace.error(Trace.INVALID_SCHEMA_NAME_NO_SUBCLASS); } t = database.schemaManager.getTable(session, tablename, tableschema); database.schemaManager.checkIndexExists(indexName, t.getSchemaName(), false); HsqlName indexHsqlName = newIndexHsqlName(indexName, indexNameQuoted); int[] indexColumns = processColumnList(t, true); String extra = tokenizer.getSimpleToken(); if (!Token.T_DESC.equals(extra) && !Token.T_ASC.equals(extra)) { tokenizer.back(); } session.commit(); session.setScripting(true); TableWorks tableWorks = new TableWorks(session, t); tableWorks.createIndex(indexColumns, indexHsqlName, unique, false, false); } /** * limitations in Tokenizer dictate that initial value or increment must * be positive * @throws HsqlException */ private void processCreateSequence() throws HsqlException { /* CREATE SEQUENCE [AS {INTEGER | BIGINT}] [START WITH ] [INCREMENT BY ] */ int type = Types.INTEGER; long increment = 1; long start = 0; String name = tokenizer.getName(); boolean isquoted = tokenizer.wasQuotedIdentifier(); HsqlName schemaname = session.getSchemaHsqlNameForWrite(tokenizer.getLongNameFirst()); if (tokenizer.isGetThis(Token.T_AS)) { String typestring = tokenizer.getSimpleToken(); type = Types.getTypeNr(typestring); Trace.check(type == Types.INTEGER || type == Types.BIGINT, Trace.WRONG_DATA_TYPE); } if (tokenizer.isGetThis(Token.T_START)) { tokenizer.getThis(Token.T_WITH); start = tokenizer.getBigint(); } if (tokenizer.isGetThis(Token.T_INCREMENT)) { tokenizer.getThis(Token.T_BY); increment = tokenizer.getBigint(); } HsqlName hsqlname = database.nameManager.newHsqlName(name, isquoted); hsqlname.schema = schemaname; database.schemaManager.createSequence(hsqlname, start, increment, type); } /** * CREATE SCHEMA PUBLIC in scripts should pass this, so we do not throw * if this schema is created a second time */ private void processCreateSchema() throws HsqlException { String name = tokenizer.getSimpleName(); boolean isquoted = tokenizer.wasQuotedIdentifier(); if (session.isSchemaDefintion()) { throw Trace.error(Trace.INVALID_IDENTIFIER); } tokenizer.getThis(Token.T_AUTHORIZATION); tokenizer.getThis(GranteeManager.DBA_ADMIN_ROLE_NAME); if (database.schemaManager.schemaExists(name)) { if (!session.isProcessingScript) { throw Trace.error(Trace.INVALID_SCHEMA_NAME_NO_SUBCLASS); } } else { database.schemaManager.createSchema(name, isquoted); } HsqlName schemaName = database.schemaManager.getSchemaHsqlName(name); database.logger.writeToLog(session, DatabaseScript.getSchemaCreateDDL(database, schemaName)); database.logger.writeToLog(session, "SET SCHEMA " + schemaName.statementName); session.startSchemaDefinition(name); session.loggedSchema = session.currentSchema; } private void processCreateUser() throws HsqlException { String name; String password; boolean admin; name = getUserIdentifier(); tokenizer.getThis(Token.T_PASSWORD); password = getPassword(); admin = tokenizer.isGetThis(Token.T_ADMIN); database.getUserManager().createUser(name, password); if (admin) { database.getGranteeManager().grant( name, GranteeManager.DBA_ADMIN_ROLE_NAME); } } private void processDisconnect() throws HsqlException { session.close(); } private void processDropTable(boolean isView) throws HsqlException { boolean ifexists = false; boolean cascade = false; if (tokenizer.isGetThis(Token.T_IF)) { tokenizer.getThis(Token.T_EXISTS); ifexists = true; } String name = tokenizer.getName(); String schema = tokenizer.getLongNameFirst(); if (tokenizer.isGetThis(Token.T_IF)) { tokenizer.getThis(Token.T_EXISTS); ifexists = true; } cascade = tokenizer.isGetThis(Token.T_CASCADE); if (!cascade) { tokenizer.isGetThis(Token.T_RESTRICT); } if (ifexists && schema != null && !database.schemaManager.schemaExists(schema)) { return; } schema = session.getSchemaNameForWrite(schema); database.schemaManager.dropTable(session, name, schema, ifexists, isView, cascade); } private void processDropUser() throws HsqlException { session.checkAdmin(); session.checkDDLWrite(); String userName = getPassword(); if (database.getSessionManager().isUserActive(userName)) { // todo - new error message "cannot drop a user that is currently connected." // NOI18N throw Trace.error(Trace.ACCESS_IS_DENIED); } database.getUserManager().dropUser(userName); } private void processDropSequence() throws HsqlException { boolean ifexists = false; session.checkAdmin(); session.checkDDLWrite(); String name = tokenizer.getName(); String schemaname = session.getSchemaNameForWrite(tokenizer.getLongNameFirst()); if (tokenizer.isGetThis(Token.T_IF)) { tokenizer.getThis(Token.T_EXISTS); ifexists = true; } boolean cascade = tokenizer.isGetThis(Token.T_CASCADE); if (!cascade) { tokenizer.isGetThis(Token.T_RESTRICT); } NumberSequence sequence = database.schemaManager.findSequence(name, schemaname); if (sequence == null) { if (ifexists) { return; } else { throw Trace.error(Trace.SEQUENCE_NOT_FOUND); } } database.schemaManager.checkCascadeDropViews(sequence, cascade); database.schemaManager.dropSequence(sequence); } private void processDropTrigger() throws HsqlException { session.checkAdmin(); session.checkDDLWrite(); String triggername = tokenizer.getName(); String schemaname = session.getSchemaNameForWrite(tokenizer.getLongNameFirst()); database.schemaManager.dropTrigger(session, triggername, schemaname); } private void processDropIndex() throws HsqlException { String name = tokenizer.getName(); String schema = session.getSchemaNameForWrite(tokenizer.getLongNameFirst()); boolean ifexists = false; // accept a table name - no check performed if it is the right table if (tokenizer.isGetThis(Token.T_ON)) { tokenizer.getName(); } if (tokenizer.isGetThis(Token.T_IF)) { tokenizer.getThis(Token.T_EXISTS); ifexists = true; } session.checkAdmin(); session.checkDDLWrite(); database.schemaManager.dropIndex(session, name, schema, ifexists); } private void processDropSchema() throws HsqlException { String name = tokenizer.getSimpleName(); boolean cascade = tokenizer.isGetThis(Token.T_CASCADE); if (!cascade) { tokenizer.isGetThis(Token.T_RESTRICT); } processDropSchema(name, cascade); } private void processDropSchema(String name, boolean cascade) throws HsqlException { if (!database.schemaManager.schemaExists(name)) { throw Trace.error(Trace.INVALID_SCHEMA_NAME_NO_SUBCLASS); } database.schemaManager.dropSchema(name, cascade); if (name.equals(session.getSchemaName(null))) { session.setSchema(database.schemaManager.getDefaultSchemaName()); } } private Result processExplainPlan() throws IOException, HsqlException { // PRE: we assume only one DML or DQL has been submitted // and simply ignore anything following the first // sucessfully compliled statement String token; Parser parser; int cmd; CompiledStatement cs; Result result; String line; LineNumberReader lnr; tokenizer.getThis(Token.T_PLAN); tokenizer.getThis(Token.T_FOR); parser = new Parser(session, database, tokenizer); token = tokenizer.getSimpleToken(); cmd = Token.get(token); result = Result.newSingleColumnResult("OPERATION", Types.VARCHAR); int brackets = 0; switch (cmd) { case Token.OPENBRACKET : brackets = parser.parseOpenBracketsSelect() + 1; case Token.SELECT : cs = parser.compileSelectStatement(brackets); break; case Token.INSERT : cs = parser.compileInsertStatement(); break; case Token.UPDATE : cs = parser.compileUpdateStatement(); break; case Token.DELETE : cs = parser.compileDeleteStatement(); break; case Token.CALL : cs = parser.compileCallStatement(); break; default : // - No real need to throw, so why bother? // - Just return result with no rows for now // - Later, maybe there will be plan desciptions // for other operations return result; } lnr = new LineNumberReader(new StringReader(cs.describe(session))); while (null != (line = lnr.readLine())) { result.add(new Object[]{ line }); } return result; } // fredt@users 20010701 - patch 1.6.1 by fredt - open <1.60 db files // convert org.hsql.Library aliases from versions < 1.60 to org.hsqldb // fredt@users 20020221 - patch 513005 by sqlbob@users (RMP) - ABS function static final String oldLib = "org.hsql.Library."; static final int oldLibLen = oldLib.length(); static final String newLib = "org.hsqldb.Library."; private static String upgradeMethodFQN(String fqn) { if (fqn.startsWith(oldLib)) { fqn = newLib + fqn.substring(oldLibLen); } else if (fqn.equals("java.lang.Math.abs")) { fqn = "org.hsqldb.Library.abs"; } return fqn; } /** * Processes a SELECT INTO for a new table. */ Result processSelectInto(Result result, HsqlName intoHsqlName, int intoType) throws HsqlException { // fredt@users 20020215 - patch 497872 by Nitin Chauhan // to require column labels in SELECT INTO TABLE int colCount = result.getColumnCount(); for (int i = 0; i < colCount; i++) { if (result.metaData.colLabels[i].length() == 0) { throw Trace.error(Trace.LABEL_REQUIRED); } } // fredt@users 20020221 - patch 513005 by sqlbob@users (RMP) Table t = (intoType == Table.TEXT_TABLE) ? new TextTable(database, intoHsqlName, intoType) : new Table(database, intoHsqlName, intoType); t.addColumns(result.metaData, result.getColumnCount()); t.createPrimaryKey(); database.schemaManager.linkTable(t); // fredt@users 20020221 - patch 513005 by sqlbob@users (RMP) if (intoType == Table.TEXT_TABLE) { try { // Use default lowercase name "
    .csv" (with invalid // char's converted to underscores): String txtSrc = StringUtil.toLowerSubset(intoHsqlName.name, '_') + ".csv"; t.setDataSource(session, txtSrc, false, true); logTableDDL(t); t.insertIntoTable(session, result); } catch (HsqlException e) { database.schemaManager.dropTable(session, intoHsqlName.name, null, false, false, false); throw (e); } } else { logTableDDL(t); // SELECT .. INTO can't fail because of constraint violation t.insertIntoTable(session, result); } Result uc = new Result(ResultConstants.UPDATECOUNT); uc.updateCount = result.getSize(); return uc; } /** * Logs the DDL for a table created with INTO. * Uses two dummy arguments for getTableDDL() as the new table has no * FK constraints. * * * @param t table * @throws HsqlException */ private void logTableDDL(Table t) throws HsqlException { StringBuffer tableDDL; String sourceDDL; tableDDL = new StringBuffer(); DatabaseScript.getTableDDL(database, t, 0, null, true, tableDDL); sourceDDL = DatabaseScript.getDataSource(t); database.logger.writeToLog(session, tableDDL.toString()); if (sourceDDL != null) { database.logger.writeToLog(session, sourceDDL); } } private void processAlterTableAddUniqueConstraint(Table t, HsqlName n) throws HsqlException { int[] col; col = processColumnList(t, false); if (n == null) { n = database.nameManager.newAutoName("CT"); } session.commit(); TableWorks tableWorks = new TableWorks(session, t); tableWorks.createUniqueConstraint(col, n); } private void processAlterTableAddForeignKeyConstraint(Table t, HsqlName n) throws HsqlException { Constraint tc; if (n == null) { n = database.nameManager.newAutoName("FK"); } tc = processCreateFK(t, n); checkFKColumnDefaults(t, tc); t.checkColumnsMatch(tc.core.mainColArray, tc.core.refTable, tc.core.refColArray); session.commit(); TableWorks tableWorks = new TableWorks(session, t); tableWorks.createForeignKey(tc.core.mainColArray, tc.core.refColArray, tc.constName, tc.core.refTable, tc.core.deleteAction, tc.core.updateAction); } private void processAlterTableAddCheckConstraint(Table table, HsqlName name) throws HsqlException { Constraint check; if (name == null) { name = database.nameManager.newAutoName("CT"); } check = new Constraint(name, null, null, null, Constraint.CHECK, Constraint.NO_ACTION, Constraint.NO_ACTION); processCreateCheckConstraintCondition(check); session.commit(); TableWorks tableWorks = new TableWorks(session, table); tableWorks.createCheckConstraint(check, name); } private void processAlterTableAddPrimaryKey(Table t, HsqlName n) throws HsqlException { int[] col; col = processColumnList(t, false); session.commit(); TableWorks tableWorks = new TableWorks(session, t); tableWorks.addPrimaryKey(col, n); } private void processReleaseSavepoint() throws HsqlException { String token; tokenizer.getThis(Token.T_SAVEPOINT); token = tokenizer.getSimpleName(); session.releaseSavepoint(token); } private void processAlterUser() throws HsqlException { String userName; String password; User userObject; userName = getUserIdentifier(); userObject = (User) database.getUserManager().getUsers().get(userName); Trace.check(userObject != null, Trace.USER_NOT_FOUND, userName); tokenizer.getThis(Token.T_SET); tokenizer.getThis(Token.T_PASSWORD); password = getPassword(); userObject.setPassword(password); database.logger.writeToLog(session, userObject.getAlterUserDDL()); session.setScripting(false); } private String getUserIdentifier() throws HsqlException { String token = tokenizer.getString(); Tokenizer t = new Tokenizer(token); return t.getSimpleName(); } private String getPassword() throws HsqlException { String token = tokenizer.getString(); return token.toUpperCase(Locale.ENGLISH); } /** * Responsible for handling the execution of GRANT/REVOKE role... * statements. * * @throws HsqlException */ private void processRoleGrantOrRevoke(boolean grant) throws HsqlException { String token; HsqlArrayList list = new HsqlArrayList(); String role; GranteeManager granteeManager = database.getGranteeManager(); do { role = tokenizer.getSimpleToken(); Trace.check(granteeManager.isRole(role), (grant ? Trace.NO_SUCH_ROLE_GRANT : Trace.NO_SUCH_ROLE_REVOKE)); list.add(role); } while (tokenizer.isGetThis(Token.T_COMMA)); tokenizer.getThis(grant ? Token.T_TO : Token.T_FROM); token = getUserIdentifier(); GranteeManager gm = database.getGranteeManager(); for (int i = 0; i < list.size(); i++) { if (grant) { gm.grant(token, (String) list.get(i)); } else { gm.revoke(token, (String) list.get(i)); } } } } hsqldb-1.8.0.10.orig/src/org/hsqldb/rowio/0000755000175000017500000000000010242420102016574 5ustar renerenehsqldb-1.8.0.10.orig/src/org/hsqldb/rowio/RowInputTextLog.java0000644000175000017500000002163610621707246022567 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.rowio; import java.io.IOException; import java.math.BigDecimal; import java.sql.Date; import java.sql.Time; import java.sql.Timestamp; import org.hsqldb.Column; import org.hsqldb.HsqlDateTime; import org.hsqldb.HsqlException; import org.hsqldb.Token; import org.hsqldb.Tokenizer; import org.hsqldb.Types; import org.hsqldb.scriptio.ScriptReaderBase; import org.hsqldb.store.ValuePool; import org.hsqldb.types.Binary; import org.hsqldb.types.JavaObject; import org.hsqldb.lib.java.JavaSystem; /** * Class for reading the data for a database row from the script file. * * @author fredt@users * @version 1.8.0 * @since 1.7.3 */ public class RowInputTextLog extends RowInputBase implements RowInputInterface { Tokenizer tokenizer; String tableName = null; String schemaName = null; int statementType; public RowInputTextLog() { super(new byte[0]); tokenizer = new Tokenizer(); } public void setSource(String text) throws HsqlException { tokenizer.reset(text); statementType = ScriptReaderBase.ANY_STATEMENT; String s = tokenizer.getString(); if (s.equals(Token.T_INSERT)) { statementType = ScriptReaderBase.INSERT_STATEMENT; tokenizer.getString(); tableName = tokenizer.getString(); tokenizer.getString(); } else if (s.equals(Token.T_DELETE)) { statementType = ScriptReaderBase.DELETE_STATEMENT; tokenizer.getString(); tableName = tokenizer.getString(); } else if (s.equals(Token.T_COMMIT)) { statementType = ScriptReaderBase.COMMIT_STATEMENT; } else if (s.equals(Token.T_SET)) { if (tokenizer.isGetThis(Token.T_SCHEMA)) { schemaName = tokenizer.getSimpleName(); statementType = ScriptReaderBase.SCHEMA_STATEMENT; } } } public int getStatementType() { return statementType; } public String getTableName() { return tableName; } public String getSchemaName() { return schemaName; } protected String readField() throws IOException { try { tokenizer.getString(); if (statementType == ScriptReaderBase.DELETE_STATEMENT) { tokenizer.getString(); tokenizer.getString(); } String s = tokenizer.getString(); if (tokenizer.getType() == Types.NULL) { s = null; } return s; } catch (HsqlException e) { throw new IOException(e.getMessage()); } } protected String readNumberField() throws IOException { try { tokenizer.getString(); if (statementType == ScriptReaderBase.DELETE_STATEMENT) { tokenizer.getString(); tokenizer.getString(); } String s = tokenizer.getString(); if ("-".equals(s)) { s = s + tokenizer.getString(); } else if (tokenizer.getType() == Types.NULL) { s = null; } return s; } catch (HsqlException e) { throw new IOException(e.getMessage()); } } public String readString() throws IOException { String s = readField(); return ValuePool.getString(s); } public short readShortData() throws IOException { String s = readNumberField(); if (s == null) { return 0; } return Short.parseShort(s); } public int readIntData() throws IOException { String s = readNumberField(); if (s == null) { return 0; } return Integer.parseInt(s); } public long readLongData() throws IOException { String s = readNumberField(); if (s == null) { return 0; } return Long.parseLong(s); } public int readType() throws IOException { return 0; } protected boolean checkNull() { // Return null on each column read instead. return false; } protected String readChar(int type) throws IOException { return readString(); } protected Integer readSmallint() throws IOException, HsqlException { String s = readNumberField(); if (s == null) { return null; } int i = Integer.parseInt(s); return ValuePool.getInt(i); } protected Integer readInteger() throws IOException, HsqlException { String s = readNumberField(); if (s == null) { return null; } int i = Integer.parseInt(s); return ValuePool.getInt(i); } protected Long readBigint() throws IOException, HsqlException { String s = readNumberField(); if (s == null) { return null; } long i = Long.parseLong(s); return ValuePool.getLong(i); } protected Double readReal(int type) throws IOException, HsqlException { String s = readNumberField(); if (s == null) { return null; } double i = JavaSystem.parseDouble(s); if (tokenizer.isGetThis(Token.T_DIVIDE)) { s = tokenizer.getString(); // parse simply to ensure it's a number double ii = JavaSystem.parseDouble(s); if (i == 0E0) { i = Double.NaN; } else if (i == -1E0) { i = Double.NEGATIVE_INFINITY; } else if (i == 1E0) { i = Double.POSITIVE_INFINITY; } } return ValuePool.getDouble(Double.doubleToLongBits(i)); } protected BigDecimal readDecimal() throws IOException, HsqlException { String s = readNumberField(); if (s == null) { return null; } BigDecimal i = new BigDecimal(s); return ValuePool.getBigDecimal(i); } protected Time readTime() throws IOException, HsqlException { String s = readField(); if (s == null) { return null; } return HsqlDateTime.timeValue(s); } protected Date readDate() throws IOException, HsqlException { String s = readField(); if (s == null) { return null; } return HsqlDateTime.dateValue(s); } protected Timestamp readTimestamp() throws IOException, HsqlException { String s = readField(); if (s == null) { return null; } return HsqlDateTime.timestampValue(s); } protected Boolean readBit() throws IOException, HsqlException { String s = readField(); if (s == null) { return null; } return s.equalsIgnoreCase("TRUE") ? Boolean.TRUE : Boolean.FALSE; } protected Object readOther() throws IOException, HsqlException { byte[] data; String s = readField(); if (s == null) { return null; } data = Column.hexToByteArray(s); return new JavaObject(data); } protected Binary readBinary(int type) throws IOException, HsqlException { String s = readField(); if (s == null) { return null; } return new Binary(Column.hexToByteArray(s), false); } } hsqldb-1.8.0.10.orig/src/org/hsqldb/rowio/RowOutputText.java0000644000175000017500000002154110416742476022327 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.rowio; import java.io.UnsupportedEncodingException; import java.math.BigDecimal; import java.sql.Date; import java.sql.Time; import java.sql.Timestamp; import org.hsqldb.CachedRow; import org.hsqldb.Trace; import org.hsqldb.Types; import org.hsqldb.lib.StringConverter; import org.hsqldb.persist.TextCache; import org.hsqldb.types.Binary; import org.hsqldb.types.JavaObject; /** * Class for writing the data for a database row in text table format. * * @author sqlbob@users (RMP) * @version 1.8.0 * @since 1.7.0 */ public class RowOutputText extends RowOutputBase { protected String fieldSep; protected String varSep; protected String longvarSep; private boolean fieldSepEnd; private boolean varSepEnd; private boolean longvarSepEnd; private String nextSep = ""; private boolean nextSepEnd; protected boolean allQuoted; private String encoding; public RowOutputText(String fieldSep, String varSep, String longvarSep, boolean allQuoted, String encoding) { super(); initTextDatabaseRowOutput(fieldSep, varSep, longvarSep, allQuoted, encoding); } private void initTextDatabaseRowOutput(String fieldSep, String varSep, String longvarSep, boolean allQuoted, String encoding) { //-- Newline indicates that field should match to end of line. if (fieldSep.endsWith("\n")) { fieldSepEnd = true; fieldSep = fieldSep.substring(0, fieldSep.length() - 1); } if (varSep.endsWith("\n")) { varSepEnd = true; varSep = varSep.substring(0, varSep.length() - 1); } if (longvarSep.endsWith("\n")) { longvarSepEnd = true; longvarSep = longvarSep.substring(0, longvarSep.length() - 1); } this.fieldSep = fieldSep; this.varSep = varSep; this.longvarSep = longvarSep; this.allQuoted = allQuoted; this.encoding = encoding; } public void writeEnd() { // terminate at the end of row if (nextSepEnd) { writeBytes(nextSep); } writeBytes(TextCache.NL); } public void writeSize(int size) { // initialise at the start of row nextSep = ""; nextSepEnd = false; } public void writeType(int type) { //--do Nothing } public void writeString(String s) { s = checkConvertString(s, fieldSep); // error if (s == null) { return; } // writeBytes(s); byte[] bytes = getBytes(s); write(bytes, 0, bytes.length); nextSep = fieldSep; nextSepEnd = fieldSepEnd; } protected void writeVarString(String s) { s = checkConvertString(s, varSep); if (s == null) { return; } // writeBytes(s); byte[] bytes = getBytes(s); write(bytes, 0, bytes.length); nextSep = varSep; nextSepEnd = varSepEnd; } protected void writeLongVarString(String s) { s = checkConvertString(s, longvarSep); if (s == null) { return; } // writeBytes(s); byte[] bytes = getBytes(s); write(bytes, 0, bytes.length); nextSep = longvarSep; nextSepEnd = longvarSepEnd; } protected String checkConvertString(String s, String sep) { if (s.indexOf('\n') != -1 || s.indexOf('\r') != -1) { throw new IllegalArgumentException( Trace.getMessage(Trace.TEXT_STRING_HAS_NEWLINE)); } else if (s.indexOf(sep) != -1) { return null; } return s; } private byte[] getBytes(String s) { byte[] bytes = null; try { bytes = s.getBytes(encoding); } catch (UnsupportedEncodingException e) { bytes = s.getBytes(); } return bytes; } protected void writeByteArray(byte[] b) { ensureRoom(b.length * 2); StringConverter.writeHex(this.getBuffer(), count, b); count += b.length * 2; } public void writeShortData(short i) { writeIntData(i); } public void writeIntData(int i) { writeBytes(Integer.toString(i)); nextSep = fieldSep; nextSepEnd = fieldSepEnd; } public void writeIntData(int i, int position) { throw Trace.runtimeError(Trace.UNSUPPORTED_INTERNAL_OPERATION, "RowInputText"); } public void writeLongData(long i) { throw Trace.runtimeError(Trace.UNSUPPORTED_INTERNAL_OPERATION, "RowInputText"); } // fredt@users - comment - methods used for writing each SQL type protected void writeFieldType(int type) { writeBytes(nextSep); switch (type) { case Types.VARCHAR : case Types.VARCHAR_IGNORECASE : nextSep = varSep; nextSepEnd = varSepEnd; break; case Types.LONGVARCHAR : nextSep = longvarSep; nextSepEnd = longvarSepEnd; break; default : nextSep = fieldSep; nextSepEnd = fieldSepEnd; break; } } protected void writeNull(int type) { writeFieldType(type); } protected void writeChar(String s, int t) { switch (t) { case Types.CHAR : writeString(s); return; case Types.VARCHAR : case Types.VARCHAR_IGNORECASE : writeVarString(s); return; case Types.LONGVARCHAR : default : writeLongVarString(s); return; } } protected void writeSmallint(Number o) { writeString(o.toString()); } protected void writeInteger(Number o) { writeString(o.toString()); } protected void writeBigint(Number o) { writeString(o.toString()); } protected void writeReal(Double o, int type) { writeString(o.toString()); } protected void writeDecimal(BigDecimal o) { writeString(o.toString()); } protected void writeBit(Boolean o) { writeString(o.toString()); } protected void writeDate(Date o) { writeString(o.toString()); } protected void writeTime(Time o) { writeString(o.toString()); } protected void writeTimestamp(Timestamp o) { writeString(o.toString()); } protected void writeOther(JavaObject o) { byte[] ba = o.getBytes(); writeByteArray(ba); } protected void writeBinary(Binary o, int t) { writeByteArray(o.getBytes()); } public int getSize(CachedRow r) { reset(); try { writeSize(0); writeData(r.getData(), r.getTable()); writeEnd(); } catch (Exception e) { reset(); // throw (Trace.error(Trace.FILE_IO_ERROR, e.toString())); } int rowsize = size(); reset(); return rowsize; } } hsqldb-1.8.0.10.orig/src/org/hsqldb/rowio/RowOutputTextLog.java0000644000175000017500000001302710416742477022772 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.rowio; import java.math.BigDecimal; import java.sql.Date; import java.sql.Time; import java.sql.Timestamp; import org.hsqldb.CachedRow; import org.hsqldb.Column; import org.hsqldb.HsqlDateTime; import org.hsqldb.lib.StringConverter; import org.hsqldb.types.Binary; import org.hsqldb.types.JavaObject; /** * @author fredt@users * @since 1.7.2 * @version 1.7.2 */ public class RowOutputTextLog extends RowOutputBase { static final byte[] BYTES_NULL = "NULL".getBytes(); static final byte[] BYTES_TRUE = "TRUE".getBytes(); static final byte[] BYTES_FALSE = "FALSE".getBytes(); static final byte[] BYTES_AND = " AND ".getBytes(); static final byte[] BYTES_IS = " IS ".getBytes(); public static final int MODE_DELETE = 1; public static final int MODE_INSERT = 0; private boolean isWritten; private int logMode; public void setMode(int mode) { logMode = mode; } protected void writeFieldPrefix() { if (logMode == MODE_DELETE && isWritten) { write(BYTES_AND); } } protected void writeChar(String s, int t) { write('\''); StringConverter.unicodeToAscii(this, s, true); write('\''); } protected void writeReal(Double o, int type) { writeBytes(Column.createSQLString(((Number) o).doubleValue())); } protected void writeSmallint(Number o) { this.writeBytes(o.toString()); } public void writeEnd() {} protected void writeTime(Time o) { write('\''); writeBytes(o.toString()); write('\''); } protected void writeBinary(Binary o, int t) { ensureRoom(o.getBytesLength() * 2 + 2); write('\''); StringConverter.writeHex(getBuffer(), count, o.getBytes()); count += o.getBytesLength() * 2; write('\''); } public void writeType(int type) {} public void writeSize(int size) {} protected void writeDate(Date o) { write('\''); this.writeBytes(o.toString()); write('\''); } public int getSize(CachedRow row) { return 0; } protected void writeInteger(Number o) { this.writeBytes(o.toString()); } protected void writeBigint(Number o) { this.writeBytes(o.toString()); } //fredt@users - patch 1108647 by nkowalcz@users (NataliaK) fix for IS NULL protected void writeNull(int type) { if (logMode == MODE_DELETE) { write(BYTES_IS); } else if (isWritten) { write(','); } isWritten = true; write(BYTES_NULL); } protected void writeOther(JavaObject o) { ensureRoom(o.getBytesLength() * 2 + 2); write('\''); StringConverter.writeHex(getBuffer(), count, o.getBytes()); count += o.getBytesLength() * 2; write('\''); } public void writeString(String value) { StringConverter.unicodeToAscii(this, value, false); } protected void writeBit(Boolean o) { write(o.booleanValue() ? BYTES_TRUE : BYTES_FALSE); } protected void writeDecimal(BigDecimal o) { this.writeBytes(o.toString()); } protected void writeFieldType(int type) { if (logMode == MODE_DELETE) { write('='); } else if (isWritten) { write(','); } isWritten = true; } public void writeLongData(long value) { this.writeBytes(Long.toString(value)); } public void writeIntData(int i, int position) {} protected void writeTimestamp(Timestamp o) { write('\''); this.writeBytes(HsqlDateTime.getTimestampString(o)); write('\''); } public void writeShortData(short i) { writeBytes(Integer.toString(i)); } public void writeIntData(int i) { writeBytes(Integer.toString(i)); } public void reset() { super.reset(); isWritten = false; } } hsqldb-1.8.0.10.orig/src/org/hsqldb/rowio/RowOutputBase.java0000644000175000017500000001765710416742476022272 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.rowio; import java.math.BigDecimal; import java.sql.Date; import java.sql.Time; import java.sql.Timestamp; import org.hsqldb.Column; import org.hsqldb.Table; import org.hsqldb.Trace; import org.hsqldb.Types; import org.hsqldb.lib.HashMappedList; import org.hsqldb.lib.HsqlByteArrayOutputStream; import org.hsqldb.types.Binary; import org.hsqldb.types.JavaObject; /** * Base class for writing the data for a database row in different formats. * Defines the methods that are independent of storage format and declares * the format-dependent methods that subclasses should define. * * @author sqlbob@users (RMP) * @author fredt@users * @version 1.7.2 * @since 1.7.0 */ public abstract class RowOutputBase extends HsqlByteArrayOutputStream implements RowOutputInterface { public static final int CACHED_ROW_160 = 0; public static final int CACHED_ROW_170 = 1; // the last column in a table is an ID that should not be written to file protected boolean skipSystemId = false; /** * Constructor used for persistent storage of a Table row * * @exception IOException when an IO error is encountered */ public RowOutputBase() { super(); } /** * Constructor used for result sets * * @exception IOException when an IO error is encountered */ public RowOutputBase(int initialSize) { super(initialSize); } /** * Constructor used for network transmission of result sets * * @exception IOException when an IO error is encountered */ public RowOutputBase(byte[] buffer) { super(buffer); } // fredt@users - comment - methods for writing Result column type, name and data size public abstract void writeEnd(); public abstract void writeSize(int size); public abstract void writeType(int type); public abstract void writeShortData(short i); public abstract void writeIntData(int i); public abstract void writeIntData(int i, int position); public abstract void writeString(String s); // fredt@users - comment - methods used for writing each SQL type protected void writeFieldPrefix() {} protected abstract void writeFieldType(int type); protected abstract void writeNull(int type); protected abstract void writeChar(String s, int t); protected abstract void writeSmallint(Number o); protected abstract void writeInteger(Number o); protected abstract void writeBigint(Number o); protected abstract void writeReal(Double o, int type); protected abstract void writeDecimal(BigDecimal o); protected abstract void writeBit(Boolean o); protected abstract void writeDate(Date o); protected abstract void writeTime(Time o); protected abstract void writeTimestamp(Timestamp o); protected abstract void writeOther(JavaObject o); protected abstract void writeBinary(Binary o, int t); public void writeRow(Object[] data, Table t) { writeSize(0); writeData(data, t); writeIntData(size(), 0); } /** * This method is called to write data for a table. * * @param data * @param t * @throws IOException */ public void writeData(Object[] data, Table t) { int[] types = t.getColumnTypes(); int l = t.getColumnCount(); writeData(l, types, data, null, null); } /** * This method is called to write data for a Result. * * @param l * @param types * @param data * @param cols * @param primarykeys * @throws IOException */ public void writeData(int l, int[] types, Object[] data, HashMappedList cols, int[] primaryKeys) { boolean hasPK = primaryKeys != null && primaryKeys.length != 0; int limit = hasPK ? primaryKeys.length : l; for (int i = 0; i < limit; i++) { int j = hasPK ? primaryKeys[i] : i; Object o = data[j]; int t = types[j]; if (cols != null) { Column col = (Column) cols.get(j); writeFieldPrefix(); writeString(col.columnName.statementName); } if (o == null) { writeNull(t); continue; } writeFieldType(t); switch (t) { case Types.NULL : case Types.CHAR : case Types.VARCHAR : case Types.VARCHAR_IGNORECASE : case Types.LONGVARCHAR : writeChar((String) o, t); break; case Types.TINYINT : case Types.SMALLINT : writeSmallint((Number) o); break; case Types.INTEGER : writeInteger((Number) o); break; case Types.BIGINT : writeBigint((Number) o); break; case Types.REAL : case Types.FLOAT : case Types.DOUBLE : writeReal((Double) o, t); break; case Types.NUMERIC : case Types.DECIMAL : writeDecimal((BigDecimal) o); break; case Types.BOOLEAN : writeBit((Boolean) o); break; case Types.DATE : writeDate((Date) o); break; case Types.TIME : writeTime((Time) o); break; case Types.TIMESTAMP : writeTimestamp((Timestamp) o); break; case Types.OTHER : writeOther((JavaObject) o); break; case Types.BINARY : case Types.VARBINARY : case Types.LONGVARBINARY : writeBinary((Binary) o, t); break; default : throw Trace.runtimeError(Trace.FUNCTION_NOT_SUPPORTED, Types.getTypeString(t)); } } } // returns the underlying HsqlByteArrayOutputStream public HsqlByteArrayOutputStream getOutputStream() { return this; } } hsqldb-1.8.0.10.orig/src/org/hsqldb/rowio/RowOutputInterface.java0000644000175000017500000000532310416742476023303 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.rowio; import org.hsqldb.CachedRow; import org.hsqldb.Table; import org.hsqldb.lib.HashMappedList; import org.hsqldb.lib.HsqlByteArrayOutputStream; /** * Public interface for writing the data for a database row. * * @author sqlbob@users (RMP) * @author fredt@users * @version 1.7.2 * @since 1.7.0 */ public interface RowOutputInterface { void writeEnd(); void writeSize(int size); void writeType(int type); void writeString(String value); void writeShortData(short i); void writeIntData(int i); void writeIntData(int i, int position); void writeLongData(long i); void writeRow(Object[] data, Table t); void writeData(Object[] data, Table t); void writeData(int l, int[] types, Object[] data, HashMappedList cols, int[] primarykeys); // independent of the this object, calls only a static method int getSize(CachedRow row); // returns the underlying HsqlByteArrayOutputStream HsqlByteArrayOutputStream getOutputStream(); // resets the byte[] buffer, ready for processing new row void reset(); // returns the current size int size(); } hsqldb-1.8.0.10.orig/src/org/hsqldb/rowio/RowInputText.java0000644000175000017500000002464510523434031022116 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.rowio; import java.io.IOException; import java.math.BigDecimal; import java.sql.Date; import java.sql.Time; import java.sql.Timestamp; import org.hsqldb.Column; import org.hsqldb.HsqlDateTime; import org.hsqldb.HsqlException; import org.hsqldb.Trace; import org.hsqldb.Types; import org.hsqldb.types.Binary; import org.hsqldb.types.JavaObject; /** * Class for reading the data for a database row in text table format. * * @author sqlbob@users (RMP) * @version 1.8.0 * @since 1.7.0 */ public class RowInputText extends RowInputBase implements RowInputInterface { // text table specific private String fieldSep; private String varSep; private String longvarSep; private int fieldSepLen; private int varSepLen; private int longvarSepLen; private boolean fieldSepEnd; private boolean varSepEnd; private boolean longvarSepEnd; private int textLen; protected String text; protected int line; protected int field; protected int next = 0; protected boolean allQuoted; /** * fredt@users - comment - in future may use a custom subclasse of * InputStream to read the data. * * author: sqlbob@users (RMP) */ public RowInputText(String fieldSep, String varSep, String longvarSep, boolean allQuoted) { super(new byte[0]); //-- Newline indicates that field should match to end of line. if (fieldSep.endsWith("\n")) { fieldSepEnd = true; fieldSep = fieldSep.substring(0, fieldSep.length() - 1); } if (varSep.endsWith("\n")) { varSepEnd = true; varSep = varSep.substring(0, varSep.length() - 1); } if (longvarSep.endsWith("\n")) { longvarSepEnd = true; longvarSep = longvarSep.substring(0, longvarSep.length() - 1); } this.allQuoted = allQuoted; this.fieldSep = fieldSep; this.varSep = varSep; this.longvarSep = longvarSep; fieldSepLen = fieldSep.length(); varSepLen = varSep.length(); longvarSepLen = longvarSep.length(); } public void setSource(String text, int pos, int byteSize) { size = byteSize; this.text = text; textLen = text.length(); filePos = pos; next = 0; line++; field = 0; } protected String getField(String sep, int sepLen, boolean isEnd) throws IOException { String s = null; try { int start = next; field++; if (isEnd) { if ((next >= textLen) && (sepLen > 0)) { throw Trace.error(Trace.TextDatabaseRowInput_getField); } else if (text.endsWith(sep)) { next = textLen - sepLen; } else { throw Trace.error(Trace.TextDatabaseRowInput_getField2); } } else { next = text.indexOf(sep, start); if (next == -1) { next = textLen; } } if (start > next) { start = next; } s = text.substring(start, next); next += sepLen; s = s.trim(); if (s.length() == 0) { s = null; } } catch (Exception e) { throw new IOException( Trace.getMessage( Trace.TextDatabaseRowInput_getField3, true, new Object[] { new Integer(field), e.toString() })); } return s; } public String readString() throws IOException { return getField(fieldSep, fieldSepLen, fieldSepEnd); } private String readVarString() throws IOException { return getField(varSep, varSepLen, varSepEnd); } private String readLongVarString() throws IOException { return getField(longvarSep, longvarSepLen, longvarSepEnd); } public short readShortData() throws IOException { return (short) readIntData(); } public int readIntData() throws IOException { String s = readString(); if (s == null) { return 0; } s = s.trim(); if (s.length() == 0) { return 0; } return Integer.parseInt(s); } public long readLongData() throws IOException { throw Trace.runtimeError(Trace.UNSUPPORTED_INTERNAL_OPERATION, "RowInputText"); } public int readType() throws IOException { return 0; } protected boolean checkNull() { // Return null on each column read instead. return false; } protected String readChar(int type) throws IOException { switch (type) { case Types.CHAR : return readString(); case Types.VARCHAR : case Types.VARCHAR_IGNORECASE : return readVarString(); case Types.LONGVARCHAR : default : return readLongVarString(); } } protected Integer readSmallint() throws IOException, HsqlException { String s = readString(); if (s == null) { return null; } s = s.trim(); if (s.length() == 0) { return null; } return Integer.valueOf(s); } protected Integer readInteger() throws IOException, HsqlException { String s = readString(); if (s == null) { return null; } s = s.trim(); if (s.length() == 0) { return null; } return Integer.valueOf(s); } protected Long readBigint() throws IOException, HsqlException { String s = readString(); if (s == null) { return null; } s = s.trim(); if (s.length() == 0) { return null; } return Long.valueOf(s); } protected Double readReal(int type) throws IOException, HsqlException { String s = readString(); if (s == null) { return null; } s = s.trim(); if (s.length() == 0) { return null; } return Double.valueOf(s); } protected BigDecimal readDecimal() throws IOException, HsqlException { String s = readString(); if (s == null) { return null; } s = s.trim(); if (s.length() == 0) { return null; } return new BigDecimal(s); } protected Time readTime() throws IOException, HsqlException { String s = readString(); if (s == null) { return null; } s = s.trim(); if (s.length() == 0) { return null; } return HsqlDateTime.timeValue(s); } protected Date readDate() throws IOException, HsqlException { String s = readString(); if (s == null) { return null; } s = s.trim(); if (s.length() == 0) { return null; } return HsqlDateTime.dateValue(s); } protected Timestamp readTimestamp() throws IOException, HsqlException { String s = readString(); if (s == null) { return null; } s = s.trim(); if (s.length() == 0) { return null; } return HsqlDateTime.timestampValue(s); } protected Boolean readBit() throws IOException, HsqlException { String s = readString(); if (s == null) { return null; } s = s.trim(); if (s.length() == 0) { return null; } return s.equalsIgnoreCase("TRUE") ? Boolean.TRUE : Boolean.FALSE; } protected Object readOther() throws IOException, HsqlException { byte[] data; String s = readString(); if (s == null) { return null; } s = s.trim(); if (s.length() == 0) { return null; } data = Column.hexToByteArray(s); return new JavaObject(data); } protected Binary readBinary(int type) throws IOException, HsqlException { String s = readString(); if (s == null) { return null; } s = s.trim(); if (s.length() == 0) { return null; } return new Binary(Column.hexToByteArray(s), false); } public int getLineNumber() { return line; } public void skippedLine() { line++; } public void reset() { text = ""; textLen = 0; filePos = 0; next = 0; field = 0; line = 0; } } hsqldb-1.8.0.10.orig/src/org/hsqldb/rowio/RowInputTextQuoted.java0000644000175000017500000001171410456536715023312 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.rowio; import java.io.IOException; import org.hsqldb.Trace; /** * Fields in the source file need not be quoted. Methods in this class unquote * the fields if they are quoted and handle quote character doubling in this * case. * * @author sqlbob@users (RMP) * @version 1.7.2 * @since 1.7.0 */ public class RowInputTextQuoted extends RowInputText { private static final int NORMAL_FIELD = 0; private static final int NEED_END_QUOTE = 1; private static final int FOUND_QUOTE = 2; private char[] qtext; public RowInputTextQuoted(String fieldSep, String varSep, String longvarSep, boolean allQuoted) { super(fieldSep, varSep, longvarSep, allQuoted); } public void setSource(String text, int pos, int byteSize) { super.setSource(text, pos, byteSize); qtext = text.toCharArray(); } protected String getField(String sep, int sepLen, boolean isEnd) throws IOException { //fredt - now the only supported behaviour is emptyIsNull String s = null; if (next >= qtext.length || qtext[next] != '\"') { return (super.getField(sep, sepLen, isEnd)); } try { field++; StringBuffer ret = new StringBuffer(); boolean done = false; int state = NORMAL_FIELD; int end = -1; if (!isEnd) { end = text.indexOf(sep, next); } for (; next < qtext.length; next++) { switch (state) { case NORMAL_FIELD : default : if (next == end) { next += sepLen; done = true; } else if (qtext[next] == '\"') { //-- Beginning of field state = NEED_END_QUOTE; } else { ret.append(qtext[next]); } break; case NEED_END_QUOTE : if (qtext[next] == '\"') { state = FOUND_QUOTE; } else { ret.append(qtext[next]); } break; case FOUND_QUOTE : if (qtext[next] == '\"') { //-- Escaped quote ret.append(qtext[next]); state = NEED_END_QUOTE; } else { next += sepLen - 1; state = NORMAL_FIELD; if (!isEnd) { next++; done = true; } } break; } if (done) { break; } } s = ret.toString(); } catch (Exception e) { throw new IOException( Trace.getMessage( Trace.QuotedTextDatabaseRowInput_getField2, true, new Object[] { new Integer(field), e.toString() })); } return s; } } hsqldb-1.8.0.10.orig/src/org/hsqldb/rowio/RowInputInterface.java0000644000175000017500000000440310416742476023100 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.rowio; import java.io.IOException; import org.hsqldb.HsqlException; /** * Public interface for reading the data for a database row. * * @author sqlbob@users (RMP) * @author fredt@users * @version 1.7.2 * @since 1.7.0 */ public interface RowInputInterface { int getPos(); int getSize(); int readType() throws IOException; String readString() throws IOException; short readShortData() throws IOException; int readIntData() throws IOException; long readLongData() throws IOException; Object[] readData(int[] colTypes) throws IOException, HsqlException; void resetRow(int filePos, int size) throws IOException; byte[] getBuffer(); } hsqldb-1.8.0.10.orig/src/org/hsqldb/rowio/RowOutputBinary.java0000644000175000017500000002272410416742476022633 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.rowio; import java.math.BigDecimal; import java.math.BigInteger; import java.sql.Date; import java.sql.Time; import java.sql.Timestamp; import org.hsqldb.CachedRow; import org.hsqldb.Trace; import org.hsqldb.Types; import org.hsqldb.lib.StringConverter; import org.hsqldb.lib.java.JavaSystem; import org.hsqldb.types.Binary; import org.hsqldb.types.JavaObject; /** * Provides methods for writing the data for a row to a * byte array. The new format of data consists of mainly binary values * and is not compatible with v.1.6.x databases. * * @author sqlbob@users (RMP) * @author fredt@users * @version 1.7.2 * @since 1.7.0 */ public class RowOutputBinary extends RowOutputBase { private static final int INT_STORE_SIZE = 4; int storageSize; public RowOutputBinary() { super(); } public RowOutputBinary(int initialSize) { super(initialSize); } /** * Constructor used for network transmission of result sets * * @exception IOException when an IO error is encountered */ public RowOutputBinary(byte[] buffer) { super(buffer); } // fredt@users - comment - methods for writing column type, name and data size public void writeShortData(short i) { writeShort(i); } public void writeIntData(int i) { writeInt(i); } public void writeIntData(int i, int position) { int temp = count; count = position; writeInt(i); if (count < temp) { count = temp; } } public void writeLongData(long i) { this.writeLong(i); } public void writeEnd() { // fredt - this value is used in 1.7.0 when reading back, for a // 'data integrity' check // has been removed in 1.7.2 as compatibility is no longer necessary // writeInt(pos); for (; count < storageSize; ) { this.write(0); } } public void writeSize(int size) { storageSize = size; writeInt(size); } public void writeType(int type) { writeShort(type); } public void writeString(String s) { int temp = count; writeInt(0); StringConverter.writeUTF(s, this); writeIntData(count - temp - 4, temp); } /** * Calculate the size of byte array required to store a row. * * @param row - a database row * @return size of byte array * @exception HsqlException When data is inconsistent */ public int getSize(CachedRow row) { Object[] data = row.getData(); int[] type = row.getTable().getColumnTypes(); int cols = row.getTable().getColumnCount(); return INT_STORE_SIZE + getSize(data, cols, type); } public static int getRowSize(CachedRow row) { Object[] data = row.getData(); int[] type = row.getTable().getColumnTypes(); int cols = row.getTable().getColumnCount(); return getSize(data, cols, type); } // fredt@users - comment - methods used for writing each SQL type protected void writeFieldType(int type) { write(1); } protected void writeNull(int type) { write(0); } protected void writeChar(String s, int t) { writeString(s); } protected void writeSmallint(Number o) { writeShort(o.intValue()); } protected void writeInteger(Number o) { writeInt(o.intValue()); } protected void writeBigint(Number o) { writeLong(o.longValue()); } protected void writeReal(Double o, int type) { writeLong(Double.doubleToLongBits((o.doubleValue()))); } protected void writeDecimal(BigDecimal o) { int scale = o.scale(); BigInteger bigint = JavaSystem.getUnscaledValue(o); byte[] bytearr = bigint.toByteArray(); writeByteArray(bytearr); writeInt(scale); } protected void writeBit(Boolean o) { write(o.booleanValue() ? 1 : 0); } protected void writeDate(Date o) { writeLong(o.getTime()); } protected void writeTime(Time o) { writeLong(o.getTime()); } protected void writeTimestamp(Timestamp o) { writeLong(o.getTime()); writeInt(o.getNanos()); } protected void writeOther(JavaObject o) { writeByteArray(o.getBytes()); } protected void writeBinary(Binary o, int t) { writeByteArray(o.getBytes()); } // fredt@users - comment - helper and conversion methods protected void writeByteArray(byte[] b) { writeInt(b.length); write(b, 0, b.length); } /** * Calculate the size of byte array required to store a row. * * @param data - the row data * @param l - number of data[] elements to include in calculation * @param type - array of java.sql.Types values * @return size of byte array * @exception HsqlException when data is inconsistent */ private static int getSize(Object[] data, int l, int[] type) { int s = 0; for (int i = 0; i < l; i++) { Object o = data[i]; s += 1; // type or null if (o != null) { switch (type[i]) { case Types.NULL : case Types.CHAR : case Types.VARCHAR : case Types.VARCHAR_IGNORECASE : case Types.LONGVARCHAR : s += 4; s += StringConverter.getUTFSize((String) o); break; case Types.TINYINT : case Types.SMALLINT : s += 2; break; case Types.INTEGER : s += 4; break; case Types.BIGINT : case Types.REAL : case Types.FLOAT : case Types.DOUBLE : s += 8; break; case Types.NUMERIC : case Types.DECIMAL : s += 8; BigDecimal bigdecimal = (BigDecimal) o; BigInteger bigint = JavaSystem.getUnscaledValue(bigdecimal); s += bigint.toByteArray().length; break; case Types.BOOLEAN : s += 1; break; case Types.DATE : case Types.TIME : s += 8; break; case Types.TIMESTAMP : s += 12; break; case Types.BINARY : case Types.VARBINARY : case Types.LONGVARBINARY : s += 4; s += ((Binary) o).getBytesLength(); break; case Types.OTHER : JavaObject jo = (JavaObject) o; s += 4; s += jo.getBytesLength(); break; default : Trace.printSystemOut(Trace.FUNCTION_NOT_SUPPORTED + " " + Types.getTypeString(type[i])); } } } return s; } /** * @param extra amount of extra space */ public void ensureRoom(int extra) { super.ensureRoom(extra); } public void reset() { super.reset(); storageSize = 0; } public void reset(int newSize) { super.reset(newSize); storageSize = 0; } public void setBuffer(byte[] buffer) { buf = buffer; reset(); } } hsqldb-1.8.0.10.orig/src/org/hsqldb/rowio/RowInputBinary.java0000644000175000017500000001375710416742476022440 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.rowio; import java.io.IOException; import java.math.BigDecimal; import java.math.BigInteger; import java.sql.Date; import java.sql.Time; import java.sql.Timestamp; import org.hsqldb.HsqlDateTime; import org.hsqldb.HsqlException; import org.hsqldb.lib.StringConverter; import org.hsqldb.store.ValuePool; import org.hsqldb.types.Binary; import org.hsqldb.types.JavaObject; /** * Provides methods for reading the data for a row from a * byte array. The format of data is that used for storage of cached * tables by v.1.6.x databases, apart from strings. * * @author sqlbob@users (RMP) * @author fredt@users * @version 1.7.2 * @since 1.7.0 */ public class RowInputBinary extends RowInputBase implements org.hsqldb.rowio.RowInputInterface { private RowOutputBinary out; public RowInputBinary() { super(); } public RowInputBinary(byte[] buf) { super(buf); } /** * uses the byte[] buffer from out. At each reset, the buffer is set * to the current one for out. */ public RowInputBinary(RowOutputBinary out) { super(out.getBuffer()); this.out = out; } protected byte[] readByteArray() throws IOException { byte[] b = new byte[readInt()]; readFully(b); return b; } public int readType() throws IOException { return readShort(); } public short readShortData() throws IOException { return readShort(); } public int readIntData() throws IOException { return readInt(); } public long readLongData() throws IOException { return readLong(); } public String readString() throws IOException { int length = readInt(); String s = StringConverter.readUTF(buf, pos, length); s = ValuePool.getString(s); pos += length; return s; } protected boolean checkNull() throws IOException { int b = readByte(); return b == 0 ? true : false; } protected String readChar(int type) throws IOException { return readString(); } protected Integer readSmallint() throws IOException, HsqlException { return ValuePool.getInt(readShort()); } protected Integer readInteger() throws IOException, HsqlException { return ValuePool.getInt(readInt()); } protected Long readBigint() throws IOException, HsqlException { return ValuePool.getLong(readLong()); } protected Double readReal(int type) throws IOException, HsqlException { return ValuePool.getDouble(readLong()); } protected BigDecimal readDecimal() throws IOException, HsqlException { byte[] bytes = readByteArray(); int scale = readInt(); BigInteger bigint = new BigInteger(bytes); return ValuePool.getBigDecimal(new BigDecimal(bigint, scale)); } protected Boolean readBit() throws IOException, HsqlException { return readBoolean() ? Boolean.TRUE : Boolean.FALSE; } protected Time readTime() throws IOException, HsqlException { return new Time(HsqlDateTime.getNormalisedTime(readLong())); } protected Date readDate() throws IOException, HsqlException { long date = HsqlDateTime.getNormalisedDate(readLong()); return ValuePool.getDate(date); } protected Timestamp readTimestamp() throws IOException, HsqlException { return HsqlDateTime.timestampValue(readLong(), readInt()); } protected Object readOther() throws IOException, HsqlException { return new JavaObject(readByteArray()); } protected Binary readBinary(int type) throws IOException, HsqlException { return new Binary(readByteArray(), false); } /** * Used to reset the row, ready for Result data to be written into the * byte[] buffer by an external routine. * */ public void resetRow(int rowsize) { if (out != null) { out.reset(rowsize); buf = out.getBuffer(); } super.reset(); } /** * Used to reset the row, ready for a new db row to be written into the * byte[] buffer by an external routine. * */ public void resetRow(int filepos, int rowsize) throws IOException { if (out != null) { out.reset(rowsize); buf = out.getBuffer(); } super.resetRow(filepos, rowsize); } } hsqldb-1.8.0.10.orig/src/org/hsqldb/rowio/RowInputBase.java0000644000175000017500000001751310416742476022060 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.rowio; import java.io.IOException; import java.math.BigDecimal; import java.sql.Date; import java.sql.Time; import java.sql.Timestamp; import org.hsqldb.HsqlException; import org.hsqldb.Trace; import org.hsqldb.Types; import org.hsqldb.lib.HsqlByteArrayInputStream; import org.hsqldb.types.Binary; /** * Base class for reading the data for a database row in different formats. * Defines the methods that are independent of storage format and declares * the format-dependent methods that subclasses should define. * * @author sqlbob@users (RMP) * @author fredt@users * @version 1.7.2 * @since 1.7.0 */ public abstract class RowInputBase extends HsqlByteArrayInputStream { static final int NO_POS = -1; // fredt - initialisation may be unnecessary as it's done in resetRow() protected int filePos = NO_POS; protected int size; public RowInputBase() { this(new byte[4]); } /** * Constructor takes a complete row */ public RowInputBase(byte[] buf) { super(buf); size = buf.length; } public int getPos() { if (filePos == NO_POS) { // Trace.printSystemOut(Trace.DatabaseRowInput_getPos); } return (filePos); } public int getSize() { return size; } // fredt@users - comment - methods used for node and type data public abstract int readIntData() throws IOException; public abstract long readLongData() throws IOException; public abstract int readType() throws IOException; public abstract String readString() throws IOException; // fredt@users - comment - methods used for SQL types protected abstract boolean checkNull() throws IOException; protected abstract String readChar(int type) throws IOException, HsqlException; protected abstract Integer readSmallint() throws IOException, HsqlException; protected abstract Integer readInteger() throws IOException, HsqlException; protected abstract Long readBigint() throws IOException, HsqlException; protected abstract Double readReal(int type) throws IOException, HsqlException; protected abstract BigDecimal readDecimal() throws IOException, HsqlException; protected abstract Boolean readBit() throws IOException, HsqlException; protected abstract Time readTime() throws IOException, HsqlException; protected abstract Date readDate() throws IOException, HsqlException; protected abstract Timestamp readTimestamp() throws IOException, HsqlException; protected abstract Object readOther() throws IOException, HsqlException; protected abstract Binary readBinary(int type) throws IOException, HsqlException; /** * reads row data from a stream using the JDBC types in colTypes * * @param colTypes * @return * @throws IOException * @throws HsqlException */ public Object[] readData(int[] colTypes) throws IOException, HsqlException { int l = colTypes.length; Object[] data = new Object[l]; Object o; int type; for (int i = 0; i < l; i++) { if (checkNull()) { continue; } o = null; type = colTypes[i]; switch (type) { case Types.NULL : case Types.CHAR : case Types.VARCHAR : case Types.VARCHAR_IGNORECASE : case Types.LONGVARCHAR : o = readChar(type); break; case Types.TINYINT : case Types.SMALLINT : o = readSmallint(); break; case Types.INTEGER : o = readInteger(); break; case Types.BIGINT : o = readBigint(); break; //fredt although REAL is now Double, it is read / written in //the old format for compatibility case Types.REAL : case Types.FLOAT : case Types.DOUBLE : o = readReal(type); break; case Types.NUMERIC : case Types.DECIMAL : o = readDecimal(); break; case Types.DATE : o = readDate(); break; case Types.TIME : o = readTime(); break; case Types.TIMESTAMP : o = readTimestamp(); break; case Types.BOOLEAN : o = readBit(); break; case Types.OTHER : o = readOther(); break; case Types.BINARY : case Types.VARBINARY : case Types.LONGVARBINARY : o = readBinary(type); break; default : throw Trace.runtimeError( Trace.UNSUPPORTED_INTERNAL_OPERATION, "RowInputBase " + Types.getTypeString(type)); } data[i] = o; } return data; } /** * Used to reset the row, ready for a new row to be written into the * byte[] buffer by an external routine. * */ public void resetRow(int filepos, int rowsize) throws IOException { mark = 0; reset(); if (buf.length < rowsize) { buf = new byte[rowsize]; } filePos = filepos; size = count = rowsize; pos = 4; buf[0] = (byte) ((rowsize >>> 24) & 0xFF); buf[1] = (byte) ((rowsize >>> 16) & 0xFF); buf[2] = (byte) ((rowsize >>> 8) & 0xFF); buf[3] = (byte) ((rowsize >>> 0) & 0xFF); } public byte[] getBuffer() { return buf; } public int skipBytes(int n) throws IOException { throw Trace.runtimeError(Trace.UNSUPPORTED_INTERNAL_OPERATION, "RowInputBase"); } public String readLine() throws IOException { throw Trace.runtimeError(Trace.UNSUPPORTED_INTERNAL_OPERATION, "RowInputBase"); } } hsqldb-1.8.0.10.orig/src/org/hsqldb/rowio/RowOutputTextQuoted.java0000644000175000017500000000532010416742477023507 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.rowio; import org.hsqldb.lib.StringConverter; /** * This class quotes strings only if they contain the quote character or * the separator for the field. The quote character is doubled. * * @author sqlbob@users (RMP) * @version 1.8.0 * @since 1.7.0 */ public class RowOutputTextQuoted extends RowOutputText { public RowOutputTextQuoted(String fieldSep, String varSep, String longvarSep, boolean allQuoted, String encoding) { super(fieldSep, varSep, longvarSep, allQuoted, encoding); } protected String checkConvertString(String s, String sep) { if (allQuoted || s.length() == 0 || s.indexOf('\"') != -1 || (sep.length() > 0 && s.indexOf(sep) != -1) || hasUnprintable(s)) { s = StringConverter.toQuotedString(s, '\"', true); } return s; } private boolean hasUnprintable(String s) { for (int i = 0, len = s.length(); i < len; i++) { if (Character.isISOControl(s.charAt(i))) { return true; } } return false; } } hsqldb-1.8.0.10.orig/src/org/hsqldb/HsqlNameManager.java0000644000175000017500000002122310647371426021332 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb; import org.hsqldb.lib.StringConverter; /** * Provides Name Management for SQL objects.

    * * This class now includes the HsqlName class introduced in 1.7.1 and improves * auto-naming with multiple databases in the engine.

    * * Methods check user defined names and issue system generated names * for SQL objects.

    * * This class does not deal with the type of the SQL object for which it * is used.

    * * Some names beginning with SYS_ are reserved for system generated names. * These are defined in isReserveName(String name) and created by the * makeAutoName(String type) factory method

    * * sysNumber is used to generate system-generated names. It is * set to the largest integer encountered in names that use the * SYS_xxxxxxx_INTEGER format. As the DDL is processed before any ALTER * command, any new system generated name will have a larger integer suffix * than all the existing names. * * @author fredt@users * @version 1.8.0 * @since 1.7.2 */ public class HsqlNameManager { private static HsqlNameManager staticManager = new HsqlNameManager(); static { staticManager.serialNumber = Integer.MIN_VALUE; } private int serialNumber = 1; // 0 is reserved in lookups private int sysNumber = 0; static HsqlName newHsqlSystemObjectName(String name) { return new HsqlName(staticManager, name); } public HsqlName newHsqlName(String name, boolean isquoted) { return new HsqlName(this, name, isquoted); } HsqlName newHsqlName(String prefix, String name, boolean isquoted) { return new HsqlName(this, prefix, name, isquoted); } HsqlName newHsqlName(String name) { return new HsqlName(this, name); } /** * Auto names are used for autogenerated indexes or anonymous constraints. * Also the name of a pseudo-column is the autoname "" */ public HsqlName newAutoName(String type) { return newAutoName(type, null); } /** * Auto names are used for autogenerated indexes or anonymous constraints. */ HsqlName newAutoName(String type, String namepart) { StringBuffer sbname = new StringBuffer(); if (type != null) { if (type.length() != 0) { sbname.append("SYS_"); sbname.append(type); sbname.append('_'); if (namepart != null) { sbname.append(namepart); sbname.append('_'); } sbname.append(++sysNumber); } } else { sbname.append(namepart); } return new HsqlName(this, sbname.toString()); } void resetNumbering() { sysNumber = 0; serialNumber = 0; } public static class HsqlName { HsqlNameManager manager; public String name; boolean isNameQuoted; public String statementName; public HsqlName schema; private final int hashCode; private HsqlName(HsqlNameManager man) { manager = man; hashCode = manager.serialNumber++; } private HsqlName(HsqlNameManager man, String name, boolean isquoted) { this(man); rename(name, isquoted); } private HsqlName(HsqlNameManager man, String prefix, String name, boolean isquoted) { this(man); rename(prefix, name, isquoted); } private HsqlName(HsqlNameManager man, String name) { this(man); this.name = this.statementName = name; } public void rename(String name, boolean isquoted) { this.name = name; this.statementName = name; this.isNameQuoted = isquoted; if (isNameQuoted) { statementName = StringConverter.toQuotedString(name, '"', true); } if (name.startsWith("SYS_")) { int length = sysPrefixLength(name); if (length > 0) { try { int temp = Integer.parseInt(name.substring(length)); if (temp > manager.sysNumber) { manager.sysNumber = temp; } } catch (NumberFormatException e) {} } } } void rename(String prefix, String name, boolean isquoted) { StringBuffer sbname = new StringBuffer(prefix); sbname.append('_'); sbname.append(name); rename(sbname.toString(), isquoted); } public boolean equals(Object other) { if (other instanceof HsqlName) { return hashCode == ((HsqlName) other).hashCode; } return false; } /** * hash code for this object is its unique serial number. */ public int hashCode() { return hashCode; } /** * "SYS_IDX_" is used for auto-indexes on referring FK columns or * unique constraints. * "SYS_PK_" is for the primary key constraints * "SYS_CT_" is for unique and check constraints * "SYS_REF_" is for FK constraints in referenced tables * "SYS_FK_" is for FK constraints in referencing tables * */ static final String[] sysPrefixes = new String[] { "SYS_IDX_", "SYS_PK_", "SYS_REF_", "SYS_CT_", "SYS_FK_", }; static int sysPrefixLength(String name) { for (int i = 0; i < sysPrefixes.length; i++) { if (name.startsWith(sysPrefixes[i])) { return sysPrefixes[i].length(); } } return 0; } static boolean isReservedName(String name) { return sysPrefixLength(name) > 0; } boolean isReservedName() { return isReservedName(name); } public String toString() { return getClass().getName() + super.hashCode() + "[this.hashCode()=" + this.hashCode + ", name=" + name + ", name.hashCode()=" + name.hashCode() + ", isNameQuoted=" + isNameQuoted + "]"; } public int compareTo(Object o) { return hashCode - o.hashCode(); } /** * Returns true if the identifier consists of all uppercase letters * digits and underscore, beginning with a letter and is not in the * keyword list. */ static boolean isRegularIdentifier(String name) { for (int i = 0, length = name.length(); i < length; i++) { int c = name.charAt(i); if (c >= 'A' && c <= 'Z') { continue; } else if (c == '_' && i > 0) { continue; } else if (c >= '0' && c <= '9') { continue; } return false; } return !Token.isKeyword(name); } } } hsqldb-1.8.0.10.orig/src/org/hsqldb/GroupedResult.java0000644000175000017500000001420310416742470021126 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb; import org.hsqldb.lib.ArrayUtil; import org.hsqldb.lib.HashSet; import org.hsqldb.lib.Iterator; /** * This class is used for grouping select results, especially for select * statements that include group by clause and nested aggregate functions. * It is used by the Select class regardless the existence of group by * clause. *

    * When a group by clause is defined, a ResultGroup is used to hold * all column values and AggregatingValues for each group. When a group * by clause is not defined, one ResultGroup is used to hold all the * results.

    * * All ResultGroups are placed in a HashSet. Adding a new row * will first retrieve the corresponding group from the table, based on the * values in the group by columns. If a group is found, then the row * associated with the group will be returned. Otherwise a new group is * created with the new row, and the new row is returned. *

    * The Select can then update the values and AggregatingValues * in the returned row, rather than the original row. This approach enables * nested aggregate functions, such as "count(id)+2, 20-count(id), * max(id)-min(id)" support. * * @author Tony Lai * @version 1.7.2 * @since 1.7.2 * @see Expression * @see Select */ // fredt@users - patch 1.7.2 - mods to use new HashSet class and to separate addRow and getRow operations class GroupedResult { /** @todo fredt - initialise results on first use */ private Result result; int groupBegin; int groupEnd; private final boolean isGrouped; private final boolean isAggregated; private HashSet groups; private ResultGroup currGroup; GroupedResult(Select select, Result.ResultMetaData meta) { result = new Result(meta); groupBegin = select.iResultLen; groupEnd = groupBegin + select.iGroupLen; isGrouped = groupBegin != groupEnd; isAggregated = select.isAggregated; if (isGrouped) { groups = new HashSet(); } } Object[] getRow(Object[] row) { if (isGrouped) { ResultGroup newGroup = new ResultGroup(row); ResultGroup group = (ResultGroup) groups.get(newGroup); if (group != null) { ArrayUtil.copyArray(group.row, row, row.length); } } else if (isAggregated) { if (currGroup != null) { ArrayUtil.copyArray(currGroup.row, row, row.length); } } return row; } void addRow(Object[] row) { if (isGrouped) { ResultGroup newGroup = new ResultGroup(row); currGroup = (ResultGroup) groups.get(newGroup); if (currGroup == null) { currGroup = newGroup; groups.add(currGroup); result.add(row); } else { System.arraycopy(row, 0, currGroup.row, 0, row.length); } } else if (isAggregated) { if (currGroup == null) { currGroup = new ResultGroup(row); result.add(row); } else { System.arraycopy(row, 0, currGroup.row, 0, row.length); } } else { result.add(row); } } int size() { return result.getSize(); } Iterator iterator() { return result.iterator(); } Result getResult() { return result; } class ResultGroup { Object[] row; int hashCode; private ResultGroup(Object[] row) { this.row = row; hashCode = 0; for (int i = groupBegin; i < groupEnd; i++) { if (row[i] != null) { hashCode += row[i].hashCode(); } } } public int hashCode() { return hashCode; } public boolean equals(Object obj) { if (obj == this) { return true; } if (obj == null ||!(obj instanceof ResultGroup)) { return false; } ResultGroup group = (ResultGroup) obj; for (int i = groupBegin; i < groupEnd; i++) { if (!equals(row[i], group.row[i])) { return false; } } return true; } private boolean equals(Object o1, Object o2) { return (o1 == null) ? o2 == null : o1.equals(o2); } } } hsqldb-1.8.0.10.orig/src/org/hsqldb/Trace.java0000644000175000017500000007447210767101212017366 0ustar renerene/* Copyright (c) 1995-2000, The Hypersonic SQL Group. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the Hypersonic SQL Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE HYPERSONIC SQL GROUP, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * This software consists of voluntary contributions made by many individuals * on behalf of the Hypersonic SQL Group. * * * For work added by the HSQL Development Group: * * Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb; import java.io.PrintWriter; import org.hsqldb.lib.HsqlByteArrayOutputStream; import org.hsqldb.resources.BundleHandler; /** * handles creation and reporting of error messages and throwing HsqlException * * Rewritten and extended in successive versions of HSQLDB. * * @author Thomas Mueller (Hypersonic SQL Group) * @version 1.8.0 * @since Hypersonic SQL */ // fredt@users 20020221 - patch 513005 by sqlbob@users (RMP) - error reporting // fredt@users 20020221 - patch 513005 by sqlbob@users (RMP) - setting trace // the system property hsqldb.tracesystemout == true is now used for printing // trace message to System.out // fredt@users 20020305 - patch 1.7.0 - various new messages added // tony_lai@users 20020820 - patch 595073 - Duplicated exception msg // fredt@users 20021230 - patch 488118 by xclay@users - allow multithreading // wsonic@users 20031005 - moved string literal messages to Trace with new methods // nitin chauhan 20031005 - moved concatenated string in asserts and checks to Trace with new methods // fredt@users 20040322 - removed unused code - class is a collection of static methods now // fredt@users 20050524 - use resource bundle for messages /** @todo fredt - 20021022 management of nested throws inside the program in * such a way that it is possible to return exactly the text of the error * thrown at a given level without higher level messages being added and to * preserve the original error code */ public class Trace { public static boolean TRACE = false; public static boolean TRACESYSTEMOUT = false; public static final boolean STOP = false; public static final boolean DOASSERT = false; // static String errPropsName = "sql-error-messages"; static int bundleHandle = BundleHandler.getBundleHandle(errPropsName, null); // public static final int // LOCK_FILE_ACQUISITION_FAILURE = 1, CONNECTION_IS_CLOSED = 2, CONNECTION_IS_BROKEN = 3, DATABASE_IS_SHUTDOWN = 4, COLUMN_COUNT_DOES_NOT_MATCH = 5, DIVISION_BY_ZERO = 6, INVALID_ESCAPE = 7, INTEGRITY_CONSTRAINT_VIOLATION = 8, VIOLATION_OF_UNIQUE_INDEX = 9, TRY_TO_INSERT_NULL = 10, UNEXPECTED_TOKEN = 11, UNEXPECTED_END_OF_COMMAND = 12, UNKNOWN_FUNCTION = 13, NEED_AGGREGATE = 14, SUM_OF_NON_NUMERIC = 15, WRONG_DATA_TYPE = 16, CARDINALITY_VIOLATION_NO_SUBCLASS = 17, SERIALIZATION_FAILURE = 18, TRANSFER_CORRUPTED = 19, FUNCTION_NOT_SUPPORTED = 20, TABLE_ALREADY_EXISTS = 21, TABLE_NOT_FOUND = 22, INDEX_ALREADY_EXISTS = 23, SECOND_PRIMARY_KEY = 24, DROP_PRIMARY_KEY = 25, INDEX_NOT_FOUND = 26, COLUMN_ALREADY_EXISTS = 27, COLUMN_NOT_FOUND = 28, FILE_IO_ERROR = 29, WRONG_DATABASE_FILE_VERSION = 30, DATABASE_IS_READONLY = 31, DATA_IS_READONLY = 32, ACCESS_IS_DENIED = 33, INPUTSTREAM_ERROR = 34, NO_DATA_IS_AVAILABLE = 35, USER_ALREADY_EXISTS = 36, USER_NOT_FOUND = 37, ASSERT_FAILED = 38, EXTERNAL_STOP = 39, GENERAL_ERROR = 40, WRONG_OUT_PARAMETER = 41, FUNCTION_NOT_FOUND = 42, TRIGGER_NOT_FOUND = 43, SAVEPOINT_NOT_FOUND = 44, LABEL_REQUIRED = 45, WRONG_DEFAULT_CLAUSE = 46, FOREIGN_KEY_NOT_ALLOWED = 47, UNKNOWN_DATA_SOURCE = 48, BAD_INDEX_CONSTRAINT_NAME = 49, DROP_FK_INDEX = 50, RESULTSET_FORWARD_ONLY = 51, VIEW_ALREADY_EXISTS = 52, VIEW_NOT_FOUND = 53, NOT_USED_54 = 54, NOT_A_TABLE = 55, SYSTEM_INDEX = 56, COLUMN_TYPE_MISMATCH = 57, BAD_ADD_COLUMN_DEFINITION = 58, DROP_SYSTEM_CONSTRAINT = 59, CONSTRAINT_ALREADY_EXISTS = 60, CONSTRAINT_NOT_FOUND = 61, INVALID_JDBC_ARGUMENT = 62, DATABASE_IS_MEMORY_ONLY = 63, OUTER_JOIN_CONDITION = 64, NUMERIC_VALUE_OUT_OF_RANGE = 65, MISSING_SOFTWARE_MODULE = 66, NOT_IN_AGGREGATE_OR_GROUP_BY = 67, INVALID_GROUP_BY = 68, INVALID_HAVING = 69, INVALID_ORDER_BY = 70, INVALID_ORDER_BY_IN_DISTINCT_SELECT = 71, OUT_OF_MEMORY = 72, OPERATION_NOT_SUPPORTED = 73, INVALID_IDENTIFIER = 74, TEXT_TABLE_SOURCE = 75, TEXT_FILE = 76, NOT_USED_77 = 77, ERROR_IN_SCRIPT_FILE = 78, NULL_IN_VALUE_LIST = 79, SOCKET_ERROR = 80, INVALID_CHARACTER_ENCODING = 81, NOT_USED_82 = 82, NOT_USED_83 = 83, NOT_USED_84 = 84, UNEXPECTED_EXCEPTION = 85, NOT_USED_86 = 86, NOT_USED_87 = 87, NOT_USED_88 = 88, NOT_USED_89 = 89, NOT_USED_90 = 90, NOT_USED_91 = 91, NOT_USED_92 = 92, NOT_USED_93 = 93, DATABASE_NOT_EXISTS = 94, INVALID_CONVERSION = 95, ERROR_IN_BINARY_SCRIPT_1 = 96, ERROR_IN_BINARY_SCRIPT_2 = 97, GENERAL_IO_ERROR = 98, EXPRESSION_NOT_SUPPORTED = 99, Constraint_violation = 100, Database_dropTable = 101, ERROR_IN_CONSTRAINT_COLUMN_LIST = 102, TABLE_HAS_NO_PRIMARY_KEY = 103, VIOLATION_OF_UNIQUE_CONSTRAINT = 104, NO_DEFAULT_VALUE_FOR_COLUMN = 105, NOT_A_CONDITION = 106, DatabaseManager_getDatabase = 107, NOT_USED_108 = 108, NOT_USED_109 = 109, NOT_USED_110 = 110, NOT_USED_111 = 111, NOT_USED_112 = 112, DatabaseScriptReader_readDDL = 113, DatabaseScriptReader_readExistingData = 114, Message_Pair = 115, LOAD_SAVE_PROPERTIES = 116, INVALID_TRANSACTION_STATE_NO_SUBCLASS = 117, JDBC_INVALID_BRI_SCOPE = 118, JDBC_NO_RESULT_SET_METADATA = 119, JDBC_NO_RESULT_SET = 120, MISSING_CLOSEBRACKET = 121, ITSNS_OVERWRITE = 122, COLUMN_IS_IN_INDEX = 123, STRING_DATA_TRUNCATION = 124, QUOTED_IDENTIFIER_REQUIRED = 125, STATEMENT_IS_CLOSED = 126, NOT_USED_127 = 127, NOT_USED_128 = 128, DATA_FILE_ERROR = 129, NOT_USED_130 = 130, HsqlDateTime_null_string = 131, NOT_USED_132 = 132, HsqlDateTime_null_date = 133, NOT_USED_134 = 134, HsqlProperties_load = 135, HsqlSocketFactorySecure_verify = 136, HsqlSocketFactorySecure_verify2 = 137, jdbcConnection_nativeSQL = 138, HsqlSocketFactorySecure_verify3 = 139, NOT_USED_140 = 140, NOT_USED_141 = 141, jdbcStatement_executeUpdate = 142, LockFile_checkHeartbeat = 143, LockFile_checkHeartbeat2 = 144, TEXT_STRING_HAS_NEWLINE = 145, Result_Result = 146, SERVER_NO_DATABASE = 147, Server_openServerSocket = 148, Server_openServerSocket2 = 149, TEXT_TABLE_HEADER = 150, NOT_USED_151 = 151, JDBC_PARAMETER_NOT_SET = 152, INVALID_LIMIT = 153, JDBC_STATEMENT_NOT_ROW_COUNT = 154, JDBC_STATEMENT_NOT_RESULTSET = 155, AMBIGUOUS_COLUMN_REFERENCE = 156, CHECK_CONSTRAINT_VIOLATION = 157, JDBC_RESULTSET_IS_CLOSED = 158, SINGLE_COLUMN_EXPECTED = 159, TOKEN_REQUIRED = 160, NOT_USED_161 = 161, NOT_USED_162 = 162, ORDER_LIMIT_REQUIRED = 163, TRIGGER_ALREADY_EXISTS = 164, ASSERT_DIRECT_EXEC_WITH_PARAM = 165, NOT_USED_166 = 166, Expression_compareValues = 167, INVALID_LIMIT_EXPRESSION = 168, INVALID_TOP_EXPRESSION = 169, SQL_CONSTRAINT_REQUIRED = 170, TableWorks_dropConstraint = 171, TEXT_TABLE_SOURCE_FILENAME = 172, TEXT_TABLE_SOURCE_VALUE_MISSING = 173, TEXT_TABLE_SOURCE_SEPARATOR = 174, UNSUPPORTED_PARAM_CLASS = 175, JDBC_NULL_STREAM = 176, INTEGRITY_CONSTRAINT_VIOLATION_NOPARENT = 177, NOT_USED_178 = 178, NOT_USED_179 = 179, QuotedTextDatabaseRowInput_getField = 180, QuotedTextDatabaseRowInput_getField2 = 181, TextDatabaseRowInput_getField = 182, TextDatabaseRowInput_getField2 = 183, TextDatabaseRowInput_getField3 = 184, Parser_ambiguous_between1 = 185, SEQUENCE_REFERENCED_BY_VIEW = 186, NOT_USED_187 = 187, TextCache_openning_file_error = 188, TextCache_closing_file_error = 189, TextCache_purging_file_error = 190, SEQUENCE_NOT_FOUND = 191, SEQUENCE_ALREADY_EXISTS = 192, TABLE_REFERENCED_CONSTRAINT = 193, TABLE_REFERENCED_VIEW = 194, NOT_USED_195 = 195, TEXT_SOURCE_EXISTS = 196, COLUMN_IS_REFERENCED = 197, FUNCTION_CALL_ERROR = 198, TRIGGERED_DATA_CHANGE = 199, INVALID_FUNCTION_ARGUMENT = 200, UNSUPPORTED_INTERNAL_OPERATION = 201, NOT_USED_202 = 202, INVALID_PREPARED_STATEMENT = 203, CREATE_TRIGGER_COMMAND_1 = 204, TRIGGER_FUNCTION_CLASS_NOT_FOUND = 205, NOT_USED_206 = 206, NOT_USED_207 = 207, INVALID_COLLATION_NAME_NO_SUBCLASS = 208, DataFileCache_makeRow = 209, DataFileCache_open = 210, DataFileCache_close = 211, Expression_resolveTypes1 = 212, Expression_resolveTypes2 = 213, Expression_resolveTypes3 = 214, Expression_resolveTypes4 = 215, UNRESOLVED_PARAMETER_TYPE = 216, Expression_resolveTypes6 = 217, Expression_resolveTypes7 = 218, Expression_resolveTypeForLike = 219, NOT_USED_220 = 220, Expression_resolveTypeForIn2 = 221, Session_execute = 222, NOT_USED_223 = 223, NOT_USED_224 = 224, DATA_FILE_IS_FULL = 225, THREE_PART_IDENTIFIER = 226, INVALID_SCHEMA_NAME_NO_SUBCLASS = 227, DEPENDENT_DATABASE_OBJECT_EXISTS = 228, NO_SUCH_ROLE_GRANT = 229, NO_SUCH_ROLE_REVOKE = 230, NONMOD_ACCOUNT = 231, NO_SUCH_GRANTEE = 232, MISSING_SYSAUTH = 233, MISSING_GRANTEE = 234, CHANGE_GRANTEE = 235, NULL_NAME = 236, ILLEGAL_ROLE_NAME = 237, ROLE_ALREADY_EXISTS = 238, NO_SUCH_ROLE = 239, MISSING_ROLEMANAGER = 240, GRANTEE_ALREADY_EXISTS = 241, MISSING_PUBLIC_GRANTEE = 242, NONMOD_GRANTEE = 243, CIRCULAR_GRANT = 244, ALREADY_HAVE_ROLE = 245, DONT_HAVE_ROLE = 246, NOT_USED_247 = 247, RETRIEVE_NEST_ROLE_FAIL = 248, NO_SUCH_RIGHT = 249, IN_SCHEMA_DEFINITION = 250, PRIMARY_KEY_NOT_ALLOWED = 251, COLUMN_IS_IN_CONSTRAINT = 252, COLUMN_SIZE_REQUIRED = 253, INVALID_SIZE_PRECISION = 254, CANNOT_CONNECT_TABLE = 255, INVALID_FILE_ACCESS_CLASS = 256, INVALID_STORAGE_CLASS = 257, LAST_ERROR_HANDLE = 258; // static String MESSAGE_TAG = "$$"; // /** Used during tests. */ static { try { TRACE = TRACE || Boolean.getBoolean("hsqldb.trace"); TRACESYSTEMOUT = TRACESYSTEMOUT || Boolean.getBoolean("hsqldb.tracesystemout"); } catch (Exception e) {} if (!"LAST".equals(BundleHandler.getString(bundleHandle, String.valueOf(LAST_ERROR_HANDLE)))) { throw new RuntimeException(); } } /** * Compose error message by inserting the strings in the add parameters * in placeholders within the error message. The message string contains * $$ markers for each context variable. Context variables are supplied in * the add parameters. * * @param code main error code * @param subCode sub error code (if 0 => no subMessage!) * @param add optional parameters * * @return an HsqlException */ public static HsqlException error(int code, int subCode, final Object[] add) { // in case of negative code code = Math.abs(code); String mainErrorMessage = getMessage(code); String state = "S1000"; if (mainErrorMessage.length() >= 5) { state = mainErrorMessage.substring(0, 5); mainErrorMessage = mainErrorMessage.substring(6); } if (subCode != 0) { mainErrorMessage += getMessage(Math.abs(subCode)); } StringBuffer sb = new StringBuffer(mainErrorMessage.length() + 32); int lastIndex = 0; int escIndex = mainErrorMessage.length(); if (add != null) { // removed test: i < add.length // because if mainErrorMessage is equal to "blabla $$" // then the statement escIndex = mainErrorMessage.length(); // is never reached! ??? for (int i = 0; i < add.length; i++) { escIndex = mainErrorMessage.indexOf(MESSAGE_TAG, lastIndex); if (escIndex == -1) { break; } sb.append(mainErrorMessage.substring(lastIndex, escIndex)); sb.append(add[i] == null ? "null exception message" : add[i].toString()); lastIndex = escIndex + MESSAGE_TAG.length(); } } escIndex = mainErrorMessage.length(); sb.append(mainErrorMessage.substring(lastIndex, escIndex)); return new HsqlException(sb.toString(), state, -code); } /** * Compose error message by inserting the strings in the add parameters * in placeholders within the error message. The message string contains * $$ markers for each context variable. Context variables are supplied in * the add parameters. * * @param code main error code * @param add optional parameters * * @return an HsqlException */ public static HsqlException error(int code, final Object[] add) { return error(code, 0, add); } public static HsqlException error(int code, int code2, String add) { return error(code, getMessage(code2) + ' ' + add); } public static HsqlException error(int code, int code2) { return error(code, getMessage(code2)); } /** * Method declaration * * * @param code * @param add * * @return */ public static HsqlException error(int code, Object add) { // fredt@users 20020221 - patch 513005 by sqlbob@users (RMP) code = Math.abs(code); String s = getMessage(code); if (add != null) { s += ": " + add.toString(); } // fredt@users 20020221 - patch 513005 by sqlbob@users (RMP) return new HsqlException(s.substring(6), s.substring(0, 5), -code); //return getError(s); } /** * Return a new HsqlException according to the result parameter. * * @param result the Result associated with the exception * @return a new HsqlException according to the result parameter */ public static HsqlException error(final Result result) { return new HsqlException(result); } /** * Return a new Result of type error. * * @param result the Result associated with the exception * @return a new HsqlException according to the result parameter */ // fredt@users 20020221 - patch 513005 by sqlbob@users (RMP) /** * Constructor for errors * * @param e exception */ static Result toResult(HsqlException e) { return new Result(e.getMessage(), e.getSQLState(), e.getErrorCode()); } public static RuntimeException runtimeError(int code, Object add) { HsqlException e = error(code, add); return new RuntimeException(e.getMessage()); } /** * Returns the error message given the error code.
    * Note: this method must be used when throwing exception other * than HsqlException. * * @param errorCode the error code associated to the error message * @return the error message associated with the error code * @see #sDescription */ public static String getMessage(final int errorCode) { return getMessage(errorCode, false, null); } /** * Returns the error message given the error code.
    * Note: this method must be used when throwing exception other * than HsqlException. * * @param errorCode the error code associated to the error message * @param substitute substitute the $$ tokens using data in the values * @param values value(s) to use to replace the token(s) * @return the error message associated with the error code * @see #sDescription */ public static String getMessage(final int errorCode, final boolean substitute, final Object[] values) { if (errorCode < 0) { return ""; } else { String key = String.valueOf(errorCode); if (errorCode < 10) { key = "00" + key; } else if (errorCode < 100) { key = "0" + key; } String mainErrorMessage = BundleHandler.getString(bundleHandle, key); if (!substitute) { // return sDescription[errorCode]; return mainErrorMessage; } else { // final String mainErrorMessage = sDescription[errorCode]; final StringBuffer sb = new StringBuffer(mainErrorMessage.length() + 32); int lastIndex = 0; int escIndex = mainErrorMessage.length(); if (values != null) { // removed test: i < add.length // because if mainErrorMessage is equal to "blabla $$" // then the statement escIndex = mainErrorMessage.length(); // is never reached! ??? for (int i = 0; i < values.length; i++) { escIndex = mainErrorMessage.indexOf(MESSAGE_TAG, lastIndex); if (escIndex == -1) { break; } sb.append(mainErrorMessage.substring(lastIndex, escIndex)); sb.append(values[i].toString()); lastIndex = escIndex + MESSAGE_TAG.length(); } } escIndex = mainErrorMessage.length(); sb.append(mainErrorMessage.substring(lastIndex, escIndex)); return sb.toString(); } } } /** * Method declaration * * * @param code * * @return */ public static HsqlException error(int code) { return error(code, null); } /** * Throws exception if condition is false * * @param condition * @param code * * @throws HsqlException */ public static void check(boolean condition, int code) throws HsqlException { check(condition, code, null, null, null, null); } /** * Throws exception if condition is false * * @param condition * @param code * @param add * * @throws HsqlException */ public static void check(boolean condition, int code, Object add) throws HsqlException { if (!condition) { throw error(code, add); } } /** * Method declaration * * * @param code * @param add * * @throws HsqlException */ static void throwerror(int code, Object add) throws HsqlException { throw error(code, add); } /** * Used to print messages to System.out * * * @param message message to print */ public static void printSystemOut(String message) { if (TRACESYSTEMOUT) { System.out.println(message); } } /** * Used to print messages to System.out * * * @param message1 message to print * @param message2 message to print */ public static void printSystemOut(String message1, long message2) { if (TRACESYSTEMOUT) { System.out.print(message1); System.out.println(message2); } } /** * Returns the stack trace for doAssert() */ private static String getStackTrace() { try { Exception e = new Exception(); throw e; } catch (Exception e) { HsqlByteArrayOutputStream os = new HsqlByteArrayOutputStream(); PrintWriter pw = new PrintWriter(os, true); e.printStackTrace(pw); return os.toString(); } } /** * Throws exception if condition is false * * @param condition * @param code * @param add1 * @param add2 * * @throws HsqlException */ static void check(boolean condition, int code, String add1, String add2) throws HsqlException { check(condition, code, add1, add2, null, null); } /** * Throws exception if condition is false * * @param condition * @param code * @param add1 * @param add2 * @param add3 * * @throws HsqlException */ static void check(boolean condition, int code, String add1, String add2, String add3) throws HsqlException { check(condition, code, add1, add2, add3, null); } /** * Throws exception if condition is false * * @param condition * @param code * @param add1 * @param add2 * @param add3 * @param add4 * * @throws HsqlException */ static void check(boolean condition, int code, String add1, String add2, String add3, String add4) throws HsqlException { if (!condition) { String add = ""; if (add1 != null) { add += add1; } if (add2 != null) { add += add2; } if (add3 != null) { add += add3; } if (add4 != null) { add += add4; } throw error(code, add.length() > 0 ? add : null); } } /** * Throws exception if assertion fails * * @param condition * @throws HsqlException */ static void doAssert(boolean condition) throws HsqlException { doAssert(condition, null); } /** * Throws exception if assertion fails * * @param condition * @param error * @throws HsqlException */ static void doAssert(boolean condition, String error) throws HsqlException { if (!condition) { if (error == null) { error = ""; } error += getStackTrace(); throw error(ASSERT_FAILED, error); } } } hsqldb-1.8.0.10.orig/src/org/hsqldb/HTTPClientConnection.java0000644000175000017500000000742110416742471022265 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb; import java.io.IOException; import org.hsqldb.lib.InOutUtil; /** * HTTP protocol session proxy implementation. Uses the updated HSQLDB HTTP * sub protocol. * * @author fredt@users * @version 1.7.2 * @since 1.7.2 */ public class HTTPClientConnection extends HSQLClientConnection { static final String ENCODING = "8859_1"; public HTTPClientConnection(String host, int port, String path, String database, boolean isTLS, String user, String password) throws HsqlException { super(host, port, path, database, isTLS, user, password); } protected void initConnection(String host, int port, boolean isTLS) throws HsqlException {} public synchronized Result execute(Result r) throws HsqlException { super.openConnection(host, port, isTLS); Result result = super.execute(r); super.closeConnection(); return result; } protected void write(Result r) throws IOException, HsqlException { rowOut.reset(); r.write(rowOut); dataOutput.write("POST ".getBytes(ENCODING)); dataOutput.write(path.getBytes(ENCODING)); dataOutput.write(" HTTP/1.0\r\n".getBytes(ENCODING)); dataOutput.write( "Content-Type: application/octet-stream\r\n".getBytes(ENCODING)); dataOutput.write(("Content-Length: " + rowOut.size() + "\r\n").getBytes(ENCODING)); dataOutput.write("\r\n".getBytes(ENCODING)); dataOutput.write(rowOut.getOutputStream().getBuffer(), 0, rowOut.getOutputStream().size()); dataOutput.flush(); } protected Result read() throws IOException, HsqlException { // fredt - for WebServer 4 lines should be skipped // for Servlet, number of lines depends on Servlet container // stop skipping after the blank line rowOut.reset(); for (;;) { int count = InOutUtil.readLine(dataInput, rowOut); if (count <= 2) { break; } } // Result resultIn = Result.read(rowIn, dataInput); return resultIn; } } hsqldb-1.8.0.10.orig/src/org/hsqldb/TableWorks.java0000644000175000017500000006200310552342040020366 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb; import org.hsqldb.HsqlNameManager.HsqlName; import org.hsqldb.index.RowIterator; import org.hsqldb.lib.ArrayUtil; import org.hsqldb.lib.HashSet; /** * The methods in this class perform alterations to the structure of an * existing table which may result in a new Table object * * @author fredt@users * @version 1.8.0 * @since 1.7.0 */ class TableWorks { private Table table; private Session session; TableWorks(Session session, Table table) { this.table = table; this.session = session; } Table getTable() { return table; } /** * Creates a foreign key according to current sql.strict_fk or * sql.strong_fk settings. Foreign keys are enforced via indexes on both * the referencing (child) and referenced (parent) tables. *

    * In versions 1.7.0 and 1.7.1 some non-standard features were supported * for compatibility with older databases. These allowed foreign keys * to be created without the prior existence of a unique constraint on * the referenced columns. *

    * In version 1.7.2, a unique constraint on the referenced columns must * exist. * * The non-unique index on the referencing table is now always created * whether or not a PK or unique constraint index on the columns exist. * This closes the loopholes opened by the introduction of ALTER TABLE * for adding foreign keys. * * Foriegn keys on temp tables can reference other temp tables with the * same rules above. Foreign keys on permanent tables cannot reference * temp tables. * * Duplicate foreign keys are now disallowed. * * -- The unique index on the referenced table must always belong to a * constraint (PK or UNIQUE). Otherwise after a SHUTDOWN and restart the * index will not exist at the time of creation of the foreign key when * the foreign key is referencing the same table. * * -- The non-unique index on the referencing table is always created * regardless of any existing index. This allows the foreign key * constraint to be dropped when required. * * * (fred@users) * * @param fkcol * @param expcol * @param name foreign key name * @param expTable * @param deleteAction * @param updateAction * @throws HsqlException */ void createForeignKey(int[] fkcol, int[] expcol, HsqlName name, Table mainTable, int deleteAction, int updateAction) throws HsqlException { table.database.schemaManager.checkConstraintExists(name.name, table.getSchemaName(), false); // name check if (table.getConstraint(name.name) != null) { throw Trace.error(Trace.CONSTRAINT_ALREADY_EXISTS); } // existing FK check if (table.getConstraintForColumns(mainTable, expcol, fkcol) != null) { throw Trace.error(Trace.CONSTRAINT_ALREADY_EXISTS); } if (mainTable.isTemp() != table.isTemp()) { throw Trace.error(Trace.FOREIGN_KEY_NOT_ALLOWED); } boolean isSelf = table == mainTable; int offset = table.database.schemaManager.getTableIndex(table); boolean isforward = offset != -1 && offset < table.database.schemaManager.getTableIndex(mainTable); Index exportindex = mainTable.getUniqueConstraintIndexForColumns(expcol); if (exportindex == null) { throw Trace.error(Trace.SQL_CONSTRAINT_REQUIRED, mainTable.getName().statementName); } // existing rows, value checks Constraint.checkReferencedRows(session, table, fkcol, exportindex); // create HsqlName iname = table.database.nameManager.newAutoName("IDX"); Index fkindex = createIndex(fkcol, iname, false, true, isforward); HsqlName pkname = table.database.nameManager.newAutoName("REF", name.name); if (isSelf) { // in case createIndex resulted in new Table object mainTable = table; } Constraint c = new Constraint(pkname, name, mainTable, table, expcol, fkcol, exportindex, fkindex, deleteAction, updateAction); table.addConstraint(c); mainTable.addConstraint(new Constraint(pkname, c)); table.database.schemaManager.registerConstraintName(name.name, table.getName()); } /** * Because of the way indexes and column data are held in memory and * on disk, it is necessary to recreate the table when an index is added * to a non-empty table cached table.

    * * With empty tables, Index objects are simply added

    * * With MEOMRY and TEXT tables, a new index is built up and nodes for * earch row are interlinked (fredt@users) * * @param col * @param name * @param unique * @param constraint * @param forward * @return new index * @throws HsqlException normally for lack of resources */ Index createIndex(int[] col, HsqlName name, boolean unique, boolean constraint, boolean forward) throws HsqlException { Index newindex; if (table.isEmpty(session) || table.isIndexingMutable()) { newindex = table.createIndex(session, col, name, unique, constraint, forward); table.database.schemaManager.clearTempTables(session, table); } else { Table tn = table.moveDefinition(null, null, -1, 0); newindex = tn.createIndexStructure(col, name, unique, constraint, forward); tn.moveData(session, table, -1, 0); tn.updateConstraintsTables(session, table, -1, 0); int index = table.database.schemaManager.getTableIndex(table); table.database.schemaManager.setTable(index, tn); table = tn; } table.database.schemaManager.clearTempTables(session, table); table.database.schemaManager.registerIndexName( newindex.getName().name, table.getName()); table.database.schemaManager.recompileViews(table); return newindex; } void addPrimaryKey(int[] cols, HsqlName name) throws HsqlException { if (name == null) { name = table.makeSysPKName(); } table.database.schemaManager.checkConstraintExists(name.name, table.getSchemaName(), false); addOrDropPrimaryKey(cols, false); Constraint newconstraint = new Constraint(name, table, table.getPrimaryIndex(), Constraint.PRIMARY_KEY); table.addConstraint(newconstraint); table.database.schemaManager.registerConstraintName(name.name, table.getName()); } void addOrDropPrimaryKey(int[] cols, boolean identity) throws HsqlException { if (cols == null) { table.checkDropIndex(table.getIndexes()[0].getName().name, null, true); } Table tn = table.moveDefinitionPK(cols, identity); tn.moveData(session, table, -1, 0); tn.updateConstraintsTables(session, table, -1, 0); int index = table.database.schemaManager.getTableIndex(table); table.database.schemaManager.setTable(index, tn); table = tn; table.database.schemaManager.recompileViews(table); } /** * A unique constraint relies on a unique indexe on the table. It can * cover a single column or multiple columns. *

    * All unique constraint names are generated by Database.java as unique * within the database. Duplicate constraints (more than one unique * constriant on the same set of columns are still allowed but the * names will be different. (fredt@users) * * @param col * @param name * @throws HsqlException */ void createUniqueConstraint(int[] col, HsqlName name) throws HsqlException { table.database.schemaManager.checkConstraintExists(name.name, table.getSchemaName(), false); Constraint[] constraints = table.getConstraints(); for (int i = 0, size = constraints.length; i < size; i++) { Constraint c = constraints[i]; if (c.isEquivalent(col, Constraint.UNIQUE) || c.getName().name.equals(name.name)) { throw Trace.error(Trace.CONSTRAINT_ALREADY_EXISTS); } } // create an autonamed index HsqlName indexname = table.database.nameManager.newAutoName("IDX", name.name); Index index = createIndex(col, indexname, true, true, false); Constraint newconstraint = new Constraint(name, table, index, Constraint.UNIQUE); table.addConstraint(newconstraint); table.database.schemaManager.registerConstraintName(name.name, table.getName()); } void createCheckConstraint(Constraint c, HsqlName name) throws HsqlException { table.database.schemaManager.checkConstraintExists(name.name, table.getSchemaName(), false); // check the existing rows Expression e = c.core.check; // this workaround is here to stop LIKE optimisation (for proper scripting) e.setLikeOptimised(); Select s = Expression.getCheckSelect(session, table, e); Result r = s.getResult(session, 1); c.core.checkFilter = s.tFilter[0]; c.core.mainTable = table; if (r.getSize() != 0) { throw Trace.error(Trace.CHECK_CONSTRAINT_VIOLATION); } // getDDL() is here to ensure no subselects etc. are in condition e.getDDL(); // removes reference to the Index object in filter c.core.checkFilter.setAsCheckFilter(); table.addConstraint(c); table.database.schemaManager.registerConstraintName(name.name, table.getName()); } /** * Because of the way indexes and column data are held in memory and * on disk, it is necessary to recreate the table when an index is added * to a non-empty table.

    * Originally, this method would break existing foreign keys as the * table order in the DB was changed. The new table is now linked * in place of the old table (fredt@users) * * @param indexname * @throws HsqlException */ void dropIndex(String indexname) throws HsqlException { if (table.isIndexingMutable()) { table.dropIndex(session, indexname); } else { int[] removeIndex = new int[]{ table.getIndexIndex(indexname) }; Table tn = table.moveDefinition(removeIndex, null, -1, 0); tn.moveData(session, table, -1, 0); tn.updateConstraintsTables(session, table, -1, 0); int i = table.database.schemaManager.getTableIndex(table); table.database.schemaManager.setTable(i, tn); table = tn; } table.database.schemaManager.removeIndexName(indexname, table.getName()); table.database.schemaManager.recompileViews(table); } /** * * @param column * @param colindex * @throws HsqlException */ void retypeColumn(Column column, int colindex) throws HsqlException { if (table.isText() &&!table.isEmpty(session)) { throw Trace.error(Trace.OPERATION_NOT_SUPPORTED); } table.database.schemaManager.checkColumnIsInView(table, table.getColumn(colindex).columnName.name); table.checkColumnInCheckConstraint( table.getColumn(colindex).columnName.name); int[] dropIndexes = null; Table tn = table.moveDefinition(dropIndexes, column, colindex, 0); tn.moveData(session, table, colindex, 0); tn.updateConstraintsTables(session, table, colindex, 0); int i = table.database.schemaManager.getTableIndex(table); table.database.schemaManager.setTable(i, tn); table = tn; table.database.schemaManager.recompileViews(table); } /** * * @param colIndex * @throws HsqlException */ void dropColumn(int colIndex) throws HsqlException { HsqlName constNameRemove = null; if (table.isText() &&!table.isEmpty(session)) { throw Trace.error(Trace.OPERATION_NOT_SUPPORTED); } table.database.schemaManager.checkColumnIsInView(table, table.getColumn(colIndex).columnName.name); table.checkColumnInCheckConstraint( table.getColumn(colIndex).columnName.name); Table tn = table; int[] dropIndexes = null; String colName = tn.getColumn(colIndex).columnName.name; tn.checkColumnInFKConstraint(colIndex); if (table.getPrimaryKey().length == 1 && table.getPrimaryKey()[0] == colIndex) { table.checkDropIndex(table.getIndex(0).getName().name, null, true); constNameRemove = table.constraintList[0].getName(); tn = table.moveDefinitionPK(null, false); } Constraint c = tn.getUniqueConstraintForColumns(new int[]{ colIndex }); if (c != null) { Index idx = c.getMainIndex(); dropIndexes = new int[]{ tn.getIndexIndex(idx.getName().name) }; constNameRemove = c.getName(); } tn = tn.moveDefinition(dropIndexes, null, colIndex, -1); tn.moveData(session, table, colIndex, -1); tn.updateConstraintsTables(session, table, colIndex, -1); int i = table.database.schemaManager.getTableIndex(table); table.database.schemaManager.setTable(i, tn); table = tn; table.database.schemaManager.recompileViews(table); if (constNameRemove != null) { table.removeConstraint(constNameRemove.name); table.database.schemaManager.removeConstraintName( constNameRemove.name, table.getName()); } } /** * * @param column * @param colIndex * @throws HsqlException */ void addColumn(Column column, int colIndex) throws HsqlException { if (table.isText() &&!table.isEmpty(session)) { throw Trace.error(Trace.OPERATION_NOT_SUPPORTED); } Table tn = table; tn = tn.moveDefinition(null, column, colIndex, 1); if (column.isPrimaryKey()) { tn = tn.moveDefinitionPK(new int[]{ colIndex }, true); } tn.moveData(session, table, colIndex, 1); tn.updateConstraintsTables(session, table, colIndex, 1); int i = table.database.schemaManager.getTableIndex(table); table.database.schemaManager.setTable(i, tn); table = tn; table.database.schemaManager.recompileViews(table); if (column.isPrimaryKey()) { HsqlName pkNameAdd = tn.makeSysPKName(); Constraint newconstraint = new Constraint(pkNameAdd, table, table.getPrimaryIndex(), Constraint.PRIMARY_KEY); table.addConstraint(newconstraint); table.database.schemaManager.registerConstraintName( pkNameAdd.name, table.getName()); } } /** * Drop a named constraint * */ void dropConstraint(String name) throws HsqlException { Constraint c = table.getConstraint(name); int ctype; if (c == null) { throw Trace.error(Trace.CONSTRAINT_NOT_FOUND, Trace.TableWorks_dropConstraint, new Object[] { name, table.getName().name }); } ctype = c.getType(); if (ctype == Constraint.MAIN) { throw Trace.error(Trace.DROP_SYSTEM_CONSTRAINT); } if (ctype == Constraint.PRIMARY_KEY) { addOrDropPrimaryKey(null, false); table.removeConstraint(name); } else if (ctype == Constraint.FOREIGN_KEY) { dropFKConstraint(c); } else if (ctype == Constraint.UNIQUE) { HashSet cset = new HashSet(); cset.add(c); // throw if the index for unique constraint is shared table.checkDropIndex(c.getMainIndex().getName().name, cset, false); // all is well if dropIndex throws for lack of resources dropIndex(c.getMainIndex().getName().name); table.removeConstraint(name); } else if (ctype == Constraint.CHECK) { table.removeConstraint(name); } table.database.schemaManager.removeConstraintName(name, table.getName()); } void dropFKConstraint(Constraint c) throws HsqlException { // drop the reference index, which is automatic and unused elsewhere Index constIndex = c.getRefIndex(); // all is well if dropIndex throws for lack of resources dropIndex(constIndex.getName().name); Table mainTable = c.getMain(); // MAIN constraint was created after REF, so delete first mainTable.removeConstraint(c.getPkName()); table.removeConstraint(c.getFkName()); } void reTypeColumn(Column oldCol, Column newCol) throws HsqlException { boolean notallowed = false; int oldtype = oldCol.getType(); int newtype = newCol.getType(); switch (newtype) { case Types.BINARY : case Types.VARBINARY : case Types.LONGVARBINARY : case Types.OTHER : case Types.JAVA_OBJECT : notallowed = !(newtype == oldtype || table.isEmpty(session)); } switch (oldtype) { case Types.BINARY : case Types.VARBINARY : case Types.LONGVARBINARY : case Types.OTHER : case Types.JAVA_OBJECT : notallowed = !(newtype == oldtype || table.isEmpty(session)); break; case Types.TINYINT : case Types.SMALLINT : case Types.INTEGER : case Types.BIGINT : case Types.REAL : case Types.FLOAT : case Types.DOUBLE : case Types.NUMERIC : case Types.DECIMAL : switch (newtype) { case Types.DATE : case Types.TIME : case Types.TIMESTAMP : notallowed = !table.isEmpty(session); default : } break; case Types.DATE : case Types.TIME : case Types.TIMESTAMP : switch (newtype) { case Types.TINYINT : case Types.SMALLINT : case Types.INTEGER : case Types.BIGINT : case Types.REAL : case Types.FLOAT : case Types.DOUBLE : case Types.NUMERIC : case Types.DECIMAL : notallowed = !table.isEmpty(session); default : } break; } if (notallowed) { throw Trace.error(Trace.INVALID_CONVERSION); } int colIndex = table.getColumnNr(oldCol.columnName.name); if (table.getPrimaryKey().length > 1) { // if there is a multi-column PK, do not change the PK attributes if (newCol.isIdentity()) { throw Trace.error(Trace.SECOND_PRIMARY_KEY); } newCol.setPrimaryKey(oldCol.isPrimaryKey()); if (ArrayUtil.find(table.getPrimaryKey(), colIndex) != -1) { newCol.setNullable(false); } } else if (table.hasPrimaryKey()) { if (oldCol.isPrimaryKey()) { newCol.setPrimaryKey(true); newCol.setNullable(false); } else if (newCol.isPrimaryKey()) { throw Trace.error(Trace.SECOND_PRIMARY_KEY); } } else if (newCol.isPrimaryKey()) { throw Trace.error(Trace.PRIMARY_KEY_NOT_ALLOWED); } // apply and return if only metadata change is required if (newtype == oldtype && oldCol.isNullable() == newCol.isNullable() && oldCol.getScale() == newCol.getScale() && oldCol.isIdentity() == newCol.isIdentity() && oldCol.identityIncrement == newCol.identityIncrement && (oldCol.getSize() == newCol.getSize() || (oldCol.getSize() < newCol.getSize() && (oldtype == Types.VARCHAR || oldtype == Types.DECIMAL || oldtype == Types.NUMERIC)))) { // size of some types may be increased with this command // default expressions can change oldCol.setType(newCol); oldCol.setDefaultExpression(newCol.getDefaultExpression()); table.setColumnTypeVars(colIndex); table.resetDefaultsFlag(); return; } table.database.schemaManager.checkColumnIsInView(table, table.getColumn(colIndex).columnName.name); table.checkColumnInCheckConstraint( table.getColumn(colIndex).columnName.name); table.checkColumnInFKConstraint(colIndex); checkConvertColDataType(oldCol, newCol); retypeColumn(newCol, colIndex); } void checkConvertColDataType(Column oldCol, Column newCol) throws HsqlException { int colIndex = table.getColumnNr(oldCol.columnName.name); RowIterator it = table.getPrimaryIndex().firstRow(session); while (it.hasNext()) { Row row = it.next(); Object o = row.getData()[colIndex]; Column.convertObject(session, o, newCol.getType(), newCol.getSize(), newCol.getScale()); } } /** * performs the work for changing the nullability of a column */ void setColNullability(Column column, boolean nullable) throws HsqlException { int colIndex = table.getColumnNr(column.columnName.name); if (nullable) { if (column.isPrimaryKey()) { throw Trace.error(Trace.TRY_TO_INSERT_NULL); } table.checkColumnInFKConstraint(colIndex, Constraint.SET_NULL); } else { RowIterator it = table.getPrimaryIndex().firstRow(session); while (it.hasNext()) { Row row = it.next(); Object o = row.getData()[colIndex]; if (o == null) { throw Trace.error(Trace.TRY_TO_INSERT_NULL); } } } column.setNullable(nullable); table.setColumnTypeVars(colIndex); } /** * performs the work for changing the default value of a column */ void setColDefaultExpression(int colIndex, Expression def) throws HsqlException { if (def == null) { table.checkColumnInFKConstraint(colIndex, Constraint.SET_DEFAULT); } table.setDefaultExpression(colIndex, def); } } hsqldb-1.8.0.10.orig/src/org/hsqldb/Node.java0000644000175000017500000001663010443525463017216 0ustar renerene/* Copyright (c) 1995-2000, The Hypersonic SQL Group. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the Hypersonic SQL Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE HYPERSONIC SQL GROUP, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * This software consists of voluntary contributions made by many individuals * on behalf of the Hypersonic SQL Group. * * * For work added by the HSQL Development Group: * * Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb; import java.io.IOException; import org.hsqldb.rowio.RowInputInterface; import org.hsqldb.rowio.RowOutputInterface; // fredt@users 20020221 - patch 513005 by sqlbob@users (RMP) // fredt@users 20020920 - path 1.7.1 - refactoring to cut mamory footprint // fredt@users 20021205 - path 1.7.2 - enhancements // fredt@users 20021215 - doc 1.7.2 - javadoc comments /** * The parent for all AVL node implementations, features factory methods for * its subclasses. Subclasses of Node vary in the way they hold * references to other Nodes in the AVL tree, or to their Row data.
    * * nNext links the Node objects belonging to different indexes for each * table row. It is used solely by Row to locate the node belonging to a * particular index. * * * @author Thomas Mueller (Hypersonic SQL Group) * @version 1.7.2 * @since Hypersonic SQL */ abstract class Node { static final int NO_POS = CachedRow.NO_POS; int iBalance; // currently, -2 means 'deleted' Node nNext; // node of next index (nNext==null || nNext.iId=iId+1) static final Node newNode(Row r, int id, Table t) { switch (t.getIndexType()) { case Index.MEMORY_INDEX : return new MemoryNode(r); case Index.POINTER_INDEX : return new PointerNode((CachedRow) r, id); case Index.DISK_INDEX : default : return new DiskNode((CachedRow) r, id); } } static final Node newNode(Row r, RowInputInterface in, int id, Table t) throws IOException, HsqlException { switch (t.getIndexType()) { case Index.MEMORY_INDEX : return new MemoryNode(r); case Index.POINTER_INDEX : return new PointerNode((CachedRow) r, id); case Index.DISK_INDEX : default : return new DiskNode((CachedRow) r, in, id); } } /** * This method unlinks the Node from the other Nodes in the same Index * and from the Row. * * It must keep the links between the Nodes in different Indexes. */ abstract void delete(); /** * File offset of Node. Used with CachedRow objects only */ abstract int getKey(); /** * Return the Row Object that is linked to this Node. */ abstract Row getRow() throws HsqlException; /** * Getters and setters for AVL index operations. */ abstract boolean isLeft(Node node) throws HsqlException; abstract boolean isRight(Node node) throws HsqlException; abstract Node getLeft() throws HsqlException; abstract void setLeft(Node n) throws HsqlException; abstract Node getRight() throws HsqlException; abstract void setRight(Node n) throws HsqlException; abstract Node getParent() throws HsqlException; abstract void setParent(Node n) throws HsqlException; final int getBalance() throws HsqlException { if (Trace.DOASSERT) { Trace.doAssert(iBalance != -2); } return iBalance; } abstract void setBalance(int b) throws HsqlException; abstract boolean isRoot(); abstract boolean isFromLeft() throws HsqlException; /** * Returns the database table data for this Node * */ abstract Object[] getData() throws HsqlException; abstract boolean equals(Node n); /** * Returns the Node Object that currently represents this Node in the * AVL index structure. In current implementations of Node this is * always the same as the this Object for MEMORY and TEXT tables but can * be a different Object for CACHED tables, where DiskNode Objects may * be freed from the Cache. Calling this method returns a Node with * currently valid pointers to its linked AVL Nodes. * */ Node getUpdatedNode() throws HsqlException { return this; } /** * Writes out the node in an implementation dependent way. */ abstract void write(RowOutputInterface out) throws IOException; boolean isDeleted() { return iBalance == -2; } } hsqldb-1.8.0.10.orig/src/org/hsqldb/jdbcDriver.java0000644000175000017500000003220510416742474020406 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb; import java.sql.Connection; import java.sql.Driver; import java.sql.DriverManager; import java.sql.DriverPropertyInfo; import java.sql.SQLException; import java.util.Properties; import org.hsqldb.jdbc.jdbcConnection; import org.hsqldb.persist.HsqlDatabaseProperties; import org.hsqldb.persist.HsqlProperties; // fredt@users 20011220 - patch 1.7.0 by fredt // new version numbering scheme // fredt@users 20020320 - patch 1.7.0 - JDBC 2 support and error trapping // JDBC 2 methods can now be called from jdk 1.1.x - see javadoc comments // fredt@users 20030528 - patch 1.7.2 suggested by Gerhard Hiller - support for properties in URL /** * The following comments are from the http://ldbc.sourceforge.net project. * These are the issues with HSQLDB JDBC implementation that are currently * not resolved. Other issues stated there have been resolved in 1.8.0. * * Time format error: the following statement should work, but throws an exception: * CREATE TABLE Test ( ID INT , Current DATETIME ) * insert into test values(1,'2002-01-01 0:0:0.0') * This works: * insert into test values(1,'2002-01-01 00:00:00.0') * * ABS(4) returns data type DECIMAL, should return data type INTEGER * * Should throw a exception if PreparedStatement.setObject(1,null) is called. * See also JDBC API Tutorial and Reference, Second Edition, * page 544, 24.1.5 Sending JDBC NULL as an IN parameter * * Statement / PreparedStatement setMaxFieldSize is ignored. * * The database should support at least Connection.TRANSACTION_READ_COMMITTED. * Currently, only TRANSACTION_READ_UNCOMMITTED is supported. * * Statement.getQueryTimeout doesn't return the value set before. * * When autocommit is on, executing a query on a statement is * supposed to close the old resultset. This is not implemented. */ /** * Each JDBC driver must supply a class that implements the Driver * interface.

    * * The Java SQL framework allows for multiple database drivers.

    * * The DriverManager will try to load as many drivers as it can find and * then for any given connection request, it will ask each driver in turn * to try to connect to the target URL.

    * * The application developer will normally not need * to call any function of the Driver directly. All required calls are made * by the DriverManager.

    * * *

    *

    HSQLDB-Specific Information:

    * When the HSQL Database Engine Driver class is loaded, it creates an * instance of itself and register it with the DriverManager. This means * that a user can load and register the HSQL Database Engine driver by * calling

     * Class.forName("org.hsqldb.jdbcDriver") 
    For more * information about how to connect to a HSQL Database Engine database, * please see jdbcConnection.

    * * As of version 1.7.0 all JDBC 2 methods can be * called with jdk 1.1.x. Some of these method calls require int values * that are defined in JDBC 2 version of ResultSet. These values are * defined in the jdbcResultSet class when it is compiled with jdk 1.1.x. * When using the JDBC 2 methods that require those values as parameters or * return one of those values, refer to them as follows: (The code will not * be compatible with other JDBC 2 driver, which require ResultSet to be * used instead of jdbcResultSet) (fredt@users)

    *

    * * jdbcResultSet.FETCH_FORWARD
    * jdbcResultSet.TYPE_FORWARD_ONLY
    * jdbcResultSet TYPE_SCROLL_INSENSITIVE
    * jdbcResultSet.CONCUR_READ_ONLY

    * * * @see jdbcConnection */ public class jdbcDriver implements Driver { /** * Attempts to make a database connection to the given URL. The driver * returns "null" if it realizes it is the wrong kind of driver to * connect to the given URL. This will be common, as when the JDBC * driver manager is asked to connect to a given URL it passes the URL * to each loaded driver in turn.

    * * The driver raises a SQLException if it is the right driver to * connect to the given URL, but has trouble connecting to the * database.

    * * The java.util.Properties argument can be used to passed arbitrary * string tag/value pairs as connection arguments.

    * * *

    *

    HSQLDB-Specific Information:

    * For HSQL Database Engine, at least "user" and * "password" properties must be included in the Properties. From * version 1.7.1 two optional properties are supported:

    * get_column_name if set to false, a * ResultSetMetaData.getColumnName() call will return the user defined * label instead of the column name. * strict_md if set to true, some ResultSetMetaData methods * return more strict values for compatibility reasons. *

    * * @param url the URL of the database to which to connect * @param info a list of arbitrary string tag/value pairs as connection * arguments. Normally at least a "user" and "password" property * should be included. * @return a Connection object that represents a * connection to the URL * @exception SQLException if a database access error occurs */ public Connection connect(String url, Properties info) throws SQLException { return getConnection(url, info); } public static Connection getConnection(String url, Properties info) throws SQLException { HsqlProperties props = DatabaseURL.parseURL(url, true); if (props == null) { // supposed to be an HSQLDB driver url but has errors throw new SQLException( Trace.getMessage(Trace.INVALID_JDBC_ARGUMENT)); } else if (props.isEmpty()) { // is not an HSQLDB driver url return null; } props.addProperties(info); return new jdbcConnection(props); } /** * Returns true if the driver thinks that it can open a connection to * the given URL. Typically drivers will return true if they understand * the subprotocol specified in the URL and false if they don't. * * @param url the URL of the database * @return true if this driver can connect to the given URL */ // fredt@users - patch 1.7.0 - allow mixedcase url's public boolean acceptsURL(String url) { return url != null && url.regionMatches(true, 0, DatabaseURL.S_URL_PREFIX, 0, DatabaseURL.S_URL_PREFIX.length()); } /** * Gets information about the possible properties for this driver.

    * * The getPropertyInfo method is intended to allow a generic GUI tool * to discover what properties it should prompt a human for in order to * get enough information to connect to a database. Note that depending * on the values the human has supplied so far, additional values may * become necessary, so it may be necessary to iterate though several * calls to getPropertyInfo.

    * * *

    *

    HSQLDB-Specific Information:

    * HSQLDB 1.7.2 uses the values submitted in info to set the value for * each DriverPropertyInfo object returned. It does not use the default * value that it would use for the property if the value is null. *

    * * @param url the URL of the database to which to connect * @param info a proposed list of tag/value pairs that will be sent on * connect open * @return an array of DriverPropertyInfo objects describing possible * properties. This array may be an empty array if no properties * are required. */ public DriverPropertyInfo[] getPropertyInfo(String url, Properties info) { String[] choices = new String[] { "true", "false" }; DriverPropertyInfo[] pinfo = new DriverPropertyInfo[6]; DriverPropertyInfo p; p = new DriverPropertyInfo("user", null); p.value = info.getProperty("user"); p.required = true; pinfo[0] = p; p = new DriverPropertyInfo("password", null); p.value = info.getProperty("password"); p.required = true; pinfo[1] = p; p = new DriverPropertyInfo("get_column_name", null); p.value = info.getProperty("get_column_name", "true"); p.required = false; p.choices = choices; pinfo[2] = p; p = new DriverPropertyInfo("ifexists", null); p.value = info.getProperty("ifexists"); p.required = false; p.choices = choices; pinfo[3] = p; p = new DriverPropertyInfo("default_schema", null); p.value = info.getProperty("default_schema"); p.required = false; p.choices = choices; pinfo[4] = p; p = new DriverPropertyInfo("shutdown", null); p.value = info.getProperty("shutdown"); p.required = false; p.choices = choices; pinfo[5] = p; return pinfo; } /** * Gets the driver's major version number. * * @return this driver's major version number */ public int getMajorVersion() { return HsqlDatabaseProperties.MAJOR; } /** * Gets the driver's minor version number. * * @return this driver's minor version number */ public int getMinorVersion() { return HsqlDatabaseProperties.MINOR; } /** * Reports whether this driver is a genuine JDBC COMPLIANTTM driver. A driver may only report true here * if it passes the JDBC compliance tests; otherwise it is required to * return false. JDBC compliance requires full support for the JDBC API * and full support for SQL 92 Entry Level. It is expected that JDBC * compliant drivers will be available for all the major commercial * databases.

    * * *

    *

    HSQLDB-Specific Information:

    * HSQL Database Engine currently does not yet * support all required SQL 92 Entry Level functionality and thus * returns false. It looks like other drivers return true but do not * support all features.

    *

    * * This method is not intended to encourage the development of non-JDBC * compliant drivers, but is a recognition of the fact that some * vendors are interested in using the JDBC API and framework for * lightweight databases that do not support full database * functionality, or for special databases such as document information * retrieval where a SQL implementation may not be feasible. * * @return Description of the Return Value */ public boolean jdbcCompliant() { /** @todo fredt - we should aim to be able to report true */ return false; } static { try { DriverManager.registerDriver(new jdbcDriver()); } catch (Exception e) {} } } hsqldb-1.8.0.10.orig/src/org/hsqldb/Tokenizer.java0000644000175000017500000007732010767515275020317 0ustar renerene/* Copyright (c) 1995-2000, The Hypersonic SQL Group. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the Hypersonic SQL Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE HYPERSONIC SQL GROUP, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * This software consists of voluntary contributions made by many individuals * on behalf of the Hypersonic SQL Group. * * * For work added by the HSQL Development Group: * * Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb; import java.math.BigDecimal; import java.util.Locale; import org.hsqldb.lib.IntValueHashMap; import org.hsqldb.store.ValuePool; import org.hsqldb.lib.java.JavaSystem; // fredt@users 20020218 - patch 455785 by hjbusch@users - large DECIMAL inserts // also Long.MIM_VALUE (bug 473388) inserts - applied to different parts // fredt@users 20020408 - patch 1.7.0 by fredt - exact integral types // integral values are cast into the smallest type that can hold them // fredt@users 20020501 - patch 550970 by boucherb@users - fewer StringBuffers // fredt@users 20020611 - patch 1.7.0 by fredt - correct statement logging // changes to the working of getLastPart() to return the correct statement for // logging in the .script file. // also restructuring to reduce use of objects and speed up tokenising of // strings and quoted identifiers // fredt@users 20021112 - patch 1.7.2 by Nitin Chauhan - use of switch // rewrite of the majority of multiple if(){}else{} chains with switch(){} // fredt@users 20030610 - patch 1.7.2 - no StringBuffers /** * Provides the ability to tokenize SQL character sequences. * * Extensively rewritten and extended in successive versions of HSQLDB. * * @author Thomas Mueller (Hypersonic SQL Group) * @version 1.8.0 * @since Hypersonic SQL */ public class Tokenizer { private static final int NO_TYPE = 0, NAME = 1, LONG_NAME = 2, SPECIAL = 3, NUMBER = 4, FLOAT = 5, STRING = 6, LONG = 7, DECIMAL = 8, BOOLEAN = 9, DATE = 10, TIME = 11, TIMESTAMP = 12, NULL = 13, NAMED_PARAM = 14; // used only internally private static final int QUOTED_IDENTIFIER = 15, REMARK_LINE = 16, REMARK = 17; private String sCommand; private int iLength; private int iIndex; private int tokenIndex; private int nextTokenIndex; private int beginIndex; private int iType; private String sToken; private int indexLongNameFirst = -1; private String sLongNameFirst = null; private int typeLongNameFirst; // getToken() will clear LongNameFirst unless retainFirst is set. private boolean retainFirst = false; // private String sLongNameLast; // WAIT. Don't do anything before popping another Token (because the // state variables aren't set properly due to a call of wait()). private boolean bWait; private boolean lastTokenQuotedID; // literals that are values static IntValueHashMap valueTokens; static { valueTokens = new IntValueHashMap(); valueTokens.put(Token.T_NULL, NULL); valueTokens.put(Token.T_TRUE, BOOLEAN); valueTokens.put(Token.T_FALSE, BOOLEAN); } public Tokenizer() {} public Tokenizer(String s) { sCommand = s; iLength = s.length(); iIndex = 0; } public void reset(String s) { sCommand = s; iLength = s.length(); iIndex = 0; tokenIndex = 0; nextTokenIndex = 0; beginIndex = 0; iType = NO_TYPE; typeLongNameFirst = NO_TYPE; sToken = null; indexLongNameFirst = -1; sLongNameFirst = null; // sLongNameLast = null; bWait = false; lastTokenQuotedID = false; retainFirst = false; } /** * * @throws HsqlException */ void back() throws HsqlException { if (bWait) { Trace.doAssert(false, "Querying state when in Wait mode"); } nextTokenIndex = iIndex; iIndex = ( indexLongNameFirst != -1 ) ? indexLongNameFirst : tokenIndex; bWait = true; } /** * get the given token or throw * * for commands and simple unquoted identifiers only * * @param match * * @throws HsqlException */ String getThis(String match) throws HsqlException { getToken(); matchThis(match); return sToken; } /** * for commands and simple unquoted identifiers only */ void matchThis(String match) throws HsqlException { if (bWait) { Trace.doAssert(false, "Querying state when in Wait mode"); } if (!sToken.equals(match) || iType == QUOTED_IDENTIFIER || iType == LONG_NAME) { String token = iType == LONG_NAME ? sLongNameFirst : sToken; throw Trace.error(Trace.UNEXPECTED_TOKEN, Trace.TOKEN_REQUIRED, new Object[] { token, match }); } } void throwUnexpected() throws HsqlException { String token = iType == LONG_NAME ? sLongNameFirst : sToken; throw Trace.error(Trace.UNEXPECTED_TOKEN, token); } /** * Used for commands only * * * @param match */ public boolean isGetThis(String match) throws HsqlException { getToken(); if (iType != QUOTED_IDENTIFIER && iType != LONG_NAME && sToken.equals(match)) { return true; } back(); return false; } /** * this methode is called before other wasXXX methods and takes * precedence */ boolean wasValue() throws HsqlException { if (bWait) { Trace.doAssert(false, "Querying state when in Wait mode"); } switch (iType) { case STRING : case NUMBER : case LONG : case FLOAT : case DECIMAL : case BOOLEAN : case NULL : return true; default : return false; } } boolean wasQuotedIdentifier() throws HsqlException { if (bWait) { Trace.doAssert(false, "Querying state when in Wait mode"); } return lastTokenQuotedID; // iType won't help for LONG_NAMEs. //return iType == QUOTED_IDENTIFIER; } boolean wasFirstQuotedIdentifier() throws HsqlException { if (bWait) { Trace.doAssert(false, "Querying state when in Wait mode"); } return (typeLongNameFirst == QUOTED_IDENTIFIER); } /** * Method declaration * * * @return */ boolean wasLongName() throws HsqlException { if (bWait) { Trace.doAssert(false, "Querying state when in Wait mode"); } return iType == LONG_NAME; } /** * Simple Name means a quoted or unquoted identifier without * qualifiers provided it is not in the hKeyword list. * * @return */ boolean wasSimpleName() throws HsqlException { if (bWait) { Trace.doAssert(false, "Querying state when in Wait mode"); } if (iType == QUOTED_IDENTIFIER && sToken.length() != 0) { return true; } if (iType != NAME) { return false; } return !Token.isKeyword(sToken); } /** * checks whether the previously obtained token was a (named) parameter * * @return true if the previously obtained token was a (named) parameter */ boolean wasParameter() throws HsqlException { Trace.doAssert(!bWait, "Querying state when in Wait mode"); return (iType == NAMED_PARAM); } /** * Name means all quoted and unquoted identifiers plus any word not in the * hKeyword list. * * @return true if it's a name */ boolean wasName() throws HsqlException { if (bWait) { Trace.doAssert(false, "Querying state when in Wait mode"); } if (iType == QUOTED_IDENTIFIER) { return true; } if (iType != NAME && iType != LONG_NAME) { return false; } return !Token.isKeyword(sToken); } String getLongNamePre() throws HsqlException { return null; } /** * Return first part of long name * * * @return */ String getLongNameFirst() throws HsqlException { if (bWait) { Trace.doAssert(false, "Querying state when in Wait mode"); } return sLongNameFirst; } boolean wasSimpleToken() throws HsqlException { return iType != QUOTED_IDENTIFIER && iType != LONG_NAME && iType != STRING && iType != NAMED_PARAM; } String getSimpleToken() throws HsqlException { getToken(); if (!wasSimpleToken()) { String token = iType == LONG_NAME ? sLongNameFirst : sToken; throw Trace.error(Trace.UNEXPECTED_TOKEN, token); } return sToken; } public boolean wasThis(String match) throws HsqlException { if (sToken.equals(match) && iType != QUOTED_IDENTIFIER && iType != LONG_NAME && iType != STRING) { return true; } return false; } /** * getName() is more broad than getSimpleName() in that it includes * 2-part names as well * * @return popped name * @throws HsqlException if next token is not an AName */ public String getName() throws HsqlException { getToken(); if (!wasName()) { throw Trace.error(Trace.UNEXPECTED_TOKEN, sToken); } return sToken; } /** * Returns a single, unqualified name (identifier) * * @return name * @throws HsqlException */ public String getSimpleName() throws HsqlException { getToken(); if (!wasSimpleName()) { String token = iType == LONG_NAME ? sLongNameFirst : sToken; throw Trace.error(Trace.UNEXPECTED_TOKEN, token); } return sToken; } /** * Return any token. * * * @return * * @throws HsqlException */ public String getString() throws HsqlException { getToken(); return sToken; } int getInt() throws HsqlException { long v = getBigint(); if (v > Integer.MAX_VALUE || v < Integer.MIN_VALUE) { throw Trace.error(Trace.WRONG_DATA_TYPE, Types.getTypeString(getType())); } return (int) v; } static BigDecimal LONG_MAX_VALUE_INCREMENT = BigDecimal.valueOf(Long.MAX_VALUE).add(BigDecimal.valueOf(1)); long getBigint() throws HsqlException { boolean minus = false; getToken(); if (sToken.equals("-")) { minus = true; getToken(); } Object o = getAsValue(); int t = getType(); switch (t) { case Types.INTEGER : case Types.BIGINT : break; case Types.DECIMAL : // only Long.MAX_VALUE + 1 together with minus is acceptable if (minus && LONG_MAX_VALUE_INCREMENT.equals(o)) { return Long.MIN_VALUE; } default : throw Trace.error(Trace.WRONG_DATA_TYPE, Types.getTypeString(t)); } long v = ((Number) o).longValue(); return minus ? -v : v; } Object getInType(int type) throws HsqlException { getToken(); Object o = getAsValue(); int t = getType(); if (t != type) { throw Trace.error(Trace.WRONG_DATA_TYPE, Types.getTypeString(t)); } return o; } /** * * * * @return */ public int getType() throws HsqlException { if (bWait) { Trace.doAssert(false, "Querying state when in Wait mode"); } // todo: make sure it's used only for Values! // todo: synchronize iType with hColumn switch (iType) { case STRING : return Types.VARCHAR; case NUMBER : return Types.INTEGER; case LONG : return Types.BIGINT; case FLOAT : return Types.DOUBLE; case DECIMAL : return Types.DECIMAL; case BOOLEAN : return Types.BOOLEAN; case DATE : return Types.DATE; case TIME : return Types.TIME; case TIMESTAMP : return Types.TIMESTAMP; default : return Types.NULL; } } /** * Method declaration * * * @return * * @throws HsqlException */ Object getAsValue() throws HsqlException { if (!wasValue()) { throw Trace.error(Trace.UNEXPECTED_TOKEN, sToken); } switch (iType) { case NULL : return null; case STRING : //fredt - no longer returning string with a singlequote as last char return sToken; case LONG : return ValuePool.getLong(Long.parseLong(sToken)); case NUMBER : // fredt - this returns unsigned values which are later negated. // as a result Integer.MIN_VALUE or Long.MIN_VALUE are promoted // to a wider type. if (sToken.length() < 11) { try { return ValuePool.getInt(Integer.parseInt(sToken)); } catch (Exception e1) {} } if (sToken.length() < 20) { try { iType = LONG; return ValuePool.getLong(Long.parseLong(sToken)); } catch (Exception e2) {} } iType = DECIMAL; return new BigDecimal(sToken); case FLOAT : double d = JavaSystem.parseDouble(sToken); long l = Double.doubleToLongBits(d); return ValuePool.getDouble(l); case DECIMAL : return new BigDecimal(sToken); case BOOLEAN : return sToken.equalsIgnoreCase("TRUE") ? Boolean.TRUE : Boolean.FALSE; case DATE : return HsqlDateTime.dateValue(sToken); case TIME : return HsqlDateTime.timeValue(sToken); case TIMESTAMP : return HsqlDateTime.timestampValue(sToken); default : return sToken; } } /** * return the current position to be used for VIEW processing * * @return */ int getPosition() { return iIndex; } /** * mark the current position to be used for future getLastPart() calls * * @return */ String getPart(int begin, int end) { return sCommand.substring(begin, end); } /** * mark the current position to be used for future getLastPart() calls * * @return */ int getPartMarker() { return beginIndex; } /** * mark the current position to be used for future getLastPart() calls * */ void setPartMarker() { beginIndex = iIndex; } /** * mark the position to be used for future getLastPart() calls * */ void setPartMarker(int position) { beginIndex = position; } /** * return part of the command string from the last marked position * * @return */ String getLastPart() { return sCommand.substring(beginIndex, iIndex); } // fredt@users 20020910 - patch 1.7.1 by Nitin Chauhan - rewrite as switch /** * Method declaration * * * @throws HsqlException */ private void getToken() throws HsqlException { if (bWait) { bWait = false; iIndex = nextTokenIndex; return; } if (!retainFirst) { sLongNameFirst = null; indexLongNameFirst = -1; typeLongNameFirst = NO_TYPE; } while (iIndex < iLength && Character.isWhitespace(sCommand.charAt(iIndex))) { iIndex++; } sToken = ""; tokenIndex = iIndex; if (iIndex >= iLength) { iType = NO_TYPE; return; } char c = sCommand.charAt(iIndex); boolean point = false, digit = false, exp = false, afterexp = false; boolean end = false; char cfirst = 0; lastTokenQuotedID = false; if (Character.isJavaIdentifierStart(c)) { iType = NAME; } else if (Character.isDigit(c)) { iType = NUMBER; digit = true; } else { switch (c) { case '(' : sToken = Token.T_OPENBRACKET; iType = SPECIAL; iIndex++; return; case ')' : sToken = Token.T_CLOSEBRACKET; iType = SPECIAL; iIndex++; return; case ',' : sToken = Token.T_COMMA; iType = SPECIAL; iIndex++; return; case '*' : sToken = Token.T_MULTIPLY; iType = SPECIAL; iIndex++; return; case '=' : sToken = Token.T_EQUALS; iType = SPECIAL; iIndex++; return; case ';' : sToken = Token.T_SEMICOLON; iType = SPECIAL; iIndex++; return; case '+' : sToken = Token.T_PLUS; iType = SPECIAL; iIndex++; return; case '%' : sToken = Token.T_PERCENT; iType = SPECIAL; iIndex++; return; case '?' : sToken = Token.T_QUESTION; iType = SPECIAL; iIndex++; return; case ':' : Trace.check(++iIndex < iLength, Trace.UNEXPECTED_END_OF_COMMAND); c = sCommand.charAt(iIndex); Trace.check(Character.isJavaIdentifierStart(c), Trace.INVALID_IDENTIFIER, ":" + c); iType = NAMED_PARAM; break; case '\"' : lastTokenQuotedID = true; iType = QUOTED_IDENTIFIER; iIndex++; sToken = getString('"'); if (iIndex == sCommand.length()) { return; } c = sCommand.charAt(iIndex); if (c == '.') { sLongNameFirst = sToken; indexLongNameFirst = tokenIndex; typeLongNameFirst = iType; iIndex++; if (retainFirst) { throw Trace.error(Trace.THREE_PART_IDENTIFIER); } // fredt - todo - avoid recursion - this has problems when there is whitespace // after the dot - the same with NAME retainFirst = true; getToken(); retainFirst = false; iType = LONG_NAME; } return; case '\'' : iType = STRING; iIndex++; sToken = getString('\''); return; case '!' : case '<' : case '>' : case '|' : case '/' : case '-' : cfirst = c; iType = SPECIAL; break; case '.' : iType = DECIMAL; point = true; break; default : throw Trace.error(Trace.UNEXPECTED_TOKEN, String.valueOf(c)); } } int start = iIndex++; while (true) { if (iIndex >= iLength) { c = ' '; end = true; Trace.check(iType != STRING && iType != QUOTED_IDENTIFIER, Trace.UNEXPECTED_END_OF_COMMAND); } else { c = sCommand.charAt(iIndex); } switch (iType) { case NAMED_PARAM : case NAME : if (Character.isJavaIdentifierPart(c)) { break; } // fredt - todo new char[] to back sToken sToken = sCommand.substring(start, iIndex).toUpperCase(Locale.ENGLISH); // the following only for NAME, not for NAMED_PARAM if (iType == NAMED_PARAM) { return; } if (c == '.') { typeLongNameFirst = iType; sLongNameFirst = sToken; indexLongNameFirst = tokenIndex; iIndex++; if (retainFirst) { throw Trace.error(Trace.THREE_PART_IDENTIFIER); } retainFirst = true; getToken(); // todo: eliminate recursion retainFirst = false; iType = LONG_NAME; } else if (c == '(') { // it is a function call } else { // if in value list then it is a value int type = valueTokens.get(sToken, -1); if (type != -1) { iType = type; } } return; case QUOTED_IDENTIFIER : case STRING : // shouldn't get here break; case REMARK : if (end) { // unfinished remark // maybe print error here iType = NO_TYPE; return; } else if (c == '*') { iIndex++; if (iIndex < iLength && sCommand.charAt(iIndex) == '/') { // using recursion here iIndex++; getToken(); return; } } break; case REMARK_LINE : if (end) { iType = NO_TYPE; return; } else if (c == '\r' || c == '\n') { // using recursion here getToken(); return; } break; case SPECIAL : if (c == '/' && cfirst == '/') { iType = REMARK_LINE; break; } else if (c == '-' && cfirst == '-') { iType = REMARK_LINE; break; } else if (c == '*' && cfirst == '/') { iType = REMARK; break; } else if (c == '>' || c == '=' || c == '|') { break; } sToken = sCommand.substring(start, iIndex); return; case NUMBER : case FLOAT : case DECIMAL : if (Character.isDigit(c)) { digit = true; } else if (c == '.') { iType = DECIMAL; if (point) { throw Trace.error(Trace.UNEXPECTED_TOKEN, "."); } point = true; } else if (c == 'E' || c == 'e') { if (exp) { throw Trace.error(Trace.UNEXPECTED_TOKEN, "E"); } // HJB-2001-08-2001 - now we are sure it's a float iType = FLOAT; // first character after exp may be + or - afterexp = true; point = true; exp = true; } else if (c == '-' && afterexp) { afterexp = false; } else if (c == '+' && afterexp) { afterexp = false; } else { afterexp = false; if (!digit) { if (point && start == iIndex - 1) { sToken = "."; iType = SPECIAL; return; } throw Trace.error(Trace.UNEXPECTED_TOKEN, String.valueOf(c)); } sToken = sCommand.substring(start, iIndex); return; } } iIndex++; } } // fredt - strings are constructed from new char[] objects to avoid slack // because these strings might end up as part of internal data structures // or table elements. // we may consider using pools to avoid recreating the strings private String getString(char quoteChar) throws HsqlException { try { int nextIndex = iIndex; boolean quoteInside = false; for (;;) { nextIndex = sCommand.indexOf(quoteChar, nextIndex); if (nextIndex < 0) { throw Trace.error(Trace.UNEXPECTED_END_OF_COMMAND); } if (nextIndex < iLength - 1 && sCommand.charAt(nextIndex + 1) == quoteChar) { quoteInside = true; nextIndex += 2; continue; } break; } char[] chBuffer = new char[nextIndex - iIndex]; sCommand.getChars(iIndex, nextIndex, chBuffer, 0); int j = chBuffer.length; if (quoteInside) { j = 0; // fredt - loop assumes all occurences of quoteChar are paired // this has already been checked by the preprocessing loop for (int i = 0; i < chBuffer.length; i++, j++) { if (chBuffer[i] == quoteChar) { i++; } chBuffer[j] = chBuffer[i]; } } iIndex = ++nextIndex; return new String(chBuffer, 0, j); } catch (HsqlException e) { throw e; } catch (Exception e) { e.toString(); } return null; } /** * Method declaration * * * @return */ int getLength() { return iLength; } } hsqldb-1.8.0.10.orig/src/org/hsqldb/Trigger.java0000644000175000017500000001135310416742502017724 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb; // fredt@users 20030727 - signature altered to support update triggers /* Contents of row1[] and row2[] in each type of trigger. BEFORE INSERT - row1[] contains single String object = "Statement-level". AFTER INSERT - row1[] contains single String object = "Statement-level". BEFORE UPDATE - row1[] contains single String object = "Statement-level". AFTER UPDATE - row1[] contains single String object = "Statement-level". BEFORE DELETE - row1[] contains single String object = "Statement-level". AFTER DELETE - row1[] contains single String object = "Statement-level". BEFORE INSERT FOR EACH ROW - row2[] contains data about to be inserted and this can be modified within the trigger such that modified data gets written to the database. AFTER INSERT FOR EACH ROW - row2[] contains data just inserted into the table. BEFORE UPDATE FOR EACH ROW - row1[] contains currently stored data and not the data that is about to be updated. - row2[] contains the data that is about to be updated. AFTER UPDATE FOR EACH ROW - row1[] contains old stored data. - row2[] contains the new data. BEFORE DELETE FOR EACH ROW - row1[] contains row data about to be deleted. AFTER DELETE FOR EACH ROW - row1[] contains row data that has been deleted. List compiled by Andrew Knight (quozzbat@users) */ /** * The interface an HSQLDB TRIGGER must implement. The user-supplied class that * implements this must have a default constructor. * * @author Peter Hudson * @version 1.7.2 * @since 1.7.0 */ public interface Trigger { // indexes into the triggers list int INSERT_AFTER = 0; int DELETE_AFTER = 1; int UPDATE_AFTER = 2; int INSERT_BEFORE = INSERT_AFTER + TriggerDef.NUM_TRIGGER_OPS; int DELETE_BEFORE = DELETE_AFTER + TriggerDef.NUM_TRIGGER_OPS; int UPDATE_BEFORE = UPDATE_AFTER + TriggerDef.NUM_TRIGGER_OPS; int INSERT_AFTER_ROW = INSERT_AFTER + 2 * TriggerDef.NUM_TRIGGER_OPS; int DELETE_AFTER_ROW = DELETE_AFTER + 2 * TriggerDef.NUM_TRIGGER_OPS; int UPDATE_AFTER_ROW = UPDATE_AFTER + 2 * TriggerDef.NUM_TRIGGER_OPS; int INSERT_BEFORE_ROW = INSERT_BEFORE + 2 * TriggerDef.NUM_TRIGGER_OPS; int DELETE_BEFORE_ROW = DELETE_BEFORE + 2 * TriggerDef.NUM_TRIGGER_OPS; int UPDATE_BEFORE_ROW = UPDATE_BEFORE + 2 * TriggerDef.NUM_TRIGGER_OPS; /** * The method invoked upon each triggered action.

    * * When UPDATE triggers are fired, oldRow contains the * existing values of the table row and newRow contains the * new values.

    * * For INSERT triggers, oldRow is null and newRow contains the * table row to be inserted. * * For DELETE triggers, newRow is null and oldRow contains the * table row to be deleted. * * type contains the integer index id for trigger type, e.g. * TriggerDef.INSERT_AFTER (fredt@users) * * @param trigName the name of the trigger * @param tabName the name of the table upon which the * triggered action is occuring * @param oldRow the old row * @param newRow the new row */ void fire(int type, String trigName, String tabName, Object[] oldRow, Object[] newRow); } hsqldb-1.8.0.10.orig/src/org/hsqldb/Select.java0000644000175000017500000012100410647165321017537 0ustar renerene/* Copyright (c) 1995-2000, The Hypersonic SQL Group. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the Hypersonic SQL Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE HYPERSONIC SQL GROUP, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * This software consists of voluntary contributions made by many individuals * on behalf of the Hypersonic SQL Group. * * * For work added by the HSQL Development Group: * * Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb; import org.hsqldb.HsqlNameManager.HsqlName; import org.hsqldb.lib.HashMap; import org.hsqldb.lib.HashSet; import org.hsqldb.lib.HsqlArrayList; import org.hsqldb.lib.IntKeyHashMap; import org.hsqldb.lib.Iterator; // fredt@users 20010701 - patch 1.6.1 by hybris // basic implementation of LIMIT n m // fredt@users 20020130 - patch 471710 by fredt - LIMIT rewritten // for SELECT LIMIT n m DISTINCT // fredt@users 20020221 - patch 513005 by sqlbob@users (RMP) // type and logging attributes of sIntotable // fredt@users 20020230 - patch 495938 by johnhobs@users - GROUP BY order // fred@users 20020522 - patch 1.7.0 - aggregate functions with DISTINCT // rougier@users 20020522 - patch 552830 - COUNT(DISTINCT) // fredt@users 20020804 - patch 580347 by dkkopp - view speedup // tony_lai@users 20021020 - patch 1.7.2 - improved aggregates and HAVING // boucherb@users 20030811 - patch 1.7.2 - prepared statement support // fredt@users 20031012 - patch 1.7.2 - better OUTER JOIN implementation // fredt@users 20031012 - patch 1.7.2 - SQL standard ORDER BY with UNION and other set queries // fredt@users 200408xx - patch 1.7.2 - correct evaluation of the precedence of nested UNION and other set query /** * The compiled representation of an SQL SELECT. * * Extended in successive versions of HSQLDB. * * @author Thomas Mueller (Hypersonic SQL Group) * @version 1.8.0 * @since Hypersonic SQL */ class Select { boolean isDistinctSelect; boolean isAggregated; private boolean isGrouped; private HashSet groupColumnNames; TableFilter[] tFilter; Expression limitCondition; Expression queryCondition; // null means no condition Expression havingCondition; // null means none Expression[] exprColumns; // 'result', 'group' and 'order' columns int iResultLen; // number of columns that are 'result' int iGroupLen; // number of columns that are 'group' int iHavingLen; // number of columns that are 'group' int iOrderLen; // number of columns that are 'order' int[] sortOrder; int[] sortDirection; boolean sortUnion; // if true, sort the result of the full union HsqlName sIntoTable; // null means not select..into int intoType; Select[] unionArray; // only set in the first Select in a union chain int unionMaxDepth; // max unionDepth in chain Select unionSelect; // null means no union select int unionType; int unionDepth; static final int NOUNION = 0, UNION = 1, UNIONALL = 2, INTERSECT = 3, EXCEPT = 4; private boolean simpleLimit; // true if maxrows can be uses as is Result.ResultMetaData resultMetaData; IntKeyHashMap asteriskPositions; /** * Experimental. * * Map the column aliases to expressions in order to resolve alias names * in WHERE clauses * */ HashMap getColumnAliases() { HashMap aliasMap = new HashMap(); for (int i = 0; i < iResultLen; i++) { String alias = exprColumns[i].getAlias(); if (alias != null) { aliasMap.put(alias, exprColumns[i]); } } return aliasMap; } /** * Method declaration * * * @throws HsqlException */ void resolve(Session session) throws HsqlException { resolveTables(); resolveTypes(session); setFilterConditions(session); } /** * Method declaration * * * @throws HsqlException */ private void resolveTables() throws HsqlException { // replace the aliases with expressions for (int i = iResultLen; i < exprColumns.length; i++) { if (exprColumns[i].getType() == Expression.COLUMN) { if (exprColumns[i].joinedTableColumnIndex == -1) { boolean descending = exprColumns[i].isDescending(); exprColumns[i] = exprColumns[i].getExpressionForAlias(exprColumns, iResultLen); if (descending) { exprColumns[i].setDescending(); } } } else { exprColumns[i].replaceAliases(exprColumns, iResultLen); } } if (queryCondition != null) { queryCondition.replaceAliases(exprColumns, iResultLen); } int len = tFilter.length; for (int i = 0; i < len; i++) { resolveTables(tFilter[i]); } } /** * Converts the types of the columns in set operations to those in the first * Select. */ void resolveUnionColumnTypes() throws HsqlException { if (unionSelect != null) { if (unionSelect.iResultLen != iResultLen) { throw Trace.error(Trace.COLUMN_COUNT_DOES_NOT_MATCH); } for (int i = 0; i < iResultLen; i++) { Expression e = exprColumns[i]; if (!e.isTypeEqual(unionSelect.exprColumns[i])) { unionSelect.exprColumns[i] = new Expression(unionSelect.exprColumns[i], e.getDataType(), e.getColumnSize(), e.getColumnScale()); } } } } /** * Sets the types of all the expressions that have so far resolved. * * @throws HsqlException */ void resolveTypes(Session session) throws HsqlException { int len = exprColumns.length; for (int i = 0; i < len; i++) { exprColumns[i].resolveTypes(session); } if (queryCondition != null) { queryCondition.resolveTypes(session); } } void resolveTablesUnion(TableFilter f) throws HsqlException { if (unionArray == null) { resolveTables(f); } else { for (int i = 0; i < unionArray.length; i++) { unionArray[i].resolveTables(f); } } } /** * Resolves the tables for all the Expression in the Select object * if it is possible to do so with the given TableFilter. * * @param f * * @throws HsqlException */ void resolveTables(TableFilter f) throws HsqlException { int len = exprColumns.length; for (int i = 0; i < len; i++) { exprColumns[i].resolveTables(f); } if (queryCondition != null) { queryCondition.resolveTables(f); } } private void setFilterConditions(Session session) throws HsqlException { if (queryCondition == null) { return; } for (int i = 0; i < tFilter.length; i++) { tFilter[i].setConditions(session, queryCondition); } } /** * Check all Expression have resolved. Return true or false as a result. * Throw if false and check parameter is true. * * @throws HsqlException */ boolean checkResolved(boolean check) throws HsqlException { boolean result = true; int len = exprColumns.length; for (int i = 0; i < len; i++) { result = result && exprColumns[i].checkResolved(check); } if (queryCondition != null) { result = result && queryCondition.checkResolved(check); } if (havingCondition != null) { result = result && havingCondition.checkResolved(check); } for (int i = 0; i < tFilter.length; i++) { if (tFilter[i].filterIndex == null) { tFilter[i].filterIndex = tFilter[i].filterTable.getPrimaryIndex(); } } return result; } /** * Removes all the TableFilters from the Expressions. * * @throws HsqlException */ /* void removeFilters() throws HsqlException { int len = eColumn.length; for (int i = 0; i < len; i++) { eColumn[i].removeFilters(); } if (eCondition != null) { eCondition.removeFilters(); } } */ /** * Returns a single value result or throws if the result has more than * one row with one value. * * @param type data type * @param session context * @return the single valued result * @throws HsqlException */ Object getValue(Session session, int type) throws HsqlException { resolve(session); Result r = getResult(session, 2); // 2 records are required for test int size = r.getSize(); int len = r.getColumnCount(); if (len == 1) { if (size == 0) { return null; } else if (size == 1) { Object o = r.rRoot.data[0]; return r.metaData.colTypes[0] == type ? o : Column.convertObject( o, type); } else { throw Trace.error(Trace.CARDINALITY_VIOLATION_NO_SUBCLASS); } } HsqlException e = Trace.error(Trace.CARDINALITY_VIOLATION_NO_SUBCLASS); throw new HsqlInternalException(e); } /** * Resolves expressions and pepares thre metadata for the result. */ void prepareResult(Session session) throws HsqlException { resolveAll(session, true); if (iGroupLen > 0) { // has been set in Parser isGrouped = true; groupColumnNames = new HashSet(); for (int i = iResultLen; i < iResultLen + iGroupLen; i++) { // MarcH: this is wrong for a CASE WHEN statement in a SELECT CASE WHEN ..., statement // collectColumnName collects no columns if exprColumns[i]'s expressiontype is Expression.CASEWHEN // collectAllColumnNames collects all columns used in the CASE WHEN statement // exprColumns[i].collectColumnName(groupColumnNames); exprColumns[i].collectAllColumnNames(groupColumnNames); } } int len = exprColumns.length; resultMetaData = new Result.ResultMetaData(len); Result.ResultMetaData rmd = resultMetaData; // tony_lai@users having int groupByStart = iResultLen; int groupByEnd = groupByStart + iGroupLen; int orderByStart = groupByEnd + iHavingLen; int orderByEnd = orderByStart + iOrderLen; for (int i = 0; i < len; i++) { Expression e = exprColumns[i]; rmd.colTypes[i] = e.getDataType(); rmd.colSizes[i] = e.getColumnSize(); rmd.colScales[i] = e.getColumnScale(); if (e.isAggregate()) { isAggregated = true; } if (i >= groupByStart && i < groupByEnd &&!exprColumns[i].canBeInGroupBy()) { Trace.error(Trace.INVALID_GROUP_BY, exprColumns[i]); } if (i >= groupByEnd && i < groupByEnd + iHavingLen &&!exprColumns[i].isConditional()) { Trace.error(Trace.INVALID_HAVING, exprColumns[i]); } if (i >= orderByStart && i < orderByEnd &&!exprColumns[i].canBeInOrderBy()) { Trace.error(Trace.INVALID_ORDER_BY, exprColumns[i]); } if (i < iResultLen) { rmd.colLabels[i] = e.getAlias(); rmd.isLabelQuoted[i] = e.isAliasQuoted(); rmd.schemaNames[i] = e.getTableSchemaName(); rmd.tableNames[i] = e.getTableName(); rmd.colNames[i] = e.getColumnName(); if (rmd.isTableColumn(i)) { rmd.colNullable[i] = e.nullability; rmd.isIdentity[i] = e.isIdentity; rmd.isWritable[i] = e.isWritable; } rmd.classNames[i] = e.getValueClassName(); } } // selected columns checkAggregateOrGroupByColumns(0, iResultLen); // having columns checkAggregateOrGroupByColumns(groupByEnd, orderByStart); // order by columns checkAggregateOrGroupByOrderColumns(orderByStart, orderByEnd); prepareSort(); simpleLimit = (isDistinctSelect == false && isGrouped == false && unionSelect == null && iOrderLen == 0); } /** * This is called externally only on the first Select in a UNION chain. */ void prepareUnions() throws HsqlException { int count = 0; for (Select current = this; current != null; current = current.unionSelect, count++) {} if (count == 1) { if (unionDepth != 0) { throw Trace.error(Trace.MISSING_CLOSEBRACKET); } return; } unionArray = new Select[count]; count = 0; for (Select current = this; current != null; current = current.unionSelect, count++) { unionArray[count] = current; unionMaxDepth = current.unionDepth > unionMaxDepth ? current.unionDepth : unionMaxDepth; } if (unionArray[unionArray.length - 1].unionDepth != 0) { throw Trace.error(Trace.MISSING_CLOSEBRACKET); } } /** * Returns the result of executing this Select. * * @param maxrows may be 0 to indicate no limit on the number of rows. * Positive values limit the size of the result set. * @return the result of executing this Select * @throws HsqlException if a database access error occurs */ Result getResult(Session session, int maxrows) throws HsqlException { Result r; if (unionArray == null) { r = getSingleResult(session, maxrows); } else { r = getResultMain(session); if (sortUnion) { sortResult(session, r); r.trimResult(getLimitStart(session), getLimitCount(session, maxrows)); } } // fredt - now there is no need for the sort and group columns r.setColumnCount(iResultLen); return r; } private Result getResultMain(Session session) throws HsqlException { Result[] unionResults = new Result[unionArray.length]; for (int i = 0; i < unionArray.length; i++) { unionResults[i] = unionArray[i].getSingleResult(session, Integer.MAX_VALUE); } for (int depth = unionMaxDepth; depth >= 0; depth--) { for (int pass = 0; pass < 2; pass++) { for (int i = 0; i < unionArray.length - 1; i++) { if (unionResults[i] != null && unionArray[i].unionDepth >= depth) { if (pass == 0 && unionArray[i].unionType != Select.INTERSECT) { continue; } if (pass == 1 && unionArray[i].unionType == Select.INTERSECT) { continue; } int nextIndex = i + 1; for (; nextIndex < unionArray.length; nextIndex++) { if (unionResults[nextIndex] != null) { break; } } if (nextIndex == unionArray.length) { break; } unionArray[i].mergeResults(session, unionResults[i], unionResults[nextIndex]); unionResults[nextIndex] = unionResults[i]; unionResults[i] = null; } } } } return unionResults[unionResults.length - 1]; } /** * Merges the second result into the first using the unionMode * set operation. */ private void mergeResults(Session session, Result first, Result second) throws HsqlException { switch (unionType) { case UNION : first.append(second); first.removeDuplicates(session, iResultLen); break; case UNIONALL : first.append(second); break; case INTERSECT : first.removeDifferent(session, second, iResultLen); break; case EXCEPT : first.removeSecond(session, second, iResultLen); break; } } int getLimitStart(Session session) throws HsqlException { if (limitCondition != null) { Integer limit = (Integer) limitCondition.getArg().getValue(session); if (limit != null) { return limit.intValue(); } } return 0; } /** * For SELECT LIMIT n m .... * finds cases where the result does not have to be fully built and * returns an adjusted rowCount with LIMIT params. */ int getLimitCount(Session session, int rowCount) throws HsqlException { int limitCount = 0; if (limitCondition != null) { Integer limit = (Integer) limitCondition.getArg2().getValue(session); if (limit != null) { limitCount = limit.intValue(); } } if (rowCount != 0 && (limitCount == 0 || rowCount < limitCount)) { limitCount = rowCount; } return limitCount; } /** * translate the rowCount into total number of rows needed from query, * including any rows skipped at the beginning */ int getMaxRowCount(Session session, int rowCount) throws HsqlException { int limitStart = getLimitStart(session); int limitCount = getLimitCount(session, rowCount); if (!simpleLimit) { rowCount = Integer.MAX_VALUE; } else { if (rowCount == 0) { rowCount = limitCount; } if (rowCount == 0 || rowCount > Integer.MAX_VALUE - limitStart) { rowCount = Integer.MAX_VALUE; } else { rowCount += limitStart; } } return rowCount; } private Result getSingleResult(Session session, int rowCount) throws HsqlException { if (resultMetaData == null) { prepareResult(session); } Result r = buildResult(session, getMaxRowCount(session, rowCount)); // the result is perhaps wider (due to group and order by) // so use the visible columns to remove duplicates if (isDistinctSelect) { r.removeDuplicates(session, iResultLen); } if (!sortUnion) { sortResult(session, r); r.trimResult(getLimitStart(session), getLimitCount(session, rowCount)); } return r; } private void prepareSort() { if (iOrderLen == 0) { return; } sortOrder = new int[iOrderLen]; sortDirection = new int[iOrderLen]; int startCol = iResultLen + iGroupLen + iHavingLen; for (int i = startCol, j = 0; j < iOrderLen; i++, j++) { int colindex = i; // fredt - when a union, use the visible select columns for sort comparison // also whenever a column alias is used if (exprColumns[i].joinedTableColumnIndex != -1) { colindex = exprColumns[i].joinedTableColumnIndex; } sortOrder[j] = colindex; sortDirection[j] = exprColumns[i].isDescending() ? -1 : 1; } } private void sortResult(Session session, Result r) throws HsqlException { if (iOrderLen == 0) { return; } r.sortResult(session, sortOrder, sortDirection); } /** * Check result columns for aggregate or group by violation. * If any result column is aggregated, then all result columns need to be * aggregated, unless it is included in the group by clause. */ private void checkAggregateOrGroupByColumns(int start, int end) throws HsqlException { if (start < end) { HsqlArrayList colExps = new HsqlArrayList(); for (int i = start; i < end; i++) { exprColumns[i].collectInGroupByExpressions(colExps); } for (int i = 0, size = colExps.size(); i < size; i++) { Expression exp = (Expression) colExps.get(i); if (inAggregateOrGroupByClause(exp)) { continue; } throw Trace.error(Trace.NOT_IN_AGGREGATE_OR_GROUP_BY, exp); } } } private void checkAggregateOrGroupByOrderColumns(int start, int end) throws HsqlException { checkAggregateOrGroupByColumns(start, end); if (start < end && isDistinctSelect) { HsqlArrayList colExps = new HsqlArrayList(); for (int i = start; i < end; i++) { exprColumns[i].collectInGroupByExpressions(colExps); } for (int i = 0, size = colExps.size(); i < size; i++) { Expression exp = (Expression) colExps.get(i); if (isSimilarIn(exp, 0, iResultLen)) { continue; } throw Trace.error(Trace.INVALID_ORDER_BY_IN_DISTINCT_SELECT, exp); } } } /** * Check if the given expression is acceptable in a select that may * include aggregate function and/or group by clause. *

    * The expression is acceptable if: *

      *
    • The select does not containt any aggregate function; *
    • The expression itself can be included in an aggregate select; *
    • The expression is defined in the group by clause; *
    • All the columns in the expression are defined in the group by clause; * 0) && (definedColumns == null)) { return false; } Iterator i = colNames.iterator(); while (i.hasNext()) { if (!definedColumns.contains(i.next())) { return false; } } return true; } // fredt@users 20030810 - patch 1.7.2 - OUTER JOIN rewrite private Result buildResult(Session session, int limitcount) throws HsqlException { GroupedResult gResult = new GroupedResult(this, resultMetaData); final int len = exprColumns.length; final int filter = tFilter.length; boolean[] first = new boolean[filter]; boolean[] outerused = new boolean[filter]; int level = 0; // fredt - shortcut needed by OpenOffice to speed up empty query processing for metadata boolean notempty = !(queryCondition != null && queryCondition.isFixedConditional() &&!queryCondition.testCondition(session)); while (notempty && level >= 0) { // perform a join TableFilter t = tFilter[level]; boolean found; boolean outerfound; if (!first[level]) { found = t.findFirst(session); // if outer join, and no inner result, get next outer row // nonJoinIsNull disallows getting the next outer row in some circumstances outerused[level] = outerfound = t.isOuterJoin &&!found &&!outerused[level] &&!t.nonJoinIsNull && t.nextOuter(session); first[level] = found; } else { found = t.next(session); outerused[level] = outerfound = t.isOuterJoin &&!found &&!first[level] &&!outerused[level] &&!t.nonJoinIsNull && t.nextOuter(session); first[level] = found; } if (!found &&!outerfound) { level--; continue; } if (level < filter - 1) { level++; continue; } else { while (outerused[level]) { outerused[level--] = false; } } // apply condition if (queryCondition == null || queryCondition.testCondition(session)) { try { Object[] row = new Object[len]; // gets the group by column values first. for (int i = gResult.groupBegin; i < gResult.groupEnd; i++) { row[i] = exprColumns[i].getValue(session); } row = gResult.getRow(row); // Get all other values for (int i = 0; i < gResult.groupBegin; i++) { row[i] = isAggregated && exprColumns[i].isAggregate() ? exprColumns[i].updateAggregatingValue(session, row[i]) : exprColumns[i].getValue(session); } for (int i = gResult.groupEnd; i < len; i++) { row[i] = isAggregated && exprColumns[i].isAggregate() ? exprColumns[i].updateAggregatingValue(session, row[i]) : exprColumns[i].getValue(session); } gResult.addRow(row); if (gResult.size() >= limitcount) { break; } } catch (HsqlInternalException e) { continue; } } } if (isAggregated &&!isGrouped && gResult.size() == 0) { Object[] row = new Object[len]; for (int i = 0; i < len; i++) { row[i] = exprColumns[i].isAggregate() ? null : exprColumns[i] .getValue(session); } gResult.addRow(row); } Iterator it = gResult.iterator(); while (it.hasNext()) { Object[] row = (Object[]) it.next(); if (isAggregated) { for (int i = 0; i < len; i++) { if (exprColumns[i].isAggregate()) { row[i] = exprColumns[i].getAggregatedValue(session, row[i]); } } } if (iHavingLen > 0) { // The test value, either aggregate or not, is set already. // Removes the row that does not satisfy the HAVING // condition. if (!Boolean.TRUE.equals(row[iResultLen + iGroupLen])) { it.remove(); } } } return gResult.getResult(); } /** * Skeleton under development. Needs a lot of work. */ public StringBuffer getDDL() throws HsqlException { StringBuffer sb = new StringBuffer(); sb.append(Token.T_SELECT).append(' '); //limitStart; //limitCount; for (int i = 0; i < iResultLen; i++) { sb.append(exprColumns[i].getDDL()); if (i < iResultLen - 1) { sb.append(','); } } sb.append(Token.T_FROM); for (int i = 0; i < tFilter.length; i++) { // find out if any expression in any of the filters isInJoin then use this form TableFilter filter = tFilter[i]; // if any expression isInJoin if (i != 0) { if (filter.isOuterJoin) { sb.append(Token.T_FROM).append(' '); sb.append(Token.T_JOIN).append(' '); } // eStart and eEnd expressions } // otherwise use a comma delimited table list sb.append(','); } // if there are any expressions that are not isInJoin sb.append(' ').append(Token.T_WHERE).append(' '); for (int i = 0; i < tFilter.length; i++) { TableFilter filter = tFilter[i]; // eStart and eEnd expressions that are not isInJoin } // if has GROUP BY sb.append(' ').append(Token.T_GROUP).append(' '); for (int i = iResultLen; i < iResultLen + iGroupLen; i++) { sb.append(exprColumns[i].getDDL()); if (i < iResultLen + iGroupLen - 1) { sb.append(','); } } // if has HAVING sb.append(' ').append(Token.T_HAVING).append(' '); for (int i = iResultLen + iGroupLen; i < iResultLen + iGroupLen + iHavingLen; i++) { sb.append(exprColumns[i].getDDL()); if (i < iResultLen + iGroupLen - 1) { sb.append(','); } } if (unionSelect != null) { switch (unionType) { case EXCEPT : sb.append(' ').append(Token.T_EXCEPT).append(' '); break; case INTERSECT : sb.append(' ').append(Token.T_INTERSECT).append(' '); break; case UNION : sb.append(' ').append(Token.T_UNION).append(' '); break; case UNIONALL : sb.append(' ').append(Token.T_UNION).append(' ').append( Token.T_ALL).append(' '); break; } } // if has ORDER BY int groupByEnd = iResultLen + iGroupLen; int orderByStart = groupByEnd + iHavingLen; int orderByEnd = orderByStart + iOrderLen; sb.append(' ').append(Token.T_ORDER).append(Token.T_BY).append(' '); for (int i = orderByStart; i < orderByEnd; i++) { sb.append(exprColumns[i].getDDL()); if (i < iResultLen + iGroupLen - 1) { sb.append(','); } } return sb; } boolean isResolved = false; /** * @todo - post 1.8.0 - review resolve and check resolve - * determine if isResolved is specific to main query or the full set including UNION * */ boolean resolveAll(Session session, boolean check) throws HsqlException { if (isResolved) { return true; } resolve(session); isResolved = checkResolved(check); if (unionSelect != null) { if (unionSelect.iResultLen != iResultLen) { throw Trace.error(Trace.COLUMN_COUNT_DOES_NOT_MATCH); } for (int i = 0; i < iResultLen; i++) { Expression e = exprColumns[i]; if (!e.isTypeEqual(unionSelect.exprColumns[i])) { unionSelect.exprColumns[i] = new Expression(unionSelect.exprColumns[i], e.getDataType(), e.getColumnSize(), e.getColumnScale()); } } isResolved &= unionSelect.resolveAll(session, check); } return isResolved; } boolean isResolved() { return isResolved; } public String describe(Session session) { StringBuffer sb; String temp; // temporary : it is currently unclear whether this may affect // later attempts to retrieve an actual result (calls getResult(1) // in preProcess mode). Thus, toString() probably should not be called // on Select objects that will actually be used to retrieve results, // only on Select objects used by EXPLAIN PLAN FOR try { getResult(session, 1); } catch (HsqlException e) {} sb = new StringBuffer(); sb.append(super.toString()).append("[\n"); if (sIntoTable != null) { sb.append("into table=[").append(sIntoTable.name).append("]\n"); } if (limitCondition != null) { sb.append("offset=[").append( limitCondition.getArg().describe(session)).append("]\n"); sb.append("limit=[").append( limitCondition.getArg2().describe(session)).append("]\n"); } sb.append("isDistinctSelect=[").append(isDistinctSelect).append( "]\n"); sb.append("isGrouped=[").append(isGrouped).append("]\n"); sb.append("isAggregated=[").append(isAggregated).append("]\n"); sb.append("columns=["); int columns = exprColumns.length - iOrderLen; for (int i = 0; i < columns; i++) { sb.append(exprColumns[i].describe(session)); } sb.append("\n]\n"); sb.append("tableFilters=[\n"); for (int i = 0; i < tFilter.length; i++) { sb.append("[\n"); sb.append(tFilter[i].describe(session)); sb.append("\n]"); } sb.append("]\n"); temp = queryCondition == null ? "null" : queryCondition.describe(session); sb.append("eCondition=[").append(temp).append("]\n"); temp = havingCondition == null ? "null" : havingCondition.describe(session); sb.append("havingCondition=[").append(temp).append("]\n"); sb.append("groupColumns=[").append(groupColumnNames).append("]\n"); if (unionSelect != null) { switch (unionType) { case EXCEPT : sb.append(" EXCEPT "); break; case INTERSECT : sb.append(" INTERSECT "); break; case UNION : sb.append(" UNION "); break; case UNIONALL : sb.append(" UNION ALL "); break; default : sb.append(" UNKNOWN SET OPERATION "); } sb.append("[\n").append(unionSelect.describe(session)).append( "]\n"); } return sb.toString(); } Result describeResult() { Result r; Result.ResultMetaData rmd; Expression e; r = new Result(ResultConstants.DATA, iResultLen); rmd = r.metaData; for (int i = 0; i < iResultLen; i++) { e = exprColumns[i]; rmd.colTypes[i] = e.getDataType(); rmd.colSizes[i] = e.getColumnSize(); rmd.colScales[i] = e.getColumnScale(); rmd.colLabels[i] = e.getAlias(); rmd.isLabelQuoted[i] = e.isAliasQuoted(); rmd.tableNames[i] = e.getTableName(); rmd.colNames[i] = e.getColumnName(); if (rmd.isTableColumn(i)) { rmd.colNullable[i] = e.nullability; rmd.isIdentity[i] = e.isIdentity; rmd.isWritable[i] = e.isWritable; } } return r; } } hsqldb-1.8.0.10.orig/src/org/hsqldb/View.java0000644000175000017500000002675110767037671017260 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb; import org.hsqldb.HsqlNameManager.HsqlName; import org.hsqldb.lib.HsqlArrayList; import org.hsqldb.lib.Iterator; import org.hsqldb.lib.IntKeyHashMap; import org.hsqldb.lib.ArrayUtil; // fredt@users 20020420 - patch523880 by leptipre@users - VIEW support - modified // fredt@users 20031227 - remimplementated as compiled query /** * Represents an SQL VIEW based on a SELECT statement. * * @author leptipre@users * @author fredt@users * @version 1.8.0 * @since 1.7.0 */ class View extends Table { Select viewSelect; SubQuery viewSubQuery; private String statement; private HsqlName[] colList; /** schema at the time of compilation */ HsqlName compileTimeSchema; /** * List of subqueries in this view in order of materialization. Last * element is the view itself. */ SubQuery[] viewSubqueries; /** * Constructor. * @param Session * @param db database * @param name HsqlName of the view * @param definition SELECT statement of the view * @param columns array of HsqlName column names * @throws HsqlException */ View(Session session, Database db, HsqlName name, String definition, HsqlName[] columns) throws HsqlException { super(db, name, VIEW); isReadOnly = true; colList = columns; statement = trimStatement(definition); compileTimeSchema = session.getSchemaHsqlName(null); compile(session); replaceAsterisksInStatement(); HsqlName[] schemas = getSchemas(); for (int i = 0; i < schemas.length; i++) { if (db.schemaManager.isSystemSchema(schemas[i])) { continue; } if (!schemas[i].equals(name.schema)) { throw Trace.error(Trace.INVALID_SCHEMA_NAME_NO_SUBCLASS); } } } /** * Returns the SELECT statement trimmed of any terminating SQL * whitespace, separators or SQL comments. */ static String trimStatement(String s) throws HsqlException { int position; String str; Tokenizer tokenizer = new Tokenizer(s); // fredt@users - this establishes the end of the actual statement // to get rid of any end semicolon or comment line after the end // of statement do { position = tokenizer.getPosition(); str = tokenizer.getString(); } while (str.length() != 0 || tokenizer.wasValue()); return s.substring(0, position).trim(); } /** * Compiles the SELECT statement and sets up the columns. */ void compile(Session session) throws HsqlException { // create the working table Parser p = new Parser(session, this.database, new Tokenizer(statement)); p.setCompilingView(); int brackets = p.parseOpenBracketsSelect(); viewSubQuery = p.parseSubquery(brackets, colList, true, Expression.VIEW); p.setAsView(this); viewSubqueries = p.getSortedSubqueries(); viewSelect = viewSubQuery.select; viewSelect.prepareResult(session); Result.ResultMetaData metadata = viewSelect.resultMetaData; int columns = viewSelect.iResultLen; if (super.columnCount == 0) { // do not add columns at recompile time super.addColumns(metadata, columns); } } /** * Returns the SELECT statement for the view. */ String getStatement() { return statement; } /** * is a private helper for replaceAsterisksInStatement, to avoid some code duplication */ private void collectAsteriskPos(final Select select, IntKeyHashMap asteriskPositions) { if (select.asteriskPositions == null) { return; } Iterator asterisks = select.asteriskPositions.keySet().iterator(); while (asterisks.hasNext()) { int pos = asterisks.nextInt(); asteriskPositions.put(pos, select.asteriskPositions.get(pos)); } // The following is to guarantee the invariant of this class, that the |astersiskPositions| // member of the various Select instances properly describe the occurances // of Expression.ASTERISK in the statement. // Since we are going to replace all those asterisks, we also need to reset the various // |astersiskPositions| instances, which is best done here were all non-null // Select's need to pass by. select.asteriskPositions = null; } /** * replaces all asterisks in our statement with the actual column list * * This way, we ensure what is required by the standard: a view returns a result * which reflects the structure of the underlying tables at the *time of the definition * of the view. */ private void replaceAsterisksInStatement() throws HsqlException { IntKeyHashMap asteriskPositions = new IntKeyHashMap(); // asterisk positions in sub queries for (int i = 0; i < viewSubqueries.length; ++i) { // collect the occurances of asterisks in the statement Select subSelect = viewSubqueries[i].select; collectAsteriskPos(subSelect, asteriskPositions); // the same for all (possible) UNION SELECTs of the sub select if (subSelect.unionArray != null) { // start with index 1, not 0 - the first select is the one already covered by subSelect for (int u = 1; u < subSelect.unionArray.length; ++u) { collectAsteriskPos(subSelect.unionArray[u], asteriskPositions); } } } int[] positions = new int[asteriskPositions.size()]; Iterator it = asteriskPositions.keySet().iterator(); for (int i = 0; i < positions.length; i++) { positions[i] = it.nextInt(); } ArrayUtil.sortArray(positions); StringBuffer expandedStatement = new StringBuffer(); int lastPos = 0; String segment; for (int i = 0; i < positions.length; i++) { int pos = positions[i]; String colList = (String) asteriskPositions.get(pos); if (colList == null) { continue; } segment = statement.substring(lastPos, pos); lastPos = statement.indexOf("*", pos) + 1; expandedStatement.append(segment); expandedStatement.append(' '); expandedStatement.append(colList); expandedStatement.append(' '); } segment = statement.substring(lastPos, statement.length()); expandedStatement.append(segment); statement = expandedStatement.toString(); } /** * Overridden to disable SET TABLE READONLY DDL for View objects. */ void setDataReadOnly(boolean value) throws HsqlException { throw Trace.error(Trace.NOT_A_TABLE); } /** * Returns list of schemas */ HsqlName[] getSchemas() { HsqlArrayList list = new HsqlArrayList(); for (int i = 0; i < viewSubqueries.length; i++) { Select select = viewSubqueries[i].select; for (; select != null; select = select.unionSelect) { TableFilter[] tfilter = select.tFilter; for (int j = 0; j < tfilter.length; j++) { list.add(tfilter[j].filterTable.tableName.schema); } } } return (HsqlName[]) list.toArray(new HsqlName[list.size()]); } boolean hasView(View view) { if (view == this) { return false; } for (int i = 0; i < viewSubqueries.length; i++) { if (viewSubqueries[i].view == view) { return true; } } return false; } /** * Returns true if the view references any column of the named table. */ boolean hasTable(Table table) { for (int i = 0; i < viewSubqueries.length; i++) { Select select = viewSubqueries[i].select; for (; select != null; select = select.unionSelect) { TableFilter[] tfilter = select.tFilter; for (int j = 0; j < tfilter.length; j++) { if (table.equals(tfilter[j].filterTable.tableName)) { return true; } } } } return false; } /** * Returns true if the view references the named column of the named table, * otherwise false. */ boolean hasColumn(Table table, String colname) { if (hasTable(table)) { Expression.Collector coll = new Expression.Collector(); coll.addAll(viewSubqueries[viewSubqueries.length - 1].select, Expression.COLUMN); Iterator it = coll.iterator(); for (; it.hasNext(); ) { Expression e = (Expression) it.next(); if (colname.equals(e.getBaseColumnName()) && table.equals(e.getTableHsqlName())) { return true; } } } return false; } /** * Returns true if the view references the named SEQUENCE, * otherwise false. */ boolean hasSequence(NumberSequence sequence) { Expression.Collector coll = new Expression.Collector(); coll.addAll(viewSubqueries[viewSubqueries.length - 1].select, Expression.SEQUENCE); Iterator it = coll.iterator(); for (; it.hasNext(); ) { Expression e = (Expression) it.next(); if (e.valueData == sequence) { return true; } } return false; } } hsqldb-1.8.0.10.orig/src/org/hsqldb/WebServer.java0000644000175000017500000002436410701763577020247 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb; import org.hsqldb.lib.FileUtil; import org.hsqldb.persist.HsqlProperties; import org.hsqldb.resources.BundleHandler; // fredt@users 20020215 - patch 1.7.0 by fredt // method rorganised to use new HsqlServerProperties class // unsaved@users 20021113 - patch 1.7.2 - SSL support // boucherb@users 20030510 - patch 1.7.2 - SSL support moved to factory interface // boucherb@users 20030510 - patch 1.7.2 - moved all common code to Server // boucherb@users 20030510 - patch 1.7.2 - general lint removal /** * The HSQLDB HTTP protocol network database server.

      * * WebServer has two distinct functions:

      * * The primary function is to allow client/server access to HSQLDB databases * via the HTTP protocol. This protocol is less efficient than the HSQL * protocol used by the Server class and should be used only in situations * where sandboxes or firewalls between the client and the server do not * allow the use of the HSQL protocol. One example is client/server access by * an applet running in browsers on remote hosts and accessing the database * engine on the HTTP server from which the applet originated. From version * 1.7.2, HTTP database connections are persistent and support transactions. * Similar to HSQL connections, they should be explicitly closed to free the * server resources.

      * * The secondary function of WebServer is to act as a simple general purpose * HTTP server. It is aimed to support the minimum requirements set out by * the HTTP/1.0 standard. The HEAD and GET methods can be used to query and * retreive static files from the HTTP server.

      * * Both the database server and HTTP server functions of WebServer can be * configured with the webserver.properties file. It contains entries for the * database server similar to those for the HSQL protocol Server class. In * addition, a list mapping different file endings to their mime types may be * included in this file. (fredt@users)

      * * From the command line, the options are as follows:

      *

       * +----------------+-------------+----------+------------------------------+
       * |    OPTION      |    TYPE     | DEFAULT  |         DESCRIPTION          |
       * +----------------+-------------+----------+------------------------------|
       * | -?             | --          | --       | prints this message          |
       * | -address       | name|number | any      | server inet address          |
       * | -port          | number      | 80       | port at which server listens |
       * | -database.i    | [type]spec  | 0=test   | path of database i           |
       * | -dbname.i      | alias       | --       | url alias for database i     |
       * | -silent        | true|false  | true     | false => display all queries |
       * | -trace         | true|false  | false    | display JDBC trace messages  |
       * | -no_system_exit| true|false  | false    | do not issue System.exit()   |
       * +----------------+-------------+----------+------------------------------+
       * 
      * * Example of the webserver.properties file: * *
       * server.port=80
       * server.database.0=test
       * server.dbname.0=...
       * ...
       * server.database.n=...
       * server.dbname.n=...
       * server.silent=true
       *
       * .htm=text/html
       * .html=text/html
       * .txt=text/plain
       * .gif=image/gif
       * .class=application/octet-stream
       * .jpg=image/jpeg
       * .jgep=image/jpeg
       * .zip=application/x-zip-compressed
       * 
      * *
        *
      • For server.root, use '/' as the separator, even for DOS/Windows. *
      • File extensions for mime types must be lowercase and start with '.' *
      * * Replaces original Hypersonic class of the same name. * * @author fredt@users * @author boucherb@users * @version 1.7.2 * @since 1.7.2 */ public class WebServer extends Server { /** * Handle to resource bundle providing i18n for things like * HTTP error pages. */ static int webBundleHandle = BundleHandler.getBundleHandle("webserver", null); public WebServer() { super(ServerConstants.SC_PROTOCOL_HTTP); } /** * Starts a new WebServer. * * @param args the "command line" parameters with which to start * the WebServer. "-?" will cause the command line arguments * help to be printed to the standard output */ public static void main(String[] args) { String propsPath = FileUtil.getDefaultInstance().canonicalOrAbsolutePath("webserver"); HsqlProperties fileProps = ServerConfiguration.getPropertiesFromFile(propsPath); HsqlProperties props = fileProps == null ? new HsqlProperties() : fileProps; HsqlProperties stringProps = null; try { stringProps = HsqlProperties.argArrayToProps(args, ServerConstants.SC_KEY_PREFIX); } catch (ArrayIndexOutOfBoundsException aioob) { // I'd like to exit with 0 here, but it's possible that user // has called main() programmatically and does not want us to // exit. printHelp("webserver.help"); return; } if (stringProps != null) { if (stringProps.getErrorKeys().length != 0) { printHelp("webserver.help"); return; } props.addProperties(stringProps); } ServerConfiguration.translateDefaultDatabaseProperty(props); // Standard behaviour when started from the command line // is to halt the VM when the server shuts down. This may, of // course, be overridden by whatever, if any, security policy // is in place. ServerConfiguration.translateDefaultNoSystemExitProperty(props); // finished setting up properties; Server server = new WebServer(); try { server.setProperties(props); } catch (Exception e) { server.printError("Failed to set properties"); server.printStackTrace(e); return; } // now messages go to the channel specified in properties server.print("Startup sequence initiated from main() method"); if (fileProps != null) { server.print("Loaded properties from [" + propsPath + ".properties]"); } else { server.print("Could not load properties from file"); server.print("Using cli/default properties only"); } server.start(); } /** * Retrieves the name of the web page served when no page is specified. * This attribute is relevant only when server protocol is HTTP(S). * * @return the name of the web page served when no page is specified * * @jmx.managed-attribute * access="read-write" * description="Used when server protocol is HTTP(S)" */ public String getDefaultWebPage() { return serverProperties.getProperty( ServerConstants.SC_KEY_WEB_DEFAULT_PAGE); } /** * Retrieves a String object describing the command line and * properties options for this Server. * * @return the command line and properties options help for this Server */ public String getHelpString() { return BundleHandler.getString(serverBundleHandle, "webserver.help"); } /** * Retrieves this server's product name.

      * * Typically, this will be something like: "HSQLDB xxx server". * * @return the product name of this server * * @jmx.managed-attribute * access="read-only" * description="Of Server" */ public String getProductName() { return "HSQLDB web server"; } /** * Retrieves a string respresentaion of the network protocol * this server offers, typically one of 'HTTP', HTTPS', 'HSQL' or 'HSQLS'. * * @return string respresentation of this server's protocol * * @jmx.managed-attribute * access="read-only" * description="Used to handle connections" */ public String getProtocol() { return isTls() ? "HTTPS" : "HTTP"; } /** * Retrieves the root context (directory) from which web content * is served. This property is relevant only when the server * protocol is HTTP(S). Although unlikely, it may be that in the future * other contexts, such as jar urls may be supported, so that pages can * be served from the contents of a jar or from the JVM class path. * * @return the root context (directory) from which web content is served * * @jmx.managed-attribute * access="read-write" * description="Context (directory)" */ public String getWebRoot() { return serverProperties.getProperty(ServerConstants.SC_KEY_WEB_ROOT); } } hsqldb-1.8.0.10.orig/src/org/hsqldb/lib/0000755000175000017500000000000011020524527016216 5ustar renerenehsqldb-1.8.0.10.orig/src/org/hsqldb/lib/HsqlByteArrayInputStream.java0000644000175000017500000001511210416742474024022 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.lib; import java.io.DataInput; import java.io.EOFException; import java.io.IOException; import java.io.InputStream; /** * This class is a replacement for both java.io.ByteArrayInputStream * (without synchronization) and java.io.DataInputStream * * @author fredt@users * @version 1.7.2 * @since 1.7.2 */ public class HsqlByteArrayInputStream extends InputStream implements DataInput { protected byte[] buf; protected int pos; protected int mark = 0; protected int count; public HsqlByteArrayInputStream(byte[] buf) { this.buf = buf; this.pos = 0; this.count = buf.length; } public HsqlByteArrayInputStream(byte[] buf, int offset, int length) { this.buf = buf; this.pos = offset; this.count = Math.min(offset + length, buf.length); this.mark = offset; } // methods that implement java.io.DataInput public final void readFully(byte[] b) throws IOException { readFully(b, 0, b.length); } public final void readFully(byte[] b, int off, int len) throws IOException { if (len < 0) { throw new IndexOutOfBoundsException(); } int n = 0; while (n < len) { int count = read(b, off + n, len - n); if (count < 0) { throw new EOFException(); } n += count; } } public final boolean readBoolean() throws IOException { int ch = read(); if (ch < 0) { throw new EOFException(); } return (ch != 0); } public final byte readByte() throws IOException { int ch = read(); if (ch < 0) { throw new EOFException(); } return (byte) ch; } public final int readUnsignedByte() throws IOException { int ch = read(); if (ch < 0) { throw new EOFException(); } return ch; } public short readShort() throws IOException { if (count - pos < 2) { pos = count; throw new EOFException(); } int ch1 = buf[pos++] & 0xff; int ch2 = buf[pos++] & 0xff; return (short) ((ch1 << 8) + (ch2)); } public final int readUnsignedShort() throws IOException { int ch1 = read(); int ch2 = read(); if ((ch1 | ch2) < 0) { throw new EOFException(); } return (ch1 << 8) + (ch2); } public final char readChar() throws IOException { int ch1 = read(); int ch2 = read(); if ((ch1 | ch2) < 0) { throw new EOFException(); } return (char) ((ch1 << 8) + (ch2)); } public int readInt() throws IOException { if (count - pos < 4) { pos = count; throw new EOFException(); } int ch1 = buf[pos++] & 0xff; int ch2 = buf[pos++] & 0xff; int ch3 = buf[pos++] & 0xff; int ch4 = buf[pos++] & 0xff; return ((ch1 << 24) + (ch2 << 16) + (ch3 << 8) + (ch4)); } public final long readLong() throws IOException { return (((long) readInt()) << 32) + (((long) readInt()) & 0xffffffffL); } public final float readFloat() throws IOException { return Float.intBitsToFloat(readInt()); } public final double readDouble() throws IOException { return Double.longBitsToDouble(readLong()); } public int skipBytes(int n) throws IOException { return (int) skip(n); } public String readLine() throws IOException { /** @todo: this will probably be useful */ throw new java.lang.RuntimeException("not implemented."); } public String readUTF() throws IOException { int bytecount = readUnsignedShort(); if (pos + bytecount >= count) { throw new EOFException(); } String result = StringConverter.readUTF(buf, pos, bytecount); pos += bytecount; return result; } // methods that extend java.io.InputStream public int read() { return (pos < count) ? (buf[pos++] & 0xff) : -1; } public int read(byte[] b, int off, int len) { if (pos >= count) { return -1; } if (pos + len > count) { len = count - pos; } if (len <= 0) { return 0; } System.arraycopy(buf, pos, b, off, len); pos += len; return len; } public long skip(long n) { if (pos + n > count) { n = count - pos; } if (n < 0) { return 0; } pos += n; return n; } public int available() { return count - pos; } public boolean markSupported() { return true; } public void mark(int readAheadLimit) { mark = pos; } public void reset() { pos = mark; } public void close() throws IOException {} } hsqldb-1.8.0.10.orig/src/org/hsqldb/lib/IntLookup.java0000644000175000017500000000362610416742474021027 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.lib; import java.util.NoSuchElementException; /** * * @author fredt@users * @version 1.8.0 * @since 1.8.0 */ public interface IntLookup { boolean add(int key, int value); int lookupFirstEqual(int key) throws NoSuchElementException; int lookupFirstGreaterEqual(int key) throws NoSuchElementException; } hsqldb-1.8.0.10.orig/src/org/hsqldb/lib/FileUtil.java0000644000175000017500000002255510705157543020620 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.lib; import java.io.File; import java.io.FileDescriptor; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.util.Random; import org.hsqldb.lib.java.JavaSystem; /** * A collection of static file management methods.

      * Also implements the default FileAccess method * * @author fredt@users * @author boucherb@users * @author Ocke Janssen oj@openoffice.org * @version 1.8.0 * @since 1.7.2 */ public class FileUtil implements FileAccess { private static FileUtil fileUtil = new FileUtil(); /** Creates a new instance of FileUtil */ FileUtil() {} public static FileUtil getDefaultInstance() { return fileUtil; } public boolean isStreamElement(java.lang.String elementName) { return (new File(elementName)).exists(); } public java.io.InputStream openInputStreamElement( java.lang.String streamName) throws java.io.IOException { try { return new FileInputStream(new File(streamName)); } catch (Throwable e) { throw toIOException(e); } } public void createParentDirs(java.lang.String filename) { makeParentDirectories(new File(filename)); } public void removeElement(java.lang.String filename) { if (isStreamElement(filename)) { delete(filename); } } public void renameElement(java.lang.String oldName, java.lang.String newName) { renameOverwrite(oldName, newName); } public java.io.OutputStream openOutputStreamElement( java.lang.String streamName) throws java.io.IOException { return new FileOutputStream(new File(streamName)); } // end of FileAccess implementation // a new File("...")'s path is not canonicalized, only resolved // and normalized (e.g. redundant separator chars removed), // so as of JDK 1.4.2, this is a valid test for case insensitivity, // at least when it is assumed that we are dealing with a configuration // that only needs to consider the host platform's native file system, // even if, unlike for File.getCanonicalPath(), (new File("a")).exists() or // (new File("A")).exits(), regardless of the hosting system's // file path case sensitivity policy. public final boolean fsIsIgnoreCase = (new File("A")).equals(new File("a")); // posix separator normalized to File.separator? // CHECKME: is this true for every file system under Java? public final boolean fsNormalizesPosixSeparator = (new File("/")).getPath().endsWith(File.separator); // for JDK 1.1 createTempFile final Random random = new Random(System.currentTimeMillis()); /** * Delete the named file */ public void delete(String filename) { (new File(filename)).delete(); } /** * Requests, in a JDK 1.1 compliant way, that the file or directory denoted * by the given abstract pathname be deleted when the virtual machine * terminates.

      * * Deletion will be attempted only for JDK 1.2 and greater runtime * environments and only upon normal termination of the virtual * machine, as defined by the Java Language Specification.

      * * Once deletion has been sucessfully requested, it is not possible to * cancel the request. This method should therefore be used with care.

      * * @param f the abstract pathname of the file be deleted when the virtual * machine terminates */ public void deleteOnExit(File f) { JavaSystem.deleteOnExit(f); } /** * Return true or false based on whether the named file exists. */ public boolean exists(String filename) { return (new File(filename)).exists(); } public boolean exists(String fileName, boolean resource, Class cla) { if (fileName == null || fileName.length() == 0) { return false; } return resource ? null != cla.getResource(fileName) : FileUtil.getDefaultInstance().exists(fileName); } /** * Rename the file with oldname to newname. If a file with newname already * exists, it is deleted before the renaming operation proceeds. * * If a file with oldname does not exist, no file will exist after the * operation. */ private void renameOverwrite(String oldname, String newname) { delete(newname); if (exists(oldname)) { File file = new File(oldname); file.renameTo(new File(newname)); } } public static IOException toIOException(Throwable e) { if (e instanceof IOException) { return (IOException) e; } else { return new IOException(e.toString()); } } /** * Retrieves the absolute path, given some path specification. * * @param path the path for which to retrieve the absolute path * @return the absolute path */ public String absolutePath(String path) { return (new File(path)).getAbsolutePath(); } /** * Retrieves the canonical file for the given file, in a * JDK 1.1 complaint way. * * @param f the File for which to retrieve the absolute File * @return the canonical File */ public File canonicalFile(File f) throws IOException { return new File(f.getCanonicalPath()); } /** * Retrieves the canonical file for the given path, in a * JDK 1.1 complaint way. * * @param path the path for which to retrieve the canonical File * @return the canonical File */ public File canonicalFile(String path) throws IOException { return new File(new File(path).getCanonicalPath()); } /** * Retrieves the canonical path for the given File, in a * JDK 1.1 complaint way. * * @param f the File for which to retrieve the canonical path * @return the canonical path */ public String canonicalPath(File f) throws IOException { return f.getCanonicalPath(); } /** * Retrieves the canonical path for the given path, in a * JDK 1.1 complaint way. * * @param path the path for which to retrieve the canonical path * @return the canonical path */ public String canonicalPath(String path) throws IOException { return new File(path).getCanonicalPath(); } /** * Retrieves the canonical path for the given path, or the absolute * path if attemting to retrieve the canonical path fails. * * @param path the path for which to retrieve the canonical or * absolute path * @return the canonical or absolute path */ public String canonicalOrAbsolutePath(String path) { try { return canonicalPath(path); } catch (Exception e) { return absolutePath(path); } } public void makeParentDirectories(File f) { String parent = f.getParent(); if (parent != null) { new File(parent).mkdirs(); } else { // workaround for jdk 1.1 bug (returns null when there is a parent) parent = f.getPath(); int index = parent.lastIndexOf('/'); if (index > 0) { parent = parent.substring(0, index); new File(parent).mkdirs(); } } } public class FileSync implements FileAccess.FileSync { FileDescriptor outDescriptor; FileSync(FileOutputStream os) throws java.io.IOException { outDescriptor = os.getFD(); } public void sync() throws java.io.IOException { outDescriptor.sync(); } } public FileAccess.FileSync getFileSync(java.io.OutputStream os) throws java.io.IOException { return new FileSync((FileOutputStream) os); } } hsqldb-1.8.0.10.orig/src/org/hsqldb/lib/MD5.java0000644000175000017500000001536610000572740017456 0ustar renerene/* Copyright (c) 2001-2004, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.lib; import java.io.UnsupportedEncodingException; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; // boucherb@users 20030705 - patch 1.7.2 - renamed methods to allow sp/sf calls // under HSQLDB's current inability to resolve method name overloads. /** * Provides a static utility interface to an MD5 digest algorithm * obtained through the java.security.MessageDigest spi.

      * * Database end-users may wish to access the services of this class * to provide, for instance, application user lookup tables with * one-way password encryption. For example:

      * *

       * -- DDL
       * CREATE TABLE USERS(UID INTEGER IDENTITY, UNAME VARCHAR, UPASS VARCHAR, UNIQUE(UNAME))
       * CREATE ALIAS MD5 FOR "org.hsqldb.lib.MD5.encodeString"
       *
       * -- DML & DQL
       * INSERT INTO USERS(UNAME, UPASS) VALUES('joe', MD5('passwd'))
       * UPDATE USERS SET UPASS = MD5('newpasswd') WHERE UNAME = 'joe' AND UPASS = MD5('oldpasswd')
       * SELECT UID FROM USERS WHERE UNAME = 'joe' AND UPASS = MD5('logonpasswd')
       * 
      * * NOTE:

      * * Although it is possible that a particular JVM / application installation may * encounter NoSuchAlgorithmException when attempting to get a jce MD5 message * digest generator, the likelyhood is very small for almost all JDK/JRE 1.1 * and later JVM implementations, as the Sun java.security package has come, * by default, with a jce MD5 message digest generator since JDK 1.1 was * released. The HSLQLDB project could have provided an MD5 implementation to * guarantee presence, but this class is much more lightweight and still allows * clients to install / use custom implementations through the * java.security.MessageDigest spi, for instance if there is no service * provided by default under the target JVM of choice or if a client has * developed / provides, say, a faster MD5 message digest implementation. * In short, this class is a convenience that allows HSQLDB SQL Function and * Stored Procedure style access to any underlying MD5 message digest algorithm * obtained via the java.security.MessageDigest spi * * @author boucherb@users.sourceforge.net * @version 1.7.2 * @since 1.7.2 */ public final class MD5 { /** * The jce MD5 message digest generator. */ private static MessageDigest md5; /** * Retrieves a hexidecimal character sequence representing the MD5 * digest of the specified character sequence, using the specified * encoding to first convert the character sequence into a byte sequence. * If the specified encoding is null, then ISO-8859-1 is assumed * * @param string the string to encode. * @param encoding the encoding used to convert the string into the * byte sequence to submit for MD5 digest * @return a hexidecimal character sequence representing the MD5 * digest of the specified string * @throws HsqlUnsupportedOperationException if an MD5 digest * algorithm is not available through the * java.security.MessageDigest spi or the requested * encoding is not available */ public static final String encodeString(String string, String encoding) throws RuntimeException { return StringConverter.byteToHex(digestString(string, encoding)); } /** * Retrieves a byte sequence representing the MD5 digest of the * specified character sequence, using the specified encoding to * first convert the character sequence into a byte sequence. * If the specified encoding is null, then ISO-8859-1 is * assumed. * * @param string the string to digest. * @param encoding the character encoding. * @return the digest as an array of 16 bytes. * @throws HsqlUnsupportedOperationException if an MD5 digest * algorithm is not available through the * java.security.MessageDigest spi or the requested * encoding is not available */ public static byte[] digestString(String string, String encoding) throws RuntimeException { byte[] data; if (encoding == null) { encoding = "ISO-8859-1"; } try { data = string.getBytes(encoding); } catch (UnsupportedEncodingException x) { throw new RuntimeException(x.toString()); } return digestBytes(data); } /** * Retrieves a byte sequence representing the MD5 digest of the * specified byte sequence. * * @param data the data to digest. * @return the MD5 digest as an array of 16 bytes. * @throws HsqlUnsupportedOperationException if an MD5 digest * algorithm is not available through the * java.security.MessageDigest spi */ public static final byte[] digestBytes(byte[] data) throws RuntimeException { synchronized (MD5.class) { if (md5 == null) { try { md5 = MessageDigest.getInstance("MD5"); } catch (NoSuchAlgorithmException e) { throw new RuntimeException(e.toString()); } } return md5.digest(data); } } } hsqldb-1.8.0.10.orig/src/org/hsqldb/lib/HsqlThreadFactory.java0000644000175000017500000000754210416742474022473 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.lib; /** * The default HSQLDB thread factory implementation. This factory can be * used to wrap other thread factories using the setImpl method, but, by * default simply produces new, vanilla thread objects constructed with * the supplied runnable object. * * @author boucherb@users * @version 1.7.2 * @since 1.7.2 */ class HsqlThreadFactory implements ThreadFactory { /** * The factory implementation. Typically, this will be the * HsqlThreadFactory object itself. */ protected ThreadFactory factory; /** * Constructs a new HsqlThreadFactory that uses itself as the factory * implementation. */ public HsqlThreadFactory() { this(null); } /** * Constructs a new HsqlThreadFactory whose retrieved threads come from the * specified ThreadFactory object or from this factory implementation, if' * the specified implementation is null. * * @param f the factory implementation this factory uses */ public HsqlThreadFactory(ThreadFactory f) { setImpl(f); } /** * Retreives a thread instance for running the specified Runnable * @param r The runnable that the retrieved thread handles * @return the requested thread inatance */ public Thread newThread(Runnable r) { return factory == this ? new Thread(r) : factory.newThread(r); } /** * Sets the factory implementation that this factory will use to * produce threads. If the specified argument, f, is null, then * this factory uses itself as the implementation. * * @param f the factory implementation that this factory will use * to produce threads * @return the previously installed factory implementation */ public synchronized ThreadFactory setImpl(ThreadFactory f) { ThreadFactory old; old = factory; factory = (f == null) ? this : f; return old; } /** * Retrieves the factory implementation that this factory is using * to produce threads. * * @return the factory implementation that this factory is using to produce * threads. */ public synchronized ThreadFactory getImpl() { return factory; } } hsqldb-1.8.0.10.orig/src/org/hsqldb/lib/InOutUtil.java0000644000175000017500000000727610416742474021004 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.lib; import java.io.IOException; import java.io.InputStream; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.io.OutputStream; import java.io.Serializable; /** * Input / Output utility * * @author fredt@users * @version 1.8.0 * @since 1.7.2 */ public class InOutUtil { /** * Implementation only supports unix line-end format and is suitable for * processing HTTP and other network protocol communications. Reads and writes * a line of data. Returns the number of bytes read/written. */ public static int readLine(InputStream in, OutputStream out) throws IOException { int count = 0; for (;;) { int b = in.read(); if (b == -1) { break; } count++; out.write(b); if (b == '\n') { break; } } return count; } /** * Retrieves the serialized form of the specified Object * as an array of bytes. * * @param s the Object to serialize * @return a static byte array representing the passed Object * @throws HsqlException if a serialization failure occurs */ public static byte[] serialize(Serializable s) throws IOException { HsqlByteArrayOutputStream bo = new HsqlByteArrayOutputStream(); ObjectOutputStream os = new ObjectOutputStream(bo); os.writeObject(s); return bo.toByteArray(); } /** * Deserializes the specified byte array to an * Object instance. * * @return the Object resulting from deserializing the specified array of bytes * @param ba the byte array to deserialize to an Object * @throws HsqlException if a serialization failure occurs */ public static Serializable deserialize(byte[] ba) throws IOException, ClassNotFoundException { HsqlByteArrayInputStream bi = new HsqlByteArrayInputStream(ba); ObjectInputStream is = new ObjectInputStream(bi); return (Serializable) is.readObject(); } } hsqldb-1.8.0.10.orig/src/org/hsqldb/lib/ZipUnzipFile.java0000644000175000017500000001560210735721641021465 0ustar renerene/* Copyright (c) 1995-2000, The Hypersonic SQL Group. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the Hypersonic SQL Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE HYPERSONIC SQL GROUP, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * This software consists of voluntary contributions made by many individuals * on behalf of the Hypersonic SQL Group. * * * For work added by the HSQL Development Group: * * Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.lib; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.zip.Deflater; import java.util.zip.DeflaterOutputStream; import java.util.zip.Inflater; import java.util.zip.InflaterInputStream; // oj@openoffice.org - patch 1.8.0 - use FileAccess /** * * New Class based on original Hypersonic code. * * @author Thomas Mueller (Hypersonic SQL Group) * @version 1.7.2 * @since Hypersonic SQL */ public class ZipUnzipFile { private static final int COPY_BLOCK_SIZE = 1 << 16; public static void compressFile(String infilename, String outfilename, FileAccess storage) throws IOException { InputStream in = null; DeflaterOutputStream f = null; boolean completed = false; // if there is no file if (!storage.isStreamElement(infilename)) { return; } try { byte[] b = new byte[COPY_BLOCK_SIZE]; in = storage.openInputStreamElement(infilename); f = new DeflaterOutputStream( storage.openOutputStreamElement(outfilename), new Deflater(Deflater.BEST_SPEED), COPY_BLOCK_SIZE); while (true) { int l = in.read(b, 0, COPY_BLOCK_SIZE); if (l == -1) { break; } f.write(b, 0, l); } completed = true; } catch (Throwable e) { throw FileUtil.toIOException(e); } finally { try { if (in != null) { in.close(); } if (f != null) { f.finish(); // reported to be missing from close() in some JRE libs f.close(); } if (!completed && storage.isStreamElement(outfilename)) { storage.removeElement(outfilename); } } catch (Throwable e) { throw FileUtil.toIOException(e); } } } public static void decompressFile(String infilename, String outfilename, FileAccess storage) throws IOException { InflaterInputStream f = null; OutputStream outstream = null; boolean completed = false; try { if (!storage.isStreamElement(infilename)) { return; } storage.removeElement(outfilename); f = new InflaterInputStream( storage.openInputStreamElement(infilename), new Inflater()); outstream = storage.openOutputStreamElement(outfilename); byte[] b = new byte[COPY_BLOCK_SIZE]; while (true) { int l = f.read(b, 0, COPY_BLOCK_SIZE); if (l == -1) { break; } outstream.write(b, 0, l); } completed = true; } catch (Throwable e) { throw FileUtil.toIOException(e); } finally { try { if (f != null) { f.close(); } if (outstream != null) { outstream.flush(); outstream.close(); } if (!completed && storage.isStreamElement(outfilename)) { storage.removeElement(outfilename); } } catch (Throwable e) { throw FileUtil.toIOException(e); } } } } hsqldb-1.8.0.10.orig/src/org/hsqldb/lib/BaseList.java0000644000175000017500000001110210416742474020575 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.lib; import java.util.NoSuchElementException; /** * Abstract base for Lists * * @author fredt@users * @version 1.7.2 * @since 1.7.0 */ abstract class BaseList { protected int elementCount; abstract Object get(int index); abstract Object remove(int index); abstract boolean add(Object o); abstract int size(); public boolean contains(Object o) { return find(o) == -1 ? false : true; } public boolean remove(Object o) { int i = find(o); if (i == -1) { return false; } remove(i); return true; } int find(Object o) { for (int i = 0, size = size(); i < size; i++) { Object current = get(i); if (current == null) { if (o == null) { return i; } } else if (current.equals(o)) { return i; } } return -1; } public boolean addAll(Collection other) { boolean result = false; Iterator it = other.iterator(); while (it.hasNext()) { result = true; add(it.next()); } return result; } public boolean isEmpty() { return elementCount == 0; } /** Returns a string representation */ public String toString() { StringBuffer sb = new StringBuffer(32 + elementCount * 3); sb.append("List : size="); sb.append(elementCount); sb.append(' '); sb.append('{'); Iterator it = iterator(); while (it.hasNext()) { sb.append(it.next()); if (it.hasNext()) { sb.append(','); sb.append(' '); } } sb.append('}'); return sb.toString(); } public Iterator iterator() { return new BaseListIterator(); } private class BaseListIterator implements Iterator { int counter = 0; boolean removed; public boolean hasNext() { return counter < elementCount; } public Object next() { if (counter < elementCount) { removed = false; Object returnValue = get(counter); counter++; return returnValue; } throw new NoSuchElementException(); } public int nextInt() { throw new NoSuchElementException(); } public long nextLong() { throw new NoSuchElementException(); } public void remove() { if (removed) { throw new NoSuchElementException("Iterator"); } removed = true; if (counter != 0) { BaseList.this.remove(counter - 1); counter--; // above can throw, so decrement if successful return; } throw new NoSuchElementException(); } } } hsqldb-1.8.0.10.orig/src/org/hsqldb/lib/Sort.java0000644000175000017500000001234310771757200020023 0ustar renerene/* Copyright (c) 1995-2000, The Hypersonic SQL Group. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the Hypersonic SQL Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE HYPERSONIC SQL GROUP, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * This software consists of voluntary contributions made by many individuals * on behalf of the Hypersonic SQL Group. * * * For work added by the HSQL Development Group: * * Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.lib; public class Sort { /** * FastQSorts the [l,r] partition (inclusive) of the specfied array of * Rows, using the comparator. * * Modified from the original method in Hypersonic with the addition of * the comparator. (fredt@users) * * @author Thomas Mueller (Hypersonic SQL Group) * @version 1.7.2 * @since 1.7.2 */ public static final void sort(Object[] w, ObjectComparator comparator, int l, int r) { int i; int j; Object p; if (l > r) { return; } while (r - l > 10) { i = (r + l) >>> 1; if (comparator.compare(w[l], w[r]) > 0) { swap(w, l, r); } if (comparator.compare(w[i], w[l]) < 0) { swap(w, l, i); } else if (comparator.compare(w[i], w[r]) > 0) { swap(w, i, r); } j = r - 1; swap(w, i, j); p = w[j]; i = l; while (true) { while (comparator.compare(w[++i], p) < 0) { ; } while (comparator.compare(w[--j], p) > 0) { ; } if (i >= j) { break; } swap(w, i, j); } swap(w, i, r - 1); sort(w, comparator, l, i - 1); l = i + 1; } for (i = l + 1; i <= r; i++) { Object t = w[i]; for (j = i - 1; j >= l && comparator.compare(w[j], t) > 0; j--) { w[j + 1] = w[j]; } w[j + 1] = t; } } /** * Swaps the a'th and b'th elements of the specified Row array. */ private static void swap(Object[] w, int a, int b) { Object t = w[a]; w[a] = w[b]; w[b] = t; } } hsqldb-1.8.0.10.orig/src/org/hsqldb/lib/HashMappedList.java0000644000175000017500000001206110416742474021742 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.lib; /** * Implementation of an Map which maintains the user-defined order of the keys. * Key/value pairs can be accessed by index or by key. Iterators return the * keys or values in the index order. * * This class does not store null keys. * * @author fredt@users * @version 1.7.2 * @since 1.7.2 */ public class HashMappedList extends HashMap { public HashMappedList() { this(16, 0.75f); } public HashMappedList(int initialCapacity) throws IllegalArgumentException { this(initialCapacity, 0.75f); } public HashMappedList(int initialCapacity, float loadFactor) throws IllegalArgumentException { super(initialCapacity, loadFactor); } public Object get(int index) throws IndexOutOfBoundsException { checkRange(index); return objectValueTable[index]; } public Object remove(Object key) { int lookup = getLookup(key, key.hashCode()); if (lookup < 0) { return null; } Object returnValue = super.remove(key); removeRow(lookup); return returnValue; } public Object remove(int index) throws IndexOutOfBoundsException { checkRange(index); return remove(objectKeyTable[index]); } public boolean add(Object key, Object value) { if (keySet().contains(key)) { return false; } super.put(key, value); return true; } public Object put(Object key, Object value) { return super.put(key, value); } public Object set(int index, Object value) throws IndexOutOfBoundsException { checkRange(index); Object returnValue = objectKeyTable[index]; objectKeyTable[index] = value; return returnValue; } public boolean insert(int index, Object key, Object value) throws IndexOutOfBoundsException { if (index < 0 || index > size()) { throw new IndexOutOfBoundsException(); } if (keySet().contains(key)) { return false; } if (index == size()) { return add(key, value); } HashMappedList hm = new HashMappedList(size()); for (int i = index; i < size(); i++) { hm.add(getKey(i), get(i)); } for (int i = size() - 1; i >= index; i--) { remove(i); } for (int i = 0; i < hm.size(); i++) { add(hm.getKey(i), hm.get(i)); } return true; } public boolean set(int index, Object key, Object value) throws IndexOutOfBoundsException { checkRange(index); if (keySet().contains(key) && getIndex(key) != index) { return false; } super.remove(objectKeyTable[index]); super.put(key, value); return true; } public boolean setKey(int index, Object key) throws IndexOutOfBoundsException { checkRange(index); Object value = objectValueTable[index]; return set(index, key, value); } public Object getKey(int index) throws IndexOutOfBoundsException { checkRange(index); return objectKeyTable[index]; } public int getIndex(Object key) { return getLookup(key, key.hashCode()); } private void checkRange(int i) { if (i < 0 || i >= size()) { throw new IndexOutOfBoundsException(); } } } hsqldb-1.8.0.10.orig/src/org/hsqldb/lib/ArrayCounter.java0000644000175000017500000001312010701747011021474 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.lib; /** * Collection of routines for counting the distribution of the values * in an int[] array. * * @author fredt@users * @version 1.7.2 * @since 1.7.2 */ public class ArrayCounter { /** * Returns an int[] array of length segments containing the distribution * count of the elements in unsorted int[] array with values between min * and max (range). Values outside the min-max range are ignored

      * * A usage example is determining the count of people of each age group * in a large int[] array containing the age of each person. Called with * (array, 16,0,79), it will return an int[16] with the first element * the count of people aged 0-4, the second element the count of those * aged 5-9, and so on. People above the age of 79 are excluded. If the * range is not a multiple of segments, the last segment will be cover a * smaller sub-range than the rest. * */ public static int[] countSegments(int[] array, int elements, int segments, int start, int limit) { int[] counts = new int[segments]; long interval = calcInterval(segments, start, limit); int index = 0; int element = 0; if (interval <= 0) { return counts; } for (int i = 0; i < elements; i++) { element = array[i]; if (element < start || element >= limit) { continue; } index = (int) ((element - start) / interval); counts[index]++; } return counts; } /** * With an unsorted int[] array and with target a positive integer in the * range (1,array.length), finds the value in the range (start,limit) of the * largest element (rank) where the count of all smaller elements in that * range is less than or equals target. Parameter margin indicates the * margin of error in target

      * * In statistics, this can be used to calculate a median or quadrile value. * A usage example applied to an array of age values is to determine * the maximum age of a given number of people. With the example array * given in countSegments, rank(array, c, 6000, 18, 65, 0) will return an age * value between 18-64 (inclusive) and the count of all people aged between * 18 and the returned value(exclusive) will be less than or equal 6000. * */ public static int rank(int[] array, int elements, int target, int start, int limit, int margin) { final int segments = 256; int elementCount = 0; int currentLimit = limit; for (;;) { long interval = calcInterval(segments, start, currentLimit); int[] counts = countSegments(array, elements, segments, start, currentLimit); for (int i = 0; i < counts.length; i++) { if (elementCount + counts[i] < target) { elementCount += counts[i]; start += interval; } else { break; } } if (elementCount + margin >= target) { return start; } if (interval <= 1) { return start; } currentLimit = start + interval < limit ? (int) (start + interval) : limit; } } /** * Helper method to calculate the span of the sub-interval. Simply returns * the cieling of ((limit - start) / segments) and accounts for invalid * start and limit combinations. */ static long calcInterval(int segments, int start, int limit) { long range = limit - start; if (range < 0) { return 0; } int partSegment = (range % segments) == 0 ? 0 : 1; return (range / segments) + partSegment; } } hsqldb-1.8.0.10.orig/src/org/hsqldb/lib/HsqlByteArrayOutputStream.java0000644000175000017500000001505510443003420024206 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.lib; import java.io.DataOutput; import java.io.IOException; import java.io.OutputStream; import java.io.UTFDataFormatException; import java.io.UnsupportedEncodingException; /** * This class is a replacement for both java.io.ByteArrayOuputStream * (without synchronization) and java.io.DataOutputStream * * @author fredt@users * @version 1.7.2 * @since 1.7.0 */ public class HsqlByteArrayOutputStream extends java.io.OutputStream implements DataOutput { protected byte[] buf; protected int count; public HsqlByteArrayOutputStream() { this(128); } public HsqlByteArrayOutputStream(int size) { if (size < 128) { size = 128; } buf = new byte[size]; } public HsqlByteArrayOutputStream(byte[] buffer) { buf = buffer; } // methods that implement dataOutput public final void writeShort(int v) { ensureRoom(2); buf[count++] = (byte) (v >>> 8); buf[count++] = (byte) v; } public final void writeInt(int v) { if (count + 4 > buf.length) { ensureRoom(4); } buf[count++] = (byte) (v >>> 24); buf[count++] = (byte) (v >>> 16); buf[count++] = (byte) (v >>> 8); buf[count++] = (byte) v; } public final void writeLong(long v) { writeInt((int) (v >>> 32)); writeInt((int) v); } public final void writeBytes(String s) { int len = s.length(); ensureRoom(len); for (int i = 0; i < len; i++) { buf[count++] = (byte) s.charAt(i); } } public final void writeFloat(float v) { writeInt(Float.floatToIntBits(v)); } public final void writeDouble(double v) { writeLong(Double.doubleToLongBits(v)); } public void writeBoolean(boolean v) throws IOException { ensureRoom(1); buf[count++] = (byte) (v ? 1 : 0); } public void writeByte(int v) throws IOException { ensureRoom(1); buf[count++] = (byte) (v); } public void writeChar(int v) throws IOException { ensureRoom(2); buf[count++] = (byte) (v >>> 8); buf[count++] = (byte) v; } public void writeChars(String s) throws IOException { int len = s.length(); ensureRoom(len * 2); for (int i = 0; i < len; i++) { int v = s.charAt(i); buf[count++] = (byte) (v >>> 8); buf[count++] = (byte) v; } } public void writeUTF(String str) throws IOException { int len = str.length(); if (len > 0xffff) { throw new UTFDataFormatException(); } ensureRoom(len * 3 + 2); // int initpos = count; count += 2; StringConverter.writeUTF(str, this); int bytecount = count - initpos - 2; if (bytecount > 0xffff) { count = initpos; throw new UTFDataFormatException(); } buf[initpos++] = (byte) (bytecount >>> 8); buf[initpos] = (byte) bytecount; } /** * does nothing */ public void flush() throws java.io.IOException { super.flush(); } // methods that extend java.io.OutputStream public void write(int b) { ensureRoom(1); buf[count++] = (byte) b; } public void write(byte[] b) { write(b, 0, b.length); } public void write(byte[] b, int off, int len) { ensureRoom(len); System.arraycopy(b, off, buf, count, len); count += len; } public void writeTo(OutputStream out) throws IOException { out.write(buf, 0, count); } public void reset() { count = 0; } public byte[] toByteArray() { byte[] newbuf = new byte[count]; System.arraycopy(buf, 0, newbuf, 0, count); return newbuf; } public int size() { return count; } public String toString() { return new String(buf, 0, count); } public String toString(String enc) throws UnsupportedEncodingException { return new String(buf, 0, count, enc); } public void close() throws IOException {} // additional public methods not in similar java.util classes public void fill(int b, int len) { ensureRoom(len); for (int i = 0; i < len; i++) { buf[count++] = (byte) b; } } public byte[] getBuffer() { return this.buf; } protected void ensureRoom(int extra) { int newcount = count + extra; int newsize = buf.length; if (newcount > newsize) { while (newcount > newsize) { newsize *= 2; } byte[] newbuf = new byte[newsize]; System.arraycopy(buf, 0, newbuf, 0, count); buf = newbuf; } } protected void reset(int newSize) { count = 0; if (newSize > buf.length) { buf = new byte[newSize]; } } } hsqldb-1.8.0.10.orig/src/org/hsqldb/lib/java/0000755000175000017500000000000010242420102017124 5ustar renerenehsqldb-1.8.0.10.orig/src/org/hsqldb/lib/java/JavaSystem.java0000644000175000017500000001131310767322167022104 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.lib.java; import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; import java.io.PrintStream; import java.io.PrintWriter; import java.math.BigDecimal; import java.math.BigInteger; import java.sql.DriverManager; import java.util.Properties; import java.text.Collator; import java.io.RandomAccessFile; // fredt@users 20020320 - patch 1.7.0 - JDBC 2 support and error trapping // fredt@users 20021030 - patch 1.7.2 - updates /** * Handles the differences between JDK 1.1.x and 1.2.x and above * * @author fredt@users * @version 1.8.0 */ public class JavaSystem { // variables to track rough count on object creation, to use in gc public static int gcFrequency; public static int memoryRecords; // Garbage Collection public static void gc() { if ((gcFrequency > 0) && (memoryRecords > gcFrequency)) { memoryRecords = 0; System.gc(); } } /** * Arguments are never null. */ public static int CompareIngnoreCase(String a, String b) { //#ifdef JAVA2FULL return a.compareToIgnoreCase(b); //#else /* return a.toUpperCase().compareTo(b.toUpperCase()); */ //#endif JAVA2 } public static double parseDouble(String s) { //#ifdef JAVA2FULL return Double.parseDouble(s); //#else /* return new Double(s).doubleValue(); */ //#endif JAVA2 } public static BigInteger getUnscaledValue(BigDecimal o) { //#ifdef JAVA2FULL return o.unscaledValue(); //#else /* int scale = o.scale(); return o.movePointRight(scale).toBigInteger(); */ //#endif } public static void setLogToSystem(boolean value) { //#ifdef JAVA2FULL try { PrintWriter newPrintWriter = (value) ? new PrintWriter(System.out) : null; DriverManager.setLogWriter(newPrintWriter); } catch (Exception e) {} //#else /* try { PrintStream newOutStream = (value) ? System.out : null; DriverManager.setLogStream(newOutStream); } catch (Exception e){} */ //#endif } public static void deleteOnExit(File f) { //#ifdef JAVA2FULL f.deleteOnExit(); //#endif } public static void saveProperties(Properties props, String name, OutputStream os) throws IOException { //#ifdef JAVA2FULL props.store(os, name); //#else /* props.save(os, name); */ //#endif } public static void runFinalizers() { //#ifdef JAVA2FULL System.runFinalizersOnExit(true); //#endif } public static boolean createNewFile(File file) { //#ifdef JAVA2FULL try { return file.createNewFile(); } catch (IOException e) {} return false; //#else /* return true; */ //#endif } public static void setRAFileLength(RandomAccessFile raFile, long length) throws IOException { //#ifdef JAVA2FULL raFile.setLength(length); //#endif } } hsqldb-1.8.0.10.orig/src/org/hsqldb/lib/Storage.java0000644000175000017500000000457210416742474020510 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.lib; import java.io.IOException; /** * An interface that supports the commonly used methods of java.io.RandomAccessFile. * * @author Ocke Janssen oj@openoffice.org * @version 1.8.0 * @since 1.80 */ public interface Storage { long length() throws IOException; void seek(long position) throws IOException; long getFilePointer() throws IOException; int read() throws IOException; void read(byte[] b, int offset, int length) throws IOException; void write(byte[] b, int offset, int length) throws IOException; int readInt() throws IOException; void writeInt(int i) throws IOException; long readLong() throws IOException; void writeLong(long i) throws IOException; void close() throws IOException; boolean isReadOnly(); boolean wasNio(); } hsqldb-1.8.0.10.orig/src/org/hsqldb/lib/SimpleLog.java0000644000175000017500000001160310771757163020775 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.lib; import java.io.File; import java.io.FileWriter; import java.io.PrintWriter; import org.hsqldb.HsqlDateTime; /** * Simple log for recording abnormal events in persistence

      * Log levels, LOG_NONE, LOG_ERROR, and LOG_NORMAL are currently supported.

      * LOG_ERROR corresponds to property value 1 and logs main database events plus * any major errors encountered in operation. * LOG_NORMAL corresponds to property value 2 and logs additional normal events * and minor errors. * * @author fredt@users * @version 1.8.0 * @since 1.8.0 */ public class SimpleLog { public static final int LOG_NONE = 0; public static final int LOG_ERROR = 1; public static final int LOG_NORMAL = 2; private PrintWriter writer; private int level; public SimpleLog(String path, int level, boolean useFile) { this.level = level; if (level != LOG_NONE) { if (useFile) { File file = new File(path); makeLog(file); } else { writer = new PrintWriter(System.out); } } } private void makeLog(File file) { try { FileUtil.getDefaultInstance().makeParentDirectories(file); writer = new PrintWriter(new FileWriter(file.getPath(), true), true); } catch (Exception e) { writer = new PrintWriter(System.out); } } public int getLevel() { return level; } public PrintWriter getPrintWriter() { return writer; } public synchronized void sendLine(int atLevel, String message) { if (level >= atLevel) { writer.println(HsqlDateTime.getSytemTimeString() + " " + message); } } public synchronized void logContext(int atLevel, String message) { if (level < atLevel) { return; } String info = HsqlDateTime.getSytemTimeString(); //#ifdef JAVA4 Throwable temp = new Throwable(); StackTraceElement[] elements = temp.getStackTrace(); if (elements.length > 1) { info += " " + elements[1].getClassName() + "." + elements[1].getMethodName(); } //#endif JAVA4 writer.println(info + " " + message); } public synchronized void logContext(Throwable t, String message) { if (level == LOG_NONE) { return; } String info = HsqlDateTime.getSytemTimeString(); //#ifdef JAVA4 Throwable temp = new Throwable(); StackTraceElement[] elements = temp.getStackTrace(); if (elements.length > 1) { info += " " + elements[1].getClassName() + "." + elements[1].getMethodName(); } elements = t.getStackTrace(); if (elements.length > 0) { info += " " + elements[0].getClassName() + "." + elements[0].getMethodName(); } //#endif JAVA4 if (message == null) { message = ""; } writer.println(info + " " + t.toString() + " " + message); } public void flush() { if (writer != null) { writer.flush(); } } public void close() { if (writer != null) { writer.close(); } } } hsqldb-1.8.0.10.orig/src/org/hsqldb/lib/IntValueHashMap.java0000644000175000017500000001257010416742474022072 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.lib; import java.util.NoSuchElementException; import org.hsqldb.store.BaseHashMap; /** * This class does not store null keys. * * @author fredt@users * @version 1.7.2 * @since 1.7.2 */ public class IntValueHashMap extends BaseHashMap { Set keySet; public IntValueHashMap() { this(16, 0.75f); } public IntValueHashMap(int initialCapacity) throws IllegalArgumentException { this(initialCapacity, 0.75f); } public IntValueHashMap(int initialCapacity, float loadFactor) throws IllegalArgumentException { super(initialCapacity, loadFactor, BaseHashMap.objectKeyOrValue, BaseHashMap.intKeyOrValue, false); } public int get(Object key) throws NoSuchElementException { if (key == null) { throw new NoSuchElementException(); } int hash = key.hashCode(); int lookup = getLookup(key, hash); if (lookup != -1) { return intValueTable[lookup]; } throw new NoSuchElementException(); } public int get(Object key, int defaultValue) { if (key == null) { throw new NoSuchElementException(); } int hash = key.hashCode(); int lookup = getLookup(key, hash); if (lookup != -1) { return intValueTable[lookup]; } return defaultValue; } public boolean get(Object key, int[] value) { if (key == null) { throw new NoSuchElementException(); } int hash = key.hashCode(); int lookup = getLookup(key, hash); if (lookup != -1) { value[0] = intValueTable[lookup]; return true; } return false; } public boolean put(Object key, int value) { if (key == null) { throw new NoSuchElementException(); } int oldSize = size(); super.addOrRemove(0, value, key, null, false); return oldSize != size(); } public boolean remove(Object key) { int oldSize = size(); super.addOrRemove(0, 0, key, null, true); return oldSize != size(); } public boolean containsKey(Object key) { return super.containsKey(key); } public boolean containsValue(int value) { throw new RuntimeException(); } public Set keySet() { if (keySet == null) { keySet = new KeySet(); } return keySet; } class KeySet implements Set { public Iterator iterator() { return IntValueHashMap.this.new BaseHashIterator(true); } public int size() { return IntValueHashMap.this.size(); } public boolean contains(Object o) { return containsKey(o); } public Object get(Object key) { int lookup = IntValueHashMap.this.getLookup(key, key.hashCode()); if (lookup < 0) { return null; } else { return IntValueHashMap.this.objectKeyTable[lookup]; } } public boolean add(Object value) { throw new RuntimeException(); } public boolean addAll(Collection c) { throw new RuntimeException(); } public boolean remove(Object o) { int oldSize = size(); IntValueHashMap.this.remove(o); return size() != oldSize; } public boolean isEmpty() { return size() == 0; } public void clear() { IntValueHashMap.this.clear(); } } public void putAll(IntValueHashMap t) { Iterator it = t.keySet().iterator(); while (it.hasNext()) { Object key = it.next(); put(key, t.get(key)); } } } hsqldb-1.8.0.10.orig/src/org/hsqldb/lib/HashSet.java0000644000175000017500000001012310416742474020430 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.lib; import org.hsqldb.store.BaseHashMap; /** * This class does not store null keys. * * @author fredt@users * @version 1.7.2 * @since 1.7.2 */ public class HashSet extends BaseHashMap implements Set { public HashSet() { this(16, 0.75f); } public HashSet(int initialCapacity) throws IllegalArgumentException { this(initialCapacity, 0.75f); } public HashSet(int initialCapacity, float loadFactor) throws IllegalArgumentException { super(initialCapacity, loadFactor, BaseHashMap.objectKeyOrValue, BaseHashMap.noKeyOrValue, false); } public boolean contains(Object key) { return super.containsKey(key); } public Object get(Object key) { int lookup = getLookup(key, key.hashCode()); if (lookup < 0) { return null; } else { return objectKeyTable[lookup]; } } public boolean add(Object key) { int oldSize = size(); super.addOrRemove(0, 0, key, null, false); return oldSize != size(); } public boolean addAll(Collection c) { int oldSize = size(); Iterator it = c.iterator(); while (it.hasNext()) { add(it.next()); } return oldSize != size(); } public boolean addAll(Object[] keys) { boolean changed = false; for (int i = 0; i < keys.length; i++) { if (add(keys[i])) { changed = true; } } return changed; } public boolean remove(Object key) { int oldSize = size(); super.removeObject(key); return oldSize != size(); } public Object[] toArray(Object[] a) { if (a == null || a.length < size()) { a = new Object[size()]; } Iterator it = iterator(); for (int i = 0; it.hasNext(); i++) { a[i] = it.next(); } return a; } public Iterator iterator() { return new BaseHashIterator(true); } /** * Returns a String like "[Drei, zwei, Eins]", exactly like * java.util.HashSet. */ public String toString() { Iterator it = iterator(); StringBuffer sb = new StringBuffer(); while (it.hasNext()) { if (sb.length() > 0) { sb.append(", "); } else { sb.append('['); } sb.append(it.next()); } return sb.toString() + ']'; } } hsqldb-1.8.0.10.orig/src/org/hsqldb/lib/IntKeyIntValueHashMap.java0000644000175000017500000001241710416742474023216 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.lib; import java.util.NoSuchElementException; import org.hsqldb.store.BaseHashMap; /** * @author fredt@users * @version 1.7.2 * @since 1.7.2 */ public class IntKeyIntValueHashMap extends BaseHashMap { private Set keySet; private Collection values; public IntKeyIntValueHashMap() { this(16, 0.75f); } public IntKeyIntValueHashMap(int initialCapacity) throws IllegalArgumentException { this(initialCapacity, 0.75f); } public IntKeyIntValueHashMap(int initialCapacity, float loadFactor) throws IllegalArgumentException { super(initialCapacity, loadFactor, BaseHashMap.intKeyOrValue, BaseHashMap.intKeyOrValue, false); } public int get(int key) throws NoSuchElementException { int lookup = getLookup(key); if (lookup != -1) { return intValueTable[lookup]; } throw new NoSuchElementException(); } public int get(int key, int defaultValue) { int lookup = getLookup(key); if (lookup != -1) { return intValueTable[lookup]; } return defaultValue; } public boolean get(int key, int[] value) { int lookup = getLookup(key); if (lookup != -1) { value[0] = intValueTable[lookup]; return true; } return false; } public boolean put(int key, int value) { int oldSize = size(); super.addOrRemove(key, value, null, null, false); return oldSize != size(); } public boolean remove(int key) { int oldSize = size(); super.addOrRemove(key, 0, null, null, true); return oldSize != size(); } public Set keySet() { if (keySet == null) { keySet = new KeySet(); } return keySet; } public Collection values() { if (values == null) { values = new Values(); } return values; } class KeySet implements Set { public Iterator iterator() { return IntKeyIntValueHashMap.this.new BaseHashIterator(true); } public int size() { return IntKeyIntValueHashMap.this.size(); } public boolean contains(Object o) { throw new RuntimeException(); } public Object get(Object key) { throw new RuntimeException(); } public boolean add(Object value) { throw new RuntimeException(); } public boolean addAll(Collection c) { throw new RuntimeException(); } public boolean remove(Object o) { throw new RuntimeException(); } public boolean isEmpty() { return size() == 0; } public void clear() { IntKeyIntValueHashMap.this.clear(); } } class Values implements Collection { public Iterator iterator() { return IntKeyIntValueHashMap.this.new BaseHashIterator(false); } public int size() { return IntKeyIntValueHashMap.this.size(); } public boolean contains(Object o) { throw new RuntimeException(); } public boolean add(Object value) { throw new RuntimeException(); } public boolean addAll(Collection c) { throw new RuntimeException(); } public boolean remove(Object o) { throw new RuntimeException(); } public boolean isEmpty() { return size() == 0; } public void clear() { IntKeyIntValueHashMap.this.clear(); } } } hsqldb-1.8.0.10.orig/src/org/hsqldb/lib/FileAccess.java0000644000175000017500000000507710502360562021074 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.lib; import java.io.InputStream; import java.io.OutputStream; /** * Interface for abstraction of file access. * * @author Ocke Janssen oj@openoffice.org * @version 1.8.0 * @since 1.80 */ public interface FileAccess { int ELEMENT_READ = 1; int ELEMENT_SEEKABLEREAD = 3; int ELEMENT_WRITE = 4; int ELEMENT_READWRITE = 7; int ELEMENT_TRUNCATE = 8; InputStream openInputStreamElement(java.lang.String streamName) throws java.io.IOException; OutputStream openOutputStreamElement(java.lang.String streamName) throws java.io.IOException; boolean isStreamElement(java.lang.String elementName); void createParentDirs(java.lang.String filename); void removeElement(java.lang.String filename); void renameElement(java.lang.String oldName, java.lang.String newName); public interface FileSync { void sync() throws java.io.IOException; } FileSync getFileSync(OutputStream os) throws java.io.IOException; } hsqldb-1.8.0.10.orig/src/org/hsqldb/lib/StopWatch.java0000644000175000017500000001352610416742474021017 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.lib; /** * Provides the programatic analog of a physical stop watch.

      * * The watch can be started, stopped and zeroed and can be queried for * elapsed running time. The watch accumulates elapsed time over starts * and stops such that only the time actually spent running is recorded. * If the watch is zeroed, then the accumulated time is discarded and * the watch starts again with zero acumulated time.

      * * @author boucherb@users * @version 1.7.2 * @since 1.7.2 */ public class StopWatch { /** * The last time this object made the transition * from stopped to running state, as reported * by System.currentTimeMillis(). */ private long startTime; private long lastStart; /** * The accumulated running time of this object since * it was last zeroed. */ private long total; /** Flags if this object is started or stopped. */ boolean running = false; /** Creates, zeros, and starts a new StopWatch */ public StopWatch() { this(true); } /** Creates, zeros, and starts a new StopWatch */ public StopWatch(boolean start) { if (start) { start(); } } /** * Retrieves the accumulated time this object has spent running since * it was last zeroed. * @return the accumulated time this object has spent running since * it was last zeroed. */ public long elapsedTime() { if (running) { return total + System.currentTimeMillis() - startTime; } else { return total; } } /** * Retrieves the accumulated time this object has spent running since * it was last started. * @return the accumulated time this object has spent running since * it was last started. */ public long currentElapsedTime() { if (running) { return System.currentTimeMillis() - startTime; } else { return 0; } } /** Zeros accumulated running time and restarts this object. */ public void zero() { total = 0; start(); } /** * Ensures that this object is in the running state. If this object is not * running, then the call has the effect of setting the startTime * attribute to the current value of System.currentTimeMillis() and setting * the running attribute to true. */ public void start() { startTime = System.currentTimeMillis(); running = true; } /** * Ensures that this object is in the stopped state. If this object is * in the running state, then this has the effect of adding to the * total attribute the elapsed time since the last transition * from stopped to running state and sets the running attribute * to false. If this object is not in the running state, this call has no * effect. */ public void stop() { if (running) { total += System.currentTimeMillis() - startTime; running = false; } } public void mark() { stop(); start(); } /** * Retrieves prefix + " in " + elapsedTime() + " ms." * @param prefix The string to use as a prefix * @return prefix + " in " + elapsedTime() + " ms." */ public String elapsedTimeToMessage(String prefix) { return prefix + " in " + elapsedTime() + " ms."; } /** * Retrieves prefix + " in " + elapsedTime() + " ms." * @param prefix The string to use as a prefix * @return prefix + " in " + elapsedTime() + " ms." */ public String currentElapsedTimeToMessage(String prefix) { return prefix + " in " + currentElapsedTime() + " ms."; } /** * Retrieves the internal state of this object, as a String. * * The retreived value is: * *

           *    super.toString() +
           *    "[running=" +
           *    running +
           *    ", startTime=" +
           *    startTime +
           *    ", total=" +
           *    total + "]";
           * 
      * @return the state of this object, as a String */ public String toString() { return super.toString() + "[running=" + running + ", startTime=" + startTime + ", total=" + total + "]"; } } hsqldb-1.8.0.10.orig/src/org/hsqldb/lib/Collection.java0000644000175000017500000000420110416742474021164 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.lib; /** * * @author fredt@users * @version 1.7.2 * @since 1.7.2 */ public interface Collection { int size(); boolean isEmpty(); boolean contains(Object o); Iterator iterator(); /* Object[] toArray(); Object[] toArray(Object a[]); */ boolean add(Object o); boolean remove(Object o); boolean addAll(Collection c); /* boolean containsAll(Collection c); boolean removeAll(Collection c); boolean retainAll(Collection c); */ void clear(); /* boolean equals(Object o); */ int hashCode(); } hsqldb-1.8.0.10.orig/src/org/hsqldb/lib/AsciiStringInputStream.java0000644000175000017500000000412110416742474023505 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.lib; import java.io.IOException; /** * Minimal InputStream subclass to fetch low order bytes from a String.

      * * @author fredt@users * @version 1.7.0 * @since 1.7 0 */ public class AsciiStringInputStream extends StringInputStream { public AsciiStringInputStream(String s) { super(s); } public int read() throws java.io.IOException { super.read(); return super.read(); } public int available() throws IOException { return available / 2; } } hsqldb-1.8.0.10.orig/src/org/hsqldb/lib/HsqlDeque.java0000644000175000017500000002023610416742474020772 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.lib; import java.util.NoSuchElementException; // fredt@users 20020130 - patch 1.7.0 by fredt - new class /** * jdk 1.1 compatible minimal implementation of a list object suitable for * stack, queue and deque usage patterns backed by an Object[]. * The memory footprint of the HsqlDeque doubles when it gets full * but does not shrink when it gets empty. * * @author fredt@users * @version 1.7.2 * @since 1.7.0 */ public class HsqlDeque extends BaseList implements HsqlList { private Object[] list; private int firstindex = 0; // index of first list element private int endindex = 0; // index of last list element + 1 // can grow to fill list // if elementCount == 0 then firstindex == endindex private static final int DEFAULT_INITIAL_CAPACITY = 10; public HsqlDeque() { list = new Object[DEFAULT_INITIAL_CAPACITY]; } public int size() { return elementCount; } public Object getFirst() throws NoSuchElementException { if (elementCount == 0) { throw new NoSuchElementException(); } return list[firstindex]; } public Object getLast() throws NoSuchElementException { if (elementCount == 0) { throw new NoSuchElementException(); } return list[endindex - 1]; } public Object get(int i) throws IndexOutOfBoundsException { int index = getInternalIndex(i); return list[index]; } public void add(int i, Object o) throws IndexOutOfBoundsException { throw new java.lang.RuntimeException(); } public Object set(int i, Object o) throws IndexOutOfBoundsException { int index = getInternalIndex(i); Object result = list[index]; list[index] = o; return result; } public Object removeFirst() throws NoSuchElementException { if (elementCount == 0) { throw new NoSuchElementException(); } Object o = list[firstindex]; list[firstindex] = null; firstindex++; elementCount--; if (elementCount == 0) { firstindex = endindex = 0; } else if (firstindex == list.length) { firstindex = 0; } return o; } public Object removeLast() throws NoSuchElementException { if (elementCount == 0) { throw new NoSuchElementException(); } endindex--; Object o = list[endindex]; list[endindex] = null; elementCount--; if (elementCount == 0) { firstindex = endindex = 0; } else if (endindex == 0) { endindex = list.length; } return o; } /* public Object remove(int i){ return get(i); } public void add(int i, Object o) { } */ public boolean add(Object o) { resetCapacity(); if (endindex == list.length) { endindex = 0; } list[endindex] = o; elementCount++; endindex++; return true; } public boolean addLast(Object o) { return add(o); } public boolean addFirst(Object o) { resetCapacity(); firstindex--; if (firstindex < 0) { firstindex = list.length - 1; if (endindex == 0) { endindex = list.length; } } list[firstindex] = o; elementCount++; return true; } public void clear() { firstindex = endindex = elementCount = 0; for (int i = 0; i < list.length; i++) { list[i] = null; } } public Object remove(int index) { int target = getInternalIndex(index); Object value = list[target]; if (target >= firstindex) { System.arraycopy(list, firstindex, list, firstindex + 1, target - firstindex); list[firstindex] = null; firstindex++; if (firstindex == list.length) { firstindex = 0; } } else { System.arraycopy(list, target + 1, list, target, endindex - target - 1); list[endindex] = null; endindex--; if (endindex == 0) { endindex = list.length; } } if (elementCount == 0) { firstindex = endindex = 0; } return value; } private int getInternalIndex(int i) throws IndexOutOfBoundsException { if (i < 0 || i >= elementCount) { throw new IndexOutOfBoundsException(); } int index = firstindex + i; if (index >= list.length) { index -= list.length; } return index; } private void resetCapacity() { if (elementCount < list.length) { return; } // essential to at least double the capacity for the loop to work Object[] newList = new Object[list.length * 2]; for (int i = 0; i < list.length; i++) { newList[i] = list[i]; } list = newList; newList = null; if (endindex <= firstindex) { int tail = firstindex + elementCount - endindex; for (int i = 0; i < endindex; i++) { list[tail + i] = list[i]; list[i] = null; } endindex = firstindex + elementCount; } } /* public static void main(String[] args) { HsqlDeque d = new HsqlDeque(); for (int i = 0; i < 9; i++) { d.add(new Integer(i)); } d.removeFirst(); d.removeFirst(); d.add(new Integer(9)); d.add(new Integer(10)); for (int i = 0; i < d.size(); i++) { System.out.println(d.get(i)); } System.out.println(); d.add(new Integer(11)); d.add(new Integer(12)); for (int i = 0; i < d.size(); i++) { System.out.println(d.get(i)); } d.addFirst(new Integer(1)); d.addFirst(new Integer(0)); d.addFirst(new Integer(-1)); d.addFirst(new Integer(-2)); for (int i = 0; i < d.size(); i++) { System.out.println(d.get(i)); } System.out.println(); d.removeFirst(); d.removeFirst(); d.removeFirst(); for (int i = 0; i < d.size(); i++) { System.out.println(d.get(i)); } System.out.println(); Iterator it = d.iterator(); for (; it.hasNext(); ) { System.out.println(it.next()); } } */ } hsqldb-1.8.0.10.orig/src/org/hsqldb/lib/Iterator.java0000644000175000017500000000370610416742474020673 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.lib; import java.util.NoSuchElementException; /** * * @author fredt@users * @version 1.7.2 * @since 1.7.2 */ public interface Iterator { boolean hasNext(); Object next() throws NoSuchElementException; int nextInt() throws NoSuchElementException; long nextLong() throws NoSuchElementException; void remove() throws NoSuchElementException; } hsqldb-1.8.0.10.orig/src/org/hsqldb/lib/IntKeyLongValueHashMap.java0000644000175000017500000000642310416742474023363 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.lib; import java.util.NoSuchElementException; import org.hsqldb.store.BaseHashMap; /** * @author fredt@users * @version 1.7.2 * @since 1.7.2 */ public class IntKeyLongValueHashMap extends BaseHashMap { public IntKeyLongValueHashMap() { this(16, 0.75f); } public IntKeyLongValueHashMap(int initialCapacity) throws IllegalArgumentException { this(initialCapacity, 0.75f); } public IntKeyLongValueHashMap(int initialCapacity, float loadFactor) throws IllegalArgumentException { super(initialCapacity, loadFactor, BaseHashMap.intKeyOrValue, BaseHashMap.longKeyOrValue, false); } public long get(int key) throws NoSuchElementException { int lookup = getLookup(key); if (lookup != -1) { return longValueTable[lookup]; } throw new NoSuchElementException(); } public long get(int key, int defaultValue) { int lookup = getLookup(key); if (lookup != -1) { return longValueTable[lookup]; } return defaultValue; } public boolean get(int key, long[] value) { int lookup = getLookup(key); if (lookup != -1) { value[0] = longValueTable[lookup]; return true; } return false; } public boolean put(int key, int value) { int oldSize = size(); super.addOrRemove(key, value, null, null, false); return oldSize != size(); } public boolean remove(int key) { int oldSize = size(); super.addOrRemove(key, 0, null, null, true); return oldSize != size(); } } hsqldb-1.8.0.10.orig/src/org/hsqldb/lib/StringInputStream.java0000644000175000017500000000501710416742475022542 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.lib; import java.io.IOException; import java.io.InputStream; /** * minimal InputStream subclass to fetch bytes form a String * * @author fredt@users * @version 1.7.0 */ public class StringInputStream extends InputStream { protected int strOffset = 0; protected int charOffset = 0; protected int available; protected String str; public StringInputStream(String s) { str = s; available = s.length() * 2; } public int read() throws java.io.IOException { if (available == 0) { return -1; } available--; char c = str.charAt(strOffset); if (charOffset == 0) { charOffset = 1; return (c & 0x0000ff00) >> 8; } else { charOffset = 0; strOffset++; return c & 0x000000ff; } } public int available() throws IOException { return available; } } hsqldb-1.8.0.10.orig/src/org/hsqldb/lib/HsqlTimer.java0000644000175000017500000014570011020505541020773 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.lib; import java.util.Date; /** * Facility to schedule tasks for future execution in a background thread.

      * * Tasks may be scheduled for one-time execution or for repeated execution at * regular intervals, using either fixed rate or fixed delay policy.

      * * This class is a JDK 1.1 compatible implementation required by HSQLDB both * because the java.util.Timer class is available only in JDK 1.3+ and because * java.util.Timer starves least recently added tasks under high load and * fixed rate scheduling, especially when the average actual task duration is * greater than the average requested task periodicity.

      * * An additional (minor) advantage over java.util.Timer is that this class does * not retain a live background thread during periods when the task queue is * empty. * @author boucherb@users * @version 1.8.0.10 * @since 1.7.2 */ public final class HsqlTimer implements ObjectComparator, ThreadFactory { /** The priority queue for the scheduled tasks. */ protected final TaskQueue taskQueue = new TaskQueue(16, (ObjectComparator) this); /** The inner runnable that executes tasks in the background thread. */ protected final TaskRunner taskRunner = new TaskRunner(); /** The background thread. */ protected Thread taskRunnerThread; /** The factory that procduces the background threads. */ protected final ThreadFactory threadFactory; /** * Whether this timer should disallow all further processing. * * Once set true, stays true forever. */ protected volatile boolean isShutdown; /** * Constructs a new HsqlTimer using the default thread factory * implementation. */ public HsqlTimer() { this(null); } /** * Constructs a new HsqlTimer. * * Uses the specified thread factory implementation. * * @param threadFactory the ThreadFactory used to produce this timer's * background threads. If null, the default implementation supplied * by this class will be used. */ public HsqlTimer(final ThreadFactory threadFactory) { this.threadFactory = (threadFactory == null) ? this : threadFactory; } /** * Required to back the priority queue for scheduled tasks. * * @param a the first Task * @param b the second Task * @return 0 if equal, < 0 if a < b, > 0 if a > b */ public int compare(final Object a, final Object b) { final long awhen = ((Task) (a)).getNextScheduled(); final long bwhen = ((Task) (b)).getNextScheduled(); return (awhen < bwhen) ? -1 : (awhen == bwhen) ? 0 : 1; } /** * Default ThreadFactory implementation.

      * * Contructs a new Thread from the designated runnable, sets its * name to "HSQLDB Timer @" + Integer.toHexString(hashCode()), * and sets it as a daemon thread.

      * * @param runnable used to construct the new Thread. * @return a new Thread constructed from the designated runnable. */ public Thread newThread(final Runnable runnable) { final Thread thread = new Thread(runnable); thread.setName("HSQLDB Timer @" + Integer.toHexString(hashCode())); thread.setDaemon(true); return thread; } /** * Retrieves the background execution thread.

      * * null is returned if there is no such thread.

      * * @return the current background thread (may be null) */ public synchronized Thread getThread() { return this.taskRunnerThread; } /** * (Re)starts background processing of the task queue. * * @throws IllegalStateException if this timer is shut down. * @see #shutdown() * @see #shutdownImmediately() */ public synchronized void restart() throws IllegalStateException { if (this.isShutdown) { throw new IllegalStateException("isShutdown==true"); } else if (this.taskRunnerThread == null) { this.taskRunnerThread = this.threadFactory.newThread(this.taskRunner); this.taskRunnerThread.start(); } else { this.taskQueue.unpark(); } } /** * Causes the specified Runnable to be executed once in the background * after the specified delay. * * @param delay in milliseconds * @param runnable the Runnable to execute. * @return opaque reference to the internal task * @throws IllegalArgumentException if runnable is null */ public Object scheduleAfter(final long delay, final Runnable runnable) throws IllegalArgumentException { if (runnable == null) { throw new IllegalArgumentException("runnable == null"); } return this.addTask(now() + delay, runnable, 0, false); } /** * Causes the specified Runnable to be executed once in the background * at the specified time. * * @param date time at which to execute the specified Runnable * @param runnable the Runnable to execute. * @return opaque reference to the internal task * @throws IllegalArgumentException if date or runnable is null */ public Object scheduleAt(final Date date, final Runnable runnable) throws IllegalArgumentException { if (date == null) { throw new IllegalArgumentException("date == null"); } else if (runnable == null) { throw new IllegalArgumentException("runnable == null"); } return this.addTask(date.getTime(), runnable, 0, false); } /** * Causes the specified Runnable to be executed periodically in the * background, starting at the specified time. * * @return opaque reference to the internal task * @param period the cycle period * @param relative if true, fixed rate sheduling else fixed delay scheduling * @param date time at which to execute the specified Runnable * @param runnable the Runnable to execute * @throws IllegalArgumentException if date or runnable is null, or * period is <= 0 */ public Object schedulePeriodicallyAt(final Date date, final long period, final Runnable runnable, final boolean relative) throws IllegalArgumentException { if (date == null) { throw new IllegalArgumentException("date == null"); } else if (period <= 0) { throw new IllegalArgumentException("period <= 0"); } else if (runnable == null) { throw new IllegalArgumentException("runnable == null"); } return addTask(date.getTime(), runnable, period, relative); } /** * Causes the specified Runnable to be executed periodically in the * background, starting after the specified delay. * * @return opaque reference to the internal task * @param period the cycle period * @param relative if true, fixed rate sheduling else fixed delay scheduling * @param delay in milliseconds * @param runnable the Runnable to execute. * @throws IllegalArgumentException if runnable is null or period is <= 0 */ public Object schedulePeriodicallyAfter(final long delay, final long period, final Runnable runnable, final boolean relative) throws IllegalArgumentException { if (period <= 0) { throw new IllegalArgumentException("period <= 0"); } else if (runnable == null) { throw new IllegalArgumentException("runnable == null"); } return addTask(now() + delay, runnable, period, relative); } /** * Shuts down this timer after the current task (if any) completes.

      * * After this call, the timer has permanently entered the shutdown state; * attempting to schedule any new task or directly restart this timer will * result in an IllegalStateException.

      * */ public synchronized void shutdown() { if (!this.isShutdown) { this.isShutdown = true; this.taskQueue.cancelAllTasks(); } } /** for compatiblity with previous version */ public synchronized void shutDown() { shutdown(); } /** * Shuts down this timer immediately, interrupting the wait state associated * with the current head of the task queue or the wait state internal to * the currently executing task, if any such state is currently in effect. * * After this call, the timer has permanently entered the shutdown state; * attempting to schedule any new task or directly restart this timer will * result in an IllegalStateException.

      * * Note: If the integrity of work performed by a scheduled task * may be adversely affected by an unplanned interruption, it is the * responsibility of the task's implementation to deal correctly with the * possibility that this method is called while such work is in progress, * for instance by catching the InterruptedException, completing the work, * and then rethrowing the exception. */ public synchronized void shutdownImmediately() { if (!this.isShutdown) { final Thread runner = this.taskRunnerThread; this.isShutdown = true; if (runner != null && runner.isAlive()) { runner.interrupt(); } this.taskQueue.cancelAllTasks(); } } /** * Causes the task referenced by the supplied argument to be cancelled. * If the referenced task is currently executing, it will continue until * finished but will not be rescheduled. * * @param task a task reference */ public static void cancel(final Object task) { if (task instanceof Task) { ((Task) task).cancel(); } } /** * Retrieves whether the specified argument references a cancelled task. * * @param task a task reference * @return true if referenced task is cancelled */ public static boolean isCancelled(final Object task) { return (task instanceof Task) ? ((Task) task).isCancelled() : true; } /** * Retrieves whether the specified argument references a task scheduled * periodically using fixed rate scheduling. * * @param task a task reference * @return true if the task is scheduled at a fixed rate */ public static boolean isFixedRate(final Object task) { if (task instanceof Task) { final Task ltask = (Task) task; return (ltask.relative && ltask.period > 0); } else { return false; } } /** * Retrieves whether the specified argument references a task scheduled * periodically using fixed delay scheduling. * * @param task a task reference * @return true if the reference is scheduled using a fixed delay */ public static boolean isFixedDelay(final Object task) { if (task instanceof Task) { final Task ltask = (Task) task; return (!ltask.relative && ltask.period > 0); } else { return false; } } /** * Retrieves whether the specified argument references a task scheduled * for periodic execution. * * @param task a task reference * @return true if the task is scheduled for periodic execution */ public static boolean isPeriodic(final Object task) { return (task instanceof Task) ? (((Task) task).period > 0) : false; } /** * Retrieves the last time the referenced task was executed, as a * Date object. If the task has never been executed, null is returned. * * @param task a task reference * @return the last time the referenced task was executed; null if never */ public static Date getLastScheduled(Object task) { if (task instanceof Task) { final Task ltask = (Task) task; final long last = ltask.getLastScheduled(); return (last == 0) ? null : new Date(last); } else { return null; } } /** * Sets the periodicity of the designated task to a new value.

      * * If the designated task is cancelled or the new period is identical to the * task's current period, then this invocation has essentially no effect * and the submitted object is returned.

      * * Otherwise, if the new period is greater than the designated task's * current period, then a simple assignment occurs and the submittted * object is returned.

      * * If neither case holds, then the designated task is cancelled and a new, * equivalent task with the new period is scheduled for immediate first * execution and returned to the caller.

      * * @return a task reference, as per the rules stated above. * @param task the task whose periodicity is to be set * @param period the new period */ public static Object setPeriod(final Object task, final long period) { return (task instanceof Task) ? ((Task) task).setPeriod(period) : task; } /** * Retrieves the next time the referenced task is due to be executed, as a * Date object. If the referenced task is cancelled, null is returned. * * @param task a task reference * @return the next time the referenced task is due to be executed */ public static Date getNextScheduled(Object task) { if (task instanceof Task) { final Task ltask = (Task) task; final long next = ltask.isCancelled() ? 0 : ltask.getNextScheduled(); return next == 0 ? null : new Date(next); } else { return null; } } /** * Adds to the task queue a new Task object encapsulating the supplied * Runnable and scheduling arguments. * * @param first the time of the task's first execution * @param runnable the Runnable to execute * @param period the task's periodicity * @param relative if true, use fixed rate else use fixed delay scheduling * @return an opaque reference to the internal task */ protected Task addTask(final long first, final Runnable runnable, final long period, boolean relative) { if (this.isShutdown) { throw new IllegalStateException("shutdown"); } final Task task = new Task(first, runnable, period, relative); // sychronized this.taskQueue.addTask(task); // sychronized this.restart(); return task; } /** Sets the background thread to null. */ protected synchronized void clearThread() { //#ifdef JAVA2FULL try { taskRunnerThread.setContextClassLoader(null); } catch (Throwable t) {} //#endif JAVA2FULL taskRunnerThread = null; } /** * Retrieves the next task to execute, or null if this timer is shutdown, * the current thread is interrupted, or there are no queued tasks. * * @return the next task to execute, or null */ protected Task nextTask() { try { while (!this.isShutdown || Thread.interrupted()) { long now; long next; long wait; Task task; // synchronized to ensure removeTask // applies only to the peeked task, // when the computed wait <= 0 synchronized (this.taskQueue) { task = this.taskQueue.peekTask(); if (task == null) { // queue is empty break; } now = System.currentTimeMillis(); next = task.next; wait = (next - now); if (wait > 0) { // release ownership of taskQueue monitor and await // notification of task addition or cancellation, // at most until the time when the peeked task is // next supposed to execute this.taskQueue.park(wait); continue; // to top of loop } else { this.taskQueue.removeTask(); } } long period = task.period; if (period > 0) { // repeated task if (task.relative) { // using fixed rate shceduling final long late = (now - next); if (late > period) { // ensure that really late tasks don't // completely saturate the head of the // task queue period = 0; // TODO: is -1, -2 ... fairer? } else if (late > 0) { // compensate for scheduling overruns period -= late; } } task.updateSchedule(now, now + period); this.taskQueue.addTask(task); } return task; } } catch (InterruptedException e) { //e.printStackTrace(); } return null; } /** * stats var */ static int nowCount = 0; /** * Convenience method replacing the longer incantation: * System.currentTimeMillis() * * @return System.currentTimeMillis() */ private static long now() { nowCount++; return System.currentTimeMillis(); } /** * The Runnable that the background thread uses to execute * scheduled tasks.

      * * Note: Outer class could simply implement Runnable, * but using an inner class protects the public run method * from potential abuse. */ protected class TaskRunner implements Runnable { /** * Runs the next available task in the background thread.

      * * When there are no available tasks, the background * thread dies and its instance field is cleared until * tasks once again become available. */ public void run() { try { do { final Task task = HsqlTimer.this.nextTask(); if (task == null) { break; } // PROBLEM: If the runnable throws an exception other // than InterruptedException (which likely stems // naturally from calling shutdownImmediately() // or getThread().interrupt()), this will still // cause the loop to exit, which is to say that // task scheduling will stop until a new task is // added or the timer is restarted directly, even // though there may still be uncancelled tasks // left on the queue. // // TODO: Clarify and establish a contract regarding // the difference between InterruptedException, // RuntimeException and other things, like // UndeclaredThrowableException. // // SOL'N: At present, we simply require each runnable to // understand its part of the implicit contract, // which is to deal with exceptions internally // (not throw them up to the timer), with the // possible exception of InterruptedException. // // If the integrity of work performed by the // runnable may be adversely affected by an // unplanned interruption, the runnable should // deal with this directly, for instance by // catching the InterruptedException, ensuring // that some integrity preserving state is // attained, and then rethrowing the exception. task.runnable.run(); } while (true); } finally { HsqlTimer.this.clearThread(); } } } /** * Encapsulates a Runnable and its scheduling attributes. * * Essentially, a wrapper class used to schedule a Runnable object * for execution by the enclosing HsqlTimer's TaskRunner in a * background thread. */ protected class Task { /** What to run. */ Runnable runnable; /** The periodic interval, or 0 if one-shot. */ long period; /** The time this task was last executed, or 0 if never. */ long last; /** The next time this task is scheduled to execute. */ long next; /** * Whether to silently remove this task instead of running it, * the next time (if ever) it makes its way to the head of the * timer queue. */ boolean cancelled = false; /** Serializes concurrent access to the cancelled field. */ private Object cancel_mutex = new Object(); /** * Scheduling policy flag.

      * * When true, scheduling is fixed rate (as opposed to fixed delay), * and schedule updates are calculated relative to when the task was * was last run rather than a fixed delay starting from the current * wall-clock time provided by System.currentTimeMillis().

      * * This helps normalize scheduling for tasks that must attempt to * maintain a fixed rate of execution. */ final boolean relative; /** * Constructs a new Task object encapulating the specified Runnable * and scheduling arguments. * * @param first the first time to execute * @param runnable the Runnable to execute * @param period the periodicity of execution * @param relative if true, use fixed rate scheduling else fixed delay */ Task(final long first, final Runnable runnable, final long period, final boolean relative) { this.next = first; this.runnable = runnable; this.period = period; this.relative = relative; } // fixed reported race condition /** Sets this task's cancelled flag true and signals its taskQueue. */ void cancel() { boolean signalCancelled = false; synchronized (cancel_mutex) { if (!cancelled) { cancelled = signalCancelled = true; } } if (signalCancelled) { HsqlTimer.this.taskQueue.signalTaskCancelled(this); } } /** * Retrieves whether this task is cancelled. * * @return true if cancelled, else false */ boolean isCancelled() { synchronized (cancel_mutex) { return cancelled; } } /** * Retrieves the instant in time just before this task was * last executed by the background thread. A value of zero * indicates that this task has never been executed. * * @return the last time this task was executed or zero if never */ synchronized long getLastScheduled() { return last; } /** * Retrieves the time at which this task is next scheduled for * execution. * * @return the time at which this task is next scheduled for * execution */ synchronized long getNextScheduled() { return next; } /** * Updates the last and next scheduled execution times. * * @param last when this task was last executed * @param next when this task is to be next executed */ synchronized void updateSchedule(final long last, final long next) { this.last = last; this.next = next; } /** * Sets the new periodicity of this task in milliseconds.

      * * If this task is cancelled or the new period is identical to the * current period, then this invocation has essentailly no effect * and this object is returned.

      * * Otherwise, if the new period is greater than the current period, then * a simple field assignment occurs and this object is returned.

      * * If none of the previous cases hold, then this task is cancelled and * a new, equivalent task with the new period is scheduled for * immediate first execution and returned to the caller.

      * * @param period the new period * @return a task reference, as per the rules stated above. */ synchronized Object setPeriod(final long newPeriod) { if (this.period == newPeriod || this.isCancelled()) { return this; } else if (newPeriod > this.period) { this.period = newPeriod; return this; } else { this.cancel(); return HsqlTimer.this.addTask(now(), this.runnable, newPeriod, this.relative); } } } /** * Heap-based priority queue. * * Provides extensions to facilitate and simplify implementing * timer functionality. */ protected static class TaskQueue extends HsqlArrayHeap { /** * Constructs a new TaskQueue with the specified initial capacity and * ObjectComparator. * * @param capacity the initial capacity of the queue * @param oc The ObjectComparator this queue uses to maintain its * Heap invariant. */ TaskQueue(final int capacity, final ObjectComparator oc) { super(capacity, oc); } /** * Type-safe add method.

      * * Can be used to inject debugging or accounting behaviour.

      * * @param task the task to add */ void addTask(final Task task) { // System.out.println("task added: " + task); super.add(task); } /** * Atomically removes all tasks in this queue and then and cancels * them. */ void cancelAllTasks() { Object[] oldHeap; int oldCount; synchronized (this) { oldHeap = this.heap; oldCount = this.count; // 1 instead of 0 to avoid unintended aoob exceptions this.heap = new Object[1]; this.count = 0; } for (int i = 0; i < oldCount; i++) { ((Task) oldHeap[i]).cancelled = true; } } /** * Causes the calling thread to wait until another thread invokes * {@link #unpark() unpark} or the specified amount of time has * elapsed. * * Implements the sync & wait(n) half of this queue's availability * condition.

      * * @param timeout the maximum time to wait in milliseconds. * @throws java.lang.InterruptedException if another thread has * interrupted the current thread. The interrupted status of * the current thread is cleared when this exception is thrown. */ synchronized void park(final long timeout) throws InterruptedException { this.wait(timeout); } /** * Retrieves the head of this queue, without removing it.

      * * This method has the side-effect of removing tasks from the * head of this queue until a non-cancelled task is encountered * or this queue is empty.

      * * If this queue is initially empty or is emptied in the process * of finding the earliest scheduled non-cancelled task, * then null is returned.

      * * @return the earliest scheduled non-cancelled task, or null if no such * task exists */ synchronized Task peekTask() { while (super.heap[0] != null && ((Task) super.heap[0]).isCancelled()) { super.remove(); } return (Task) super.heap[0]; } /** * Informs this queue that the given task is supposedly cancelled.

      * * If the indicated task is identical to the current head of * this queue, then it is removed and this queue is * {@link #unpark() unparked}.

      * * The cancelled status of the given task is not verified; it is * assumed that the caller is well-behaved (always passes a * non-null reference to a cancelled task). * * @param task a supposedly cancelled task */ synchronized void signalTaskCancelled(Task task) { // We only care about the case where HsqlTimer.nextTask // might be parked momentarily on this task. if (task == super.heap[0]) { super.remove(); this.notify(); } } /** * Type-safe remove method.

      * * Removes the head task from this queue.

      * * Can be used to inject debugging or accounting behaviour.

      * * @return this queue's head task or null if no such task exists */ Task removeTask() { // System.out.println("removing task..."); return (Task) super.remove(); } /** * Wakes up a single thread (if any) that is waiting on this queue's * {@link #park(long) park} method. * * Implements the sync & notify half of this queue's availability * condition. */ synchronized void unpark() { this.notify(); } } // ---------------------------------- tests ------------------------------------ // /** // * Computes the system-specific average {@link java.io.FileDescriptor#sync() // * sync} time.

      // * // * @param runs iterations to perform when computing the average // * @param buff the data to write before each sync call // * @return the total time to write buff and call sync runs times, // * divided by runs // */ // static double avgSyncTime(int runs, byte[] buff) { // java.io.File file = null; // java.io.FileOutputStream fos; // java.io.FileDescriptor fd; // long start = System.currentTimeMillis(); // // try { // file = java.io.File.createTempFile("SyncTest", ".tmp"); // fos = new java.io.FileOutputStream(file); // fd = fos.getFD(); // // for (int i = 0; i < runs; i++) { // fos.write(buff); // fos.flush(); // fd.sync(); // } // // long elapsed = System.currentTimeMillis() - start; // // return (elapsed/(double)runs); // } catch (Exception e) { // throw new RuntimeException(e); // } finally { // if (file != null) { // file.delete(); // } // } // } // // /** // * WRITE_DELAY simulation task. // * // * Writes a given buffer to disk, sync's the associated file // * descriptor and maintains an account of the average period // * between executions. // */ // static class WriteAndSyncTask extends java.util.TimerTask { // // static // /** Used to make the name of each task unique. */ // static int serial; // /** The data to write. */ // static final byte[] buf = new byte[256]; // // // instance // /** Identifes this task. */ // String name; // /** The time at which this task was last executed. */ // long last; // /** A running sum of the periods between executions. */ // long total; // /** The number of times this task has been executed. */ // int runs; // /** True until this task is the first time. */ // boolean firstTime = true; // /** The file to write. */ // java.io.File file; // /** The FileOutputStream to write. */ // java.io.FileOutputStream fos; // /** The FileDescriptor to sync. */ // java.io.FileDescriptor fd; // // /** Constructs a new WriteAndSyncTask */ // WriteAndSyncTask() { // this.name = "Task." + serial++; // // try { // this.file = java.io.File.createTempFile(name, ".tmp"); // this.fos = new java.io.FileOutputStream(file); // this.fd = fos.getFD(); // } catch(java.io.IOException ioe) { // throw new RuntimeException(ioe); // } // } // // /** // * Runnable implementation.

      // * // * Does the average period accounting and // * invokes the writeAndSync method. // */ // public void run() { // final long now = System.currentTimeMillis(); // // if (this.firstTime) { // this.firstTime = false; // } else { // this.total += (now - this.last); // } // // this.last = now; // // writeAndSync(); // // this.runs++; // } // // /** // * Writes a given buffer to disk and syncs the associated file // * descriptor. // */ // void writeAndSync() { // try { // this.fos.write(buf); // this.fos.flush(); // this.fd.sync(); // Thread.sleep(1); // } catch(Exception e) { // e.printStackTrace(); // } // } // // /** // * Closes the FileOutputStream, deletes the file // * and nullifies Object fields. // */ // public void release() { // try { // this.fos.close(); // } catch(Exception e) { // e.printStackTrace(); // } // try { // this.file.delete(); // } catch (Exception e) { // e.printStackTrace(); // } // // this.fos = null; // this.file = null; // this.fd = null; // } // // /** // * Retrieves the computed moment of actual average periodicity // * experienced by this task. // */ // public float getAveragePeriod() { // return (this.runs < 2) ? Float.NaN // : (this.total/(float)(this.runs - 1)); // } // // // /** // * @return the String representation of this task, indicating // * its name, the number of runs so far and the // * computed moment of actual average periodicity // * experienced so far. // */ // public String toString() { // return this.name // + "[" // + "runs: " + runs + ", " // + "actual avg. period: " + getAveragePeriod() // + "]"; // } // } // // static class Stats { // double min; // double max; // double pk; // double sk; // double vk; // long n; // boolean initialized; // boolean sample; // // void addDataPoint(double x) { // // double xi; // double xsi; // long nm1; // // xi = x; // // if (!initialized) { // n = 1; // pk = xi; // sk = xi; // min = xi; // max = xi; // vk = 0.0; // initialized = true; // // return; // } // // n++; // // nm1 = (n - 1); // xsi = (sk - (xi * nm1)); // vk += ((xsi * xsi) / n) / nm1; // sk += xi; // // if (xi != 0) { // pk *= xi; // } // // max = Math.max(max, xi); // min = Math.min(min, xi); // } // // double getMin() { // return initialized ? min : Double.NaN; // } // // double getMax() { // return initialized ? max : Double.NaN; // } // // double getGeometricMean() { // return initialized ? Math.pow(pk, 1/(double)n) : Double.NaN; // } // // double getVariance() { // // if (!initialized) { // return Double.NaN; // } // // return sample ? (n == 1) ? Double.NaN // : (vk / (double) (n - 1)) // : (vk / (double) (n)); // } // // double getStdDev() { // // if (!initialized) { // return Double.NaN; // } // // return sample ? (n == 1) ? Double.NaN // : (Math.sqrt(vk // / (double) (n - 1))) // : (Math.sqrt(vk / (double) (n))); // } // } // // /** // * Runs the HsqlTimer tests. // * @param args Currently unused // */ // public static void main(String[] args) { // // number of tasks to queue // int taskCount = 10; // // period, as a multiple of computed system-specific avg. sync time // double periodMultiplier = 1.4D; // // how long to run the timer, in milliseconds // long duration = 2800; // // test(taskCount, periodMultiplier, duration); // } // // /** // * Runs the HsqlTimer and java.util.Timer tests using the given // * arguments.

      // * // * @param taskCount the number of WriteAndSync tasks to add // * @param periodMultiplier the period with with to schedule // * the tasks, as a multiple of the computed, system-specific // * average sync time. // * @param duration The number of milliseconds that the foreground // * Thread should sleep while the specified number of WriteAndSync // * tasks are running in the background thread // */ // public static void test(final int taskCount, // final double periodMultiplier, // final long duration) { // // System.out.println(); // System.out.println("****************************************"); // System.out.println("* org.hsqldb.lib.HsqlTimer tests *"); // System.out.println("****************************************"); // System.out.println(); // // System.out.println("Computing system-specific avg. sync time."); // System.out.println("Please wait..."); // // double avgSyncTime = avgSyncTime(500, new byte[256]); // double minAvgPeriod = (taskCount * avgSyncTime); // long period = Math.round(avgSyncTime * periodMultiplier); // // System.out.println(); // System.out.println("System-specific avg. sync time : " + avgSyncTime + " ms."); // System.out.println("Requested task count : " + taskCount); // System.out.println("Requested task period : " + period + " ms." ); // System.out.println("Min. avg. period (0 starved) : " + minAvgPeriod + " ms." ); // System.out.println("Requested test duration : " + duration + " ms."); // // if (period <= minAvgPeriod || minAvgPeriod >= duration) { // double idealAvgRuns = (duration / minAvgPeriod); // // System.out.println("Idealized avg. runs / task : " + (float)idealAvgRuns); // } else { // double remainingDuration = (duration - minAvgPeriod); // double remainingRuns = (remainingDuration / period); // double idealAvgRuns = (1D + remainingRuns); // // System.out.println("Theoretical first cycle time : " + minAvgPeriod); // System.out.println("Remaining duration : " + remainingDuration); // System.out.println("Remaining runs : " + remainingRuns); // System.out.println("Idealized avg. runs per task : " + idealAvgRuns); // System.out.println("(1 + (requested duration"); // System.out.println(" - theor. first cycle time"); // System.out.println(" ) / requested period)"); // } // // testJavaUtilTimer(taskCount, period, duration); // testHsqlTimer(taskCount, period, duration); // } // // // /** // * Runs the java.util.Timer test using the given arguments.

      // * // * @param taskCount the number of WriteAndSync tasks to add // * @param periodMultiplier the period with with to schedule // * the tasks, as a multiple of the computed, system-specific // * average sync time. // * @param duration The number of milliseconds that the foreground // * Thread should sleep while the specified number of WriteAndSync // * tasks are running in the background thread // */ // public static void testJavaUtilTimer(final int taskCount, // final long period, // final long duration) { // // System.out.println(); // System.out.println("****************************************"); // System.out.println("* java.util.Timer *"); // System.out.println("****************************************"); // System.out.println(); // // WriteAndSyncTask.serial = 0; // // final java.util.Timer timer = new java.util.Timer(); // final WriteAndSyncTask[] tasks = new WriteAndSyncTask[taskCount]; // // for (int i = 0; i < taskCount; i++) { // tasks[i] = new WriteAndSyncTask(); // timer.scheduleAtFixedRate(tasks[i], 0, period); // } // // final long start = now(); // // try { // Thread.sleep(duration); // } catch (Exception e) { // e.printStackTrace(); // } // // for (int i = 0; i < tasks.length; i++) { // tasks[i].cancel(); // } // // timer.cancel(); // // final long elapsed = now() - start; // // System.out.println("Actual test duration: " + elapsed + " ms."); // System.out.println(); // // printTaskStats(tasks); // } // // /** // * Runs the HsqlTimer test using the given arguments.

      // * // * @param taskCount the number of WriteAndSync tasks to add // * @param periodMultiplier the period with with to schedule // * the tasks, as a multiple of the computed, system-specific // * average sync time. // * @param duration The number of milliseconds that the foreground // * Thread should sleep while the specified number of WriteAndSync // * tasks are running in the background thread // */ // public static void testHsqlTimer(final int taskCount, // final long period, // final long duration) { // // System.out.println(); // System.out.println("****************************************"); // System.out.println("* org.hsqldb.lib.HsqlTimer *"); // System.out.println("****************************************"); // System.out.println(); // // WriteAndSyncTask.serial = 0; // // final HsqlTimer timer = new HsqlTimer(); // final WriteAndSyncTask[] tasks = new WriteAndSyncTask[taskCount]; // final Object[] ttasks = new Object[taskCount]; // // for (int i = 0; i < taskCount; i++) { // tasks[i] = new WriteAndSyncTask(); // ttasks[i] = timer.schedulePeriodicallyAfter(0, period, tasks[i], true); // } // // final long start = now(); // // try { // Thread.sleep(duration); // } catch (Exception e) { // e.printStackTrace(); // } // // final Thread timerThread = timer.getThread(); // // for (int i = 0; i < taskCount; i++) { // timer.cancel(ttasks[i]); // } // // try { // timerThread.join(); // } catch (Exception e) { // e.printStackTrace(); // } // // final long elapsed = now() - start; // // System.out.println("Actual test duration: " + elapsed + " ms."); // System.out.println(); // // printTaskStats(tasks); // // } // // static void printTaskStats(WriteAndSyncTask[] tasks) { // float avgTotal = 0; // int avgCount = 0; // int starved = 0; // int runs = 0; // Stats periodStats = new Stats(); // Stats runStats = new Stats(); // // for (int i = 0; i < tasks.length; i++) { // if (tasks[i].runs > 1) { // double avgPeriod = tasks[i].getAveragePeriod(); // periodStats.addDataPoint(avgPeriod); // avgTotal += avgPeriod; // avgCount++; // } // runs += tasks[i].runs; // if (tasks[i].runs == 0) { // starved++; // } // runStats.addDataPoint(tasks[i].runs); // tasks[i].release(); // } // // float periodAvg = (avgTotal / avgCount); // float periodMax = (float) periodStats.getMax(); // int periodMaxCnt = 0; // float periodMin = (float) periodStats.getMin(); // int periodMinCnt = 0; // float periodRange = (periodMax - periodMin); // float periodStddev = (float)periodStats.getStdDev(); // float periodGMean = (float)periodStats.getGeometricMean(); // float periodStddevR = (periodRange / periodStddev); // // float runsAvg = (runs / (float)tasks.length); // int runsMin = Math.round((float)runStats.getMin()); // int runsMinCnt = 0; // int runsMax = Math.round((float)runStats.getMax()); // int runsMaxCnt = 0; // int runsRange = (runsMax - runsMin); // float runsStddev = (float) runStats.getStdDev(); // float runsGMean = (float) runStats.getGeometricMean(); // float runsStddevR = (runsRange / runsStddev); // // for (int i = 0; i < tasks.length; i++) { // double avgPeriod = tasks[i].getAveragePeriod(); // // if (avgPeriod == periodMin) { // periodMinCnt++; // } // // if (avgPeriod == periodMax) { // periodMaxCnt++; // } // // if (tasks[i].runs == runsMin) { // runsMinCnt++; // } // // if (tasks[i].runs == runsMax) { // runsMaxCnt++; // } // } // // System.out.println("------------------------"); // System.out.println("Starved tasks (runs = 0): " + starved + " (" + ((100*starved)/tasks.length) + "%)"); // System.out.println("------------------------"); // System.out.println("Period :"); // System.out.println("------------------------"); // System.out.println("Average : " + periodAvg); // System.out.println("~Minimum (count/runs) : " + periodMin + " (" + periodMinCnt + "/" + tasks.length + ")"); // System.out.println("~Maximum (count/runs) : " + periodMax + " (" + periodMaxCnt + "/" + tasks.length + ")"); // System.out.println("~Range : " + periodRange); // System.out.println("Geometric mean : " + periodGMean); // System.out.println("Stddev : " + periodStddev); // System.out.println("~Range/Stddev : " + periodStddevR); // System.out.println("------------------------"); // System.out.println("Runs :"); // System.out.println("------------------------"); // System.out.println("Average : " + runsAvg); // System.out.println("Minimum (count/runs) : " + runsMin + " (" + runsMinCnt + "/" + tasks.length + ")"); // System.out.println("Maximum (count/runs) : " + runsMax + " (" + runsMaxCnt + "/" + tasks.length + ")"); // System.out.println("Range : " + runsRange); // System.out.println("Geometric mean : " + runsGMean); // System.out.println("Stddev : " + runsStddev); // System.out.println("Range/Stddev : " + runsStddevR); // } } hsqldb-1.8.0.10.orig/src/org/hsqldb/lib/ArrayUtil.java0000644000175000017500000006565310416742474021027 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.lib; import java.lang.reflect.Array; /** * Collection of static methods for operations on arrays * * @author fredt@users * @version 1.7.2 * @since 1.7.2 */ public class ArrayUtil { public static final int CLASS_CODE_BYTE = 'B'; public static final int CLASS_CODE_CHAR = 'C'; public static final int CLASS_CODE_DOUBLE = 'D'; public static final int CLASS_CODE_FLOAT = 'F'; public static final int CLASS_CODE_INT = 'I'; public static final int CLASS_CODE_LONG = 'J'; public static final int CLASS_CODE_OBJECT = 'L'; public static final int CLASS_CODE_SHORT = 'S'; public static final int CLASS_CODE_BOOLEAN = 'Z'; private static IntValueHashMap classCodeMap = new IntValueHashMap(); static { classCodeMap.put(byte.class, ArrayUtil.CLASS_CODE_BYTE); classCodeMap.put(char.class, ArrayUtil.CLASS_CODE_SHORT); classCodeMap.put(short.class, ArrayUtil.CLASS_CODE_SHORT); classCodeMap.put(int.class, ArrayUtil.CLASS_CODE_INT); classCodeMap.put(long.class, ArrayUtil.CLASS_CODE_LONG); classCodeMap.put(float.class, ArrayUtil.CLASS_CODE_FLOAT); classCodeMap.put(double.class, ArrayUtil.CLASS_CODE_DOUBLE); classCodeMap.put(boolean.class, ArrayUtil.CLASS_CODE_BOOLEAN); classCodeMap.put(Object.class, ArrayUtil.CLASS_CODE_OBJECT); } /** * Returns a distinct int code for each primitive type and for all Object types. */ static int getClassCode(Class cla) { if (!cla.isPrimitive()) { return ArrayUtil.CLASS_CODE_OBJECT; } return classCodeMap.get(cla, -1); } /** * Clears an area of the given array of the given type. */ public static void clearArray(int type, Object data, int from, int to) { switch (type) { case ArrayUtil.CLASS_CODE_BYTE : { byte[] array = (byte[]) data; while (--to >= from) { array[to] = 0; } return; } case ArrayUtil.CLASS_CODE_CHAR : { byte[] array = (byte[]) data; while (--to >= from) { array[to] = 0; } return; } case ArrayUtil.CLASS_CODE_SHORT : { short[] array = (short[]) data; while (--to >= from) { array[to] = 0; } return; } case ArrayUtil.CLASS_CODE_INT : { int[] array = (int[]) data; while (--to >= from) { array[to] = 0; } return; } case ArrayUtil.CLASS_CODE_LONG : { long[] array = (long[]) data; while (--to >= from) { array[to] = 0; } return; } case ArrayUtil.CLASS_CODE_FLOAT : { float[] array = (float[]) data; while (--to >= from) { array[to] = 0; } return; } case ArrayUtil.CLASS_CODE_DOUBLE : { double[] array = (double[]) data; while (--to >= from) { array[to] = 0; } return; } case ArrayUtil.CLASS_CODE_BOOLEAN : { boolean[] array = (boolean[]) data; while (--to >= from) { array[to] = false; } return; } default : { Object[] array = (Object[]) data; while (--to >= from) { array[to] = null; } return; } } } /** * Moves the contents of an array to allow both addition and removal of * elements. Used arguments must be in range. * * @param type class type of the array * @param array the array * @param usedElements count of elements of array in use * @param index point at which to add or remove elements * @count number of elements to add or remove */ public static void adjustArray(int type, Object array, int usedElements, int index, int count) { if (index >= usedElements) { return; } int newCount = usedElements + count; int source; int target; int size; if (count >= 0) { source = index; target = index + count; size = usedElements - index; } else { source = index - count; target = index; size = usedElements - index + count; } if (size > 0) { System.arraycopy(array, source, array, target, size); } if (count < 0) { clearArray(type, array, newCount, usedElements); } } /** * Basic sort for small arrays of int. */ public static void sortArray(int[] array) { boolean swapped; do { swapped = false; for (int i = 0; i < array.length - 1; i++) { if (array[i] > array[i + 1]) { int temp = array[i + 1]; array[i + 1] = array[i]; array[i] = temp; swapped = true; } } } while (swapped); } /** * Basic find for small arrays of Object. */ public static int find(Object[] array, Object object) { for (int i = 0; i < array.length; i++) { if (array[i] == object) { // hadles both nulls return i; } if (object != null && object.equals(array[i])) { return i; } } return -1; } /** * Basic find for small arrays of int. */ public static int find(int[] array, int value) { for (int i = 0; i < array.length; i++) { if (array[i] == value) { return i; } } return -1; } /** * Finds the first element of the array that is not equal to the given value. */ public static int findNot(int[] array, int value) { for (int i = 0; i < array.length; i++) { if (array[i] != value) { return i; } } return -1; } /** * Returns true if arra and arrb contain the same set of integers, not * necessarily in the same order. This implies the arrays are of the same * length. */ public static boolean areEqualSets(int[] arra, int[] arrb) { return arra.length == arrb.length && ArrayUtil.haveEqualSets(arra, arrb, arra.length); } /** * For full == true returns true if arra and arrb are identical (have the * same length and contain the same integers in the same sequence). * * For full == false returns the result * of haveEqualArrays(arra,arrb,count) * * For full == true, the array lengths must be the same as count * */ public static boolean areEqual(int[] arra, int[] arrb, int count, boolean full) { if (ArrayUtil.haveEqualArrays(arra, arrb, count)) { if (full) { return arra.length == arrb.length && count == arra.length; } return true; } return false; } /** * Returns true if the first count elements of arra and arrb are identical * sets of integers (not necessarily in the same order). * */ public static boolean haveEqualSets(int[] arra, int[] arrb, int count) { if (count > arra.length || count > arrb.length) { return false; } if (count == 1) { return arra[0] == arrb[0]; } int[] tempa = (int[]) resizeArray(arra, count); int[] tempb = (int[]) resizeArray(arrb, count); sortArray(tempa); sortArray(tempb); for (int j = 0; j < count; j++) { if (tempa[j] != tempb[j]) { return false; } } return true; } /** * Returns true if the first count elements of arra and arrb are identical * subarrays of integers * */ public static boolean haveEqualArrays(int[] arra, int[] arrb, int count) { if (count > arra.length || count > arrb.length) { return false; } for (int j = 0; j < count; j++) { if (arra[j] != arrb[j]) { return false; } } return true; } /** * Returns true if the first count elements of arra and arrb are identical * subarrays of Objects * */ public static boolean haveEqualArrays(Object[] arra, Object[] arrb, int count) { if (count > arra.length || count > arrb.length) { return false; } for (int j = 0; j < count; j++) { if (arra[j] != arrb[j]) { if (arra[j] == null ||!arra[j].equals(arrb[j])) { return false; } } } return true; } /** * Returns true if arra and the first bcount elements of arrb share any * element.

      * * Used for checks for any overlap between two arrays of column indexes. */ public static boolean haveCommonElement(int[] arra, int[] arrb, int bcount) { for (int i = 0; i < arra.length; i++) { int c = arra[i]; for (int j = 0; j < bcount; j++) { if (c == arrb[j]) { return true; } } } return false; } /** * Returns an int[] containing elements shared between the two arrays * arra and arrb. The arrays contain sets (no value is repeated). * * Used to find the overlap between two arrays of column indexes. * Ordering of the result arrays will be the same as in array * a. The method assumes that each index is only listed * once in the two input arrays. *

      * e.g. *

      * *
    * * * * * *
    The arrays
    int []arra={2,11,5,8}
    int []arrb={20,8,10,11,28,12}
    will result in:
    int []arrc={11,8}
    * * @param arra int[]; first column indexes * * @param arrb int[]; second column indexes * * @return int[] common indexes or null if there is no overlap. * * @short Return the overlap between two arrays of column indexes. */ public static int[] commonElements(int[] arra, int[] arrb) { int[] c = null; int n = countCommonElements(arra, arrb); if (n > 0) { c = new int[n]; int k = 0; for (int i = 0; i < arra.length; i++) { for (int j = 0; j < arrb.length; j++) { if (arra[i] == arrb[j]) { c[k++] = arra[i]; } } } } return c; } /** * Returns the number of elements shared between the two arrays containing * sets.

    * * Return the number of elements shared by two column index arrays. * This method assumes that each of these arrays contains a set (each * element index is listed only once in each index array). Otherwise the * returned number will NOT represent the number of unique column indexes * shared by both index array. * * @param arra int[]; first array of column indexes. * * @param arrb int[]; second array of column indexes * * @return int; number of elements shared by a and b */ public static int countCommonElements(int[] arra, int[] arrb) { int k = 0; for (int i = 0; i < arra.length; i++) { for (int j = 0; j < arrb.length; j++) { if (arra[i] == arrb[j]) { k++; } } } return k; } /** * Returns the count of elements in arra from position start that are * sequentially equal to the elements of arrb. */ public static int countSameElements(byte[] arra, int start, byte[] arrb) { int k = 0; int limit = arra.length - start; if (limit > arrb.length) { limit = arrb.length; } for (int i = 0; i < limit; i++) { if (arra[i + start] == arrb[i]) { k++; } else { break; } } return k; } /** * Returns the index of the first occurence of arrb in arra. Or -1 if not found. */ public static int find(byte[] arra, int start, int limit, byte[] arrb) { int k = 0; limit = limit - arrb.length + 1; int value = arrb[0]; for (; k < limit; k++) { if (arra[k] == value) { if (arrb.length == 1) { return k; } if (containsAt(arra, k, arrb)) { return k; } } } return -1; } /** * Returns an index into arra (or -1) where the character is not in the * charset byte array. */ public static int findNotIn(byte[] arra, int start, int limit, byte[] charset) { int k = 0; for (; k < limit; k++) { for (int i = 0; i < charset.length; i++) { if (arra[k] == charset[i]) { continue; } } return k; } return -1; } /** * Returns an index into arra (or -1) where the character is in the * charset byte array. */ public static int findIn(byte[] arra, int start, int limit, byte[] charset) { int k = 0; for (; k < limit; k++) { for (int i = 0; i < charset.length; i++) { if (arra[k] == charset[i]) { return k; } } } return -1; } /** * Returns the index of b or c in arra. Or -1 if not found. */ public static int find(byte[] arra, int start, int limit, int b, int c) { int k = 0; for (; k < limit; k++) { if (arra[k] == b || arra[k] == c) { return k; } } return -1; } /** * Set elements of arrb true if their indexes appear in arrb. */ public static void intIndexesToBooleanArray(int[] arra, boolean[] arrb) { int k = 0; for (int i = 0; i < arra.length; i++) { if (arra[i] < arrb.length) { arrb[arra[i]] = true; } } } /** * Return true if for each true element in arrb, the corresponding * element in arra is true */ public static boolean containsAllTrueElements(boolean[] arra, boolean[] arrb) { for (int i = 0; i < arra.length; i++) { if (arrb[i] &&!arra[i]) { return false; } } return true; } /** * Returns true if arra from position start contains all elements of arrb * in sequential order. */ public static boolean containsAt(byte[] arra, int start, byte[] arrb) { return countSameElements(arra, start, arrb) == arrb.length; } /** * Returns the count of elements in arra from position start that are * among the elements of arrb. Stops at any element not in arrb. */ public static int countStartElementsAt(byte[] arra, int start, byte[] arrb) { int k = 0; mainloop: for (int i = start; i < arra.length; i++) { for (int j = 0; j < arrb.length; j++) { if (arra[i] == arrb[j]) { k++; continue mainloop; } } break; } return k; } /** * Returns the count of elements in arra from position start that are not * among the elements of arrb. * */ public static int countNonStartElementsAt(byte[] arra, int start, byte[] arrb) { int k = 0; mainloop: for (int i = start; i < arra.length; i++) { for (int j = 0; j < arrb.length; j++) { if (arra[i] == arrb[j]) { break mainloop; } } k++; } return k; } /** * Convenience wrapper for System.arraycopy(). */ public static void copyArray(Object source, Object dest, int count) { System.arraycopy(source, 0, dest, 0, count); } /** * Returns a range of elements of source from start to end of the array. */ public static int[] arraySlice(int[] source, int start, int count) { int[] slice = new int[count]; System.arraycopy(source, start, slice, 0, count); return slice; } /** * Fills the array with a value. */ public static void fillArray(Object[] array, Object value) { int to = array.length; while (--to >= 0) { array[to] = value; } } /** * Fills the int array with a value */ public static void fillArray(int[] array, int value) { int to = array.length; while (--to >= 0) { array[to] = value; } } /** * Returns a duplicates of an array. */ public static Object duplicateArray(Object source) { int size = Array.getLength(source); Object newarray = Array.newInstance(source.getClass().getComponentType(), size); System.arraycopy(source, 0, newarray, 0, size); return newarray; } /** * Returns the given array if newsize is the same as existing. * Returns a new array of given size, containing as many elements of * the original array as it can hold. */ public static Object resizeArrayIfDifferent(Object source, int newsize) { int oldsize = Array.getLength(source); if (oldsize == newsize) { return source; } Object newarray = Array.newInstance(source.getClass().getComponentType(), newsize); if (oldsize < newsize) { newsize = oldsize; } System.arraycopy(source, 0, newarray, 0, newsize); return newarray; } /** * Returns a new array of given size, containing as many elements of * the original array as it can hold. N.B. Always returns a new array * even if newsize parameter is the same as the old size. */ public static Object resizeArray(Object source, int newsize) { Object newarray = Array.newInstance(source.getClass().getComponentType(), newsize); int oldsize = Array.getLength(source); if (oldsize < newsize) { newsize = oldsize; } System.arraycopy(source, 0, newarray, 0, newsize); return newarray; } /** * Returns an array containing the elements of parameter source, with one * element removed or added. Parameter adjust {-1, +1} indicates the * operation. Parameter colindex indicates the position at which an element * is removed or added. Parameter addition is an Object to add when * adjust is +1. */ public static Object toAdjustedArray(Object source, Object addition, int colindex, int adjust) { int newsize = Array.getLength(source) + adjust; Object newarray = Array.newInstance(source.getClass().getComponentType(), newsize); copyAdjustArray(source, newarray, addition, colindex, adjust); return newarray; } /** * Copies elements of source to dest. If adjust is -1 the element at * colindex is not copied. If adjust is +1 that element is filled with * the Object addition. All the rest of the elements in source are * shifted left or right accordingly when they are copied. If adjust is 0 * the addition is copied over the element at colindex. * * No checks are perfomed on array sizes and an exception is thrown * if they are not consistent with the other arguments. */ public static void copyAdjustArray(Object source, Object dest, Object addition, int colindex, int adjust) { int length = Array.getLength(source); if (colindex < 0) { System.arraycopy(source, 0, dest, 0, length); return; } System.arraycopy(source, 0, dest, 0, colindex); if (adjust == 0) { int endcount = length - colindex - 1; Array.set(dest, colindex, addition); if (endcount > 0) { System.arraycopy(source, colindex + 1, dest, colindex + 1, endcount); } } else if (adjust < 0) { int endcount = length - colindex - 1; if (endcount > 0) { System.arraycopy(source, colindex + 1, dest, colindex, endcount); } } else { int endcount = length - colindex; Array.set(dest, colindex, addition); if (endcount > 0) { System.arraycopy(source, colindex, dest, colindex + 1, endcount); } } } /** * Returns a new array with the elements in collar adjusted to reflect * changes at colindex.

    * * Each element in collarr represents an index into another array * otherarr.

    * * colindex is the index at which an element is added or removed. * Each element in the result array represents the new, * adjusted index.

    * * For each element of collarr that represents an index equal to * colindex and adjust is -1, the result will not contain that element * and will be shorter than collar by one element. * * @param colarr the source array * @param colindex index at which to perform adjustement * @param adjust +1, 0 or -1 * @return new, adjusted array */ public static int[] toAdjustedColumnArray(int[] colarr, int colindex, int adjust) { if (colarr == null) { return null; } int[] intarr = new int[colarr.length]; int j = 0; for (int i = 0; i < colarr.length; i++) { if (colarr[i] > colindex) { intarr[j] = colarr[i] + adjust; j++; } else if (colarr[i] == colindex) { if (adjust < 0) { // skip an element from colarr } else { intarr[j] = colarr[i] + adjust; j++; } } else { intarr[j] = colarr[i]; j++; } } if (colarr.length != j) { int[] newarr = new int[j]; copyArray(intarr, newarr, j); return newarr; } return intarr; } /** * Copies some elements of row into colobject by using colindex as * the list of indexes into row.

    * * colindex and colobject are of equal length and are normally * shorter than row.

    * * @param row the source array * @param colindex the list of indexes into row * @param colobject the destination array */ public static void copyColumnValues(Object[] row, int[] colindex, Object[] colobject) { for (int i = 0; i < colindex.length; i++) { colobject[i] = row[colindex[i]]; } } public static void copyColumnValues(int[] row, int[] colindex, int[] colobject) { for (int i = 0; i < colindex.length; i++) { colobject[i] = row[colindex[i]]; } } public static void fillSequence(int[] colindex) { for (int i = 0; i < colindex.length; i++) { colindex[i] = i; } } /* public static void main(String[] args) { int[] a = new int[] { 23, 11, 37, 7, 1, 5 }; int[] b = new int[] { 1, 3, 7, 11, 13, 17, 19, 3, 1 }; int[] c = toAdjustedColumnArray(a, 7, -1); int[] d = toAdjustedColumnArray(b, 11, 1); int[] e = new int[a.length]; copyArray(a, e, a.length); sortArray(e); int[] f = new int[b.length]; copyArray(b, f, b.length); sortArray(f); boolean x = haveEqualSets(a, e, a.length); boolean y = haveEqualSets(b, f, b.length); System.out.print("test passed: "); System.out.print(x == true && y == true && c.length == a.length - 1 && d.length == b.length); } */ } hsqldb-1.8.0.10.orig/src/org/hsqldb/lib/ThreadFactory.java0000644000175000017500000000334510416742475021641 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.lib; /** * * @author boucherb@users * @version 1.7.2 * @since 1.7.2 */ public interface ThreadFactory { Thread newThread(Runnable r); } hsqldb-1.8.0.10.orig/src/org/hsqldb/lib/HashMap.java0000644000175000017500000001221110416742474020412 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.lib; import org.hsqldb.store.BaseHashMap; /** * This class does not store null keys. * * @author fredt@users * @version 1.7.2 * @since 1.7.2 */ public class HashMap extends BaseHashMap { Set keySet; Collection values; public HashMap() { this(16, 0.75f); } public HashMap(int initialCapacity) throws IllegalArgumentException { this(initialCapacity, 0.75f); } public HashMap(int initialCapacity, float loadFactor) throws IllegalArgumentException { super(initialCapacity, loadFactor, BaseHashMap.objectKeyOrValue, BaseHashMap.objectKeyOrValue, false); } public Object get(Object key) { int hash = key.hashCode(); int lookup = getLookup(key, hash); if (lookup != -1) { return objectValueTable[lookup]; } return null; } public Object put(Object key, Object value) { return super.addOrRemove(0, 0, key, value, false); } public Object remove(Object key) { return super.removeObject(key); } public boolean containsKey(Object key) { return super.containsKey(key); } public boolean containsValue(Object value) { return super.containsValue(value); } public void putAll(HashMap t) { Iterator it = t.keySet.iterator(); while (it.hasNext()) { Object key = it.next(); put(key, t.get(key)); } } public Set keySet() { if (keySet == null) { keySet = new KeySet(); } return keySet; } public Collection values() { if (values == null) { values = new Values(); } return values; } class KeySet implements Set { public Iterator iterator() { return HashMap.this.new BaseHashIterator(true); } public int size() { return HashMap.this.size(); } public boolean contains(Object o) { return containsKey(o); } public Object get(Object key) { int lookup = HashMap.this.getLookup(key, key.hashCode()); if (lookup < 0) { return null; } else { return HashMap.this.objectKeyTable[lookup]; } } public boolean add(Object value) { throw new RuntimeException(); } public boolean addAll(Collection c) { throw new RuntimeException(); } public boolean remove(Object o) { int oldSize = size(); HashMap.this.remove(o); return size() != oldSize; } public boolean isEmpty() { return size() == 0; } public void clear() { HashMap.this.clear(); } } class Values implements Collection { public Iterator iterator() { return HashMap.this.new BaseHashIterator(false); } public int size() { return HashMap.this.size(); } public boolean contains(Object o) { throw new RuntimeException(); } public boolean add(Object value) { throw new RuntimeException(); } public boolean addAll(Collection c) { throw new RuntimeException(); } public boolean remove(Object o) { throw new RuntimeException(); } public boolean isEmpty() { return size() == 0; } public void clear() { HashMap.this.clear(); } } } hsqldb-1.8.0.10.orig/src/org/hsqldb/lib/StringConverter.java0000644000175000017500000004561210460150000022213 0ustar renerene/* Copyright (c) 1995-2000, The Hypersonic SQL Group. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the Hypersonic SQL Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE HYPERSONIC SQL GROUP, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * This software consists of voluntary contributions made by many individuals * on behalf of the Hypersonic SQL Group. * * * For work added by the HSQL Development Group: * * Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.lib; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.StringWriter; import java.io.UTFDataFormatException; /** * Collection of static methods for converting strings between different * formats and to and from byte arrays.

    * * New class, with extensively enhanced and rewritten Hypersonic code. * * @author Thomas Mueller (Hypersonic SQL Group) * @author fredt@users * @version 1.8.0 * @since 1.7.2 */ // fredt@users 20020328 - patch 1.7.0 by fredt - error trapping public class StringConverter { private static final byte[] HEXBYTES = { (byte) '0', (byte) '1', (byte) '2', (byte) '3', (byte) '4', (byte) '5', (byte) '6', (byte) '7', (byte) '8', (byte) '9', (byte) 'a', (byte) 'b', (byte) 'c', (byte) 'd', (byte) 'e', (byte) 'f' }; private static final String HEXINDEX = "0123456789abcdef0123456789ABCDEF"; /** * Converts a String into a byte array by using a big-endian two byte * representation of each char value in the string. */ byte[] stringToFullByteArray(String s) { int length = s.length(); byte[] buffer = new byte[length * 2]; int c; for (int i = 0; i < length; i++) { c = s.charAt(i); buffer[i * 2] = (byte) ((c & 0x0000ff00) >> 8); buffer[i * 2 + 1] = (byte) (c & 0x000000ff); } return buffer; } /** * Compacts a hexadecimal string into a byte array * * * @param s hexadecimal string * * @return byte array for the hex string * @throws IOException */ public static byte[] hexToByte(String s) throws IOException { int l = s.length() / 2; byte[] data = new byte[l]; int j = 0; if (s.length() % 2 != 0) { throw new IOException( "hexadecimal string with odd number of characters"); } for (int i = 0; i < l; i++) { char c = s.charAt(j++); int n, b; n = HEXINDEX.indexOf(c); if (n == -1) { throw new IOException( "hexadecimal string contains non hex character"); } b = (n & 0xf) << 4; c = s.charAt(j++); n = HEXINDEX.indexOf(c); b += (n & 0xf); data[i] = (byte) b; } return data; } /** * Converts a byte array into a hexadecimal string * * * @param b byte array * * @return hex string */ public static String byteToHex(byte[] b) { int len = b.length; char[] s = new char[len * 2]; for (int i = 0, j = 0; i < len; i++) { int c = ((int) b[i]) & 0xff; s[j++] = (char) HEXBYTES[c >> 4 & 0xf]; s[j++] = (char) HEXBYTES[c & 0xf]; } return new String(s); } /** * Converts a byte array into hexadecimal characters * which are written as ASCII to the given output stream. * * @param o output stream * @param b byte array */ public static void writeHex(byte[] o, int from, byte[] b) { int len = b.length; for (int i = 0; i < len; i++) { int c = ((int) b[i]) & 0xff; o[from++] = HEXBYTES[c >> 4 & 0xf]; o[from++] = HEXBYTES[c & 0xf]; } } public static String byteToString(byte[] b, String charset) { try { return (charset == null) ? new String(b) : new String(b, charset); } catch (Exception e) {} return null; } /** * Converts a Unicode string into UTF8 then convert into a hex string * * * @param s normal Unicode string * * @return hex string representation of UTF8 encoding of the input */ public static String unicodeToHexString(String s) { HsqlByteArrayOutputStream bout = new HsqlByteArrayOutputStream(); writeUTF(s, bout); return byteToHex(bout.toByteArray()); } // fredt@users 20011120 - patch 450455 by kibu@users - modified // method return type changed to HsqlStringBuffer with spare // space for end-of-line characters -- to reduce String concatenation /** * Hsqldb specific encoding used only for log files. * * The SQL statements that need to be written to the log file (input) are * Java Unicode strings. input is converted into a 7bit escaped ASCII * string (output)with the following transformations. * All characters outside the 0x20-7f range are converted to a * escape sequence and added to output. * If a backslash character is immdediately followed by 'u', the * backslash character is converted to escape sequence and * added to output. * All the remaining characters in input are added to output without * conversion. * * The escape sequence is backslash, letter u, xxxx, where xxxx * is the hex representation of the character code. * (fredt@users) * * @param b output stream to wite to * @param s Java Unicode string * * @return number of bytes written out * */ public static int unicodeToAscii(HsqlByteArrayOutputStream b, String s, boolean doubleSingleQuotes) { int count = 0; if ((s == null) || (s.length() == 0)) { return 0; } int len = s.length(); for (int i = 0; i < len; i++) { char c = s.charAt(i); if (c == '\\') { if ((i < len - 1) && (s.charAt(i + 1) == 'u')) { b.write(c); // encode the \ as unicode, so 'u' is ignored b.write('u'); b.write('0'); b.write('0'); b.write('5'); b.write('c'); count += 6; } else { b.write(c); count++; } } else if ((c >= 0x0020) && (c <= 0x007f)) { b.write(c); // this is 99% count++; if (c == '\'' && doubleSingleQuotes) { b.write(c); count++; } } else { b.write('\\'); b.write('u'); b.write(HEXBYTES[(c >> 12) & 0xf]); b.write(HEXBYTES[(c >> 8) & 0xf]); b.write(HEXBYTES[(c >> 4) & 0xf]); b.write(HEXBYTES[c & 0xf]); count += 6; } } return count; } // fredt@users 20020522 - fix for 557510 - backslash bug // this legacy bug resulted from forward reading the input when a backslash // was present and manifested itself when a backslash was followed // immdediately by a character outside the 0x20-7f range in a database field. /** * Hsqldb specific decoding used only for log files. * * This method converts the 7 bit escaped ASCII strings in a log file * back into Java Unicode strings. See unicodeToAccii() above, * * @param s encoded ASCII string in byte array * @param offset position of first byte * @param length number of bytes to use * * @return Java Unicode string */ public static String asciiToUnicode(byte[] s, int offset, int length) { if (length == 0) { return ""; } char[] b = new char[length]; int j = 0; for (int i = 0; i < length; i++) { byte c = s[offset + i]; if (c == '\\' && i < length - 5) { byte c1 = s[offset + i + 1]; if (c1 == 'u') { i++; // 4 characters read should always return 0-15 int k = HEXINDEX.indexOf(s[offset + (++i)]) << 12; k += HEXINDEX.indexOf(s[offset + (++i)]) << 8; k += HEXINDEX.indexOf(s[offset + (++i)]) << 4; k += HEXINDEX.indexOf(s[offset + (++i)]); b[j++] = (char) k; } else { b[j++] = (char) c; } } else { b[j++] = (char) c; } } return new String(b, 0, j); } public static String asciiToUnicode(String s) { if ((s == null) || (s.indexOf("\\u") == -1)) { return s; } int len = s.length(); char[] b = new char[len]; int j = 0; for (int i = 0; i < len; i++) { char c = s.charAt(i); if (c == '\\' && i < len - 5) { char c1 = s.charAt(i + 1); if (c1 == 'u') { i++; // 4 characters read should always return 0-15 int k = HEXINDEX.indexOf(s.charAt(++i)) << 12; k += HEXINDEX.indexOf(s.charAt(++i)) << 8; k += HEXINDEX.indexOf(s.charAt(++i)) << 4; k += HEXINDEX.indexOf(s.charAt(++i)); b[j++] = (char) k; } else { b[j++] = c; } } else { b[j++] = c; } } return new String(b, 0, j); } public static String readUTF(byte[] bytearr, int offset, int length) throws IOException { char[] buf = new char[length]; return readUTF(bytearr, offset, length, buf); } public static String readUTF(byte[] bytearr, int offset, int length, char[] buf) throws IOException { int bcount = 0; int c, char2, char3; int count = 0; while (count < length) { c = (int) bytearr[offset + count]; if (bcount == buf.length) { buf = (char[]) ArrayUtil.resizeArray(buf, length); } if (c > 0) { /* 0xxxxxxx*/ count++; buf[bcount++] = (char) c; continue; } c &= 0xff; switch (c >> 4) { case 12 : case 13 : /* 110x xxxx 10xx xxxx*/ count += 2; if (count > length) { throw new UTFDataFormatException(); } char2 = (int) bytearr[offset + count - 1]; if ((char2 & 0xC0) != 0x80) { throw new UTFDataFormatException(); } buf[bcount++] = (char) (((c & 0x1F) << 6) | (char2 & 0x3F)); break; case 14 : /* 1110 xxxx 10xx xxxx 10xx xxxx */ count += 3; if (count > length) { throw new UTFDataFormatException(); } char2 = (int) bytearr[offset + count - 2]; char3 = (int) bytearr[offset + count - 1]; if (((char2 & 0xC0) != 0x80) || ((char3 & 0xC0) != 0x80)) { throw new UTFDataFormatException(); } buf[bcount++] = (char) (((c & 0x0F) << 12) | ((char2 & 0x3F) << 6) | ((char3 & 0x3F) << 0)); break; default : /* 10xx xxxx, 1111 xxxx */ throw new UTFDataFormatException(); } } // The number of chars produced may be less than length return new String(buf, 0, bcount); } /** * Writes a string to the specified DataOutput using UTF-8 encoding in a * machine-independent manner. *

    * @param str a string to be written. * @param out destination to write to * @return The number of bytes written out. */ public static int writeUTF(String str, HsqlByteArrayOutputStream out) { int strlen = str.length(); int c, count = 0; for (int i = 0; i < strlen; i++) { c = str.charAt(i); if (c >= 0x0001 && c <= 0x007F) { out.write(c); count++; } else if (c > 0x07FF) { out.write(0xE0 | ((c >> 12) & 0x0F)); out.write(0x80 | ((c >> 6) & 0x3F)); out.write(0x80 | ((c >> 0) & 0x3F)); count += 3; } else { out.write(0xC0 | ((c >> 6) & 0x1F)); out.write(0x80 | ((c >> 0) & 0x3F)); count += 2; } } return count; } public static int getUTFSize(String s) { int len = (s == null) ? 0 : s.length(); int l = 0; for (int i = 0; i < len; i++) { int c = s.charAt(i); if ((c >= 0x0001) && (c <= 0x007F)) { l++; } else if (c > 0x07FF) { l += 3; } else { l += 2; } } return l; } /** * Using a Reader and a Writer, returns a String from an InputStream. */ public static String inputStreamToString(InputStream x, int length) throws IOException { InputStreamReader in = new InputStreamReader(x); StringWriter writer = new StringWriter(); int blocksize = 8 * 1024; char[] buffer = new char[blocksize]; for (int left = length; left > 0; ) { int read = in.read(buffer, 0, left > blocksize ? blocksize : left); if (read == -1) { break; } writer.write(buffer, 0, read); left -= read; } writer.close(); return writer.toString(); } // fredt@users 20020130 - patch 497872 by Nitin Chauhan - use byte[] of exact size /** * Returns the quoted version of the string using the quotechar argument. * doublequote argument indicates whether each instance of quotechar * inside the string is doubled.

    * * null string argument returns null. If the caller needs the literal * "NULL" it should created it itself

    * * The reverse conversion is handled in Tokenizer.java */ public static String toQuotedString(String s, char quoteChar, boolean extraQuote) { if (s == null) { return null; } int count = extraQuote ? count(s, quoteChar) : 0; int len = s.length(); char[] b = new char[2 + count + len]; int i = 0; int j = 0; b[j++] = quoteChar; for (; i < len; i++) { char c = s.charAt(i); b[j++] = c; if (extraQuote && c == quoteChar) { b[j++] = c; } } b[j] = quoteChar; return new String(b); } /** * Counts Character c in String s * * @param String s * * @return int count */ static int count(final String s, final char c) { int pos = 0; int count = 0; if (s != null) { while ((pos = s.indexOf(c, pos)) > -1) { count++; pos++; } } return count; } } hsqldb-1.8.0.10.orig/src/org/hsqldb/lib/HsqlArrayHeap.java0000644000175000017500000002520710416742474021606 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.lib; /** * An HsqlHeap implementation backed by an array of objects and an * {@link ObjectComparator ObjectComparator}. This implementation * is non-blocking, dynamically resizing and thread-safe. * * @author boucherb@users * @version 1.7.2 * @since 1.7.2 */ public class HsqlArrayHeap implements HsqlHeap { // --------------------------------- members ----------------------------------- protected ObjectComparator oc; protected int count; protected Object[] heap; // ------------------------------ constructors --------------------------------- /** * Creates a new HsqlArrayHeap with the given initial capacity, using * the specified ObjectComparator to maintain the heap invariant. * * @exception IllegalArgumentException if capacity less or equal to zero * or comparator is null */ public HsqlArrayHeap(int capacity, ObjectComparator comparator) throws IllegalArgumentException { if (capacity <= 0) { throw new IllegalArgumentException("" + capacity); } if (comparator == null) { throw new IllegalArgumentException("null comparator"); } heap = new Object[capacity]; oc = comparator; } // /** Copy constructor (optional) */ // public HsqlArrayHeap(HsqlArrayHeap other) { // count = other.count; // oc = other.oc; // heap = new Object[count]; // System.arraycopy(other.heap,0, heap, 0, count); // } // -------------------------- interface Implementation ------------------------- public synchronized void clear() { for (int i = 0; i < count; ++i) { heap[i] = null; } count = 0; } public synchronized void add(Object o) throws IllegalArgumentException, RuntimeException { int ci; // current index int pi; // parent index if (o == null) { throw new IllegalArgumentException("null element"); } if (isFull()) { throw new RuntimeException("full"); } if (count >= heap.length) { increaseCapacity(); } ci = count; count++; do { if (ci <= 0) { break; } pi = (ci - 1) >> 1; try { if (oc.compare(o, heap[pi]) >= 0) { break; } } catch (Exception e) { throw new IllegalArgumentException(e.toString()); } heap[ci] = heap[pi]; ci = pi; } while (true); heap[ci] = o; } public synchronized boolean isEmpty() { return count == 0; } public synchronized boolean isFull() { // almost impossible for this to happen return count == Integer.MAX_VALUE; } public synchronized Object peek() { return heap[0]; } public synchronized Object remove() { int ci; // current index int li; // left index int ri; // right index int chi; // child index Object co; Object ro; if (count == 0) { return null; } ci = 0; ro = heap[ci]; count--; if (count == 0) { heap[0] = null; return ro; } co = heap[count]; heap[count] = null; do { li = (ci << 1) + 1; if (li >= count) { break; } ri = (ci << 1) + 2; chi = (ri >= count || oc.compare(heap[li], heap[ri]) < 0) ? li : ri; if (oc.compare(co, heap[chi]) <= 0) { break; } heap[ci] = heap[chi]; ci = chi; } while (true); heap[ci] = co; return ro; } public synchronized int size() { return count; } // ------------- standard object and collection methods (optional) ------------- // public synchronized Object clone() throws CloneNotSupportedException { // return new HsqlArrayHeap(this); // } // // public synchronized java.util.Enumeration elements() { // // Object[] elements; // // elements = new Object[count]; // // System.arraycopy(heap, 0, elements, 0, count); // // return new HsqlEnumeration(elements); // } // // public synchronized boolean equals(Object o) { // // HsqlArrayHeap other; // HsqlArrayHeap thiscopy; // HsqlArrayHeap othercopy; // // if (this == o) { // return true; // } // // if (!(o instanceof HsqlArrayHeap)) { // return false; // } // // other = (HsqlArrayHeap) o; // // if (count != other.size()) { // return false; // } // // // this is a bit "iffy"... non-equal comparators _might_ still // // be _equivalent_ under current element content... // // if (!oc.equals(other.oc)) { // return false; // } // // thiscopy = new HsqlArrayHeap(this); // othercopy = new HsqlArrayHeap(other); // // while(!thiscopy.isEmpty()) { // if (!thiscopy.remove().equals(othercopy.remove())) { // return false; // } // } // // return true; // } // // public synchronized Object[] toArray(Object a[]) { // // if (a == null) { // a = new Object[count]; // } else if ( a.length < count) { // a = (Object[]) java.lang.reflect.Array.newInstance( // a.getClass().getComponentType(), count); // } // // System.arraycopy(heap, 0, a, 0, count); // // for (int i = count; i < a.length; i++) { // a[i] = null; // } // // return a; // } // public synchronized String toString() { StringBuffer sb = new StringBuffer(); sb.append(super.toString()); sb.append(" : size="); sb.append(count); sb.append(' '); sb.append('['); for (int i = 0; i < count; i++) { sb.append(heap[i]); if (i + 1 < count) { sb.append(','); sb.append(' '); } } sb.append(']'); return sb.toString(); } // // public void trim() { // // Object[] oldheap; // // oldheap = heap; // // heap = new Object[count == 0 ? 16 : count]; // // System.arraycopy(oldheap, 0, heap, 0, count); // } // -------------------- internal implementation methods ------------------------ private void increaseCapacity() { Object[] oldheap; // no handling of boundary conditions. // In the highly unlikely event of a rollover, // in theory, an exception will be thrown (negative array index in // array allocation?) oldheap = heap; // as per java collections, v.s. JDK 1.1 java util. heap = new Object[3 * heap.length / 2 + 1]; System.arraycopy(oldheap, 0, heap, 0, count); } // ------------------------------- tests --------------------------------------- // public static void main(String[] args) { // // ObjectComparator oc = new ObjectComparator() { // // public int compare(Object a, Object b) { // // if (a == b) { // return 0; // } // // // null==null and smaller than any value // if (a == null) { // if (b == null) { // return 0; // } // // return -1; // } // // if (b == null) { // return 1; // } // // return ((Integer) a).intValue() - ((Integer) b).intValue(); // } // }; // HsqlHeap ah = new HsqlArrayHeap(6, oc); // // System.out.println("isEmpty() : " + ah.isEmpty()); // // int[] ai = new int[] { // 3, 99, 7, 9, -42, 2, 1, 23, -7 // }; // int least = Integer.MIN_VALUE; // // for (int i = 0; i < ai.length; i++) { // System.out.println("add() : new Integer(" + ai[i] + ")"); // ah.add(new Integer(ai[i])); // System.out.println("size() : " + ah.size()); // } // // while (ah.size() > 0) { // int current = ((Integer) ah.remove()).intValue(); // // if (current < least) { // throw new RuntimeException("bad heap invariant"); // } // // least = current; // // System.out.println("remove() : " + current); // System.out.println("size() : " + ah.size()); // } // // System.out.println("peak() : " + ah.peek()); // System.out.println("isEmpty() : " + ah.isEmpty()); // System.out.println("remove() : " + ah.remove()); // System.out.println("size() : " + ah.size()); // System.out.println("isEmpty() : " + ah.isEmpty()); // } } hsqldb-1.8.0.10.orig/src/org/hsqldb/lib/HsqlList.java0000644000175000017500000000415410416742474020643 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.lib; /** * This should be used as the datatype for parameters and instance variables * instead of HsqlArrayList or HsqlLinkedList to allow interchangable use of the * two. * * @author dnordahl@users * @version 1.7.2 * @since 1.7.2 */ public interface HsqlList extends Collection { void add(int index, Object element); boolean add(Object element); Object get(int index); Object remove(int index); Object set(int index, Object element); boolean isEmpty(); int size(); Iterator iterator(); } hsqldb-1.8.0.10.orig/src/org/hsqldb/lib/HsqlTaskQueue.java0000644000175000017500000001116510416742474021637 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.lib; /** * Provides very simple queued execution of Runnable objects in a background * thread. The underlying queue is an HsqlDeque instance, an array-based * circular queue implementation with automatic capacity expansion. * * @author boucherb@users * @version 1.7.2 * @since 1.7.2 */ public class HsqlTaskQueue { /** The thread used to process commands */ protected Thread taskRunnerThread; /** Special queue element to signal termination */ protected static final Runnable SHUTDOWNTASK = new Runnable() { public void run() {} }; /** * true if thread should shut down after processing current task. * * Once set true, stays true forever */ protected volatile boolean isShutdown; public synchronized Thread getTaskRunnerThread() { return taskRunnerThread; } protected synchronized void clearThread() { taskRunnerThread = null; } protected final HsqlDeque queue = new HsqlDeque(); protected class TaskRunner implements Runnable { public void run() { Runnable task; try { while (!isShutdown) { synchronized (queue) { task = (Runnable) queue.getFirst(); } if (task == SHUTDOWNTASK) { isShutdown = true; synchronized (queue) { queue.clear(); } break; } else if (task != null) { task.run(); task = null; } else { break; } } } finally { clearThread(); } } } protected final TaskRunner taskRunner = new TaskRunner(); public HsqlTaskQueue() {} public boolean isShutdown() { return isShutdown; } public synchronized void restart() { if (taskRunnerThread == null &&!isShutdown) { taskRunnerThread = new Thread(taskRunner); taskRunnerThread.start(); } } public void execute(Runnable command) throws RuntimeException { if (!isShutdown) { synchronized (queue) { queue.addLast(command); } restart(); } } public synchronized void shutdownAfterQueued() { if (!isShutdown) { synchronized (queue) { queue.addLast(SHUTDOWNTASK); } } } public synchronized void shutdownAfterCurrent() { isShutdown = true; synchronized (queue) { queue.clear(); queue.addLast(SHUTDOWNTASK); } } public synchronized void shutdownImmediately() { isShutdown = true; if (taskRunnerThread != null) { taskRunnerThread.interrupt(); } synchronized (queue) { queue.clear(); queue.addLast(SHUTDOWNTASK); } } } hsqldb-1.8.0.10.orig/src/org/hsqldb/lib/HsqlArrayList.java0000644000175000017500000002550610416742474021646 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.lib; import java.lang.reflect.Array; // fredt@users - 1.8.0 - enhancements /** * Intended as an asynchronous alternative to Vector. Use HsqlLinkedList * instead if its better suited. * * @author dnordahl@users * @version 1.8.0 * @since 1.7.0 */ public class HsqlArrayList extends BaseList implements HsqlList { //fredt@users /* private static Reporter reporter = new Reporter(); private static class Reporter { private static int initCounter = 0; private static int updateCounter = 0; Reporter() { try { System.runFinalizersOnExit(true); } catch (SecurityException e) {} } protected void finalize() { System.out.println("HsqlArrayList init count: " + initCounter); System.out.println("HsqlArrayList update count: " + updateCounter); } } */ private static final int DEFAULT_INITIAL_CAPACITY = 10; private static final float DEFAULT_RESIZE_FACTOR = 2.0f; private Object[] elementData; private boolean minimizeOnClear; /** Creates a new instance of HsqlArrayList */ public HsqlArrayList() { // reporter.initCounter++; elementData = new Object[DEFAULT_INITIAL_CAPACITY]; } /** * Creates a new instance of HsqlArrayList that minimizes the size when * empty */ public HsqlArrayList(boolean minimize) { // reporter.initCounter++; elementData = new Object[DEFAULT_INITIAL_CAPACITY]; minimizeOnClear = minimize; } /** Creates a new instance with the given initial capacity */ public HsqlArrayList(int initialCapacity) { // reporter.initCounter++; if (initialCapacity < 0) { throw new NegativeArraySizeException( "Invalid initial capacity given"); } if (initialCapacity == 0) { elementData = new Object[1]; } else { elementData = new Object[initialCapacity]; } } /** Inserts an element at the given index */ public void add(int index, Object element) { // reporter.updateCounter++; if (index > elementCount) { throw new IndexOutOfBoundsException("Index out of bounds: " + index + ">" + elementCount); } if (index < 0) { throw new IndexOutOfBoundsException("Index out of bounds: " + index + " < 0"); } if (elementCount >= elementData.length) { increaseCapacity(); } for (int i = elementCount; i > index; i--) { elementData[i] = elementData[i - 1]; } elementData[index] = element; elementCount++; } /** Appends an element to the end of the list */ public boolean add(Object element) { // reporter.updateCounter++; if (elementCount >= elementData.length) { increaseCapacity(); } elementData[elementCount] = element; elementCount++; return true; } /** Gets the element at given position */ public Object get(int index) { if (index >= elementCount) { throw new IndexOutOfBoundsException("Index out of bounds: " + index + " >= " + elementCount); } if (index < 0) { throw new IndexOutOfBoundsException("Index out of bounds: " + index + " < 0"); } return elementData[index]; } /** returns the index of given object or -1 if nt found */ public int indexOf(Object o) { for (int i = 0; i < elementCount; i++) { if (elementData[i].equals(o)) { return i; } } return -1; } /** Removes and returns the element at given position */ public Object remove(int index) { if (index >= elementCount) { throw new IndexOutOfBoundsException("Index out of bounds: " + index + " >= " + elementCount); } if (index < 0) { throw new IndexOutOfBoundsException("Index out of bounds: " + index + " < 0"); } Object removedObj = elementData[index]; for (int i = index; i < elementCount - 1; i++) { elementData[i] = elementData[i + 1]; } elementCount--; elementData[elementCount] = null; if (minimizeOnClear && elementCount == 0) { elementData = new Object[DEFAULT_INITIAL_CAPACITY]; } return removedObj; } /** Replaces the element at given position */ public Object set(int index, Object element) { if (index >= elementCount) { throw new IndexOutOfBoundsException("Index out of bounds: " + index + " >= " + elementCount); } if (index < 0) { throw new IndexOutOfBoundsException("Index out of bounds: " + index + " < 0"); } Object replacedObj = elementData[index]; elementData[index] = element; return replacedObj; } /** Returns the number of elements in the array list */ public final int size() { return elementCount; } private void increaseCapacity() { int baseSize = elementData.length == 0 ? 1 : elementData.length; Object[] newArray = new Object[(int) (baseSize * DEFAULT_RESIZE_FACTOR)]; System.arraycopy(elementData, 0, newArray, 0, elementData.length); elementData = newArray; newArray = null; } /** * Returns an Enumeration of the elements of the list. The Enumerator will * NOT throw a concurrent modification exception if the list is modified * during the enumeration. */ /* public Enumeration elements() { Enumeration en = new Enumeration() { private int pos = 0; public Object nextElement() { if (!hasMoreElements()) { throw new NoSuchElementException("Enumeration complete"); } pos++; return elementData[pos - 1]; } public boolean hasMoreElements() { return (pos < elementCount); } }; return en; } */ /** Trims the array to be the same size as the number of elements. */ public void trim() { // 0 size array is possible Object[] newArray = new Object[elementCount]; System.arraycopy(elementData, 0, newArray, 0, elementCount); elementData = newArray; newArray = null; } // fredt@users public void clear() { if (minimizeOnClear && elementData.length > DEFAULT_INITIAL_CAPACITY) { elementData = new Object[DEFAULT_INITIAL_CAPACITY]; elementCount = 0; return; } for (int i = 0; i < elementCount; i++) { elementData[i] = null; } elementCount = 0; } public void setSize(int newSize) { if (newSize < elementCount) { if (minimizeOnClear && newSize == 0 && elementData.length > DEFAULT_INITIAL_CAPACITY) { elementData = new Object[DEFAULT_INITIAL_CAPACITY]; elementCount = 0; return; } for (int i = newSize; i < elementCount; i++) { elementData[i] = null; } } elementCount = newSize; for (; elementCount > elementData.length; ) { increaseCapacity(); } } // fredt@users public Object[] toArray() { Object[] a = new Object[elementCount]; System.arraycopy(elementData, 0, a, 0, elementCount); return a; } public Object[] toArray(int start, int limit) { Object[] a = new Object[elementCount - limit]; System.arraycopy(elementData, start, a, 0, elementCount - limit); return a; } /** * Copies all elements of the list to a[]. It is assumed a[] is of the * correct type. If a[] is too small, a new array or the same type is * returned. If a[] is larger, only the list elements are copied and no * other change is made to the array. * Differs from the implementation in java.util.ArrayList in the second * aspect. */ public Object toArray(Object a) { if (Array.getLength(a) < elementCount) { a = Array.newInstance(a.getClass().getComponentType(), elementCount); } System.arraycopy(elementData, 0, a, 0, elementCount); return a; } public void sort(ObjectComparator c) { if (elementCount < 2) { return; } Sort.sort(elementData, c, 0, elementCount - 1); } public Object[] getArray() { return elementData; } } hsqldb-1.8.0.10.orig/src/org/hsqldb/lib/HsqlHeap.java0000644000175000017500000000721110416742474020602 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.lib; /** * Provides the base HSQLDB interface for Heap ADT implementations.

    * * In this context, a Heap is simply a collection-like ADT that allows addition * of elements and provides a way to remove the least element, given some * implementation-dependent strategy for imposing an order over its * elements.

    * * Typically, an HsqlHeap will be implemented as a tree-like structure that * recursively guarantees a Heap Invariant, such that all nodes below * the root are greater than the root, given some comparison stragegy.

    * This in turn provides the basis for an efficient implementation of ADTs such * PriorityQueue, since Heap operations using the typical implementation are, * in theory, guaranteed to be O(log n). * * @author boucherb@users * @version 1.7.2 * @since 1.7.2 */ public interface HsqlHeap { /** * Removes all of the elements from this Heap. */ void clear(); /** * Retrieves whether this Heap is empty. */ boolean isEmpty(); /** * Retrieves whether this Heap is full. */ boolean isFull(); /** * Adds the specified element to this Heap. * * @param o The element to add * @throws IllegalArgumentException if the implementation does * not accept elements of the supplied type (optional) * throws RuntimeException if the implementation * dictates that this Heap is not currently accepting additions * or that this Heap is currently full (optional) */ void add(Object o) throws IllegalArgumentException, RuntimeException; /** * Retrieves the least element from this Heap, without removing it. * * @return the least element from this Heap */ Object peek(); /** * Retrieves the least element from this Heap, removing it in the process. * * @return the least element from this Heap */ Object remove(); /** * Retrieves the number of elements currently in this Heap. * * @return the number of elements currently in this Heap */ int size(); } hsqldb-1.8.0.10.orig/src/org/hsqldb/lib/WrapperIterator.java0000644000175000017500000001323710416742475022235 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.lib; import java.util.NoSuchElementException; /** * An Iterator that returns the elements of a specified array, or other * iterators etc. The collection of objects returned depends on the * constructor used.

    * * Based on similar Enumerator code by boucherb@users * * @author fred@users * @version 1.7.2 * @since HSQLDB 1.7.2 */ public class WrapperIterator implements Iterator { private static final Object[] emptyelements = new Object[0]; private Object[] elements; private int i; // chained iterators private boolean chained; private Iterator it1; private Iterator it2; /** return only not null elements */ private boolean notNull; /** * Constructor for an empty iterator.

    */ public WrapperIterator() { this.elements = emptyelements; } /** * Constructor for all elements of the specified array.

    * * @param elements the array of objects to enumerate */ public WrapperIterator(Object[] elements) { this.elements = elements; } /** * Constructor for not-null elements of specified array.

    * * @param elements the array of objects to iterate */ public WrapperIterator(Object[] elements, boolean notNull) { this.elements = elements; this.notNull = notNull; } /** * Constructor for a singleton object iterator * * @param element the single object to iterate */ public WrapperIterator(Object element) { this.elements = new Object[]{ element }; } /** * Constructor for a chained iterator that retuns the elements of the two * specified iterators. * * @param element the single object to iterate */ public WrapperIterator(Iterator it1, Iterator it2) { this.it1 = it1; this.it2 = it2; chained = true; } /** * Tests if this iterator contains more elements.

    * * @return true if this iterator contains more elements; * false otherwise. */ public boolean hasNext() { // for chained iterators if (chained) { if (it1 == null) { if (it2 == null) { return false; } if (it2.hasNext()) { return true; } it2 = null; return false; } else { if (it1.hasNext()) { return true; } it1 = null; return hasNext(); } } // for other interators if (elements == null) { return false; } for (; notNull && i < elements.length && elements[i] == null; i++) {} if (i < elements.length) { return true; } else { // release elements for garbage collection elements = null; return false; } } /** * Returns the next element. * * @return the next element * @throws NoSuchElementException if there is no next element */ public Object next() { // for chained iterators if (chained) { if (it1 == null) { if (it2 == null) { throw new NoSuchElementException(); } if (it2.hasNext()) { return it2.next(); } it2 = null; next(); } else { if (it1.hasNext()) { return it1.next(); } it1 = null; next(); } } // for other itertors if (hasNext()) { return elements[i++]; } throw new NoSuchElementException(); } public int nextInt() { throw new NoSuchElementException(); } public long nextLong() { throw new NoSuchElementException(); } public void remove() { throw new NoSuchElementException(); } } hsqldb-1.8.0.10.orig/src/org/hsqldb/lib/StringUtil.java0000644000175000017500000002371710416742475021213 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.lib; import java.lang.reflect.Array; /** Provides a collection of convenience methods for processing and * creating objects with String value components. * * @author fredt@users * @author boucherb@users * @version 1.7.2 * @since 1.7.0 */ public class StringUtil { /** * Returns a string with non alphanumeric chars converted to the * substitute character. A digit first character is also converted. * By sqlbob@users * @param source string to convert * @param substitute character to use * @return converted string */ public static String toLowerSubset(String source, char substitute) { int len = source.length(); StringBuffer src = new StringBuffer(len); char ch; for (int i = 0; i < len; i++) { ch = source.charAt(i); if (!Character.isLetterOrDigit(ch)) { src.append(substitute); } else if ((i == 0) && Character.isDigit(ch)) { src.append(substitute); } else { src.append(Character.toLowerCase(ch)); } } return src.toString(); } /** * Builds a bracketed CSV list from the array * @param array an array of Objects * @return string */ public static String arrayToString(Object array) { int len = Array.getLength(array); int last = len - 1; StringBuffer sb = new StringBuffer(2 * (len + 1)); sb.append('{'); for (int i = 0; i < len; i++) { sb.append(Array.get(array, i)); if (i != last) { sb.append(','); } } sb.append('}'); return sb.toString(); } /** * Builds a CSV list from the specified String[], separator string and * quote string.

    * *

      *
    • All arguments are assumed to be non-null. *
    • Separates each list element with the value of the * separator argument. *
    • Prepends and appends each element with the value of the * quote argument. *
    • No attempt is made to escape the quote character sequence if it is * found internal to a list element. *
        * @return a CSV list * @param separator the String to use as the list element separator * @param quote the String with which to quote the list elements * @param s array of String objects */ public static String getList(String[] s, String separator, String quote) { int len = s.length; StringBuffer b = new StringBuffer(len * 16); for (int i = 0; i < len; i++) { b.append(quote); b.append(s[i]); b.append(quote); if (i + 1 < len) { b.append(separator); } } return b.toString(); } public static String getList(Object[] s, String separator, String quote) { int len = s.length; StringBuffer b = new StringBuffer(len * 16); for (int i = 0; i < len; i++) { b.append(quote); b.append(s[i]); b.append(quote); if (i + 1 < len) { b.append(separator); } } return b.toString(); } /** * Builds a CSV list from the specified int[], separator * String and quote String.

        * *

          *
        • All arguments are assumed to be non-null. *
        • Separates each list element with the value of the * separator argument. *
        • Prepends and appends each element with the value of the * quote argument. *
            * @return a CSV list * @param s the array of int values * @param separator the String to use as the separator * @param quote the String with which to quote the list elements */ public static String getList(int[] s, String separator, String quote) { int len = s.length; StringBuffer b = new StringBuffer(len * 8); for (int i = 0; i < len; i++) { b.append(quote); b.append(s[i]); b.append(quote); if (i + 1 < len) { b.append(separator); } } return b.toString(); } /** * Builds a CSV list from the specified String[][], separator string and * quote string.

            * *

              *
            • All arguments are assumed to be non-null. *
            • Uses only the first element in each subarray. *
            • Separates each list element with the value of the * separator argument. *
            • Prepends and appends each element with the value of the * quote argument. *
            • No attempt is made to escape the quote character sequence if it is * found internal to a list element. *
                * @return a CSV list * @param separator the String to use as the list element separator * @param quote the String with which to quote the list elements * @param s the array of String array objects */ public static String getList(String[][] s, String separator, String quote) { int len = s.length; StringBuffer b = new StringBuffer(len * 16); for (int i = 0; i < len; i++) { b.append(quote); b.append(s[i][0]); b.append(quote); if (i + 1 < len) { b.append(separator); } } return b.toString(); } /** * Appends a pair of string to the string buffer, using the separator between * and terminator at the end * @param b the buffer * @param s1 first string * @param s2 second string * @param separator separator string * @param terminator terminator string */ public static void appendPair(StringBuffer b, String s1, String s2, String separator, String terminator) { b.append(s1); b.append(separator); b.append(s2); b.append(terminator); } /** * Checks if text is empty (characters <= space) * @author: Nitin Chauhan * @return boolean true if text is null or empty, false otherwise * @param s java.lang.String */ public static boolean isEmpty(String s) { int i = s == null ? 0 : s.length(); while (i > 0) { if (s.charAt(--i) > ' ') { return false; } } return true; } /** * Returns the size of substring that does not contain ane trailing spaces * @param s the string * @return trimmed size */ public static int rTrimSize(String s) { int i = s.length(); while (i > 0) { i--; if (s.charAt(i) != ' ') { return i + 1; } } return 0; } /** * Skips any spaces at or after start and returns the index of first * non-space character; * @param s the string * @param start index to start * @return index of first non-space */ public static int skipSpaces(String s, int start) { int limit = s.length(); int i = start; for (; i < limit; i++) { if (s.charAt(i) != ' ') { break; } } return i; } /** * Splits the string into an array, using the separator. If separator is * not found in the string, the whole string is returned in the array. * * @param s the string * @param separator the separator * @return array of strings */ public static String[] split(String s, String separator) { HsqlArrayList list = new HsqlArrayList(); int currindex = 0; for (boolean more = true; more; ) { int nextindex = s.indexOf(separator, currindex); if (nextindex == -1) { nextindex = s.length(); more = false; } list.add(s.substring(currindex, nextindex)); currindex = nextindex + separator.length(); } return (String[]) list.toArray(new String[list.size()]); } } hsqldb-1.8.0.10.orig/src/org/hsqldb/lib/ObjectComparator.java0000644000175000017500000000334710416742474022341 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.lib; /** * * @author fredt@users * @version 1.7.2 * @since 1.7.2 */ public interface ObjectComparator { int compare(Object a, Object b); } hsqldb-1.8.0.10.orig/src/org/hsqldb/lib/DoubleIntIndex.java0000644000175000017500000003732210416742474021760 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.lib; import java.util.NoSuchElementException; /** * Maintains an ordered integer->integer lookup table, consisting of two * columns, one for keys, the other for values. * * The table is sorted on either the key or value column, depending on the calls to * setKeysSearchTarget() or setValuesSearchTarget(). By default, the table is * sorted on values.

                * * findXXX() methods return the array index into the list * pair containing a matching key or value, or or -1 if not found.

                * * Sorting methods originally contributed by Tony Lai. * * @author fredt@users * @version 1.8.0 * @since 1.8.0 */ public class DoubleIntIndex implements IntLookup { private int count = 0; private int capacity; private boolean sorted = true; private boolean sortOnValues = true; private boolean hasChanged; private final boolean fixedSize; private int[] keys; private int[] values; // private int targetSearchValue; public DoubleIntIndex(int capacity, boolean fixedSize) { this.capacity = capacity; keys = new int[capacity]; values = new int[capacity]; this.fixedSize = fixedSize; hasChanged = true; } public synchronized int getKey(int i) { if (i < 0 || i >= count) { throw new IndexOutOfBoundsException(); } return keys[i]; } public synchronized int getValue(int i) { if (i < 0 || i >= count) { throw new IndexOutOfBoundsException(); } return values[i]; } /** * Modifies an existing pair. * @param i the index * @param key the key */ public synchronized void setKey(int i, int key) { if (i < 0 || i >= count) { throw new IndexOutOfBoundsException(); } if (!sortOnValues) { sorted = false; } keys[i] = key; } /** * Modifies an existing pair. * @param i the index * @param value the value */ public synchronized void setValue(int i, int value) { if (i < 0 || i >= count) { throw new IndexOutOfBoundsException(); } if (sortOnValues) { sorted = false; } values[i] = value; } public synchronized int size() { return count; } public synchronized int capacity() { return capacity; } /** * Adds a pair into the table. * * @param key the key * @param value the value * @return true or false depending on success */ public synchronized boolean addUnsorted(int key, int value) { if (count == capacity) { if (fixedSize) { return false; } else { doubleCapacity(); } } if (sorted && count != 0) { if (sortOnValues) { if (value < values[count - 1]) { sorted = false; } } else { if (value < keys[count - 1]) { sorted = false; } } } hasChanged = true; keys[count] = key; values[count] = value; count++; return true; } /** * Adds a key, value pair into the table with the guarantee that the key * is equal or larger than the largest existing key. This prevents a sort * from taking place on next call to find() * * @param key the key * @param value the value * @return true or false depending on success */ public synchronized boolean addSorted(int key, int value) { if (count == capacity) { if (fixedSize) { return false; } else { doubleCapacity(); } } if (count != 0 && value < values[count - 1]) { return false; } hasChanged = true; keys[count] = key; values[count] = value; count++; return true; } /** * Adds a pair, ensuring no duplicate key xor value already exists in the * current search target column. * @param key the key * @param value the value * @return true or false depending on success */ public synchronized boolean addUnique(int key, int value) { if (count == capacity) { if (fixedSize) { return false; } else { doubleCapacity(); } } if (!sorted) { fastQuickSort(); } targetSearchValue = sortOnValues ? value : key; int i = binaryEmptySlotSearch(); if (i == -1) { return false; } hasChanged = true; if (count != i) { moveRows(i, i + 1, count - i); } keys[i] = key; values[i] = value; count++; return true; } /** * Adds a pair, maintaining sorted order * current search target column. * @param key the key * @param value the value * @return true or false depending on success */ public synchronized boolean add(int key, int value) { if (count == capacity) { if (fixedSize) { return false; } else { doubleCapacity(); } } if (!sorted) { fastQuickSort(); } targetSearchValue = sortOnValues ? value : key; int i = binarySlotSearch(); if (i == -1) { return false; } hasChanged = true; if (count != i) { moveRows(i, i + 1, count - i); } keys[i] = key; values[i] = value; count++; return true; } public int lookupFirstEqual(int key) throws NoSuchElementException { if (sortOnValues) { sorted = false; sortOnValues = false; } int i = findFirstEqualKeyIndex(key); if (i == -1) { throw new NoSuchElementException(); } return getValue(i); } public int lookupFirstGreaterEqual(int key) throws NoSuchElementException { if (sortOnValues) { sorted = false; sortOnValues = false; } int i = findFirstGreaterEqualKeyIndex(key); if (i == -1) { throw new NoSuchElementException(); } return getValue(i); } public synchronized void setValuesSearchTarget() { if (!sortOnValues) { sorted = false; } sortOnValues = true; } public synchronized void setKeysSearchTarget() { if (sortOnValues) { sorted = false; } sortOnValues = false; } /** * @param value the value * @return the index */ public synchronized int findFirstGreaterEqualKeyIndex(int value) { int index = findFirstGreaterEqualSlotIndex(value); return index == count ? -1 : index; } /** * @param value the value * @return the index */ public synchronized int findFirstEqualKeyIndex(int value) { if (!sorted) { fastQuickSort(); } targetSearchValue = value; return binaryFirstSearch(); } /** * This method is similar to findFirstGreaterEqualKeyIndex(int) but * returns the index of the empty row past the end of the array if * the search value is larger than all the values / keys in the searched * column. * @param value the value * @return the index */ public synchronized int findFirstGreaterEqualSlotIndex(int value) { if (!sorted) { fastQuickSort(); } targetSearchValue = value; return binarySlotSearch(); } /** * Returns the index of the lowest element == the given search target, * or -1 * @return index or -1 if not found */ private int binaryFirstSearch() { int low = 0; int high = count; int mid = 0; int compare = 0; int found = count; while (low < high) { mid = (low + high) / 2; compare = compare(mid); if (compare < 0) { high = mid; } else if (compare > 0) { low = mid + 1; } else { high = mid; found = mid; } } return found == count ? -1 : found; } /** * Returns the index of the lowest element > the given search target * @return the index */ private int binaryGreaterSearch() { int low = 0; int high = count; int mid = 0; int compare = 0; while (low < high) { mid = (low + high) / 2; compare = compare(mid); if (compare < 0) { high = mid; } else { low = mid + 1; } } return low == count ? -1 : low; } /** * Returns the index of the lowest element >= the given search target, * or count * @return the index */ private int binarySlotSearch() { int low = 0; int high = count; int mid = 0; int compare = 0; while (low < high) { mid = (low + high) / 2; compare = compare(mid); if (compare <= 0) { high = mid; } else { low = mid + 1; } } return low; } /** * Returns the index of the lowest element > the given search target * or count or -1 if target is found * @return the index */ private int binaryEmptySlotSearch() { int low = 0; int high = count; int mid = 0; int compare = 0; while (low < high) { mid = (low + high) / 2; compare = compare(mid); if (compare < 0) { high = mid; } else if (compare > 0) { low = mid + 1; } else { return -1; } } return low; } private synchronized void fastQuickSort() { quickSort(0, count - 1); insertionSort(0, count - 1); sorted = true; } private void quickSort(int l, int r) { int M = 4; int i; int j; int v; if ((r - l) > M) { i = (r + l) / 2; if (lessThan(i, l)) { swap(l, i); // Tri-Median Methode! } if (lessThan(r, l)) { swap(l, r); } if (lessThan(r, i)) { swap(i, r); } j = r - 1; swap(i, j); i = l; v = j; for (;;) { while (lessThan(++i, v)) {} while (lessThan(v, --j)) {} if (j < i) { break; } swap(i, j); } swap(i, r - 1); quickSort(l, j); quickSort(i + 1, r); } } private void insertionSort(int lo0, int hi0) { int i; int j; for (i = lo0 + 1; i <= hi0; i++) { j = i; while ((j > lo0) && lessThan(i, j - 1)) { j--; } if (i != j) { moveAndInsertRow(i, j); } } } private void moveAndInsertRow(int i, int j) { int col1 = keys[i]; int col2 = values[i]; moveRows(j, j + 1, i - j); keys[j] = col1; values[j] = col2; } private void doubleCapacity() { keys = (int[]) ArrayUtil.resizeArray(keys, capacity * 2); values = (int[]) ArrayUtil.resizeArray(values, capacity * 2); capacity *= 2; } private void swap(int i1, int i2) { int col1 = keys[i1]; int col2 = values[i1]; keys[i1] = keys[i2]; values[i1] = values[i2]; keys[i2] = col1; values[i2] = col2; } private void moveRows(int fromIndex, int toIndex, int rows) { System.arraycopy(keys, fromIndex, keys, toIndex, rows); System.arraycopy(values, fromIndex, values, toIndex, rows); } public void removeRange(int start, int limit) { moveRows(limit, start, count - limit); count -= (limit - start); } public void removeAll() { hasChanged = true; ArrayUtil.clearArray(ArrayUtil.CLASS_CODE_INT, keys, 0, count); ArrayUtil.clearArray(ArrayUtil.CLASS_CODE_INT, values, 0, count); count = 0; } /** * Check if targeted column value in the row indexed i is less than the * search target object. * @param i the index * @return -1, 0 or +1 */ private int compare(int i) { if (sortOnValues) { if (targetSearchValue > values[i]) { return 1; } else if (targetSearchValue < values[i]) { return -1; } } else { if (targetSearchValue > keys[i]) { return 1; } else if (targetSearchValue < keys[i]) { return -1; } } return 0; } public final synchronized void remove(int position) { hasChanged = true; moveRows(position + 1, position, count - position - 1); count--; keys[count] = 0; values[count] = 0; } /** * Check if row indexed i is less than row indexed j * @param i the first index * @param j the second index * @return true or false */ private boolean lessThan(int i, int j) { if (sortOnValues) { if (values[i] < values[j]) { return true; } } else { if (keys[i] < keys[j]) { return true; } } return false; } } hsqldb-1.8.0.10.orig/src/org/hsqldb/lib/HsqlLinkedList.java0000644000175000017500000001747510416742474022004 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.lib; /** * Intended as an asynchronous alternative to HsqlArrayList. Use HsqlArrayList if * the list won't be initialized sequentially and if frequent references to * specific element positions will be made. * * @author jcpeck@users * @version 1.7.2 * @since 1.7.2 */ public class HsqlLinkedList extends BaseList implements HsqlList { /** * A reference to the head of the list. It is a dummy head (that is, the * Node for index 0 is actually first.next). */ private Node first; /** A reference to the tail of the list */ private Node last; /** * Creates a new instance of HsqlLinkedList. */ public HsqlLinkedList() { first = new Node(null, null); last = first; elementCount = 0; } /** * Inserts element at index. * @throws IndexOutOfBoundsException if index < 0 or is > * size. */ public void add(int index, Object element) { if (index == size()) { add(element); //Add to the end of this. } //If index > size() an exception should be thrown with a slightly //different message than the exception thrown by getInternal. else if (index > size()) { throw new IndexOutOfBoundsException("Index out of bounds: " + index + " > " + size()); } else { Node current = getInternal(index); Node newNext = new Node(current.data, current.next); current.data = element; current.next = newNext; elementCount++; //If they inserted at the last valid index, then a new last element //was created, therfore update the last pointer if (last == current) { last = newNext; } } } /** * Appends element to the end of this list. * @return true */ public boolean add(Object element) { last.next = new Node(element, null); last = last.next; elementCount++; return true; } public void clear() { first.next = null; } /** * Gets the element at given position * @throws IndexOutOfBoundsException if index is not valid * index within the list (0 <= index < * size). */ public Object get(int index) { return getInternal(index).data; } /** * Removes and returns the element at index. * @throws IndexOutOfBoundsException if index is not valid * index within the list (0 <= index < * size). */ public Object remove(int index) { //Check that the index is less than size because the getInternal //method is being called with index - 1 and its checks will therefore //not be useful in this case. if (index >= size()) { throw new IndexOutOfBoundsException("Index out of bounds: " + index + " >= " + size()); } //Get the node that is previous to the node being removed Node previousToRemove; if (index == 0) { previousToRemove = first; } else { previousToRemove = getInternal(index - 1); } //previousToRemove.next will never be null because of the check above //that index < size. Node toRemove = previousToRemove.next; previousToRemove.next = toRemove.next; elementCount--; //If they removed at the last valid index, then a the last element //was removed, therfore update the last pointer if (last == toRemove) { last = previousToRemove; } return toRemove.data; } /** * Replaces the current element at index/code> with * element. * @return The current element at index. */ public Object set(int index, Object element) { Node setMe = getInternal(index); Object oldData = setMe.data; setMe.data = element; return oldData; } /** * Accessor for the size of this linked list. The size is the total number * of elements in the list and is one greater than the largest index in the * list. * @return The size of this. */ public final int size() { return elementCount; } /** * Helper method that returns the Node at index. * @param index The index of the Node to return. * @return The Node at the given index. * @throws IndexOutOfBoundsException if index is not valid * index within the list (0 <= index < * size). */ protected final Node getInternal(int index) { //Check preconditions for the index variable if (index >= size()) { throw new IndexOutOfBoundsException("Index out of bounds: " + index + " >= " + size()); } if (index < 0) { throw new IndexOutOfBoundsException("Index out of bounds: " + index + " < 0"); } if (index == 0) { return first.next; } else if (index == (size() - 1)) { return last; } else { Node pointer = first.next; for (int i = 0; i < index; i++) { pointer = pointer.next; } return pointer; } } /** * Inner class that represents nodes within the linked list. This should * be a static inner class to avoid the uneccesary overhead of the * containing class "this" pointer. * jcpeck@users * @version 05/24/2002 */ private static class Node { public Node next; public Object data; public Node() { next = null; data = null; } public Node(Object data) { this.next = null; this.data = data; } public Node(Object data, Node next) { this.next = next; this.data = data; } } } hsqldb-1.8.0.10.orig/src/org/hsqldb/lib/Set.java0000644000175000017500000000443210416742474017632 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.lib; /** * * @author fredt@users * @version 1.7.2 * @since 1.7.2 */ public interface Set extends Collection { int size(); boolean isEmpty(); boolean contains(Object o); Iterator iterator(); /* Object[] toArray(); Object[] toArray(Object a[]); */ boolean add(Object o); /** * This method returns the Object that is already in the set and is * equal to the argument o. */ Object get(Object o); boolean remove(Object o); /* boolean containsAll(Collection c); boolean addAll(Collection c); boolean retainAll(Collection c); boolean removeAll(Collection c); */ void clear(); boolean equals(Object o); int hashCode(); } hsqldb-1.8.0.10.orig/src/org/hsqldb/lib/LongKeyIntValueHashMap.java0000644000175000017500000001263510416742474023365 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.lib; import java.util.NoSuchElementException; import org.hsqldb.store.BaseHashMap; /** * @author fredt@users * @version 1.7.2 * @since 1.7.2 */ public class LongKeyIntValueHashMap extends BaseHashMap { private Set keySet; private Collection values; public LongKeyIntValueHashMap() { this(16, 0.75f); } public LongKeyIntValueHashMap(boolean minimize) { this(16, 0.75f); minimizeOnEmpty = minimize; } public LongKeyIntValueHashMap(int initialCapacity) throws IllegalArgumentException { this(initialCapacity, 0.75f); } public LongKeyIntValueHashMap(int initialCapacity, float loadFactor) throws IllegalArgumentException { super(initialCapacity, loadFactor, BaseHashMap.longKeyOrValue, BaseHashMap.intKeyOrValue, false); } public int get(long key) throws NoSuchElementException { int lookup = getLookup(key); if (lookup != -1) { return intValueTable[lookup]; } throw new NoSuchElementException(); } public int get(long key, int defaultValue) { int lookup = getLookup(key); if (lookup != -1) { return intValueTable[lookup]; } return defaultValue; } public boolean get(long key, int[] value) { int lookup = getLookup(key); if (lookup != -1) { value[0] = intValueTable[lookup]; return true; } return false; } public boolean put(long key, int value) { int oldSize = size(); super.addOrRemove(key, value, null, null, false); return oldSize != size(); } public boolean remove(long key) { int oldSize = size(); super.addOrRemove(key, 0, null, null, true); return oldSize != size(); } public Set keySet() { if (keySet == null) { keySet = new KeySet(); } return keySet; } public Collection values() { if (values == null) { values = new Values(); } return values; } class KeySet implements Set { public Iterator iterator() { return LongKeyIntValueHashMap.this.new BaseHashIterator(true); } public int size() { return LongKeyIntValueHashMap.this.size(); } public boolean contains(Object o) { throw new RuntimeException(); } public Object get(Object key) { throw new RuntimeException(); } public boolean add(Object value) { throw new RuntimeException(); } public boolean addAll(Collection c) { throw new RuntimeException(); } public boolean remove(Object o) { throw new RuntimeException(); } public boolean isEmpty() { return size() == 0; } public void clear() { LongKeyIntValueHashMap.this.clear(); } } class Values implements Collection { public Iterator iterator() { return LongKeyIntValueHashMap.this.new BaseHashIterator(false); } public int size() { return LongKeyIntValueHashMap.this.size(); } public boolean contains(Object o) { throw new RuntimeException(); } public boolean add(Object value) { throw new RuntimeException(); } public boolean addAll(Collection c) { throw new RuntimeException(); } public boolean remove(Object o) { throw new RuntimeException(); } public boolean isEmpty() { return size() == 0; } public void clear() { LongKeyIntValueHashMap.this.clear(); } } } hsqldb-1.8.0.10.orig/src/org/hsqldb/lib/IntKeyHashMap.java0000644000175000017500000001115610416742474021545 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.lib; import org.hsqldb.store.BaseHashMap; /** * * @author fredt@users * @version 1.7.2 * @since 1.7.2 */ public class IntKeyHashMap extends BaseHashMap { Set keySet; Collection values; public IntKeyHashMap() { this(16, 0.75f); } public IntKeyHashMap(int initialCapacity) throws IllegalArgumentException { this(initialCapacity, 0.75f); } public IntKeyHashMap(int initialCapacity, float loadFactor) throws IllegalArgumentException { super(initialCapacity, loadFactor, BaseHashMap.intKeyOrValue, BaseHashMap.objectKeyOrValue, false); } public Object get(int key) { int lookup = getLookup(key); if (lookup != -1) { return objectValueTable[lookup]; } return null; } public Object put(int key, Object value) { return super.addOrRemove(key, 0, null, value, false); } public boolean containsValue(Object value) { return super.containsValue(value); } public Object remove(int key) { return super.addOrRemove(key, 0, null, null, true); } public Set keySet() { if (keySet == null) { keySet = new KeySet(); } return keySet; } public Collection values() { if (values == null) { values = new Values(); } return values; } class KeySet implements Set { public Iterator iterator() { return IntKeyHashMap.this.new BaseHashIterator(true); } public int size() { return IntKeyHashMap.this.size(); } public boolean contains(Object o) { throw new RuntimeException(); } public Object get(Object key) { throw new RuntimeException(); } public boolean add(Object value) { throw new RuntimeException(); } public boolean addAll(Collection c) { throw new RuntimeException(); } public boolean remove(Object o) { throw new RuntimeException(); } public boolean isEmpty() { return size() == 0; } public void clear() { IntKeyHashMap.this.clear(); } } class Values implements Collection { public Iterator iterator() { return IntKeyHashMap.this.new BaseHashIterator(false); } public int size() { return IntKeyHashMap.this.size(); } public boolean contains(Object o) { throw new RuntimeException(); } public boolean add(Object value) { throw new RuntimeException(); } public boolean addAll(Collection c) { throw new RuntimeException(); } public boolean remove(Object o) { throw new RuntimeException(); } public boolean isEmpty() { return size() == 0; } public void clear() { IntKeyHashMap.this.clear(); } } } hsqldb-1.8.0.10.orig/src/org/hsqldb/Result.java0000644000175000017500000012724310505070743017605 0ustar renerene/* Copyright (c) 1995-2000, The Hypersonic SQL Group. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the Hypersonic SQL Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE HYPERSONIC SQL GROUP, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * This software consists of voluntary contributions made by many individuals * on behalf of the Hypersonic SQL Group. * * * For work added by the HSQL Development Group: * * Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb; import java.io.DataInput; import java.io.IOException; import java.io.OutputStream; import java.util.NoSuchElementException; import org.hsqldb.lib.Iterator; import org.hsqldb.rowio.RowInputBinary; import org.hsqldb.rowio.RowOutputBinary; // fredt@users 20020130 - patch 1.7.0 by fredt // to ensure consistency of r.rTail r.iSize in all operations // methods for set operations moved here from Select.java // tony_lai@users 20020820 - patch 595073 - duplicated exception msg // fredt@users 20030801 - patch 1.7.2 - separate metadata and polymophic serialisation // boucherb@users 200307/8 - various, in support of fred's work over the same time period /** * The primary unit of comunication between Connection, Server and Session * objects. * * An HSQLDB Result object encapsulates all requests (such as to alter or * query session settings, to allocate and execute statements, etc.) and all * responses (such as exception indications, update counts, result sets and * result set metadata). It also implements the HSQL wire protocol for * comunicating all such requests and responses across the network. * * Extensively rewritten and extended in successive versions of HSQLDB. * * @author Thomas Mueller (Hypersonic SQL Group) * @version 1.8.0 * @since Hypersonic SQL */ public class Result { // record list public Record rRoot; private Record rTail; private int size; // transient - number of significant columns private int significantColumns; // type of result public int mode; // boolean isMulti; // database ID int databaseID; // session ID int sessionID; // user / password or error strings String mainString; String subString; // database name String subSubString; // the exception if this is an error private Throwable exception; // prepared statement id / error vendor code int statementID; // max rows (out) or update count (in) int updateCount; public ResultMetaData metaData; /** A Result object's metadata */ public static class ResultMetaData { // always resolved public String[] colLabels; public String[] tableNames; public String[] colNames; public boolean[] isLabelQuoted; public int[] colTypes; public int[] colSizes; public int[] colScales; // extra attrs, sometimes resolved public String[] catalogNames; public String[] schemaNames; public int[] colNullable; public boolean[] isIdentity; public boolean[] isWritable; public int[] paramMode; // It's possible to do better than java.lang.Object // for type OTHER if the expression generating the value // is of type FUNCTION. This applies to result set columns // whose value is the result of a SQL function call and // especially to the arguments and return value of a CALL public String[] classNames; boolean isParameterDescription; ResultMetaData() {} ResultMetaData(int n) { prepareData(n); } /** * Method declaration * * @param columns */ private void prepareData(int columns) { colLabels = new String[columns]; tableNames = new String[columns]; colNames = new String[columns]; isLabelQuoted = new boolean[columns]; colTypes = new int[columns]; colSizes = new int[columns]; colScales = new int[columns]; catalogNames = new String[columns]; schemaNames = new String[columns]; colNullable = new int[columns]; isIdentity = new boolean[columns]; isWritable = new boolean[columns]; classNames = new String[columns]; } public int[] getParameterTypes() { return colTypes; } boolean isTableColumn(int i) { return tableNames[i] != null && tableNames[i].length() > 0 && colNames[i] != null && colNames[i].length() > 0; } private void decodeTableColumnAttrs(int in, int i) { colNullable[i] = in & 0x0000000f; isIdentity[i] = (in & 0x00000010) != 0; isWritable[i] = (in & 0x00000020) != 0; } private void writeTableColumnAttrs(RowOutputBinary out, int i) throws IOException, HsqlException { // HSQLDB also ignores precision and scale for all types except // XXXCHAR, for which it may (or may not) perform some trimming/padding. // All in all, it's currently meaningless (indeed misleading) to // transmit and report the values, as the data typically will // not be constrained accordingly. // switch(colType[i]) { // // As early as SQL 92, these are allowed to have a scale. // // However, DatabaseCommandInterpreter.processCreateColumn // // does not currently handle this correctly and will assign // // a precision instead of a scale if TIME(s) or TIMESTAMP(s) // // is specified // case Types.TIME : // case Types.TIMESTAMP : // out.writeIntData(colScale[i]); // break; // case Types.DECIMAL : // case Types.NUMERIC : { // out.writeIntData(colScale[i]); // } // fall through // // Apparently, SQL 92 specifies that FLOAT can have // // a declared precision, which is typically the number of // // bits (not binary digits). In any case, this is somewhat // // meaningless under HSQLDB/Java, in that we use java.lang.Double // // to represent SQL FLOAT // case Types.FLOAT : // // It's legal to declare precision for these, although HSQLDB // // currently does not use it to constrain values // case Types.BINARY : // case Types.VARBINARY : // case Types.LONGVARBINARY : // // possibly, but not universally acted upon (trimmming/padding) // case Types.CHAR : // case Types.VARCHAR : // case Types.LONGVARCHAR : { // out.writeIntData(colSize[i]); // } // } out.writeIntData(encodeTableColumnAttrs(i)); out.writeString(catalogNames[i] == null ? "" : catalogNames[i]); out.writeString(schemaNames[i] == null ? "" : schemaNames[i]); } private int encodeTableColumnAttrs(int i) { int out = colNullable[i]; // always between 0x00 and 0x02 if (isIdentity[i]) { out |= 0x00000010; } if (isWritable[i]) { out |= 0x00000020; } return out; } private void readTableColumnAttrs(RowInputBinary in, int i) throws IOException, HsqlException { decodeTableColumnAttrs(in.readIntData(), i); catalogNames[i] = in.readString(); schemaNames[i] = in.readString(); } ResultMetaData(RowInputBinary in, int mode) throws HsqlException, IOException { int l = in.readIntData(); prepareData(l); if (mode == ResultConstants.PARAM_META_DATA) { isParameterDescription = true; paramMode = new int[l]; } for (int i = 0; i < l; i++) { colTypes[i] = in.readType(); // fredt - 1.8.0 added colSizes[i] = in.readIntData(); colScales[i] = in.readIntData(); colLabels[i] = in.readString(); tableNames[i] = in.readString(); colNames[i] = in.readString(); classNames[i] = in.readString(); if (isTableColumn(i)) { readTableColumnAttrs(in, i); } if (mode == ResultConstants.PARAM_META_DATA) { paramMode[i] = in.readIntData(); } } } void write(RowOutputBinary out, int colCount) throws HsqlException, IOException { out.writeIntData(colCount); for (int i = 0; i < colCount; i++) { out.writeType(colTypes[i]); // fredt - 1.8.0 added out.writeIntData(colSizes[i]); out.writeIntData(colScales[i]); out.writeString(colLabels[i] == null ? "" : colLabels[i]); out.writeString(tableNames[i] == null ? "" : tableNames[i]); out.writeString(colNames[i] == null ? "" : colNames[i]); out.writeString(classNames[i] == null ? "" : classNames[i]); if (isTableColumn(i)) { writeTableColumnAttrs(out, i); } if (isParameterDescription) { out.writeIntData(paramMode[i]); } } } } /** * General constructor */ public Result(int type) { mode = type; /* if (type == ResultConstants.MULTI) { isMulti = true; } */ if (type == ResultConstants.DATA || type == ResultConstants.PARAM_META_DATA || type == ResultConstants.SQLEXECUTE || type == ResultConstants.SETSESSIONATTR) { metaData = new ResultMetaData(); } } Result(ResultMetaData md) { mode = ResultConstants.DATA; significantColumns = md.colTypes.length; metaData = md; } // fredt@users 20020221 - patch 513005 by sqlbob@users (RMP) /** * Constructor for errors * * @param error error message * @param state sql state * @param code vendor code */ Result(String error, String state, int code) { mode = ResultConstants.ERROR; mainString = error; subString = state; statementID = code; subSubString = ""; } /** * Only used with DATA and PARAM_META_DATA results * * @param columns */ Result(int type, int columns) { metaData = new ResultMetaData(); metaData.prepareData(columns); if (type == ResultConstants.PARAM_META_DATA) { metaData.isParameterDescription = true; metaData.paramMode = new int[columns]; } mode = type; significantColumns = columns; } /** * For BATCHEXECUTE and BATCHEXECDIRECT */ public Result(int type, int[] types, int id) { mode = type; metaData = new ResultMetaData(); metaData.colTypes = types; significantColumns = types.length; statementID = id; } /** * Constructor declaration * * @param in * @exception HsqlException Description of the Exception */ Result(RowInputBinary in) throws HsqlException { try { mode = in.readIntData(); if (mode == ResultConstants.MULTI) { readMultiResult(in); return; } databaseID = in.readIntData(); sessionID = in.readIntData(); switch (mode) { case ResultConstants.GETSESSIONATTR : case ResultConstants.SQLDISCONNECT : case ResultConstants.SQLSTARTTRAN : case ResultConstants.HSQLRESETSESSION : break; case ResultConstants.SQLPREPARE : setStatementType(in.readIntData()); mainString = in.readString(); break; case ResultConstants.PREPARE_ACK : case ResultConstants.SQLFREESTMT : statementID = in.readIntData(); break; case ResultConstants.SQLEXECDIRECT : updateCount = in.readIntData(); statementID = in.readIntData(); mainString = in.readString(); break; case ResultConstants.ERROR : case ResultConstants.SQLCONNECT : mainString = in.readString(); subString = in.readString(); subSubString = in.readString(); statementID = in.readIntData(); // throw Trace.getError(string, code); break; case ResultConstants.UPDATECOUNT : updateCount = in.readIntData(); break; case ResultConstants.SQLENDTRAN : { int type = in.readIntData(); setEndTranType(type); // endtran type switch (type) { case ResultConstants.SAVEPOINT_NAME_RELEASE : case ResultConstants.SAVEPOINT_NAME_ROLLBACK : mainString = in.readString(); // savepoint name } break; } case ResultConstants.BATCHEXECUTE : case ResultConstants.BATCHEXECDIRECT : case ResultConstants.SQLEXECUTE : case ResultConstants.SETSESSIONATTR : { updateCount = in.readIntData(); statementID = in.readIntData(); int l = in.readIntData(); metaData = new ResultMetaData(l); significantColumns = l; for (int i = 0; i < l; i++) { metaData.colTypes[i] = in.readType(); } int count = in.readIntData(); while (count-- > 0) { add(in.readData(metaData.colTypes)); } break; } case ResultConstants.DATA : case ResultConstants.PARAM_META_DATA : { metaData = new ResultMetaData(in, mode); significantColumns = metaData.colLabels.length; int count = in.readIntData(); while (count-- > 0) { add(in.readData(metaData.colTypes)); } break; } case ResultConstants.SQLSETCONNECTATTR : { int type = in.readIntData(); // attr type setConnectionAttrType(type); switch (type) { case ResultConstants.SQL_ATTR_SAVEPOINT_NAME : mainString = in.readString(); // savepoint name // case ResultConstants.SQL_ATTR_AUTO_IPD : // - always true // default: throw - case never happens } break; } default : throw new HsqlException( Trace.getMessage( Trace.Result_Result, true, new Object[]{ new Integer(mode) }), null, 0); } } catch (IOException e) { throw Trace.error(Trace.TRANSFER_CORRUPTED); } } static Result newSingleColumnResult(String colName, int colType) { Result result = new Result(ResultConstants.DATA, 1); result.metaData.colNames[0] = colName; result.metaData.colLabels[0] = colName; result.metaData.tableNames[0] = ""; result.metaData.colTypes[0] = colType; return result; } static Result newPrepareResponse(int csid, Result rsmd, Result pmd) { Result out; Result pack; out = new Result(ResultConstants.MULTI); // out.isMulti = true; pack = new Result(ResultConstants.PREPARE_ACK); pack.statementID = csid; out.add(new Object[]{ pack }); out.add(new Object[]{ rsmd }); out.add(new Object[]{ pmd }); return out; } static Result newParameterDescriptionResult(int len) { Result r = new Result(ResultConstants.PARAM_META_DATA, len); r.metaData.isParameterDescription = true; r.metaData.paramMode = new int[len]; return r; } public static Result newFreeStmtRequest(int statementID) { Result r = new Result(ResultConstants.SQLFREESTMT); r.statementID = statementID; return r; } static Result newExecuteDirectRequest(String sql) { Result out; out = new Result(ResultConstants.SQLEXECDIRECT); out.setMainString(sql); return out; } public static Result newReleaseSavepointRequest(String name) { Result out; out = new Result(ResultConstants.SQLENDTRAN); out.setMainString(name); out.setEndTranType(ResultConstants.SAVEPOINT_NAME_RELEASE); return out; } public static Result newRollbackToSavepointRequest(String name) { Result out; out = new Result(ResultConstants.SQLENDTRAN); out.setMainString(name); out.setEndTranType(ResultConstants.SAVEPOINT_NAME_ROLLBACK); return out; } public static Result newSetSavepointRequest(String name) { Result out; out = new Result(ResultConstants.SQLSETCONNECTATTR); out.setConnectionAttrType(ResultConstants.SQL_ATTR_SAVEPOINT_NAME); out.setMainString(name); return out; } /** * Method declaration * * @return */ public int getSize() { return size; } /** * Method declaration * * @param columns */ void setColumnCount(int columns) { significantColumns = columns; } /** * Method declaration * * @return */ public int getColumnCount() { return significantColumns; } /** * Append Result argument to this. * * @param a */ void append(Result a) { if (a.rRoot == null) { return; } if (rRoot == null) { rRoot = a.rRoot; } else { rTail.next = a.rRoot; } rTail = a.rTail; size += a.size; } void addAll(Result r) { if (r == null) { return; } Record from = r.rRoot; while (from != null) { add(from.data); from = from.next; } } public void clear() { rRoot = null; rTail = null; size = 0; } public boolean isEmpty() { return rRoot == null; } /** * Method declaration * * @param a */ void setRows(Result a) { if (a == null) { rRoot = null; rTail = null; size = 0; } else { rRoot = a.rRoot; rTail = a.rTail; size = a.size; } } /** * Method declaration * * @param d */ public void add(Object[] d) { Record r = new Record(); r.data = d; if (rRoot == null) { rRoot = r; } else { rTail.next = r; } rTail = r; size++; } /** * Method declaration * * @param limitstart number of records to discard at the head * @param limitcount number of records to keep, all the rest if 0 */ // fredt@users 20020130 - patch 1.7.0 by fredt // rewritten and moved from Select.java void trimResult(int limitstart, int limitcount) { Record n = rRoot; if (n == null) { return; } if (limitstart >= size) { size = 0; rRoot = rTail = null; return; } size -= limitstart; for (int i = 0; i < limitstart; i++) { n = n.next; if (n == null) { // if iSize is consistent this block will never be reached size = 0; rRoot = rTail = n; return; } } rRoot = n; if (limitcount == 0 || limitcount >= size) { return; } for (int i = 1; i < limitcount; i++) { n = n.next; if (n == null) { // if iSize is consistent this block will never be reached return; } } size = limitcount; n.next = null; rTail = n; } /** * Removes duplicate rows on the basis of comparing the singificant * columns of the rows in the result. * * @throws HsqlException */ void removeDuplicates(Session session) throws HsqlException { removeDuplicates(session, significantColumns); } /** * Removes duplicate rows on the basis of comparing the first columnCount * columns of rows in the result. * * @throws HsqlException */ // fredt@users 20020130 - patch 1.7.0 by fredt // to ensure consistency of r.rTail r.iSize in all set operations void removeDuplicates(Session session, int columnCount) throws HsqlException { if (rRoot == null) { return; } int[] order = new int[columnCount]; int[] way = new int[columnCount]; for (int i = 0; i < columnCount; i++) { order[i] = i; way[i] = 1; } sortResult(session, order, way); Record n = rRoot; for (;;) { Record next = n.next; if (next == null) { break; } if (compareRecord(session, n.data, next.data, columnCount) == 0) { n.next = next.next; size--; } else { n = next; } } rTail = n; } /** * Removes duplicates then removes the contents of the second result * from this one base on first columnCount of the rows in each result. * * @param minus * @throws HsqlException */ void removeSecond(Session session, Result minus, int columnCount) throws HsqlException { removeDuplicates(session, columnCount); minus.removeDuplicates(session, columnCount); Record n = rRoot; Record last = rRoot; boolean rootr = true; // checking rootrecord Record n2 = minus.rRoot; int i = 0; while (n != null && n2 != null) { i = compareRecord(session, n.data, n2.data, columnCount); if (i == 0) { if (rootr) { rRoot = last = n.next; } else { last.next = n.next; } n = n.next; size--; } else if (i > 0) { // r > minus n2 = n2.next; } else { // r < minus last = n; rootr = false; n = n.next; } } for (; n != null; ) { last = n; n = n.next; } rTail = last; } /** * Removes all duplicate rows then removes all rows that are not shared * between this and the other result, based on comparing the first * columnCount columns of each result. * * @param r2 * @throws HsqlException */ void removeDifferent(Session session, Result r2, int columnCount) throws HsqlException { removeDuplicates(session, columnCount); r2.removeDuplicates(session, columnCount); Record n = rRoot; Record last = rRoot; boolean rootr = true; // checking rootrecord Record n2 = r2.rRoot; int i = 0; size = 0; while (n != null && n2 != null) { i = compareRecord(session, n.data, n2.data, columnCount); if (i == 0) { // same rows if (rootr) { rRoot = n; // make this the first record } else { last.next = n; // this is next record in resultset } rootr = false; last = n; // this is last record in resultset n = n.next; n2 = n2.next; size++; } else if (i > 0) { // r > r2 n2 = n2.next; } else { // r < r2 n = n.next; } } if (rootr) { // if no lines in resultset rRoot = null; // then return null last = null; } else { last.next = null; // else end resultset } rTail = last; } /** * Method declaration * * @param order * @param way * @throws HsqlException */ void sortResult(Session session, final int[] order, final int[] way) throws HsqlException { if (rRoot == null || rRoot.next == null) { return; } Record source0, source1; Record[] target = new Record[2]; Record[] targetlast = new Record[2]; int dest = 0; Record n = rRoot; while (n != null) { Record next = n.next; n.next = target[dest]; target[dest] = n; n = next; dest ^= 1; } for (int blocksize = 1; target[1] != null; blocksize <<= 1) { source0 = target[0]; source1 = target[1]; target[0] = target[1] = targetlast[0] = targetlast[1] = null; for (dest = 0; source0 != null; dest ^= 1) { int n0 = blocksize, n1 = blocksize; while (true) { if (n0 == 0 || source0 == null) { if (n1 == 0 || source1 == null) { break; } n = source1; source1 = source1.next; n1--; } else if (n1 == 0 || source1 == null) { n = source0; source0 = source0.next; n0--; } else if (compareRecord(session, source0.data, source1 .data, order, way) > 0) { n = source1; source1 = source1.next; n1--; } else { n = source0; source0 = source0.next; n0--; } if (target[dest] == null) { target[dest] = n; } else { targetlast[dest].next = n; } targetlast[dest] = n; n.next = null; } } } rRoot = target[0]; rTail = targetlast[0]; } /** * Method declaration * * @param a * @param b * @param order * @param way * @return -1, 0, +1 * @throws HsqlException */ private int compareRecord(Session session, Object[] a, final Object[] b, final int[] order, int[] way) throws HsqlException { int i = Column.compare(session.database.collation, a[order[0]], b[order[0]], metaData.colTypes[order[0]]); if (i == 0) { for (int j = 1; j < order.length; j++) { i = Column.compare(session.database.collation, a[order[j]], b[order[j]], metaData.colTypes[order[j]]); if (i != 0) { return i * way[j]; } } } return i * way[0]; } /** * Method declaration * * @param a * @param b * @param len * @return -1, 0, +1 * @throws HsqlException */ private int compareRecord(Session session, Object[] a, Object[] b, int len) throws HsqlException { for (int j = 0; j < len; j++) { int i = Column.compare(session.database.collation, a[j], b[j], metaData.colTypes[j]); if (i != 0) { return i; } } return 0; } /** * Result structure used for set/get session attributes */ static Result newSessionAttributesResult() { Result r = new Result(ResultConstants.DATA, 7); r.metaData.colNames = r.metaData.colLabels = r.metaData.tableNames = new String[] { "", "", "", "", "", "", "" }; r.metaData.colTypes = new int[] { Types.VARCHAR, Types.VARCHAR, Types.INTEGER, Types.INTEGER, Types.BOOLEAN, Types.BOOLEAN, Types.BOOLEAN }; return r; } void write(RowOutputBinary out) throws IOException, HsqlException { if (mode == ResultConstants.MULTI) { writeMulti(out); return; } int startPos = out.size(); out.writeSize(0); out.writeIntData(mode); out.writeIntData(databaseID); out.writeIntData(sessionID); switch (mode) { case ResultConstants.GETSESSIONATTR : case ResultConstants.SQLDISCONNECT : case ResultConstants.SQLSTARTTRAN : case ResultConstants.HSQLRESETSESSION : break; case ResultConstants.SQLPREPARE : // Allows the engine side to fast-fail prepare of non-CALL // statement against a CallableStatement object and CALL // statement against PreparedStatement. // // May be useful in the future for other things out.writeIntData(getStatementType()); out.writeString(mainString); break; case ResultConstants.PREPARE_ACK : case ResultConstants.SQLFREESTMT : out.writeIntData(statementID); break; case ResultConstants.SQLEXECDIRECT : out.writeIntData(updateCount); out.writeIntData(statementID); // currently unused out.writeString(mainString); break; case ResultConstants.ERROR : case ResultConstants.SQLCONNECT : out.writeString(mainString); out.writeString(subString); out.writeString(subSubString); out.writeIntData(statementID); break; case ResultConstants.UPDATECOUNT : out.writeIntData(updateCount); break; case ResultConstants.SQLENDTRAN : { int type = getEndTranType(); out.writeIntData(type); // endtran type switch (type) { case ResultConstants.SAVEPOINT_NAME_RELEASE : case ResultConstants.SAVEPOINT_NAME_ROLLBACK : out.writeString(mainString); // savepoint name // default; // do nothing } break; } case ResultConstants.BATCHEXECUTE : case ResultConstants.BATCHEXECDIRECT : case ResultConstants.SQLEXECUTE : case ResultConstants.SETSESSIONATTR : { out.writeIntData(updateCount); out.writeIntData(statementID); int l = significantColumns; out.writeIntData(l); for (int i = 0; i < l; i++) { out.writeType(metaData.colTypes[i]); } out.writeIntData(size); Record n = rRoot; while (n != null) { out.writeData(l, metaData.colTypes, n.data, null, null); n = n.next; } break; } case ResultConstants.DATA : case ResultConstants.PARAM_META_DATA : { metaData.write(out, significantColumns); out.writeIntData(size); Record n = rRoot; while (n != null) { out.writeData(significantColumns, metaData.colTypes, n.data, null, null); n = n.next; } break; } case ResultConstants.SQLSETCONNECTATTR : { int type = getConnectionAttrType(); out.writeIntData(type); // attr type switch (type) { case ResultConstants.SQL_ATTR_SAVEPOINT_NAME : out.writeString(mainString); // savepoint name // case ResultConstants.SQL_ATTR_AUTO_IPD // always true // default: // throw, but case never happens } break; } default : throw new HsqlException( Trace.getMessage( Trace.Result_Result, true, new Object[]{ new Integer(mode) }), null, 0); } out.writeIntData(out.size(), startPos); } void readMultiResult(RowInputBinary in) throws HsqlException, IOException { mode = ResultConstants.MULTI; databaseID = in.readIntData(); sessionID = in.readIntData(); int count = in.readIntData(); for (int i = 0; i < count; i++) { // Currently required for the outer result, but can simply // be ignored for sub-results in.readIntData(); add(new Object[]{ new Result(in) }); } } private void writeMulti(RowOutputBinary out) throws IOException, HsqlException { int startPos = out.size(); out.writeSize(0); out.writeIntData(mode); out.writeIntData(databaseID); out.writeIntData(sessionID); out.writeIntData(size); Record n = rRoot; while (n != null) { ((Result) n.data[0]).write(out); n = n.next; } out.writeIntData(out.size(), startPos); } /** * Convenience method for writing, shared by Server side. */ public static void write(Result r, RowOutputBinary rowout, OutputStream dataout) throws IOException, HsqlException { rowout.reset(); r.write(rowout); dataout.write(rowout.getOutputStream().getBuffer(), 0, rowout.getOutputStream().size()); dataout.flush(); } /** * Convenience method for reading, shared by Server side. */ public static Result read(RowInputBinary rowin, DataInput datain) throws IOException, HsqlException { int length = datain.readInt(); rowin.resetRow(0, length); byte[] byteArray = rowin.getBuffer(); int offset = 4; datain.readFully(byteArray, offset, length - offset); return new Result(rowin); } /** @todo fredt - move the messages to Trace.java */ public Result(Throwable t, String statement) { mode = ResultConstants.ERROR; exception = t; if (t instanceof HsqlException) { HsqlException he = (HsqlException) t; subString = he.getSQLState(); mainString = he.getMessage(); if (statement != null) { mainString += " in statement [" + statement + "]"; } statementID = he.getErrorCode(); } else if (t instanceof OutOfMemoryError) { // At this point, we've nothing to lose by doing this System.gc(); subString = "S1000"; mainString = "out of memory"; statementID = Trace.OUT_OF_MEMORY; } else { subString = "S1000"; mainString = Trace.getMessage(Trace.GENERAL_ERROR) + " " + t; if (statement != null) { mainString += " in statement [" + statement + "]"; } statementID = Trace.GENERAL_ERROR; } subSubString = ""; } public Throwable getException() { return exception; } public int getStatementID() { return statementID; } void setStatementID(int id) { statementID = id; } public String getMainString() { return mainString; } public void setMainString(String sql) { mainString = sql; } public String getSubString() { return subString; } public void setMaxRows(int count) { updateCount = count; } public int getUpdateCount() { return updateCount; } int getConnectionAttrType() { return updateCount; } void setConnectionAttrType(int type) { updateCount = type; } int getEndTranType() { return updateCount; } void setEndTranType(int type) { updateCount = type; } /** @todo fred - check this repurposing */ public int[] getUpdateCounts() { return metaData.colTypes; } Object[] getParameterData() { return (rRoot == null) ? null : rRoot.data; } public void setParameterData(Object[] data) { if (rRoot == null) { rRoot = new Record(); } rRoot.data = data; rRoot.next = null; rTail = rRoot; size = 1; } public void setResultType(int type) { mode = type; } public void setStatementType(int type) { updateCount = type; } public int getStatementType() { return updateCount; } public int getType() { return mode; } public boolean isData() { return mode == ResultConstants.DATA; } public boolean isError() { return mode == ResultConstants.ERROR; } public boolean isUpdateCount() { return mode == ResultConstants.UPDATECOUNT; } public Iterator iterator() { return new ResultIterator(); } private class ResultIterator implements Iterator { boolean removed; int counter; Record current = rRoot; Record last; public boolean hasNext() { return counter < size; } public Object next() { if (hasNext()) { removed = false; if (counter != 0) { last = current; current = current.next; } counter++; return current.data; } throw new NoSuchElementException(); } public int nextInt() { throw new NoSuchElementException(); } public long nextLong() { throw new NoSuchElementException(); } public void remove() { if (counter <= size && counter != 0 &&!removed) { removed = true; if (current == rTail) { rTail = last; } if (current == rRoot) { current = rRoot = rRoot.next; } else { current = last; last = null; current.next = current.next.next; } size--; counter--; return; } throw new NoSuchElementException(); } } } hsqldb-1.8.0.10.orig/src/org/hsqldb/index/0000755000175000017500000000000010242420102016544 5ustar renerenehsqldb-1.8.0.10.orig/src/org/hsqldb/index/RowIterator.java0000644000175000017500000000342510416742471021717 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.index; import org.hsqldb.Row; /** * * @author fredt@users * @version 1.7.2 * @since 1.7.2 */ public interface RowIterator { Row next(); boolean hasNext(); void release(); } hsqldb-1.8.0.10.orig/src/org/hsqldb/BaseTable.java0000644000175000017500000000373510416742464020157 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb; import org.hsqldb.index.RowIterator; /** * The abstract base of all HSQLDB table implementations. * * @author fredt@users * @version 1.7.2 * @since 1.7.2 */ public abstract class BaseTable { BaseTable() {} abstract Index getPrimaryIndex(); public RowIterator rowIterator(Session session) throws HsqlException { return getPrimaryIndex().firstRow(session); } } hsqldb-1.8.0.10.orig/src/org/hsqldb/util/0000755000175000017500000000000010665324113016430 5ustar renerenehsqldb-1.8.0.10.orig/src/org/hsqldb/util/sqltool/0000755000175000017500000000000010665324114020126 5ustar renerenehsqldb-1.8.0.10.orig/src/org/hsqldb/util/sqltool/SqlTool.syntax_de.text0000644000175000017500000000320210651110406024413 0ustar renereneSyntax: java org.hsqldb.util.SqlTool [--wahl [wahr...]] urlid [datei1.sql...] Wahlen: --help Zeigt diese Anzeige an --list Verzeichnet Urlids von der RC Datei --noInput Lehrt stdin nicht (Standardeinstelling wenn Sql Datei gegeben order --sql Schalter benutzt). --stdInput Liest stdin ZUSTZLICH zu sql Dateien/--sql Eingang --inlineRc url=val1,user=val2[,charset=val3][,truststore=val4][,password=] Inline RC Datei Variable --debug Zeigt Debug Info zu stderr --noAutoFile Ausfhrt auto.sql vom Home Directory nicht. --autoCommit Auto-commit JDBC DML Befehle --sql "SQL; Anweisungen" Ausfhrt gegeben SQL statt der stdin (vor SQL Dateien wenn angebeben) wo "SQL" wirt aus SQL Befehl(e) gebildet. Sieh die Bedienungsanleitung. --rcFile datei/pfad.rc Anschluss Info Datei [$HOME/sqltool.rc] --abortOnErr Abbruch nach Fehler (aufhebt Rckstellungen) --continueOnErr Continue nach Fehler (aufhebt Rckstellungen) --setVar NAME1=val1[,NAME2=val2...] PL Variable --driver a.b.c.Driver JDBC Trieber Class [%{2}] urlid ID von url/Benutzername/Passwort in RC Datei datei1.sql... SQL Dateien auszufhren [stdin] (Benutzen Sie '-' fr non-interactively stdin!). Sehen Sie den Benutzer-Fhrer fr abgesttzte System Eigenschaften. SqlTool v. %{1}. hsqldb-1.8.0.10.orig/src/org/hsqldb/util/sqltool/errorat.text0000644000175000017500000000005610637632265022523 0ustar renereneError at '%{1}' line %{2}: %{3:+"%3" }%{4} hsqldb-1.8.0.10.orig/src/org/hsqldb/util/sqltool/buffer.help_de.text0000644000175000017500000000413210653173413023705 0ustar renereneEDITPUFFER UND GESCHICHTE BEFEHLE. Vorhanden nur fr interaktive Benutzung. :? Editpuffer / Geschichte Hilf :h Zeigt Befehlgeschichte (plus Editpufferinhalt) :b Zeigt laufend Editpufferinhalt :X (Ganzzahl X) Wieder aufladed Befehl #X zu Editpuller :-Y (Ganzzahl -Y) Selbel wie :X, ausgenommen -Y bedeuted Y Befehle zurck Die restlichen Edit/Geschichtebefehle, die alle an den Editpuffer durch Rckstellung laufen lassen durch, aber werden auch an jeden mglichen Befehl von der Geschichte, wenn du ein Befehl Bezeichner nach dem Doppelpunkt vermittelst, wie ":blau;" lt den letzten Befehl wieder ausfhren, den Sie laufen lieen, der enthlt "blau", oder "w -3 /tmp/aus.txt" zum des dritten Befehls 'rckseitig' an Datei zufgen. :; Fhrt den Editpufferinhalt (Spezial, PL, oder SQL-Befehl) :w datei/pfad.sql Laufend Editpufferinhalt an Datei zufgen. :a[text] Betret Hinzufgemodus mit Editpufferinhaltzweitschrift :s/von regex/zo/ Ersetzt bereinstimmung von "von regex" mit "zu" :s/von/zo/[igm;] Eins oder mehrfach Ersatz mit spezifizierten Wahlen. von: Regelmiger regulrer Ausdruck. Sehen Sie 'perlre' Mannseite oder Java API Spez. fr java.util.regex.Pattern! zu: Wenn empty, von's wird zu lschen (z.b. ":s/x//"). [igm;] Wahlen arbeiten genau wie in Perl oder java.util.regex, ausgenommen Wahl ';' bedeutet nach Ersetzungen auszufhren, 'g' bedeutet Global (mehrfach) Ersetzungen, und Wahl 's' ist immer aktiv. /: Kann eigentlich irgenetwas Zeichen sein, das weder in "von" noch "zu" String wre. ERSETZEN MODUS SCHALTER: i: Schachtel-unempfindlich g: Global (alles Auftreten ersetzen) m: ^ und $ bereinstimmt Zeilebruch (view Perl m Option) ;: ausfhrt sofort nach die Ersatz hsqldb-1.8.0.10.orig/src/org/hsqldb/util/sqltool/rejectreport.bottom_de.text0000644000175000017500000000023210641174724025520 0ustar renerene %{1}

                SqlFile revision %{2}.
                hsqldb-1.8.0.10.orig/src/org/hsqldb/util/sqltool/dsv.options_de.text0000644000175000017500000000375610644325631024007 0ustar renereneDSV bedeutet Trennzeichen-getrennte Werte. Sie sind genau wie CSV (Comma Separated Values), aber DSV benutzen immer eine korrekte Trennzeichen, um die Notwendigkeit an der Veranschlagung und am Entgehen zu verhindern, die CSV Dateien haben. Alle Variablen sind wahlweise freigestellt. Alle Variable Werte sehen, durchlaufen Sie "* listvalues". Die Werte so einstellen: * *DSV_COL_DELIM = , Beim Verwenden, vergessen Sie nicht ein * zeigt PL Befehl an, und ein * is ein Teil des Namens. \x oder \m folgend zeigt wo an die Einstellung ist anwendbar. Default-Wert/Verhalten ist in den [quadratischen Klammern]. *DSV_SKIP_PREFIX \m Kommentarzeile Prfix in die Datei. ["#"] *DSV_COL_DELIM \m\x Element Trennzeichen. ["|"] *DSV_ROW_DELIM \m\x Segment Trennzeichen. [Betriedsystem-spezifisch (Java line.separator)] *NULL_REP_TOKEN \m\x Zeichenkette, zum einer Datenbanknull darzustellen. ["[null]"] *DSV_TARGET_FILE \x Die Datei, der zu scheribt. [Quelltabelle Name + ".dsv"] *DSV_TARGET_TABLE \m Die Tabelle, der zu schreibt. [DSV Dateiname ohne Verlngerung] *DSV_CONST_COLS \m Spalte Werte, zum zu jeder Reihe zu schreiben. *DSV_REJECT_FILE \m Ausschudatei. Mit zurckgewiesenen Aufzeichnungen verursacht zu werden Textfile. [None*] *DSV_REJECT_REPORT \m HTML Ausschureport, zum der Ausschuaufzeichnungen zu erklren. [None*] *DSV_SKIP_COLS \m\x berspringt Spalten von der Eingang Textakte oder von der Eingang Tabelle. * Importe brechen sofort nach dem Rekordausfall des ersten Importes ab, es sei denn entweder *DSV_REJECT_FILE oder *DSV_REJECT_REPORT (oder beide) eingestellt werden. (Ob SqlTool Willenszurckrollen und beendigt von deinen Einstellungen fr \c und \z abhngt). hsqldb-1.8.0.10.orig/src/org/hsqldb/util/sqltool/errorat_de.text0000644000175000017500000000006010641174724023162 0ustar renereneFehler an '%{1}' Zeile %{2}: %{3:+"%3" }%{4} hsqldb-1.8.0.10.orig/src/org/hsqldb/util/sqltool/dsv.options.text0000644000175000017500000000322010651110406023307 0ustar renereneDSV stands for Delimiter-Separated-Values, which is just CSV (comma- separated-values) but always using a proper delimiter to prevent the need for quoting and escaping which CSV files have. All of the DSV PL variables are optional. To see all PL var. values, run "* listvalues". Set the values like: * *DSV_COL_DELIM = , Don't forget the * indicating a PL command PLUS the leading * in all of these variable names. \x or \m below indicates where the setting is applicable. Default value/behavior is in [square brackes]. *DSV_SKIP_PREFIX \m Comment line prefix in DSV files. ["#"] *DSV_COL_DELIM \m\x Column delimiter. ["|"] *DSV_ROW_DELIM \m\x Row delimiter [OS-dependent (Java line.separator)] *NULL_REP_TOKEN \m\x String to represent database null. ["[null]"] *DSV_TARGET_FILE \x File which exports will write to [source table name + ".dsv"] *DSV_TARGET_TABLE \m Table which imports will write to [DSV filename without extension] *DSV_CONST_COLS \m Column values to write to every row. [None] *DSV_REJECT_FILE \m DSV file to be created with rejected records. [None*] *DSV_REJECT_REPORT \m HTML report to explain reject records [None*] *DSV_SKIP_COLS \m\x Skip columns from input DSV file or input table. * Imports will abort immediately upon the first import record failure, unless either *DSV_REJECT_FILE or *DSV_REJECT_REPORT (or both) are set. (Whether SqlTool will roll back and quit depends on your settings for \c and \a). hsqldb-1.8.0.10.orig/src/org/hsqldb/util/sqltool/rejectreport.bottom.text0000644000175000017500000000023210651110406025034 0ustar renerene %{1}
                SqlFile revision %{2}.
                hsqldb-1.8.0.10.orig/src/org/hsqldb/util/sqltool/SqlTool.syntax.text0000644000175000017500000000304510651110406023750 0ustar renereneSyntax: java org.hsqldb.util.SqlTool [--opt [optval...]] urlid [file1.sql...] Options: --help Displays this message --list List urlids in the rc file --noInput Do not read stdin (default if sql file given or --sql switch used). --stdInput Read stdin IN ADDITION to sql files/--sql input --inlineRc url=val1,user=val2[,charset=val3][,truststore=val4][,password=] Inline RC file variables (use --driver for driver) --debug Print Debug info to stderr --noAutoFile Do not execute auto.sql from home dir --autoCommit Auto-commit JDBC DML commands --sql "SQL; Statements" Execute given SQL instead of stdin (before SQL files if any are specified) where "SQL" consists of SQL command(s). See the Guide. --rcFile /file/path.rc Connect Info File [$HOME/sqltool.rc] --abortOnErr Abort on Error (overrides defaults) --continueOnErr Continue on Error (overrides defaults) --setVar NAME1=val1[,NAME2=val2...] PL variables --driver a.b.c.Driver JDBC driver class [%{2}] urlid ID of url/username/password in rcfile file1.sql... SQL files to be executed [stdin] (Use '-' for non-interactively stdin). See the SqlTool Manual for the supported sqltool.* System Properties. SqlTool v. %{1}. hsqldb-1.8.0.10.orig/src/org/hsqldb/util/sqltool/special.help.text0000644000175000017500000000260310651110406023374 0ustar renereneSPECIAL COMMANDS Filter substrings are case-sensitive! Use "SCHEMANAME." to narrow to schema. \? Special command Help \p [line to print] Print string to stdout \i file/path.sql Include/execute commands from external file \d{tvsiSanur*?} [substr] List objects of specified type: (Tbls/Views/Seqs/Indexes/SysTbls/Aliases/schemaNames/Users/Roles/table-like) \d OBJECTNAME [subs] Describe table or view columns \o [file/path.html] Tee (or stop teeing) query output to specified file \H Toggle HTML output mode \! COMMAND [ARGS] Execute external program (no support for stdin) \c [true|false] Continue upon errors (a.o.t. abort upon error) \a [true|false] Auto-commit JDBC DML commands \b Save next result to Binary buffer (no display) \bd file/path.bin Dump Binary buffer to file \bl file/path.bin Load file into Binary buffer \bp Use ? in next SQL statement to upload Binary buffer \. Enter raw SQL. End with line containing only "." \= Commit JDBC session \x {TABLE|SELECT...} eXport table or query to DSV text file (options \x?) \m file/path.dsv [*] iMport DSV text file records into a table (opts \m?) \q [abort message] Quit (or you can end input with Ctrl-Z or Ctrl-D) hsqldb-1.8.0.10.orig/src/org/hsqldb/util/sqltool/rejectreport.row_de.text0000644000175000017500000000037310641174724025031 0ustar renerene %{2} %{3} %{4}
                %{5}
                hsqldb-1.8.0.10.orig/src/org/hsqldb/util/sqltool/pl.help.text0000644000175000017500000000440410651110406022370 0ustar renerenePROCEDURAL LANGUAGE COMMANDS *? PL Help * Expand PL variables from now on. (this is also implied by all the following). * VARNAME = Variable value Set variable value * VARNAME = Unset variable * VARNAME ~ Set variable value to the value of the very next SQL value or count fetched (see details at the bottom of this listing). * VARNAME _ Same as * VARNAME _, except the query is done silently (i.e, no rows to screen) * list[values] [VARNAME1...] List PL variable(s) (defaults to all) * listsysprops [VARNAME1...] List Java System property(s) (defaults to all) * load VARNAME path.txt Load variable value from text file * dump VARNAME path.txt Dump variable value to text file * prepare VARNAME Use ? in next SQL statement to upload val. (Just "?", "*{?}" would mean the auto var.). * foreach VARNAME ([val1...]) Repeat the following PL block with the variable set to each value in turn. * if (logical expr) Execute following PL block only if expr true * while (logical expr) Repeat following PL block while expr true * end foreach|if|while Ends a PL block * break [foreach|if|while|file] Exits a PL block or file early * continue [foreach|while] Exits a PL block iteration early Use PL variables (which you have set) like: *{VARNAME}. Use System Properties (which you may not set) like: ${property.name}. You may use /VARNAME instead iff /VARNAME is the first word of a SQL command. Use PL variables in logical expressions, like (*VARNAME == 1). Auto. variable ? is set to the very next SQL datum fetched (or update count). Query: The value of the first field of the first row returned. other: Return status of the command (for updates this will be the number of rows updated). '* VARNAME ~' or '* VARNAME _' sets the specified variable's value exactly like ?. (~ will echo the value, _ will do it silently). hsqldb-1.8.0.10.orig/src/org/hsqldb/util/sqltool/rejectreport.top.text0000644000175000017500000000405210651110406024336 0ustar renerene SqlTool DSV Reject Report

                Import performed %{1} with SqlTool.

                Input DSV file: %{2}

                Reject DSV file: %{3}

                %{4:+

                The corresponding records in '%4' are at line numbers of (reject # + 1), since the header record occupies the first line.

                } hsqldb-1.8.0.10.orig/src/org/hsqldb/util/sqltool/d.options_de.text0000644000175000017500000000056410641174724023432 0ustar renerene\dX [Parameter...] wo X eins vom folgenden ist t: verzeichnet Tabellen v: verzeichnet sichten s: verzeichnet Sequenzen i: verzeichnet Indizes S: verzeichnet System Tabellen a: verzeichnet Aliases n: verzeichnet Schemanamen u: verzeichnet Benutzer r: verzeichnet Rollen *: verzeichnet Tabelleartig Gegenstnde hsqldb-1.8.0.10.orig/src/org/hsqldb/util/sqltool/rejectreport.row.text0000644000175000017500000000037310651110406024345 0ustar renerene hsqldb-1.8.0.10.orig/src/org/hsqldb/util/sqltool/d.options.text0000644000175000017500000000044410636377401022760 0ustar renerene\dX [parameter...] where X is one of the following. t: list Tables v: list Views s: list Sequences i: list Indexes S: list System tables a: list Aliases n: list schema Names u: list Users r: list Roles *: list table-like objects hsqldb-1.8.0.10.orig/src/org/hsqldb/util/sqltool/pl.help_de.text0000644000175000017500000000507110644325631023053 0ustar renereneVERFAHRENSSPRACHE BEFEHLE *? PL Hilf * PL Variablen ab sofort erweitern. (Dieses wird auch durch alles Folgen angedeutet). * VARNAME = Variable Wert Stellt den Variable Wert ein * VARNAME = Lscht den Variable Wert. * VARNAME ~ Stellt Variable Wert zu Wert der allernchsten SQL Wert oder Zahl geholt ein (Die Details an der Unterseite dieser Auflistung sehen). * VARNAME _ Selben wie * VARNAME _ ausgenommen der Abfrage still erfolgt ist (d.h, keine Reihen Anzeige)> * list[values] [VARNAME1...] Verzeichnet PL Variable(n) (Rckstellung alle) * listsysprops [VARNAME1...] Verzeichnet Java System Eigenschaft(en) * load VARNAME datei.txt Ldt Variable von einer Textatei * dump VARNAME datei.txt Entleert Variable zu einer textdatei * prepare VARNAME Benutzten Sie ? in nchst SQL Anweisung hochzuladen. ("*{?}" bedeutet die Auto Var.). * foreach VARNAME ([val1...]) Wiederholt den folgenden PL Block mit dem Variable zu jedem Wert des Ausdruckes nach. * if (logical expr) Ausfhrt den folgenden PL Block nur wenn ausdruck zutreffend ist. * while (logical expr) Wiederholt den folgenden PL Block, whrend der Ausdruckes zutreffend ist. * end foreach|if|while Beendent einen PL Block * break [foreach|if|while|file] Beendent einen PL Block frh * continue [foreach|while] Beendent einen PL Iteration Block frh Verwenden Sie PL Variablen (die Sue eingestellt haben) wie so: *{VARNAME}. Verwenden Sie System Eigenschaften (die Sue eingestellt haben) so: ${VARNAME}. Sie knnen /VARNAME anstatt benutzen, wenn /VARNAME das erste Wort ist. Verwenden Sie PL Variablen in den logischen Ausdrcken, wie so: (VARNAME == 1). Auto. Variablem ? wirf auf den sehr folgenden SQL Bezugspunkt geholt eingestellt (oderUpdatezhlimpuls). Abfrage: Der Wert vom ersten fangen von erster zurckgebrachten Reihe auf. jene Andere: Rckholstatus des Befehls (fr Updates ist dieses die Zahl den aktualisierten Reihen). '* VARNAME ~' or '* VARNAME _' stellt den spezifizierten Wert der Variable genau wie einen Penny ein. ?. (~ zeigt den Wert, _ tut ihn still). hsqldb-1.8.0.10.orig/src/org/hsqldb/util/sqltool/SqlFile.banner.text0000644000175000017500000000203110651110406023623 0ustar renerene(SqlFile processor v. %{1}) Distribution is permitted under the terms of the HSQLDB license. (c) 2004-2007 Blaine Simpson and the HSQLDB Development Group. \q to Quit. \? lists Special Commands. :? lists Edit-Buffer/History commands. *? lists PL commands. SPECIAL Commands begin with '\' and execute when you hit ENTER. EDIT-BUFFER / HISTORY Commands begin with ':' and execute when you hit ENTER. COMMENTS begin with '/*' and end with the very next '*/'. PROCEDURAL LANGUAGE commands begin with '*' and end when you hit ENTER. All other lines comprise SQL Statements. SQL Statements are terminated by either a blank line (which moves the statement into the edit buffer without executing) or a line ending with ';' (which executes the statement). SQL Commands may begin with '/PLVARNAME' for a PL variable command alias. After turning on variable expansion with command "*" (or any other PL command), PL variables may be used in any command (other than : commands) like so: *{PLVARNAME}. hsqldb-1.8.0.10.orig/src/org/hsqldb/util/sqltool/raw.leadin_de.text0000644000175000017500000000043710641174724023540 0ustar renereneEintragen Sie ROH SQL! Kein \, :, * Befehle. End with a line containing only ".;" to send to database, Beenden Sie mit Zeile, die nur "." enthlt, oder ":." um in den EditPuffer zu schreiben fr editieren oder speichern. ----------------------------------------------------------- hsqldb-1.8.0.10.orig/src/org/hsqldb/util/sqltool/special.help_de.text0000644000175000017500000000306110644325631024055 0ustar renereneSonderbefehle. Filterteilketten sind Schachtel-empfindlich. "SCHEMANAME." benutzen, um zu einem Schame zu verengen. \? Sonderbefehle Hilf \p [Zeile zu schreiben] Schreibt String zum stdout \i datei/pfad.sql Ausfhrt Befehle von uerlich Datei \d{tvsiSanur*?} [Teilk.] Verzeichnet Gegenstnde der spezifiziert Art: (Tbln/sichten/Seqn/Indexe/SysTbln/Aliases/schemaNamen/benUtzer/Roln/tbl-artig) \d OBJEKTNAME [Teilk.] Bescreibt Tabelle oder Sicht Spalten \o [datei/pfad.html] Tee (oder aufhrt) Abfrage Ausgabe zu spezif. Datei \H Schalt zwischen HTML Ausgabe Modus. \! BEFEHL [ARGE] Ausfhrt uerlich Programm (stdin nicht untersttzt) \c [true|false] Whren nach Fehler (i.g.z. Abbruch nach Fehler) \a [true|false] Automatisch Commit JDBC DML Befehle \b Speichert nchst Resultat zum Binrpuffer (kein zeigen) \bd datei/pfad.bin Gibt Binrpuffer zu Datei \bl datei/pfad.bin Ldt Date in den Binrpuffer \bp Benutzen Sie ? in nchste Anweisung um Binrpuffer hinaufzuladen. \. Eintrgt roh SQL. Beenden Sie mit Zeile mit nur "." \= Commit JDBC Transaktion \x {TABELLE|SELECT...} Export Tabelle oder Abfrage zu DSVTextdatei \m datei/pfas.dsv [*] iMportieren DSV Textdatei Datenstze in eine Tabelle \x? oder \m? fr Whlen. \q [Abbruchbotschaft] Gibt auf (oder beendet Input mit Ctrl-Z or Ctrl-D) hsqldb-1.8.0.10.orig/src/org/hsqldb/util/sqltool/SqlFile.banner_de.text0000644000175000017500000000217110651110406024300 0ustar renerene(SqlFile Bearbeiter v. %{1}) Weiterverbreitung ist zulssig unter den Bedinungen der HSQLDB Lizenz. (c) 2004-2007 Blaine Simpson and die HSQLDB Development Group. \q aufzuhren. \? listet Sonderbefehle. :? listet Editpuffer/History commands. *? listet PL Befehle. SONDER Befehle fangen mit \ an und fhren durch, wann Sie ENTER-Taste schlagen. EDIT-PUFFER / GESCHICHTE fangen mit : an und fhren durch, wann Sie ENTER-Taste schlagen. KOMMENTARE fangen mit /* an und and beenden mit allernchst */. VERFAHRENSSPRACHE Befehle fangen mit * an und fhren durch, wann Sie ENTER-Taste anschlagen. Alle weiteren Zeilen enthalten SQL Anweisungen. SQL Anweisungen werden entweder durch eine Leerzeile beendet (die die Anweisung in den Editpuffer verschiebt, onhe auszufhren) oder eina Ziele Ende mit ';' (das die Anweisung ausfhrt). SQL Befehle knnen mit '/PLVARNAME' fr einen PL Variablebefehlalias anfangen. Nach Variableexpansion bei der "*" Befehl (oder irgendeine andere Verfahrensbefehle), PL Variable knnen in irgendein Befehl (auerhalb : Befehle) wie so: *{PLVARNAME}. hsqldb-1.8.0.10.orig/src/org/hsqldb/util/sqltool/rejectreport.top_de.text0000644000175000017500000000405210641174724025022 0ustar renereneSqlTool DSV Reject Report

                Import performed %{1} with SqlTool.

                Input DSV file: %{2}

                Reject DSV file: %{3}

                %{4:+

                The corresponding records in '%4' are at line numbers of (reject # + 1), since the header record occupies the first line.

                }
                rej. # input
                line #
                bad column
                (if known)
                reason
                %{2} %{3} %{4}
                %{5}
                hsqldb-1.8.0.10.orig/src/org/hsqldb/util/sqltool/buffer.help.text0000644000175000017500000000422510653173413023240 0ustar renereneEDIT BUFFER AND HISTORY COMMANDS. Not available for non-interactive use. :? Edit buffer / history Help :h Show History of previous commands (plus buffer contents) :b List current contents of edit Buffer :X (integer X) Load command #X from Command history into the Edit buffer :-Y (integer -Y) Same as :X, except -Y means Y commands back :/regex/ Same as :-Y, except it means latest command in history matching the given regular expression The remaining edit/execute commands all operate on the Edit Buffer by default, but will also operate on any command from history if you interpose a command identifier right after the colon, like ":/blue/;" to re-execute the last command you ran which contains "blue", or ":w -3 /tmp/output.txt" to append the third command 'back' to a file. :; Execute edit buffer content (special, PL, or SQL command) :w file/path.sql Append current buffer contents to the specified file :a[text] Enter append mode with a copy of the buffer contents :s/from regex/to/ Substitute match of "from regex" with "to" :s/from/to/[igm;] One or multiple Substitutions with specified options from: Standard regexp. See 'perlre' man page or Java API spec for java.util.regex.Pattern. to: If empty, from's will be deleted (e.g. ":s/x//"). [igm;] Options work exactly as in Perl or java.util.regex, except ';' means to execute after substitution, 'g' means Global (multiple) substitutions, and option 's' is always on. /: Can actually be any character which occurs in neither "to" string nor "from" string. SUBSTITUTION MODE SWITCHES: i: case Insensitive g: Global (substitute ALL occurrences of "from" string) m: ^ and $ match line breaks (like Perl m option) ;: execute immediately after substitution hsqldb-1.8.0.10.orig/src/org/hsqldb/util/sqltool/raw.leadin.text0000644000175000017500000000032610636377401023066 0ustar renereneEnter RAW SQL. No \, :, * commands. End with a line containing only ".;" to send to database, or ":." to store to edit buffer for editing or saving. ----------------------------------------------------------- hsqldb-1.8.0.10.orig/src/org/hsqldb/util/ZaurusDatabaseManager.java0000644000175000017500000005240510416742505023515 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.util; import java.io.IOException; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; import java.awt.BorderLayout; import java.awt.Button; import java.awt.CardLayout; import java.awt.Dimension; import java.awt.FileDialog; import java.awt.Font; import java.awt.Frame; import java.awt.GridLayout; import java.awt.Insets; import java.awt.Menu; import java.awt.MenuBar; import java.awt.MenuItem; import java.awt.Panel; import java.awt.TextArea; import java.awt.Toolkit; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.KeyEvent; import java.awt.event.KeyListener; import java.awt.event.WindowListener; import java.awt.image.MemoryImageSource; import org.hsqldb.lib.java.JavaSystem; /** * Class declaration * * * @version 1.0.0.1 * @author ulrivo@users * */ public class ZaurusDatabaseManager extends DatabaseManager implements ActionListener, WindowListener, KeyListener { // (ulrivo): new buttons to switch the cards Button butTree; Button butCommand; Button butResult; Button butEditor; // (ulrivo): Panel pCard with CardLayout inside Frame fMain Panel pCard; CardLayout layoutCard; // the editor/input form ZaurusEditor eEditor; // (ulrivo): variables set by arguments from the commandline static String defDriver; static String defURL; static String defUser; static String defPassword; static String defQuery; static String defDirectory; static String defDatabase; static int defWidth = 237; static int defHeight = 259; static int defLocX = 0; static int defLocY = 0; /** * Method declaration * * * @param c */ public void connect(Connection c) { if (c == null) { return; } if (cConn != null) { try { cConn.close(); } catch (SQLException e) {} } cConn = c; try { dMeta = cConn.getMetaData(); sStatement = cConn.createStatement(); } catch (SQLException e) { e.printStackTrace(); } refreshTree(); } /** * Method declaration * * * @param arg */ public static void main(String[] arg) { bMustExit = true; // (ulrivo): read all arguments from the command line int i = 0; while (i < arg.length) { if (arg[i].equalsIgnoreCase("-driver") && (i + 1 < arg.length)) { i++; defDriver = arg[i]; } else if (arg[i].equalsIgnoreCase("-url") && (i + 1 < arg.length)) { i++; defURL = arg[i]; } else if (arg[i].equalsIgnoreCase("-width") && (i + 1 < arg.length)) { i++; try { defWidth = Integer.parseInt(arg[i]); } catch (Exception e) {} } else if (arg[i].equalsIgnoreCase("-height") && (i + 1 < arg.length)) { i++; try { defHeight = Integer.parseInt(arg[i]); } catch (Exception e) {} } else if (arg[i].equalsIgnoreCase("-locx") && (i + 1 < arg.length)) { i++; try { defLocX = Integer.parseInt(arg[i]); } catch (Exception e) {} } else if (arg[i].equalsIgnoreCase("-locy") && (i + 1 < arg.length)) { i++; try { defLocY = Integer.parseInt(arg[i]); } catch (Exception e) {} } else if (arg[i].equalsIgnoreCase("-user") && (i + 1 < arg.length)) { i++; defUser = arg[i]; } else if (arg[i].equalsIgnoreCase("-password") && (i + 1 < arg.length)) { i++; defPassword = arg[i]; } else if (arg[i].equalsIgnoreCase("-query") && (i + 1 < arg.length)) { i++; defQuery = arg[i]; } else if (arg[i].equalsIgnoreCase("-defDirectory") && (i + 1 < arg.length)) { i++; defDirectory = arg[i]; } else if (arg[i].equalsIgnoreCase("-database") && (i + 1 < arg.length)) { i++; defDatabase = arg[i]; } else { showUsage(); return; } i++; } ZaurusDatabaseManager m = new ZaurusDatabaseManager(); m.main(); // (ulrivo): make default connection if arguments set via the command line Connection c = null; if ((defDriver != null && defURL != null) || (defDatabase != null)) { if (defDatabase != null) { defDriver = "org.hsqldb.jdbcDriver"; defURL = "jdbc:hsqldb:" + defDatabase; defUser = "sa"; defPassword = ""; } try { Class.forName(defDriver).newInstance(); c = DriverManager.getConnection(defURL, defUser, defPassword); } catch (Exception e) { System.out.println("No connection for " + defDriver + " at " + defURL); e.printStackTrace(); } } else { c = ZaurusConnectionDialog.createConnection(m.fMain, "Connect", new Insets(defWidth, defHeight, defLocX, defLocY)); } if (c == null) { return; } m.connect(c); } private static void showUsage() { System.out.println( "Usage: java org.hsqldb.util.ZaurusDatabaseManager [options]"); System.out.println("where options could be:"); System.out.println( "If the next two options are set, the specified connection will be used:"); System.out.println(" -driver dr"); System.out.println(" -url address"); System.out.println("-user name"); System.out.println("-password passw"); System.out.println("Alternative the database argument is used,"); System.out.println( "and the hsqldb Driver Standalone is choosen for user 'sa'."); System.out.println("-database db"); System.out.println( "-query qu the query qu will be read during initialization"); System.out.println( "-defaultDirectory defdir default dir for the file open dialog"); System.out.println( "If the next two options are set, the frame will be set to the specified values:"); System.out.println(" -width width"); System.out.println(" -height height"); System.out.println("-locX positon left "); System.out.println("-locY positon top "); System.out.println(""); System.out.println( "1. Example: java org.hsqldb.util.ZaurusDatabaseManager +"); System.out.println(" -driver 'org.hsqldb.jdbcDriver' +"); System.out.println(" -url 'jdbc:hsqldb:test'"); System.out.println( "2. Example: java org.hsqldb.util.ZaurusDatabaseManager +"); System.out.println(" -database 'test'"); } /** * Method declaration * */ public void main() { fMain = new Frame("HSQLDB Database Manager for Zaurus"); imgEmpty = createImage(new MemoryImageSource(2, 2, new int[4 * 4], 2, 2)); fMain.setIconImage(imgEmpty); fMain.addWindowListener(this); MenuBar bar = new MenuBar(); // no shortcuts used String[] fitems = { "-Connect...", "--", "-Open Script...", "-Save Script...", "-Save Result...", "--", "-Exit" }; addMenu(bar, "File", fitems); String[] vitems = { "-Refresh Tree", "--", "-View Tree", "-View Command", "-View Result", "-View Editor", "--", "-Results in Grid", "-Results in Text" }; addMenu(bar, "View", vitems); String[] sitems = { "-SELECT", "-INSERT", "-UPDATE", "-DELETE", "--", "-CREATE TABLE", "-DROP TABLE", "-CREATE INDEX", "-DROP INDEX", "--", "-SCRIPT", "-SHUTDOWN", "--", "-Test Script" }; addMenu(bar, "SQL", sitems); Menu recent = new Menu("Recent"); mRecent = new Menu("Recent"); bar.add(mRecent); String[] soptions = { "-AutoCommit on", "-AutoCommit off", "-Commit", "-Rollback", "--", "-Disable MaxRows", "-Set MaxRows to 100", "--", "-Logging on", "-Logging off", "--", "-Insert test data" // , "-Transfer" }; addMenu(bar, "Options", soptions); String[] shelp = { "-Show HTML-Help in browser" }; addMenu(bar, "?", shelp); fMain.setMenuBar(bar); fMain.setSize(defWidth, defHeight); fMain.add("Center", this); initGUI(); sRecent = new String[iMaxRecent]; Dimension d = Toolkit.getDefaultToolkit().getScreenSize(); Dimension size = fMain.getSize(); // (ulrivo): arguments from command line or // full size on screen with less than 640 width if (d.width > 640) { fMain.setLocation((d.width - size.width) / 2, (d.height - size.height) / 2); } else if (defWidth > 0 && defHeight > 0) { fMain.setLocation(defLocX, defLocY); fMain.setSize(defWidth, defHeight); } else { fMain.setLocation(0, 0); fMain.setSize(d); } fMain.show(); // (ulrivo): load query from command line if (defQuery != null) { txtCommand.setText(DatabaseManagerCommon.readFile(defQuery)); } txtCommand.requestFocus(); } /** * Method declaration * * * @param k */ public void keyTyped(KeyEvent k) { // Strg+Enter or Shift+Enter executes the actual SQL statement in command panel if (k.getKeyChar() == '\n' && (k.isControlDown() || k.isShiftDown())) { k.consume(); execute(); layoutCard.show(pCard, "result"); } } public void keyPressed(KeyEvent k) { // System.out.println("Key pressed: " + k.getKeyCode()); } /** * Method declaration * * * @param ev */ public void actionPerformed(ActionEvent ev) { String s = ev.getActionCommand(); if (s == null) { if (ev.getSource() instanceof MenuItem) { MenuItem i; s = ((MenuItem) ev.getSource()).getLabel(); } } if (s.equals("Execute")) { execute(); layoutCard.show(pCard, "result"); } else if (s.equals("Tree")) { layoutCard.show(pCard, "tree"); } else if (s.equals("Command")) { layoutCard.show(pCard, "command"); } else if (s.equals("Result")) { layoutCard.show(pCard, "result"); } else if (s.equals("Editor")) { layoutCard.show(pCard, "editor"); } else if (s.equals("Exit")) { windowClosing(null); } else if (s.equals("Logging on")) { JavaSystem.setLogToSystem(true); } else if (s.equals("Logging off")) { JavaSystem.setLogToSystem(false); } else if (s.equals("Refresh Tree")) { refreshTree(); layoutCard.show(pCard, "tree"); } else if (s.startsWith("#")) { int i = Integer.parseInt(s.substring(1)); txtCommand.setText(sRecent[i]); } else if (s.equals("Connect...")) { connect(ZaurusConnectionDialog.createConnection(fMain, "Connect", new Insets(defWidth, defHeight, defLocX, defLocY))); refreshTree(); layoutCard.show(pCard, "tree"); } else if (s.equals("View Tree")) { layoutCard.show(pCard, "tree"); } else if (s.equals("View Command")) { layoutCard.show(pCard, "command"); } else if (s.equals("View Result")) { layoutCard.show(pCard, "result"); } else if (s.equals("View Editor")) { layoutCard.show(pCard, "editor"); } else if (s.equals("Results in Grid")) { iResult = 0; pResult.removeAll(); pResult.add("Center", gResult); pResult.doLayout(); layoutCard.show(pCard, "result"); } else if (s.equals("Open Script...")) { FileDialog f = new FileDialog(fMain, "Open Script", FileDialog.LOAD); // (ulrivo): set default directory if set from command line if (defDirectory != null) { f.setDirectory(defDirectory); } f.show(); String file = f.getFile(); if (file != null) { txtCommand.setText( DatabaseManagerCommon.readFile(f.getDirectory() + file)); } layoutCard.show(pCard, "command"); } else if (s.equals("Save Script...")) { FileDialog f = new FileDialog(fMain, "Save Script", FileDialog.SAVE); // (ulrivo): set default directory if set from command line if (defDirectory != null) { f.setDirectory(defDirectory); } f.show(); String file = f.getFile(); if (file != null) { DatabaseManagerCommon.writeFile(f.getDirectory() + file, txtCommand.getText()); } } else if (s.equals("Save Result...")) { FileDialog f = new FileDialog(fMain, "Save Result", FileDialog.SAVE); // (ulrivo): set default directory if set from command line if (defDirectory != null) { f.setDirectory(defDirectory); } f.show(); String file = f.getFile(); if (file != null) { showResultInText(); DatabaseManagerCommon.writeFile(f.getDirectory() + file, txtResult.getText()); } } else if (s.equals("Results in Text")) { iResult = 1; pResult.removeAll(); pResult.add("Center", txtResult); pResult.doLayout(); showResultInText(); layoutCard.show(pCard, "result"); } else if (s.equals("AutoCommit on")) { try { cConn.setAutoCommit(true); } catch (SQLException e) {} } else if (s.equals("AutoCommit off")) { try { cConn.setAutoCommit(false); } catch (SQLException e) {} } else if (s.equals("Commit")) { try { cConn.commit(); } catch (SQLException e) {} } else if (s.equals("Insert test data")) { insertTestData(); layoutCard.show(pCard, "result"); } else if (s.equals("Rollback")) { try { cConn.rollback(); } catch (SQLException e) {} } else if (s.equals("Disable MaxRows")) { try { sStatement.setMaxRows(0); } catch (SQLException e) {} } else if (s.equals("Set MaxRows to 100")) { try { sStatement.setMaxRows(100); } catch (SQLException e) {} } else if (s.equals("SELECT")) { showHelp(DatabaseManagerCommon.selectHelp); } else if (s.equals("INSERT")) { showHelp(DatabaseManagerCommon.insertHelp); } else if (s.equals("UPDATE")) { showHelp(DatabaseManagerCommon.updateHelp); } else if (s.equals("DELETE")) { showHelp(DatabaseManagerCommon.deleteHelp); } else if (s.equals("CREATE TABLE")) { showHelp(DatabaseManagerCommon.createTableHelp); } else if (s.equals("DROP TABLE")) { showHelp(DatabaseManagerCommon.dropTableHelp); } else if (s.equals("CREATE INDEX")) { showHelp(DatabaseManagerCommon.createIndexHelp); } else if (s.equals("DROP INDEX")) { showHelp(DatabaseManagerCommon.dropIndexHelp); } else if (s.equals("CHECKPOINT")) { showHelp(DatabaseManagerCommon.checkpointHelp); } else if (s.equals("SCRIPT")) { showHelp(DatabaseManagerCommon.scriptHelp); } else if (s.equals("SHUTDOWN")) { showHelp(DatabaseManagerCommon.shutdownHelp); } else if (s.equals("SET")) { showHelp(DatabaseManagerCommon.setHelp); } else if (s.equals("Test Script")) { showHelp(DatabaseManagerCommon.testHelp); } else if (s.equals("Show HTML-Help in browser")) { try { System.out.println("Starting Opera on index.html"); Runtime.getRuntime().exec(new String[] { "opera", "/home/QtPalmtop/help/html/hsqldb/index.html" }); } catch (IOException e) { System.out.println("A problem with Opera occured."); } } } /** * Method declaration * */ private void initGUI() { Panel pQuery = new Panel(); Panel pCommand = new Panel(); // define a Panel pCard which takes four different cards/views: // tree of tables, command SQL text area, result window and an editor/input form pCard = new Panel(); layoutCard = new CardLayout(2, 2); pCard.setLayout(layoutCard); // four buttons at the top to quickly switch between the four views butTree = new Button("Tree"); butCommand = new Button("Command"); butResult = new Button("Result"); butEditor = new Button("Editor"); butTree.addActionListener(this); butCommand.addActionListener(this); butResult.addActionListener(this); butEditor.addActionListener(this); Panel pButtons = new Panel(); pButtons.setLayout(new GridLayout(1, 4, 8, 8)); pButtons.add(butTree); pButtons.add(butCommand); pButtons.add(butResult); pButtons.add(butEditor); pResult = new Panel(); pQuery.setLayout(new BorderLayout()); pCommand.setLayout(new BorderLayout()); pResult.setLayout(new BorderLayout()); Font fFont = new Font("Dialog", Font.PLAIN, 12); txtCommand = new TextArea(5, 40); txtCommand.addKeyListener(this); txtResult = new TextArea(20, 40); txtCommand.setFont(fFont); txtResult.setFont(new Font("Courier", Font.PLAIN, 12)); butExecute = new Button("Execute"); butExecute.addActionListener(this); pCommand.add("South", butExecute); pCommand.add("Center", txtCommand); gResult = new Grid(); setLayout(new BorderLayout()); pResult.add("Center", gResult); tTree = new Tree(); tTree.setMinimumSize(new Dimension(200, 100)); gResult.setMinimumSize(new Dimension(200, 300)); eEditor = new ZaurusEditor(); pCard.add("tree", tTree); pCard.add("command", pCommand); pCard.add("result", pResult); pCard.add("editor", eEditor); fMain.add("Center", pCard); fMain.add("North", pButtons); doLayout(); fMain.pack(); } protected void refreshTree() { super.refreshTree(); eEditor.refresh(cConn); } } hsqldb-1.8.0.10.orig/src/org/hsqldb/util/DatabaseManager.java0000644000175000017500000012244710767515710022314 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.util; import java.applet.Applet; import java.io.File; import java.io.IOException; import java.sql.Connection; import java.sql.DatabaseMetaData; import java.sql.ResultSet; import java.sql.ResultSetMetaData; import java.sql.SQLException; import java.sql.Statement; import java.util.Vector; import java.awt.BorderLayout; import java.awt.Button; import java.awt.Color; import java.awt.Dimension; import java.awt.FileDialog; import java.awt.Font; import java.awt.Frame; import java.awt.Image; import java.awt.Menu; import java.awt.MenuBar; import java.awt.MenuItem; import java.awt.MenuShortcut; import java.awt.Panel; import java.awt.TextArea; import java.awt.Toolkit; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.KeyEvent; import java.awt.event.KeyListener; import java.awt.event.WindowEvent; import java.awt.event.WindowListener; import java.awt.image.MemoryImageSource; import org.hsqldb.lib.java.JavaSystem; // sqlbob@users 20020401 - patch 1.7.0 by sqlbob (RMP) - enhancements // sqlbob@users 20020401 - patch 537501 by ulrivo - command line arguments // sqlbob@users 20020407 - patch 1.7.0 - reengineering // nickferguson@users 20021005 - patch 1.7.1 - enhancements /* * unsaved@users 20050426 - Switched default switch method from "-switch" to * "--switch" because "-switch" usage is ambiguous as used here. Single * switches should * be reserved for single-letter switches which can be mixed like * "-u -r -l" = "-url". -blaine */ /** * AWT Tool for manageing a JDBC database.

                *

                 *             Usage: java DatabaseManagerSwing [--options]
                 *             where options include:
                 *              --driver   jdbc driver class
                 *              --url           jdbc url
                 *              --user          username used for connection
                 *              --password  password for this user
                 *              --urlid        get connection info from RC file
                 *              --rcfile        use instead of default (with urlid)
                 *              --dir           default directory
                 *              --script        reads from script file
                 *
                * * Originally in HypersonicSQL. Extended in various versions of HSQLDB. * * @author Thomas Mueller (Hypersonic SQL Group) * @version 1.8.0 * @since Hypersonic SQL */ public class DatabaseManager extends Applet implements ActionListener, WindowListener, KeyListener { private static final String DEFAULT_RCFILE = System.getProperty("user.home") + "/dbmanager.rc"; static final String NL = System.getProperty("line.separator"); static final int iMaxRecent = 24; private static boolean TT_AVAILABLE = false; //#ifdef JAVA2FULL static { try { Class.forName(DatabaseManager.class.getPackage().getName() + ".Transfer"); TT_AVAILABLE = true; } catch (Throwable t) {} } //#endif private static final String HELP_TEXT = "See the forums, mailing lists, and HSQLDB User Guide\n" + "at http://hsqldb.org.\n\n" + "Please paste the following version identifier with any\n" + "problem reports or help requests: $Revision: 1.37 $" + (TT_AVAILABLE ? "" : ("\n\nTransferTool classes are not in CLASSPATH.\n" + "To enable the Tools menu, add 'transfer.jar' to your class path.")); ; private static final String ABOUT_TEXT = "$Revision: 1.37 $ of DatabaseManagerSwing\n\n" + "Copyright (c) 1995-2000, The Hypersonic SQL Group.\n" + "Copyright (c) 2001-2007, The HSQL Development Group.\n" + "http://hsqldb.org (User Guide available at this site).\n\n\n" + "You may use and redistribute according to the HSQLDB\n" + "license documented in the source code and at the web\n" + "site above." // + (TT_AVAILABLE ? "\n\nTransferTool options are available." : ""); Connection cConn; DatabaseMetaData dMeta; Statement sStatement; Menu mRecent; String[] sRecent; int iRecent; TextArea txtCommand; Button butExecute; Button butClear; Tree tTree; Panel pResult; long lTime; int iResult; // 0: grid; 1: text Grid gResult; TextArea txtResult; boolean bHelp; Frame fMain; Image imgEmpty; static boolean bMustExit; String ifHuge = ""; // (ulrivo): variables set by arguments from the commandline static String defDriver = "org.hsqldb.jdbcDriver"; static String defURL = "jdbc:hsqldb:."; static String defUser = "sa"; static String defPassword = ""; static String defScript; static String defDirectory; /** * Method declaration * * * @param c */ public void connect(Connection c) { if (c == null) { return; } if (cConn != null) { try { cConn.close(); } catch (SQLException e) {} } cConn = c; try { dMeta = cConn.getMetaData(); sStatement = cConn.createStatement(); refreshTree(); } catch (SQLException e) { e.printStackTrace(); } } /** * Method declaration * */ public void init() { DatabaseManager m = new DatabaseManager(); m.main(); try { m.connect(ConnectionDialog.createConnection(defDriver, defURL, defUser, defPassword)); m.insertTestData(); m.refreshTree(); } catch (Exception e) { e.printStackTrace(); } } /** * Method declaration * * * @param arg */ public static void main(String[] arg) { System.getProperties().put("sun.java2d.noddraw", "true"); // (ulrivo): read all arguments from the command line String lowerArg; String urlid = null; String rcFile = null; boolean autoConnect = false; boolean urlidConnect = false; bMustExit = true; for (int i = 0; i < arg.length; i++) { lowerArg = arg[i].toLowerCase(); if (lowerArg.length() > 1 && lowerArg.charAt(1) == '-') { lowerArg = lowerArg.substring(1); } i++; if (i == arg.length) { showUsage(); return; } if (lowerArg.equals("-driver")) { defDriver = arg[i]; autoConnect = true; } else if (lowerArg.equals("-url")) { defURL = arg[i]; autoConnect = true; } else if (lowerArg.equals("-user")) { defUser = arg[i]; autoConnect = true; } else if (lowerArg.equals("-password")) { defPassword = arg[i]; autoConnect = true; } else if (lowerArg.equals("-urlid")) { urlid = arg[i]; urlidConnect = true; } else if (lowerArg.equals("-rcfile")) { rcFile = arg[i]; urlidConnect = true; } else if (lowerArg.equals("-dir")) { defDirectory = arg[i]; } else if (lowerArg.equals("-script")) { defScript = arg[i]; } else if (lowerArg.equals("-noexit")) { bMustExit = false; i--; } else { showUsage(); return; } } DatabaseManager m = new DatabaseManager(); m.main(); Connection c = null; try { if (autoConnect && urlidConnect) { throw new IllegalArgumentException( "You may not specify both (urlid) AND (url/user/password)."); } if (autoConnect) { c = ConnectionDialog.createConnection(defDriver, defURL, defUser, defPassword); } else if (urlidConnect) { if (urlid == null) { throw new IllegalArgumentException( "You must specify an 'urlid' to use an RC file"); } autoConnect = true; if (rcFile == null) { rcFile = DEFAULT_RCFILE; } c = new RCData(new File(rcFile), urlid).getConnection(null, System.getProperty("sqlfile.charset"), System.getProperty("javax.net.ssl.trustStore")); } else { c = ConnectionDialog.createConnection(m.fMain, "Connect"); } } catch (Exception e) { e.printStackTrace(); } if (c == null) { return; } m.connect(c); } private static void showUsage() { System.out.println( "Usage: java DatabaseManager [--options]\n" + "where options include:\n" + " --driver jdbc driver class\n" + " --url jdbc url\n" + " --user username used for connection\n" + " --password password for this user\n" + " --urlid use url/user/password/driver in rc file\n" + " --rcfile (defaults to 'dbmanager.rc' in home dir)\n" + " --dir default directory\n" + " --script reads from script file\n" + " --noexit do not call system.exit()\n" + "(Single-hypen switches like '-driver' are also supported)"); } /** * Method declaration * */ void insertTestData() { try { DatabaseManagerCommon.createTestTables(sStatement); refreshTree(); txtCommand.setText( DatabaseManagerCommon.createTestData(sStatement)); refreshTree(); for (int i = 0; i < DatabaseManagerCommon.testDataSql.length; i++) { addToRecent(DatabaseManagerCommon.testDataSql[i]); } execute(); } catch (SQLException e) { e.printStackTrace(); } } /** * Method declaration * */ public void main() { fMain = new Frame("HSQL Database Manager"); imgEmpty = createImage(new MemoryImageSource(2, 2, new int[4 * 4], 2, 2)); fMain.setIconImage(imgEmpty); fMain.addWindowListener(this); MenuBar bar = new MenuBar(); // used shortcuts: CERGTSIUDOLM String[] fitems = { "-Connect...", "--", "-Open Script...", "-Save Script...", "-Save Result...", "-Save Result csv...", "--", "-Exit" }; addMenu(bar, "File", fitems); String[] vitems = { "RRefresh Tree", "--", "GResults in Grid", "TResults in Text", "--", "1Shrink Tree", "2Enlarge Tree", "3Shrink Command", "4Enlarge Command" }; addMenu(bar, "View", vitems); String[] sitems = { "SSELECT", "IINSERT", "UUPDATE", "DDELETE", "--", "-CREATE TABLE", "-DROP TABLE", "-CREATE INDEX", "-DROP INDEX", "--", "-CHECKPOINT", "-SCRIPT", "-SET", "-SHUTDOWN", "--", "-Test Script" }; addMenu(bar, "Command", sitems); Menu recent = new Menu("Recent"); mRecent = new Menu("Recent"); bar.add(mRecent); String[] soptions = { "-AutoCommit on", "-AutoCommit off", "OCommit", "LRollback", "--", "-Disable MaxRows", "-Set MaxRows to 100", "--", "-Logging on", "-Logging off", "--", "-Insert test data" }; addMenu(bar, "Options", soptions); String[] stools = { "-Dump", "-Restore", "-Transfer" }; addMenu(bar, "Tools", stools); Menu hMenu = new Menu("Help"); MenuItem aItem = new MenuItem("About"); aItem.setShortcut(new MenuShortcut('A')); aItem.addActionListener(this); hMenu.add(aItem); MenuItem hItem = new MenuItem("Help"); hItem.setShortcut(new MenuShortcut('H')); hItem.addActionListener(this); hMenu.add(hItem); //bar.add(hMenu); // Command above disabled only until a help display bug is fixed. fMain.setMenuBar(bar); fMain.setSize(640, 480); fMain.add("Center", this); initGUI(); sRecent = new String[iMaxRecent]; Dimension d = Toolkit.getDefaultToolkit().getScreenSize(); Dimension size = fMain.getSize(); // (ulrivo): full size on screen with less than 640 width if (d.width >= 640) { fMain.setLocation((d.width - size.width) / 2, (d.height - size.height) / 2); } else { fMain.setLocation(0, 0); fMain.setSize(d); } fMain.show(); // (ulrivo): load query from command line if (defScript != null) { if (defDirectory != null) { defScript = defDirectory + File.separator + defScript; } txtCommand.setText(DatabaseManagerCommon.readFile(defScript)); } txtCommand.requestFocus(); } /** * Method declaration * * * @param b * @param name * @param items */ void addMenu(MenuBar b, String name, String[] items) { /* It's a very poor design to encapsulate menu creation this way. * Can't customize the menus this way (e.g. shortcut keys, * mnemonics, disabling, etc. */ Menu menu = new Menu(name); if (name.equals("Tools") && !TT_AVAILABLE) { // Terrible place to do this. Forced to due to method design. menu.setEnabled(false); } addMenuItems(menu, items); b.add(menu); } /** * Method declaration * * * @param f * @param m */ void addMenuItems(Menu f, String[] m) { for (int i = 0; i < m.length; i++) { MenuItem item = new MenuItem(m[i].substring(1)); char c = m[i].charAt(0); if (c != '-') { item.setShortcut(new MenuShortcut(c)); } item.addActionListener(this); f.add(item); } } /** * Method declaration * * * @param k */ public void keyPressed(KeyEvent k) {} /** * Method declaration * * * @param k */ public void keyReleased(KeyEvent k) {} /** * Method declaration * * * @param k */ public void keyTyped(KeyEvent k) { if (k.getKeyChar() == '\n' && k.isControlDown()) { k.consume(); execute(); } } /** * Method declaration * * * @param ev */ public void actionPerformed(ActionEvent ev) { String s = ev.getActionCommand(); if (s == null) { if (ev.getSource() instanceof MenuItem) { MenuItem i; s = ((MenuItem) ev.getSource()).getLabel(); } } if (s == null) {} else if (s.equals("Execute")) { execute(); } else if (s.equals("Clear")) { clear(); } else if (s.equals("Exit")) { windowClosing(null); } else if (s.equals("Transfer")) { Transfer.work(null); } else if (s.equals("Dump")) { Transfer.work(new String[]{ "-d" }); } else if (s.equals("Restore")) { Transfer.work(new String[]{ "-r" }); refreshTree(); } else if (s.equals("Logging on")) { JavaSystem.setLogToSystem(true); } else if (s.equals("Logging off")) { JavaSystem.setLogToSystem(false); } else if (s.equals("Help")) { showHelp(new String[] { "", HELP_TEXT }); } else if (s.equals("About")) { showHelp(new String[] { "", ABOUT_TEXT }); } else if (s.equals("Refresh Tree")) { refreshTree(); } else if (s.startsWith("#")) { int i = Integer.parseInt(s.substring(1)); txtCommand.setText(sRecent[i]); } else if (s.equals("Connect...")) { connect(ConnectionDialog.createConnection(fMain, "Connect")); refreshTree(); } else if (s.equals("Results in Grid")) { iResult = 0; pResult.removeAll(); pResult.add("Center", gResult); pResult.doLayout(); } else if (s.equals("Open Script...")) { FileDialog f = new FileDialog(fMain, "Open Script", FileDialog.LOAD); // (ulrivo): set default directory if set from command line if (defDirectory != null) { f.setDirectory(defDirectory); } f.show(); String file = f.getFile(); if (file != null) { StringBuffer buf = new StringBuffer(); ifHuge = DatabaseManagerCommon.readFile(f.getDirectory() + file); if (4096 <= ifHuge.length()) { buf.append( "This huge file cannot be edited.\n Please execute or clear\n"); txtCommand.setText(buf.toString()); } else { txtCommand.setText(ifHuge); } } } else if (s.equals("Save Script...")) { FileDialog f = new FileDialog(fMain, "Save Script", FileDialog.SAVE); // (ulrivo): set default directory if set from command line if (defDirectory != null) { f.setDirectory(defDirectory); } f.show(); String file = f.getFile(); if (file != null) { DatabaseManagerCommon.writeFile(f.getDirectory() + file, txtCommand.getText()); } } else if (s.equals("Save Result csv...")) { FileDialog f = new FileDialog(fMain, "Save Result CSV", FileDialog.SAVE); // (ulrivo): set default directory if set from command line if (defDirectory != null) { f.setDirectory(defDirectory); } f.show(); String dir = f.getDirectory(); String file = f.getFile(); if (dir != null) { file = dir + "/" + file; } if (file != null) { showResultInText(); saveAsCsv(file); } } else if (s.equals("Save Result...")) { FileDialog f = new FileDialog(fMain, "Save Result", FileDialog.SAVE); // (ulrivo): set default directory if set from command line if (defDirectory != null) { f.setDirectory(defDirectory); } f.show(); String file = f.getFile(); if (file != null) { showResultInText(); DatabaseManagerCommon.writeFile(f.getDirectory() + file, txtResult.getText()); } } else if (s.equals("Results in Text")) { iResult = 1; pResult.removeAll(); pResult.add("Center", txtResult); pResult.doLayout(); showResultInText(); } else if (s.equals("AutoCommit on")) { try { cConn.setAutoCommit(true); } catch (SQLException e) {} } else if (s.equals("AutoCommit off")) { try { cConn.setAutoCommit(false); } catch (SQLException e) {} } else if (s.equals("Enlarge Tree")) { Dimension d = tTree.getMinimumSize(); d.width += 20; tTree.setMinimumSize(d); fMain.pack(); } else if (s.equals("Shrink Tree")) { Dimension d = tTree.getMinimumSize(); d.width -= 20; if (d.width >= 0) { tTree.setMinimumSize(d); } fMain.pack(); } else if (s.equals("Enlarge Command")) { txtCommand.setRows(txtCommand.getRows() + 1); fMain.pack(); } else if (s.equals("Shrink Command")) { int i = txtCommand.getRows() - 1; txtCommand.setRows(i < 1 ? 1 : i); fMain.pack(); } else if (s.equals("Commit")) { try { cConn.commit(); } catch (SQLException e) {} } else if (s.equals("Insert test data")) { insertTestData(); } else if (s.equals("Rollback")) { try { cConn.rollback(); } catch (SQLException e) {} } else if (s.equals("Disable MaxRows")) { try { sStatement.setMaxRows(0); } catch (SQLException e) {} } else if (s.equals("Set MaxRows to 100")) { try { sStatement.setMaxRows(100); } catch (SQLException e) {} } else if (s.equals("SELECT")) { showHelp(DatabaseManagerCommon.selectHelp); } else if (s.equals("INSERT")) { showHelp(DatabaseManagerCommon.insertHelp); } else if (s.equals("UPDATE")) { showHelp(DatabaseManagerCommon.updateHelp); } else if (s.equals("DELETE")) { showHelp(DatabaseManagerCommon.deleteHelp); } else if (s.equals("CREATE TABLE")) { showHelp(DatabaseManagerCommon.createTableHelp); } else if (s.equals("DROP TABLE")) { showHelp(DatabaseManagerCommon.dropTableHelp); } else if (s.equals("CREATE INDEX")) { showHelp(DatabaseManagerCommon.createIndexHelp); } else if (s.equals("DROP INDEX")) { showHelp(DatabaseManagerCommon.dropIndexHelp); } else if (s.equals("CHECKPOINT")) { showHelp(DatabaseManagerCommon.checkpointHelp); } else if (s.equals("SCRIPT")) { showHelp(DatabaseManagerCommon.scriptHelp); } else if (s.equals("SHUTDOWN")) { showHelp(DatabaseManagerCommon.shutdownHelp); } else if (s.equals("SET")) { showHelp(DatabaseManagerCommon.setHelp); } else if (s.equals("Test Script")) { showHelp(DatabaseManagerCommon.testHelp); } } /** * Method declaration * * * @param s * @param help */ void showHelp(String[] help) { txtCommand.setText(help[0]); txtResult.setText(help[1]); bHelp = true; pResult.removeAll(); pResult.add("Center", txtResult); pResult.doLayout(); txtCommand.requestFocus(); txtCommand.setCaretPosition(help[0].length()); } /** * Method declaration * * * @param e */ public void windowActivated(WindowEvent e) {} /** * Method declaration * * * @param e */ public void windowDeactivated(WindowEvent e) {} /** * Method declaration * * * @param e */ public void windowClosed(WindowEvent e) {} /** * Method declaration * * * @param ev */ public void windowClosing(WindowEvent ev) { try { if (cConn != null) { cConn.close(); } } catch (Exception e) {} fMain.dispose(); if (bMustExit) { System.exit(0); } } /** * Method declaration * * * @param e */ public void windowDeiconified(WindowEvent e) {} /** * Method declaration * * * @param e */ public void windowIconified(WindowEvent e) {} /** * Method declaration * * * @param e */ public void windowOpened(WindowEvent e) {} /** * Method declaration * Clear SQL Statements. */ void clear() { ifHuge = ""; txtCommand.setText(ifHuge); } /** * Method declaration * Adjust this method for large strings...ie multi megabtypes. */ void execute() { String sCmd = null; if (4096 <= ifHuge.length()) { sCmd = ifHuge; } else { sCmd = txtCommand.getText(); } if (sCmd.startsWith("-->>>TEST<<<--")) { testPerformance(); return; } String[] g = new String[1]; lTime = System.currentTimeMillis(); try { if (sStatement == null) { return; } sStatement.execute(sCmd); lTime = System.currentTimeMillis() - lTime; int r = sStatement.getUpdateCount(); if (r == -1) { formatResultSet(sStatement.getResultSet()); } else { g[0] = "update count"; gResult.setHead(g); g[0] = String.valueOf(r); gResult.addRow(g); } addToRecent(txtCommand.getText()); } catch (SQLException e) { lTime = System.currentTimeMillis() - lTime; g[0] = "SQL Error"; gResult.setHead(g); String s = e.getMessage(); s += " / Error Code: " + e.getErrorCode(); s += " / State: " + e.getSQLState(); g[0] = s; gResult.addRow(g); } updateResult(); System.gc(); } /** * Method declaration * */ void updateResult() { if (iResult == 0) { // in case 'help' has removed the grid if (bHelp) { pResult.removeAll(); pResult.add("Center", gResult); pResult.doLayout(); bHelp = false; } gResult.update(); gResult.repaint(); } else { showResultInText(); } txtCommand.selectAll(); txtCommand.requestFocus(); } /** * Method declaration * * * @param r */ void formatResultSet(ResultSet r) { if (r == null) { String[] g = new String[1]; g[0] = "Result"; gResult.setHead(g); g[0] = "(empty)"; gResult.addRow(g); return; } try { ResultSetMetaData m = r.getMetaData(); int col = m.getColumnCount(); String[] h = new String[col]; for (int i = 1; i <= col; i++) { h[i - 1] = m.getColumnLabel(i); } gResult.setHead(h); while (r.next()) { for (int i = 1; i <= col; i++) { try { h[i - 1] = r.getString(i); if (r.wasNull()) { h[i - 1] = "(null)"; } } catch (SQLException e) {} } gResult.addRow(h); } r.close(); } catch (SQLException e) {} } /** * Method declaration * */ void testPerformance() { String all = txtCommand.getText(); StringBuffer b = new StringBuffer(); long total = 0; for (int i = 0; i < all.length(); i++) { char c = all.charAt(i); if (c != '\n') { b.append(c); } } all = b.toString(); String[] g = new String[4]; g[0] = "ms"; g[1] = "count"; g[2] = "sql"; g[3] = "error"; gResult.setHead(g); int max = 1; lTime = System.currentTimeMillis() - lTime; while (!all.equals("")) { int i = all.indexOf(';'); String sql; if (i != -1) { sql = all.substring(0, i); all = all.substring(i + 1); } else { sql = all; all = ""; } if (sql.startsWith("--#")) { max = Integer.parseInt(sql.substring(3)); continue; } else if (sql.startsWith("--")) { continue; } g[2] = sql; long l = 0; try { l = DatabaseManagerCommon.testStatement(sStatement, sql, max); total += l; g[0] = String.valueOf(l); g[1] = String.valueOf(max); g[3] = ""; } catch (SQLException e) { g[0] = g[1] = "n/a"; g[3] = e.toString(); } gResult.addRow(g); System.out.println(l + " ms : " + sql); } g[0] = "" + total; g[1] = "total"; g[2] = ""; gResult.addRow(g); lTime = System.currentTimeMillis() - lTime; updateResult(); } void saveAsCsv(String filename) { try { File file = new File(filename); CSVWriter writer = new CSVWriter(file, null); String[] col = gResult.getHead(); int width = col.length; Vector data = gResult.getData(); String[] row; int height = data.size(); writer.writeHeader(col); for (int i = 0; i < height; i++) { row = (String[]) data.elementAt(i); String[] myRow = new String[row.length]; for (int j = 0; j < row.length; j++) { String r = row[j]; if (r.equals("(null)")) { // null is formatted as (null) r = ""; } myRow[j] = r; } writer.writeData(myRow); } writer.close(); } catch (IOException e) { throw new RuntimeException("IOError: " + e.getMessage()); } } /** * Method declaration * */ void showResultInText() { String[] col = gResult.getHead(); int width = col.length; int[] size = new int[width]; Vector data = gResult.getData(); String[] row; int height = data.size(); for (int i = 0; i < width; i++) { size[i] = col[i].length(); } for (int i = 0; i < height; i++) { row = (String[]) data.elementAt(i); for (int j = 0; j < width; j++) { int l = row[j].length(); if (l > size[j]) { size[j] = l; } } } StringBuffer b = new StringBuffer(); for (int i = 0; i < width; i++) { b.append(col[i]); for (int l = col[i].length(); l <= size[i]; l++) { b.append(' '); } } b.append(NL); for (int i = 0; i < width; i++) { for (int l = 0; l < size[i]; l++) { b.append('-'); } b.append(' '); } b.append(NL); for (int i = 0; i < height; i++) { row = (String[]) data.elementAt(i); for (int j = 0; j < width; j++) { b.append(row[j]); for (int l = row[j].length(); l <= size[j]; l++) { b.append(' '); } } b.append(NL); } b.append(NL + height + " row(s) in " + lTime + " ms"); txtResult.setText(b.toString()); } /** * Method declaration * * * @param s */ private void addToRecent(String s) { for (int i = 0; i < iMaxRecent; i++) { if (s.equals(sRecent[i])) { return; } } if (sRecent[iRecent] != null) { mRecent.remove(iRecent); } sRecent[iRecent] = s; if (s.length() > 43) { s = s.substring(0, 40) + "..."; } MenuItem item = new MenuItem(s); item.setActionCommand("#" + iRecent); item.addActionListener(this); mRecent.insert(item, iRecent); iRecent = (iRecent + 1) % iMaxRecent; } /** * Method declaration * */ private void initGUI() { Panel pQuery = new Panel(); Panel pCommand = new Panel(); pResult = new Panel(); pQuery.setLayout(new BorderLayout()); pCommand.setLayout(new BorderLayout()); pResult.setLayout(new BorderLayout()); Font fFont = new Font("Dialog", Font.PLAIN, 12); txtCommand = new TextArea(5, 40); txtCommand.addKeyListener(this); txtResult = new TextArea(20, 40); txtCommand.setFont(fFont); txtResult.setFont(new Font("Courier", Font.PLAIN, 12)); butExecute = new Button("Execute"); butClear = new Button("Clear"); butExecute.addActionListener(this); butClear.addActionListener(this); pCommand.add("East", butExecute); pCommand.add("West", butClear); pCommand.add("Center", txtCommand); gResult = new Grid(); setLayout(new BorderLayout()); pResult.add("Center", gResult); pQuery.add("North", pCommand); pQuery.add("Center", pResult); fMain.add("Center", pQuery); tTree = new Tree(); // (ulrivo): screen with less than 640 width Dimension d = Toolkit.getDefaultToolkit().getScreenSize(); if (d.width >= 640) { tTree.setMinimumSize(new Dimension(200, 100)); } else { tTree.setMinimumSize(new Dimension(80, 100)); } gResult.setMinimumSize(new Dimension(200, 300)); fMain.add("West", tTree); doLayout(); fMain.pack(); } /** * Method declaration * */ protected void refreshTree() { tTree.removeAll(); try { int color_table = Color.yellow.getRGB(); int color_column = Color.orange.getRGB(); int color_index = Color.red.getRGB(); tTree.addRow("", dMeta.getURL(), "-", 0); String[] usertables = { "TABLE", "GLOBAL TEMPORARY", "VIEW" }; // fredt@users Schema support Vector schemas = new Vector(); Vector tables = new Vector(); // sqlbob@users Added remarks. Vector remarks = new Vector(); ResultSet result = dMeta.getTables(null, null, null, usertables); try { while (result.next()) { schemas.addElement(result.getString(2)); tables.addElement(result.getString(3)); remarks.addElement(result.getString(5)); } } finally { result.close(); } for (int i = 0; i < tables.size(); i++) { String name = (String) tables.elementAt(i); String schema = (String) schemas.elementAt(i); String key = "tab-" + name + "-"; tTree.addRow(key, name, "+", color_table); // sqlbob@users Added remarks. String remark = (String) remarks.elementAt(i); if ((schema != null) && !schema.trim().equals("")) { tTree.addRow(key + "s", "schema: " + schema); } if ((remark != null) && !remark.trim().equals("")) { tTree.addRow(key + "r", " " + remark); } ResultSet col = dMeta.getColumns(null, schema, name, null); try { while (col.next()) { String c = col.getString(4); String k1 = key + "col-" + c + "-"; tTree.addRow(k1, c, "+", color_column); String type = col.getString(6); tTree.addRow(k1 + "t", "Type: " + type); boolean nullable = col.getInt(11) != DatabaseMetaData.columnNoNulls; tTree.addRow(k1 + "n", "Nullable: " + nullable); } } finally { col.close(); } tTree.addRow(key + "ind", "Indices", "+", 0); ResultSet ind = dMeta.getIndexInfo(null, schema, name, false, false); String oldiname = null; try { while (ind.next()) { boolean nonunique = ind.getBoolean(4); String iname = ind.getString(6); String k2 = key + "ind-" + iname + "-"; if ((oldiname == null || !oldiname.equals(iname))) { tTree.addRow(k2, iname, "+", color_index); tTree.addRow(k2 + "u", "Unique: " + !nonunique); oldiname = iname; } String c = ind.getString(9); tTree.addRow(k2 + "c-" + c + "-", c); } } finally { ind.close(); } } tTree.addRow("p", "Properties", "+", 0); tTree.addRow("pu", "User: " + dMeta.getUserName()); tTree.addRow("pr", "ReadOnly: " + cConn.isReadOnly()); tTree.addRow("pa", "AutoCommit: " + cConn.getAutoCommit()); tTree.addRow("pd", "Driver: " + dMeta.getDriverName()); tTree.addRow("pp", "Product: " + dMeta.getDatabaseProductName()); tTree.addRow("pv", "Version: " + dMeta.getDatabaseProductVersion()); } catch (SQLException e) { tTree.addRow("", "Error getting metadata:", "-", 0); tTree.addRow("-", e.getMessage()); tTree.addRow("-", e.getSQLState()); } tTree.update(); } } hsqldb-1.8.0.10.orig/src/org/hsqldb/util/Traceable.java0000644000175000017500000000343710416742504021166 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.util; // sqlbob@users 20020407 - patch 1.7.0 - reengineering /** * * @version 1.7.0 */ interface Traceable { boolean TRACE = Boolean.getBoolean("hsqldb.util.trace"); void trace(String s); } hsqldb-1.8.0.10.orig/src/org/hsqldb/util/Clear.png0000644000175000017500000000170510203123260020153 0ustar renerenePNG  IHDRVΎWbKGD pHYs  tIME2RIDATxuKoeόv%4B  @Jlٲb Ra JRADZ6 ixw #JH;|99φSԧLp8a躎i?L&πChyM`iyi՛7oλ1NZ{P*;]@'|OĄLLV _՗q!J=aڭ5(}_\!KSotGGG<}Lir˫,-]d>/mm="D˲YX0 \TZ= e?t\EQp]* mͥE\Ae,; L m$I&K1T*д Axfڭ΍Cr2LL1>m]L\BU[hzޣ;w7}n26L&*1FUUvӑTo>ښֹaOn ˚b&ݞeh^鄟7P?(_L`zܻ#FX,F^ö@<% 17"Q(DY]]!ɳM*QitAFCGuD@$`H$J6#L y?P(HA  &)r$.\'#I>dYBY(z 8lΖQH]r@в,T>3M i$ ea&=q\rq\/ljg '($qi6똦IݢQIwfޓ~Ux x;3000"); setRecent("select * from place where code>3000 or code=1200"); setRecent("select * from Customer where nr<=8\nand name<>'Mueller'"); setRecent("update Customer set name='Russi'\nwhere name='Rossi'"); setRecent("delete from Customer where place=8000"); setRecent("insert into place values(3600,'Thun')"); setRecent("drop index Customer.iNr"); setRecent("select * from Customer where name like '%e%'"); setRecent("select count(*),min(code),max(code),sum(code) from place"); String s = "select * from Customer,place\n" + "where Customer.place=place.code\n" + "and place.name='Berne'"; setRecent(s); txtCommand.setText(s); txtCommand.selectAll(); } /** * Method declaration * */ static void printHelp() { System.out.println( "Usage: java QueryTool [-options]\n" + "where options include:\n" + " -driver name of the driver class\n" + " -url first part of the jdbc url\n" + " -database second part of the jdbc url\n" + " -user username used for connection\n" + " -password password for this user\n" + " -test insert test data\n" + " -log write log to system out"); System.exit(0); } /** * Method declaration * * * @param e */ public void windowActivated(WindowEvent e) {} /** * Method declaration * * * @param e */ public void windowDeactivated(WindowEvent e) {} /** * Method declaration * * * @param e */ public void windowClosed(WindowEvent e) {} /** * Method declaration * * * @param ev */ public void windowClosing(WindowEvent ev) { try { cConn.close(); } catch (Exception e) {} if (fMain != null) { fMain.dispose(); } System.exit(0); } /** * Method declaration * * * @param e */ public void windowDeiconified(WindowEvent e) {} /** * Method declaration * * * @param e */ public void windowIconified(WindowEvent e) {} /** * Method declaration * * * @param e */ public void windowOpened(WindowEvent e) {} /** * Method declaration * * * @param ev */ public void actionPerformed(ActionEvent ev) { String s = ev.getActionCommand(); if (s != null && s.equals("Exit")) { windowClosing(null); } } } hsqldb-1.8.0.10.orig/src/org/hsqldb/util/ZaurusTextField.java0000644000175000017500000000534210416742505022404 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.util; import java.awt.Color; import java.awt.TextField; /** * Class declaration * * * @author ulrivo@users * @version 1.0.0 */ // a TextField for the GUI which implements ZaurusComponent // public class ZaurusTextField extends TextField implements ZaurusComponent { int countChanges; public ZaurusTextField(int i) { super(i); countChanges = 0; } public void clearChanges() { countChanges = 0; } public void clearContent() { super.setText(""); } public String getContent() { return super.getText(); } // the initially setText increments the counter public boolean hasChanged() { return countChanges > 1; } public void requestFocus() { super.requestFocus(); } public void setChanged() { countChanges++; } public void setContent(String s) { super.setText(s); } public void setEditable(boolean b) { super.setEditable(b); if (b) { super.setBackground(Color.white); } else { super.setBackground(Color.lightGray); } // end of if (b)else } } hsqldb-1.8.0.10.orig/src/org/hsqldb/util/TransferHelper.java0000644000175000017500000001220710416742505022224 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.util; import java.sql.ResultSet; import java.sql.ResultSetMetaData; import java.sql.SQLException; import java.util.Hashtable; /** * Base class for conversion from a different databases * * @author sqlbob@users * @version 1.7.0 */ class TransferHelper { protected TransferDb db; protected Traceable tracer; protected String sSchema; protected JDBCTypes JDBCT; private String quote; TransferHelper() { db = null; tracer = null; quote = "\'"; JDBCT = new JDBCTypes(); } TransferHelper(TransferDb database, Traceable t, String q) { db = database; tracer = t; quote = q; JDBCT = new JDBCTypes(); } void set(TransferDb database, Traceable t, String q) { db = database; tracer = t; quote = q; } String formatIdentifier(String id) { if (id == null) { return id; } if (id.equals("")) { return id; } if (!Character.isLetter(id.charAt(0)) || (id.indexOf(' ') != -1)) { return (quote + id + quote); } return id; } void setSchema(String _Schema) { sSchema = _Schema; } String formatName(String t) { String Name = ""; if ((sSchema != null) && (sSchema.length() > 0)) { Name = sSchema + "."; } Name += formatIdentifier(t); return Name; } int convertFromType(int type) { return (type); } int convertToType(int type) { return (type); } Hashtable getSupportedTypes() { Hashtable hTypes = new Hashtable(); if (db != null) { try { ResultSet result = db.meta.getTypeInfo(); while (result.next()) { Integer intobj = new Integer(result.getShort(2)); if (hTypes.get(intobj) == null) { try { hTypes.put(intobj, JDBCT.toString(result.getShort(2))); } catch (Exception e) {} } } result.close(); } catch (SQLException e) {} } if (hTypes.isEmpty()) { hTypes = JDBCT.getHashtable(); } return hTypes; } String fixupColumnDefRead(TransferTable t, ResultSetMetaData meta, String columnType, ResultSet columnDesc, int columnIndex) throws SQLException { return (columnType); } String fixupColumnDefWrite(TransferTable t, ResultSetMetaData meta, String columnType, ResultSet columnDesc, int columnIndex) throws SQLException { return (columnType); } boolean needTransferTransaction() { return (false); } Object convertColumnValue(Object value, int column, int type) { return (value); } void beginDataTransfer() {} void endDataTransfer() {} String fixupColumnDefRead(String aTableName, ResultSetMetaData meta, String columnType, ResultSet columnDesc, int columnIndex) throws SQLException { return columnType; } String fixupColumnDefWrite(String aTableName, ResultSetMetaData meta, String columnType, ResultSet columnDesc, int columnIndex) throws SQLException { return columnType; } } hsqldb-1.8.0.10.orig/src/org/hsqldb/util/TransferSQLText.java0000644000175000017500000007107710416742505022323 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.util; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; import java.sql.SQLException; import java.util.Enumeration; import java.util.Hashtable; import java.util.NoSuchElementException; import java.util.StringTokenizer; import java.util.Vector; /** * @author Nicolas BAZIN, INGENICO * @version 1.7.0 */ class TransferSQLText extends DataAccessPoint { String sFileName = null; BufferedWriter WTextWrite = null; BufferedReader WTextRead = null; protected boolean StructureAlreadyParsed = false; Hashtable DbStmts = null; protected JDBCTypes JDBCT = null; TransferSQLText(String _FileName, Traceable t) throws DataAccessPointException { super(t); sFileName = _FileName; JDBCT = new JDBCTypes(); if (sFileName == null) { throw new DataAccessPointException("File name not initialized"); } } boolean execute(String statement) throws DataAccessPointException { if (WTextWrite == null) { try { WTextWrite = new BufferedWriter(new FileWriter(sFileName)); } catch (IOException e) { throw new DataAccessPointException(e.getMessage()); } } try { WTextWrite.write(statement + "\n"); WTextWrite.flush(); } catch (IOException e) { throw new DataAccessPointException(e.getMessage()); } return true; } void putData(String statement, TransferResultSet r, int iMaxRows) throws DataAccessPointException { int i = 0; if (r == null) { return; } if (WTextWrite == null) { try { WTextWrite = new BufferedWriter(new FileWriter(sFileName)); } catch (IOException e) { throw new DataAccessPointException(e.getMessage()); } } try { while (r.next()) { if (i == 0) { WTextWrite.write(statement + "\n"); WTextWrite.flush(); } transferRow(r); if (iMaxRows != 0 && i == iMaxRows) { break; } i++; if (iMaxRows != 0 || i % 100 == 0) { tracer.trace("Transfered " + i + " rows"); } } } catch (Exception e) { throw new DataAccessPointException(e.getMessage()); } finally { try { if (i > 0) { WTextWrite.write("\tNumber of Rows=" + i + "\n\n"); WTextWrite.flush(); } } catch (IOException e) { throw new DataAccessPointException(e.getMessage()); } } } void close() throws DataAccessPointException { if (WTextWrite != null) { try { WTextWrite.flush(); WTextWrite.close(); } catch (IOException e) {} } } /** * Method declaration * * * @param type * @param r * @param p * * @throws SQLException */ private void transferRow(TransferResultSet r) throws Exception { String sLast = ""; int len = r.getColumnCount(); if (WTextWrite == null) { try { WTextWrite = new BufferedWriter(new FileWriter(sFileName)); } catch (IOException e) { throw new DataAccessPointException(e.getMessage()); } } for (int i = 0; i < len; i++) { int t = r.getColumnType(i + 1); sLast = "column=" + r.getColumnName(i + 1) + " datatype=" + (String) helper.getSupportedTypes().get(new Integer(t)); Object o = r.getObject(i + 1); if (o == null) { sLast += " value="; } else { o = helper.convertColumnValue(o, i + 1, t); sLast += " value=\'" + o.toString() + "\'"; } WTextWrite.write("\t" + sLast + "\n"); WTextWrite.flush(); } WTextWrite.write("\n"); WTextWrite.flush(); sLast = ""; } class ColumnDef { String columnName; String columnType; String options; int start; int len; public ColumnDef() { columnName = ""; columnType = ""; options = ""; start = 0; len = 0; } } ColumnDef getColumnDef(String ColumnsDesc, int curPos) { int nextPos = 0; ColumnDef columnDef = new TransferSQLText.ColumnDef(); columnDef.start = curPos; if ((ColumnsDesc == null) || (ColumnsDesc.length() == 0) || (curPos >= ColumnsDesc.length())) { return new TransferSQLText.ColumnDef(); } String stbuff = ColumnsDesc.substring(curPos); try { int i = 0; for (; i < stbuff.length(); i++) { int c = stbuff.charAt(i); if (c == ',' || c == ' ' || c == ')' || c == ';') { continue; } else { break; } } if (i == stbuff.length()) { return new TransferSQLText.ColumnDef(); } columnDef.len += i; stbuff = stbuff.substring(i); while (stbuff.charAt(nextPos) != ' ') { nextPos++; } columnDef.columnName = stbuff.substring(0, nextPos); stbuff = stbuff.substring(nextPos); columnDef.len += nextPos; nextPos = 0; if (!columnDef.columnName.toUpperCase().equals("CONSTRAINT")) { i = 0; for (; i < stbuff.length() && stbuff.charAt(i) == ' '; i++) {} stbuff = stbuff.substring(i); columnDef.len += i; while ((stbuff.charAt(nextPos) != '(') && (stbuff.charAt(nextPos) != ',') && (stbuff.charAt(nextPos) != ')') && (stbuff.charAt(nextPos) != ';') && (stbuff.charAt(nextPos) != ' ')) { nextPos++; } columnDef.columnType = stbuff.substring(0, nextPos).toUpperCase(); stbuff = stbuff.substring(nextPos); columnDef.len += nextPos; nextPos = 0; } while ((stbuff.charAt(nextPos) != ',') && (stbuff.charAt(nextPos) != ';') && (nextPos < stbuff.length()) && (stbuff.charAt(nextPos) != ')')) { if (stbuff.charAt(nextPos) == '(') { while (stbuff.charAt(nextPos) != ')') { nextPos++; } } nextPos++; } columnDef.options = stbuff.substring(0, nextPos); columnDef.len += nextPos; } catch (Exception e) { columnDef = new TransferSQLText.ColumnDef(); } return columnDef; } String translateTypes(String CreateLine, TransferTable TTable, DataAccessPoint Dest) throws DataAccessPointException { String translatedLine = ""; JDBCTypes JDBCT = new JDBCTypes(); int currentPos = 0; String columnName = ""; String columnType = ""; int colnum = 0; ColumnDef cDef; currentPos = CreateLine.indexOf('(') + 1; translatedLine = CreateLine.substring(0, currentPos); do { cDef = getColumnDef(CreateLine, currentPos); if (cDef.len == 0) { break; } columnName = cDef.columnName; columnType = cDef.columnType; if (columnName.toUpperCase().indexOf("CONSTRAINT") >= 0) { translatedLine += CreateLine.substring(currentPos, currentPos + cDef.len) + ","; currentPos += cDef.len + 1; colnum++; continue; } columnName = Dest.helper.formatIdentifier(columnName) + " "; try { Integer inttype = new Integer( Dest.helper.convertToType(JDBCT.toInt(columnType))); columnType = (String) TTable.hTypes.get(inttype); } catch (Exception JDBCtypeEx) {} if (cDef.options != null) { columnType += cDef.options; } try { columnType = Dest.helper.fixupColumnDefWrite(TTable, null, columnType, null, colnum); } catch (SQLException SQLe) { return CreateLine; } translatedLine += columnName + " " + columnType + ","; currentPos += cDef.len + 1; colnum++; } while (true); return translatedLine.substring(0, translatedLine.length() - 1) + ");"; } void parseFileForTables() throws DataAccessPointException { StringTokenizer Tokenizer; if (WTextRead == null) { try { WTextRead = new BufferedReader(new FileReader(sFileName)); } catch (IOException e) { throw new DataAccessPointException(e.getMessage()); } } String currentLine = ""; String Token = ""; String name = ""; TransferTable relatedTable = null; try { while ((currentLine = WTextRead.readLine()) != null) { currentLine = currentLine.trim() + ";"; Tokenizer = new StringTokenizer(currentLine); try { Token = Tokenizer.nextToken(); } catch (NoSuchElementException NSE) { continue; } if (Token == null) { continue; } if (!Token.toUpperCase().equals("CREATE")) { continue; } Token = Tokenizer.nextToken().toUpperCase(); if (Token.equals("TABLE") || Token.equals("VIEW")) { try { name = Tokenizer.nextToken(" (;"); relatedTable = new TransferTable(this, name, "", Token, tracer); relatedTable.Stmts.bCreate = false; relatedTable.Stmts.bDelete = false; relatedTable.Stmts.bDrop = false; relatedTable.Stmts.bCreateIndex = false; relatedTable.Stmts.bDropIndex = false; relatedTable.Stmts.bInsert = false; relatedTable.Stmts.bAlter = false; DbStmts.put(relatedTable.Stmts.sSourceTable, relatedTable); } catch (NoSuchElementException NSE) { continue; } } } } catch (Exception IOe) { throw new DataAccessPointException(IOe.getMessage()); } } void parseFileForTheRest(TransferTable TTable, DataAccessPoint Dest) throws DataAccessPointException { StringTokenizer Tokenizer; StructureAlreadyParsed = true; if (WTextRead == null) { try { WTextRead = new BufferedReader(new FileReader(sFileName)); } catch (IOException e) { throw new DataAccessPointException(e.getMessage()); } } String currentLine = ""; String Token = ""; String name = ""; TransferTable relatedTable = null; try { while ((currentLine = WTextRead.readLine()) != null) { currentLine = currentLine.trim() + ";"; Tokenizer = new StringTokenizer(currentLine); try { Token = Tokenizer.nextToken(); } catch (NoSuchElementException NSE) { continue; } if (Token == null) { continue; } if (Token.toUpperCase().equals("INSERT")) { try { if (!Tokenizer.nextToken().toUpperCase().equals( "INTO")) { throw new DataAccessPointException( "Error in INSERT statement: no INTO found"); } Token = Tokenizer.nextToken(); if ((relatedTable = (TransferTable) DbStmts.get(Token)) != null) { relatedTable.Stmts.bDelete = true; relatedTable.Stmts.bInsert = true; relatedTable.Stmts.sDestInsert = currentLine; relatedTable.Stmts.sDestDelete = "DELETE FROM " + relatedTable.Stmts.sSourceTable + ";"; } continue; } catch (NoSuchElementException NSE) { continue; } } else if (Token.toUpperCase().equals("ALTER")) { try { if (!Tokenizer.nextToken().toUpperCase().equals( "TABLE")) { continue; } name = Tokenizer.nextToken(); Token = Tokenizer.nextToken().toUpperCase(); if (!Token.equals("ADD")) { continue; } do { Token = Tokenizer.nextToken().toUpperCase(); } while (!Token.equals("CONSTRAINT")); if ((relatedTable = (TransferTable) DbStmts.get(name)) != null) { if (relatedTable.Stmts.sDestAlter == null) { relatedTable.Stmts.sDestAlter = ""; } relatedTable.Stmts.bAlter = true; relatedTable.Stmts.sDestAlter += currentLine; } else { throw new DataAccessPointException( "table not found"); } Token = Tokenizer.nextToken(); if (relatedTable.Stmts.sDestDrop == null) { relatedTable.Stmts.sDestDrop = ""; } relatedTable.Stmts.bDrop = true; relatedTable.Stmts.sDestDrop = "ALTER TABLE " + name + " DROP CONSTRAINT " + Token + ";" + relatedTable.Stmts.sDestDrop; continue; } catch (NoSuchElementException NSE) { continue; } } else if (!Token.toUpperCase().equals("CREATE")) { continue; } Token = Tokenizer.nextToken().toUpperCase(); if (Token.equals("TABLE") || Token.equals("VIEW")) { try { name = Tokenizer.nextToken(" (;"); if (!DbStmts.containsKey(name)) { throw new DataAccessPointException( "error: index is created before the table"); } relatedTable = (TransferTable) DbStmts.get(name); relatedTable.Stmts.bCreate = true; relatedTable.Stmts.bDrop = true; // relatedTable.Stmts.sDestCreate = currentLine; relatedTable.Stmts.sDestCreate = translateTypes(currentLine, TTable, Dest); relatedTable.Stmts.sDestDrop = "DROP " + relatedTable.Stmts.sType + " " + name + ";"; DbStmts.put(relatedTable.Stmts.sSourceTable, relatedTable); } catch (NoSuchElementException NSE) { continue; } } if (Token.equals("INDEX") || Token.equals("UNIQUE")) { try { while ((Token = Tokenizer.nextToken()).toUpperCase().equals( "INDEX")) { ; } String IndexdropCommand = "DROP INDEX " + Token + " ;"; while ((Token = Tokenizer.nextToken( " (")).toUpperCase().equals("ON")) { ; } name = Token; if (!DbStmts.containsKey(Token)) { throw new DataAccessPointException( "error: index is created before the table"); } relatedTable = (TransferTable) DbStmts.get(Token); if (relatedTable.Stmts.sDestCreateIndex == null) { relatedTable.Stmts.sDestCreateIndex = ""; } if (relatedTable.Stmts.sDestDropIndex == null) { relatedTable.Stmts.sDestDropIndex = ""; } relatedTable.Stmts.bCreateIndex = true; relatedTable.Stmts.bDropIndex = true; relatedTable.Stmts.sDestCreateIndex += currentLine; relatedTable.Stmts.sDestDropIndex += IndexdropCommand; } catch (NoSuchElementException NSE) { continue; } } } } catch (IOException IOe) { throw new DataAccessPointException(IOe.getMessage()); } } Vector getTables(String sCatalog, String[] sSchemas) throws DataAccessPointException { Vector AllTables = new Vector(); if (DbStmts == null) { DbStmts = new Hashtable(); } if (WTextRead != null) { try { WTextRead.close(); WTextRead = null; } catch (IOException e) {} } this.parseFileForTables(); StructureAlreadyParsed = false; Enumeration e = DbStmts.elements(); while (e.hasMoreElements()) { AllTables.addElement(e.nextElement()); } return AllTables; } void getTableStructure(TransferTable TTable, DataAccessPoint Dest) throws DataAccessPointException { if (!StructureAlreadyParsed) { if (WTextRead != null) { try { WTextRead.close(); WTextRead = null; } catch (IOException e) {} } this.parseFileForTheRest(TTable, Dest); } } TransferResultSet getData(String statement) throws DataAccessPointException { StringTokenizer Tokenizer; String tableName = ""; try { Tokenizer = new StringTokenizer(statement); while (!Tokenizer.nextToken().toUpperCase().equals("FROM")) { ; } tableName = Tokenizer.nextToken(" ;"); } catch (NoSuchElementException NSE) { throw new DataAccessPointException( "Table name not found in statement: " + statement); } if (WTextRead != null) { try { WTextRead.close(); WTextRead = null; } catch (IOException e) {} } return (this.parseFileForData(tableName)); } TransferResultSet parseFileForData(String tableName) throws DataAccessPointException { TransferResultSet trsData = new TransferResultSet(); StringTokenizer Tokenizer; if (WTextRead == null) { try { WTextRead = new BufferedReader(new FileReader(sFileName)); } catch (IOException e) { throw new DataAccessPointException(e.getMessage()); } } String currentLine = ""; String Token; try { while ((currentLine = WTextRead.readLine()) != null) { currentLine = currentLine.trim() + ";"; Tokenizer = new StringTokenizer(currentLine); try { Token = Tokenizer.nextToken(); } catch (NoSuchElementException NSE) { continue; } if (Token == null) { continue; } if (!Token.toUpperCase().equals("INSERT")) { continue; } try { if (!Tokenizer.nextToken().toUpperCase().equals("INTO")) { throw new DataAccessPointException( "Error in INSERT statement: no INTO found"); } Token = Tokenizer.nextToken(); if (!Token.equals(tableName)) { continue; } int iParsedRows = 0; Vector vColumnNames = new Vector(); Vector vColumnValues = new Vector(); Vector vColumnTypes = new Vector(); while ((currentLine = WTextRead.readLine()) != null) { currentLine = currentLine.trim(); boolean newLine = (currentLine.length() == 0); if (newLine) { int iColumnNb = 0; iParsedRows++; iColumnNb = vColumnNames.size(); String[] Names = new String[iColumnNb + 1]; int[] Types = new int[iColumnNb + 1]; Object[] Values = new Object[iColumnNb + 1]; for (int Idx = 0; Idx < iColumnNb; Idx++) { Names[Idx + 1] = (String) vColumnNames.elementAt(Idx); Types[Idx + 1] = ((Integer) vColumnTypes.elementAt( Idx)).intValue(); Values[Idx + 1] = vColumnValues.elementAt(Idx); } try { trsData.addRow(Names, Types, Values, iColumnNb); } catch (Exception e) { throw new DataAccessPointException( e.getMessage()); } iColumnNb = 0; vColumnNames.removeAllElements(); vColumnValues.removeAllElements(); vColumnTypes.removeAllElements(); continue; } Tokenizer = new StringTokenizer(currentLine); Token = Tokenizer.nextToken("="); if (Token.equals("Number of Rows")) { int iNbRows = Integer.parseInt(Tokenizer.nextToken()); if (iNbRows != iParsedRows) { throw new DataAccessPointException( "Number of parsed rows (" + iParsedRows + ") is different from the expected (" + iNbRows + ")"); } return trsData; } if (Token.equals("column")) { Token = Tokenizer.nextToken(" ="); vColumnNames.addElement(Token); } Token = Tokenizer.nextToken(" ="); if (Token.equals("datatype")) { int iType; Token = Tokenizer.nextToken(" ="); try { iType = JDBCT.toInt(Token.toUpperCase()); } catch (Exception e) { throw new DataAccessPointException( "Unknown type: " + Token); } vColumnTypes.addElement(new Integer(iType)); } Token = Tokenizer.nextToken(" ="); if (Token.equals("value")) { int iStart = currentLine.indexOf("value=") + 6; String sValue = currentLine.substring(iStart).trim(); if (sValue.indexOf("") >= 0) { vColumnValues.addElement(null); } else { int i = sValue.indexOf('\'') + 1; String sbToken = sValue.substring(i); i = sbToken.lastIndexOf('\''); sbToken = sbToken.substring(0, i); Token = sbToken; vColumnValues.addElement(Token); } } } } catch (IndexOutOfBoundsException IOBe) { continue; } } } catch (IOException IOe) { throw new DataAccessPointException(IOe.getMessage()); } return trsData; } } hsqldb-1.8.0.10.orig/src/org/hsqldb/util/ScriptTool.java0000644000175000017500000002152410416742504021403 0ustar renerene/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb.util; import java.io.BufferedReader; import java.io.FileReader; import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.ResultSetMetaData; import java.sql.SQLException; import java.sql.Statement; import java.util.Properties; import org.hsqldb.lib.java.JavaSystem; // fredt@users 20011220 - patch 481239 by yfl@users - new class // jrmaher@users 20020710 - support for batch mode /** * Script tool - command line tool to read in sql script and execute it. * * * @version 1.7.0 */ public class ScriptTool { private static Properties pProperties = new Properties(); private Connection cConn; private Statement sStatement; private boolean BATCH = true; private String EKW = new String("go"); private boolean EOF = false; private int ln = 0; /** * Main method * * * @param arg */ public static void main(String[] arg) { for (int i = 0; i < arg.length; i++) { String p = arg[i]; if (p.equals("-?")) { printHelp(); System.exit(0); } } ScriptTool tool = new ScriptTool(); tool.execute(arg); System.exit(0); } // end main public void execute(String[] arg) { for (int i = 0; i < arg.length; i++) { String p = arg[i]; if (p.charAt(0) == '-') { pProperties.put(p.substring(1), arg[i + 1]); i++; } } ln = 0; EOF = false; BufferedReader in = null; Properties p = pProperties; String driver = p.getProperty("driver", "org.hsqldb.jdbcDriver"); String url = p.getProperty("url", "jdbc:hsqldb:"); String database = p.getProperty("database", "test"); String user = p.getProperty("user", "sa"); String password = p.getProperty("password", ""); String script = p.getProperty("script", "st.sql"); boolean log = p.getProperty("log", "false").equalsIgnoreCase("true"); BATCH = p.getProperty("batch", "true").equalsIgnoreCase("true"); try { if (log) { trace("driver = " + driver); trace("url = " + url); trace("database = " + database); trace("user = " + user); trace("password = " + password); trace("script = " + script); trace("log = " + log); trace("batch = " + BATCH); JavaSystem.setLogToSystem(true); } // As described in the JDBC FAQ: // http://java.sun.com/products/jdbc/jdbc-frequent.html; // Why doesn't calling class.forName() load my JDBC driver? // There is a bug in the JDK 1.1.x that can cause Class.forName() to fail. // new org.hsqldb.jdbcDriver(); Class.forName(driver).newInstance(); cConn = DriverManager.getConnection(url + database, user, password); in = new BufferedReader(new FileReader(script)); } catch (Exception e) { System.out.println("ScriptTool.init error: " + e.getMessage()); e.printStackTrace(); } try { sStatement = cConn.createStatement(); String sql; while ((sql = fileToString(in)) != null) { if (sql.length() == 1) { continue; } if (log) { trace("SQL (" + ln + ") : " + sql.substring(0, sql.length() - 2)); } sStatement.execute(sql); ResultSet results = sStatement.getResultSet(); int updateCount = sStatement.getUpdateCount(); if (updateCount == -1) { trace(toString(results)); } else { trace("update count " + updateCount); } } } catch (SQLException e) { System.out.println("SQL Error at line " + ln + ": " + e); } try { cConn.close(); in.close(); } catch (Exception ce) {} } /** * Translate ResultSet to String representation * @param r */ private String toString(ResultSet r) { try { if (r == null) { return "No Result"; } ResultSetMetaData m = r.getMetaData(); int col = m.getColumnCount(); StringBuffer strbuf = new StringBuffer(); for (int i = 1; i <= col; i++) { strbuf = strbuf.append(m.getColumnLabel(i) + "\t"); } strbuf = strbuf.append("\n"); while (r.next()) { for (int i = 1; i <= col; i++) { strbuf = strbuf.append(r.getString(i) + "\t"); if (r.wasNull()) { strbuf = strbuf.append("(null)\t"); } } strbuf = strbuf.append("\n"); } return strbuf.toString(); } catch (SQLException e) { return null; } } /** * Read file and convert it to string. */ private String fileToString(BufferedReader in) { if (EOF) { return null; } EOF = true; StringBuffer a = new StringBuffer(); try { String line; while ((line = in.readLine()) != null) { ln = ln + 1; if (BATCH) { if (line.startsWith("print ")) { trace("\n" + line.substring(5)); continue; } if (line.equalsIgnoreCase(EKW)) { EOF = false; break; } } a.append(line); a.append('\n'); } a.append('\n'); return a.toString(); } catch (Exception e) { e.printStackTrace(); throw new RuntimeException(e.getMessage()); } } /** * Method declaration * * * @param s */ private void trace(String s) { System.out.println(s); } /** * Method declaration * */ private static void printHelp() { System.out.println( "Usage: java ScriptTool [-options]\n" + "where options include:\n" + " -driver name of the driver class\n" + " -url first part of the jdbc url\n" + " -database second part of the jdbc url\n" + " -user username used for connection\n" + " -password password for this user\n" + " -log write log to system out\n" + " -batch allow go/print pseudo statements\n" + " -script
                rej. # input
                line #
                bad column
                (if known)
                reason

                org.hsqldb
                Class jdbcDriver

                java.lang.Object
                  extended byorg.hsqldb.jdbcDriver
                
                All Implemented Interfaces:
                java.sql.Driver

                public class jdbcDriver
                extends java.lang.Object
                implements java.sql.Driver

                Each JDBC driver must supply a class that implements the Driver interface.

                The Java SQL framework allows for multiple database drivers.

                The DriverManager will try to load as many drivers as it can find and then for any given connection request, it will ask each driver in turn to try to connect to the target URL.

                The application developer will normally not need to call any function of the Driver directly. All required calls are made by the DriverManager.

                HSQLDB-Specific Information:

                When the HSQL Database Engine Driver class is loaded, it creates an instance of itself and register it with the DriverManager. This means that a user can load and register the HSQL Database Engine driver by calling

                 Class.forName("org.hsqldb.jdbcDriver") 
                For more information about how to connect to a HSQL Database Engine database, please see jdbcConnection.

                As of version 1.7.0 all JDBC 2 methods can be called with jdk 1.1.x. Some of these method calls require int values that are defined in JDBC 2 version of ResultSet. These values are defined in the jdbcResultSet class when it is compiled with jdk 1.1.x. When using the JDBC 2 methods that require those values as parameters or return one of those values, refer to them as follows: (The code will not be compatible with other JDBC 2 driver, which require ResultSet to be used instead of jdbcResultSet) (fredt@users)

                jdbcResultSet.FETCH_FORWARD
                jdbcResultSet.TYPE_FORWARD_ONLY
                jdbcResultSet TYPE_SCROLL_INSENSITIVE
                jdbcResultSet.CONCUR_READ_ONLY

                See Also:
                jdbcConnection

                Constructor Summary
                jdbcDriver()
                           
                 
                Method Summary
                 boolean acceptsURL(java.lang.String url)
                          Returns true if the driver thinks that it can open a connection to the given URL.
                 java.sql.Connection connect(java.lang.String url, java.util.Properties info)
                          Attempts to make a database connection to the given URL.
                static java.sql.Connection getConnection(java.lang.String url, java.util.Properties info)
                           
                 int getMajorVersion()
                          Gets the driver's major version number.
                 int getMinorVersion()
                          Gets the driver's minor version number.
                 java.sql.DriverPropertyInfo[] getPropertyInfo(java.lang.String url, java.util.Properties info)
                          Gets information about the possible properties for this driver.
                 boolean jdbcCompliant()
                          Reports whether this driver is a genuine JDBC COMPLIANTTM driver.
                 
                Methods inherited from class java.lang.Object
                equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
                 

                Constructor Detail

                jdbcDriver

                public jdbcDriver()
                Method Detail

                connect

                public java.sql.Connection connect(java.lang.String url,
                                                   java.util.Properties info)
                                            throws java.sql.SQLException
                Attempts to make a database connection to the given URL. The driver returns "null" if it realizes it is the wrong kind of driver to connect to the given URL. This will be common, as when the JDBC driver manager is asked to connect to a given URL it passes the URL to each loaded driver in turn.

                The driver raises a SQLException if it is the right driver to connect to the given URL, but has trouble connecting to the database.

                The java.util.Properties argument can be used to passed arbitrary string tag/value pairs as connection arguments.

                HSQLDB-Specific Information:

                For HSQL Database Engine, at least "user" and "password" properties must be included in the Properties. From version 1.7.1 two optional properties are supported:

                get_column_name if set to false, a ResultSetMetaData.getColumnName() call will return the user defined label instead of the column name. strict_md if set to true, some ResultSetMetaData methods return more strict values for compatibility reasons.

                Specified by:
                connect in interface java.sql.Driver
                Parameters:
                url - the URL of the database to which to connect
                info - a list of arbitrary string tag/value pairs as connection arguments. Normally at least a "user" and "password" property should be included.
                Returns:
                a Connection object that represents a connection to the URL
                Throws:
                java.sql.SQLException - if a database access error occurs

                getConnection

                public static java.sql.Connection getConnection(java.lang.String url,
                                                                java.util.Properties info)
                                                         throws java.sql.SQLException
                Throws:
                java.sql.SQLException

                acceptsURL

                public boolean acceptsURL(java.lang.String url)
                Returns true if the driver thinks that it can open a connection to the given URL. Typically drivers will return true if they understand the subprotocol specified in the URL and false if they don't.

                Specified by:
                acceptsURL in interface java.sql.Driver
                Parameters:
                url - the URL of the database
                Returns:
                true if this driver can connect to the given URL

                getPropertyInfo

                public java.sql.DriverPropertyInfo[] getPropertyInfo(java.lang.String url,
                                                                     java.util.Properties info)
                Gets information about the possible properties for this driver.

                The getPropertyInfo method is intended to allow a generic GUI tool to discover what properties it should prompt a human for in order to get enough information to connect to a database. Note that depending on the values the human has supplied so far, additional values may become necessary, so it may be necessary to iterate though several calls to getPropertyInfo.

                HSQLDB-Specific Information:

                HSQLDB 1.7.2 uses the values submitted in info to set the value for each DriverPropertyInfo object returned. It does not use the default value that it would use for the property if the value is null.

                Specified by:
                getPropertyInfo in interface java.sql.Driver
                Parameters:
                url - the URL of the database to which to connect
                info - a proposed list of tag/value pairs that will be sent on connect open
                Returns:
                an array of DriverPropertyInfo objects describing possible properties. This array may be an empty array if no properties are required.

                getMajorVersion

                public int getMajorVersion()
                Gets the driver's major version number.

                Specified by:
                getMajorVersion in interface java.sql.Driver
                Returns:
                this driver's major version number

                getMinorVersion

                public int getMinorVersion()
                Gets the driver's minor version number.

                Specified by:
                getMinorVersion in interface java.sql.Driver
                Returns:
                this driver's minor version number

                jdbcCompliant

                public boolean jdbcCompliant()
                Reports whether this driver is a genuine JDBC COMPLIANTTM driver. A driver may only report true here if it passes the JDBC compliance tests; otherwise it is required to return false. JDBC compliance requires full support for the JDBC API and full support for SQL 92 Entry Level. It is expected that JDBC compliant drivers will be available for all the major commercial databases.

                HSQLDB-Specific Information:

                HSQL Database Engine currently does not yet support all required SQL 92 Entry Level functionality and thus returns false. It looks like other drivers return true but do not support all features.

                This method is not intended to encourage the development of non-JDBC compliant drivers, but is a recognition of the fact that some vendors are interested in using the JDBC API and framework for lightweight databases that do not support full database functionality, or for special databases such as document information retrieval where a SQL implementation may not be feasible.

                Specified by:
                jdbcCompliant in interface java.sql.Driver
                Returns:
                Description of the Return Value


                Copyright 2001 - 2005 HSQL Development Group. All Rights Reserved. hsqldb-1.8.0.10.orig/doc/src/org/hsqldb/jdbc/0000755000175000017500000000000010253114047017116 5ustar renerenehsqldb-1.8.0.10.orig/doc/src/org/hsqldb/jdbc/jdbcParameterMetaData.html0000644000175000017500000005217611020614567024170 0ustar renerene jdbcParameterMetaData (HSQLDB 1.8.0.10 API)

                org.hsqldb.jdbc
                Class jdbcParameterMetaData

                java.lang.Object
                  extended byorg.hsqldb.jdbc.jdbcParameterMetaData
                
                All Implemented Interfaces:
                java.sql.ParameterMetaData

                public class jdbcParameterMetaData
                extends java.lang.Object
                implements java.sql.ParameterMetaData

                An object that can be used to get information about the types and properties of the parameters in a PreparedStatement object.

                Since:
                JDK 1.4, HSQLDB 1.7.2
                Author:
                boucherb@users

                Field Summary
                 
                Fields inherited from interface java.sql.ParameterMetaData
                parameterModeIn, parameterModeInOut, parameterModeOut, parameterModeUnknown, parameterNoNulls, parameterNullable, parameterNullableUnknown
                 
                Method Summary
                 java.lang.String getParameterClassName(int param)
                          Retrieves the fully-qualified name of the Java class whose instances should be passed to the method PreparedStatement.setObject.
                 int getParameterCount()
                          Retrieves the number of parameters in the PreparedStatement object for which this ParameterMetaData object provides information.
                 int getParameterMode(int param)
                          Retrieves the designated parameter's mode.
                 int getParameterType(int param)
                          Retrieves the designated parameter's SQL type.
                 java.lang.String getParameterTypeName(int param)
                          Retrieves the designated parameter's database-specific type name.
                 int getPrecision(int param)
                          Retrieves the designated parameter's number of decimal digits.
                 int getScale(int param)
                          Retrieves the designated parameter's number of digits to right of the decimal point.
                 int isNullable(int param)
                          Retrieves whether null values are allowed in the designated parameter.
                 boolean isSigned(int param)
                          Retrieves whether values for the designated parameter can be signed numbers.
                 java.lang.String toString()
                          Retrieves a String repsentation of this object.
                 
                Methods inherited from class java.lang.Object
                equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
                 

                Method Detail

                getParameterClassName

                public java.lang.String getParameterClassName(int param)
                                                       throws java.sql.SQLException
                Retrieves the fully-qualified name of the Java class whose instances should be passed to the method PreparedStatement.setObject.

                Specified by:
                getParameterClassName in interface java.sql.ParameterMetaData
                Parameters:
                param - the first parameter is 1, the second is 2, ...
                Returns:
                the fully-qualified name of the class in the Java programming language that would be used by the method PreparedStatement.setObject to set the value in the specified parameter. This is the class name used for custom mapping.
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7.2

                getParameterCount

                public int getParameterCount()
                                      throws java.sql.SQLException
                Retrieves the number of parameters in the PreparedStatement object for which this ParameterMetaData object provides information.

                Specified by:
                getParameterCount in interface java.sql.ParameterMetaData
                Returns:
                the number of parameters
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7.2

                getParameterMode

                public int getParameterMode(int param)
                                     throws java.sql.SQLException
                Retrieves the designated parameter's mode.

                Specified by:
                getParameterMode in interface java.sql.ParameterMetaData
                Parameters:
                param - the first parameter is 1, the second is 2, ...
                Returns:
                mode of the parameter; one of ParameterMetaData.parameterModeIn, ParameterMetaData.parameterModeOut, ParameterMetaData.parameterModeInOut, ParameterMetaData.parameterModeUnknown
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7.2

                getParameterType

                public int getParameterType(int param)
                                     throws java.sql.SQLException
                Retrieves the designated parameter's SQL type.

                Specified by:
                getParameterType in interface java.sql.ParameterMetaData
                Parameters:
                param - the first parameter is 1, the second is 2, ...
                Returns:
                SQL type from java.sql.Types
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7.2
                See Also:
                Types

                getParameterTypeName

                public java.lang.String getParameterTypeName(int param)
                                                      throws java.sql.SQLException
                Retrieves the designated parameter's database-specific type name.

                Specified by:
                getParameterTypeName in interface java.sql.ParameterMetaData
                Parameters:
                param - the first parameter is 1, the second is 2, ...
                Returns:
                type the name used by the database. If the parameter type is a user-defined type, then a fully-qualified type name is returned.
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7.2

                getPrecision

                public int getPrecision(int param)
                                 throws java.sql.SQLException
                Retrieves the designated parameter's number of decimal digits.

                Specified by:
                getPrecision in interface java.sql.ParameterMetaData
                Parameters:
                param - the first parameter is 1, the second is 2, ...
                Returns:
                precision
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7.2

                getScale

                public int getScale(int param)
                             throws java.sql.SQLException
                Retrieves the designated parameter's number of digits to right of the decimal point.

                Specified by:
                getScale in interface java.sql.ParameterMetaData
                Parameters:
                param - the first parameter is 1, the second is 2, ...
                Returns:
                scale
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7.2

                isNullable

                public int isNullable(int param)
                               throws java.sql.SQLException
                Retrieves whether null values are allowed in the designated parameter.

                Specified by:
                isNullable in interface java.sql.ParameterMetaData
                Parameters:
                param - the first parameter is 1, the second is 2, ...
                Returns:
                the nullability status of the given parameter; one of ParameterMetaData.parameterNoNulls, ParameterMetaData.parameterNullable or ParameterMetaData.parameterNullableUnknown
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7.2

                isSigned

                public boolean isSigned(int param)
                                 throws java.sql.SQLException
                Retrieves whether values for the designated parameter can be signed numbers.

                Specified by:
                isSigned in interface java.sql.ParameterMetaData
                Parameters:
                param - the first parameter is 1, the second is 2, ...
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7.2

                toString

                public java.lang.String toString()
                Retrieves a String repsentation of this object.

                Returns:
                a String repsentation of this object


                Copyright 2001 - 2005 HSQL Development Group. All Rights Reserved. hsqldb-1.8.0.10.orig/doc/src/org/hsqldb/jdbc/jdbcBlob.html0000644000175000017500000006545711020614566021532 0ustar renerene jdbcBlob (HSQLDB 1.8.0.10 API)

                org.hsqldb.jdbc
                Class jdbcBlob

                java.lang.Object
                  extended byorg.hsqldb.jdbc.jdbcBlob
                
                All Implemented Interfaces:
                java.sql.Blob

                public class jdbcBlob
                extends java.lang.Object
                implements java.sql.Blob

                The representation (mapping) in the JavaTM programming language of an SQL BLOB value.

                Provides methods for getting the length of an SQL BLOB (Binary Large Object) value, for materializing a BLOB value on the client, and for determining the position of an octet sequence (byte pattern) within a BLOB value.

                HSQLDB-Specific Information:

                Including 1.8.x, the HSQLDB driver does not implement Blob using an SQL locator(BLOB). That is, an HSQLDB Blob object does not contain a logical pointer to SQL BLOB data; rather it directly contains a representation of the data (a byte array). As a result, an HSQLDB Blob object is itself valid beyond the duration of the transaction in which is was created, although it does not necessarily represent a corresponding value on the database.

                Currently, the interface methods for updating a BLOB value are unsupported. However, the truncate method is supported for local use.

                Since:
                JDK 1.2, HSQLDB 1.7.2
                Author:
                james house jhouse@part.net, boucherb@users

                Constructor Summary
                jdbcBlob(byte[] data)
                          Constructs a new jdbcBlob instance wrapping the given octet sequence.
                 
                Method Summary
                 java.io.InputStream getBinaryStream()
                          Retrieves the BLOB value designated by this Blob instance as a stream.
                 byte[] getBytes(long pos, int length)
                          Retrieves all or part of the BLOB value that this Blob object represents, as an array of bytes.
                 long length()
                          Returns the number of bytes in the BLOB value designated by this Blob object.
                 long position(java.sql.Blob pattern, long start)
                          Retrieves the byte position in the BLOB value designated by this Blob object at which pattern begins.
                 long position(byte[] pattern, long start)
                          Retrieves the byte position at which the specified byte array pattern begins within the BLOB value that this Blob object represents.
                 java.io.OutputStream setBinaryStream(long pos)
                          Retrieves a stream that can be used to write to the BLOB value that this Blob object represents.
                 int setBytes(long pos, byte[] bytes)
                          Writes the given array of bytes to the BLOB value that this Blob object represents, starting at position pos, and returns the number of bytes written.
                 int setBytes(long pos, byte[] bytes, int offset, int len)
                          Writes all or part of the given byte array to the BLOB value that this Blob object represents and returns the number of bytes written.
                 void truncate(long len)
                          Truncates the BLOB value that this Blob object represents to be len bytes in length.
                 
                Methods inherited from class java.lang.Object
                equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
                 

                Constructor Detail

                jdbcBlob

                public jdbcBlob(byte[] data)
                         throws java.sql.SQLException
                Constructs a new jdbcBlob instance wrapping the given octet sequence.

                This constructor is used internally to retrieve result set values as Blob objects, yet it must be public to allow access from other packages. As such (in the interest of efficiency) this object maintains a reference to the given octet sequence rather than making a copy; special care should be taken by extenal clients never to use this constructor with a byte array object that may later be modified extenally.

                Parameters:
                data - the octet sequence representing the Blob value
                Throws:
                java.sql.SQLException - if the argument is null
                Method Detail

                length

                public long length()
                            throws java.sql.SQLException
                Returns the number of bytes in the BLOB value designated by this Blob object.

                Specified by:
                length in interface java.sql.Blob
                Returns:
                length of the BLOB in bytes
                Throws:
                java.sql.SQLException - if there is an error accessing the length of the BLOB
                Since:
                JDK 1.2, HSQLDB 1.7.2

                getBytes

                public byte[] getBytes(long pos,
                                       int length)
                                throws java.sql.SQLException
                Retrieves all or part of the BLOB value that this Blob object represents, as an array of bytes. This byte array contains up to length consecutive bytes starting at position pos.

                HSQLDB-Specific Information:

                The official specification above is ambiguous in that it does not precisely indicate the policy to be observed when pos > this.length() - length. One policy would be to retrieve the octets from pos to this.length(). Another would be to throw an exception. HSQLDB observes the later policy.

                Specified by:
                getBytes in interface java.sql.Blob
                Parameters:
                pos - the ordinal position of the first byte in the BLOB value to be extracted; the first byte is at position 1
                length - the number of consecutive bytes to be copied
                Returns:
                a byte array containing up to length consecutive bytes from the BLOB value designated by this Blob object, starting with the byte at position pos
                Throws:
                java.sql.SQLException - if there is an error accessing the BLOB value
                Since:
                JDK 1.2, HSQLDB 1.7.2
                See Also:
                setBytes(long, byte[])

                getBinaryStream

                public java.io.InputStream getBinaryStream()
                                                    throws java.sql.SQLException
                Retrieves the BLOB value designated by this Blob instance as a stream.

                Specified by:
                getBinaryStream in interface java.sql.Blob
                Returns:
                a stream containing the BLOB data
                Throws:
                java.sql.SQLException - if there is an error accessing the BLOB value
                Since:
                JDK 1.2, HSQLDB 1.7.2
                See Also:
                setBinaryStream(long)

                position

                public long position(byte[] pattern,
                                     long start)
                              throws java.sql.SQLException
                Retrieves the byte position at which the specified byte array pattern begins within the BLOB value that this Blob object represents. The search for pattern begins at position start.

                Specified by:
                position in interface java.sql.Blob
                Parameters:
                pattern - the byte array for which to search
                start - the position at which to begin searching; the first position is 1
                Returns:
                the position at which the pattern appears, else -1
                Throws:
                java.sql.SQLException - if there is an error accessing the BLOB
                Since:
                JDK 1.2, HSQLDB 1.7.2

                position

                public long position(java.sql.Blob pattern,
                                     long start)
                              throws java.sql.SQLException
                Retrieves the byte position in the BLOB value designated by this Blob object at which pattern begins. The search begins at position start.

                Specified by:
                position in interface java.sql.Blob
                Parameters:
                pattern - the Blob object designating the BLOB value for which to search
                start - the position in the BLOB value at which to begin searching; the first position is 1
                Returns:
                the position at which the pattern begins, else -1
                Throws:
                java.sql.SQLException - if there is an error accessing the BLOB value
                Since:
                JDK 1.2, HSQLDB 1.7.2

                setBytes

                public int setBytes(long pos,
                                    byte[] bytes)
                             throws java.sql.SQLException
                Writes the given array of bytes to the BLOB value that this Blob object represents, starting at position pos, and returns the number of bytes written.

                HSQLDB-Specific Information:

                HSLQDB 1.7.2 does not support this feature.

                Calling this method always throws an SQLException.

                Specified by:
                setBytes in interface java.sql.Blob
                Parameters:
                pos - the position in the BLOB object at which to start writing
                bytes - the array of bytes to be written to the BLOB value that this Blob object represents
                Returns:
                the number of bytes written
                Throws:
                java.sql.SQLException - if there is an error accessing the BLOB value
                Since:
                JDK 1.4, HSQLDB 1.7.2
                See Also:
                getBytes(long, int)

                setBytes

                public int setBytes(long pos,
                                    byte[] bytes,
                                    int offset,
                                    int len)
                             throws java.sql.SQLException
                Writes all or part of the given byte array to the BLOB value that this Blob object represents and returns the number of bytes written. Writing starts at position pos in the BLOB value; len bytes from the given byte array are written.

                HSQLDB-Specific Information:

                HSLQDB 1.7.2 does not support this feature.

                Calling this method always throws an SQLException.

                Specified by:
                setBytes in interface java.sql.Blob
                Parameters:
                pos - the position in the BLOB object at which to start writing
                bytes - the array of bytes to be written to this BLOB object
                offset - the offset into the array bytes at which to start reading the bytes to be set
                len - the number of bytes to be written to the BLOB value from the array of bytes bytes
                Returns:
                the number of bytes written
                Throws:
                java.sql.SQLException - if there is an error accessing the BLOB value
                Since:
                JDK 1.4, HSQLDB 1.7.2
                See Also:
                getBytes(long, int)

                setBinaryStream

                public java.io.OutputStream setBinaryStream(long pos)
                                                     throws java.sql.SQLException
                Retrieves a stream that can be used to write to the BLOB value that this Blob object represents. The stream begins at position pos.

                HSQLDB-Specific Information:

                HSQLDB 1.7.2 does not support this feature.

                Calling this method always throws an SQLException.

                Specified by:
                setBinaryStream in interface java.sql.Blob
                Parameters:
                pos - the position in the BLOB value at which to start writing
                Returns:
                a java.io.OutputStream object to which data can be written
                Throws:
                java.sql.SQLException - if there is an error accessing the BLOB value
                Since:
                JDK 1.4, HSQLDB 1.7.2
                See Also:
                getBinaryStream()

                truncate

                public void truncate(long len)
                              throws java.sql.SQLException
                Truncates the BLOB value that this Blob object represents to be len bytes in length.

                HSQLDB-Specific Information:

                This operation affects only the client-side value; it has no effect upon the value as it is stored in the database.

                Specified by:
                truncate in interface java.sql.Blob
                Parameters:
                len - the length, in bytes, to which the BLOB value that this Blob object represents should be truncated
                Throws:
                java.sql.SQLException - if there is an error accessing the BLOB value
                Since:
                JDK 1.4, HSQLDB 1.7.2


                Copyright 2001 - 2005 HSQL Development Group. All Rights Reserved. hsqldb-1.8.0.10.orig/doc/src/org/hsqldb/jdbc/Util.html0000644000175000017500000003331711020614570020727 0ustar renerene Util (HSQLDB 1.8.0.10 API)

                org.hsqldb.jdbc
                Class Util

                java.lang.Object
                  extended byorg.hsqldb.jdbc.Util
                

                public class Util
                extends java.lang.Object

                Provides driver constants and a gateway from internal HsqlExceptions to external SQLExceptions.

                Since:
                1.7.2
                Author:
                fredt@users

                Constructor Summary
                Util()
                           
                 
                Method Summary
                static java.sql.SQLException connectionClosedException()
                           
                static java.sql.SQLException invalidArgument()
                           
                static java.sql.SQLException invalidArgument(java.lang.String name)
                           
                static java.sql.SQLException nullArgument()
                           
                static java.sql.SQLException outOfRangeArgument()
                           
                static java.sql.SQLException outOfRangeArgument(java.lang.String name)
                           
                static java.sql.SQLException sqlException(org.hsqldb.HsqlException e)
                           
                static java.sql.SQLWarning sqlWarning(org.hsqldb.HsqlException e)
                           
                 
                Methods inherited from class java.lang.Object
                equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
                 

                Constructor Detail

                Util

                public Util()
                Method Detail

                sqlException

                public static final java.sql.SQLException sqlException(org.hsqldb.HsqlException e)

                sqlWarning

                public static final java.sql.SQLWarning sqlWarning(org.hsqldb.HsqlException e)

                nullArgument

                public static java.sql.SQLException nullArgument()

                invalidArgument

                public static java.sql.SQLException invalidArgument()

                invalidArgument

                public static java.sql.SQLException invalidArgument(java.lang.String name)

                outOfRangeArgument

                public static java.sql.SQLException outOfRangeArgument()

                outOfRangeArgument

                public static java.sql.SQLException outOfRangeArgument(java.lang.String name)

                connectionClosedException

                public static java.sql.SQLException connectionClosedException()


                Copyright 2001 - 2005 HSQL Development Group. All Rights Reserved. hsqldb-1.8.0.10.orig/doc/src/org/hsqldb/jdbc/jdbcResultSetMetaData.html0000644000175000017500000015200211020614567024167 0ustar renerene jdbcResultSetMetaData (HSQLDB 1.8.0.10 API)

                org.hsqldb.jdbc
                Class jdbcResultSetMetaData

                java.lang.Object
                  extended byorg.hsqldb.jdbc.jdbcResultSetMetaData
                
                All Implemented Interfaces:
                java.sql.ResultSetMetaData

                public class jdbcResultSetMetaData
                extends java.lang.Object
                implements java.sql.ResultSetMetaData

                An object that can be used to get information about the types and properties of the columns in a ResultSet object. The following code fragment creates the ResultSet object rs, creates the ResultSetMetaData object rsmd, and uses rsmd to find out how many columns rs has and whether the first column in rs can be used in a WHERE clause.

                
                 ResultSet rs = stmt.executeQuery("SELECT a, b, c FROM TABLE2");
                 ResultSetMetaData rsmd = rs.getMetaData();
                 int numberOfColumns = rsmd.getColumnCount();
                 boolean b = rsmd.isSearchable(1);
                
                 

                HSQLDB-Specific Information:

                HSQLDB supports a subset of the ResultSetMetaData interface.

                The JDBC specification for ResultSetMetaData is in part very vague. This causes potential incompatibility between interpretations of the specification as realized in different JDBC driver implementations. As such, deciding to what degree reporting ResultSetMetaData is accurate has been considered very carefully. Hopefully, the design decisions made in light of these considerations have yeilded precisely the subset of full ResultSetMetaData support that is most commonly needed and that is most important, while also providing, under the most common use-cases, the fastest access with the least overhead and the best comprimise between speed, accuracy, jar-foootprint and retention of JDBC resources.

                (fredt@users)
                (boucherb@users)

                Author:
                boucherb@users
                See Also:
                jdbcStatement.executeQuery(java.lang.String), jdbcStatement.getResultSet(), ResultSetMetaData

                Field Summary
                 
                Fields inherited from interface java.sql.ResultSetMetaData
                columnNoNulls, columnNullable, columnNullableUnknown
                 
                Method Summary
                 java.lang.String getCatalogName(int column)
                           Gets the designated column's table's catalog name.
                 java.lang.String getColumnClassName(int column)
                           Returns the fully-qualified name of the Java class whose instances are manufactured if the method ResultSet.getObject is called to retrieve a value from the column.
                 int getColumnCount()
                           Returns the number of columns in this ResultSet object.
                 int getColumnDisplaySize(int column)
                           Indicates the designated column's normal maximum width in characters.
                 java.lang.String getColumnLabel(int column)
                           Gets the designated column's suggested title for use in printouts and displays.
                 java.lang.String getColumnName(int column)
                           Get the designated column's name.
                 int getColumnType(int column)
                           Retrieves the designated column's SQL type.
                 java.lang.String getColumnTypeName(int column)
                           Retrieves the designated column's database-specific type name.
                 int getPrecision(int column)
                           Get the designated column's number of decimal digits.
                 int getScale(int column)
                           Gets the designated column's number of digits to right of the decimal point.
                 java.lang.String getSchemaName(int column)
                           Get the designated column's table's schema.
                 java.lang.String getTableName(int column)
                           Gets the designated column's table name.
                 boolean isAutoIncrement(int column)
                           Indicates whether the designated column is automatically numbered, thus read-only.
                 boolean isCaseSensitive(int column)
                           Indicates whether a column's case matters.
                 boolean isCurrency(int column)
                           Indicates whether the designated column is a cash value.
                 boolean isDefinitelyWritable(int column)
                           Indicates whether a write on the designated column will definitely succeed.
                 int isNullable(int column)
                           Indicates the nullability of values in the designated column.
                 boolean isReadOnly(int column)
                           Indicates whether the designated column is definitely not writable.
                 boolean isSearchable(int column)
                           Indicates whether the designated column can be used in a where clause.
                 boolean isSigned(int column)
                           Indicates whether values in the designated column are signed numbers.
                 boolean isWritable(int column)
                           Indicates whether it is possible for a write on the designated column to succeed.
                 java.lang.String toString()
                           
                 
                Methods inherited from class java.lang.Object
                equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
                 

                Method Detail

                getColumnCount

                public int getColumnCount()
                                   throws java.sql.SQLException
                Returns the number of columns in this ResultSet object.

                Specified by:
                getColumnCount in interface java.sql.ResultSetMetaData
                Returns:
                the number of columns
                Throws:
                java.sql.SQLException - if a database access error occurs

                isAutoIncrement

                public boolean isAutoIncrement(int column)
                                        throws java.sql.SQLException
                Indicates whether the designated column is automatically numbered, thus read-only.

                HSQLDB-Specific Information:

                HSQLDB 1.7.1 did not report this value accurately, either always throwing or always returning false, depending upon client property values.

                Starting with HSQLDB 1.7.2, this feature is better supported.


                However, it must be stated here that, contrary to the generic documentation above, HSQLDB automatically numbered columns (IDENTITY columns, in HSQLDB parlance) are not read-only.

                In fact, the generic documentation above seems to contradict the general definition of what, at minimum, an auto-increment column is:

                Simply, an auto-increment column is one that guarantees it has a unique value after a successful insert or update operation, even if no value is supplied or NULL is explicitly specified by the application or a default value expression.

                Further, without SQL Feature T176, Sequence generator support, the attributes of the internal source consulted for unique values are not defined. That is, unlike for a standard SQL SEQUENCE object or a system with full SQL 9x or 200n support for SQL Feature T174, Identity columns, an application must not assume and cannot determine in a standard way that auto-increment values start at any particular point, increment by any particular value or have any of the other attributes generally associated with SQL SEQUENCE generators. Further still, without full support for both feature T174 and T176, if a unique value is supplied by an application or provided by a declared or implicit default value expression, then whether that value is used or substituted with one from the automatic unique value source is implementation-defined and cannot be known in a standard way. Finally, without full support for features T174 and T176, it is also implementation-defined and cannot be know in a standard way whether an exception is thrown or a unique value is automatically substituted when an application or default value expression supplies a non-NULL, non-unique value.

                Up to and including HSQLDB 1.7.2, values supplied by an application or default value expression are used if they are indeed non-NULL unique values, while an exception is thrown if either possible value source for the site attempts to supply a non-NULL, non-unique value. This is very likely to remain the behaviour of HSQLDB for its foreseable lifetime and at the very least for the duration of the 1.7.x release series.


                Regardless of the new and better support for reporting isAutoIncrement(), it is still possible under certain conditions that accurate reporting may be impossible. For example, if this object's parent Connection is closed before the first call to this method or to any other method of this class that initializes the connection-dependent ResultSetMetaData values, then it is impossible to report accurately for result set columns that directly represent table column values.

                Under such special circumstances, the driver rethrows the exception that occured during the initialization, or a SQLException wrapping it.

                Those wishing to determine the auto-increment status of a table column in isolation from ResultSetMetaData can do so by inspecting the corresponding value of the SYSTEM_COLUMNS.IS_IDENTITY BOOLEAN column which is also currently included (in a fashion proprietary to HSQLDB) as the last column of the jdbcDatabaseMetaData.getColumns() result.

                Specified by:
                isAutoIncrement in interface java.sql.ResultSetMetaData
                Parameters:
                column - the first column is 1, the second is 2, ...
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                isCaseSensitive

                public boolean isCaseSensitive(int column)
                                        throws java.sql.SQLException
                Indicates whether a column's case matters.

                HSQLDB-Specific Information:

                HSQLDB 1.7.1 did not report this value accurately.

                Starting with 1.7.2, this feature is better supported.

                This method returns true for any column whose data type is a character type, with the exception of VARCHAR_IGNORECASE for which it returns false. It also returns false for any column whose data type is a not a character data type.

                Specified by:
                isCaseSensitive in interface java.sql.ResultSetMetaData
                Parameters:
                column - the first column is 1, the second is 2, ...
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                isSearchable

                public boolean isSearchable(int column)
                                     throws java.sql.SQLException
                Indicates whether the designated column can be used in a where clause.

                HSQLDB-Specific Information:

                HSQLDB 1.7.1 did not report this value accurately.

                Starting with 1.7.2, this feature is better supported.

                If the data type of the column is definitely known to be searchable in any way under HSQLDB, then true is returned, else false. That is, if the type is reported in DatabaseMetaData.getTypeInfo() as having DatabaseMetaData.typePredNone or is not reported, then false is returned, else true.

                Specified by:
                isSearchable in interface java.sql.ResultSetMetaData
                Parameters:
                column - the first column is 1, the second is 2, ...
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                isCurrency

                public boolean isCurrency(int column)
                                   throws java.sql.SQLException
                Indicates whether the designated column is a cash value.

                HSQLDB-Specific Information:

                Up to and including HSQLDB 1.7.2, this method always returns false.

                This is because true fixed (precision,scale) data types are not yet supported. That is, DECIMAL and NUMERIC types are implemented as a thin wrap of java.math.BigDecimal, which cannot, without additional, as yet unimplemented constraint enforcement code, be said to be a fixed (precision,scale) types.

                Specified by:
                isCurrency in interface java.sql.ResultSetMetaData
                Parameters:
                column - the first column is 1, the second is 2, ...
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                isNullable

                public int isNullable(int column)
                               throws java.sql.SQLException
                Indicates the nullability of values in the designated column.

                HSQLDB-Specific Information:

                Up to 1.7.1, HSQLDB did not report this value accurately.

                Starting with 1.7.2, this feature is better supported.

                columnNullableUnknown is always returned for result set columns that do not directly represent table column values (i.e. are calculated), while the corresponding value in SYSTEM_COLUMNS.NULLABLE is returned for result set columns that do directly represent table column values.

                Those wishing to determine the nullable status of a table column in isolation from ResultSetMetaData and in a DBMS-independent fashion can do so by calling DatabaseMetaData.getColumns() with the appropriate filter values and inspecting the result at the position described in the API documentation.

                Specified by:
                isNullable in interface java.sql.ResultSetMetaData
                Parameters:
                column - the first column is 1, the second is 2, ...
                Returns:
                the nullability status of the given column; one of columnNoNulls, columnNullable or columnNullableUnknown
                Throws:
                java.sql.SQLException - if a database access error occurs

                isSigned

                public boolean isSigned(int column)
                                 throws java.sql.SQLException
                Indicates whether values in the designated column are signed numbers.

                HSQLDB-Specific Information:

                HSQLDB 1.7.1 introduced support for this feature and 1.7.2 reports identical values (although using a slightly different implementation).

                Specified by:
                isSigned in interface java.sql.ResultSetMetaData
                Parameters:
                column - the first column is 1, the second is 2, ...
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                getColumnDisplaySize

                public int getColumnDisplaySize(int column)
                                         throws java.sql.SQLException
                Indicates the designated column's normal maximum width in characters.

                HSQLDB-Specific Information:

                Up to and including HSQLDB 1.7.1, this method always returned 0, which was intended to convey unknown display size. Unfortunately, this value is not universally handled by all clients and in the worst case can cause some applications to crash.

                Starting with 1.7.2, this feature is better supported.

                The current calculation follows these rules:

                1. Long character types and datetime types:

                  The maximum length/precision, repectively.

                2. CHAR and VARCHAR types:

                  • If the result set column is a direct pass through of a table column value, column size was declared and the connection is to an embedded database instance, then the declared value is returned.

                  • Otherwise, the value of the system property hsqldb.max_xxxchar_display_size or the magic value 32766 (0x7FFE) (tested usable/accepted by most tools and compatible with assumptions made by java.io read/write UTF) when the system property is not defined or is not accessible, due to security constraints.

                  It must be noted that the latter value in no way affects the ability of the HSQLDB JDBC driver to retrieve longer values and serves only as the current best effort at providing a value that maximizes usability across a wide range of tools, given that the HSQLDB database engine does not require the length to be declared and does not necessarily enforce it, even if declared.

                3. Number types:

                  The max precision, plus the length of the negation character (1), plus (if applicable) the maximum number of characters that may occupy the exponent character sequence. Note that some legacy tools do not correctly handle BIGINT values of greater than 18 digits.

                4. BOOLEAN (BIT) type:

                  The length of the character sequence "false" (5), the longer of the two boolean value String representations.

                5. Remaining types:

                  The maximum length/precision, respectively, as reported by DatabaseMetaData.getTypeInfo(), when applicable. If the maximum display size is unknown, unknowable or inapplicable, then zero is returned.

                Specified by:
                getColumnDisplaySize in interface java.sql.ResultSetMetaData
                Parameters:
                column - the first column is 1, the second is 2, ...
                Returns:
                the normal maximum number of characters allowed as the width of the designated column
                Throws:
                java.sql.SQLException - if a database access error occurs

                getColumnLabel

                public java.lang.String getColumnLabel(int column)
                                                throws java.sql.SQLException
                Gets the designated column's suggested title for use in printouts and displays.

                HSQLDB-Specific Information:

                In HSQLDB a ResultSet column label is determined in the following order of precedence:

                1. The label (alias) specified in the generating query.
                2. The name of the underlying column, if no label is specified.
                  This also applies to aggregate functions.
                3. An empty String.

                Specified by:
                getColumnLabel in interface java.sql.ResultSetMetaData
                Parameters:
                column - the first column is 1, the second is 2, ...
                Returns:
                the suggested column title
                Throws:
                java.sql.SQLException - if a database access error occurs

                getColumnName

                public java.lang.String getColumnName(int column)
                                               throws java.sql.SQLException
                Get the designated column's name.

                HSQLDB-Specific Information:

                In HSQLDB a ResultSet column name is determined in the following order of prcedence:

                1. The name of the underlying columnm, if the ResultSet column represents a column in a table.
                2. The label or alias specified in the generating query.
                3. An empty String.

                If the jdbc.get_column_name property of the database has been set to false, this method returns the same value as getColumnLabel(int).

                Specified by:
                getColumnName in interface java.sql.ResultSetMetaData
                Parameters:
                column - the first column is 1, the second is 2, ...
                Returns:
                column name
                Throws:
                java.sql.SQLException - if a database access error occurs

                getSchemaName

                public java.lang.String getSchemaName(int column)
                                               throws java.sql.SQLException
                Get the designated column's table's schema.

                HSQLDB-Specific Information:

                Up to 1.7.1, HSQLDB did not support the notion of schemas at all, including schema names in result set metadata; this method always returned "".

                Staring with 1.7.2, schema name reporting is supported only as an optional, experimental feature that is disabled by default. Enabling this feature requires setting the database property "hsqldb.schemas=true".

                Specifically, when this feature is enabled under 1.7.2, only very limited support is provided by the engine for executing SQL containing schema-qualified database object identifiers. That is, when this feature is enabled under 1.7.2, it is not yet possible in most cases to use what would otherwise be the correct, canonical SQL calculated from ResultSetMetaData.

                Regardless, reporting is done only in system table content and is not yet carried over to ResultSetMetaData.

                For greater detail, see discussion at: jdbcDatabaseMetaData.

                Specified by:
                getSchemaName in interface java.sql.ResultSetMetaData
                Parameters:
                column - the first column is 1, the second is 2, ...
                Returns:
                schema name or "" if not applicable
                Throws:
                java.sql.SQLException - if a database access error occurs

                getPrecision

                public int getPrecision(int column)
                                 throws java.sql.SQLException
                Get the designated column's number of decimal digits.

                HSQLDB-Specific Information:

                Starting with 1.8.0, HSQLDB reports the the declared length or precision specifiers for table columns (if they are defined, which up to 1.7.2 is not a requirement in DDL), as these values may or may not be enforced, depending on the value of the database property:

                 sql.enforce_strict_size
                 
                Because the property may change from one instantiation of a Database to the next and because, when set true, is not applied to existing values in table columns (only to new values introduced by following inserts and updates), the length and/or precision specifiers for table columns still do not neccessarily accurately reflect true constraints upon the contents of the columns. This situation may or may not change in a future release.

                Specified by:
                getPrecision in interface java.sql.ResultSetMetaData
                Parameters:
                column - the first column is 1, the second is 2, ...
                Returns:
                precision
                Throws:
                java.sql.SQLException - if a database access error occurs

                getScale

                public int getScale(int column)
                             throws java.sql.SQLException
                Gets the designated column's number of digits to right of the decimal point.

                HSQLDB-Specific Information:

                Starting with 1.8.0, HSQLDB reports the declared scale for table columns depending on the value of the database property:

                 sql.enforce_strict_size
                 

                Specified by:
                getScale in interface java.sql.ResultSetMetaData
                Parameters:
                column - the first column is 1, the second is 2, ...
                Returns:
                scale
                Throws:
                java.sql.SQLException - if a database access error occurs

                getTableName

                public java.lang.String getTableName(int column)
                                              throws java.sql.SQLException
                Gets the designated column's table name.

                Specified by:
                getTableName in interface java.sql.ResultSetMetaData
                Parameters:
                column - the first column is 1, the second is 2, ...
                Returns:
                table name or "" if not applicable
                Throws:
                java.sql.SQLException - if a database access error occurs

                getCatalogName

                public java.lang.String getCatalogName(int column)
                                                throws java.sql.SQLException
                Gets the designated column's table's catalog name.

                HSQLDB-Specific Information:

                Up to and including 1.7.1, HSQLDB did not support the notion of catalog and this method always returned "".

                Starting with 1.7.2, HSQLDB supports catalog reporting only as an optional, experimental feature that is disabled by default. Enabling this feature requires setting the database property "hsqldb.catalogs=true". When enabled, the catalog name for table columns is reported as the name by which the hosting Database knows itself.

                HSQLDB does not yet support any use of catalog qualification in DLL or DML. This fact is accurately indicated in the corresponding DatabaseMetaData.supportsXXX() method return values.

                Regardless, reporting is done only in system table content and is not yet carried over to ResultSetMetaData.

                For greater detail, see discussion at: jdbcDatabaseMetaData.

                Specified by:
                getCatalogName in interface java.sql.ResultSetMetaData
                Parameters:
                column - the first column is 1, the second is 2, ...
                Returns:
                the name of the catalog for the table in which the given column appears or "" if not applicable
                Throws:
                java.sql.SQLException - if a database access error occurs

                getColumnType

                public int getColumnType(int column)
                                  throws java.sql.SQLException
                Retrieves the designated column's SQL type.

                HSQLDB-Specific Information:

                This reports the SQL type of the column. HSQLDB can return Objects in any Java integral type wider than Integer for an SQL integral type.

                Specified by:
                getColumnType in interface java.sql.ResultSetMetaData
                Parameters:
                column - the first column is 1, the second is 2, ...
                Returns:
                SQL type from java.sql.Types
                Throws:
                java.sql.SQLException - if a database access error occurs
                See Also:
                Types

                getColumnTypeName

                public java.lang.String getColumnTypeName(int column)
                                                   throws java.sql.SQLException
                Retrieves the designated column's database-specific type name.

                Specified by:
                getColumnTypeName in interface java.sql.ResultSetMetaData
                Parameters:
                column - the first column is 1, the second is 2, ...
                Returns:
                type name used by the database. If the column type is a user-defined type, then a fully-qualified type name is returned.
                Throws:
                java.sql.SQLException - if a database access error occurs

                isReadOnly

                public boolean isReadOnly(int column)
                                   throws java.sql.SQLException
                Indicates whether the designated column is definitely not writable.

                HSQLDB-Specific Information:

                Up to and including 1.7.1, HSQLDB did not report this value accurately.

                Starting with HSQLDB 1.7.2, this feature is better supported.

                For result set columns that do not directly represent table column values (i.e. are calculated), true is reported. Otherwise, the read only status of the table and the database are used in the calculation, but not the read-only status of the session.

                Specified by:
                isReadOnly in interface java.sql.ResultSetMetaData
                Parameters:
                column - the first column is 1, the second is 2, ...
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                isWritable

                public boolean isWritable(int column)
                                   throws java.sql.SQLException
                Indicates whether it is possible for a write on the designated column to succeed.

                HSQLDB-Specific Information:

                Up to and including 1.7.1, HSQLDB did not report this value accurately.

                Starting with HSQLDB 1.7.2, this feature is better supported.

                In essense, the negation of isReadOnly() is reported.

                Specified by:
                isWritable in interface java.sql.ResultSetMetaData
                Parameters:
                column - the first column is 1, the second is 2, ...
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                isDefinitelyWritable

                public boolean isDefinitelyWritable(int column)
                                             throws java.sql.SQLException
                Indicates whether a write on the designated column will definitely succeed.

                HSQLDB-Specific Information:

                HSQLDB 1.7.1 did not report this value accurately.

                Starting with HSQLDB 1.7.2, this method always returns false. The reason for this is that it is generally either very complex or simply impossible to calculate deterministically true for table columns under all concievable conditions. The value is of dubious usefulness, except perhaps if there were support for updateable result sets using "SELECT ... FOR UPDATE" style locking. However, this is not anticipated to occur any time in the 1.7.x release series.

                Specified by:
                isDefinitelyWritable in interface java.sql.ResultSetMetaData
                Parameters:
                column - the first column is 1, the second is 2, ...
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                getColumnClassName

                public java.lang.String getColumnClassName(int column)
                                                    throws java.sql.SQLException
                Returns the fully-qualified name of the Java class whose instances are manufactured if the method ResultSet.getObject is called to retrieve a value from the column. ResultSet.getObject may return a subclass of the class returned by this method.

                HSQLDB-Specific Information:

                HSQLDB 1.7.1 did not support this feature; calling this method always caused an SQLException to be thrown, stating that the function was not supported.

                Specified by:
                getColumnClassName in interface java.sql.ResultSetMetaData
                Parameters:
                column - the first column is 1, the second is 2, ...
                Returns:
                the fully-qualified name of the class in the Java programming language that would be used by the method ResultSet.getObject to retrieve the value in the specified column. This is the class name used for custom mapping.
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)

                toString

                public java.lang.String toString()


                Copyright 2001 - 2005 HSQL Development Group. All Rights Reserved. hsqldb-1.8.0.10.orig/doc/src/org/hsqldb/jdbc/package-frame.html0000644000175000017500000000467611020614566022510 0ustar renerene org.hsqldb.jdbc (HSQLDB 1.8.0.10 API) org.hsqldb.jdbc
                Classes 
                jdbcBlob
                jdbcCallableStatement
                jdbcClob
                jdbcColumnMetaData
                jdbcConnection
                jdbcDatabaseMetaData
                jdbcDataSource
                jdbcDataSourceFactory
                jdbcParameterMetaData
                jdbcPreparedStatement
                jdbcResultSet
                jdbcResultSetMetaData
                jdbcSavepoint
                jdbcStatement
                Util
                hsqldb-1.8.0.10.orig/doc/src/org/hsqldb/jdbc/jdbcStatement.html0000644000175000017500000025772311020614570022612 0ustar renerene jdbcStatement (HSQLDB 1.8.0.10 API)

                org.hsqldb.jdbc
                Class jdbcStatement

                java.lang.Object
                  extended byorg.hsqldb.jdbc.jdbcStatement
                
                All Implemented Interfaces:
                java.sql.Statement
                Direct Known Subclasses:
                jdbcPreparedStatement

                public class jdbcStatement
                extends java.lang.Object
                implements java.sql.Statement

                The object used for executing a static SQL statement and returning the results it produces.

                By default, only one ResultSet object per Statement object can be open at the same time. Therefore, if the reading of one ResultSet object is interleaved with the reading of another, each must have been generated by different Statement objects. All execution methods in the Statement interface implicitly close a statment's current ResultSet object if an open one exists.

                HSQLDB-Specific Information:

                JRE 1.1.x Notes:

                In general, JDBC 2 support requires Java 1.2 and above, and JDBC3 requires Java 1.4 and above. In HSQLDB, support for methods introduced in different versions of JDBC depends on the JDK version used for compiling and building HSQLDB.

                Since 1.7.0, all JDBC 2 methods can be called while executing under the version 1.1.x Java Runtime EnvironmentTM. However, in addition to this technique requiring explicit casts to the org.hsqldb.jdbcXXX classes, some of these method calls require int values that are defined only in the JDBC 2 or greater version of the ResultSet interface. For this reason these values are defined in jdbcResultSet.

                In a JRE 1.1.x environment, calling JDBC 2 methods that take or return the JDBC2-only ResultSet values can be achieved by referring to them in parameter specifications and return value comparisons, respectively, as follows:

                 jdbcResultSet.FETCH_FORWARD
                 jdbcResultSet.TYPE_FORWARD_ONLY
                 jdbcResultSet.TYPE_SCROLL_INSENSITIVE
                 jdbcResultSet.CONCUR_READ_ONLY
                 //etc.
                 

                However, please note that code written to use HSQLDB JDBC 2 features under JDK 1.1.x will not be compatible for use with other JDBC 2 drivers. Please also note that this feature is offered solely as a convenience to developers who must work under JDK 1.1.x due to operating constraints, yet wish to use some of the more advanced features available under the JDBC 2 specification.

                (fredt@users)
                (boucherb@users)

                Author:
                boucherb@users, fredt@user
                See Also:
                jdbcConnection.createStatement(), jdbcResultSet

                Field Summary
                 
                Fields inherited from interface java.sql.Statement
                CLOSE_ALL_RESULTS, CLOSE_CURRENT_RESULT, EXECUTE_FAILED, KEEP_CURRENT_RESULT, NO_GENERATED_KEYS, RETURN_GENERATED_KEYS, SUCCESS_NO_INFO
                 
                Method Summary
                 void addBatch(java.lang.String sql)
                           Adds the given SQL command to the current list of commmands for this Statement object.
                 void cancel()
                           Cancels this Statement object if both the DBMS and driver support aborting an SQL statement.
                 void clearBatch()
                           Empties this Statement object's current list of SQL commands.
                 void clearWarnings()
                           Clears all the warnings reported on this Statement object.
                 void close()
                           Releases this Statement object's database and JDBC resources immediately instead of waiting for this to happen when it is automatically closed.
                 boolean execute(java.lang.String sql)
                           Executes the given SQL statement, which may return multiple results.
                 boolean execute(java.lang.String sql, int autoGeneratedKeys)
                           Executes the given SQL statement, which may return multiple results, and signals the driver that any auto-generated keys should be made available for retrieval.
                 boolean execute(java.lang.String sql, int[] columnIndexes)
                           Executes the given SQL statement, which may return multiple results, and signals the driver that the auto-generated keys indicated in the given array should be made available for retrieval.
                 boolean execute(java.lang.String sql, java.lang.String[] columnNames)
                           Executes the given SQL statement, which may return multiple results, and signals the driver that the auto-generated keys indicated in the given array should be made available for retrieval.
                 int[] executeBatch()
                           Submits a batch of commands to the database for execution and if all commands execute successfully, returns an array of update counts.
                 java.sql.ResultSet executeQuery(java.lang.String sql)
                           Executes the given SQL statement, which returns a single ResultSet object.
                 int executeUpdate(java.lang.String sql)
                           Executes the given SQL statement, which may be an INSERT, UPDATE, or DELETE statement or an SQL statement that returns nothing, such as an SQL DDL statement.
                 int executeUpdate(java.lang.String sql, int autoGeneratedKeys)
                           Executes the given SQL statement and signals the driver with the given flag about whether the auto-generated keys produced by this Statement object should be made available for retrieval.
                 int executeUpdate(java.lang.String sql, int[] columnIndexes)
                           Executes the given SQL statement and signals the driver that the auto-generated keys indicated in the given array should be made available for retrieval.
                 int executeUpdate(java.lang.String sql, java.lang.String[] columnNames)
                           Executes the given SQL statement and signals the driver that the auto-generated keys indicated in the given array should be made available for retrieval.
                 java.sql.Connection getConnection()
                           Retrieves the Connection object that produced this Statement object.
                 int getFetchDirection()
                           Retrieves the direction for fetching rows from database tables that is the default for result sets generated from this Statement object.
                 int getFetchSize()
                           Retrieves the number of result set rows that is the default fetch size for ResultSet objects generated from this Statement object.
                 java.sql.ResultSet getGeneratedKeys()
                           Retrieves any auto-generated keys created as a result of executing this Statement object.
                 int getMaxFieldSize()
                           Retrieves the maximum number of bytes that can be returned for character and binary column values in a ResultSet object produced by this Statement object.
                 int getMaxRows()
                           Retrieves the maximum number of rows that a ResultSet object produced by this Statement object can contain.
                 boolean getMoreResults()
                           Moves to this Statement object's next result, returns true if it is a ResultSet object, and implicitly closes any current ResultSet object(s) obtained with the method getResultSet.
                 boolean getMoreResults(int current)
                           Moves to this Statement object's next result, deals with any current ResultSet object(s) according to the instructions specified by the given flag, and returns true if the next result is a ResultSet object.
                 int getQueryTimeout()
                           Retrieves the number of seconds the driver will wait for a Statement object to execute.
                 java.sql.ResultSet getResultSet()
                           Retrieves the current result as a ResultSet object.
                 int getResultSetConcurrency()
                           Retrieves the result set concurrency for ResultSet objects generated by this Statement object.
                 int getResultSetHoldability()
                           Retrieves the result set holdability for ResultSet objects generated by this Statement object.
                 int getResultSetType()
                           Retrieves the result set type for ResultSet objects generated by this Statement object.
                 int getUpdateCount()
                           Retrieves the current result as an update count; if the result is a ResultSet object or there are no more results, -1 is returned.
                 java.sql.SQLWarning getWarnings()
                           Retrieves the first warning reported by calls on this Statement object.
                 boolean isClosed()
                          Retrieves whether this statement is closed.
                 void setCursorName(java.lang.String name)
                           Sets the SQL cursor name to the given String, which will be used by subsequent Statement object execute methods.
                 void setEscapeProcessing(boolean enable)
                           Sets escape processing on or off.
                 void setFetchDirection(int direction)
                           Gives the driver a hint as to the direction in which rows will be processed in ResultSet objects created using this Statement object.
                 void setFetchSize(int rows)
                           Gives the JDBC driver a hint as to the number of rows that should be fetched from the database when more rows are needed.
                 void setMaxFieldSize(int max)
                           Sets the limit for the maximum number of bytes in a ResultSet column storing character or binary values to the given number of bytes.
                 void setMaxRows(int max)
                           Sets the limit for the maximum number of rows that any ResultSet object can contain to the given number.
                 void setQueryTimeout(int seconds)
                           Sets the number of seconds the driver will wait for a Statement object to execute to the given number of seconds.
                 
                Methods inherited from class java.lang.Object
                equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
                 

                Method Detail

                executeQuery

                public java.sql.ResultSet executeQuery(java.lang.String sql)
                                                throws java.sql.SQLException
                Executes the given SQL statement, which returns a single ResultSet object.

                HSQLDB-Specific Information:

                This method should not be used for statements other than SELECT queries.

                Including 1.7.2, HSQLDB does not throw an exception when the statement is a DDL statement or an UPDATE or DELETE statement. This will certainly change in future version.

                Specified by:
                executeQuery in interface java.sql.Statement
                Parameters:
                sql - an SQL statement to be sent to the database, typically a static SQL SELECT statement
                Returns:
                a ResultSet object that contains the data produced by the given query; never null
                Throws:
                java.sql.SQLException - if a database access error occurs or the given SQL statement produces anything other than a single ResultSet object

                executeUpdate

                public int executeUpdate(java.lang.String sql)
                                  throws java.sql.SQLException
                Executes the given SQL statement, which may be an INSERT, UPDATE, or DELETE statement or an SQL statement that returns nothing, such as an SQL DDL statement.

                Specified by:
                executeUpdate in interface java.sql.Statement
                Parameters:
                sql - an SQL INSERT, UPDATE or DELETE statement or an SQL statement that returns nothing
                Returns:
                either the row count for INSERT, UPDATE or DELETE statements, or 0 for SQL statements that return nothing
                Throws:
                java.sql.SQLException - if a database access error occurs or the given SQL statement produces a ResultSet object

                close

                public void close()
                           throws java.sql.SQLException
                Releases this Statement object's database and JDBC resources immediately instead of waiting for this to happen when it is automatically closed. It is generally good practice to release resources as soon as you are finished with them to avoid tying up database resources.

                Calling the method close on a Statement object that is already closed has no effect.

                Note: A Statement object is automatically closed when it is garbage collected. When a Statement object is closed, its current ResultSet object, if one exists, is also closed.

                Specified by:
                close in interface java.sql.Statement
                Throws:
                java.sql.SQLException - if a database access error occurs

                getMaxFieldSize

                public int getMaxFieldSize()
                                    throws java.sql.SQLException
                Retrieves the maximum number of bytes that can be returned for character and binary column values in a ResultSet object produced by this Statement object. This limit applies only to BINARY, VARBINARY, LONGVARBINARY, CHAR, VARCHAR, and LONGVARCHAR columns. If the limit is exceeded, the excess data is silently discarded.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB always returns zero, meaning there is no limit.

                Specified by:
                getMaxFieldSize in interface java.sql.Statement
                Returns:
                the current column size limit for columns storing character and binary values; zero means there is no limit
                Throws:
                java.sql.SQLException - if a database access error occurs
                See Also:
                setMaxFieldSize(int)

                setMaxFieldSize

                public void setMaxFieldSize(int max)
                                     throws java.sql.SQLException
                Sets the limit for the maximum number of bytes in a ResultSet column storing character or binary values to the given number of bytes. This limit applies only to BINARY, VARBINARY, LONGVARBINARY, CHAR, VARCHAR, and LONGVARCHAR fields. If the limit is exceeded, the excess data is silently discarded. For maximum portability, use values greater than 256.

                HSQLDB-Specific Information:

                Including 1.7.2, calls to this method are simply ignored; HSQLDB always stores the full number of bytes when dealing with any of the field types mentioned above. These types all have an absolute maximum element upper bound determined by the Java array index limit java.lang.Integer.MAX_VALUE. For XXXBINARY types, this translates to Integer.MAX_VALUE bytes. For XXXCHAR types, this translates to 2 * Integer.MAX_VALUE bytes (2 bytes / character)

                Specified by:
                setMaxFieldSize in interface java.sql.Statement
                Parameters:
                max - the new column size limit in bytes; zero means there is no limit
                Throws:
                java.sql.SQLException - if a database access error occurs or the condition max >= 0 is not satisfied
                See Also:
                getMaxFieldSize()

                getMaxRows

                public int getMaxRows()
                               throws java.sql.SQLException
                Retrieves the maximum number of rows that a ResultSet object produced by this Statement object can contain. If this limit is exceeded, the excess rows are silently dropped.

                Specified by:
                getMaxRows in interface java.sql.Statement
                Returns:
                the current maximum number of rows for a ResultSet object produced by this Statement object; zero means there is no limit
                Throws:
                java.sql.SQLException - if a database access error occurs
                See Also:
                setMaxRows(int)

                setMaxRows

                public void setMaxRows(int max)
                                throws java.sql.SQLException
                Sets the limit for the maximum number of rows that any ResultSet object can contain to the given number. If the limit is exceeded, the excess rows are silently dropped.

                Specified by:
                setMaxRows in interface java.sql.Statement
                Parameters:
                max - the new max rows limit; zero means there is no limit
                Throws:
                java.sql.SQLException - if a database access error occurs or the condition max >= 0 is not satisfied
                See Also:
                getMaxRows()

                setEscapeProcessing

                public void setEscapeProcessing(boolean enable)
                                         throws java.sql.SQLException
                Sets escape processing on or off. If escape scanning is on (the default), the driver will do escape substitution before sending the SQL statement to the database. Note: Since prepared statements have usually been parsed prior to making this call, disabling escape processing for PreparedStatements objects will have no effect.

                Specified by:
                setEscapeProcessing in interface java.sql.Statement
                Parameters:
                enable - true to enable escape processing; false to disable it
                Throws:
                java.sql.SQLException - if a database access error occurs

                getQueryTimeout

                public int getQueryTimeout()
                                    throws java.sql.SQLException
                Retrieves the number of seconds the driver will wait for a Statement object to execute. If the limit is exceeded, an SQLException is thrown.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB always returns zero, meaning there is no limit.

                Specified by:
                getQueryTimeout in interface java.sql.Statement
                Returns:
                the current query timeout limit in seconds; zero means there is no limit
                Throws:
                java.sql.SQLException - if a database access error occurs
                See Also:
                setQueryTimeout(int)

                setQueryTimeout

                public void setQueryTimeout(int seconds)
                                     throws java.sql.SQLException
                Sets the number of seconds the driver will wait for a Statement object to execute to the given number of seconds. If the limit is exceeded, an SQLException is thrown.

                HSQLDB-Specific Information:

                Including 1.7.2, calls to this method are ignored; HSQLDB waits an unlimited amount of time for statement execution requests to return.

                Specified by:
                setQueryTimeout in interface java.sql.Statement
                Parameters:
                seconds - the new query timeout limit in seconds; zero means there is no limit
                Throws:
                java.sql.SQLException - if a database access error occurs or the condition seconds >= 0 is not satisfied
                See Also:
                getQueryTimeout()

                cancel

                public void cancel()
                            throws java.sql.SQLException
                Cancels this Statement object if both the DBMS and driver support aborting an SQL statement. This method can be used by one thread to cancel a statement that is being executed by another thread.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB does not support aborting a SQL statement; calls to this method are ignored.

                Specified by:
                cancel in interface java.sql.Statement
                Throws:
                java.sql.SQLException - if a database access error occurs

                getWarnings

                public java.sql.SQLWarning getWarnings()
                                                throws java.sql.SQLException
                Retrieves the first warning reported by calls on this Statement object. Subsequent Statement object warnings will be chained to this SQLWarning object.

                The warning chain is automatically cleared each time a statement is (re)executed. This method may not be called on a closed Statement object; doing so will cause an SQLException to be thrown.

                Note: If you are processing a ResultSet object, any warnings associated with reads on that ResultSet object will be chained on it rather than on the Statement object that produced it.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB never produces Statement warnings; this method always returns null.

                Specified by:
                getWarnings in interface java.sql.Statement
                Returns:
                the first SQLWarning object or null if there are no warnings
                Throws:
                java.sql.SQLException - if a database access error occurs or this method is called on a closed statement

                clearWarnings

                public void clearWarnings()
                                   throws java.sql.SQLException
                Clears all the warnings reported on this Statement object. After a call to this method, the method getWarnings will return null until a new warning is reported for this Statement object.

                HSQLDB-Specific Information:

                Including HSQLDB 1.7.2, SQLWarning objects are never produced for Statement Objects; calls to this method are ignored.

                Specified by:
                clearWarnings in interface java.sql.Statement
                Throws:
                java.sql.SQLException - if a database access error occurs

                setCursorName

                public void setCursorName(java.lang.String name)
                                   throws java.sql.SQLException
                Sets the SQL cursor name to the given String, which will be used by subsequent Statement object execute methods. This name can then be used in SQL positioned update or delete statements to identify the current row in the ResultSet object generated by this statement. If the database does not support positioned update/delete, this method is a noop. To insure that a cursor has the proper isolation level to support updates, the cursor's SELECT statement should have the form SELECT FOR UPDATE. If FOR UPDATE is not present, positioned updates may fail.

                Note: By definition, the execution of positioned updates and deletes must be done by a different Statement object than the one that generated the ResultSet object being used for positioning. Also, cursor names must be unique within a connection.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB does not support named cursors, updateable results or table locking via SELECT FOR UPDATE; calls to this method are ignored.

                Specified by:
                setCursorName in interface java.sql.Statement
                Parameters:
                name - the new cursor name, which must be unique within a connection
                Throws:
                java.sql.SQLException - if a database access error occurs

                execute

                public boolean execute(java.lang.String sql)
                                throws java.sql.SQLException
                Executes the given SQL statement, which may return multiple results. In some (uncommon) situations, a single SQL statement may return multiple result sets and/or update counts. Normally you can ignore this unless you are (1) executing a stored procedure that you know may return multiple results or (2) you are dynamically executing an unknown SQL string.

                The execute method executes an SQL statement and indicates the form of the first result. You must then use the methods getResultSet or getUpdateCount to retrieve the result, and getMoreResults to move to any subsequent result(s).

                Specified by:
                execute in interface java.sql.Statement
                Parameters:
                sql - any SQL statement
                Returns:
                true if the first result is a ResultSet object; false if it is an update count or there are no results
                Throws:
                java.sql.SQLException - if a database access error occurs
                See Also:
                getResultSet(), getUpdateCount(), getMoreResults()

                getResultSet

                public java.sql.ResultSet getResultSet()
                                                throws java.sql.SQLException
                Retrieves the current result as a ResultSet object. This method should be called only once per result.

                HSQLDB-Specific Information:

                Without an interceding call to executeXXX, each invocation of this method will produce a new, initialized ResultSet instance referring to the current result, if any.

                Specified by:
                getResultSet in interface java.sql.Statement
                Returns:
                the current result as a ResultSet object or null if the result is an update count or there are no more results
                Throws:
                java.sql.SQLException - if a database access error occurs
                See Also:
                execute(java.lang.String)

                getUpdateCount

                public int getUpdateCount()
                                   throws java.sql.SQLException
                Retrieves the current result as an update count; if the result is a ResultSet object or there are no more results, -1 is returned. This method should be called only once per result.

                Specified by:
                getUpdateCount in interface java.sql.Statement
                Returns:
                the current result as an update count; -1 if the current result is a ResultSet object or there are no more results
                Throws:
                java.sql.SQLException - if a database access error occurs
                See Also:
                execute(java.lang.String)

                getMoreResults

                public boolean getMoreResults()
                                       throws java.sql.SQLException
                Moves to this Statement object's next result, returns true if it is a ResultSet object, and implicitly closes any current ResultSet object(s) obtained with the method getResultSet.

                There are no more results when the following is true:

                    (!getMoreResults() && (getUpdateCount() == -1)
                 

                Specified by:
                getMoreResults in interface java.sql.Statement
                Returns:
                true if the next result is a ResultSet object; false if it is an update count or there are no more results
                Throws:
                java.sql.SQLException - if a database access error occurs
                See Also:
                execute(java.lang.String)

                setFetchDirection

                public void setFetchDirection(int direction)
                                       throws java.sql.SQLException
                Gives the driver a hint as to the direction in which rows will be processed in ResultSet objects created using this Statement object. The default value is ResultSet.FETCH_FORWARD.

                Note that this method sets the default fetch direction for result sets generated by this Statement object. Each result set has its own methods for getting and setting its own fetch direction.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB supports only FETCH_FORWARD.

                Setting any other value will throw an SQLException stating that the operation is not supported.

                Specified by:
                setFetchDirection in interface java.sql.Statement
                Parameters:
                direction - the initial direction for processing rows
                Throws:
                java.sql.SQLException - if a database access error occurs or the given direction is not one of ResultSet.FETCH_FORWARD, ResultSet.FETCH_REVERSE, or ResultSet.FETCH_UNKNOWN

                HSQLDB throws for all values except FETCH_FORWARD

                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcStatement)
                See Also:
                getFetchDirection()

                getFetchDirection

                public int getFetchDirection()
                                      throws java.sql.SQLException
                Retrieves the direction for fetching rows from database tables that is the default for result sets generated from this Statement object. If this Statement object has not set a fetch direction by calling the method setFetchDirection, the return value is implementation-specific.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB always returns FETCH_FORWARD.

                Specified by:
                getFetchDirection in interface java.sql.Statement
                Returns:
                the default fetch direction for result sets generated from this Statement object
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcStatement)
                See Also:
                setFetchDirection(int)

                setFetchSize

                public void setFetchSize(int rows)
                                  throws java.sql.SQLException
                Gives the JDBC driver a hint as to the number of rows that should be fetched from the database when more rows are needed. The number of rows specified affects only result sets created using this statement. If the value specified is zero, then the hint is ignored. The default value is zero.

                HSQLDB-Specific Information:

                Including 1.7.2, calls to this method are ignored; HSQLDB fetches each result completely as part of executing its statement.

                Specified by:
                setFetchSize in interface java.sql.Statement
                Parameters:
                rows - the number of rows to fetch
                Throws:
                java.sql.SQLException - if a database access error occurs, or the condition 0 <= rows <= this.getMaxRows() is not satisfied.

                HSQLDB never throws an exception, since calls to this method are always ignored.

                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcStatement)
                See Also:
                getFetchSize()

                getFetchSize

                public int getFetchSize()
                                 throws java.sql.SQLException
                Retrieves the number of result set rows that is the default fetch size for ResultSet objects generated from this Statement object. If this Statement object has not set a fetch size by calling the method setFetchSize, the return value is implementation-specific.

                HSQLDB-Specific Information

                Including 1.7.2, this method always returns 0. HSQLDB fetches each result completely as part of executing its statement

                Specified by:
                getFetchSize in interface java.sql.Statement
                Returns:
                the default fetch size for result sets generated from this Statement object
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcStatement)
                See Also:
                setFetchSize(int)

                getResultSetConcurrency

                public int getResultSetConcurrency()
                                            throws java.sql.SQLException
                Retrieves the result set concurrency for ResultSet objects generated by this Statement object.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB supports only CONCUR_READ_ONLY concurrency.

                Specified by:
                getResultSetConcurrency in interface java.sql.Statement
                Returns:
                either ResultSet.CONCUR_READ_ONLY or ResultSet.CONCUR_UPDATABLE (not supported)
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcStatement)

                getResultSetType

                public int getResultSetType()
                                     throws java.sql.SQLException
                Retrieves the result set type for ResultSet objects generated by this Statement object.

                HSQLDB-Specific Information:

                HSQLDB 1.7.0 and later versions support TYPE_FORWARD_ONLY and TYPE_SCROLL_INSENSITIVE.

                Specified by:
                getResultSetType in interface java.sql.Statement
                Returns:
                one of ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, or ResultSet.TYPE_SCROLL_SENSITIVE (not supported)

                Note: Up to and including 1.7.1, HSQLDB never returns TYPE_SCROLL_SENSITIVE

                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcStatement)

                addBatch

                public void addBatch(java.lang.String sql)
                              throws java.sql.SQLException
                Adds the given SQL command to the current list of commmands for this Statement object. The commands in this list can be executed as a batch by calling the method executeBatch.

                NOTE: This method is optional.

                HSQLDB-Specific Information:

                Starting with 1.7.2, this feature is supported.

                Specified by:
                addBatch in interface java.sql.Statement
                Parameters:
                sql - typically this is a static SQL INSERT or UPDATE statement
                Throws:
                java.sql.SQLException - if a database access error occurs, or the driver does not support batch updates
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcStatement)
                See Also:
                executeBatch()

                clearBatch

                public void clearBatch()
                                throws java.sql.SQLException
                Empties this Statement object's current list of SQL commands.

                NOTE: This method is optional.

                HSQLDB-Specific Information:

                Starting with HSQLDB 1.7.2, this feature is supported.

                Specified by:
                clearBatch in interface java.sql.Statement
                Throws:
                java.sql.SQLException - if a database access error occurs or the driver does not support batch updates
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcStatement)
                See Also:
                addBatch(java.lang.String)

                executeBatch

                public int[] executeBatch()
                                   throws java.sql.SQLException
                Submits a batch of commands to the database for execution and if all commands execute successfully, returns an array of update counts. The int elements of the array that is returned are ordered to correspond to the commands in the batch, which are ordered according to the order in which they were added to the batch. The elements in the array returned by the method executeBatch may be one of the following:
                1. A number greater than or equal to zero -- indicates that the command was processed successfully and is an update count giving the number of rows in the database that were affected by the command's execution
                2. A value of SUCCESS_NO_INFO -- indicates that the command was processed successfully but that the number of rows affected is unknown

                  If one of the commands in a batch update fails to execute properly, this method throws a BatchUpdateException, and a JDBC driver may or may not continue to process the remaining commands in the batch. However, the driver's behavior must be consistent with a particular DBMS, either always continuing to process commands or never continuing to process commands. If the driver continues processing after a failure, the array returned by the method BatchUpdateException.getUpdateCounts will contain as many elements as there are commands in the batch, and at least one of the elements will be the following:

                3. A value of EXECUTE_FAILED -- indicates that the command failed to execute successfully and occurs only if a driver continues to process commands after a command fails

                A driver is not required to implement this method. The possible implementations and return values have been modified in the Java 2 SDK, Standard Edition, version 1.3 to accommodate the option of continuing to proccess commands in a batch update after a BatchUpdateException obejct has been thrown.

                HSQLDB-Specific Information:

                Starting with HSQLDB 1.7.2, this feature is supported.

                HSQLDB stops execution of commands in a batch when one of the commands results in an exception. The size of the returned array equals the number of commands that were executed successfully.

                When the product is built under the JAVA1 target, an exception is never thrown and it is the responsibility of the client software to check the size of the returned update count array to determine if any batch items failed. To build and run under the JAVA2 target, JDK/JRE 1.3 or higher must be used.

                Specified by:
                executeBatch in interface java.sql.Statement
                Returns:
                an array of update counts containing one element for each command in the batch. The elements of the array are ordered according to the order in which commands were added to the batch.
                Throws:
                java.sql.SQLException - if a database access error occurs or the driver does not support batch statements. Throws BatchUpdateException (a subclass of java.sql.SQLException) if one of the commands sent to the database fails to execute properly or attempts to return a result set.
                Since:
                JDK 1.3 (JDK 1.1.x developers: read the new overview for jdbcStatement)

                getConnection

                public java.sql.Connection getConnection()
                                                  throws java.sql.SQLException
                Retrieves the Connection object that produced this Statement object.

                Specified by:
                getConnection in interface java.sql.Statement
                Returns:
                the connection that produced this statement
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcStatement)

                getMoreResults

                public boolean getMoreResults(int current)
                                       throws java.sql.SQLException
                Moves to this Statement object's next result, deals with any current ResultSet object(s) according to the instructions specified by the given flag, and returns true if the next result is a ResultSet object.

                There are no more results when the following is true:

                   (!getMoreResults() && (getUpdateCount() == -1)
                 

                HSQLDB-Specific Information:

                HSQLDB 1.7.2 does not support this feature.

                Calling this method always throws an SQLException, stating that the function is not supported.

                Specified by:
                getMoreResults in interface java.sql.Statement
                Parameters:
                current - one of the following Statement constants indicating what should happen to current ResultSet objects obtained using the method getResultSetCLOSE_CURRENT_RESULT, KEEP_CURRENT_RESULT, or CLOSE_ALL_RESULTS
                Returns:
                true if the next result is a ResultSet object; false if it is an update count or there are no more results
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7
                See Also:
                execute(java.lang.String)

                getGeneratedKeys

                public java.sql.ResultSet getGeneratedKeys()
                                                    throws java.sql.SQLException
                Retrieves any auto-generated keys created as a result of executing this Statement object. If this Statement object did not generate any keys, an empty ResultSet object is returned.

                HSQLDB-Specific Information:

                HSQLDB 1.7.2 does not support this feature.

                Calling this method always throws an SQLException, stating that the function is not supported.

                Specified by:
                getGeneratedKeys in interface java.sql.Statement
                Returns:
                a ResultSet object containing the auto-generated key(s) generated by the execution of this Statement object
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7

                executeUpdate

                public int executeUpdate(java.lang.String sql,
                                         int autoGeneratedKeys)
                                  throws java.sql.SQLException
                Executes the given SQL statement and signals the driver with the given flag about whether the auto-generated keys produced by this Statement object should be made available for retrieval.

                HSQLDB-Specific Information:

                HSQLDB 1.7.2 does not support this feature.

                Calling this method always throws an SQLException, stating that the function is not supported.

                Specified by:
                executeUpdate in interface java.sql.Statement
                Parameters:
                sql - must be an SQL INSERT, UPDATE or DELETE statement or an SQL statement that returns nothing
                autoGeneratedKeys - a flag indicating whether auto-generated keys should be made available for retrieval; one of the following constants: Statement.RETURN_GENERATED_KEYS Statement.NO_GENERATED_KEYS
                Returns:
                either the row count for INSERT, UPDATE or DELETE statements, or 0 for SQL statements that return nothing
                Throws:
                java.sql.SQLException - if a database access error occurs, the given SQL statement returns a ResultSet object, or the given constant is not one of those allowed
                Since:
                JDK 1.4, HSQLDB 1.7

                executeUpdate

                public int executeUpdate(java.lang.String sql,
                                         int[] columnIndexes)
                                  throws java.sql.SQLException
                Executes the given SQL statement and signals the driver that the auto-generated keys indicated in the given array should be made available for retrieval. The driver will ignore the array if the SQL statement is not an INSERT statement.

                HSQLDB-Specific Information:

                HSQLDB 1.7.2 does not support this feature.

                Calling this method always throws an SQLException, stating that the function is not supported.

                Specified by:
                executeUpdate in interface java.sql.Statement
                Parameters:
                sql - an SQL INSERT, UPDATE or DELETE statement or an SQL statement that returns nothing, such as an SQL DDL statement
                columnIndexes - an array of column indexes indicating the columns that should be returned from the inserted row
                Returns:
                either the row count for INSERT, UPDATE, or DELETE statements, or 0 for SQL statements that return nothing
                Throws:
                java.sql.SQLException - if a database access error occurs or the SQL statement returns a ResultSet object
                Since:
                JDK 1.4, HSQLDB 1.7

                executeUpdate

                public int executeUpdate(java.lang.String sql,
                                         java.lang.String[] columnNames)
                                  throws java.sql.SQLException
                Executes the given SQL statement and signals the driver that the auto-generated keys indicated in the given array should be made available for retrieval. The driver will ignore the array if the SQL statement is not an INSERT statement.

                HSQLDB-Specific Information:

                HSQLDB 1.7.2 does not support this feature.

                Calling this method always throws an SQLException, stating that the function is not supported.

                Specified by:
                executeUpdate in interface java.sql.Statement
                Parameters:
                sql - an SQL INSERT, UPDATE or DELETE statement or an SQL statement that returns nothing
                columnNames - an array of the names of the columns that should be returned from the inserted row
                Returns:
                either the row count for INSERT, UPDATE, or DELETE statements, or 0 for SQL statements that return nothing
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7

                execute

                public boolean execute(java.lang.String sql,
                                       int autoGeneratedKeys)
                                throws java.sql.SQLException
                Executes the given SQL statement, which may return multiple results, and signals the driver that any auto-generated keys should be made available for retrieval. The driver will ignore this signal if the SQL statement is not an INSERT statement.

                In some (uncommon) situations, a single SQL statement may return multiple result sets and/or update counts. Normally you can ignore this unless you are (1) executing a stored procedure that you know may return multiple results or (2) you are dynamically executing an unknown SQL string.

                The execute method executes an SQL statement and indicates the form of the first result. You must then use the methods getResultSet or getUpdateCount to retrieve the result, and getMoreResults to move to any subsequent result(s).

                HSQLDB-Specific Information:

                HSQLDB 1.7.2 does not support this feature.

                Calling this method always throws an SQLException, stating that the function is not supported.

                Specified by:
                execute in interface java.sql.Statement
                Parameters:
                sql - any SQL statement
                autoGeneratedKeys - a constant indicating whether auto-generated keys should be made available for retrieval using the method getGeneratedKeys; one of the following constants: Statement.RETURN_GENERATED_KEYS or Statement.NO_GENERATED_KEYS
                Returns:
                true if the first result is a ResultSet object; false if it is an update count or there are no results
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7
                See Also:
                getResultSet(), getUpdateCount(), getMoreResults(), getGeneratedKeys()

                execute

                public boolean execute(java.lang.String sql,
                                       int[] columnIndexes)
                                throws java.sql.SQLException
                Executes the given SQL statement, which may return multiple results, and signals the driver that the auto-generated keys indicated in the given array should be made available for retrieval. This array contains the indexes of the columns in the target table that contain the auto-generated keys that should be made available. The driver will ignore the array if the given SQL statement is not an INSERT statement.

                Under some (uncommon) situations, a single SQL statement may return multiple result sets and/or update counts. Normally you can ignore this unless you are (1) executing a stored procedure that you know may return multiple results or (2) you are dynamically executing an unknown SQL string.

                The execute method executes an SQL statement and indicates the form of the first result. You must then use the methods getResultSet or getUpdateCount to retrieve the result, and getMoreResults to move to any subsequent result(s).

                HSQLDB-Specific Information:

                HSQLDB 1.7.2 does not support this feature.

                Calling this method always throws an SQLException, stating that the function is not supported.

                Specified by:
                execute in interface java.sql.Statement
                Parameters:
                sql - any SQL statement
                columnIndexes - an array of the indexes of the columns in the inserted row that should be made available for retrieval by a call to the method getGeneratedKeys
                Returns:
                true if the first result is a ResultSet object; false if it is an update count or there are no results
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7
                See Also:
                getResultSet(), getUpdateCount(), getMoreResults()

                execute

                public boolean execute(java.lang.String sql,
                                       java.lang.String[] columnNames)
                                throws java.sql.SQLException
                Executes the given SQL statement, which may return multiple results, and signals the driver that the auto-generated keys indicated in the given array should be made available for retrieval. This array contains the names of the columns in the target table that contain the auto-generated keys that should be made available. The driver will ignore the array if the given SQL statement is not an INSERT statement.

                In some (uncommon) situations, a single SQL statement may return multiple result sets and/or update counts. Normally you can ignore this unless you are (1) executing a stored procedure that you know may return multiple results or (2) you are dynamically executing an unknown SQL string.

                The execute method executes an SQL statement and indicates the form of the first result. You must then use the methods getResultSet or getUpdateCount to retrieve the result, and getMoreResults to move to any subsequent result(s).

                HSQLDB-Specific Information:

                HSQLDB 1.7.2 does not support this feature.

                Calling this method always throws an SQLException, stating that the function is not supported.

                Specified by:
                execute in interface java.sql.Statement
                Parameters:
                sql - any SQL statement
                columnNames - an array of the names of the columns in the inserted row that should be made available for retrieval by a call to the method getGeneratedKeys
                Returns:
                true if the next result is a ResultSet object; false if it is an update count or there are no more results
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7
                See Also:
                getResultSet(), getUpdateCount(), getMoreResults(), getGeneratedKeys()

                getResultSetHoldability

                public int getResultSetHoldability()
                                            throws java.sql.SQLException
                Retrieves the result set holdability for ResultSet objects generated by this Statement object.

                HSQLDB-Specific Information:

                Starting with 1.7.2, this method returns HOLD_CURSORS_OVER_COMMIT

                Specified by:
                getResultSetHoldability in interface java.sql.Statement
                Returns:
                either ResultSet.HOLD_CURSORS_OVER_COMMIT or ResultSet.CLOSE_CURSORS_AT_COMMIT
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7

                isClosed

                public boolean isClosed()
                Retrieves whether this statement is closed.



                Copyright 2001 - 2005 HSQL Development Group. All Rights Reserved. hsqldb-1.8.0.10.orig/doc/src/org/hsqldb/jdbc/jdbcPreparedStatement.html0000644000175000017500000031524311020614567024273 0ustar renerene jdbcPreparedStatement (HSQLDB 1.8.0.10 API)

                org.hsqldb.jdbc
                Class jdbcPreparedStatement

                java.lang.Object
                  extended byorg.hsqldb.jdbc.jdbcStatement
                      extended byorg.hsqldb.jdbc.jdbcPreparedStatement
                
                All Implemented Interfaces:
                java.sql.PreparedStatement, java.sql.Statement
                Direct Known Subclasses:
                jdbcCallableStatement

                public class jdbcPreparedStatement
                extends jdbcStatement
                implements java.sql.PreparedStatement

                An object that represents a precompiled SQL statement.

                An SQL statement is precompiled and stored in a PreparedStatement object. This object can then be used to efficiently execute this statement multiple times.

                Note: The setter methods (setShort, setString, and so on) for setting IN parameter values must specify types that are compatible with the defined SQL type of the input parameter. For instance, if the IN parameter has SQL type INTEGER, then the method setInt should be used.

                If arbitrary parameter type conversions are required, the method setObject should be used with a target SQL type.

                In the following example of setting a parameter, con represents an active connection:

                 PreparedStatement pstmt = con.prepareStatement("UPDATE EMPLOYEES
                                               SET SALARY = ? WHERE ID = ?");
                 pstmt.setBigDecimal(1, 153833.00)
                 pstmt.setInt(2, 110592)
                 

                HSQLDB-Specific Information:

                Starting with HSQLDB 1.7.2, jdbcPreparedStatement objects are backed by a true compiled parameteric representation. Hence, there are now significant performance gains to be had by using a jdbcPreparedStatement object in preference to a jdbcStatement object, if a short-running SQL statement is to be executed more than a small number of times.

                When it can be otherwise avoided, it is to be considered poor practice to fully prepare (construct), parameterize, execute, fetch and close a jdbcPreparedStatement object for each execution cycle. Indeed, under HSQLDB 1.8.0, this practice is likely to be noticably less performant for short-running statements than the equivalent process using jdbcStatement objects, albeit far more convenient, less error prone and certainly much less resource-intensive, especially when large binary and character values are involved, due to the optimized parameterization facility.

                Instead, when developing an application that is not totally oriented toward the execution of ad hoc SQL, it is recommended to expend some effort toward identifing the SQL statements that are good candidates for regular reuse and adapting the structure of the application accordingly. Often, this is done by recording the text of candidate SQL statements in an application resource object (which has the nice side-benefit of isolating and hiding differences in SQL dialects across different drivers) and caching for possible reuse the PreparedStatement objects derived from the recorded text.

                Multi thread use:

                A PreparedStatement object is stateful and should not normally be shared by multiple threads. If it has to be shared, the calls to set the parameters, calls to add batch statements, the execute call and any post-execute calls should be made within a block synchronized on the PreparedStatement Object.

                JRE 1.1.x Notes:

                In general, JDBC 2 support requires Java 1.2 and above, and JDBC3 requires Java 1.4 and above. In HSQLDB, support for methods introduced in different versions of JDBC depends on the JDK version used for compiling and building HSQLDB.

                Since 1.7.0, it is possible to build the product so that all JDBC 2 methods can be called while executing under the version 1.1.x Java Runtime EnvironmentTM. However, in addition to requiring explicit casts to the org.hsqldb.jdbcXXX interface implementations, some of these method calls require int values that are defined only in the JDBC 2 or greater version of ResultSet interface. For this reason, when the product is compiled under JDK 1.1.x, these values are defined in jdbcResultSet.

                In a JRE 1.1.x environment, calling JDBC 2 methods that take or return the JDBC2-only ResultSet values can be achieved by referring to them in parameter specifications and return value comparisons, respectively, as follows:

                 jdbcResultSet.FETCH_FORWARD
                 jdbcResultSet.TYPE_FORWARD_ONLY
                 jdbcResultSet.TYPE_SCROLL_INSENSITIVE
                 jdbcResultSet.CONCUR_READ_ONLY
                 // etc.
                 
                However, please note that code written in such a manner will not be compatible for use with other JDBC 2 drivers, since they expect and use ResultSet, rather than jdbcResultSet. Also note, this feature is offered solely as a convenience to developers who must work under JDK 1.1.x due to operating constraints, yet wish to use some of the more advanced features available under the JDBC 2 specification.

                (fredt@users)
                (boucherb@users)

                Author:
                boucherb@users, fredt@users
                See Also:
                jdbcConnection.prepareStatement(java.lang.String), jdbcResultSet

                Field Summary
                 
                Fields inherited from interface java.sql.Statement
                CLOSE_ALL_RESULTS, CLOSE_CURRENT_RESULT, EXECUTE_FAILED, KEEP_CURRENT_RESULT, NO_GENERATED_KEYS, RETURN_GENERATED_KEYS, SUCCESS_NO_INFO
                 
                Method Summary
                 void addBatch()
                           Adds a set of parameters to this PreparedStatement object's batch of commands.
                 void addBatch(java.lang.String sql)
                          This method should always throw if called for a PreparedStatement or CallableStatment.
                 void clearParameters()
                           Clears the current parameter values immediately.
                 void close()
                          Does the specialized work required to free this object's resources and that of it's parent class.
                 boolean execute()
                           Executes the SQL statement in this PreparedStatement object, which may be any kind of SQL statement.
                 boolean execute(java.lang.String sql)
                          This method should always throw if called for a PreparedStatement or CallableStatment.
                 int[] executeBatch()
                           Submits a batch of commands to the database for execution and if all commands execute successfully, returns an array of update counts.
                 java.sql.ResultSet executeQuery()
                           Executes the SQL query in this PreparedStatement object and returns the ResultSet object generated by the query.
                 java.sql.ResultSet executeQuery(java.lang.String sql)
                          This method should always throw if called for a PreparedStatement or CallableStatment.
                 int executeUpdate()
                           Executes the SQL statement in this PreparedStatement object, which must be an SQL INSERT, UPDATE or DELETE statement; or an SQL statement that returns nothing, such as a DDL statement.
                 int executeUpdate(java.lang.String sql)
                          This method should always throw if called for a PreparedStatement or CallableStatment.
                 java.sql.ResultSetMetaData getMetaData()
                           Retrieves a ResultSetMetaData object that contains information about the columns of the ResultSet object that will be returned when this PreparedStatement object is executed.
                 java.sql.ParameterMetaData getParameterMetaData()
                           Retrieves the number, types and properties of this PreparedStatement object's parameters.
                 void setArray(int i, java.sql.Array x)
                           Sets the designated parameter to the given Array object.
                 void setAsciiStream(int parameterIndex, java.io.InputStream x, int length)
                           Sets the designated parameter to the given input stream, which will have the specified number of bytes.
                 void setBigDecimal(int parameterIndex, java.math.BigDecimal x)
                           Sets the designated parameter to the given java.math.BigDecimal value.
                 void setBinaryStream(int parameterIndex, java.io.InputStream x, int length)
                           Sets the designated parameter to the given input stream, which will have the specified number of bytes.
                 void setBlob(int i, java.sql.Blob x)
                           Sets the designated parameter to the given Blob object.
                 void setBoolean(int parameterIndex, boolean x)
                           Sets the designated parameter to the given Java boolean value.
                 void setByte(int parameterIndex, byte x)
                           Sets the designated parameter to the given Java byte value.
                 void setBytes(int paramIndex, byte[] x)
                           Sets the designated parameter to the given Java array of bytes.
                 void setCharacterStream(int parameterIndex, java.io.Reader reader, int length)
                           Sets the designated parameter to the given Reader object, which is the given number of characters long.
                 void setClob(int i, java.sql.Clob x)
                           Sets the designated parameter to the given Clob object.
                 void setDate(int parameterIndex, java.sql.Date x)
                           Sets the designated parameter to the given java.sql.Date value.
                 void setDate(int parameterIndex, java.sql.Date x, java.util.Calendar cal)
                           Sets the designated parameter to the given java.sql.Date value, using the given Calendar object.
                 void setDouble(int parameterIndex, double x)
                           Sets the designated parameter to the given Java double value.
                 void setEscapeProcessing(boolean enable)
                           Sets escape processing on or off.
                 void setFloat(int parameterIndex, float x)
                           Sets the designated parameter to the given Java float value.
                 void setInt(int parameterIndex, int x)
                           Sets the designated parameter to the given Java int value.
                 void setLong(int parameterIndex, long x)
                           Sets the designated parameter to the given Java long value.
                 void setNull(int paramIndex, int sqlType)
                           Sets the designated parameter to SQL NULL.
                 void setNull(int paramIndex, int sqlType, java.lang.String typeName)
                           Sets the designated parameter to SQL NULL.
                 void setObject(int parameterIndex, java.lang.Object x)
                           Sets the value of the designated parameter using the given object.
                 void setObject(int parameterIndex, java.lang.Object x, int targetSqlType)
                           Sets the value of the designated parameter with the given object.
                 void setObject(int parameterIndex, java.lang.Object x, int targetSqlType, int scale)
                           Sets the value of the designated parameter with the given object.
                 void setRef(int i, java.sql.Ref x)
                           Sets the designated parameter to the given REF(<structured-type>) value.
                 void setShort(int parameterIndex, short x)
                           Sets the designated parameter to the given Java short value.
                 void setString(int parameterIndex, java.lang.String x)
                           Sets the designated parameter to the given Java String value.
                 void setTime(int parameterIndex, java.sql.Time x)
                           Sets the designated parameter to the given java.sql.Time value.
                 void setTime(int parameterIndex, java.sql.Time x, java.util.Calendar cal)
                           Sets the designated parameter to the given java.sql.Time value, using the given Calendar object.
                 void setTimestamp(int parameterIndex, java.sql.Timestamp x)
                           Sets the designated parameter to the given java.sql.Timestamp value.
                 void setTimestamp(int parameterIndex, java.sql.Timestamp x, java.util.Calendar cal)
                           Sets the designated parameter to the given java.sql.Timestamp value, using the given Calendar object.
                 void setUnicodeStream(int parameterIndex, java.io.InputStream x, int length)
                          Deprecated. Sun does not include a reason, but presumably this is because setCharacterStream is now prefered
                 void setURL(int parameterIndex, java.net.URL x)
                           Sets the designated parameter to the given java.net.URL value.
                 java.lang.String toString()
                          Retrieves a String representation of this object.
                 
                Methods inherited from class org.hsqldb.jdbc.jdbcStatement
                cancel, clearBatch, clearWarnings, execute, execute, execute, executeUpdate, executeUpdate, executeUpdate, getConnection, getFetchDirection, getFetchSize, getGeneratedKeys, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, isClosed, setCursorName, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setQueryTimeout
                 
                Methods inherited from class java.lang.Object
                equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
                 
                Methods inherited from interface java.sql.Statement
                cancel, clearBatch, clearWarnings, execute, execute, execute, executeUpdate, executeUpdate, executeUpdate, getConnection, getFetchDirection, getFetchSize, getGeneratedKeys, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, setCursorName, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setQueryTimeout
                 

                Method Detail

                setEscapeProcessing

                public void setEscapeProcessing(boolean enable)
                                         throws java.sql.SQLException
                Sets escape processing on or off.

                HSQLDB-Specific Information:

                Since 1.7.0, the implementation follows the standard behaviour by overriding the same method in jdbcStatement class.

                In other words, calling this method has no effect.

                Specified by:
                setEscapeProcessing in interface java.sql.Statement
                Overrides:
                setEscapeProcessing in class jdbcStatement
                Parameters:
                enable - true to enable escape processing; false to disable it
                Throws:
                java.sql.SQLException - if a database access error occurs

                execute

                public boolean execute()
                                throws java.sql.SQLException
                Executes the SQL statement in this PreparedStatement object, which may be any kind of SQL statement. Some prepared statements return multiple results; the execute method handles these complex statements as well as the simpler form of statements handled by the methods executeQueryand executeUpdate.

                The execute method returns a boolean to indicate the form of the first result. You must call either the method getResultSet or getUpdateCount to retrieve the result; you must call getMoreResults to move to any subsequent result(s).

                HSQLDB-Specific Information:

                Including 1.8.0, prepared statements do not generate multiple fetchable results.

                In future versions, it will be possible that statements generate multiple fetchable results under certain conditions.

                Specified by:
                execute in interface java.sql.PreparedStatement
                Returns:
                true if the first result is a ResultSet object; false if the first result is an update count or there is no result
                Throws:
                java.sql.SQLException - if a database access error occurs or an argument is supplied to this method
                See Also:
                jdbcStatement.execute(java.lang.String), jdbcStatement.getResultSet(), jdbcStatement.getUpdateCount(), jdbcStatement.getMoreResults()

                executeQuery

                public java.sql.ResultSet executeQuery()
                                                throws java.sql.SQLException
                Executes the SQL query in this PreparedStatement object and returns the ResultSet object generated by the query.

                Specified by:
                executeQuery in interface java.sql.PreparedStatement
                Returns:
                a ResultSet object that contains the data produced by the query; never null
                Throws:
                java.sql.SQLException - if a database access error occurs or the SQL statement does not return a ResultSet object

                executeUpdate

                public int executeUpdate()
                                  throws java.sql.SQLException
                Executes the SQL statement in this PreparedStatement object, which must be an SQL INSERT, UPDATE or DELETE statement; or an SQL statement that returns nothing, such as a DDL statement.

                Specified by:
                executeUpdate in interface java.sql.PreparedStatement
                Returns:
                either (1) the row count for INSERT, UPDATE, or DELETE statements or (2) 0 for SQL statements that return nothing
                Throws:
                java.sql.SQLException - if a database access error occurs or the SQL statement returns a ResultSet object

                executeBatch

                public int[] executeBatch()
                                   throws java.sql.SQLException
                Submits a batch of commands to the database for execution and if all commands execute successfully, returns an array of update counts. The int elements of the array that is returned are ordered to correspond to the commands in the batch, which are ordered according to the order in which they were added to the batch. The elements in the array returned by the method executeBatch may be one of the following:
                1. A number greater than or equal to zero -- indicates that the command was processed successfully and is an update count giving the number of rows in the database that were affected by the command's execution
                2. A value of SUCCESS_NO_INFO -- indicates that the command was processed successfully but that the number of rows affected is unknown

                  If one of the commands in a batch update fails to execute properly, this method throws a BatchUpdateException, and a JDBC driver may or may not continue to process the remaining commands in the batch. However, the driver's behavior must be consistent with a particular DBMS, either always continuing to process commands or never continuing to process commands. If the driver continues processing after a failure, the array returned by the method BatchUpdateException.getUpdateCounts will contain as many elements as there are commands in the batch, and at least one of the elements will be the following:

                3. A value of EXECUTE_FAILED -- indicates that the command failed to execute successfully and occurs only if a driver continues to process commands after a command fails

                A driver is not required to implement this method. The possible implementations and return values have been modified in the Java 2 SDK, Standard Edition, version 1.3 to accommodate the option of continuing to proccess commands in a batch update after a BatchUpdateException obejct has been thrown.

                HSQLDB-Specific Information:

                Starting with HSQLDB 1.7.2, this feature is supported.

                HSQLDB stops execution of commands in a batch when one of the commands results in an exception. The size of the returned array equals the number of commands that were executed successfully.

                When the product is built under the JAVA1 target, an exception is never thrown and it is the responsibility of the client software to check the size of the returned update count array to determine if any batch items failed. To build and run under the JAVA2 target, JDK/JRE 1.3 or higher must be used.

                Specified by:
                executeBatch in interface java.sql.Statement
                Overrides:
                executeBatch in class jdbcStatement
                Returns:
                an array of update counts containing one element for each command in the batch. The elements of the array are ordered according to the order in which commands were added to the batch.
                Throws:
                java.sql.SQLException - if a database access error occurs or the driver does not support batch statements. Throws BatchUpdateException (a subclass of java.sql.SQLException) if one of the commands sent to the database fails to execute properly or attempts to return a result set.
                Since:
                JDK 1.3 (JDK 1.1.x developers: read the new overview for jdbcStatement)

                setNull

                public void setNull(int paramIndex,
                                    int sqlType)
                             throws java.sql.SQLException
                Sets the designated parameter to SQL NULL.

                Note: You must specify the parameter's SQL type.

                HSQLDB-Specific Information:

                HSQLDB ignores the sqlType argument.

                Specified by:
                setNull in interface java.sql.PreparedStatement
                Parameters:
                paramIndex - the first parameter is 1, the second is 2, ...
                sqlType - the SQL type code defined in java.sql.Types
                Throws:
                java.sql.SQLException - if a database access error occurs

                setBoolean

                public void setBoolean(int parameterIndex,
                                       boolean x)
                                throws java.sql.SQLException
                Sets the designated parameter to the given Java boolean value. The driver converts this to an SQL BIT value when it sends it to the database.

                HSQLDB-Specific Information:

                Since 1.7.2, HSQLDB uses the BOOLEAN type instead of BIT, as per SQL 200n (SQL 3).

                Specified by:
                setBoolean in interface java.sql.PreparedStatement
                Parameters:
                parameterIndex - the first parameter is 1, the second is 2, ...
                x - the parameter value
                Throws:
                java.sql.SQLException - if a database access error occurs

                setByte

                public void setByte(int parameterIndex,
                                    byte x)
                             throws java.sql.SQLException
                Sets the designated parameter to the given Java byte value. The driver converts this to an SQL TINYINT value when it sends it to the database.

                Specified by:
                setByte in interface java.sql.PreparedStatement
                Parameters:
                parameterIndex - the first parameter is 1, the second is 2, ...
                x - the parameter value
                Throws:
                java.sql.SQLException - if a database access error occurs

                setShort

                public void setShort(int parameterIndex,
                                     short x)
                              throws java.sql.SQLException
                Sets the designated parameter to the given Java short value. The driver converts this to an SQL SMALLINT value when it sends it to the database.

                Specified by:
                setShort in interface java.sql.PreparedStatement
                Parameters:
                parameterIndex - the first parameter is 1, the second is 2, ...
                x - the parameter value
                Throws:
                java.sql.SQLException - if a database access error occurs

                setInt

                public void setInt(int parameterIndex,
                                   int x)
                            throws java.sql.SQLException
                Sets the designated parameter to the given Java int value. The driver converts this to an SQL INTEGER value when it sends it to the database.

                Specified by:
                setInt in interface java.sql.PreparedStatement
                Parameters:
                parameterIndex - the first parameter is 1, the second is 2, ...
                x - the parameter value
                Throws:
                java.sql.SQLException - if a database access error occurs

                setLong

                public void setLong(int parameterIndex,
                                    long x)
                             throws java.sql.SQLException
                Sets the designated parameter to the given Java long value. The driver converts this to an SQL BIGINT value when it sends it to the database.

                Specified by:
                setLong in interface java.sql.PreparedStatement
                Parameters:
                parameterIndex - the first parameter is 1, the second is 2, ...
                x - the parameter value
                Throws:
                java.sql.SQLException - if a database access error occurs

                setFloat

                public void setFloat(int parameterIndex,
                                     float x)
                              throws java.sql.SQLException
                Sets the designated parameter to the given Java float value. The driver converts this to an SQL FLOAT value when it sends it to the database.

                HSQLDB-Specific Information:

                Since 1.7.1, HSQLDB handles Java positive/negative Infinity and NaN float values consistent with the Java Language Specification; these special values are now correctly stored to and retrieved from the database.

                Specified by:
                setFloat in interface java.sql.PreparedStatement
                Parameters:
                parameterIndex - the first parameter is 1, the second is 2, ...
                x - the parameter value
                Throws:
                java.sql.SQLException - if a database access error occurs

                setDouble

                public void setDouble(int parameterIndex,
                                      double x)
                               throws java.sql.SQLException
                Sets the designated parameter to the given Java double value. The driver converts this to an SQL DOUBLE value when it sends it to the database.

                HSQLDB-Specific Information:

                Since 1.7.1, HSQLDB handles Java positive/negative Infinity and NaN double values consistent with the Java Language Specification; these special values are now correctly stored to and retrieved from the database.

                Specified by:
                setDouble in interface java.sql.PreparedStatement
                Parameters:
                parameterIndex - the first parameter is 1, the second is 2, ...
                x - the parameter value
                Throws:
                java.sql.SQLException - if a database access error occurs

                setBigDecimal

                public void setBigDecimal(int parameterIndex,
                                          java.math.BigDecimal x)
                                   throws java.sql.SQLException
                Sets the designated parameter to the given java.math.BigDecimal value. The driver converts this to an SQL NUMERIC value when it sends it to the database.

                Specified by:
                setBigDecimal in interface java.sql.PreparedStatement
                Parameters:
                parameterIndex - the first parameter is 1, the second is 2, ...
                x - the parameter value
                Throws:
                java.sql.SQLException - if a database access error occurs

                setString

                public void setString(int parameterIndex,
                                      java.lang.String x)
                               throws java.sql.SQLException
                Sets the designated parameter to the given Java String value. The driver converts this to an SQL VARCHAR or LONGVARCHAR value (depending on the argument's size relative to the driver's limits on VARCHAR values) when it sends it to the database.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB stores all XXXCHAR values as java.lang.String objects; there is no appreciable difference between CHAR, VARCHAR and LONGVARCHAR.

                Specified by:
                setString in interface java.sql.PreparedStatement
                Parameters:
                parameterIndex - the first parameter is 1, the second is 2, ...
                x - the parameter value
                Throws:
                java.sql.SQLException - if a database access error occurs

                setBytes

                public void setBytes(int paramIndex,
                                     byte[] x)
                              throws java.sql.SQLException
                Sets the designated parameter to the given Java array of bytes. The driver converts this to an SQL VARBINARY or LONGVARBINARY (depending on the argument's size relative to the driver's limits on VARBINARY values) when it sends it to the database.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB stores all XXXBINARY values the same way; there is no appreciable difference between BINARY, VARBINARY and LONGVARBINARY.

                Specified by:
                setBytes in interface java.sql.PreparedStatement
                Parameters:
                paramIndex - the first parameter is 1, the second is 2, ...
                x - the parameter value
                Throws:
                java.sql.SQLException - if a database access error occurs

                setDate

                public void setDate(int parameterIndex,
                                    java.sql.Date x)
                             throws java.sql.SQLException
                Sets the designated parameter to the given java.sql.Date value. The driver converts this to an SQL DATE value when it sends it to the database.

                Specified by:
                setDate in interface java.sql.PreparedStatement
                Parameters:
                parameterIndex - the first parameter is 1, the second is 2, ...
                x - the parameter value
                Throws:
                java.sql.SQLException - if a database access error occurs

                setTime

                public void setTime(int parameterIndex,
                                    java.sql.Time x)
                             throws java.sql.SQLException
                Sets the designated parameter to the given java.sql.Time value. The driver converts this to an SQL TIME value when it sends it to the database.

                Specified by:
                setTime in interface java.sql.PreparedStatement
                Parameters:
                parameterIndex - the first parameter is 1, the second is 2, ...
                x - the parameter value
                Throws:
                java.sql.SQLException - if a database access error occurs

                setTimestamp

                public void setTimestamp(int parameterIndex,
                                         java.sql.Timestamp x)
                                  throws java.sql.SQLException
                Sets the designated parameter to the given java.sql.Timestamp value. The driver converts this to an SQL TIMESTAMP value when it sends it to the database.

                Specified by:
                setTimestamp in interface java.sql.PreparedStatement
                Parameters:
                parameterIndex - the first parameter is 1, the second is 2, ...
                x - the parameter value
                Throws:
                java.sql.SQLException - if a database access error occurs

                setAsciiStream

                public void setAsciiStream(int parameterIndex,
                                           java.io.InputStream x,
                                           int length)
                                    throws java.sql.SQLException
                Sets the designated parameter to the given input stream, which will have the specified number of bytes. When a very large ASCII value is input to a LONGVARCHAR parameter, it may be more practical to send it via a java.io.InputStream. Data will be read from the stream as needed until end-of-file is reached. The JDBC driver will do any necessary conversion from ASCII to the database char format.

                Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.

                HSQLDB-Specific Information:

                This method uses the default platform character encoding to convert bytes from the stream into the characters of a String. In the future this is likely to change to always treat the stream as ASCII.

                Before HSQLDB 1.7.0, setAsciiStream and setUnicodeStream were identical.

                Specified by:
                setAsciiStream in interface java.sql.PreparedStatement
                Parameters:
                parameterIndex - the first parameter is 1, the second is 2, ...
                x - the Java input stream that contains the ASCII parameter value
                length - the number of bytes in the stream
                Throws:
                java.sql.SQLException - if a database access error occurs

                setUnicodeStream

                public void setUnicodeStream(int parameterIndex,
                                             java.io.InputStream x,
                                             int length)
                                      throws java.sql.SQLException
                Deprecated. Sun does not include a reason, but presumably this is because setCharacterStream is now prefered

                Sets the designated parameter to the given input stream, which will have the specified number of bytes. A Unicode character has two bytes, with the first byte being the high byte, and the second being the low byte. When a very large Unicode value is input to a LONGVARCHAR parameter, it may be more practical to send it via a java.io.InputStream object. The data will be read from the stream as needed until end-of-file is reached. The JDBC driver will do any necessary conversion from Unicode to the database char format.

                Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.

                HSQLDB-Specific Information:

                Since 1.7.0, this method complies with behavior as defined by the JDBC3 specification.

                Specified by:
                setUnicodeStream in interface java.sql.PreparedStatement
                Parameters:
                parameterIndex - the first parameter is 1, the second is 2, ...
                x - a java.io.InputStream object that contains the Unicode parameter value as two-byte Unicode characters
                length - the number of bytes in the stream
                Throws:
                java.sql.SQLException - if a database access error occurs

                setBinaryStream

                public void setBinaryStream(int parameterIndex,
                                            java.io.InputStream x,
                                            int length)
                                     throws java.sql.SQLException
                Sets the designated parameter to the given input stream, which will have the specified number of bytes. When a very large binary value is input to a LONGVARBINARY parameter, it may be more practical to send it via a java.io.InputStream object. The data will be read from the stream as needed until end-of-file is reached.

                Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.

                HSQLDB-Specific Information:

                Since 1.7.2, this method works according to the standard.

                Specified by:
                setBinaryStream in interface java.sql.PreparedStatement
                Parameters:
                parameterIndex - the first parameter is 1, the second is 2, ...
                x - the java input stream which contains the binary parameter value
                length - the number of bytes in the stream
                Throws:
                java.sql.SQLException - if a database access error occurs

                clearParameters

                public void clearParameters()
                                     throws java.sql.SQLException
                Clears the current parameter values immediately.

                In general, parameter values remain in force for repeated use of a statement. Setting a parameter value automatically clears its previous value. However, in some cases it is useful to immediately release the resources used by the current parameter values; this can be done by calling the method clearParameters.

                Specified by:
                clearParameters in interface java.sql.PreparedStatement
                Throws:
                java.sql.SQLException - if a database access error occurs

                setObject

                public void setObject(int parameterIndex,
                                      java.lang.Object x,
                                      int targetSqlType,
                                      int scale)
                               throws java.sql.SQLException
                Sets the value of the designated parameter with the given object.

                The second argument must be an object type; for integral values, the java.lang equivalent objects should be used.

                The given Java object will be converted to the given targetSqlType before being sent to the database. If the object has a custom mapping (is of a class implementing the interface SQLData), the JDBC driver should call the method SQLData.writeSQL to write it to the SQL data stream. If, on the other hand, the object is of a class implementing Ref, Blob, Clob, Struct, or Array, the driver should pass it to the database as a value of the corresponding SQL type.

                Note that this method may be used to pass database-specific abstract data types.

                HSQLDB-Specific Information:

                Inculding 1.7.1,this method was identical to setObject(int, Object, int). That is, this method simply called setObject(int, Object, int), ignoring the scale specification.

                Since 1.7.2, this method supports the conversions listed in the conversion table B-5 of the JDBC 3 specification. The scale argument is not used.

                Specified by:
                setObject in interface java.sql.PreparedStatement
                Parameters:
                parameterIndex - the first parameter is 1, the second is 2, ...
                x - the object containing the input parameter value
                targetSqlType - the SQL type (as defined in java.sql.Types) to be sent to the database. The scale argument may further qualify this type.
                scale - for java.sql.Types.DECIMAL or java.sql.Types.NUMERIC types, this is the number of digits after the decimal point. For all other types, this value will be ignored.

                Up to and including HSQLDB 1.7.0, this parameter is ignored.

                Throws:
                java.sql.SQLException - if a database access error occurs
                See Also:
                Types, setObject(int,Object,int)

                setObject

                public void setObject(int parameterIndex,
                                      java.lang.Object x,
                                      int targetSqlType)
                               throws java.sql.SQLException
                Sets the value of the designated parameter with the given object. This method is like the method setObject above, except that it assumes a scale of zero.

                HSQLDB-Specific Information:

                Since 1.7.2, this method supports conversions listed in the conversion table B-5 of the JDBC 3 specification.

                Specified by:
                setObject in interface java.sql.PreparedStatement
                Parameters:
                parameterIndex - the first parameter is 1, the second is 2, ...
                x - the object containing the input parameter value
                targetSqlType - the SQL type (as defined in java.sql.Types) to be sent to the database
                Throws:
                java.sql.SQLException - if a database access error occurs
                See Also:
                setObject(int,Object)

                setObject

                public void setObject(int parameterIndex,
                                      java.lang.Object x)
                               throws java.sql.SQLException
                Sets the value of the designated parameter using the given object.

                The second parameter must be of type Object; therefore, the java.lang equivalent objects should be used for built-in types.

                The JDBC specification specifies a standard mapping from Java Object types to SQL types. The given argument will be converted to the corresponding SQL type before being sent to the database.

                Note that this method may be used to pass datatabase- specific abstract data types, by using a driver-specific Java type. If the object is of a class implementing the interface SQLData, the JDBC driver should call the method SQLData.writeSQL to write it to the SQL data stream. If, on the other hand, the object is of a class implementing Ref, Blob, Clob, Struct, or Array, the driver should pass it to the database as a value of the corresponding SQL type.

                This method throws an exception if there is an ambiguity, for example, if the object is of a class implementing more than one of the interfaces named above.

                HSQLDB-Specific Information:

                Since 1.7.2, this method supports conversions listed in the conversion table B-5 of the JDBC 3 specification.

                Specified by:
                setObject in interface java.sql.PreparedStatement
                Parameters:
                parameterIndex - the first parameter is 1, the second is 2, ...
                x - the object containing the input parameter value
                Throws:
                java.sql.SQLException - if a database access error occurs or the type of the given object is ambiguous

                addBatch

                public void addBatch()
                              throws java.sql.SQLException
                Adds a set of parameters to this PreparedStatement object's batch of commands.

                HSQLDB-Specific Information:

                Since 1.7.2, this feature is supported.

                Specified by:
                addBatch in interface java.sql.PreparedStatement
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcPreparedStatement)
                See Also:
                jdbcStatement.addBatch(java.lang.String)

                setCharacterStream

                public void setCharacterStream(int parameterIndex,
                                               java.io.Reader reader,
                                               int length)
                                        throws java.sql.SQLException
                Sets the designated parameter to the given Reader object, which is the given number of characters long. When a very large UNICODE value is input to a LONGVARCHAR parameter, it may be more practical to send it via a java.io.Reader object. The data will be read from the stream as needed until end-of-file is reached. The JDBC driver will do any necessary conversion from UNICODE to the database char format.

                Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.

                HSQLDB-Specific Information:

                HSQLDB stores CHARACTER and related SQL types as Unicode so this method does not perform any conversion.

                Specified by:
                setCharacterStream in interface java.sql.PreparedStatement
                Parameters:
                parameterIndex - the first parameter is 1, the second is 2, ...
                reader - the java.io.Reader object that contains the Unicode data
                length - the number of characters in the stream
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcPreparedStatement)

                setRef

                public void setRef(int i,
                                   java.sql.Ref x)
                            throws java.sql.SQLException
                Sets the designated parameter to the given REF(<structured-type>) value. The driver converts this to an SQL REF value when it sends it to the database.

                HSQLDB-Specific Information:

                HSQLDB 1.7.2 does not support the SQL REF type. Calling this method throws an exception.

                Specified by:
                setRef in interface java.sql.PreparedStatement
                Parameters:
                i - the first parameter is 1, the second is 2, ...
                x - an SQL REF value
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcPreparedStatement)

                setBlob

                public void setBlob(int i,
                                    java.sql.Blob x)
                             throws java.sql.SQLException
                Sets the designated parameter to the given Blob object. The driver converts this to an SQL BLOB value when it sends it to the database.

                HSQLDB-Specific Information:

                Previous to 1.7.2, this feature was not supported.

                Since 1.7.2, setBlob is supported. With 1.7.2, setting Blob objects is limited to those of length less than or equal to Integer.MAX_VALUE. In 1.7.2, setBlob(i,x) is roughly equivalent (null and length handling not shown) to:

                 setBinaryStream(i, x.getBinaryStream(), (int) x.length());
                 

                Specified by:
                setBlob in interface java.sql.PreparedStatement
                Parameters:
                i - the first parameter is 1, the second is 2, ...
                x - a Blob object that maps an SQL BLOB value
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcPreparedStatement)

                setClob

                public void setClob(int i,
                                    java.sql.Clob x)
                             throws java.sql.SQLException
                Sets the designated parameter to the given Clob object. The driver converts this to an SQL CLOB value when it sends it to the database.

                HSQLDB-Specific Information:

                Previous to 1.7.2, this feature was not supported.

                Since 1.7.2, setClob is supported. With 1.7.2, setting Blob objects is limited to those of length less than or equal to Integer.MAX_VALUE. In 1.7.2, setClob(i,x) is rougly equivalent (null and length handling not shown) to:

                 setCharacterStream(i, x.getCharacterStream(), (int) x.length());
                 

                Specified by:
                setClob in interface java.sql.PreparedStatement
                Parameters:
                i - the first parameter is 1, the second is 2, ...
                x - a Clob object that maps an SQL CLOB value
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcPreparedStatement)

                setArray

                public void setArray(int i,
                                     java.sql.Array x)
                              throws java.sql.SQLException
                Sets the designated parameter to the given Array object. The driver converts this to an SQL ARRAY value when it sends it to the database.

                HSQLDB-Specific Information:

                HSQLDB 1.7.2 does not support the SQL ARRAY type. Calling this method throws an exception.

                Specified by:
                setArray in interface java.sql.PreparedStatement
                Parameters:
                i - the first parameter is 1, the second is 2, ...
                x - an Array object that maps an SQL ARRAY value
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcPreparedStatement)

                getMetaData

                public java.sql.ResultSetMetaData getMetaData()
                                                       throws java.sql.SQLException
                Retrieves a ResultSetMetaData object that contains information about the columns of the ResultSet object that will be returned when this PreparedStatement object is executed.

                Because a PreparedStatement object is precompiled, it is possible to know about the ResultSet object that it will return without having to execute it. Consequently, it is possible to invoke the method getMetaData on a PreparedStatement object rather than waiting to execute it and then invoking the ResultSet.getMetaData method on the ResultSet object that is returned.

                NOTE: Using this method may be expensive for some drivers due to the lack of underlying DBMS support.

                HSQLDB-Specific Information:

                Since 1.7.2, this feature is supported. If the statement generates an update count, then null is returned.

                Specified by:
                getMetaData in interface java.sql.PreparedStatement
                Returns:
                the description of a ResultSet object's columns or null if the driver cannot return a ResultSetMetaData object
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcPreparedStatement)

                setDate

                public void setDate(int parameterIndex,
                                    java.sql.Date x,
                                    java.util.Calendar cal)
                             throws java.sql.SQLException
                Sets the designated parameter to the given java.sql.Date value, using the given Calendar object. The driver uses the Calendar object to construct an SQL DATE value,which the driver then sends to the database. With a a Calendar object, the driver can calculate the date taking into account a custom timezone. If no Calendar object is specified, the driver uses the default timezone, which is that of the virtual machine running the application.

                Specified by:
                setDate in interface java.sql.PreparedStatement
                Parameters:
                parameterIndex - the first parameter is 1, the second is 2, ...
                x - the parameter value
                cal - the Calendar object the driver will use to construct the date
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcPreparedStatement)

                setTime

                public void setTime(int parameterIndex,
                                    java.sql.Time x,
                                    java.util.Calendar cal)
                             throws java.sql.SQLException
                Sets the designated parameter to the given java.sql.Time value, using the given Calendar object. The driver uses the Calendar object to construct an SQL TIME value, which the driver then sends to the database. With a a Calendar object, the driver can calculate the time taking into account a custom timezone. If no Calendar object is specified, the driver uses the default timezone, which is that of the virtual machine running the application.

                Specified by:
                setTime in interface java.sql.PreparedStatement
                Parameters:
                parameterIndex - the first parameter is 1, the second is 2, ...
                x - the parameter value
                cal - the Calendar object the driver will use to construct the time
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcPreparedStatement)

                setTimestamp

                public void setTimestamp(int parameterIndex,
                                         java.sql.Timestamp x,
                                         java.util.Calendar cal)
                                  throws java.sql.SQLException
                Sets the designated parameter to the given java.sql.Timestamp value, using the given Calendar object. The driver uses the Calendar object to construct an SQL TIMESTAMP value, which the driver then sends to the database. With a Calendar object, the driver can calculate the timestamp taking into account a custom timezone. If no Calendar object is specified, the driver uses the default timezone, which is that of the virtual machine running the application.

                Specified by:
                setTimestamp in interface java.sql.PreparedStatement
                Parameters:
                parameterIndex - the first parameter is 1, the second is 2, ...
                x - the parameter value
                cal - the Calendar object the driver will use to construct the timestamp
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcPreparedStatement)

                setNull

                public void setNull(int paramIndex,
                                    int sqlType,
                                    java.lang.String typeName)
                             throws java.sql.SQLException
                Sets the designated parameter to SQL NULL. This version of the method setNull should be used for user-defined types and REF type parameters. Examples of user-defined types include: STRUCT, DISTINCT, JAVA_OBJECT, and named array types.

                Note: To be portable, applications must give the SQL type code and the fully-qualified SQL type name when specifying a NULL user-defined or REF parameter. In the case of a user-defined type the name is the type name of the parameter itself. For a REF parameter, the name is the type name of the referenced type. If a JDBC driver does not need the type code or type name information, it may ignore it. Although it is intended for user-defined and Ref parameters, this method may be used to set a null parameter of any JDBC type. If the parameter does not have a user-defined or REF type, the given typeName is ignored.

                HSQLDB-Specific Information:

                HSQLDB ignores the sqlType and typeName arguments.

                Specified by:
                setNull in interface java.sql.PreparedStatement
                Parameters:
                paramIndex - the first parameter is 1, the second is 2, ...
                sqlType - a value from java.sql.Types
                typeName - the fully-qualified name of an SQL user-defined type; ignored if the parameter is not a user-defined type or REF
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcPreparedStatement)

                setURL

                public void setURL(int parameterIndex,
                                   java.net.URL x)
                            throws java.sql.SQLException
                Sets the designated parameter to the given java.net.URL value. The driver converts this to an SQL DATALINK value when it sends it to the database.

                HSQLDB-Specific Information:

                HSQLDB 1.7.2 does not support the DATALINK SQL type for which this method is intended. Calling this method throws an exception.

                Specified by:
                setURL in interface java.sql.PreparedStatement
                Parameters:
                parameterIndex - the first parameter is 1, the second is 2, ...
                x - the java.net.URL object to be set
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQL 1.7.0

                getParameterMetaData

                public java.sql.ParameterMetaData getParameterMetaData()
                                                                throws java.sql.SQLException
                Retrieves the number, types and properties of this PreparedStatement object's parameters.

                HSQLDB-Specific Information:

                Since 1.7.2, this feature is supported.

                Specified by:
                getParameterMetaData in interface java.sql.PreparedStatement
                Returns:
                a ParameterMetaData object that contains information about the number, types and properties of this PreparedStatement object's parameters
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQL 1.7.0
                See Also:
                ParameterMetaData

                addBatch

                public void addBatch(java.lang.String sql)
                              throws java.sql.SQLException
                This method should always throw if called for a PreparedStatement or CallableStatment.

                Specified by:
                addBatch in interface java.sql.Statement
                Overrides:
                addBatch in class jdbcStatement
                Parameters:
                sql - ignored
                Throws:
                java.sql.SQLException - always
                See Also:
                jdbcStatement.executeBatch()

                executeQuery

                public java.sql.ResultSet executeQuery(java.lang.String sql)
                                                throws java.sql.SQLException
                This method should always throw if called for a PreparedStatement or CallableStatment.

                Specified by:
                executeQuery in interface java.sql.Statement
                Overrides:
                executeQuery in class jdbcStatement
                Parameters:
                sql - ignored
                Returns:
                nothing
                Throws:
                java.sql.SQLException - always

                execute

                public boolean execute(java.lang.String sql)
                                throws java.sql.SQLException
                This method should always throw if called for a PreparedStatement or CallableStatment.

                Specified by:
                execute in interface java.sql.Statement
                Overrides:
                execute in class jdbcStatement
                Parameters:
                sql - ignored
                Returns:
                nothing
                Throws:
                java.sql.SQLException - always
                See Also:
                jdbcStatement.getResultSet(), jdbcStatement.getUpdateCount(), jdbcStatement.getMoreResults()

                executeUpdate

                public int executeUpdate(java.lang.String sql)
                                  throws java.sql.SQLException
                This method should always throw if called for a PreparedStatement or CallableStatment.

                Specified by:
                executeUpdate in interface java.sql.Statement
                Overrides:
                executeUpdate in class jdbcStatement
                Parameters:
                sql - ignored
                Returns:
                nothing
                Throws:
                java.sql.SQLException - always

                close

                public void close()
                           throws java.sql.SQLException
                Does the specialized work required to free this object's resources and that of it's parent class.

                Specified by:
                close in interface java.sql.Statement
                Overrides:
                close in class jdbcStatement
                Throws:
                java.sql.SQLException - if a database access error occurs

                toString

                public java.lang.String toString()
                Retrieves a String representation of this object.

                The representation is of the form:

                class-name@hash[sql=[char-sequence], parameters=[p1, ...pi, ...pn]]

                p1, ...pi, ...pn are the String representations of the currently set parameter values that will be used with the non-batch execution methods.

                Returns:
                a String representation of this object


                Copyright 2001 - 2005 HSQL Development Group. All Rights Reserved. hsqldb-1.8.0.10.orig/doc/src/org/hsqldb/jdbc/jdbcClob.html0000644000175000017500000007430111020614566021517 0ustar renerene jdbcClob (HSQLDB 1.8.0.10 API)

                org.hsqldb.jdbc
                Class jdbcClob

                java.lang.Object
                  extended byorg.hsqldb.jdbc.jdbcClob
                
                All Implemented Interfaces:
                java.sql.Clob

                public final class jdbcClob
                extends java.lang.Object
                implements java.sql.Clob

                The mapping in the JavaTM programming language for the SQL CLOB type.

                Provides methods for getting the length of an SQL CLOB (Character Large Object) value, for materializing a CLOB value on the client, and for searching for a substring or CLOB object within a CLOB value.

                HSQLDB-Specific Information:

                Including 1.8.x, the HSQLDB driver does not implement Clob using an SQL locator(CLOB). That is, an HSQLDB Clob object does not contain a logical pointer to SQL CLOB data; rather it directly contains an immutable representation of the data (a String object). As a result, an HSQLDB Clob object itself is valid beyond the duration of the transaction in which is was created, although it does not necessarily represent a corresponding value on the database.

                Currently, the interface methods for updating a CLOB value are unsupported. However, the truncate method is supported for local use.

                Since:
                JDK 1.2, HSQLDB 1.7.2
                Author:
                boucherb@users

                Constructor Summary
                jdbcClob(java.lang.String data)
                          Constructs a new jdbcClob object wrapping the given character sequence.
                 
                Method Summary
                 java.io.InputStream getAsciiStream()
                          Retrieves the CLOB value designated by this Clob object as an ascii stream.
                 java.io.Reader getCharacterStream()
                          Retrieves the CLOB value designated by this Clob object as a java.io.Reader object (or as a stream of characters).
                 java.lang.String getSubString(long pos, int length)
                          Retrieves a copy of the specified substring in the CLOB value designated by this Clob object.
                 long length()
                          Retrieves the number of characters in the CLOB value designated by this Clob object.
                 long position(java.sql.Clob searchstr, long start)
                          Retrieves the character position at which the specified Clob object searchstr appears in this Clob object.
                 long position(java.lang.String searchstr, long start)
                          Retrieves the character position at which the specified substring searchstr appears in the SQL CLOB value represented by this Clob object.
                 java.io.OutputStream setAsciiStream(long pos)
                          Retrieves a stream to be used to write Ascii characters to the CLOB value that this Clob object represents, starting at position pos.
                 java.io.Writer setCharacterStream(long pos)
                          Retrieves a stream to be used to write a stream of Unicode characters to the CLOB value that this Clob object represents, at position pos.
                 int setString(long pos, java.lang.String str)
                          Writes the given Java String to the CLOB value that this Clob object designates at the position pos.
                 int setString(long pos, java.lang.String str, int offset, int len)
                          Writes len characters of str, starting at character offset, to the CLOB value that this Clob represents.
                 void truncate(long len)
                          Truncates the CLOB value that this Clob designates to have a length of len characters.
                 
                Methods inherited from class java.lang.Object
                equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
                 

                Constructor Detail

                jdbcClob

                public jdbcClob(java.lang.String data)
                         throws java.sql.SQLException
                Constructs a new jdbcClob object wrapping the given character sequence.

                This constructor is used internally to retrieve result set values as Clob objects, yet it must be public to allow access from other packages. As such (in the interest of efficiency) this object maintains a reference to the given String object rather than making a copy and so it is gently suggested (in the interest of effective memory management) that extenal clients using this constructor either take pause to consider the implications or at least take care to provide a String object whose internal character buffer is not much larger than required to represent the value.

                Parameters:
                data - the character sequence representing the Clob value
                Throws:
                java.sql.SQLException - if the argument is null
                Method Detail

                length

                public long length()
                            throws java.sql.SQLException
                Retrieves the number of characters in the CLOB value designated by this Clob object.

                Specified by:
                length in interface java.sql.Clob
                Returns:
                length of the CLOB in characters
                Throws:
                java.sql.SQLException - if there is an error accessing the length of the CLOB value
                Since:
                JDK 1.2, HSQLDB 1.7.2

                getSubString

                public java.lang.String getSubString(long pos,
                                                     int length)
                                              throws java.sql.SQLException
                Retrieves a copy of the specified substring in the CLOB value designated by this Clob object. The substring begins at position pos and has up to length consecutive characters.

                HSQLDB-Specific Information:

                The official specification above is ambiguous in that it does not precisely indicate the policy to be observed when pos > this.length() - length. One policy would be to retrieve the characters from pos to this.length(). Another would be to throw an exception. HSQLDB observes the later policy.

                Specified by:
                getSubString in interface java.sql.Clob
                Parameters:
                pos - the first character of the substring to be extracted. The first character is at position 1.
                length - the number of consecutive characters to be copied
                Returns:
                a String that is the specified substring in the CLOB value designated by this Clob object
                Throws:
                java.sql.SQLException - if there is an error accessing the CLOB value
                Since:
                JDK 1.2, HSQLDB 1.7.2

                getCharacterStream

                public java.io.Reader getCharacterStream()
                                                  throws java.sql.SQLException
                Retrieves the CLOB value designated by this Clob object as a java.io.Reader object (or as a stream of characters).

                Specified by:
                getCharacterStream in interface java.sql.Clob
                Returns:
                a java.io.Reader object containing the CLOB data
                Throws:
                java.sql.SQLException - if there is an error accessing the CLOB value
                Since:
                JDK 1.2, HSQLDB 1.7.2
                See Also:
                setCharacterStream(long)

                getAsciiStream

                public java.io.InputStream getAsciiStream()
                                                   throws java.sql.SQLException
                Retrieves the CLOB value designated by this Clob object as an ascii stream.

                Specified by:
                getAsciiStream in interface java.sql.Clob
                Returns:
                a java.io.InputStream object containing the CLOB data
                Throws:
                java.sql.SQLException - if there is an error accessing the CLOB value
                Since:
                JDK 1.2, HSQLDB 1.7.2
                See Also:
                setAsciiStream(long)

                position

                public long position(java.lang.String searchstr,
                                     long start)
                              throws java.sql.SQLException
                Retrieves the character position at which the specified substring searchstr appears in the SQL CLOB value represented by this Clob object. The search begins at position start.

                Specified by:
                position in interface java.sql.Clob
                Parameters:
                searchstr - the substring for which to search
                start - the position at which to begin searching; the first position is 1
                Returns:
                the position at which the substring appears or -1 if it is not present; the first position is 1
                Throws:
                java.sql.SQLException - if there is an error accessing the CLOB value
                Since:
                JDK 1.2, HSQLDB 1.7.2

                position

                public long position(java.sql.Clob searchstr,
                                     long start)
                              throws java.sql.SQLException
                Retrieves the character position at which the specified Clob object searchstr appears in this Clob object. The search begins at position start.

                Specified by:
                position in interface java.sql.Clob
                Parameters:
                searchstr - the Clob object for which to search
                start - the position at which to begin searching; the first position is 1
                Returns:
                the position at which the Clob object appears or -1 if it is not present; the first position is 1
                Throws:
                java.sql.SQLException - if there is an error accessing the CLOB value
                Since:
                JDK 1.2, HSQLDB 1.7.2

                setString

                public int setString(long pos,
                                     java.lang.String str)
                              throws java.sql.SQLException
                Writes the given Java String to the CLOB value that this Clob object designates at the position pos.

                HSQLDB-Specific Information:

                HSLQDB 1.7.2 does not support this feature.

                Calling this method always throws an SQLException.

                Specified by:
                setString in interface java.sql.Clob
                Parameters:
                pos - the position at which to start writing to the CLOB value that this Clob object represents
                str - the string to be written to the CLOB value that this Clob designates
                Returns:
                the number of characters written
                Throws:
                java.sql.SQLException - if there is an error accessing the CLOB value
                Since:
                JDK 1.4, HSQLDB 1.7.2

                setString

                public int setString(long pos,
                                     java.lang.String str,
                                     int offset,
                                     int len)
                              throws java.sql.SQLException
                Writes len characters of str, starting at character offset, to the CLOB value that this Clob represents.

                HSQLDB-Specific Information:

                HSLQDB 1.7.2 does not support this feature.

                Calling this method always throws an SQLException.

                Specified by:
                setString in interface java.sql.Clob
                Parameters:
                pos - the position at which to start writing to this CLOB object
                str - the string to be written to the CLOB value that this Clob object represents
                offset - the offset into str to start reading the characters to be written
                len - the number of characters to be written
                Returns:
                the number of characters written
                Throws:
                java.sql.SQLException - if there is an error accessing the CLOB value
                Since:
                JDK 1.4, HSQLDB 1.7.2

                setAsciiStream

                public java.io.OutputStream setAsciiStream(long pos)
                                                    throws java.sql.SQLException
                Retrieves a stream to be used to write Ascii characters to the CLOB value that this Clob object represents, starting at position pos.

                HSQLDB-Specific Information:

                HSLQDB 1.7.2 does not support this feature.

                Calling this method always throws an SQLException.

                Specified by:
                setAsciiStream in interface java.sql.Clob
                Parameters:
                pos - the position at which to start writing to this CLOB object
                Returns:
                the stream to which ASCII encoded characters can be written
                Throws:
                java.sql.SQLException - if there is an error accessing the CLOB value
                Since:
                JDK 1.4, HSQLDB 1.7.2
                See Also:
                getAsciiStream()

                setCharacterStream

                public java.io.Writer setCharacterStream(long pos)
                                                  throws java.sql.SQLException
                Retrieves a stream to be used to write a stream of Unicode characters to the CLOB value that this Clob object represents, at position pos.

                HSQLDB-Specific Information:

                HSLQDB 1.7.2 does not support this feature.

                Calling this method always throws an SQLException.

                Specified by:
                setCharacterStream in interface java.sql.Clob
                Parameters:
                pos - the position at which to start writing to the CLOB value
                Returns:
                a stream to which Unicode encoded characters can be written
                Throws:
                java.sql.SQLException - if there is an error accessing the CLOB value
                Since:
                JDK 1.4, HSQLDB 1.7.2
                See Also:
                getCharacterStream()

                truncate

                public void truncate(long len)
                              throws java.sql.SQLException
                Truncates the CLOB value that this Clob designates to have a length of len characters.

                HSQLDB-Specific Information:

                This operation affects only the client-side value; it has no effect upon the value as it is stored in the database.

                Specified by:
                truncate in interface java.sql.Clob
                Parameters:
                len - the length, in bytes, to which the CLOB value should be truncated
                Throws:
                java.sql.SQLException - if there is an error accessing the CLOB value
                Since:
                JDK 1.4, HSQLDB 1.7.2


                Copyright 2001 - 2005 HSQL Development Group. All Rights Reserved. hsqldb-1.8.0.10.orig/doc/src/org/hsqldb/jdbc/package-use.html0000644000175000017500000001607511020614565022205 0ustar renerene Uses of Package org.hsqldb.jdbc (HSQLDB 1.8.0.10 API)

                Uses of Package
                org.hsqldb.jdbc

                Packages that use org.hsqldb.jdbc
                org.hsqldb.jdbc   
                 

                Classes in org.hsqldb.jdbc used by org.hsqldb.jdbc
                jdbcConnection
                           A connection (session) with a specific database.
                jdbcPreparedStatement
                           An object that represents a precompiled SQL statement.
                jdbcStatement
                           The object used for executing a static SQL statement and returning the results it produces.
                 



                Copyright 2001 - 2005 HSQL Development Group. All Rights Reserved. hsqldb-1.8.0.10.orig/doc/src/org/hsqldb/jdbc/jdbcResultSet.html0000644000175000017500000105346111020614567022600 0ustar renerene jdbcResultSet (HSQLDB 1.8.0.10 API)

                org.hsqldb.jdbc
                Class jdbcResultSet

                java.lang.Object
                  extended byorg.hsqldb.jdbc.jdbcResultSet
                
                All Implemented Interfaces:
                java.sql.ResultSet

                public class jdbcResultSet
                extends java.lang.Object
                implements java.sql.ResultSet

                A table of data representing a database result set, which is usually generated by executing a statement that queries the database.

                A ResultSet object maintains a cursor pointing to its current row of data. Initially the cursor is positioned before the first row. The next method moves the cursor to the next row, and because it returns false when there are no more rows in the ResultSet object, it can be used in a while loop to iterate through the result set.

                A default ResultSet object is not updatable and has a cursor that moves forward only. Thus, you can iterate through it only once and only from the first row to the last row. It is possible to produce ResultSet objects that are scrollable and/or updatable. The following code fragment, in which con is a valid Connection object, illustrates how to make a result set that is scrollable and insensitive to updates by others, and that is updatable. See ResultSet fields for other options.

                
                 Statement stmt = con.createStatement(
                                            ResultSet.TYPE_SCROLL_INSENSITIVE,
                                            ResultSet.CONCUR_UPDATABLE);
                 ResultSet rs = stmt.executeQuery("SELECT a, b FROM TABLE2");
                 // rs will be scrollable, will not show changes made by others,
                 // and will be updatable
                
                 
                The ResultSet interface provides getter methods (getBoolean, getLong, and so on) for retrieving column values from the current row. Values can be retrieved using either the index number of the column or the name of the column. In general, using the column index will be more efficient. Columns are numbered from 1. For maximum portability, result set columns within each row should be read in left-to-right order, and each column should be read only once.

                For the getter methods, a JDBC driver attempts to convert the underlying data to the Java type specified in the getter method and returns a suitable Java value. The JDBC specification has a table showing the allowable mappings from SQL types to Java types that can be used by the ResultSet getter methods.

                Column names used as input to getter methods are case insensitive. When a getter method is called with a column name and several columns have the same name, the value of the first matching column will be returned. The column name option is designed to be used when column names are used in the SQL query that generated the result set. For columns that are NOT explicitly named in the query, it is best to use column numbers. If column names are used, there is no way for the programmer to guarantee that they actually refer to the intended columns.

                A set of updater methods were added to this interface in the JDBC 2.0 API (JavaTM 2 SDK, Standard Edition, version 1.2). The comments regarding parameters to the getter methods also apply to parameters to the updater methods.

                The updater methods may be used in two ways:

                1. to update a column value in the current row. In a scrollable ResultSet object, the cursor can be moved backwards and forwards, to an absolute position, or to a position relative to the current row. The following code fragment updates the NAME column in the fifth row of the ResultSet object rs and then uses the method updateRow to update the data source table from which rs was derived.
                  
                   rs.absolute(5); // moves the cursor to the fifth row of rs
                   rs.updateString("NAME", "AINSWORTH"); // updates the
                   // NAME column of row 5 to be AINSWORTH
                   rs.updateRow(); // updates the row in the data source
                  
                   
                2. to insert column values into the insert row. An updatable ResultSet object has a special row associated with it that serves as a staging area for building a row to be inserted. The following code fragment moves the cursor to the insert row, builds a three-column row, and inserts it into rs and into the data source table using the method insertRow.
                  
                   rs.moveToInsertRow(); // moves cursor to the insert row
                   rs.updateString(1, "AINSWORTH"); // updates the
                   // first column of the insert row to be AINSWORTH
                   rs.updateInt(2,35); // updates the second column to be 35
                   rs.updateBoolean(3, true); // updates the third row to true
                   rs.insertRow();
                   rs.moveToCurrentRow();
                  
                   

                A ResultSet object is automatically closed when the Statement object that generated it is closed, re-executed, or used to retrieve the next result from a sequence of multiple results.

                The number, types and properties of a ResultSet object's columns are provided by the ResulSetMetaData object returned by the ResultSet.getMetaData method.

                HSQLDB-Specific Information:

                A ResultSet object generated by HSQLDB is by default of ResultSet.TYPE_FORWARD_ONLY (as is standard JDBC behavior) and does not allow the use of absolute and relative positioning methods. However, since 1.7.0, if a statement is created with:

                 Statement stmt = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
                 
                then the ResultSet objects it produces support using all of the absolute and relative positioning methods of JDBC2 to set the position of the current row, for example:

                 rs.absolute(5);
                 String fifthRowValue = rs.getString(1);
                 rs.relative(4);
                 String ninthRowValue = rs.getString(1);
                 
                Note: An HSQLDB ResultSet object persists, even after its connection is closed. This is regardless of the operational mode of the Database from which it came. That is, they persist whether originating from a Server, WebServer or in-process mode Database.

                Including HSQLDB 1.7.2, there is no support for any of the methods introduced in JDBC 2 relating to updateable result sets. These methods include all updateXXX methods, as well as the insertRow(), updateRow(), deleteRow(), moveToInsertRow() (and so on) methods; invoking any such method throws an SQLException stating that the operation is not supported. JRE 1.1.x Notes:

                In general, JDBC 2 support requires Java 1.2 and above, and JDBC 3 requires Java 1.4 and above. In HSQLDB, support for methods introduced in different versions of JDBC depends on the JDK version used for compiling and building HSQLDB.

                Since 1.7.0, it is possible to build the product so that all JDBC 2 methods can be called while executing under the version 1.1.x Java Runtime EnvironmentTM. However, some of these method calls require int values that are defined only in the JDBC 2 or greater version of the ResultSet interface. For this reason, when the product is compiled under JDK 1.1.x, these values are defined here, in this class.

                In a JRE 1.1.x environment, calling JDBC 2 methods that take or return the JDBC2-only ResultSet values can be achieved by referring to them in parameter specifications and return value comparisons, respectively, as follows:

                 jdbcResultSet.FETCH_FORWARD
                 jdbcResultSet.TYPE_FORWARD_ONLY
                 jdbcResultSet.TYPE_SCROLL_INSENSITIVE
                 jdbcResultSet.CONCUR_READ_ONLY
                 // etc.
                 
                However, please note that code written in such a manner will not be compatible for use with other JDBC 2 drivers, since they expect and use ResultSet, rather than jdbcResultSet. Also note, this feature is offered solely as a convenience to developers who must work under JDK 1.1.x due to operating constraints, yet wish to use some of the more advanced features available under the JDBC 2 specification.

                (fredt@users)
                (boucherb@users)

                Since:
                Hypersonic SQL
                Author:
                Thomas Mueller (Hypersonic SQL Group)
                See Also:
                jdbcStatement.executeQuery(java.lang.String), jdbcStatement.getResultSet(), ResultSetMetaData Extensively rewritten and extended in successive versions of HSQLDB.

                Field Summary
                static int CLOSE_CURSORS_AT_COMMIT
                          Copy of java.sql.ResultSet constant, for JDK 1.1 clients.
                static int CONCUR_READ_ONLY
                          Copy of java.sql.ResultSet constant, for JDK 1.1 clients.
                static int CONCUR_UPDATABLE
                          Copy of java.sql.ResultSet constant, for JDK 1.1 clients.
                static int FETCH_FORWARD
                          Copy of java.sql.ResultSet constant, for JDK 1.1 clients.
                static int FETCH_REVERSE
                          Copy of java.sql.ResultSet constant, for JDK 1.1 clients.
                static int FETCH_UNKNOWN
                          Copy of java.sql.ResultSet constant, for JDK 1.1 clients.
                static int HOLD_CURSORS_OVER_COMMIT
                          Copy of java.sql.ResultSet constant, for JDK 1.1 clients.
                 org.hsqldb.Result rResult
                          The internal representation.
                static int TYPE_FORWARD_ONLY
                          Copy of java.sql.ResultSet constant, for JDK 1.1 clients.
                static int TYPE_SCROLL_INSENSITIVE
                          Copy of java.sql.ResultSet constant, for JDK 1.1 clients.
                static int TYPE_SCROLL_SENSITIVE
                          Copy of java.sql.ResultSet constant, for JDK 1.1 clients.
                 
                Method Summary
                 boolean absolute(int row)
                           Moves the cursor to the given row number in this ResultSet object.
                 void afterLast()
                           Moves the cursor to the end of this ResultSet object, just after the last row.
                 void beforeFirst()
                           Moves the cursor to the front of this ResultSet object, just before the first row.
                 void cancelRowUpdates()
                           Cancels the updates made to the current row in this ResultSet object.
                 void clearWarnings()
                           Clears all warnings reported on this ResultSet object.
                 void close()
                           Releases this ResultSet object's database and JDBC resources immediately instead of waiting for this to happen when it is automatically closed.
                 void deleteRow()
                           Deletes the current row from this ResultSet object and from the underlying database.
                 int findColumn(java.lang.String columnName)
                           Maps the given ResultSet column name to its ResultSet column index.
                 boolean first()
                           Moves the cursor to the first row in this ResultSet object.
                 java.sql.Array getArray(int i)
                           Retrieves the value of the designated column in the current row of this ResultSet object as an Array object in the Java programming language.
                 java.sql.Array getArray(java.lang.String colName)
                           Retrieves the value of the designated column in the current row of this ResultSet object as an Array object in the Java programming language.
                 java.io.InputStream getAsciiStream(int columnIndex)
                           Retrieves the value of the designated column in the current row of this ResultSet object as a stream of ASCII characters.
                 java.io.InputStream getAsciiStream(java.lang.String columnName)
                           Retrieves the value of the designated column in the current row of this ResultSet object as a stream of ASCII characters.
                 java.math.BigDecimal getBigDecimal(int columnIndex)
                           Retrieves the value of the designated column in the current row of this ResultSet object as a java.math.BigDecimal with full precision.
                 java.math.BigDecimal getBigDecimal(int columnIndex, int scale)
                          Deprecated. by java.sun.com as of JDK 1.2
                 java.math.BigDecimal getBigDecimal(java.lang.String columnName)
                           Retrieves the value of the designated column in the current row of this ResultSet object as a java.math.BigDecimal with full precision.
                 java.math.BigDecimal getBigDecimal(java.lang.String columnName, int scale)
                          Deprecated. by java.sun.com as of JDK 1.2
                 java.io.InputStream getBinaryStream(int columnIndex)
                           Retrieves the value of the designated column in the current row of this ResultSet object as a binary stream of uninterpreted bytes.
                 java.io.InputStream getBinaryStream(java.lang.String columnName)
                           Retrieves the value of the designated column in the current row of this ResultSet object as a stream of uninterpreted bytes.
                 java.sql.Blob getBlob(int i)
                           Retrieves the value of the designated column in the current row of this ResultSet object as a Blob object in the Java programming language.
                 java.sql.Blob getBlob(java.lang.String colName)
                           Retrieves the value of the designated column in the current row of this ResultSet object as a Blob object in the Java programming language.
                 boolean getBoolean(int columnIndex)
                           Retrieves the value of the designated column in the current row of this ResultSet object as a boolean in the Java programming language.
                 boolean getBoolean(java.lang.String columnName)
                           Retrieves the value of the designated column in the current row of this ResultSet object as a boolean in the Java programming language.
                 byte getByte(int columnIndex)
                           Retrieves the value of the designated column in the current row of this ResultSet object as a byte in the Java programming language.
                 byte getByte(java.lang.String columnName)
                           Retrieves the value of the designated column in the current row of this ResultSet object as a byte in the Java programming language.
                 byte[] getBytes(int columnIndex)
                           Retrieves the value of the designated column in the current row of this ResultSet object as a byte array in the Java programming language.
                 byte[] getBytes(java.lang.String columnName)
                           Retrieves the value of the designated column in the current row of this ResultSet object as a byte array in the Java programming language.
                 java.io.Reader getCharacterStream(int columnIndex)
                           Retrieves the value of the designated column in the current row of this ResultSet object as a java.io.Reader object.
                 java.io.Reader getCharacterStream(java.lang.String columnName)
                           Retrieves the value of the designated column in the current row of this ResultSet object as a java.io.Reader object.
                 java.sql.Clob getClob(int i)
                           Retrieves the value of the designated column in the current row of this ResultSet object as a Clob object in the Java programming language.
                 java.sql.Clob getClob(java.lang.String colName)
                           Retrieves the value of the designated column in the current row of this ResultSet object as a Clob object in the Java programming language.
                 int getConcurrency()
                           Retrieves the concurrency mode of this ResultSet object.
                 java.lang.String getCursorName()
                           Retrieves the name of the SQL cursor used by this ResultSet object.
                 java.sql.Date getDate(int columnIndex)
                           Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Date object in the Java programming language.
                 java.sql.Date getDate(int columnIndex, java.util.Calendar cal)
                           Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Date object in the Java programming language.
                 java.sql.Date getDate(java.lang.String columnName)
                           Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Date object in the Java programming language.
                 java.sql.Date getDate(java.lang.String columnName, java.util.Calendar cal)
                           Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Date object in the Java programming language.
                 double getDouble(int columnIndex)
                           Retrieves the value of the designated column in the current row of this ResultSet object as a double in the Java programming language.
                 double getDouble(java.lang.String columnName)
                           Retrieves the value of the designated column in the current row of this ResultSet object as a double in the Java programming language.
                 int getFetchDirection()
                           Retrieves the fetch direction for this ResultSet object.
                 int getFetchSize()
                           Retrieves the fetch size for this ResultSet object.
                 float getFloat(int columnIndex)
                           Retrieves the value of the designated column in the current row of this ResultSet object as a float in the Java programming language.
                 float getFloat(java.lang.String columnName)
                           Retrieves the value of the designated column in the current row of this ResultSet object as a float in the Java programming language.
                 int getInt(int columnIndex)
                           Retrieves the value of the designated column in the current row of this ResultSet object as an int in the Java programming language.
                 int getInt(java.lang.String columnName)
                           Retrieves the value of the designated column in the current row of this ResultSet object as an int in the Java programming language.
                 long getLong(int columnIndex)
                           Retrieves the value of the designated column in the current row of this ResultSet object as a long in the Java programming language.
                 long getLong(java.lang.String columnName)
                           Retrieves the value of the designated column in the current row of this ResultSet object as a long in the Java programming language.
                 java.sql.ResultSetMetaData getMetaData()
                           Retrieves the number, types and properties of this ResultSet object's columns.
                 java.lang.Object getObject(int columnIndex)
                           Gets the value of the designated column in the current row of this ResultSet object as an Object in the Java programming language.
                 java.lang.Object getObject(int i, java.util.Map map)
                           Retrieves the value of the designated column in the current row of this ResultSet object as an Object in the Java programming language.
                 java.lang.Object getObject(java.lang.String columnName)
                           Gets the value of the designated column in the current row of this ResultSet object as an Object in the Java programming language.
                 java.lang.Object getObject(java.lang.String colName, java.util.Map map)
                           Retrieves the value of the designated column in the current row of this ResultSet object as an Object in the Java programming language.
                 java.sql.Ref getRef(int i)
                           Retrieves the value of the designated column in the current row of this ResultSet object as a Ref object in the Java programming language.
                 java.sql.Ref getRef(java.lang.String colName)
                           Retrieves the value of the designated column in the current row of this ResultSet object as a Ref object in the Java programming language.
                 int getRow()
                           Retrieves the current row number.
                 short getShort(int columnIndex)
                           Retrieves the value of the designated column in the current row of this ResultSet object as a short in the Java programming language.
                 short getShort(java.lang.String columnName)
                           Retrieves the value of the designated column in the current row of this ResultSet object as a short in the Java programming language.
                 java.sql.Statement getStatement()
                           Retrieves the Statement object that produced this ResultSet object.
                 java.lang.String getString(int columnIndex)
                           Retrieves the value of the designated column in the current row of this ResultSet object as a String in the Java programming language.
                 java.lang.String getString(java.lang.String columnName)
                           Retrieves the value of the designated column in the current row of this ResultSet object as a String in the Java programming language.
                 java.sql.Time getTime(int columnIndex)
                           Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Time object in the Java programming language.
                 java.sql.Time getTime(int columnIndex, java.util.Calendar cal)
                           Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Time object in the Java programming language.
                 java.sql.Time getTime(java.lang.String columnName)
                           Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Time object in the Java programming language.
                 java.sql.Time getTime(java.lang.String columnName, java.util.Calendar cal)
                           Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Time object in the Java programming language.
                 java.sql.Timestamp getTimestamp(int columnIndex)
                           Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Timestamp object in the Java programming language.
                 java.sql.Timestamp getTimestamp(int columnIndex, java.util.Calendar cal)
                           Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Timestamp object in the Java programming anguage.
                 java.sql.Timestamp getTimestamp(java.lang.String columnName)
                           Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Timestamp object.
                 java.sql.Timestamp getTimestamp(java.lang.String columnName, java.util.Calendar cal)
                           Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Timestamp object in the Java programming language.
                 int getType()
                           Retrieves the type of this ResultSet object.
                 java.io.InputStream getUnicodeStream(int columnIndex)
                          Deprecated. use getCharacterStream in place of getUnicodeStream
                 java.io.InputStream getUnicodeStream(java.lang.String columnName)
                          Deprecated. use getCharacterStream instead
                 java.net.URL getURL(int columnIndex)
                           Retrieves the value of the designated column in the current row of this ResultSet object as a java.net.URL object in the Java programming language.
                 java.net.URL getURL(java.lang.String columnName)
                           Retrieves the value of the designated column in the current row of this ResultSet object as a java.net.URL object in the Java programming language.
                 java.sql.SQLWarning getWarnings()
                           Retrieves the first warning reported by calls on this ResultSet object.
                 void insertRow()
                           Inserts the contents of the insert row into this ResultSet object and into the database.
                 boolean isAfterLast()
                           Retrieves whether the cursor is after the last row in this ResultSet object.
                 boolean isBeforeFirst()
                           Retrieves whether the cursor is before the first row in this ResultSet object.
                 boolean isFirst()
                           Retrieves whether the cursor is on the first row of this ResultSet object.
                 boolean isLast()
                           Retrieves whether the cursor is on the last row of this ResultSet object.
                 boolean last()
                           Moves the cursor to the last row in this ResultSet object.
                 void moveToCurrentRow()
                           Moves the cursor to the remembered cursor position, usually the current row.
                 void moveToInsertRow()
                           Moves the cursor to the insert row.
                 boolean next()
                           Moves the cursor down one row from its current position.
                 boolean previous()
                           Moves the cursor to the previous row in this ResultSet object.
                 void refreshRow()
                           Refreshes the current row with its most recent value in the database.
                 boolean relative(int rows)
                           Moves the cursor a relative number of rows, either positive or negative.
                 boolean rowDeleted()
                           Retrieves whether a row has been deleted.
                 boolean rowInserted()
                           Retrieves whether the current row has had an insertion.
                 boolean rowUpdated()
                           Retrieves whether the current row has been updated.
                 void setFetchDirection(int direction)
                           Gives a hint as to the direction in which the rows in this ResultSet object will be processed.
                 void setFetchSize(int rows)
                           Gives the JDBC driver a hint as to the number of rows that should be fetched from the database when more rows are needed for this ResultSet object.
                 void updateArray(int columnIndex, java.sql.Array x)
                           Updates the designated column with a java.sql.Array value.
                 void updateArray(java.lang.String columnName, java.sql.Array x)
                           Updates the designated column with a java.sql.Array value.
                 void updateAsciiStream(int columnIndex, java.io.InputStream x, int length)
                           Updates the designated column with an ascii stream value.
                 void updateAsciiStream(java.lang.String columnName, java.io.InputStream x, int length)
                           Updates the designated column with an ascii stream value.
                 void updateBigDecimal(int columnIndex, java.math.BigDecimal x)
                           Updates the designated column with a java.math.BigDecimal value.
                 void updateBigDecimal(java.lang.String columnName, java.math.BigDecimal x)
                           Updates the designated column with a java.sql.BigDecimal value.
                 void updateBinaryStream(int columnIndex, java.io.InputStream x, int length)
                           Updates the designated column with a binary stream value.
                 void updateBinaryStream(java.lang.String columnName, java.io.InputStream x, int length)
                           Updates the designated column with a binary stream value.
                 void updateBlob(int columnIndex, java.sql.Blob x)
                           Updates the designated column with a java.sql.Blob value.
                 void updateBlob(java.lang.String columnName, java.sql.Blob x)
                           Updates the designated column with a java.sql.Blob value.
                 void updateBoolean(int columnIndex, boolean x)
                           Updates the designated column with a boolean value.
                 void updateBoolean(java.lang.String columnName, boolean x)
                           Updates the designated column with a boolean value.
                 void updateByte(int columnIndex, byte x)
                           Updates the designated column with a byte value.
                 void updateByte(java.lang.String columnName, byte x)
                           Updates the designated column with a byte value.
                 void updateBytes(int columnIndex, byte[] x)
                           Updates the designated column with a byte array value.
                 void updateBytes(java.lang.String columnName, byte[] x)
                           Updates the designated column with a byte array value.
                 void updateCharacterStream(int columnIndex, java.io.Reader x, int length)
                           Updates the designated column with a character stream value.
                 void updateCharacterStream(java.lang.String columnName, java.io.Reader reader, int length)
                           Updates the designated column with a character stream value.
                 void updateClob(int columnIndex, java.sql.Clob x)
                           Updates the designated column with a java.sql.Clob value.
                 void updateClob(java.lang.String columnName, java.sql.Clob x)
                           Updates the designated column with a java.sql.Clob value.
                 void updateDate(int columnIndex, java.sql.Date x)
                           Updates the designated column with a java.sql.Date value.
                 void updateDate(java.lang.String columnName, java.sql.Date x)
                           Updates the designated column with a java.sql.Date value.
                 void updateDouble(int columnIndex, double x)
                           Updates the designated column with a double value.
                 void updateDouble(java.lang.String columnName, double x)
                           Updates the designated column with a double value.
                 void updateFloat(int columnIndex, float x)
                           Updates the designated column with a float value.
                 void updateFloat(java.lang.String columnName, float x)
                           Updates the designated column with a float value.
                 void updateInt(int columnIndex, int x)
                           Updates the designated column with an int value.
                 void updateInt(java.lang.String columnName, int x)
                           Updates the designated column with an int value.
                 void updateLong(int columnIndex, long x)
                           Updates the designated column with a long value.
                 void updateLong(java.lang.String columnName, long x)
                           Updates the designated column with a long value.
                 void updateNull(int columnIndex)
                           Gives a nullable column a null value.
                 void updateNull(java.lang.String columnName)
                           Updates the designated column with a null value.
                 void updateObject(int columnIndex, java.lang.Object x)
                           Updates the designated column with an Object value.
                 void updateObject(int columnIndex, java.lang.Object x, int scale)
                           Updates the designated column with an Object value.
                 void updateObject(java.lang.String columnName, java.lang.Object x)
                           Updates the designated column with an Object value.
                 void updateObject(java.lang.String columnName, java.lang.Object x, int scale)
                           Updates the designated column with an Object value.
                 void updateRef(int columnIndex, java.sql.Ref x)
                           Updates the designated column with a java.sql.Ref value.
                 void updateRef(java.lang.String columnName, java.sql.Ref x)
                           Updates the designated column with a java.sql.Ref value.
                 void updateRow()
                           Updates the underlying database with the new contents of the current row of this ResultSet object.
                 void updateShort(int columnIndex, short x)
                           Updates the designated column with a short value.
                 void updateShort(java.lang.String columnName, short x)
                           Updates the designated column with a short value.
                 void updateString(int columnIndex, java.lang.String x)
                           Updates the designated column with a String value.
                 void updateString(java.lang.String columnName, java.lang.String x)
                           Updates the designated column with a String value.
                 void updateTime(int columnIndex, java.sql.Time x)
                           Updates the designated column with a java.sql.Time value.
                 void updateTime(java.lang.String columnName, java.sql.Time x)
                           Updates the designated column with a java.sql.Time value.
                 void updateTimestamp(int columnIndex, java.sql.Timestamp x)
                           Updates the designated column with a java.sql.Timestamp value.
                 void updateTimestamp(java.lang.String columnName, java.sql.Timestamp x)
                           Updates the designated column with a java.sql.Timestamp value.
                 boolean wasNull()
                           Reports whether the last column read had a value of SQL NULL.
                 
                Methods inherited from class java.lang.Object
                equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
                 

                Field Detail

                rResult

                public org.hsqldb.Result rResult
                The internal representation.


                FETCH_FORWARD

                public static final int FETCH_FORWARD
                Copy of java.sql.ResultSet constant, for JDK 1.1 clients.

                See Also:
                Constant Field Values

                FETCH_REVERSE

                public static final int FETCH_REVERSE
                Copy of java.sql.ResultSet constant, for JDK 1.1 clients.

                See Also:
                Constant Field Values

                FETCH_UNKNOWN

                public static final int FETCH_UNKNOWN
                Copy of java.sql.ResultSet constant, for JDK 1.1 clients.

                See Also:
                Constant Field Values

                TYPE_FORWARD_ONLY

                public static final int TYPE_FORWARD_ONLY
                Copy of java.sql.ResultSet constant, for JDK 1.1 clients.

                See Also:
                Constant Field Values

                TYPE_SCROLL_INSENSITIVE

                public static final int TYPE_SCROLL_INSENSITIVE
                Copy of java.sql.ResultSet constant, for JDK 1.1 clients.

                See Also:
                Constant Field Values

                TYPE_SCROLL_SENSITIVE

                public static final int TYPE_SCROLL_SENSITIVE
                Copy of java.sql.ResultSet constant, for JDK 1.1 clients.

                See Also:
                Constant Field Values

                CONCUR_READ_ONLY

                public static final int CONCUR_READ_ONLY
                Copy of java.sql.ResultSet constant, for JDK 1.1 clients.

                See Also:
                Constant Field Values

                CONCUR_UPDATABLE

                public static final int CONCUR_UPDATABLE
                Copy of java.sql.ResultSet constant, for JDK 1.1 clients.

                See Also:
                Constant Field Values

                HOLD_CURSORS_OVER_COMMIT

                public static final int HOLD_CURSORS_OVER_COMMIT
                Copy of java.sql.ResultSet constant, for JDK 1.1 clients.

                See Also:
                Constant Field Values

                CLOSE_CURSORS_AT_COMMIT

                public static final int CLOSE_CURSORS_AT_COMMIT
                Copy of java.sql.ResultSet constant, for JDK 1.1 clients.

                See Also:
                Constant Field Values
                Method Detail

                next

                public boolean next()
                             throws java.sql.SQLException
                Moves the cursor down one row from its current position. A ResultSet cursor is initially positioned before the first row; the first call to the method next makes the first row the current row; the second call makes the second row the current row, and so on.

                If an input stream is open for the current row, a call to the method next will implicitly close it. A ResultSet object's warning chain is cleared when a new row is read.

                Specified by:
                next in interface java.sql.ResultSet
                Returns:
                true if the new current row is valid; false if there are no more rows
                Throws:
                java.sql.SQLException - if a database access error occurs

                close

                public void close()
                           throws java.sql.SQLException
                Releases this ResultSet object's database and JDBC resources immediately instead of waiting for this to happen when it is automatically closed.

                Note: A ResultSet object is automatically closed by the Statement object that generated it when that Statement object is closed, re-executed, or is used to retrieve the next result from a sequence of multiple results. A ResultSet object is also automatically closed when it is garbage collected.

                Specified by:
                close in interface java.sql.ResultSet
                Throws:
                java.sql.SQLException - if a database access error occurs

                wasNull

                public boolean wasNull()
                                throws java.sql.SQLException
                Reports whether the last column read had a value of SQL NULL. Note that you must first call one of the getter methods on a column to try to read its value and then call the method wasNull to see if the value read was SQL NULL.

                Specified by:
                wasNull in interface java.sql.ResultSet
                Returns:
                true if the last column value read was SQL NULL and false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                getString

                public java.lang.String getString(int columnIndex)
                                           throws java.sql.SQLException
                Retrieves the value of the designated column in the current row of this ResultSet object as a String in the Java programming language.

                Specified by:
                getString in interface java.sql.ResultSet
                Parameters:
                columnIndex - the first column is 1, the second is 2, ...
                Returns:
                the column value; if the value is SQL NULL, the value returned is null
                Throws:
                java.sql.SQLException - if a database access error occurs

                getBoolean

                public boolean getBoolean(int columnIndex)
                                   throws java.sql.SQLException
                Retrieves the value of the designated column in the current row of this ResultSet object as a boolean in the Java programming language.

                Specified by:
                getBoolean in interface java.sql.ResultSet
                Parameters:
                columnIndex - the first column is 1, the second is 2, ...
                Returns:
                the column value; if the value is SQL NULL, the value returned is false
                Throws:
                java.sql.SQLException - if a database access error occurs

                getByte

                public byte getByte(int columnIndex)
                             throws java.sql.SQLException
                Retrieves the value of the designated column in the current row of this ResultSet object as a byte in the Java programming language.

                Specified by:
                getByte in interface java.sql.ResultSet
                Parameters:
                columnIndex - the first column is 1, the second is 2, ...
                Returns:
                the column value; if the value is SQL NULL, the value returned is 0
                Throws:
                java.sql.SQLException - if a database access error occurs

                getShort

                public short getShort(int columnIndex)
                               throws java.sql.SQLException
                Retrieves the value of the designated column in the current row of this ResultSet object as a short in the Java programming language.

                Specified by:
                getShort in interface java.sql.ResultSet
                Parameters:
                columnIndex - the first column is 1, the second is 2, ...
                Returns:
                the column value; if the value is SQL NULL, the value returned is 0
                Throws:
                java.sql.SQLException - if a database access error occurs

                getInt

                public int getInt(int columnIndex)
                           throws java.sql.SQLException
                Retrieves the value of the designated column in the current row of this ResultSet object as an int in the Java programming language.

                Specified by:
                getInt in interface java.sql.ResultSet
                Parameters:
                columnIndex - the first column is 1, the second is 2, ...
                Returns:
                the column value; if the value is SQL NULL, the value returned is 0
                Throws:
                java.sql.SQLException - if a database access error occurs

                getLong

                public long getLong(int columnIndex)
                             throws java.sql.SQLException
                Retrieves the value of the designated column in the current row of this ResultSet object as a long in the Java programming language.

                Specified by:
                getLong in interface java.sql.ResultSet
                Parameters:
                columnIndex - the first column is 1, the second is 2, ...
                Returns:
                the column value; if the value is SQL NULL, the value returned is 0
                Throws:
                java.sql.SQLException - if a database access error occurs

                getFloat

                public float getFloat(int columnIndex)
                               throws java.sql.SQLException
                Retrieves the value of the designated column in the current row of this ResultSet object as a float in the Java programming language.

                Specified by:
                getFloat in interface java.sql.ResultSet
                Parameters:
                columnIndex - the first column is 1, the second is 2, ...
                Returns:
                the column value; if the value is SQL NULL, the value returned is 0
                Throws:
                java.sql.SQLException - if a database access error occurs

                getDouble

                public double getDouble(int columnIndex)
                                 throws java.sql.SQLException
                Retrieves the value of the designated column in the current row of this ResultSet object as a double in the Java programming language.

                Specified by:
                getDouble in interface java.sql.ResultSet
                Parameters:
                columnIndex - the first column is 1, the second is 2, ...
                Returns:
                the column value; if the value is SQL NULL, the value returned is 0
                Throws:
                java.sql.SQLException - if a database access error occurs

                getBigDecimal

                public java.math.BigDecimal getBigDecimal(int columnIndex,
                                                          int scale)
                                                   throws java.sql.SQLException
                Deprecated. by java.sun.com as of JDK 1.2

                Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.BigDecimal in the Java programming language.

                HSQLDB-Specific Information:

                Beginning with 1.7.0, HSQLDB converts the result and sets the scale with BigDecimal.ROUND_HALF_DOWN.

                Specified by:
                getBigDecimal in interface java.sql.ResultSet
                Parameters:
                columnIndex - the first column is 1, the second is 2, ...
                scale - the number of digits to the right of the decimal point
                Returns:
                the column value; if the value is SQL NULL, the value returned is null
                Throws:
                java.sql.SQLException - if a database access error occurs

                getBytes

                public byte[] getBytes(int columnIndex)
                                throws java.sql.SQLException
                Retrieves the value of the designated column in the current row of this ResultSet object as a byte array in the Java programming language. The bytes represent the raw values returned by the driver.

                HSQLDB-Specific Information:

                HSQLDB returns correct values for columns of type BINARY, CHAR and their variations. For other types, it returns the byte[] for the String representation of the value.

                Specified by:
                getBytes in interface java.sql.ResultSet
                Parameters:
                columnIndex - the first column is 1, the second is 2, ...
                Returns:
                the column value; if the value is SQL NULL, the value returned is null
                Throws:
                java.sql.SQLException - if a database access error occurs

                getDate

                public java.sql.Date getDate(int columnIndex)
                                      throws java.sql.SQLException
                Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Date object in the Java programming language.

                Specified by:
                getDate in interface java.sql.ResultSet
                Parameters:
                columnIndex - the first column is 1, the second is 2, ...
                Returns:
                the column value; if the value is SQL NULL, the value returned is null
                Throws:
                java.sql.SQLException - if a database access error occurs

                getTime

                public java.sql.Time getTime(int columnIndex)
                                      throws java.sql.SQLException
                Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Time object in the Java programming language.

                Specified by:
                getTime in interface java.sql.ResultSet
                Parameters:
                columnIndex - the first column is 1, the second is 2, ...
                Returns:
                the column value; if the value is SQL NULL, the value returned is null
                Throws:
                java.sql.SQLException - if a database access error occurs

                getTimestamp

                public java.sql.Timestamp getTimestamp(int columnIndex)
                                                throws java.sql.SQLException
                Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Timestamp object in the Java programming language.

                Specified by:
                getTimestamp in interface java.sql.ResultSet
                Parameters:
                columnIndex - the first column is 1, the second is 2, ...
                Returns:
                the column value; if the value is SQL NULL, the value returned is null
                Throws:
                java.sql.SQLException - if a database access error occurs

                getAsciiStream

                public java.io.InputStream getAsciiStream(int columnIndex)
                                                   throws java.sql.SQLException
                Retrieves the value of the designated column in the current row of this ResultSet object as a stream of ASCII characters. The value can then be read in chunks from the stream. This method is particularly suitable for retrieving large LONGVARCHAR values. The JDBC driver will do any necessary conversion from the database format into ASCII.

                Note: All the data in the returned stream must be read prior to getting the value of any other column. The next call to a getter method implicitly closes the stream. Also, a stream may return 0 when the method InputStream.available is called whether there is data available or not.

                HSQLDB-Specific Information:

                The limitation noted above does not apply to HSQLDB.

                In 1.6.1 and previous, getAsciiStream was identical to getUnicodeStream and both simply returned a byte stream constructed from the raw getBytes representation. Starting with 1.7.0, this has been updated to comply with the java.sql specification. When the column is of type CHAR and its variations, it requires no conversion since it is represented internally already as a Java String object. When the column is not of type CHAR and its variations, the returned stream is based on a conversion to the Java String representation of the value. In either case, the obtained stream is always equivalent to a stream of the low order bytes from the value's String representation.

                HSQLDB SQL CHAR and its variations are all Unicode strings internally, so the recommended alternatives to this method are getString, getUnicodeStream (deprecated) and new to 1.7.0: getCharacterStream (now prefered over the deprecated getUnicodeStream alternative).

                Specified by:
                getAsciiStream in interface java.sql.ResultSet
                Parameters:
                columnIndex - the first column is 1, the second is 2, ...
                Returns:
                a Java input stream that delivers the database column value as a stream of one-byte ASCII characters; if the value is SQL NULL, the value returned is null
                Throws:
                java.sql.SQLException - if a database access error occurs

                getUnicodeStream

                public java.io.InputStream getUnicodeStream(int columnIndex)
                                                     throws java.sql.SQLException
                Deprecated. use getCharacterStream in place of getUnicodeStream

                Retrieves the value of the designated column in the current row of this ResultSet object as as a stream of two-byte Unicode characters. The first byte is the high byte; the second byte is the low byte. The value can then be read in chunks from the stream. This method is particularly suitable for retrieving large LONGVARCHARvalues. The JDBC driver will do any necessary conversion from the database format into Unicode.

                Note: All the data in the returned stream must be read prior to getting the value of any other column. The next call to a getter method implicitly closes the stream. Also, a stream may return 0 when the method InputStream.available is called, whether there is data available or not.

                HSQLDB-Specific Information:

                The limitation noted above does not apply to HSQLDB.

                Up to and including 1.6.1, getUnicodeStream (and getAsciiStream) both simply returned a byte stream constructed from the raw getBytes representation. Starting with 1.7.0, this has been corrected to comply with the java.sql specification. When the column is of type CHAR and its variations, it requires no conversion since it is represented internally already as Java Strings. When the column is not of type CHAR and its variations, the returned stream is based on a conversion to the Java String representation of the value. In either case, the obtained stream is always equivalent to a stream of bytes from the value's String representation, with high-byte first.

                Specified by:
                getUnicodeStream in interface java.sql.ResultSet
                Parameters:
                columnIndex - the first column is 1, the second is 2, ...
                Returns:
                a Java input stream that delivers the database column value as a stream of two-byte Unicode characters; if the value is SQL NULL, the value returned is null
                Throws:
                java.sql.SQLException - if a database access error occurs

                getBinaryStream

                public java.io.InputStream getBinaryStream(int columnIndex)
                                                    throws java.sql.SQLException
                Retrieves the value of the designated column in the current row of this ResultSet object as a binary stream of uninterpreted bytes. The value can then be read in chunks from the stream. This method is particularly suitable for retrieving large LONGVARBINARY values.

                Note: All the data in the returned stream must be read prior to getting the value of any other column. The next call to a getter method implicitly closes the stream. Also, a stream may return 0 when the method InputStream.available is called whether there is data available or not.

                Specified by:
                getBinaryStream in interface java.sql.ResultSet
                Parameters:
                columnIndex - the first column is 1, the second is 2, ...
                Returns:
                a Java input stream that delivers the database column value as a stream of uninterpreted bytes; if the value is SQL NULL, the value returned is null
                Throws:
                java.sql.SQLException - if a database access error occurs

                getString

                public java.lang.String getString(java.lang.String columnName)
                                           throws java.sql.SQLException
                Retrieves the value of the designated column in the current row of this ResultSet object as a String in the Java programming language.

                Specified by:
                getString in interface java.sql.ResultSet
                Parameters:
                columnName - the SQL name of the column
                Returns:
                the column value; if the value is SQL NULL, the value returned is null
                Throws:
                java.sql.SQLException - if a database access error occurs

                getBoolean

                public boolean getBoolean(java.lang.String columnName)
                                   throws java.sql.SQLException
                Retrieves the value of the designated column in the current row of this ResultSet object as a boolean in the Java programming language.

                Specified by:
                getBoolean in interface java.sql.ResultSet
                Parameters:
                columnName - the SQL name of the column
                Returns:
                the column value; if the value is SQL NULL, the value returned is false
                Throws:
                java.sql.SQLException - if a database access error occurs

                getByte

                public byte getByte(java.lang.String columnName)
                             throws java.sql.SQLException
                Retrieves the value of the designated column in the current row of this ResultSet object as a byte in the Java programming language.

                Specified by:
                getByte in interface java.sql.ResultSet
                Parameters:
                columnName - the SQL name of the column
                Returns:
                the column value; if the value is SQL NULL, the value returned is 0
                Throws:
                java.sql.SQLException - if a database access error occurs

                getShort

                public short getShort(java.lang.String columnName)
                               throws java.sql.SQLException
                Retrieves the value of the designated column in the current row of this ResultSet object as a short in the Java programming language.

                Specified by:
                getShort in interface java.sql.ResultSet
                Parameters:
                columnName - the SQL name of the column
                Returns:
                the column value; if the value is SQL NULL, the value returned is 0
                Throws:
                java.sql.SQLException - if a database access error occurs

                getInt

                public int getInt(java.lang.String columnName)
                           throws java.sql.SQLException
                Retrieves the value of the designated column in the current row of this ResultSet object as an int in the Java programming language.

                Specified by:
                getInt in interface java.sql.ResultSet
                Parameters:
                columnName - the SQL name of the column
                Returns:
                the column value; if the value is SQL NULL, the value returned is 0
                Throws:
                java.sql.SQLException - if a database access error occurs

                getLong

                public long getLong(java.lang.String columnName)
                             throws java.sql.SQLException
                Retrieves the value of the designated column in the current row of this ResultSet object as a long in the Java programming language.

                Specified by:
                getLong in interface java.sql.ResultSet
                Parameters:
                columnName - the SQL name of the column
                Returns:
                the column value; if the value is SQL NULL, the value returned is 0
                Throws:
                java.sql.SQLException - if a database access error occurs

                getFloat

                public float getFloat(java.lang.String columnName)
                               throws java.sql.SQLException
                Retrieves the value of the designated column in the current row of this ResultSet object as a float in the Java programming language.

                Specified by:
                getFloat in interface java.sql.ResultSet
                Parameters:
                columnName - the SQL name of the column
                Returns:
                the column value; if the value is SQL NULL, the value returned is 0
                Throws:
                java.sql.SQLException - if a database access error occurs

                getDouble

                public double getDouble(java.lang.String columnName)
                                 throws java.sql.SQLException
                Retrieves the value of the designated column in the current row of this ResultSet object as a double in the Java programming language.

                Specified by:
                getDouble in interface java.sql.ResultSet
                Parameters:
                columnName - the SQL name of the column
                Returns:
                the column value; if the value is SQL NULL, the value returned is 0
                Throws:
                java.sql.SQLException - if a database access error occurs

                getBigDecimal

                public java.math.BigDecimal getBigDecimal(java.lang.String columnName,
                                                          int scale)
                                                   throws java.sql.SQLException
                Deprecated. by java.sun.com as of JDK 1.2

                Retrieves the value of the designated column in the current row of this ResultSet object as a java.math.BigDecimal in the Java programming language.

                HSQLDB-Specific Information:

                Beginning with 1.7.0, HSQLDB converts the result and sets the scale with BigDecimal.ROUND_HALF_DOWN.

                Specified by:
                getBigDecimal in interface java.sql.ResultSet
                Parameters:
                columnName - the SQL name of the column
                scale - the number of digits to the right of the decimal point
                Returns:
                the column value; if the value is SQL NULL, the value returned is null
                Throws:
                java.sql.SQLException - if a database access error occurs

                getBytes

                public byte[] getBytes(java.lang.String columnName)
                                throws java.sql.SQLException
                Retrieves the value of the designated column in the current row of this ResultSet object as a byte array in the Java programming language. The bytes represent the raw values returned by the driver.

                Specified by:
                getBytes in interface java.sql.ResultSet
                Parameters:
                columnName - the SQL name of the column
                Returns:
                the column value; if the value is SQL NULL, the value returned is null
                Throws:
                java.sql.SQLException - if a database access error occurs

                getDate

                public java.sql.Date getDate(java.lang.String columnName)
                                      throws java.sql.SQLException
                Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Date object in the Java programming language.

                Specified by:
                getDate in interface java.sql.ResultSet
                Parameters:
                columnName - the SQL name of the column
                Returns:
                the column value; if the value is SQL NULL, the value returned is null
                Throws:
                java.sql.SQLException - if a database access error occurs

                getTime

                public java.sql.Time getTime(java.lang.String columnName)
                                      throws java.sql.SQLException
                Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Time object in the Java programming language.

                Specified by:
                getTime in interface java.sql.ResultSet
                Parameters:
                columnName - the SQL name of the column
                Returns:
                the column value; if the value is SQL NULL, the value returned is null
                Throws:
                java.sql.SQLException - if a database access error occurs

                getTimestamp

                public java.sql.Timestamp getTimestamp(java.lang.String columnName)
                                                throws java.sql.SQLException
                Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Timestamp object.

                Specified by:
                getTimestamp in interface java.sql.ResultSet
                Parameters:
                columnName - the SQL name of the column
                Returns:
                the column value; if the value is SQL NULL, the value returned is null
                Throws:
                java.sql.SQLException - if a database access error occurs

                getAsciiStream

                public java.io.InputStream getAsciiStream(java.lang.String columnName)
                                                   throws java.sql.SQLException
                Retrieves the value of the designated column in the current row of this ResultSet object as a stream of ASCII characters. The value can then be read in chunks from the stream. This method is particularly suitable for retrieving large LONGVARCHAR values. The JDBC driver will do any necessary conversion from the database format into ASCII.

                Note: All the data in the returned stream must be read prior to getting the value of any other column. The next call to a getter method implicitly closes the stream. Also, a stream may return 0 when the method available is called whether there is data available or not.

                Specified by:
                getAsciiStream in interface java.sql.ResultSet
                Parameters:
                columnName - the SQL name of the column
                Returns:
                a Java input stream that delivers the database column value as a stream of one-byte ASCII characters. If the value is SQL NULL, the value returned is null.
                Throws:
                java.sql.SQLException - if a database access error occurs
                See Also:
                getAsciiStream(int)

                getUnicodeStream

                public java.io.InputStream getUnicodeStream(java.lang.String columnName)
                                                     throws java.sql.SQLException
                Deprecated. use getCharacterStream instead

                Retrieves the value of the designated column in the current row of this ResultSet object as a stream of two-byte Unicode characters. The first byte is the high byte; the second byte is the low byte. The value can then be read in chunks from the stream. This method is particularly suitable for retrieving large LONGVARCHAR values. The JDBC technology-enabled driver will do any necessary conversion from the database format into Unicode.

                Note: All the data in the returned stream must be read prior to getting the value of any other column. The next call to a getter method implicitly closes the stream. Also, a stream may return 0 when the method InputStream.available is called, whether there is data available or not.

                Specified by:
                getUnicodeStream in interface java.sql.ResultSet
                Parameters:
                columnName - the SQL name of the column
                Returns:
                a Java input stream that delivers the database column value as a stream of two-byte Unicode characters. If the value is SQL NULL, the value returned is null.
                Throws:
                java.sql.SQLException - if a database access error occurs
                See Also:
                getUnicodeStream(int)

                getBinaryStream

                public java.io.InputStream getBinaryStream(java.lang.String columnName)
                                                    throws java.sql.SQLException
                Retrieves the value of the designated column in the current row of this ResultSet object as a stream of uninterpreted bytes. The value can then be read in chunks from the stream. This method is particularly suitable for retrieving large LONGVARBINARY values.

                Note: All the data in the returned stream must be read prior to getting the value of any other column. The next call to a getter method implicitly closes the stream. Also, a stream may return 0 when the method available is called whether there is data available or not.

                Specified by:
                getBinaryStream in interface java.sql.ResultSet
                Parameters:
                columnName - the SQL name of the column
                Returns:
                a Java input stream that delivers the database column value as a stream of uninterpreted bytes; if the value is SQL NULL, the result is null
                Throws:
                java.sql.SQLException - if a database access error occurs

                getWarnings

                public java.sql.SQLWarning getWarnings()
                                                throws java.sql.SQLException
                Retrieves the first warning reported by calls on this ResultSet object. Subsequent warnings on this ResultSet object will be chained to the SQLWarning object that this method returns.

                The warning chain is automatically cleared each time a new row is read. This method may not be called on a ResultSet object that has been closed; doing so will cause an SQLException to be thrown.

                Note: This warning chain only covers warnings caused by ResultSet methods. Any warning caused by Statement methods (such as reading OUT parameters) will be chained on the Statement object.

                HSQLDB-Specific Information:

                Up to and including 1.7.1, HSQLDB does not produce SQLWarning objects. This method always returns null.

                Specified by:
                getWarnings in interface java.sql.ResultSet
                Returns:
                the first SQLWarning object reported or null if there are none

                Up to and including 1.7.1, HSQLDB always returns null.

                Throws:
                java.sql.SQLException - if a database access error occurs or this method is called on a closed result set

                clearWarnings

                public void clearWarnings()
                                   throws java.sql.SQLException
                Clears all warnings reported on this ResultSet object. After this method is called, the method getWarnings returns null until a new warning is reported for this ResultSet object.

                HSQLDB-Specific Information:

                Including 1.7.1, HSQLDB does not produce SQLWarning objects on any ResultSet object warning chain; calls to this method are ignored.

                Specified by:
                clearWarnings in interface java.sql.ResultSet
                Throws:
                java.sql.SQLException - if a database access error occurs

                getCursorName

                public java.lang.String getCursorName()
                                               throws java.sql.SQLException
                Retrieves the name of the SQL cursor used by this ResultSet object.

                In SQL, a result table is retrieved through a cursor that is named. The current row of a result set can be updated or deleted using a positioned update/delete statement that references the cursor name. To insure that the cursor has the proper isolation level to support update, the cursor's SELECT statement should be of the form SELECT FOR UPDATE. If FOR UPDATE is omitted, the positioned updates may fail.

                The JDBC API supports this SQL feature by providing the name of the SQL cursor used by a ResultSet object. The current row of a ResultSet object is also the current row of this SQL cursor.

                Note: If positioned update is not supported, a SQLException is thrown.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB does not support this feature.

                Calling this method always throws an SQLException, stating that the operation is not supported.

                Specified by:
                getCursorName in interface java.sql.ResultSet
                Returns:
                the SQL name for this ResultSet object's cursor
                Throws:
                java.sql.SQLException - if a database access error occurs

                getMetaData

                public java.sql.ResultSetMetaData getMetaData()
                                                       throws java.sql.SQLException
                Retrieves the number, types and properties of this ResultSet object's columns.

                HSQLDB-Specific Information:

                Example:

                The following code fragment creates a ResultSet object rs, creates a ResultSetMetaData object rsmd, and uses rsmd to find out how many columns rs has and whether the first column in rs can be used in a WHERE clause.

                 ResultSet         rs              = stmt.executeQuery("SELECT a, b, c FROM TABLE2");
                 ResultSetMetaData rsmd = rs.getMetaData();
                int numberOfColumns = rsmd.getColumnCount();
                boolean b = rsmd.isSearchable(1);

                Warning:

                Including 1.7.1, HSQLDB did not generate accurate ResultSetMetaData. Below were the the most important methods to consider:

                1. isAutoIncrement(int) always returned false
                2. isCurrency(int) always returned false
                3. isNullable(int) always returned columnNullableUnknown
                4. getColumnDisplaySize(int) returned zero for all valid column numbers
                5. getSchemaName(int) always returned ""
                6. getPrecision(int) always returned zero
                7. getScale(int) always returned zero
                8. getCatalogName(int) always returned ""


                Starting with 1.7.2, ResultSetMetaData has been split out into its own interface implemenation (jdbcResultSetMetaData), support has been improved considerably for a number of methods and behaviour has been altered slightly in many areas.

                Specified by:
                getMetaData in interface java.sql.ResultSet
                Returns:
                the description of this ResultSet object's columns
                Throws:
                java.sql.SQLException - if a database access error occurs
                See Also:
                jdbcResultSetMetaData

                getObject

                public java.lang.Object getObject(int columnIndex)
                                           throws java.sql.SQLException
                Gets the value of the designated column in the current row of this ResultSet object as an Object in the Java programming language.

                This method will return the value of the given column as a Java object. The type of the Java object will be the default Java object type corresponding to the column's SQL type, following the mapping for built-in types specified in the JDBC specification. If the value is an SQL NULL, the driver returns a Java null.

                This method may also be used to read datatabase-specific abstract data types. In the JDBC 2.0 API, the behavior of method getObject is extended to materialize data of SQL user-defined types. When a column contains a structured or distinct value, the behavior of this method is as if it were a call to: getObject(columnIndex, this.getStatement().getConnection().getTypeMap()).

                Specified by:
                getObject in interface java.sql.ResultSet
                Parameters:
                columnIndex - the first column is 1, the second is 2, ...
                Returns:
                a java.lang.Object holding the column value
                Throws:
                java.sql.SQLException - if a database access error occurs

                getObject

                public java.lang.Object getObject(java.lang.String columnName)
                                           throws java.sql.SQLException
                Gets the value of the designated column in the current row of this ResultSet object as an Object in the Java programming language.

                This method will return the value of the given column as a Java object. The type of the Java object will be the default Java object type corresponding to the column's SQL type, following the mapping for built-in types specified in the JDBC specification. If the value is an SQL NULL, the driver returns a Java null.

                This method may also be used to read datatabase-specific abstract data types.

                In the JDBC 2.0 API, the behavior of the method getObject is extended to materialize data of SQL user-defined types. When a column contains a structured or distinct value, the behavior of this method is as if it were a call to: getObject(columnIndex, this.getStatement().getConnection().getTypeMap()).

                Specified by:
                getObject in interface java.sql.ResultSet
                Parameters:
                columnName - the SQL name of the column
                Returns:
                a java.lang.Object holding the column value
                Throws:
                java.sql.SQLException - if a database access error occurs

                findColumn

                public int findColumn(java.lang.String columnName)
                               throws java.sql.SQLException
                Maps the given ResultSet column name to its ResultSet column index.

                Specified by:
                findColumn in interface java.sql.ResultSet
                Parameters:
                columnName - the name of the column
                Returns:
                the column index of the given column name
                Throws:
                java.sql.SQLException - if the ResultSet object does not contain columnName or a database access error occurs

                getCharacterStream

                public java.io.Reader getCharacterStream(int columnIndex)
                                                  throws java.sql.SQLException
                Retrieves the value of the designated column in the current row of this ResultSet object as a java.io.Reader object.

                HSQLDB-Specific Information:

                Starting with 1.7.0. HSQLDB supports this.

                Specified by:
                getCharacterStream in interface java.sql.ResultSet
                Parameters:
                columnIndex - the first column is 1, the second is 2, ...
                Returns:
                a java.io.Reader object that contains the column value; if the value is SQL NULL, the value returned is null in the Java programming language.
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2

                getCharacterStream

                public java.io.Reader getCharacterStream(java.lang.String columnName)
                                                  throws java.sql.SQLException
                Retrieves the value of the designated column in the current row of this ResultSet object as a java.io.Reader object.

                HSQLDB-Specific Information:

                Starting with 1.7.0, HSQLDB supports this.

                Specified by:
                getCharacterStream in interface java.sql.ResultSet
                Parameters:
                columnName - the name of the column
                Returns:
                a java.io.Reader object that contains the column value; if the value is SQL NULL, the value returned is null in the Java programming language
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2

                getBigDecimal

                public java.math.BigDecimal getBigDecimal(int columnIndex)
                                                   throws java.sql.SQLException
                Retrieves the value of the designated column in the current row of this ResultSet object as a java.math.BigDecimal with full precision.

                Specified by:
                getBigDecimal in interface java.sql.ResultSet
                Parameters:
                columnIndex - the first column is 1, the second is 2, ...
                Returns:
                the column value (full precision); if the value is SQL NULL, the value returned is null in the Java programming language.
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)

                getBigDecimal

                public java.math.BigDecimal getBigDecimal(java.lang.String columnName)
                                                   throws java.sql.SQLException
                Retrieves the value of the designated column in the current row of this ResultSet object as a java.math.BigDecimal with full precision.

                Specified by:
                getBigDecimal in interface java.sql.ResultSet
                Parameters:
                columnName - the column name
                Returns:
                the column value (full precision); if the value is SQL NULL, the value returned is null in the Java programming language.
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)

                isBeforeFirst

                public boolean isBeforeFirst()
                                      throws java.sql.SQLException
                Retrieves whether the cursor is before the first row in this ResultSet object.

                Specified by:
                isBeforeFirst in interface java.sql.ResultSet
                Returns:
                true if the cursor is before the first row; false if the cursor is at any other position or the result set contains no rows
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)

                isAfterLast

                public boolean isAfterLast()
                                    throws java.sql.SQLException
                Retrieves whether the cursor is after the last row in this ResultSet object.

                Specified by:
                isAfterLast in interface java.sql.ResultSet
                Returns:
                true if the cursor is after the last row; false if the cursor is at any other position or the result set contains no rows
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)

                isFirst

                public boolean isFirst()
                                throws java.sql.SQLException
                Retrieves whether the cursor is on the first row of this ResultSet object.

                Specified by:
                isFirst in interface java.sql.ResultSet
                Returns:
                true if the cursor is on the first row; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)

                isLast

                public boolean isLast()
                               throws java.sql.SQLException
                Retrieves whether the cursor is on the last row of this ResultSet object. Note: Calling the method isLast may be expensive because the JDBC driver might need to fetch ahead one row in order to determine whether the current row is the last row in the result set.

                HSQLDB-Specific Information:

                Including 1.7.2, this method is not terribly expensive; the entire result is fetched internally before this object is returned to a caller.

                Specified by:
                isLast in interface java.sql.ResultSet
                Returns:
                true if the cursor is on the last row; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)

                beforeFirst

                public void beforeFirst()
                                 throws java.sql.SQLException
                Moves the cursor to the front of this ResultSet object, just before the first row. This method has no effect if the result set contains no rows.

                Specified by:
                beforeFirst in interface java.sql.ResultSet
                Throws:
                java.sql.SQLException - if a database access error occurs or the result set type is TYPE_FORWARD_ONLY
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)

                afterLast

                public void afterLast()
                               throws java.sql.SQLException
                Moves the cursor to the end of this ResultSet object, just after the last row. This method has no effect if the result set contains no rows.

                Specified by:
                afterLast in interface java.sql.ResultSet
                Throws:
                java.sql.SQLException - if a database access error occurs or the result set type is TYPE_FORWARD_ONLY
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)

                first

                public boolean first()
                              throws java.sql.SQLException
                Moves the cursor to the first row in this ResultSet object.

                Specified by:
                first in interface java.sql.ResultSet
                Returns:
                true if the cursor is on a valid row; false if there are no rows in the result set
                Throws:
                java.sql.SQLException - if a database access error occurs or the result set type is TYPE_FORWARD_ONLY
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)

                last

                public boolean last()
                             throws java.sql.SQLException
                Moves the cursor to the last row in this ResultSet object.

                Specified by:
                last in interface java.sql.ResultSet
                Returns:
                true if the cursor is on a valid row; false if there are no rows in the result set
                Throws:
                java.sql.SQLException - if a database access error occurs or the result set type is TYPE_FORWARD_ONLY
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)

                getRow

                public int getRow()
                           throws java.sql.SQLException
                Retrieves the current row number. The first row is number 1, the second number 2, and so on.

                Specified by:
                getRow in interface java.sql.ResultSet
                Returns:
                the current row number; 0 if there is no current row
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)

                absolute

                public boolean absolute(int row)
                                 throws java.sql.SQLException
                Moves the cursor to the given row number in this ResultSet object.

                If the row number is positive, the cursor moves to the given row number with respect to the beginning of the result set. The first row is row 1, the second is row 2, and so on.

                If the given row number is negative, the cursor moves to an absolute row position with respect to the end of the result set. For example, calling the method absolute(-1) positions the cursor on the last row; calling the method absolute(-2) moves the cursor to the next-to-last row, and so on.

                An attempt to position the cursor beyond the first/last row in the result set leaves the cursor before the first row or after the last row.

                Note: Calling absolute(1) is the same as calling first(). Calling absolute(-1) is the same as calling last().

                Specified by:
                absolute in interface java.sql.ResultSet
                Parameters:
                row - the number of the row to which the cursor should move. A positive number indicates the row number counting from the beginning of the result set; a negative number indicates the row number counting from the end of the result set
                Returns:
                true if the cursor is on the result set; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs, or the result set type is TYPE_FORWARD_ONLY
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)

                relative

                public boolean relative(int rows)
                                 throws java.sql.SQLException
                Moves the cursor a relative number of rows, either positive or negative. Attempting to move beyond the first/last row in the result set positions the cursor before/after the the first/last row. Calling relative(0) is valid, but does not change the cursor position.

                Note: Calling the method relative(1) is identical to calling the method next() and calling the method relative(-1) is identical to calling the method previous().

                Specified by:
                relative in interface java.sql.ResultSet
                Parameters:
                rows - an int specifying the number of rows to move from the current row; a positive number moves the cursor forward; a negative number moves the cursor backward
                Returns:
                true if the cursor is on a row; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs, there is no current row, or the result set type is TYPE_FORWARD_ONLY
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)

                previous

                public boolean previous()
                                 throws java.sql.SQLException
                Moves the cursor to the previous row in this ResultSet object.

                Specified by:
                previous in interface java.sql.ResultSet
                Returns:
                true if the cursor is on a valid row; false if it is off the result set
                Throws:
                java.sql.SQLException - if a database access error occurs or the result set type is TYPE_FORWARD_ONLY
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)

                setFetchDirection

                public void setFetchDirection(int direction)
                                       throws java.sql.SQLException
                Gives a hint as to the direction in which the rows in this ResultSet object will be processed. The initial value is determined by the Statement object that produced this ResultSet object. The fetch direction may be changed at any time.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB builds and returns result sets as a whole; this method does nothing. However, as mandated by the JDBC standard, an SQLException is thrown if the result set type is TYPE_FORWARD_ONLY and a fetch direction other than FETCH_FORWARD is requested.

                Specified by:
                setFetchDirection in interface java.sql.ResultSet
                Parameters:
                direction - an int specifying the suggested fetch direction; one of ResultSet.FETCH_FORWARD, ResultSet.FETCH_REVERSE, or ResultSet.FETCH_UNKNOWN
                Throws:
                java.sql.SQLException - if a database access error occurs or the result set type is TYPE_FORWARD_ONLY and the fetch direction is not FETCH_FORWARD
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)
                See Also:
                jdbcStatement.setFetchDirection(int), getFetchDirection()

                getFetchDirection

                public int getFetchDirection()
                                      throws java.sql.SQLException
                Retrieves the fetch direction for this ResultSet object.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB builds and returns result sets as a whole; this method always returns FETCH_FORWARD, but the value has no real meaning.

                Specified by:
                getFetchDirection in interface java.sql.ResultSet
                Returns:
                the current fetch direction for this ResultSet object
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)
                See Also:
                setFetchDirection(int)

                setFetchSize

                public void setFetchSize(int rows)
                                  throws java.sql.SQLException
                Gives the JDBC driver a hint as to the number of rows that should be fetched from the database when more rows are needed for this ResultSet object. If the fetch size specified is zero, the JDBC driver ignores the value and is free to make its own best guess as to what the fetch size should be. The default value is set by the Statement object that created the result set. The fetch size may be changed at any time.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB builds and returns result sets as a whole; this method does nothing.

                Specified by:
                setFetchSize in interface java.sql.ResultSet
                Parameters:
                rows - the number of rows to fetch
                Throws:
                java.sql.SQLException - if a database access error occurs or the condition 0 <= rows <= this.getMaxRows() is not satisfied
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)
                See Also:
                getFetchSize(), jdbcStatement.setFetchSize(int), jdbcStatement.getFetchSize()

                getFetchSize

                public int getFetchSize()
                                 throws java.sql.SQLException
                Retrieves the fetch size for this ResultSet object.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB builds and returns result sets as a whole; the value returned (always 1) has no significance.

                Specified by:
                getFetchSize in interface java.sql.ResultSet
                Returns:
                the current fetch size for this ResultSet object
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)
                See Also:
                setFetchSize(int), jdbcStatement.getFetchSize(), jdbcStatement.setFetchSize(int)

                getType

                public int getType()
                            throws java.sql.SQLException
                Retrieves the type of this ResultSet object. The type is determined by the Statement object that created the result set.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB does not support and thus never returns ResultSet.TYPE_SCROLL_SENSITIVE.

                Specified by:
                getType in interface java.sql.ResultSet
                Returns:
                ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, or ResultSet.TYPE_SCROLL_SENSITIVE (not supported)
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)

                getConcurrency

                public int getConcurrency()
                                   throws java.sql.SQLException
                Retrieves the concurrency mode of this ResultSet object. The concurrency used is determined by the Statement object that created the result set.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB supports only CONCUR_READ_ONLY; this method always returns CONCUR_READ_ONLY.

                Specified by:
                getConcurrency in interface java.sql.ResultSet
                Returns:
                the concurrency type, either ResultSet.CONCUR_READ_ONLY or ResultSet.CONCUR_UPDATABLE
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)

                rowUpdated

                public boolean rowUpdated()
                                   throws java.sql.SQLException
                Retrieves whether the current row has been updated. The value returned depends on whether or not the result set can detect updates.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB does not support updateable results.

                This method always returns false.

                Specified by:
                rowUpdated in interface java.sql.ResultSet
                Returns:
                true if both (1) the row has been visibly updated by the owner or another and (2) updates are detected
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)
                See Also:
                DatabaseMetaData#updatesAreDetected

                rowInserted

                public boolean rowInserted()
                                    throws java.sql.SQLException
                Retrieves whether the current row has had an insertion. The value returned depends on whether or not this ResultSet object can detect visible inserts.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB does not support updateable results.

                This method always returns false.

                Specified by:
                rowInserted in interface java.sql.ResultSet
                Returns:
                true if a row has had an insertion and insertions are detected; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)
                See Also:
                DatabaseMetaData#insertsAreDetected

                rowDeleted

                public boolean rowDeleted()
                                   throws java.sql.SQLException
                Retrieves whether a row has been deleted. A deleted row may leave a visible "hole" in a result set. This method can be used to detect holes in a result set. The value returned depends on whether or not this ResultSet object can detect deletions.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB does not support updateable results.

                This method always returns false.

                Specified by:
                rowDeleted in interface java.sql.ResultSet
                Returns:
                true if a row was deleted and deletions are detected; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)
                See Also:
                DatabaseMetaData#deletesAreDetected

                updateNull

                public void updateNull(int columnIndex)
                                throws java.sql.SQLException
                Gives a nullable column a null value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.

                HSQLDB-Specific Information:

                Including 1.7.1, HSQLDB does not support updateable results.

                This method always throws an SQLException stating that the operation is not supported.

                Specified by:
                updateNull in interface java.sql.ResultSet
                Parameters:
                columnIndex - the first column is 1, the second is 2, ...
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2

                updateBoolean

                public void updateBoolean(int columnIndex,
                                          boolean x)
                                   throws java.sql.SQLException
                Updates the designated column with a boolean value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB does not support updateable results.

                This method always throws an SQLException, stating that the operation is not supported.

                Specified by:
                updateBoolean in interface java.sql.ResultSet
                Parameters:
                columnIndex - the first column is 1, the second is 2, ...
                x - the new column value
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2

                updateByte

                public void updateByte(int columnIndex,
                                       byte x)
                                throws java.sql.SQLException
                Updates the designated column with a byte value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB does not support updateable results.

                This method always throws an SQLException, stating that the operation is not supported.

                Specified by:
                updateByte in interface java.sql.ResultSet
                Parameters:
                columnIndex - the first column is 1, the second is 2, ...
                x - the new column value
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)

                updateShort

                public void updateShort(int columnIndex,
                                        short x)
                                 throws java.sql.SQLException
                Updates the designated column with a short value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB does not support updateable results.

                This method always throws an SQLException stating that the operation is not supported.

                Specified by:
                updateShort in interface java.sql.ResultSet
                Parameters:
                columnIndex - the first column is 1, the second is 2, ...
                x - the new column value
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)

                updateInt

                public void updateInt(int columnIndex,
                                      int x)
                               throws java.sql.SQLException
                Updates the designated column with an int value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB does not support updateable results.

                This method always throws an SQLException stating that the operation is not supported.

                Specified by:
                updateInt in interface java.sql.ResultSet
                Parameters:
                columnIndex - the first column is 1, the second is 2, ...
                x - the new column value
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)

                updateLong

                public void updateLong(int columnIndex,
                                       long x)
                                throws java.sql.SQLException
                Updates the designated column with a long value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB does not support updateable results.

                This method always throws an SQLException stating that the operation is not supported.

                Specified by:
                updateLong in interface java.sql.ResultSet
                Parameters:
                columnIndex - the first column is 1, the second is 2, ...
                x - the new column value
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)

                updateFloat

                public void updateFloat(int columnIndex,
                                        float x)
                                 throws java.sql.SQLException
                Updates the designated column with a float value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB does not support updateable results.

                This method always throws an SQLException, stating that the operation is not supported.

                Specified by:
                updateFloat in interface java.sql.ResultSet
                Parameters:
                columnIndex - the first column is 1, the second is 2, ...
                x - the new column value
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)

                updateDouble

                public void updateDouble(int columnIndex,
                                         double x)
                                  throws java.sql.SQLException
                Updates the designated column with a double value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB does not support updateable results.

                This method always throws an SQLException, stating that the operation is not supported.

                Specified by:
                updateDouble in interface java.sql.ResultSet
                Parameters:
                columnIndex - the first column is 1, the second is 2, ...
                x - the new column value
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)

                updateBigDecimal

                public void updateBigDecimal(int columnIndex,
                                             java.math.BigDecimal x)
                                      throws java.sql.SQLException
                Updates the designated column with a java.math.BigDecimal value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB does not support updateable results.

                This method always throws an SQLException stating that the operation is not supported.

                Specified by:
                updateBigDecimal in interface java.sql.ResultSet
                Parameters:
                columnIndex - the first column is 1, the second is 2, ...
                x - the new column value
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)

                updateString

                public void updateString(int columnIndex,
                                         java.lang.String x)
                                  throws java.sql.SQLException
                Updates the designated column with a String value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB does not support updateable results.

                This method always throws an SQLException, stating that the operation is not supported.

                Specified by:
                updateString in interface java.sql.ResultSet
                Parameters:
                columnIndex - the first column is 1, the second is 2, ...
                x - the new column value
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)

                updateBytes

                public void updateBytes(int columnIndex,
                                        byte[] x)
                                 throws java.sql.SQLException
                Updates the designated column with a byte array value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB does not support updateable result sets.

                This method always throws an SQLException, stating that the operation is not supported.

                Specified by:
                updateBytes in interface java.sql.ResultSet
                Parameters:
                columnIndex - the first column is 1, the second is 2, ...
                x - the new column value
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)

                updateDate

                public void updateDate(int columnIndex,
                                       java.sql.Date x)
                                throws java.sql.SQLException
                Updates the designated column with a java.sql.Date value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB does not support updateable result sets.

                This method always throws an SQLException, stating that the operation is not supported.

                Specified by:
                updateDate in interface java.sql.ResultSet
                Parameters:
                columnIndex - the first column is 1, the second is 2, ...
                x - the new column value
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)

                updateTime

                public void updateTime(int columnIndex,
                                       java.sql.Time x)
                                throws java.sql.SQLException
                Updates the designated column with a java.sql.Time value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB does not support updateable result sets.

                This method always throws an SQLException stating that the operation is not supported.

                Specified by:
                updateTime in interface java.sql.ResultSet
                Parameters:
                columnIndex - the first column is 1, the second is 2, ...
                x - the new column value
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)

                updateTimestamp

                public void updateTimestamp(int columnIndex,
                                            java.sql.Timestamp x)
                                     throws java.sql.SQLException
                Updates the designated column with a java.sql.Timestamp value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB does not support updateable result sets.

                This method always throws an SQLException stating that the operation is not supported.

                Specified by:
                updateTimestamp in interface java.sql.ResultSet
                Parameters:
                columnIndex - the first column is 1, the second is 2, ...
                x - the new column value
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)

                updateAsciiStream

                public void updateAsciiStream(int columnIndex,
                                              java.io.InputStream x,
                                              int length)
                                       throws java.sql.SQLException
                Updates the designated column with an ascii stream value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB does not support updateable result sets.

                This method always throws an SQLException stating that the operation is not supported.

                Specified by:
                updateAsciiStream in interface java.sql.ResultSet
                Parameters:
                columnIndex - the first column is 1, the second is 2, ...
                x - the new column value
                length - the length of the stream
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)

                updateBinaryStream

                public void updateBinaryStream(int columnIndex,
                                               java.io.InputStream x,
                                               int length)
                                        throws java.sql.SQLException
                Updates the designated column with a binary stream value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB does not support updateable result sets.

                This method always throws an SQLException stating that the operation is not supported.

                Specified by:
                updateBinaryStream in interface java.sql.ResultSet
                Parameters:
                columnIndex - the first column is 1, the second is 2, ...
                x - the new column value
                length - the length of the stream
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)

                updateCharacterStream

                public void updateCharacterStream(int columnIndex,
                                                  java.io.Reader x,
                                                  int length)
                                           throws java.sql.SQLException
                Updates the designated column with a character stream value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB does not support updateable result sets.

                This method always throws an SQLException stating that the operation is not supported.

                Specified by:
                updateCharacterStream in interface java.sql.ResultSet
                Parameters:
                columnIndex - the first column is 1, the second is 2, ...
                x - the new column value
                length - the length of the stream
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)

                updateObject

                public void updateObject(int columnIndex,
                                         java.lang.Object x,
                                         int scale)
                                  throws java.sql.SQLException
                Updates the designated column with an Object value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB does not support updateable result sets.

                This method always throws an SQLException stating that the operation is not supported.

                Specified by:
                updateObject in interface java.sql.ResultSet
                Parameters:
                columnIndex - the first column is 1, the second is 2, ...
                x - the new column value
                scale - for java.sql.Types.DECIMA or java.sql.Types.NUMERIC types, this is the number of digits after the decimal point. For all other types this value will be ignored.
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)

                updateObject

                public void updateObject(int columnIndex,
                                         java.lang.Object x)
                                  throws java.sql.SQLException
                Updates the designated column with an Object value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB does not support updateable result sets.

                This method always throws an SQLException stating that the operation is not supported.

                Specified by:
                updateObject in interface java.sql.ResultSet
                Parameters:
                columnIndex - the first column is 1, the second is 2, ...
                x - the new column value
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)

                updateNull

                public void updateNull(java.lang.String columnName)
                                throws java.sql.SQLException
                Updates the designated column with a null value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB does not support updateable result sets.

                This method always throws an SQLException stating that the operation is not supported.

                Specified by:
                updateNull in interface java.sql.ResultSet
                Parameters:
                columnName - the name of the column
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)

                updateBoolean

                public void updateBoolean(java.lang.String columnName,
                                          boolean x)
                                   throws java.sql.SQLException
                Updates the designated column with a boolean value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB does not support updateable result sets.

                This method always throws an SQLException stating that the operation is not supported.

                Specified by:
                updateBoolean in interface java.sql.ResultSet
                Parameters:
                columnName - the name of the column
                x - the new column value
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)

                updateByte

                public void updateByte(java.lang.String columnName,
                                       byte x)
                                throws java.sql.SQLException
                Updates the designated column with a byte value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB does not support updateable result sets.

                This method always throws an SQLException stating that the operation is not supported.

                Specified by:
                updateByte in interface java.sql.ResultSet
                Parameters:
                columnName - the name of the column
                x - the new column value
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)

                updateShort

                public void updateShort(java.lang.String columnName,
                                        short x)
                                 throws java.sql.SQLException
                Updates the designated column with a short value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB does not support updateable result sets.

                This method always throws an SQLException stating that the operation is not supported.

                Specified by:
                updateShort in interface java.sql.ResultSet
                Parameters:
                columnName - the name of the column
                x - the new column value
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)

                updateInt

                public void updateInt(java.lang.String columnName,
                                      int x)
                               throws java.sql.SQLException
                Updates the designated column with an int value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB does not support updateable result sets.

                This method always throws an SQLException stating that the operation is not supported.

                Specified by:
                updateInt in interface java.sql.ResultSet
                Parameters:
                columnName - the name of the column
                x - the new column value
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)

                updateLong

                public void updateLong(java.lang.String columnName,
                                       long x)
                                throws java.sql.SQLException
                Updates the designated column with a long value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB does not support updateable result sets.

                This method always throws an SQLException stating that the operation is not supported.

                Specified by:
                updateLong in interface java.sql.ResultSet
                Parameters:
                columnName - the name of the column
                x - the new column value
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)

                updateFloat

                public void updateFloat(java.lang.String columnName,
                                        float x)
                                 throws java.sql.SQLException
                Updates the designated column with a float value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB does not support updateable result sets.

                This method always throws an SQLException stating that the operation is not supported.

                Specified by:
                updateFloat in interface java.sql.ResultSet
                Parameters:
                columnName - the name of the column
                x - the new column value
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)

                updateDouble

                public void updateDouble(java.lang.String columnName,
                                         double x)
                                  throws java.sql.SQLException
                Updates the designated column with a double value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB does not support updateable result sets.

                This method always throws an SQLException stating that the operation is not supported.

                Specified by:
                updateDouble in interface java.sql.ResultSet
                Parameters:
                columnName - the name of the column
                x - the new column value
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)

                updateBigDecimal

                public void updateBigDecimal(java.lang.String columnName,
                                             java.math.BigDecimal x)
                                      throws java.sql.SQLException
                Updates the designated column with a java.sql.BigDecimal value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB does not support updateable result sets.

                This method always throws an SQLException stating that the operation is not supported.

                Specified by:
                updateBigDecimal in interface java.sql.ResultSet
                Parameters:
                columnName - the name of the column
                x - the new column value
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)

                updateString

                public void updateString(java.lang.String columnName,
                                         java.lang.String x)
                                  throws java.sql.SQLException
                Updates the designated column with a String value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB does not support updateable result sets.

                This method always throws an SQLException stating that the operation is not supported.

                Specified by:
                updateString in interface java.sql.ResultSet
                Parameters:
                columnName - the name of the column
                x - the new column value
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)

                updateBytes

                public void updateBytes(java.lang.String columnName,
                                        byte[] x)
                                 throws java.sql.SQLException
                Updates the designated column with a byte array value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB does not support updateable result sets.

                This method always throws an SQLException stating that the operation is not supported.

                Specified by:
                updateBytes in interface java.sql.ResultSet
                Parameters:
                columnName - the name of the column
                x - the new column value
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)

                updateDate

                public void updateDate(java.lang.String columnName,
                                       java.sql.Date x)
                                throws java.sql.SQLException
                Updates the designated column with a java.sql.Date value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB does not support updateable result sets.

                This method always throws an SQLException stating that the operation is not supported.

                Specified by:
                updateDate in interface java.sql.ResultSet
                Parameters:
                columnName - the name of the column
                x - the new column value
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)

                updateTime

                public void updateTime(java.lang.String columnName,
                                       java.sql.Time x)
                                throws java.sql.SQLException
                Updates the designated column with a java.sql.Time value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB does not support updateable result sets.

                This method always throws an SQLException stating that the operation is not supported.

                Specified by:
                updateTime in interface java.sql.ResultSet
                Parameters:
                columnName - the name of the column
                x - the new column value
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)

                updateTimestamp

                public void updateTimestamp(java.lang.String columnName,
                                            java.sql.Timestamp x)
                                     throws java.sql.SQLException
                Updates the designated column with a java.sql.Timestamp value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB does not support updateable result sets.

                This method always throws an SQLException stating that the operation is not supported.

                Specified by:
                updateTimestamp in interface java.sql.ResultSet
                Parameters:
                columnName - the name of the column
                x - the new column value
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)

                updateAsciiStream

                public void updateAsciiStream(java.lang.String columnName,
                                              java.io.InputStream x,
                                              int length)
                                       throws java.sql.SQLException
                Updates the designated column with an ascii stream value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB does not support updateable result sets.

                This method always throws an SQLException stating that the operation is not supported.

                Specified by:
                updateAsciiStream in interface java.sql.ResultSet
                Parameters:
                columnName - the name of the column
                x - the new column value
                length - the length of the stream
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)

                updateBinaryStream

                public void updateBinaryStream(java.lang.String columnName,
                                               java.io.InputStream x,
                                               int length)
                                        throws java.sql.SQLException
                Updates the designated column with a binary stream value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB does not support updateable result sets.

                This method always throws an SQLException stating that the operation is not supported.

                Specified by:
                updateBinaryStream in interface java.sql.ResultSet
                Parameters:
                columnName - the name of the column
                x - the new column value
                length - the length of the stream
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)

                updateCharacterStream

                public void updateCharacterStream(java.lang.String columnName,
                                                  java.io.Reader reader,
                                                  int length)
                                           throws java.sql.SQLException
                Updates the designated column with a character stream value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB does not support updateable result sets.

                This method always throws an SQLException stating that the operation is not supported.

                Specified by:
                updateCharacterStream in interface java.sql.ResultSet
                Parameters:
                columnName - the name of the column
                reader - the java.io.Reader object containing the new column value
                length - the length of the stream
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)

                updateObject

                public void updateObject(java.lang.String columnName,
                                         java.lang.Object x,
                                         int scale)
                                  throws java.sql.SQLException
                Updates the designated column with an Object value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB does not support updateable result sets.

                This method always throws an SQLException stating that the operation is not supported.

                Specified by:
                updateObject in interface java.sql.ResultSet
                Parameters:
                columnName - the name of the column
                x - the new column value
                scale - for java.sql.Types.DECIMAL or java.sql.Types.NUMERIC types, this is the number of digits after the decimal point. For all other types this value will be ignored.
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)

                updateObject

                public void updateObject(java.lang.String columnName,
                                         java.lang.Object x)
                                  throws java.sql.SQLException
                Updates the designated column with an Object value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB does not support updateable result sets.

                This method always throws an SQLException stating that the operation is not supported.

                Specified by:
                updateObject in interface java.sql.ResultSet
                Parameters:
                columnName - the name of the column
                x - the new column value
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)

                insertRow

                public void insertRow()
                               throws java.sql.SQLException
                Inserts the contents of the insert row into this ResultSet object and into the database. The cursor must be on the insert row when this method is called.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB does not support updateable result sets.

                This method always throws an SQLException stating that the operation is not supported.

                Specified by:
                insertRow in interface java.sql.ResultSet
                Throws:
                java.sql.SQLException - if a database access error occurs, if this method is called when the cursor is not on the insert row, or if not all of non-nullable columns in the insert row have been given a value
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)

                updateRow

                public void updateRow()
                               throws java.sql.SQLException
                Updates the underlying database with the new contents of the current row of this ResultSet object. This method cannot be called when the cursor is on the insert row.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB does not support updateable result sets.

                This method always throws an SQLException stating that the operation is not supported.

                Specified by:
                updateRow in interface java.sql.ResultSet
                Throws:
                java.sql.SQLException - if a database access error occurs or if this method is called when the cursor is on the insert row
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)

                deleteRow

                public void deleteRow()
                               throws java.sql.SQLException
                Deletes the current row from this ResultSet object and from the underlying database. This method cannot be called when the cursor is on the insert row.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB does not support updateable result sets.

                This method always throws an SQLException stating that the operation is not supported.

                Specified by:
                deleteRow in interface java.sql.ResultSet
                Throws:
                java.sql.SQLException - if a database access error occurs or if this method is called when the cursor is on the insert row
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)

                refreshRow

                public void refreshRow()
                                throws java.sql.SQLException
                Refreshes the current row with its most recent value in the database. This method cannot be called when the cursor is on the insert row.

                The refreshRow method provides a way for an application to explicitly tell the JDBC driver to refetch a row(s) from the database. An application may want to call refreshRow when caching or prefetching is being done by the JDBC driver to fetch the latest value of a row from the database. The JDBC driver may actually refresh multiple rows at once if the fetch size is greater than one.

                All values are refetched subject to the transaction isolation level and cursor sensitivity. If refreshRow is called after calling an updater method, but before calling the method updateRow, then the updates made to the row are lost. Calling the method refreshRow frequently will likely slow performance.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB does not support updateable result sets.

                This method always throws an SQLException stating that the operation is not supported.

                Specified by:
                refreshRow in interface java.sql.ResultSet
                Throws:
                java.sql.SQLException - if a database access error occurs or if this method is called when the cursor is on the insert row
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)

                cancelRowUpdates

                public void cancelRowUpdates()
                                      throws java.sql.SQLException
                Cancels the updates made to the current row in this ResultSet object. This method may be called after calling an updater method(s) and before calling the method updateRow to roll back the updates made to a row. If no updates have been made or updateRow has already been called, this method has no effect.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB does not support updateable result sets.

                This method always throws an SQLException stating that the operation is not supported.

                Specified by:
                cancelRowUpdates in interface java.sql.ResultSet
                Throws:
                java.sql.SQLException - if a database access error occurs or if this method is called when the cursor is on the insert row
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)

                moveToInsertRow

                public void moveToInsertRow()
                                     throws java.sql.SQLException
                Moves the cursor to the insert row. The current cursor position is remembered while the cursor is positioned on the insert row. The insert row is a special row associated with an updatable result set. It is essentially a buffer where a new row may be constructed by calling the updater methods prior to inserting the row into the result set. Only the updater, getter, and insertRow methods may be called when the cursor is on the insert row. All of the columns in a result set must be given a value each time this method is called before calling insertRow. An updater method must be called before a getter method can be called on a column value.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB does not support updateable result sets.

                This method always throws an SQLException stating that the operation is not supported.

                Specified by:
                moveToInsertRow in interface java.sql.ResultSet
                Throws:
                java.sql.SQLException - if a database access error occurs or the result set is not updatable
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)

                moveToCurrentRow

                public void moveToCurrentRow()
                                      throws java.sql.SQLException
                Moves the cursor to the remembered cursor position, usually the current row. This method has no effect if the cursor is not on the insert row.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB does not support updateable result sets.

                This method is ignored.

                Specified by:
                moveToCurrentRow in interface java.sql.ResultSet
                Throws:
                java.sql.SQLException - if a database access error occurs or the result set is not updatable
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)

                getStatement

                public java.sql.Statement getStatement()
                                                throws java.sql.SQLException
                Retrieves the Statement object that produced this ResultSet object. If the result set was generated some other way, such as by a DatabaseMetaData method, this method returns null.

                Specified by:
                getStatement in interface java.sql.ResultSet
                Returns:
                the Statment object that produced this ResultSet object or null if the result set was produced some other way
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)

                getObject

                public java.lang.Object getObject(int i,
                                                  java.util.Map map)
                                           throws java.sql.SQLException
                Retrieves the value of the designated column in the current row of this ResultSet object as an Object in the Java programming language. If the value is an SQL NULL, the driver returns a Java null. This method uses the given Map object for the custom mapping of the SQL structured or distinct type that is being retrieved.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB does not support this feature.

                This method always throws an SQLException, stating that the operation is not supported.

                Specified by:
                getObject in interface java.sql.ResultSet
                Parameters:
                i - the first column is 1, the second is 2, ...
                map - a java.util.Map object that contains the mapping from SQL type names to classes in the Java programming language
                Returns:
                an Object in the Java programming language representing the SQL value
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)

                getRef

                public java.sql.Ref getRef(int i)
                                    throws java.sql.SQLException
                Retrieves the value of the designated column in the current row of this ResultSet object as a Ref object in the Java programming language.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB does not support this feature.

                This method always throws an SQLException stating that the operation is not supported.

                Specified by:
                getRef in interface java.sql.ResultSet
                Parameters:
                i - the first column is 1, the second is 2, ...
                Returns:
                a Ref object representing an SQL REF value
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)

                getBlob

                public java.sql.Blob getBlob(int i)
                                      throws java.sql.SQLException
                Retrieves the value of the designated column in the current row of this ResultSet object as a Blob object in the Java programming language.

                HSQLDB-Specific Information:

                Starting with 1.7.2, this feature is supported.

                Specified by:
                getBlob in interface java.sql.ResultSet
                Parameters:
                i - the first column is 1, the second is 2, ...
                Returns:
                a Blob object representing the SQL BLOB value in the specified column
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2

                getClob

                public java.sql.Clob getClob(int i)
                                      throws java.sql.SQLException
                Retrieves the value of the designated column in the current row of this ResultSet object as a Clob object in the Java programming language.

                HSQLDB-Specific Information:

                Starting with 1.7.2, this feature is supported.

                Specified by:
                getClob in interface java.sql.ResultSet
                Parameters:
                i - the first column is 1, the second is 2, ...
                Returns:
                a Clob object representing the SQL CLOB value in the specified column
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2

                getArray

                public java.sql.Array getArray(int i)
                                        throws java.sql.SQLException
                Retrieves the value of the designated column in the current row of this ResultSet object as an Array object in the Java programming language.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB does not support this feature.

                This method always throws an SQLException stating that the operation is not supported.

                Specified by:
                getArray in interface java.sql.ResultSet
                Parameters:
                i - the first column is 1, the second is 2, ...
                Returns:
                an Array object representing the SQL ARRAY value in the specified column
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)

                getObject

                public java.lang.Object getObject(java.lang.String colName,
                                                  java.util.Map map)
                                           throws java.sql.SQLException
                Retrieves the value of the designated column in the current row of this ResultSet object as an Object in the Java programming language. If the value is an SQL NULL, the driver returns a Java null. This method uses the specified Map object for custom mapping if appropriate.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB does not support this feature.

                This method always throws an SQLException stating that the operation is not supported.

                Specified by:
                getObject in interface java.sql.ResultSet
                Parameters:
                colName - the name of the column from which to retrieve the value
                map - a java.util.Map object that contains the mapping from SQL type names to classes in the Java programming language
                Returns:
                an Object representing the SQL value in the specified column
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)

                getRef

                public java.sql.Ref getRef(java.lang.String colName)
                                    throws java.sql.SQLException
                Retrieves the value of the designated column in the current row of this ResultSet object as a Ref object in the Java programming language.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB does not support this feature.

                This method always throws an SQLException, stating that the operartion is not supported.

                Specified by:
                getRef in interface java.sql.ResultSet
                Parameters:
                colName - the column name
                Returns:
                a Ref object representing the SQL REF value in the specified column
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)

                getBlob

                public java.sql.Blob getBlob(java.lang.String colName)
                                      throws java.sql.SQLException
                Retrieves the value of the designated column in the current row of this ResultSet object as a Blob object in the Java programming language.

                HSQLDB-Specific Information:

                Starting with 1.7.2, this feature is supported.

                Specified by:
                getBlob in interface java.sql.ResultSet
                Parameters:
                colName - the name of the column from which to retrieve the value
                Returns:
                a Blob object representing the SQL BLOB value in the specified column
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2

                getClob

                public java.sql.Clob getClob(java.lang.String colName)
                                      throws java.sql.SQLException
                Retrieves the value of the designated column in the current row of this ResultSet object as a Clob object in the Java programming language.

                HSQLDB-Specific Information:

                Starting with 1.7.2, this feature is supported.

                Specified by:
                getClob in interface java.sql.ResultSet
                Parameters:
                colName - the name of the column from which to retrieve the value
                Returns:
                a Clob object representing the SQL CLOB value in the specified column
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2

                getArray

                public java.sql.Array getArray(java.lang.String colName)
                                        throws java.sql.SQLException
                Retrieves the value of the designated column in the current row of this ResultSet object as an Array object in the Java programming language.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB does not support this feature.

                This method always throws an SQLException stating that the operation is not supported.

                Specified by:
                getArray in interface java.sql.ResultSet
                Parameters:
                colName - the name of the column from which to retrieve the value
                Returns:
                an Array object representing the SQL ARRAY value in the specified column
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)

                getDate

                public java.sql.Date getDate(int columnIndex,
                                             java.util.Calendar cal)
                                      throws java.sql.SQLException
                Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Date object in the Java programming language. This method uses the given calendar to construct an appropriate millisecond value for the date if the underlying database does not store timezone information.

                Specified by:
                getDate in interface java.sql.ResultSet
                Parameters:
                columnIndex - the first column is 1, the second is 2, ...
                cal - the java.util.Calendar object to use in constructing the date
                Returns:
                the column value as a java.sql.Date object; if the value is SQL NULL, the value returned is null in the Java programming language
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)

                getDate

                public java.sql.Date getDate(java.lang.String columnName,
                                             java.util.Calendar cal)
                                      throws java.sql.SQLException
                Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Date object in the Java programming language. This method uses the given calendar to construct an appropriate millisecond value for the date if the underlying database does not store timezone information.

                Specified by:
                getDate in interface java.sql.ResultSet
                Parameters:
                columnName - the SQL name of the column from which to retrieve the value
                cal - the java.util.Calendar object to use in constructing the date
                Returns:
                the column value as a java.sql.Date object; if the value is SQL NULL, the value returned is null in the Java programming language
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)

                getTime

                public java.sql.Time getTime(int columnIndex,
                                             java.util.Calendar cal)
                                      throws java.sql.SQLException
                Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Time object in the Java programming language. This method uses the given calendar to construct an appropriate millisecond value for the time if the underlying database does not store timezone information.

                Specified by:
                getTime in interface java.sql.ResultSet
                Parameters:
                columnIndex - the first column is 1, the second is 2, ...
                cal - the java.util.Calendar object to use in constructing the time
                Returns:
                the column value as a java.sql.Time object; if the value is SQL NULL, the value returned is null in the Java programming language
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)

                getTime

                public java.sql.Time getTime(java.lang.String columnName,
                                             java.util.Calendar cal)
                                      throws java.sql.SQLException
                Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Time object in the Java programming language. This method uses the given calendar to construct an appropriate millisecond value for the time if the underlying database does not store timezone information.

                Specified by:
                getTime in interface java.sql.ResultSet
                Parameters:
                columnName - the SQL name of the column
                cal - the java.util.Calendar object to use in constructing the time
                Returns:
                the column value as a java.sql.Time object; if the value is SQL NULL, the value returned is null in the Java programming language
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)

                getTimestamp

                public java.sql.Timestamp getTimestamp(int columnIndex,
                                                       java.util.Calendar cal)
                                                throws java.sql.SQLException
                Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Timestamp object in the Java programming anguage. This method uses the given calendar to construct an appropriate millisecond value for the timestamp if the underlying database does not store timezone information.

                Specified by:
                getTimestamp in interface java.sql.ResultSet
                Parameters:
                columnIndex - the first column is 1, the second is 2, ...
                cal - the java.util.Calendar object to use in constructing the timestamp
                Returns:
                the column value as a java.sql.Timestamp object; if the value is SQL NULL, the value returned is null in the Java programming language
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)

                getTimestamp

                public java.sql.Timestamp getTimestamp(java.lang.String columnName,
                                                       java.util.Calendar cal)
                                                throws java.sql.SQLException
                Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Timestamp object in the Java programming language. This method uses the given calendar to construct an appropriate millisecond value for the timestamp if the underlying database does not store timezone information.

                Specified by:
                getTimestamp in interface java.sql.ResultSet
                Parameters:
                columnName - the SQL name of the column
                cal - the java.util.Calendar object to use in constructing the date
                Returns:
                the column value as a java.sql.Timestamp object; if the value is SQL NULL, the value returned is null in the Java programming language
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcResultSet)

                getURL

                public java.net.URL getURL(int columnIndex)
                                    throws java.sql.SQLException
                Retrieves the value of the designated column in the current row of this ResultSet object as a java.net.URL object in the Java programming language.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB does not support this feature.

                This method always throws an SQLException stating that the operation is not supported.

                Specified by:
                getURL in interface java.sql.ResultSet
                Parameters:
                columnIndex - the index of the column 1 is the first, 2 is the second,...
                Returns:
                the column value as a java.net.URL object; if the value is SQL NULL, the value returned is null in the Java programming language
                Throws:
                java.sql.SQLException - if a database access error occurs, or if a URL is malformed
                Since:
                JDK 1.4, HSQLDB 1.7.0

                getURL

                public java.net.URL getURL(java.lang.String columnName)
                                    throws java.sql.SQLException
                Retrieves the value of the designated column in the current row of this ResultSet object as a java.net.URL object in the Java programming language.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB does not support this feature.

                This method always throws an SQLException stating that the operation is not supported.

                Specified by:
                getURL in interface java.sql.ResultSet
                Parameters:
                columnName - the SQL name of the column
                Returns:
                the column value as a java.net.URL object; if the value is SQL NULL, the value returned is null in the Java programming language
                Throws:
                java.sql.SQLException - if a database access error occurs or if a URL is malformed
                Since:
                JDK 1.4, HSQLDB 1.7.0

                updateRef

                public void updateRef(int columnIndex,
                                      java.sql.Ref x)
                               throws java.sql.SQLException
                Updates the designated column with a java.sql.Ref value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB does not support updateable result sets.

                This method always throws an SQLException, stating that the operation is not supported.

                Specified by:
                updateRef in interface java.sql.ResultSet
                Parameters:
                columnIndex - the first column is 1, the second is 2, ...
                x - the new column value
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7.0

                updateRef

                public void updateRef(java.lang.String columnName,
                                      java.sql.Ref x)
                               throws java.sql.SQLException
                Updates the designated column with a java.sql.Ref value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB does not support updateable result sets.

                This method always throws an SQLException, stating that the operation is not supported.

                Specified by:
                updateRef in interface java.sql.ResultSet
                Parameters:
                columnName - the name of the column
                x - the new column value
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7.0

                updateBlob

                public void updateBlob(int columnIndex,
                                       java.sql.Blob x)
                                throws java.sql.SQLException
                Updates the designated column with a java.sql.Blob value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB does not support updateable result sets.

                This method always throws an SQLException, stating that the operation is not supported.

                Specified by:
                updateBlob in interface java.sql.ResultSet
                Parameters:
                columnIndex - the first column is 1, the second is 2, ...
                x - the new column value
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7.0

                updateBlob

                public void updateBlob(java.lang.String columnName,
                                       java.sql.Blob x)
                                throws java.sql.SQLException
                Updates the designated column with a java.sql.Blob value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB does not support updateable result sets.

                This method always throws an SQLException, stating that the operation is not supported.

                Specified by:
                updateBlob in interface java.sql.ResultSet
                Parameters:
                columnName - the name of the column
                x - the new column value
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7.0

                updateClob

                public void updateClob(int columnIndex,
                                       java.sql.Clob x)
                                throws java.sql.SQLException
                Updates the designated column with a java.sql.Clob value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB does not support updateable result sets.

                This method always throws an SQLException, stating that the operation is not supported.

                Specified by:
                updateClob in interface java.sql.ResultSet
                Parameters:
                columnIndex - the first column is 1, the second is 2, ...
                x - the new column value
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7.0

                updateClob

                public void updateClob(java.lang.String columnName,
                                       java.sql.Clob x)
                                throws java.sql.SQLException
                Updates the designated column with a java.sql.Clob value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB does not support updateable result sets.

                This method always throws an SQLException, stating that the operation is not supported.

                Specified by:
                updateClob in interface java.sql.ResultSet
                Parameters:
                columnName - the name of the column
                x - the new column value
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7.0

                updateArray

                public void updateArray(int columnIndex,
                                        java.sql.Array x)
                                 throws java.sql.SQLException
                Updates the designated column with a java.sql.Array value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB does not support updateable result sets.

                This method always throws an SQLException stating that the operation is not supported.

                Specified by:
                updateArray in interface java.sql.ResultSet
                Parameters:
                columnIndex - the first column is 1, the second is 2, ...
                x - the new column value
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7.0

                updateArray

                public void updateArray(java.lang.String columnName,
                                        java.sql.Array x)
                                 throws java.sql.SQLException
                Updates the designated column with a java.sql.Array value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB does not support updateable result sets.

                This method always throws an SQLException, stating that the operation is not supported.

                Specified by:
                updateArray in interface java.sql.ResultSet
                Parameters:
                columnName - the name of the column
                x - the new column value
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7.0


                Copyright 2001 - 2005 HSQL Development Group. All Rights Reserved. hsqldb-1.8.0.10.orig/doc/src/org/hsqldb/jdbc/jdbcCallableStatement.html0000644000175000017500000061422711020614566024233 0ustar renerene jdbcCallableStatement (HSQLDB 1.8.0.10 API)

                org.hsqldb.jdbc
                Class jdbcCallableStatement

                java.lang.Object
                  extended byorg.hsqldb.jdbc.jdbcStatement
                      extended byorg.hsqldb.jdbc.jdbcPreparedStatement
                          extended byorg.hsqldb.jdbc.jdbcCallableStatement
                
                All Implemented Interfaces:
                java.sql.CallableStatement, java.sql.PreparedStatement, java.sql.Statement

                public class jdbcCallableStatement
                extends jdbcPreparedStatement
                implements java.sql.CallableStatement

                The interface used to execute SQL stored procedures. The JDBC API provides a stored procedure SQL escape syntax that allows stored procedures to be called in a standard way for all RDBMSs. This escape syntax has one form that includes a result parameter and one that does not. If used, the result parameter must be registered as an OUT parameter. The other parameters can be used for input, output or both. Parameters are referred to sequentially, by number, with the first parameter being 1.

                   {?= call <procedure-name>[<arg1>,<arg2>, ...]}
                   {call <procedure-name>[<arg1>,<arg2>, ...]}
                 

                IN parameter values are set using the set methods inherited from PreparedStatement. The type of all OUT parameters must be registered prior to executing the stored procedure; their values are retrieved after execution via the get methods provided here.

                A CallableStatement can return one ResultSet object or multiple ResultSet objects. Multiple ResultSet objects are handled using operations inherited from Statement.

                For maximum portability, a call's ResultSet objects and update counts should be processed prior to getting the values of output parameters.

                HSQLDB-Specific Information:

                Since 1.7.2, the JDBC CallableStatement interface implementation has been broken out of the jdbcPreparedStatement class into this one.

                With 1.7.2, some of the previously unsupported features of this interface are now supported, such as the parameterName-based setter methods.

                More importantly, jdbcCallableStatement objects are now backed by a true compiled parameteric representation. Hence, there are now significant performance gains to be had by using a CallableStatement object instead of a Statement object, if a short-running CALL statement is to be executed more than a small number of times. Moreover, the recent work lays the foundation for work in a subsequenct release to support CallableStatement OUT and IN OUT style parameters, as well as the generation and retrieval of multiple results in response to the execution of a CallableStatement object.

                For a more in-depth discussion of performance issues regarding 1.7.2 prepared and callable statement objects, please see overview section of jdbcPreparedStatment.


                As with many DBMS, HSQLDB support for stored procedures is not provided in a completely standard fashion.

                Beyond the XOpen/ODBC extended scalar functions, stored procedures are typically supported in ways that vary greatly from one DBMS implementation to the next. So, it is almost guaranteed that the code for a stored procedure written under a specific DBMS product will not work without at least some modification in the context of another vendor's product or even across a single vendor's product lines. Moving stored procedures from one DBMS product line to another almost invariably involves complex porting issues and often may not be possible at all. Be warned.

                At present, HSQLDB stored procedures map directly onto the methods of compiled Java classes found on the classpath of the engine at runtime. This is done in a non-standard but fairly efficient way by issuing a class grant (and possibly method aliases) of the form:

                 GRANT ALL ON CLASS "package.class" TO [<user-name> | PUBLIC]
                 CREATE ALIAS <call-alias> FOR "package.class.method" -- optional
                 
                This has the effect of allowing the specified user(s) to access the set of uniquely named public static methods of the specified class, in either the role of SQL functions or stored procedures. For example:

                 CONNECT <admin-user> PASSWORD <admin-user-password>;
                 GRANT ALL ON CLASS "org.myorg.MyClass" TO PUBLIC;
                 CREATE ALIAS sp_my_method FOR "org.myorg.MyClass.myMethod"
                 CONNECT <any-user> PASSWORD <any-user-password>;
                 SELECT "org.myorg.MyClass.myMethod"(column_1) FROM table_1;
                 SELECT sp_my_method(column_1) FROM table_1;
                 CALL 2 + "org.myorg.MyClass.myMethod"(-5);
                 CALL 2 + sp_my_method(-5);
                 
                Please note the use of the term "uniquely named" above. Including 1.7.2, no support is provided to deterministically resolve overloaded method names, and there can be issues with inherited methods as well; currently, it is strongly recommended that developers creating stored procedure library classes for HSQLDB simply avoid designs such that SQL stored procedure calls attempt to resolve to:

                1. inherited public static methods
                2. overloaded public static methods
                Also, please note that OUT and IN OUT parameters are not yet supported due to some unresolved low level support issues.

                Including 1.7.2, the HSQLDB stored procedure call mechanism is essentially a thin wrap of the HSQLDB SQL function call mechanism, extended to include the more general HSQLDB SQL expression evaluation mechanism. In addition to stored procedure calls that resolve directly to Java method invocations, the extention provides the ability to evaluate simple SQL expressions, possibly containing Java method invocations, outside any INSERT, UPDATE, DELETE or SELECT statement context.

                With HSQLDB, executing a CALL statement that produces an opaque (OTHER) or known scalar object reference has virtually the same effect as:

                 CREATE TABLE DUAL (dummy VARCHAR);
                 INSERT INTO DUAL VALUES(NULL);
                 SELECT <simple-expression> FROM DUAL;
                 
                As a transitional measure, HSQLDB provides the ability to materialize a general result set in response to stored procedure execution. In this case, the stored procedure's Java method descriptor must specify a return type of java.lang.Object for external use (although at any point in the devlopment cycle, other, proprietary return types may accepted internally for engine development purposes). When HSQLDB detects that the runtime class of the resulting Object is elligible, an automatic internal unwrapping is performed to correctly expose the underlying result set to the client, whether local or remote.

                Additionally, HSQLDB automatically detects if java.sql.Connection is the class of the first argument of any underlying Java method(s). If so, then the engine transparently supplies the internal Connection object corresponding to the Session executing the call, adjusting the positions of other arguments to suite the SQL context.

                The features above are not intended to be permanent. Rather, the intention is to offer more general and powerful mechanisms in a future release; it is recommend to use them only as a temporary convenience.

                For instance, one might be well advised to future-proof by writing HSQLDB-specific adapter methods that in turn call the real logic of an underlying generalized JDBC stored procedure library.

                Here is a very simple example of an HSQLDB stored procedure generating a user-defined result set:

                 package mypackage;
                
                 class MyClass {
                
                      public static Object mySp(Connection conn) throws SQLException {
                          return conn.createStatement().executeQuery("select * from my_table");
                      }
                 }
                 
                Here is a refinement demonstrating no more than the bare essence of the idea behind a more portable style:
                 package mypackage;
                
                 import java.sql.ResultSet;
                 import java.sql.SQLException;
                
                 class MyLibraryClass {
                
                      public static ResultSet mySp() throws SQLException {
                          return ctx.getConnection().createStatement().executeQuery("select * from my_table");
                      }
                 }
                
                 //--
                
                 package myadaptorpackage;
                
                 import java.sql.Connection;
                 import java.sql.SQLException;
                
                 class MyAdaptorClass {
                
                      public static Object mySp(Connection conn) throws SQLException {
                          MyLibraryClass.getCtx().setConnection(conn);
                          return MyLibraryClass.mySp();
                      }
                 }
                 
                In a future release, it is intended to provided some new features that will support writing fairly portable JDBC-based stored procedure code:

                • Support for the "jdbc:default:connection" standard database connection url.

                • A well-defined specification of the behaviour of the HSQLDB execution stack under stored procedure calls.

                • A well-defined, pure JDBC specification for generating multiple results from HSQLDB stored procedures for client retrieval.
                (boucherb@users)

                Since:
                1.7.2
                Author:
                boucherb@users
                See Also:
                jdbcConnection.prepareCall(java.lang.String), jdbcResultSet

                Field Summary
                 
                Fields inherited from interface java.sql.Statement
                CLOSE_ALL_RESULTS, CLOSE_CURRENT_RESULT, EXECUTE_FAILED, KEEP_CURRENT_RESULT, NO_GENERATED_KEYS, RETURN_GENERATED_KEYS, SUCCESS_NO_INFO
                 
                Constructor Summary
                jdbcCallableStatement(jdbcConnection c, java.lang.String sql, int type)
                          Constructs a new jdbcCallableStatement with the specified connection and result type.
                 
                Method Summary
                 void close()
                          Does the specialized work required to free this object's resources and that of it's parent classes.
                 java.sql.Array getArray(int parameterIndex)
                           Retrieves the value of the designated JDBC ARRAY parameter as an Array object in the Java programming language.
                 java.sql.Array getArray(java.lang.String parameterName)
                           Retrieves the value of a JDBC ARRAY parameter as an Array object in the Java programming language.
                 java.math.BigDecimal getBigDecimal(int parameterIndex)
                           Retrieves the value of the designated JDBC NUMERIC parameter as a java.math.BigDecimal object with as many digits to the right of the decimal point as the value contains.
                 java.math.BigDecimal getBigDecimal(int parameterIndex, int scale)
                          Deprecated. use getBigDecimal(int parameterIndex) or getBigDecimal(String parameterName)
                 java.math.BigDecimal getBigDecimal(java.lang.String parameterName)
                           Retrieves the value of a JDBC NUMERIC parameter as a java.math.BigDecimal object with as many digits to the right of the decimal point as the value contains.
                 java.sql.Blob getBlob(int parameterIndex)
                           Retrieves the value of the designated JDBC BLOB parameter as a Blob object in the Java programming language.
                 java.sql.Blob getBlob(java.lang.String parameterName)
                           Retrieves the value of a JDBC BLOB parameter as a Blob object in the Java programming language.
                 boolean getBoolean(int parameterIndex)
                           Retrieves the value of the designated JDBC BIT parameter as a boolean in the Java programming language.
                 boolean getBoolean(java.lang.String parameterName)
                           (JDBC4 modified:) Retrieves the value of a JDBC BIT or BOOLEAN parameter as a boolean in the Java programming language.
                 byte getByte(int parameterIndex)
                           Retrieves the value of the designated JDBC TINYINT parameter as a byte in the Java programming language.
                 byte getByte(java.lang.String parameterName)
                           Retrieves the value of a JDBC TINYINT parameter as a byte in the Java programming language.
                 byte[] getBytes(int parameterIndex)
                           Retrieves the value of the designated JDBC BINARY or VARBINARY parameter as an array of byte values in the Java programming language.
                 byte[] getBytes(java.lang.String parameterName)
                           Retrieves the value of a JDBC BINARY or VARBINARY parameter as an array of byte values in the Java programming language.
                 java.sql.Clob getClob(int parameterIndex)
                           Retrieves the value of the designated JDBC CLOB parameter as a Clob object in the Java programming language.
                 java.sql.Clob getClob(java.lang.String parameterName)
                           Retrieves the value of a JDBC CLOB parameter as a Clob object in the Java programming language.
                 java.sql.Date getDate(int parameterIndex)
                           Retrieves the value of the designated JDBC DATE parameter as a java.sql.Date object.
                 java.sql.Date getDate(int parameterIndex, java.util.Calendar cal)
                           Retrieves the value of the designated JDBC DATE parameter as a java.sql.Date object, using the given Calendar object to construct the date.
                 java.sql.Date getDate(java.lang.String parameterName)
                           Retrieves the value of a JDBC DATE parameter as a java.sql.Date object.
                 java.sql.Date getDate(java.lang.String parameterName, java.util.Calendar cal)
                           Retrieves the value of a JDBC DATE parameter as a java.sql.Date object, using the given Calendar object to construct the date.
                 double getDouble(int parameterIndex)
                           Retrieves the value of the designated JDBC DOUBLE parameter as a double in the Java programming language.
                 double getDouble(java.lang.String parameterName)
                           Retrieves the value of a JDBC DOUBLE parameter as a double in the Java programming language.
                 float getFloat(int parameterIndex)
                           Retrieves the value of the designated JDBC FLOAT parameter as a float in the Java programming language.
                 float getFloat(java.lang.String parameterName)
                           Retrieves the value of a JDBC FLOAT parameter as a float in the Java programming language.
                 int getInt(int parameterIndex)
                           Retrieves the value of the designated JDBC INTEGER parameter as an int in the Java programming language.
                 int getInt(java.lang.String parameterName)
                           Retrieves the value of a JDBC INTEGER parameter as an int in the Java programming language.
                 long getLong(int parameterIndex)
                           Retrieves the value of the designated JDBC BIGINT parameter as a long in the Java programming language.
                 long getLong(java.lang.String parameterName)
                           Retrieves the value of a JDBC BIGINT parameter as a long in the Java programming language.
                 java.lang.Object getObject(int parameterIndex)
                           Retrieves the value of the designated parameter as an Object in the Java programming language.
                 java.lang.Object getObject(int parameterIndex, java.util.Map map)
                           Returns an object representing the value of OUT parameter parameterIndex and uses map for the custom mapping of the parameter value.
                 java.lang.Object getObject(java.lang.String parameterName)
                           Retrieves the value of a parameter as an Object in the Java programming language.
                 java.lang.Object getObject(java.lang.String parameterName, java.util.Map map)
                           Returns an object representing the value of OUT parameter parameterName and uses map for the custom mapping of the parameter value.
                 java.sql.Ref getRef(int parameterIndex)
                           Retrieves the value of the designated JDBC REF(<structured-type>) parameter as a Ref object in the Java programming language.
                 java.sql.Ref getRef(java.lang.String parameterName)
                           Retrieves the value of a JDBC REF(<structured-type>) parameter as a Ref object in the Java programming language.
                 short getShort(int parameterIndex)
                           Retrieves the value of the designated JDBC SMALLINT parameter as a short in the Java programming language.
                 short getShort(java.lang.String parameterName)
                           Retrieves the value of a JDBC SMALLINT parameter as a short in the Java programming language.
                 java.lang.String getString(int parameterIndex)
                           Retrieves the value of the designated JDBC CHAR, VARCHAR, or LONGVARCHAR parameter as a String in the Java programming language.
                 java.lang.String getString(java.lang.String parameterName)
                           Retrieves the value of a JDBC CHAR, VARCHAR, or LONGVARCHAR parameter as a String in the Java programming language.
                 java.sql.Time getTime(int parameterIndex)
                           Retrieves the value of the designated JDBC TIME parameter as a java.sql.Time object.
                 java.sql.Time getTime(int parameterIndex, java.util.Calendar cal)
                           Retrieves the value of the designated JDBC TIME parameter as a java.sql.Time object, using the given Calendar object to construct the time.
                 java.sql.Time getTime(java.lang.String parameterName)
                           Retrieves the value of a JDBC TIME parameter as a java.sql.Time object.
                 java.sql.Time getTime(java.lang.String parameterName, java.util.Calendar cal)
                           Retrieves the value of a JDBC TIME parameter as a java.sql.Time object, using the given Calendar object to construct the time.
                 java.sql.Timestamp getTimestamp(int parameterIndex)
                           Retrieves the value of the designated JDBC TIMESTAMP parameter as a java.sql.Timestamp object.
                 java.sql.Timestamp getTimestamp(int parameterIndex, java.util.Calendar cal)
                           Retrieves the value of the designated JDBC TIMESTAMP parameter as a java.sql.Timestamp object, using the given Calendar object to construct the Timestamp object.
                 java.sql.Timestamp getTimestamp(java.lang.String parameterName)
                           Retrieves the value of a JDBC TIMESTAMP parameter as a java.sql.Timestamp object.
                 java.sql.Timestamp getTimestamp(java.lang.String parameterName, java.util.Calendar cal)
                           Retrieves the value of a JDBC TIMESTAMP parameter as a java.sql.Timestamp object, using the given Calendar object to construct the Timestamp object.
                 java.net.URL getURL(int parameterIndex)
                           Retrieves the value of the designated JDBC DATALINK parameter as a java.net.URL object.
                 java.net.URL getURL(java.lang.String parameterName)
                           Retrieves the value of a JDBC DATALINK parameter as a java.net.URL object.
                 void registerOutParameter(int parameterIndex, int sqlType)
                           Registers the OUT parameter in ordinal position parameterIndex to the JDBC type sqlType.
                 void registerOutParameter(int parameterIndex, int sqlType, int scale)
                           Registers the parameter in ordinal position parameterIndex to be of JDBC type sqlType.
                 void registerOutParameter(int parameterIndex, int sqlType, java.lang.String typeName)
                           Registers the designated output parameter.
                 void registerOutParameter(java.lang.String parameterName, int sqlType)
                           Registers the OUT parameter named parameterName to the JDBC type sqlType.
                 void registerOutParameter(java.lang.String parameterName, int sqlType, int scale)
                           Registers the parameter named parameterName to be of JDBC type sqlType.
                 void registerOutParameter(java.lang.String parameterName, int sqlType, java.lang.String typeName)
                           Registers the designated output parameter.
                 void setAsciiStream(java.lang.String parameterName, java.io.InputStream x, int length)
                           Sets the designated parameter to the given input stream, which will have the specified number of bytes.
                 void setBigDecimal(java.lang.String parameterName, java.math.BigDecimal x)
                           Sets the designated parameter to the given java.math.BigDecimal value.
                 void setBinaryStream(java.lang.String parameterName, java.io.InputStream x, int length)
                           Sets the designated parameter to the given input stream, which will have the specified number of bytes.
                 void setBoolean(java.lang.String parameterName, boolean x)
                           Sets the designated parameter to the given Java boolean value.
                 void setByte(java.lang.String parameterName, byte x)
                           Sets the designated parameter to the given Java byte value.
                 void setBytes(java.lang.String parameterName, byte[] x)
                           Sets the designated parameter to the given Java array of bytes.
                 void setCharacterStream(java.lang.String parameterName, java.io.Reader reader, int length)
                           Sets the designated parameter to the given Reader object, which is the given number of characters long.
                 void setDate(java.lang.String parameterName, java.sql.Date x)
                           (JDBC4 clarification:) Sets the designated parameter to the given java.sql.Date value using the default time zone of the virtual machine that is running the application.
                 void setDate(java.lang.String parameterName, java.sql.Date x, java.util.Calendar cal)
                           Sets the designated parameter to the given java.sql.Date value, using the given Calendar object.
                 void setDouble(java.lang.String parameterName, double x)
                           Sets the designated parameter to the given Java double value.
                 void setFloat(java.lang.String parameterName, float x)
                           Sets the designated parameter to the given Java float value.
                 void setInt(java.lang.String parameterName, int x)
                           Sets the designated parameter to the given Java int value.
                 void setLong(java.lang.String parameterName, long x)
                           Sets the designated parameter to the given Java long value.
                 void setNull(java.lang.String parameterName, int sqlType)
                           Sets the designated parameter to SQL NULL.
                 void setNull(java.lang.String parameterName, int sqlType, java.lang.String typeName)
                           Sets the designated parameter to SQL NULL.
                 void setObject(java.lang.String parameterName, java.lang.Object x)
                           Sets the value of the designated parameter with the given object.
                 void setObject(java.lang.String parameterName, java.lang.Object x, int targetSqlType)
                           Sets the value of the designated parameter with the given object.
                 void setObject(java.lang.String parameterName, java.lang.Object x, int targetSqlType, int scale)
                           Sets the value of the designated parameter with the given object.
                 void setShort(java.lang.String parameterName, short x)
                           Sets the designated parameter to the given Java short value.
                 void setString(java.lang.String parameterName, java.lang.String x)
                           Sets the designated parameter to the given Java String value.
                 void setTime(java.lang.String parameterName, java.sql.Time x)
                           Sets the designated parameter to the given java.sql.Time value.
                 void setTime(java.lang.String parameterName, java.sql.Time x, java.util.Calendar cal)
                           Sets the designated parameter to the given java.sql.Time value, using the given Calendar object.
                 void setTimestamp(java.lang.String parameterName, java.sql.Timestamp x)
                           Sets the designated parameter to the given java.sql.Timestamp value.
                 void setTimestamp(java.lang.String parameterName, java.sql.Timestamp x, java.util.Calendar cal)
                           Sets the designated parameter to the given java.sql.Timestamp value, using the given Calendar object.
                 void setURL(java.lang.String parameterName, java.net.URL val)
                           Sets the designated parameter to the given java.net.URL object.
                 boolean wasNull()
                           Retrieves whether the last OUT parameter read had the value of SQL NULL.
                 
                Methods inherited from class org.hsqldb.jdbc.jdbcPreparedStatement
                addBatch, addBatch, clearParameters, execute, execute, executeBatch, executeQuery, executeQuery, executeUpdate, executeUpdate, getMetaData, getParameterMetaData, setArray, setAsciiStream, setBigDecimal, setBinaryStream, setBlob, setBoolean, setByte, setBytes, setCharacterStream, setClob, setDate, setDate, setDouble, setEscapeProcessing, setFloat, setInt, setLong, setNull, setNull, setObject, setObject, setObject, setRef, setShort, setString, setTime, setTime, setTimestamp, setTimestamp, setUnicodeStream, setURL, toString
                 
                Methods inherited from class org.hsqldb.jdbc.jdbcStatement
                cancel, clearBatch, clearWarnings, execute, execute, execute, executeUpdate, executeUpdate, executeUpdate, getConnection, getFetchDirection, getFetchSize, getGeneratedKeys, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, isClosed, setCursorName, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setQueryTimeout
                 
                Methods inherited from class java.lang.Object
                equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
                 
                Methods inherited from interface java.sql.PreparedStatement
                addBatch, clearParameters, execute, executeQuery, executeUpdate, getMetaData, getParameterMetaData, setArray, setAsciiStream, setBigDecimal, setBinaryStream, setBlob, setBoolean, setByte, setBytes, setCharacterStream, setClob, setDate, setDate, setDouble, setFloat, setInt, setLong, setNull, setNull, setObject, setObject, setObject, setRef, setShort, setString, setTime, setTime, setTimestamp, setTimestamp, setUnicodeStream, setURL
                 
                Methods inherited from interface java.sql.Statement
                addBatch, cancel, clearBatch, clearWarnings, execute, execute, execute, execute, executeBatch, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getConnection, getFetchDirection, getFetchSize, getGeneratedKeys, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setQueryTimeout
                 

                Constructor Detail

                jdbcCallableStatement

                public jdbcCallableStatement(jdbcConnection c,
                                             java.lang.String sql,
                                             int type)
                                      throws org.hsqldb.HsqlException,
                                             java.sql.SQLException
                Constructs a new jdbcCallableStatement with the specified connection and result type.

                Parameters:
                c - the connection on which this statement will execute
                sql - the SQL statement this object represents
                type - the type of result this statement will produce
                Throws:
                org.hsqldb.HsqlException - if the statement is not accepted by the database
                java.sql.SQLException - if preprocessing by driver fails
                Method Detail

                close

                public void close()
                           throws java.sql.SQLException
                Does the specialized work required to free this object's resources and that of it's parent classes.

                Specified by:
                close in interface java.sql.Statement
                Overrides:
                close in class jdbcPreparedStatement
                Throws:
                java.sql.SQLException - if a database access error occurs

                registerOutParameter

                public void registerOutParameter(int parameterIndex,
                                                 int sqlType)
                                          throws java.sql.SQLException
                Registers the OUT parameter in ordinal position parameterIndex to the JDBC type sqlType. All OUT parameters must be registered before a stored procedure is executed.

                The JDBC type specified by sqlType for an OUT parameter determines the Java type that must be used in the get method to read the value of that parameter.

                If the JDBC type expected to be returned to this output parameter is specific to this particular database, sqlType should be java.sql.Types.OTHER. The method getObject(int) retrieves the value.

                HSQLDB-Specific Information:

                HSQLDB 1.7.2 does not support this feature.

                Calling this method always throws an SQLException.

                Specified by:
                registerOutParameter in interface java.sql.CallableStatement
                Parameters:
                parameterIndex - the first parameter is 1, the second is 2, and so on
                sqlType - the JDBC type code defined by java.sql.Types. If the parameter is of JDBC type NUMERIC or DECIMAL, the version of registerOutParameter that accepts a scale value should be used.
                Throws:
                java.sql.SQLException - if a database access error occurs
                See Also:
                Types

                registerOutParameter

                public void registerOutParameter(int parameterIndex,
                                                 int sqlType,
                                                 int scale)
                                          throws java.sql.SQLException
                Registers the parameter in ordinal position parameterIndex to be of JDBC type sqlType. This method must be called before a stored procedure is executed.

                The JDBC type specified by sqlType for an OUT parameter determines the Java type that must be used in the get method to read the value of that parameter.

                This version of registerOutParameter should be used when the parameter is of JDBC type NUMERIC or DECIMAL.

                HSQLDB-Specific Information:

                HSQLDB 1.7.2 does not support this feature.

                Calling this method always throws an SQLException.

                Specified by:
                registerOutParameter in interface java.sql.CallableStatement
                Parameters:
                parameterIndex - the first parameter is 1, the second is 2, and so on
                sqlType - the SQL type code defined by java.sql.Types.
                scale - the desired number of digits to the right of the decimal point. It must be greater than or equal to zero.
                Throws:
                java.sql.SQLException - if a database access error occurs
                See Also:
                Types

                wasNull

                public boolean wasNull()
                                throws java.sql.SQLException
                Retrieves whether the last OUT parameter read had the value of SQL NULL. Note that this method should be called only after calling a getter method; otherwise, there is no value to use in determining whether it is null or not.

                HSQLDB-Specific Information:

                HSQLDB 1.7.2 does not support this feature.

                Calling this method always throws an SQLException.

                Specified by:
                wasNull in interface java.sql.CallableStatement
                Returns:
                true if the last parameter read was SQL NULL; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                getString

                public java.lang.String getString(int parameterIndex)
                                           throws java.sql.SQLException
                Retrieves the value of the designated JDBC CHAR, VARCHAR, or LONGVARCHAR parameter as a String in the Java programming language.

                For the fixed-length type JDBC CHAR, the String object returned has exactly the same value the (JDBC4 clarification:) SQL CHAR value had in the database, including any padding added by the database.

                HSQLDB-Specific Information:

                HSQLDB 1.7.2 does not support this feature.

                Calling this method always throws an SQLException.

                Specified by:
                getString in interface java.sql.CallableStatement
                Parameters:
                parameterIndex - the first parameter is 1, the second is 2, and so on
                Returns:
                the parameter value. If the value is SQL NULL, the result is null.
                Throws:
                java.sql.SQLException - if a database access error occurs
                See Also:
                setString(java.lang.String, java.lang.String)

                getBoolean

                public boolean getBoolean(int parameterIndex)
                                   throws java.sql.SQLException
                Retrieves the value of the designated JDBC BIT parameter as a boolean in the Java programming language.

                HSQLDB-Specific Information:

                HSQLDB 1.7.2 does not support this feature.

                Calling this method always throws an SQLException.

                Specified by:
                getBoolean in interface java.sql.CallableStatement
                Parameters:
                parameterIndex - the first parameter is 1, the second is 2, and so on
                Returns:
                the parameter value. If the value is SQL NULL, the result is false.
                Throws:
                java.sql.SQLException - if a database access error occurs
                See Also:
                setBoolean(java.lang.String, boolean)

                getByte

                public byte getByte(int parameterIndex)
                             throws java.sql.SQLException
                Retrieves the value of the designated JDBC TINYINT parameter as a byte in the Java programming language.

                HSQLDB-Specific Information:

                HSQLDB 1.7.2 does not support this feature.

                Calling this method always throws an SQLException.

                Specified by:
                getByte in interface java.sql.CallableStatement
                Parameters:
                parameterIndex - the first parameter is 1, the second is 2, and so on
                Returns:
                the parameter value. If the value is SQL NULL, the result is 0.
                Throws:
                java.sql.SQLException - if a database access error occurs
                See Also:
                setByte(java.lang.String, byte)

                getShort

                public short getShort(int parameterIndex)
                               throws java.sql.SQLException
                Retrieves the value of the designated JDBC SMALLINT parameter as a short in the Java programming language.

                HSQLDB-Specific Information:

                HSQLDB 1.7.2 does not support this feature.

                Calling this method always throws an SQLException.

                Specified by:
                getShort in interface java.sql.CallableStatement
                Parameters:
                parameterIndex - the first parameter is 1, the second is 2, and so on
                Returns:
                the parameter value. If the value is SQL NULL, the result is 0.
                Throws:
                java.sql.SQLException - if a database access error occurs
                See Also:
                setShort(java.lang.String, short)

                getInt

                public int getInt(int parameterIndex)
                           throws java.sql.SQLException
                Retrieves the value of the designated JDBC INTEGER parameter as an int in the Java programming language.

                HSQLDB-Specific Information:

                HSQLDB 1.7.2 does not support this feature.

                Calling this method always throws an SQLException.

                Specified by:
                getInt in interface java.sql.CallableStatement
                Parameters:
                parameterIndex - the first parameter is 1, the second is 2, and so on
                Returns:
                the parameter value. If the value is SQL NULL, the result is 0.
                Throws:
                java.sql.SQLException - if a database access error occurs
                See Also:
                setInt(java.lang.String, int)

                getLong

                public long getLong(int parameterIndex)
                             throws java.sql.SQLException
                Retrieves the value of the designated JDBC BIGINT parameter as a long in the Java programming language.

                HSQLDB-Specific Information:

                HSQLDB 1.7.2 does not support this feature.

                Calling this method always throws an SQLException.

                Specified by:
                getLong in interface java.sql.CallableStatement
                Parameters:
                parameterIndex - the first parameter is 1, the second is 2, and so on
                Returns:
                the parameter value. If the value is SQL NULL, the result is 0.
                Throws:
                java.sql.SQLException - if a database access error occurs
                See Also:
                setLong(java.lang.String, long)

                getFloat

                public float getFloat(int parameterIndex)
                               throws java.sql.SQLException
                Retrieves the value of the designated JDBC FLOAT parameter as a float in the Java programming language.

                HSQLDB-Specific Information:

                HSQLDB 1.7.2 does not support this feature.

                Calling this method always throws an SQLException.

                Specified by:
                getFloat in interface java.sql.CallableStatement
                Parameters:
                parameterIndex - the first parameter is 1, the second is 2, and so on
                Returns:
                the parameter value. If the value is SQL NULL, the result is 0.
                Throws:
                java.sql.SQLException - if a database access error occurs
                See Also:
                setFloat(java.lang.String, float)

                getDouble

                public double getDouble(int parameterIndex)
                                 throws java.sql.SQLException
                Retrieves the value of the designated JDBC DOUBLE parameter as a double in the Java programming language.

                HSQLDB-Specific Information:

                HSQLDB 1.7.2 does not support this feature.

                Calling this method always throws an SQLException.

                Specified by:
                getDouble in interface java.sql.CallableStatement
                Parameters:
                parameterIndex - the first parameter is 1, the second is 2, and so on
                Returns:
                the parameter value. If the value is SQL NULL, the result is 0.
                Throws:
                java.sql.SQLException - if a database access error occurs
                See Also:
                setDouble(java.lang.String, double)

                getBigDecimal

                public java.math.BigDecimal getBigDecimal(int parameterIndex,
                                                          int scale)
                                                   throws java.sql.SQLException
                Deprecated. use getBigDecimal(int parameterIndex) or getBigDecimal(String parameterName)

                Retrieves the value of the designated JDBC NUMERIC parameter as a java.math.BigDecimal object with scale digits to the right of the decimal point.

                HSQLDB-Specific Information:

                HSQLDB 1.7.2 does not support this feature.

                Calling this method always throws an SQLException.

                Specified by:
                getBigDecimal in interface java.sql.CallableStatement
                Parameters:
                parameterIndex - the first parameter is 1, the second is 2, and so on
                scale - the number of digits to the right of the decimal point
                Returns:
                the parameter value. If the value is SQL NULL, the result is null.
                Throws:
                java.sql.SQLException - if a database access error occurs
                See Also:
                setBigDecimal(java.lang.String, java.math.BigDecimal)

                getBytes

                public byte[] getBytes(int parameterIndex)
                                throws java.sql.SQLException
                Retrieves the value of the designated JDBC BINARY or VARBINARY parameter as an array of byte values in the Java programming language.

                HSQLDB-Specific Information:

                HSQLDB 1.7.2 does not support this feature.

                Calling this method always throws an SQLException.

                Specified by:
                getBytes in interface java.sql.CallableStatement
                Parameters:
                parameterIndex - the first parameter is 1, the second is 2, and so on
                Returns:
                the parameter value. If the value is SQL NULL, the result is null.
                Throws:
                java.sql.SQLException - if a database access error occurs
                See Also:
                setBytes(java.lang.String, byte[])

                getDate

                public java.sql.Date getDate(int parameterIndex)
                                      throws java.sql.SQLException
                Retrieves the value of the designated JDBC DATE parameter as a java.sql.Date object.

                HSQLDB-Specific Information:

                HSQLDB 1.7.2 does not support this feature.

                Calling this method always throws an SQLException.

                Specified by:
                getDate in interface java.sql.CallableStatement
                Parameters:
                parameterIndex - the first parameter is 1, the second is 2, and so on
                Returns:
                the parameter value. If the value is SQL NULL, the result is null.
                Throws:
                java.sql.SQLException - if a database access error occurs
                See Also:
                setDate(java.lang.String, java.sql.Date)

                getTime

                public java.sql.Time getTime(int parameterIndex)
                                      throws java.sql.SQLException
                Retrieves the value of the designated JDBC TIME parameter as a java.sql.Time object.

                HSQLDB-Specific Information:

                HSQLDB 1.7.2 does not support this feature.

                Calling this method always throws an SQLException.

                Specified by:
                getTime in interface java.sql.CallableStatement
                Parameters:
                parameterIndex - the first parameter is 1, the second is 2, and so on
                Returns:
                the parameter value. If the value is SQL NULL, the result is null.
                Throws:
                java.sql.SQLException - if a database access error occurs
                See Also:
                setTime(java.lang.String, java.sql.Time)

                getTimestamp

                public java.sql.Timestamp getTimestamp(int parameterIndex)
                                                throws java.sql.SQLException
                Retrieves the value of the designated JDBC TIMESTAMP parameter as a java.sql.Timestamp object.

                HSQLDB-Specific Information:

                HSQLDB 1.7.2 does not support this feature.

                Calling this method always throws an SQLException.

                Specified by:
                getTimestamp in interface java.sql.CallableStatement
                Parameters:
                parameterIndex - the first parameter is 1, the second is 2, and so on
                Returns:
                the parameter value. If the value is SQL NULL, the result is null.
                Throws:
                java.sql.SQLException - if a database access error occurs
                See Also:
                setTimestamp(java.lang.String, java.sql.Timestamp)

                getObject

                public java.lang.Object getObject(int parameterIndex)
                                           throws java.sql.SQLException
                Retrieves the value of the designated parameter as an Object in the Java programming language. If the value is an SQL NULL, the driver returns a Java null.

                This method returns a Java object whose type corresponds to the JDBC type that was registered for this parameter using the method registerOutParameter. By registering the target JDBC type as java.sql.Types.OTHER, this method can be used to read database-specific abstract data types.

                HSQLDB-Specific Information:

                HSQLDB 1.7.2 does not support this feature.

                Calling this method always throws an SQLException.

                Specified by:
                getObject in interface java.sql.CallableStatement
                Parameters:
                parameterIndex - the first parameter is 1, the second is 2, and so on
                Returns:
                A java.lang.Object holding the OUT parameter value
                Throws:
                java.sql.SQLException - if a database access error occurs
                See Also:
                Types, setObject(java.lang.String, java.lang.Object, int, int)

                getBigDecimal

                public java.math.BigDecimal getBigDecimal(int parameterIndex)
                                                   throws java.sql.SQLException
                Retrieves the value of the designated JDBC NUMERIC parameter as a java.math.BigDecimal object with as many digits to the right of the decimal point as the value contains.

                HSQLDB-Specific Information:

                HSQLDB 1.7.2 does not support this feature.

                Calling this method always throws an SQLException.

                Specified by:
                getBigDecimal in interface java.sql.CallableStatement
                Parameters:
                parameterIndex - the first parameter is 1, the second is 2, and so on
                Returns:
                the parameter value in full precision. If the value is SQL NULL, the result is null.
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcPreparedStatement)
                See Also:
                setBigDecimal(java.lang.String, java.math.BigDecimal)

                getObject

                public java.lang.Object getObject(int parameterIndex,
                                                  java.util.Map map)
                                           throws java.sql.SQLException
                Returns an object representing the value of OUT parameter parameterIndex and uses map for the custom mapping of the parameter value.

                This method returns a Java object whose type corresponds to the JDBC type that was registered for this parameter using the method registerOutParameter. By registering the target JDBC type as java.sql.Types.OTHER, this method can be used to read database-specific abstract data types.

                HSQLDB-Specific Information:

                HSQLDB 1.7.2 does not support this feature.

                Calling this method always throws an SQLException.

                Specified by:
                getObject in interface java.sql.CallableStatement
                Parameters:
                parameterIndex - the first parameter is 1, the second is 2, and so on
                map - the mapping from SQL type names to Java classes
                Returns:
                a java.lang.Object holding the OUT parameter value
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcPreparedStatement)
                See Also:
                setObject(java.lang.String, java.lang.Object, int, int)

                getRef

                public java.sql.Ref getRef(int parameterIndex)
                                    throws java.sql.SQLException
                Retrieves the value of the designated JDBC REF(<structured-type>) parameter as a Ref object in the Java programming language.

                HSQLDB-Specific Information:

                HSQLDB 1.7.2 does not support this feature.

                Calling this method always throws an SQLException.

                Specified by:
                getRef in interface java.sql.CallableStatement
                Parameters:
                parameterIndex - the first parameter is 1, the second is 2, and so on
                Returns:
                the parameter value as a Ref object in the Java programming language. If the value was SQL NULL, the value null is returned.
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcPreparedStatement)

                getBlob

                public java.sql.Blob getBlob(int parameterIndex)
                                      throws java.sql.SQLException
                Retrieves the value of the designated JDBC BLOB parameter as a Blob object in the Java programming language.

                HSQLDB-Specific Information:

                HSQLDB 1.7.2 does not support this feature.

                Calling this method always throws an SQLException.

                Specified by:
                getBlob in interface java.sql.CallableStatement
                Parameters:
                parameterIndex - the first parameter is 1, the second is 2, and so on
                Returns:
                the parameter value as a Blob object in the Java programming language. If the value was SQL NULL, the value null is returned.
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcPreparedStatement)

                getClob

                public java.sql.Clob getClob(int parameterIndex)
                                      throws java.sql.SQLException
                Retrieves the value of the designated JDBC CLOB parameter as a Clob object in the Java programming language.

                HSQLDB-Specific Information:

                HSQLDB 1.7.2 does not support this feature.

                Calling this method always throws an SQLException.

                Specified by:
                getClob in interface java.sql.CallableStatement
                Parameters:
                parameterIndex - the first parameter is 1, the second is 2, and so on
                Returns:
                the parameter value as a Clob object in the Java programming language. If the value was SQL NULL, the value null is returned.
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcPreparedStatement)

                getArray

                public java.sql.Array getArray(int parameterIndex)
                                        throws java.sql.SQLException
                Retrieves the value of the designated JDBC ARRAY parameter as an Array object in the Java programming language.

                HSQLDB-Specific Information:

                HSQLDB 1.7.2 does not support this feature.

                Calling this method always throws an SQLException.

                Specified by:
                getArray in interface java.sql.CallableStatement
                Parameters:
                parameterIndex - the first parameter is 1, the second is 2, and so on
                Returns:
                the parameter value as an Array object in the Java programming language. If the value was SQL NULL, the value null is returned.
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcPreparedStatement)

                getDate

                public java.sql.Date getDate(int parameterIndex,
                                             java.util.Calendar cal)
                                      throws java.sql.SQLException
                Retrieves the value of the designated JDBC DATE parameter as a java.sql.Date object, using the given Calendar object to construct the date. With a Calendar object, the driver can calculate the date taking into account a custom timezone and locale. If no Calendar object is specified, the driver uses the default timezone and locale.

                HSQLDB-Specific Information:

                HSQLDB 1.7.2 does not support this feature.

                Calling this method always throws an SQLException.

                Specified by:
                getDate in interface java.sql.CallableStatement
                Parameters:
                parameterIndex - the first parameter is 1, the second is 2, and so on
                cal - the Calendar object the driver will use to construct the date
                Returns:
                the parameter value. If the value is SQL NULL, the result is null.
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcPreparedStatement)
                See Also:
                setDate(java.lang.String, java.sql.Date)

                getTime

                public java.sql.Time getTime(int parameterIndex,
                                             java.util.Calendar cal)
                                      throws java.sql.SQLException
                Retrieves the value of the designated JDBC TIME parameter as a java.sql.Time object, using the given Calendar object to construct the time. With a Calendar object, the driver can calculate the time taking into account a custom timezone and locale. If no Calendar object is specified, the driver uses the default timezone and locale.

                HSQLDB-Specific Information:

                HSQLDB 1.7.2 does not support this feature.

                Calling this method always throws an SQLException.

                Specified by:
                getTime in interface java.sql.CallableStatement
                Parameters:
                parameterIndex - the first parameter is 1, the second is 2, and so on
                cal - the Calendar object the driver will use to construct the time
                Returns:
                the parameter value; if the value is SQL NULL, the result is null.
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcPreparedStatement)
                See Also:
                setTime(java.lang.String, java.sql.Time)

                getTimestamp

                public java.sql.Timestamp getTimestamp(int parameterIndex,
                                                       java.util.Calendar cal)
                                                throws java.sql.SQLException
                Retrieves the value of the designated JDBC TIMESTAMP parameter as a java.sql.Timestamp object, using the given Calendar object to construct the Timestamp object. With a Calendar object, the driver can calculate the timestamp taking into account a custom timezone and locale. If no Calendar object is specified, the driver uses the default timezone and locale.

                HSQLDB-Specific Information:

                HSQLDB 1.7.2 does not support this feature.

                Calling this method always throws an SQLException.

                Specified by:
                getTimestamp in interface java.sql.CallableStatement
                Parameters:
                parameterIndex - the first parameter is 1, the second is 2, and so on
                cal - the Calendar object the driver will use to construct the timestamp
                Returns:
                the parameter value. If the value is SQL NULL, the result is null.
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcPreparedStatement)
                See Also:
                setTimestamp(java.lang.String, java.sql.Timestamp)

                registerOutParameter

                public void registerOutParameter(int parameterIndex,
                                                 int sqlType,
                                                 java.lang.String typeName)
                                          throws java.sql.SQLException
                Registers the designated output parameter. This version of the method registerOutParameter should be used for a user-defined or REF output parameter. Examples of user-defined types include: STRUCT, DISTINCT, JAVA_OBJECT, and named array types.

                (JDBC4 claraification:) All OUT parameters must be registered before a stored procedure is executed.

                For a user-defined parameter, the fully-qualified SQL type name of the parameter should also be given, while a REF parameter requires that the fully-qualified type name of the referenced type be given. A JDBC driver that does not need the type code and type name information may ignore it. To be portable, however, applications should always provide these values for user-defined and REF parameters. Although it is intended for user-defined and REF parameters, this method may be used to register a parameter of any JDBC type. If the parameter does not have a user-defined or REF type, the typeName parameter is ignored.

                Note: When reading the value of an out parameter, you must use the getter method whose Java type corresponds to the parameter's registered SQL type.

                HSQLDB-Specific Information:

                HSQLDB 1.7.2 does not support this feature.

                Calling this method always throws an SQLException.

                Specified by:
                registerOutParameter in interface java.sql.CallableStatement
                Parameters:
                parameterIndex - the first parameter is 1, the second is 2,...
                sqlType - a value from Types
                typeName - the fully-qualified name of an SQL structured type
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcPreparedStatement)
                See Also:
                Types

                registerOutParameter

                public void registerOutParameter(java.lang.String parameterName,
                                                 int sqlType)
                                          throws java.sql.SQLException
                Registers the OUT parameter named parameterName to the JDBC type sqlType. All OUT parameters must be registered before a stored procedure is executed.

                The JDBC type specified by sqlType for an OUT parameter determines the Java type that must be used in the get method to read the value of that parameter.

                If the JDBC type expected to be returned to this output parameter is specific to this particular database, sqlType should be java.sql.Types.OTHER. The method getObject(int) retrieves the value.

                HSQLDB-Specific Information:

                HSQLDB 1.7.2 does not support this feature.

                Calling this method always throws an SQLException.

                Specified by:
                registerOutParameter in interface java.sql.CallableStatement
                Parameters:
                parameterName - the name of the parameter
                sqlType - the JDBC type code defined by java.sql.Types. If the parameter is of JDBC type NUMERIC or DECIMAL, the version of registerOutParameter that accepts a scale value should be used.
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQL 1.7.0
                See Also:
                Types

                registerOutParameter

                public void registerOutParameter(java.lang.String parameterName,
                                                 int sqlType,
                                                 int scale)
                                          throws java.sql.SQLException
                Registers the parameter named parameterName to be of JDBC type sqlType. (JDBC4 clarification:) All OUT parameters must be registered before a stored procedure is executed.

                The JDBC type specified by sqlType for an OUT parameter determines the Java type that must be used in the get method to read the value of that parameter.

                This version of registerOutParameter should be used when the parameter is of JDBC type NUMERIC or DECIMAL.

                HSQLDB-Specific Information:

                HSQLDB 1.7.2 does not support this feature.

                Calling this method always throws an SQLException.

                Specified by:
                registerOutParameter in interface java.sql.CallableStatement
                Parameters:
                parameterName - the name of the parameter
                sqlType - SQL type code defined by java.sql.Types.
                scale - the desired number of digits to the right of the decimal point. It must be greater than or equal to zero.
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7.0
                See Also:
                Types

                registerOutParameter

                public void registerOutParameter(java.lang.String parameterName,
                                                 int sqlType,
                                                 java.lang.String typeName)
                                          throws java.sql.SQLException
                Registers the designated output parameter. This version of the method registerOutParameter should be used for a user-named or REF output parameter. Examples of user-named types include: STRUCT, DISTINCT, JAVA_OBJECT, and named array types.

                (JDBC4 clarification:) All OUT parameters must be registered before a stored procedure is executed.

                For a user-named parameter the fully-qualified SQL type name of the parameter should also be given, while a REF parameter requires that the fully-qualified type name of the referenced type be given. A JDBC driver that does not need the type code and type name information may ignore it. To be portable, however, applications should always provide these values for user-named and REF parameters. Although it is intended for user-named and REF parameters, this method may be used to register a parameter of any JDBC type. If the parameter does not have a user-named or REF type, the typeName parameter is ignored.

                Note: When reading the value of an out parameter, you must use the getXXX method whose Java type XXX corresponds to the parameter's registered SQL type.

                HSQLDB-Specific Information:

                HSQLDB 1.7.2 does not support this feature.

                Calling this method always throws an SQLException.

                Specified by:
                registerOutParameter in interface java.sql.CallableStatement
                Parameters:
                parameterName - the name of the parameter
                sqlType - a value from Types
                typeName - the fully-qualified name of an SQL structured type
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQL 1.7.0
                See Also:
                Types

                getURL

                public java.net.URL getURL(int parameterIndex)
                                    throws java.sql.SQLException
                Retrieves the value of the designated JDBC DATALINK parameter as a java.net.URL object.

                HSQLDB-Specific Information:

                HSQLDB 1.7.2 does not support this feature.

                Calling this method always throws an SQLException.

                Specified by:
                getURL in interface java.sql.CallableStatement
                Parameters:
                parameterIndex - the first parameter is 1, the second is 2,...
                Returns:
                a java.net.URL object that represents the JDBC DATALINK value used as the designated parameter
                Throws:
                java.sql.SQLException - if a database access error occurs, or if the URL being returned is not a valid URL on the Java platform
                Since:
                JDK 1.4, HSQLDB 1.7.0
                See Also:
                setURL(java.lang.String, java.net.URL)

                setURL

                public void setURL(java.lang.String parameterName,
                                   java.net.URL val)
                            throws java.sql.SQLException
                Sets the designated parameter to the given java.net.URL object. The driver converts this to an SQL DATALINK value when it sends it to the database.

                HSQLDB-Specific Information:

                HSQLDB 1.7.2 does not support this feature.

                Calling this method always throws an SQLException.

                Specified by:
                setURL in interface java.sql.CallableStatement
                Parameters:
                parameterName - the name of the parameter
                val - the parameter value
                Throws:
                java.sql.SQLException - if a database access error occurs, or if a URL is malformed
                Since:
                JDK 1.4, HSQLDB 1.7.0
                See Also:
                getURL(int)

                setNull

                public void setNull(java.lang.String parameterName,
                                    int sqlType)
                             throws java.sql.SQLException
                Sets the designated parameter to SQL NULL.

                Note: You must specify the parameter's SQL type.

                HSQLDB-Specific Information:

                Starting with 1.7.2, HSLQDB supports this.

                Specified by:
                setNull in interface java.sql.CallableStatement
                Parameters:
                parameterName - the name of the parameter
                sqlType - the SQL type code defined in java.sql.Types
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7.0

                setBoolean

                public void setBoolean(java.lang.String parameterName,
                                       boolean x)
                                throws java.sql.SQLException
                Sets the designated parameter to the given Java boolean value. (JDBC4 clarification:) The driver converts this to an SQL BIT or BOOLEAN value when it sends it to the database.

                HSQLDB-Specific Information:

                Starting with 1.7.2, HSLQDB supports this.

                Specified by:
                setBoolean in interface java.sql.CallableStatement
                Parameters:
                parameterName - the name of the parameter
                x - the parameter value
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7.0
                See Also:
                getBoolean(int)

                setByte

                public void setByte(java.lang.String parameterName,
                                    byte x)
                             throws java.sql.SQLException
                Sets the designated parameter to the given Java byte value. The driver converts this to an SQL TINYINT value when it sends it to the database.

                HSQLDB-Specific Information:

                Starting with 1.7.2, HSLQDB supports this.

                Specified by:
                setByte in interface java.sql.CallableStatement
                Parameters:
                parameterName - the name of the parameter
                x - the parameter value
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7.0
                See Also:
                getByte(int)

                setShort

                public void setShort(java.lang.String parameterName,
                                     short x)
                              throws java.sql.SQLException
                Sets the designated parameter to the given Java short value. The driver converts this to an SQL SMALLINT value when it sends it to the database.

                HSQLDB-Specific Information:

                Starting with 1.7.2, HSLQDB supports this.

                Specified by:
                setShort in interface java.sql.CallableStatement
                Parameters:
                parameterName - the name of the parameter
                x - the parameter value
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7.0
                See Also:
                getShort(int)

                setInt

                public void setInt(java.lang.String parameterName,
                                   int x)
                            throws java.sql.SQLException
                Sets the designated parameter to the given Java int value. The driver converts this to an SQL INTEGER value when it sends it to the database.

                HSQLDB-Specific Information:

                Starting with 1.7.2, HSLQDB supports this.

                Specified by:
                setInt in interface java.sql.CallableStatement
                Parameters:
                parameterName - the name of the parameter
                x - the parameter value
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7.0
                See Also:
                getInt(int)

                setLong

                public void setLong(java.lang.String parameterName,
                                    long x)
                             throws java.sql.SQLException
                Sets the designated parameter to the given Java long value. The driver converts this to an SQL BIGINT value when it sends it to the database.

                HSQLDB-Specific Information:

                Starting with 1.7.2, HSLQDB supports this.

                Specified by:
                setLong in interface java.sql.CallableStatement
                Parameters:
                parameterName - the name of the parameter
                x - the parameter value
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7.0
                See Also:
                getLong(int)

                setFloat

                public void setFloat(java.lang.String parameterName,
                                     float x)
                              throws java.sql.SQLException
                Sets the designated parameter to the given Java float value. The driver converts this to an SQL FLOAT value when it sends it to the database.

                HSQLDB-Specific Information:

                Starting with 1.7.2, HSLQDB supports this.

                Specified by:
                setFloat in interface java.sql.CallableStatement
                Parameters:
                parameterName - the name of the parameter
                x - the parameter value
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7.0
                See Also:
                getFloat(int)

                setDouble

                public void setDouble(java.lang.String parameterName,
                                      double x)
                               throws java.sql.SQLException
                Sets the designated parameter to the given Java double value. The driver converts this to an SQL DOUBLE value when it sends it to the database.

                HSQLDB-Specific Information:

                Starting with 1.7.2, HSLQDB supports this.

                Specified by:
                setDouble in interface java.sql.CallableStatement
                Parameters:
                parameterName - the name of the parameter
                x - the parameter value
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7.0
                See Also:
                getDouble(int)

                setBigDecimal

                public void setBigDecimal(java.lang.String parameterName,
                                          java.math.BigDecimal x)
                                   throws java.sql.SQLException
                Sets the designated parameter to the given java.math.BigDecimal value. The driver converts this to an SQL NUMERIC value when it sends it to the database.

                HSQLDB-Specific Information:

                Starting with 1.7.2, HSLQDB supports this.

                Specified by:
                setBigDecimal in interface java.sql.CallableStatement
                Parameters:
                parameterName - the name of the parameter
                x - the parameter value
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7.0
                See Also:
                getBigDecimal(int, int)

                setString

                public void setString(java.lang.String parameterName,
                                      java.lang.String x)
                               throws java.sql.SQLException
                Sets the designated parameter to the given Java String value. The driver converts this to an SQL VARCHAR or LONGVARCHAR value (depending on the argument's size relative to the driver's limits on VARCHAR values) when it sends it to the database.

                HSQLDB-Specific Information:

                Starting with 1.7.2, HSLQDB supports this.

                Specified by:
                setString in interface java.sql.CallableStatement
                Parameters:
                parameterName - the name of the parameter
                x - the parameter value
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7.0
                See Also:
                getString(int)

                setBytes

                public void setBytes(java.lang.String parameterName,
                                     byte[] x)
                              throws java.sql.SQLException
                Sets the designated parameter to the given Java array of bytes. The driver converts this to an SQL VARBINARY or LONGVARBINARY (depending on the argument's size relative to the driver's limits on VARBINARY values) when it sends it to the database.

                HSQLDB-Specific Information:

                Starting with 1.7.2, HSLQDB supports this.

                Specified by:
                setBytes in interface java.sql.CallableStatement
                Parameters:
                parameterName - the name of the parameter
                x - the parameter value
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7.0
                See Also:
                getBytes(int)

                setDate

                public void setDate(java.lang.String parameterName,
                                    java.sql.Date x)
                             throws java.sql.SQLException
                (JDBC4 clarification:) Sets the designated parameter to the given java.sql.Date value using the default time zone of the virtual machine that is running the application. The driver converts this to an SQL DATE value when it sends it to the database.

                HSQLDB-Specific Information:

                Starting with 1.7.2, HSLQDB supports this.

                Specified by:
                setDate in interface java.sql.CallableStatement
                Parameters:
                parameterName - the name of the parameter
                x - the parameter value
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7.0
                See Also:
                getDate(int)

                setTime

                public void setTime(java.lang.String parameterName,
                                    java.sql.Time x)
                             throws java.sql.SQLException
                Sets the designated parameter to the given java.sql.Time value. The driver converts this to an SQL TIME value when it sends it to the database.

                HSQLDB-Specific Information:

                Starting with 1.7.2, HSLQDB supports this.

                Specified by:
                setTime in interface java.sql.CallableStatement
                Parameters:
                parameterName - the name of the parameter
                x - the parameter value
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7.0
                See Also:
                getTime(int)

                setTimestamp

                public void setTimestamp(java.lang.String parameterName,
                                         java.sql.Timestamp x)
                                  throws java.sql.SQLException
                Sets the designated parameter to the given java.sql.Timestamp value. The driver converts this to an SQL TIMESTAMP value when it sends it to the database.

                HSQLDB-Specific Information:

                Starting with 1.7.2, HSLQDB supports this.

                Specified by:
                setTimestamp in interface java.sql.CallableStatement
                Parameters:
                parameterName - the name of the parameter
                x - the parameter value
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7.0
                See Also:
                getTimestamp(int)

                setAsciiStream

                public void setAsciiStream(java.lang.String parameterName,
                                           java.io.InputStream x,
                                           int length)
                                    throws java.sql.SQLException
                Sets the designated parameter to the given input stream, which will have the specified number of bytes. When a very large ASCII value is input to a LONGVARCHAR parameter, it may be more practical to send it via a java.io.InputStream. Data will be read from the stream as needed until end-of-file is reached. The JDBC driver will do any necessary conversion from ASCII to the database char format.

                Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.

                HSQLDB-Specific Information:

                Starting with 1.7.2, HSLQDB supports this.

                Specified by:
                setAsciiStream in interface java.sql.CallableStatement
                Parameters:
                parameterName - the name of the parameter
                x - the Java input stream that contains the ASCII parameter value
                length - the number of bytes in the stream
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7.0

                setBinaryStream

                public void setBinaryStream(java.lang.String parameterName,
                                            java.io.InputStream x,
                                            int length)
                                     throws java.sql.SQLException
                Sets the designated parameter to the given input stream, which will have the specified number of bytes. When a very large binary value is input to a LONGVARBINARY parameter, it may be more practical to send it via a java.io.InputStream object. The data will be read from the stream as needed until end-of-file is reached.

                Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.

                HSQLDB-Specific Information:

                Starting with 1.7.2, HSLQDB supports this.

                Specified by:
                setBinaryStream in interface java.sql.CallableStatement
                Parameters:
                parameterName - the name of the parameter
                x - the java input stream which contains the binary parameter value
                length - the number of bytes in the stream
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7.0

                setObject

                public void setObject(java.lang.String parameterName,
                                      java.lang.Object x,
                                      int targetSqlType,
                                      int scale)
                               throws java.sql.SQLException
                Sets the value of the designated parameter with the given object. The second argument must be an object type; for integral values, the java.lang equivalent objects should be used.

                The given Java object will be converted to the given targetSqlType before being sent to the database. If the object has a custom mapping (is of a class implementing the interface SQLData), the JDBC driver should call the method SQLData.writeSQL to write it to the SQL data stream. If, on the other hand, the object is of a class implementing Ref, Blob, Clob, Struct, or Array, the driver should pass it to the database as a value of the corresponding SQL type.

                Note that this method may be used to pass datatabase- specific abstract data types.

                HSQLDB-Specific Information:

                Starting with 1.7.2, HSLQDB supports this.

                Specified by:
                setObject in interface java.sql.CallableStatement
                Parameters:
                parameterName - the name of the parameter
                x - the object containing the input parameter value
                targetSqlType - the SQL type (as defined in java.sql.Types) to be sent to the database. The scale argument may further qualify this type.
                scale - for java.sql.Types.DECIMAL or java.sql.Types.NUMERIC types, this is the number of digits after the decimal point. For all other types, this value will be ignored.
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7.0
                See Also:
                Types, getObject(int)

                setObject

                public void setObject(java.lang.String parameterName,
                                      java.lang.Object x,
                                      int targetSqlType)
                               throws java.sql.SQLException
                Sets the value of the designated parameter with the given object. This method is like the method setObject above, except that it assumes a scale of zero.

                HSQLDB-Specific Information:

                Starting with 1.7.2, HSLQDB supports this.

                Specified by:
                setObject in interface java.sql.CallableStatement
                Parameters:
                parameterName - the name of the parameter
                x - the object containing the input parameter value
                targetSqlType - the SQL type (as defined in java.sql.Types) to be sent to the database
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7.0
                See Also:
                getObject(int)

                setObject

                public void setObject(java.lang.String parameterName,
                                      java.lang.Object x)
                               throws java.sql.SQLException
                Sets the value of the designated parameter with the given object. The second parameter must be of type Object; therefore, the java.lang equivalent objects should be used for built-in types.

                The JDBC specification specifies a standard mapping from Java Object types to SQL types. The given argument will be converted to the corresponding SQL type before being sent to the database.

                Note that this method may be used to pass datatabase- specific abstract data types, by using a driver-specific Java type. If the object is of a class implementing the interface SQLData, the JDBC driver should call the method SQLData.writeSQL to write it to the SQL data stream. If, on the other hand, the object is of a class implementing Ref, Blob, Clob, Struct, or Array, the driver should pass it to the database as a value of the corresponding SQL type.

                This method throws an exception if there is an ambiguity, for example, if the object is of a class implementing more than one of the interfaces named above.

                HSQLDB-Specific Information:

                Starting with 1.7.2, HSLQDB supports this.

                Specified by:
                setObject in interface java.sql.CallableStatement
                Parameters:
                parameterName - the name of the parameter
                x - the object containing the input parameter value
                Throws:
                java.sql.SQLException - if a database access error occurs or if the given Object parameter is ambiguous
                Since:
                JDK 1.4, HSQLDB 1.7.0
                See Also:
                getObject(int)

                setCharacterStream

                public void setCharacterStream(java.lang.String parameterName,
                                               java.io.Reader reader,
                                               int length)
                                        throws java.sql.SQLException
                Sets the designated parameter to the given Reader object, which is the given number of characters long. When a very large UNICODE value is input to a LONGVARCHAR parameter, it may be more practical to send it via a java.io.Reader object. The data will be read from the stream as needed until end-of-file is reached. The JDBC driver will do any necessary conversion from UNICODE to the database char format.

                Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.

                HSQLDB-Specific Information:

                Starting with 1.7.2, HSLQDB supports this.

                Specified by:
                setCharacterStream in interface java.sql.CallableStatement
                Parameters:
                parameterName - the name of the parameter
                reader - the java.io.Reader object that contains the UNICODE data used as the designated parameter
                length - the number of characters in the stream
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7.0

                setDate

                public void setDate(java.lang.String parameterName,
                                    java.sql.Date x,
                                    java.util.Calendar cal)
                             throws java.sql.SQLException
                Sets the designated parameter to the given java.sql.Date value, using the given Calendar object. The driver uses the Calendar object to construct an SQL DATE value, which the driver then sends to the database. With a a Calendar object, the driver can calculate the date taking into account a custom timezone. If no Calendar object is specified, the driver uses the default timezone, which is that of the virtual machine running the application.

                HSQLDB-Specific Information:

                Starting with 1.7.2, HSLQDB supports this.

                Specified by:
                setDate in interface java.sql.CallableStatement
                Parameters:
                parameterName - the name of the parameter
                x - the parameter value
                cal - the Calendar object the driver will use to construct the date
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7.0
                See Also:
                getDate(int)

                setTime

                public void setTime(java.lang.String parameterName,
                                    java.sql.Time x,
                                    java.util.Calendar cal)
                             throws java.sql.SQLException
                Sets the designated parameter to the given java.sql.Time value, using the given Calendar object. The driver uses the Calendar object to construct an SQL TIME value, which the driver then sends to the database. With a a Calendar object, the driver can calculate the time taking into account a custom timezone. If no Calendar object is specified, the driver uses the default timezone, which is that of the virtual machine running the application.

                HSQLDB-Specific Information:

                Starting with 1.7.2, HSLQDB supports this.

                Specified by:
                setTime in interface java.sql.CallableStatement
                Parameters:
                parameterName - the name of the parameter
                x - the parameter value
                cal - the Calendar object the driver will use to construct the time
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7.0
                See Also:
                getTime(int)

                setTimestamp

                public void setTimestamp(java.lang.String parameterName,
                                         java.sql.Timestamp x,
                                         java.util.Calendar cal)
                                  throws java.sql.SQLException
                Sets the designated parameter to the given java.sql.Timestamp value, using the given Calendar object. The driver uses the Calendar object to construct an SQL TIMESTAMP value, which the driver then sends to the database. With a Calendar object, the driver can calculate the timestamp taking into account a custom timezone. If no Calendar object is specified, the driver uses the default timezone, which is that of the virtual machine running the application.

                HSQLDB-Specific Information:

                Starting with 1.7.2, HSLQDB supports this.

                Specified by:
                setTimestamp in interface java.sql.CallableStatement
                Parameters:
                parameterName - the name of the parameter
                x - the parameter value
                cal - the Calendar object the driver will use to construct the timestamp
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7.0
                See Also:
                getTimestamp(int)

                setNull

                public void setNull(java.lang.String parameterName,
                                    int sqlType,
                                    java.lang.String typeName)
                             throws java.sql.SQLException
                Sets the designated parameter to SQL NULL. This version of the method setNull should be used for user-defined types and REF type parameters. Examples of user-defined types include: STRUCT, DISTINCT, JAVA_OBJECT, and named array types.

                Note: To be portable, applications must give the SQL type code and the fully-qualified SQL type name when specifying a NULL user-defined or REF parameter. In the case of a user-defined type the name is the type name of the parameter itself. For a REF parameter, the name is the type name of the referenced type. If a JDBC driver does not need the type code or type name information, it may ignore it. Although it is intended for user-defined and Ref parameters, this method may be used to set a null parameter of any JDBC type. If the parameter does not have a user-defined or REF type, the given typeName is ignored.

                HSQLDB-Specific Information:

                Starting with 1.7.2, HSLQDB supports this.

                Specified by:
                setNull in interface java.sql.CallableStatement
                Parameters:
                parameterName - the name of the parameter
                sqlType - a value from java.sql.Types
                typeName - the fully-qualified name of an SQL user-defined type; ignored if the parameter is not a user-defined type or SQL REF value
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7.0

                getString

                public java.lang.String getString(java.lang.String parameterName)
                                           throws java.sql.SQLException
                Retrieves the value of a JDBC CHAR, VARCHAR, or LONGVARCHAR parameter as a String in the Java programming language.

                For the fixed-length type JDBC CHAR, the String object returned has exactly the same value the (JDBC4 clarification:) SQL CHAR value had in the database, including any padding added by the database.

                HSQLDB-Specific Information:

                HSQLDB 1.7.2 does not support this feature.

                Calling this method always throws an SQLException.

                Specified by:
                getString in interface java.sql.CallableStatement
                Parameters:
                parameterName - the name of the parameter
                Returns:
                the parameter value. If the value is SQL NULL, the result is null.
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7.0
                See Also:
                setString(java.lang.String, java.lang.String)

                getBoolean

                public boolean getBoolean(java.lang.String parameterName)
                                   throws java.sql.SQLException
                (JDBC4 modified:) Retrieves the value of a JDBC BIT or BOOLEAN parameter as a boolean in the Java programming language.

                HSQLDB-Specific Information:

                HSQLDB 1.7.2 does not support this feature.

                Calling this method always throws an SQLException.

                Specified by:
                getBoolean in interface java.sql.CallableStatement
                Parameters:
                parameterName - the name of the parameter
                Returns:
                the parameter value. If the value is SQL NULL, the result is false.
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7.0
                See Also:
                setBoolean(java.lang.String, boolean)

                getByte

                public byte getByte(java.lang.String parameterName)
                             throws java.sql.SQLException
                Retrieves the value of a JDBC TINYINT parameter as a byte in the Java programming language.

                HSQLDB-Specific Information:

                HSQLDB 1.7.2 does not support this feature.

                Calling this method always throws an SQLException.

                Specified by:
                getByte in interface java.sql.CallableStatement
                Parameters:
                parameterName - the name of the parameter
                Returns:
                the parameter value. If the value is SQL NULL, the result is 0.
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7.0
                See Also:
                setByte(java.lang.String, byte)

                getShort

                public short getShort(java.lang.String parameterName)
                               throws java.sql.SQLException
                Retrieves the value of a JDBC SMALLINT parameter as a short in the Java programming language.

                HSQLDB-Specific Information:

                HSQLDB 1.7.2 does not support this feature.

                Calling this method always throws an SQLException.

                Specified by:
                getShort in interface java.sql.CallableStatement
                Parameters:
                parameterName - the name of the parameter
                Returns:
                the parameter value. If the value is SQL NULL, the result is 0.
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7.0
                See Also:
                setShort(java.lang.String, short)

                getInt

                public int getInt(java.lang.String parameterName)
                           throws java.sql.SQLException
                Retrieves the value of a JDBC INTEGER parameter as an int in the Java programming language.

                HSQLDB-Specific Information:

                HSQLDB 1.7.2 does not support this feature.

                Calling this method always throws an SQLException.

                Specified by:
                getInt in interface java.sql.CallableStatement
                Parameters:
                parameterName - the name of the parameter
                Returns:
                the parameter value. If the value is SQL NULL, the result is 0.
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7.0
                See Also:
                setInt(java.lang.String, int)

                getLong

                public long getLong(java.lang.String parameterName)
                             throws java.sql.SQLException
                Retrieves the value of a JDBC BIGINT parameter as a long in the Java programming language.

                HSQLDB-Specific Information:

                HSQLDB 1.7.2 does not support this feature.

                Calling this method always throws an SQLException.

                Specified by:
                getLong in interface java.sql.CallableStatement
                Parameters:
                parameterName - the name of the parameter
                Returns:
                the parameter value. If the value is SQL NULL, the result is 0.
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7.0
                See Also:
                setLong(java.lang.String, long)

                getFloat

                public float getFloat(java.lang.String parameterName)
                               throws java.sql.SQLException
                Retrieves the value of a JDBC FLOAT parameter as a float in the Java programming language.

                HSQLDB-Specific Information:

                HSQLDB 1.7.2 does not support this feature.

                Calling this method always throws an SQLException.

                Specified by:
                getFloat in interface java.sql.CallableStatement
                Parameters:
                parameterName - the name of the parameter
                Returns:
                the parameter value. If the value is SQL NULL, the result is 0.
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7.0
                See Also:
                setFloat(java.lang.String, float)

                getDouble

                public double getDouble(java.lang.String parameterName)
                                 throws java.sql.SQLException
                Retrieves the value of a JDBC DOUBLE parameter as a double in the Java programming language.

                HSQLDB-Specific Information:

                HSQLDB 1.7.2 does not support this feature.

                Calling this method always throws an SQLException.

                Specified by:
                getDouble in interface java.sql.CallableStatement
                Parameters:
                parameterName - the name of the parameter
                Returns:
                the parameter value. If the value is SQL NULL, the result is 0.
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7.0
                See Also:
                setDouble(java.lang.String, double)

                getBytes

                public byte[] getBytes(java.lang.String parameterName)
                                throws java.sql.SQLException
                Retrieves the value of a JDBC BINARY or VARBINARY parameter as an array of byte values in the Java programming language.

                HSQLDB-Specific Information:

                HSQLDB 1.7.2 does not support this feature.

                Calling this method always throws an SQLException.

                Specified by:
                getBytes in interface java.sql.CallableStatement
                Parameters:
                parameterName - the name of the parameter
                Returns:
                the parameter value. If the value is SQL NULL, the result is null.
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7.0
                See Also:
                setBytes(java.lang.String, byte[])

                getDate

                public java.sql.Date getDate(java.lang.String parameterName)
                                      throws java.sql.SQLException
                Retrieves the value of a JDBC DATE parameter as a java.sql.Date object.

                HSQLDB-Specific Information:

                HSQLDB 1.7.2 does not support this feature.

                Calling this method always throws an SQLException.

                Specified by:
                getDate in interface java.sql.CallableStatement
                Parameters:
                parameterName - the name of the parameter
                Returns:
                the parameter value. If the value is SQL NULL, the result is null.
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7.0
                See Also:
                setDate(java.lang.String, java.sql.Date)

                getTime

                public java.sql.Time getTime(java.lang.String parameterName)
                                      throws java.sql.SQLException
                Retrieves the value of a JDBC TIME parameter as a java.sql.Time object.

                HSQLDB-Specific Information:

                HSQLDB 1.7.2 does not support this feature.

                Calling this method always throws an SQLException.

                Specified by:
                getTime in interface java.sql.CallableStatement
                Parameters:
                parameterName - the name of the parameter
                Returns:
                the parameter value. If the value is SQL NULL, the result is null.
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7.0
                See Also:
                setTime(java.lang.String, java.sql.Time)

                getTimestamp

                public java.sql.Timestamp getTimestamp(java.lang.String parameterName)
                                                throws java.sql.SQLException
                Retrieves the value of a JDBC TIMESTAMP parameter as a java.sql.Timestamp object.

                HSQLDB-Specific Information:

                HSQLDB 1.7.2 does not support this feature.

                Calling this method always throws an SQLException.

                Specified by:
                getTimestamp in interface java.sql.CallableStatement
                Parameters:
                parameterName - the name of the parameter
                Returns:
                the parameter value. If the value is SQL NULL, the result is null.
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7.0
                See Also:
                setTimestamp(java.lang.String, java.sql.Timestamp)

                getObject

                public java.lang.Object getObject(java.lang.String parameterName)
                                           throws java.sql.SQLException
                Retrieves the value of a parameter as an Object in the Java programming language. If the value is an SQL NULL, the driver returns a Java null.

                This method returns a Java object whose type corresponds to the JDBC type that was registered for this parameter using the method registerOutParameter. By registering the target JDBC type as java.sql.Types.OTHER, this method can be used to read database-specific abstract data types.

                HSQLDB-Specific Information:

                HSQLDB 1.7.2 does not support this feature.

                Calling this method always throws an SQLException.

                Specified by:
                getObject in interface java.sql.CallableStatement
                Parameters:
                parameterName - the name of the parameter
                Returns:
                A java.lang.Object holding the OUT parameter value.
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7.0
                See Also:
                Types, setObject(java.lang.String, java.lang.Object, int, int)

                getBigDecimal

                public java.math.BigDecimal getBigDecimal(java.lang.String parameterName)
                                                   throws java.sql.SQLException
                Retrieves the value of a JDBC NUMERIC parameter as a java.math.BigDecimal object with as many digits to the right of the decimal point as the value contains.

                HSQLDB-Specific Information:

                HSQLDB 1.7.2 does not support this feature.

                Calling this method always throws an SQLException.

                Specified by:
                getBigDecimal in interface java.sql.CallableStatement
                Parameters:
                parameterName - the name of the parameter
                Returns:
                the parameter value in full precision. If the value is SQL NULL, the result is null.
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7.0
                See Also:
                setBigDecimal(java.lang.String, java.math.BigDecimal)

                getObject

                public java.lang.Object getObject(java.lang.String parameterName,
                                                  java.util.Map map)
                                           throws java.sql.SQLException
                Returns an object representing the value of OUT parameter parameterName and uses map for the custom mapping of the parameter value.

                This method returns a Java object whose type corresponds to the JDBC type that was registered for this parameter using the method registerOutParameter. By registering the target JDBC type as java.sql.Types.OTHER, this method can be used to read database-specific abstract data types.

                HSQLDB-Specific Information:

                HSQLDB 1.7.2 does not support this feature.

                Calling this method always throws an SQLException.

                Specified by:
                getObject in interface java.sql.CallableStatement
                Parameters:
                parameterName - the name of the parameter
                map - the mapping from SQL type names to Java classes
                Returns:
                a java.lang.Object holding the OUT parameter value
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7.0
                See Also:
                setObject(java.lang.String, java.lang.Object, int, int)

                getRef

                public java.sql.Ref getRef(java.lang.String parameterName)
                                    throws java.sql.SQLException
                Retrieves the value of a JDBC REF(<structured-type>) parameter as a Ref object in the Java programming language.

                HSQLDB-Specific Information:

                HSQLDB 1.7.2 does not support this feature.

                Calling this method always throws an SQLException.

                Specified by:
                getRef in interface java.sql.CallableStatement
                Parameters:
                parameterName - the name of the parameter
                Returns:
                the parameter value as a Ref object in the Java programming language. If the value was SQL NULL, the value null is returned.
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7.0

                getBlob

                public java.sql.Blob getBlob(java.lang.String parameterName)
                                      throws java.sql.SQLException
                Retrieves the value of a JDBC BLOB parameter as a Blob object in the Java programming language.

                HSQLDB-Specific Information:

                HSQLDB 1.7.2 does not support this feature.

                Calling this method always throws an SQLException.

                Specified by:
                getBlob in interface java.sql.CallableStatement
                Parameters:
                parameterName - the name of the parameter
                Returns:
                the parameter value as a Blob object in the Java programming language. If the value was SQL NULL, the value null is returned.
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7.0

                getClob

                public java.sql.Clob getClob(java.lang.String parameterName)
                                      throws java.sql.SQLException
                Retrieves the value of a JDBC CLOB parameter as a Clob object in the Java programming language.

                HSQLDB-Specific Information:

                HSQLDB 1.7.2 does not support this feature.

                Calling this method always throws an SQLException.

                Specified by:
                getClob in interface java.sql.CallableStatement
                Parameters:
                parameterName - the name of the parameter
                Returns:
                the parameter value as a Clob object in the Java programming language. If the value was SQL NULL, the value null is returned.
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7.0

                getArray

                public java.sql.Array getArray(java.lang.String parameterName)
                                        throws java.sql.SQLException
                Retrieves the value of a JDBC ARRAY parameter as an Array object in the Java programming language.

                HSQLDB-Specific Information:

                HSQLDB 1.7.2 does not support this feature.

                Calling this method always throws an SQLException.

                Specified by:
                getArray in interface java.sql.CallableStatement
                Parameters:
                parameterName - the name of the parameter
                Returns:
                the parameter value as an Array object in Java programming language. If the value was SQL NULL, the value null is returned.
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7.0

                getDate

                public java.sql.Date getDate(java.lang.String parameterName,
                                             java.util.Calendar cal)
                                      throws java.sql.SQLException
                Retrieves the value of a JDBC DATE parameter as a java.sql.Date object, using the given Calendar object to construct the date. With a Calendar object, the driver can calculate the date taking into account a custom timezone and locale. If no Calendar object is specified, the d river uses the default timezone and locale.

                HSQLDB-Specific Information:

                HSQLDB 1.7.2 does not support this feature.

                Calling this method always throws an SQLException.

                Specified by:
                getDate in interface java.sql.CallableStatement
                Parameters:
                parameterName - the name of the parameter
                cal - the Calendar object the driver will use to construct the date
                Returns:
                the parameter value. If the value is SQL NULL, the result is null.
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7.0
                See Also:
                setDate(java.lang.String, java.sql.Date)

                getTime

                public java.sql.Time getTime(java.lang.String parameterName,
                                             java.util.Calendar cal)
                                      throws java.sql.SQLException
                Retrieves the value of a JDBC TIME parameter as a java.sql.Time object, using the given Calendar object to construct the time. With a Calendar object, the driver can calculate the time taking into account a custom timezone and locale. If no Calendar object is specified, the driver uses the default timezone and locale.

                HSQLDB-Specific Information:

                HSQLDB 1.7.2 does not support this feature.

                Calling this method always throws an SQLException.

                Specified by:
                getTime in interface java.sql.CallableStatement
                Parameters:
                parameterName - the name of the parameter
                cal - the Calendar object the driver will use to construct the time
                Returns:
                the parameter value; if the value is SQL NULL, the result is null.
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7.0
                See Also:
                setTime(java.lang.String, java.sql.Time)

                getTimestamp

                public java.sql.Timestamp getTimestamp(java.lang.String parameterName,
                                                       java.util.Calendar cal)
                                                throws java.sql.SQLException
                Retrieves the value of a JDBC TIMESTAMP parameter as a java.sql.Timestamp object, using the given Calendar object to construct the Timestamp object. With a Calendar object, the driver can calculate the timestamp taking into account a custom timezone and locale. If no Calendar object is specified, the driver uses the default timezone and locale.

                HSQLDB-Specific Information:

                HSQLDB 1.7.2 does not support this feature.

                Calling this method always throws an SQLException.

                Specified by:
                getTimestamp in interface java.sql.CallableStatement
                Parameters:
                parameterName - the name of the parameter
                cal - the Calendar object the driver will use to construct the timestamp
                Returns:
                the parameter value. If the value is SQL NULL, the result is null.
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7.0
                See Also:
                setTimestamp(java.lang.String, java.sql.Timestamp)

                getURL

                public java.net.URL getURL(java.lang.String parameterName)
                                    throws java.sql.SQLException
                Retrieves the value of a JDBC DATALINK parameter as a java.net.URL object.

                HSQLDB-Specific Information:

                HSQLDB 1.7.2 does not support this feature.

                Calling this method always throws an SQLException.

                Specified by:
                getURL in interface java.sql.CallableStatement
                Parameters:
                parameterName - the name of the parameter
                Returns:
                the parameter value as a java.net.URL object in the Java programming language. If the value was SQL NULL, the value null is returned.
                Throws:
                java.sql.SQLException - if a database access error occurs, or if there is a problem with the URL
                Since:
                JDK 1.4, HSQLDB 1.7.0
                See Also:
                setURL(java.lang.String, java.net.URL)


                Copyright 2001 - 2005 HSQL Development Group. All Rights Reserved. hsqldb-1.8.0.10.orig/doc/src/org/hsqldb/jdbc/jdbcDataSourceFactory.html0000644000175000017500000002713711020614567024230 0ustar renerene jdbcDataSourceFactory (HSQLDB 1.8.0.10 API)

                org.hsqldb.jdbc
                Class jdbcDataSourceFactory

                java.lang.Object
                  extended byorg.hsqldb.jdbc.jdbcDataSourceFactory
                
                All Implemented Interfaces:
                javax.naming.spi.ObjectFactory

                public class jdbcDataSourceFactory
                extends java.lang.Object
                implements javax.naming.spi.ObjectFactory

                A JNDI ObjectFactory for creating jdbcDatasource object instances.

                Author:
                deforest@users

                Constructor Summary
                jdbcDataSourceFactory()
                           
                 
                Method Summary
                 java.lang.Object getObjectInstance(java.lang.Object obj, javax.naming.Name name, javax.naming.Context nameCtx, java.util.Hashtable environment)
                          Creates a jdbcDatasource object using the location or reference information specified.
                 
                Methods inherited from class java.lang.Object
                equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
                 

                Constructor Detail

                jdbcDataSourceFactory

                public jdbcDataSourceFactory()
                Method Detail

                getObjectInstance

                public java.lang.Object getObjectInstance(java.lang.Object obj,
                                                          javax.naming.Name name,
                                                          javax.naming.Context nameCtx,
                                                          java.util.Hashtable environment)
                                                   throws java.lang.Exception
                Creates a jdbcDatasource object using the location or reference information specified.

                The Reference object should support the properties, database, user, password.

                Specified by:
                getObjectInstance in interface javax.naming.spi.ObjectFactory
                Parameters:
                obj - The reference information used in creating a jdbcDatasource object.
                name - ignored
                nameCtx - ignored
                environment - ignored
                Returns:
                A newly created jdbcDataSource object; null if an object cannot be created.
                Throws:
                java.lang.Exception - never


                Copyright 2001 - 2005 HSQL Development Group. All Rights Reserved. hsqldb-1.8.0.10.orig/doc/src/org/hsqldb/jdbc/jdbcDataSource.html0000644000175000017500000006211411020614567022672 0ustar renerene jdbcDataSource (HSQLDB 1.8.0.10 API)

                org.hsqldb.jdbc
                Class jdbcDataSource

                java.lang.Object
                  extended byorg.hsqldb.jdbc.jdbcDataSource
                
                All Implemented Interfaces:
                javax.sql.DataSource, javax.naming.Referenceable, java.io.Serializable

                public class jdbcDataSource
                extends java.lang.Object
                implements java.io.Serializable, javax.naming.Referenceable, javax.sql.DataSource

                A factory for connections to the physical data source that this DataSource object represents. An alternative to the DriverManager facility, a DataSource object is the preferred means of getting a connection. An object that implements the DataSource interface will typically be registered with a naming service based on the JavaTM Naming and Directory (JNDI) API.

                The DataSource interface is implemented by a driver vendor. There are three types of implementations:

                1. Basic implementation -- produces a standard Connection object
                2. Connection pooling implementation -- produces a Connection object that will automatically participate in connection pooling. This implementation works with a middle-tier connection pooling manager.
                3. Distributed transaction implementation -- produces a Connection object that may be used for distributed transactions and almost always participates in connection pooling. This implementation works with a middle-tier transaction manager and almost always with a connection pooling manager.

                A DataSource object has properties that can be modified when necessary. For example, if the data source is moved to a different server, the property for the server can be changed. The benefit is that because the data source's properties can be changed, any code accessing that data source does not need to be changed.

                A driver that is accessed via a DataSource object does not register itself with the DriverManager. Rather, a DataSource object is retrieved though a lookup operation and then used to create a Connection object. With a basic implementation, the connection obtained through a DataSource object is identical to a connection obtained through the DriverManager facility.

                Since:
                JDK 1.4
                Author:
                deforest@users
                See Also:
                Serialized Form

                Constructor Summary
                jdbcDataSource()
                          Constructor
                 
                Method Summary
                 java.sql.Connection getConnection()
                          Attempts to establish a connection with the data source that this DataSource object represents.
                 java.sql.Connection getConnection(java.lang.String username, java.lang.String password)
                          Attempts to establish a connection with the data source that this DataSource object represents.
                 java.lang.String getDatabase()
                          Retrieves the jdbc database connection url attribute.
                 int getLoginTimeout()
                          Gets the maximum time in seconds that this data source can wait while attempting to connect to a database.
                 java.io.PrintWriter getLogWriter()
                          Retrieves the log writer for this DataSource object.
                 javax.naming.Reference getReference()
                           
                 java.lang.String getUser()
                          Retrieves the user ID for the connection.
                 void setDatabase(java.lang.String database)
                          Assigns the value of this object's jdbc database connection url attribute.
                 void setLoginTimeout(int seconds)
                          Sets the maximum time in seconds that this data source will wait while attempting to connect to a database.
                 void setLogWriter(java.io.PrintWriter logWriter)
                          Sets the log writer for this DataSource object to the given java.io.PrintWriter object.
                 void setPassword(java.lang.String password)
                          Sets the password to use for connecting to the database
                 void setUser(java.lang.String user)
                          Sets the userid
                 
                Methods inherited from class java.lang.Object
                equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
                 

                Constructor Detail

                jdbcDataSource

                public jdbcDataSource()
                Constructor

                Method Detail

                getConnection

                public java.sql.Connection getConnection()
                                                  throws java.sql.SQLException

                Attempts to establish a connection with the data source that this DataSource object represents.

                Specified by:
                getConnection in interface javax.sql.DataSource
                Returns:
                a connection to the data source
                Throws:
                java.sql.SQLException - if a database access error occurs

                getConnection

                public java.sql.Connection getConnection(java.lang.String username,
                                                         java.lang.String password)
                                                  throws java.sql.SQLException

                Attempts to establish a connection with the data source that this DataSource object represents.

                Specified by:
                getConnection in interface javax.sql.DataSource
                Parameters:
                username - the database user on whose behalf the connection is being made
                password - the user's password
                Returns:
                a connection to the data source
                Throws:
                java.sql.SQLException - if a database access error occurs

                getDatabase

                public java.lang.String getDatabase()
                Retrieves the jdbc database connection url attribute.

                Returns:
                the jdbc database connection url attribute

                getLoginTimeout

                public int getLoginTimeout()
                                    throws java.sql.SQLException
                Gets the maximum time in seconds that this data source can wait while attempting to connect to a database. A value of zero means that the timeout is the default system timeout if there is one; otherwise, it means that there is no timeout. When a DataSource object is created, the login timeout is initially zero.

                Specified by:
                getLoginTimeout in interface javax.sql.DataSource
                Returns:
                the data source login time limit
                Throws:
                java.sql.SQLException - if a database access error occurs.
                See Also:
                setLoginTimeout(int)

                getLogWriter

                public java.io.PrintWriter getLogWriter()
                                                 throws java.sql.SQLException

                Retrieves the log writer for this DataSource object.

                The log writer is a character output stream to which all logging and tracing messages for this data source will be printed. This includes messages printed by the methods of this object, messages printed by methods of other objects manufactured by this object, and so on. Messages printed to a data source specific log writer are not printed to the log writer associated with the java.sql.Drivermanager class. When a DataSource object is created, the log writer is initially null; in other words, the default is for logging to be disabled.

                Specified by:
                getLogWriter in interface javax.sql.DataSource
                Returns:
                the log writer for this data source or null if logging is disabled
                Throws:
                java.sql.SQLException - if a database access error occurs
                See Also:
                setLogWriter(java.io.PrintWriter)

                getReference

                public javax.naming.Reference getReference()
                                                    throws javax.naming.NamingException
                Specified by:
                getReference in interface javax.naming.Referenceable
                Throws:
                javax.naming.NamingException

                getUser

                public java.lang.String getUser()
                Retrieves the user ID for the connection.

                Returns:
                the user ID for the connection

                setDatabase

                public void setDatabase(java.lang.String database)
                Assigns the value of this object's jdbc database connection url attribute.

                Parameters:
                database - the new value of this object's jdbc database connection url attribute

                setLoginTimeout

                public void setLoginTimeout(int seconds)
                                     throws java.sql.SQLException

                Sets the maximum time in seconds that this data source will wait while attempting to connect to a database. A value of zero specifies that the timeout is the default system timeout if there is one; otherwise, it specifies that there is no timeout. When a DataSource object is created, the login timeout is initially zero.

                Specified by:
                setLoginTimeout in interface javax.sql.DataSource
                Parameters:
                seconds - the data source login time limit
                Throws:
                java.sql.SQLException - if a database access error occurs.
                See Also:
                getLoginTimeout()

                setLogWriter

                public void setLogWriter(java.io.PrintWriter logWriter)
                                  throws java.sql.SQLException

                Sets the log writer for this DataSource object to the given java.io.PrintWriter object.

                The log writer is a character output stream to which all logging and tracing messages for this data source will be printed. This includes messages printed by the methods of this object, messages printed by methods of other objects manufactured by this object, and so on. Messages printed to a data source- specific log writer are not printed to the log writer associated with the java.sql.Drivermanager class. When a DataSource object is created the log writer is initially null; in other words, the default is for logging to be disabled.

                Specified by:
                setLogWriter in interface javax.sql.DataSource
                Parameters:
                logWriter - the new log writer; to disable logging, set to null
                Throws:
                java.sql.SQLException - if a database access error occurs
                See Also:
                getLogWriter()

                setPassword

                public void setPassword(java.lang.String password)
                Sets the password to use for connecting to the database

                Parameters:
                password - the password

                setUser

                public void setUser(java.lang.String user)
                Sets the userid

                Parameters:
                user - the user id


                Copyright 2001 - 2005 HSQL Development Group. All Rights Reserved. hsqldb-1.8.0.10.orig/doc/src/org/hsqldb/jdbc/jdbcSavepoint.html0000644000175000017500000002750211020614567022612 0ustar renerene jdbcSavepoint (HSQLDB 1.8.0.10 API)

                org.hsqldb.jdbc
                Class jdbcSavepoint

                java.lang.Object
                  extended byorg.hsqldb.jdbc.jdbcSavepoint
                
                All Implemented Interfaces:
                java.sql.Savepoint

                public class jdbcSavepoint
                extends java.lang.Object
                implements java.sql.Savepoint

                The representation of a savepoint, which is a point within the current transaction that can be referenced from the Connection.rollback method. When a transaction is rolled back to a savepoint all changes made after that savepoint are undone.

                Savepoints can be either named or unnamed. Unnamed savepoints are identified by an ID generated by the underlying data source.

                HSQLDB-Specific Information:

                As the SQL 2003 standard does not provide for unnamed savepoints, this feature is not supported.

                If the connection is autoCommit, setting savepoints has no effect as any such savepoint is cleared upon the execution of the first transactional statement.

                Since:
                JDK 1.4, HSQLDB 1.7.2
                Author:
                boucherb@users

                Method Summary
                 int getSavepointId()
                          Retrieves the generated ID for the savepoint that this Savepoint object represents.
                 java.lang.String getSavepointName()
                          Retrieves the name of the savepoint that this Savepoint object represents.
                 java.lang.String toString()
                           
                 
                Methods inherited from class java.lang.Object
                equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
                 

                Method Detail

                getSavepointId

                public int getSavepointId()
                                   throws java.sql.SQLException
                Retrieves the generated ID for the savepoint that this Savepoint object represents.

                Specified by:
                getSavepointId in interface java.sql.Savepoint
                Returns:
                the numeric ID of this savepoint
                Throws:
                java.sql.SQLException - if this is a named savepoint
                Since:
                1.4

                getSavepointName

                public java.lang.String getSavepointName()
                                                  throws java.sql.SQLException
                Retrieves the name of the savepoint that this Savepoint object represents.

                Specified by:
                getSavepointName in interface java.sql.Savepoint
                Returns:
                the name of this savepoint
                Throws:
                java.sql.SQLException - if this is an un-named savepoint
                Since:
                1.4

                toString

                public java.lang.String toString()


                Copyright 2001 - 2005 HSQL Development Group. All Rights Reserved. hsqldb-1.8.0.10.orig/doc/src/org/hsqldb/jdbc/jdbcConnection.html0000644000175000017500000033740511020614566022746 0ustar renerene jdbcConnection (HSQLDB 1.8.0.10 API)

                org.hsqldb.jdbc
                Class jdbcConnection

                java.lang.Object
                  extended byorg.hsqldb.jdbc.jdbcConnection
                
                All Implemented Interfaces:
                java.sql.Connection

                public class jdbcConnection
                extends java.lang.Object
                implements java.sql.Connection

                A connection (session) with a specific database. Within the context of a Connection, SQL statements are executed and results are returned.

                A Connection's database is able to provide information describing its tables, its supported SQL grammar, its stored procedures, the capabilities of this connection, and so on. This information is obtained with the getMetaData method.

                Note: By default the Connection automatically commits changes after executing each statement. If auto commit has been disabled, an explicit commit must be done or database changes will not be saved.


                HSQLDB-Specific Information:

                To get a Connection to an HSQLDB database, the following code may be used (updated to reflect the most recent recommendations):


                When using HSQLDB, the database connection <url> must start with 'jdbc:hsqldb:'

                Since 1.7.2, connection properties (<key-value-pairs>) may be appended to the database connection <url>, using the form:

                '<url>[;key=value]*'

                Also since 1.7.2, the allowable forms of the HSQLDB database connection <url> have been extended. However, all legacy forms continue to work, with unchanged semantics. The extensions are as described in the following material.


                Network Server Database Connections:

                The 1.7.2 Server database connection <url> has changed to take one of the two following forms:

                1. 'jdbc:hsqldb:hsql://host[:port][/<alias>][<key-value-pairs>]'
                2. 'jdbc:hsqldb:hsqls://host[:port][/<alias>][<key-value-pairs>]' (with TLS).

                The 1.7.2 WebServer database connection <url> also changes to take one of two following forms:

                1. 'jdbc:hsqldb:http://host[:port][/<alias>][<key-value-pairs>]'
                2. 'jdbc:hsqldb:https://host[:port][/<alias>][<key-value-pairs>]' (with TLS).

                In both network server database connection <url> forms, the optional <alias> component is used to identify one of possibly several database instances available at the indicated host and port. If the <alias> component is omitted, then a connection is made to the network server's default database instance.

                For more information on server configuration regarding mounting multiple databases and assigning them <alias> values, please read the Java API documentation for Server and related chapters in the general documentation, especially the Advanced Users Guide.


                Transient, In-Process Database Connections:

                The 1.7.2 100% in-memory (transient, in-process) database connection <url> takes one of the two following forms:

                1. 'jdbc:hsqldb:.[<key-value-pairs>]' (the legacy form, extended)
                2. 'jdbc:hsqldb:mem:<alias>[<key-value-pairs>]' (the new form)

                With the 1.7.2 transient, in-process database connection <url>, the <alias> component is the key used to look up a transient, in-process database instance amongst the collection of all such instances already in existence within the current class loading context in the current JVM. If no such instance exists, one may be automatically created and mapped to the <alias>, as governed by the 'ifexists=true|false' connection property.


                Persistent, In-Process Database Connections:

                The 1.7.2 standalone (persistent, in-process) database connection <url> takes one of the three following forms:

                1. 'jdbc:hsqldb:<path>[<key-value-pairs>]' (the legacy form, extended)
                2. 'jdbc:hsqldb:file:<path>[<key-value-pairs>]' (same semantics as the legacy form)
                3. 'jdbc:hsqldb:res:<path>[<key-value-pairs>]' (new form with 'files_in_jar' semantics)

                For the persistent, in-process database connection <url>, the <path> component is the path prefix common to all of the files that compose the database.

                As of 1.7.2, although other files may be involved (such as transient working files and/or TEXT table CSV data source files), the essential set that may, at any particular point in time, compose an HSQLDB database are:

                • <path>.properties
                • <path>.script
                • <path>.log
                • <path>.data
                • <path>.backup
                • <path>.lck

                For example: 'jdbc:hsqldb:file:test' connects to a database composed of some subset of the files listed above, where the expansion of <path> is 'test' prefixed with the path of the working directory fixed at the time the JVM is started.

                Under Windows TM , 'jdbc:hsqldb:file:c:\databases\test' connects to a database located on drive 'C:' in the directory 'databases', composed of some subset of the files:

                 C:\
                 +--databases\
                    +--test.properties
                    +--test.script
                    +--test.log
                    +--test.data
                    +--test.backup
                    +--test.lck
                 
                Under most variations of UNIX, 'jdbc:hsqldb:file:/databases/test' connects to a database located in the directory 'databases' directly under root, once again composed of some subset of the files:

                 /
                 +--databases/
                    +--test.properties
                    +--test.script
                    +--test.log
                    +--test.data
                    +--test.backup
                    +--test.lck
                 
                Some Guidelines:

                1. Both relative and absolute database file paths are supported.

                2. Relative database file paths can be specified in a platform independent manner as: '[dir1/dir2/.../dirn/]<file-name-prefix>'.

                3. Specification of absolute file paths is operating-system specific.
                  Please read your OS file system documentation.

                4. Specification of network mounts may be operating-system specific.
                  Please read your OS file system documentation.

                5. Special care may be needed w.r.t. file path specifications containing whitespace, mixed-case, special characters and/or reserved file names.
                  Please read your OS file system documentation.

                Note: Versions of HSQLDB previous to 1.7.0 did not support creating directories along the file path specified in the persistent, in-process mode database connection <url> form, in the case that they did not already exist. Starting with HSQLDB 1.7.0, directories will be created if they do not already exist., but only if HSQLDB is built under a version of the compiler greater than JDK 1.1.x.

                res: Connections

                The new 'jdbc:hsqldb:res:<path>' database connection <url> has different semantics than the 'jdbc:hsqldb:file:<path>' form. The semantics are similar to those of a 'files_readonly' database, but with some additional points to consider.

                Specifically, the '<path>' component of a res: type database connection <url> is used to obtain resource URL objects and thereby read the database files as resources on the class path. Moreover, the URL objects must point only to resources contained in one or more jars on the class path (must be jar protocol).

                This restriction is enforced to avoid the unfortunate situation in which, because res: database instances do not create a <path>.lck file (they are strictly files-read-only) and because the <path> components of res: and file: database URIs are not checked for file system equivalence, it is possible for the same database files to be accessed concurrently by both file: and res: database instances. That is, without this restriction, it is possible that <path>.data and <path>.properties file content may be written by a file: database instance without the knowlege or cooperation of a res: database instance open on the same files, potentially resulting in unexpected database errors, inconsistent operation and/or data corruption.

                In short, a res: type database connection <url> is designed specifically to connect to a 'files_in_jar' mode database instance, which in turn is designed specifically to operate under Java WebStartTM and Java AppletTMconfigurations, where co-locating the database files in the jars that make up the WebStart application or Applet avoids the need for special security configuration or code signing.

                Note: Since it is difficult and often nearly impossible to determine or control at runtime from where all classes are being loaded or which class loader is doing the loading under 'files_in_jar' semantics, the <path> component of the res: database connection <url> is always taken to be relative to the default package. That is, if the <path> component does not start with '/', then '/' is prepended when obtaining the resource URLs used to read the database files.


                For more information about HSQLDB file structure, various database modes and other attributes such as those controlled through the HSQLDB properties files, please read the general documentation, especially the Advanced Users Guide.


                JRE 1.1.x Notes:

                In general, JDBC 2 support requires Java 1.2 and above, and JDBC3 requires Java 1.4 and above. In HSQLDB, support for methods introduced in different versions of JDBC depends on the JDK version used for compiling and building HSQLDB.

                Since 1.7.0, it is possible to build the product so that all JDBC 2 methods can be called while executing under the version 1.1.x Java Runtime EnvironmentTM. However, in addition to this technique requiring explicit casts to the org.hsqldb.jdbcXXX classes, some of the method calls also require int values that are defined only in the JDBC 2 or greater version of ResultSet interface. For this reason, when the product is compiled under JDK 1.1.x, these values are defined in jdbcResultSet.

                In a JRE 1.1.x environment, calling JDBC 2 methods that take or return the JDBC2-only ResultSet values can be achieved by referring to them in parameter specifications and return value comparisons, respectively, as follows:

                 jdbcResultSet.FETCH_FORWARD
                 jdbcResultSet.TYPE_FORWARD_ONLY
                 jdbcResultSet.TYPE_SCROLL_INSENSITIVE
                 jdbcResultSet.CONCUR_READ_ONLY
                 // etc.
                 
                However, please note that code written to use HSQLDB JDBC 2 features under JDK 1.1.x will not be compatible for use with other JDBC 2 drivers. Please also note that this feature is offered solely as a convenience to developers who must work under JDK 1.1.x due to operating constraints, yet wish to use some of the more advanced features available under the JDBC 2 specification.


                (fredt@users)
                (boucherb@users)

                Author:
                boucherb@users, fredt@users
                See Also:
                jdbcDriver, jdbcStatement, jdbcPreparedStatement, jdbcCallableStatement, jdbcResultSet, jdbcDatabaseMetaData

                Field Summary
                 
                Fields inherited from interface java.sql.Connection
                TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE
                 
                Constructor Summary
                jdbcConnection(org.hsqldb.persist.HsqlProperties props)
                          Constructs a new external Connection to an HSQLDB Database.
                jdbcConnection(org.hsqldb.Session c)
                          Constructs an INTERNAL Connection, using the specified Session.
                 
                Method Summary
                 void clearWarnings()
                           Clears all warnings reported for this Connection object.
                 void close()
                           Releases this Connection object's database and JDBC resources immediately instead of waiting for them to be automatically released.
                 void commit()
                           Makes all changes made since the previous commit/rollback permanent and releases any database locks currently held by the Connection.
                 java.sql.Statement createStatement()
                           Creates a Statement object for sending SQL statements to the database.
                 java.sql.Statement createStatement(int type, int concurrency)
                           Creates a Statement object that will generate ResultSet objects with the given type and concurrency.
                 java.sql.Statement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability)
                           Creates a Statement object that will generate ResultSet objects with the given type, concurrency, and holdability.
                 boolean getAutoCommit()
                          Gets the current auto-commit state.
                 java.lang.String getCatalog()
                           Returns the Connection's current catalog name.
                 int getHoldability()
                           Retrieves the current holdability of ResultSet objects created using this Connection object.
                 java.sql.DatabaseMetaData getMetaData()
                           Gets the metadata regarding this connection's database.
                 int getTransactionIsolation()
                           Retrieves this Connection object's current transaction isolation level.
                 java.util.Map getTypeMap()
                           Gets the type map object associated with this connection.
                 java.sql.SQLWarning getWarnings()
                           Retrieves the first warning reported by calls on this Connection object.
                 boolean isClosed()
                          Tests to see if a Connection is closed.
                 boolean isReadOnly()
                          Tests to see if the connection is in read-only mode.
                 java.lang.String nativeSQL(java.lang.String sql)
                           Converts the given SQL statement into the system's native SQL grammar.
                 java.sql.CallableStatement prepareCall(java.lang.String sql)
                           Creates a CallableStatement object for calling database stored procedures.
                 java.sql.CallableStatement prepareCall(java.lang.String sql, int resultSetType, int resultSetConcurrency)
                           Creates a CallableStatement object that will generate ResultSet objects with the given type and concurrency.
                 java.sql.CallableStatement prepareCall(java.lang.String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability)
                           Creates a CallableStatement object that will generate ResultSet objects with the given type and concurrency.
                 java.sql.PreparedStatement prepareStatement(java.lang.String sql)
                           Creates a PreparedStatement object for sending parameterized SQL statements to the database.
                 java.sql.PreparedStatement prepareStatement(java.lang.String sql, int autoGeneratedKeys)
                           Creates a default PreparedStatement object that has the capability to retrieve auto-generated keys.
                 java.sql.PreparedStatement prepareStatement(java.lang.String sql, int[] columnIndexes)
                           Creates a default PreparedStatement object capable of returning the auto-generated keys designated by the given array.
                 java.sql.PreparedStatement prepareStatement(java.lang.String sql, int type, int concurrency)
                           Creates a PreparedStatement object that will generate ResultSet objects with the given type and concurrency.
                 java.sql.PreparedStatement prepareStatement(java.lang.String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability)
                           Creates a PreparedStatement object that will generate ResultSet objects with the given type, concurrency, and holdability.
                 java.sql.PreparedStatement prepareStatement(java.lang.String sql, java.lang.String[] columnNames)
                           Creates a default PreparedStatement object capable of returning the auto-generated keys designated by the given array.
                 void releaseSavepoint(java.sql.Savepoint savepoint)
                           Removes the given Savepoint object from the current transaction.
                 void reset()
                          Resets this connection so it can be used again.
                 void rollback()
                           Drops all changes made since the previous commit/rollback and releases any database locks currently held by this Connection.
                 void rollback(java.sql.Savepoint savepoint)
                           Undoes all changes made after the given Savepoint object was set.
                 void setAutoCommit(boolean autoCommit)
                           Sets this connection's auto-commit mode to the given state.
                 void setCatalog(java.lang.String catalog)
                           Sets a catalog name in order to select a subspace of this Connection's database in which to work.
                 void setHoldability(int holdability)
                           Changes the holdability of ResultSet objects created using this Connection object to the given holdability.
                 void setReadOnly(boolean readonly)
                           Puts this connection in read-only mode as a hint to enable database optimizations.
                 java.sql.Savepoint setSavepoint()
                           Creates an unnamed savepoint in the current transaction and returns the new Savepoint object that represents it.
                 java.sql.Savepoint setSavepoint(java.lang.String name)
                           Creates a savepoint with the given name in the current transaction and returns the new Savepoint object that represents it.
                 void setTransactionIsolation(int level)
                           Attempts to change the transaction isolation level for this Connection object to the one given.
                 void setTypeMap(java.util.Map map)
                           Installs the given TypeMap object as the type map for this Connection object.
                 
                Methods inherited from class java.lang.Object
                equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
                 

                Constructor Detail

                jdbcConnection

                public jdbcConnection(org.hsqldb.persist.HsqlProperties props)
                               throws java.sql.SQLException
                Constructs a new external Connection to an HSQLDB Database.

                This constructor is called on behalf of the java.sql.DriverManager when getting a Connection for use in normal (external) client code.

                Internal client code, that being code located in HSQLDB SQL functions and stored procedures, receives an INTERNAL connection constructed by the jdbcConnection(Session) constructor.

                Parameters:
                props - A Properties object containing the connection properties
                Throws:
                java.sql.SQLException - when the user/password combination is invalid, the connection url is invalid, or the Database is unavailable.

                The Database may be unavailable for a number of reasons, including network problems or the fact that it may already be in use by another process.


                jdbcConnection

                public jdbcConnection(org.hsqldb.Session c)
                               throws org.hsqldb.HsqlException
                Constructs an INTERNAL Connection, using the specified Session.

                This constructor is called only on behalf of an existing Session (the internal parallel of a Connection), to be used as a parameter to a SQL function or stored procedure that needs to execute in the context of that Session.

                When a Java SQL function or stored procedure is called and its first parameter is of type Connection, HSQLDB automatically notices this and constructs an INTERNAL Connection using the current Session. HSQLDB then passes this Connection in the first parameter position, moving any other parameter values specified in the SQL statement to the right by one position.

                To read more about this, see Function#getValue().

                Notes:

                Starting with HSQLDB 1.7.2, INTERNAL connections are not closed by a call to close() or by a SQL DISCONNECT. For HSQLDB developers not involved with writing database internals, this change only applies to connections obtained automatically from the database as the first parameter to stored procedures and SQL functions. This is mainly an issue to developers writing custom SQL function and stored procedure libraries for HSQLDB. Presently, it is recommended that SQL function and stored procedure code avoid depending on closing or issuing a DISCONNECT on a connection obtained in this manner.

                Parameters:
                c - the Session requesting the construction of this Connection
                Throws:
                org.hsqldb.HsqlException - never (reserved for future use);
                See Also:
                Function
                Method Detail

                createStatement

                public java.sql.Statement createStatement()
                                                   throws java.sql.SQLException
                Creates a Statement object for sending SQL statements to the database. SQL statements without parameters are normally executed using Statement objects. If the same SQL statement is executed many times, it may be more efficient to use a PreparedStatement object.

                Result sets created using the returned Statement object will by default be type TYPE_FORWARD_ONLY and have a concurrency level of CONCUR_READ_ONLY.

                HSQLDB-Specific Information:

                Starting with HSQLDB 1.7.2, support for precompilation at the engine level has been implemented, so it is now much more efficient and performant to use a PreparedStatement object if the same SQL statement is executed many times.

                Up to 1.6.1, HSQLDB supported TYPE_FORWARD_ONLY - CONCUR_READ_ONLY results only, so ResultSet objects created using the returned Statement object would always be type TYPE_FORWARD_ONLY with CONCUR_READ_ONLY concurrency.

                Starting with 1.7.0, HSQLDB also supports TYPE_SCROLL_INSENSITIVE results.

                Notes:

                Up to 1.6.1, calling this method returned null if the connection was already closed. This was possibly counter-intuitive to the expectation that an exception would be thrown for closed connections. Starting with 1.7.0. the behaviour is to throw a SQLException if the connection is closed.

                Specified by:
                createStatement in interface java.sql.Connection
                Returns:
                a new default Statement object
                Throws:
                java.sql.SQLException - if a database access error occurs

                See Also:
                createStatement(int,int), createStatement(int,int,int)

                prepareStatement

                public java.sql.PreparedStatement prepareStatement(java.lang.String sql)
                                                            throws java.sql.SQLException
                Creates a PreparedStatement object for sending parameterized SQL statements to the database.

                A SQL statement with or without IN parameters can be pre-compiled and stored in a PreparedStatement object. This object can then be used to efficiently execute this statement multiple times.

                Note: This method is optimized for handling parametric SQL statements that benefit from precompilation. If the driver supports precompilation, the method prepareStatement will send the statement to the database for precompilation. Some drivers may not support precompilation. In this case, the statement may not be sent to the database until the PreparedStatement object is executed. This has no direct effect on users; however, it does affect which methods throw certain SQLException objects.

                Result sets created using the returned PreparedStatement object will by default be type TYPE_FORWARD_ONLY and have a concurrency level of CONCUR_READ_ONLY.

                HSQLDB-Specific Information:

                Starting with HSQLDB 1.7.2, support for precompilation at the engine level has been implemented, so it is now much more efficient and performant to use a PreparedStatement object if the same SQL statement is executed many times.

                Starting with 1.7.2, the support for and behaviour of PreparedStatment has changed. Please read the introductory section of the documentation for org.hsqldb.jdbc.jdbcPreparedStatement.

                Specified by:
                prepareStatement in interface java.sql.Connection
                Parameters:
                sql - an SQL statement that may contain one or more '?' IN parameter placeholders
                Returns:
                a new default PreparedStatement object containing the pre-compiled SQL statement
                Throws:
                java.sql.SQLException - if a database access error occurs

                See Also:
                prepareStatement(String,int,int)

                prepareCall

                public java.sql.CallableStatement prepareCall(java.lang.String sql)
                                                       throws java.sql.SQLException
                Creates a CallableStatement object for calling database stored procedures. The CallableStatement object provides methods for setting up its IN and OUT parameters, and methods for executing the call to a stored procedure.

                Note: This method is optimized for handling stored procedure call statements. Some drivers may send the call statement to the database when the method prepareCall is done; others may wait until the CallableStatement object is executed. This has no direct effect on users; however, it does affect which method throws certain SQLExceptions.

                Result sets created using the returned CallableStatement object will by default be type TYPE_FORWARD_ONLY and have a concurrency level of CONCUR_READ_ONLY.

                HSQLDB-Specific Information:

                Starting with 1.7.2, the support for and behaviour of CallableStatement has changed. Please read the introductory section of the documentation for org.hsqldb.jdbc.jdbcCallableStatement.

                Specified by:
                prepareCall in interface java.sql.Connection
                Parameters:
                sql - a String object that is the SQL statement to be sent to the database; may contain one or more ? parameters.

                Note: Typically the SQL statement is a JDBC function call escape string.

                Returns:
                a new default CallableStatement object containing the pre-compiled SQL statement
                Throws:
                java.sql.SQLException - if a database access error occurs

                See Also:
                prepareCall(String,int,int)

                nativeSQL

                public java.lang.String nativeSQL(java.lang.String sql)
                                           throws java.sql.SQLException
                Converts the given SQL statement into the system's native SQL grammar. A driver may convert the JDBC SQL grammar into its system's native SQL grammar prior to sending it. This method returns the native form of the statement that the driver would have sent.

                HSQLDB-Specific Information:

                Up to and including 1.7.2, HSQLDB converts the JDBC SQL grammar into the system's native SQL grammar prior to sending it, if escape processing is set true; this method returns the native form of the statement that the driver would send in place of client-specified JDBC SQL grammar.

                Before 1.7.2, escape processing was incomplete and also broken in terms of support for nested escapes.

                Starting with 1.7.2, escape processing is complete and handles nesting to arbitrary depth, but enforces a very strict interpretation of the syntax and does not detect or process SQL comments.

                In essence, the HSQLDB engine directly handles the prescribed syntax and date / time formats specified internal to the JDBC escapes. It also directly offers the XOpen / ODBC extended scalar functions specified available internal to the {fn ...} JDBC escape. As such, the driver simply removes the curly braces and JDBC escape codes in the simplest and fastest fashion possible, by replacing them with whitespace. But to avoid a great deal of complexity, certain forms of input whitespace are currently not recognised. For instance, the driver handles "{?= call ...}" but not "{ ?= call ...} or "{? = call ...}"

                Also, comments embedded in SQL are currently not detected or processed and thus may have unexpected effects on the output of this method, for instance causing otherwise valid SQL to become invalid. It is especially important to be aware of this because escape processing is set true by default for Statement objects and is always set true when producing a PreparedStatement from prepareStatement() or CallableStatement from prepareCall(). Currently, it is simply recommended to avoid submitting SQL having comments containing JDBC escape sequence patterns and/or single or double quotation marks, as this will avoid any potential problems. It is intended to implement a less strict handling of whitespace and proper processing of SQL comments at some point in the near future, perhaps before the final 1.7.2 release. In any event, 1.7.2 now correctly processes the following JDBC escape forms to arbitrary nesting depth, but only if the exact whitespace layout described below is used:

                1. {call ...}
                2. {?= call ...}
                3. {fn ...}
                4. {oj ...}
                5. {d ...}
                6. {t ...}
                7. {ts ...}

                Specified by:
                nativeSQL in interface java.sql.Connection
                Parameters:
                sql - a SQL statement that may contain one or more '?' parameter placeholders
                Returns:
                the native form of this statement
                Throws:
                java.sql.SQLException - if a database access error occurs


                setAutoCommit

                public void setAutoCommit(boolean autoCommit)
                                   throws java.sql.SQLException
                Sets this connection's auto-commit mode to the given state. If a connection is in auto-commit mode, then all its SQL statements will be executed and committed as individual transactions. Otherwise, its SQL statements are grouped into transactions that are terminated by a call to either the method commit or the method rollback. By default, new connections are in auto-commit mode.

                The commit occurs when the statement completes or the next execute occurs, whichever comes first. In the case of statements returning a ResultSet object, the statement completes when the last row of the ResultSet object has been retrieved or the ResultSet object has been closed. In advanced cases, a single statement may return multiple results as well as output parameter values. In these cases, the commit occurs when all results and output parameter values have been retrieved.

                NOTE: If this method is called during a transaction, the transaction is committed.

                HSQLDB-Specific Information:

                Up to and including HSQLDB 1.7.2,

                1. All rows of a result set are retrieved internally before the first row can actually be fetched.
                  Therefore, a statement can be considered complete as soon as any XXXStatement.executeXXX method returns.
                2. Multiple result sets and output parameters are not yet supported.

                (boucherb@users)

                Specified by:
                setAutoCommit in interface java.sql.Connection
                Parameters:
                autoCommit - true to enable auto-commit mode; false to disable it
                Throws:
                java.sql.SQLException - if a database access error occurs
                See Also:
                getAutoCommit()

                getAutoCommit

                public boolean getAutoCommit()
                                      throws java.sql.SQLException
                Gets the current auto-commit state.

                Specified by:
                getAutoCommit in interface java.sql.Connection
                Returns:
                the current state of auto-commit mode
                Throws:
                java.sql.SQLException - Description of the Exception
                See Also:
                setAutoCommit(boolean)

                commit

                public void commit()
                            throws java.sql.SQLException
                Makes all changes made since the previous commit/rollback permanent and releases any database locks currently held by the Connection. This method should be used only when auto-commit mode has been disabled.

                HSQLDB-Specific Information:

                Starting with HSQLDB 1.7.2, savepoints are supported both in SQL and via the JDBC interface.

                Using SQL, savepoints may be set, released and used in rollback as follows:

                 SAVEPOINT <savepoint-name>
                 RELEASE SAVEPOINT <savepoint-name>
                 ROLLBACK TO SAVEPOINT <savepoint-name>
                 

                Specified by:
                commit in interface java.sql.Connection
                Throws:
                java.sql.SQLException - if a database access error occurs
                See Also:
                setAutoCommit(boolean)

                rollback

                public void rollback()
                              throws java.sql.SQLException
                Drops all changes made since the previous commit/rollback and releases any database locks currently held by this Connection. This method should be used only when auto- commit has been disabled.

                HSQLDB-Specific Information:

                Starting with HSQLDB 1.7.2, savepoints are fully supported both in SQL and via the JDBC interface.

                Using SQL, savepoints may be set, released and used in rollback as follows:

                 SAVEPOINT <savepoint-name>
                 RELEASE SAVEPOINT <savepoint-name>
                 ROLLBACK TO SAVEPOINT <savepoint-name>
                 

                Specified by:
                rollback in interface java.sql.Connection
                Throws:
                java.sql.SQLException - if a database access error occurs
                See Also:
                setAutoCommit(boolean)

                close

                public void close()
                           throws java.sql.SQLException
                Releases this Connection object's database and JDBC resources immediately instead of waiting for them to be automatically released.

                Calling the method close on a Connection object that is already closed is a no-op.

                Note: A Connection object is automatically closed when it is garbage collected. Certain fatal errors also close a Connection object.

                HSQLDB-Specific Information:

                In 1.7.2, INTERNAL Connection objects are not closable from JDBC client code.

                Specified by:
                close in interface java.sql.Connection
                Throws:
                java.sql.SQLException - if a database access error occurs

                isClosed

                public boolean isClosed()
                Tests to see if a Connection is closed.

                Specified by:
                isClosed in interface java.sql.Connection
                Returns:
                true if the connection is closed; false if it's still open

                getMetaData

                public java.sql.DatabaseMetaData getMetaData()
                                                      throws java.sql.SQLException
                Gets the metadata regarding this connection's database. A Connection's database is able to provide information describing its tables, its supported SQL grammar, its stored procedures, the capabilities of this connection, and so on. This information is made available through a DatabaseMetaData object.

                HSQLDB-Specific Information:

                JDBC DatabaseMetaData methods returning ResultSet were not implemented fully before 1.7.2. Some of these methods always returned empty result sets. Other methods did not accurately reflect all of the MetaData for the category. Also, some method ignored the filters provided as parameters, returning an unfiltered result each time.

                Also, the majority of methods returning ResultSet threw an SQLException when accessed by a non-admin user.


                Starting with HSQLDB 1.7.2, essentially full database metadata is supported.

                For discussion in greater detail, please follow the link to the overview for jdbcDatabaseMetaData, below.

                Specified by:
                getMetaData in interface java.sql.Connection
                Returns:
                a DatabaseMetaData object for this Connection
                Throws:
                java.sql.SQLException - if a database access error occurs
                See Also:
                jdbcDatabaseMetaData

                setReadOnly

                public void setReadOnly(boolean readonly)
                                 throws java.sql.SQLException
                Puts this connection in read-only mode as a hint to enable database optimizations.

                Note: This method should not be called while in the middle of a transaction.

                HSQLDB-Specific Information:

                Up to and including 1.7.2, HSQLDB will commit the current transaction automatically when this method is called.

                Additionally, HSQLDB provides a way to put a whole database in read-only mode. This is done by manually adding the line 'readonly=true' to the database's .properties file while the database is offline. Upon restart, all connections will be readonly, since the entire database will be readonly. To take a database out of readonly mode, simply take the database offline and remove the line 'readonly=true' from the database's .properties file. Upon restart, the database will be in regular (read-write) mode.

                When a database is put in readonly mode, its files are opened in readonly mode, making it possible to create CD-based readonly databases. To create a CD-based readonly database that has CACHED tables and whose .data file is suspected of being highly fragmented, it is recommended that the database first be SHUTDOWN COMPACTed before copying the database files to CD. This will reduce the space required and may improve access times against the .data file which holds the CACHED table data.

                Starting with 1.7.2, an alternate approach to opimizing the .data file before creating a CD-based readonly database is to issue the CHECKPOINT DEFRAG command followed by SHUTDOWN to take the database offline in preparation to burn the database files to CD.

                Specified by:
                setReadOnly in interface java.sql.Connection
                Parameters:
                readonly - The new readOnly value
                Throws:
                java.sql.SQLException - if a database access error occurs

                isReadOnly

                public boolean isReadOnly()
                                   throws java.sql.SQLException
                Tests to see if the connection is in read-only mode.

                Specified by:
                isReadOnly in interface java.sql.Connection
                Returns:
                true if connection is read-only and false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                setCatalog

                public void setCatalog(java.lang.String catalog)
                                throws java.sql.SQLException
                Sets a catalog name in order to select a subspace of this Connection's database in which to work.

                HSQLDB-Specific Information:

                HSQLDB does not yet support catalogs and simply ignores this request.

                Specified by:
                setCatalog in interface java.sql.Connection
                Parameters:
                catalog - the name of a catalog (subspace in this Connection object's database) in which to work (Ignored)
                Throws:
                java.sql.SQLException - if a database access error occurs


                getCatalog

                public java.lang.String getCatalog()
                                            throws java.sql.SQLException
                Returns the Connection's current catalog name.

                HSQLDB-Specific Information:

                HSQLDB does not yet support catalogs and always returns null.

                Specified by:
                getCatalog in interface java.sql.Connection
                Returns:
                the current catalog name or null

                For HSQLDB, this is always null.

                Throws:
                java.sql.SQLException - Description of the Exception

                setTransactionIsolation

                public void setTransactionIsolation(int level)
                                             throws java.sql.SQLException
                Attempts to change the transaction isolation level for this Connection object to the one given. The constants defined in the interface Connection are the possible transaction isolation levels.

                Note: If this method is called during a transaction, the result is implementation-defined.

                Specified by:
                setTransactionIsolation in interface java.sql.Connection
                Parameters:
                level - one of the following Connection constants: Connection.TRANSACTION_READ_UNCOMMITTED , Connection.TRANSACTION_READ_COMMITTED, Connection.TRANSACTION_REPEATABLE_READ, or Connection.TRANSACTION_SERIALIZABLE. (Note that Connection.TRANSACTION_NONE cannot be used because it specifies that transactions are not supported.)
                Throws:
                java.sql.SQLException - if a database access error occurs or the given parameter is not one of the Connection constants

                See Also:
                jdbcDatabaseMetaData.supportsTransactionIsolationLevel(int), getTransactionIsolation()

                getTransactionIsolation

                public int getTransactionIsolation()
                                            throws java.sql.SQLException
                Retrieves this Connection object's current transaction isolation level.

                HSQLDB-Specific Information:

                HSQLDB always returns Connection.TRANSACTION_READ_UNCOMMITED.

                Specified by:
                getTransactionIsolation in interface java.sql.Connection
                Returns:
                the current transaction isolation level, which will be one of the following constants: Connection.TRANSACTION_READ_UNCOMMITTED , Connection.TRANSACTION_READ_COMMITTED, Connection.TRANSACTION_REPEATABLE_READ, Connection.TRANSACTION_SERIALIZABLE, or Connection.TRANSACTION_NONE

                Up to and including 1.7.1, TRANSACTION_READ_UNCOMMITTED is always returned

                Throws:
                java.sql.SQLException - if a database access error occurs

                See Also:
                jdbcDatabaseMetaData.supportsTransactionIsolationLevel(int), setTransactionIsolation

                getWarnings

                public java.sql.SQLWarning getWarnings()
                                                throws java.sql.SQLException
                Retrieves the first warning reported by calls on this Connection object. If there is more than one warning, subsequent warnings will be chained to the first one and can be retrieved by calling the method SQLWarning.getNextWarning on the warning that was retrieved previously.

                This method may not be called on a closed connection; doing so will cause an SQLException to be thrown.

                Note: Subsequent warnings will be chained to this SQLWarning.

                HSQLDB-Specific Information:

                Starting with 1.7.2, HSQLDB produces warnings whenever a createStatement(), prepareStatement() or prepareCall() invocation requests an unsupported but defined combination of result set type, concurrency and holdability, such that another set is substituted.

                Specified by:
                getWarnings in interface java.sql.Connection
                Returns:
                the first SQLWarning object or null if there are none

                Throws:
                java.sql.SQLException - if a database access error occurs or this method is called on a closed connection

                See Also:
                SQLWarning

                clearWarnings

                public void clearWarnings()
                                   throws java.sql.SQLException
                Clears all warnings reported for this Connection object. After a call to this method, the method getWarnings returns null until a new warning is reported for this Connection.

                HSQLDB-Specific Information:

                Before HSQLDB 1.7.2, SQLWarning was not supported, and calls to this method are simply ignored.

                Starting with HSQLDB 1.7.2, the standard behaviour is implemented.

                Specified by:
                clearWarnings in interface java.sql.Connection
                Throws:
                java.sql.SQLException - if a database access error occurs


                createStatement

                public java.sql.Statement createStatement(int type,
                                                          int concurrency)
                                                   throws java.sql.SQLException
                Creates a Statement object that will generate ResultSet objects with the given type and concurrency. This method is the same as the createStatement method above, but it allows the default result set type and result set concurrency type to be overridden.

                HSQLDB-Specific Information:

                Up to HSQLDB 1.6.1, support was provided only for type TYPE_FORWARD_ONLY and concurrency CONCUR_READ_ONLY.

                Starting with HSQLDB 1.7.0, support is now provided for types TYPE_FORWARD_ONLY, and TYPE_SCROLL_INSENSITIVE, with concurrency CONCUR_READ_ONLY. Starting with HSQLDB 1.7.2, the behaviour regarding the type and concurrency values has changed to more closely conform to the specification. That is, if an unsupported combination is requested, a SQLWarning is issued on this Connection and the closest supported combination is used instead.

                Notes:

                Up to 1.6.1, calling this method returned null if the connection was already closed and a supported combination of type and concurrency was specified. This was possibly counter-intuitive to the expectation that an exception would be thrown for closed connections. Starting with 1.7.0. the behaviour is to throw a SQLException if the connection is closed.

                Specified by:
                createStatement in interface java.sql.Connection
                Parameters:
                type - a result set type; one of ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, or ResultSet.TYPE_SCROLL_SENSITIVE (not supported)
                concurrency - a concurrency type; one of ResultSet.CONCUR_READ_ONLY or ResultSet.CONCUR_UPDATABLE (not supported)
                Returns:
                a new Statement object that will, within the release-specific documented limitations of support, generate ResultSet objects with the given type and concurrency
                Throws:
                java.sql.SQLException - if a database access error occurs or the given parameters are not ResultSet constants indicating a supported type and concurrency
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcConnection)

                prepareStatement

                public java.sql.PreparedStatement prepareStatement(java.lang.String sql,
                                                                   int type,
                                                                   int concurrency)
                                                            throws java.sql.SQLException
                Creates a PreparedStatement object that will generate ResultSet objects with the given type and concurrency. This method is the same as the prepareStatement method above, but it allows the default result set type and result set concurrency type to be overridden.

                HSQLDB-Specific Information:

                Starting with HSQLDB 1.7.2, the behaviour regarding the type and concurrency values has changed to more closely conform to the specification. That is, if an unsupported combination is requested, a SQLWarning is issued on this Connection and the closest supported combination is used instead.

                Also starting with 1.7.2, the support for and behaviour of PreparedStatment has changed. Please read the introductory section of the documentation for org.hsqldb.jdbc.jdbcPreparedStatement.

                Specified by:
                prepareStatement in interface java.sql.Connection
                Parameters:
                sql - a String object that is the SQL statement to be sent to the database; may contain one or more ? IN parameters
                type - a result set type; one of ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, or ResultSet.TYPE_SCROLL_SENSITIVE (not supported)
                concurrency - a concurrency type; one of ResultSet.CONCUR_READ_ONLY or ResultSet.CONCUR_UPDATABLE (not supported)
                Returns:
                a new PreparedStatement object containing the pre-compiled SQL statement that will produce ResultSet objects with the given type and concurrency
                Throws:
                java.sql.SQLException - if a database access error occurs or the given parameters are not ResultSet constants indicating a supported type and concurrency
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcConnection)

                prepareCall

                public java.sql.CallableStatement prepareCall(java.lang.String sql,
                                                              int resultSetType,
                                                              int resultSetConcurrency)
                                                       throws java.sql.SQLException
                Creates a CallableStatement object that will generate ResultSet objects with the given type and concurrency. This method is the same as the prepareCall method above, but it allows the default result set type and result set concurrency type to be overridden.

                HSQLDB-Specific Information:

                Starting with HSQLDB 1.7.2, the behaviour regarding the type, concurrency and holdability values has changed to more closely conform to the specification. That is, if an unsupported combination is requrested, a SQLWarning is issued on this Connection and the closest supported combination is used instead.

                Also starting with 1.7.2, the support for and behaviour of CallableStatement has changed. Please read the introdutory section of the documentation for org.hsqldb.jdbc.jdbcCallableStatement.

                Specified by:
                prepareCall in interface java.sql.Connection
                Parameters:
                sql - a String object that is the SQL statement to be sent to the database; may contain one or more ? parameters
                resultSetType - a result set type; one of ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, (not supported) or ResultSet.TYPE_SCROLL_SENSITIVE (not supported)
                resultSetConcurrency - a concurrency type; one of ResultSet.CONCUR_READ_ONLY or ResultSet.CONCUR_UPDATABLE (not supported)
                Returns:
                a new CallableStatement object containing the pre-compiled SQL statement
                Throws:
                java.sql.SQLException - if a database access error occurs or the given parameters are not ResultSet constants indicating a supported type and concurrency
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcConnection)

                getTypeMap

                public java.util.Map getTypeMap()
                                         throws java.sql.SQLException
                Gets the type map object associated with this connection. Unless the application has added an entry to the type map, the map returned will be empty.

                HSQLDB-Specific Information:

                HSQLDB 1.7.2 does not support this feature. Calling this method always throws a SQLException, stating that the function is not supported.

                Specified by:
                getTypeMap in interface java.sql.Connection
                Returns:
                the java.util.Map object associated with this Connection object
                Throws:
                java.sql.SQLException - if a database access error occurs (always, up to HSQLDB 1.7.0, inclusive)
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcConnection)

                setTypeMap

                public void setTypeMap(java.util.Map map)
                                throws java.sql.SQLException
                Installs the given TypeMap object as the type map for this Connection object. The type map will be used for the custom mapping of SQL structured types and distinct types.

                HSQLDB-Specific Information:

                HSQLDB 1.7.2 does not support this feature. Calling this method always throws a SQLException, stating that the function is not supported.

                Specified by:
                setTypeMap in interface java.sql.Connection
                Parameters:
                map - the java.util.Map object to install as the replacement for this Connection object's default type map
                Throws:
                java.sql.SQLException - if a database access error occurs or the given parameter is not a java.util.Map object (always, up to HSQLDB 1.7.0, inclusive)
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcConnection)
                See Also:
                getTypeMap()

                setHoldability

                public void setHoldability(int holdability)
                                    throws java.sql.SQLException
                Changes the holdability of ResultSet objects created using this Connection object to the given holdability.

                HSQLDB-Specific Information:

                Starting with HSQLDB 1.7.2, this feature is supported.

                As of 1.7.2, only HOLD_CURSORS_OVER_COMMIT is supported; supplying any other value will throw an exception.

                Specified by:
                setHoldability in interface java.sql.Connection
                Parameters:
                holdability - a ResultSet holdability constant; one of ResultSet.HOLD_CURSORS_OVER_COMMIT or ResultSet.CLOSE_CURSORS_AT_COMMIT
                Throws:
                java.sql.SQLException - if a database access occurs, the given parameter is not a ResultSet constant indicating holdability, or the given holdability is not supported
                Since:
                JDK 1.4, HSQLDB 1.7.2
                See Also:
                getHoldability(), ResultSet

                getHoldability

                public int getHoldability()
                                   throws java.sql.SQLException
                Retrieves the current holdability of ResultSet objects created using this Connection object.

                HSQLDB-Specific Information:

                Starting with HSQLDB 1.7.2, this feature is supported.

                Calling this method always returns HOLD_CURSORS_OVER_COMMIT.

                Specified by:
                getHoldability in interface java.sql.Connection
                Returns:
                the holdability, one of ResultSet.HOLD_CURSORS_OVER_COMMIT or ResultSet.CLOSE_CURSORS_AT_COMMIT
                Throws:
                java.sql.SQLException - if a database access occurs
                Since:
                JDK 1.4, HSQLDB 1.7.2
                See Also:
                setHoldability(int), ResultSet

                setSavepoint

                public java.sql.Savepoint setSavepoint()
                                                throws java.sql.SQLException
                Creates an unnamed savepoint in the current transaction and returns the new Savepoint object that represents it.

                HSQLDB-Specific Information:

                HSQLDB 1.7.2 does not support this feature.

                Calling this method always throws a SQLException, stating that the function is not supported.

                Use setSavepoint(String name) instead

                Specified by:
                setSavepoint in interface java.sql.Connection
                Returns:
                the new Savepoint object
                Throws:
                java.sql.SQLException - if a database access error occurs or this Connection object is currently in auto-commit mode
                Since:
                JDK 1.4, HSQLDB 1.7.2
                See Also:
                jdbcSavepoint, Savepoint

                setSavepoint

                public java.sql.Savepoint setSavepoint(java.lang.String name)
                                                throws java.sql.SQLException
                Creates a savepoint with the given name in the current transaction and returns the new Savepoint object that represents it.

                Specified by:
                setSavepoint in interface java.sql.Connection
                Parameters:
                name - a String containing the name of the savepoint
                Returns:
                the new Savepoint object
                Throws:
                java.sql.SQLException - if a database access error occurs or this Connection object is currently in auto-commit mode
                Since:
                JDK 1.4, HSQLDB 1.7.2
                See Also:
                jdbcSavepoint, Savepoint

                rollback

                public void rollback(java.sql.Savepoint savepoint)
                              throws java.sql.SQLException
                Undoes all changes made after the given Savepoint object was set.

                This method should be used only when auto-commit has been disabled.

                Specified by:
                rollback in interface java.sql.Connection
                Parameters:
                savepoint - the Savepoint object to roll back to
                Throws:
                java.sql.SQLException - if a database access error occurs, the Savepoint object is no longer valid, or this Connection object is currently in auto-commit mode
                Since:
                JDK 1.4, HSQLDB 1.7.2
                See Also:
                jdbcSavepoint, Savepoint, rollback()

                releaseSavepoint

                public void releaseSavepoint(java.sql.Savepoint savepoint)
                                      throws java.sql.SQLException
                Removes the given Savepoint object from the current transaction. Any reference to the savepoint after it have been removed will cause an SQLException to be thrown.

                Specified by:
                releaseSavepoint in interface java.sql.Connection
                Parameters:
                savepoint - the Savepoint object to be removed
                Throws:
                java.sql.SQLException - if a database access error occurs or the given Savepoint object is not a valid savepoint in the current transaction
                Since:
                JDK 1.4, HSQLDB 1.7.2
                See Also:
                jdbcSavepoint, Savepoint

                createStatement

                public java.sql.Statement createStatement(int resultSetType,
                                                          int resultSetConcurrency,
                                                          int resultSetHoldability)
                                                   throws java.sql.SQLException
                Creates a Statement object that will generate ResultSet objects with the given type, concurrency, and holdability. This method is the same as the createStatement method above, but it allows the default result set type, concurrency, and holdability to be overridden.

                HSQLDB-Specific Information:

                Starting with HSQLDB 1.7.2, this feature is supported.

                Starting with HSQLDB 1.7.2, the behaviour regarding the type, concurrency and holdability values has changed to more closely conform to the specification. That is, if an unsupported combination is requested, a SQLWarning is issued on this Connection and the closest supported combination is used instead.

                Specified by:
                createStatement in interface java.sql.Connection
                Parameters:
                resultSetType - one of the following ResultSet constants: ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, or ResultSet.TYPE_SCROLL_SENSITIVE
                resultSetConcurrency - one of the following ResultSet constants: ResultSet.CONCUR_READ_ONLY or ResultSet.CONCUR_UPDATABLE
                resultSetHoldability - one of the following code>ResultSet constants: ResultSet.HOLD_CURSORS_OVER_COMMIT or ResultSet.CLOSE_CURSORS_AT_COMMIT
                Returns:
                a new Statement object that will generate ResultSet objects with the given type, concurrency, and holdability
                Throws:
                java.sql.SQLException - if a database access error occurs or the given parameters are not ResultSet constants indicating type, concurrency, and holdability
                Since:
                JDK 1.4, HSQLDB 1.7.2
                See Also:
                ResultSet

                prepareStatement

                public java.sql.PreparedStatement prepareStatement(java.lang.String sql,
                                                                   int resultSetType,
                                                                   int resultSetConcurrency,
                                                                   int resultSetHoldability)
                                                            throws java.sql.SQLException
                Creates a PreparedStatement object that will generate ResultSet objects with the given type, concurrency, and holdability.

                This method is the same as the prepareStatement method above, but it allows the default result set type, concurrency, and holdability to be overridden.

                HSQLDB-Specific Information:

                Starting with HSQLDB 1.7.2, this feature is supported.

                Starting with HSQLDB 1.7.2, the behaviour regarding the type, concurrency and holdability values has changed to more closely conform to the specification. That is, if an unsupported combination is requested, a SQLWarning is issued on this Connection and the closest supported combination is used instead.

                Also starting with 1.7.2, the support for and behaviour of PreparedStatment has changed. Please read the introductory section of the documentation for org.hsqldb.jdbc.jdbcPreparedStatement.

                Specified by:
                prepareStatement in interface java.sql.Connection
                Parameters:
                sql - a String object that is the SQL statement to be sent to the database; may contain one or more ? IN parameters
                resultSetType - one of the following ResultSet constants: ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, or ResultSet.TYPE_SCROLL_SENSITIVE
                resultSetConcurrency - one of the following ResultSet constants: ResultSet.CONCUR_READ_ONLY or ResultSet.CONCUR_UPDATABLE
                resultSetHoldability - one of the following ResultSet constants: ResultSet.HOLD_CURSORS_OVER_COMMIT or ResultSet.CLOSE_CURSORS_AT_COMMIT
                Returns:
                a new PreparedStatement object, containing the pre-compiled SQL statement, that will generate ResultSet objects with the given type, concurrency, and holdability
                Throws:
                java.sql.SQLException - if a database access error occurs or the given parameters are not ResultSet constants indicating type, concurrency, and holdability
                Since:
                JDK 1.4, HSQLDB 1.7.2
                See Also:
                ResultSet

                prepareCall

                public java.sql.CallableStatement prepareCall(java.lang.String sql,
                                                              int resultSetType,
                                                              int resultSetConcurrency,
                                                              int resultSetHoldability)
                                                       throws java.sql.SQLException
                Creates a CallableStatement object that will generate ResultSet objects with the given type and concurrency. This method is the same as the prepareCall method above, but it allows the default result set type, result set concurrency type and holdability to be overridden.

                HSQLDB-Specific Information:

                Starting with HSQLDB 1.7.2, this feature is supported.

                Starting with HSQLDB 1.7.2, the behaviour regarding the type, concurrency and holdability values has changed to more closely conform to the specification. That is, if an unsupported combination is requrested, a SQLWarning is issued on this Connection and the closest supported combination is used instead.

                Also starting with 1.7.2, the support for and behaviour of CallableStatment has changed. Please read the introdutory section of the documentation for org.hsqldb.jdbc.jdbcCallableStatement.

                Specified by:
                prepareCall in interface java.sql.Connection
                Parameters:
                sql - a String object that is the SQL statement to be sent to the database; may contain on or more ? parameters
                resultSetType - one of the following ResultSet constants: ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, or ResultSet.TYPE_SCROLL_SENSITIVE
                resultSetConcurrency - one of the following ResultSet constants: ResultSet.CONCUR_READ_ONLY or ResultSet.CONCUR_UPDATABLE
                resultSetHoldability - one of the following ResultSet constants: ResultSet.HOLD_CURSORS_OVER_COMMIT or ResultSet.CLOSE_CURSORS_AT_COMMIT
                Returns:
                a new CallableStatement object, containing the pre-compiled SQL statement, that will generate ResultSet objects with the given type, concurrency, and holdability
                Throws:
                java.sql.SQLException - if a database access error occurs or the given parameters are not ResultSet constants indicating type, concurrency, and holdability
                Since:
                JDK 1.4, HSQLDB 1.7.2
                See Also:
                ResultSet

                prepareStatement

                public java.sql.PreparedStatement prepareStatement(java.lang.String sql,
                                                                   int autoGeneratedKeys)
                                                            throws java.sql.SQLException
                Creates a default PreparedStatement object that has the capability to retrieve auto-generated keys. The given constant tells the driver whether it should make auto-generated keys available for retrieval. This parameter is ignored if the SQL statement is not an INSERT statement.

                Note: This method is optimized for handling parametric SQL statements that benefit from precompilation. If the driver supports precompilation, the method prepareStatement will send the statement to the database for precompilation. Some drivers may not support precompilation. In this case, the statement may not be sent to the database until the PreparedStatement object is executed. This has no direct effect on users; however, it does affect which methods throw certain SQLExceptions.

                Result sets created using the returned PreparedStatement object will by default be type TYPE_FORWARD_ONLY and have a concurrency level of CONCUR_READ_ONLY.

                HSQLDB-Specific Information:

                HSQLDB 1.7.2 does not support this feature.

                Calling this method always throws a SQLException, stating that the function is not supported.

                Specified by:
                prepareStatement in interface java.sql.Connection
                Parameters:
                sql - an SQL statement that may contain one or more '?' IN parameter placeholders
                autoGeneratedKeys - a flag indicating that auto-generated keys should be returned, one of code>Statement.RETURN_GENERATED_KEYS or Statement.NO_GENERATED_KEYS.
                Returns:
                a new PreparedStatement object, containing the pre-compiled SQL statement, that will have the capability of returning auto-generated keys
                Throws:
                java.sql.SQLException - if a database access error occurs or the given parameter is not a Statement constant indicating whether auto-generated keys should be returned
                Since:
                JDK 1.4, HSQLDB 1.7.2

                prepareStatement

                public java.sql.PreparedStatement prepareStatement(java.lang.String sql,
                                                                   int[] columnIndexes)
                                                            throws java.sql.SQLException
                Creates a default PreparedStatement object capable of returning the auto-generated keys designated by the given array. This array contains the indexes of the columns in the target table that contain the auto-generated keys that should be made available. This array is ignored if the SQL statement is not an INSERT statement.

                An SQL statement with or without IN parameters can be pre-compiled and stored in a PreparedStatement object. This object can then be used to efficiently execute this statement multiple times.

                Note: This method is optimized for handling parametric SQL statements that benefit from precompilation. If the driver supports precompilation, the method prepareStatement will send the statement to the database for precompilation. Some drivers may not support precompilation. In this case, the statement may not be sent to the database until the PreparedStatement object is executed. This has no direct effect on users; however, it does affect which methods throw certain SQLExceptions.

                Result sets created using the returned PreparedStatement object will by default be type TYPE_FORWARD_ONLY and have a concurrency level of CONCUR_READ_ONLY.

                HSQLDB-Specific Information:

                HSQLDB 1.7.2 does not support this feature.

                Calling this method always throws a SQLException, stating that the function is not supported.

                Specified by:
                prepareStatement in interface java.sql.Connection
                Parameters:
                sql - an SQL statement that may contain one or more '?' IN parameter placeholders
                columnIndexes - an array of column indexes indicating the columns that should be returned from the inserted row or rows
                Returns:
                a new PreparedStatement object, containing the pre-compiled statement, that is capable of returning the auto-generated keys designated by the given array of column indexes
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7.2

                prepareStatement

                public java.sql.PreparedStatement prepareStatement(java.lang.String sql,
                                                                   java.lang.String[] columnNames)
                                                            throws java.sql.SQLException
                Creates a default PreparedStatement object capable of returning the auto-generated keys designated by the given array. This array contains the names of the columns in the target table that contain the auto-generated keys that should be returned. This array is ignored if the SQL statement is not an INSERT statement.

                An SQL statement with or without IN parameters can be pre-compiled and stored in a PreparedStatement object. This object can then be used to efficiently execute this statement multiple times.

                Note: This method is optimized for handling parametric SQL statements that benefit from precompilation. If the driver supports precompilation, the method prepareStatement will send the statement to the database for precompilation. Some drivers may not support precompilation. In this case, the statement may not be sent to the database until the PreparedStatement object is executed. This has no direct effect on users; however, it does affect which methods throw certain SQLExceptions.

                Result sets created using the returned PreparedStatement object will by default be type TYPE_FORWARD_ONLY and have a concurrency level of CONCUR_READ_ONLY.

                HSQLDB-Specific Information:

                HSQLDB 1.7.2 does not support this feature.

                Calling this method always throws a SQLException, stating that the function is not supported.

                Specified by:
                prepareStatement in interface java.sql.Connection
                Parameters:
                sql - an SQL statement that may contain one or more '?' IN parameter placeholders
                columnNames - an array of column names indicating the columns that should be returned from the inserted row or rows
                Returns:
                a new PreparedStatement object, containing the pre-compiled statement, that is capable of returning the auto-generated keys designated by the given array of column names
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7.2

                reset

                public void reset()
                           throws java.sql.SQLException
                Resets this connection so it can be used again. Used when connections are returned to a connection pool.

                Throws:
                java.sql.SQLException


                Copyright 2001 - 2005 HSQL Development Group. All Rights Reserved. hsqldb-1.8.0.10.orig/doc/src/org/hsqldb/jdbc/class-use/0000755000175000017500000000000010253114045021013 5ustar renerenehsqldb-1.8.0.10.orig/doc/src/org/hsqldb/jdbc/class-use/jdbcParameterMetaData.html0000644000175000017500000001332711020614565026060 0ustar renerene Uses of Class org.hsqldb.jdbc.jdbcParameterMetaData (HSQLDB 1.8.0.10 API)

                Uses of Class
                org.hsqldb.jdbc.jdbcParameterMetaData

                No usage of org.hsqldb.jdbc.jdbcParameterMetaData



                Copyright 2001 - 2005 HSQL Development Group. All Rights Reserved. hsqldb-1.8.0.10.orig/doc/src/org/hsqldb/jdbc/class-use/jdbcBlob.html0000644000175000017500000001315711020614565023416 0ustar renerene Uses of Class org.hsqldb.jdbc.jdbcBlob (HSQLDB 1.8.0.10 API)

                Uses of Class
                org.hsqldb.jdbc.jdbcBlob

                No usage of org.hsqldb.jdbc.jdbcBlob



                Copyright 2001 - 2005 HSQL Development Group. All Rights Reserved. hsqldb-1.8.0.10.orig/doc/src/org/hsqldb/jdbc/class-use/Util.html0000644000175000017500000001311711020614565022626 0ustar renerene Uses of Class org.hsqldb.jdbc.Util (HSQLDB 1.8.0.10 API)

                Uses of Class
                org.hsqldb.jdbc.Util

                No usage of org.hsqldb.jdbc.Util



                Copyright 2001 - 2005 HSQL Development Group. All Rights Reserved. hsqldb-1.8.0.10.orig/doc/src/org/hsqldb/jdbc/class-use/jdbcResultSetMetaData.html0000644000175000017500000001332711020614565026072 0ustar renerene Uses of Class org.hsqldb.jdbc.jdbcResultSetMetaData (HSQLDB 1.8.0.10 API)

                Uses of Class
                org.hsqldb.jdbc.jdbcResultSetMetaData

                No usage of org.hsqldb.jdbc.jdbcResultSetMetaData



                Copyright 2001 - 2005 HSQL Development Group. All Rights Reserved. hsqldb-1.8.0.10.orig/doc/src/org/hsqldb/jdbc/class-use/jdbcStatement.html0000644000175000017500000001732011020614565024500 0ustar renerene Uses of Class org.hsqldb.jdbc.jdbcStatement (HSQLDB 1.8.0.10 API)

                Uses of Class
                org.hsqldb.jdbc.jdbcStatement

                Packages that use jdbcStatement
                org.hsqldb.jdbc   
                 

                Uses of jdbcStatement in org.hsqldb.jdbc
                 

                Subclasses of jdbcStatement in org.hsqldb.jdbc
                 class jdbcCallableStatement
                           The interface used to execute SQL stored procedures.
                 class jdbcPreparedStatement
                           An object that represents a precompiled SQL statement.
                 



                Copyright 2001 - 2005 HSQL Development Group. All Rights Reserved. hsqldb-1.8.0.10.orig/doc/src/org/hsqldb/jdbc/class-use/jdbcPreparedStatement.html0000644000175000017500000001661211020614565026166 0ustar renerene Uses of Class org.hsqldb.jdbc.jdbcPreparedStatement (HSQLDB 1.8.0.10 API)

                Uses of Class
                org.hsqldb.jdbc.jdbcPreparedStatement

                Packages that use jdbcPreparedStatement
                org.hsqldb.jdbc   
                 

                Uses of jdbcPreparedStatement in org.hsqldb.jdbc
                 

                Subclasses of jdbcPreparedStatement in org.hsqldb.jdbc
                 class jdbcCallableStatement
                           The interface used to execute SQL stored procedures.
                 



                Copyright 2001 - 2005 HSQL Development Group. All Rights Reserved. hsqldb-1.8.0.10.orig/doc/src/org/hsqldb/jdbc/class-use/jdbcClob.html0000644000175000017500000001315711020614565023417 0ustar renerene Uses of Class org.hsqldb.jdbc.jdbcClob (HSQLDB 1.8.0.10 API)

                Uses of Class
                org.hsqldb.jdbc.jdbcClob

                No usage of org.hsqldb.jdbc.jdbcClob



                Copyright 2001 - 2005 HSQL Development Group. All Rights Reserved. hsqldb-1.8.0.10.orig/doc/src/org/hsqldb/jdbc/class-use/jdbcResultSet.html0000644000175000017500000001322711020614565024470 0ustar renerene Uses of Class org.hsqldb.jdbc.jdbcResultSet (HSQLDB 1.8.0.10 API)

                Uses of Class
                org.hsqldb.jdbc.jdbcResultSet

                No usage of org.hsqldb.jdbc.jdbcResultSet



                Copyright 2001 - 2005 HSQL Development Group. All Rights Reserved. hsqldb-1.8.0.10.orig/doc/src/org/hsqldb/jdbc/class-use/jdbcCallableStatement.html0000644000175000017500000001332711020614565026123 0ustar renerene Uses of Class org.hsqldb.jdbc.jdbcCallableStatement (HSQLDB 1.8.0.10 API)

                Uses of Class
                org.hsqldb.jdbc.jdbcCallableStatement

                No usage of org.hsqldb.jdbc.jdbcCallableStatement



                Copyright 2001 - 2005 HSQL Development Group. All Rights Reserved. hsqldb-1.8.0.10.orig/doc/src/org/hsqldb/jdbc/class-use/jdbcDataSourceFactory.html0000644000175000017500000001332711020614565026121 0ustar renerene Uses of Class org.hsqldb.jdbc.jdbcDataSourceFactory (HSQLDB 1.8.0.10 API)

                Uses of Class
                org.hsqldb.jdbc.jdbcDataSourceFactory

                No usage of org.hsqldb.jdbc.jdbcDataSourceFactory



                Copyright 2001 - 2005 HSQL Development Group. All Rights Reserved. hsqldb-1.8.0.10.orig/doc/src/org/hsqldb/jdbc/class-use/jdbcDataSource.html0000644000175000017500000001323711020614565024571 0ustar renerene Uses of Class org.hsqldb.jdbc.jdbcDataSource (HSQLDB 1.8.0.10 API)

                Uses of Class
                org.hsqldb.jdbc.jdbcDataSource

                No usage of org.hsqldb.jdbc.jdbcDataSource



                Copyright 2001 - 2005 HSQL Development Group. All Rights Reserved. hsqldb-1.8.0.10.orig/doc/src/org/hsqldb/jdbc/class-use/jdbcSavepoint.html0000644000175000017500000001322711020614565024506 0ustar renerene Uses of Class org.hsqldb.jdbc.jdbcSavepoint (HSQLDB 1.8.0.10 API)

                Uses of Class
                org.hsqldb.jdbc.jdbcSavepoint

                No usage of org.hsqldb.jdbc.jdbcSavepoint



                Copyright 2001 - 2005 HSQL Development Group. All Rights Reserved. hsqldb-1.8.0.10.orig/doc/src/org/hsqldb/jdbc/class-use/jdbcConnection.html0000644000175000017500000001677311020614565024646 0ustar renerene Uses of Class org.hsqldb.jdbc.jdbcConnection (HSQLDB 1.8.0.10 API)

                Uses of Class
                org.hsqldb.jdbc.jdbcConnection

                Packages that use jdbcConnection
                org.hsqldb.jdbc   
                 

                Uses of jdbcConnection in org.hsqldb.jdbc
                 

                Constructors in org.hsqldb.jdbc with parameters of type jdbcConnection
                jdbcCallableStatement(jdbcConnection c, java.lang.String sql, int type)
                          Constructs a new jdbcCallableStatement with the specified connection and result type.
                 



                Copyright 2001 - 2005 HSQL Development Group. All Rights Reserved. hsqldb-1.8.0.10.orig/doc/src/org/hsqldb/jdbc/class-use/jdbcDatabaseMetaData.html0000644000175000017500000001331711020614565025643 0ustar renerene Uses of Class org.hsqldb.jdbc.jdbcDatabaseMetaData (HSQLDB 1.8.0.10 API)

                Uses of Class
                org.hsqldb.jdbc.jdbcDatabaseMetaData

                No usage of org.hsqldb.jdbc.jdbcDatabaseMetaData



                Copyright 2001 - 2005 HSQL Development Group. All Rights Reserved. hsqldb-1.8.0.10.orig/doc/src/org/hsqldb/jdbc/class-use/jdbcColumnMetaData.html0000644000175000017500000001327711020614565025401 0ustar renerene Uses of Class org.hsqldb.jdbc.jdbcColumnMetaData (HSQLDB 1.8.0.10 API)

                Uses of Class
                org.hsqldb.jdbc.jdbcColumnMetaData

                No usage of org.hsqldb.jdbc.jdbcColumnMetaData



                Copyright 2001 - 2005 HSQL Development Group. All Rights Reserved. hsqldb-1.8.0.10.orig/doc/src/org/hsqldb/jdbc/jdbcDatabaseMetaData.html0000644000175000017500000121532111020614567023746 0ustar renerene jdbcDatabaseMetaData (HSQLDB 1.8.0.10 API)

                org.hsqldb.jdbc
                Class jdbcDatabaseMetaData

                java.lang.Object
                  extended byorg.hsqldb.jdbc.jdbcDatabaseMetaData
                
                All Implemented Interfaces:
                java.sql.DatabaseMetaData

                public class jdbcDatabaseMetaData
                extends java.lang.Object
                implements java.sql.DatabaseMetaData

                Comprehensive information about the database as a whole.

                This interface is implemented by driver vendors to let users know the capabilities of a Database Management System (DBMS) in combination with the driver based on JDBCTM technology ("JDBC driver") that is used with it. Different relational DBMSs often support different features, implement features in different ways, and use different data types. In addition, a driver may implement a feature on top of what the DBMS offers. Information returned by methods in this interface applies to the capabilities of a particular driver and a particular DBMS working together. Note that as used in this documentation, the term "database" is used generically to refer to both the driver and DBMS.

                A user for this interface is commonly a tool that needs to discover how to deal with the underlying DBMS. This is especially true for applications that are intended to be used with more than one DBMS. For example, a tool might use the method getTypeInfo to find out what data types can be used in a CREATE TABLE statement. Or a user might call the method supportsCorrelatedSubqueries to see if it is possible to use a correlated subquery or supportsBatchUpdates to see if it is possible to use batch updates.

                Some DatabaseMetaData methods return lists of information in the form of ResultSet objects. Regular ResultSet methods, such as getString and getInt, can be used to retrieve the data from these ResultSet objects. If a given form of metadata is not available, the ResultSet getter methods throw an SQLException.

                Some DatabaseMetaData methods take arguments that are String patterns. These arguments all have names such as fooPattern. Within a pattern String, "%" means match any substring of 0 or more characters, and "_" means match any one character. Only metadata entries matching the search pattern are returned. If a search pattern argument is set to null, that argument's criterion will be dropped from the search.

                A method that gets information about a feature that the driver does not support will throw an SQLException. In the case of methods that return a ResultSet object, either a ResultSet object (which may be empty) is returned or an SQLException is thrown.

                HSQLDB-Specific Information:

                Starting with HSQLDB 1.7.2, an option is provided to allow alternate system table production implementations. In this distribution, there are three implementations whose behaviour ranges from producing no system tables at all to producing a richer and more complete body of information about an HSQLDB database than was previously available. The information provided through the default implementation is, unlike previous versions, accessible to all database users, regardless of admin status. This is now possible because the table content it produces for each user is pre-filtered, based on the user's access rights. That is, each system table now acts like a security-aware View.

                The process of installing a system table production class is transparent and occurs dynamically at runtime during the opening sequence of a Database instance, in the newDatabaseInformation() factory method of the revised DatabaseInformation class, using the following steps:

                1. If a class whose fully qualified name is org.hsqldb.DatabaseInformationFull can be found and it has an accesible constructor that takes an org.hsqldb.Database object as its single parameter, then an instance of that class is reflectively instantiated and is used by the database instance to produce its system tables.

                2. If 1.) fails, then the process is repeated, attempting to create an instance of org.hsqldb.DatabaseInformationMain (which provides just the core set of system tables required to service this class, but now does so in a more security aware and comprehensive fashion).

                3. If 2.) fails, then an instance of org.hsqldb.DatabaseInformation is installed (that, by default, produces no system tables, meaning that calls to all related methods in this class will fail, throwing an SQLException stating that a required system table is not found).

                The process of searching for alternate implementations of database support classes, ending with the installation of a minimal but functional default will be refered to henceforth as graceful degradation. This process is advantageous in that it allows developers and administrators to easily choose packaging options, simply by adding to or deleting concerned classes from an HSQLDB installation, without worry over providing complex initialization properties or disrupting the core operation of the engine. In this particular context, graceful degradation allows easy choices regarding database metadata, spanning the range of full (design-time), custom-written, minimal (production-time) or null (space-constrained) system table production implementations.

                In the default full implementation, a number of new system tables are provided that, although not used directly by this class, present previously unavailable information about the database, such as about its triggers and aliases.

                In order to better support graphical database exploration tools and as an experimental intermediate step toward more fully supporting SQL9n and SQL200n, the default installed DatabaseInformation implementation is also capable of reporting pseudo name space information, such as the catalog (database URI) of database objects.

                The catalog reporting feature is turned off by default but can be turned on by providing the appropriate entries in the database properties file (see the advanced topics section of the product documentation).

                When the feature is turned on, catalog is reported using the following conventions:

                1. All objects are reported as having a catalog equal to the URI of the database, which is equivalent to the catenation of the <type> and <path> portions of the HSQLDB internal JDBC connection URL.

                  Examples:

                       "jdbc:hsqldb:file:test"      => "file:test"
                       "jdbc:hsqldb:mem:."          => "mem:."
                       "jdbc:hsqldb:hsql:/host/..." => URI of aliased database
                       "jdbc:hsqldb:http:/host/..." => URI of aliased database
                       
                  Note: No provision is made for qualifying database objects by catalog in DML or DDL SQL. This feature is functional only with respect to browsing the database through the DatabaseMetaData and system table interfaces.

                Again, it should be well understood that this feature provide an emulation of catalog support and is intended only as an experimental implementation to enhance the browsing experience when using graphical database explorers and to make a first foray into tackling the issue of implementing true catalog support in the future.

                Due the nature of the new database system table production process, fewer assumptions can be made by this class about what information is made available in the system tables supporting DatabaseMetaData methods. Because of this, the SQL queries behind the ResultSet producing methods have been cleaned up and made to adhere more strictly to the JDBC contracts specified in relation to the method parameters.

                One of the remaining assumptions concerns the approximate argument of getIndexInfo(). This parameter is still ignored since there is not yet any process in place to internally gather and persist table and index statistics. A primitive version of a statistics gathering and reporting subsystem may be introduced some time in the 1.7.x series of releases, but no hard decision has yet been made.

                Another assumption is that simple select queries against certain system tables will return rows in JDBC contract order in the absence of an "ORDER BY" clause. The reason for this is that results come back much faster when no "ORDER BY" clause is used. Developers wishing to extend or replace an existing system table production class should be aware of this, either adding the contract "ORDER BY" clause to the SQL in corresponding methods in this class, or, better, by maintaing rows in the correct order in the underlying system tables, prefereably by creating appropriate primary indices.


                JRE 1.1.x Notes:

                In general, JDBC 2 support requires Java 1.2 and above, and JDBC3 requires Java 1.4 and above. In HSQLDB, support for methods introduced in different versions of JDBC depends on the JDK version used for compiling and building HSQLDB.

                Since 1.7.0, it is possible to build the product so that all JDBC 2 methods can be called while executing under the version 1.1.x Java Runtime EnvironmentTM. However, some of these method calls require int values that are defined only in the JDBC 2 or greater version of the ResultSet interface. For this reason, when the product is compiled under JDK 1.1.x, these values are defined in jdbcResultSet.

                In a JRE 1.1.x environment, calling JDBC 2 methods that take or return the JDBC2-only ResultSet values can be achieved by referring to them in parameter specifications and return value comparisons, respectively, as follows:

                 jdbcResultSet.FETCH_FORWARD
                 jdbcResultSet.TYPE_FORWARD_ONLY
                 jdbcResultSet.TYPE_SCROLL_INSENSITIVE
                 jdbcResultSet.CONCUR_READ_ONLY
                 // etc
                 
                However, please note that code written in such a manner will not be compatible for use with other JDBC 2 drivers, since they expect and use ResultSet, rather than jdbcResultSet. Also note, this feature is offered solely as a convenience to developers who must work under JDK 1.1.x due to operating constraints, yet wish to use some of the more advanced features available under the JDBC 2 specification.

                (fredt@users)
                (boucherb@users)

                Author:
                boucherb@users, fredt@users
                See Also:
                DatabaseInformation, DatabaseInformationMain, DatabaseInformationFull

                Field Summary
                 
                Fields inherited from interface java.sql.DatabaseMetaData
                attributeNoNulls, attributeNullable, attributeNullableUnknown, bestRowNotPseudo, bestRowPseudo, bestRowSession, bestRowTemporary, bestRowTransaction, bestRowUnknown, columnNoNulls, columnNullable, columnNullableUnknown, importedKeyCascade, importedKeyInitiallyDeferred, importedKeyInitiallyImmediate, importedKeyNoAction, importedKeyNotDeferrable, importedKeyRestrict, importedKeySetDefault, importedKeySetNull, procedureColumnIn, procedureColumnInOut, procedureColumnOut, procedureColumnResult, procedureColumnReturn, procedureColumnUnknown, procedureNoNulls, procedureNoResult, procedureNullable, procedureNullableUnknown, procedureResultUnknown, procedureReturnsResult, sqlStateSQL99, sqlStateXOpen, tableIndexClustered, tableIndexHashed, tableIndexOther, tableIndexStatistic, typeNoNulls, typeNullable, typeNullableUnknown, typePredBasic, typePredChar, typePredNone, typeSearchable, versionColumnNotPseudo, versionColumnPseudo, versionColumnUnknown
                 
                Method Summary
                 boolean allProceduresAreCallable()
                          Retrieves whether the current user can call all the procedures returned by the method getProcedures.
                 boolean allTablesAreSelectable()
                          Retrieves whether the current user can use all the tables returned by the method getTables in a SELECT statement.
                 boolean dataDefinitionCausesTransactionCommit()
                          Retrieves whether a data definition statement within a transaction forces the transaction to commit.
                 boolean dataDefinitionIgnoredInTransactions()
                          Retrieves whether this database ignores a data definition statement within a transaction.
                 boolean deletesAreDetected(int type)
                          Retrieves whether or not a visible row delete can be detected by calling the method ResultSet.rowDeleted.
                 boolean doesMaxRowSizeIncludeBlobs()
                          Retrieves whether the return value for the method getMaxRowSize includes the SQL data types LONGVARCHAR and LONGVARBINARY.
                 java.sql.ResultSet getAttributes(java.lang.String catalog, java.lang.String schemaPattern, java.lang.String typeNamePattern, java.lang.String attributeNamePattern)
                          Retrieves a description of the given attribute of the given type for a user-defined type (UDT) that is available in the given schema and catalog.
                 java.sql.ResultSet getBestRowIdentifier(java.lang.String catalog, java.lang.String schema, java.lang.String table, int scope, boolean nullable)
                          Retrieves a description of a table's optimal set of columns that uniquely identifies a row.
                 java.sql.ResultSet getCatalogs()
                          Retrieves the catalog names available in this database.
                 java.lang.String getCatalogSeparator()
                          Retrieves the String that this database uses as the separator between a catalog and table name.
                 java.lang.String getCatalogTerm()
                          Retrieves the database vendor's preferred term for "catalog".
                 java.sql.ResultSet getColumnPrivileges(java.lang.String catalog, java.lang.String schema, java.lang.String table, java.lang.String columnNamePattern)
                          Retrieves a description of the access rights for a table's columns.
                 java.sql.ResultSet getColumns(java.lang.String catalog, java.lang.String schemaPattern, java.lang.String tableNamePattern, java.lang.String columnNamePattern)
                          Retrieves a description of table columns available in the specified catalog.
                 java.sql.Connection getConnection()
                          Retrieves the connection that produced this metadata object.
                 java.sql.ResultSet getCrossReference(java.lang.String primaryCatalog, java.lang.String primarySchema, java.lang.String primaryTable, java.lang.String foreignCatalog, java.lang.String foreignSchema, java.lang.String foreignTable)
                          Retrieves a description of the foreign key columns in the given foreign key table that reference the primary key columns of the given primary key table (describe how one table imports another's key).
                 int getDatabaseMajorVersion()
                          Retrieves the major version number of the underlying database.
                 int getDatabaseMinorVersion()
                          Retrieves the minor version number of the underlying database.
                 java.lang.String getDatabaseProductName()
                          Retrieves the name of this database product.
                 java.lang.String getDatabaseProductVersion()
                          Retrieves the version number of this database product.
                 int getDefaultTransactionIsolation()
                          Retrieves this database's default transaction isolation level.
                 int getDriverMajorVersion()
                          Retrieves this JDBC driver's major version number.
                 int getDriverMinorVersion()
                          Retrieves this JDBC driver's minor version number.
                 java.lang.String getDriverName()
                          Retrieves the name of this JDBC driver.
                 java.lang.String getDriverVersion()
                          Retrieves the version number of this JDBC driver as a String.
                 java.sql.ResultSet getExportedKeys(java.lang.String catalog, java.lang.String schema, java.lang.String table)
                          Retrieves a description of the foreign key columns that reference the given table's primary key columns (the foreign keys exported by a table).
                 java.lang.String getExtraNameCharacters()
                          Retrieves all the "extra" characters that can be used in unquoted identifier names (those beyond a-z, A-Z, 0-9 and _).
                 java.lang.String getIdentifierQuoteString()
                          Retrieves the string used to quote SQL identifiers.
                 java.sql.ResultSet getImportedKeys(java.lang.String catalog, java.lang.String schema, java.lang.String table)
                          Retrieves a description of the primary key columns that are referenced by a table's foreign key columns (the primary keys imported by a table).
                 java.sql.ResultSet getIndexInfo(java.lang.String catalog, java.lang.String schema, java.lang.String table, boolean unique, boolean approximate)
                          Retrieves a description of the given table's indices and statistics.
                 int getJDBCMajorVersion()
                          Retrieves the major JDBC version number for this driver.
                 int getJDBCMinorVersion()
                          Retrieves the minor JDBC version number for this driver.
                 int getMaxBinaryLiteralLength()
                          Retrieves the maximum number of hex characters this database allows in an inline binary literal.
                 int getMaxCatalogNameLength()
                          Retrieves the maximum number of characters that this database allows in a catalog name.
                 int getMaxCharLiteralLength()
                          Retrieves the maximum number of characters this database allows for a character literal.
                 int getMaxColumnNameLength()
                          Retrieves the maximum number of characters this database allows for a column name.
                 int getMaxColumnsInGroupBy()
                          Retrieves the maximum number of columns this database allows in a GROUP BY clause.
                 int getMaxColumnsInIndex()
                          Retrieves the maximum number of columns this database allows in an index.
                 int getMaxColumnsInOrderBy()
                          Retrieves the maximum number of columns this database allows in an ORDER BY clause.
                 int getMaxColumnsInSelect()
                          Retrieves the maximum number of columns this database allows in a SELECT list.
                 int getMaxColumnsInTable()
                          Retrieves the maximum number of columns this database allows in a table.
                 int getMaxConnections()
                          Retrieves the maximum number of concurrent connections to this database that are possible.
                 int getMaxCursorNameLength()
                          Retrieves the maximum number of characters that this database allows in a cursor name.
                 int getMaxIndexLength()
                          Retrieves the maximum number of bytes this database allows for an index, including all of the parts of the index.
                 int getMaxProcedureNameLength()
                          Retrieves the maximum number of characters that this database allows in a procedure name.
                 int getMaxRowSize()
                          Retrieves the maximum number of bytes this database allows in a single row.
                 int getMaxSchemaNameLength()
                          Retrieves the maximum number of characters that this database allows in a schema name.
                 int getMaxStatementLength()
                          Retrieves the maximum number of characters this database allows in an SQL statement.
                 int getMaxStatements()
                          Retrieves the maximum number of active statements to this database that can be open at the same time.
                 int getMaxTableNameLength()
                          Retrieves the maximum number of characters this database allows in a table name.
                 int getMaxTablesInSelect()
                          Retrieves the maximum number of tables this database allows in a SELECT statement.
                 int getMaxUserNameLength()
                          Retrieves the maximum number of characters this database allows in a user name.
                 java.lang.String getNumericFunctions()
                          Retrieves a comma-separated list of math functions available with this database.
                 java.sql.ResultSet getPrimaryKeys(java.lang.String catalog, java.lang.String schema, java.lang.String table)
                          Retrieves a description of the given table's primary key columns.
                 java.sql.ResultSet getProcedureColumns(java.lang.String catalog, java.lang.String schemaPattern, java.lang.String procedureNamePattern, java.lang.String columnNamePattern)
                          Retrieves a description of the given catalog's stored procedure parameter and result columns.
                 java.sql.ResultSet getProcedures(java.lang.String catalog, java.lang.String schemaPattern, java.lang.String procedureNamePattern)
                          Retrieves a description of the stored procedures available in the given catalog.
                 java.lang.String getProcedureTerm()
                          Retrieves the database vendor's preferred term for "procedure".
                 int getResultSetHoldability()
                          Retrieves the default holdability of this ResultSet object.
                 java.sql.ResultSet getSchemas()
                          Retrieves the schema names available in this database.
                 java.lang.String getSchemaTerm()
                          Retrieves the database vendor's preferred term for "schema".
                 java.lang.String getSearchStringEscape()
                          Retrieves the string that can be used to escape wildcard characters.
                 java.lang.String getSQLKeywords()
                          Retrieves a comma-separated list of all of this database's SQL keywords that are NOT also SQL92 keywords.
                 int getSQLStateType()
                          Indicates whether the SQLSTATEs returned by SQLException.getSQLState is X/Open (now known as Open Group) SQL CLI or SQL99.
                 java.lang.String getStringFunctions()
                          Retrieves a comma-separated list of string functions available with this database.
                 java.sql.ResultSet getSuperTables(java.lang.String catalog, java.lang.String schemaPattern, java.lang.String tableNamePattern)
                          Retrieves a description of the table hierarchies defined in a particular schema in this database.
                 java.sql.ResultSet getSuperTypes(java.lang.String catalog, java.lang.String schemaPattern, java.lang.String typeNamePattern)
                          Retrieves a description of the user-defined type (UDT) hierarchies defined in a particular schema in this database.
                 java.lang.String getSystemFunctions()
                          Retrieves a comma-separated list of system functions available with this database.
                 java.sql.ResultSet getTablePrivileges(java.lang.String catalog, java.lang.String schemaPattern, java.lang.String tableNamePattern)
                          Retrieves a description of the access rights for each table available in a catalog.
                 java.sql.ResultSet getTables(java.lang.String catalog, java.lang.String schemaPattern, java.lang.String tableNamePattern, java.lang.String[] types)
                          Retrieves a description of the tables available in the given catalog.
                 java.sql.ResultSet getTableTypes()
                          Retrieves the table types available in this database.
                 java.lang.String getTimeDateFunctions()
                          Retrieves a comma-separated list of the time and date functions available with this database.
                 java.sql.ResultSet getTypeInfo()
                          Retrieves a description of all the standard SQL types supported by this database.
                 java.sql.ResultSet getUDTs(java.lang.String catalog, java.lang.String schemaPattern, java.lang.String typeNamePattern, int[] types)
                          Retrieves a description of the user-defined types (UDTs) defined in a particular schema.
                 java.lang.String getURL()
                          Retrieves the URL for this DBMS.
                 java.lang.String getUserName()
                          Retrieves the user name as known to this database.
                 java.sql.ResultSet getVersionColumns(java.lang.String catalog, java.lang.String schema, java.lang.String table)
                          Retrieves a description of a table's columns that are automatically updated when any value in a row is updated.
                 boolean insertsAreDetected(int type)
                          Retrieves whether or not a visible row insert can be detected by calling the method ResultSet.rowInserted.
                 boolean isCatalogAtStart()
                          Retrieves whether a catalog appears at the start of a fully qualified table name.
                 boolean isReadOnly()
                          Retrieves whether this database is in read-only mode.
                 boolean locatorsUpdateCopy()
                          Indicates whether updates made to a LOB are made on a copy or directly to the LOB.
                 boolean nullPlusNonNullIsNull()
                          Retrieves whether this database supports concatenations between NULL and non-NULL values being NULL.
                 boolean nullsAreSortedAtEnd()
                          Retrieves whether NULL values are sorted at the end regardless of sort order.
                 boolean nullsAreSortedAtStart()
                          Retrieves whether NULL values are sorted at the start regardless of sort order.
                 boolean nullsAreSortedHigh()
                          Retrieves whether NULL values are sorted high.
                 boolean nullsAreSortedLow()
                          Retrieves whether NULL values are sorted low.
                 boolean othersDeletesAreVisible(int type)
                          Retrieves whether deletes made by others are visible.
                 boolean othersInsertsAreVisible(int type)
                          Retrieves whether inserts made by others are visible.
                 boolean othersUpdatesAreVisible(int type)
                          Retrieves whether updates made by others are visible.
                 boolean ownDeletesAreVisible(int type)
                          Retrieves whether a result set's own deletes are visible.
                 boolean ownInsertsAreVisible(int type)
                          Retrieves whether a result set's own inserts are visible.
                 boolean ownUpdatesAreVisible(int type)
                          Retrieves whether for the given type of ResultSet object, the result set's own updates are visible.
                 boolean storesLowerCaseIdentifiers()
                          Retrieves whether this database treats mixed case unquoted SQL identifiers as case insensitive and stores them in lower case.
                 boolean storesLowerCaseQuotedIdentifiers()
                          Retrieves whether this database treats mixed case quoted SQL identifiers as case insensitive and stores them in lower case.
                 boolean storesMixedCaseIdentifiers()
                          Retrieves whether this database treats mixed case unquoted SQL identifiers as case insensitive and stores them in mixed case.
                 boolean storesMixedCaseQuotedIdentifiers()
                          Retrieves whether this database treats mixed case quoted SQL identifiers as case insensitive and stores them in mixed case.
                 boolean storesUpperCaseIdentifiers()
                          Retrieves whether this database treats mixed case unquoted SQL identifiers as case insensitive and stores them in upper case.
                 boolean storesUpperCaseQuotedIdentifiers()
                          Retrieves whether this database treats mixed case quoted SQL identifiers as case insensitive and stores them in upper case.
                 boolean supportsAlterTableWithAddColumn()
                          Retrieves whether this database supports ALTER TABLE with add column.
                 boolean supportsAlterTableWithDropColumn()
                          Retrieves whether this database supports ALTER TABLE with drop column.
                 boolean supportsANSI92EntryLevelSQL()
                          Retrieves whether this database supports the ANSI92 entry level SQL grammar.
                 boolean supportsANSI92FullSQL()
                          Retrieves whether this database supports the ANSI92 full SQL grammar supported.
                 boolean supportsANSI92IntermediateSQL()
                          Retrieves whether this database supports the ANSI92 intermediate SQL grammar supported.
                 boolean supportsBatchUpdates()
                          Retrieves whether this database supports batch updates.
                 boolean supportsCatalogsInDataManipulation()
                          Retrieves whether a catalog name can be used in a data manipulation statement.
                 boolean supportsCatalogsInIndexDefinitions()
                          Retrieves whether a catalog name can be used in an index definition statement.
                 boolean supportsCatalogsInPrivilegeDefinitions()
                          Retrieves whether a catalog name can be used in a privilege definition statement.
                 boolean supportsCatalogsInProcedureCalls()
                          Retrieves whether a catalog name can be used in a procedure call statement.
                 boolean supportsCatalogsInTableDefinitions()
                          Retrieves whether a catalog name can be used in a table definition statement.
                 boolean supportsColumnAliasing()
                          Retrieves whether this database supports column aliasing.
                 boolean supportsConvert()
                          Retrieves whether this database supports the CONVERT function between SQL types.
                 boolean supportsConvert(int fromType, int toType)
                          Retrieves whether this database supports the CONVERT for two given SQL types.
                 boolean supportsCoreSQLGrammar()
                          Retrieves whether this database supports the ODBC Core SQL grammar.
                 boolean supportsCorrelatedSubqueries()
                          Retrieves whether this database supports correlated subqueries.
                 boolean supportsDataDefinitionAndDataManipulationTransactions()
                          Retrieves whether this database supports both data definition and data manipulation statements within a transaction.
                 boolean supportsDataManipulationTransactionsOnly()
                          Retrieves whether this database supports only data manipulation statements within a transaction.
                 boolean supportsDifferentTableCorrelationNames()
                          Retrieves whether, when table correlation names are supported, they are restricted to being different from the names of the tables.
                 boolean supportsExpressionsInOrderBy()
                          Retrieves whether this database supports expressions in ORDER BY lists.
                 boolean supportsExtendedSQLGrammar()
                          Retrieves whether this database supports the ODBC Extended SQL grammar.
                 boolean supportsFullOuterJoins()
                          Retrieves whether this database supports full nested outer joins.
                 boolean supportsGetGeneratedKeys()
                          Retrieves whether auto-generated keys can be retrieved after a statement has been executed.
                 boolean supportsGroupBy()
                          Retrieves whether this database supports some form of GROUP BY clause.
                 boolean supportsGroupByBeyondSelect()
                          Retrieves whether this database supports using columns not included in the SELECT statement in a GROUP BY clause provided that all of the columns in the SELECT statement are included in the GROUP BY clause.
                 boolean supportsGroupByUnrelated()
                          Retrieves whether this database supports using a column that is not in the SELECT statement in a GROUP BY clause.
                 boolean supportsIntegrityEnhancementFacility()
                          Retrieves whether this database supports the SQL Integrity Enhancement Facility.
                 boolean supportsLikeEscapeClause()
                          Retrieves whether this database supports specifying a LIKE escape clause.
                 boolean supportsLimitedOuterJoins()
                          Retrieves whether this database provides limited support for outer joins.
                 boolean supportsMinimumSQLGrammar()
                          Retrieves whether this database supports the ODBC Minimum SQL grammar.
                 boolean supportsMixedCaseIdentifiers()
                          Retrieves whether this database treats mixed case unquoted SQL identifiers as case sensitive and as a result stores them in mixed case.
                 boolean supportsMixedCaseQuotedIdentifiers()
                          Retrieves whether this database treats mixed case quoted SQL identifiers as case sensitive and as a result stores them in mixed case.
                 boolean supportsMultipleOpenResults()
                          Retrieves whether it is possible to have multiple ResultSet objects returned from a CallableStatement object simultaneously.
                 boolean supportsMultipleResultSets()
                          Retrieves whether this database supports getting multiple ResultSet objects from a single call to the method execute.
                 boolean supportsMultipleTransactions()
                          Retrieves whether this database allows having multiple transactions open at once (on different connections).
                 boolean supportsNamedParameters()
                          Retrieves whether this database supports named parameters to callable statements.
                 boolean supportsNonNullableColumns()
                          Retrieves whether columns in this database may be defined as non-nullable.
                 boolean supportsOpenCursorsAcrossCommit()
                          Retrieves whether this database supports keeping cursors open across commits.
                 boolean supportsOpenCursorsAcrossRollback()
                          Retrieves whether this database supports keeping cursors open across rollbacks.
                 boolean supportsOpenStatementsAcrossCommit()
                          Retrieves whether this database supports keeping statements open across commits.
                 boolean supportsOpenStatementsAcrossRollback()
                          Retrieves whether this database supports keeping statements open across rollbacks.
                 boolean supportsOrderByUnrelated()
                          Retrieves whether this database supports using a column that is not in the SELECT statement in an ORDER BY clause.
                 boolean supportsOuterJoins()
                          Retrieves whether this database supports some form of outer join.
                 boolean supportsPositionedDelete()
                          Retrieves whether this database supports positioned DELETE statements.
                 boolean supportsPositionedUpdate()
                          Retrieves whether this database supports positioned UPDATE statements.
                 boolean supportsResultSetConcurrency(int type, int concurrency)
                          Retrieves whether this database supports the given concurrency type in combination with the given result set type.
                 boolean supportsResultSetHoldability(int holdability)
                          Retrieves whether this database supports the given result set holdability.
                 boolean supportsResultSetType(int type)
                          Retrieves whether this database supports the given result set type.
                 boolean supportsSavepoints()
                          Retrieves whether this database supports savepoints.
                 boolean supportsSchemasInDataManipulation()
                          Retrieves whether a schema name can be used in a data manipulation statement.
                 boolean supportsSchemasInIndexDefinitions()
                          Retrieves whether a schema name can be used in an index definition statement.
                 boolean supportsSchemasInPrivilegeDefinitions()
                          Retrieves whether a schema name can be used in a privilege definition statement.
                 boolean supportsSchemasInProcedureCalls()
                          Retrieves whether a schema name can be used in a procedure call statement.
                 boolean supportsSchemasInTableDefinitions()
                          Retrieves whether a schema name can be used in a table definition statement.
                 boolean supportsSelectForUpdate()
                          Retrieves whether this database supports SELECT FOR UPDATE statements.
                 boolean supportsStatementPooling()
                          Retrieves whether this database supports statement pooling.
                 boolean supportsStoredProcedures()
                          Retrieves whether this database supports stored procedure calls that use the stored procedure escape syntax.
                 boolean supportsSubqueriesInComparisons()
                          Retrieves whether this database supports subqueries in comparison expressions.
                 boolean supportsSubqueriesInExists()
                          Retrieves whether this database supports subqueries in EXISTS expressions.
                 boolean supportsSubqueriesInIns()
                          JDBC4 correction: Retrieves whether this database supports subqueries in IN expressions.
                 boolean supportsSubqueriesInQuantifieds()
                          Retrieves whether this database supports subqueries in quantified expressions.
                 boolean supportsTableCorrelationNames()
                          Retrieves whether this database supports table correlation names.
                 boolean supportsTransactionIsolationLevel(int level)
                          Retrieves whether this database supports the given transaction isolation level.
                 boolean supportsTransactions()
                          Retrieves whether this database supports transactions.
                 boolean supportsUnion()
                          Retrieves whether this database supports SQL UNION.
                 boolean supportsUnionAll()
                          Retrieves whether this database supports SQL UNION ALL.
                 boolean updatesAreDetected(int type)
                          Retrieves whether or not a visible row update can be detected by calling the method ResultSet.rowUpdated.
                 boolean usesLocalFilePerTable()
                          Retrieves whether this database uses a file for each table.
                 boolean usesLocalFiles()
                          Retrieves whether this database stores tables in a local file.
                 
                Methods inherited from class java.lang.Object
                equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
                 

                Method Detail

                allProceduresAreCallable

                public boolean allProceduresAreCallable()
                                                 throws java.sql.SQLException
                Retrieves whether the current user can call all the procedures returned by the method getProcedures.

                HSQLDB-Specific Information:

                This method still always returns true.

                In a future release, the plugin interface may be modified to allow implementors to report different values here, based on their implementations.

                Specified by:
                allProceduresAreCallable in interface java.sql.DatabaseMetaData
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                allTablesAreSelectable

                public boolean allTablesAreSelectable()
                                               throws java.sql.SQLException
                Retrieves whether the current user can use all the tables returned by the method getTables in a SELECT statement.

                HSQLDB-Specific Information:

                HSQLDB always reports true.

                Please note that the default 1.7.2 getTables behaviour is omit from the list of requested tables only those to which the invoking user has no access of any kind.

                Specified by:
                allTablesAreSelectable in interface java.sql.DatabaseMetaData
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                getURL

                public java.lang.String getURL()
                                        throws java.sql.SQLException
                Retrieves the URL for this DBMS.

                Specified by:
                getURL in interface java.sql.DatabaseMetaData
                Returns:
                the URL for this DBMS or null if it cannot be generated
                Throws:
                java.sql.SQLException - if a database access error occurs

                getUserName

                public java.lang.String getUserName()
                                             throws java.sql.SQLException
                Retrieves the user name as known to this database.

                Specified by:
                getUserName in interface java.sql.DatabaseMetaData
                Returns:
                the database user name
                Throws:
                java.sql.SQLException - if a database access error occurs

                isReadOnly

                public boolean isReadOnly()
                                   throws java.sql.SQLException
                Retrieves whether this database is in read-only mode.

                HSQLDB-Specific Information:

                Starting with 1.7.2, this makes an SQL call to the new Library.isReadOnlyDatabase(java.sql.Connection) method which provides correct determination of the read-only status for both local and remote database instances.

                Specified by:
                isReadOnly in interface java.sql.DatabaseMetaData
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                nullsAreSortedHigh

                public boolean nullsAreSortedHigh()
                                           throws java.sql.SQLException
                Retrieves whether NULL values are sorted high. Sorted high means that NULL values sort higher than any other value in a domain. In an ascending order, if this method returns true, NULL values will appear at the end. By contrast, the method nullsAreSortedAtEnd indicates whether NULL values are sorted at the end regardless of sort order.

                HSQLDB-Specific Information:

                HSQLDB sorts null low; this method always returns false.

                Specified by:
                nullsAreSortedHigh in interface java.sql.DatabaseMetaData
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                nullsAreSortedLow

                public boolean nullsAreSortedLow()
                                          throws java.sql.SQLException
                Retrieves whether NULL values are sorted low. Sorted low means that NULL values sort lower than any other value in a domain. In an ascending order, if this method returns true, NULL values will appear at the beginning. By contrast, the method nullsAreSortedAtStart indicates whether NULL values are sorted at the beginning regardless of sort order.

                HSQLDB-Specific Information:

                HSQLDB sorts null low; this method always returns true.

                Specified by:
                nullsAreSortedLow in interface java.sql.DatabaseMetaData
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                nullsAreSortedAtStart

                public boolean nullsAreSortedAtStart()
                                              throws java.sql.SQLException
                Retrieves whether NULL values are sorted at the start regardless of sort order.

                HSQLDB-Specific Information:

                HSQLDB sorts null low; this method always returns false.

                Specified by:
                nullsAreSortedAtStart in interface java.sql.DatabaseMetaData
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                nullsAreSortedAtEnd

                public boolean nullsAreSortedAtEnd()
                                            throws java.sql.SQLException
                Retrieves whether NULL values are sorted at the end regardless of sort order.

                HSQLDB-Specific Information:

                HSQLDB sorts null low; this method always returns false.

                Specified by:
                nullsAreSortedAtEnd in interface java.sql.DatabaseMetaData
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                getDatabaseProductName

                public java.lang.String getDatabaseProductName()
                                                        throws java.sql.SQLException
                Retrieves the name of this database product.

                HSQLDB-Specific Information:

                Starting with HSQLDB 1.7.2, this value is retrieved through an SQL call to the new Library.getDatabaseProductName() method which allows correct determination of the database product name for both local and remote database instances.

                Specified by:
                getDatabaseProductName in interface java.sql.DatabaseMetaData
                Returns:
                database product name
                Throws:
                java.sql.SQLException - if a database access error occurs

                getDatabaseProductVersion

                public java.lang.String getDatabaseProductVersion()
                                                           throws java.sql.SQLException
                Retrieves the version number of this database product.

                HSQLDB-Specific Information:

                Starting with HSQLDB 1.7.2, this value is retrieved through an SQL call to the new Library.getDatabaseProductVersion() method which allows correct determination of the database product name for both local and remote database instances.

                Specified by:
                getDatabaseProductVersion in interface java.sql.DatabaseMetaData
                Returns:
                database version number
                Throws:
                java.sql.SQLException - if a database access error occurs

                getDriverName

                public java.lang.String getDriverName()
                                               throws java.sql.SQLException
                Retrieves the name of this JDBC driver.

                Specified by:
                getDriverName in interface java.sql.DatabaseMetaData
                Returns:
                JDBC driver name
                Throws:
                java.sql.SQLException - if a database access error occurs

                getDriverVersion

                public java.lang.String getDriverVersion()
                                                  throws java.sql.SQLException
                Retrieves the version number of this JDBC driver as a String.

                Specified by:
                getDriverVersion in interface java.sql.DatabaseMetaData
                Returns:
                JDBC driver version
                Throws:
                java.sql.SQLException - if a database access error occurs

                getDriverMajorVersion

                public int getDriverMajorVersion()
                Retrieves this JDBC driver's major version number.

                Specified by:
                getDriverMajorVersion in interface java.sql.DatabaseMetaData
                Returns:
                JDBC driver major version

                getDriverMinorVersion

                public int getDriverMinorVersion()
                Retrieves this JDBC driver's minor version number.

                Specified by:
                getDriverMinorVersion in interface java.sql.DatabaseMetaData
                Returns:
                JDBC driver minor version number

                usesLocalFiles

                public boolean usesLocalFiles()
                                       throws java.sql.SQLException
                Retrieves whether this database stores tables in a local file.

                HSQLDB-Specific Information:

                From HSQLDB 1.7.2 it is assumed that this refers to data being stored by the JDBC client. This method always returns false.

                Specified by:
                usesLocalFiles in interface java.sql.DatabaseMetaData
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                usesLocalFilePerTable

                public boolean usesLocalFilePerTable()
                                              throws java.sql.SQLException
                Retrieves whether this database uses a file for each table.

                HSQLDB-Specific Information:

                Up to and including 1.7.2, HSQLDB does not use a file for each table. This method always returns false.

                Specified by:
                usesLocalFilePerTable in interface java.sql.DatabaseMetaData
                Returns:
                true if this database uses a local file for each table; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                supportsMixedCaseIdentifiers

                public boolean supportsMixedCaseIdentifiers()
                                                     throws java.sql.SQLException
                Retrieves whether this database treats mixed case unquoted SQL identifiers as case sensitive and as a result stores them in mixed case.

                HSQLDB-Specific Information:

                HSQLDB treats unquoted identifiers as case insensitive and stores them in upper case. It treats quoted identifiers as case sensitive and stores them verbatim; this method always returns false.

                Specified by:
                supportsMixedCaseIdentifiers in interface java.sql.DatabaseMetaData
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                storesUpperCaseIdentifiers

                public boolean storesUpperCaseIdentifiers()
                                                   throws java.sql.SQLException
                Retrieves whether this database treats mixed case unquoted SQL identifiers as case insensitive and stores them in upper case.

                HSQLDB-Specific Information:

                HSQLDB treats unquoted identifiers as case insensitive and stores them in upper case. It treats quoted identifiers as case sensitive and stores them verbatim; this method always returns true.

                Specified by:
                storesUpperCaseIdentifiers in interface java.sql.DatabaseMetaData
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                storesLowerCaseIdentifiers

                public boolean storesLowerCaseIdentifiers()
                                                   throws java.sql.SQLException
                Retrieves whether this database treats mixed case unquoted SQL identifiers as case insensitive and stores them in lower case.

                HSQLDB-Specific Information:

                HSQLDB treats unquoted identifiers as case insensitive and stores them in upper case. It treats quoted identifiers as case sensitive and stores them verbatim; this method always returns false.

                Specified by:
                storesLowerCaseIdentifiers in interface java.sql.DatabaseMetaData
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                storesMixedCaseIdentifiers

                public boolean storesMixedCaseIdentifiers()
                                                   throws java.sql.SQLException
                Retrieves whether this database treats mixed case unquoted SQL identifiers as case insensitive and stores them in mixed case.

                HSQLDB-Specific Information:

                HSQLDB treats unquoted identifiers as case insensitive and stores them in upper case. It treats quoted identifiers as case sensitive and stores them verbatim; this method always returns false.

                Specified by:
                storesMixedCaseIdentifiers in interface java.sql.DatabaseMetaData
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                supportsMixedCaseQuotedIdentifiers

                public boolean supportsMixedCaseQuotedIdentifiers()
                                                           throws java.sql.SQLException
                Retrieves whether this database treats mixed case quoted SQL identifiers as case sensitive and as a result stores them in mixed case.

                HSQLDB-Specific Information:

                HSQLDB treats unquoted identifiers as case insensitive and stores them in upper case. It treats quoted identifiers as case sensitive and stores them verbatim; this method always returns true.

                Specified by:
                supportsMixedCaseQuotedIdentifiers in interface java.sql.DatabaseMetaData
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                storesUpperCaseQuotedIdentifiers

                public boolean storesUpperCaseQuotedIdentifiers()
                                                         throws java.sql.SQLException
                Retrieves whether this database treats mixed case quoted SQL identifiers as case insensitive and stores them in upper case.

                HSQLDB-Specific Information:

                HSQLDB treats unquoted identifiers as case insensitive and stores them in upper case. It treats quoted identifiers as case sensitive and stores them verbatim; this method always returns false.

                Specified by:
                storesUpperCaseQuotedIdentifiers in interface java.sql.DatabaseMetaData
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                storesLowerCaseQuotedIdentifiers

                public boolean storesLowerCaseQuotedIdentifiers()
                                                         throws java.sql.SQLException
                Retrieves whether this database treats mixed case quoted SQL identifiers as case insensitive and stores them in lower case.

                HSQLDB-Specific Information:

                HSQLDB treats unquoted identifiers as case insensitive and stores them in upper case. It treats quoted identifiers as case sensitive and stores them verbatim; this method always returns false.

                Specified by:
                storesLowerCaseQuotedIdentifiers in interface java.sql.DatabaseMetaData
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                storesMixedCaseQuotedIdentifiers

                public boolean storesMixedCaseQuotedIdentifiers()
                                                         throws java.sql.SQLException
                Retrieves whether this database treats mixed case quoted SQL identifiers as case insensitive and stores them in mixed case.

                HSQLDB-Specific Information:

                HSQLDB treats unquoted identifiers as case insensitive and stores them in upper case. It treats quoted identifiers as case sensitive and stores them verbatim; this method always returns false.

                Specified by:
                storesMixedCaseQuotedIdentifiers in interface java.sql.DatabaseMetaData
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                getIdentifierQuoteString

                public java.lang.String getIdentifierQuoteString()
                                                          throws java.sql.SQLException
                Retrieves the string used to quote SQL identifiers. This method returns a space " " if identifier quoting is not supported.

                HSQLDB-Specific Information:

                HSQLDB uses the standard SQL identifier quote character (the double quote character); this method always returns ".

                Specified by:
                getIdentifierQuoteString in interface java.sql.DatabaseMetaData
                Returns:
                the quoting string or a space if quoting is not supported
                Throws:
                java.sql.SQLException - if a database access error occurs

                getSQLKeywords

                public java.lang.String getSQLKeywords()
                                                throws java.sql.SQLException
                Retrieves a comma-separated list of all of this database's SQL keywords that are NOT also SQL92 keywords.

                HSQLDB-Specific Information:

                The list returned contains HSQLDB keywords that are not in the list of reserved words. Some of these are in the list reserved words for SQL 2003 but are not SQL92 keywords.

                Specified by:
                getSQLKeywords in interface java.sql.DatabaseMetaData
                Returns:
                the list of this database's keywords that are not also SQL92 keywords
                Throws:
                java.sql.SQLException - if a database access error occurs

                getNumericFunctions

                public java.lang.String getNumericFunctions()
                                                     throws java.sql.SQLException
                Retrieves a comma-separated list of math functions available with this database. These are the Open Group CLI math function names used in the JDBC function escape clause.

                Specified by:
                getNumericFunctions in interface java.sql.DatabaseMetaData
                Returns:
                the list of math functions supported by this database
                Throws:
                java.sql.SQLException - if a database access error occurs

                getStringFunctions

                public java.lang.String getStringFunctions()
                                                    throws java.sql.SQLException
                Retrieves a comma-separated list of string functions available with this database. These are the Open Group CLI string function names used in the JDBC function escape clause.

                Specified by:
                getStringFunctions in interface java.sql.DatabaseMetaData
                Returns:
                the list of string functions supported by this database
                Throws:
                java.sql.SQLException - if a database access error occurs

                getSystemFunctions

                public java.lang.String getSystemFunctions()
                                                    throws java.sql.SQLException
                Retrieves a comma-separated list of system functions available with this database. These are the Open Group CLI system function names used in the JDBC function escape clause.

                Specified by:
                getSystemFunctions in interface java.sql.DatabaseMetaData
                Returns:
                a list of system functions supported by this database
                Throws:
                java.sql.SQLException - if a database access error occurs

                getTimeDateFunctions

                public java.lang.String getTimeDateFunctions()
                                                      throws java.sql.SQLException
                Retrieves a comma-separated list of the time and date functions available with this database.

                Specified by:
                getTimeDateFunctions in interface java.sql.DatabaseMetaData
                Returns:
                the list of time and date functions supported by this database
                Throws:
                java.sql.SQLException - if a database access error occurs

                getSearchStringEscape

                public java.lang.String getSearchStringEscape()
                                                       throws java.sql.SQLException
                Retrieves the string that can be used to escape wildcard characters. This is the string that can be used to escape '_' or '%' in the catalog search parameters that are a pattern (and therefore use one of the wildcard characters).

                The '_' character represents any single character; the '%' character represents any sequence of zero or more characters.

                HSQLDB-Specific Information:

                HSQLDB uses the "\" character to escape wildcard characters.

                Specified by:
                getSearchStringEscape in interface java.sql.DatabaseMetaData
                Returns:
                the string used to escape wildcard characters
                Throws:
                java.sql.SQLException - if a database access error occurs

                getExtraNameCharacters

                public java.lang.String getExtraNameCharacters()
                                                        throws java.sql.SQLException
                Retrieves all the "extra" characters that can be used in unquoted identifier names (those beyond a-z, A-Z, 0-9 and _).

                HSQLDB-Specific Information:

                HSQLDB does not support using any "extra" characters in unquoted identifier names; this method always returns the empty String.

                Specified by:
                getExtraNameCharacters in interface java.sql.DatabaseMetaData
                Returns:
                the string containing the extra characters
                Throws:
                java.sql.SQLException - if a database access error occurs

                supportsAlterTableWithAddColumn

                public boolean supportsAlterTableWithAddColumn()
                                                        throws java.sql.SQLException
                Retrieves whether this database supports ALTER TABLE with add column.

                HSQLDB-Specific Information:

                From 1.7.0, HSQLDB supports this type of ALTER TABLE statement; this method always returns true.

                Specified by:
                supportsAlterTableWithAddColumn in interface java.sql.DatabaseMetaData
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                supportsAlterTableWithDropColumn

                public boolean supportsAlterTableWithDropColumn()
                                                         throws java.sql.SQLException
                Retrieves whether this database supports ALTER TABLE with drop column.

                HSQLDB-Specific Information:

                From 1.7.0, HSQLDB supports this type of ALTER TABLE statement; this method always returns true.

                Specified by:
                supportsAlterTableWithDropColumn in interface java.sql.DatabaseMetaData
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                supportsColumnAliasing

                public boolean supportsColumnAliasing()
                                               throws java.sql.SQLException
                Retrieves whether this database supports column aliasing.

                If so, the SQL AS clause can be used to provide names for computed columns or to provide alias names for columns as required.

                HSQLDB-Specific Information:

                HSQLDB supports column aliasing; this method always returns true.

                Specified by:
                supportsColumnAliasing in interface java.sql.DatabaseMetaData
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                nullPlusNonNullIsNull

                public boolean nullPlusNonNullIsNull()
                                              throws java.sql.SQLException
                Retrieves whether this database supports concatenations between NULL and non-NULL values being NULL.

                HSQLDB-Specific Information:

                HSQLDB supports this; this method always returns true.

                Specified by:
                nullPlusNonNullIsNull in interface java.sql.DatabaseMetaData
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                supportsConvert

                public boolean supportsConvert()
                                        throws java.sql.SQLException
                Retrieves whether this database supports the CONVERT function between SQL types.

                HSQLDB-Specific Information:

                HSQLDB supports conversions; this method always returns true.

                Specified by:
                supportsConvert in interface java.sql.DatabaseMetaData
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                supportsConvert

                public boolean supportsConvert(int fromType,
                                               int toType)
                                        throws java.sql.SQLException
                Retrieves whether this database supports the CONVERT for two given SQL types.

                HSQLDB-Specific Information:

                HSQLDB supports conversion though String intermediates, so everything should be possible, short of number format errors (all Java objects have a toString method); this method always returns true.

                Specified by:
                supportsConvert in interface java.sql.DatabaseMetaData
                Parameters:
                fromType - the type to convert from; one of the type codes from the class java.sql.Types
                toType - the type to convert to; one of the type codes from the class java.sql.Types
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs
                See Also:
                Types

                supportsTableCorrelationNames

                public boolean supportsTableCorrelationNames()
                                                      throws java.sql.SQLException
                Retrieves whether this database supports table correlation names.

                HSQLDB-Specific Information:

                HSQLDB supports table correlation names; this method always returns true.

                Specified by:
                supportsTableCorrelationNames in interface java.sql.DatabaseMetaData
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                supportsDifferentTableCorrelationNames

                public boolean supportsDifferentTableCorrelationNames()
                                                               throws java.sql.SQLException
                Retrieves whether, when table correlation names are supported, they are restricted to being different from the names of the tables.

                HSQLDB-Specific Information:

                HSQLDB requires that table correlation names are different from the names of the tables; this method always returns true.

                Specified by:
                supportsDifferentTableCorrelationNames in interface java.sql.DatabaseMetaData
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                supportsExpressionsInOrderBy

                public boolean supportsExpressionsInOrderBy()
                                                     throws java.sql.SQLException
                Retrieves whether this database supports expressions in ORDER BY lists.

                HSQLDB-Specific Information:

                HSQLDB supports expressions in ORDER BY lists; this method always returns true.

                Specified by:
                supportsExpressionsInOrderBy in interface java.sql.DatabaseMetaData
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                supportsOrderByUnrelated

                public boolean supportsOrderByUnrelated()
                                                 throws java.sql.SQLException
                Retrieves whether this database supports using a column that is not in the SELECT statement in an ORDER BY clause.

                HSQLDB-Specific Information:

                HSQLDB supports using a column that is not in the SELECT statement in an ORDER BY clause; this method always returns true.

                Specified by:
                supportsOrderByUnrelated in interface java.sql.DatabaseMetaData
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                supportsGroupBy

                public boolean supportsGroupBy()
                                        throws java.sql.SQLException
                Retrieves whether this database supports some form of GROUP BY clause.

                HSQLDB-Specific Information:

                HSQLDB supports using the GROUP BY clause; this method always returns true.

                Specified by:
                supportsGroupBy in interface java.sql.DatabaseMetaData
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                supportsGroupByUnrelated

                public boolean supportsGroupByUnrelated()
                                                 throws java.sql.SQLException
                Retrieves whether this database supports using a column that is not in the SELECT statement in a GROUP BY clause.

                HSQLDB-Specific Information:

                HSQLDB supports using a column that is not in the SELECT statement in a GROUP BY clause; this method always returns true.

                Specified by:
                supportsGroupByUnrelated in interface java.sql.DatabaseMetaData
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                supportsGroupByBeyondSelect

                public boolean supportsGroupByBeyondSelect()
                                                    throws java.sql.SQLException
                Retrieves whether this database supports using columns not included in the SELECT statement in a GROUP BY clause provided that all of the columns in the SELECT statement are included in the GROUP BY clause.

                HSQLDB-Specific Information:

                HSQLDB supports using columns not included in the SELECT statement in a GROUP BY clause provided that all of the columns in the SELECT statement are included in the GROUP BY clause; this method always returns true.

                Specified by:
                supportsGroupByBeyondSelect in interface java.sql.DatabaseMetaData
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                supportsLikeEscapeClause

                public boolean supportsLikeEscapeClause()
                                                 throws java.sql.SQLException
                Retrieves whether this database supports specifying a LIKE escape clause.

                HSQLDB-Specific Information:

                HSQLDB supports specifying a LIKE escape clause; this method always returns true.

                Specified by:
                supportsLikeEscapeClause in interface java.sql.DatabaseMetaData
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                supportsMultipleResultSets

                public boolean supportsMultipleResultSets()
                                                   throws java.sql.SQLException
                Retrieves whether this database supports getting multiple ResultSet objects from a single call to the method execute.

                HSQLDB-Specific Information:

                Up to and including 1.7.2, HSQLDB does not support getting multiple ResultSet objects from a single call to the method execute; this method always returns false.

                This behaviour may change in a future release.

                Specified by:
                supportsMultipleResultSets in interface java.sql.DatabaseMetaData
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                supportsMultipleTransactions

                public boolean supportsMultipleTransactions()
                                                     throws java.sql.SQLException
                Retrieves whether this database allows having multiple transactions open at once (on different connections).

                HSQLDB-Specific Information:

                HSQLDB allows having multiple transactions open at once (on different connections); this method always returns true.

                Specified by:
                supportsMultipleTransactions in interface java.sql.DatabaseMetaData
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                supportsNonNullableColumns

                public boolean supportsNonNullableColumns()
                                                   throws java.sql.SQLException
                Retrieves whether columns in this database may be defined as non-nullable.

                HSQLDB-Specific Information:

                HSQLDB supports the specification of non-nullable columns; this method always returns true.

                Specified by:
                supportsNonNullableColumns in interface java.sql.DatabaseMetaData
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                supportsMinimumSQLGrammar

                public boolean supportsMinimumSQLGrammar()
                                                  throws java.sql.SQLException
                Retrieves whether this database supports the ODBC Minimum SQL grammar.

                HSQLDB-Specific Information:

                Up to and including 1.7.2, HSQLDB does not support the ODBC Minimum SQL grammar; this method always returns false.

                Specified by:
                supportsMinimumSQLGrammar in interface java.sql.DatabaseMetaData
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                supportsCoreSQLGrammar

                public boolean supportsCoreSQLGrammar()
                                               throws java.sql.SQLException
                Retrieves whether this database supports the ODBC Core SQL grammar.

                HSQLDB-Specific Information:

                From 1.7.2 this method always returns true.

                Specified by:
                supportsCoreSQLGrammar in interface java.sql.DatabaseMetaData
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                supportsExtendedSQLGrammar

                public boolean supportsExtendedSQLGrammar()
                                                   throws java.sql.SQLException
                Retrieves whether this database supports the ODBC Extended SQL grammar.

                HSQLDB-Specific Information:

                Up to and including 1.7.2, HSQLDB does not support the ODBC Extended SQL grammar; this method always returns false.

                Specified by:
                supportsExtendedSQLGrammar in interface java.sql.DatabaseMetaData
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                supportsANSI92EntryLevelSQL

                public boolean supportsANSI92EntryLevelSQL()
                                                    throws java.sql.SQLException
                Retrieves whether this database supports the ANSI92 entry level SQL grammar.

                HSQLDB-Specific Information:

                Up to and including 1.7.2, HSQLDB does not support the ANSI92 entry level SQL grammar; this method always returns false.

                Specified by:
                supportsANSI92EntryLevelSQL in interface java.sql.DatabaseMetaData
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                supportsANSI92IntermediateSQL

                public boolean supportsANSI92IntermediateSQL()
                                                      throws java.sql.SQLException
                Retrieves whether this database supports the ANSI92 intermediate SQL grammar supported.

                HSQLDB-Specific Information:

                Up to and including 1.7.2, HSQLDB does not support the ANSI92 intermediate SQL grammar; this method always returns false.

                Specified by:
                supportsANSI92IntermediateSQL in interface java.sql.DatabaseMetaData
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                supportsANSI92FullSQL

                public boolean supportsANSI92FullSQL()
                                              throws java.sql.SQLException
                Retrieves whether this database supports the ANSI92 full SQL grammar supported.

                HSQLDB-Specific Information:

                Up to and including 1.7.2, HSQLDB does not support the ANSI92 full SQL grammar; this method always returns false.

                Specified by:
                supportsANSI92FullSQL in interface java.sql.DatabaseMetaData
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                supportsIntegrityEnhancementFacility

                public boolean supportsIntegrityEnhancementFacility()
                                                             throws java.sql.SQLException
                Retrieves whether this database supports the SQL Integrity Enhancement Facility.

                HSQLDB-Specific Information:

                From 1.7.2, this method always returns true.

                Specified by:
                supportsIntegrityEnhancementFacility in interface java.sql.DatabaseMetaData
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                supportsOuterJoins

                public boolean supportsOuterJoins()
                                           throws java.sql.SQLException
                Retrieves whether this database supports some form of outer join.

                HSQLDB-Specific Information:

                HSQLDB supports outer joins; this method always returns true.

                Specified by:
                supportsOuterJoins in interface java.sql.DatabaseMetaData
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                supportsFullOuterJoins

                public boolean supportsFullOuterJoins()
                                               throws java.sql.SQLException
                Retrieves whether this database supports full nested outer joins.

                HSQLDB-Specific Information:

                Up to and including 1.7.2, HSQLDB does not support full nested outer joins; this method always returns false.

                This behaviour may change in a future release.

                Specified by:
                supportsFullOuterJoins in interface java.sql.DatabaseMetaData
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                supportsLimitedOuterJoins

                public boolean supportsLimitedOuterJoins()
                                                  throws java.sql.SQLException
                Retrieves whether this database provides limited support for outer joins. (This will be true if the method supportsFullOuterJoins returns true).

                HSQLDB-Specific Information:

                Up to and including 1.7.2, HSQLDB support the LEFT OUTER join syntax; this method always returns true.

                Specified by:
                supportsLimitedOuterJoins in interface java.sql.DatabaseMetaData
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                getSchemaTerm

                public java.lang.String getSchemaTerm()
                                               throws java.sql.SQLException
                Retrieves the database vendor's preferred term for "schema".

                HSQLDB-Specific Information:

                Starting with 1.8.0, HSQLDB provides support for schemas.

                Specified by:
                getSchemaTerm in interface java.sql.DatabaseMetaData
                Returns:
                the vendor term for "schema"
                Throws:
                java.sql.SQLException - if a database access error occurs

                getProcedureTerm

                public java.lang.String getProcedureTerm()
                                                  throws java.sql.SQLException
                Retrieves the database vendor's preferred term for "procedure".

                HSQLDB-Specific Information:

                Up to and including 1.7.2, HSQLDB does not support declaration of functions or procedures directly in SQL but instead relies on the HSQLDB-specific CLASS grant mechanism to make public static Java methods available as SQL routines; this method always returns an empty String.

                Specified by:
                getProcedureTerm in interface java.sql.DatabaseMetaData
                Returns:
                the vendor term for "procedure"
                Throws:
                java.sql.SQLException - if a database access error occurs

                getCatalogTerm

                public java.lang.String getCatalogTerm()
                                                throws java.sql.SQLException
                Retrieves the database vendor's preferred term for "catalog".

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB does not support catalogs in DDL or DML; this method always returns the empty String.

                Specified by:
                getCatalogTerm in interface java.sql.DatabaseMetaData
                Returns:
                the vendor term for "catalog"
                Throws:
                java.sql.SQLException - if a database access error occurs

                isCatalogAtStart

                public boolean isCatalogAtStart()
                                         throws java.sql.SQLException
                Retrieves whether a catalog appears at the start of a fully qualified table name. If not, the catalog appears at the end.

                HSQLDB-Specific Information:

                Up to and including 1.7.2, HSQLDB does not support catalogs in DDL or DML; this method always returns false.

                Specified by:
                isCatalogAtStart in interface java.sql.DatabaseMetaData
                Returns:
                true if the catalog name appears at the beginning of a fully qualified table name; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                getCatalogSeparator

                public java.lang.String getCatalogSeparator()
                                                     throws java.sql.SQLException
                Retrieves the String that this database uses as the separator between a catalog and table name.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB does not support catalogs in DDL or DML; this method always returns an empty String.

                Specified by:
                getCatalogSeparator in interface java.sql.DatabaseMetaData
                Returns:
                the separator string
                Throws:
                java.sql.SQLException - if a database access error occurs

                supportsSchemasInDataManipulation

                public boolean supportsSchemasInDataManipulation()
                                                          throws java.sql.SQLException
                Retrieves whether a schema name can be used in a data manipulation statement.

                HSQLDB-Specific Information:

                In 1.8.0, HSQLDB supports schemas in table names but not in column names; this method always returns false.

                Specified by:
                supportsSchemasInDataManipulation in interface java.sql.DatabaseMetaData
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                supportsSchemasInProcedureCalls

                public boolean supportsSchemasInProcedureCalls()
                                                        throws java.sql.SQLException
                Retrieves whether a schema name can be used in a procedure call statement.

                HSQLDB-Specific Information:

                Up to and including 1.7.2, HSQLDB does not support schema-qualified procedure identifiers; this method always returns false.

                Specified by:
                supportsSchemasInProcedureCalls in interface java.sql.DatabaseMetaData
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                supportsSchemasInTableDefinitions

                public boolean supportsSchemasInTableDefinitions()
                                                          throws java.sql.SQLException
                Retrieves whether a schema name can be used in a table definition statement.

                HSQLDB-Specific Information:

                In 1.8.0, HSQLDB supports schemas; By default, this method returns true.

                Specified by:
                supportsSchemasInTableDefinitions in interface java.sql.DatabaseMetaData
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                supportsSchemasInIndexDefinitions

                public boolean supportsSchemasInIndexDefinitions()
                                                          throws java.sql.SQLException
                Retrieves whether a schema name can be used in an index definition statement.

                HSQLDB-Specific Information:

                In 1.8.0, HSQLDB supports schemas; By default, this method returns true.

                Specified by:
                supportsSchemasInIndexDefinitions in interface java.sql.DatabaseMetaData
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                supportsSchemasInPrivilegeDefinitions

                public boolean supportsSchemasInPrivilegeDefinitions()
                                                              throws java.sql.SQLException
                Retrieves whether a schema name can be used in a privilege definition statement.

                HSQLDB-Specific Information:

                In 1.8.0, HSQLDB supports schemas; By default, this method returns true.

                Specified by:
                supportsSchemasInPrivilegeDefinitions in interface java.sql.DatabaseMetaData
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                supportsCatalogsInDataManipulation

                public boolean supportsCatalogsInDataManipulation()
                                                           throws java.sql.SQLException
                Retrieves whether a catalog name can be used in a data manipulation statement.

                HSQLDB-Specific Information:

                Up to and including 1.7.2, HSQLDB does not support catalog-qualified; data manipulation; this method always returns false.

                Specified by:
                supportsCatalogsInDataManipulation in interface java.sql.DatabaseMetaData
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                supportsCatalogsInProcedureCalls

                public boolean supportsCatalogsInProcedureCalls()
                                                         throws java.sql.SQLException
                Retrieves whether a catalog name can be used in a procedure call statement.

                HSQLDB-Specific Information:

                Up to and including 1.7.2, HSQLDB does not support catalog-qualified procedure calls; this method always returns false.

                Specified by:
                supportsCatalogsInProcedureCalls in interface java.sql.DatabaseMetaData
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                supportsCatalogsInTableDefinitions

                public boolean supportsCatalogsInTableDefinitions()
                                                           throws java.sql.SQLException
                Retrieves whether a catalog name can be used in a table definition statement.

                HSQLDB-Specific Information:

                Up to and including 1.7.2, HSQLDB does not support catalog-qualified table definitions; this method always returns false.

                Specified by:
                supportsCatalogsInTableDefinitions in interface java.sql.DatabaseMetaData
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                supportsCatalogsInIndexDefinitions

                public boolean supportsCatalogsInIndexDefinitions()
                                                           throws java.sql.SQLException
                Retrieves whether a catalog name can be used in an index definition statement.

                HSQLDB-Specific Information:

                Up to and including 1.7.2, HSQLDB does not support catalog-qualified index definitions; this method always returns false.

                Specified by:
                supportsCatalogsInIndexDefinitions in interface java.sql.DatabaseMetaData
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                supportsCatalogsInPrivilegeDefinitions

                public boolean supportsCatalogsInPrivilegeDefinitions()
                                                               throws java.sql.SQLException
                Retrieves whether a catalog name can be used in a privilege definition statement.

                HSQLDB-Specific Information:

                Up to and including 1.7.2, HSQLDB does not support catalog-qualified privilege definitions; this method always returns false.

                Specified by:
                supportsCatalogsInPrivilegeDefinitions in interface java.sql.DatabaseMetaData
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                supportsPositionedDelete

                public boolean supportsPositionedDelete()
                                                 throws java.sql.SQLException
                Retrieves whether this database supports positioned DELETE statements.

                HSQLDB-Specific Information:

                Up to and including 1.7.2, HSQLDB does not support updateable result sets; this method always returns false.

                Specified by:
                supportsPositionedDelete in interface java.sql.DatabaseMetaData
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                supportsPositionedUpdate

                public boolean supportsPositionedUpdate()
                                                 throws java.sql.SQLException
                Retrieves whether this database supports positioned UPDATE statements.

                HSQLDB-Specific Information:

                Up to and including 1.7.2, HSQLDB does not support updateable result sets; this method always returns false.

                Specified by:
                supportsPositionedUpdate in interface java.sql.DatabaseMetaData
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                supportsSelectForUpdate

                public boolean supportsSelectForUpdate()
                                                throws java.sql.SQLException
                Retrieves whether this database supports SELECT FOR UPDATE statements.

                HSQLDB-Specific Information:

                Up to and including 1.7.2, HSQLDB does not support explicit locking; this method always returns false.

                Specified by:
                supportsSelectForUpdate in interface java.sql.DatabaseMetaData
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                supportsStoredProcedures

                public boolean supportsStoredProcedures()
                                                 throws java.sql.SQLException
                Retrieves whether this database supports stored procedure calls that use the stored procedure escape syntax.

                HSQLDB-Specific Information:

                Up to and including 1.7.2, HSQLDB supports calling public static Java methods in the context of SQL Stored Procedures; this method always returns true.

                Specified by:
                supportsStoredProcedures in interface java.sql.DatabaseMetaData
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs
                See Also:
                jdbcPreparedStatement, jdbcConnection.prepareCall(java.lang.String)

                supportsSubqueriesInComparisons

                public boolean supportsSubqueriesInComparisons()
                                                        throws java.sql.SQLException
                Retrieves whether this database supports subqueries in comparison expressions.

                HSQLDB-Specific Information:

                HSQLDB has always supported subqueries in comparison expressions; this method always returns true.

                Specified by:
                supportsSubqueriesInComparisons in interface java.sql.DatabaseMetaData
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                supportsSubqueriesInExists

                public boolean supportsSubqueriesInExists()
                                                   throws java.sql.SQLException
                Retrieves whether this database supports subqueries in EXISTS expressions.

                HSQLDB-Specific Information:

                HSQLDB has always supported subqueries in EXISTS expressions; this method always returns true.

                Specified by:
                supportsSubqueriesInExists in interface java.sql.DatabaseMetaData
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                supportsSubqueriesInIns

                public boolean supportsSubqueriesInIns()
                                                throws java.sql.SQLException
                JDBC4 correction: Retrieves whether this database supports subqueries in IN expressions.

                HSQLDB-Specific Information:

                HSQLDB has always supported subqueries in IN statements; this method always returns true.

                Specified by:
                supportsSubqueriesInIns in interface java.sql.DatabaseMetaData
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                supportsSubqueriesInQuantifieds

                public boolean supportsSubqueriesInQuantifieds()
                                                        throws java.sql.SQLException
                Retrieves whether this database supports subqueries in quantified expressions.

                HSQLDB-Specific Information:

                HSQLDB has always supported subqueries in quantified expressions; this method always returns true.

                Specified by:
                supportsSubqueriesInQuantifieds in interface java.sql.DatabaseMetaData
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                supportsCorrelatedSubqueries

                public boolean supportsCorrelatedSubqueries()
                                                     throws java.sql.SQLException
                Retrieves whether this database supports correlated subqueries.

                HSQLDB-Specific Information:

                HSQLDB has always supported correlated subqueries; this method always returns true.

                Specified by:
                supportsCorrelatedSubqueries in interface java.sql.DatabaseMetaData
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                supportsUnion

                public boolean supportsUnion()
                                      throws java.sql.SQLException
                Retrieves whether this database supports SQL UNION.

                HSQLDB-Specific Information:

                HSQLDB supports SQL UNION; this method always returns true.

                Specified by:
                supportsUnion in interface java.sql.DatabaseMetaData
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                supportsUnionAll

                public boolean supportsUnionAll()
                                         throws java.sql.SQLException
                Retrieves whether this database supports SQL UNION ALL.

                HSQLDB-Specific Information:

                HSQLDB supports SQL UNION ALL; this method always returns true.

                Specified by:
                supportsUnionAll in interface java.sql.DatabaseMetaData
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                supportsOpenCursorsAcrossCommit

                public boolean supportsOpenCursorsAcrossCommit()
                                                        throws java.sql.SQLException
                Retrieves whether this database supports keeping cursors open across commits.

                HSQLDB-Specific Information:

                Up to and including 1.7.2, HSQLDB does not support keeping cursors open across commits; this method always returns false.

                Specified by:
                supportsOpenCursorsAcrossCommit in interface java.sql.DatabaseMetaData
                Returns:
                true if cursors always remain open; false if they might not remain open
                Throws:
                java.sql.SQLException - if a database access error occurs

                supportsOpenCursorsAcrossRollback

                public boolean supportsOpenCursorsAcrossRollback()
                                                          throws java.sql.SQLException
                Retrieves whether this database supports keeping cursors open across rollbacks.

                HSQLDB-Specific Information:

                Up to and including 1.7.2, HSQLDB does not support keeping cursors open across rollbacks; this method always returns false.

                Specified by:
                supportsOpenCursorsAcrossRollback in interface java.sql.DatabaseMetaData
                Returns:
                true if cursors always remain open; false if they might not remain open
                Throws:
                java.sql.SQLException - if a database access error occurs

                supportsOpenStatementsAcrossCommit

                public boolean supportsOpenStatementsAcrossCommit()
                                                           throws java.sql.SQLException
                Retrieves whether this database supports keeping statements open across commits.

                HSQLDB-Specific Information:

                HSQLDB supports keeping statements open across commits; this method always returns true.

                Specified by:
                supportsOpenStatementsAcrossCommit in interface java.sql.DatabaseMetaData
                Returns:
                true if statements always remain open; false if they might not remain open
                Throws:
                java.sql.SQLException - if a database access error occurs

                supportsOpenStatementsAcrossRollback

                public boolean supportsOpenStatementsAcrossRollback()
                                                             throws java.sql.SQLException
                Retrieves whether this database supports keeping statements open across rollbacks.

                HSQLDB-Specific Information:

                HSQLDB supports keeping statements open across commits; this method always returns true.

                Specified by:
                supportsOpenStatementsAcrossRollback in interface java.sql.DatabaseMetaData
                Returns:
                true if statements always remain open; false if they might not remain open
                Throws:
                java.sql.SQLException - if a database access error occurs

                getMaxBinaryLiteralLength

                public int getMaxBinaryLiteralLength()
                                              throws java.sql.SQLException
                Retrieves the maximum number of hex characters this database allows in an inline binary literal.

                HSQLDB-Specific Information:

                HSQLDB does not impose a "known" limit. The hard limit is the maximum length of a java.lang.String (java.lang.Integer.MAX_VALUE); this method always returns 0.

                Specified by:
                getMaxBinaryLiteralLength in interface java.sql.DatabaseMetaData
                Returns:
                max the maximum length (in hex characters) for a binary literal; a result of zero means that there is no limit or the limit is not known
                Throws:
                java.sql.SQLException - if a database access error occurs

                getMaxCharLiteralLength

                public int getMaxCharLiteralLength()
                                            throws java.sql.SQLException
                Retrieves the maximum number of characters this database allows for a character literal.

                HSQLDB-Specific Information:

                HSQLDB does not impose a "known" limit. The hard limit is the maximum length of a java.lang.String (java.lang.Integer.MAX_VALUE); this method always returns 0.

                Specified by:
                getMaxCharLiteralLength in interface java.sql.DatabaseMetaData
                Returns:
                the maximum number of characters allowed for a character literal; a result of zero means that there is no limit or the limit is not known
                Throws:
                java.sql.SQLException - if a database access error occurs

                getMaxColumnNameLength

                public int getMaxColumnNameLength()
                                           throws java.sql.SQLException
                Retrieves the maximum number of characters this database allows for a column name.

                HSQLDB-Specific Information:

                HSQLDB does not impose a "known" limit. The hard limit is the maximum length of a java.lang.String (java.lang.Integer.MAX_VALUE); this method always returns 0.

                Specified by:
                getMaxColumnNameLength in interface java.sql.DatabaseMetaData
                Returns:
                the maximum number of characters allowed for a column name; a result of zero means that there is no limit or the limit is not known
                Throws:
                java.sql.SQLException - if a database access error occurs

                getMaxColumnsInGroupBy

                public int getMaxColumnsInGroupBy()
                                           throws java.sql.SQLException
                Retrieves the maximum number of columns this database allows in a GROUP BY clause.

                HSQLDB-Specific Information:

                HSQLDB does not impose a "known" limit. The hard limit is the maximum length of a Java array (java.lang.Integer.MAX_VALUE); this method always returns 0.

                Specified by:
                getMaxColumnsInGroupBy in interface java.sql.DatabaseMetaData
                Returns:
                the maximum number of columns allowed; a result of zero means that there is no limit or the limit is not known
                Throws:
                java.sql.SQLException - if a database access error occurs

                getMaxColumnsInIndex

                public int getMaxColumnsInIndex()
                                         throws java.sql.SQLException
                Retrieves the maximum number of columns this database allows in an index.

                HSQLDB-Specific Information:

                HSQLDB does not impose a "known" limit. The hard limit is the maximum length of a Java array (java.lang.Integer.MAX_VALUE); this method always returns 0.

                Specified by:
                getMaxColumnsInIndex in interface java.sql.DatabaseMetaData
                Returns:
                the maximum number of columns allowed; a result of zero means that there is no limit or the limit is not known
                Throws:
                java.sql.SQLException - if a database access error occurs

                getMaxColumnsInOrderBy

                public int getMaxColumnsInOrderBy()
                                           throws java.sql.SQLException
                Retrieves the maximum number of columns this database allows in an ORDER BY clause.

                HSQLDB-Specific Information:

                HSQLDB does not impose a "known" limit. The hard limit is the maximum length of a Java array (java.lang.Integer.MAX_VALUE); this method always returns 0.

                Specified by:
                getMaxColumnsInOrderBy in interface java.sql.DatabaseMetaData
                Returns:
                the maximum number of columns allowed; a result of zero means that there is no limit or the limit is not known
                Throws:
                java.sql.SQLException - if a database access error occurs

                getMaxColumnsInSelect

                public int getMaxColumnsInSelect()
                                          throws java.sql.SQLException
                Retrieves the maximum number of columns this database allows in a SELECT list.

                HSQLDB-Specific Information:

                HSQLDB does not impose a "known" limit. The hard limit is the maximum length of a Java array (java.lang.Integer.MAX_VALUE); this method always returns 0.

                Specified by:
                getMaxColumnsInSelect in interface java.sql.DatabaseMetaData
                Returns:
                the maximum number of columns allowed; a result of zero means that there is no limit or the limit is not known
                Throws:
                java.sql.SQLException - if a database access error occurs

                getMaxColumnsInTable

                public int getMaxColumnsInTable()
                                         throws java.sql.SQLException
                Retrieves the maximum number of columns this database allows in a table.

                HSQLDB-Specific Information:

                HSQLDB does not impose a "known" limit. The hard limit is the maximum length of a Java array (java.lang.Integer.MAX_VALUE); this method always returns 0.

                Specified by:
                getMaxColumnsInTable in interface java.sql.DatabaseMetaData
                Returns:
                the maximum number of columns allowed; a result of zero means that there is no limit or the limit is not known
                Throws:
                java.sql.SQLException - if a database access error occurs

                getMaxConnections

                public int getMaxConnections()
                                      throws java.sql.SQLException
                Retrieves the maximum number of concurrent connections to this database that are possible.

                HSQLDB-Specific Information:

                HSQLDB does not impose a "known" limit. The hard limit is the maximum length of a Java array (java.lang.Integer.MAX_VALUE); this method always returns 0.

                Specified by:
                getMaxConnections in interface java.sql.DatabaseMetaData
                Returns:
                the maximum number of active connections possible at one time; a result of zero means that there is no limit or the limit is not known
                Throws:
                java.sql.SQLException - if a database access error occurs

                getMaxCursorNameLength

                public int getMaxCursorNameLength()
                                           throws java.sql.SQLException
                Retrieves the maximum number of characters that this database allows in a cursor name.

                HSQLDB-Specific Information:

                HSQLDB does not impose a "known" limit. The hard limit is the maximum length of a java.lang.String (java.lang.Integer.MAX_VALUE); this method always returns 0.

                Specified by:
                getMaxCursorNameLength in interface java.sql.DatabaseMetaData
                Returns:
                the maximum number of characters allowed in a cursor name; a result of zero means that there is no limit or the limit is not known
                Throws:
                java.sql.SQLException - if a database access error occurs

                getMaxIndexLength

                public int getMaxIndexLength()
                                      throws java.sql.SQLException
                Retrieves the maximum number of bytes this database allows for an index, including all of the parts of the index.

                HSQLDB-Specific Information:

                HSQLDB does not impose a "known" limit; this method always returns 0.

                Specified by:
                getMaxIndexLength in interface java.sql.DatabaseMetaData
                Returns:
                the maximum number of bytes allowed; this limit includes the composite of all the constituent parts of the index; a result of zero means that there is no limit or the limit is not known
                Throws:
                java.sql.SQLException - if a database access error occurs

                getMaxSchemaNameLength

                public int getMaxSchemaNameLength()
                                           throws java.sql.SQLException
                Retrieves the maximum number of characters that this database allows in a schema name.

                HSQLDB-Specific Information:

                1.8.0 supports schema names with no known limit imposed, so this method always returns 0.

                Specified by:
                getMaxSchemaNameLength in interface java.sql.DatabaseMetaData
                Returns:
                the maximum number of characters allowed in a schema name; a result of zero means that there is no limit or the limit is not known
                Throws:
                java.sql.SQLException - if a database access error occurs

                getMaxProcedureNameLength

                public int getMaxProcedureNameLength()
                                              throws java.sql.SQLException
                Retrieves the maximum number of characters that this database allows in a procedure name.

                HSQLDB-Specific Information:

                HSQLDB does not impose a "known" limit. The hard limit is the maximum length of a java.lang.String (java.lang.Integer.MAX_VALUE); this method always returns 0.

                Specified by:
                getMaxProcedureNameLength in interface java.sql.DatabaseMetaData
                Returns:
                the maximum number of characters allowed in a procedure name; a result of zero means that there is no limit or the limit is not known
                Throws:
                java.sql.SQLException - if a database access error occurs

                getMaxCatalogNameLength

                public int getMaxCatalogNameLength()
                                            throws java.sql.SQLException
                Retrieves the maximum number of characters that this database allows in a catalog name.

                HSQLDB-Specific Information:

                Up to and including 1.7.2, HSQLDB does not support catalogs in DDL or DML; this method always returns 0.

                Specified by:
                getMaxCatalogNameLength in interface java.sql.DatabaseMetaData
                Returns:
                the maximum number of characters allowed in a catalog name; a result of zero means that there is no limit or the limit is not known
                Throws:
                java.sql.SQLException - if a database access error occurs

                getMaxRowSize

                public int getMaxRowSize()
                                  throws java.sql.SQLException
                Retrieves the maximum number of bytes this database allows in a single row.

                HSQLDB-Specific Information:

                HSQLDB does not impose a "known" limit; this method always returns 0.

                Specified by:
                getMaxRowSize in interface java.sql.DatabaseMetaData
                Returns:
                the maximum number of bytes allowed for a row; a result of zero means that there is no limit or the limit is not known
                Throws:
                java.sql.SQLException - if a database access error occurs

                doesMaxRowSizeIncludeBlobs

                public boolean doesMaxRowSizeIncludeBlobs()
                                                   throws java.sql.SQLException
                Retrieves whether the return value for the method getMaxRowSize includes the SQL data types LONGVARCHAR and LONGVARBINARY.

                HSQLDB-Specific Indormation:

                Including 1.7.2, getMaxRowSize() always returns 0, indicating that the maximum row size is unknown or has no limit. This applies to the above types as well; this method always returns true.

                Specified by:
                doesMaxRowSizeIncludeBlobs in interface java.sql.DatabaseMetaData
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                getMaxStatementLength

                public int getMaxStatementLength()
                                          throws java.sql.SQLException
                Retrieves the maximum number of characters this database allows in an SQL statement.

                HSQLDB-Specific Information:

                HSQLDB does not impose a "known" limit. The hard limit is the maximum length of a java.lang.String (java.lang.Integer.MAX_VALUE); this method always returns 0.

                Specified by:
                getMaxStatementLength in interface java.sql.DatabaseMetaData
                Returns:
                the maximum number of characters allowed for an SQL statement; a result of zero means that there is no limit or the limit is not known
                Throws:
                java.sql.SQLException - if a database access error occurs

                getMaxStatements

                public int getMaxStatements()
                                     throws java.sql.SQLException
                Retrieves the maximum number of active statements to this database that can be open at the same time.

                HSQLDB-Specific Information:

                HSQLDB does not impose a "known" limit; this method always returns 0.

                Specified by:
                getMaxStatements in interface java.sql.DatabaseMetaData
                Returns:
                the maximum number of statements that can be open at one time; a result of zero means that there is no limit or the limit is not known
                Throws:
                java.sql.SQLException - if a database access error occurs

                getMaxTableNameLength

                public int getMaxTableNameLength()
                                          throws java.sql.SQLException
                Retrieves the maximum number of characters this database allows in a table name.

                HSQLDB-Specific Information:

                HSQLDB does not impose a "known" limit. The hard limit is the maximum length of a java.lang.String (java.lang.Integer.MAX_VALUE); this method always returns 0.

                Specified by:
                getMaxTableNameLength in interface java.sql.DatabaseMetaData
                Returns:
                the maximum number of characters allowed for a table name; a result of zero means that there is no limit or the limit is not known
                Throws:
                java.sql.SQLException - if a database access error occurs

                getMaxTablesInSelect

                public int getMaxTablesInSelect()
                                         throws java.sql.SQLException
                Retrieves the maximum number of tables this database allows in a SELECT statement.

                HSQLDB-Specific Information:

                HSQLDB does not impose a "known" limit. The hard limit is the maximum length of a Java array (java.lang.Integer.MAX_VALUE); this method always returns 0.

                Specified by:
                getMaxTablesInSelect in interface java.sql.DatabaseMetaData
                Returns:
                the maximum number of tables allowed in a SELECT statement; a result of zero means that there is no limit or the limit is not known
                Throws:
                java.sql.SQLException - if a database access error occurs

                getMaxUserNameLength

                public int getMaxUserNameLength()
                                         throws java.sql.SQLException
                Retrieves the maximum number of characters this database allows in a user name.

                HSQLDB-Specific Information:

                HSQLDB does not impose a "known" limit. The hard limit is the maximum length of a java.lang.String (java.lang.Integer.MAX_VALUE); this method always returns 0.

                Specified by:
                getMaxUserNameLength in interface java.sql.DatabaseMetaData
                Returns:
                the maximum number of characters allowed for a user name; a result of zero means that there is no limit or the limit is not known
                Throws:
                java.sql.SQLException - if a database access error occurs

                getDefaultTransactionIsolation

                public int getDefaultTransactionIsolation()
                                                   throws java.sql.SQLException
                Retrieves this database's default transaction isolation level. The possible values are defined in java.sql.Connection.

                HSQLDB-Specific Information

                Including 1.7.2, HSQLDB supports only TRANSACTION_READ_UNCOMMITED and always returns this value here.

                Specified by:
                getDefaultTransactionIsolation in interface java.sql.DatabaseMetaData
                Returns:
                the default isolation level
                Throws:
                java.sql.SQLException - if a database access error occurs
                See Also:
                jdbcConnection

                supportsTransactions

                public boolean supportsTransactions()
                                             throws java.sql.SQLException
                Retrieves whether this database supports transactions. If not, invoking the method commit is a noop, and the isolation level is TRANSACTION_NONE.

                HSQLDB-Specific Information:

                HSQLDB supports transactions; this method always returns true.

                Specified by:
                supportsTransactions in interface java.sql.DatabaseMetaData
                Returns:
                true if transactions are supported; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                supportsTransactionIsolationLevel

                public boolean supportsTransactionIsolationLevel(int level)
                                                          throws java.sql.SQLException
                Retrieves whether this database supports the given transaction isolation level.

                HSQLDB-Specific Information

                HSQLDB supports TRANSACTION_READ_UNCOMMITED in all cases and the rest of the isolation levels where there is only one connection to the database.

                Specified by:
                supportsTransactionIsolationLevel in interface java.sql.DatabaseMetaData
                Parameters:
                level - one of the transaction isolation levels defined in java.sql.Connection
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs
                See Also:
                jdbcConnection

                supportsDataDefinitionAndDataManipulationTransactions

                public boolean supportsDataDefinitionAndDataManipulationTransactions()
                                                                              throws java.sql.SQLException
                Retrieves whether this database supports both data definition and data manipulation statements within a transaction.

                HSQLDB-Specific Information:

                HSQLDB does not support a mix of both data definition and data manipulation statements within a transaction. DDL commits the current transaction before proceding; this method always returns false.

                Specified by:
                supportsDataDefinitionAndDataManipulationTransactions in interface java.sql.DatabaseMetaData
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                supportsDataManipulationTransactionsOnly

                public boolean supportsDataManipulationTransactionsOnly()
                                                                 throws java.sql.SQLException
                Retrieves whether this database supports only data manipulation statements within a transaction.

                HSQLDB-Specific Information:

                HSQLDB supports only data manipulation statements within a transaction. DDL commits the current transaction before proceeding, while DML does not; this method always returns true.

                Specified by:
                supportsDataManipulationTransactionsOnly in interface java.sql.DatabaseMetaData
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                dataDefinitionCausesTransactionCommit

                public boolean dataDefinitionCausesTransactionCommit()
                                                              throws java.sql.SQLException
                Retrieves whether a data definition statement within a transaction forces the transaction to commit.

                HSQLDB-Specific Information:

                Including 1.7.2, a data definition statement within a transaction forces the transaction to commit; this method always returns true.

                Specified by:
                dataDefinitionCausesTransactionCommit in interface java.sql.DatabaseMetaData
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                dataDefinitionIgnoredInTransactions

                public boolean dataDefinitionIgnoredInTransactions()
                                                            throws java.sql.SQLException
                Retrieves whether this database ignores a data definition statement within a transaction.

                HSQLDB-Specific Information:

                Including 1.7.2, a data definition statement is not ignored within a transaction. Rather, a data definition statement within a transaction forces the transaction to commit; this method always returns false.

                Specified by:
                dataDefinitionIgnoredInTransactions in interface java.sql.DatabaseMetaData
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs

                getProcedures

                public java.sql.ResultSet getProcedures(java.lang.String catalog,
                                                        java.lang.String schemaPattern,
                                                        java.lang.String procedureNamePattern)
                                                 throws java.sql.SQLException
                Retrieves a description of the stored procedures available in the given catalog.

                Only procedure descriptions matching the schema and procedure name criteria are returned. They are ordered by PROCEDURE_SCHEM and PROCEDURE_NAME.

                Each procedure description has the the following columns:

                1. PROCEDURE_CAT String => procedure catalog (may be null)
                2. PROCEDURE_SCHEM String => procedure schema (may be null)
                3. PROCEDURE_NAME String => procedure name
                4. reserved for future use
                5. reserved for future use
                6. reserved for future use
                7. REMARKS String => explanatory comment on the procedure
                8. PROCEDURE_TYPE short => kind of procedure:
                  • procedureResultUnknown - May return a result
                  • procedureNoResult - Does not return a result
                  • procedureReturnsResult - Returns a result

                HSQLDB-Specific Information:

                HSQLDB treats unquoted identifiers as case insensitive in SQL but stores them in upper case; it treats quoted identifiers as case sensitive and stores them verbatim. All jdbcDatabaseMetaData methods perform case-sensitive comparison between name (pattern) arguments and the corresponding identifier values as they are stored in the database. Therefore, care must be taken to specify name arguments precisely (including case) as they are stored in the database.

                Since 1.7.2, this feature is supported by default. If the jar is compiled without org.hsqldb.DatabaseInformationFull or org.hsqldb.DatabaseInformationMain, the feature is not supported. The default implementation is DatabaseInformationFull.

                Specified by:
                getProcedures in interface java.sql.DatabaseMetaData
                Parameters:
                catalog - a catalog name; must match the catalog name as it is stored in the database; "" retrieves those without a catalog; null means that the catalog name should not be used to narrow the search
                schemaPattern - a schema name pattern; must match the schema name as it is stored in the database; "" retrieves those without a schema; null means that the schema name should not be used to narrow the search
                procedureNamePattern - a procedure name pattern; must match the procedure name as it is stored in the database
                Returns:
                ResultSet - each row is a procedure description
                Throws:
                java.sql.SQLException - if a database access error occurs
                See Also:
                getSearchStringEscape()

                getProcedureColumns

                public java.sql.ResultSet getProcedureColumns(java.lang.String catalog,
                                                              java.lang.String schemaPattern,
                                                              java.lang.String procedureNamePattern,
                                                              java.lang.String columnNamePattern)
                                                       throws java.sql.SQLException
                Retrieves a description of the given catalog's stored procedure parameter and result columns.

                Only descriptions matching the schema, procedure and parameter name criteria are returned. They are ordered by PROCEDURE_SCHEM and PROCEDURE_NAME. Within this, the return value, if any, is first. Next are the parameter descriptions in call order. The column descriptions follow in column number order.

                Each row in the ResultSet is a parameter description or column description with the following fields:

                1. PROCEDURE_CAT String => procedure catalog (may be null)
                2. PROCEDURE_SCHEM String => procedure schema (may be null)
                3. PROCEDURE_NAME String => procedure name
                4. COLUMN_NAME String => column/parameter name
                5. COLUMN_TYPE Short => kind of column/parameter:
                  • procedureColumnUnknown - nobody knows
                  • procedureColumnIn - IN parameter
                  • procedureColumnInOut - INOUT parameter
                  • procedureColumnOut - OUT parameter
                  • procedureColumnReturn - procedure return value
                  • procedureColumnResult - result column in ResultSet
                6. DATA_TYPE short => SQL type from java.sql.Types
                7. TYPE_NAME String => SQL type name, for a UDT type the type name is fully qualified
                8. PRECISION int => precision
                9. LENGTH int => length in bytes of data
                10. SCALE short => scale
                11. RADIX short => radix
                12. NULLABLE short => can it contain NULL.
                  • procedureNoNulls - does not allow NULL values
                  • procedureNullable - allows NULL values
                  • procedureNullableUnknown - nullability unknown
                13. REMARKS String => comment describing parameter/column

                Note: Some databases may not return the column descriptions for a procedure. Additional columns beyond REMARKS can be defined by the database.

                HSQLDB-Specific Information:

                HSQLDB treats unquoted identifiers as case insensitive in SQL but stores them in upper case; it treats quoted identifiers as case sensitive and stores them verbatim. All jdbcDatabaseMetaData methods perform case-sensitive comparison between name (pattern) arguments and the corresponding identifier values as they are stored in the database. Therefore, care must be taken to specify name arguments precisely (including case) as they are stored in the database.

                Since 1.7.2, this feature is supported by default. If the jar is compiled without org.hsqldb.DatabaseInformationFull or org.hsqldb.DatabaseInformationMain, the feature is not supported. The default implementation is DatabaseInformationFull.

                Specified by:
                getProcedureColumns in interface java.sql.DatabaseMetaData
                Parameters:
                catalog - a catalog name; must match the catalog name as it is stored in the database; "" retrieves those without a catalog; null means that the catalog name should not be used to narrow the search
                schemaPattern - a schema name pattern; must match the schema name as it is stored in the database; "" retrieves those without a schema; null means that the schema name should not be used to narrow the search
                procedureNamePattern - a procedure name pattern; must match the procedure name as it is stored in the database
                columnNamePattern - a column name pattern; must match the column name as it is stored in the database
                Returns:
                ResultSet - each row describes a stored procedure parameter or column
                Throws:
                java.sql.SQLException - if a database access error occurs
                See Also:
                getSearchStringEscape()

                getTables

                public java.sql.ResultSet getTables(java.lang.String catalog,
                                                    java.lang.String schemaPattern,
                                                    java.lang.String tableNamePattern,
                                                    java.lang.String[] types)
                                             throws java.sql.SQLException
                Retrieves a description of the tables available in the given catalog. Only table descriptions matching the catalog, schema, table name and type criteria are returned. They are ordered by TABLE_TYPE, TABLE_SCHEM and TABLE_NAME.

                Each table description has the following columns:

                1. TABLE_CAT String => table catalog (may be null)
                2. TABLE_SCHEM String => table schema (may be null)
                3. TABLE_NAME String => table name
                4. TABLE_TYPE String => table type. Typical types are "TABLE", "VIEW", "SYSTEM TABLE", "GLOBAL TEMPORARY", "LOCAL TEMPORARY", "ALIAS", "SYNONYM".
                5. REMARKS String => explanatory comment on the table
                6. TYPE_CAT String => the types catalog (may be null)
                7. TYPE_SCHEM String => the types schema (may be null)
                8. TYPE_NAME String => type name (may be null)
                9. SELF_REFERENCING_COL_NAME String => name of the designated "identifier" column of a typed table (may be null)
                10. REF_GENERATION String => specifies how values in SELF_REFERENCING_COL_NAME are created. Values are "SYSTEM", "USER", "DERIVED". (may be null)

                Note: Some databases may not return information for all tables.

                HSQLDB-Specific Information:

                HSQLDB treats unquoted identifiers as case insensitive in SQL but stores them in upper case; it treats quoted identifiers as case sensitive and stores them verbatim. All jdbcDatabaseMetaData methods perform case-sensitive comparison between name (pattern) arguments and the corresponding identifier values as they are stored in the database. Therefore, care must be taken to specify name arguments precisely (including case) as they are stored in the database.

                Since 1.7.0, HSQLDB returns extra information on TEXT tables in the REMARKS column.

                Since 1.7.0, HSQLDB includes the new JDBC3 columns TYPE_CAT, TYPE_SCHEM, TYPE_NAME and SELF_REFERENCING_COL_NAME in anticipation of JDBC3 compliant tools.

                Since 1.7.2, this feature is supported by default. If the jar is compiled without org.hsqldb.DatabaseInformationFull or org.hsqldb.DatabaseInformationMain, the feature is not supported. The default implementation is DatabaseInformationFull.

                Specified by:
                getTables in interface java.sql.DatabaseMetaData
                Parameters:
                catalog - a catalog name; must match the catalog name as it is stored in the database; "" retrieves those without a catalog; null means that the catalog name should not be used to narrow the search
                schemaPattern - a schema name pattern; must match the schema name as it is stored in the database; "" retrieves those without a schema; null means that the schema name should not be used to narrow the search
                tableNamePattern - a table name pattern; must match the table name as it is stored in the database
                types - a list of table types to include; null returns all types
                Returns:
                ResultSet - each row is a table description
                Throws:
                java.sql.SQLException - if a database access error occurs
                See Also:
                getSearchStringEscape()

                getSchemas

                public java.sql.ResultSet getSchemas()
                                              throws java.sql.SQLException
                Retrieves the schema names available in this database. The results are ordered by schema name.

                The schema column is:

                1. TABLE_SCHEM String => schema name
                2. TABLE_CATALOG String => catalog name (may be null)

                HSQLDB-Specific Information:

                In 1.8.0, the list of schemas is returned.

                Specified by:
                getSchemas in interface java.sql.DatabaseMetaData
                Returns:
                a ResultSet object in which each row is a schema decription
                Throws:
                java.sql.SQLException - if a database access error occurs

                getCatalogs

                public java.sql.ResultSet getCatalogs()
                                               throws java.sql.SQLException
                Retrieves the catalog names available in this database. The results are ordered by catalog name.

                The catalog column is:

                1. TABLE_CAT String => catalog name

                HSQLDB-Specific Information:

                Since 1.7.2, this feature is supported by default. If the jar is compiled without org.hsqldb.DatabaseInformationFull or org.hsqldb.DatabaseInformationMain, the feature is not supported. The default implementation is DatabaseInformationFull.

                Specified by:
                getCatalogs in interface java.sql.DatabaseMetaData
                Returns:
                a ResultSet object in which each row has a single String column that is a catalog name
                Throws:
                java.sql.SQLException - if a database access error occurs

                getTableTypes

                public java.sql.ResultSet getTableTypes()
                                                 throws java.sql.SQLException
                Retrieves the table types available in this database. The results are ordered by table type.

                The table type is:

                1. TABLE_TYPE String => table type. Typical types are "TABLE", "VIEW", "SYSTEM TABLE", "GLOBAL TEMPORARY", "LOCAL TEMPORARY", "ALIAS", "SYNONYM".

                HSQLDB-Specific Information:

                Since 1.7.1, HSQLDB reports: "TABLE", "VIEW" and "GLOBAL TEMPORARY" types. Since 1.7.2, this feature is supported by default. If the jar is compiled without org.hsqldb.DatabaseInformationFull or org.hsqldb.DatabaseInformationMain, the feature is not supported. The default implementation is DatabaseInformationFull.

                Specified by:
                getTableTypes in interface java.sql.DatabaseMetaData
                Returns:
                a ResultSet object in which each row has a single String column that is a table type
                Throws:
                java.sql.SQLException - if a database access error occurs

                getColumns

                public java.sql.ResultSet getColumns(java.lang.String catalog,
                                                     java.lang.String schemaPattern,
                                                     java.lang.String tableNamePattern,
                                                     java.lang.String columnNamePattern)
                                              throws java.sql.SQLException
                Retrieves a description of table columns available in the specified catalog.

                Only column descriptions matching the catalog, schema, table and column name criteria are returned. They are ordered by TABLE_SCHEM, TABLE_NAME, and ORDINAL_POSITION.

                Each column description has the following columns:

                1. TABLE_CAT String => table catalog (may be null)
                2. TABLE_SCHEM String => table schema (may be null)
                3. TABLE_NAME String => table name
                4. COLUMN_NAME String => column name
                5. DATA_TYPE short => SQL type from java.sql.Types
                6. TYPE_NAME String => Data source dependent type name, for a UDT the type name is fully qualified
                7. COLUMN_SIZE int => column size. For char or date types this is the maximum number of characters, for numeric or decimal types this is precision.
                8. BUFFER_LENGTH is not used.
                9. DECIMAL_DIGITS int => the number of fractional digits
                10. NUM_PREC_RADIX int => Radix (typically either 10 or 2)
                11. NULLABLE int => is NULL allowed.
                  • columnNoNulls - might not allow NULL values
                  • columnNullable - definitely allows NULL values
                  • columnNullableUnknown - nullability unknown
                12. REMARKS String => comment describing column (may be null)
                13. COLUMN_DEF String => default value (may be null)
                14. SQL_DATA_TYPE int => unused
                15. SQL_DATETIME_SUB int => unused
                16. CHAR_OCTET_LENGTH int => for char types the maximum number of bytes in the column
                17. ORDINAL_POSITION int => index of column in table (starting at 1)
                18. IS_NULLABLE String => "NO" means column definitely does not allow NULL values; "YES" means the column might allow NULL values. An empty string means nobody knows.
                19. SCOPE_CATLOG String => catalog of table that is the scope of a reference attribute (null if DATA_TYPE isn't REF)
                20. SCOPE_SCHEMA String => schema of table that is the scope of a reference attribute (null if the DATA_TYPE isn't REF)
                21. SCOPE_TABLE String => table name that this the scope of a reference attribure (null if the DATA_TYPE isn't REF)
                22. SOURCE_DATA_TYPE short => source type of a distinct type or user-generated Ref type, SQL type from java.sql.Types (null if DATA_TYPE isn't DISTINCT or user-generated REF)

                HSQLDB-Specific Information:

                HSQLDB treats unquoted identifiers as case insensitive in SQL but stores them in upper case; it treats quoted identifiers as case sensitive and stores them verbatim. All jdbcDatabaseMetaData methods perform case-sensitive comparison between name (pattern) arguments and the corresponding identifier values as they are stored in the database. Therefore, care must be taken to specify name arguments precisely (including case) as they are stored in the database.

                Since 1.7.0, HSQLDB includes the new JDBC 3 columns SCOPE_CATLOG, SCOPE_SCHEMA, SCOPE_TABLE and SOURCE_DATA_TYPE in anticipation of JDBC 3 compliant tools. However, these columns are never filled in; the engine does not support the related features.

                Since 1.7.2, this feature is supported by default. If the jar is compiled without org.hsqldb.DatabaseInformationFull or org.hsqldb.DatabaseInformationMain, the feature is not supported. The default implementation is DatabaseInformationFull.

                Specified by:
                getColumns in interface java.sql.DatabaseMetaData
                Parameters:
                catalog - a catalog name; must match the catalog name as it is stored in the database; "" retrieves those without a catalog; null means that the catalog name should not be used to narrow the search
                schemaPattern - a schema name pattern; must match the schema name as it is stored in the database; "" retrieves those without a schema; null means that the schema name should not be used to narrow the search
                tableNamePattern - a table name pattern; must match the table name as it is stored in the database
                columnNamePattern - a column name pattern; must match the column name as it is stored in the database
                Returns:
                ResultSet - each row is a column description
                Throws:
                java.sql.SQLException - if a database access error occurs
                See Also:
                getSearchStringEscape()

                getColumnPrivileges

                public java.sql.ResultSet getColumnPrivileges(java.lang.String catalog,
                                                              java.lang.String schema,
                                                              java.lang.String table,
                                                              java.lang.String columnNamePattern)
                                                       throws java.sql.SQLException
                Retrieves a description of the access rights for a table's columns.

                Only privileges matching the column name criteria are returned. They are ordered by COLUMN_NAME and PRIVILEGE.

                Each privilige description has the following columns:

                1. TABLE_CAT String => table catalog (may be null)
                2. TABLE_SCHEM String => table schema (may be null)
                3. TABLE_NAME String => table name
                4. COLUMN_NAME String => column name
                5. GRANTOR => grantor of access (may be null)
                6. GRANTEE String => grantee of access
                7. PRIVILEGE String => name of access (SELECT, INSERT, UPDATE, REFRENCES, ...)
                8. IS_GRANTABLE String => "YES" if grantee is permitted to grant to others; "NO" if not; null if unknown

                HSQLDB-Specific Information:

                HSQLDB treats unquoted identifiers as case insensitive in SQL but stores them in upper case; it treats quoted identifiers as case sensitive and stores them verbatim. All jdbcDatabaseMetaData methods perform case-sensitive comparison between name (pattern) arguments and the corresponding identifier values as they are stored in the database. Therefore, care must be taken to specify name arguments precisely (including case) as they are stored in the database.

                Since 1.7.2, this feature is supported by default. If the jar is compiled without org.hsqldb.DatabaseInformationFull or org.hsqldb.DatabaseInformationMain, the feature is not supported. The default implementation is DatabaseInformationFull.

                Specified by:
                getColumnPrivileges in interface java.sql.DatabaseMetaData
                Parameters:
                catalog - a catalog name; must match the catalog name as it is stored in the database; "" retrieves those without a catalog; null means that the catalog name should not be used to narrow the search
                schema - a schema name; must match the schema name as it is stored in the database; "" retrieves those without a schema; null means that the schema name should not be used to narrow the search
                table - a table name; must match the table name as it is stored in the database
                columnNamePattern - a column name pattern; must match the column name as it is stored in the database
                Returns:
                ResultSet - each row is a column privilege description
                Throws:
                java.sql.SQLException - if a database access error occurs
                See Also:
                getSearchStringEscape()

                getTablePrivileges

                public java.sql.ResultSet getTablePrivileges(java.lang.String catalog,
                                                             java.lang.String schemaPattern,
                                                             java.lang.String tableNamePattern)
                                                      throws java.sql.SQLException
                Retrieves a description of the access rights for each table available in a catalog. Note that a table privilege applies to one or more columns in the table. It would be wrong to assume that this privilege applies to all columns (this may be true for some systems but is not true for all.)

                Only privileges matching the schema and table name criteria are returned. They are ordered by TABLE_SCHEM, TABLE_NAME, and PRIVILEGE.

                Each privilige description has the following columns:

                1. TABLE_CAT String => table catalog (may be null)
                2. TABLE_SCHEM String => table schema (may be null)
                3. TABLE_NAME String => table name
                4. GRANTOR => grantor of access (may be null)
                5. GRANTEE String => grantee of access
                6. PRIVILEGE String => name of access (SELECT, INSERT, UPDATE, REFRENCES, ...)
                7. IS_GRANTABLE String => "YES" if grantee is permitted to grant to others; "NO" if not; null if unknown

                HSQLDB-Specific Information:

                HSQLDB treats unquoted identifiers as case insensitive in SQL but stores them in upper case; it treats quoted identifiers as case sensitive and stores them verbatim. All jdbcDatabaseMetaData methods perform case-sensitive comparison between name (pattern) arguments and the corresponding identifier values as they are stored in the database. Therefore, care must be taken to specify name arguments precisely (including case) as they are stored in the database.

                Since 1.7.2, this feature is supported by default. If the jar is compiled without org.hsqldb.DatabaseInformationFull or org.hsqldb.DatabaseInformationMain, the feature is not supported. The default implementation is DatabaseInformationFull.

                Specified by:
                getTablePrivileges in interface java.sql.DatabaseMetaData
                Parameters:
                catalog - a catalog name; must match the catalog name as it is stored in the database; "" retrieves those without a catalog; null means that the catalog name should not be used to narrow the search
                schemaPattern - a schema name pattern; must match the schema name as it is stored in the database; "" retrieves those without a schema; null means that the schema name should not be used to narrow the search
                tableNamePattern - a table name pattern; must match the table name as it is stored in the database
                Returns:
                ResultSet - each row is a table privilege description
                Throws:
                java.sql.SQLException - if a database access error occurs
                See Also:
                getSearchStringEscape()

                getBestRowIdentifier

                public java.sql.ResultSet getBestRowIdentifier(java.lang.String catalog,
                                                               java.lang.String schema,
                                                               java.lang.String table,
                                                               int scope,
                                                               boolean nullable)
                                                        throws java.sql.SQLException
                Retrieves a description of a table's optimal set of columns that uniquely identifies a row. They are ordered by SCOPE.

                Each column description has the following columns:

                1. SCOPE short => actual scope of result
                  • bestRowTemporary - very temporary, while using row
                  • bestRowTransaction - valid for remainder of current transaction
                  • bestRowSession - valid for remainder of current session
                2. COLUMN_NAME String => column name
                3. DATA_TYPE short => SQL data type from java.sql.Types
                4. TYPE_NAME String => Data source dependent type name, for a UDT the type name is fully qualified
                5. COLUMN_SIZE int => precision
                6. BUFFER_LENGTH int => not used
                7. DECIMAL_DIGITS short => scale
                8. PSEUDO_COLUMN short => is this a pseudo column like an Oracle ROWID
                  • bestRowUnknown - may or may not be pseudo column
                  • bestRowNotPseudo - is NOT a pseudo column
                  • bestRowPseudo - is a pseudo column

                HSQLDB-Specific Information:

                HSQLDB treats unquoted identifiers as case insensitive in SQL but stores them in upper case; it treats quoted identifiers as case sensitive and stores them verbatim. All jdbcDatabaseMetaData methods perform case-sensitive comparison between name (pattern) arguments and the corresponding identifier values as they are stored in the database. Therefore, care must be taken to specify name arguments precisely (including case) as they are stored in the database.

                If the name of a column is defined in the database without double quotes, an all-uppercase name must be specified when calling this method. Otherwise, the name must be specified in the exact case of the column definition in the database.

                Since 1.7.2, this feature is supported by default. If the jar is compiled without org.hsqldb.DatabaseInformationFull or org.hsqldb.DatabaseInformationMain, the feature is not supported. The default implementation is DatabaseInformationFull.

                Specified by:
                getBestRowIdentifier in interface java.sql.DatabaseMetaData
                Parameters:
                catalog - a catalog name; must match the catalog name as it is stored in the database; "" retrieves those without a catalog; null means that the catalog name should not be used to narrow the search
                schema - a schema name; must match the schema name as it is stored in the database; "" retrieves those without a schema; null means that the schema name should not be used to narrow the search
                table - a table name; must match the table name as it is stored in the database
                scope - the scope of interest; use same values as SCOPE
                nullable - include columns that are nullable.
                Returns:
                ResultSet - each row is a column description
                Throws:
                java.sql.SQLException - if a database access error occurs

                getVersionColumns

                public java.sql.ResultSet getVersionColumns(java.lang.String catalog,
                                                            java.lang.String schema,
                                                            java.lang.String table)
                                                     throws java.sql.SQLException
                Retrieves a description of a table's columns that are automatically updated when any value in a row is updated. They are unordered.

                Each column description has the following columns:

                1. SCOPE short => is not used
                2. COLUMN_NAME String => column name
                3. DATA_TYPE short => SQL data type from java.sql.Types
                4. TYPE_NAME String => Data source-dependent type name
                5. COLUMN_SIZE int => precision
                6. BUFFER_LENGTH int => length of column value in bytes
                7. DECIMAL_DIGITS short => scale
                8. PSEUDO_COLUMN short => whether this is pseudo column like an Oracle ROWID
                  • versionColumnUnknown - may or may not be pseudo column
                  • versionColumnNotPseudo - is NOT a pseudo column
                  • versionColumnPseudo - is a pseudo column

                HSQLDB-Specific Information:

                HSQLDB treats unquoted identifiers as case insensitive in SQL but stores them in upper case; it treats quoted identifiers as case sensitive and stores them verbatim. All jdbcDatabaseMetaData methods perform case-sensitive comparison between name (pattern) arguments and the corresponding identifier values as they are stored in the database. Therefore, care must be taken to specify name arguments precisely (including case) as they are stored in the database.

                Since 1.7.2, this feature is supported by default. If the jar is compiled without org.hsqldb.DatabaseInformationFull or org.hsqldb.DatabaseInformationMain, the feature is not supported. The default implementation is DatabaseInformationFull.

                Specified by:
                getVersionColumns in interface java.sql.DatabaseMetaData
                Parameters:
                catalog - a catalog name; must match the catalog name as it is stored in the database; "" retrieves those without a catalog; null means that the catalog name should not be used to narrow the search
                schema - a schema name; must match the schema name as it is stored in the database; "" retrieves those without a schema; null means that the schema name should not be used to narrow the search
                table - a table name; must match the table name as it is stored in the database
                Returns:
                a ResultSet object in which each row is a column description
                Throws:
                java.sql.SQLException - if a database access error occurs

                getPrimaryKeys

                public java.sql.ResultSet getPrimaryKeys(java.lang.String catalog,
                                                         java.lang.String schema,
                                                         java.lang.String table)
                                                  throws java.sql.SQLException
                Retrieves a description of the given table's primary key columns. They are ordered by COLUMN_NAME.

                Each primary key column description has the following columns:

                1. TABLE_CAT String => table catalog (may be null)
                2. TABLE_SCHEM String => table schema (may be null)
                3. TABLE_NAME String => table name
                4. COLUMN_NAME String => column name
                5. KEY_SEQ short => sequence number within primary key
                6. PK_NAME String => primary key name (may be null)

                HSQLDB-Specific Information:

                HSQLDB treats unquoted identifiers as case insensitive in SQL but stores them in upper case; it treats quoted identifiers as case sensitive and stores them verbatim. All jdbcDatabaseMetaData methods perform case-sensitive comparison between name (pattern) arguments and the corresponding identifier values as they are stored in the database. Therefore, care must be taken to specify name arguments precisely (including case) as they are stored in the database.

                Since 1.7.2, this feature is supported by default. If the jar is compiled without org.hsqldb.DatabaseInformationFull or org.hsqldb.DatabaseInformationMain, the feature is not supported. The default implementation is DatabaseInformationFull.

                Specified by:
                getPrimaryKeys in interface java.sql.DatabaseMetaData
                Parameters:
                catalog - a catalog name; must match the catalog name as it is stored in the database; "" retrieves those without a catalog; null means that the catalog name should not be used to narrow the search
                schema - a schema name; must match the schema name as it is stored in the database; "" retrieves those without a schema; null means that the schema name should not be used to narrow the search
                table - a table name; must match the table name as it is stored in the database
                Returns:
                ResultSet - each row is a primary key column description
                Throws:
                java.sql.SQLException - if a database access error occurs
                See Also:
                supportsMixedCaseQuotedIdentifiers(), storesUpperCaseIdentifiers()

                getImportedKeys

                public java.sql.ResultSet getImportedKeys(java.lang.String catalog,
                                                          java.lang.String schema,
                                                          java.lang.String table)
                                                   throws java.sql.SQLException
                Retrieves a description of the primary key columns that are referenced by a table's foreign key columns (the primary keys imported by a table). They are ordered by PKTABLE_CAT, PKTABLE_SCHEM, PKTABLE_NAME, and KEY_SEQ.

                Each primary key column description has the following columns:

                1. PKTABLE_CAT String => primary key table catalog being imported (may be null)
                2. PKTABLE_SCHEM String => primary key table schema being imported (may be null)
                3. PKTABLE_NAME String => primary key table name being imported
                4. PKCOLUMN_NAME String => primary key column name being imported
                5. FKTABLE_CAT String => foreign key table catalog (may be null)
                6. FKTABLE_SCHEM String => foreign key table schema (may be null)
                7. FKTABLE_NAME String => foreign key table name
                8. FKCOLUMN_NAME String => foreign key column name
                9. KEY_SEQ short => sequence number within a foreign key
                10. UPDATE_RULE short => What happens to a foreign key when the primary key is updated:
                  • importedNoAction - do not allow update of primary key if it has been imported
                  • importedKeyCascade - change imported key to agree with primary key update
                  • importedKeySetNull - change imported key to NULL if its primary key has been updated
                  • importedKeySetDefault - change imported key to default values if its primary key has been updated
                  • importedKeyRestrict - same as importedKeyNoAction (for ODBC 2.x compatibility)
                11. DELETE_RULE short => What happens to the foreign key when primary is deleted.
                  • importedKeyNoAction - do not allow delete of primary key if it has been imported
                  • importedKeyCascade - delete rows that import a deleted key
                  • importedKeySetNull - change imported key to NULL if its primary key has been deleted
                  • importedKeyRestrict - same as importedKeyNoAction (for ODBC 2.x compatibility)
                  • importedKeySetDefault - change imported key to default if its primary key has been deleted
                12. FK_NAME String => foreign key name (may be null)
                13. PK_NAME String => primary key name (may be null)
                14. DEFERRABILITY short => can the evaluation of foreign key constraints be deferred until commit
                  • importedKeyInitiallyDeferred - see SQL92 for definition
                  • importedKeyInitiallyImmediate - see SQL92 for definition
                  • importedKeyNotDeferrable - see SQL92 for definition

                HSQLDB-Specific Information:

                HSQLDB treats unquoted identifiers as case insensitive in SQL but stores them in upper case; it treats quoted identifiers as case sensitive and stores them verbatim. All jdbcDatabaseMetaData methods perform case-sensitive comparison between name (pattern) arguments and the corresponding identifier values as they are stored in the database. Therefore, care must be taken to specify name arguments precisely (including case) as they are stored in the database.

                Since 1.7.2, this feature is supported by default. If the jar is compiled without org.hsqldb.DatabaseInformationFull or org.hsqldb.DatabaseInformationMain, the feature is not supported. The default implementation is DatabaseInformationFull.

                Specified by:
                getImportedKeys in interface java.sql.DatabaseMetaData
                Parameters:
                catalog - a catalog name; must match the catalog name as it is stored in the database; "" retrieves those without a catalog; null means that the catalog name should not be used to narrow the search
                schema - a schema name; must match the schema name as it is stored in the database; "" retrieves those without a schema; null means that the schema name should not be used to narrow the search
                table - a table name; must match the table name as it is stored in the database
                Returns:
                ResultSet - each row is a primary key column description
                Throws:
                java.sql.SQLException - if a database access error occurs
                See Also:
                getExportedKeys(java.lang.String, java.lang.String, java.lang.String), supportsMixedCaseQuotedIdentifiers(), storesUpperCaseIdentifiers()

                getExportedKeys

                public java.sql.ResultSet getExportedKeys(java.lang.String catalog,
                                                          java.lang.String schema,
                                                          java.lang.String table)
                                                   throws java.sql.SQLException
                Retrieves a description of the foreign key columns that reference the given table's primary key columns (the foreign keys exported by a table). They are ordered by FKTABLE_CAT, FKTABLE_SCHEM, FKTABLE_NAME, and KEY_SEQ.

                Each foreign key column description has the following columns:

                1. PKTABLE_CAT String => primary key table catalog (may be null)
                2. PKTABLE_SCHEM String => primary key table schema (may be null)
                3. PKTABLE_NAME String => primary key table name
                4. PKCOLUMN_NAME String => primary key column name
                5. FKTABLE_CAT String => foreign key table catalog (may be null) being exported (may be null)
                6. FKTABLE_SCHEM String => foreign key table schema (may be null) being exported (may be null)
                7. FKTABLE_NAME String => foreign key table name being exported
                8. FKCOLUMN_NAME String => foreign key column name being exported
                9. KEY_SEQ short => sequence number within foreign key
                10. UPDATE_RULE short => What happens to foreign key when primary is updated:
                  • importedNoAction - do not allow update of primary key if it has been imported
                  • importedKeyCascade - change imported key to agree with primary key update
                  • importedKeySetNull - change imported key to NULL if its primary key has been updated
                  • importedKeySetDefault - change imported key to default values if its primary key has been updated
                  • importedKeyRestrict - same as importedKeyNoAction (for ODBC 2.x compatibility)
                11. DELETE_RULE short => What happens to the foreign key when primary is deleted.
                  • importedKeyNoAction - do not allow delete of primary key if it has been imported
                  • importedKeyCascade - delete rows that import a deleted key
                  • importedKeySetNull - change imported key to NULL if its primary key has been deleted
                  • importedKeyRestrict - same as importedKeyNoAction (for ODBC 2.x compatibility)
                  • importedKeySetDefault - change imported key to default if its primary key has been deleted
                12. FK_NAME String => foreign key name (may be null)
                13. PK_NAME String => primary key name (may be null)
                14. DEFERRABILITY short => can the evaluation of foreign key constraints be deferred until commit
                  • importedKeyInitiallyDeferred - see SQL92 for definition
                  • importedKeyInitiallyImmediate - see SQL92 for definition
                  • importedKeyNotDeferrable - see SQL92 for definition

                HSQLDB-Specific Information:

                HSQLDB treats unquoted identifiers as case insensitive in SQL but stores them in upper case; it treats quoted identifiers as case sensitive and stores them verbatim. All jdbcDatabaseMetaData methods perform case-sensitive comparison between name (pattern) arguments and the corresponding identifier values as they are stored in the database. Therefore, care must be taken to specify name arguments precisely (including case) as they are stored in the database.

                Since 1.7.2, this feature is supported by default. If the jar is compiled without org.hsqldb.DatabaseInformationFull or org.hsqldb.DatabaseInformationMain, the feature is not supported. The default implementation is DatabaseInformationFull.

                Specified by:
                getExportedKeys in interface java.sql.DatabaseMetaData
                Parameters:
                catalog - a catalog name; must match the catalog name as it is stored in this database; "" retrieves those without a catalog; null means that the catalog name should not be used to narrow the search
                schema - a schema name; must match the schema name as it is stored in the database; "" retrieves those without a schema; null means that the schema name should not be used to narrow the search
                table - a table name; must match the table name as it is stored in this database
                Returns:
                a ResultSet object in which each row is a foreign key column description
                Throws:
                java.sql.SQLException - if a database access error occurs
                See Also:
                getImportedKeys(java.lang.String, java.lang.String, java.lang.String), supportsMixedCaseQuotedIdentifiers(), storesUpperCaseIdentifiers()

                getCrossReference

                public java.sql.ResultSet getCrossReference(java.lang.String primaryCatalog,
                                                            java.lang.String primarySchema,
                                                            java.lang.String primaryTable,
                                                            java.lang.String foreignCatalog,
                                                            java.lang.String foreignSchema,
                                                            java.lang.String foreignTable)
                                                     throws java.sql.SQLException
                Retrieves a description of the foreign key columns in the given foreign key table that reference the primary key columns of the given primary key table (describe how one table imports another's key). This should normally return a single foreign key/primary key pair because most tables import a foreign key from a table only once. They are ordered by FKTABLE_CAT, FKTABLE_SCHEM, FKTABLE_NAME, and KEY_SEQ.

                Each foreign key column description has the following columns:

                1. PKTABLE_CAT String => primary key table catalog (may be null)
                2. PKTABLE_SCHEM String => primary key table schema (may be null)
                3. PKTABLE_NAME String => primary key table name
                4. PKCOLUMN_NAME String => primary key column name
                5. FKTABLE_CAT String => foreign key table catalog (may be null) being exported (may be null)
                6. FKTABLE_SCHEM String => foreign key table schema (may be null) being exported (may be null)
                7. FKTABLE_NAME String => foreign key table name being exported
                8. FKCOLUMN_NAME String => foreign key column name being exported
                9. KEY_SEQ short => sequence number within foreign key
                10. UPDATE_RULE short => What happens to foreign key when primary is updated:
                  • importedNoAction - do not allow update of primary key if it has been imported
                  • importedKeyCascade - change imported key to agree with primary key update
                  • importedKeySetNull - change imported key to NULL if its primary key has been updated
                  • importedKeySetDefault - change imported key to default values if its primary key has been updated
                  • importedKeyRestrict - same as importedKeyNoAction (for ODBC 2.x compatibility)
                11. DELETE_RULE short => What happens to the foreign key when primary is deleted.
                  • importedKeyNoAction - do not allow delete of primary key if it has been imported
                  • importedKeyCascade - delete rows that import a deleted key
                  • importedKeySetNull - change imported key to NULL if its primary key has been deleted
                  • importedKeyRestrict - same as importedKeyNoAction (for ODBC 2.x compatibility)
                  • importedKeySetDefault - change imported key to default if its primary key has been deleted
                12. FK_NAME String => foreign key name (may be null)
                13. PK_NAME String => primary key name (may be null)
                14. DEFERRABILITY short => can the evaluation of foreign key constraints be deferred until commit
                  • importedKeyInitiallyDeferred - see SQL92 for definition
                  • importedKeyInitiallyImmediate - see SQL92 for definition
                  • importedKeyNotDeferrable - see SQL92 for definition

                HSQLDB-Specific Information:

                HSQLDB treats unquoted identifiers as case insensitive in SQL but stores them in upper case; it treats quoted identifiers as case sensitive and stores them verbatim. All jdbcDatabaseMetaData methods perform case-sensitive comparison between name (pattern) arguments and the corresponding identifier values as they are stored in the database. Therefore, care must be taken to specify name arguments precisely (including case) as they are stored in the database.

                Since 1.7.2, this feature is supported by default. If the jar is compiled without org.hsqldb.DatabaseInformationFull or org.hsqldb.DatabaseInformationMain, the feature is not supported. The default implementation is DatabaseInformationFull.

                Specified by:
                getCrossReference in interface java.sql.DatabaseMetaData
                Parameters:
                primaryCatalog - a catalog name; must match the catalog name as it is stored in the database; "" retrieves those without a catalog; null means drop catalog name from the selection criteria
                primarySchema - a schema name; must match the schema name as it is stored in the database; "" retrieves those without a schema; null means drop schema name from the selection criteria
                primaryTable - the name of the table that exports the key; must match the table name as it is stored in the database
                foreignCatalog - a catalog name; must match the catalog name as it is stored in the database; "" retrieves those without a catalog; null means drop catalog name from the selection criteria
                foreignSchema - a schema name; must match the schema name as it is stored in the database; "" retrieves those without a schema; null means drop schema name from the selection criteria
                foreignTable - the name of the table that imports the key; must match the table name as it is stored in the database
                Returns:
                ResultSet - each row is a foreign key column description
                Throws:
                java.sql.SQLException - if a database access error occurs
                See Also:
                getImportedKeys(java.lang.String, java.lang.String, java.lang.String), supportsMixedCaseQuotedIdentifiers(), storesUpperCaseIdentifiers()

                getTypeInfo

                public java.sql.ResultSet getTypeInfo()
                                               throws java.sql.SQLException
                Retrieves a description of all the standard SQL types supported by this database. They are ordered by DATA_TYPE and then by how closely the data type maps to the corresponding JDBC SQL type.

                Each type description has the following columns:

                1. TYPE_NAME String => Type name
                2. DATA_TYPE short => SQL data type from java.sql.Types
                3. PRECISION int => maximum precision
                4. LITERAL_PREFIX String => prefix used to quote a literal (may be null)
                5. LITERAL_SUFFIX String => suffix used to quote a literal (may be null)
                6. CREATE_PARAMS String => parameters used in creating the type (may be null)
                7. NULLABLE short => can you use NULL for this type.
                  • typeNoNulls - does not allow NULL values
                  • typeNullable - allows NULL values
                  • typeNullableUnknown - nullability unknown
                8. CASE_SENSITIVE boolean=> is it case sensitive.
                9. SEARCHABLE short => can you use "WHERE" based on this type:
                  • typePredNone - No support
                  • typePredChar - Only supported with WHERE .. LIKE
                  • typePredBasic - Supported except for WHERE .. LIKE
                  • typeSearchable - Supported for all WHERE ..
                10. UNSIGNED_ATTRIBUTE boolean => is it unsigned.
                11. FIXED_PREC_SCALE boolean => can it be a money value.
                12. AUTO_INCREMENT boolean => can it be used for an auto-increment value.
                13. LOCAL_TYPE_NAME String => localized version of type name (may be null)
                14. MINIMUM_SCALE short => minimum scale supported
                15. MAXIMUM_SCALE short => maximum scale supported
                16. SQL_DATA_TYPE int => unused
                17. SQL_DATETIME_SUB int => unused
                18. NUM_PREC_RADIX int => usually 2 or 10

                HSQLDB-Specific Information:

                Since 1.7.2, this feature is supported by default. If the jar is compiled without org.hsqldb.DatabaseInformationFull or org.hsqldb.DatabaseInformationMain, the feature is not supported. The default implementation is DatabaseInformationFull.

                Specified by:
                getTypeInfo in interface java.sql.DatabaseMetaData
                Returns:
                a ResultSet object in which each row is an SQL type description
                Throws:
                java.sql.SQLException - if a database access error occurs

                getIndexInfo

                public java.sql.ResultSet getIndexInfo(java.lang.String catalog,
                                                       java.lang.String schema,
                                                       java.lang.String table,
                                                       boolean unique,
                                                       boolean approximate)
                                                throws java.sql.SQLException
                Retrieves a description of the given table's indices and statistics. They are ordered by NON_UNIQUE, TYPE, INDEX_NAME, and ORDINAL_POSITION.

                Each index column description has the following columns:

                1. TABLE_CAT String => table catalog (may be null)
                2. TABLE_SCHEM String => table schema (may be null)
                3. TABLE_NAME String => table name
                4. NON_UNIQUE boolean => Can index values be non-unique. false when TYPE is tableIndexStatistic
                5. INDEX_QUALIFIER String => index catalog (may be null); null when TYPE is tableIndexStatistic
                6. INDEX_NAME String => index name; null when TYPE is tableIndexStatistic
                7. TYPE short => index type:
                  • tableIndexStatistic - this identifies table statistics that are returned in conjuction with a table's index descriptions
                  • tableIndexClustered - this is a clustered index
                  • tableIndexHashed - this is a hashed index
                  • tableIndexOther - this is some other style of index
                8. ORDINAL_POSITION short => column sequence number within index; zero when TYPE is tableIndexStatistic
                9. COLUMN_NAME String => column name; null when TYPE is tableIndexStatistic
                10. ASC_OR_DESC String => column sort sequence, "A" => ascending, "D" => descending, may be null if sort sequence is not supported; null when TYPE is tableIndexStatistic
                11. CARDINALITY int => When TYPE is tableIndexStatistic, then this is the number of rows in the table; otherwise, it is the number of unique values in the index.
                12. PAGES int => When TYPE is tableIndexStatisic then this is the number of pages used for the table, otherwise it is the number of pages used for the current index.
                13. FILTER_CONDITION String => Filter condition, if any. (may be null)

                HSQLDB-Specific Information:

                HSQLDB treats unquoted identifiers as case insensitive in SQL but stores them in upper case; it treats quoted identifiers as case sensitive and stores them verbatim. All jdbcDatabaseMetaData methods perform case-sensitive comparison between name (pattern) arguments and the corresponding identifier values as they are stored in the database. Therefore, care must be taken to specify name arguments precisely (including case) as they are stored in the database.

                Since 1.7.2, this feature is supported by default. If the jar is compiled without org.hsqldb.DatabaseInformationFull or org.hsqldb.DatabaseInformationMain, the feature is not supported. The default implementation is DatabaseInformationFull.

                Specified by:
                getIndexInfo in interface java.sql.DatabaseMetaData
                Parameters:
                catalog - a catalog name; must match the catalog name as it is stored in this database; "" retrieves those without a catalog; null means that the catalog name should not be used to narrow the search
                schema - a schema name; must match the schema name as it is stored in this database; "" retrieves those without a schema; null means that the schema name should not be used to narrow the search
                table - a table name; must match the table name as it is stored in this database
                unique - when true, return only indices for unique values; when false, return indices regardless of whether unique or not
                approximate - when true, result is allowed to reflect approximate or out of date values; when false, results are requested to be accurate
                Returns:
                ResultSet - each row is an index column description
                Throws:
                java.sql.SQLException - if a database access error occurs
                See Also:
                supportsMixedCaseQuotedIdentifiers(), storesUpperCaseIdentifiers()

                supportsResultSetType

                public boolean supportsResultSetType(int type)
                                              throws java.sql.SQLException
                Retrieves whether this database supports the given result set type.

                Specified by:
                supportsResultSetType in interface java.sql.DatabaseMetaData
                Parameters:
                type - defined in java.sql.ResultSet
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcDatabaseMetaData)
                See Also:
                jdbcConnection

                supportsResultSetConcurrency

                public boolean supportsResultSetConcurrency(int type,
                                                            int concurrency)
                                                     throws java.sql.SQLException
                Retrieves whether this database supports the given concurrency type in combination with the given result set type.

                Specified by:
                supportsResultSetConcurrency in interface java.sql.DatabaseMetaData
                Parameters:
                type - defined in java.sql.ResultSet
                concurrency - type defined in java.sql.ResultSet
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcDatabaseMetaData)
                See Also:
                jdbcConnection

                ownUpdatesAreVisible

                public boolean ownUpdatesAreVisible(int type)
                                             throws java.sql.SQLException
                Retrieves whether for the given type of ResultSet object, the result set's own updates are visible.

                HSQLDB-Specific Information:

                Up to and including 1.7.2, HSQLDB does not support updateable result sets; this method always returns false.

                Specified by:
                ownUpdatesAreVisible in interface java.sql.DatabaseMetaData
                Parameters:
                type - the ResultSet type; one of ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, or ResultSet.TYPE_SCROLL_SENSITIVE
                Returns:
                true if updates are visible for the given result set type; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcDatabaseMetaData)

                ownDeletesAreVisible

                public boolean ownDeletesAreVisible(int type)
                                             throws java.sql.SQLException
                Retrieves whether a result set's own deletes are visible.

                HSQLDB-Specific Information:

                Up to and including 1.7.2, HSQLDB does not support updateable result sets; this method always returns false.

                Specified by:
                ownDeletesAreVisible in interface java.sql.DatabaseMetaData
                Parameters:
                type - the ResultSet type; one of ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, or ResultSet.TYPE_SCROLL_SENSITIVE
                Returns:
                true if deletes are visible for the given result set type; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcDatabaseMetaData)

                ownInsertsAreVisible

                public boolean ownInsertsAreVisible(int type)
                                             throws java.sql.SQLException
                Retrieves whether a result set's own inserts are visible.

                HSQLDB-Specific Information:

                Up to and including 1.7.2, HSQLDB does not support updateable result sets; this method always returns false.

                Specified by:
                ownInsertsAreVisible in interface java.sql.DatabaseMetaData
                Parameters:
                type - the ResultSet type; one of ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, or ResultSet.TYPE_SCROLL_SENSITIVE
                Returns:
                true if inserts are visible for the given result set type; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcDatabaseMetaData)

                othersUpdatesAreVisible

                public boolean othersUpdatesAreVisible(int type)
                                                throws java.sql.SQLException
                Retrieves whether updates made by others are visible.

                HSQLDB-Specific Information:

                Up to and including 1.7.2, HSQLDB does not support updateable result sets; this method always returns false.

                Specified by:
                othersUpdatesAreVisible in interface java.sql.DatabaseMetaData
                Parameters:
                type - the ResultSet type; one of ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, or ResultSet.TYPE_SCROLL_SENSITIVE
                Returns:
                true if updates made by others are visible for the given result set type; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcDatabaseMetaData)

                othersDeletesAreVisible

                public boolean othersDeletesAreVisible(int type)
                                                throws java.sql.SQLException
                Retrieves whether deletes made by others are visible.

                HSQLDB-Specific Information:

                Up to and including 1.7.2, HSQLDB does not support updateable result sets; this method always returns false.

                Specified by:
                othersDeletesAreVisible in interface java.sql.DatabaseMetaData
                Parameters:
                type - the ResultSet type; one of ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, or ResultSet.TYPE_SCROLL_SENSITIVE
                Returns:
                true if deletes made by others are visible for the given result set type; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcDatabaseMetaData)

                othersInsertsAreVisible

                public boolean othersInsertsAreVisible(int type)
                                                throws java.sql.SQLException
                Retrieves whether inserts made by others are visible.

                HSQLDB-Specific Information:

                Up to and including 1.7.2, HSQLDB does not support updateable result sets; this method always returns false.

                Specified by:
                othersInsertsAreVisible in interface java.sql.DatabaseMetaData
                Parameters:
                type - the ResultSet type; one of ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, or ResultSet.TYPE_SCROLL_SENSITIVE
                Returns:
                true if inserts made by others are visible for the given result set type; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcDatabaseMetaData)

                updatesAreDetected

                public boolean updatesAreDetected(int type)
                                           throws java.sql.SQLException
                Retrieves whether or not a visible row update can be detected by calling the method ResultSet.rowUpdated.

                HSQLDB-Specific Information:

                Up to and including 1.7.2, HSQLDB does not support updateable result sets; this method always returns false.

                Specified by:
                updatesAreDetected in interface java.sql.DatabaseMetaData
                Parameters:
                type - the ResultSet type; one of ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, or ResultSet.TYPE_SCROLL_SENSITIVE
                Returns:
                true if changes are detected by the result set type; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcDatabaseMetaData)

                deletesAreDetected

                public boolean deletesAreDetected(int type)
                                           throws java.sql.SQLException
                Retrieves whether or not a visible row delete can be detected by calling the method ResultSet.rowDeleted. If the method deletesAreDetected returns false, it means that deleted rows are removed from the result set.

                HSQLDB-Specific Information:

                Including 1.7.2, HSQLDB does not support updateable result sets; this method always returns false.

                Specified by:
                deletesAreDetected in interface java.sql.DatabaseMetaData
                Parameters:
                type - the ResultSet type; one of ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, or ResultSet.TYPE_SCROLL_SENSITIVE
                Returns:
                true if deletes are detected by the given result set type; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcDatabaseMetaData)

                insertsAreDetected

                public boolean insertsAreDetected(int type)
                                           throws java.sql.SQLException
                Retrieves whether or not a visible row insert can be detected by calling the method ResultSet.rowInserted.

                HSQLDB-Specific Information:

                Up to and including 1.7.2, HSQLDB does not support updateable result sets; this method always returns false.

                Specified by:
                insertsAreDetected in interface java.sql.DatabaseMetaData
                Parameters:
                type - the ResultSet type; one of ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, or ResultSet.TYPE_SCROLL_SENSITIVE
                Returns:
                true if changes are detected by the specified result set type; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcDatabaseMetaData)

                supportsBatchUpdates

                public boolean supportsBatchUpdates()
                                             throws java.sql.SQLException
                Retrieves whether this database supports batch updates.

                HSQLDB-Specific Information:

                Starting with 1.7.2, HSQLDB supports batch updates; this method always returns true.

                Specified by:
                supportsBatchUpdates in interface java.sql.DatabaseMetaData
                Returns:
                true if this database supports batch upcates; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcDatabaseMetaData)

                getUDTs

                public java.sql.ResultSet getUDTs(java.lang.String catalog,
                                                  java.lang.String schemaPattern,
                                                  java.lang.String typeNamePattern,
                                                  int[] types)
                                           throws java.sql.SQLException
                Retrieves a description of the user-defined types (UDTs) defined in a particular schema. Schema-specific UDTs may have type JAVA_OBJECT, STRUCT, or DISTINCT.

                Only types matching the catalog, schema, type name and type criteria are returned. They are ordered by DATA_TYPE, TYPE_SCHEM and TYPE_NAME. The type name parameter may be a fully-qualified name. In this case, the catalog and schemaPattern parameters are ignored.

                Each type description has the following columns:

                1. TYPE_CAT String => the type's catalog (may be null)
                2. TYPE_SCHEM String => type's schema (may be null)
                3. TYPE_NAME String => type name
                4. CLASS_NAME String => Java class name
                5. DATA_TYPE String => type value defined in java.sql.Types. One of JAVA_OBJECT, STRUCT, or DISTINCT
                6. REMARKS String => explanatory comment on the type
                7. BASE_TYPE short => type code of the source type of a DISTINCT type or the type that implements the user-generated reference type of the SELF_REFERENCING_COLUMN of a structured type as defined in java.sql.Types (null if DATA_TYPE is not DISTINCT or not STRUCT with REFERENCE_GENERATION = USER_DEFINED)

                Note: If the driver does not support UDTs, an empty result set is returned.

                HSQLDB-Specific Information:

                HSQLDB treats unquoted identifiers as case insensitive in SQL but stores them in upper case; it treats quoted identifiers as case sensitive and stores them verbatim. All jdbcDatabaseMetaData methods perform case-sensitive comparison between name (pattern) arguments and the corresponding identifier values as they are stored in the database. Therefore, care must be taken to specify name arguments precisely (including case) as they are stored in the database.

                Up to and including 1.7.1, HSQLDB does not support UDTs and thus produces an empty result.

                Starting with 1.7.2, there is an option to support this feature to greater or lesser degrees. See the documentation specific to the selected system table provider implementation. The default implementation is org.hsqldb.DatabaseInformationFull.

                Specified by:
                getUDTs in interface java.sql.DatabaseMetaData
                Parameters:
                catalog - a catalog name; must match the catalog name as it is stored in the database; "" retrieves those without a catalog; null means that the catalog name should not be used to narrow the search
                schemaPattern - a schema pattern name; must match the schema name as it is stored in the database; "" retrieves those without a schema; null means that the schema name should not be used to narrow the search
                typeNamePattern - a type name pattern; must match the type name as it is stored in the database; may be a fully qualified name
                types - a list of user-defined types (JAVA_OBJECT, STRUCT, or DISTINCT) to include; null returns all types
                Returns:
                ResultSet object in which each row describes a UDT
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcDatabaseMetaData)

                getConnection

                public java.sql.Connection getConnection()
                                                  throws java.sql.SQLException
                Retrieves the connection that produced this metadata object.

                Specified by:
                getConnection in interface java.sql.DatabaseMetaData
                Returns:
                the connection that produced this metadata object
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.2 (JDK 1.1.x developers: read the new overview for jdbcDatabaseMetaData)

                supportsSavepoints

                public boolean supportsSavepoints()
                                           throws java.sql.SQLException
                Retrieves whether this database supports savepoints.

                HSQLDB-Specific Information:

                Beginning with 1.7.2, this SQL feature is supported through JDBC as well as SQL.

                Specified by:
                supportsSavepoints in interface java.sql.DatabaseMetaData
                Returns:
                true if savepoints are supported; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7

                supportsNamedParameters

                public boolean supportsNamedParameters()
                                                throws java.sql.SQLException
                Retrieves whether this database supports named parameters to callable statements.

                HSQLDB-Specific Information:

                Starting with 1.7.2, HSQLDB supports JDBC named parameters to callable statements; this method returns true.

                Specified by:
                supportsNamedParameters in interface java.sql.DatabaseMetaData
                Returns:
                true if named parameters are supported; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7

                supportsMultipleOpenResults

                public boolean supportsMultipleOpenResults()
                                                    throws java.sql.SQLException
                Retrieves whether it is possible to have multiple ResultSet objects returned from a CallableStatement object simultaneously.

                HSQLDB-Specific Information:

                Up to and including 1.7.2, HSQLDB does not support multiple ResultSet objects returned from a CallableStatement object at all; this method always returns false.

                Specified by:
                supportsMultipleOpenResults in interface java.sql.DatabaseMetaData
                Returns:
                true if a CallableStatement object can return multiple ResultSet objects simultaneously; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7

                supportsGetGeneratedKeys

                public boolean supportsGetGeneratedKeys()
                                                 throws java.sql.SQLException
                Retrieves whether auto-generated keys can be retrieved after a statement has been executed.

                HSQLDB-Specific Information:

                Up to and including 1.7.2, HSQLDB does not support retrieving autogenerated keys through the JDBC interface at all, although it is possible to retrieve them in a proprietary fashion; this method always returns false.

                Specified by:
                supportsGetGeneratedKeys in interface java.sql.DatabaseMetaData
                Returns:
                true if auto-generated keys can be retrieved after a statement has executed; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7

                getSuperTypes

                public java.sql.ResultSet getSuperTypes(java.lang.String catalog,
                                                        java.lang.String schemaPattern,
                                                        java.lang.String typeNamePattern)
                                                 throws java.sql.SQLException
                Retrieves a description of the user-defined type (UDT) hierarchies defined in a particular schema in this database. Only the immediate super type sub type relationship is modeled.

                Only supertype information for UDTs matching the catalog, schema, and type name is returned. The type name parameter may be a fully-qualified name. When the UDT name supplied is a fully-qualified name, the catalog and schemaPattern parameters are ignored.

                If a UDT does not have a direct super type, it is not listed here. A row of the ResultSet object returned by this method describes the designated UDT and a direct supertype. A row has the following columns:

                1. TYPE_CAT String => the UDT's catalog (may be null)
                2. TYPE_SCHEM String => UDT's schema (may be null)
                3. TYPE_NAME String => type name of the UDT
                4. SUPERTYPE_CAT String => the direct super type's catalog (may be null)
                5. SUPERTYPE_SCHEM String => the direct super type's schema (may be null)
                6. SUPERTYPE_NAME String => the direct super type's name

                Note: If the driver does not support type hierarchies, an empty result set is returned.

                HSQLDB-Specific Information:

                HSQLDB treats unquoted identifiers as case insensitive in SQL but stores them in upper case; it treats quoted identifiers as case sensitive and stores them verbatim. All jdbcDatabaseMetaData methods perform case-sensitive comparison between name (pattern) arguments and the corresponding identifier values as they are stored in the database. Therefore, care must be taken to specify name arguments precisely (including case) as they are stored in the database.

                Including 1.7.1, this JDBC feature is not supported; calling this method throws a SQLException stating that the operation is not supported.

                Since 1.7.2, this feature is supported by default. If the jar is compiled without org.hsqldb.DatabaseInformationFull or org.hsqldb.DatabaseInformationMain, the feature is not supported. The default implementation is DatabaseInformationFull.

                Specified by:
                getSuperTypes in interface java.sql.DatabaseMetaData
                Parameters:
                catalog - a catalog name; "" retrieves those without a catalog; null means drop catalog name from the selection criteria
                schemaPattern - a schema name pattern; "" retrieves those without a schema
                typeNamePattern - a UDT name pattern; may be a fully-qualified name
                Returns:
                a ResultSet object in which a row gives information about the designated UDT
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7

                getSuperTables

                public java.sql.ResultSet getSuperTables(java.lang.String catalog,
                                                         java.lang.String schemaPattern,
                                                         java.lang.String tableNamePattern)
                                                  throws java.sql.SQLException
                Retrieves a description of the table hierarchies defined in a particular schema in this database.

                Only supertable information for tables matching the catalog, schema and table name are returned. The table name parameter may be a fully- qualified name, in which case, the catalog and schemaPattern parameters are ignored. If a table does not have a super table, it is not listed here. Supertables have to be defined in the same catalog and schema as the sub tables. Therefore, the type description does not need to include this information for the supertable.

                Each type description has the following columns:

                1. TABLE_CAT String => the type's catalog (may be null)
                2. TABLE_SCHEM String => type's schema (may be null)
                3. TABLE_NAME String => type name
                4. SUPERTABLE_NAME String => the direct super type's name

                Note: If the driver does not support type hierarchies, an empty result set is returned.

                HSQLDB-Specific Information:

                HSQLDB treats unquoted identifiers as case insensitive in SQL but stores them in upper case; it treats quoted identifiers as case sensitive and stores them verbatim. All jdbcDatabaseMetaData methods perform case-sensitive comparison between name (pattern) arguments and the corresponding identifier values as they are stored in the database. Therefore, care must be taken to specify name arguments precisely (including case) as they are stored in the database.

                Since 1.7.2, this feature is supported by default. If the jar is compiled without org.hsqldb.DatabaseInformationFull or org.hsqldb.DatabaseInformationMain, the feature is not supported. The default implementation is DatabaseInformationFull.

                Specified by:
                getSuperTables in interface java.sql.DatabaseMetaData
                Parameters:
                catalog - a catalog name; "" retrieves those without a catalog; null means drop catalog name from the selection criteria
                schemaPattern - a schema name pattern; "" retrieves those without a schema
                tableNamePattern - a table name pattern; may be a fully-qualified name
                Returns:
                a ResultSet object in which each row is a type description
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7

                getAttributes

                public java.sql.ResultSet getAttributes(java.lang.String catalog,
                                                        java.lang.String schemaPattern,
                                                        java.lang.String typeNamePattern,
                                                        java.lang.String attributeNamePattern)
                                                 throws java.sql.SQLException
                Retrieves a description of the given attribute of the given type for a user-defined type (UDT) that is available in the given schema and catalog.

                Descriptions are returned only for attributes of UDTs matching the catalog, schema, type, and attribute name criteria. They are ordered by TYPE_SCHEM, TYPE_NAME and ORDINAL_POSITION. This description does not contain inherited attributes.

                The ResultSet object that is returned has the following columns:

                1. TYPE_CAT String => type catalog (may be null)
                2. TYPE_SCHEM String => type schema (may be null)
                3. TYPE_NAME String => type name
                4. ATTR_NAME String => attribute name
                5. DATA_TYPE short => attribute type SQL type from java.sql.Types
                6. ATTR_TYPE_NAME String => Data source dependent type name. For a UDT, the type name is fully qualified. For a REF, the type name is fully qualified and represents the target type of the reference type.
                7. ATTR_SIZE int => column size. For char or date types this is the maximum number of characters; for numeric or decimal types this is precision.
                8. DECIMAL_DIGITS int => the number of fractional digits
                9. NUM_PREC_RADIX int => Radix (typically either 10 or 2)
                10. NULLABLE int => whether NULL is allowed
                  • attributeNoNulls - might not allow NULL values
                  • attributeNullable - definitely allows NULL values
                  • attributeNullableUnknown - nullability unknown
                11. REMARKS String => comment describing column (may be null)
                12. ATTR_DEF String => default value (may be null)
                13. SQL_DATA_TYPE int => unused
                14. SQL_DATETIME_SUB int => unused
                15. CHAR_OCTET_LENGTH int => for char types the maximum number of bytes in the column
                16. ORDINAL_POSITION int => index of column in table (starting at 1)
                17. IS_NULLABLE String => "NO" means column definitely does not allow NULL values; "YES" means the column might allow NULL values. An empty string means unknown.
                18. SCOPE_CATALOG String => catalog of table that is the scope of a reference attribute (null if DATA_TYPE isn't REF)
                19. SCOPE_SCHEMA String => schema of table that is the scope of a reference attribute (null if DATA_TYPE isn't REF)
                20. SCOPE_TABLE String => table name that is the scope of a reference attribute (null if the DATA_TYPE isn't REF)
                21. SOURCE_DATA_TYPE short => source type of a distinct type or user-generated Ref type,SQL type from java.sql.Types (null if DATA_TYPE isn't DISTINCT or user-generated REF)

                HSQLDB-Specific Information:

                HSQLDB treats unquoted identifiers as case insensitive in SQL but stores them in upper case; it treats quoted identifiers as case sensitive and stores them verbatim. All jdbcDatabaseMetaData methods perform case-sensitive comparison between name (pattern) arguments and the corresponding identifier values as they are stored in the database. Therefore, care must be taken to specify name arguments precisely (including case) as they are stored in the database.

                Including 1.7.1, this JDBC feature is not supported; calling this method throws a SQLException stating that the operation is not supported.

                Since 1.7.2, this feature is supported by default. If the jar is compiled without org.hsqldb.DatabaseInformationFull or org.hsqldb.DatabaseInformationMain, the feature is not supported. The default implementation is DatabaseInformationFull.

                Specified by:
                getAttributes in interface java.sql.DatabaseMetaData
                Parameters:
                catalog - a catalog name; must match the catalog name as it is stored in the database; "" retrieves those without a catalog; null means that the catalog name should not be used to narrow the search
                schemaPattern - a schema name pattern; must match the schema name as it is stored in the database; "" retrieves those without a schema; null means that the schema name should not be used to narrow the search
                typeNamePattern - a type name pattern; must match the type name as it is stored in the database
                attributeNamePattern - an attribute name pattern; must match the attribute name as it is declared in the database
                Returns:
                a ResultSet object in which each row is an attribute description
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7

                supportsResultSetHoldability

                public boolean supportsResultSetHoldability(int holdability)
                                                     throws java.sql.SQLException
                Retrieves whether this database supports the given result set holdability.

                HSQLDB-Specific Information:

                Starting with 1.7.2, HSQLDB returns true for HOLD_CURSORS_OVER_COMMIT, else false.

                Specified by:
                supportsResultSetHoldability in interface java.sql.DatabaseMetaData
                Parameters:
                holdability - one of the following constants: ResultSet.HOLD_CURSORS_OVER_COMMIT or ResultSet.CLOSE_CURSORS_AT_COMMIT
                Returns:
                true if so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7
                See Also:
                jdbcConnection

                getResultSetHoldability

                public int getResultSetHoldability()
                                            throws java.sql.SQLException
                Retrieves the default holdability of this ResultSet object.

                HSQLDB-Specific Information:

                Starting with HSQLDB 1.7.2, this JDBC feature is supported.

                Calling this method returns HOLD_CURSORS_OVER_COMMIT, since HSQLDB ResultSet objects are never closed as the result of an implicit or explicit commit operation.

                Specified by:
                getResultSetHoldability in interface java.sql.DatabaseMetaData
                Returns:
                the default holdability; either ResultSet.HOLD_CURSORS_OVER_COMMIT or ResultSet.CLOSE_CURSORS_AT_COMMIT
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7

                getDatabaseMajorVersion

                public int getDatabaseMajorVersion()
                                            throws java.sql.SQLException
                Retrieves the major version number of the underlying database.

                HSQLDB-Specific Information:

                Starting with 1.7.2, the feature is supported under JDK14 builds.

                This value is retrieved through an SQL call to the new Library.getDatabaseMajorVersion() method which allows correct determination of the database major version for both local and remote database instances.

                Specified by:
                getDatabaseMajorVersion in interface java.sql.DatabaseMetaData
                Returns:
                the underlying database's major version
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7

                getDatabaseMinorVersion

                public int getDatabaseMinorVersion()
                                            throws java.sql.SQLException
                Retrieves the minor version number of the underlying database.

                HSQLDB-Specific Information:

                Starting with 1.7.2, the feature is supported under JDK14 builds.

                This value is retrieved through an SQL call to the new Library.getDatabaseMinorVersion() method which allows correct determination of the database minor version for both local and remote database instances.

                Specified by:
                getDatabaseMinorVersion in interface java.sql.DatabaseMetaData
                Returns:
                underlying database's minor version
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7

                getJDBCMajorVersion

                public int getJDBCMajorVersion()
                                        throws java.sql.SQLException
                Retrieves the major JDBC version number for this driver.

                HSQLDB-Specific Information:

                Starting with 1.7.2, the feature is supported under JDK14 builds.

                Specified by:
                getJDBCMajorVersion in interface java.sql.DatabaseMetaData
                Returns:
                JDBC version major number
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7

                getJDBCMinorVersion

                public int getJDBCMinorVersion()
                                        throws java.sql.SQLException
                Retrieves the minor JDBC version number for this driver.

                HSQLDB-Specific Information:

                Starting with 1.7.2, the feature is supported under JDK14 builds.

                Specified by:
                getJDBCMinorVersion in interface java.sql.DatabaseMetaData
                Returns:
                JDBC version minor number
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7

                getSQLStateType

                public int getSQLStateType()
                                    throws java.sql.SQLException
                Indicates whether the SQLSTATEs returned by SQLException.getSQLState is X/Open (now known as Open Group) SQL CLI or SQL99.

                HSQLDB-Specific Information:

                Starting with 1.7.2, HSQLDB returns sqlStateSQL99.

                Specified by:
                getSQLStateType in interface java.sql.DatabaseMetaData
                Returns:
                the type of SQLSTATEs, one of: sqlStateXOpen or sqlStateSQL99
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7

                locatorsUpdateCopy

                public boolean locatorsUpdateCopy()
                                           throws java.sql.SQLException
                Indicates whether updates made to a LOB are made on a copy or directly to the LOB.

                HSQLDB-Specific Information:

                Up to and including 1.7.2, HSQLDB updates the LOB directly. This method return false.

                Specified by:
                locatorsUpdateCopy in interface java.sql.DatabaseMetaData
                Returns:
                true if updates are made to a copy of the LOB; false if updates are made directly to the LOB
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7

                supportsStatementPooling

                public boolean supportsStatementPooling()
                                                 throws java.sql.SQLException
                Retrieves whether this database supports statement pooling.

                HSQLDB-Specific Information:

                Up to and including 1.7.2, HSQLDB does not support statement pooling. This method returns false.

                Specified by:
                supportsStatementPooling in interface java.sql.DatabaseMetaData
                Returns:
                true is so; false otherwise
                Throws:
                java.sql.SQLException - if a database access error occurs
                Since:
                JDK 1.4, HSQLDB 1.7


                Copyright 2001 - 2005 HSQL Development Group. All Rights Reserved. hsqldb-1.8.0.10.orig/doc/src/org/hsqldb/jdbc/package-summary.html0000644000175000017500000002437311020614566023107 0ustar renerene org.hsqldb.jdbc (HSQLDB 1.8.0.10 API)

                Package org.hsqldb.jdbc

                Class Summary
                jdbcBlob The representation (mapping) in the JavaTM programming language of an SQL BLOB value.
                jdbcCallableStatement The interface used to execute SQL stored procedures.
                jdbcClob The mapping in the JavaTM programming language for the SQL CLOB type.
                jdbcColumnMetaData Provides a site for holding the ResultSetMetaData for individual ResultSet columns.
                jdbcConnection A connection (session) with a specific database.
                jdbcDatabaseMetaData Comprehensive information about the database as a whole.
                jdbcDataSource A factory for connections to the physical data source that this DataSource object represents.
                jdbcDataSourceFactory A JNDI ObjectFactory for creating jdbcDatasource object instances.
                jdbcParameterMetaData An object that can be used to get information about the types and properties of the parameters in a PreparedStatement object.
                jdbcPreparedStatement An object that represents a precompiled SQL statement.
                jdbcResultSet A table of data representing a database result set, which is usually generated by executing a statement that queries the database.
                jdbcResultSetMetaData An object that can be used to get information about the types and properties of the columns in a ResultSet object.
                jdbcSavepoint The representation of a savepoint, which is a point within the current transaction that can be referenced from the Connection.rollback method.
                jdbcStatement The object used for executing a static SQL statement and returning the results it produces.
                Util Provides driver constants and a gateway from internal HsqlExceptions to external SQLExceptions.
                 



                Copyright 2001 - 2005 HSQL Development Group. All Rights Reserved. hsqldb-1.8.0.10.orig/doc/src/org/hsqldb/jdbc/package-tree.html0000644000175000017500000002100511020614566022336 0ustar renerene org.hsqldb.jdbc Class Hierarchy (HSQLDB 1.8.0.10 API)

                Hierarchy For Package org.hsqldb.jdbc

                Package Hierarchies:
                All Packages

                Class Hierarchy



                Copyright 2001 - 2005 HSQL Development Group. All Rights Reserved. hsqldb-1.8.0.10.orig/doc/src/org/hsqldb/jdbc/jdbcColumnMetaData.html0000644000175000017500000005445511020614566023506 0ustar renerene jdbcColumnMetaData (HSQLDB 1.8.0.10 API)

                org.hsqldb.jdbc
                Class jdbcColumnMetaData

                java.lang.Object
                  extended byorg.hsqldb.jdbc.jdbcColumnMetaData
                

                public final class jdbcColumnMetaData
                extends java.lang.Object

                Provides a site for holding the ResultSetMetaData for individual ResultSet columns.

                Since:
                HSQLDB 1.7.2
                Author:
                boucherb@users

                Field Summary
                 java.lang.String catalogName
                          The column's table's catalog name.
                 java.lang.String columnClassName
                          The fully-qualified name of the Java class whose instances are manufactured if the method ResultSet.getObject is called to retrieve a value from the column.
                 int columnDisplaySize
                          The column's normal max width in chars.
                 java.lang.String columnLabel
                          The suggested column title for use in printouts and displays.
                 java.lang.String columnName
                          The column's name.
                 int columnType
                          The column's SQL type.
                 java.lang.String columnTypeName
                          The column's database-specific type name.
                 boolean isAutoIncrement
                          Whether the value of the column are automatically numbered.
                 boolean isCaseSensitive
                          Whether the column's value's case matters.
                 boolean isCurrency
                          Whether the values in the column are cash values.
                 boolean isDefinitelyWritable
                          Whether a write on the column will definitely succeed.
                 int isNullable
                          The nullability of values in the column.
                 boolean isReadOnly
                          Whether the column's values are definitely not writable.
                 boolean isSearchable
                          Whether the column's values can be used in a where clause.
                 boolean isSigned
                          Whether values in the column are signed numbers.
                 boolean isWritable
                          Whether it is possible for a write on the column to succeed.
                 int precision
                          The column's value's number of decimal digits.
                 int scale
                          The column's value's number of digits to right of the decimal point.
                 java.lang.String schemaName
                          The column's table's schema.
                 java.lang.String tableName
                          The column's table's name.
                 
                Constructor Summary
                jdbcColumnMetaData()
                           
                 
                Method Summary
                 java.lang.String toString()
                          Retrieves a String representation of this object.
                 
                Methods inherited from class java.lang.Object
                equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
                 

                Field Detail

                catalogName

                public java.lang.String catalogName
                The column's table's catalog name.


                columnClassName

                public java.lang.String columnClassName
                The fully-qualified name of the Java class whose instances are manufactured if the method ResultSet.getObject is called to retrieve a value from the column.


                columnDisplaySize

                public int columnDisplaySize
                The column's normal max width in chars.


                columnLabel

                public java.lang.String columnLabel
                The suggested column title for use in printouts and displays.


                columnName

                public java.lang.String columnName
                The column's name.


                columnType

                public int columnType
                The column's SQL type.


                columnTypeName

                public java.lang.String columnTypeName
                The column's database-specific type name.


                precision

                public int precision
                The column's value's number of decimal digits.


                scale

                public int scale
                The column's value's number of digits to right of the decimal point.


                schemaName

                public java.lang.String schemaName
                The column's table's schema.


                tableName

                public java.lang.String tableName
                The column's table's name.


                isAutoIncrement

                public boolean isAutoIncrement
                Whether the value of the column are automatically numbered.


                isCaseSensitive

                public boolean isCaseSensitive
                Whether the column's value's case matters.


                isCurrency

                public boolean isCurrency
                Whether the values in the column are cash values.


                isDefinitelyWritable

                public boolean isDefinitelyWritable
                Whether a write on the column will definitely succeed.


                isNullable

                public int isNullable
                The nullability of values in the column.


                isReadOnly

                public boolean isReadOnly
                Whether the column's values are definitely not writable.


                isSearchable

                public boolean isSearchable
                Whether the column's values can be used in a where clause.


                isSigned

                public boolean isSigned
                Whether values in the column are signed numbers.


                isWritable

                public boolean isWritable
                Whether it is possible for a write on the column to succeed.

                Constructor Detail

                jdbcColumnMetaData

                public jdbcColumnMetaData()
                Method Detail

                toString

                public java.lang.String toString()
                Retrieves a String representation of this object.

                Returns:
                a Sring representation of this object


                Copyright 2001 - 2005 HSQL Development Group. All Rights Reserved. hsqldb-1.8.0.10.orig/doc/src/org/hsqldb/package-frame.html0000644000175000017500000000252311020614566021573 0ustar renerene org.hsqldb (HSQLDB 1.8.0.10 API) org.hsqldb
                Interfaces 
                Trigger
                Classes 
                jdbcDriver
                Server
                WebServer
                hsqldb-1.8.0.10.orig/doc/src/org/hsqldb/package-use.html0000644000175000017500000002073011020614565021274 0ustar renerene Uses of Package org.hsqldb (HSQLDB 1.8.0.10 API)

                Uses of Package
                org.hsqldb

                Packages that use org.hsqldb
                org.hsqldb   
                org.hsqldb.jdbc   
                org.hsqldb.sample   
                 

                Classes in org.hsqldb used by org.hsqldb
                Server
                          The HSQLDB HSQL protocol network database server.
                 

                Classes in org.hsqldb used by org.hsqldb.jdbc
                HsqlException
                          Class encapsulating all exceptions that can be thrown within the engine.
                Result
                          The primary unit of comunication between Connection, Server and Session objects.
                Session
                          Implementation of a user session with the database.
                 

                Classes in org.hsqldb used by org.hsqldb.sample
                Trigger
                          The interface an HSQLDB TRIGGER must implement.
                 



                Copyright 2001 - 2005 HSQL Development Group. All Rights Reserved. hsqldb-1.8.0.10.orig/doc/src/org/hsqldb/util/0000755000175000017500000000000010253114045017167 5ustar renerenehsqldb-1.8.0.10.orig/doc/src/org/hsqldb/util/SqlTool.html0000644000175000017500000004577611020614566021503 0ustar renerene SqlTool (HSQLDB 1.8.0.10 API)

                org.hsqldb.util
                Class SqlTool

                java.lang.Object
                  extended byorg.hsqldb.util.SqlTool
                

                public class SqlTool
                extends java.lang.Object

                Sql Tool. A command-line and/or interactive SQL tool. (Note: For every Javadoc block comment, I'm using a single blank line immediately after the description, just like's Sun's examples in their Coding Conventions document). See JavaDocs for the main method for syntax of how to run. This class is mostly used in a static (a.o.t. object) way, because most of the work is done in the static main class. This class should be refactored so that the main work is done in an object method, and the static main invokes the object method. Then programmatic users could use instances of this class in the normal Java way.

                Author:
                Blaine Simpson unsaved@users
                See Also:
                #main()

                Nested Class Summary
                static class SqlTool.SqlToolException
                           
                 
                Field Summary
                static int CONNECTERR_EXITVAL
                           
                static int FILEERR_EXITVAL
                           
                static int INPUTERR_EXITVAL
                           
                static int IOERR_EXITVAL
                           
                static java.lang.String LS
                           
                static int RCERR_EXITVAL
                           
                static int SQLERR_EXITVAL
                           
                static int SQLTOOLERR_EXITVAL
                           
                static int SYNTAXERR_EXITVAL
                           
                 
                Constructor Summary
                SqlTool()
                           
                 
                Method Summary
                static void main(java.lang.String[] args)
                          A static wrapper for objectMain, so that that method may be executed as a Java "program".
                static void objectMain(java.lang.String[] arg)
                          Connect to a JDBC Database and execute the commands given on stdin or in SQL file(s).
                 
                Methods inherited from class java.lang.Object
                equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
                 

                Field Detail

                SQLTOOLERR_EXITVAL

                public static final int SQLTOOLERR_EXITVAL
                See Also:
                Constant Field Values

                SYNTAXERR_EXITVAL

                public static final int SYNTAXERR_EXITVAL
                See Also:
                Constant Field Values

                RCERR_EXITVAL

                public static final int RCERR_EXITVAL
                See Also:
                Constant Field Values

                SQLERR_EXITVAL

                public static final int SQLERR_EXITVAL
                See Also:
                Constant Field Values

                IOERR_EXITVAL

                public static final int IOERR_EXITVAL
                See Also:
                Constant Field Values

                FILEERR_EXITVAL

                public static final int FILEERR_EXITVAL
                See Also:
                Constant Field Values

                INPUTERR_EXITVAL

                public static final int INPUTERR_EXITVAL
                See Also:
                Constant Field Values

                CONNECTERR_EXITVAL

                public static final int CONNECTERR_EXITVAL
                See Also:
                Constant Field Values

                LS

                public static java.lang.String LS
                Constructor Detail

                SqlTool

                public SqlTool()
                Method Detail

                main

                public static void main(java.lang.String[] args)
                A static wrapper for objectMain, so that that method may be executed as a Java "program". Throws only RuntimExceptions or Errors, because this method is intended to System.exit() for all but disasterous system problems, for which the inconvenience of a a stack trace would be the least of your worries. If you don't want SqlTool to System.exit(), then use the method objectMain() instead of this method.

                See Also:
                objectMain(String[])

                objectMain

                public static void objectMain(java.lang.String[] arg)
                                       throws SqlTool.SqlToolException
                Connect to a JDBC Database and execute the commands given on stdin or in SQL file(s). This method is changed for HSQLDB 1.8.0.8 and 1.9.0.x to never System.exit().

                Parameters:
                arg - Run "java... org.hsqldb.util.SqlTool --help" for syntax.
                Throws:
                SqlTool.SqlToolException - Upon any fatal error, with useful reason as the exception's message.


                Copyright 2001 - 2005 HSQL Development Group. All Rights Reserved. hsqldb-1.8.0.10.orig/doc/src/org/hsqldb/util/package-frame.html0000644000175000017500000000245711020614566022556 0ustar renerene org.hsqldb.util (HSQLDB 1.8.0.10 API) org.hsqldb.util
                Classes 
                RCData
                SqlTool
                Exceptions 
                SqlTool.SqlToolException
                hsqldb-1.8.0.10.orig/doc/src/org/hsqldb/util/RCData.html0000644000175000017500000004735211020614566021174 0ustar renerene RCData (HSQLDB 1.8.0.10 API)

                org.hsqldb.util
                Class RCData

                java.lang.Object
                  extended byorg.hsqldb.util.RCData
                

                public class RCData
                extends java.lang.Object

                All the info we need to connect up to a database.

                Author:
                Blaine Simpson unsaved@users

                Field Summary
                static java.lang.String DEFAULT_JDBC_DRIVER
                           
                 
                Constructor Summary
                RCData(java.io.File file, java.lang.String dbKey)
                          Creates a RCDataObject by looking up the given key in the given authentication file.
                RCData(java.lang.String id, java.lang.String url, java.lang.String username, java.lang.String password, java.lang.String driver, java.lang.String charset, java.lang.String truststore)
                          Convenience constructor for backward compatibility.
                RCData(java.lang.String id, java.lang.String url, java.lang.String username, java.lang.String password, java.lang.String driver, java.lang.String charset, java.lang.String truststore, java.lang.String libpath)
                          Creates a new RCData object.
                 
                Method Summary
                static java.lang.String expandSysPropVars(java.lang.String inString)
                           
                 java.sql.Connection getConnection()
                          Gets a JDBC Connection using the data of this RCData object.
                 java.sql.Connection getConnection(java.lang.String curDriver, java.lang.String curCharset, java.lang.String curTrustStore)
                          Gets a JDBC Connection using the data of this RCData object with specified override elements
                 java.lang.String getDefaultJdbcDriverName()
                           
                 void report()
                          Just for testing and debugging.
                 void setDefaultJdbcDriver(java.lang.String defaultJdbcDriverName)
                           
                 
                Methods inherited from class java.lang.Object
                equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
                 

                Field Detail

                DEFAULT_JDBC_DRIVER

                public static final java.lang.String DEFAULT_JDBC_DRIVER
                See Also:
                Constant Field Values
                Constructor Detail

                RCData

                public RCData(java.io.File file,
                              java.lang.String dbKey)
                       throws java.lang.Exception
                Creates a RCDataObject by looking up the given key in the given authentication file.

                Parameters:
                dbKey - Key to look up in the file.
                file - File containing the authentication information.

                RCData

                public RCData(java.lang.String id,
                              java.lang.String url,
                              java.lang.String username,
                              java.lang.String password,
                              java.lang.String driver,
                              java.lang.String charset,
                              java.lang.String truststore)
                       throws java.lang.Exception
                Convenience constructor for backward compatibility.

                See Also:
                RCData(String,String,String,String,String,String,String,String)

                RCData

                public RCData(java.lang.String id,
                              java.lang.String url,
                              java.lang.String username,
                              java.lang.String password,
                              java.lang.String driver,
                              java.lang.String charset,
                              java.lang.String truststore,
                              java.lang.String libpath)
                       throws java.lang.Exception

                Creates a new RCData object.

                The parameters driver, charset, truststore, and libpath are optional. Setting these parameters to NULL will set them to their default values.

                Parameters:
                id - The identifier for these connection settings
                url - The URL of the database to connect to
                username - The username to log in as
                password - The password of the username
                driver - The JDBC driver to use
                charset - The character set to use
                truststore - The trust store to use
                libpath - The JDBC library to add to CLASSPATH
                Throws:
                java.lang.Exception - if the a non-optional parameter is set to NULL
                Method Detail

                setDefaultJdbcDriver

                public void setDefaultJdbcDriver(java.lang.String defaultJdbcDriverName)

                getDefaultJdbcDriverName

                public java.lang.String getDefaultJdbcDriverName()

                report

                public void report()
                Just for testing and debugging. N.b. this echoes passwords!


                getConnection

                public java.sql.Connection getConnection()
                                                  throws java.lang.ClassNotFoundException,
                                                         java.lang.InstantiationException,
                                                         java.lang.IllegalAccessException,
                                                         java.sql.SQLException,
                                                         java.net.MalformedURLException
                Gets a JDBC Connection using the data of this RCData object.

                Returns:
                New JDBC Connection
                Throws:
                java.lang.ClassNotFoundException
                java.lang.InstantiationException
                java.lang.IllegalAccessException
                java.sql.SQLException
                java.net.MalformedURLException

                getConnection

                public java.sql.Connection getConnection(java.lang.String curDriver,
                                                         java.lang.String curCharset,
                                                         java.lang.String curTrustStore)
                                                  throws java.lang.ClassNotFoundException,
                                                         java.lang.InstantiationException,
                                                         java.lang.IllegalAccessException,
                                                         java.net.MalformedURLException,
                                                         java.sql.SQLException
                Gets a JDBC Connection using the data of this RCData object with specified override elements

                Returns:
                New JDBC Connection
                Throws:
                java.lang.ClassNotFoundException
                java.lang.InstantiationException
                java.lang.IllegalAccessException
                java.net.MalformedURLException
                java.sql.SQLException

                expandSysPropVars

                public static java.lang.String expandSysPropVars(java.lang.String inString)


                Copyright 2001 - 2005 HSQL Development Group. All Rights Reserved. hsqldb-1.8.0.10.orig/doc/src/org/hsqldb/util/package-use.html0000644000175000017500000001463011020614565022253 0ustar renerene Uses of Package org.hsqldb.util (HSQLDB 1.8.0.10 API)

                Uses of Package
                org.hsqldb.util

                Packages that use org.hsqldb.util
                org.hsqldb.util   
                 

                Classes in org.hsqldb.util used by org.hsqldb.util
                SqlTool.SqlToolException
                           
                 



                Copyright 2001 - 2005 HSQL Development Group. All Rights Reserved. hsqldb-1.8.0.10.orig/doc/src/org/hsqldb/util/class-use/0000755000175000017500000000000010253114045021066 5ustar renerenehsqldb-1.8.0.10.orig/doc/src/org/hsqldb/util/class-use/SqlTool.html0000644000175000017500000001317311020614565023363 0ustar renerene Uses of Class org.hsqldb.util.SqlTool (HSQLDB 1.8.0.10 API)

                Uses of Class
                org.hsqldb.util.SqlTool

                No usage of org.hsqldb.util.SqlTool



                Copyright 2001 - 2005 HSQL Development Group. All Rights Reserved. hsqldb-1.8.0.10.orig/doc/src/org/hsqldb/util/class-use/RCData.html0000644000175000017500000001316311020614565023063 0ustar renerene Uses of Class org.hsqldb.util.RCData (HSQLDB 1.8.0.10 API)

                Uses of Class
                org.hsqldb.util.RCData

                No usage of org.hsqldb.util.RCData



                Copyright 2001 - 2005 HSQL Development Group. All Rights Reserved. hsqldb-1.8.0.10.orig/doc/src/org/hsqldb/util/class-use/SqlTool.SqlToolException.html0000644000175000017500000001677711020614565026653 0ustar renerene Uses of Class org.hsqldb.util.SqlTool.SqlToolException (HSQLDB 1.8.0.10 API)

                Uses of Class
                org.hsqldb.util.SqlTool.SqlToolException

                Packages that use SqlTool.SqlToolException
                org.hsqldb.util   
                 

                Uses of SqlTool.SqlToolException in org.hsqldb.util
                 

                Methods in org.hsqldb.util that throw SqlTool.SqlToolException
                static void SqlTool.objectMain(java.lang.String[] arg)
                          Connect to a JDBC Database and execute the commands given on stdin or in SQL file(s).
                 



                Copyright 2001 - 2005 HSQL Development Group. All Rights Reserved. hsqldb-1.8.0.10.orig/doc/src/org/hsqldb/util/SqlTool.SqlToolException.html0000644000175000017500000002113511020614566024735 0ustar renerene SqlTool.SqlToolException (HSQLDB 1.8.0.10 API)

                org.hsqldb.util
                Class SqlTool.SqlToolException

                java.lang.Object
                  extended byjava.lang.Throwable
                      extended byjava.lang.Exception
                          extended byorg.hsqldb.util.SqlTool.SqlToolException
                
                All Implemented Interfaces:
                java.io.Serializable
                Enclosing class:
                SqlTool

                public static class SqlTool.SqlToolException
                extends java.lang.Exception

                See Also:
                Serialized Form

                Methods inherited from class java.lang.Throwable
                fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
                 
                Methods inherited from class java.lang.Object
                equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
                 



                Copyright 2001 - 2005 HSQL Development Group. All Rights Reserved. hsqldb-1.8.0.10.orig/doc/src/org/hsqldb/util/package-summary.html0000644000175000017500000001505111020614566023153 0ustar renerene org.hsqldb.util (HSQLDB 1.8.0.10 API)

                Package org.hsqldb.util

                Class Summary
                RCData All the info we need to connect up to a database.
                SqlTool Sql Tool.
                 

                Exception Summary
                SqlTool.SqlToolException  
                 



                Copyright 2001 - 2005 HSQL Development Group. All Rights Reserved. hsqldb-1.8.0.10.orig/doc/src/org/hsqldb/util/package-tree.html0000644000175000017500000002377211020614566022426 0ustar renerene org.hsqldb.util Class Hierarchy (HSQLDB 1.8.0.10 API)

                Hierarchy For Package org.hsqldb.util

                Package Hierarchies:
                All Packages

                Class Hierarchy

                • class java.lang.Object
                  • class javax.swing.table.AbstractTableModel (implements java.io.Serializable, javax.swing.table.TableModel)
                    • class org.hsqldb.util.TableSorter
                  • class org.hsqldb.util.CodeSwitcher
                  • class java.awt.Component (implements java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable)
                    • class java.awt.Choice (implements javax.accessibility.Accessible, java.awt.ItemSelectable)
                      • class org.hsqldb.util.ZaurusChoice (implements org.hsqldb.util.ZaurusComponent)
                    • class java.awt.Container
                      • class java.awt.Panel (implements javax.accessibility.Accessible)
                        • class java.applet.Applet
                          • class org.hsqldb.util.DatabaseManager (implements java.awt.event.ActionListener, java.awt.event.KeyListener, java.awt.event.WindowListener)
                            • class org.hsqldb.util.ZaurusDatabaseManager (implements java.awt.event.ActionListener, java.awt.event.KeyListener, java.awt.event.WindowListener)
                          • class javax.swing.JApplet (implements javax.accessibility.Accessible, javax.swing.RootPaneContainer)
                            • class org.hsqldb.util.DatabaseManagerSwing (implements java.awt.event.ActionListener, java.awt.event.KeyListener, java.awt.event.WindowListener)
                          • class org.hsqldb.util.QueryTool (implements java.awt.event.ActionListener, java.awt.event.WindowListener)
                          • class org.hsqldb.util.Transfer (implements java.awt.event.ActionListener, java.awt.event.ItemListener, org.hsqldb.util.Traceable, java.awt.event.WindowListener)
                        • class org.hsqldb.util.ZaurusEditor (implements java.awt.event.ActionListener)
                      • class java.awt.ScrollPane (implements javax.accessibility.Accessible)
                        • class org.hsqldb.util.ZaurusTableForm (implements java.awt.event.ActionListener, java.awt.event.ItemListener, java.awt.event.TextListener)
                      • class java.awt.Window (implements javax.accessibility.Accessible)
                        • class java.awt.Dialog
                          • class org.hsqldb.util.ConnectionDialog (implements java.awt.event.ActionListener, java.awt.event.ItemListener)
                            • class org.hsqldb.util.ZaurusConnectionDialog (implements java.awt.event.ActionListener, java.awt.event.ItemListener, java.awt.event.KeyListener)
                          • class javax.swing.JDialog (implements javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants)
                            • class org.hsqldb.util.FontDialogSwing
                    • class java.awt.TextComponent (implements javax.accessibility.Accessible)
                      • class java.awt.TextField
                        • class org.hsqldb.util.ZaurusTextField (implements org.hsqldb.util.ZaurusComponent)
                  • class org.hsqldb.util.ConnectionSetting (implements java.io.Serializable)
                  • class org.hsqldb.util.CSVWriter
                  • class org.hsqldb.util.DatabaseManagerSwing.DBMPrefs
                  • class org.hsqldb.util.MainInvoker
                  • class org.hsqldb.util.RCData
                  • class org.hsqldb.util.RefCapablePropertyResourceBundle
                  • class org.hsqldb.util.ScriptTool
                  • class org.hsqldb.util.ShutdownServer
                  • class org.hsqldb.util.SqlFile
                  • class org.hsqldb.util.SqlTool
                  • class org.hsqldb.util.SqlToolSprayer
                  • class java.lang.Throwable (implements java.io.Serializable)
                    • class java.lang.Exception
                      • class org.hsqldb.util.AppendableException
                        • class org.hsqldb.util.SqlToolError
                      • class org.hsqldb.util.SqlTool.SqlToolException
                  • class org.hsqldb.util.ValidatingResourceBundle
                    • class org.hsqldb.util.SqltoolRB

                Interface Hierarchy

                • interface org.hsqldb.util.ZaurusComponent


                Copyright 2001 - 2005 HSQL Development Group. All Rights Reserved. hsqldb-1.8.0.10.orig/doc/src/org/hsqldb/Trigger.html0000644000175000017500000004236411020614566020522 0ustar renerene Trigger (HSQLDB 1.8.0.10 API)

                org.hsqldb
                Interface Trigger

                All Known Implementing Classes:
                TriggerSample

                public interface Trigger

                The interface an HSQLDB TRIGGER must implement. The user-supplied class that implements this must have a default constructor.

                Since:
                1.7.0
                Author:
                Peter Hudson

                Field Summary
                static int DELETE_AFTER
                           
                static int DELETE_AFTER_ROW
                           
                static int DELETE_BEFORE
                           
                static int DELETE_BEFORE_ROW
                           
                static int INSERT_AFTER
                           
                static int INSERT_AFTER_ROW
                           
                static int INSERT_BEFORE
                           
                static int INSERT_BEFORE_ROW
                           
                static int UPDATE_AFTER
                           
                static int UPDATE_AFTER_ROW
                           
                static int UPDATE_BEFORE
                           
                static int UPDATE_BEFORE_ROW
                           
                 
                Method Summary
                 void fire(int type, java.lang.String trigName, java.lang.String tabName, java.lang.Object[] oldRow, java.lang.Object[] newRow)
                          The method invoked upon each triggered action.
                 

                Field Detail

                INSERT_AFTER

                public static final int INSERT_AFTER
                See Also:
                Constant Field Values

                DELETE_AFTER

                public static final int DELETE_AFTER
                See Also:
                Constant Field Values

                UPDATE_AFTER

                public static final int UPDATE_AFTER
                See Also:
                Constant Field Values

                INSERT_BEFORE

                public static final int INSERT_BEFORE
                See Also:
                Constant Field Values

                DELETE_BEFORE

                public static final int DELETE_BEFORE
                See Also:
                Constant Field Values

                UPDATE_BEFORE

                public static final int UPDATE_BEFORE
                See Also:
                Constant Field Values

                INSERT_AFTER_ROW

                public static final int INSERT_AFTER_ROW
                See Also:
                Constant Field Values

                DELETE_AFTER_ROW

                public static final int DELETE_AFTER_ROW
                See Also:
                Constant Field Values

                UPDATE_AFTER_ROW

                public static final int UPDATE_AFTER_ROW
                See Also:
                Constant Field Values

                INSERT_BEFORE_ROW

                public static final int INSERT_BEFORE_ROW
                See Also:
                Constant Field Values

                DELETE_BEFORE_ROW

                public static final int DELETE_BEFORE_ROW
                See Also:
                Constant Field Values

                UPDATE_BEFORE_ROW

                public static final int UPDATE_BEFORE_ROW
                See Also:
                Constant Field Values
                Method Detail

                fire

                public void fire(int type,
                                 java.lang.String trigName,
                                 java.lang.String tabName,
                                 java.lang.Object[] oldRow,
                                 java.lang.Object[] newRow)
                The method invoked upon each triggered action.

                When UPDATE triggers are fired, oldRow contains the existing values of the table row and newRow contains the new values.

                For INSERT triggers, oldRow is null and newRow contains the table row to be inserted. For DELETE triggers, newRow is null and oldRow contains the table row to be deleted. type contains the integer index id for trigger type, e.g. TriggerDef.INSERT_AFTER (fredt@users)

                Parameters:
                trigName - the name of the trigger
                tabName - the name of the table upon which the triggered action is occuring
                oldRow - the old row
                newRow - the new row


                Copyright 2001 - 2005 HSQL Development Group. All Rights Reserved. hsqldb-1.8.0.10.orig/doc/src/org/hsqldb/class-use/0000755000175000017500000000000010253114045020111 5ustar renerenehsqldb-1.8.0.10.orig/doc/src/org/hsqldb/class-use/jdbcDriver.html0000644000175000017500000001306211020614565023064 0ustar renerene Uses of Class org.hsqldb.jdbcDriver (HSQLDB 1.8.0.10 API)

                Uses of Class
                org.hsqldb.jdbcDriver

                No usage of org.hsqldb.jdbcDriver



                Copyright 2001 - 2005 HSQL Development Group. All Rights Reserved. hsqldb-1.8.0.10.orig/doc/src/org/hsqldb/class-use/Trigger.html0000644000175000017500000001617211020614565022416 0ustar renerene Uses of Interface org.hsqldb.Trigger (HSQLDB 1.8.0.10 API)

                Uses of Interface
                org.hsqldb.Trigger

                Packages that use Trigger
                org.hsqldb.sample   
                 

                Uses of Trigger in org.hsqldb.sample
                 

                Classes in org.hsqldb.sample that implement Trigger
                 class TriggerSample
                          Sample code for use of triggers in hsqldb.
                 



                Copyright 2001 - 2005 HSQL Development Group. All Rights Reserved. hsqldb-1.8.0.10.orig/doc/src/org/hsqldb/class-use/Server.html0000644000175000017500000001600411020614565022253 0ustar renerene Uses of Class org.hsqldb.Server (HSQLDB 1.8.0.10 API)

                Uses of Class
                org.hsqldb.Server

                Packages that use Server
                org.hsqldb   
                 

                Uses of Server in org.hsqldb
                 

                Subclasses of Server in org.hsqldb
                 class WebServer
                          The HSQLDB HTTP protocol network database server.
                 



                Copyright 2001 - 2005 HSQL Development Group. All Rights Reserved. hsqldb-1.8.0.10.orig/doc/src/org/hsqldb/class-use/WebServer.html0000644000175000017500000001305211020614565022711 0ustar renerene Uses of Class org.hsqldb.WebServer (HSQLDB 1.8.0.10 API)

                Uses of Class
                org.hsqldb.WebServer

                No usage of org.hsqldb.WebServer



                Copyright 2001 - 2005 HSQL Development Group. All Rights Reserved. hsqldb-1.8.0.10.orig/doc/src/org/hsqldb/Server.html0000644000175000017500000015406311020614566020365 0ustar renerene Server (HSQLDB 1.8.0.10 API)

                org.hsqldb
                Class Server

                java.lang.Object
                  extended byorg.hsqldb.Server
                
                All Implemented Interfaces:
                org.hsqldb.HsqlSocketRequestHandler
                Direct Known Subclasses:
                WebServer

                public class Server
                extends java.lang.Object
                implements org.hsqldb.HsqlSocketRequestHandler

                The HSQLDB HSQL protocol network database server.

                A Server object acts as a network database server and is one way of using the client-server mode of HSQLDB Database Engine. Instances of this class handle native HSQL protocol connections exclusively, allowing database queries to be performed efficienly across the network. Server's direct descendent, WebServer, handles HTTP protocol connections exclusively, allowing HSQL protocol to be tunneled over HTTP to avoid sandbox and firewall issues, albeit less efficiently.

                There are a number of ways to configure and start a Server instance.

                When started from the command line or programatically via the main(String[]) method, configuration occurs in three phases, with later phases overriding properties set by previous phases:

                1. Upon construction, a Server object is assigned a set of default properties.

                2. If it exists, properties are loaded from a file named 'server.properties' in the present working directory.

                3. The command line arguments (alternatively, the String[] passed to main()) are parsed and used to further configure the Server's properties.

                From the command line, the options are as follows:

                 +----------------+-------------+----------+------------------------------+
                 |    OPTION      |    TYPE     | DEFAULT  |         DESCRIPTION          |
                 +----------------+-------------+----------+------------------------------|
                 | -?             | --          | --       | prints this message          |
                 | -address       | name|number | any      | server inet address          |
                 | -port          | number      | 9001/544 | port at which server listens |
                 | -database.i    | [type]spec  | 0=test   | path of database i           |
                 | -dbname.i      | alias       | --       | url alias for database i     |
                 | -silent        | true|false  | true     | false => display all queries |
                 | -trace         | true|false  | false    | display JDBC trace messages  |
                 | -tls           | true|false  | false    | TLS/SSL (secure) sockets     |
                 | -no_system_exit| true|false  | false    | do not issue System.exit()   |
                 | -remote_open   | true|false  | false    | can open databases remotely  |
                 +----------------+-------------+----------+------------------------------+
                 
                The database.i and dbname.i options need further explanation:
                • Multiple databases can be served by each instance of the Server. The value of i is currently limited to the range 0..9, allowing up to 10 different databases. Any number is this range can be used.

                • The value assigned to database.i is interpreted using the format '[type]spec', where the optional type component is one of 'file:', 'res:' or 'mem:' and the spec component is interpreted in the context of the type component.

                  If omitted, the type component is taken to be 'file:'.

                  A full description of how '[type]spec' values are interpreted appears in the overview for jdbcConnection.

                • The value assigned to dbname.i is taken to be the key used to look up the desired database instance and thus corresponds to the <alias> component of the HSQLDB HSQL protocol database connection url: 'jdbc:hsqldb:hsql[s]://host[port][/<alias>]'.

                • The value of database.0 is special. If dbname.0 is not specified, then this defaults to an empty string and a connection is made to database.0 path when the <alias> component of an HSQLDB HSQL protocol database connection url is omitted. If a database key/value pair is found in the properties when the main method is called, this pair is supersedes the database.0 setting

                  This behaviour allows the previous database connection url format to work with essentially unchanged semantics.

                • When the remote_open property is true, a connection attempt to an unopened database results in the database being opened. The URL for connection should include the property filepath to specify the path. 'jdbc:hsqldb:hsql[s]://host[port]/<alias>;filepath=hsqldb:file:<database path>'. the given alias and filepath value will be associated together. The database user and password to start this connection must be valid. If this form of connection is used again, after the database has been opened, the filepath property is ignored.

                • Once an alias such as "mydb" has been associated with a path, it cannot be reassigned to a different path.

                • If a database is closed with the SHUTDOWN command, its alias is removed. It is then possible to connect to this database again with a different (or the same) alias.

                • If the same database is connected to via two different aliases, and then one of the is closed with the SHUTDOWN command, the other is also closed.

                From the 'server.properties' file, options can be set similarly, using a slightly different format.

                Here is an example 'server.properties' file:

                 server.port=9001
                 server.database.0=test
                 server.dbname.0=...
                 ...
                 server.database.n=...
                 server.dbname.n=...
                 server.silent=true
                 
                Starting with 1.7.2, Server has been refactored to become a simple JavaBean with non-blocking start() and stop() service methods. It is possible to configure a Server instance through the JavaBean API as well, but this part of the public interface is still under review and will not be finalized or documented fully until the final 1.7.2 release.

                Note:

                The 'no_system_exit' property is of particular interest.

                If a Server instance is to run embedded in, say, an application server, such as when the jdbcDataSource or HsqlServerFactory classes are used, it is typically necessary to avoid calling System.exit() when the Server instance shuts down.

                By default, 'no_system_exit' is set:

                1. true when a Server is started directly from the start() method.

                2. false when a Server is started from the main(String[]) method.

                These values are natural to their context because the first case allows the JVM to exit by default on Server shutdown when a Server instance is started from a command line environment, whereas the second case prevents a typically unwanted JVM exit on Server shutdown when a Server intance is started as part of a larger framework.

                Replaces original Hypersonic source of the same name.

                Since:
                1.7.2
                Author:
                fredt@users

                Constructor Summary
                Server()
                          Creates a new Server instance handling HSQL protocol connections.
                 
                Method Summary
                 void checkRunning(boolean running)
                          Checks if this Server object is or is not running and throws if the current state does not match the specified value.
                 java.lang.String getAddress()
                          Retrieves, in string form, this server's host address.
                 java.lang.String getDatabaseName(int index, boolean asconfigured)
                          Retrieves the url alias (network name) of the i'th database that this Server hosts.
                 java.lang.String getDatabasePath(int index, boolean asconfigured)
                          Retrieves the HSQLDB path descriptor (uri) of the i'th Database that this Server hosts.
                 java.lang.String getDatabaseType(int index)
                           
                 java.lang.String getDefaultWebPage()
                          Retrieves the name of the web page served when no page is specified.
                 java.io.PrintWriter getErrWriter()
                          Retrieves the PrintWriter to which server errors are printed.
                 java.lang.String getHelpString()
                          Retrieves a String object describing the command line and properties options for this Server.
                 java.io.PrintWriter getLogWriter()
                          Retrieves the PrintWriter to which server messages are printed.
                 int getPort()
                          Retrieves this server's host port.
                 java.lang.String getProductName()
                          Retrieves this server's product name.
                 java.lang.String getProductVersion()
                          Retrieves the server's product version, as a String.
                 java.lang.String getProtocol()
                          Retrieves a string respresentaion of the network protocol this server offers, typically one of 'HTTP', HTTPS', 'HSQL' or 'HSQLS'.
                 java.lang.Throwable getServerError()
                          Retrieves a Throwable indicating the last server error, if any.
                 java.lang.String getServerId()
                          Retrieves a String identifying this Server object.
                 int getState()
                          Retrieves current state of this server in numerically coded form.
                 java.lang.String getStateDescriptor()
                          Retrieves a character sequence describing this server's current state, including the message of the last exception, if there is one and it is still in context.
                 java.lang.String getWebRoot()
                          Retrieves the root context (directory) from which web content is served.
                 void handleConnection(java.net.Socket s)
                          Assigns the specified socket to a new conection handler and starts the handler in a new Thread.
                 boolean isNoSystemExit()
                          Retrieves whether this server calls System.exit() when shutdown.
                 boolean isRestartOnShutdown()
                          Retrieves whether this server restarts on shutdown.
                 boolean isSilent()
                          Retrieves whether silent mode operation was requested in the server properties.
                 boolean isTls()
                          Retrieves whether the use of secure sockets was requested in the server properties.
                 boolean isTrace()
                          Retrieves whether JDBC trace messages are to go to System.out or the DriverManger PrintStream/PrintWriter, if any.
                static void main(java.lang.String[] args)
                          Creates and starts a new Server.
                 boolean putPropertiesFromFile(java.lang.String path)
                          Attempts to put properties from the file with the specified path.
                 void putPropertiesFromString(java.lang.String s)
                          Puts properties from the supplied string argument.
                 void setAddress(java.lang.String address)
                          Sets the InetAddress with which this server's ServerSocket will be constructed.
                 void setDatabaseName(int index, java.lang.String name)
                          Sets the external name (url alias) of the i'th hosted database.
                 void setDatabasePath(int index, java.lang.String path)
                          Sets the path of the hosted database.
                 void setDefaultWebPage(java.lang.String file)
                          Sets the name of the web page served when no page is specified.
                 void setErrWriter(java.io.PrintWriter pw)
                          Sets the PrintWriter to which server errors are logged.
                 void setLogWriter(java.io.PrintWriter pw)
                          Sets the PrintWriter to which server messages are logged.
                 void setNoSystemExit(boolean noExit)
                          Sets whether this server calls System.exit() when shutdown.
                 void setPort(int port)
                          Sets the server listen port.
                 void setProperties(org.hsqldb.persist.HsqlProperties p)
                          Sets server properties using the specified properties object
                 void setRestartOnShutdown(boolean restart)
                          Sets whether this server restarts on shutdown.
                 void setSilent(boolean silent)
                          Sets silent mode operation
                 void setTls(boolean tls)
                          Sets whether to use secure sockets
                 void setTrace(boolean trace)
                          Sets whether trace messages go to System.out or the DriverManger PrintStream/PrintWriter, if any.
                 void setWebRoot(java.lang.String root)
                          Sets the path of the root directory from which web content is served.
                 void shutdown()
                          External method to shut down this server.
                 void signalCloseAllServerConnections()
                          Closes all connections to this Server.
                 int start()
                          Starts this server synchronously.
                 int stop()
                          Stops this server asynchronously.
                 
                Methods inherited from class java.lang.Object
                equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
                 

                Constructor Detail

                Server

                public Server()
                Creates a new Server instance handling HSQL protocol connections.

                Method Detail

                main

                public static void main(java.lang.String[] args)
                Creates and starts a new Server.

                Allows starting a Server via the command line interface.

                Parameters:
                args - the command line arguments for the Server instance

                checkRunning

                public void checkRunning(boolean running)
                                  throws java.lang.RuntimeException
                Checks if this Server object is or is not running and throws if the current state does not match the specified value.

                Parameters:
                running - if true, ensure the server is running, else ensure the server is not running
                Throws:
                java.lang.RuntimeException - if the supplied value does not match the current running status

                signalCloseAllServerConnections

                public void signalCloseAllServerConnections()
                Closes all connections to this Server.

                Specified by:
                signalCloseAllServerConnections in interface org.hsqldb.HsqlSocketRequestHandler

                getAddress

                public java.lang.String getAddress()
                Retrieves, in string form, this server's host address.

                Returns:
                this server's host address

                getDatabaseName

                public java.lang.String getDatabaseName(int index,
                                                        boolean asconfigured)
                Retrieves the url alias (network name) of the i'th database that this Server hosts.

                Parameters:
                index - the index of the url alias upon which to report
                asconfigured - if true, report the configured value, else the live value
                Returns:
                the url alias component of the i'th database that this Server hosts, or null if no such name exists.

                getDatabasePath

                public java.lang.String getDatabasePath(int index,
                                                        boolean asconfigured)
                Retrieves the HSQLDB path descriptor (uri) of the i'th Database that this Server hosts.

                Parameters:
                index - the index of the uri upon which to report
                asconfigured - if true, report the configured value, else the live value
                Returns:
                the HSQLDB database path descriptor of the i'th database that this Server hosts, or null if no such path descriptor exists

                getDatabaseType

                public java.lang.String getDatabaseType(int index)

                getDefaultWebPage

                public java.lang.String getDefaultWebPage()
                Retrieves the name of the web page served when no page is specified. This attribute is relevant only when server protocol is HTTP(S).

                Returns:
                the name of the web page served when no page is specified

                getHelpString

                public java.lang.String getHelpString()
                Retrieves a String object describing the command line and properties options for this Server.

                Returns:
                the command line and properties options help for this Server

                getErrWriter

                public java.io.PrintWriter getErrWriter()
                Retrieves the PrintWriter to which server errors are printed.

                Returns:
                the PrintWriter to which server errors are printed.

                getLogWriter

                public java.io.PrintWriter getLogWriter()
                Retrieves the PrintWriter to which server messages are printed.

                Returns:
                the PrintWriter to which server messages are printed.

                getPort

                public int getPort()
                Retrieves this server's host port.

                Returns:
                this server's host port

                getProductName

                public java.lang.String getProductName()
                Retrieves this server's product name.

                Typically, this will be something like: "HSQLDB xxx server".

                Returns:
                the product name of this server

                getProductVersion

                public java.lang.String getProductVersion()
                Retrieves the server's product version, as a String.

                Typically, this will be something like: "1.x.x" or "2.x.x" and so on.

                Returns:
                the product version of the server

                getProtocol

                public java.lang.String getProtocol()
                Retrieves a string respresentaion of the network protocol this server offers, typically one of 'HTTP', HTTPS', 'HSQL' or 'HSQLS'.

                Returns:
                string respresentation of this server's protocol

                getServerError

                public java.lang.Throwable getServerError()
                Retrieves a Throwable indicating the last server error, if any.

                Returns:
                a Throwable indicating the last server error

                getServerId

                public java.lang.String getServerId()
                Retrieves a String identifying this Server object.

                Returns:
                a String identifying this Server object

                getState

                public int getState()
                Retrieves current state of this server in numerically coded form.

                Typically, this will be one of:

                1. ServerProperties.SERVER_STATE_ONLINE (1)
                2. ServerProperties.SERVER_STATE_OPENING (4)
                3. ServerProperties.SERVER_STATE_CLOSING (8)
                4. ServerProperties.SERVER_STATE_SHUTDOWN (16)

                Returns:
                this server's state code.

                getStateDescriptor

                public java.lang.String getStateDescriptor()
                Retrieves a character sequence describing this server's current state, including the message of the last exception, if there is one and it is still in context.

                Returns:
                this server's state represented as a character sequence.

                getWebRoot

                public java.lang.String getWebRoot()
                Retrieves the root context (directory) from which web content is served. This property is relevant only when the server protocol is HTTP(S). Although unlikely, it may be that in the future other contexts, such as jar urls may be supported, so that pages can be served from the contents of a jar or from the JVM class path.

                Returns:
                the root context (directory) from which web content is served

                handleConnection

                public void handleConnection(java.net.Socket s)
                Assigns the specified socket to a new conection handler and starts the handler in a new Thread.

                Specified by:
                handleConnection in interface org.hsqldb.HsqlSocketRequestHandler
                Parameters:
                s - the socket to connect

                isNoSystemExit

                public boolean isNoSystemExit()
                Retrieves whether this server calls System.exit() when shutdown.

                Returns:
                true if this server does not call System.exit()

                isRestartOnShutdown

                public boolean isRestartOnShutdown()
                Retrieves whether this server restarts on shutdown.

                Returns:
                true this server restarts on shutdown

                isSilent

                public boolean isSilent()
                Retrieves whether silent mode operation was requested in the server properties.

                Returns:
                if true, silent mode was requested, else trace messages are to be printed

                isTls

                public boolean isTls()
                Retrieves whether the use of secure sockets was requested in the server properties.

                Returns:
                if true, secure sockets are requested, else not

                isTrace

                public boolean isTrace()
                Retrieves whether JDBC trace messages are to go to System.out or the DriverManger PrintStream/PrintWriter, if any.

                Returns:
                true if tracing is on (JDBC trace messages to system out)

                putPropertiesFromFile

                public boolean putPropertiesFromFile(java.lang.String path)
                Attempts to put properties from the file with the specified path. The file extension '.properties' is implicit and should not be included in the path specification.

                Parameters:
                path - the path of the desired properties file, without the '.properties' file extension
                Returns:
                true if the indicated file was read sucessfully, else false
                Throws:
                java.lang.RuntimeException - if this server is running

                putPropertiesFromString

                public void putPropertiesFromString(java.lang.String s)
                Puts properties from the supplied string argument. The relevant key value pairs are the same as those for the (web)server.properties file format, except that the 'server.' prefix should not be specified.

                Parameters:
                s - semicolon-delimited key=value pair string, e.g. k1=v1;k2=v2;k3=v3...
                Throws:
                java.lang.RuntimeException - if this server is running

                setAddress

                public void setAddress(java.lang.String address)
                                throws java.lang.RuntimeException
                Sets the InetAddress with which this server's ServerSocket will be constructed. A null or empty string or the special value "0.0.0.0" can be used to bypass explicit selection, causing the ServerSocket to be constructed without specifying an InetAddress.

                Parameters:
                address - A string representing the desired InetAddress as would be retrieved by InetAddres.getByName(), or a null or empty string or "0.0.0.0" to signify that the server socket should be constructed using the signature that does not specify the InetAddress.
                Throws:
                java.lang.RuntimeException - if this server is running

                setDatabaseName

                public void setDatabaseName(int index,
                                            java.lang.String name)
                                     throws java.lang.RuntimeException
                Sets the external name (url alias) of the i'th hosted database.

                Parameters:
                name - external name (url alias) of the i'th HSQLDB database instance this server is to host.
                Throws:
                java.lang.RuntimeException - if this server is running

                setDatabasePath

                public void setDatabasePath(int index,
                                            java.lang.String path)
                                     throws java.lang.RuntimeException
                Sets the path of the hosted database.

                Parameters:
                path - The path of the i'th HSQLDB database instance this server is to host.
                Throws:
                java.lang.RuntimeException

                setDefaultWebPage

                public void setDefaultWebPage(java.lang.String file)
                Sets the name of the web page served when no page is specified.

                Parameters:
                file - the name of the web page served when no page is specified

                setPort

                public void setPort(int port)
                             throws java.lang.RuntimeException
                Sets the server listen port.

                Parameters:
                port - the port at which this server listens
                Throws:
                java.lang.RuntimeException

                setErrWriter

                public void setErrWriter(java.io.PrintWriter pw)
                Sets the PrintWriter to which server errors are logged.

                Setting this attribute to null disables server error logging

                Parameters:
                pw - the PrintWriter to which server messages are logged

                setLogWriter

                public void setLogWriter(java.io.PrintWriter pw)
                Sets the PrintWriter to which server messages are logged.

                Setting this attribute to null disables server message logging

                Parameters:
                pw - the PrintWriter to which server messages are logged

                setNoSystemExit

                public void setNoSystemExit(boolean noExit)
                Sets whether this server calls System.exit() when shutdown.

                Parameters:
                noExit - if true, System.exit() will not be called.

                setRestartOnShutdown

                public void setRestartOnShutdown(boolean restart)
                Sets whether this server restarts on shutdown.

                Parameters:
                restart - if true, this server restarts on shutdown

                setSilent

                public void setSilent(boolean silent)
                Sets silent mode operation

                Parameters:
                silent - if true, then silent mode, else trace messages are to be printed

                setTls

                public void setTls(boolean tls)
                Sets whether to use secure sockets

                Parameters:
                tls - true for secure sockets, else false
                Throws:
                java.lang.RuntimeException - if this server is running

                setTrace

                public void setTrace(boolean trace)
                Sets whether trace messages go to System.out or the DriverManger PrintStream/PrintWriter, if any.

                Parameters:
                trace - if true, route JDBC trace messages to System.out

                setWebRoot

                public void setWebRoot(java.lang.String root)
                Sets the path of the root directory from which web content is served.

                Parameters:
                root - the root (context) directory from which web content is served

                setProperties

                public void setProperties(org.hsqldb.persist.HsqlProperties p)
                Sets server properties using the specified properties object

                Parameters:
                p - The object containing properties to set

                start

                public int start()
                Starts this server synchronously.

                This method waits for current state to change from SERVER_STATE_OPENNING. In order to discover the success or failure of this operation, server state must be polled or a subclass of Server must be used that overrides the setState method to provide state change notification.

                Returns:
                the server state noted at entry to this method

                stop

                public int stop()
                Stops this server asynchronously.

                This method returns immediately, regardless of current state. In order to discover the success or failure of this operation, server state must be polled or a subclass of Server must be used that overrides the setState method to provide state change notification.

                Returns:
                the server state noted at entry to this method

                shutdown

                public void shutdown()
                External method to shut down this server.



                Copyright 2001 - 2005 HSQL Development Group. All Rights Reserved. hsqldb-1.8.0.10.orig/doc/src/org/hsqldb/package-summary.html0000644000175000017500000001535311020614566022203 0ustar renerene org.hsqldb (HSQLDB 1.8.0.10 API)

                Package org.hsqldb

                Interface Summary
                Trigger The interface an HSQLDB TRIGGER must implement.
                 

                Class Summary
                jdbcDriver Each JDBC driver must supply a class that implements the Driver interface.
                Server The HSQLDB HSQL protocol network database server.
                WebServer The HSQLDB HTTP protocol network database server.
                 



                Copyright 2001 - 2005 HSQL Development Group. All Rights Reserved. hsqldb-1.8.0.10.orig/doc/src/org/hsqldb/package-tree.html0000644000175000017500000002220211020614566021434 0ustar renerene org.hsqldb Class Hierarchy (HSQLDB 1.8.0.10 API)

                Hierarchy For Package org.hsqldb

                Package Hierarchies:
                All Packages

                Class Hierarchy

                • class java.lang.Object
                  • class org.hsqldb.BaseTable
                    • class org.hsqldb.Table
                  • class org.hsqldb.Collation
                  • class org.hsqldb.Column
                  • class org.hsqldb.Database
                  • class org.hsqldb.DatabaseManager
                  • class org.hsqldb.DatabaseScript
                  • class org.hsqldb.DatabaseURL
                  • class org.hsqldb.Expression
                  • class javax.servlet.GenericServlet (implements java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig)
                    • class javax.servlet.http.HttpServlet (implements java.io.Serializable)
                      • class org.hsqldb.Servlet
                  • class org.hsqldb.Grantee
                  • class org.hsqldb.HSQLClientConnection (implements org.hsqldb.SessionInterface)
                    • class org.hsqldb.HTTPClientConnection
                  • class org.hsqldb.HsqlDateTime
                  • class org.hsqldb.HsqlNameManager
                  • class org.hsqldb.HsqlNameManager.HsqlName
                  • class org.hsqldb.HsqlServerFactory
                  • class org.hsqldb.HsqlSocketFactory
                    • class org.hsqldb.HsqlSocketFactorySecure (implements javax.net.ssl.HandshakeCompletedListener)
                  • class org.hsqldb.Index
                  • class org.hsqldb.jdbcDriver (implements java.sql.Driver)
                  • class org.hsqldb.Library
                  • class org.hsqldb.NumberSequence
                  • class org.hsqldb.Record
                  • class org.hsqldb.Result
                  • class org.hsqldb.Result.ResultMetaData
                  • class org.hsqldb.ResultBase
                  • class org.hsqldb.ResultBase.ResultIterator
                  • class org.hsqldb.Row (implements org.hsqldb.persist.CachedObject)
                    • class org.hsqldb.CachedRow
                  • class org.hsqldb.SchemaManager
                  • class org.hsqldb.SchemaManager.Schema
                  • class org.hsqldb.SequenceManager
                  • class org.hsqldb.Server (implements org.hsqldb.HsqlSocketRequestHandler)
                  • class org.hsqldb.ServerConfiguration (implements org.hsqldb.ServerConstants)
                  • class org.hsqldb.Session (implements org.hsqldb.SessionInterface)
                  • class org.hsqldb.SessionManager
                  • class org.hsqldb.SetFunction
                  • class org.hsqldb.Table.RowStore (implements org.hsqldb.persist.PersistentStore)
                  • class java.lang.Throwable (implements java.io.Serializable)
                    • class java.lang.Exception
                      • class org.hsqldb.HsqlException
                  • class org.hsqldb.Token
                  • class org.hsqldb.Tokenizer
                  • class org.hsqldb.Trace
                  • class org.hsqldb.TransactionManager
                  • class org.hsqldb.Types
                  • class org.hsqldb.User

                Interface Hierarchy

                • interface org.hsqldb.GrantConstants
                • interface org.hsqldb.HsqlSocketRequestHandler
                • interface org.hsqldb.ResultConstants
                • interface org.hsqldb.ServerConstants
                • interface org.hsqldb.SessionInterface
                • interface org.hsqldb.Trigger


                Copyright 2001 - 2005 HSQL Development Group. All Rights Reserved. hsqldb-1.8.0.10.orig/doc/src/org/hsqldb/sample/0000755000175000017500000000000010253114045017473 5ustar renerenehsqldb-1.8.0.10.orig/doc/src/org/hsqldb/sample/TriggerSample.html0000644000175000017500000005120611020614566023140 0ustar renerene TriggerSample (HSQLDB 1.8.0.10 API)

                org.hsqldb.sample
                Class TriggerSample

                java.lang.Object
                  extended byorg.hsqldb.sample.TriggerSample
                
                All Implemented Interfaces:
                Trigger

                public class TriggerSample
                extends java.lang.Object
                implements Trigger

                Sample code for use of triggers in hsqldb. SQL to invoke is:

                CREATE TRIGGER triggerSample BEFORE|AFTER INSERT|UPDATE|DELETE ON myTable [FOR EACH ROW] [QUEUE n] [NOWAIT] CALL "myPackage.trigClass"
                This will create a thread that will wait for its firing event to occur; when this happens, the trigger's thread runs the 'trigClass.fire' Note that this is still in the same Java Virtual Machine as the database, so make sure the fired method does not hang.

                There is a queue of events waiting to be run by each trigger thread. This is particularly useful for 'FOR EACH ROW' triggers, when a large number of trigger events occur in rapid succession, without the trigger thread getting a chance to run. If the queue becomes full, subsequent additions to it cause the database engine to suspend awaiting space in the queue. Take great care to avoid this situation if the trigger action involves accessing the database, as deadlock will occur. This can be avoided either by ensuring the QUEUE parameter makes a large enough queue, or by using the NOWAIT parameter, which causes a new trigger event to overwrite the most recent event in the queue. The default queue size is 1024.

                Ensure that "myPackage.trigClass" is present in the classpath which you use to start hsql.

                If the method wants to access the database, it must establish a JDBC connection.

                When the 'fire' method is called, it is passed the following arguments:

                fire (int type, String trigName, String tabName, Object oldRow[], Object[] newRow)

                where 'type' is one of the values enumerated in the Trigger interface and the 'oldRow'/'newRow' pair represents the rows acted on. The first length - 1 array slots contain column values and the final slot contains either null or the value of the internally assigned row identity, if the concerned table has no primary key. The final slot must _never_ be modified.

                The mapping of row classes to database types is specified in /doc/hsqlSyntax.html#Datatypes.

                To be done:

                1. Implement the "jdbc:default:connection: URL to provide transparent and portable access to internal connections for use in triggers and stored procedures.

                2. Implement declaritive column to trigger method argument mapping, conditional execution (WHEN clause), etc.

                3. Investigate and refine synchronous and asynchronous trigger models.

                  Because certain combinations of trigger create parameters cause the individual triggered actions of a multirow update to run in different threads, it is possible for an 'after' trigger to run before its corresponding 'before' trigger; the acceptability and implications of this needs to be investigated, documented and the behaviour of the engine fully specified.

                4. Investigate and implement the SQL 200n specified execution stack under arbitrary triggered action and SQL-invoked routine call graphs.

                Since:
                1.7.0
                Author:
                Peter Hudson, boucherb@users

                Field Summary
                 
                Fields inherited from interface org.hsqldb.Trigger
                DELETE_AFTER, DELETE_AFTER_ROW, DELETE_BEFORE, DELETE_BEFORE_ROW, INSERT_AFTER, INSERT_AFTER_ROW, INSERT_BEFORE, INSERT_BEFORE_ROW, UPDATE_AFTER, UPDATE_AFTER_ROW, UPDATE_BEFORE, UPDATE_BEFORE_ROW
                 
                Constructor Summary
                TriggerSample()
                           
                 
                Method Summary
                 void fire(int typ, java.lang.String trn, java.lang.String tn, java.lang.Object[] or, java.lang.Object[] nr)
                          A sample HSQLDB Trigger interface implementation.
                static java.lang.String getForEachSpec(int type)
                           
                static java.lang.String getOperationSpec(int type)
                           
                static java.lang.String getQueueSpec(int qs)
                           
                static java.lang.String getTriggerDDL(java.lang.String trn, int typ, java.lang.String tab, int qs, java.lang.String impl)
                           
                static java.lang.String getTriggerDescriptor(java.lang.String trn, int typ, java.lang.String tab)
                           
                static java.lang.String getWhenSpec(int type)
                           
                static void main(java.lang.String[] args)
                           
                 
                Methods inherited from class java.lang.Object
                equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
                 

                Constructor Detail

                TriggerSample

                public TriggerSample()
                Method Detail

                fire

                public void fire(int typ,
                                 java.lang.String trn,
                                 java.lang.String tn,
                                 java.lang.Object[] or,
                                 java.lang.Object[] nr)
                A sample HSQLDB Trigger interface implementation.

                This sample prints information about the firing trigger and records actions in an audit table.

                The techniques used here are simplified dramatically for demonstration purposes and are in no way recommended as a model upon which to build actual installations involving triggered actions.

                Specified by:
                fire in interface Trigger
                Parameters:
                typ - trigger type
                trn - trigger name
                tn - table name
                or - old row
                nr - new row

                getWhenSpec

                public static java.lang.String getWhenSpec(int type)

                getOperationSpec

                public static java.lang.String getOperationSpec(int type)

                getQueueSpec

                public static java.lang.String getQueueSpec(int qs)

                getForEachSpec

                public static java.lang.String getForEachSpec(int type)

                getTriggerDDL

                public static java.lang.String getTriggerDDL(java.lang.String trn,
                                                             int typ,
                                                             java.lang.String tab,
                                                             int qs,
                                                             java.lang.String impl)
                                                      throws java.sql.SQLException
                Throws:
                java.sql.SQLException

                getTriggerDescriptor

                public static java.lang.String getTriggerDescriptor(java.lang.String trn,
                                                                    int typ,
                                                                    java.lang.String tab)

                main

                public static void main(java.lang.String[] args)
                                 throws java.sql.SQLException
                Throws:
                java.sql.SQLException


                Copyright 2001 - 2005 HSQL Development Group. All Rights Reserved. hsqldb-1.8.0.10.orig/doc/src/org/hsqldb/sample/package-frame.html0000644000175000017500000000165011020614566023054 0ustar renerene org.hsqldb.sample (HSQLDB 1.8.0.10 API) org.hsqldb.sample
                Classes 
                TriggerSample
                hsqldb-1.8.0.10.orig/doc/src/org/hsqldb/sample/package-use.html0000644000175000017500000001254611020614565022563 0ustar renerene Uses of Package org.hsqldb.sample (HSQLDB 1.8.0.10 API)

                Uses of Package
                org.hsqldb.sample

                No usage of org.hsqldb.sample



                Copyright 2001 - 2005 HSQL Development Group. All Rights Reserved. hsqldb-1.8.0.10.orig/doc/src/org/hsqldb/sample/class-use/0000755000175000017500000000000010253114045021372 5ustar renerenehsqldb-1.8.0.10.orig/doc/src/org/hsqldb/sample/class-use/TriggerSample.html0000644000175000017500000001327311020614565025040 0ustar renerene Uses of Class org.hsqldb.sample.TriggerSample (HSQLDB 1.8.0.10 API)

                Uses of Class
                org.hsqldb.sample.TriggerSample

                No usage of org.hsqldb.sample.TriggerSample



                Copyright 2001 - 2005 HSQL Development Group. All Rights Reserved. hsqldb-1.8.0.10.orig/doc/src/org/hsqldb/sample/package-summary.html0000644000175000017500000001407011020614566023457 0ustar renerene org.hsqldb.sample (HSQLDB 1.8.0.10 API)

                Package org.hsqldb.sample

                Class Summary
                TriggerSample Sample code for use of triggers in hsqldb.
                 



                Copyright 2001 - 2005 HSQL Development Group. All Rights Reserved. hsqldb-1.8.0.10.orig/doc/src/org/hsqldb/sample/package-tree.html0000644000175000017500000001573411020614566022731 0ustar renerene org.hsqldb.sample Class Hierarchy (HSQLDB 1.8.0.10 API)

                Hierarchy For Package org.hsqldb.sample

                Package Hierarchies:
                All Packages

                Class Hierarchy

                • class java.lang.Object
                  • class java.util.AbstractCollection (implements java.util.Collection)
                    • class java.util.AbstractList (implements java.util.List)
                      • class java.util.Vector (implements java.lang.Cloneable, java.util.List, java.util.RandomAccess, java.io.Serializable)
                        • class org.hsqldb.sample.ConnectionTypesSample
                  • class java.awt.Component (implements java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable)
                    • class java.awt.Container
                      • class java.awt.Panel (implements javax.accessibility.Accessible)
                        • class java.applet.Applet
                          • class org.hsqldb.util.DatabaseManager (implements java.awt.event.ActionListener, java.awt.event.KeyListener, java.awt.event.WindowListener)
                            • class org.hsqldb.sample.DatabaseManagerSample
                  • class org.hsqldb.sample.Testdb
                  • class org.hsqldb.sample.TriggerSample (implements org.hsqldb.Trigger)


                Copyright 2001 - 2005 HSQL Development Group. All Rights Reserved. hsqldb-1.8.0.10.orig/doc/src/org/hsqldb/WebServer.html0000644000175000017500000005314311020614566021020 0ustar renerene WebServer (HSQLDB 1.8.0.10 API)

                org.hsqldb
                Class WebServer

                java.lang.Object
                  extended byorg.hsqldb.Server
                      extended byorg.hsqldb.WebServer
                
                All Implemented Interfaces:
                org.hsqldb.HsqlSocketRequestHandler

                public class WebServer
                extends Server

                The HSQLDB HTTP protocol network database server.

                WebServer has two distinct functions:

                The primary function is to allow client/server access to HSQLDB databases via the HTTP protocol. This protocol is less efficient than the HSQL protocol used by the Server class and should be used only in situations where sandboxes or firewalls between the client and the server do not allow the use of the HSQL protocol. One example is client/server access by an applet running in browsers on remote hosts and accessing the database engine on the HTTP server from which the applet originated. From version 1.7.2, HTTP database connections are persistent and support transactions. Similar to HSQL connections, they should be explicitly closed to free the server resources.

                The secondary function of WebServer is to act as a simple general purpose HTTP server. It is aimed to support the minimum requirements set out by the HTTP/1.0 standard. The HEAD and GET methods can be used to query and retreive static files from the HTTP server.

                Both the database server and HTTP server functions of WebServer can be configured with the webserver.properties file. It contains entries for the database server similar to those for the HSQL protocol Server class. In addition, a list mapping different file endings to their mime types may be included in this file. (fredt@users)

                From the command line, the options are as follows:

                 +----------------+-------------+----------+------------------------------+
                 |    OPTION      |    TYPE     | DEFAULT  |         DESCRIPTION          |
                 +----------------+-------------+----------+------------------------------|
                 | -?             | --          | --       | prints this message          |
                 | -address       | name|number | any      | server inet address          |
                 | -port          | number      | 80       | port at which server listens |
                 | -database.i    | [type]spec  | 0=test   | path of database i           |
                 | -dbname.i      | alias       | --       | url alias for database i     |
                 | -silent        | true|false  | true     | false => display all queries |
                 | -trace         | true|false  | false    | display JDBC trace messages  |
                 | -no_system_exit| true|false  | false    | do not issue System.exit()   |
                 +----------------+-------------+----------+------------------------------+
                 
                Example of the webserver.properties file:
                 server.port=80
                 server.database.0=test
                 server.dbname.0=...
                 ...
                 server.database.n=...
                 server.dbname.n=...
                 server.silent=true
                
                 .htm=text/html
                 .html=text/html
                 .txt=text/plain
                 .gif=image/gif
                 .class=application/octet-stream
                 .jpg=image/jpeg
                 .jgep=image/jpeg
                 .zip=application/x-zip-compressed
                 
                • For server.root, use '/' as the separator, even for DOS/Windows.
                • File extensions for mime types must be lowercase and start with '.'
                Replaces original Hypersonic class of the same name.

                Since:
                1.7.2
                Author:
                fredt@users, boucherb@users

                Constructor Summary
                WebServer()
                           
                 
                Method Summary
                 java.lang.String getDefaultWebPage()
                          Retrieves the name of the web page served when no page is specified.
                 java.lang.String getHelpString()
                          Retrieves a String object describing the command line and properties options for this Server.
                 java.lang.String getProductName()
                          Retrieves this server's product name.
                 java.lang.String getProtocol()
                          Retrieves a string respresentaion of the network protocol this server offers, typically one of 'HTTP', HTTPS', 'HSQL' or 'HSQLS'.
                 java.lang.String getWebRoot()
                          Retrieves the root context (directory) from which web content is served.
                static void main(java.lang.String[] args)
                          Starts a new WebServer.
                 
                Methods inherited from class org.hsqldb.Server
                checkRunning, getAddress, getDatabaseName, getDatabasePath, getDatabaseType, getErrWriter, getLogWriter, getPort, getProductVersion, getServerError, getServerId, getState, getStateDescriptor, handleConnection, isNoSystemExit, isRestartOnShutdown, isSilent, isTls, isTrace, putPropertiesFromFile, putPropertiesFromString, setAddress, setDatabaseName, setDatabasePath, setDefaultWebPage, setErrWriter, setLogWriter, setNoSystemExit, setPort, setProperties, setRestartOnShutdown, setSilent, setTls, setTrace, setWebRoot, shutdown, signalCloseAllServerConnections, start, stop
                 
                Methods inherited from class java.lang.Object
                equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
                 

                Constructor Detail

                WebServer

                public WebServer()
                Method Detail

                main

                public static void main(java.lang.String[] args)
                Starts a new WebServer.

                Parameters:
                args - the "command line" parameters with which to start the WebServer. "-?" will cause the command line arguments help to be printed to the standard output

                getDefaultWebPage

                public java.lang.String getDefaultWebPage()
                Retrieves the name of the web page served when no page is specified. This attribute is relevant only when server protocol is HTTP(S).

                Overrides:
                getDefaultWebPage in class Server
                Returns:
                the name of the web page served when no page is specified

                getHelpString

                public java.lang.String getHelpString()
                Retrieves a String object describing the command line and properties options for this Server.

                Overrides:
                getHelpString in class Server
                Returns:
                the command line and properties options help for this Server

                getProductName

                public java.lang.String getProductName()
                Retrieves this server's product name.

                Typically, this will be something like: "HSQLDB xxx server".

                Overrides:
                getProductName in class Server
                Returns:
                the product name of this server

                getProtocol

                public java.lang.String getProtocol()
                Retrieves a string respresentaion of the network protocol this server offers, typically one of 'HTTP', HTTPS', 'HSQL' or 'HSQLS'.

                Overrides:
                getProtocol in class Server
                Returns:
                string respresentation of this server's protocol

                getWebRoot

                public java.lang.String getWebRoot()
                Retrieves the root context (directory) from which web content is served. This property is relevant only when the server protocol is HTTP(S). Although unlikely, it may be that in the future other contexts, such as jar urls may be supported, so that pages can be served from the contents of a jar or from the JVM class path.

                Overrides:
                getWebRoot in class Server
                Returns:
                the root context (directory) from which web content is served


                Copyright 2001 - 2005 HSQL Development Group. All Rights Reserved. hsqldb-1.8.0.10.orig/doc/src/overview-frame.html0000644000175000017500000000257111020614566020005 0ustar renerene Overview (HSQLDB 1.8.0.10 API)
                All Classes

                Packages
                org.hsqldb
                org.hsqldb.jdbc
                org.hsqldb.sample
                org.hsqldb.util

                  hsqldb-1.8.0.10.orig/doc/src/allclasses-frame.html0000644000175000017500000000656411020614566020273 0ustar renerene All Classes (HSQLDB 1.8.0.10 API) All Classes
                jdbcBlob
                jdbcCallableStatement
                jdbcClob
                jdbcColumnMetaData
                jdbcConnection
                jdbcDataSource
                jdbcDataSourceFactory
                jdbcDatabaseMetaData
                jdbcDriver
                jdbcParameterMetaData
                jdbcPreparedStatement
                jdbcResultSet
                jdbcResultSetMetaData
                jdbcSavepoint
                jdbcStatement
                RCData
                Server
                SqlTool
                SqlTool.SqlToolException
                Trigger
                TriggerSample
                Util
                WebServer
                hsqldb-1.8.0.10.orig/doc/src/overview-summary.html0000644000175000017500000001356111020614566020411 0ustar renerene Overview (HSQLDB 1.8.0.10 API)


                HSQLDB 1.8.0.10

                Packages
                org.hsqldb  
                org.hsqldb.jdbc  
                org.hsqldb.sample  
                org.hsqldb.util  

                 



                Copyright 2001 - 2005 HSQL Development Group. All Rights Reserved. hsqldb-1.8.0.10.orig/doc/src/help-doc.html0000644000175000017500000002167111020614570016537 0ustar renerene API Help (HSQLDB 1.8.0.10 API)

                How This API Document Is Organized

                This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.

                Overview

                The Overview page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.

                Package

                Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain four categories:

                • Interfaces (italic)
                • Classes
                • Exceptions
                • Errors

                Class/Interface

                Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:

                • Class inheritance diagram
                • Direct Subclasses
                • All Known Subinterfaces
                • All Known Implementing Classes
                • Class/interface declaration
                • Class/interface description

                • Nested Class Summary
                • Field Summary
                • Constructor Summary
                • Method Summary

                • Field Detail
                • Constructor Detail
                • Method Detail
                Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.

                Use

                Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its Use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the "Use" link in the navigation bar.

                Tree (Class Hierarchy)

                There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object. The interfaces do not inherit from java.lang.Object.
                • When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.
                • When viewing a particular package, class or interface page, clicking "Tree" displays the hierarchy for only that package.

                Deprecated API

                The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.

                Index

                The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.

                Prev/Next

                These links take you to the next or previous class, interface, package, or related page.

                Frames/No Frames

                These links show and hide the HTML frames. All pages are available with or without frames.

                Serialized Form

                Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.

                This help file applies to API documentation generated using the standard doclet.



                Copyright 2001 - 2005 HSQL Development Group. All Rights Reserved. hsqldb-1.8.0.10.orig/doc/src/hsqldb.gif0000644000175000017500000000054110245747526016133 0ustar renereneGIF89a-/ff3f3ff33f!,-/h50I(-+"`(vplaink((]+H.d D= t{fW۰MŮ]9w>i)W{W9nmnvu~"?h`\FSURLMl#G1r:7"fT$Að Šǿ}Ϻ͊SK/U.ҡhyĪ)0{4ObW`6va3(&pVJH%e1,} r9@;hsqldb-1.8.0.10.orig/doc/src/deprecated-list.html0000644000175000017500000001640211020614566020116 0ustar renerene Deprecated List (HSQLDB 1.8.0.10 API)

                Deprecated API

                Deprecated Methods
                org.hsqldb.jdbc.jdbcResultSet.getBigDecimal(int, int)
                          by java.sun.com as of JDK 1.2 
                org.hsqldb.jdbc.jdbcCallableStatement.getBigDecimal(int, int)
                          use getBigDecimal(int parameterIndex) or getBigDecimal(String parameterName) 
                org.hsqldb.jdbc.jdbcResultSet.getBigDecimal(String, int)
                          by java.sun.com as of JDK 1.2 
                org.hsqldb.jdbc.jdbcResultSet.getUnicodeStream(int)
                          use getCharacterStream in place of getUnicodeStream 
                org.hsqldb.jdbc.jdbcResultSet.getUnicodeStream(String)
                          use getCharacterStream instead 
                org.hsqldb.jdbc.jdbcPreparedStatement.setUnicodeStream(int, InputStream, int)
                          Sun does not include a reason, but presumably this is because setCharacterStream is now prefered 
                 



                Copyright 2001 - 2005 HSQL Development Group. All Rights Reserved. hsqldb-1.8.0.10.orig/doc/src/constant-values.html0000644000175000017500000004331211020614565020172 0ustar renerene Constant Field Values (HSQLDB 1.8.0.10 API)

                Constant Field Values


                Contents
                org.hsqldb.*

                org.hsqldb.Trigger
                public static final int DELETE_AFTER 1
                public static final int DELETE_AFTER_ROW 7
                public static final int DELETE_BEFORE 4
                public static final int DELETE_BEFORE_ROW 10
                public static final int INSERT_AFTER 0
                public static final int INSERT_AFTER_ROW 6
                public static final int INSERT_BEFORE 3
                public static final int INSERT_BEFORE_ROW 9
                public static final int UPDATE_AFTER 2
                public static final int UPDATE_AFTER_ROW 8
                public static final int UPDATE_BEFORE 5
                public static final int UPDATE_BEFORE_ROW 11

                org.hsqldb.jdbc.jdbcResultSet
                public static final int CLOSE_CURSORS_AT_COMMIT 2
                public static final int CONCUR_READ_ONLY 1007
                public static final int CONCUR_UPDATABLE 1008
                public static final int FETCH_FORWARD 1000
                public static final int FETCH_REVERSE 1001
                public static final int FETCH_UNKNOWN 1002
                public static final int HOLD_CURSORS_OVER_COMMIT 1
                public static final int TYPE_FORWARD_ONLY 1003
                public static final int TYPE_SCROLL_INSENSITIVE 1004
                public static final int TYPE_SCROLL_SENSITIVE 1005

                org.hsqldb.util.RCData
                public static final java.lang.String DEFAULT_JDBC_DRIVER "org.hsqldb.jdbcDriver"

                org.hsqldb.util.SqlTool
                public static final int CONNECTERR_EXITVAL 7
                public static final int FILEERR_EXITVAL 5
                public static final int INPUTERR_EXITVAL 6
                public static final int IOERR_EXITVAL 4
                public static final int RCERR_EXITVAL 2
                public static final int SQLERR_EXITVAL 3
                public static final int SQLTOOLERR_EXITVAL 1
                public static final int SYNTAXERR_EXITVAL 11



                Copyright 2001 - 2005 HSQL Development Group. All Rights Reserved. hsqldb-1.8.0.10.orig/doc/src/index-all.html0000644000175000017500000100500511020614566016720 0ustar renerene Index (HSQLDB 1.8.0.10 API)
                A B C D E F G H I J L M N O P R S T U W

                A

                absolute(int) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Moves the cursor to the given row number in this ResultSet object.
                acceptsURL(String) - Method in class org.hsqldb.jdbcDriver
                Returns true if the driver thinks that it can open a connection to the given URL.
                addBatch() - Method in class org.hsqldb.jdbc.jdbcPreparedStatement
                Adds a set of parameters to this PreparedStatement object's batch of commands.
                addBatch(String) - Method in class org.hsqldb.jdbc.jdbcPreparedStatement
                This method should always throw if called for a PreparedStatement or CallableStatment.
                addBatch(String) - Method in class org.hsqldb.jdbc.jdbcStatement
                Adds the given SQL command to the current list of commmands for this Statement object.
                afterLast() - Method in class org.hsqldb.jdbc.jdbcResultSet
                Moves the cursor to the end of this ResultSet object, just after the last row.
                allProceduresAreCallable() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether the current user can call all the procedures returned by the method getProcedures.
                allTablesAreSelectable() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether the current user can use all the tables returned by the method getTables in a SELECT statement.

                B

                beforeFirst() - Method in class org.hsqldb.jdbc.jdbcResultSet
                Moves the cursor to the front of this ResultSet object, just before the first row.

                C

                CLOSE_CURSORS_AT_COMMIT - Static variable in class org.hsqldb.jdbc.jdbcResultSet
                Copy of java.sql.ResultSet constant, for JDK 1.1 clients.
                CONCUR_READ_ONLY - Static variable in class org.hsqldb.jdbc.jdbcResultSet
                Copy of java.sql.ResultSet constant, for JDK 1.1 clients.
                CONCUR_UPDATABLE - Static variable in class org.hsqldb.jdbc.jdbcResultSet
                Copy of java.sql.ResultSet constant, for JDK 1.1 clients.
                CONNECTERR_EXITVAL - Static variable in class org.hsqldb.util.SqlTool
                 
                cancel() - Method in class org.hsqldb.jdbc.jdbcStatement
                Cancels this Statement object if both the DBMS and driver support aborting an SQL statement.
                cancelRowUpdates() - Method in class org.hsqldb.jdbc.jdbcResultSet
                Cancels the updates made to the current row in this ResultSet object.
                catalogName - Variable in class org.hsqldb.jdbc.jdbcColumnMetaData
                The column's table's catalog name.
                checkRunning(boolean) - Method in class org.hsqldb.Server
                Checks if this Server object is or is not running and throws if the current state does not match the specified value.
                clearBatch() - Method in class org.hsqldb.jdbc.jdbcStatement
                Empties this Statement object's current list of SQL commands.
                clearParameters() - Method in class org.hsqldb.jdbc.jdbcPreparedStatement
                Clears the current parameter values immediately.
                clearWarnings() - Method in class org.hsqldb.jdbc.jdbcConnection
                Clears all warnings reported for this Connection object.
                clearWarnings() - Method in class org.hsqldb.jdbc.jdbcResultSet
                Clears all warnings reported on this ResultSet object.
                clearWarnings() - Method in class org.hsqldb.jdbc.jdbcStatement
                Clears all the warnings reported on this Statement object.
                close() - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                Does the specialized work required to free this object's resources and that of it's parent classes.
                close() - Method in class org.hsqldb.jdbc.jdbcConnection
                Releases this Connection object's database and JDBC resources immediately instead of waiting for them to be automatically released.
                close() - Method in class org.hsqldb.jdbc.jdbcPreparedStatement
                Does the specialized work required to free this object's resources and that of it's parent class.
                close() - Method in class org.hsqldb.jdbc.jdbcResultSet
                Releases this ResultSet object's database and JDBC resources immediately instead of waiting for this to happen when it is automatically closed.
                close() - Method in class org.hsqldb.jdbc.jdbcStatement
                Releases this Statement object's database and JDBC resources immediately instead of waiting for this to happen when it is automatically closed.
                columnClassName - Variable in class org.hsqldb.jdbc.jdbcColumnMetaData
                The fully-qualified name of the Java class whose instances are manufactured if the method ResultSet.getObject is called to retrieve a value from the column.
                columnDisplaySize - Variable in class org.hsqldb.jdbc.jdbcColumnMetaData
                The column's normal max width in chars.
                columnLabel - Variable in class org.hsqldb.jdbc.jdbcColumnMetaData
                The suggested column title for use in printouts and displays.
                columnName - Variable in class org.hsqldb.jdbc.jdbcColumnMetaData
                The column's name.
                columnType - Variable in class org.hsqldb.jdbc.jdbcColumnMetaData
                The column's SQL type.
                columnTypeName - Variable in class org.hsqldb.jdbc.jdbcColumnMetaData
                The column's database-specific type name.
                commit() - Method in class org.hsqldb.jdbc.jdbcConnection
                Makes all changes made since the previous commit/rollback permanent and releases any database locks currently held by the Connection.
                connect(String, Properties) - Method in class org.hsqldb.jdbcDriver
                Attempts to make a database connection to the given URL.
                connectionClosedException() - Static method in class org.hsqldb.jdbc.Util
                 
                createStatement() - Method in class org.hsqldb.jdbc.jdbcConnection
                Creates a Statement object for sending SQL statements to the database.
                createStatement(int, int) - Method in class org.hsqldb.jdbc.jdbcConnection
                Creates a Statement object that will generate ResultSet objects with the given type and concurrency.
                createStatement(int, int, int) - Method in class org.hsqldb.jdbc.jdbcConnection
                Creates a Statement object that will generate ResultSet objects with the given type, concurrency, and holdability.

                D

                DEFAULT_JDBC_DRIVER - Static variable in class org.hsqldb.util.RCData
                 
                DELETE_AFTER - Static variable in interface org.hsqldb.Trigger
                 
                DELETE_AFTER_ROW - Static variable in interface org.hsqldb.Trigger
                 
                DELETE_BEFORE - Static variable in interface org.hsqldb.Trigger
                 
                DELETE_BEFORE_ROW - Static variable in interface org.hsqldb.Trigger
                 
                dataDefinitionCausesTransactionCommit() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether a data definition statement within a transaction forces the transaction to commit.
                dataDefinitionIgnoredInTransactions() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether this database ignores a data definition statement within a transaction.
                deleteRow() - Method in class org.hsqldb.jdbc.jdbcResultSet
                Deletes the current row from this ResultSet object and from the underlying database.
                deletesAreDetected(int) - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether or not a visible row delete can be detected by calling the method ResultSet.rowDeleted.
                doesMaxRowSizeIncludeBlobs() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether the return value for the method getMaxRowSize includes the SQL data types LONGVARCHAR and LONGVARBINARY.

                E

                execute() - Method in class org.hsqldb.jdbc.jdbcPreparedStatement
                Executes the SQL statement in this PreparedStatement object, which may be any kind of SQL statement.
                execute(String) - Method in class org.hsqldb.jdbc.jdbcPreparedStatement
                This method should always throw if called for a PreparedStatement or CallableStatment.
                execute(String) - Method in class org.hsqldb.jdbc.jdbcStatement
                Executes the given SQL statement, which may return multiple results.
                execute(String, int) - Method in class org.hsqldb.jdbc.jdbcStatement
                Executes the given SQL statement, which may return multiple results, and signals the driver that any auto-generated keys should be made available for retrieval.
                execute(String, int[]) - Method in class org.hsqldb.jdbc.jdbcStatement
                Executes the given SQL statement, which may return multiple results, and signals the driver that the auto-generated keys indicated in the given array should be made available for retrieval.
                execute(String, String[]) - Method in class org.hsqldb.jdbc.jdbcStatement
                Executes the given SQL statement, which may return multiple results, and signals the driver that the auto-generated keys indicated in the given array should be made available for retrieval.
                executeBatch() - Method in class org.hsqldb.jdbc.jdbcPreparedStatement
                Submits a batch of commands to the database for execution and if all commands execute successfully, returns an array of update counts.
                executeBatch() - Method in class org.hsqldb.jdbc.jdbcStatement
                Submits a batch of commands to the database for execution and if all commands execute successfully, returns an array of update counts.
                executeQuery() - Method in class org.hsqldb.jdbc.jdbcPreparedStatement
                Executes the SQL query in this PreparedStatement object and returns the ResultSet object generated by the query.
                executeQuery(String) - Method in class org.hsqldb.jdbc.jdbcPreparedStatement
                This method should always throw if called for a PreparedStatement or CallableStatment.
                executeQuery(String) - Method in class org.hsqldb.jdbc.jdbcStatement
                Executes the given SQL statement, which returns a single ResultSet object.
                executeUpdate() - Method in class org.hsqldb.jdbc.jdbcPreparedStatement
                Executes the SQL statement in this PreparedStatement object, which must be an SQL INSERT, UPDATE or DELETE statement; or an SQL statement that returns nothing, such as a DDL statement.
                executeUpdate(String) - Method in class org.hsqldb.jdbc.jdbcPreparedStatement
                This method should always throw if called for a PreparedStatement or CallableStatment.
                executeUpdate(String) - Method in class org.hsqldb.jdbc.jdbcStatement
                Executes the given SQL statement, which may be an INSERT, UPDATE, or DELETE statement or an SQL statement that returns nothing, such as an SQL DDL statement.
                executeUpdate(String, int) - Method in class org.hsqldb.jdbc.jdbcStatement
                Executes the given SQL statement and signals the driver with the given flag about whether the auto-generated keys produced by this Statement object should be made available for retrieval.
                executeUpdate(String, int[]) - Method in class org.hsqldb.jdbc.jdbcStatement
                Executes the given SQL statement and signals the driver that the auto-generated keys indicated in the given array should be made available for retrieval.
                executeUpdate(String, String[]) - Method in class org.hsqldb.jdbc.jdbcStatement
                Executes the given SQL statement and signals the driver that the auto-generated keys indicated in the given array should be made available for retrieval.
                expandSysPropVars(String) - Static method in class org.hsqldb.util.RCData
                 

                F

                FETCH_FORWARD - Static variable in class org.hsqldb.jdbc.jdbcResultSet
                Copy of java.sql.ResultSet constant, for JDK 1.1 clients.
                FETCH_REVERSE - Static variable in class org.hsqldb.jdbc.jdbcResultSet
                Copy of java.sql.ResultSet constant, for JDK 1.1 clients.
                FETCH_UNKNOWN - Static variable in class org.hsqldb.jdbc.jdbcResultSet
                Copy of java.sql.ResultSet constant, for JDK 1.1 clients.
                FILEERR_EXITVAL - Static variable in class org.hsqldb.util.SqlTool
                 
                findColumn(String) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Maps the given ResultSet column name to its ResultSet column index.
                fire(int, String, String, Object[], Object[]) - Method in interface org.hsqldb.Trigger
                The method invoked upon each triggered action.
                fire(int, String, String, Object[], Object[]) - Method in class org.hsqldb.sample.TriggerSample
                A sample HSQLDB Trigger interface implementation.
                first() - Method in class org.hsqldb.jdbc.jdbcResultSet
                Moves the cursor to the first row in this ResultSet object.

                G

                getAddress() - Method in class org.hsqldb.Server
                Retrieves, in string form, this server's host address.
                getArray(int) - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                Retrieves the value of the designated JDBC ARRAY parameter as an Array object in the Java programming language.
                getArray(String) - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                Retrieves the value of a JDBC ARRAY parameter as an Array object in the Java programming language.
                getArray(int) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Retrieves the value of the designated column in the current row of this ResultSet object as an Array object in the Java programming language.
                getArray(String) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Retrieves the value of the designated column in the current row of this ResultSet object as an Array object in the Java programming language.
                getAsciiStream() - Method in class org.hsqldb.jdbc.jdbcClob
                Retrieves the CLOB value designated by this Clob object as an ascii stream.
                getAsciiStream(int) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Retrieves the value of the designated column in the current row of this ResultSet object as a stream of ASCII characters.
                getAsciiStream(String) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Retrieves the value of the designated column in the current row of this ResultSet object as a stream of ASCII characters.
                getAttributes(String, String, String, String) - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves a description of the given attribute of the given type for a user-defined type (UDT) that is available in the given schema and catalog.
                getAutoCommit() - Method in class org.hsqldb.jdbc.jdbcConnection
                Gets the current auto-commit state.
                getBestRowIdentifier(String, String, String, int, boolean) - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves a description of a table's optimal set of columns that uniquely identifies a row.
                getBigDecimal(int, int) - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                Deprecated. use getBigDecimal(int parameterIndex) or getBigDecimal(String parameterName)
                getBigDecimal(int) - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                Retrieves the value of the designated JDBC NUMERIC parameter as a java.math.BigDecimal object with as many digits to the right of the decimal point as the value contains.
                getBigDecimal(String) - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                Retrieves the value of a JDBC NUMERIC parameter as a java.math.BigDecimal object with as many digits to the right of the decimal point as the value contains.
                getBigDecimal(int, int) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Deprecated. by java.sun.com as of JDK 1.2
                getBigDecimal(String, int) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Deprecated. by java.sun.com as of JDK 1.2
                getBigDecimal(int) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Retrieves the value of the designated column in the current row of this ResultSet object as a java.math.BigDecimal with full precision.
                getBigDecimal(String) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Retrieves the value of the designated column in the current row of this ResultSet object as a java.math.BigDecimal with full precision.
                getBinaryStream() - Method in class org.hsqldb.jdbc.jdbcBlob
                Retrieves the BLOB value designated by this Blob instance as a stream.
                getBinaryStream(int) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Retrieves the value of the designated column in the current row of this ResultSet object as a binary stream of uninterpreted bytes.
                getBinaryStream(String) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Retrieves the value of the designated column in the current row of this ResultSet object as a stream of uninterpreted bytes.
                getBlob(int) - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                Retrieves the value of the designated JDBC BLOB parameter as a Blob object in the Java programming language.
                getBlob(String) - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                Retrieves the value of a JDBC BLOB parameter as a Blob object in the Java programming language.
                getBlob(int) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Retrieves the value of the designated column in the current row of this ResultSet object as a Blob object in the Java programming language.
                getBlob(String) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Retrieves the value of the designated column in the current row of this ResultSet object as a Blob object in the Java programming language.
                getBoolean(int) - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                Retrieves the value of the designated JDBC BIT parameter as a boolean in the Java programming language.
                getBoolean(String) - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                (JDBC4 modified:) Retrieves the value of a JDBC BIT or BOOLEAN parameter as a boolean in the Java programming language.
                getBoolean(int) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Retrieves the value of the designated column in the current row of this ResultSet object as a boolean in the Java programming language.
                getBoolean(String) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Retrieves the value of the designated column in the current row of this ResultSet object as a boolean in the Java programming language.
                getByte(int) - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                Retrieves the value of the designated JDBC TINYINT parameter as a byte in the Java programming language.
                getByte(String) - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                Retrieves the value of a JDBC TINYINT parameter as a byte in the Java programming language.
                getByte(int) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Retrieves the value of the designated column in the current row of this ResultSet object as a byte in the Java programming language.
                getByte(String) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Retrieves the value of the designated column in the current row of this ResultSet object as a byte in the Java programming language.
                getBytes(long, int) - Method in class org.hsqldb.jdbc.jdbcBlob
                Retrieves all or part of the BLOB value that this Blob object represents, as an array of bytes.
                getBytes(int) - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                Retrieves the value of the designated JDBC BINARY or VARBINARY parameter as an array of byte values in the Java programming language.
                getBytes(String) - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                Retrieves the value of a JDBC BINARY or VARBINARY parameter as an array of byte values in the Java programming language.
                getBytes(int) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Retrieves the value of the designated column in the current row of this ResultSet object as a byte array in the Java programming language.
                getBytes(String) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Retrieves the value of the designated column in the current row of this ResultSet object as a byte array in the Java programming language.
                getCatalog() - Method in class org.hsqldb.jdbc.jdbcConnection
                Returns the Connection's current catalog name.
                getCatalogName(int) - Method in class org.hsqldb.jdbc.jdbcResultSetMetaData
                Gets the designated column's table's catalog name.
                getCatalogSeparator() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves the String that this database uses as the separator between a catalog and table name.
                getCatalogTerm() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves the database vendor's preferred term for "catalog".
                getCatalogs() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves the catalog names available in this database.
                getCharacterStream() - Method in class org.hsqldb.jdbc.jdbcClob
                Retrieves the CLOB value designated by this Clob object as a java.io.Reader object (or as a stream of characters).
                getCharacterStream(int) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Retrieves the value of the designated column in the current row of this ResultSet object as a java.io.Reader object.
                getCharacterStream(String) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Retrieves the value of the designated column in the current row of this ResultSet object as a java.io.Reader object.
                getClob(int) - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                Retrieves the value of the designated JDBC CLOB parameter as a Clob object in the Java programming language.
                getClob(String) - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                Retrieves the value of a JDBC CLOB parameter as a Clob object in the Java programming language.
                getClob(int) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Retrieves the value of the designated column in the current row of this ResultSet object as a Clob object in the Java programming language.
                getClob(String) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Retrieves the value of the designated column in the current row of this ResultSet object as a Clob object in the Java programming language.
                getColumnClassName(int) - Method in class org.hsqldb.jdbc.jdbcResultSetMetaData
                Returns the fully-qualified name of the Java class whose instances are manufactured if the method ResultSet.getObject is called to retrieve a value from the column.
                getColumnCount() - Method in class org.hsqldb.jdbc.jdbcResultSetMetaData
                Returns the number of columns in this ResultSet object.
                getColumnDisplaySize(int) - Method in class org.hsqldb.jdbc.jdbcResultSetMetaData
                Indicates the designated column's normal maximum width in characters.
                getColumnLabel(int) - Method in class org.hsqldb.jdbc.jdbcResultSetMetaData
                Gets the designated column's suggested title for use in printouts and displays.
                getColumnName(int) - Method in class org.hsqldb.jdbc.jdbcResultSetMetaData
                Get the designated column's name.
                getColumnPrivileges(String, String, String, String) - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves a description of the access rights for a table's columns.
                getColumnType(int) - Method in class org.hsqldb.jdbc.jdbcResultSetMetaData
                Retrieves the designated column's SQL type.
                getColumnTypeName(int) - Method in class org.hsqldb.jdbc.jdbcResultSetMetaData
                Retrieves the designated column's database-specific type name.
                getColumns(String, String, String, String) - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves a description of table columns available in the specified catalog.
                getConcurrency() - Method in class org.hsqldb.jdbc.jdbcResultSet
                Retrieves the concurrency mode of this ResultSet object.
                getConnection() - Method in class org.hsqldb.jdbc.jdbcDataSource
                Attempts to establish a connection with the data source that this DataSource object represents.
                getConnection(String, String) - Method in class org.hsqldb.jdbc.jdbcDataSource
                Attempts to establish a connection with the data source that this DataSource object represents.
                getConnection() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves the connection that produced this metadata object.
                getConnection() - Method in class org.hsqldb.jdbc.jdbcStatement
                Retrieves the Connection object that produced this Statement object.
                getConnection(String, Properties) - Static method in class org.hsqldb.jdbcDriver
                 
                getConnection() - Method in class org.hsqldb.util.RCData
                Gets a JDBC Connection using the data of this RCData object.
                getConnection(String, String, String) - Method in class org.hsqldb.util.RCData
                Gets a JDBC Connection using the data of this RCData object with specified override elements
                getCrossReference(String, String, String, String, String, String) - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves a description of the foreign key columns in the given foreign key table that reference the primary key columns of the given primary key table (describe how one table imports another's key).
                getCursorName() - Method in class org.hsqldb.jdbc.jdbcResultSet
                Retrieves the name of the SQL cursor used by this ResultSet object.
                getDatabase() - Method in class org.hsqldb.jdbc.jdbcDataSource
                Retrieves the jdbc database connection url attribute.
                getDatabaseMajorVersion() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves the major version number of the underlying database.
                getDatabaseMinorVersion() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves the minor version number of the underlying database.
                getDatabaseName(int, boolean) - Method in class org.hsqldb.Server
                Retrieves the url alias (network name) of the i'th database that this Server hosts.
                getDatabasePath(int, boolean) - Method in class org.hsqldb.Server
                Retrieves the HSQLDB path descriptor (uri) of the i'th Database that this Server hosts.
                getDatabaseProductName() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves the name of this database product.
                getDatabaseProductVersion() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves the version number of this database product.
                getDatabaseType(int) - Method in class org.hsqldb.Server
                 
                getDate(int) - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                Retrieves the value of the designated JDBC DATE parameter as a java.sql.Date object.
                getDate(int, Calendar) - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                Retrieves the value of the designated JDBC DATE parameter as a java.sql.Date object, using the given Calendar object to construct the date.
                getDate(String) - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                Retrieves the value of a JDBC DATE parameter as a java.sql.Date object.
                getDate(String, Calendar) - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                Retrieves the value of a JDBC DATE parameter as a java.sql.Date object, using the given Calendar object to construct the date.
                getDate(int) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Date object in the Java programming language.
                getDate(String) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Date object in the Java programming language.
                getDate(int, Calendar) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Date object in the Java programming language.
                getDate(String, Calendar) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Date object in the Java programming language.
                getDefaultJdbcDriverName() - Method in class org.hsqldb.util.RCData
                 
                getDefaultTransactionIsolation() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves this database's default transaction isolation level.
                getDefaultWebPage() - Method in class org.hsqldb.Server
                Retrieves the name of the web page served when no page is specified.
                getDefaultWebPage() - Method in class org.hsqldb.WebServer
                Retrieves the name of the web page served when no page is specified.
                getDouble(int) - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                Retrieves the value of the designated JDBC DOUBLE parameter as a double in the Java programming language.
                getDouble(String) - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                Retrieves the value of a JDBC DOUBLE parameter as a double in the Java programming language.
                getDouble(int) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Retrieves the value of the designated column in the current row of this ResultSet object as a double in the Java programming language.
                getDouble(String) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Retrieves the value of the designated column in the current row of this ResultSet object as a double in the Java programming language.
                getDriverMajorVersion() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves this JDBC driver's major version number.
                getDriverMinorVersion() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves this JDBC driver's minor version number.
                getDriverName() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves the name of this JDBC driver.
                getDriverVersion() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves the version number of this JDBC driver as a String.
                getErrWriter() - Method in class org.hsqldb.Server
                Retrieves the PrintWriter to which server errors are printed.
                getExportedKeys(String, String, String) - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves a description of the foreign key columns that reference the given table's primary key columns (the foreign keys exported by a table).
                getExtraNameCharacters() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves all the "extra" characters that can be used in unquoted identifier names (those beyond a-z, A-Z, 0-9 and _).
                getFetchDirection() - Method in class org.hsqldb.jdbc.jdbcResultSet
                Retrieves the fetch direction for this ResultSet object.
                getFetchDirection() - Method in class org.hsqldb.jdbc.jdbcStatement
                Retrieves the direction for fetching rows from database tables that is the default for result sets generated from this Statement object.
                getFetchSize() - Method in class org.hsqldb.jdbc.jdbcResultSet
                Retrieves the fetch size for this ResultSet object.
                getFetchSize() - Method in class org.hsqldb.jdbc.jdbcStatement
                Retrieves the number of result set rows that is the default fetch size for ResultSet objects generated from this Statement object.
                getFloat(int) - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                Retrieves the value of the designated JDBC FLOAT parameter as a float in the Java programming language.
                getFloat(String) - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                Retrieves the value of a JDBC FLOAT parameter as a float in the Java programming language.
                getFloat(int) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Retrieves the value of the designated column in the current row of this ResultSet object as a float in the Java programming language.
                getFloat(String) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Retrieves the value of the designated column in the current row of this ResultSet object as a float in the Java programming language.
                getForEachSpec(int) - Static method in class org.hsqldb.sample.TriggerSample
                 
                getGeneratedKeys() - Method in class org.hsqldb.jdbc.jdbcStatement
                Retrieves any auto-generated keys created as a result of executing this Statement object.
                getHelpString() - Method in class org.hsqldb.Server
                Retrieves a String object describing the command line and properties options for this Server.
                getHelpString() - Method in class org.hsqldb.WebServer
                Retrieves a String object describing the command line and properties options for this Server.
                getHoldability() - Method in class org.hsqldb.jdbc.jdbcConnection
                Retrieves the current holdability of ResultSet objects created using this Connection object.
                getIdentifierQuoteString() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves the string used to quote SQL identifiers.
                getImportedKeys(String, String, String) - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves a description of the primary key columns that are referenced by a table's foreign key columns (the primary keys imported by a table).
                getIndexInfo(String, String, String, boolean, boolean) - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves a description of the given table's indices and statistics.
                getInt(int) - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                Retrieves the value of the designated JDBC INTEGER parameter as an int in the Java programming language.
                getInt(String) - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                Retrieves the value of a JDBC INTEGER parameter as an int in the Java programming language.
                getInt(int) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Retrieves the value of the designated column in the current row of this ResultSet object as an int in the Java programming language.
                getInt(String) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Retrieves the value of the designated column in the current row of this ResultSet object as an int in the Java programming language.
                getJDBCMajorVersion() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves the major JDBC version number for this driver.
                getJDBCMinorVersion() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves the minor JDBC version number for this driver.
                getLogWriter() - Method in class org.hsqldb.Server
                Retrieves the PrintWriter to which server messages are printed.
                getLogWriter() - Method in class org.hsqldb.jdbc.jdbcDataSource
                Retrieves the log writer for this DataSource object.
                getLoginTimeout() - Method in class org.hsqldb.jdbc.jdbcDataSource
                Gets the maximum time in seconds that this data source can wait while attempting to connect to a database.
                getLong(int) - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                Retrieves the value of the designated JDBC BIGINT parameter as a long in the Java programming language.
                getLong(String) - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                Retrieves the value of a JDBC BIGINT parameter as a long in the Java programming language.
                getLong(int) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Retrieves the value of the designated column in the current row of this ResultSet object as a long in the Java programming language.
                getLong(String) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Retrieves the value of the designated column in the current row of this ResultSet object as a long in the Java programming language.
                getMajorVersion() - Method in class org.hsqldb.jdbcDriver
                Gets the driver's major version number.
                getMaxBinaryLiteralLength() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves the maximum number of hex characters this database allows in an inline binary literal.
                getMaxCatalogNameLength() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves the maximum number of characters that this database allows in a catalog name.
                getMaxCharLiteralLength() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves the maximum number of characters this database allows for a character literal.
                getMaxColumnNameLength() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves the maximum number of characters this database allows for a column name.
                getMaxColumnsInGroupBy() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves the maximum number of columns this database allows in a GROUP BY clause.
                getMaxColumnsInIndex() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves the maximum number of columns this database allows in an index.
                getMaxColumnsInOrderBy() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves the maximum number of columns this database allows in an ORDER BY clause.
                getMaxColumnsInSelect() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves the maximum number of columns this database allows in a SELECT list.
                getMaxColumnsInTable() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves the maximum number of columns this database allows in a table.
                getMaxConnections() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves the maximum number of concurrent connections to this database that are possible.
                getMaxCursorNameLength() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves the maximum number of characters that this database allows in a cursor name.
                getMaxFieldSize() - Method in class org.hsqldb.jdbc.jdbcStatement
                Retrieves the maximum number of bytes that can be returned for character and binary column values in a ResultSet object produced by this Statement object.
                getMaxIndexLength() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves the maximum number of bytes this database allows for an index, including all of the parts of the index.
                getMaxProcedureNameLength() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves the maximum number of characters that this database allows in a procedure name.
                getMaxRowSize() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves the maximum number of bytes this database allows in a single row.
                getMaxRows() - Method in class org.hsqldb.jdbc.jdbcStatement
                Retrieves the maximum number of rows that a ResultSet object produced by this Statement object can contain.
                getMaxSchemaNameLength() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves the maximum number of characters that this database allows in a schema name.
                getMaxStatementLength() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves the maximum number of characters this database allows in an SQL statement.
                getMaxStatements() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves the maximum number of active statements to this database that can be open at the same time.
                getMaxTableNameLength() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves the maximum number of characters this database allows in a table name.
                getMaxTablesInSelect() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves the maximum number of tables this database allows in a SELECT statement.
                getMaxUserNameLength() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves the maximum number of characters this database allows in a user name.
                getMetaData() - Method in class org.hsqldb.jdbc.jdbcConnection
                Gets the metadata regarding this connection's database.
                getMetaData() - Method in class org.hsqldb.jdbc.jdbcPreparedStatement
                Retrieves a ResultSetMetaData object that contains information about the columns of the ResultSet object that will be returned when this PreparedStatement object is executed.
                getMetaData() - Method in class org.hsqldb.jdbc.jdbcResultSet
                Retrieves the number, types and properties of this ResultSet object's columns.
                getMinorVersion() - Method in class org.hsqldb.jdbcDriver
                Gets the driver's minor version number.
                getMoreResults() - Method in class org.hsqldb.jdbc.jdbcStatement
                Moves to this Statement object's next result, returns true if it is a ResultSet object, and implicitly closes any current ResultSet object(s) obtained with the method getResultSet.
                getMoreResults(int) - Method in class org.hsqldb.jdbc.jdbcStatement
                Moves to this Statement object's next result, deals with any current ResultSet object(s) according to the instructions specified by the given flag, and returns true if the next result is a ResultSet object.
                getNumericFunctions() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves a comma-separated list of math functions available with this database.
                getObject(int) - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                Retrieves the value of the designated parameter as an Object in the Java programming language.
                getObject(int, Map) - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                Returns an object representing the value of OUT parameter parameterIndex and uses map for the custom mapping of the parameter value.
                getObject(String) - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                Retrieves the value of a parameter as an Object in the Java programming language.
                getObject(String, Map) - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                Returns an object representing the value of OUT parameter parameterName and uses map for the custom mapping of the parameter value.
                getObject(int) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Gets the value of the designated column in the current row of this ResultSet object as an Object in the Java programming language.
                getObject(String) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Gets the value of the designated column in the current row of this ResultSet object as an Object in the Java programming language.
                getObject(int, Map) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Retrieves the value of the designated column in the current row of this ResultSet object as an Object in the Java programming language.
                getObject(String, Map) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Retrieves the value of the designated column in the current row of this ResultSet object as an Object in the Java programming language.
                getObjectInstance(Object, Name, Context, Hashtable) - Method in class org.hsqldb.jdbc.jdbcDataSourceFactory
                Creates a jdbcDatasource object using the location or reference information specified.
                getOperationSpec(int) - Static method in class org.hsqldb.sample.TriggerSample
                 
                getParameterClassName(int) - Method in class org.hsqldb.jdbc.jdbcParameterMetaData
                Retrieves the fully-qualified name of the Java class whose instances should be passed to the method PreparedStatement.setObject.
                getParameterCount() - Method in class org.hsqldb.jdbc.jdbcParameterMetaData
                Retrieves the number of parameters in the PreparedStatement object for which this ParameterMetaData object provides information.
                getParameterMetaData() - Method in class org.hsqldb.jdbc.jdbcPreparedStatement
                Retrieves the number, types and properties of this PreparedStatement object's parameters.
                getParameterMode(int) - Method in class org.hsqldb.jdbc.jdbcParameterMetaData
                Retrieves the designated parameter's mode.
                getParameterType(int) - Method in class org.hsqldb.jdbc.jdbcParameterMetaData
                Retrieves the designated parameter's SQL type.
                getParameterTypeName(int) - Method in class org.hsqldb.jdbc.jdbcParameterMetaData
                Retrieves the designated parameter's database-specific type name.
                getPort() - Method in class org.hsqldb.Server
                Retrieves this server's host port.
                getPrecision(int) - Method in class org.hsqldb.jdbc.jdbcParameterMetaData
                Retrieves the designated parameter's number of decimal digits.
                getPrecision(int) - Method in class org.hsqldb.jdbc.jdbcResultSetMetaData
                Get the designated column's number of decimal digits.
                getPrimaryKeys(String, String, String) - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves a description of the given table's primary key columns.
                getProcedureColumns(String, String, String, String) - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves a description of the given catalog's stored procedure parameter and result columns.
                getProcedureTerm() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves the database vendor's preferred term for "procedure".
                getProcedures(String, String, String) - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves a description of the stored procedures available in the given catalog.
                getProductName() - Method in class org.hsqldb.Server
                Retrieves this server's product name.
                getProductName() - Method in class org.hsqldb.WebServer
                Retrieves this server's product name.
                getProductVersion() - Method in class org.hsqldb.Server
                Retrieves the server's product version, as a String.
                getPropertyInfo(String, Properties) - Method in class org.hsqldb.jdbcDriver
                Gets information about the possible properties for this driver.
                getProtocol() - Method in class org.hsqldb.Server
                Retrieves a string respresentaion of the network protocol this server offers, typically one of 'HTTP', HTTPS', 'HSQL' or 'HSQLS'.
                getProtocol() - Method in class org.hsqldb.WebServer
                Retrieves a string respresentaion of the network protocol this server offers, typically one of 'HTTP', HTTPS', 'HSQL' or 'HSQLS'.
                getQueryTimeout() - Method in class org.hsqldb.jdbc.jdbcStatement
                Retrieves the number of seconds the driver will wait for a Statement object to execute.
                getQueueSpec(int) - Static method in class org.hsqldb.sample.TriggerSample
                 
                getRef(int) - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                Retrieves the value of the designated JDBC REF(<structured-type>) parameter as a Ref object in the Java programming language.
                getRef(String) - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                Retrieves the value of a JDBC REF(<structured-type>) parameter as a Ref object in the Java programming language.
                getRef(int) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Retrieves the value of the designated column in the current row of this ResultSet object as a Ref object in the Java programming language.
                getRef(String) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Retrieves the value of the designated column in the current row of this ResultSet object as a Ref object in the Java programming language.
                getReference() - Method in class org.hsqldb.jdbc.jdbcDataSource
                 
                getResultSet() - Method in class org.hsqldb.jdbc.jdbcStatement
                Retrieves the current result as a ResultSet object.
                getResultSetConcurrency() - Method in class org.hsqldb.jdbc.jdbcStatement
                Retrieves the result set concurrency for ResultSet objects generated by this Statement object.
                getResultSetHoldability() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves the default holdability of this ResultSet object.
                getResultSetHoldability() - Method in class org.hsqldb.jdbc.jdbcStatement
                Retrieves the result set holdability for ResultSet objects generated by this Statement object.
                getResultSetType() - Method in class org.hsqldb.jdbc.jdbcStatement
                Retrieves the result set type for ResultSet objects generated by this Statement object.
                getRow() - Method in class org.hsqldb.jdbc.jdbcResultSet
                Retrieves the current row number.
                getSQLKeywords() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves a comma-separated list of all of this database's SQL keywords that are NOT also SQL92 keywords.
                getSQLStateType() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Indicates whether the SQLSTATEs returned by SQLException.getSQLState is X/Open (now known as Open Group) SQL CLI or SQL99.
                getSavepointId() - Method in class org.hsqldb.jdbc.jdbcSavepoint
                Retrieves the generated ID for the savepoint that this Savepoint object represents.
                getSavepointName() - Method in class org.hsqldb.jdbc.jdbcSavepoint
                Retrieves the name of the savepoint that this Savepoint object represents.
                getScale(int) - Method in class org.hsqldb.jdbc.jdbcParameterMetaData
                Retrieves the designated parameter's number of digits to right of the decimal point.
                getScale(int) - Method in class org.hsqldb.jdbc.jdbcResultSetMetaData
                Gets the designated column's number of digits to right of the decimal point.
                getSchemaName(int) - Method in class org.hsqldb.jdbc.jdbcResultSetMetaData
                Get the designated column's table's schema.
                getSchemaTerm() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves the database vendor's preferred term for "schema".
                getSchemas() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves the schema names available in this database.
                getSearchStringEscape() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves the string that can be used to escape wildcard characters.
                getServerError() - Method in class org.hsqldb.Server
                Retrieves a Throwable indicating the last server error, if any.
                getServerId() - Method in class org.hsqldb.Server
                Retrieves a String identifying this Server object.
                getShort(int) - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                Retrieves the value of the designated JDBC SMALLINT parameter as a short in the Java programming language.
                getShort(String) - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                Retrieves the value of a JDBC SMALLINT parameter as a short in the Java programming language.
                getShort(int) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Retrieves the value of the designated column in the current row of this ResultSet object as a short in the Java programming language.
                getShort(String) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Retrieves the value of the designated column in the current row of this ResultSet object as a short in the Java programming language.
                getState() - Method in class org.hsqldb.Server
                Retrieves current state of this server in numerically coded form.
                getStateDescriptor() - Method in class org.hsqldb.Server
                Retrieves a character sequence describing this server's current state, including the message of the last exception, if there is one and it is still in context.
                getStatement() - Method in class org.hsqldb.jdbc.jdbcResultSet
                Retrieves the Statement object that produced this ResultSet object.
                getString(int) - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                Retrieves the value of the designated JDBC CHAR, VARCHAR, or LONGVARCHAR parameter as a String in the Java programming language.
                getString(String) - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                Retrieves the value of a JDBC CHAR, VARCHAR, or LONGVARCHAR parameter as a String in the Java programming language.
                getString(int) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Retrieves the value of the designated column in the current row of this ResultSet object as a String in the Java programming language.
                getString(String) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Retrieves the value of the designated column in the current row of this ResultSet object as a String in the Java programming language.
                getStringFunctions() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves a comma-separated list of string functions available with this database.
                getSubString(long, int) - Method in class org.hsqldb.jdbc.jdbcClob
                Retrieves a copy of the specified substring in the CLOB value designated by this Clob object.
                getSuperTables(String, String, String) - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves a description of the table hierarchies defined in a particular schema in this database.
                getSuperTypes(String, String, String) - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves a description of the user-defined type (UDT) hierarchies defined in a particular schema in this database.
                getSystemFunctions() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves a comma-separated list of system functions available with this database.
                getTableName(int) - Method in class org.hsqldb.jdbc.jdbcResultSetMetaData
                Gets the designated column's table name.
                getTablePrivileges(String, String, String) - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves a description of the access rights for each table available in a catalog.
                getTableTypes() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves the table types available in this database.
                getTables(String, String, String, String[]) - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves a description of the tables available in the given catalog.
                getTime(int) - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                Retrieves the value of the designated JDBC TIME parameter as a java.sql.Time object.
                getTime(int, Calendar) - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                Retrieves the value of the designated JDBC TIME parameter as a java.sql.Time object, using the given Calendar object to construct the time.
                getTime(String) - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                Retrieves the value of a JDBC TIME parameter as a java.sql.Time object.
                getTime(String, Calendar) - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                Retrieves the value of a JDBC TIME parameter as a java.sql.Time object, using the given Calendar object to construct the time.
                getTime(int) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Time object in the Java programming language.
                getTime(String) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Time object in the Java programming language.
                getTime(int, Calendar) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Time object in the Java programming language.
                getTime(String, Calendar) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Time object in the Java programming language.
                getTimeDateFunctions() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves a comma-separated list of the time and date functions available with this database.
                getTimestamp(int) - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                Retrieves the value of the designated JDBC TIMESTAMP parameter as a java.sql.Timestamp object.
                getTimestamp(int, Calendar) - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                Retrieves the value of the designated JDBC TIMESTAMP parameter as a java.sql.Timestamp object, using the given Calendar object to construct the Timestamp object.
                getTimestamp(String) - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                Retrieves the value of a JDBC TIMESTAMP parameter as a java.sql.Timestamp object.
                getTimestamp(String, Calendar) - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                Retrieves the value of a JDBC TIMESTAMP parameter as a java.sql.Timestamp object, using the given Calendar object to construct the Timestamp object.
                getTimestamp(int) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Timestamp object in the Java programming language.
                getTimestamp(String) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Timestamp object.
                getTimestamp(int, Calendar) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Timestamp object in the Java programming anguage.
                getTimestamp(String, Calendar) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Timestamp object in the Java programming language.
                getTransactionIsolation() - Method in class org.hsqldb.jdbc.jdbcConnection
                Retrieves this Connection object's current transaction isolation level.
                getTriggerDDL(String, int, String, int, String) - Static method in class org.hsqldb.sample.TriggerSample
                 
                getTriggerDescriptor(String, int, String) - Static method in class org.hsqldb.sample.TriggerSample
                 
                getType() - Method in class org.hsqldb.jdbc.jdbcResultSet
                Retrieves the type of this ResultSet object.
                getTypeInfo() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves a description of all the standard SQL types supported by this database.
                getTypeMap() - Method in class org.hsqldb.jdbc.jdbcConnection
                Gets the type map object associated with this connection.
                getUDTs(String, String, String, int[]) - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves a description of the user-defined types (UDTs) defined in a particular schema.
                getURL(int) - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                Retrieves the value of the designated JDBC DATALINK parameter as a java.net.URL object.
                getURL(String) - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                Retrieves the value of a JDBC DATALINK parameter as a java.net.URL object.
                getURL() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves the URL for this DBMS.
                getURL(int) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Retrieves the value of the designated column in the current row of this ResultSet object as a java.net.URL object in the Java programming language.
                getURL(String) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Retrieves the value of the designated column in the current row of this ResultSet object as a java.net.URL object in the Java programming language.
                getUnicodeStream(int) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Deprecated. use getCharacterStream in place of getUnicodeStream
                getUnicodeStream(String) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Deprecated. use getCharacterStream instead
                getUpdateCount() - Method in class org.hsqldb.jdbc.jdbcStatement
                Retrieves the current result as an update count; if the result is a ResultSet object or there are no more results, -1 is returned.
                getUser() - Method in class org.hsqldb.jdbc.jdbcDataSource
                Retrieves the user ID for the connection.
                getUserName() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves the user name as known to this database.
                getVersionColumns(String, String, String) - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves a description of a table's columns that are automatically updated when any value in a row is updated.
                getWarnings() - Method in class org.hsqldb.jdbc.jdbcConnection
                Retrieves the first warning reported by calls on this Connection object.
                getWarnings() - Method in class org.hsqldb.jdbc.jdbcResultSet
                Retrieves the first warning reported by calls on this ResultSet object.
                getWarnings() - Method in class org.hsqldb.jdbc.jdbcStatement
                Retrieves the first warning reported by calls on this Statement object.
                getWebRoot() - Method in class org.hsqldb.Server
                Retrieves the root context (directory) from which web content is served.
                getWebRoot() - Method in class org.hsqldb.WebServer
                Retrieves the root context (directory) from which web content is served.
                getWhenSpec(int) - Static method in class org.hsqldb.sample.TriggerSample
                 

                H

                HOLD_CURSORS_OVER_COMMIT - Static variable in class org.hsqldb.jdbc.jdbcResultSet
                Copy of java.sql.ResultSet constant, for JDK 1.1 clients.
                handleConnection(Socket) - Method in class org.hsqldb.Server
                Assigns the specified socket to a new conection handler and starts the handler in a new Thread.

                I

                INPUTERR_EXITVAL - Static variable in class org.hsqldb.util.SqlTool
                 
                INSERT_AFTER - Static variable in interface org.hsqldb.Trigger
                 
                INSERT_AFTER_ROW - Static variable in interface org.hsqldb.Trigger
                 
                INSERT_BEFORE - Static variable in interface org.hsqldb.Trigger
                 
                INSERT_BEFORE_ROW - Static variable in interface org.hsqldb.Trigger
                 
                IOERR_EXITVAL - Static variable in class org.hsqldb.util.SqlTool
                 
                insertRow() - Method in class org.hsqldb.jdbc.jdbcResultSet
                Inserts the contents of the insert row into this ResultSet object and into the database.
                insertsAreDetected(int) - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether or not a visible row insert can be detected by calling the method ResultSet.rowInserted.
                invalidArgument() - Static method in class org.hsqldb.jdbc.Util
                 
                invalidArgument(String) - Static method in class org.hsqldb.jdbc.Util
                 
                isAfterLast() - Method in class org.hsqldb.jdbc.jdbcResultSet
                Retrieves whether the cursor is after the last row in this ResultSet object.
                isAutoIncrement - Variable in class org.hsqldb.jdbc.jdbcColumnMetaData
                Whether the value of the column are automatically numbered.
                isAutoIncrement(int) - Method in class org.hsqldb.jdbc.jdbcResultSetMetaData
                Indicates whether the designated column is automatically numbered, thus read-only.
                isBeforeFirst() - Method in class org.hsqldb.jdbc.jdbcResultSet
                Retrieves whether the cursor is before the first row in this ResultSet object.
                isCaseSensitive - Variable in class org.hsqldb.jdbc.jdbcColumnMetaData
                Whether the column's value's case matters.
                isCaseSensitive(int) - Method in class org.hsqldb.jdbc.jdbcResultSetMetaData
                Indicates whether a column's case matters.
                isCatalogAtStart() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether a catalog appears at the start of a fully qualified table name.
                isClosed() - Method in class org.hsqldb.jdbc.jdbcConnection
                Tests to see if a Connection is closed.
                isClosed() - Method in class org.hsqldb.jdbc.jdbcStatement
                Retrieves whether this statement is closed.
                isCurrency - Variable in class org.hsqldb.jdbc.jdbcColumnMetaData
                Whether the values in the column are cash values.
                isCurrency(int) - Method in class org.hsqldb.jdbc.jdbcResultSetMetaData
                Indicates whether the designated column is a cash value.
                isDefinitelyWritable - Variable in class org.hsqldb.jdbc.jdbcColumnMetaData
                Whether a write on the column will definitely succeed.
                isDefinitelyWritable(int) - Method in class org.hsqldb.jdbc.jdbcResultSetMetaData
                Indicates whether a write on the designated column will definitely succeed.
                isFirst() - Method in class org.hsqldb.jdbc.jdbcResultSet
                Retrieves whether the cursor is on the first row of this ResultSet object.
                isLast() - Method in class org.hsqldb.jdbc.jdbcResultSet
                Retrieves whether the cursor is on the last row of this ResultSet object.
                isNoSystemExit() - Method in class org.hsqldb.Server
                Retrieves whether this server calls System.exit() when shutdown.
                isNullable - Variable in class org.hsqldb.jdbc.jdbcColumnMetaData
                The nullability of values in the column.
                isNullable(int) - Method in class org.hsqldb.jdbc.jdbcParameterMetaData
                Retrieves whether null values are allowed in the designated parameter.
                isNullable(int) - Method in class org.hsqldb.jdbc.jdbcResultSetMetaData
                Indicates the nullability of values in the designated column.
                isReadOnly - Variable in class org.hsqldb.jdbc.jdbcColumnMetaData
                Whether the column's values are definitely not writable.
                isReadOnly() - Method in class org.hsqldb.jdbc.jdbcConnection
                Tests to see if the connection is in read-only mode.
                isReadOnly() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether this database is in read-only mode.
                isReadOnly(int) - Method in class org.hsqldb.jdbc.jdbcResultSetMetaData
                Indicates whether the designated column is definitely not writable.
                isRestartOnShutdown() - Method in class org.hsqldb.Server
                Retrieves whether this server restarts on shutdown.
                isSearchable - Variable in class org.hsqldb.jdbc.jdbcColumnMetaData
                Whether the column's values can be used in a where clause.
                isSearchable(int) - Method in class org.hsqldb.jdbc.jdbcResultSetMetaData
                Indicates whether the designated column can be used in a where clause.
                isSigned - Variable in class org.hsqldb.jdbc.jdbcColumnMetaData
                Whether values in the column are signed numbers.
                isSigned(int) - Method in class org.hsqldb.jdbc.jdbcParameterMetaData
                Retrieves whether values for the designated parameter can be signed numbers.
                isSigned(int) - Method in class org.hsqldb.jdbc.jdbcResultSetMetaData
                Indicates whether values in the designated column are signed numbers.
                isSilent() - Method in class org.hsqldb.Server
                Retrieves whether silent mode operation was requested in the server properties.
                isTls() - Method in class org.hsqldb.Server
                Retrieves whether the use of secure sockets was requested in the server properties.
                isTrace() - Method in class org.hsqldb.Server
                Retrieves whether JDBC trace messages are to go to System.out or the DriverManger PrintStream/PrintWriter, if any.
                isWritable - Variable in class org.hsqldb.jdbc.jdbcColumnMetaData
                Whether it is possible for a write on the column to succeed.
                isWritable(int) - Method in class org.hsqldb.jdbc.jdbcResultSetMetaData
                Indicates whether it is possible for a write on the designated column to succeed.

                J

                jdbcBlob - class org.hsqldb.jdbc.jdbcBlob.
                The representation (mapping) in the JavaTM programming language of an SQL BLOB value.
                jdbcBlob(byte[]) - Constructor for class org.hsqldb.jdbc.jdbcBlob
                Constructs a new jdbcBlob instance wrapping the given octet sequence.
                jdbcCallableStatement - class org.hsqldb.jdbc.jdbcCallableStatement.
                The interface used to execute SQL stored procedures.
                jdbcCallableStatement(jdbcConnection, String, int) - Constructor for class org.hsqldb.jdbc.jdbcCallableStatement
                Constructs a new jdbcCallableStatement with the specified connection and result type.
                jdbcClob - class org.hsqldb.jdbc.jdbcClob.
                The mapping in the JavaTM programming language for the SQL CLOB type.
                jdbcClob(String) - Constructor for class org.hsqldb.jdbc.jdbcClob
                Constructs a new jdbcClob object wrapping the given character sequence.
                jdbcColumnMetaData - class org.hsqldb.jdbc.jdbcColumnMetaData.
                Provides a site for holding the ResultSetMetaData for individual ResultSet columns.
                jdbcColumnMetaData() - Constructor for class org.hsqldb.jdbc.jdbcColumnMetaData
                 
                jdbcCompliant() - Method in class org.hsqldb.jdbcDriver
                Reports whether this driver is a genuine JDBC COMPLIANTTM driver.
                jdbcConnection - class org.hsqldb.jdbc.jdbcConnection.
                A connection (session) with a specific database.
                jdbcConnection(HsqlProperties) - Constructor for class org.hsqldb.jdbc.jdbcConnection
                Constructs a new external Connection to an HSQLDB Database.
                jdbcConnection(Session) - Constructor for class org.hsqldb.jdbc.jdbcConnection
                Constructs an INTERNAL Connection, using the specified Session.
                jdbcDataSource - class org.hsqldb.jdbc.jdbcDataSource.
                A factory for connections to the physical data source that this DataSource object represents.
                jdbcDataSource() - Constructor for class org.hsqldb.jdbc.jdbcDataSource
                Constructor
                jdbcDataSourceFactory - class org.hsqldb.jdbc.jdbcDataSourceFactory.
                A JNDI ObjectFactory for creating jdbcDatasource object instances.
                jdbcDataSourceFactory() - Constructor for class org.hsqldb.jdbc.jdbcDataSourceFactory
                 
                jdbcDatabaseMetaData - class org.hsqldb.jdbc.jdbcDatabaseMetaData.
                Comprehensive information about the database as a whole.
                jdbcDriver - class org.hsqldb.jdbcDriver.
                Each JDBC driver must supply a class that implements the Driver interface.
                jdbcDriver() - Constructor for class org.hsqldb.jdbcDriver
                 
                jdbcParameterMetaData - class org.hsqldb.jdbc.jdbcParameterMetaData.
                An object that can be used to get information about the types and properties of the parameters in a PreparedStatement object.
                jdbcPreparedStatement - class org.hsqldb.jdbc.jdbcPreparedStatement.
                An object that represents a precompiled SQL statement.
                jdbcResultSet - class org.hsqldb.jdbc.jdbcResultSet.
                A table of data representing a database result set, which is usually generated by executing a statement that queries the database.
                jdbcResultSetMetaData - class org.hsqldb.jdbc.jdbcResultSetMetaData.
                An object that can be used to get information about the types and properties of the columns in a ResultSet object.
                jdbcSavepoint - class org.hsqldb.jdbc.jdbcSavepoint.
                The representation of a savepoint, which is a point within the current transaction that can be referenced from the Connection.rollback method.
                jdbcStatement - class org.hsqldb.jdbc.jdbcStatement.
                The object used for executing a static SQL statement and returning the results it produces.

                L

                LS - Static variable in class org.hsqldb.util.SqlTool
                 
                last() - Method in class org.hsqldb.jdbc.jdbcResultSet
                Moves the cursor to the last row in this ResultSet object.
                length() - Method in class org.hsqldb.jdbc.jdbcBlob
                Returns the number of bytes in the BLOB value designated by this Blob object.
                length() - Method in class org.hsqldb.jdbc.jdbcClob
                Retrieves the number of characters in the CLOB value designated by this Clob object.
                locatorsUpdateCopy() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Indicates whether updates made to a LOB are made on a copy or directly to the LOB.

                M

                main(String[]) - Static method in class org.hsqldb.Server
                Creates and starts a new Server.
                main(String[]) - Static method in class org.hsqldb.WebServer
                Starts a new WebServer.
                main(String[]) - Static method in class org.hsqldb.sample.TriggerSample
                 
                main(String[]) - Static method in class org.hsqldb.util.SqlTool
                A static wrapper for objectMain, so that that method may be executed as a Java "program".
                moveToCurrentRow() - Method in class org.hsqldb.jdbc.jdbcResultSet
                Moves the cursor to the remembered cursor position, usually the current row.
                moveToInsertRow() - Method in class org.hsqldb.jdbc.jdbcResultSet
                Moves the cursor to the insert row.

                N

                nativeSQL(String) - Method in class org.hsqldb.jdbc.jdbcConnection
                Converts the given SQL statement into the system's native SQL grammar.
                next() - Method in class org.hsqldb.jdbc.jdbcResultSet
                Moves the cursor down one row from its current position.
                nullArgument() - Static method in class org.hsqldb.jdbc.Util
                 
                nullPlusNonNullIsNull() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether this database supports concatenations between NULL and non-NULL values being NULL.
                nullsAreSortedAtEnd() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether NULL values are sorted at the end regardless of sort order.
                nullsAreSortedAtStart() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether NULL values are sorted at the start regardless of sort order.
                nullsAreSortedHigh() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether NULL values are sorted high.
                nullsAreSortedLow() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether NULL values are sorted low.

                O

                objectMain(String[]) - Static method in class org.hsqldb.util.SqlTool
                Connect to a JDBC Database and execute the commands given on stdin or in SQL file(s).
                org.hsqldb.jdbc - package org.hsqldb.jdbc
                 
                othersDeletesAreVisible(int) - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether deletes made by others are visible.
                othersInsertsAreVisible(int) - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether inserts made by others are visible.
                othersUpdatesAreVisible(int) - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether updates made by others are visible.
                outOfRangeArgument() - Static method in class org.hsqldb.jdbc.Util
                 
                outOfRangeArgument(String) - Static method in class org.hsqldb.jdbc.Util
                 
                ownDeletesAreVisible(int) - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether a result set's own deletes are visible.
                ownInsertsAreVisible(int) - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether a result set's own inserts are visible.
                ownUpdatesAreVisible(int) - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether for the given type of ResultSet object, the result set's own updates are visible.

                P

                position(byte[], long) - Method in class org.hsqldb.jdbc.jdbcBlob
                Retrieves the byte position at which the specified byte array pattern begins within the BLOB value that this Blob object represents.
                position(Blob, long) - Method in class org.hsqldb.jdbc.jdbcBlob
                Retrieves the byte position in the BLOB value designated by this Blob object at which pattern begins.
                position(String, long) - Method in class org.hsqldb.jdbc.jdbcClob
                Retrieves the character position at which the specified substring searchstr appears in the SQL CLOB value represented by this Clob object.
                position(Clob, long) - Method in class org.hsqldb.jdbc.jdbcClob
                Retrieves the character position at which the specified Clob object searchstr appears in this Clob object.
                precision - Variable in class org.hsqldb.jdbc.jdbcColumnMetaData
                The column's value's number of decimal digits.
                prepareCall(String) - Method in class org.hsqldb.jdbc.jdbcConnection
                Creates a CallableStatement object for calling database stored procedures.
                prepareCall(String, int, int) - Method in class org.hsqldb.jdbc.jdbcConnection
                Creates a CallableStatement object that will generate ResultSet objects with the given type and concurrency.
                prepareCall(String, int, int, int) - Method in class org.hsqldb.jdbc.jdbcConnection
                Creates a CallableStatement object that will generate ResultSet objects with the given type and concurrency.
                prepareStatement(String) - Method in class org.hsqldb.jdbc.jdbcConnection
                Creates a PreparedStatement object for sending parameterized SQL statements to the database.
                prepareStatement(String, int, int) - Method in class org.hsqldb.jdbc.jdbcConnection
                Creates a PreparedStatement object that will generate ResultSet objects with the given type and concurrency.
                prepareStatement(String, int, int, int) - Method in class org.hsqldb.jdbc.jdbcConnection
                Creates a PreparedStatement object that will generate ResultSet objects with the given type, concurrency, and holdability.
                prepareStatement(String, int) - Method in class org.hsqldb.jdbc.jdbcConnection
                Creates a default PreparedStatement object that has the capability to retrieve auto-generated keys.
                prepareStatement(String, int[]) - Method in class org.hsqldb.jdbc.jdbcConnection
                Creates a default PreparedStatement object capable of returning the auto-generated keys designated by the given array.
                prepareStatement(String, String[]) - Method in class org.hsqldb.jdbc.jdbcConnection
                Creates a default PreparedStatement object capable of returning the auto-generated keys designated by the given array.
                previous() - Method in class org.hsqldb.jdbc.jdbcResultSet
                Moves the cursor to the previous row in this ResultSet object.
                putPropertiesFromFile(String) - Method in class org.hsqldb.Server
                Attempts to put properties from the file with the specified path.
                putPropertiesFromString(String) - Method in class org.hsqldb.Server
                Puts properties from the supplied string argument.

                R

                RCData - class org.hsqldb.util.RCData.
                All the info we need to connect up to a database.
                RCData(File, String) - Constructor for class org.hsqldb.util.RCData
                Creates a RCDataObject by looking up the given key in the given authentication file.
                RCData(String, String, String, String, String, String, String) - Constructor for class org.hsqldb.util.RCData
                Convenience constructor for backward compatibility.
                RCData(String, String, String, String, String, String, String, String) - Constructor for class org.hsqldb.util.RCData
                Creates a new RCData object.
                RCERR_EXITVAL - Static variable in class org.hsqldb.util.SqlTool
                 
                rResult - Variable in class org.hsqldb.jdbc.jdbcResultSet
                The internal representation.
                refreshRow() - Method in class org.hsqldb.jdbc.jdbcResultSet
                Refreshes the current row with its most recent value in the database.
                registerOutParameter(int, int) - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                Registers the OUT parameter in ordinal position parameterIndex to the JDBC type sqlType.
                registerOutParameter(int, int, int) - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                Registers the parameter in ordinal position parameterIndex to be of JDBC type sqlType.
                registerOutParameter(int, int, String) - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                Registers the designated output parameter.
                registerOutParameter(String, int) - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                Registers the OUT parameter named parameterName to the JDBC type sqlType.
                registerOutParameter(String, int, int) - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                Registers the parameter named parameterName to be of JDBC type sqlType.
                registerOutParameter(String, int, String) - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                Registers the designated output parameter.
                relative(int) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Moves the cursor a relative number of rows, either positive or negative.
                releaseSavepoint(Savepoint) - Method in class org.hsqldb.jdbc.jdbcConnection
                Removes the given Savepoint object from the current transaction.
                report() - Method in class org.hsqldb.util.RCData
                Just for testing and debugging.
                reset() - Method in class org.hsqldb.jdbc.jdbcConnection
                Resets this connection so it can be used again.
                rollback() - Method in class org.hsqldb.jdbc.jdbcConnection
                Drops all changes made since the previous commit/rollback and releases any database locks currently held by this Connection.
                rollback(Savepoint) - Method in class org.hsqldb.jdbc.jdbcConnection
                Undoes all changes made after the given Savepoint object was set.
                rowDeleted() - Method in class org.hsqldb.jdbc.jdbcResultSet
                Retrieves whether a row has been deleted.
                rowInserted() - Method in class org.hsqldb.jdbc.jdbcResultSet
                Retrieves whether the current row has had an insertion.
                rowUpdated() - Method in class org.hsqldb.jdbc.jdbcResultSet
                Retrieves whether the current row has been updated.

                S

                SQLERR_EXITVAL - Static variable in class org.hsqldb.util.SqlTool
                 
                SQLTOOLERR_EXITVAL - Static variable in class org.hsqldb.util.SqlTool
                 
                SYNTAXERR_EXITVAL - Static variable in class org.hsqldb.util.SqlTool
                 
                Server - class org.hsqldb.Server.
                The HSQLDB HSQL protocol network database server.
                Server() - Constructor for class org.hsqldb.Server
                Creates a new Server instance handling HSQL protocol connections.
                SqlTool - class org.hsqldb.util.SqlTool.
                Sql Tool.
                SqlTool() - Constructor for class org.hsqldb.util.SqlTool
                 
                SqlTool.SqlToolException - exception org.hsqldb.util.SqlTool.SqlToolException.
                 
                scale - Variable in class org.hsqldb.jdbc.jdbcColumnMetaData
                The column's value's number of digits to right of the decimal point.
                schemaName - Variable in class org.hsqldb.jdbc.jdbcColumnMetaData
                The column's table's schema.
                setAddress(String) - Method in class org.hsqldb.Server
                Sets the InetAddress with which this server's ServerSocket will be constructed.
                setArray(int, Array) - Method in class org.hsqldb.jdbc.jdbcPreparedStatement
                Sets the designated parameter to the given Array object.
                setAsciiStream(String, InputStream, int) - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                Sets the designated parameter to the given input stream, which will have the specified number of bytes.
                setAsciiStream(long) - Method in class org.hsqldb.jdbc.jdbcClob
                Retrieves a stream to be used to write Ascii characters to the CLOB value that this Clob object represents, starting at position pos.
                setAsciiStream(int, InputStream, int) - Method in class org.hsqldb.jdbc.jdbcPreparedStatement
                Sets the designated parameter to the given input stream, which will have the specified number of bytes.
                setAutoCommit(boolean) - Method in class org.hsqldb.jdbc.jdbcConnection
                Sets this connection's auto-commit mode to the given state.
                setBigDecimal(String, BigDecimal) - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                Sets the designated parameter to the given java.math.BigDecimal value.
                setBigDecimal(int, BigDecimal) - Method in class org.hsqldb.jdbc.jdbcPreparedStatement
                Sets the designated parameter to the given java.math.BigDecimal value.
                setBinaryStream(long) - Method in class org.hsqldb.jdbc.jdbcBlob
                Retrieves a stream that can be used to write to the BLOB value that this Blob object represents.
                setBinaryStream(String, InputStream, int) - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                Sets the designated parameter to the given input stream, which will have the specified number of bytes.
                setBinaryStream(int, InputStream, int) - Method in class org.hsqldb.jdbc.jdbcPreparedStatement
                Sets the designated parameter to the given input stream, which will have the specified number of bytes.
                setBlob(int, Blob) - Method in class org.hsqldb.jdbc.jdbcPreparedStatement
                Sets the designated parameter to the given Blob object.
                setBoolean(String, boolean) - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                Sets the designated parameter to the given Java boolean value.
                setBoolean(int, boolean) - Method in class org.hsqldb.jdbc.jdbcPreparedStatement
                Sets the designated parameter to the given Java boolean value.
                setByte(String, byte) - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                Sets the designated parameter to the given Java byte value.
                setByte(int, byte) - Method in class org.hsqldb.jdbc.jdbcPreparedStatement
                Sets the designated parameter to the given Java byte value.
                setBytes(long, byte[]) - Method in class org.hsqldb.jdbc.jdbcBlob
                Writes the given array of bytes to the BLOB value that this Blob object represents, starting at position pos, and returns the number of bytes written.
                setBytes(long, byte[], int, int) - Method in class org.hsqldb.jdbc.jdbcBlob
                Writes all or part of the given byte array to the BLOB value that this Blob object represents and returns the number of bytes written.
                setBytes(String, byte[]) - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                Sets the designated parameter to the given Java array of bytes.
                setBytes(int, byte[]) - Method in class org.hsqldb.jdbc.jdbcPreparedStatement
                Sets the designated parameter to the given Java array of bytes.
                setCatalog(String) - Method in class org.hsqldb.jdbc.jdbcConnection
                Sets a catalog name in order to select a subspace of this Connection's database in which to work.
                setCharacterStream(String, Reader, int) - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                Sets the designated parameter to the given Reader object, which is the given number of characters long.
                setCharacterStream(long) - Method in class org.hsqldb.jdbc.jdbcClob
                Retrieves a stream to be used to write a stream of Unicode characters to the CLOB value that this Clob object represents, at position pos.
                setCharacterStream(int, Reader, int) - Method in class org.hsqldb.jdbc.jdbcPreparedStatement
                Sets the designated parameter to the given Reader object, which is the given number of characters long.
                setClob(int, Clob) - Method in class org.hsqldb.jdbc.jdbcPreparedStatement
                Sets the designated parameter to the given Clob object.
                setCursorName(String) - Method in class org.hsqldb.jdbc.jdbcStatement
                Sets the SQL cursor name to the given String, which will be used by subsequent Statement object execute methods.
                setDatabase(String) - Method in class org.hsqldb.jdbc.jdbcDataSource
                Assigns the value of this object's jdbc database connection url attribute.
                setDatabaseName(int, String) - Method in class org.hsqldb.Server
                Sets the external name (url alias) of the i'th hosted database.
                setDatabasePath(int, String) - Method in class org.hsqldb.Server
                Sets the path of the hosted database.
                setDate(String, Date) - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                (JDBC4 clarification:) Sets the designated parameter to the given java.sql.Date value using the default time zone of the virtual machine that is running the application.
                setDate(String, Date, Calendar) - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                Sets the designated parameter to the given java.sql.Date value, using the given Calendar object.
                setDate(int, Date) - Method in class org.hsqldb.jdbc.jdbcPreparedStatement
                Sets the designated parameter to the given java.sql.Date value.
                setDate(int, Date, Calendar) - Method in class org.hsqldb.jdbc.jdbcPreparedStatement
                Sets the designated parameter to the given java.sql.Date value, using the given Calendar object.
                setDefaultJdbcDriver(String) - Method in class org.hsqldb.util.RCData
                 
                setDefaultWebPage(String) - Method in class org.hsqldb.Server
                Sets the name of the web page served when no page is specified.
                setDouble(String, double) - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                Sets the designated parameter to the given Java double value.
                setDouble(int, double) - Method in class org.hsqldb.jdbc.jdbcPreparedStatement
                Sets the designated parameter to the given Java double value.
                setErrWriter(PrintWriter) - Method in class org.hsqldb.Server
                Sets the PrintWriter to which server errors are logged.
                setEscapeProcessing(boolean) - Method in class org.hsqldb.jdbc.jdbcPreparedStatement
                Sets escape processing on or off.
                setEscapeProcessing(boolean) - Method in class org.hsqldb.jdbc.jdbcStatement
                Sets escape processing on or off.
                setFetchDirection(int) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Gives a hint as to the direction in which the rows in this ResultSet object will be processed.
                setFetchDirection(int) - Method in class org.hsqldb.jdbc.jdbcStatement
                Gives the driver a hint as to the direction in which rows will be processed in ResultSet objects created using this Statement object.
                setFetchSize(int) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Gives the JDBC driver a hint as to the number of rows that should be fetched from the database when more rows are needed for this ResultSet object.
                setFetchSize(int) - Method in class org.hsqldb.jdbc.jdbcStatement
                Gives the JDBC driver a hint as to the number of rows that should be fetched from the database when more rows are needed.
                setFloat(String, float) - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                Sets the designated parameter to the given Java float value.
                setFloat(int, float) - Method in class org.hsqldb.jdbc.jdbcPreparedStatement
                Sets the designated parameter to the given Java float value.
                setHoldability(int) - Method in class org.hsqldb.jdbc.jdbcConnection
                Changes the holdability of ResultSet objects created using this Connection object to the given holdability.
                setInt(String, int) - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                Sets the designated parameter to the given Java int value.
                setInt(int, int) - Method in class org.hsqldb.jdbc.jdbcPreparedStatement
                Sets the designated parameter to the given Java int value.
                setLogWriter(PrintWriter) - Method in class org.hsqldb.Server
                Sets the PrintWriter to which server messages are logged.
                setLogWriter(PrintWriter) - Method in class org.hsqldb.jdbc.jdbcDataSource
                Sets the log writer for this DataSource object to the given java.io.PrintWriter object.
                setLoginTimeout(int) - Method in class org.hsqldb.jdbc.jdbcDataSource
                Sets the maximum time in seconds that this data source will wait while attempting to connect to a database.
                setLong(String, long) - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                Sets the designated parameter to the given Java long value.
                setLong(int, long) - Method in class org.hsqldb.jdbc.jdbcPreparedStatement
                Sets the designated parameter to the given Java long value.
                setMaxFieldSize(int) - Method in class org.hsqldb.jdbc.jdbcStatement
                Sets the limit for the maximum number of bytes in a ResultSet column storing character or binary values to the given number of bytes.
                setMaxRows(int) - Method in class org.hsqldb.jdbc.jdbcStatement
                Sets the limit for the maximum number of rows that any ResultSet object can contain to the given number.
                setNoSystemExit(boolean) - Method in class org.hsqldb.Server
                Sets whether this server calls System.exit() when shutdown.
                setNull(String, int) - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                Sets the designated parameter to SQL NULL.
                setNull(String, int, String) - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                Sets the designated parameter to SQL NULL.
                setNull(int, int) - Method in class org.hsqldb.jdbc.jdbcPreparedStatement
                Sets the designated parameter to SQL NULL.
                setNull(int, int, String) - Method in class org.hsqldb.jdbc.jdbcPreparedStatement
                Sets the designated parameter to SQL NULL.
                setObject(String, Object, int, int) - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                Sets the value of the designated parameter with the given object.
                setObject(String, Object, int) - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                Sets the value of the designated parameter with the given object.
                setObject(String, Object) - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                Sets the value of the designated parameter with the given object.
                setObject(int, Object, int, int) - Method in class org.hsqldb.jdbc.jdbcPreparedStatement
                Sets the value of the designated parameter with the given object.
                setObject(int, Object, int) - Method in class org.hsqldb.jdbc.jdbcPreparedStatement
                Sets the value of the designated parameter with the given object.
                setObject(int, Object) - Method in class org.hsqldb.jdbc.jdbcPreparedStatement
                Sets the value of the designated parameter using the given object.
                setPassword(String) - Method in class org.hsqldb.jdbc.jdbcDataSource
                Sets the password to use for connecting to the database
                setPort(int) - Method in class org.hsqldb.Server
                Sets the server listen port.
                setProperties(HsqlProperties) - Method in class org.hsqldb.Server
                Sets server properties using the specified properties object
                setQueryTimeout(int) - Method in class org.hsqldb.jdbc.jdbcStatement
                Sets the number of seconds the driver will wait for a Statement object to execute to the given number of seconds.
                setReadOnly(boolean) - Method in class org.hsqldb.jdbc.jdbcConnection
                Puts this connection in read-only mode as a hint to enable database optimizations.
                setRef(int, Ref) - Method in class org.hsqldb.jdbc.jdbcPreparedStatement
                Sets the designated parameter to the given REF(<structured-type>) value.
                setRestartOnShutdown(boolean) - Method in class org.hsqldb.Server
                Sets whether this server restarts on shutdown.
                setSavepoint() - Method in class org.hsqldb.jdbc.jdbcConnection
                Creates an unnamed savepoint in the current transaction and returns the new Savepoint object that represents it.
                setSavepoint(String) - Method in class org.hsqldb.jdbc.jdbcConnection
                Creates a savepoint with the given name in the current transaction and returns the new Savepoint object that represents it.
                setShort(String, short) - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                Sets the designated parameter to the given Java short value.
                setShort(int, short) - Method in class org.hsqldb.jdbc.jdbcPreparedStatement
                Sets the designated parameter to the given Java short value.
                setSilent(boolean) - Method in class org.hsqldb.Server
                Sets silent mode operation
                setString(String, String) - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                Sets the designated parameter to the given Java String value.
                setString(long, String) - Method in class org.hsqldb.jdbc.jdbcClob
                Writes the given Java String to the CLOB value that this Clob object designates at the position pos.
                setString(long, String, int, int) - Method in class org.hsqldb.jdbc.jdbcClob
                Writes len characters of str, starting at character offset, to the CLOB value that this Clob represents.
                setString(int, String) - Method in class org.hsqldb.jdbc.jdbcPreparedStatement
                Sets the designated parameter to the given Java String value.
                setTime(String, Time) - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                Sets the designated parameter to the given java.sql.Time value.
                setTime(String, Time, Calendar) - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                Sets the designated parameter to the given java.sql.Time value, using the given Calendar object.
                setTime(int, Time) - Method in class org.hsqldb.jdbc.jdbcPreparedStatement
                Sets the designated parameter to the given java.sql.Time value.
                setTime(int, Time, Calendar) - Method in class org.hsqldb.jdbc.jdbcPreparedStatement
                Sets the designated parameter to the given java.sql.Time value, using the given Calendar object.
                setTimestamp(String, Timestamp) - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                Sets the designated parameter to the given java.sql.Timestamp value.
                setTimestamp(String, Timestamp, Calendar) - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                Sets the designated parameter to the given java.sql.Timestamp value, using the given Calendar object.
                setTimestamp(int, Timestamp) - Method in class org.hsqldb.jdbc.jdbcPreparedStatement
                Sets the designated parameter to the given java.sql.Timestamp value.
                setTimestamp(int, Timestamp, Calendar) - Method in class org.hsqldb.jdbc.jdbcPreparedStatement
                Sets the designated parameter to the given java.sql.Timestamp value, using the given Calendar object.
                setTls(boolean) - Method in class org.hsqldb.Server
                Sets whether to use secure sockets
                setTrace(boolean) - Method in class org.hsqldb.Server
                Sets whether trace messages go to System.out or the DriverManger PrintStream/PrintWriter, if any.
                setTransactionIsolation(int) - Method in class org.hsqldb.jdbc.jdbcConnection
                Attempts to change the transaction isolation level for this Connection object to the one given.
                setTypeMap(Map) - Method in class org.hsqldb.jdbc.jdbcConnection
                Installs the given TypeMap object as the type map for this Connection object.
                setURL(String, URL) - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                Sets the designated parameter to the given java.net.URL object.
                setURL(int, URL) - Method in class org.hsqldb.jdbc.jdbcPreparedStatement
                Sets the designated parameter to the given java.net.URL value.
                setUnicodeStream(int, InputStream, int) - Method in class org.hsqldb.jdbc.jdbcPreparedStatement
                Deprecated. Sun does not include a reason, but presumably this is because setCharacterStream is now prefered
                setUser(String) - Method in class org.hsqldb.jdbc.jdbcDataSource
                Sets the userid
                setWebRoot(String) - Method in class org.hsqldb.Server
                Sets the path of the root directory from which web content is served.
                shutdown() - Method in class org.hsqldb.Server
                External method to shut down this server.
                signalCloseAllServerConnections() - Method in class org.hsqldb.Server
                Closes all connections to this Server.
                sqlException(HsqlException) - Static method in class org.hsqldb.jdbc.Util
                 
                sqlWarning(HsqlException) - Static method in class org.hsqldb.jdbc.Util
                 
                start() - Method in class org.hsqldb.Server
                Starts this server synchronously.
                stop() - Method in class org.hsqldb.Server
                Stops this server asynchronously.
                storesLowerCaseIdentifiers() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether this database treats mixed case unquoted SQL identifiers as case insensitive and stores them in lower case.
                storesLowerCaseQuotedIdentifiers() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether this database treats mixed case quoted SQL identifiers as case insensitive and stores them in lower case.
                storesMixedCaseIdentifiers() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether this database treats mixed case unquoted SQL identifiers as case insensitive and stores them in mixed case.
                storesMixedCaseQuotedIdentifiers() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether this database treats mixed case quoted SQL identifiers as case insensitive and stores them in mixed case.
                storesUpperCaseIdentifiers() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether this database treats mixed case unquoted SQL identifiers as case insensitive and stores them in upper case.
                storesUpperCaseQuotedIdentifiers() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether this database treats mixed case quoted SQL identifiers as case insensitive and stores them in upper case.
                supportsANSI92EntryLevelSQL() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether this database supports the ANSI92 entry level SQL grammar.
                supportsANSI92FullSQL() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether this database supports the ANSI92 full SQL grammar supported.
                supportsANSI92IntermediateSQL() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether this database supports the ANSI92 intermediate SQL grammar supported.
                supportsAlterTableWithAddColumn() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether this database supports ALTER TABLE with add column.
                supportsAlterTableWithDropColumn() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether this database supports ALTER TABLE with drop column.
                supportsBatchUpdates() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether this database supports batch updates.
                supportsCatalogsInDataManipulation() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether a catalog name can be used in a data manipulation statement.
                supportsCatalogsInIndexDefinitions() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether a catalog name can be used in an index definition statement.
                supportsCatalogsInPrivilegeDefinitions() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether a catalog name can be used in a privilege definition statement.
                supportsCatalogsInProcedureCalls() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether a catalog name can be used in a procedure call statement.
                supportsCatalogsInTableDefinitions() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether a catalog name can be used in a table definition statement.
                supportsColumnAliasing() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether this database supports column aliasing.
                supportsConvert() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether this database supports the CONVERT function between SQL types.
                supportsConvert(int, int) - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether this database supports the CONVERT for two given SQL types.
                supportsCoreSQLGrammar() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether this database supports the ODBC Core SQL grammar.
                supportsCorrelatedSubqueries() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether this database supports correlated subqueries.
                supportsDataDefinitionAndDataManipulationTransactions() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether this database supports both data definition and data manipulation statements within a transaction.
                supportsDataManipulationTransactionsOnly() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether this database supports only data manipulation statements within a transaction.
                supportsDifferentTableCorrelationNames() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether, when table correlation names are supported, they are restricted to being different from the names of the tables.
                supportsExpressionsInOrderBy() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether this database supports expressions in ORDER BY lists.
                supportsExtendedSQLGrammar() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether this database supports the ODBC Extended SQL grammar.
                supportsFullOuterJoins() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether this database supports full nested outer joins.
                supportsGetGeneratedKeys() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether auto-generated keys can be retrieved after a statement has been executed.
                supportsGroupBy() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether this database supports some form of GROUP BY clause.
                supportsGroupByBeyondSelect() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether this database supports using columns not included in the SELECT statement in a GROUP BY clause provided that all of the columns in the SELECT statement are included in the GROUP BY clause.
                supportsGroupByUnrelated() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether this database supports using a column that is not in the SELECT statement in a GROUP BY clause.
                supportsIntegrityEnhancementFacility() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether this database supports the SQL Integrity Enhancement Facility.
                supportsLikeEscapeClause() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether this database supports specifying a LIKE escape clause.
                supportsLimitedOuterJoins() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether this database provides limited support for outer joins.
                supportsMinimumSQLGrammar() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether this database supports the ODBC Minimum SQL grammar.
                supportsMixedCaseIdentifiers() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether this database treats mixed case unquoted SQL identifiers as case sensitive and as a result stores them in mixed case.
                supportsMixedCaseQuotedIdentifiers() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether this database treats mixed case quoted SQL identifiers as case sensitive and as a result stores them in mixed case.
                supportsMultipleOpenResults() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether it is possible to have multiple ResultSet objects returned from a CallableStatement object simultaneously.
                supportsMultipleResultSets() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether this database supports getting multiple ResultSet objects from a single call to the method execute.
                supportsMultipleTransactions() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether this database allows having multiple transactions open at once (on different connections).
                supportsNamedParameters() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether this database supports named parameters to callable statements.
                supportsNonNullableColumns() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether columns in this database may be defined as non-nullable.
                supportsOpenCursorsAcrossCommit() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether this database supports keeping cursors open across commits.
                supportsOpenCursorsAcrossRollback() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether this database supports keeping cursors open across rollbacks.
                supportsOpenStatementsAcrossCommit() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether this database supports keeping statements open across commits.
                supportsOpenStatementsAcrossRollback() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether this database supports keeping statements open across rollbacks.
                supportsOrderByUnrelated() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether this database supports using a column that is not in the SELECT statement in an ORDER BY clause.
                supportsOuterJoins() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether this database supports some form of outer join.
                supportsPositionedDelete() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether this database supports positioned DELETE statements.
                supportsPositionedUpdate() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether this database supports positioned UPDATE statements.
                supportsResultSetConcurrency(int, int) - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether this database supports the given concurrency type in combination with the given result set type.
                supportsResultSetHoldability(int) - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether this database supports the given result set holdability.
                supportsResultSetType(int) - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether this database supports the given result set type.
                supportsSavepoints() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether this database supports savepoints.
                supportsSchemasInDataManipulation() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether a schema name can be used in a data manipulation statement.
                supportsSchemasInIndexDefinitions() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether a schema name can be used in an index definition statement.
                supportsSchemasInPrivilegeDefinitions() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether a schema name can be used in a privilege definition statement.
                supportsSchemasInProcedureCalls() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether a schema name can be used in a procedure call statement.
                supportsSchemasInTableDefinitions() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether a schema name can be used in a table definition statement.
                supportsSelectForUpdate() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether this database supports SELECT FOR UPDATE statements.
                supportsStatementPooling() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether this database supports statement pooling.
                supportsStoredProcedures() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether this database supports stored procedure calls that use the stored procedure escape syntax.
                supportsSubqueriesInComparisons() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether this database supports subqueries in comparison expressions.
                supportsSubqueriesInExists() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether this database supports subqueries in EXISTS expressions.
                supportsSubqueriesInIns() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                JDBC4 correction: Retrieves whether this database supports subqueries in IN expressions.
                supportsSubqueriesInQuantifieds() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether this database supports subqueries in quantified expressions.
                supportsTableCorrelationNames() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether this database supports table correlation names.
                supportsTransactionIsolationLevel(int) - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether this database supports the given transaction isolation level.
                supportsTransactions() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether this database supports transactions.
                supportsUnion() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether this database supports SQL UNION.
                supportsUnionAll() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether this database supports SQL UNION ALL.

                T

                TYPE_FORWARD_ONLY - Static variable in class org.hsqldb.jdbc.jdbcResultSet
                Copy of java.sql.ResultSet constant, for JDK 1.1 clients.
                TYPE_SCROLL_INSENSITIVE - Static variable in class org.hsqldb.jdbc.jdbcResultSet
                Copy of java.sql.ResultSet constant, for JDK 1.1 clients.
                TYPE_SCROLL_SENSITIVE - Static variable in class org.hsqldb.jdbc.jdbcResultSet
                Copy of java.sql.ResultSet constant, for JDK 1.1 clients.
                Trigger - interface org.hsqldb.Trigger.
                The interface an HSQLDB TRIGGER must implement.
                TriggerSample - class org.hsqldb.sample.TriggerSample.
                Sample code for use of triggers in hsqldb.
                TriggerSample() - Constructor for class org.hsqldb.sample.TriggerSample
                 
                tableName - Variable in class org.hsqldb.jdbc.jdbcColumnMetaData
                The column's table's name.
                toString() - Method in class org.hsqldb.jdbc.jdbcColumnMetaData
                Retrieves a String representation of this object.
                toString() - Method in class org.hsqldb.jdbc.jdbcParameterMetaData
                Retrieves a String repsentation of this object.
                toString() - Method in class org.hsqldb.jdbc.jdbcPreparedStatement
                Retrieves a String representation of this object.
                toString() - Method in class org.hsqldb.jdbc.jdbcResultSetMetaData
                 
                toString() - Method in class org.hsqldb.jdbc.jdbcSavepoint
                 
                truncate(long) - Method in class org.hsqldb.jdbc.jdbcBlob
                Truncates the BLOB value that this Blob object represents to be len bytes in length.
                truncate(long) - Method in class org.hsqldb.jdbc.jdbcClob
                Truncates the CLOB value that this Clob designates to have a length of len characters.

                U

                UPDATE_AFTER - Static variable in interface org.hsqldb.Trigger
                 
                UPDATE_AFTER_ROW - Static variable in interface org.hsqldb.Trigger
                 
                UPDATE_BEFORE - Static variable in interface org.hsqldb.Trigger
                 
                UPDATE_BEFORE_ROW - Static variable in interface org.hsqldb.Trigger
                 
                Util - class org.hsqldb.jdbc.Util.
                Provides driver constants and a gateway from internal HsqlExceptions to external SQLExceptions.
                Util() - Constructor for class org.hsqldb.jdbc.Util
                 
                updateArray(int, Array) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Updates the designated column with a java.sql.Array value.
                updateArray(String, Array) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Updates the designated column with a java.sql.Array value.
                updateAsciiStream(int, InputStream, int) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Updates the designated column with an ascii stream value.
                updateAsciiStream(String, InputStream, int) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Updates the designated column with an ascii stream value.
                updateBigDecimal(int, BigDecimal) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Updates the designated column with a java.math.BigDecimal value.
                updateBigDecimal(String, BigDecimal) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Updates the designated column with a java.sql.BigDecimal value.
                updateBinaryStream(int, InputStream, int) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Updates the designated column with a binary stream value.
                updateBinaryStream(String, InputStream, int) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Updates the designated column with a binary stream value.
                updateBlob(int, Blob) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Updates the designated column with a java.sql.Blob value.
                updateBlob(String, Blob) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Updates the designated column with a java.sql.Blob value.
                updateBoolean(int, boolean) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Updates the designated column with a boolean value.
                updateBoolean(String, boolean) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Updates the designated column with a boolean value.
                updateByte(int, byte) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Updates the designated column with a byte value.
                updateByte(String, byte) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Updates the designated column with a byte value.
                updateBytes(int, byte[]) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Updates the designated column with a byte array value.
                updateBytes(String, byte[]) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Updates the designated column with a byte array value.
                updateCharacterStream(int, Reader, int) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Updates the designated column with a character stream value.
                updateCharacterStream(String, Reader, int) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Updates the designated column with a character stream value.
                updateClob(int, Clob) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Updates the designated column with a java.sql.Clob value.
                updateClob(String, Clob) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Updates the designated column with a java.sql.Clob value.
                updateDate(int, Date) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Updates the designated column with a java.sql.Date value.
                updateDate(String, Date) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Updates the designated column with a java.sql.Date value.
                updateDouble(int, double) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Updates the designated column with a double value.
                updateDouble(String, double) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Updates the designated column with a double value.
                updateFloat(int, float) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Updates the designated column with a float value.
                updateFloat(String, float) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Updates the designated column with a float value.
                updateInt(int, int) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Updates the designated column with an int value.
                updateInt(String, int) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Updates the designated column with an int value.
                updateLong(int, long) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Updates the designated column with a long value.
                updateLong(String, long) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Updates the designated column with a long value.
                updateNull(int) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Gives a nullable column a null value.
                updateNull(String) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Updates the designated column with a null value.
                updateObject(int, Object, int) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Updates the designated column with an Object value.
                updateObject(int, Object) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Updates the designated column with an Object value.
                updateObject(String, Object, int) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Updates the designated column with an Object value.
                updateObject(String, Object) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Updates the designated column with an Object value.
                updateRef(int, Ref) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Updates the designated column with a java.sql.Ref value.
                updateRef(String, Ref) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Updates the designated column with a java.sql.Ref value.
                updateRow() - Method in class org.hsqldb.jdbc.jdbcResultSet
                Updates the underlying database with the new contents of the current row of this ResultSet object.
                updateShort(int, short) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Updates the designated column with a short value.
                updateShort(String, short) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Updates the designated column with a short value.
                updateString(int, String) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Updates the designated column with a String value.
                updateString(String, String) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Updates the designated column with a String value.
                updateTime(int, Time) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Updates the designated column with a java.sql.Time value.
                updateTime(String, Time) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Updates the designated column with a java.sql.Time value.
                updateTimestamp(int, Timestamp) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Updates the designated column with a java.sql.Timestamp value.
                updateTimestamp(String, Timestamp) - Method in class org.hsqldb.jdbc.jdbcResultSet
                Updates the designated column with a java.sql.Timestamp value.
                updatesAreDetected(int) - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether or not a visible row update can be detected by calling the method ResultSet.rowUpdated.
                usesLocalFilePerTable() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether this database uses a file for each table.
                usesLocalFiles() - Method in class org.hsqldb.jdbc.jdbcDatabaseMetaData
                Retrieves whether this database stores tables in a local file.

                W

                WebServer - class org.hsqldb.WebServer.
                The HSQLDB HTTP protocol network database server.
                WebServer() - Constructor for class org.hsqldb.WebServer
                 
                wasNull() - Method in class org.hsqldb.jdbc.jdbcCallableStatement
                Retrieves whether the last OUT parameter read had the value of SQL NULL.
                wasNull() - Method in class org.hsqldb.jdbc.jdbcResultSet
                Reports whether the last column read had a value of SQL NULL.

                A B C D E F G H I J L M N O P R S T U W

                Copyright 2001 - 2005 HSQL Development Group. All Rights Reserved. hsqldb-1.8.0.10.orig/doc/src/serialized-form.html0000644000175000017500000001652711020614570020144 0ustar renerene Serialized Form (HSQLDB 1.8.0.10 API)

                Serialized Form


                Package org.hsqldb.jdbc

                Class org.hsqldb.jdbc.jdbcDataSource extends java.lang.Object implements Serializable

                Serialized Fields

                loginTimeout

                int loginTimeout
                Login timeout


                password

                java.lang.String password
                Default password to use for connections


                user

                java.lang.String user
                Default user to use for connections


                database

                java.lang.String database
                Database location


                Class org.hsqldb.util.SqlTool.SqlToolException extends java.lang.Exception implements Serializable

                serialVersionUID: 1424909871915188519l

                Serialized Fields

                exitValue

                int exitValue



                Copyright 2001 - 2005 HSQL Development Group. All Rights Reserved. hsqldb-1.8.0.10.orig/doc/src/hsqldbstylesheet.css0000644000175000017500000000636610047526637020301 0ustar renerene/* Javadoc style sheet */ /* Define colors, fonts and other style attributes here to override the defaults */ /* Page background color, width % */ body { background-color: #FFFFFF; padding-right: 1em; } /* Table colors */ .TableHeadingColor { background: #CCCCFF } /* Dark mauve */ .TableSubHeadingColor { background: #EEEEFF } /* Light mauve */ .TableRowColor { background: #FFFFFF } /* White */ /* Font used in left-hand frame lists */ .FrameTitleFont { font-size: 10pts; font-family: Helvetica, Arial, san-serif } .FrameHeadingFont { font-size: 10pts; font-family: Helvetica, Arial, san-serif } .FrameItemFont { font-size: 10pts; font-family: Helvetica, Arial, san-serif } /* Example of smaller, sans-serif font in frames */ /* .FrameItemFont { font-size: 10pt; font-family: Helvetica, Arial, sans-serif } */ /* Navigation bar fonts and colors */ .NavBarCell1 { background-color: #EEEEFF;}/* Light mauve */ .NavBarCell1Rev { background-color: #00008B;}/* Dark Blue */ .NavBarFont1 { font-family: Arial, Helvetica, sans-serif; color: #000000;} .NavBarFont1Rev { font-family: Arial, Helvetica, sans-serif; color: #FFFFFF;} .NavBarCell2 { font-family: Arial, Helvetica, sans-serif; background-color: #FFFFFF;} .NavBarCell3 { font-family: Arial, Helvetica, sans-serif; background-color: #FFFFFF;} .GenericDocumentation { color: #000000; } DIV.ReleaseSpecificDocumentation { color: #006A00; background-color: #EEEEFF; border: 2px ridge white; padding-top: 5px; padding-right: 10px; padding-bottom: 5px; padding-left: 10px; text-align: justify; } DIV.ReleaseSpecificDocumentation h3 { margin-top: 0px; margin-left: 0px; margin-right: 0px; padding-top: 14px; padding-right: 0px; padding-bottom: 15px; padding-left: 50px; border-top: 1px dashed rgb(120,172,255); border-bottom: 1px dashed rgb(120,172,255); background: url(hsqldb.gif) #E6E6FF no-repeat left center; } PRE.JavaCodeExample { color: #000000; background-color: #EEEEEE; border: 1px ridge white; padding-top: 1em; padding-right: 1em; padding-bottom: 0em; padding-left: 1em; } .JavaStringLiteral { color: #99006B; } .JavaNumericLiteral { color: #780000; } .JavaKeyWord { color: #000099; font-weight: bold; } PRE.SqlCodeExample { /*color: #550022;*/ color: #601030; background-color: #EEEEEE; border: 1px ridge white; font-weight: bold; padding-top: 1em; padding-right: 1em; padding-bottom: 0em; padding-left: 1em; line-height: 150%; } PRE.GeneralExample { color: #000000; background-color: #EEEEEE; border: 1px ridge white; padding-top: 1em; padding-right: 1em; padding-bottom: 0em; padding-left: 1em; } hsqldb-1.8.0.10.orig/doc/src/index.html0000644000175000017500000000161311020614566016152 0ustar renerene HSQLDB 1.8.0.10 API <H2> Frame Alert</H2> <P> This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. <BR> Link to<A HREF="overview-summary.html">Non-frame version.</A> hsqldb-1.8.0.10.orig/doc/src/overview-tree.html0000644000175000017500000002274411020614565017655 0ustar renerene Class Hierarchy (HSQLDB 1.8.0.10 API)

                Hierarchy For All Packages

                Package Hierarchies:
                org.hsqldb, org.hsqldb.jdbc, org.hsqldb.sample, org.hsqldb.util

                Class Hierarchy

                Interface Hierarchy



                Copyright 2001 - 2005 HSQL Development Group. All Rights Reserved. hsqldb-1.8.0.10.orig/doc/src/resources/0000755000175000017500000000000010253114045016160 5ustar renerenehsqldb-1.8.0.10.orig/doc/src/resources/inherit.gif0000644000175000017500000000007110253114045020307 0ustar renereneGIF89a, DrjԐ;߀Q@N;hsqldb-1.8.0.10.orig/doc/src/allclasses-noframe.html0000644000175000017500000000565011020614566020623 0ustar renerene All Classes (HSQLDB 1.8.0.10 API) All Classes
                jdbcBlob
                jdbcCallableStatement
                jdbcClob
                jdbcColumnMetaData
                jdbcConnection
                jdbcDataSource
                jdbcDataSourceFactory
                jdbcDatabaseMetaData
                jdbcDriver
                jdbcParameterMetaData
                jdbcPreparedStatement
                jdbcResultSet
                jdbcResultSetMetaData
                jdbcSavepoint
                jdbcStatement
                RCData
                Server
                SqlTool
                SqlTool.SqlToolException
                Trigger
                TriggerSample
                Util
                WebServer
                hsqldb-1.8.0.10.orig/doc/src/packages.html0000644000175000017500000000155311020614566016624 0ustar renerene (HSQLDB 1.8.0.10 API)


                The front page has been relocated.Please see:
                          Frame version
                          Non-frame version.
                hsqldb-1.8.0.10.orig/doc/src/package-list0000644000175000017500000000010111020614570016426 0ustar renereneorg.hsqldb org.hsqldb.jdbc org.hsqldb.sample org.hsqldb.util hsqldb-1.8.0.10.orig/doc/changelist_1_7_2.txt0000644000175000017500000006413110163154521017140 0ustar renereneChronological Change List This file is the accumulated list of changes in the course of development of hsqldb 1.7.2 in reverse chronological order. A list of changes by subject area is in changelog_1_7_2.txt. Fred Toussi (fredt@users.sourceforge.net) 2004.12.24 UPDATED RELEASE 1.7.2.11 Fixed NPE error when functions in subqueries. Added support for STDDEV_POP, STDDEV_SAMP, VAR_POP, VAR_SAMP, EVERY and SOME set functions. Fixed potential issues with logging DELETE statements for tables with multi-key primary keys. 2004.12.05 UPDATED RELEASE 1.7.2.10 Fixed minor type conversion bugs. Fixed JDK 1.1 compile issue Fixed minor bug relating to server thread startup 2004.11.25 UPDATED RELEASE 1.7.2.8 Fixed bug LIMIT and TOP with UNION Fixed bug running Database Manager as applet Enhancement to allow a table with a label used in DELETE and UPDATE Enhancement to reduce memory use when restoring long log with too many connections Enhancement to persist values set by SET LOGSIZE Minor internal enhancements and refactoring 2004.10.28 UPDATED RELEASE 1.7.2.7 Fixed new bug with TEXT TABLES without primary key 2004.10.25 UPDATED RELEASE 1.7.2.6 Fixed new bug with DATETIME literal default values 2004.10.22 UPDATED RELEASE 1.7.2.5 Fixed bugs OUTER support. Fixed bug that resulted in slowdown when JDBC metadata calls are called many times. Fixed bug related to Statement.setMaxRows(int). The maximum row count will no longer apply to result sets returned and used internally. Fixed bug to allow ResultSetMetaData methods to be used inside stored procedures. Fixed bugs related to some OUTER queries. Performance improvements to some operations on CACHED tables. Improved compatibility with older database files, allowing old style DEFAULT clauses to compile. Improvements to startup after a machine crash. The .log file is now read only until the first malformed line. Corrections to build scripts and #idfef blocks to allow jars to be compiled to run under JDK 1.1. 2004.08.26 UPDATED RELEASE 1.7.2.4 Fixed bug in data file enlargement. Fixed bug where temp tables were removed after another connection closed. 2004.08.12 UPDATED RELEASE 1.7.2.3 Fixed bug preventing the use of hsqldb.files_read_only property Minor enhancements allowing use of SELECT ALL and COUNT(ALL colname) etc. Corrections to the documentation 2004.07.25 UPDATED RELEASE 1.7.2.2 Fixed bug that prevented ALTER TABLE ADD FOREIGH KEY, ADD UNIQUE and ADD CHECK (unnamed constraints) from executing. Fixed excessive logging of SEQUENCE values. 2004.07.20 UPDATED RELEASE 1.7.2.1 Fixed bug where a foreign key with ON DELETE CASCADE action on a table masked other foreign keys on the table and resulted in completion of the cascading action when referential integrity was violated. 2004.07.15 RC_6e INITIAL RELEASE 1.7.2 Enhancements to ALTER TABLE ADD COLUMN and DROP COLUMN. Fixed bug with closed HTTP connections. Fixed bug with large .data files switching to random access from nio. 2004.06.28 RC_6d The implemntation of UNION, EXCEPT and INTERSECT set operations has been rewritten to comply with SQL standards. When multiple set operations are present in a query, they are now evaluated from left to right, with INTERSECT taking precedence over the rest. It is now possible to use parentheses around multiple (or single) select statements with set operations to change the order of evalation.E.g.: ((SELECT * FROM A EXCEPT SELECT * FROM B) INTERSECT SELECT * FROM D UNION SELECT * FROM E) Timestamp, date and time values in TEXT TABLE source files are treated more leniently, allowing spaces before values. 2004.06.19 RC_6c Fixed bug in default value definition. Fixed bug in getURL() for internal connections Fixed bug in evaluation of BOOLEAN values Fixed bug in Statement.executeBatch() Improvements in CHECKPIONT DEFRAG Improvements in nio .data file handling Added a procedural language to SqlTool. Made error handling and control more robust. Implemented several new features. Updated documentation 2004.05.31 RC_6b Fixed CHECKPOINT DEFRAG bug with empty tables Fixed ORDER BY with HAVING Fixed SELECT .. INTO table issue with outer joins etc. Fixed issue with NOT used in WHERE clause of OUTER select Fixed issue with DAYOFWEEK() etc. library calls with NULL parameter Fixes for TRIGGER thread termination Fixes for minor bugs Updated documentation 2004.05.18 RC_6a Fix for two bugs, some doc updates, etc. 2004.05.17 RC_6 Final Release Candidate This is the final release candidate for 1.7.2. More tests are required to verify the improvements. Please perform tests and report any issues. Testers are needed for build scripts with different JVM's using both ANT and batch builds. Documentation has been updated and is available in HTML and PDF formats. More bug fixes to engine and JDBC classes. Bug fixes and minor enhancements to Database Manager and Transfer tools. Database Manager Swing table view is sortable. Fixed bug with different values in one row with multiple CURRENT_TIMESTAMP or NOW() calls. Introduction of CURRENT_USER, can be used as column default value as well. CURRENT_TIMESTAMP, NOW, TODAY etc. should not be quoted when used as column default values. Improvements to PreparedStatement set stream methods. Improvements to Clob and Blob implementations. Much of the UNIX init script redesigned. Now supports TLS and WebServer. 2004.05.01 Small improvements in different areas CURRENT_TIME, CURRENT_DATE, CURRENT_TIMESTAMP and their aliases can now be used in views and prepared statements. Some bug fixes and updates to utility programs. Improvements to cascading update operations, allowing full capability with FK's referencing the same table. Improved parametric INSERT .... SELECT. CHECKPOINT DEFRAG now works with nio mode .data files. DATEDIFF function has been added. 2004.04.01 RC_5 Some bug fixes. 2004.03.22 RC_4 Included hsqldb.jar has been compiled with JDK 1.4 and will not work with JRE 1.3.x or earlier. Please recompile with JDK 1.3 for use with this or earlier JDK's. Improvements to ALTER TABLE when VIEWS reference the table Enhancements to Server Bug fixes for: BIGINT values in IN predicate value lists. Creation of self ref foreign keys. Corrupted log file with SET AUTOCOMMIT SET LOGSIZE Bug fixes for LIKE with default local and ALTER TABLE with CHECK 2004.03.13 RC_3 Various bug fixes. 2004.02.22 RC_2 Release Candidate 2 for HSQLDB version 1.7.2 includes almost all of the features of the release version. It is possible that by the time of the release, a small number of minor features will be added or changed. One area that is likely to change is the SQL_STATE values for errors returned by JDBC. Changes since RC_1 Constraint names must be unique within each database. Refactoring groups of classes into new packages. This change is internal and does not affect the use of hsqldb. New SqlTool and SqlFile utilities by Blaine Simpson. See hsqlSqlTool.html for details. Support for new system tables for constraints, views and sequences. Support for increments in GENERATED BY DEFAULT AS IDENTITY(START WITH , INCREMENT BY >) Support for table aliases in UPDATE BOOLEAN is now the default SQL type for boolean values. BIT is treated as an alias for BOOLEAN in table definition and queries. Library function CURTIME() changed to return CURRENT_TIME instead of CURRENT_TIMESTAMP Added logging for sequence generation Bug Fixes since RC_1 Values for BOOLEAN expressions containing AND, OR, LIKE and used in columns returned by queries are now correct. Fixed issue with single value selects in UPDATE and SELECT statements. Fixed issue with Turkish Locale. Fixed issue with compiled statements. Added mutable object cloning and serialization on PrepredStatement parameter entry points for in-process connections. Isolates the stored objects (DATETIME, BINARY and OTHER) from subsequent changes made to the copy used for setting the parameter. To do same for Result. More extensive error message when internal asserts fail. Various other bug fixes. 2003.12.28 RC_1 Release Candidate 1 for HSQLDB version 1.7.2 includes most of the features of the release version. It is likely that by the time of the release, a small number of features will be added to the engine. One area that is likely to change is the SQL_STATE values for errors returned by JDBC. Changes since ALPHA_T Added referential integrity checks when a foreign key is added to a populated table. support for SQL style SEQUENCE objects. support for DROP INDEX IF EXISTS Changes to SET PROPERTY command with better error checking. Added support for LIMIT ? ? and TOP ? (prepared statement) Fixed reported bugs including order by with UNION. Added support for aggregate functions in CASEWHEN, IFNULL, etc. Added support for aggregate functions as arguments to non-aggregate functions. Views and subqueries can appear in a view definition. 2003.10.26 HSQLDB 1.7.2 ALPHA_T Improved index use for multiple key joins. 2003.10.24 Fixed some reported and unreported bugs. View definitions can now have a column name list: CREATE VIEW [(, ...)] AS SELECT .... 2003.10.21 HSQLDB 1.7.2 ALPHA_S Fixed name resolution issues in some IN (SELECT ...) and EXISTS (SELECT ...) queries. Optimisation of these queries when not correlated. Speed optimisation of joins with views and subqueries. Fixed LIKE parameter bug. Support for CHECK constraints that apply to the modified/inserted row only. This can be added via ALTER TABLE ADD CHECK() or in table definition. Fixed the DATETIME normalisation issues. Fixed ResultSet.isAfterLast() issue. Reverted column name case in ResultSet methods to JDBC compliance. 2003.10.12 HSQLDB 1.7.2 ALPHA_R This release features full support for prepared statements with parameters, including those in IN lists. Query processing has been extensively enhanced in this release and better standards compliance has been achieved. Major implications of the recent changes are as follows: - Columns in correlated subqueries are resolved independently first. If there is an unresolved column, then the surrounding context is used to resolve it. This is opposite the resolution order previously enforced in the engine. - Some ambiguities and errors in ORDER BY clauses are now caught. - UNION and other set queries accept only one ORDER BY clause at the end. In this clause, only column indexes are allowed as sort specification e.g.: SELECT .. UNION SELECT .. ORDER BY 1 DESC, 5, 3 - Outer join conditions can now include most comparison operators, as well as OR logical operators , e.g LEFT OUTER JOIN atable ON a=b AND c>d OR a=2 ... Illegal forward table references are no longer allowed in join conditions. There are many other small improvements and fixes, including: - IN value lists can now contain column values or expressions. See TestSelfQueries.txt for an example. - LIKE has been optimised when possible. - COALESCE() can now take several arguments 2003.09.24 HSQLDB 1.7.2 ALPHA_Q The problem with PreparedStatement parameters in IN lists still remains to be fixed. This release includes some bug fixes and improvements. In the /doc directory there is a new how-to document on using HSQLDB in OpenOffice.org. HSQLDB 1.7.2 ALPHA_P Apart from the bugs and limitations of PreparedStatement, all the bugs reported since the release of ALPHA_O have been fixed in this alpha version. Some minor enhancements have been made to increase compatibility with OpenOffice.org applications. In addition, it is now possible to execute triggers in the main execution thread. This allows uses for triggers that were not possible before. HSQLDB 1.7.2 ALPHA_O Due to the large number of small bug fixes since the release of ALPHA_N, a new ALPHA_0 version is now released. Please see the bug tracker for a list of some of the bugs that have been fixed. This version does not yet support prepared statements with IN(?,?) parameters. Please report any bugs or suggestions through the normal channels. Bugs with test cases should be posted to the bug tracker on the HSQLDB Sourceforge site. A new JDBC connection property "toupper_column_name" can be used when the application program submits lowercase / mixedcase column names to Result.getXXX(String column) methods when the names are in fact UPPERCASE as they were not quoted when the table was created. The default value is false. See related documentation in hsqldbAdvancedGuide.html on how to set this property value. (this property was subsequently dropped) The rest of the information for ALPHA_N below applies to this version too. HSQLDB 1.7.2 ALPHA_N ALPHA_N is the ultimate ALPHA version for the 1.7.2 release cycle. Known deficiencies and reported bugs will be addressed for the first Release Candidate to be issued in the next few weeks. Please report any bugs or suggestions through the normal channels. Bugs with test cases should be posted to the bug tracker on the HSQLDB Sourceforge site. The included documentation has been updated. The JavaDoc for the jdbcXXX classes covers the JDBC interface. You can make the JavaDoc via the build scripts. The jar has been compiled with JDK 1.4. To run under earlier JDK's recompile using JDK 1.3.x. Changes since 1.7.2 are listed here in the reverse chronological order. 2003.09.02 ADDED JDBC SUPPORT FOR SAVPOINTS 2003.08.22 FURTHER SPEED IMPROVEMENTS IN ALL LOGGED MODES INSERT and UPDATE ops are faster by 5-20% in MEMORY tables, less in CACHED tables. ADDED SUPPORT FOR A RANGE OF SQL STYLE FUNCTIONS: CASE .. WHEN ... THEN .. ELSE ... END CASE WHEN .. THEN .. ELSE ... END NULLIF(.. , ..) SUBSTRING(.. FROM .. FOR ..) POSITION(.. IN ..) TRIM( {LEADING | TRAILING .. } FROM ..) EXTRACT({DAY | TIME |..} FROM ..) COALESCE(.. , ..) 2003.08.17 FURTHER IMPROVEMENTS IN PREPARED STATEMENT EXECUTION SPEED SUPPORT FOR JDBC BATCH EXECUTION SUPPORT FOR MULTIPLE ROWS WITH NULL FIELDS UNDER UNIQUE CONSTRAINTS IMPROVEMENTS TO TestSelf IMPROVEMENTS TO ON UPDATE CASCADE / SET DEFAULT / SET NULL 2003.08.11 REWRITE OF LEFT OUTER JOIN SUPPORT - Complete rewrite of join processing abolishes the requirement for an index on any joined columns. All expressions with AND are supported in the join condition (JOIN atable ON ....) IMPROVEMENTS TO ON DELETE CASCADE / SET DEFAULT / SET NULL - Self referencing foreign keys and multiple foreign keys now support ON DELETE CASCADE. 2003.08.02 NIO ACCESS FOR .data FILES New nio access layer for .data files speeds up most CACHED TABLE related operations very significantly. 90% speedups in TestCacheSize tests have been observed. The program must be compiled with JDK 1.4 and run in a 1.4 JRE to use the new access mode. IMPROVEMENTS TO UPDATE AND INSERT Certain types of UPDATES and INSERTS that previously failed due to blanket application of UNIQUE constraints now work. Examples include UPDATE ... SET col = col + 1 where col is an identity column or INSERT a self referencing row under FOREIGN key constraints. 2003.07.30 IMPORTANT FIX IN SELECT QUERY PROCESSING Problems with OUTER and INNER joins returning incorrect results have been reported over the last couple of years. A new fix is intended to ensure correct results in all cases. - When two tables are joined, rows resulting from joining null values in the joined columns are no longer returned. - Use of OUTER requires the existence of an index on a joined OUTER column - There are still limitations on the conditions used in OUTER joins. AGGREGATES - enhancements to aggregate functions: aggregates of different numeric types are now supported SUM returns a BIGINT for TINYINT, SMALLINT and INTEGER columns. It returns a DECIMAL for BIGINT columns (scale 0) and DECIMAL columns scale equals to that of the column). AVG returns the same type as the column or the expression in its argument. - aggregates with GROUP BY do not return any rows if table is empty OLDER ENHANCEMENTS NOT PREVIOUSLY REPORTED - IDENTITY columns can now be of BIGINT type: CREATE TABLE ( BIGINT IDENTITY, ...) - With contributed patch, TEXT TABLES encoding of the source file can now be specified. UTF-8 and other encodings can be used. - Two new options for databases: files_readonly and files_in_jar were added based on submitted patches. FILE READ-ONLY If the property files_readonly=true is set in the database .properties file, no attempt is made to write the changes to data to file. Default, memory tables can be read/write but TEXT and CACHED tables are treated as read-only. FILES IN JAR This option allows database files to be distributed in the application jar. We have changed the original contribution so that a special URL is used for this mode in the form of: jdbc:hsqldb:res: The URL type 'res' determines that the path that follows is a path into the JAR. The database can be readonly or files_readonly, depending on the value set in .properties file. 2003.07.09 SCRIPT FORMAT - change to command previously named SET LOGTYPE (discussed below for earlier alphas) new form is: SET SCRIPTFORMAT {TEXT | BINARY | COMPRESSED } The new binary and compressed formats are not compatible with previous ones, so you should change any old 1.7.2 ALPHA_? database to text mode with SET LOGTYPE 0 before opening with the new version. 'OTHER' DATA TYPE - change to handling of OTHER columns. It is no longer required that the classes for objects stored in OTHER columns to be available on the path of an HSQLDB engine running as a server. Classes must be available on the JDBC client's path. OBJECT POOLING - the new Object pool has been incorporated. This reduces memory usage to varying degrees depending on the contents of database tables and speeds up the database in most cases. Currently the size of the pool is hard-coded but it will be user adjustable in the release version. CONNECTION PROPERTY - a new property, ifexists={true|false} can be specified for connections. It has an effect only on connections to in-process databases. The default is false and corresponds to current behaviour. If set true, the connection is opened only if the database files have already been created -- otherwise no new database is created and the connection attempt will fail. Example: jdbc:hsqldb:hsql:mydb;ifexists=true This property is intended to reduce problems resulting from wrong URL's which get translated to unintended new database files. It is recommended to use this property for troubleshooting. 2003.07.04 PREPARED STATEMENTS - support for real PreparedStatements - major speedup. Current limitations include lack of support for parameters in IN() predicates of queries. TRANSACTIONS VIA WEB SERVER - uniform support for transactions via HSQL and HTTP (WebServer and Servlet) protocols MULTIPLE IN-MEMORY AND SERVERS DATABASES - support for multiple memory-only databases within the same JVM - support for simultaneous multiple servers, multiple internal connections and multiple databases within the same JVM NEW CONVENTIONS FOR URL'S AND .properties FILES Each HSQLDB server or webserver can now serve up to 10 different databases. The server.properties and webserver.properties method for defining the databases has changed. The following properties should be used: server.database.0 path_of_the_first_database server.dbname.0 alias_for_the_first_database Up to 10 databases can be defined but they must start from 0 The same applies to command line arguments for Server and WebServer. The urls for connecting to servers should have the alias of the database at the end. For example, to connect to the HSQL protocol server on the localhost use: jdbc:hsqldb:hsql://localhost/alias_for_the_database where alias_for_the_database is the same string as defined in server.properties as server.dbnam.n The default for server.dbname.0 is "" (empty string) so that old URL types continue to work. Multiple memory-only database are supported by the use of: jdbc:hsqldb:mem:alias_for_the_first_database jdbc:hsqldb:mem:alias_for_the_second_database Examples: jdbc:hsqldb:mem:db1 jdbc:hsqldb:mem:mydb The conneciton type, 'file', can be used for file database connections. example below: jdbc:hsqldb:hsql:file:mydb;ifexists=true The URL for connecting to a Servlet HTTP server must have a forward-slash at the end. Servlet serves only one database. jdbc:hsqldb:hsql://localhost:8080/servlet/HsqlServlet/ 2003.03.10 DATABASE METADATA -system table support and java.sql.DatabaseMetadate results have been overhauled by Campbell. STRICT FOREIGN KEYS -strict treatment of foreign key index requirements is now enforced. A foreign key declaration _requires_ a unique constraint or index to exist on the columns of the referenced table. This applies both to old and new databases. Duplicate foreign keys (with exactly the same column sets) are now disallowed. TEXT TABLES -further improvements to TEXT table support. Smaller cache sizes are now the default and the default properties can be specified in the *.properties file. HSQLDB 1.7.2 ALPHA_M 2003.01.23 -fixed reported bugs in SHUTDOWN COMPACT -fixed reported bugs in GRANT statements on system tables -fixed bug that prevented UPDATE in some circumstances some enhancements that appeared in previous versions but not reported: -enhanced handling of DATE objects - comparability and normalisation -support for CLOB methods in ResultSet -fixed bug in afterLast() followed by previous() in ResultSet HSQLDB 1.7.2 ALPHA_L 2003.01.16 various patches and fixes -fixes new issues reported with ALPHA_K -fixes old issues related to uncommitted transactions in abnormal shutdown -fixes old issues with SAVEPOINT names -enhanced TEXT table handling and reporting of errors in CSV (source) files HSQLDB 1.7.2 ALPHA_K 2003.01.10 various patches and fixes -OUTER with multiple column joins is now supported while OR is disallowed in the join expression. It is now possible to specify a range or equality condition on the OUTER columns returned. -submitted patch for exclusion of NULL values from results of range queries has been applied. e.g. WHERE columnvalue < 3 will exclude from the result all rows with NULL in columnvalue. -a number of small enhancements and bug fixes. further enhancements to logging. -The *.script file now contains only the DDL and data that is written at CHECKPOINT or SHUTDOWN. The statements logged while the engine is running are stored in a *.log file. -The format of the *.script file can now be one of TEXT, BINARY or COMPRESSED. The SET LOGTYPE {0|1|3} will reset the format. A checkpoint is performed at this point if the format is different from the existing one. The COMPRESSED format has the side benefit of hiding the DDL and the admin password. -The behaviour of SET WRITE_DELAY has changed with the introduction of the sync() method to force the log to be written out completely to disk at given intervals. SET WRITE_DELAY {TRUE | FALSE} is interpreted as synch every 60 seconds or 1 second. SET WRITE_DELAY where n is an integer is interpreted as synch every n seconds. The current default is 60 seconds which seems to provide the right balance. The performance impact of SET WRITE_DELAY 1 is probably about 15% over that of SET WRITE_DELAY 300. -The recovery from crash has been modified so that any line in the log that is not properly written (and causes an error) ends the redo process. A message is reported to the user, instead of stopping engine operation. HSQLDB 1.7.2 ALPHA_J 2002.12.24 CVS hsqldb-dev module tag: HSQLDB_1_7_2_ALPHA_J -More work on text tables. See hsqlTextTables.html. -Some refactoring of Table.java and Parser.java HSQLDB 1.7.2 ALPHA_I 2002.12.16 CVS hsqldb-dev module tag: HSQLDB_1_7_2_ALPHA_I More work on core classes to consolidate previous changes -correction of reported bug with text tables and primary keys -reducing data file writes esp. with big rows -preventing Cache related error in ON DELETE CASCADE HSQLDB 1.7.2 ALPHA_H 2002.12.11 CVS hsqldb-dev module tag: HSQLDB_1_7_2_ALPHA_H Reduction in JDK / JRE dependencies (see readmebuild.txt) Extensive refactoring of some of the larger classes. More changes to core classes Node, Row, Index, Cache, Log ... Some minor bug fixes and enhancements. Enhancements to text table support, including binary columns. Bug fixes to User.java and UserManager.java. Support for ON UPDATE / DELETE SET NULL / SET DEFAULT SSL support for Server mode operation. 2002.10.30 HSQLDB 1.7.2 ALPHA_G CVS hsqldb-dev module tag: HEAD data: 2002.10.30 New features include: Tony Lai's enhancements to aggratates and support for HAVING. Tony's new UnifiedTable class (provisional name) which he kindly wrote at my request and provides sorted arrays with minimal storage requirements. My refactoring work on DatabaseRowInput/Output subclasses and Cache.java. This is still ongoing and has several features aimed at a more robust database engine, including: - reduction in object creation; - possibility of resizing the cache while the engine is running; - possibility of exporting and backing up the DB files while the engine is running. I have implemented the new feature, CHECKPOINT DEFRAG to defragment a *.data file without shutting down the engine, in two different versions, taking advantage of the above improvements. I have implemented binary logging of MEMORY table inserts in the *.script file, resulting in much smaller startup and shutdown times with large memory tables. Use SET LOGTYPE {0|1} to set the log type to text (0) or binary (1). This performs a checkpoint if the type needs changing. Also further performance optimisations resulting in faster CACHED table operations have been made. Sebastian has implemented ON UPDATE CASCADE support for foreign keys.hsqldb-1.8.0.10.orig/doc/databaseinjar.txt0000644000175000017500000000366010036532315016720 0ustar renerene Mask Builder PUI Demonstration of JNLP hsqldb-1.8.0.10.orig/doc/readme-docauthors.txt0000644000175000017500000001143610242427031017533 0ustar renereneHOW TO CREATE AND WORK WITH DOCBOOK DOCUMENTS FOR HSQLDB At some point, this document itself should be converted to DocBook format. Our DocBook strategy is still subject to change. For now... TO CREATE A NEW DOCBOOK BOOK Think up a base filename for your document. It should be nice and short, without funny characters (but hyphens, other than leading hypends, are ok). Example: sqltool. Hereafter, I'll refer to this as your "book name". Create a subdirectory of "docsrc" with name of your book name. I'll refer to this directory (docsrc + book name) as "your book directory". Inside your book directory, create your main DocBook source file with name of your book name + ".xml", e.g. "sqltool.xml". Your DocBook document may reference or include shared files in the main 'docsrc' directory as well as any files which you put into your book directory. You may want to include sample .java files, screen shots, or component DocBook source files. Usually you will just copy these files right into your book directory. For examples of just about everything, see .../docsrc/sqltool/sqltool.xml. Notice that sqltool.xml pulls in a document section from the main docsrc directory. Add your book name to the .cvsignore file in the doc directory. Until all of the CVS artifacts are moved out of the "doc" directory, you will need to edit the clean-doc target in the build.xml file in the build directory so that it will remove the derived files for your book from under the doc directory. HOW TO REFERENCE OR INCLUDE OTHER FILES IN YOUR DOCBOOK SOURCE FILE(s). To link to outside documents (which you supply or not), you'll usually use the DocBook element. To "import" other documents, just use the general external parsed entity mechanism. This is a basic DTD-style XML feature where you use macros like &entityname;. Either find an XML reference or look around our existing DocBook source files for an example to follow. One tricky point is how to include external files verbatim. If you just read in external files as parsed entities, they will be parsed as DocBook source (and therefore they must consist of, at least, legal XML)*. But often you will want to import a real, working file (like a configuration file, sql file, Java source file), and you won't want to hack it up just so you can import it. (For one thing, you shouldn't have to; for another, you may want to provide a link to the file for download, so you wouldn't want people to download a hacked-up version). It would be nice if you could CDATA, then include the entity, but that won't work since the &...; inclusion directive would thereby be escaped. If you don't know what the hell CDATA is, just follow the instructions in the next paragraph. To import a document verbatim, define an external parsed entity for the file ../../docwork/BOOKNAME/cdata/file.name, where BOOKNAME is your book name and file.name is the name of the file to be imported (which resides in the current directory). If you want to know, what will happen is, the Ant build will copy the file-to-be-imported to the directory .../docwork/BOOKNAME/cdata and will sandwich it in a CDATA directive. If you want to provide a link to the document, you just ulink to the document in the current directory, not to the one in the cdata POSTNOTE: The long-term way to do this is with XInclude, or some other generic XML inclusion mechanism. Unfortunately, none of the good methods work with the Java ports of DocBook! ======================================================================= CONVENTIONS Please use elements to mark up notes for yourself or for other developers. All s should be removed before the doc goes public! Please capitalize HSQLDB like "Hsqldb" in titles, and capitalize like "HSQLDB" elsewhere. (In filepaths and package names you code as required for the filepath or package name, of course). ======================================================================= TIPS When closing DocBook and elements, make sure that there is no line break after the text to display and before the closing or tag. Otherwise the resultant display will not look right. Don't capitalize words or phrases to emphasize them (including in section titles or headings). If you want to emphasize something a certain way, then use a DocBook emphasis role, and leave the presentation decisions to the style sheets. It is very easy to set a CSS style to capitalize headings if you want them to appear that way. * Theoretically it would be better and SHOULD be simpler to use unparsed entities for this purpose, but unparsed entities are a messy legacy feature of DTD which is more convoluted than the strategy described here. hsqldb-1.8.0.10.orig/doc/guide/0000755000175000017500000000000011020620762014455 5ustar renerenehsqldb-1.8.0.10.orig/doc/guide/pr01.html0000644000175000017500000001171410665324645016150 0ustar renereneIntroduction

                Introduction

                If you notice any mistakes in this document, please email the author listed at the beginning of the chapter. If you have problems with the procedures themselves, please use the HSQLDB support facilities which are listed at http://hsqldb.org/web/hsqlSupport.html.

                Available formats for this document

                This document is available in several formats.

                You may be reading this document right now at http://hsqldb.org/doc/guide, or in a distribution somewhere else. I hereby call the document distribution from which you are reading this, your current distro.

                http://hsqldb.org/doc/guide hosts the latest production versions of all available formats. If you want a different format of the same version of the document you are reading now, then you should try your current distro. If you want the latest production version, you should try http://hsqldb.org/doc/guide.

                Sometimes, distributions other than http://hsqldb.org/doc/guide do not host all available formats. So, if you can't access the format that you want in your current distro, you have no choice but to use the newest production version at http://hsqldb.org/doc/guide.

                Table 1. Alternate formats of this document

                formatyour distroat http://hsqldb.org/doc/guide
                Chunked HTML index.htmlhttp://hsqldb.org/doc/guide/index.html
                All-in-one HTML guide.htmlhttp://hsqldb.org/doc/guide/guide.html
                PDF guide.pdfhttp://hsqldb.org/doc/guide/guide.pdf

                hsqldb-1.8.0.10.orig/doc/guide/ch01.html0000644000175000017500000007750510665324646016134 0ustar renereneChapter 1. Running and Using Hsqldb

                Chapter 1. Running and Using Hsqldb

                Fred Toussi

                HSQLDB Development Group

                Copyright 2002-2005 Fred Toussi. Permission is granted to distribute this document without any alteration under the terms of the HSQLDB license. Additional permission is granted to the HSQLDB Development Group to distribute this document with or without alterations under the terms of the HSQLDB license.

                $Date: 2007/05/30 18:34:46 $

                Introduction

                The HSQLDB jar package is located in the /lib directory and contains several components and programs. Different commands are used to run each program.

                Components of the Hsqldb jar package

                • HSQLDB RDBMS

                • HSQLDB JDBC Driver

                • Database Manager (Swing and AWT versions)

                • Query Tool (AWT)

                • Sql Tool (command line)

                The HSQLDB RDBMS and JDBC Driver provide the core functionality. The rest are general-purpose database tools that can be used with any database engine that has a JDBC driver.

                Running Tools

                All tools can be run in the standard way for archived Java classes. In the following example the AWT version of the Database Manager, the hsqldb.jar is located in the directory ../lib relative to the current directory.

                    java -cp ../lib/hsqldb.jar org.hsqldb.util.DatabaseManager

                If hsqldb.jar is in the current directory, the command would change to:

                    java -cp hsqldb.jar org.hsqldb.util.DatabaseManager

                Main classes for the Hsqldb tools

                • org.hsqldb.util.DatabaseManager

                • org.hsqldb.util.DatabaseManagerSwing

                • org.hsqldb.util.Transfer

                • org.hsqldb.util.QueryTool

                • org.hsqldb.util.SqlTool

                Some tools, such as the Database Manager or SQL Tool, can use command line arguments or entirely rely on them. You can add the command line argument -? to get a list of available arguments for these tools. Database Manager features a graphical user interface and can be explored interactively.

                Running Hsqldb

                HSQLDB can be run in a number of different ways. In general these are divided into Server Modes and In-Process Mode (also called Standalone Mode). A different sub-program from the jar is used to run HSQLDB in each mode.

                Each HSQLDB database consists of between 2 to 5 files, all named the same but with different extensions, located in the same directory. For example, the database named "test" consists of the following files:

                • test.properties

                • test.script

                • test.log

                • test.data

                • test.backup

                The properties files contains general settings about the database. The script file contains the definition of tables and other database objects, plus the data for non-cached tables. The log file contains recent changes to the database. The data file contains the data for cached tables and the backup file is a zipped backup of the last known consistent state of the data file. All these files are essential and should never be deleted. If the database has no cached tables, the test.data and test.backup files will not be present. In addition to those files, HSQLDB database may link to any formatted text files, such as CSV lists, anywhere on the disk.

                While the "test" database is operational, a test.log file is used to write the changes made to data. This file is removed at a normal SHUTDOWN. Otherwise (with abnormal shutdown) this file is used at the next startup to redo the changes. A test.lck file is also used to record the fact that the database is open. This is deleted at a normal SHUTDOWN. In some circumstances, a test.data.old is created and deleted afterwards.

                Note

                When the engine closes the database at a shutdown, it creates temporary files with the extension .new which it then renames to those listed above.

                Server Modes

                Server modes provide the maximum accessibility. The database engine runs in a JVM and listens for connections from programs on the same computer or other computers on the network. Several different programs can connect to the server and retrieve or update information. Applications programs (clients) connect to the server using the HSQLDB JDBC driver. In most server modes, the server can serve up to 10 databases that are specified at the time of running the server.

                Server modes can use preset properties or command line arguments as detailed in the Advanced Topics chapter. There are three server modes, based on the protocol used for communications between the client and server.

                Hsqldb Server

                This is the preferred way of running a database server and the fastest one. A proprietary communications protocol is used for this mode. A command similar to those used for running tools and described above is used for running the server. The following example of the command for starting the server starts the server with one (default) database with files named "mydb.*".

                    java -cp ../lib/hsqldb.jar org.hsqldb.Server -database.0 file:mydb -dbname.0 xdb

                The command line argument -? can be used to get a list of available arguments.

                Hsqldb Web Server

                This mode is used when access to the computer hosting the database server is restricted to the HTTP protocol. The only reason for using the Web Server mode is restrictions imposed by firewalls on the client or server machines and it should not be used where there are no such restrictions. The HSQLDB Web Server is a special web server that allows JDBC clients to connect via HTTP. From 1.7.2 this mode also supports transactions.

                To run a web server, replace the main class for the server in the example command line above with the following:

                    org.hsqldb.WebServer

                The command line argument -? can be used to get a list of available arguments.

                Hsqldb Servlet

                This uses the same protocol as the Web Server. It is used when a separate servlet engine (or application server) such as Tomcat or Resin provides access to the database. The Servlet Mode cannot be started independently from the servlet engine. The Servlet class, in the HSQLDB jar, should be installed on the application server to provide the connection. The database is specified using an application server property. Refer to the source file org.hsqldb.Servlet.java to see the details.

                Both Web Server and Servlet modes can only be accessed using the JDBC driver at the client end. They do not provide a web front end to the database. The Servlet mode can serve only a single database.

                Please note that you do not normally use this mode if you are using the database engine in an application server.

                Connecting to a Database running as a Server

                Once an HSQLDB server is running, client programs can connect to it using the HSQLDB JDBC Driver contained in hsqldb.jar. Full information on how to connect to a server is provided in the Java Documentation for jdbcConnection (located in the /doc/src directory of HSQLDB distribution. A common example is connection to the default port (9001) used for the hsql protocol on the same machine:

                Example 1.1. Java code to connect to the local Server above

                    try {
                        Class.forName("org.hsqldb.jdbcDriver" );
                    } catch (Exception e) {
                        System.out.println("ERROR: failed to load HSQLDB JDBC driver.");
                        e.printStackTrace();
                        return;
                    }
                
                    Connection c = DriverManager.getConnection("jdbc:hsqldb:hsql://localhost/xdb", "sa", "");

                In some circumstances, you may have to use the following line to get the driver.

                    Class.forName("org.hsqldb.jdbcDriver").newInstance();

                Note in the above connection URL, there is no mention of the database file, as this was specified when running the server. Instead, the value defined for dbname.0 is used. Also, see the Advanced Topics chapter for the connection URL when there is more than one database per server instance.

                Security Considerations

                When HSQLDB is run as a server, network access should be adequately protected. Source IP addresses may be restricted by use of TCP filtering or firewall programs, or standalone firewalls. If the traffic will cross an unprotected network (such as the Internet), the stream should be encrypted (for example by VPN, ssh tunneling, or TLS using the SSL enabled HSQLS and HTTPS variants of the server and web server modes). Only secure passwords should be used-- most importantly, the password for the default system user should be changed from the default empty string. If you are purposefully providing data to the public, then the wide-open public network connection should be used exclusively to access the public data via read-only accounts. (I.e., neither secure data nor privileged accounts should use this connection). These considerations also apply to HSQLDB servers run with the HTTP protocol.

                In-Process (Standalone) Mode

                This mode runs the database engine as part of your application program in the same Java Virtual Machine. For most applications this mode can be faster, as the data is not converted and sent over the network. The main drawback is that it is not possible by default to connect to the database from outside your application. As a result you cannot check the contents of the database with external tools such as Database Manager while your application is running. In 1.8.0, you can run a server instance in a thread from the same virtual machine as your application and provide external access to your in-process database.

                The recommended way of using the in-process mode in an application is to use an HSQLDB Server instance for the database while developing the application and then switch to In-Process mode for deployment.

                An In-Process Mode database is started from JDBC, with the database file path specified in the connection URL. For example, if the database name is testdb and its files are located in the same directory as where the command to run your application was issued, the following code is used for the connection:

                    Connection c = DriverManager.getConnection("jdbc:hsqldb:file:testdb", "sa", "");

                The database file path format can be specified using forward slashes in Windows hosts as well as Linux hosts. So relative paths or paths that refer to the same directory on the same drive can be identical. For example if your database path in Linux is /opt/db/testdb and you create an identical directory structure on the C: drive of a Windows host, you can use the same URL in both Windows and Linux:

                    Connection c = DriverManager.getConnection("jdbc:hsqldb:file:/opt/db/testdb", "sa", "");

                When using relative paths, these paths will be taken relative to the directory in which the shell command to start the Java Virtual Machine was executed. Refer to Javadoc for jdbcConnection for more details.

                Memory-Only Databases

                It is possible to run HSQLDB in a way that the database is not persistent and exists entirely in random access memory. As no information is written to disk, this mode should be used only for internal processing of application data, in applets or certain special applications. This mode is specified by the mem: protocol.

                    Connection c = DriverManager.getConnection("jdbc:hsqldb:mem:aname", "sa", "");

                You can also run a memory-only server instance by specifying the same URL in the server.properties. This usage is not common and is limited to special applications where the database server is used only for exchanging information between clients, or for non-persistent data.

                General

                Closing the Database

                All databases running in different modes can be closed with the SHUTDOWN command, issued as an SQL query. From version 1.7.2, in-process databases are no longer closed when the last connection to the database is explicitly closed via JDBC, a SHUTDOWN is required. In 1.8.0, a connection property, shutdown=true, can be specified on the first connection to the database (the connection that opens the database) to force a shutdown when the last connection closes.

                When SHUTDOWN is issued, all active transactions are rolled back. A special form of closing the database is via the SHUTDOWN COMPACT command. This command rewrites the .data file that contains the information stored in CACHED tables and compacts it to size. This command should be issued periodically, especially when lots of inserts, updates or deletes have been performed on the cached tables. Changes to the structure of the database, such as dropping or modifying populated CACHED tables or indexes also create large amounts of unused file space that can be reclaimed using this command.

                Using Multiple Databases in One JVM

                In the above examples each server serves only one database and only one in-memory database can be created. However, from version 1.7.2, HSQLDB can serve several databases in multiple server modes and allow simultaneous access to multiple in-process and memory-only databases. These capabilities are covered in the Advanced Topics chapter.

                Creating a New Database

                When a server instance is started, or when a connection is made to an in-process database, a new, empty database is created if no database exists at the given path.

                This feature has a side effect that can confuse new users. If a mistake is made in specifying the path for connecting to an existing database, a connection is nevertheless established to a new database. For troubleshooting purposes, you can specify a connection property ifexists=true to allow connection to an existing database only and avoid creating a new database. In this case, if the database does not exist, the getConnection() method will throw an exception.

                Using the Database Engine

                Once a connection is established to a database in any mode, JDBC methods are used to interact with the database. The Javadoc for jdbcConnection , jdbcDriver , jdbcDatabaseMetadata , jdbcResultSet , jdbcStatement , and jdbcPreparedStatement list all the supported JDBC methods together with information that is specific to HSQLDB. JDBC methods are broadly divided into: connection related methods, metadata methods and database access methods. The database access methods use SQL commands to perform actions on the database and return the results either as a Java primitive type or as an instance of the java.sql.ResultSet class.

                You can use Database Manager or other Java database access tools to explore your database and update it with SQL commands. These programs use JDBC internally to submit your commands to the database engine and to display the results in a human readable format.

                The SQL dialect used in HSQLDB is as close to the SQL92 and SQL200n standards as it has been possible to achieve so far in a small-footprint database engine. The full list of SQL commands is in the SQL Syntax chapter.

                Different Types of Tables

                HSQLDB supports TEMP tables and three types of persistent tables.

                TEMP tables are not written to disk and last only for the lifetime of the Connection object. The contents of each TEMP table is visible only from the Connection that was used to populate it; other concurrent connections to the database will have access to their own copies of the table. Since 1.8.0 the definition of TEMP tables conforms to the GLOBAL TEMPORARY type in the SQL standard. The definition of the table persists but each new connections sees its own copy of the table, which is empty at the beginning. When the connection commits, the contents of the table are cleared by default. If the table definition statements includes ON COMMIT PRESERVE ROWS, then the contents are kept when a commit takes place.

                The three types of persistent tables are MEMORY tables, CACHED tables and TEXT tables.

                Memory tables are the default type when the CREATE TABLE command is used. Their data is held entirely in memory but any change to their structure or contents is written to the <dbname>.script file. The script file is read the next time the database is opened, and the MEMORY tables are recreated with all their contents. So unlike TEMP table, the default, MEMORY tables are persistent.

                CACHED tables are created with the CREATE CACHED TABLE command. Only part of their data or indexes is held in memory, allowing large tables that would otherwise take up to several hundred megabytes of memory. Another advantage of cached tables is that the database engine takes less time to start up when a cached table is used for large amounts of data. The disadvantage of cached tables is a reduction in speed. Do not use cached tables if your data set is relatively small. In an application with some small tables and some large ones, it is better to use the default, MEMORY mode for the small tables.

                TEXT tables are supported since version 1.7.0 and use a CSV (Comma Separated Value) or other delimited text file as the source of their data. You can specify an existing CSV file, such as a dump from another database or program, as the source of a TEXT table. Alternatively, you can specify an empty file to be filled with data by the database engine. TEXT tables are efficient in memory usage as they cache only part of the text data and all of the indexes. The Text table data source can always be reassigned to a different file if necessary. Two commands are needed to set up a TEXT table as detailed in the Text Tables chapter.

                With memory-only databases (see above), both MEMORY table and CACHED table declarations are treated as declarations for non-persistent memory tables. TEXT table declarations are not allowed in this mode.

                Constraints and Indexes

                HSQLDB supports PRIMARY KEY, NOT NULL, UNIQUE, CHECK and FOREIGN KEY constraints. In addition, it supports UNIQUE or ordinary indexes. This support is fairly comprehensive and covers multi-column constraints and indexes, plus cascading updates and deletes for foreign keys.

                HSQLDB creates indexes internally to support PRIMARY KEY, UNIQUE and FOREIGN KEY constraints: a unique index is created for each PRIMARY KEY or UNIQUE constraint; an ordinary index is created for each FOREIGN KEY constraint. Because of this, you should not create duplicate user-defined indexes on the same column sets covered by these constraints. This would result in unnecessary memory and speed overheads. See the discussion in the SQL Issues chapter for more information.

                Indexes are crucial for adequate query speed. When queries joining multiple tables are used, there must be an index on each joined column of each table. When range or equality conditions are used e.g. SELECT ... WHERE acol >10 AND bcol = 0, an indexe is required on the acol column used in the condition. Indexes have no effect on ORDER BY clauses or some LIKE conditions.

                As a rule of thumb, HSQLDB is capable of internal processing of queries at over 100,000 rows per second. Any query that runs into several seconds should be checked and indexes should be added to the relevant columns of the tables if necessary.

                SQL Support

                The SQL syntax supported by HSQLDB is essentially that specified by the SQL Standard (92 and 200n). Not all the features of the Standard are supported and there are some proprietary extensions. In 1.8.0 the behaviour of the engine is far more compliant with the Standards than with older versions. The main changes are

                • correct treatment of NULL column values in joins, in UNIQUE constraints and in query conditions

                • correct processing of selects with JOIN and LEFT OUTER JOIN

                • correct processing of aggregate functions contained in expressions or containing expression arguments

                The supported commands are listed in the SQL Syntax chapter. For a well written basic guide to SQL with examples you can consult PostgreSQL: Introduction and Concepts by Bruce Momjian, which is available on the web. Most of the SQL coverage in the book applies also to HSQLDB. There are some differences in keywords supported by one and not the other engine (OUTER, OID's, etc.) or used differently (IDENTITY/SERIAL, TRIGGER, SEQUENCE, etc.).

                JDBC Support

                Since 1.7.2, support for JDBC2 has been significantly extended and some features of JDBC3 are also supported. The relevant classes are thoroughly documented. See the JavaDoc for org.hsqldb.jdbcXXXX classes.

                hsqldb-1.8.0.10.orig/doc/guide/ch09.html0000644000175000017500000032166410665324662016140 0ustar renereneChapter 9. SQL Syntax

                Chapter 9. SQL Syntax

                The Hypersonic SQL Group

                Fred Toussi

                HSQLDB Development Group

                Peter Hudson

                HSQLDB Development Group

                Joe Maher

                HSQLDB Development Group

                Edited by

                Blaine Simpson

                $Date: 2007/02/19 21:15:47 $

                HSQLDB version 1.8.0 supports the SQL statements and syntax described in this chapter.

                Notational Conventions Used in this Chapter

                [A] means A is optional.

                { B | C } means either B or C must be used.

                [{ B | C }] means either B or C may optionally be used, or nothing at all.

                ( and ) are the actual characters '(' and ')' used in statements.

                UPPERCASE words are keywords

                SQL Commands

                ALTER INDEX[2]

                ALTER INDEX <indexname> RENAME TO <newname>;

                Index names can be changed so long as they do not conflict with other user-defined or sytem-defined names.

                ALTER SEQUENCE[2]

                ALTER SEQUENCE <sequencename> RESTART WITH <value>;

                Resets the next value to be returned from the sequence.

                ALTER SCHEMA[2]

                ALTER SCHEMA <schemaname> RENAME TO <newname>;

                Renames the schema as specified. All objects of the schema will hereafter be accessible only with the new schema name.

                Requires Administrative privileges.

                ALTER TABLE[2]

                ALTER TABLE <tablename> ADD [COLUMN] <columnname> Datatype
                    [(columnSize[,precision])] [{DEFAULT <defaultValue> |
                    GENERATED BY DEFAULT AS IDENTITY (START WITH <n>[, INCREMENT BY <m>])}] |
                    [[NOT] NULL] [IDENTITY] [PRIMARY KEY]
                    [BEFORE <existingcolumn>];

                Adds the column to the end of the column list. The optional BEFORE <existingcolumn> can be used to specify the name of an existing column so that the new column is inserted in a position just before the <existingcolumn>.

                It accepts a columnDefinition as in a CREATE TABLE command. If NOT NULL is specified and the table is not empty, then a default value must be specified. In all other respects, this command is the equivalent of a column definition statement in a CREATE TABLE statement.

                If an SQL view includes a SELECT * FROM <tablename> in its select statement, the new column is added to the view. This is a non-standard feature which is likely to change in the future.

                ALTER TABLE <tablename> DROP [COLUMN] <columnname>;

                Drops the column from the table. Will drop any single-column primary key or unique constraint on the column as well. The command will not work if there is any multiple key constraint on the column or the column is referenced in a check constraint or a foreign key.

                It will also fail if an SQL view includes the column.

                ALTER TABLE <tablename> ALTER COLUMN <columnname> RENAME TO <newname> 

                Changes a column name.

                ALTER TABLE <tablename> ALTER COLUMN <columnname> SET DEFAULT <defaultvalue>};

                Adds the specified default value to the column. Use NULL to remove a default.

                ALTER TABLE <tablename> ALTER COLUMN <columnname> SET [NOT] NULL

                Sets or removes a NOT NULL constraint for the column.

                ALTER TABLE <tablename> ALTER COLUMN <columnDefinition>;

                This form of ALTER TABLE ALTER COLUMN accepts a columnDefinition as in a CREATE TABLE command, with the following restrictions.

                Restrictions

                • The column must be already be a PK column to accept an IDENTITY definition.
                • If the column is already an IDENTITY column and there is no IDENTITY definition, the existing IDENTITY attribute is removed.
                • The default expression will be that of the new definition, meaning an existing default can be dropped by ommission, or a new default added.
                • The NOT NULL attribute will be that of the new definition (similar to previous item).
                • Depending on the type of change, the table may have to be empty for the command to work. It always works when the type of change is possible in general and the individual existing values can all be converted.
                ALTER TABLE <tablename> ALTER COLUMN <columnname>
                    RESTART WITH <new sequence value>

                This form is used exclusively for IDENTITY columns and changes the next automatic value for the identity sequence.

                ALTER TABLE <tablename> ADD [CONSTRAINT <constraintname>]
                    CHECK (<search condition>);

                Adds a check constraint to the table. In the current version, a check constraint can reference only the row being inserted or updated.

                ALTER TABLE <tablename> ADD [CONSTRAINT <constraintname>] UNIQUE (<column list>);

                Adds a unique constraint to the table. This will not work if there is already a unique constraint covering exactly the same <column list>.

                This will work only if the values of the column list for the existing rows are unique or include a null value.

                ALTER TABLE <tablename> ADD [CONSTRAINT <constraintname>]
                    PRIMARY KEY (<column list>);

                Adds a primary key constraint to the table, using the same constraint syntax as when the primary key is specified in a table definition.

                ALTER TABLE <tablename>
                    ADD [CONSTRAINT <constraintname>] FOREIGN KEY (<column list>)
                    REFERENCES <exptablename> (<column list>)
                    [ON {DELETE | UPDATE} {CASCADE | SET DEFAULT | SET NULL}];

                Adds a foreign key constraint to the table, using the same constraint syntax as when the foreign key is specified in a table definition.

                This will fail if for each existing row in the referring table, a matching row (with equal values for the column list) is not found in the referenced tables.

                ALTER TABLE <tablename> DROP CONSTRAINT <constraintname>;

                Drop a named unique, check or foreign key constraint from the table.

                ALTER TABLE <tablename> RENAME TO <newname>;

                ALTER USER[2]

                ALTER USER <username> SET PASSWORD <password>;

                Changes the password for an existing user. Password must be double quoted. Use "" for an empty password.

                DBA's may change users' base default schema name with the comand

                ALTER USER <username> SET INITIAL SCHEMA <schemaname>;
                This is the schema which database object names will resolve to for this user, unless overridden as explained in Schema object naming. For reasons of backwards compatibility, the initial schema value will not be persisted across database shutdowns until HSQLDB version 1.8.1. (I.e., INITIAL SCHEMA settings will be lost upon database shutdown with HSQLDB versions lower than version 1.8.1).

                Only an administrator may use these commands.

                CALL

                CALL Expression;

                Any expression can be called like a stored procedure, including, but not only Java stored procedures or functions. This command returns a ResultSet with one column and one row (the result) just like a SELECT statement with one row and one column.

                See also: Stored Procedures / Functions, SQL Expression.

                CHECKPOINT

                CHECKPOINT [DEFRAG[2]];

                Closes the database files, rewrites the script file, deletes the log file and opens the database.

                If DEFRAG is specified, this command also shrinks the .data file to its minimal size.

                See also: SHUTDOWN, SET LOGSIZE.

                COMMIT

                COMMIT [WORK];

                Ends a transaction and makes the changes permanent.

                See also: ROLLBACK, SET AUTOCOMMIT, SET LOGSIZE.

                CONNECT

                CONNECT USER <username> PASSWORD <password>;

                Connects to the database as a different user. Password should be double quoted. Use "" for an empty password.

                See also: GRANT, REVOKE.

                CREATE ALIAS

                CREATE ALIAS <function> FOR <javaFunction>;

                Creates an alias for a static Java function to be used as a Stored Procedure. The function must be accessible from the JVM in which the database runs. Example:

                    CREATE ALIAS ABS FOR "java.lang.Math.abs";

                Note

                The CREATE ALIAS command just defines the alias. It does not validate existence of the target method or its containing class. To validate the alias, use it.

                See also: CALL, Stored Procedures / Functions.

                CREATE INDEX

                CREATE [UNIQUE] INDEX <index> ON <table> (<column> [DESC] [, ...]) [DESC];

                Creates an index on one or more columns in a table.

                Creating an index on searched columns may improve performance. The qualifier DESC can be present for command compatibility with other databases but it has no effect. Unique indexes can be defined but this is deprecated. Use UNIQUE constraints instead. The name of an index must be unique within the whole database.

                See also: CREATE TABLE, DROP INDEX.

                CREATE ROLE[2]

                CREATE ROLE <rolename>;

                Creates the named role with no members. Requires Administrative privileges.

                CREATE SCHEMA[2]

                CREATE SCHEMA <schemaname> AUTHORIZATION <grantee>
                    [<createStatement> [<grantStatement>] [...];

                Creates the named schema, with ownership of the specified authorization. The authorization grantee may be a database user or a role.

                Optional (nested) CREATE and GRANT statements can be given only for new objects in this new schema. Only the last nested statement should be terminated with a semicolon, because the first semicolon encountered after "CREATE SCHEMA" will end the CREATE SCHEMA command. In the example below, a new schema, ACCOUNTS, is created, then two tables and a view are added to this schma and some rights on these objects are granted.

                    CREATE SCHEMA ACCOUNTS AUTHORIZATION DBA
                        CREATE TABLE AB(A INTEGER, ...)
                        CREATE TABLE CD(C CHAHR, ...)
                        CREATE VIEW VI AS SELECT ...
                        GRANT SELECT TO PUBLIC ON AB
                        GRANT SELECT TO JOE ON CD;
                
                Note that this example consists of one CREATE SCHEMA statement which is terminated by a semicolon.

                Requires Administrative privileges.

                CREATE SEQUENCE[2]

                CREATE SEQUENCE <sequencename> [AS {INTEGER | BIGINT}]
                    [START WITH <startvalue>] [INCREMENT BY <incrementvalue>];

                Creates a sequence. The default type is INTEGER. The default start value is 0 and the increment 1. Negative values are not allowed. If a sequence goes beyond Integer.MAXVALUE or Long.MAXVALUE, the next result is determined by 2's complement arithmetic.

                The next value for a sequence can be included in SELECT, INSERT and UPDATE statements as in the following example:

                SELECT [...,] NEXT VALUE FOR <sequencename> [, ...] FROM <tablename>;

                In the proposed SQL 200n and in the current version, there is no way of retreiving the last returned value of a sequence.

                CREATE TABLE

                CREATE [MEMORY | CACHED | [GLOBAL] TEMPORARY | TEMP [2] | TEXT[2]] TABLE <name>
                    ( <columnDefinition> [, ...] [, <constraintDefinition>...] )
                    [ON COMMIT {DELETE | PRESERVE} ROWS];

                Creates a tables in memory (default) or on disk and only cached in memory. If the database is all-in-memory, both MEMORY and CACHED forms of CREATE TABLE return a MEMORY table while the TEXT form is not allowed.

                Components of a CREATE TABLE command

                columnDefinition
                columnname Datatype [(columnSize[,precision])]
                    [{DEFAULT <defaultValue> |
                    GENERATED BY DEFAULT AS IDENTITY
                    (START WITH <n>[, INCREMENT BY <m>])}] |
                    [[NOT] NULL] [IDENTITY] [PRIMARY KEY]

                Default values that are allowed are constant values or certain SQL datetime functions.

                Allowed Default Values in Column Definitions

                • For character column, a single-quoted string or NULL. The only SQL function that can be used is CURRENT_USER.

                • For datetime columns, a single-quoted DATE, TIME or TIMESTAMP value or NULL. Or a datetime SQL function such as CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, TODAY, NOW. Each function is allowed for a certain datetime type.

                • For BOOLEAN columns, the literals FALSE, TRUE, NULL.

                • For numeric columns, any valid number or NULL.

                • For binary columns, any valid hex string or NULL.

                Only one identity column is allowed in each table. Identity columns are autoincrement columns. They must be of INTEGER or BIGINT type and are automatically primary key columns (as a result, multi-column primary keys are not possible with an IDENTITY column present). Using the long SQL syntax the (START WITH <n>) clause specifies the first value that will be used. The last inserted value into an identity column for a connection is available using the function IDENTITY(), for example (where Id is the identity column):

                INSERT INTO Test (Id, Name) VALUES (NULL,'Test');
                    CALL IDENTITY();
                constraintDefinition
                [CONSTRAINT <name>]
                    UNIQUE ( <column> [,<column>...] ) |
                    PRIMARY KEY ( <column> [,<column>...] ) |
                    FOREIGN KEY ( <column> [,<column>...] )
                    REFERENCES <refTable> ( <column> [,<column>...]) 
                    [ON {DELETE | UPDATE}
                    {CASCADE | SET DEFAULT | SET NULL}][2] |
                    CHECK(<search condition>)[2]

                Both ON DELETE and ON UPDATE clauses can be used in a single foreign key definition.

                search condition

                A search condition is similar to the set of conditions in a WHERE clause. In the current version of HSQLDB, the conditions for a CHECK constraint can only reference the current row, meaning there should be no SELECT statement. Sample table definitions with CHECK constraints are in TestSelfCheckConstraints.txt. This file is in the /hsqldb/testrun/hsqldb/ directory of the zip.

                General syntax limitations

                HSQLDB databases are initially created in a legacy mode that does not enforce column size and precision. You can set the property: sql.enforce_strict_size=true to enable this feature. When this property has been set, Any supplied column size and precision for numeric and character types (CHARACTER and VARCHAR) are enforced. Use the command, SET PROPERTY "sql.enforce_strict_size" TRUE once before defining the tables.

                NOT NULL constraints can be part of the column definition only. Other constraints cannot be part of the column definition and must appear at the end of the column definition list.

                TEMPORARY TABLE contents for each session (connection) are emptied by default at each commit or rollback. The optional qualifier ON COMMIT PRESERVE ROWS can be used to keep the rows while the session is open. The default is ON COMMIT DELETE ROWS.

                See also: DROP TABLE.

                CREATE TRIGGER[2]

                CREATE TRIGGER <name> {BEFORE | AFTER} {INSERT | UPDATE | DELETE} ON <table>
                    [FOR EACH ROW] [QUEUE n] [NOWAIT] CALL <TriggerClass>;

                TriggerClass is an application-supplied class that implements the org.hsqldb.Trigger interface e.g. "mypackage.TrigClass". It is the fire method of this class that is invoked when the trigger event occurs. You should provide this class, which can have any name, and ensure that this TriggerClass is present in the classpath which you use to start hsqldb.

                Since 1.7.2 the implementation has been changed and enhanced. When the 'fire' method is called, it is passed the following arguments:

                    fire (String name, String table, Object row1[], Object row2[])
                

                where 'row1' and 'row2' represent the 'before' and 'after' states of the row acted on, with each column being a member of the array. The mapping of members of the row arrays to database types is specified in Data Types. For example, BIGINT is represented by a java.lang.Long Object. Note that the number of elements in the row arrays could be larger than the number of columns by one or two elements. Never modify the last elements of the array, which are not part of the actual row.

                If the trigger method wants to access the database, it must establish its own JDBC connection. This can cause data inconsistency and other problems so it is not recommended. The jdbc:default:connection: URL is not currently supported.

                Implementation note:

                If QUEUE 0 is specified, the fire method is execued in the same thread as the database engine. This allows trigger action to alter the data that is about to be stored in the database. Data can be checked or modified in BEFORE INSERT / UPDATE + FOR EACH ROW triggers. All table constraints are then enforced by the database engine and if there is a violation, the action is rejected for the SQL command that initiated the INSERT or UPDATE. There is an exception to this rule, that is with UPDATE queries, referential integrity and cascading actions resulting from ON UPDATE CASCASE / SET NULL / SET DEFAULT are all performed prior to the invocation of the trigger method. If an invalid value that breaks referential integrity is inserted in the row by the trigger method, this action is not checked and results in inconsistent data in the table.

                Alternatively, if the trigger is used for external communications and not for checking or altering the data, a queue size larger than zero can be specified. This is in the interests of not blocking the database's main thread as each trigger will run in a thread that will wait for its firing event to occur. When this happens, the trigger's thread calls TriggerClass.fire. There is a queue of events waiting to be run by each trigger thread. This is particularly useful for 'FOR EACH ROW' triggers, when a large number of trigger events occur in rapid succession, without the trigger thread getting a chance to run. If the queue becomes full, subsequent additions to it cause the database engine to suspend awaiting space in the queue. Take great care to avoid this situation if the trigger action involves accessing the database, as deadlock will occur. This can be avoided either by ensuring the QUEUE parameter makes a large enough queue, or by using the NOWAIT parameter, which causes a new trigger event to overwrite the most recent event in the queue. The default queue size is 1024. Note also that the timing of trigger method calls is not guaranteed, so applications should implement their own synchronization measures if necessary.

                With a non-zero QUEUE parameter, if the trigger methods modifies the 'row2' values, these changes may or may not affect the database and will almost certainly result in data inconsistency.

                Please refer to the code for org.hsqldb.sample.Trigger and org.hsqldb.sample.TriggerSample for more information on how to write a trigger class.

                See also: DROP TRIGGER.

                CREATE USER

                CREATE USER <username> PASSWORD <password> [ADMIN];

                Creates a new user or new administrator in this database. Password must be double quoted. Empty password can be made using "". You can change a password afterwards using a ALTER USER[2] command.

                Only an administrator can do this.

                See also: CONNECT, GRANT, REVOKE. ALTER USER[2],

                CREATE VIEW[2]

                CREATE VIEW <viewname>[(<viewcolumn>,..) AS SELECT ... FROM ... [WHERE Expression]
                [ORDER BY orderExpression [, ...]]
                [LIMIT <limit> [OFFSET <offset>]];

                A view can be thought of as either a virtual table or a stored query. The data accessible through a view is not stored in the database as a distinct object. What is stored in the database is a SELECT statement. The result set of the SELECT statement forms the virtual table returned by the view. A user can use this virtual table by referencing the view name in SQL statements the same way a table is referenced. A view is used to do any or all of these functions:

                • Restrict a user to specific rows in a table. For example, allow an employee to see only the rows recording his or her work in a labor-tracking table.

                • Restrict a user to specific columns. For example, allow employees who do not work in payroll to see the name, office, work phone, and department columns in an employee table, but do not allow them to see any columns with salary information or personal information.

                • Join columns from multiple tables so that they look like a single table.

                • Aggregate information instead of supplying details. For example, present the sum of a column, or the maximum or minimum value from a column.

                Views are created by defining the SELECT statement that retrieves the data to be presented by the view. The data tables referenced by the SELECT statement are known as the base tables for the view. In this example, is a view that selects data from three base tables to present a virtual table of commonly needed data:

                    CREATE VIEW mealsjv AS
                      SELECT m.mid mid, m.name name, t.mealtype mt, a.aid aid,
                             a.gname + ' ' + a.sname author, m.description description,
                             m.asof asof
                        FROM meals m, mealtypes t, authors a
                       WHERE m.mealtype = t.mealtype
                        AND m.aid = a.aid;

                You can then reference mealsjv in statements in the same way you would reference a table:

                    SELECT * FROM mealsjv;

                A view can reference another view. For example, mealsjv presents information that is useful for long descriptions that contain identifiers, but a short list might be all a web page display needs. A view can be built that selects only specific mealsjv columns:

                    CREATE VIEW mealswebv AS SELECT name, author FROM mealsjv;

                The SELECT statement in a VIEW definition should return columns with distinct names. If the names of two columns in the SELECT statement are the same, use a column alias to distinguish between them. A list of new column names can always be defined for a view.

                    CREATE VIEW aview (new_name, new_author) AS
                      SELECT name, author
                      FROM mealsjv

                See also: SQL Expression, SELECT[2], DROP VIEW[2].

                DELETE

                DELETE FROM table [WHERE Expression];

                Removes rows in a table.

                See also: SQL Expression, INSERT, SELECT[2].

                DISCONNECT

                DISCONNECT;

                Closes this connection. It is not required to call this command when using the JDBC interface: it is called automatically when the connection is closed. After disconnecting, it is not possible to execute other queries (including CONNECT) with this connection.

                See also: CONNECT.

                DROP INDEX

                DROP INDEX index [IF EXISTS];

                Removes the specified index from the database. Will not work if the index backs a UNIQUE of FOREIGN KEY constraint.

                See also: CREATE INDEX.

                DROP ROLE[2]

                DROP ROLE <rolename>;

                Removes all members from specified role, then removes the role itself.

                DROP SEQUENCE[2]

                DROP SEQUENCE <sequencename> [IF EXISTS] [RESTRICT | CASCADE];

                Removes the specified sequence from the database. When IF EXIST is used, the statement returns without an error if the sequence does not exist. The RESTRICT option is in effect by default, meaning that DROP will fail if any view reference the sequence. Specify the CASCADE option to silently drop all dependent database objects.

                DROP SCHEMA[2]

                DROP SCHEMA <schemaname> [RESTRICT | CASCADE];

                Removes the specified schema from the database. The RESTRICT option is in effect by default, meaning that DROP will fail if any objects such as tables or sequences have been defined in the schema. Specify the CASCADE option to silently drop all database objects in the schema.

                Requires Administrative privileges.

                DROP TABLE

                DROP TABLE <table> [IF EXISTS] [RESTRICT | CASCADE];

                Removes a table, the data and indexes from the database. When IF EXIST is used, the statement returns without an error even if the table does not exist.

                The RESTRICT option is in effect by default, meaning that DROP will fail if any tables or views refer to this table. Specify the CASCADE option to silently drop all dependent views, and to drop any foreign key constraint that links this table with other tables.

                See also:

                CREATE TABLE.

                DROP TRIGGER

                DROP TRIGGER <trigger>;

                Removes a trigger from the database.

                See also: CREATE TRIGGER[2].

                DROP USER

                DROP USER <username>;

                Removes a user from the database.

                Only an administrator do this.

                See also: CREATE USER.

                DROP VIEW[2]

                DROP VIEW <viewname> [IF EXISTS] [RESTRICT | CASCADE];

                Removes a view from the database. When IF EXIST is used, the statement returns without an error if the view does not exist. The RESTRICT option is in effect by default, meaning that DROP will fail if any other view refers to this view. Specify the CASCADE option to silently drop all dependent views.

                See also: CREATE VIEW[2].

                EXPLAIN PLAN

                EXPLAIN PLAN FOR { SELECT ... | DELETE ... | INSERT ... | UPDATE ..};

                EXPLAIN PLAN FOR can be used with any query to get a detailed list of the elements in the execution plan.

                This list includes the indexes used for performing the query and can be used to optimise the query or to add indexes to tables.

                GRANT

                GRANT { SELECT | DELETE | INSERT | UPDATE | ALL } [,...]
                ON { table | CLASS "package.class" } TO <grantee>;
                GRANT <rolename> [,...] TO <grantee>[2];

                <grantee> is either a user name, a role name, or PUBLIC. PUBLIC means all users.

                The first form of the GRANT command assigns privileges to a grantee for a table or for a class. To allow a user to call a Store Procedure static function, the right ALL must be used. Examples:

                    GRANT SELECT ON Test TO GUEST;
                    GRANT ALL ON CLASS "java.lang.Math.abs" TO PUBLIC;

                Warning

                Even though the command is GRANT ALL ON CLASS, you must specify a static method name. You are actually granting access to a static method, not to a class.

                The second form of the GRANT command gives the specified <grantee> membership in the specified role.

                Requires Administrative privileges.

                See also: REVOKE, CREATE USER, CREATE ROLE[2].

                INSERT

                INSERT INTO table [( column [,...] )]
                { VALUES(Expression [,...]) | SelectStatement};

                Adds one or more new rows of data into a table.

                REVOKE

                REVOKE { SELECT | DELETE | INSERT | UPDATE | ALL } [,...]
                ON { table | CLASS "package.class" } FROM <grantee>;
                REVOKE <rolename> [,...] FROM <grantee>[2];

                <grantee> is either a user name, a role name, or PUBLIC. PUBLIC means all users.

                The first form of the REVOKE command withdraws privileges from a grantee for a table or for a class.

                The second form of the REVOKE command withdraws membership of the specified <grantee> from the specified role.

                Both forms require Administrative privileges.

                See also: GRANT.

                ROLLBACK

                ROLLBACK [TO SAVEPOINT <savepoint name>[2] |  WORK}];

                ROLLBACK used on its own, or with WORK, undoes changes made since the last COMMIT or ROLLBACK.

                ROLLBACK TO SAVEPOINT <savepoint name> undoes the change since the named savepoint. It has no effect if the savepoint is not found.

                See also: COMMIT.

                SAVEPOINT[2]

                SAVEPOINT <savepoint name>;

                Sets up a SAVEPOINT for use with ROLLBACK TO SAVEPOINT.

                See also: COMMIT.

                SCRIPT

                SCRIPT ['file'];

                Creates an SQL script describing the database. If the file is not specified, a result set containing only the DDL script is returned. If the file is specified then this file is saved with the path relative to the machine where the database engine is located.

                Only an administrator may do this.

                SELECT[2]

                SELECT [{LIMIT <offset> <limit> | TOP <limit>}[2]][ALL | DISTINCT]
                { selectExpression | table.* | * } [, ...]
                [INTO [CACHED | TEMP  | TEXT][2] newTable]
                FROM tableList
                [WHERE Expression]
                [GROUP BY Expression [, ...]]
                [HAVING Expression]
                [{ UNION [ALL | DISTINCT] | {MINUS [DISTINCT] | EXCEPT [DISTINCT] } |
                INTERSECT [DISTINCT] } selectStatement]
                [ORDER BY orderExpression [, ...]]
                [LIMIT <limit> [OFFSET <offset>]];

                Retrieves information from one or more tables in the database.

                Components of a SELECT command

                tableList
                table [{CROSS | INNER | LEFT OUTER | RIGHT OUTER}
                    JOIN table ON Expression] [, ...]
                table
                { (selectStatement) [AS] label | tableName}
                selectExpression
                { Expression | COUNT(*) | {
                    COUNT | MIN | MAX | SUM | AVG | SOME | EVERY |
                    VAR_POP | VAR_SAMP | STDDEV_POP | STDDEV_SAMP
                } ([ALL | DISTINCT][2]] Expression) } [[AS] label]

                If DISTINCT is specified, only one instance of several equivalent values is used in the aggregate function. Except COUNT(*), all aggregate functions exclude NULL values. The type of the returned value for SUM is subject to deterministic widenning to ensure lossless results. The returned value type for COUNT is INTEGER, for MIN, MAX and AVG it is the same type as the column, for SOME and EVERY it is BOOLEAN. For VAR_POP, VAR_SAMP, STDDEV_POP and STDDEV_SAMP statistical functions, the type is always DOUBLE. These statistical functions do not allow ALL or DISTINCT qualifiers.

                If CROSS JOIN is specified no ON expression is allowed for the join.

                orderExpression
                { columnNr | columnAlias | selectExpression }
                    [ASC | DESC]
                LIMIT n m

                Creates the result set for the SELECT statement first and then discards the first n rows (OFFSET) and returns the first m rows of the remaining result set (LIMIT). Special cases: LIMIT 0 m is equivalent to TOP m or FIRST m in other RDBMS's; LIMIT n 0 discards the first n rows and returns the rest of the result set.

                LIMIT m OFFSET n

                This form is used at the end of the SELECT statement. The OFFSET term is optional.

                TOP m

                Equivalent to LIMIT 0 m.

                UNION and other set operations

                Multiple SELECT statements joined with UNION, EXCEPT and INTERSECT are possible. Each SELECT is then treated as a term, and the set operation as an operator in an expression. The expression is evaluated from left to right but INTERSECT takes precedence over the rest of the operators and is applied first. You can use parentheses around any number of SELECT statements to change the evaluation order.

                See also: INSERT, UPDATE, DELETE.

                SET AUTOCOMMIT

                SET AUTOCOMMIT { TRUE | FALSE };

                Switches on or off the connection's auto-commit mode. If switched on, then all statements will be committed as individual transactions. Otherwise, the statements are grouped into transactions that are terminated by either COMMIT or ROLLBACK. By default, new connections are in auto-commit mode. This command should not be used directly. Use the JDBC equivalent method, Connection.setAutoCommit(boolean autocommit).

                SET DATABASE COLLATION[2]

                SET DATABASE COLLATION <double quoted collation name>;

                Each database can have its own collation. Sets the collation from the set of collations in the source for org.hsqldb.Collation.

                Once this command has been issued, the database can be opened in any JVM and will retain its collation.

                SET CHECKPOINT DEFRAG[2]

                SET CHECKPOINT DEFRAG <size>;

                The parameter size is the megabytes of abandoned space in the .data file. When a CHECKPOINT is performed either as a result of the .log file reaching the limit set by "SET LOGSIZE size", or by the user issuing a CHECKPOINT command, the amount of space abandoned during the session is checked and if it is larger than size, a CHECKPOINT DEFRAG is performed instead of a checkpoint.

                SET IGNORECASE

                SET IGNORECASE { TRUE | FALSE };

                Disables (ignorecase = true) or enables (ignorecase = false) the case sensitivity of text comparison and indexing for new tables. By default, character columns in new databases are case sensitive. The sensitivity must be switched before creating tables. Existing tables and their data are not affected. When switched on, the data type VARCHAR is set to VARCHAR_IGNORECASE in new tables. Alternatively, you can specify the VARCHAR_IGNORECASE type for the definition of individual columns. So it is possible to have some columns case sensitive and some not, even in the same table.

                Only an administrator may do this.

                SET INITIAL SCHEMA [2]

                Users may change their base default schema name with the comand

                SET INITIAL SCHEMA <schemaname>;
                This is the schema which database object names will resolve to for the current user, unless overridden as explained in Schema object naming. For reasons of backwards compatibility, the initial schema value will not be persisted across database shutdowns until HSQLDB version 1.8.1. (I.e., INITIAL SCHEMA settings will be lost upon database shutdown with HSQLDB versions lower than version 1.8.1).

                SET LOGSIZE

                SET LOGSIZE <size>;

                Sets the maximum size in MB of the .log file. Default is 200 MB. The database will be closed and opened (just like using CHECKPOINT) if the .log file gets over this limit, and so the .log file will shrink. 0 means no limit.

                See also: CHECKPOINT.

                SET MAXROWS

                SET MAXROWS <maxwors>;

                Describe me!

                SET PASSWORD

                SET PASSWORD <password>;

                Changes the password of the currently connected user. Password must be double quotedEmpty password can be set using "".

                SET PROPERTY[2]

                SET PROPERTY <double quoted name> <value>;

                Sets a database property. Properties that can be set using this command are either boolean or integral and are listed in the Advanced Topics chapter.

                SET READONLY

                SET READONLY {TRUE|FALSE};

                Describe me!

                SET REFERENTIAL INTEGRITY

                SET REFERENTIAL_INTEGRITY { TRUE | FALSE };

                This commands enables / disables the referential integrity checking (foreign keys). Normally it should be switched on (this is the default) but when importing data (and the data is imported in the 'wrong' order) the checking can be switched off.

                Warning

                Note that when referential integrity is switched back on, no check is made that the changes to the data are consistent with the existing referential integrity constraints. You can verify consistency using SQL queries and take appropriate actions.

                Only an administrator may do this.

                See also: CREATE TABLE.

                SET SCHEMA[2]

                SET SCHEMA <schemaname>;

                Sets the current JDBC session's schema. The sole purpose for the session schema is to provide a default schema name for schema objects that do not have the schema name specified explicitly in the SQL command, or by association with another object of known schema. For example, if you run SELECT * FROM atbl;, HSQLDB will look for the table or view named atbl in the session's current schema.

                Session schemas last only for the duration of the current session. When a new JDBC session is obtained, the new session will have the default schema.

                SET SCRIPTFORMAT[2]

                SET SCRIPTFORMAT {TEXT | BINARY | COMPRESSED};

                Changes the format of the script file. BINARY and COMPRESSED formats are slightly faster and more compact than the default TEXT. Recommended only for very large script files.

                SET TABLE INDEX

                SET TABLE tableName INDEX 'index1rootPos index2rootPos ... ';

                This command is only used internally to store the position of index roots in the .data file. It appears only in database script files; it should not be used directly.

                SET TABLE READONLY[2]

                SET TABLE <tablename> READONLY {TRUE | FALSE};

                Sets the table as read only.

                SET TABLE SOURCE[2]

                SET TABLE <tablename> SOURCE <file and options> [DESC];

                For details see the Text Tables chapter.

                This command is used exclusively with TEXT tables to specify which file is used for storage of the data. The optional DESC qualifier results in the text file indexed from the end and opened as readonly. The <file and options> argument is a double quoted string that consists of:

                    <file and options>::= <doublequote> <filepath>
                        [<semicolon> <option>...] <doublequote>

                Example:

                    SET TABLE mytable SOURCE "myfile;fs=|;vs=.;lvs=~"

                Supported Properties

                quoted = { true | false }

                default is true. If false, treats double quotes as normal characters

                all_quoted = { true | false }

                default is false. If true, adds double quotes around all fields.

                encoding = <encoding name>

                character encoding for text and character fields, for example, encoding=UTF-8

                ignore_first = { true | false }

                default is false. If true ignores the first line of the file

                cache_scale= <numeric value>

                exponent to calculate rows of the text file in cache. Default is 8, equivalent to nearly 800 rows

                cache_size_scale = <numeric value>r

                exponent to calculate average size of each row in cache. Default is 8, equivalent to 256 bytes per row.

                fs = <unquoted character>

                field separator

                vs = <unquoted character>

                varchar separator

                lvs = <unquoted character>

                long varchar separator

                Special indicators for Hsqldb Text Table separators

                \semi

                semicolon

                \quote

                quote

                \space

                space character

                \apos

                apostrophe

                \n

                newline - Used as an end anchor (like $ in regular expressions)

                \r

                carriage return

                \t

                tab

                \\

                backslash

                \u####

                a Unicode character specified in hexadecimal

                Only an administrator may do this.

                SET WRITE DELAY[2]

                SET WRITE_DELAY {{ TRUE | FALSE } | <seconds> | <milliseconds> MILLIS};

                This controls the frequency of file sync for the log file. When WRITE_DELAY is set to FALSE or 0, the sync takes place immediately at each COMMIT. WRITE_DELAY TRUE performs the sync once every 20 seconds (which is the default). A numeric value can be specified instead.

                The purpose of this command is to control the amount of data loss in case of a total system crash. A delay of 1 second means at most the data written to disk during the last second before the crash is lost. All data written prior to this has been synced and should be recoverable.

                A write delay of 0 impacts performance in high load situations, as the engine has to wait for the file system to catch up.

                To avoid this, you can set write delay down to 10 milliseconds. In practice, a write delay of 100 milliseconds provides better than 99.9999% reliability with an average one system crash per day, or 99.99999% with an average one system crash per 6 days.

                Each time a SET WRITE_DELAY is issued with any value, a sync is immediately performed.

                Only an administrator may do this.

                SHUTDOWN

                SHUTDOWN [IMMEDIATELY | COMPACT | SCRIPT[2]];

                Closes the current database.

                Varieties of the SHUTDOWN command

                SHUTDOWN

                Performs a checkpoint to creates a new .script file that has the minimum size and contains the data for memory tables only. It then backs up the .data file containing the CACHED TABLE data in zipped format to the .backup file and closes the database.

                SHUTDOWN IMMEDIATELY

                Just closes the database files (like when the Java process for the database is terminated); this command is used in tests of the recovery mechanism. This command should not be used as the routine method of closing the database.

                SHUTDOWN COMPACT

                Writes out a new .script file which contains the data for all the tables, including CACHED and TEXT tables. It then deletes the existing text table files and the .data file before rewriting them. After this, it backs up the .data file in the same way as normal SHUTDOWN. This operation shrinks all files to the minimum size.

                SHUTDOWN SCRIPT

                Similar to SHUTDOWN COMPACT but after writing the script and deleting the existing files, it does not rewrite the .data and text table files. After SHUTDOWN SCRIPT, only the .script and .properties file remain. At the next startup, these files are processed and the .data and .backup files are created. This command in effect performs part of the job of SHUTDOWN COMPACT, leaving the other part to be performed automatically at the next startup.

                This command produces a full script of the database which can be edited for special purposes prior to the next startup.

                Only an administrator may use the SHUTDOWN command.

                UPDATE

                UPDATE table SET column = Expression [, ...] [WHERE Expression];

                Modifies data of a table in the database.

                See also: SELECT[2], INSERT, DELETE.

                Schema object naming

                Schema objects are database objects that are always scoped to a specific schema. Each schema has a namespace. There may be multiple schema objects of the same name, each in the namespace of a different schema. A particular schema object may nearly always be uniquely identified using the notation schemaname.objectname. All HSQLDB database objects are schema objects, other than the following.

                Users

                Roles

                Store Procedure Java Classes

                HSQL Aliases

                Our current Java-class-based Triggers are not fully schema objects. However, we are in the process of implementing SQL-conformant triggers which will encompass our Java-class-based triggers. When this work is completed, HSQLDB triggers will be schema objects.

                Sequences are schema objects with creation and removal permission governed by schema authorization (as described hereafter), but GRANT and REVOKE command do not work yet for sequences. In a future version of HSQLDB, sequence GRANTs and REVOKEs will work similarly to the current GRANT and REVOKE commands for table access.

                Most of the time, you do not need to specify the schema for the desired schema object, because the implicit schema is usually the only one that can be used. For example, when creating an index, the target schema will default to that of the table which is the target of the index. Named constraints are an extreme example of this. There is never a need to specify a schema name for a constraint, since constraint names are only specified in a CREATE or ALTER TABLE command, and the schema must be that of the target table. If the implicit schema is not determined by a related object, then the default comes from your JDBC session's current schema setting. The session schema value will be your login user's initial schema, or whatever you last set it to with SET SCHEMA[2] in your current JDBC session with the SET SCHEMA command. (Your initial schema is "PUBLIC" unless changed with the ALTER USER SET INITIAL SCHEMA or the SET INITIAL SCHEMA [2] command).

                In addition to namespace scoping, there are permission aspects to the schema of a database object. The authorization of a schema is a role or user that is basically the owner of the schema. Only a user with the DBA role (an admin user) or the owner of a schema may create objects, or modify the DDL of objects, in the namespace of that schema. In this way, a schema authorization is said to "own" the objects of that schema. A schema authorization/owner can be a role or a user (even a role with no members). The two schemas automatically created when a database is initialized are both owned by the role DBA.

                An important implication to database objects being owned by the schema owner is, if a non-DBA database user is to have permission to create any database object, they must have ownership of a schema. To allow a user to create (or modify DDL of) objects in their own personal schema, you would create a new schema with that user as the authorization. To allow a non-DBA user to share create and DDL privileges in some schema, you would create this schema with a role as the authorization, then GRANT this role to all of the desired users.

                The INFORMATION_SCHEMA is a system defined schema that contains the system tables for the database. This schema is read-only. When a database is created, a shema named PUBLIC is automatically created as the default schma. This schema has the authorization DBA. You can change the name of this schema. If all non-system schemas are dropped from a database, an empty PUBLIC schema is created again. So each database always has at least one non-system schema.

                Data Types

                Table 9.1. Data Types. The types on the same line are equivalent.

                NameRangeJava Type
                INTEGER | INTas Java typeint | java.lang.Integer
                DOUBLE [PRECISION] | FLOATas Java typedouble | java.lang.Double
                VARCHARas Integer.MAXVALUEjava.lang.String
                VARCHAR_IGNORECASEas Integer.MAXVALUEjava.lang.String
                CHAR | CHARACTERas Integer.MAXVALUEjava.lang.String
                LONGVARCHARas Integer.MAXVALUEjava.lang.String
                DATEas Java typejava.sql.Date
                TIMEas Java typejava.sql.Time
                TIMESTAMP | DATETIMEas Java typejava.sql.Timestamp
                DECIMALNo limitjava.math.BigDecimal
                NUMERICNo limitjava.math.BigDecimal
                BOOLEAN | BITas Java typeboolean | java.lang.Boolean
                TINYINTas Java typebyte | java.lang.Byte
                SMALLINTas Java typeshort | java.lang.Short
                BIGINTas Java typelong | java.lang.Long
                REALas Java typedouble | java.lang.Double[2]
                BINARYas Integer.MAXVALUEbyte[]
                VARBINARYas Integer.MAXVALUEbyte[]
                LONGVARBINARYas Integer.MAXVALUEbyte[]
                OTHER | OBJECTas Integer.MAXVALUEjava.lang.Object

                The uppercase names are the data types names defined by the SQL standard or commonly used by RDMS's. The data types in quotes are the Java class names - if these type names are used then they must be enclosed in quotes because in Java names are case-sensitive. Range indicates the maximum size of the object that can be stored. Where Integer.MAXVALUE is stated, this is a theoretical limit and in practice the maximum size of a VARCHAR or BINARY object that can be stored is dictated by the amount of memory available. In practice, objects of up to a megabyte in size have been successfully used in production databases.

                The recommended Java mapping for the JDBC datatype FLOAT is as a Java type "double". Because of the potential confusion it is recommended that DOUBLE is used instead of FLOAT.

                VARCHAR_IGNORECASE is a special case-insensitive type of VARCHAR. This type is not portable.

                In table definition statements, HSQLDB accepts size, precision and scale qualifiers only for certain types: CHAR(s), VARCHAR(s), DOUBLE(p), NUMERIC(p), DECIMAL(p,s) and TIMESTAMP(p).

                TIMESTAMP(p) can take only 0 or 6 as precision. Zero indicates no subsecond part. Without the precision, the default is 6.

                By default specified precision and scale for the column is simply ignored by the engine. Instead, the values for the corresponding Java types are always used, which in the case of DECIMAL is an unlimited precision and scale. If a size is specified, it is stored in the database definition but is not enforeced by default. Once you have created the database (before adding data), you can add a database property value to enforce the sizes:

                    SET PROPERTY "sql.enforce_strict_size" true

                This will enforce the specified size and pad CHAR fields with spaces to fill the size. This complies with SQL standards by throwing an exception if an attempt is made to insert a string longer than the maximum size. It also results in all DECIMAL values conforming to the specified precision and scale.

                CHAR and VARCHAR and LONGVARCHAR columns are by default compared and sorted according to POSIX standards. See the SET DATABASE COLLATION[2] section above to modify this behavior. The property sql.compare_in_locale is no longer supported. Instead, you can define a collation to be used for all character comparisons.

                Columns of the type OTHER or OBJECT contain the serialized form of a Java Object in binary format. To insert or update such columns, a binary format string (see below under Expression) should be used. Using PreparedStatements with JDBC automates this transformation.

                SQL Comments

                -- SQL style line comment
                // Java style line comment
                /* C style line comment */

                All these types of comments are ignored by the database.

                Stored Procedures / Functions

                Stored procedures are static Java functions that are called directly from the SQL language or using an alias. Calling Java functions (directly or using the alias) requires that the Java class can be reached by the database (server). The syntax is:

                    "java.lang.Math.sqrt"(2.0)

                This means the package must be provided, and the name must be written as one word, and inside " because otherwise it is converted to uppercase (and not found).

                An alias can be created using the command CREATE ALIAS:

                    CREATE ALIAS SQRT FOR "java.lang.Math.sqrt";

                When an alias is defined, then the function can be called additionally using this alias:

                    SELECT SQRT(A) , B FROM MYTABLE;

                Only static java methods can be used as stored procedures. If, within the same class, there are overloaded methods with the same number of arguments, then the first one encountered by the program will be used. If you want to use Java library methods, it is recommended that you create your own class with static methods that act as wrappers around the Java library methods. This will allow you to control which method signature is used to call each Java library method.

                Built-in Functions and Stored Procedures

                Numerical built-in Functions / Stored Procedures

                ABS(d)

                returns the absolute value of a double value

                ACOS(d)

                returns the arc cosine of an angle

                ASIN(d)

                returns the arc sine of an angle

                ATAN(d)

                returns the arc tangent of an angle

                ATAN2(a,b)

                returns the tangent of a/b

                BITAND(a,b)

                return a & b

                BITOR(a,b)

                returns a | b

                CEILING(d)

                returns the smallest integer that is not less than d

                COS(d)

                returns the cosine of an angle

                COT(d)

                returns the cotangent of an angle

                DEGREES(d)

                converts radians to degrees

                EXP(d)

                returns e (2.718...) raised to the power of d

                FLOOR(d)

                returns the largest integer that is not greater than d

                LOG(d)

                returns the natural logarithm (base e)

                LOG10(d)

                returns the logarithm (base 10)

                MOD(a,b)

                returns a modulo b

                PI()

                returns pi (3.1415...)

                POWER(a,b)

                returns a raised to the power of b

                RADIANS(d)

                converts degrees to radians

                RAND()

                returns a random number x bigger or equal to 0.0 and smaller than 1.0

                ROUND(a,b)

                rounds a to b digits after the decimal point

                ROUNDMAGIC(d)

                solves rounding problems such as 3.11-3.1-0.01

                SIGN(d)

                returns -1 if d is smaller than 0, 0 if d==0 and 1 if d is bigger than 0

                SIN(d)

                returns the sine of an angle

                SQRT(d)

                returns the square root

                TAN(A)

                returns the trigonometric tangent of an angle

                TRUNCATE(a,b)

                truncates a to b digits after the decimal point

                String built-in Functions / Stored Procedures

                ASCII(s)

                returns the ASCII code of the leftmost character of s

                BIT_LENGTH(str)[2]

                returns the length of the string in bits

                CHAR(c)

                returns a character that has the ASCII code c

                CHAR_LENGTH(str)[2]

                returns the length of the string in characters

                CONCAT(str1,str2)

                returns str1 + str2

                DIFFERENCE(s1,s2)

                returns the difference between the sound of s1 and s2

                HEXTORAW(s1)[2]

                returns translated string

                INSERT(s,start,len,s2)

                returns a string where len number of characters beginning at start has been replaced by s2

                LCASE(s)

                converts s to lower case

                LEFT(s,count)

                returns the leftmost count of characters of s) - requires double quoting - use SUBSTRING() instead

                LENGTH(s)

                returns the number of characters in s

                LOCATE(search,s,[start])

                returns the first index (1=left, 0=not found) where search is found in s, starting at start

                LTRIM(s)

                removes all leading blanks in s

                OCTET_LENGTH(str)[2]

                returns the length of the string in bytes (twice the number of characters)

                RAWTOHEX(s1)[2]

                returns translated string

                REPEAT(s,count)

                returns s repeated count times

                REPLACE(s,replace,s2)

                replaces all occurrences of replace in s with s2

                RIGHT(s,count)

                returns the rightmost count of characters of s

                RTRIM(s)

                removes all trailing spaces

                SOUNDEX(s)

                returns a four character code representing the sound of s

                SPACE(count)

                returns a string consisting of count spaces

                SUBSTR(s,start[,len])

                alias for substring

                SUBSTRING(s,start[,len])

                returns the substring starting at start (1=left) with length len

                UCASE(s)

                converts s to upper case

                LOWER(s)

                converts s to lower case

                UPPER(s)

                converts s to upper case

                Date/Time built-in Functions / Stored Procedures

                CURDATE()

                returns the current date

                CURTIME()

                returns the current time

                DATEDIFF(string, datetime1, datetime2)[2]

                returns the count of units of time elapsed from datetime1 to datetime2. The string indicates the unit of time and can have the following values 'ms'='millisecond', 'ss'='second','mi'='minute','hh'='hour', 'dd'='day', 'mm'='month', 'yy' = 'year'. Both the long and short form of the strings can be used.

                DAYNAME(date)

                returns the name of the day

                DAYOFMONTH(date)

                returns the day of the month (1-31)

                DAYOFWEEK(date)

                returns the day of the week (1 means Sunday)

                DAYOFYEAR(date)

                returns the day of the year (1-366)

                HOUR(time)

                return the hour (0-23)

                MINUTE(time)

                returns the minute (0-59)

                MONTH(date)

                returns the month (1-12)

                MONTHNAME(date)

                returns the name of the month

                NOW()

                returns the current date and time as a timestamp) - use CURRENT_TIMESTAMP instead

                QUARTER(date)

                returns the quarter (1-4)

                SECOND(time)

                returns the second (0-59)

                WEEK(date)

                returns the week of this year (1-53)

                YEAR(date)

                returns the year

                CURRENT_DATE[2]

                returns the current date

                CURRENT_TIME[2]

                returns the current time

                CURRENT_TIMESTAMP[2]

                returns the current timestamp

                System/Connection built-in Functions / Stored Procedures

                DATABASE()

                returns the name of the database of this connection

                USER()

                returns the user name of this connection

                CURRENT_USER

                SQL standard function, returns the user name of this connection

                IDENTITY()

                returns the last identity values that was inserted by this connection

                System built-in Functions / Stored Procedures

                IFNULL(exp,value)

                if exp is null, value is returned else exp) - use COALESCE() instead

                CASEWHEN(exp,v1,v2)

                if exp is true, v1 is returned, else v2) - use CASE WHEN instead

                CONVERT(term,type)

                converts exp to another data type

                CAST(term AS type)[2]

                converts exp to another data type

                COALESCE(expr1,expr2,expr3,...)[2]

                if expr1 is not null then it is returned else, expr2 is evaluated and if not null it is returned and so on

                NULLIF(v1,v2)[2]

                if v1 equals v2 return null, otherwise v1

                CASE v1 WHEN...[2]

                CASE v1 WHEN v2 THEN v3 [ELSE v4] END

                when v1 equals v2 return v3 [otherwise v4 or null if there is no ELSE]

                CASE WHEN...[2]

                CASE WHEN expr1 THEN v1[WHEN expr2 THEN v2] [ELSE v4] END

                when expr1 is true return v1 [optionally repeated for more cases] [otherwise v4 or null if there is no ELSE]

                EXTRACT[2]

                EXTRACT ({YEAR | MONTH | DAY | HOUR | MINUTE | SECOND} FROM <datetime value>)

                POSITION (... IN ..)[2]

                POSITION(<string expression> IN <string expression>)

                if the first string is a sub-string of the second one, returns the position of the sub-string, counting from one; otherwise 0

                SUBSTRING(... FROM ... FOR ...)[2]

                SUBSTRING(<string expression> FROM <numeric expression> [FOR <numeric expression>])

                TRIM( LEDING ... FROM ...)[2]

                TRIM([{LEADING | TRAILING | BOTH}] FROM <string expression>)

                See also: CALL, CREATE ALIAS.

                SQL Expression

                [NOT] condition [{ OR | AND } condition]

                Components of SQL Expressions

                condition
                   { value [|| value]
                  | value { = | < | <= | > | >= | <> | != } value
                  | value IS [NOT] NULL
                  | EXISTS(selectStatement)
                  | value BETWEEN value AND value
                  | value [NOT] IN ( {value [, ...] | selectStatement } )
                  | value [NOT] LIKE value [ESCAPE] value }
                value
                   [+ | -] { term [{ + | - | * | / | || } term]
                  | ( condition )
                  | function ( [parameter] [,...] )
                  | selectStatement giving one value
                  | {ANY|ALL} (selectStatement giving single column)
                term
                   { 'string' | number | floatingpoint
                  | [table.]column | TRUE | FALSE | NULL }
                sequence
                   NEXT VALUE FOR <sequence>

                HSQLDB does not currently enforce the SQL 200n proposed rules on where sequence generated values are allowed to be used. In general, these values can be used in insert and update statements but not in CASE statements, order by clauses, search conditions, aggregate functions, or grouped queries.

                string

                Strings in HSQLDB are Unicode strings. A string starts and ends with a single ' (singlequote). In a string started with ' (singlequote) use '' (two singlequotes) to create a ' (singlequote).

                String contatenation should be performed with the standard SQL operator || rather than the non-standard + operator.

                The LIKE keyword uses '%' to match any (including 0) number of characters, and '_' to match exactly one character. To search for '%' or '_' itself an escape character must also be specified using the ESCAPE clause. For example, if the backslash is the escaping character, '\%' and '\_' can be used to find the '%' and '_' characters themselves. For example, SELECT .... LIKE '\_%' ESCAPE '\' will find the strings beginning with an underscore.

                name

                The character set for quoted identifiers (names) in HSQLDB is Unicode.

                A unquoted identifier (name) starts with a letter and is followed by any number of ASCII letters or digits. When an SQL statement is issued, any lowercase characters in unquoted identifiers are converted to uppercase. Because of this, unquoted names are in fact ALL UPPERCASE when used in SQL statements. An important implication of this is the for accessing columns names via JDBC DatabaseMetaData: the internal form, which is the ALL UPPERCASE must be used if the column name was not quoted in the CREATE TABLE statement.

                Quoted identifiers can be used as names (for tables, columns, constraints or indexes). Quoted identifiers start and end with " (one doublequote). A quoted identifier can contain any Unicode character, including space. In a quoted identifier use "" (two doublequotes) to create a " (one doublequote). With quoted identifiers it is possible to create mixed-case table and column names. Example:

                    CREATE TABLE "Address" ("Nr" INTEGER,"Name" VARCHAR);
                    SELECT "Nr", "Name" FROM "Address";

                The equivalent quoted identifier can be used for an unquoted identifer by converting the identifier to all uppercase and quoting it. For example, if a table name is defined as Address2 (unquoted), it can be referred to by its quoted form, "ADDRESS2", as well as address2, aDDress2 and ADDRESS2. Quoted identifiers should not be confused with SQL strings.

                Quoting can sometimes be used for identifiers, aliases or functions when there is an ambiguity. For example:

                    SELECT COUNT(*) "COUNT" FROM MYTABLE;
                    SELECT "LEFT"(COL1, 2) FROM MYTABLE;

                Although HSQLDB 1.8.0 does not force unquoted identifiers to contain only ASCII characters, the use of non-ASCII characters in these identifiers does not comply with SQL standards. Portability between different JRE locales could be an issue when accented characters (or extended unicode characters) are used in unquoted identifiers. Because native Java methods are used to convert the identifier to uppercase, the result may vary not be expected in different locales. It is recommended that accented characters are used only in quoted identifiers.

                When using JDBC DatabaseMetaData methods that take table, column, or index identifiers as arguments, treat the names as they are registered in the database. With these methods, unquoted identifiers should be used in all-uppercase to get the correct result. Quoted identifiers should be used in the exact case combination as they were defined - no quote character should be included around the name. JDBC methods that return a result set containing such identifiers return unquoted identifiers as all-uppercase and quoted identifiers in the exact case they are registered in the database (a change from 1.6.1 and previous versions).

                Please also note that the JDBC getXXX(String columnName) methods interpret the columnName as case-independent. This is a general feature of JDBC and not specific to HSQLDB.

                password

                Passwords must be double quoted and used consistently. Passwords are case insensitive only for backward compatibility. This may change in future versions.

                values
                • A DATE literal starts and ends with ' (singlequote), the format is yyyy-mm-dd (see java.sql.Date.

                • A TIME liteal starts and ends with ' (singlequote), the format is hh:mm:ss (see java.sql.Time).

                • A TIMESTAMP or DATETIME literal starts and ends with ' (singlequote), the format is yyyy-mm-dd hh:mm:ss.SSSSSSSSS (see java.sql.Timestamp).

                When specifying default values for date / time columns in CREATE TABLE statements, or in SELECT,INSERT, and UPDATE statements, special SQL functions: NOW, SYSDATE, TODAY, CURRENT_TIMESTAMP, CURRENT_TIME and CURRENT_DATE (case independent) can be used. NOW is used for TIME and TIMESTAMP columns, TODAY is used for DATE columns. The data and time variants CURRENT_* are SQL standard versions and should be used in preference to others. Example:

                    CREATE TABLE T(D DATE DEFAULT CURRENT_DATE);
                    CREATE TABLE T1(TS TIMESTAMP DEFAULT CURRENT_TIMESTAMP);

                Binary data starts and ends with ' (singlequote), the format is hexadecimal. '0004ff' for example is 3 bytes, first 0, second 4 and last 255 (0xff).

                Any number of commands may be combined. With combined commands, ';' (semicolon) must be used at the end of each command to ensure data integrity, despite the fact that the engine may understand the end of commands and not return an error when a semicolon is not used.



                [2] These features were added by HSQL Development Group since April 2001

                hsqldb-1.8.0.10.orig/doc/guide/ch08.html0000644000175000017500000053346210665324656016143 0ustar renereneChapter 8. SqlTool

                Chapter 8. SqlTool

                SqlTool Manual

                Blaine Simpson

                HSQLDB Development Group

                $Date: 2007/08/09 23:53:01 $

                Purpose, Coverage, Changes in Behavior

                Purpose, Coverage, Changes in Behavior

                This document explains how to use SqlTool, the main purpose of which is to read your SQL text file or stdin, and execute the SQL commands therein against a JDBC database. There are also a great number of features to facilitate both interactive use and automation. The following paragraphs explain in a general way why SqlTool is better than any existing tool for text-mode interactive SQL work, and for automated SQL tasks. Two important benefits which SqlTool shares with other pure Java JDBC tools is that users can use a consistent interface and syntax to interact with a huge variety of databases-- any database which supports JDBC; plus the tool itself runs on any Java platform. Instead of using isql for Sybase, psql for Postgresql, Sql*plus for Oracle, etc., you can use SqlTool for all of them. As far as I know, SqlTool is the only production-ready, pure Java, command-line, generic JDBC client. Several databases come with a command-line client with limited JDBC abilities (usually designed for use with their specific database).

                SqlTool is purposefully not a Gui tool like Toad or DatabaseManager. There are many use cases where a Gui SQL tool would be better. Where automation is involved in any way, you really need a text client to at least test things properly and usually to prototype and try things out. A command-line tool is really better for executing SQL scripts, any form of automation, direct-to-file fetching, and remote client usage. To clarify this last, if you have to do your SQL client work on a work server on the other side of a VPN connection, you will quickly appreciate the speed difference between text data transmission and graphical data transmission, even if using VNC or Remote Console. Another case would be where you are doing some repetitive or very structured work where variables or language features would be useful. Gui proponents may disagree with me, but scripting (of any sort) is more efficient than repetitive copy & pasting with a Gui editor. SqlTool starts up very quickly, and it takes up a tiny fraction of the RAM required to run a comparably complex Gui like Toad.

                SqlTool is superior for interactive use because over many years it has evolved lots of features proven to be efficient for day-to-day use. Three concise help commands (\?, :?, and *?) list all available commands of the corresponding type. SqlTool doesn't support up-arrow or other OOB escapes (due to basic Java I/O limitations), but it more than makes up for this limitation with aliases, user variables, command-line history and recall, and command-line editing with extended Perl/Java regular expressions. The \d commands deliver JDBC metadata information as consistently as possible (in several cases, database-specific work-arounds are used to obtain the underlying data even though the database doesn't provide metadata according to the JDBC specs). Unlike server-side language features, the same feature set works for any database server. Database access details may be supplied on the command line, but day-to-day users will want to centralize JDBC connection details into a single, protected RC file. You can put connection details (username, password, URL, and other optional settings) for scores of target databases into your RC file, then connect to any of them whenever you want by just giving SqlTool the ID ("urlid") for that database. When you Execute SqlTool interactively, it behaves by default exactly as you would want it to. If errors occur, you are given specific error messages and you can decide whether to roll back your session. You can easily change this behavior to auto-commit, exit-upon-error, etc., for the current session or for all interactive invocations. You can import or export delimiter-separated-value files.

                When you Execute SqlTool with a SQL script, it behaves by default exactly as you would want it to. If any error is encountered, the connection will be rolled back, then SqlTool will exit with an error exit value. If you wish, you can detect and handle error (or other) conditions yourself. For scripts expected to produce errors (like many scripts provided by database vendors), you can have SqlTool continue-upon-error. For SQL script-writers, you will have access to portable scripting features which you've had to live without until now. You can use variables set on the command line or in your script. You can handle specific errors based on the output of SQL commands or of your variables. You can chain SQL scripts, invoke external programs, dump data to files, use prepared statements, Finally, you have a procedural language with if, foreach, while, continue, and break statements.

                Platforms and SqlTool versions covered

                SqlTool runs on any Java 1.4 or later platform. I haven't run it with a non-Sun JVM in years (like Blackdown, IBM, JRockit, etc.), but I've had no reports of problems with them, and SqlTool uses none of the Sun-proprietary classes directly. Some of the examples below use quoting which works exactly as-is for any Bourne-compatible UNIX shell. (Only line-continuation would need to be changed for C-compatible UNIX shells). I have not yet tested these commands on Windows, and I doubt whether the quoting will work just like this (though it is possible). SqlTool is still a very useful tool even if you have no quoting capability at all.

                If you are using SqlTool from a HSQLDB distribution before version 1.8.0.8 final, you should use the documentation with that distribution, because this manual documents many new features, several significant changes to interactive-only commands, and a few changes effecting backwards-compatibility (see next section about that). This document is now updated for the current versions of SqlTool and SqlFile at the time I am writing this (versions 333 and 354 correspondingly, SqlFile is the class which does most of the work for SqlTool). Therefore, if you are using a version of SqlTool or SqlFile that is more than a couple revisions greater, you should find a newer version of this document. (The imprecision is due to content-independent revision increments at build time, and the likelihood of one or two behavior-independent bug fixes after public releases). The startup banner will report both versions when you run SqlTool interactively. (Dotted version numbers of SqlTool and SqlFile are older than 333 and 354).

                This guide covers SqlTool bundled with series 1.8 and 1.9 of HSQLDB. [1]

                Functional Changes

                This section lists changes to SqlTool since the last major release of HSQLDB which may effect the portability of SQL scripts. For this revision of this document, this list consists of script-impacting changes made to SqlTool after the final 1.8.0.0 HSQLDB release. I'm specifically not listing changes to interactive-only commands (":" commands, with one legacy exception which is listed below), since these commands can't be used in SQL scripts; and I'm specifically not listing backwards-compatible feature additions and enhancements. The reason for limiting the change list to only portability- impacting changes is that a list of all enhancements since just 1.8.0.0 would be pages long.

                • SqlTool now consistently outputs \r\n line breaks when on \r\n-linebreak platforms, like Windows. This includes output written to stdout, \w files, and \o files.
                • Time type values are always output with the date as well as the time. This was required in order to produce consistent output for the wildly varying formats provided by different database vendors.
                • DSV input now takes JDBC Timestamp format with date and optionally time of day.
                • The command ":;" is now strictly an interactive command. If you want to repeat a command in an SQL scripts, just repeat the exact text of the command. Non-interactive use now has no dependency on command history.
                • The command ":w" has replace the command \w. Unlike writing "output" to a file with \w, :w is used to write SQL "commands", and this is an interactive feature.
                • Shell scripts using raw mode (e.g. PL/SQL scripts) must terminate the raw code with a line containing ".;", which will also send the code to the database for execution. (The old "." command has been changed to ":." to make it very clear that the command is now an interactive command).
                • The --sql argument will never automatically append a semicolon to the text you provide. If you want to execute a command ending with a semi-- then type a semi.

                Although it doesn't effect scripts, I will mention a significant recent change to interactive commands. Special and PL commands are not stored to the edit buffer and to command history, so they can be recalled and edited just like SQL commands. Now, only edit/history : commands are not stored to the buffer and history.

                The Bare Minimum You Need to Know to Run SqlTool

                Warning

                If you are using an Oracle database server, it will commit your current transaction if you cleanly disconnect, regardless of whether you have set auto-commit or not. This will occur if you exit SqlTool (or any other client) in the normal way (as opposed to killing the process or using Ctrl-C, etc.). This is mentioned in this section only for brevity, so I don't need to mention it in the main text in the many places where auto-commit is discussed. This behavior has nothing to do with SqlTool. It is a quirk of Oracle.

                If you want to use SqlTool, then you either have an SQL text file, or you want to interactively type in SQL commands. If neither case applies to you, then you are looking at the wrong program.

                Procedure 8.1. To run SqlTool...

                1. Copy the file sqltool.rc from the directory sample [1] of your HSQLDB distribution to your home directory and secure access to it if your computer is accessible to anybody else (most likely from the network). This file will work as-is for a Memory Only database instance; or if your target is a HSQLDB Server running on your local computer with default settings and the password for the "sa" account is blank (the sa password is blank when new HSQLDB database instances are created). Edit the file if you need to change the target Server URL, username, password, character set, JDBC driver, or TLS trust store as documented in the RC File Authentication Setup section. (You could, alternatively, use the --inlineRc command-line switch to specify your connection parameters as documented in the Using Inline RC Authentication section).

                2. Find out where your hsqldb.jar file resides. It typically resides at HSQLDB_HOME/lib/hsqldb.jar where HSQLDB_HOME is the base directory of your HSQLDB software installation. For this reason, I'm going to use "$HSQLDB_HOME/lib/hsqldb.jar" as the path to hsqldb.jar for my examples, but understand that you need to use the actual path to your own hsqldb.jar file.

                3. Run

                      java -jar $HSQLDB_HOME/lib/hsqldb.jar --help
                  to see what command-line arguments are available. Note that you don't need to worry about setting the CLASSPATH when you use the -jar switch to java. Assuming that you set up your SqlTool RC file at the default location and you want to use the HSQLDB JDBC driver, you will want to run something like
                      java -jar $HSQLDB_HOME/lib/hsqldb.jar mem
                  for interactive use, or
                      java -jar $HSQLDB_HOME/lib/hsqldb.jar --sql 'SQL statement;' mem
                  or
                      java -jar $HSQLDB_HOME/lib/hsqldb.jar mem filepath1.sql...
                  where mem is an urlid, and the following arguments are paths to text SQL files. For the filepaths, you can use whatever wildcards your operating system shell supports.

                  The urlid mem in these commands is a key into your RC file, as explained in the RC File Authentication Setup section. Since this is a Memory Only database, you can use SqlTool with this urlid immediately with no database setup whatsoever (however, you can't persist any changes that you make to this database). The sample sqltool.rc file also defines the urlid "localhost-sa" for a local HSQLDB Server. At the end of this section, I explain how you can load some sample data to play with, if you want to.

                Important

                SqlTool does not commit SQL changes by default. This leaves it to the user's disgression whether to commit or rollback their modifications. Remember to either run \= to commit before quitting SqlTool (most databases also support the SQL command commit;, or use the --autoCommit command-line switch.

                If you put a file named auto.sql into your home directory, this file will be executed automatically every time that you run SqlTool interactively and without the --noAutoFile switch.

                To use a JDBC Driver other than the HSQLDB driver, you can't use the -jar switch because you need to modify the classpath. You must add the hsqldb.jar file and your JDBC driver classes to your classpath, and you must tell SqlTool what the JDBC driver class name is. The latter can be accomplished by either using the "--driver" switch, or setting "driver" in your config file. The RC File Authentication Setup section. explains the second method. Here's an example of the first method (after you have set the classpath appropriately).

                java org.hsqldb.util.SqlTool --driver oracle.jdbc.OracleDriver urlid

                Tip

                If the tables of query output on your screen are all messy because of lines wrapping, the best and easiest solution is usually to resize your terminal emulator window to make it wider. (With some terms you click & drag the frame edges to resize, with others you use a menu system where you can enter the number of columns).

                If you are using SqlTool to connect to a HSQLDB network server or any non-HSQLDB database, you may prefer to use the jar file hsqltool.jar or hsqldbutil.jar instead of hsqldb.jar. These alternative jar files contain all of SqlTool without stuff you don't need, but you will have to follow a simple procedure to generate these jars. See the Using hsqltool.jar and hsqldbutil.jar section.

                Non-displayable Types

                There are many SQL types which SqlTool (being a text-based program) can't display properly. This includes the SQL types BLOB, JAVA_OBJECT, STRUCT, and OTHER. When you run a query that returns any of these, SqlTool will save the very first such value obtained to the binary buffer and will not display any output from this query. You can then save the binary value to a file, as explained in the Storing and retrieving binary files section.

                There are other types, such as BINARY, which JDBC can make displayable (by using ResultSet.getString()), but which you may very well want to retrieve in raw binary format. You can use the \b command to retrieve any-column-type-at-all in raw binary format (so you can later store the value to a binary file).

                Another restriction which all text-based database clients have is the practical inability for the user to type in binary data such as photos, audio streams, and serialized Java objects. You can use SqlTool to load any binary object into a database by telling SqlTool to get the insert/update datum from a file. This is also explained in the Storing and retrieving binary files section.

                Desktop shortcuts

                Desktop shortcuts and quick launch icons are useful, especially if you often run SqlTool with the same set of arguments. It's really easy to set up several of them-- one for each way that you invoke SqlTool (i.e., each one would start SqlTool with all the arguments for one of your typical startup needs). One typical setup is to have one shortcut for each database account which you normally use (use a different urlid argument in each shortcut's Target specification.

                Desktop icon setup varies depending on your Desktop manager, of course. I'll explain how to set up a SqlTool startup icon in Windows XP. Linux and Mac users should be able to take it from there, since it's easier with the common Linux and Mac desktops.

                Procedure 8.2. Creating a Desktop Shortcut for SqlTool

                1. Right click in the main Windows background.

                2. New

                3. Shortcut

                4. Browse

                5. Navigate to where your good JRE lives. For recent Sun JRE's, it installs to C:\Program Files\Java\*\bin by default (the * will be a JDK or JRE name and version number).

                6. Select java.exe.

                7. OK

                8. Next

                9. Enter any name

                10. Finish

                11. Right click the new icon.

                12. Properties

                13. Edit the Target field.

                14. Leave the path to java.exe exactly as it is, including the quotes, but append to what is there. Beginning with a space, enter the command-line that you want run.

                15. Change Icon... to a pretty icon.

                16. If you want a quick-launch icon instead of (or in addition to) a desktop shortcut icon, click and drag it to your quick launch bar. (You may or may not need to edit the Windows Toolbar properties to let you add new items).

                Loading sample data

                If you want some sample database objects and data to play with, execute the sampledata.sql SQL file. sampledata.sql resides in the sample directory of your HSQLDB distribution [1]. To separate the sample data from your regular data, you can put it into its own schema by running this before you import:

                    CREATE SCHEMA sampledata AUTHORIZATION dba;
                    SET SCHEMA sampledata;
                Run it like this from an SqlTool session
                \i HSQLDB_HOME/sample/sampledata.sql
                where HSQLDB_HOME is the base directory of your HSQLDB software installation [1].

                For memory-only databases, you'll need to run this every time that you run SqlTool. For other (persistent) databases, the data will reside in your database until you drop the tables.

                RC File Authentication Setup

                RC file authentication setup is accomplished by creating a text RC configuration file. In this section, when I say configuration or config file, I mean an RC configuration file. RC files can be used by any JDBC client program that uses the org.hsqldb.util.RCData class-- this includes SqlTool, DatabaseManager, DatabaseManagerSwing. You can use it for your own JDBC client programs too.

                The following sample RC file resides at sample/sqltool.rc in your HSQLDB distribution [1].

                Example 8.1. Sample RC File

                # $Id: sqltool.rc,v 1.22 2007/08/09 03:22:21 unsaved Exp $
                
                # This is a sample RC configuration file used by SqlTool, DatabaseManager,
                # and any other program that uses the org.hsqldb.util.RCData class.
                
                # You can run SqlTool right now by copying this file to your home directory
                # and running
                #    java -jar /path/to/hsqldb.jar mem
                # This will access the first urlid definition below in order to use a 
                # personal Memory-Only database.
                # "url" values may, of course, contain JDBC connection properties, delimited
                # with semicolons.
                
                # If you have the least concerns about security, then secure access to
                # your RC file.
                # See the documentation for SqlTool for various ways to use this file.
                
                # A personal Memory-Only (non-persistent) database.
                urlid mem
                url jdbc:hsqldb:mem:memdbid
                username sa
                password
                
                # A personal, local, persistent database.
                urlid personal
                url jdbc:hsqldb:file:${user.home}/db/personal;shutdown=true
                username sa
                password
                # When connecting directly to a file database like this, you should 
                # use the shutdown connection property like this to shut down the DB
                # properly when you exit the JVM.
                
                # This is for a hsqldb Server running with default settings on your local
                # computer (and for which you have not changed the password for "sa").
                urlid localhost-sa
                url jdbc:hsqldb:hsql://localhost
                username sa
                password
                
                
                
                # Template for a urlid for an Oracle database.
                # You will need to put the oracle.jdbc.OracleDriver class into your 
                # classpath.
                # In the great majority of cases, you want to use the file classes12.zip
                # (which you can get from the directory $ORACLE_HOME/jdbc/lib of any
                # Oracle installation compatible with your server).
                # Since you need to add to the classpath, you can't invoke SqlTool with
                # the jar switch, like "java -jar .../hsqldb.jar..." or 
                # "java -jar .../hsqlsqltool.jar...".
                # Put both the HSQLDB jar and classes12.zip in your classpath (and export!)
                # and run something like "java org.hsqldb.util.SqlTool...".
                
                #urlid cardiff2
                #url jdbc:oracle:thin:@aegir.admc.com:1522:TRAFFIC_SID
                #username blaine
                #password secretpassword
                #driver oracle.jdbc.OracleDriver
                
                
                
                # Template for a TLS-encrypted HSQLDB Server.
                # Remember that the hostname in hsqls (and https) JDBC URLs must match the
                # CN of the server certificate (the port and instance alias that follows 
                # are not part of the certificate at all).
                # You only need to set "truststore" if the server cert is not approved by
                # your system default truststore (which a commercial certificate probably
                # would be).
                
                #urlid tls
                #url jdbc:hsqldb:hsqls://db.admc.com:9001/lm2
                #username blaine
                #password asecret
                #truststore /home/blaine/ca/db/db-trust.store
                
                
                # Template for a Postgresql database
                #urlid blainedb
                #url jdbc:postgresql://idun.africawork.org/blainedb
                #username blaine
                #password losung1
                #driver org.postgresql.Driver
                
                # Template for a MySQL database.  MySQL has poor JDBC support.
                #urlid mysql-testdb
                #url jdbc:mysql://hostname:3306/dbname
                #username root
                #username blaine
                #password hiddenpwd
                #driver com.mysql.jdbc.Driver
                
                # Note that "databases" in SQL Server and Sybase are traditionally used for
                # the same purpose as "schemas" with more SQL-compliant databases.
                
                # Template for a Microsoft SQL Server database
                #urlid msprojsvr
                #url jdbc:microsoft:sqlserver://hostname;DatabaseName=DbName;SelectMethod=Cursor
                # The SelectMethod setting is required to do more than one thing on a JDBC
                # session (I guess Microsoft thought nobody would really use Java for 
                # anything other than a "hello world" program).
                # This is for Microsoft's SQL Server 2000 driver (requires mssqlserver.jar
                # and msutil.jar).
                #driver com.microsoft.jdbc.sqlserver.SQLServerDriver
                #username myuser
                #password hiddenpwd
                
                # Template for a Sybase database
                #urlid sybase
                #url jdbc:sybase:Tds:hostname:4100/dbname
                #username blaine
                #password hiddenpwd
                # This is for the jConnect driver (requires jconn3.jar).
                #driver com.sybase.jdbc3.jdbc.SybDriver
                
                # Template for Embedded Derby / Java DB.
                #urlid derby1
                #url jdbc:derby:path/to/derby/directory;create=true
                #username ${user.name}
                #password any_noauthbydefault
                #driver org.apache.derby.jdbc.EmbeddedDriver
                # The embedded Derby driver requires derby.jar.
                # There'a also the org.apache.derby.jdbc.ClientDriver driver with URL
                # like jdbc:derby://<server>[:<port>]/databaseName, which requires
                # derbyclient.jar.
                # You can use \= to commit, since the Derby team decided (why???)
                # not to implement the SQL standard statement "commit"!!
                # Note that SqlTool can not shut down an embedded Derby database properly,
                # since that requires an additional SQL connection just for that purpose.
                # However, I've never lost data by not shutting it down properly.
                # Other than not supporting this quirk of Derby, SqlTool is miles ahead of ij.
                

                You can put this file anywhere you want to, and specify the location to SqlTool/DatabaseManager/DatabaseManagerSwing by using the --rcfile argument. If there is no reason to not use the default location (and there are situations where you would not want to), then use the default location and you won't have to give --rcfile arguments to SqlTool/DatabaseManager/DatabaseManagerSwing. The default location is sqltool.rc or dbmanager.rc in your home directory (corresponding to the program using it). If you have any doubt about where your home directory is, just run SqlTool with a phony urlid and it will tell you where it expects the configuration file to be.

                    java -jar $HSQLDB_HOME/lib/hsqldb.jar x

                The config file consists of stanza(s) like this:

                    urlid web
                    url jdbc:hsqldb:hsql://localhost
                    username web
                    password webspassword

                These four settings are required for every urlid. (There are optional settings also, which are described a couple paragraphs down). The URL may contain JDBC connection properties. You can have as many blank lines and comments like

                    # This comment

                in the file as you like. The whole point is that the urlid that you give in your SqlTool/DatabaseManager command must match a urlid in your configuration file.

                Important

                Use whatever facilities are at your disposal to protect your configuration file.

                It should be readable, both locally and remotely, only to users who run programs that need it. On UNIX, this is easily accomplished by using chmod/chown commands and making sure that it is protected from anonymous remote access (like via NFS, FTP or Samba).

                You can also put the following optional settings into a urlid stanza. The setting will, of course, only apply to that urlid.

                charset
                This is used by the SqlTool program, but not by the DatabaseManager programs. See the Character Encoding section of the Non-Interactive section. You can, alternatively, set this for one SqlTool invocation by setting the system property sqlfile.charset . Defaults to US-ASCII.
                driver
                Sets the JDBC driver class name. You can, alternatively, set this for one SqlTool/DatabaseManager invocation by using the command line switch --driver. Defaults to org.hsqldb.jdbcDriver.
                truststore
                TLS trust keystore store file path as documented in the TLS chapter. You usually only need to set this if the server is using a non-publicly-certified certificate (like a self-signed self-ca'd cert).

                Property and SqlTool command-line switches override settings made in the configuration file.

                Using Inline RC Authentication

                Inline RC authentication setup is accomplished by using the --inlineRc command-line switch on SqlTool. The --inlineRc command-line switch takes a comma-separated list of key/value elements. The url and user elements are required. The rest are optional.

                url
                The JDBC URL of the database you wish to connect to.
                user
                The username to connect to the database as.
                charset
                Sets the character encoding. Defaults to US-ASCII.
                trust
                The TLS trust keystore file path as documented in the TLS chapter.
                password
                You may only use this element to set empty password, like
                                    password=
                . For any other password value, omit the password element and you will be prompted for the value.

                (Use the --driver switch instead of --inlineRc to specify a JDBC driver class). Here is an example of invoking SqlTool to connect to a standalone database.

                    java -jar $HSQLDB_HOME/lib/hsqldb.jar
                         --inlineRc URL=jdbc:hsqldb:file:/home/dan/dandb,USER=dan

                For security reasons, you cannot specify a non-empty password as an argument. You will be prompted for a password as part of the login process.

                Using the current version of SqlTool with an older HSQLDB distribution.

                This procedure will allow users of a legacy version of HSQLDB to use all of the new features of SqlTool. You will also get the new versions of the DatabaseManagers! This procedure works for distros going back to 1.7.3.3 at least, probably much farther.

                Follow the instructions in the See the Using hsqltool.jar and hsqldbutil.jar section to build the jar file hsqldbutil.jar.

                For now on, whenever you are going to run SqlTool, make sure that you have this hsqldbutil.jar as the first item in your CLASSPATH. You can't run SqlTool with the "-jar" switch (because the -jar switch doesn't permit setting your own class path).

                Here's a UNIX example where somebody wants to use the new SqlTool with their older HSQLDB database, as well as with Postgresql and a local application.

                CLASSPATH=/path/to/hsqldbutil.jar:/home/bob/classes:/usr/local/lib/pg.jdbc3.jar
                export CLASSPATH
                java org.hsqldb.util.SqlTool urlid

                Interactive Usage

                Do read the The Bare Minimum section before you read this section.

                You run SqlTool interactively by specifying no SQL filepaths on the SqlTool command line. Like this.

                    java -jar $HSQLDB_HOME/lib/hsqldb.jar urlid

                Procedure 8.3. What happens when SqlTool is run interactively (using all default settings)

                1. SqlTool starts up and connects to the specified database, using your SqlTool configuration file (as explained in the RC File Authentication Setup section).

                2. SQL file auto.sql in your home directory is executed (if there is one),

                3. SqlTool displays a banner showing the SqlTool and SqlFile version numbers and describes the different command types that you can give, as well as commands to list all of the specific commands available to you.

                You exit your session by using the "\q" special command or ending input (like with Ctrl-D or Ctrl-Z).

                Important

                Every command (regardless of type) and comment must begin at the beginning of a line (or immediately after a comment ends with "*/").

                You can't nest commands or comments. You can only start new commands (and comments) after the preceding statement has been terminated. (Remember that if you're running SqlTool interactively, you can terminate an SQL statement without executing it by entering a blank line).

                (Special Commands, Edit Buffer Commands and PL Commands always consist of just one line. Any of these commands or comments may be preceded by space characters.)

                These rules do not apply at all to Raw Mode. Raw mode is for use by advanced users when they want to completely bypass SqlTool processing in order to enter a chunk of text for direct transmission to the database engine.

                Command Types

                When you are typing into SqlTool, you are always typing part of the immediate command. You execute the immediate command by hitting ENTER after a semi-colon (for SQL commands) or by just hitting ENTER (after any other non-empty command-- see next section about this distinction). The interactive : commands can perform actions with or on the edit buffer. The edit buffer usually contains a copy of the last command executed, and you can always view it with the :b command. If you never use any : commands, you can entirely ignore the edit buffer. If you want to repeat commands or edit previous commands, you will need to work with the edit buffer. The immediate command contains whatever (and exactly what) you type. The command history and edit buffer may contain any type of command other than comments and : commands (i.e., : commands and comments are just not copied to the history or to the edit buffer).

                Hopefully an example will clarify the difference between the immediate command and the edit buffer. If you type in the edit buffer Substitution command ":s/tbl/table/", the :s command that you typed is the immediate command (and it will never be stored to the edit buffer or history, since it is a : command), but the purpose of the substitution command is to modify the contents of the edit buffer (perform a substitution on it)-- the goal being that after your substitutions you would execute the buffer with the ":;" command. The ":a" command is special in that when you hit ENTER to execute it, it copies the contents of the edit buffer to a new immediate command and leaves you in a state where you are appending to that immediate command (nearly) exactly as if you had just typed it in.

                Command Types

                Command types

                Note

                Above, we said that if you enter an SQL command, one SQL command corresponds to one SqlTool command. This is the most typical usage, however, you can actually put multiple SQL statements into one SQL command. One example would be

                    INSERT INTO t1 VALUES(0); SELECT * FROM t1;
                This is one SqlTool command containing two SQL statements. See the Chunking section to see why you may want to chunk SQL commands, how, and the implications.

                SQL Statement

                Any command that you enter which does not begin with "\", ":", or "* " is an SQL Statement. The command is not terminated when you hit ENTER, like most OS shells. You terminate SQL Statements with either ";" at the end of a line, or with a blank line. In the former case, the SQL Statement will be executed against the SQL database and the command will go into the edit buffer and SQL command history for editing or viewing later on. In the former case, execute against the SQL database means to transmit the SQL text to the database engine for execution. In the latter case (you end an SQL Statement with a blank line), the command will go to the edit buffer and SQL history, but will not be executed (but you can execute it later from the edit buffer). (See the note immediately above about multiple SQL statements in one SqlTool command).

                (Blank lines are only interpreted this way when SqlTool is run interactively. In SQL files, blank lines inside of SQL statements remain part of the SQL statement).

                As a result of these termination rules, whenever you are entering text that is not a Special Command, Edit Buffer / History Command, or PL Command, you are always appending lines to an SQL Statement or comment. (In the case of the first line, you will be appending to an empty SQL statement. I.e. you will be starting a new SQL Statement or comment).

                Special Command
                Run the command "\?" to list the Special Commands. All of the Special Commands begin with "\". I'll describe some of the most useful Special Commands below.
                Edit Buffer / History Command
                Run the command ":?" to list the Edit-Buffer/History Commands. All of these commands begin with ":". These commands use commands from the command history, or operate upon the edit "buffer", so that you can edit and/or (re-)execute previously entered commands.
                PL Command

                Procedural Langage commands. Run the command "*?" to list the PL Commands. All of the PL Commands begin with "*". PL commands are for setting and using scripting variables and conditional and flow control statements like * if and * while. A few PL features (such as PL aliases and updating and selecing data directly from/to files) can be a real convenience for nearly all users, so these features will be discussed briefly in this section. More detailed explanation of PL variables and the other PL features, with examples, are covered in the SqlTool Procedural Language section.

                Raw Mode
                The descriptions of command-types above do not apply to Raw Mode. In raw mode, SqlTool doesn't interpret what you type at all. It all just goes into the edit buffer which you can send to the database engine. Beginners can safely ignore raw mode. You will never encounter it unless you run the "\." special command, or enter a PL/SQL command. See the Raw Mode section for the details.

                Special Commands

                Essential Special Commands

                \?
                help
                \q
                quit
                \i path/to/script.sql
                execute the specified SQL script, then continue again interactively.
                \=
                commit the current SQL transaction. Most users are used to typing the SQL statement commit;, but this command is crucial for those databases which don't support the statement. It's obviously unnecessary if you have auto-commit mode on.
                \x?
                List a summary of DSV eXporting, and all available DSV options.
                \m?
                List a summary of DSV iMporting, and all available DSV options.
                \d?
                List a summary of the \d commands below.
                \dt [filter_substring]
                \dv [filter_substring]
                \ds [filter_substring]
                \di [table_name]
                \dS [filter_substring]
                \da [filter_substring]
                \dn [filter_substring]
                \du [filter_substring]
                \dr [filter_substring]
                \d* [filter_substring]

                Lists available objects of the given type.

                • t: non-system Tables
                • v: Views
                • s: Sequences
                • i: Indexes
                • S: System tables
                • a: Aliases
                • n: schema Names
                • u: database Users
                • r: Roles
                • *: all table-like objects
                If your database supports schemas, then the schema name will also be listed.

                If you supply an optional filter substring, then only items which contain the given substring (in the object name or schema name) will be listed.

                Important

                The substring test is case-sensitive! Even though in SQL queries and for the "\d objectname" command object names are usually case-insensitive, for the \dX commands, you must capitalize the filter substring exactly as it will appear in the special command output. This is an inconvenience, since the database engine will change names in SQL to default case unless you double-quote the name, but that is server-side functionality which cannot (portably) be reproduced by SqlTool. You can use spaces and other special characters in the string.

                Tip

                Filter substrings ending with "." are special. If a substring ends with ".", then this means to narrow the search by the exact, case-sensitive schema name given. For example, if I run "\d* BLAINE.", this will list all table-like database objects in the "BLAINE" schema. The capitalization of the schema must be exactly the same as how the schema name is listed by the "\dn" command. You can use spaces and other special characters in the string. (I.e., enter the name exactly how you would enter it inside of double-quotes in an SQL command). This is an inconvenience, since the database engine will change names in SQL to default case unless you double-quote the name, but that is server-side functionality which cannot (portably) be reproduced by SqlTool.

                Important

                Indexes may not be searched for by substring, only by exact target table name. So if I1 is an index on table T1, then you list this index by running "\di T1". In addition, many database vendors will report on indexes only if a target table is identified. Therefore, "\di" with no argument will fail if your database vendor does not support it.

                \d objectname [filter]

                Lists names of columns in the specified table or view. objectname may be a base table name or a schema.object name.

                If you supply a filter string, then only columns with a name containing the given filter will be listed. The objectname is nearly always case-insensitive (depends on your database), but the filter is always case-sensitive. You'll find this filter is a great convenience compared to other database utilities, where you have to list all columns of large tables when you are only interested in one of them.

                Tip

                When working with real data (as opposed to learning or playing), I often find it useful to run two SqlTool sessions in two side-by-side terminal emulator windows. I do all of my real work in one window, and use the other mostly for \d commands. This way I can refer to the data dictionary while writing SQL commands, without having to scroll.

                This list here includes only the essential Special Commands, but n.b. that there are other useful Special Commands which you can list by running \?. (You can, for example, execute SQL from external SQL files, and save your interactive SQL commands to files). Some specifics of these other commands are specified immediately below, and the Generating Text or HTML Reports section explains how to use the "\o" and "\H" special commands to generate reports.

                Be aware that the \! Special Command does not work for external programs that read from standard input. You can invoke non-interactive and graphical interactive programs, but not command-line interactive programs.

                SqlTool executes \! programs directly, it does not run an operating system shell (this is to avoid OS-specific code in SqlTool). Because of this, you can give as many command-line arguments as you wish, but you can't use shell wildcards or redirection.

                The \w command can be used to store any command in your SQL history to a file. Just restore the command to the edit buffer with a command like "\-4" before you give the \w command.

                Edit Buffer / History Commands

                Edit Buffer / History Commands

                :?
                help
                :b
                List the current contents of the edit buffer.
                :h
                Shows the Command History. For each command which has been executed (up to the max history length), the SQL command history will show the command; its command number (#); and also how many commands back it is (as a negative number). : commands are never added to the history list. You can then use either form of the command identifier to recall a command to the edit buffer (the command described next) or as the target of any of the following : commands. This last is accomplished in a manner very similar to the vi editor. You specify the target command number between the colon and the command. As an example, if you gave the command :s/X/Y/, that would perform the substitution on the contents of the edit buffer; but if you gave the command :-3 s/X/Y/, that would perform the substitution on the command 3 back in the command history (and copy the output to the edit buffer). Also, just like vi, you can identify the command to recall by using a regular expression inside of slashes, like :/blue/ s/X/Y/ to operate on the last command you ran which contains "blue".
                :13 OR :-2 OR :/blue/

                Recalls a command from Command history to the edit buffer. Enter ":" followed by the positive command number from Command history, like ":13"... or ":" followed by a negative number like ":-2" for two commands back in the Command history... or ":" followed by a regular expression inside slashes, like ":/blue/" to recall the last command which contains "blue". The specified command will be written to the edit buffer so that you can execute it or edit it using the commands below.

                As described under the :h command immediately above, you can follow the command number here with any of the commands below to perform the given operation on the specified command from history instead of on the edit buffer contents. So, for example, ":4;" would load command 4 from history then execute it (see the ":;" command below).

                :;
                Executes the SQL, Special or PL statement in the edit buffer (by default). This is an extremely useful command. It's easy to remember because it consists of ":", meaning Edit Buffer Command, plus a line-terminating ";", (which generally means to execute an SQL statement, though in this case it will also execute a special or PL command).
                :a

                Enter append mode with the contents of the edit buffer (by default) as the current command. When you hit ENTER, things will be exactly as if you physically re-typed the command that is in the edit buffer. Whatever lines you type next will be appended to the immediate command. As always, you then have the choice of hitting ENTER to execute a Special or PL command, entering a blank line to store back to the edit buffer, or end a SQL statement with semi-colon and ENTER to execute it.

                You can, optionally, put a string after the :a, in which case things will be exactly as just described except the additional text will also be appended to the new immediate command. If you put a string after the :a which ends with ;, then the resultant new immediate command will just be executed right away, as if you typed in and entered the entire thing.

                If your edit buffer contains SELECT x FROM mytab and you run a:le, the resultant command will be SELECT x FROM mytable. If your edit buffer contains SELECT x FROM mytab and you run a: ORDER BY y, the resultant command will be SELECT x FROM mytab ORDER BY y. Notice that in the latter case the append text begins with a space character.

                :s/from regex/to string/switches

                The Substitution Command is the primary method for SqlTool command editing-- it operates upon the current edit buffer by default. The "to string" and the "switches" are both optional (though the final "/" is not). To start with, I'll discuss the use and behavior if you don't supply any substitution mode switches.

                Don't use "/" if it occurs in either "from string" or "to string". You can use any character that you want in place of "/", but it must not occur in the from or to strings. Example

                    :s@from string@to string@

                The to string is substituted for the first occurrence of the (case-specific) from string. The replacement will consider the entire SQL statement, even if it is a multi-line statement.

                In the example above, the from regex was a plain string, but it is interpreted as a regular expression so you can do all kinds of powerful substitutions. See the perlre man page, or the java.util.regex.Pattern API Spec for everything you need to know about extended regular expressions.

                Don't end a to string with ";" in attempt to make a command execute. There is a substitution mode switch to use for that purpose.

                You can use any combination of the substitution mode switches.

                • Use "i" to make the searches for from regex case insensitive.

                • Use "g" to substitute Globally, i.e., to subsitute all occurrences of the from regex instead of only the first occurrence found.

                • Use ";" to execute the command immediately after the substitution is performed.

                • Use "m" for ^ and $ to match each line-break in a multi-line edit buffer, instead of just at the very beginning and every end of the entire buffer.

                If you specify a command number (from the command history), you end up with a feature very reminiscent of vi, but even more powerful, since the Perl/Java regular expression are a superset of the vi regular expressions. As an example,

                                    :24 s/pin/needle/g;
                                    
                would start with command number 24 from command history, substitute "needle" for all occurrences of "pin", then execute the result of that substitution (and this final statement will of course be copied to the edit buffer and to command history).

                :w /path/to/file.sql
                This appends the contents of the current buffer (by default) to the specified file. Since what is being written are Special, PL, or SQL commands, you are effectively creating an SQL script.

                I find the ":/regex/" and ":/regex/;" constructs particularly handy for every-day usage.

                                    :/\\d/;
                re-executes the last \d command that you gave (The extra "\" is needed to escape the special meaning of "\" in regular expressions). It's great to be able to recall and execute the last "insert" command, for example, without needing to check the history or keep track of how many commands back it was. To re-execute the last insert command, just run ":/insert/;". If you want to be safe about it, do it in two steps to verify that you didn't accidentally recall some other command which happened to contain the string "insert", like
                    :/insert/
                    :;
                (Executing the last only if you are satisfied when SqlTool reports what command it restored). Often, of course, you will want to change the command before re-executing, and that's when you combine the :s and :a commands.

                We'll finish up with a couple fine points about Edit/Buffer commands. You generally can't use PL variables in Edit/Buffer commands, to eliminate possible ambiguities and complexities when modifying commands. The :w command is an exception to this rule, since it can be useful to use variables to determine the output file, and this command does not do any "editing".

                The :? help explains how you can change the default regular expression matching behavior (case sensitivity, etc.), but you can always use syntax like "(?i)" inside of your regular expression, as described in the Java API spec for class java.util.regex.Pattern, found here. History-command-matching with the /regex/ construct is purposefully liberal, matching any portion of the command, case sensitive, etc., but you can still use the method just described to modify this behavior. In this case, you could use "(?-i)" at the beginning of your regular expression to be case-sensitive.

                PL Commands

                Essential PL Command

                * VARNAME = value

                Set the value of a variable. If the variable doesn't exist yet, it will be created. The most common use for this is so that you can later use it in SQL statements, print statements, and PL conditionals, by using the *{VARNAME} or *{:VARNAME} construct. The only difference between *{VARNAME} and *{:VARNAME} is that the former produces an error if VARNAME is not set, whereas the latter will expand to a zero-length string if VARNAME is not set.

                If you set a variable to an SQL statement (without the terminating ";") you can then use it as a PL alias like /VARNAME, as shown in this example.

                Example 8.2. Defining and using a PL alias (PL variable)

                    * qry = SELECT COUNT(*) FROM mytable
                    \p The stored query is '*{qry}'
                    /qry;
                    /qry WHERE mass > 200;

                If you put variable definitions into the SQL file auto.sql in your home directory, those aliases/variables will always be available for interactive use.

                PL variables can be expanded within all commands other than : edit/history commands.

                * load VARNAME /file/path.txt
                Sets VARNAME to the content of the specified ASCII file.
                * prepare VARNAME
                Indicate that next command should be a SQL INSERT or UPDATE command containing one question mark. The value of VARNAME will be substuted for the ? variable. This does work for CLOB columns.
                * VARNAME _
                When next SQL command is run, instead of displaying the rows, just store the very first column value to variable VARNAME. This works for CLOB columns too. It also works with Oracle XML type columns if you use column labels and the getclobval function.
                * VARNAME ~
                Exactly the same as
                * VARNAME ~
                except that the fetched results will be displayed in addition to setting the variable.
                * dump VARNAME /file/path.txt
                Store the value of VARNAME to the specified ASCII file.

                ? Variable

                You don't set the ? variable. It is just like the Bourne shell variable ? in that it is always automatically set to the first value of a result set (or the return value of other SQL commands). It works just like the

                * VARNAME ~
                command described above, but it all happens automatically. You can, of course, dereference ? like any PL variable, but it does not list with the
                list
                and
                listvalues
                commands. You can see the value whenever you want by running
                    \p  *{?}

                Note that PL commands are used to upload and download column values to/from local ASCII files, but the corresponding actions for binary files use the special \b commands. This is because PL variables are used for ASCII values and you can store any number of column values in PL variables. This is not true for binary column values. The \b commands work with a single binary byte buffer.

                See the SqlTool Procedural Language section below for information on using variables in other ways, and information on the other PL commands and features.

                Storing and retrieving binary files

                You can upload binary files such as photographs, audio files, or serialized Java objects into database columns. SqlTool keeps one binary buffer which you can load from files with the \bl command, or from a database query by doing a one-row query for any non-displayable type (including BLOB, OBJECT, and OTHER). In the latter case, the data returned for the first non-displayable column of the first result row will be stored into the binary buffer.

                Once you have data in the binary buffer, you can upload it to a database column (including BLOB, OBJECT, and OTHER type columns), or save it to a file. The former is accomplished by the special command \bp followed by a prepared SQL query containing one question mark place-holder to indicate where the data gets inserted. The latter is accomplished with the \bd command.

                You can also store the output from normal, displayable column into the binary buffer by using the special command \b. The very first column value from the first result row of the next SQL command will be stored to the binary byte buffer.

                Example 8.3. Inserting binary data into database from a file

                    \bl /tmp/favoritesong.mp3
                    \bp
                    INSERT INTO musictbl (id, stream) VALUES(3112, ?);

                Example 8.4. Downloading binary data from database to a file

                    SELECT stream FROM musictbl WHERE id = 3112;
                    \bd /tmp/favoritesong.mp3

                You can also store and retrieve text column values to/from ASCII files, as documented in the Essential PL Command section.

                Command History

                The SQL history shown by the \h command, and used by other commands, is truncated to 100 entries, since its utility comes from being able to quickly view the history list. You can change the history length by setting the system property sqltool.historyLength to an integer like

                java -Dsqltool.historyLength=100 -jar $HSQLDB_HOME/lib/hsqldb.jar urlid
                If there is any demand, I'll make the setting of this value more convenient.

                The SQL history list contains all executed commands other than Edit Buffer commands and comments, even if the command has a syntax error or fails upon execution. The reason for including bad commands is so that you can recall and fix them if you wish to. The same applies to the edit buffer. If you copy a command to the edit buffer by entering blank line, or if you edit the edit buffer, that edit buffer value will never make it into the command history until and if you execute it.

                Shell scripting and command-line piping

                You normally use non-interactive mode for input piping. You specify "-" as the SQL file name. See the Piping and shell scripting subsection of the Non-Interactive chapter.

                Emulating Non-Interactive mode

                You can run SqlTool interactively, but have SqlTool behave exactly as if it were processing an SQL file (i.e., no command-line prompts, error-handling that defaults to fail-upon-error, etc.). Just specify "-" as the SQL file name in the command line. This is a good way to test what SqlTool will do when it encounters any specific command in an SQL file. See the Piping and shell scripting subsection of the Non-Interactive chapter for an example.

                Non-Interactive

                Read the Interactive Usage section if you have not already, because much of what is in this section builds upon that. You can skip all discussion about Command History and the edit buffer if you will not use those interactive features.

                Important

                If you're doing data updates, remember to issue a commit command or use the --autoCommit switch.

                As you'll see, SqlTool has many features that are very convenient for scripting. But what really makes it superior for automation tasks (as compared to SQL tools from other vendors) is the ability to reliably detect errors and to control JDBC transactions. SqlTool is designed so that you can reliably determine if errors occurred within SQL scripts themselves, and from the invoking environment (for example, from a perl, Bash, or Python script, or a simple cron tab invocation).

                Giving SQL on the Command Line

                If you just have a couple Commands to run, you can run them directly from the comand-line or from a shell script without an SQL file, like this.

                    java -jar $HSQLDB_HOME/lib/hsqldb.jar --sql 'SQL statement;' urlid

                Note

                The --sql automatically implies --noinput, so if you want to execute the specified SQL before and in addition to an interactive session (or stdin piping), then you must also give the --stdinput switch.

                Since SqlTool transmits SQL statements to the database engine only when a line is terminated with ";", if you want feedback from multiple SQL statements in an --sql expression, you will need to use functionality of your OS shell to include linebreaks after the semicolons in the expression. With any Bourne-compatible shell, you can include linebreaks in the SQL statements like this.

                    java -jar $HSQLDB_HOME/lib/hsqldb.jar --sql '
                        SQL statement number one;
                        SQL statement
                            number two;
                        SQL statement three;
                    ' urlid
                If you don't need feedback, just separate the SQL commands with semicolons and the entire expression will be chunked.

                The --sql switch is very useful for setting shell variables to the output of SQL Statements, like this.

                    # A shell script
                    USERCOUNT=`java -jar $HSQLDB_HOME/lib/hsqldb.jar --sql '
                        select count(*) from usertbl;
                    ' urlid` || {
                        # Handle the SqlTool error
                    }
                    echo "There are $USERCOUNT users registered in the database."
                    [ "$USECOUNT" -gt 3 ] && {   # If there are more than 3 users registered
                        # Some conditional shell scripting

                SQL Files

                Just give paths to sql text file(s) on the command line after the urlid.

                Often, you will want to redirect output to a file, like

                java -jar $HSQLDB_HOME/lib/hsqldb.jar sql... > /tmp/log.sql 2>&1

                (Skip the "2>&1" if you're on Windows).

                You can also execute SQL files from an interactive session with the "\i"' Special Command, but be aware that the default behavior in an interactive session is to continue upon errors. If the SQL file was written without any concern for error handling, then the file will continue to execute after errors occur. You could run \c false before \i filename, but then your SqlTool session will exit if an error is encountered in the SQL file. If you have an SQL file without error handling, and you want to abort that file when an error occurs, but not exit SqlTool, the easiest way to accomplish this is usually to add \c false to the top of the script.

                If you specify multiple SQL files on the command-line, the default behavior is to exit SqlTool immediately if any of the SQL files encounters an error.

                SQL files themselves have ultimate control over error handling. Regardless of what command-line options are set, or what commands you give interactively, if a SQL file gives error handling statements, they will take precedence.

                You can also use \i in SQL files. This results in nested SQL files.

                You can use the following SQL file, sample.sql, which resides in the sample directory of your HSQLDB distribution [1]. It contains SQL as well as Special Commands making good use of most of the Special Commands documented below.

                /*
                    $Id: sample.sql,v 1.5 2005/05/02 15:07:27 unsaved Exp $
                    Examplifies use of SqlTool.
                    PCTASK Table creation
                */
                
                /* Ignore error for these two statements */
                \c true
                DROP TABLE pctasklist;
                DROP TABLE pctask;
                \c false
                
                \p Creating table pctask
                CREATE TABLE pctask (
                    id integer identity,
                    name varchar(40),
                    description varchar,
                    url varchar,
                    UNIQUE (name)
                );
                
                \p Creating table pctasklist
                CREATE TABLE pctasklist (
                    id integer identity,
                    host varchar(20) not null,
                    tasksequence int not null,
                    pctask integer,
                    assigndate timestamp default current_timestamp,
                    completedate timestamp,
                    show bit default true,
                    FOREIGN KEY (pctask) REFERENCES pctask,
                    UNIQUE (host, tasksequence)
                );
                
                \p Granting privileges
                GRANT select ON pctask TO public;
                GRANT all ON pctask TO tomcat;
                GRANT select ON pctasklist TO public;
                GRANT all ON pctasklist TO tomcat;
                
                \p Inserting test records
                INSERT INTO pctask (name, description, url) VALUES (
                    'task one', 'Description for task 1', 'http://cnn.com');
                INSERT INTO pctasklist (host, tasksequence, pctask) VALUES (
                    'admc-masq', 101, SELECT id FROM pctask WHERE name = 'task one');
                
                commit;
                

                You can execute this SQL file with a Memory Only database with a command like

                    java -jar $HSQLDB_HOME/lib/hsqldb.jar  --sql '
                        create user tomcat password "x";
                    ' mem path/to/hsqldb/sample/sample.sql

                (The --sql "create...;" arguments create an account which the script uses). You should see error messages betwen the Continue-on-error...true and Continue-on-error...false. The script purposefully runs commands that might fail there. The reason the script does this is to perform database-independent conditional table removals. (The SQL clause IF EXISTS is more graceful and succinct, and should be used if you don't need to support databases which don't support IF EXISTS). If an error occurs when continue-on-error is false, the script would abort immedately.

                Piping and shell scripting

                You can of course, redirect output from SqlTool to a file or another program.

                    java -jar $HSQLDB_HOME/lib/hsqldb.jar urlid file.sql > file.txt 2>&1
                
                    java -jar $HSQLDB_HOME/lib/hsqldb.jar urlid file.sql 2>&1 | someprogram...

                You can type commands in to SqlTool while being in non-interactive mode by supplying "-" as the file name. This is a good way to test how SqlTool will behave when processing your SQL files.

                        java -jar $HSQLDB_HOME/lib/hsqldb.jar urlid -

                This is how you have SqlTool read its input from another program:

                Example 8.5. Piping input into SqlTool

                        echo "Some SQL commands with '$VARIABLES';" |
                        java -jar $HSQLDB_HOME/lib/hsqldb.jar urlid -

                Make sure that you also read the Giving SQL on the Command Line section. The --sql switch is a great facility to use with shell scripts.

                Optimally Compatible SQL Files

                If you want your SQL scripts optimally compatible among other SQL tools, then don't use any Special or PL Commands. SqlTool has default behavior which I think is far superior to the other SQL tools, but you will have to disable these defaults in order to have optimally compatible behavior.

                These switches provide compatibilty at the cost of poor control and error detection.

                • --continueOnErr

                  The output will still contain error messages about everything that SqlTool doesn't like (malformatted commands, SQL command failures, empty SQL commands), but SqlTool will continue to run. Errors will not cause rollbacks (but that won't matter because of the following setting).

                • --autoCommit

                You don't have to worry about accidental expansion of PL variables, since SqlTool will never expand PL variables if you don't set any variables on the command line, or give any "* " PL commands. (And you could not have "* " commands in a compatible SQL file).

                Comments

                SQL comments of the form /*...*/ must begin where a (SQL/Special/Edit-Buffer/PL) Command could begin, and they end with the very first "*/" (regardless of quotes, nesting, etc. You may have as many blank lines as you want inside of a comment.

                Example 8.6. Valid comment example

                    SELECT count(*) FROM atable;
                    /* Lots of
                     comments interspersed among
                     several lines */   SELECT count(*)
                    FROM btable;

                Notice that a command can start immediate after the comment ends.

                Example 8.7. Invalid comment example

                    SELECT count(*) FROM
                    /* atable */
                    btable;

                This comment is invalid because you could not start another command at the comment location (because it is within an SQL Statement).

                You can try using /*...*/ in other locations, and -- style SQL comments, but SqlTool will not treat them as comments. If they occur within an SQL Statment, SqlTool will pass them to the database engine, and the DB engine will determine whether to parse them as comments.

                Special Commands and Edit Buffer Commands in SQL Files

                Don't use Edit Buffer / History Commands in your sql files, because they won't work. Edit Buffer / History Commands are for interactive use only. (But, see the Raw Mode section for an exception). You can, of course, use any SqlTool command at all interactively. I just wanted to group together the commands most useful to script-writers.

                \q [abort message]

                Be aware that the \q command will cause SqlTool to completely exit. If a script x.sql has a \q command in it, then it doesn't matter if the script is executed like

                    java -jar .../hsqldb.jar urlid a.sql x.sql z.sql
                or if you use \i to read it in interactively, or if another SQL file uses \i to nest it. If \q is encountered, SqlTool will quit. See the SqlTool Procedural Language section for commands to abort an SQL file (or even parts of an SQL file) without causing SqlTool to exit.

                \q takes an optional argument, which is an abort message. If you give an abort message, the message is displayed to the user and SqlTool will exit with a failure status. If you give no abort message, then SqlTool will exit quietly with successful status. As a result,

                \q
                means to make an immediate but graceful exit, whereas
                \q Message
                means to abort immediately.

                \p [text to print]
                Print the given string to stdout. Just give "\p" alone to print a blank line.
                \i /path/to/file.sql
                Include another SQL file at this location. You can use this to nest SQL files. For database installation scripts I often have a master SQL file which includes all of the other SQL files in the correct sequence. Be aware that the current continue-upon-error behavior will apply to included files until such point as the SQL file runs its own error handling commands.
                \o [file/path.txt]

                Tee output to the specified file (or stop doing so). See the Generating Text or HTML Reports section.

                \=
                A database-independent way to commit your SQL session.
                \a [true|false]
                This turns on and off SQL transaction autocommits. Auto-commit defaults to false, but you can change that behavior by using the --autoCommit command-line switch.
                \c [true|false]

                A "true" setting tells SqlTool to Continue when errors are encountered. The current transaction will not be rolled back upon SQL errors, so if \c is true, then run the ROLLCACK; command yourself if that's what you want to happen. The default for interactive use is to continue upon error, but the default for non-interactive use is to abort upon error. You can override this behavior by using the --continueOnErr or the --abortOnErr command-line switch.

                With database setup scripts, I usually find it convenient to set "true" before dropping tables (so that things will continue if the tables aren't there), then set it back to false so that real errors are caught. DROP TABLE tablename IF EXISTS; is a more elegant, but less portable, way to accomplish the same thing.

                Tip

                It depends on what you want your SQL files to do, of course, but I usually want my SQL files to abort when an error is encountered, without necessarily killing the SqlTool session. If this is the behavior that you want, then put an explicit \c false at the top of your SQL file and turn on continue-upon-error only for sections where you really want to permit errors, or where you are using PL commands to handle errors manually. This will give the desired behavior whether your script is called by somebody interactively, from the SqlTool command-line, or included in another SQL file (i.e. nested).

                Important

                The default settings are usually best for people who don't want to put in any explicit \c or error handling code at all. If you run SQL files from the SqlTool command line, then any errors will cause SqlTool to roll back and abort immediately. If you run SqlTool interactively and invoke SQL files with \i commands, the scripts will continue to run upon errors (and will not roll back). This behavior was chosen because there are lots of SQL files out there that produce errors which can be ignored; but we don't want to ignore errors that a user won't see. I reiterate that any and all of this behavior can (and often should) be changed by Special Commands run in your interactive shell or in the SQL files. Only you know whether errors in your SQL files can safely be ignored.

                Automation

                SqlTool is ideal for mission-critical automation because, unlike other SQL tools, SqlTool returns a dependable exit status and gives you control over error handling and SQL transactions. Autocommit is off by default, so you can build a completely dependable solution by intelligently using \c commands (Continue upon Errors) and commit statements, and by verifying exit statuses.

                Using the SqlTool Procedural Language, you have ultimate control over program flow, and you can use variables for database input and output as well as for many other purposes. See the SqlTool Procedural Language section.

                Getting Interactive Functionality with SQL Files

                Some script developers may run into cases where they want to run with sql files but they alwo want SqlTool's interactive behavior. For example, they may want to do command recall in the sql file, or they may want to log SqlTool's command-line prompts (which are not printed in non-interactive mode). In this case, do not give the sql file(s) as an argument to SqlTool, but pipe them in instead, like

                java -jar $HSQLDB_HOME/lib/hsqldb.jar urlid < filepath1.sql > /tmp/log.html 2>&1
                or
                cat filepath1.sql... |
                java -jar $HSQLDB_HOME/lib/hsqldb.jar urlid > /tmp/log.html 2>&1

                Character Encoding

                SqlTool defaults to the US-ASCII character set (for reading). You can use another character set by setting the system property sqlfile.charset, like

                java -Dsqlfile.charset=UTF-8 -jar $HSQLDB_HOME/lib/hsqldb.jar urlid file.sql...

                You can also set this per urlid in the SqlTool configuration file. See the RC File Authentication Setup section about that.

                Generating Text or HTML Reports

                This section is about making a file containing the output of database queries. You can generate reports by using operating system facilities such as redirection, tee, and cutting and pasting. But it is much easier to use the "\o" and "\H" special commands.

                Procedure 8.4. Writing query output to an external file

                1. By default, everthing will be done in plain text. If you want your report to be in HTML format, then give the special command \H. If you do so, you will probably want to use filenames with an suffix of ".html" or ".htm" instead of ".txt" in the next step.

                2. Run the command \o path/to/reportfile.txt. From this point on, output from your queries will be appended to the specified file. (I.e. another copy of the output is generated.) This way you can continue to monitor or use output as usual as the report is generated.

                3. When you want SqlTool to stop writing to the file, run \o (or just quit SqlTool if you have no other work to do).

                4. If you turned on HTML mode with \H before, you can run \H again to turn it back off, if you wish.

                It is not just the output of "SELECT" statements that will make it into the report file, but

                Kinds of output that get teed to \o files

                • Output of SELECT statements.
                • Output of all "\d" Special Commands. (I.e., "\dt", "\dv", etc., and "\d OBJECTNAME").
                • Output of "\p" Special Commands. You will want to use this to add titles, and perhaps spacing, for the output of individual queries.
                Other output will go to your screen or stdout, but will not make it into the report file. Be aware that no error messages will go into the report file. If SqlTool is run non-interactively (including if you give any SQL file(s) on the command line), SqlTool will abort with an error status if errors are encountered. The right way to handle errors is to check the SqlTool exit status. (The described error-handling behavior can be modified with SqlTool command-line switches and Special Commands).

                Warning

                Remember that \o appends to the named file. If you want a new file, then use a new file name or remove the pre-existing target file ahead of time.

                Tip

                So that I don't end up with a bunch of junk in my report file, I usually leave \o off while I perfect my SQL. With \o off, I perfect the SQL query until it produces on my screen exactly what I want saved to file. At this point I turn on \o and run ":;" to repeat the last SQL command. If I have several complex queries to run, I turn \o off and repeat until I'm finished. (Every time you turn \o on, it will append to the file, just like we need).

                Usually it doesn't come to mind that I need a wider screen until a query produces lines that are too long. In this case, stretch your window and repeat the last command with the ":;" Edit Buffer Command.

                SqlTool Procedural Language

                Aka PL

                Most importantly, run SqlTool interactively and give the "*?" command to see what PL commands are available to you. I've tried to design the language features to be intuitive. Readers experience with significant shell scripting in any language can probably learn everything they need to know by looking at (and running!) the sample script sample/pl.sql in your HSQLDB distribution [1] and using the *? command from within an interactive SqlTool session as a reference. (By significant shell scripting, I mean to the extent of using variables, for loops, etc.).

                PL variables will only be expanded after you run a PL command (or set variable(s) from the command-line). We only want to turn on variable expansion if the user wants variable expansion. People who don't use PL don't have to worry about strings getting accidentally expanded.

                All other PL commands imply the "*" command, so you only need to use the "*" statement if your script uses PL variables and it is possible that no variables may be set before-hand (and no PL commands have been run previously). In this case, without "*", your script would silently use a literal value like "*{x}" instead of trying to expand it. With a preceding "*" command, PL will notice that the variable x has not been set and will generate an error. (If x had been set here will be no issue because setting a variable automatically turns on PL variable expansion).

                PL is also used to upload and download column values to/from local ASCII files, analogously to the special \b commands for binary files. This is explained above in the Interactive Essential PL Command section above.

                Variables

                • Use the * list command to list some or all variables; or * listvalues to also see the values.
                • You can set variables using the * VARNAME = value command. This document explains elsewhere how you can set a values to the contents of files, and to the return value of SQL statements and fetches.
                • You can also set variables using the --setvar command-line switch. I give a very brief but useful example of this below.
                • Variables are always expanded in SQL, Special, and PL commands if they are written like *{VARNAME} (assuming that a PL command has been run previously). Your SQL scripts can give good feedback by echoing the value of variables with the "\p" special command. Use the construct *{:VARNAME} to expand the variable, but to expand to a zero-length string instead of fail if VARNAME is not set.
                • A variable written like /VARNAME is expanded if it begins an SQL Statement. This usage is called PL Aliasing. See the PL Aliases section below.

                • Variables are normally written like *VARNAME in logical expressions to prevent them from being evaluated too early. See below about logical expressions.
                • You can't do math with expression variables, but you can get functionality like the traditional for (i = 0; i < x; i++) by appending to a variable and testing the string length, like

                      * while (*i < ${x})
                          * i = *{i}.
                  i will be a growing line of dots.

                • Variable names must not contain white space, or the characters "}" or "=".

                PL Aliases

                PL Aliasing just means the use of a PL variable as the first thing in an SQL statement, with the shortcut notation /VARNAME.

                /VARNAME must be followed by whitespace or terminate the Statement, in order for SqlFile to tell where the variable name ends.

                Note

                Note that PL aliases are a very different thing from SQL aliases or HSQLDB aliases, which are features of databases, not SqlFile.

                If the value of a variable is an entire SQL command, you generally do not want to include the terminating ";" in the value. There is an example of this above.

                PL aliasing may only be used for SQL statements. You can define variables for everything in a Special or PL Command, except for the very first character ("\" or "*"). Therefore, you can use variables other than alias variables in Special and PL Commands. Here is a hyperbolically impractical example to show the extent to which PL variables can be used in Special commands even though you can not use them as PL aliases.

                        sql> * qq = p Hello Butch
                        sql> \*{qq} done now
                        Hello Butch done now
                (Note that the \* here is not the special command "\*", but is the special command "\p" because "*{qq}" resolves to "p").

                Here is a short SQL file that gives the specified user write permissions on some application tables.

                Example 8.8. Simple SQL file using PL

                    /*
                       grantwrite.sql
                
                       Run SqlTool like this:
                           java -jar path/to/hsqldb.jar -setvar USER=debbie grantwrite.sql
                     */
                
                    /* Explicitly turn on PL variable expansion, in case no variables have
                       been set yet.  (Only the case if user did not set USER).
                    */
                    *
                
                    GRANT all ON book TO *{USER};
                    GRANT all ON category TO *{USER};

                Note that this script will work for any (existing) user just by supplying a different user name on the command-line. I.e., no need to modify the tested and proven script. There is no need for a commit statement in this SQL file since no DML is done. If the script is accidentally run without setting the USER variable, SqlTool will give a very clear notificaton of that.

                The purpose of the plain "*" command is just so that the *{USER} variables will be expanded. (This would not be necessary if the USER variable, or any other variable, were set, but we don't want to depend upon that).

                Logical Expressions

                Logical expressions occur only inside of logical expression parentheses in PL statements. For example, if (*var1 > astring) and while (*checkvar). (The parentheses after "foreach" do not enclose a logical expression, they just enclose a list).

                There is a critical difference between *{VARNAME} and *VARNAME inside logical expressions. *{VARNAME} is expanded one time when the parser first encounters the logical expression. *VARNAME is re-expanded every time that the expression is evaluated. So, you would never want to code * while (*{X} < 5) because the statement will always be true or always be false. (I.e. the following block will loop infinitely or will never run).

                Don't use quotes or whitespace of any kind in *{VARNAME} variables in expressions. (They would expand and then the expression would most likely no longer be a valid expression as listed in the table below). Quotes and whitespace are fine in *VARNAME variables, but it is the entire value that will be used in evaluations, regardless of whether quotes match up, etc. I.e. quotes and whitespace are not special to the token evaluator.

                Logical Operators

                TOKEN
                The token may be a literal, a *{VARNAME} which is expanded early, or a *VARNAME which is expanded late. (You usually do not want to use *{VARNAME} in logical expressions). False if the token is not set, empty, or "0". True otherwise.
                TOKEN1 == TOKEN2
                True if the two tokens are equivalent "strings".
                TOKEN1 <> TOKEN2
                Ditto.
                TOKEN1 >< TOKEN2
                Ditto.
                TOKEN1 > TOKEN2
                True if the TOKEN1 string is longer than TOKEN2 or is the same length but is greater according to a string sort.
                TOKEN1 < TOKEN2
                Similarly to TOKEN1 > TOKEN2.
                ! LOGICAL_EXPRESSION
                Logical negation of any of the expressions listed above.

                *VARNAMEs in logical expressions, where the VARNAME variable is not set, evaluate to an empty string. Therefore (*UNSETVAR = 0) would be false, even though (*UNSETVAR) by itself is false and (0) by itself is false. Another way of saying this is that *VARNAME in a logical expression is equivalent to *{:VARNAME} out of a logical expression.

                When developing scripts, you definitely use SqlTool interactively to verify that SqlTool evaluates logical expressions as you expect. Just run * if commands that print something (i.e. \p) if the test expression is true.

                Flow Control

                Flow control works by conditionally executing blocks of Commands according to conditions specified by logical expressions.

                The conditionally executed blocks are called PL Blocks. These PL Blocks always occur between a PL flow control statement (like * foreach, *while, * if) and a corresponding * end PL Command (like * end foreach).

                Caution

                Be aware that the PL block reader is ignorant about SQL statements and comments when looking for the end of the block. It just looks for lines beginning with some specific PL commands. Therefore, if you put a comment line before a PL statement, or if a line of a multi-line SQL statement has a line beginning with a PL command, things may break.

                I am not saying that you shouldn't use PL commands or SQL commands inside of PL blocks-- you definitely should! I'm saying that in PL blocks you should not have lines inside of SQL statments or comments which could be mistaken for PL commands. (Especially, "commenting out" PL end statements will not work if you leave * end at the beginning of the line).

                (This limitation will very likely be removed in a future version of SqlTool).

                The values of control variables for foreach and while PL blocks will change as expected.

                There are * break and * continue, which work as any shell scripter would expect them to. The * break command can also be used to quit the current SQL file without triggering any error processing. (I.e. processing will continue with the next line in the including SQL file or interactive session, or with the next SQL file if you supplied multiple on the command-line).

                Below is an example SQL File that shows how to use most PL features. If you have a question about how to use a particular PL feature, check this example before asking for help. This file resides in the sample directory with the name pl.sql [1]. Definitely give it a run, like

                java -jar $HSQLDB_HOME/lib/hsqldb.jar mem $HSQLDB_HOME/pl.jar

                Example 8.9. SQL File showing use of most PL features

                /*
                    $Id: pl.sql,v 1.4 2005/05/02 15:07:26 unsaved Exp $
                    SQL File to illustrate the use of SqlTool PL features.
                    Invoke like
                        java -jar .../hsqldb.jar .../pl.sql mem
                                                                         -- blaine
                */
                
                * if (! *MYTABLE)
                    \p MYTABLE variable not set!
                    /* You could use \q to Quit SqlTool, but it's often better to just
                       break out of the current SQL file.
                       If people invoke your script from SqlTool interactively (with
                       \i yourscriptname.sql) any \q will kill their SqlTool session. */
                    \p Use arguments "--setvar MYTABLE=mytablename" for SqlTool
                    * break
                * end if
                
                /* Turning on Continue-upon-errors so that we can check for errors ourselves.*/
                \c true
                
                \p
                \p Loading up a table named '*{MYTABLE}'...
                
                /* This sets the PL variable 'retval' to the return status of the following
                   SQL command */
                * retval ~
                CREATE TABLE *{MYTABLE} (
                    i int,
                    s varchar
                );
                \p CREATE status is *{retval}
                \p
                
                /* Validate our return status.  In logical expressions, unset variables like
                   *unsetvar are equivalent to empty string, which is not equal to 0
                   (though both do evaluate to false on their own, i.e. (*retval) is false
                   and (0) is false */
                * if (*retval != 0)
                    \p Our CREATE TABLE command failed.
                    * break
                * end if
                
                /* Default Continue-on-error behavior is what you usually want */
                \c false
                \p
                
                /* Insert data with a foreach loop.
                   These values could be from a read of another table or from variables
                   set on the command line like
                */
                \p Inserting some data int our new table (you should see 3 row update messages)
                * foreach VALUE (12 22 24 15)
                    * if (*VALUE > 23)
                        \p Skipping *{VALUE} because it is greater than 23
                        * continue
                        \p YOU WILL NEVER SEE THIS LINE, because we just 'continued'.
                    * end if
                    INSERT INTO *{MYTABLE} VALUES (*{VALUE}, 'String of *{VALUE}');
                * end foreach
                \p
                
                * themax ~
                /* Can put Special Commands and comments between "* VARNAME ~" and the target 
                   SQL statement. */
                \p We're saving the max value for later.  You'll still see query output here:
                SELECT MAX(i) FROM *{MYTABLE};
                
                /* This is usually unnecessary because if the SELECT failed, retval would
                   be undefined and the following print statement would make SqlTool exit with
                   a failure status */
                * if (! *themax)
                    \p Failed to get the max value.
                    /* It's possible that the query succeeded but themax is "0".
                       You can check for that if you need to. */
                    * break
                    \p YOU WILL NEVER SEE THIS LINE, because we just 'broke'.
                * end if
                
                \p
                \p ##############################################################
                \p The results of our work:
                SELECT * FROM *{MYTABLE};
                \p MAX value is *{themax}
                
                \p
                \p Everything worked.
                

                Chunking

                We hereby call the ability to transmit multiple SQL commands to the database in one transmission chunking. Unless you are in Raw mode, SqlTool only transmits commands to the database engine when it reads in a ";" at the end of a line of an SQL command. Therefore, you normally want to end each and every SQL command with ";" at the end of a line. This is because the database can only send one status reply to each JDBC transmission. So, while you could run

                    SELECT * FROM t1; SELECT * FROM t2;
                SqlTool can only display the results from the last query. This is a limitation of the client/server nature of JDBC, and applies to any JDBC client. There are, however, situations where you don't need immediate feedback from every SQL command. For example,

                Example 8.10. Single-line chunking example

                    INSERT INTO t1 VALUES(0); SELECT * FROM t1;
                It's useful because the output of the second SQL command will tell you whether the first SQL command succeeded. So, you won't miss the status output from the first command.

                Why?

                The first general reason to chunk SQL commands is performance. For standalone databases, the most common performance bottleneck is network latency. Chunking SQL commands can dramatically reduce network traffic.

                The second general reason to chunk SQL commands is if your database requires you to send multiple commands in one transmission. This is often the case when you need to tell the database the SQL or PL/SQL commands that comprise a stored procedure, function, trigger, etc.

                How?

                The most simple way is enter as many SQL commands as you want, but just do not end a line with ";" until you want the chunk to transmit.

                Example 8.11. Multi-line chunking example

                    INSERT INTO t1 VALUES (1)
                    ; INSERT INTO t1 VALUES (2)
                    ; SELECT * FROM t1;
                If you list your command history with \s, you will see that all 3 SQL commands in 3 lines are in one SqlTool command. You can recall this SqlTool command from history to re-execute all three SQL commands.

                The other method is by using Raw Mode. Go to the Raw Mode section to see how. You can enter any text at all, exactly how you want it to be sent to the database engine. Therefore, in addition to chunking SQL commands, you can give commands for non-SQL extensions to the database. For example, you could enter JavaScript code to be used in a stored procedure.

                Raw Mode

                You begin raw mode by issuing the Special Command "\.". You can then enter as much text in any format you want. When you are finished, enter a line consisting of only ".;" to store the input to the edit buffer and send it to the database server for execution.

                This paragraph applies only to interactive usage. Interactive users may may end the raw input with ":." instead of ".;". This will just save the input to the edit buffer so that you can edit it and send it to the database manually. You can look at the edit buffer with the ":b" Buffer Command. You would normally use the command ":;" to send the buffer to the database after you are satisfied with it. You'll notice that your prompt will be the continuation prompt between entering "\." and terminating the raw input with ".;" or ":.".

                Example 8.12. Interactive Raw Mode example

                    sql> \.
                    Enter RAW SQL.  No \, :, * commands.
                    End with a line containing only ".;" to send to database,
                    or ":." to store to edit buffer for editing or saving.
                    -----------------------------------------------------------
                    raw> line one;
                      +> line two;
                      +> line three;
                      +> :.
                    Raw SQL chunk moved into buffer.  Run ":;" to execute the chunk.
                    sql> :;
                    Executing command from buffer:
                    line one;
                    line two;
                    line three;
                
                    SQL Error at 'stdin' line 13:
                    "line one;
                    line two;
                    line three;"
                    Unexpected token: LINE in statement [line]
                    sql>
                The error message "Unexpected token: LINE in statement [line]" comes from the database engine, not SqlTool. All three lines were transmitted to the database engine.

                Edit Buffer Commands are not available when running SqlTool non-interactively.

                PL/SQL

                Note

                PL/SQL is not the same as PL. PL is the procedural language of SqlFile and is independent of your back-end database. PL commands always begin with *. PL/SQL is processed on the server side and you can only use it of your database supports it. You can not intermix PL and PL/SQL (except for setting a PL variable to the output of PL/SQL execution), because when you enter PL/SQL to SqlTool that input is not processed by SqlFile.

                Use Raw Mode to send PL/SQL code blocks to the database engine. You do not need to enter the "\." command to enter raw mode. Just begin a new SqlTool command line with "DECLARE" or "BEGIN", and SqlTool will automatically put you into raw mode. See the Raw Mode section for details.

                The following sample SQL file resides at sample/plsql.sql in your HSQLDB distribution [1]. This script will only work if your database engine supports standard PL/SQL, if you have permission to create the table "T1" in the default schema, and if that object does not already exist.

                Example 8.13. PL/SQL Example

                /*
                 * $Id: plsql.sql,v 1.4 2007/08/09 03:22:21 unsaved Exp $
                 *
                 * This example is copied from the "Simple Programs in PL/SQL"
                 * example by Yu-May Chang, Jeff Ullman, Prof. Jennifer Widom at
                 * the Standord University Database Group's page
                 * http://www-db.stanford.edu/~ullman/fcdb/oracle/or-plsql.html .
                 * I have only removed some blank lines (in case somebody wants to
                 * copy this code interactively-- because you can't use blank
                 * lines inside of SQL commands in non-raw mode SqlTool when running
                 * it interactively); and, at the bottom I have  replaced the
                 * client-specific, non-standard command "run;" with SqlTool's
                 * corresponding command ".;" and added a plain SQL SELECT command
                 * to show whether the PL/SQL code worked.  - Blaine
                 */
                
                CREATE TABLE T1(
                    e INTEGER,
                    f INTEGER
                );
                
                DELETE FROM T1;
                
                INSERT INTO T1 VALUES(1, 3);
                
                INSERT INTO T1 VALUES(2, 4);
                
                /* Above is plain SQL; below is the PL/SQL program. */
                DECLARE
                
                    a NUMBER;
                
                    b NUMBER;
                
                BEGIN
                
                    SELECT e,f INTO a,b FROM T1 WHERE e>1;
                
                    INSERT INTO T1 VALUES(b,a);
                
                END;
                
                .;
                /** The statement on the previous line, ".;" is SqlTool specific.
                 *  This command says to save the input up to this point to the
                 *  edit buffer and send it to the database server for execution.
                 *  I added the SELECT statement below to give imm
                 */
                
                /* This should show 3 rows, one containing values 4 and 2 (in this order)...*/
                SELECT * FROM t1;
                
                Note that, inside of raw mode, you can use any kind of formatting you want: Whatever you enter-- blank lines, comments, everything-- will be transmitted to the database engine.

                Using hsqltool.jar and hsqldbutil.jar

                This section is for those users who want to use SqlTool but without the overhead of hsqldb.jar (or who want to use a new SqlTool build with an older HSQLDB distribution).

                If you do not need to directly use JDBC URLs like jdbc:hsqldb:mem: + something, jdbc:hsqldb:file: + something, or jdbc:hsqldb:res: + something, then you can use hsqltool.jar in place of the much larger hsqldb.jar file. hsqltool.jar will work for all JDBC databases other than HSQLDB Memory-only and In-process databases (the latter are fine if you access them via a HSQLB Server or WebServer). You will have to supply the JDBC driver for non-HSQLDB URLs, of course.

                hsqltool.jar includes the HSQLDB JDBC driver. If you do not need to connect to HSQLDB databases at all, then hsqldbutil.jar is what you want. hsqldbutil.jar contains everything you need to run SqlTool and DatabaseManagerSwing against non-HSQLDB databases... well, besides the JDBC drivers for the target databases.

                The HSQLDB distribution doesn't "come with" pre-built hsqltool.jar and hsqldbutil.jar files. You need to "build" them, but that is very easy to do.

                These instructions assume that you are capable of running an Ant build. See the Building HSQLDB chapter if you need more details than what you see here.

                1. Download and extract a current HSQLDB distribution. If you don't want to use the source code, documentation, etc., you can use a temporary directory and remove it afterwards.

                2. Cd to the build directory under the root directory where you extracted the distribution to.

                3. Run ant hsqldbutil or ant hsqltool according to the criteria above. (If your goal is to use this jar with an older HSQLDB distribution, then you definitely need to build hsqlbutil.jar).

                4. If you're going to clean up afterwards, copy the jar that you built out of lib to a safe location first.

                If you are using the HSQLDB JDBC driver (i.e., you're connecting up to a URL like jdbc:hsqldb:hsql + something or jdbc:hsqldb:http + something), you invoke SqlTool exactly as with hsqldb.jar except you use the file path to your new jar file instead of the path to hsqldb.jar.

                If you are using a non-HSQLDB JDBC driver, you must set your CLASSPATH to include this new jar file and your JDBC driver, then run SqlTool like

                        java org.hsqldb.util.SqlTool ...
                You can specify your JDBC driver class either with the --driver switch to SqlTool, or in your RC file stanza (the last method is usually more convenient).

                Delimiter-Separated-Value Imports and Exports

                Note

                This feature is independent of HSQLDB Text Tables, a server-side feature of HSQLDB. It makes no difference to SqlTool whether the source or target table of your export/import is a memory, cache, or text table. Indeed, like all features of SqlTool, it works fine with other JDBC databases. It works great, for example to migrate data from a table of one type to a table of another type, or to another schema, or to another database instance, or to another database system.

                This feature is what most business people call "CSV", but these files are more accurately called Delimiter Separated Value files because the delimiter is usually not a comma, and, more importantly, we purposefully choose an effective delimiter instead of the CSV method of using a delimiter which works in some cases and then use quotes and back-slashes to escape occurrence of the delimiter in the actual data. Just by choosing a delimiter which never needs escaping, we eliminate the whole mess, and the data in our files always looks just like the corresponding data in the database. To make this CSV / Delimiter-separated-value dintinction clear, I use the suffix ".dsv" for my data files. This leads me to stipulate the abbreviation DSV for the Delimiter Separated Value feature of HSQLDB.

                Use the \x command to eXport a table to a DSV file, and the \m command to iMport a DSV file into a pre-existing table.

                The row and column delimiters may be any String, not just a single character. And just as the delimiter capability is more general than traditional CSV delimiters, the export function is also more general than just a table data exporter. Besides the trivial generalization that you may specify a view or other virtual table name in place of a table name, you can alternatively export the output of any query which produces normal text output. A benefit to this approach is that it allows you to export only some columns of a table, and to specify a WHERE clause to narrow down the rows to be exported (or perform any other SQL transformation, mapping, join, etc.). One specific use for this would be to exclude columns of binary data (which can be exported by other means, such as a PL loop to store binary values to files with the \bd command).

                Note that the import command will not create a new table. This is because of the impossibility of guessing appropriate types and constraints based only on column names and a data sampling (which is all that a DSV-importer has access to). Therefore, if you wish to populate a new table, create the table before running the import. The import file does not need to have data for all columns of a table. The only required columns are those required by database constraints (non-null, indexes, keys, etc.) One specific reason to omit columns is if you want values of some columns to be created automatically by column DEFAULT settings, triggers, HSQLDB identity sequences, etc. Another reason would be to skip binary columns.

                Simple DSV exports and imports using default settings

                Even if you need to change delimiters, table names, or file names from the defaults, I suggest that you run one export and import with default settings as a practice run. A memory-only HSQLDB instance is ideal for test runs like this.

                This command exports the table icf.projects to the file projects.dsv in the current directory (where you invoked SqlTool from). By default, the output file name will be the specified source table name plus the extension .dsv.

                Example 8.14. DSV Export Example

                    SET SCHEMA icf;
                    \x projects
                
                We could also have run \x icf.projects (which would have created a file named icf.projects.dsv) instead of changing the session schema. In this example we have chosen to make the export file name independent of the schema to facilitate importing it into a different schema.

                Take a look at the output file. Notice that the first line consists of column names, not data. This line is present because it will be needed if the file is to used for a DSV import. Notice the following characterstics about the export data. The column delimiter is the pipe character "|". The record delimiter is the default line delimiter character(s) for your operating system. The string used to represent database NULLs is [null]. See the next section for how to change these from their default values.

                This command imports the data from the file projects.dsv in the current directory (where you invoked SqlTool from) into the table newschema.projects. By default, the output table name will be the input filename after removing optional leading directory and trailing final extension.

                Example 8.15. DSV Import Example

                    SET SCHEMA newschema;
                    \m projects.dsv
                
                If the DSV file was named with the target schema, you would have skipped the SET SCHEMA command, like \m newschema.projects.dsv.

                Specifying queries and options

                For a hands on example of a DSM import which generates an import report and uses some other options, change to directory HSQLDB/sample and play with the working script dsv-sample.sql [1]. You can execute it like

                    java -jar ../lib/hsqldb.jar mem dsv-sample.sql
                (assuming that you are using the supplied sqltool.rc file or have have urlid mem set up.

                The header line in the DSV file is required at this time. (If there is user demand, it can be made optional for exporting, but it will remain required for importing).

                Your export will fail if the column or record delimiter, or the null representation value occurs in the data being exported. You change these values by setting the PL variables *DSV_COL_DELIM, *DSV_ROW_DELIM, *DSV_NULL_REP. Notice that the asterisk is part of the variable names, to indicate that these variables are used by SqlTool internally. When specifying delimiters, you can use the escape seqpences \n, \r, \f, \t, \\, and decimal, octal or hex specifications like \20, \020, \0x20. For example, to change the column delimiter to the tab character, you would give the command

                    * *DSV_COL_DELIM = \t

                For imports, you must always specify the source DSV file path. If you want to export to a different file than one in the current directory named according to the source table, set the PL variable *DSV_TARGET_FILE, like

                    * *DSV_TARGET_FILE = /tmp/dtbl.dsv

                For exports, you must always specify the source table name or query. If you want to import to a table other than that derived from the input DSV file name, set the PL variable *DSV_TARGET_TABLE. The table name may contain a schema name prefix.

                You don't need to import all of the columns in a data file. To designate the fields to be skipped, iether set the PL PL variable *DSV_SKIP_COLUMNS, or replace the column names in the header line to "-" (hyphen). The value of *DSV_SKIP_COLUMNS is case-insensitive, and multiple column names are separated with white space and/or commas.

                You can specify a query instead of a tablename with the \x command in order to filter or transform data from a table or view, or to export the output of a join, etc. You must set the PL variable *DSV_TARGET_FILE, as explained above (since there is no table name from which to automatically map a file name).

                Example 8.16. DSV Export of an Arbitrary SELECT Statement

                    * *DSV_TARGET_FILE = outfile.txt
                    \x SELECT entrydate, 2 * aval "Double aval", modtime FROM bs.dtbl
                Note that I specified the column label alias "Double aval" so that the label for that column in the DSV file header will not be blank.

                By default, imports will abort as soon as a error is encountered during parsing the file or inserting data. If you invoke SqlTool with a SQL script on the command line, the failure will cause SqlTool to roll back and exit. If run interactively, you can decide whether to commit or roll back the rows that inserted before the failure. You can modify this behavior with the \a and \c settings.

                If you set either a reject dsv file or a reject report file, then failures during imports will be reported but will not cause the import to abort. When run in this way, SqlTool will give you a report at the end about how many records were skipped, rejected, and successfully inserted. The reject dsv file is just a dsv file with exact copies of the dsv records that failed to insert. The reject report file is a HTML report which lists, for every rejected record, why that record was rejected.

                To allow for user-friendly entry of headers, we require that tables for DSV import/exports use standard column names. I.e., no column names that require quoting. The DSV import and export parsers are very smart and user-friendly. The data types of columns are checked so that the parser can make safe assumptions about white space and blank entries in the data. If a column is a JDBC Boolean type, for example, then we know that a field value of " True " obviously means "True", and that a field value of "" obviously means null. Since we require vanilla style column names, we allow white space anywhere in the header column. We allow blank lines anywhere (where "lines" are delimited by *DSV_ROW_DELIM). By default, commented lines are ignored, and the comment character can be changed from its default value.

                Run the command "\x?" or "\m?" to see the several system PL variables which you can set to adjust reject file behavior, commenting behavior, and other DSV features.

                You can also define some settings right in the DSV file, and you can even specify multiple header lines in a single DSV file. I use this last feature to import data from one data set into multple tables that are joined. Since I don't have any more time to dedicate to explaining all of these features, I'll give you some examples from working DSV files and let you take it from there.

                Example 8.17. Sample DSV headerswitch settings

                    # RCS keyword was here.
                
                    headerswitch{
                    itemdef:name|-|-|hardness|breakdc|-
                    simpleitemdef:itemdef_name|maxvalue|weight|-|-|maxhp
                    }
                I'll just note that the prefixes for the header rows must be of format target-table-name + :. You can use * for target-table-name here, for the obvious purpose.

                Example 8.18. DSV targettable setting

                    targettable=t
                This last example is from the SqlTool unit test file dsv-trimming.dsv. These special commands must be at the top of the file (before any normal data or header lines).

                There is also the *DSV_CONST_COLS setting, which you can use to automatically write static, constant values to the specified columns of all inserted rows.

                Unit Testing SqlTool

                The SqlTool unit tests reside at testrun/sqltool in the HSQLDB source code repository. Just run the runtests.bash script from that directory to execute all of the tests. Read the file README.txt to find out all about it, including everything you'd need to know to test your own scripts or to add more unit test scripts for SqlTool.



                [1] To reduce the time I will need to spend maintaining this document, in this chapter I am giving the path to the sample directory as it is in HSQLDB 1.9.x distributions, namely, HSQLDB_HOME/sample. HSQLDB 1.8.x users should translate these sample directory paths to use HSQLDB_HOME/src/org/hsqldb/sample/....

                hsqldb-1.8.0.10.orig/doc/guide/apa.html0000644000175000017500000003745510665324662016140 0ustar renereneAppendix A. Building HSQLDB

                Appendix A. Building HSQLDB

                Fred Toussi

                HSQLDB Development Group

                $Date: 2005/05/26 23:22:06 $

                Purpose

                From 1.8.0, the supplied hsqldb.jar file is built with Java 1.5. If you want to run the engine under JDK1.3 or earlier, you should rebuild the jar with Ant.

                Building with Ant, from the Apache Jakarta Project

                Ant (Another Neat Tool) is used for building hsqldb. The version currently used to test the build script is 1.6.1 but versions since 1.5.1 should also be compatible.

                Obtaining Ant

                Ant is a part of the Jakarta/Apache Project.

                Building Hsqldb with Ant

                Once you have unpacked the zip package for hsqldb, under the /hsqldb folder, in /build there is a build.xml file that builds the hsqldb.jar with Ant (Ant must be already installed). To use it, change to /build then type:

                 ant -projecthelp

                This displays the available ant targets, which you can supply as command line arguments to ant. These include

                hsqldb

                to make the hsqldb.jar

                explainjars

                Lists all targets which build jar files, with an explanation of the purposes of the different jars.

                clean

                to clean up the /classes directory that is created

                cleanall

                to remove the old jar as well

                javadoc

                to build javadoc

                hsqldbmain

                to build a smaller jar for HSQLDB that does not contain utilities

                hsqljdbc

                to build an extremely small jar containing only the client-side JDBC driver (does not support direct connection to HSQLDB URLs of the form jdbc:hsldb:mem:*, jdbc:hsqldb:file:*, nor jdbc:hsqldb:res:*).

                hsqldbmin

                to build a small jar that supports HSQLDB URLs of the form jdbc:hsqldb:mem:*, jdbc:hsqld:file*, jdbc:hsqldb:res:*; but not network URLs like jdbc:hsql* or jdbc:http*.

                hsqldbtest

                to build a larger jar for hsqldb that contains tests

                ...

                Many more targets are available. Run ant -projecthelp and ant explainjars.

                HSQLDB can be built in any combination of three JRE (Java Runtime Environment) versions and many jar file sizes. The smallest jar size(hsqljdbc.jar) contains only the HSQLDB JDBC Driver client. The default size (hsqldb.jar) also contains server mode support and the utilities. The largest size (hsqldbtest.jar)includes some test classes as well. Before building the hsqldbtest.jar package, you should download the junit jar from http://www.junit.org and put it in the /lib directory, alongside servlet.jar, which is included in the .zip package.

                Just run ant explainjars for a concise list of all available jar files.

                If you want your code built for debugging, as opposed to high performance, make a file named build.properties in your build directory with the contents

                build.debug: true
                The resulting Java binaries will be larger and slower, but exception stack traces will contain source code line numbers, which can be extremely useful for debugging.

                The preferred method of rebuilding the jar is with Ant. After installing Ant on your system use the following command from the /build directory:

                ant explainjars

                The command displays a list of different options for building different sizes of the HSQLDB Jar. The default is built using:

                Example A.1. Buiding the standard Hsqldb jar file with Ant

                ant hsqldb

                The Ant method always builds a jar with the JDK that is used by Ant and specified in its JAVA_HOME environment variable. Building with JDK 1.4.x or 1.5.x will result in a jar that is not backward compatible.

                From version 1.7.2, use of JDK 1.1.x is not recommended for building the JAR, even for running under JDK 1.1.x -- use JDK 1.3.1 for compatibility with 1.1.x. This is done in the following way. JDK 1.3.1 should be used as the JAVA_HOME for ant. You then issue the following commands. The first command will make the sources compatible with JDK 1.3, the second command modifies the sources further so that the compiled result can run under jdk 1.1 as well. The third command builds the jar.

                ant switchtojdk12
                ant switchtojava1target
                ant hsqldb
                

                Building with DOS Batch Files

                UNIX users must use Ant to build hsqldb.

                For DOS/Windows users, a set of MSDOS batch files is provided as an example. These files produce only the default jar size. The path and classpath variables for the JDK should of course be set before running any of the batch files. These files are not currently maintained and will probably need some additions and changes to work correctly. Please see the build.xml file for up-to-date file

                If you are compiling for JDK's other than 1.4.x, you should use the appropriate switchToJDK11.bat or switchToJDK12.bat to adapt the source files to the target JDK before running the appropriate buildJDK11.bat or buildJDK12.bat JDK and JRE versions.

                Hsqldb CodeSwitcher

                CodeSwitcher is a tool to manage different version of Java source code. It allows to compile HSQLDB for different JDKs. It is something like a precompiler in C but it works directly on the source code and does not create intermediate output or extra files.

                CodeSwitcher is used internally in HSQLDB build scripts. You do not have to use it separately to compile HSQLDB.

                CodeSwitcher reads the source code of a file, removes comments where appropriate and comments out the blocks that are not used for a particular version of the file. This operation is done for all files of a defined directory, and all subdirectories.

                Example A.2. Example source code before CodeSwitcher is run

                        ...
                
                    //#ifdef JAVA2
                
                        properties.store(out,"hsqldb database");
                
                    //#else
                
                    /*
                
                        properties.save(out,"hsqldb database");
                
                    */
                
                    //#endif
                
                        ...

                The next step is to run CodeSwitcher.

                Example A.3. CodeSwitcher command line invocation

                    java org.hsqldb.util.CodeSwitcher . -JAVA2

                The '.' means the program works on the current directory (all subdirectories are processed recursively). -JAVA2 means the code labelled with JAVA2 must be switched off.

                Example A.4. Source code after CodeSwitcher processing

                        ...
                
                    //#ifdef JAVA2
                
                    /*
                
                        pProperties.store(out,"hsqldb database");
                
                    */
                
                    //#else
                
                        pProperties.save(out,"hsqldb database");
                
                    //#endif
                
                        ...

                For detailed information on the command line options run java org.hsqldb.util.CodeSwitcher. Usage examples can be found in the switchtojdk1*.bat files in the /build directory.

                Building documentation

                To build the User Guide in HTML format, you must have the Docbook stylesheets installed locally. The Docbook stylesheets are available on the Internet. On Linux, just install the docbook-xsl-stylesheets rpm. Then add an entry to build.properties in your build directory with contents like

                docbook.xsl.home: /usr/share/sgml/docbook/docbook-xsl-stylesheets
                Where you specify your local path to the base directory of your Docbook stylesheet installation. Build like

                Example A.5. Building HTML User Guides

                ant docbooks-html
                ant docbooks-chunk

                To build the User Guide in PDF format, you must also have the Java FOP system installed locally. FOP is available for free download on the Internet. Add an entry to build.properties in your build directory with contents like

                fop.home /usr/local/fop-0.20.5
                Where you specify your local path to the base directory of your FOP installation.

                Example A.6. Building User Guides in all formats

                ant docbook
                Don't pay too much attention to error messages by FOP, because they are really warnings, but do check the output. If there are problems with the PDF output, try using a newer version of FOP.

                Important

                By default, your docs will fail to build if you do not have Internet connectivity. This is because our primary Docbook source file references the Docbook DTDs via Internet URL. You can build without Internet connectivity by installing the Docbook DTDs and editing our primary Docbook source file. Docbook is available on the Internet. On Linux, just install the docbook-dtds or docbook rpm. Then make one edit to the file docsrc/guide/guide.xml in your HSQLDB distribution. Change the line containing

                "http://www.oasis-open.org/docbook/xml/4.2CR1/docbookx.dtd" [
                to
                "file:///usr/share/xml/docbook/schema/dtd/4.2/docbookx.dtd" [
                where the second filepath is the path to the docbookx.dtd file within your Docbook installation.

                hsqldb-1.8.0.10.orig/doc/guide/apc.html0000644000175000017500000003400210665324663016124 0ustar renereneAppendix C. Hsqldb Database Files and Recovery

                Appendix C. Hsqldb Database Files and Recovery

                This text is based on HypersonicSQL documentation, updated to reflect the latest version 1.8.0 of HSQLDB.

                $Date: 2005/07/01 17:06:32 $

                The Standalone and Client/Server modes will in most cases use files to store all data to disk in a persistent and safe way. This document describes the meaning of the files, the states and the procedures followed by the engine to recover the data.

                A database named 'test' is used in this description. The database files will be as follows.

                Database Files

                test.properties

                Contains the entry 'modified'. If the entry 'modified' is set to 'yes' then the database is either running or was not closed correctly (because the close algorithm sets 'modified' to 'no' at the end).

                test.script

                This file contains the SQL statements that makes up the database up to the last checkpoint - it is in synch with test.backup.

                test.data

                This file contains the (binary) data records for CACHED tables only.

                test.backup

                This is compressed file that contains the complete backup of the old test.data file at the time of last checkpoint.

                test.log

                This file contains the extra SQL statements that have modified the database since the last checkpoint (something like the 'Redo-log' or 'Transaction-log', but just text).

                In the above list, a checkpoint results from both a CHECKPOINT command and a SHUTDOWN command.

                States

                Database is closed correctly

                State after using the command SHUTDOWN

                • The test.data file is fully updated.

                • The test.backup contains the compressed test.data file.

                • The test.script contains the information in the database, excluding data for CACHED and TEXT tables.

                • The test.properties contains the entry 'modified' set to 'no'.

                • There is no test.log file.

                Database is closed correctly with SHUTDOWN SCRIPT

                State after using the command SHUTDOWN SCRIPT

                • The test.data file does not exist; all CACHED table data is in the test.script file

                • The test.backup does not exist.

                • The test.script contains the information in the database, including data for CACHED and TEXT tables.

                • The test.properties contains the entry 'modified' set to 'no'.

                • There is no test.log file.

                Database is aborted

                This may happen by sudden power off, Ctrl+C in Windows, but may be simulated using the command SHUTDOWN IMMEDIATELY.

                Aborted Database state

                • The test.properties still containes 'modified=yes'.

                • The test.script contains a snapshot of the database at the last checkpoint and is OK.

                • The test.data file may be corrupt because the cache in memory was not written out completely.

                • The test.backup file contains a snapshot of test.data that corresponds to test.script.

                • The test.log file contain all information to re-do all changes since the snanapshot. As a result of abnormal termination, this file may be partially corrupt.

                Procedures

                The database engine performs the following procedures internally in different circumstances.

                Clean Shutdown

                Procedure C.1. Clean Hsqldb database shutdown

                1. The test.data file is written completely (all the modified cached table rows are witten out) and closed.

                2. The test.backup.new is created (containing the compressed test.data file)

                3. The file test.script.new is created using the information in the database (and thus shrinks because no UPDATE and DELETE statements; only INSERT).

                4. The entry 'modified' in the properties file is set to 'yes-new-files'

                5. The file test.script is deleted

                6. The file test.script.new is renamed to test.script

                7. The file test.backup is deleted

                8. The file test.backup.new is renamed to test.backup

                9. The entry 'modified' in the properties file is set to 'no'

                10. The file test.log is deleted

                Startup

                Procedure C.2. Database is opened

                1. Check if the database files are in use (by checking a special test.lck file).

                2. See if the test.properties file exists, otherwise create it.

                3. If the test.properties did not exist, then this is a new database. Create the empty test.log to append new commands.

                4. If it is an existing database, check in the test.properties file if 'modified=yes'. This would mean last time it was not closed correctly, and thus the test.data file may be corrupted or incomplete. In this case the 'REPAIR' algorithm is executed (see below), before the database is opened normally.

                5. Otherwise, if in the test.properties file 'modified=yes-new-files', then the (old) test.backup and test.script files are deleted and the new test.script.new file is renamed to test.script.

                6. Open the test.script file and execute the commands.

                7. Create the empty test.log to append new commands.

                Repair

                The current test.data file is corrupt, but with the old test.data (from the test.backup file and test.script) and the current test.log, the database is made up-to-date. The database engine takes these steps:

                Procedure C.3. Database Repair

                1. Restore the old test.data file from the backup (uncompress the test.backup and overwrite test.data).

                2. Execute all commands in the test.script file.

                3. Execute all commands in the test.log file. If due to corruption, an exception is thrown, the rest of the lines of command in the test.log file are ignored.

                4. Close the database correctly (including a backup).

                hsqldb-1.8.0.10.orig/doc/guide/apb.html0000644000175000017500000002431010665324663016124 0ustar renereneAppendix B. First JDBC Client Example

                Appendix B. First JDBC Client Example

                There is a copy of Testdb.java in the directory src/org/hsqldb/sample of your HSQLDB distribution.

                Example B.1. JDBC Client source code example

                /* Copyright (c) 2001-2005, The HSQL Development Group
                 * All rights reserved.
                 *
                 * Redistribution and use in source and binary forms, with or without
                 * modification, are permitted provided that the following conditions are met:
                 *
                 * Redistributions of source code must retain the above copyright notice, this
                 * list of conditions and the following disclaimer.
                 *
                 * Redistributions in binary form must reproduce the above copyright notice,
                 * this list of conditions and the following disclaimer in the documentation
                 * and/or other materials provided with the distribution.
                 *
                 * Neither the name of the HSQL Development Group nor the names of its
                 * contributors may be used to endorse or promote products derived from this
                 * software without specific prior written permission.
                 *
                 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
                 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
                 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
                 * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG,
                 * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
                 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
                 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
                 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
                 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
                 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
                 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
                 */
                
                
                package org.hsqldb.sample;
                
                import java.sql.Connection;
                import java.sql.DriverManager;
                import java.sql.ResultSet;
                import java.sql.ResultSetMetaData;
                import java.sql.SQLException;
                import java.sql.Statement;
                
                /**
                 * Title:        Testdb
                 * Description:  simple hello world db example of a
                 *               standalone persistent db application
                 *
                 *               every time it runs it adds four more rows to sample_table
                 *               it does a query and prints the results to standard out
                 *
                 * Author: Karl Meissner karl@meissnersd.com
                 */
                public class Testdb {
                
                    Connection conn;                                                //our connnection to the db - presist for life of program
                
                    // we dont want this garbage collected until we are done
                    public Testdb(String db_file_name_prefix) throws Exception {    // note more general exception
                
                        // Load the HSQL Database Engine JDBC driver
                        // hsqldb.jar should be in the class path or made part of the current jar
                        Class.forName("org.hsqldb.jdbcDriver");
                
                        // connect to the database.   This will load the db files and start the
                        // database if it is not alread running.
                        // db_file_name_prefix is used to open or create files that hold the state
                        // of the db.
                        // It can contain directory names relative to the
                        // current working directory
                        conn = DriverManager.getConnection("jdbc:hsqldb:"
                                                           + db_file_name_prefix,    // filenames
                                                           "sa",                     // username
                                                           "");                      // password
                    }
                
                    public void shutdown() throws SQLException {
                
                        Statement st = conn.createStatement();
                
                        // db writes out to files and performs clean shuts down
                        // otherwise there will be an unclean shutdown
                        // when program ends
                        st.execute("SHUTDOWN");
                        conn.close();    // if there are no other open connection
                    }
                
                //use for SQL command SELECT
                    public synchronized void query(String expression) throws SQLException {
                
                        Statement st = null;
                        ResultSet rs = null;
                
                        st = conn.createStatement();         // statement objects can be reused with
                
                        // repeated calls to execute but we
                        // choose to make a new one each time
                        rs = st.executeQuery(expression);    // run the query
                
                        // do something with the result set.
                        dump(rs);
                        st.close();    // NOTE!! if you close a statement the associated ResultSet is
                
                        // closed too
                        // so you should copy the contents to some other object.
                        // the result set is invalidated also  if you recycle an Statement
                        // and try to execute some other query before the result set has been
                        // completely examined.
                    }
                
                //use for SQL commands CREATE, DROP, INSERT and UPDATE
                    public synchronized void update(String expression) throws SQLException {
                
                        Statement st = null;
                
                        st = conn.createStatement();    // statements
                
                        int i = st.executeUpdate(expression);    // run the query
                
                        if (i == -1) {
                            System.out.println("db error : " + expression);
                        }
                
                        st.close();
                    }    // void update()
                
                    public static void dump(ResultSet rs) throws SQLException {
                
                        // the order of the rows in a cursor
                        // are implementation dependent unless you use the SQL ORDER statement
                        ResultSetMetaData meta   = rs.getMetaData();
                        int               colmax = meta.getColumnCount();
                        int               i;
                        Object            o = null;
                
                        // the result set is a cursor into the data.  You can only
                        // point to one row at a time
                        // assume we are pointing to BEFORE the first row
                        // rs.next() points to next row and returns true
                        // or false if there is no next row, which breaks the loop
                        for (; rs.next(); ) {
                            for (i = 0; i < colmax; ++i) {
                                o = rs.getObject(i + 1);    // Is SQL the first column is indexed
                
                                // with 1 not 0
                                System.out.print(o.toString() + " ");
                            }
                
                            System.out.println(" ");
                        }
                    }                                       //void dump( ResultSet rs )
                
                    public static void main(String[] args) {
                
                        Testdb db = null;
                
                        try {
                            db = new Testdb("db_file");
                        } catch (Exception ex1) {
                            ex1.printStackTrace();    // could not start db
                
                            return;                   // bye bye
                        }
                
                        try {
                
                            //make an empty table
                            //
                            // by declaring the id column IDENTITY, the db will automatically
                            // generate unique values for new rows- useful for row keys
                            db.update(
                                "CREATE TABLE sample_table ( id INTEGER IDENTITY, str_col VARCHAR(256), num_col INTEGER)");
                        } catch (SQLException ex2) {
                
                            //ignore
                            //ex2.printStackTrace();  // second time we run program
                            //  should throw execption since table
                            // already there
                            //
                            // this will have no effect on the db
                        }
                
                        try {
                
                            // add some rows - will create duplicates if run more then once
                            // the id column is automatically generated
                            db.update(
                                "INSERT INTO sample_table(str_col,num_col) VALUES('Ford', 100)");
                            db.update(
                                "INSERT INTO sample_table(str_col,num_col) VALUES('Toyota', 200)");
                            db.update(
                                "INSERT INTO sample_table(str_col,num_col) VALUES('Honda', 300)");
                            db.update(
                                "INSERT INTO sample_table(str_col,num_col) VALUES('GM', 400)");
                
                            // do a query
                            db.query("SELECT * FROM sample_table WHERE num_col < 250");
                
                            // at end of program
                            db.shutdown();
                        } catch (SQLException ex3) {
                            ex3.printStackTrace();
                        }
                    }    // main()
                }    // class Testdb
                
                
                hsqldb-1.8.0.10.orig/doc/guide/ch05.html0000644000175000017500000006432010665324651016123 0ustar renereneChapter 5. Deployment Issues

                Chapter 5. Deployment Issues

                Fred Toussi

                HSQLDB Development Group

                Copyright 2005 Fred Toussi. Permission is granted to distribute this document without any alteration under the terms of the HSQLDB license. Additional permission is granted to the HSQLDB Development Group to distribute this document with or without alterations under the terms of the HSQLDB license.

                $Date: 2005/07/02 09:11:39 $

                Purpose

                Many questions repeatedly asked in Forums and mailing lists are answered in this guide. If you want to use HSQLDB with your application, you should read this guide. This document covers system related issues. For issues related to SQL see the SQL Issues chapter.

                Mode of Operation and Tables

                HSQLDB has many modes of operation and features that allow it to be used in very different scenarios. Levels of memory usage, speed and accessibility by different applications are influenced by how HSQLDB is deployed.

                Mode of Operation

                The decision to run HSQLDB as a separate server process or as an in-process database should be based on the following:

                • When HSQLDB is run as a server on a separate machine, it is isolated from hardware failures and crashes on the hosts running the application.

                • When HSQLDB is run as a server on the same machine, it is isolated from application crashes and memory leaks.

                • Server connections are slower than in-process connections due to the overhead of streaming the data for each JDBC call.

                Tables

                TEXT tables are designed for special applications where the data has to be in an interchangeable format, such as CSV. TEXT tables should not be used for routine storage of data.

                MEMORY tables and CACHED tables are generally used for data storage. The difference between the two is as follows:

                • The data for all MEMORY tables is read from the .script file when the database is started and stored in memory. In contrast the data for cached tables is not read into memory until the table is accessed. Furthermore, only part of the data for each CACHED table is held in memory, allowing tables with more data than can be held in memory.

                • When the database is shutdown in the normal way, all the data for MEMORY tables is written out to the disk. In comparison, the data in CACHED tables that has changed is written out at shutdown, plus a compressed backup of all the data in all cached tables.

                • The size and capacity of the data cache for all the CACHED tables is configurable. This makes it possible to allow all the data in CACHED tables to be cached in memory. In this case, speed of access is good, but slightly slower than MEMORY tables.

                • For normal applications it is recommended that MEMORY tables are used for small amounts of data, leaving CACHED tables for large data sets. For special applications in which speed is paramount and a large amount of free memory is available, MEMORY tables can be used for large tables as well

                Large Objects

                JDBC Clobs are supported as columns of the type LONGVARCHAR. JDBC Blobs are supported as columns of the type LONGVARBINARY. When large objects (LONGVARCHAR, LONGVARBINARY, OBJECT) are stored with table definitions that contain several normal fields, it is better to use two tables instead. The first table to contain the normal fields and the second table to contain the large object plus an identity field. Using this method has two benefits. (a) The first table can usually be created as a MEMORY table while only the second table is a CACHED table. (b) The large objects can be retrieved individually using their identity, instead of getting loaded into memory for finding the rows during query processing. An example of two tables and a select query that exploits the separation between the two follows:

                CREATE MEMORY TABLE MAINTABLE(MAINID INTEGER, ......);
                CREATE CACHED TABLE LOBTABLE(LOBID INTEGER, LOBDATA LONGVARBINARY);
                SELECT * FROM (SELECT * FROM MAINTABLE <join any other table> WHERE <various conditions apply>) JOIN LOBTABLE ON MAINID=LOBID;

                The inner SELECT finds the required rows without reference to the LOBTABLE and when it has found all the rows, retrieves the required large objects from the LOBTABLE.

                Deployment context

                The files used for storing HSQLDB database data are all in the same directory. New files are always created and deleted by the database engine. Two simple principles must be observed:

                • The Java process running HSQLDB must have full privileges on the directory where the files are stored. This include create and delete privileges.

                • The file system must have enough spare room both for the 'permanent' and 'temporary' files. The default maximum size of the .log file is 200MB. The .data file can grow to up to 8GB. The .backup file can be up to 50% of the .data file. The temporary file created at the time of a SHUTDOWN COMPACT can be equal in size to the .data file.

                Memory and Disk Use

                Memory used by the program can be thought of as two distinct pools: memory used for table data, and memory used for building result sets and other internal operations. In addition, when transactions are used, memory is utilised for storing the information needed for a rollback.

                Since version 1.7.1, memory use has been significantly reduced compared to previous versions. The memory used for a MEMORY table is the sum of memory used by each row. Each MEMORY table row is a Java object that has 2 int or reference variables. It contains an array of objects for the fields in the row. Each field is an object such as Integer, Long, String, etc. In addition each index on the table adds a node object to the row. Each node object has 6 int or reference variables. As a result, a table with just one column of type INTEGER will have four objects per row, with a total of 10 variables of 4 bytes each - currently taking up 80 bytes per row. Beyond this, each extra column in the table adds at least a few bytes to the size of each row.

                The memory used for a result set row has fewer overheads (fewer variables and no index nodes) but still uses a lot of memory. All the rows in the result set are built in memory, so very large result sets may not be possible. In server mode databases, the result set memory is released from the server once the database server has returned the result set. In-process databases release the memory when the application program releases the java.sql.ResultSet object. Server modes require additional memory for returning result sets, as they convert the full result set into an array of bytes which is then transmitted to the client.

                When UPDATE and DELETE queries are performed on CACHED tables, the full set of rows that are affected, including those affected due to ON UPDATE actions, is held in memory for the duration of the operation. This means it may not be possible to perform deletes or updates involving very large numbers of rows of CACHED tables. Such operations should be performed in smaller sets.

                When transactions support is enabled with SET AUTOCOMMIT OFF, lists of all insert, delete or update operations are stored in memory so that they can be undone when ROLLBACK is issued. Transactions that span hundreds of modification to data will take up a lot of memory until the next COMMIT or ROLLBACK clears the list.

                Most JVM implementations allocate up to a maximum amount of memory (usually 64 MB by default). This amount is generally not adequate when large memory tables are used, or when the average size of rows in cached tables is larger than a few hundred bytes. The maximum amount of allocated memory can be set on the java ... command line that is used for running HSQLDB. For example, with Sun JVM version 1.3.0 the parameter -Xmx256m increases the amount to 256 MB.

                1.8.0 uses a fast cache for immutable objects such as Integer or String that are stored in the database. In most circumstances, this reduces the memory footprint still further as fewer copies of the most frequently-used objects are kept in memory.

                Cache Memory Allocation

                With CACHED tables, the data is stored on disk and only up to a maximum number of rows are held in memory at any time. The default is up to 3*16384 rows. The hsqldb.cache_scale database property can be set to alter this amount. As any random subset of the rows in any of the CACHED tables can be held in the cache, the amount of memory needed by cached rows can reach the sum of the rows containing the largest field data. For example if a table with 100,000 rows contains 40,000 rows with 1,000 bytes of data in each row and 60,000 rows with 100 bytes in each, the cache can grow to contain nearly 50,000 rows, including all the 40,000 larger rows.

                An additional property, hsqldb.cache_size_scale can be used in conjunction with the hsqldb.cache_scale property. This puts a limit in bytes on the total size of rows that are cached. When the default values is used for both properties, the limit on the total size of rows is approximately 50MB. (This is the size of binary images of the rows and indexes. It translates to more actual memory, typically 2-4 times, used for the cache because the data is represented by Java objects.)

                If memory is limited, the hsqldb.cache_scale or hsqldb.cache_size_scale database properties can be reduced. In the example above, if the hsqldb.cache_size_scale is reduced from 10 to 8, then the total binary size limit is reduced from 50MB to 12.5 MB. This will allow the number of cached rows to reach 50,000 small rows, but only 12,500 of the larger rows.

                Managing Database Connections

                In all running modes (server or in-process) multiple connections to the database engine are supported. In-process (standalone) mode supports connections from the client in the same Java Virtual Machine, while server modes support connections over the network from several different clients.

                Connection pooling software can be used to connect to the database but it is not generally necessary. With other database engines, connection pools are used for reasons that may not apply to HSQLDB.

                • To allow new queries to be performed while a time-consuming query is being performed in the background. This is not possible with HSQLDB 1.8.0 as it blocks while performing the first query and deals with the next query once it has finished it. This capability is under development and will be introduced in a future version.

                • To limit the maximum number of simultaneous connections to the database for performance reasons. With HSQLDB this can be useful only if your application is designed in a way that opens and closes connections for each small task.

                • To control transactions in a multi-threaded application. This can be useful with HSQLDB as well. For example, in a web application, a transaction may involve some processing between the queries or user action across web pages. A separate connection should be used for each HTTP session so that the work can be committed when completed or rolled back otherwise. Although this usage cannot be applied to most other database engines, HSQLDB is perfectly capable of handling over 100 simultaneous HTTP sessions as individual JDBC connections.

                An application that is not both multi-threaded and transactional, such as an application for recording user login and logout actions, does not need more than one connection. The connection can stay open indefinitely and reopened only when it is dropped due to network problems.

                When using an in-process database with versions prior to 1.7.2 the application program had to keep at least one connection to the database open, otherwise the database would have been closed and further attempts to create connections could fail. This is not necessary since 1.7.2, which does not automatically close an in-process database that is opened by establishing a connection. An explicit SHUTDOWN command, with or without an argument, is required to close the database. In version 1.8.0 a connection property can be used to revert to the old behaviour.

                When using a server database (and to some extent, an in-process database), care must be taken to avoid creating and dropping JDBC Connections too frequently. Failure to observe this will result in unsuccessful connection attempts when the application is under heavy load.

                Upgrading Databases

                Any database not produced with the release version of HSQLDB 1.8.0 must be upgraded to this version. This includes databases created with the RC versions of 1.8.0. The instructions under the Upgrading Using the SCRIPT Command section should be followed in all cases.

                Once a database is upgraded to 1.8.0, it can no longer be used with Hypersonic or previous versions of HSQLDB.

                There may be some potential legacy issues in the upgrade which should be resolved by editing the .script file:

                • Version 1.8.0 does not accept duplicate names for indexes that were allowed before 1.7.2.

                • Version 1.8.0 does not accept duplicate names for table columns that were allowed before 1.7.0.

                • Version 1.8.0 does not create the same type of index for foreign keys as versions before 1.7.2.

                • Version 1.8.0 does not accept table or column names that are SQL identifiers without double quoting.

                Upgrading Using the SCRIPT Command

                To upgrade from 1.7.2 or 1.7.3 to 1.8.0, simply issue the SET SCRIPTFORMAT TEXT and SHUTDOWN SCRIPT commands with the old version, then open with the new version of the engine. The upgrade is then complete.

                To upgrade from older version database files (1.7.1 and older) that do not contain CACHED tables, simple SHUTDOWN with the older version and open with the new version. If there is any error in the .script file, try again after editing the .script file.

                To upgrade from older version database files (1.7.1 and older) that contain CACHED tables, use the SCRIPT procedure below. In all versions of HSQLDB and Hypersonic 1.43, the SCRIPT 'filename' command (used as an SQL query) allows you to save a full record of your database, including database object definitions and data, to a file of your choice. You can export a script file using the old version of the database engine and open the script as a database with 1.8.0.

                Procedure 5.1. Upgrade Using SCRIPT procedure

                1. Open the original database in the old version of DatabaseManager

                2. Issue the SCRIPT command, for example SCRIPT 'newversion.script' to create a script file containing a copy of the database.

                3. Use the 1.8.0 version of DatabaseManager to create a new database, in this example 'newversion' in a different directory.

                4. SHUTDOWN this database.

                5. Copy the newversion.script file from step 2 over the file of the same name for the new database created in 4.

                6. Try to open the new database using DatabaseManager.

                7. If there is any inconsistency in the data, the script line number is reported on the console and the opening process is aborted. Edit and correct any problems in the newversion.script before attempting to open again. Use the guidelines in the next section (Manual Changes to the .script File). Use a programming editor that is capable of handling very large files and does not wrap long lines of text.

                Manual Changes to the .script File

                In 1.8.0 the full range of ALTER TABLE commands is available to change the data structures and their names. However, if an old database cannot be opened due to data inconsistencies, or the use of index or column names that are not compatible with 1.8.0, manual editing of the SCRIPT file can be performed.

                The following changes can be applied so long as they do not affect the integrity of existing data.

                • Names of tables, columns and indexes can be changed.

                • CREATE UNIQUE INDEX ... to CREATE INDEX ... and vice versa

                  A unique index can always be converted into a normal index. A non-unique index can only be converted into a unique index if the table data for the column(s) is unique in each row.

                • NOT NULL

                  A not-null constraint can always be removed. It can only be added if the table data for the column has no null values.

                • PRIMARY KEY

                  A primary key constraint can be removed or added. It cannot be removed if there is a foreign key referencing the column(s).

                • COLUMN TYPES

                  Some changes to column types are possible. For example an INTEGER column can be changed to BIGINT, or DATE, TIME and TIMESTAMP columns can be changed to VARCHAR.

                After completing the changes and saving the modified *.script file, you can open the database as normal.

                Backing Up Databases

                The data for each database consists of up to 5 files in the same directory. The endings are *.properties, *.script, *.data, *.backup and *.log (a file with the *.lck ending is used for controlling access to the database and should not be backed up). These should be backed up together. The files can be backed up while the engine is running but care should be taken that a CHECKPOINT or SHUTDOWN operation does not take place during the backup. It is more efficient to perform the backup immediately after a CHECKPOINT. The *.data file can be excluded from the backup. In this case, when restoring, a dummy *.data file is needed which can be an empty, 0 length file. The engine will expand the *.backup file to replace this dummy file if the backup is restored. If the *.data file is not backed up, the *.properties file may have to be modified to ensure it contain modified=yes instead of modified=no prior to restoration. If a backup immediately follows a checkpoint, then the *.log file can also be excluded, reducing the significant files to *.properties, *.script and *.backup. Normal backup methods, such as archiving the files in a compressed bundle can be used.

                hsqldb-1.8.0.10.orig/doc/guide/navicons/0000755000175000017500000000000010665324631016307 5ustar renerenehsqldb-1.8.0.10.orig/doc/guide/navicons/prev.gif0000644000175000017500000000064610665324631017760 0ustar renereneGIF89a̽׻չӷѵϵϴͳ̮Ǭƨ33f!1,@ppH,DQy^r StdjBXFeAY4TFCYt;<15H o{azmJpx*u{OQKyiue} # !/0l`A!OCopyright 2000 by Sun Microsystems, Inc. All Rights Reserved. JLF GR Ver 1.0 ;hsqldb-1.8.0.10.orig/doc/guide/navicons/home.gif0000644000175000017500000000224610665324631017732 0ustar renereneGIF89a{zåɠÝ˦ʤǢŨ˭Ъͷ۲կҹ00a==nnnUUz\\^^rrffkknnuuzz||ŞÛɡƠğޝ̥ͧʤȣǢƜѨ̧˦ʥɤǰխѬЫϪΩͷܵڲְԯӮҷ۶ڵٴس׸ܴ׹ܸefklmntuʭҬѩΦʯԬЩͷܷ۳!,H*\Ȑ !V@ >b QE'B\SO  !52\N ,dz=P 6|x8@t?-xpC Chapter 2. SQL Issues

                Chapter 2. SQL Issues

                Fred Toussi

                HSQLDB Development Group

                Copyright 2002-2005 Fred Toussi. Permission is granted to distribute this document without any alteration under the terms of the HSQLDB license. Additional permission is granted to the HSQLDB Development Group to distribute this document with or without alterations under the terms of the HSQLDB license.

                $Date: 2005/07/01 17:06:32 $

                Purpose

                Many questions repeatedly asked in Forums and mailing lists are answered in this guide. If you want to use HSQLDB with your application, you should read this guide.

                SQL Standard Support

                HSQLDB 1.8.0 supports the dialect of SQL defined by SQL standards 92, 99 and 2003. This means where a feature of the standard is supported, e.g. left outer join, the syntax is that specified by the standard text. Many features of SQL92 and 99 up to Advanced Level are supported and there is support for most of SQL 2003 Foundation and several optional features of this standard. However, certain features of the Standards are not supported so no claim is made for full support of any level of the standards.

                The SQL Syntax chapter of this guide SQL Syntax lists all the keywords and syntax that is supported. When writing or converting existing SQL DDL (Data Definition Language) and DML (Data Manipulation Language) statements for HSQLDB, you should consult the supported syntax and modify the statements accordingly.

                Several words are reserved by the standard and cannot be used as table or column names. For example, the word POSITION is reserved as it is a function defined by the Standards with a similar role as String.indexOf() in Java. HSQLDB does not currently prevent you from using a reserved word if it does not support its use or can distinguish it. For example BEGIN is a reserved words that is not currently supported by HSQLDB and is allowed as a table or column name. You should avoid the use of such words as future versions of HSQLDB are likely to support the words and will reject your table definitions or queries. The full list of SQL reserved words is in the source of the org.hsqldb.Token class.

                HSQLDB also supports some keywords and expressions that are not part of the SQL standard as enhancements. Expressions such as SELECT TOP 5 FROM .., SELECT LIMIT 0 10 FROM ... or DROP TABLE mytable IF EXISTS are among such constructs.

                All keywords, can be used for database objects if they are double quoted.

                Constraints and Indexes

                Primary Key Constraints

                Before 1.7.0, a CONSTRAINT <name> PRIMARY KEY was translated internally to a unique index and, in addition, a hidden column was added to the table with an extra unique index. From 1.7.0 both single-column and multi-column PRIMARY KEY constraints are supported. They are supported by a unique index on the primary key column(s) specified and no extra hidden column is maintained for these indexes.

                Unique Constraints

                According to the SQL standards, a unique constraint on a single column means no two values are equal unless one of them is NULL. This means you can have one or more rows where the column value is NULL.

                A unique constraint on multiple columns (c1, c2, c3, ..) means that no two sets of values for the columns are equal unless at lease one of them is NULL. Each single column taken by itself can have repeat values. The following example satisfies a UNIQUE constraint on the two columns:

                Example 2.1. Column values which satisfy a 2-column UNIQUE constraint

                1,2
                2,1
                2,2
                NULL,1
                NULL,1
                1,NULL
                NULL,NULL
                NULL,NULL

                Since version 1.7.2 the behaviour of UNIQUE constraints and indexes with respect to NULL values has changed to conform to SQL standards. A row, in which the value for any of the UNIQUE constraint columns is NULL, can always be added to the table. So multiple rows can contain the same values for the UNIQUE columns if one of the values is NULL.

                Unique Indexes

                In 1.8.0, user defined UNIQUE indexes can still be declared but they are deprecated. You should use a UNIQUE constraint instead.

                CONSTRAINT <name> UNIQUE always creates internally a unique index on the columns, as with previous versions, so it has exactly the same effect as the deprecated UNIQUE index declaration.

                FOREIGN KEYS

                From version 1.7.0, HSQLDB features single and multiple column foreign keys. A foreign key can also be specified to reference a target table without naming the target column(s). In this case the primary key column(s) of the target table is used as the referenced column(s). Each pair of referencing and referenced columns in any foreign key should be of identical type. When a foreign key is declared, a unique constraint (or primary key) must exist on the referenced columns in the primary key table. A non-unique index is automatically created on the referencing columns. For example:

                    CREATE TABLE child(c1 INTEGER, c2 VARCHAR, FOREIGN KEY (c1, c2) REFERENCES parent(p1, p2));

                There must be a UNIQUE constraint on columns (p1,p2) in the table named "parent". A non-unique index is automatically created on columns (c1, c2) in the table named "child". Columns p1 and c1 must be of the same type (INTEGER). Columns p2 and c2 must be of the same type (VARCHAR).

                Indexes and Query Speed

                HSQLDB does not use indexes to improve sorting of query results. But indexes have a crucial role in improving query speed. If no index is used in a query on a single table, such as a DELETE query, then all the rows of the table must be examined. With an index on one of the columns that is in the WHERE clause, it is often possible to start directly from the first candidate row and reduce the number of rows that are examined.

                Indexes are even more important in joins between multiple tables. SELECT ... FROM t1 JOIN t2 ON t1.c1 = t2.c2 is performed by taking rows of t1 one by one and finding a matching row in t2. If there is no index index on t2.c2 then for each row of t1, all the rows of t2 must be checked. Whereas with an index, a matching row can be found in a fraction of the time. If the query also has a condition on t1, e.g., SELECT ... FROM t1 JOIN t2 ON t1.c1 = t2.c2 WHERE t1.c3 = 4 then an index on t1.c3 would eliminate the need for checking all the rows of t1 one by one, and will reduce query time to less than a millisecond per returned row. So if t1 and t2 each contain 10,000 rows, the query without indexes involves checking 100,000,000 row combinations. With an index on t2.c2, this is reduced to 10,000 row checks and index lookups. With the additional index on t2.c2, only about 4 rows are checked to get the first result row.

                Indexes are automatically created for primary key and unique columns. Otherwise you should define an index using the CREATE INDEX command.

                Note that in HSQLDB a unique index on multiple columns can be used internally as a non-unique index on the first column in the list. For example: CONSTRAINT name1 UNIQUE (c1, c2, c3); means there is the equivalent of CREATE INDEX name2 ON atable(c1);. So you do not need to specify an extra index if you require one on the first column of the list.

                In 1.8.0, a multi-column index will speed up queries that contain joins or values on ALL the columns. You need NOT declare additional individual indexes on those columns unless you use queries that search only on a subset of the columns. For example, rows of a table that has a PRIMARY KEY or UNIQUE constraint on three columns or simply an ordinary index on those columns can be found efficiently when values for all three columns are specified in the WHERE clause. For example, SELECT ... FROM t1 WHERE t1.c1 = 4 AND t1.c2 = 6 AND t1.c3 = 8 will use an index on t1(c1,c2,c3) if it exists.

                As a result of the improvements to multiple key indexes, the order of declared columns of the index or constraint has less affect on the speed of searches than before. If the column that contains more diverse values appears first, the searches will be slightly faster.

                A multi-column index will not speed up queries on the second or third column only. The first column must be specified in the JOIN .. ON or WHERE conditions.

                Query speed depends a lot on the order of the tables in the JOIN .. ON or FROM clauses. For example the second query below should be faster with large tables (provided there is an index on TB.COL3). The reason is that TB.COL3 can be evaluated very quickly if it applies to the first table (and there is an index on TB.COL3):

                    (TB is a very large table with only a few rows where TB.COL3 = 4)
                
                    SELECT * FROM TA JOIN TB ON TA.COL1 = TB.COL2 AND TB.COL3 = 4;
                
                    SELECT * FROM TB JOIN TA ON TA.COL1 = TB.COL2 AND TB.COL3 = 4;

                The general rule is to put first the table that has a narrowing condition on one of its columns.

                1.7.3 features automatic, on-the-fly indexes for views and subselects that are used in a query. An index is added to a view when it is joined to a table or another view.

                Where Condition or Join

                Using WHERE conditions to join tables is likely to reduce execution speed. For example the following query will generally be slow, even with indexes:

                    SELECT ... FROM TA, TB, TC WHERE TC.COL3 = TA.COL1 AND TC.COL3=TB.COL2 AND TC.COL4 = 1

                The query implies TA.COL1 = TB.COL2 but does not explicitly set this condition. If TA and TB each contain 100 rows, 10000 combinations will be joined with TC to apply the column conditions, even though there may be indexes on the joined columns. With the JOIN keyword, the TA.COL1 = TB.COL2 condition has to be explicit and will narrow down the combination of TA and TB rows before they are joined with TC, resulting in much faster execution with larger tables:

                    SELECT ... FROM TA JOIN TB ON TA.COL1 = TB.COL2 JOIN TC ON TB.COL2 = TC.COL3 WHERE TC.COL4 = 1

                The query can be speeded up a lot more if the order of tables in joins are changed, so that TC.COL1 = 1 is applied first and a smaller set of rows are joined together:

                    SELECT ... FROM TC JOIN TB ON TC.COL3 = TB.COL2 JOIN TA ON TC.COL3 = TA.COL1 WHERE TC.COL4 = 1

                In the above example the engine automatically applies TC.COL4 = 1 to TC and joins only the set of rows that satisfy this condition with other tables. Indexes on TC.COL4, TB.COL2 and TA.COL1 will be used if present and will speed up the query.

                Subqueries and Joins

                Using joins and setting up the order of tables for maximum performance applies to all areas. For example, the second query below should generally be much faster if there are indexes on TA.COL1 and TB.COL3:

                Example 2.2. Query comparison

                    SELECT ... FROM TA WHERE TA.COL1 = (SELECT MAX(TB.COL2) FROM TB WHERE TB.COL3 = 4)
                
                    SELECT ... FROM (SELECT MAX(TB.COL2) C1 FROM TB WHERE TB.COL3 = 4) T2 JOIN TA ON TA.COL1 = T2.C1

                The second query turns MAX(TB.COL2) into a single row table then joins it with TA. With an index on TA.COL1, this will be very fast. The first query will test each row in TA and evaluate MAX(TB.COL2) again and again.

                Types and Arithmetic Operations

                Table columns of all types supported by HSQLDB can be indexed and can feature in comparisons. Types can be explicitly converted using the CONVERT() library function, but in most cases they are converted automatically. It is recommended not to use indexes on LONGVARBINARY, LONGVARCHAR and OTHER columns, as these indexes will probably not be allowed in future versions.

                Previous versions of HSQLDB featured poor handling of arithmetic operations. For example, it was not possible to insert 10/2.5 into any DOUBLE or DECIMAL column. Since 1.7.0, full operations are possible with the following rules:

                TINYINT, SMALLINT, INTEGER, BIGINT, NUMERIC and DECIMAL (without a decimal point) are supported integral types and map to byte, short, int, long and BigDecimal in Java. The SQL type dictates the maximum and minimum values that can be held in a field of each type. For example the value range for TINYINT is -128 to +127, although the actual Java type used for handling TINYINT is java.lang.Integer.

                REAL, FLOAT, DOUBLE are all mapped to double in Java.

                DECIMAL and NUMERIC are mapped to java.math.BigDecimal and can have very large numbers of digits.

                Integral Types

                TINYINT, SMALLINT, INTEGER, BIGINT, NUMERIC and DECIMAL (without a decimal point) are fully interchangeable internally, and no data narrowing takes place. Depending on the types of the operands, the result of the operations is returned in a JDBC ResultSet in any of related Java types: Integer, Long or BigDecimal. The ResultSet.getXXXX() methods can be used to retrieve the values so long as the returned value can be represented by the resulting type. This type is deterministically based on the query, not on the actual rows returned. The type does not change when the same query that returned one row, returns many rows as a result of adding more data to the tables.

                If the SELECT statement refers to a simple column or function, then the return type is the type corresponding to the column or the return type of the function. For example:

                    CREATE TABLE t(a INTEGER, b BIGINT); SELECT MAX(a), MAX(b) FROM t;

                would return a result set where the type of the first column is java.lang.Integer and the second column is java.lang.Long. However,

                    SELECT MAX(a) + 1, MAX(b) + 1 FROM t;

                would return java.lang.Long and BigDecimal values, generated as a result of uniform type promotion for all the return values.

                There is no built-in limit on the size of intermediate integral values in expressions. As a result, you should check for the type of the ResultSet column and choose an appropriate getXXXX() method to retrieve it. Alternatively, you can use the getObject() method, then cast the result to java.lang.Number and use the intValue() or longValue() methods on the result.

                When the result of an expression is stored in a column of a database table, it has to fit in the target column, otherwise an error is returned. For example when 1234567890123456789012 / 12345687901234567890 is evaluated, the result can be stored in any integral type column, even a TINYINT column, as it is a small value.

                Other Numeric Types

                In SQL statements, numbers with a decimal point are treated as DECIMAL unless they are written with an exponent. Thus 0.2 is considered a DECIMAL value but 0.2E0 is considered a DOUBLE value.

                When PreparedStatement.setDouble() or setFloat() is used, the value is treated as a DOUBLE automatically.

                When a REAL, FLOAT or DOUBLE (all synonymous) is part of an expression, the type of the result is DOUBLE.

                Otherwise, when no DOUBLE value exists, if a DECIMAL or NUMERIC value is part an expression, the type of the result is DECIMAL. The result can be retrieved from a ResultSet in the required type so long as it can be represented. This means DECIMAL values can be converted to DOUBLE unless they are beyond the Double.MIN_VALUE - Double.MAX_VALUE range. Similar to integral values, when the result of an expression is stored in a table column, it has to fit in the target column, otherwise an error is returned.

                The distinction between DOUBLE and DECIMAL is important when a division takes place. When the terms are DECIMAL, the result is a value with a scale (number of digits to the right of the decimal point) equal to the larger of the scales of the two terms. With a DOUBLE term, the scale will reflect the actual result of the operation. For example, 10.0/8.0 (DECIMAL) equals 1.2 but 10.0E0/8.0E0 (DOUBLE) equals 1.25. Without division operations, DECIMAL values represent exact arithmetic; the resulting scale is the sum of the scales of the two terms when multiplication is performed.

                REAL, FLOAT and DOUBLE values are all stored in the database as java.lang.Double objects. Special values such as NaN and +-Infinity are also stored and supported. These values can be submitted to the database via JDBC PreparedStatement methods and are returned in ResultSet objects.

                Bit and Boolean Types

                Since 1.7.2, BIT is simply an alias for BOOLEAN. The primary representation of BOOLEAN column is 'true' or 'false' either as the boolean type or as strings when used from JDBC. This type of column can also be initialised using values of any numeric type. In this case 0 is translated to false and any other value such as 1 is translated to true.

                Since 1.7.3 the BOOLEAN type conforms to the SQL standards and supports the UNDEFINED state in addition to TRUE or FALSE. NULL values are treated as undefined. This improvement affects queries that contain NOT IN. See the test text file, TestSelfNot.txt, for examples of the queries.

                Storage and Handling of Java Objects

                Since version 1.7.2 this support has improved and any serializable JAVA Object can be inserted directly into a column of type OTHER using any variation of PreparedStatement.setObject() methods.

                For comparison purposes and in indexes, any two Java Objects are considered equal unless one of them is NULL. You cannot search for a specific object or perform a join on a column of type OTHER.

                Please note that HSQLDB is not an object-relational database. Java Objects can simply be stored internally and no operations should be performed on them other than assignment between columns of type OTHER or tests for NULL. Tests such as WHERE object1 = object2, or WHERE object1 = ? do not mean what you might expect, as any non-null object would satisfy such a tests. But WHERE object1 IS NOT NULL is perfectly acceptable.

                The engine does not return errors when normal column values are assigned to Java Object columns (for example assigning an INTEGER or STRING to such a column with an SQL statement such as UPDATE mytable SET objectcol = intcol WHERE ...) but this is highly likely to be disallowed in future. So please use columns of type OTHER only to store your objects and nothing else.

                Type Size, Precision and Scale

                Prior to 1.7.2, all table column type definitions with a column size, precision or scale qualifier were accepted and ignored.

                In 1.8.0, such qualifiers must conform to the SQL standards. For example INTEGER(8) is no longer acceptable. The qualifiers are still ignored unless you set a database property. SET PROPERTY "sql.enforce_strict_size" TRUE will enforce sizes for CHARACTER or VARCHAR columns and pad any strings when inserting or updating a CHARACTER column. The precision and scale qualifiers are also enforced for DECIMAL and NUMERIC types. TIMESTAMP can be used with a precision of 0 or 6 only.

                Casting a value to a qualified CHARACTER type will result in truncation or padding as you would expect. So a test such as CAST (mycol AS VARCHAR(2)) = 'xy' will find the values beginning with 'xy'. This is the equivalent of SUBSTRING(mycol FROM 1 FOR 2) = 'xy'.

                Sequences and Identity

                The SEQUENCE keyword was introduced in 1.7.2 with a subset of the SQL 200n standard syntax. Corresponding SQL 200n syntax for IDENTITY columns has also been introduced.

                Identity Auto-Increment Columns

                Each table can contain one auto-increment column, known as the IDENTITY column. An IDENTITY column is always treated as the primary key for the table (as a result, multi-column primary keys are not possible with an IDENTITY column present). Support has been added for CREATE TABLE <tablename>(<colname> IDENTITY, ...) as a shortcut.

                Since 1.7.2, the SQL standard syntax is used by default, which allows the initial value to be specified. The supported form is(<colname> INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH n, [INCREMENT BY m])PRIMARY KEY, ...). Support has also been added for BIGINT identity columns. As a result, an IDENTITY column is simply an INTEGER or BIGINT column with its default value generated by a sequence generator.

                When you add a new row to such a table using an INSERT INTO <tablename> ...; statement, you can use the NULL value for the IDENTITY column, which results in an auto-generated value for the column. The IDENTITY() function returns the last value inserted into any IDENTITY column by this connection. Use CALL IDENTITY(); as an SQL statement to retrieve this value. If you want to use the value for a field in a child table, you can use INSERT INTO <childtable> VALUES (...,IDENTITY(),...);. Both types of call to IDENTITY() must be made before any additional update or insert statements are issued on the database.

                The next IDENTITY value to be used can be set with the

                ALTER TABLE ALTER COLUMN <column name> RESTART WITH <new value>;

                Sequences

                The SQL 200n syntax and usage is different from what is supported by many existing database engines. Sequences are created with the CREATE SEQUENCE command and their current value can be modified at any time with ALTER SEQUENCE. The next value for a sequence is retrieved with the NEXT VALUE FOR <name> expression. This expression can be used for inserting and updating table rows. You can also use it in select statements. For example, if you want to number the returned rows of a SELECT in sequential order, you can use:

                Example 2.3. Numbering returned rows of a SELECT in sequential order

                    SELECT NEXT VALUE FOR mysequence, col1, col2 FROM mytable WHERE ...

                Please note that the semantics of sequences is not exactly the same as defined by SQL 200n. For example if you use the same sequence twice in the same row insert query, you will get two different values, not the same value as required by the standard.

                You can query the SYSTEM_SEQUENCES table for the next value that will be returned from any of the defined sequences. The SEQUENCE_NAME column contains the name and the NEXT_VALUE column contains the next value to be returned.

                Issues with Transactions

                HSQLDB supports transactions at the READ_UNCOMMITTED level, also known as level 0 transaction isolation. This means that during the lifetime of a transaction, other connections to the database can see the changes made to the data. Transaction support works well in general. Reported bugs concerning transactions being committed if the database is abruptly closed have been fixed. However, the following issues may be encountered only with multiple connections to a database using transactions:

                If two transactions modify the same row, no exception is raised when both transactions are committed. This can be avoided by designing your database in such a way that application data consistency does not depend on exclusive modification of data by one transaction. You can set a database property to cause an exception when this happens.

                SET PROPERTY "sql.tx_no_multi_rewrite" TRUE
                When an ALTER TABLE .. INSERT COLUMN or DROP COLUMN command results in changes to the table structure, the current session is committed. If an uncommitted transaction started by another connections has changed the data in the affected table, it may not be possible to roll it back after the ALTER TABLE command. This may also apply to ADD INDEX or ADD CONSTRAINT commands. It is recommended to use these ALTER commands only when it is known that other connections are not using transactions.

                After a CHECKPOINT command is issued, uncommitted transactions can be continued, committed, or rolled back. However, if the database is not subsequently closed properly with the SHUTDOWN command, any such transaction that still remains uncommitted at the time of shutdown, is part committed (to the state at CHECKPOINT) at the next startup. It is recommended to use the CHECKPOINT command either when no uncommitted transactions is in progress, or it is known that any such transaction is not likely to last for such a long time that an abnormal shutdown might affect its data.

                New Features and Changes

                In recent versions leading to 1.8.0 many enhancements were made for better SQL support. These are listed in the SQL Syntax chapter, in ../changelog_1_8_0.txt and ../changelog_1_7_2.txt. Functions and expressions such as POSITION(), SUBSTRING(), NULLIF(), COALESCE(), CASE ... WHEN .. ELSE, ANY, ALL etc. are among them. Other enhancements may not be very obvious in the documentation but can result in changes of behaviour from previous versions. Most significant among these are handling of NULL values in joins (null columns are no longer joined) and OUTER joins (the results are now correct). You should test your applications with the new version to ensure they do not rely on past incorrect behaviour of the engine. The engine will continue to evolve in future versions towards full SQL standard support, so it is best not to rely on any non-standard feature of the current version.

                hsqldb-1.8.0.10.orig/doc/guide/apg.html0000644000175000017500000001070310665324665016134 0ustar renereneAppendix G. Transfer Tool

                Appendix G. Transfer Tool

                Fred Toussi

                HSQLDB Development Group

                $Date: 2005/06/29 23:15:13 $

                Table of Contents

                Brief Introduction

                Brief Introduction

                Transfer Tool is a GUI program for transferring SQL schema and data from one JDBC source to another. Source and destination can be different database engines or different databases on the same server.

                Transfer Tool works in two different modes. Direct transfer maintains a connection to both source and destination and performs the transfer. Dump and Restore mode is invoked once to transfer the data from the source to a text file (Dump), then again to transfer the data from the text file to the destination (Restore). With Dump and Restore, it is possible to make any changes to database object definitions and data prior to restoring it to the target.

                Dump and Restore modes can be set via the command line with -d (--dump) or -r (--restore) options. Alternatively the Transfer Tool can be started with any of the three modes from the Database Manager's Tools menu.

                The connection dialogue allows you to save the settings for the connection you are about to make. You can then access the connection in future sessions. These settings are shared with those from the Database Manager tool. See the appendix on Database Manager for details of the connection dialogue box.

                In version 1.8.0 Transfer Tool is no longer part of the hsqldb.jar. You can build the hsqldbutil.jar using the Ant command of the same name, to build a jar that includes Transfer Tool and the Database Manager.

                When collecting meta-data, Transfer Tool performs SELECT * FROM <table> queries on all the tables in the source database. This may take a long time with some database engines. When the source database is HSQLDB, this means memory should be available for the result sets returned from the queries. Therefore, the memory allocation of the java process in which Transfer Tool is executed may have to be high.

                hsqldb-1.8.0.10.orig/doc/guide/ch06.html0000644000175000017500000004676410665324652016141 0ustar renereneChapter 6. Text Tables

                Chapter 6. Text Tables

                Text Tables as a Standard Feature of Hsqldb

                Bob Preston

                HSQLDB Development Group

                Fred Toussi

                HSQLDB Development Group

                Copyright 2002-2005 Bob Preston and Fred Toussi. Permission is granted to distribute this document without any alteration under the terms of the HSQLDB license. Additional permission is granted to the HSQLDB Development Group to distribute this document with or without alterations under the terms of the HSQLDB license.

                $Date: 2007/08/28 13:19:09 $

                Text Table support for HSQLDB was originally developed by Bob Preston independently from the Project. Subsequently Bob joined the Project and incorporated this feature into version 1.7.0, with a number of enhancements, especially the use of conventional SQL commands for specifying the files used for Text Tables.

                In a nutshell, Text Tables are CSV or other delimited files treated as SQL tables. Any ordinary CSV or other delimited file can be used. The full range of SQL queries can be performed on these files, including SELECT, INSERT, UPDATE and DELETE. Indexes and unique constraints can be set up, and foreign key constraints can be used to enforce referential integrity between Text Tables themselves or with conventional tables.

                HSQLDB with Text Table support is the only comprehensive solution that employs the power of SQL and the universal reach of JDBC to handle data stored in text files and will have wide-ranging use way beyond the currently established Java realm of HSQLDB.

                Goals of the Implementation

                1. We aimed to finalise the DDL for Text Tables so that future releases of HSQLDB use the same DDL scripts.

                2. We aimed to support Text Tables as GLOBAL TEMPORARY or GLOBAL BASE tables in the SQL domain.

                The Implementation

                Definition of Tables

                Text Tables are defined similarly to conventional tables with the added TEXT keyword:

                    CREATE TEXT TABLE <tablename> (<column definition> [<constraint definition>])

                In addition, a SET command specifies the file and the separator character that the Text table uses:

                    SET TABLE <tablename> SOURCE <quoted_filename_and_options> [DESC]

                Text Tables cannot be created in memory-only databases (databases that have no script file).

                Scope and Reassignment

                • A Text table without a file assigned to it is READ ONLY and EMPTY.

                • A Temporary Text table has the scope and the lifetime of the SQL session (a JDBC Connection).

                • Reassigning a Text Table definition to a new file has implications in the following areas:

                  1. The user is required to be an administrator.

                  2. Existing transactions are committed at this point.

                  3. Constraints, including foreign keys referencing this table, are kept intact. It is the responsibility of the administrator to ensure their integrity.

                  From version 1.7.2 the new source file is scanned and indexes are built when it is assigned to the table. At this point any violation of NOT NULL, UNIQUE or PRIMARY KEY constrainst are caught and the assignment is aborted. However, foreign key constraints are not checked at the time of assignment or reassignment of the source file.

                Null Values in Columns of Text Tables

                This has changed since 1.7.2 to support both null values and empty strings.

                • Empty fields are treated as NULL. These are fields where there is nothing or just spaces between the separators.

                • Quoted empty strings are treated as empty strings.

                Configuration

                The default field separator is a comma (,). A different field separator can be specified within the SET TABLE SOURCE statement. For example, to change the field separator for the table mytable to a vertical bar, place the following in the SET TABLE SOURCE statement, for example:

                    SET TABLE mytable SOURCE "myfile;fs=|"

                Since HSQLDB treats CHAR's, VARCHARs, and LONGVARCHARs the same, the ability to assign different separators to the latter two is provided. When a different separator is assigned to a VARCHAR or LONGVARCHAR field, it will terminate any CSV field of that type. For example, if the first field is CHAR, and the second field LONGVARCHAR, and the separator fs has been defined as the pipe (|) and vs as the period (.) then the data in the CSV file for a row will look like:

                    First field data|Second field data.Third field data

                The following example shows how to change the default separator to the pipe (|), VARCHAR separator to the period (.) and the LONGVARCHAR separator to the tilde (~). Place the following within the SET TABLE SOURCE statement, for example:

                    SET TABLE mytable SOURCE "myfile;fs=|;vs=.;lvs=~"

                HSQLDB also recognises the following special indicators for separators:

                special indicators for separators

                \semi

                semicolon

                \quote

                qoute

                \space

                space character

                \apos

                apostrophe

                \n

                newline - Used as an end anchor (like $ in regular expressions)

                \r

                carriage return

                \t

                tab

                \\

                backslash

                \u####

                a Unicode character specified in hexadecimal

                Furthermore, HSQLDB provides csv file support with three additional boolean options: ignore_first, quoted and all_quoted. The ignore_first option (default false) tells HSQLDB to ignore the first line in a file. This option is used when the first line of the file contains column headings. The all_quoted option (default false) tells the program that it should use quotes around all character fields when writing to the source file. The quoted option (default true) uses quotes only when necessary to distinguish a field that contains the separator character. It can be set to false to prevent the use of quoting altogether and treat quote characters as normal characters. These options may be specified within the SET TABLE SOURCE statement:

                    SET TABLE mytable SOURCE "myfile;ignore_first=true;all_quoted=true"

                When the default options all_quoted= false and quoted=true are in force, fields that are written to a line of the csv file will be quoted only if they contain the separator or the quote character. The quote character is doubled when used inside a string. When all_quoted=false and quoted=false the quote character is not doubled. With this option, it is not possible to insert any string containing the separator into the table, as it would become impossible to distinguish from a separator. While reading an existing data source file, the program treats each individual field separately. It determines that a field is quoted only if the first character is the quote character. It interprets the rest of the field on this basis.

                The character encoding for the source file is ASCII by default. To support UNICODE or source files preprared with different encodings this can be changed to UTF-8 or any other encoding. The default is encoding=ASCII and the option encoding=UTF-8 or other supported encodings can be used.

                Finally, HSQLDB provides the ability to read a text file from the bottom up and making them READ ONLY, by placing the keyword "DESC" at the end of the SET TABLE SOURCE statement:

                    SET TABLE mytable SOURCE "myfile" DESC

                This feature provides functionality similar to the Unix tail command, by re-reading the file each time a select is executed. Using this feature sets the table to read-only mode. Afterwards, it will no longer be possible to change the read-only status with SET TABLE <tablename> READONLY TRUE.

                Text table source files are cached in memory. The maximum number of rows of data that are in memory at any time is controlled by the textdb.cache_scale property. The default value for textdb.cache_scale is 10 and can be changed by setting the property in the .properties file for the database. The number of rows in memory is calculated as 3*(2**scale), which translates to 3072 rows for the default textdb.cache_scale setting (10). The property can also be set for individual text tables:

                    SET TABLE mytable SOURCE "myfile;ignore_first=true;all_quoted=true;cache_scale=12"

                Disconnecting Text Tables

                The following describes behaviour present in 1.8.0.8 and later.

                Text tables may be disconnected from their underlying data source, i.e. the text file.

                You can explicitly disconnect a text table from its file by issuing the following statement:

                  SET TABLE mytable SOURCE OFF

                Subsequently, mytable will be empty and read-only. However, the data source description will be preserved, and the table can be re-connected to it with

                  SET TABLE mytable SOURCE ON

                When a database is opened, if the source file for an existing text table is missing the table remains disconnected from its data source, but the source sescription is preserved. This allows the missing source file to be added to the directory and the table re-connected to it with the above command.

                Text File Issues

                Text File Issues

                • File locations are restricted to below the directory that contains the database, unless the textdb.allow_full_path property is set true in the database properties file.

                • Blank lines are allowed anywhere in the text file, and are ignored.

                • The file location for a text table created with

                      SELECT <select list> INTO TEXT <tablename> FROM

                  is the directory that contains the database and the file name is based on the table name. The table name is converted into the file name by replacing all the non-alphanumeric characters with the underscore character, conversion into lowercase, and adding the ".csv" suffix.

                • It is possible to define a primay key or identity column for text tables.

                • When a table source file is used with the ignore_first=true option, the first, ignored line is replaced with a blank line after a SHUTDOWN COMPACT.

                • An existing table source file may include CHARACTER fields that do not begin with the quote character but contain instances of the quote character. These fields are read as literal strings. Alternatively, if any field begins with the quote character, then it is interpreted as a quoted string that should end with the quote character and any instances of the quote character within the string is doubled. When any field containing the quote character or the separator is written out to the source file by the program, the field is enclosed in quote character and any instance of the quote character inside the field is doubled.

                • Inserts or updates of CHARACTER type field values are allowed with strings that contains the linefeed or the carriage return character. This feature is disabled when both quoted and all_quoted properties are false.

                • ALTER TABLE commands that add or drop columns are not supported with non-empty text tables.

                Text File Global Properties

                Complete list of supported global properties in *.properties files

                • textdb.fs

                • textdb.lvs

                • textdb.quoted

                • textdb.all_quoted

                • textdb.ignore_first

                • textdb.encoding

                • textdb.cache_scale

                • textdb.allow_full_path

                Importing a Text Table file in to a Traditional (non-Text Table) Table

                The directory src/org/hsqldb/sample in your HSQLDB distibution contains a file named load_binding_lu.sql. This is a working SQL file which imports a pipe-delimited text file from the database's file directory into an existing normal table. You can edit a copy of this file and use it directly with SqlTool, or you can use the SQL therein as a model (using any SQL client at all).

                hsqldb-1.8.0.10.orig/doc/guide/ch04.html0000644000175000017500000012543010665324651016122 0ustar renereneChapter 4. Advanced Topics

                Chapter 4. Advanced Topics

                Fred Toussi

                HSQLDB Development Group

                Copyright 2002-2005 Fred Toussi. Permission is granted to distribute this document without any alteration under the terms of the HSQLDB license. Additional permission is granted to the HSQLDB Development Group to distribute this document with or without alterations under the terms of the HSQLDB license.

                $Date: 2007/03/24 11:39:08 $

                Purpose

                Many questions repeatedly asked in Forums and mailing lists are answered in this guide. If you want to use HSQLDB with your application, you should read this guide. This document covers system related issues. For issues related to SQL see the SQL Issues chapter.

                Connections

                The normal method of accessing an HSQLDB database is via the JDBC Connection interface. An introduction to different methods of providing database services and accessing them can be found in the SQL Issues chapter. Details and examples of how to connect via JDBC are provided in our JavaDoc for jdbcConnection.

                Version 1.7.2 introduced a uniform method of distinguishing between different types of connection, alongside new capabilities to provide access to multiple databases. The common driver identifier is jdbc:hsqldb: followed by a protocol identifier (mem: file: res: hsql: http: hsqls: https:) then followed by host and port identifiers in the case of servers, then followed by database identifier.

                Table 4.1. Hsqldb URL Components

                Driver and ProtocolHost and PortDatabase
                jdbc:hsqldb:mem:
                not available
                accounts

                Lowercase, single-word identifier creates the in-memory database when the first connection is made. Subsequent use of the same Connection URL connects to the existing DB.

                The old form for the URL, jdbc:hsqldb:. creates or connects to the same database as the new form for the URL, jdbc:hsqldb:mem:.

                jdbc:hsqldb:file:
                not available
                mydb
                /opt/db/accounts
                C:/data/mydb

                The file path specifies the database file. In the above examples the first one refers to a set of mydb.* files in the directory where the javacommand for running the application was issued. The second and third examples refer to absolute paths on the host machine.

                jdbc:hsqldb:res:
                not available
                /adirectory/dbname
                Database files can be loaded from one of the jars specified as part of the Java command the same way as resource files are accessed in Java programs. The /adirectory above stands for a directory in one of the jars.
                jdbc:hsqldb:hsql:
                jdbc:hsqldb:hsqls:
                jdbc:hsqldb:http:
                jdbc:hsqldb:https:
                //localhost
                //192.0.0.10:9500
                //dbserver.somedomain.com
                /an_alias
                /enrollments
                /quickdb

                The host and port specify the IP address or host name of the server and an optional port number. The database to connect to is specified by an alias. This alias is a lowercase string defined in the server.properties file to refer to an actual database on the file system of the server or a transient, in-memory database on the server. The following example lines in server.properties or webserver.properties define the database aliases listed above and accessible to clients to refer to different file and in-memory databases.

                    database.0=file:/opt/db/accounts
                    dbname.0=an_alias
                
                    database.1=file:/opt/db/mydb
                    dbname.1=enrollments
                
                    database.2=mem:adatabase
                    dbname.2=quickdb

                The old form for the server URL, e.g., jdbc:hsqldb:hsql//localhost connects to the same database as the new form for the URL, jdbc:hsqldb:hsql//localhost/ where the alias is a zero length string. In the example below, the database files lists.* in the /home/dbmaster/ directory are associated with the empty alias:

                    database.3=/home/dbmaster/lists
                    dbname.3=

                Connection properties

                Each new JDBC Connection to a database can specify connection properties. The properties user and password are always required. In 1.8.0 the following optional properties can also be used.

                Connection properties are specified either by establishing the connection via the:

                    DriverManager.getConnection (String url, Properties info);

                method call, or the property can be appended to the full Connection URL.

                Table 4.2. Connection Properties

                get_column_nametruecolumn name in ResultSet

                This property is used for compatibility with other JDBC driver implementations. When true (the default), ResultSet.getColumnName(int c) returns the underlying column name

                When false, the above method returns the same value as ResultSet.getColumnLabel(int column) Example below:

                    jdbc:hsqldb:hsql://localhost/enrollments;get_column_name=false
                                    

                When a ResultSet is used inside a user-defined stored procedure, the default, true, is always used for this property.

                ifexistsfalseconnect only if database already exists

                Has an effect only with mem: and file: database. When true, will not create a new database if one does not already exist for the URL.

                When false (the default), a new mem: or file: database will be created if it does not exist.

                Setting the property to true is useful when troubleshooting as no database is created if the URL is malformed. Example below:

                    jdbc:hsqldb:file:enrollments;ifexists=true
                shutdownfalseshut down the database when the last connection is closed

                This mimics the behaviour of 1.7.1 and older versions. When the last connection to a database is closed, the database is automatically shut down. The property takes effect only when the first connection is made to the database. This means the connection that opens the database. It has no effect if used with subsequent, simultaneous connections.

                This command has two uses. One is for test suites, where connections to the database are made from one JVM context, immediately followed by another context. The other use is for applications where it is not easy to configure the environment to shutdown the database. Examples reported by users include web application servers, where the closing of the last connection conisides with the web app being shut down.

                In addition, when a connection to an in-process database creates a new database, or opens an existing database (i.e. it is the first connection made to the database by the application), all the user-defined database properties can be specified as URL properties. This can be used to specify properties to enforce more strict SQL adherence, or to change cache_scale or similar properties before the database files are created. However, for new databases, it is recommended to use the SET PROPERTY command for such settings.

                Properties Files

                HSQLDB relies on a set of properties files for different settings. Since 1.7.0 property naming has been streamlined and a number of new properties have been introduced.

                In all properties files, values are case-sensitive. All values apart from names of files or pages are required in lowercase (e.g. server.silent=FALSE will have no effect, but server.silent=false will work).

                The properties files and the settings stored in them are as follows:

                Table 4.3. Hsqldb Server Properties Files

                File NameLocationFunction
                server.propertiesthe directory where the command to run the Server class is issuedsettings for running HSQLDB as a database server communicating with the HSQL protocol
                webserver.propertiesthe directory where the command to run the WebServer class is issuedsettings for running HSQLDB as a database server communicating with the HTTP protocol
                <dbname>.propertiesthe directory where all the files for a database are locatedsettings for each particular database

                Properties files for running the servers are not created automatically. You should create your own files that contain server.property=value pairs for each property.

                The properties file for each database is generated by the database engine. This file can be edited after closing the database. In 1.8.0, most of these properties can be changed via SQL commands.

                Server and Web Server Properties

                In both server.properties and webserver.properties files, supported values and their defaults are as follows:

                Table 4.4. Property File Properties

                ValueDefaultDescription
                server.database.0testthe path and file name of the first database file to use
                server.dbname.0""lowercase server alias for the first database file
                server.urlid.0NONESqlTool urlid used by UNIX init script. (This property is not used if your are running Server/Webserver on a platform other than UNIX, or of you are not using our UNIX init script).
                server.silenttrueno extensive messages displayed on console
                server.tracefalseJDBC trace messages displayed on console

                In 1.8.0, each server can serve up to 10 different databases simultaneously. The server.database.0 property defines the filename / path whereas the server.dbname.0 defines the lowercase alias used by clients to connect to that database. The digit 0 is incremented for the second database and so on. Values for the server.database.{0-9} property can use the mem:, file: or res: prefixes and properties as discussed above under CONNECTIONS. For example,

                    database.0=mem:temp;sql.enforce_strict_size=true;

                Values specific to server.properties are:

                Table 4.5. Server Property File Properties

                ValueDefaultDescription
                server.port9001 (normal) or 554 (if TLS encrypted)TCP/IP port used for talking to clients. All databases are served on the same port.
                server.no_system_exittrueno System.exit() call when the database is closed

                Values specific to webserver.properties are:

                Table 4.6. WebServer Property File Properties

                ValueDefaultDescription
                server.port80TCP/IP port used for talking to clients
                server.default_pageindex.htmlthe default web page for server
                server.root./the location of served pages
                .<extension>?multiple entries such as .html=text/html define the mime types of the static files served by the web server. See the source for WebServer.java for a list.

                All the above values can be specified on the command line to start the server by omitting the server. prefix.

                Starting a Server from your application

                If you want to start the server from within your application, as opposed to the command line or batch files, you should create an instance of Server or Web Server, then assign the properties in the form of a String and start the Server. An example of this can be found in the org.hsqldb.test.TestBase source.

                Note

                Upgrading: If you have existing custom properties files, change the values to the new naming convention. Note the use of digits at the end of server.database.n and server.dbname.n properties.

                Individual Database Properties

                Each database has its own <dbname>.properties file as part of a small group of files which also includes <dbname>.script and <dbname>.data. The properties files contain key/value pairs for some important settings.

                In version 1.8.0 a new SQL command allows most database properties to be modified as follows:

                    SET PROPERTY "property_name" property_value

                Properties that can be modified via SET PROPERTY are indicated in the table below. Other properties are indicated as PROPERTIES FILE ONLY and can be modified only by editing the .properties file after a shutdown and before a restart. Only the user-defined values listed below should ever be modified. Changing any other value could result in unexpected malfunction in database operations. Most of these values have been introduced for the new features since 1.7.0:

                Table 4.7. Database-specific Property File Properties

                ValueDefaultDescription
                readonlyfalsewhole database is read-only

                When true, the database cannot be modified in use. This setting can be changed to true if the database is to be opened from a CD. Prior to changing this setting, the database should be closed with the SHUTDOWN COMPACT command to ensure consistency and compactness of the data. (PROPERTIES FILE ONLY) but can be used as a connection property to open a normal database as readonly.

                hsqldb.files_readonlyfalsedatabase files will not be written to

                When true, data in MEMORY tables can be modified and new MEMORY tables can be added. However, these changes are not saved when the database is shutdown. CACHED and TEXT tables are always readonly when this setting is true. (PROPERTIES FILE ONLY)

                hsqldb.cache_file_scale1Set larger data file limits. Once set, the limit will go up to 8GB.

                This property can be set to 8 to increase the size limit of the .data file from 2GB to 8GB. To apply the change to an existing database, SHUTDOWN SCRIPT should be performed first, then the property=value line below should be added to the .properties file before reopening the database.

                hsqldb.cache_file_scale=8

                The property can be set with the SQL command (as opposed to changing the value in the properties file) when the database has no CACHED tables (e.g. a new database). (SET PROPERTY)

                sql.enforce_sizefalsetrimming and padding string columns

                This property is no longer supported. Use sql.enforce_sctrict_size

                sql.enforce_strict_sizefalsesize enforcement and padding string columns

                Conforms to SQL standards for size and precision of data types. When true, all CHARACTER, VARCHAR, NUMERIC and DECIMAL values that are in a row affected by an INSERT INTO or UPDATE statement are checked against the size specified in the SQL table definition. An exception is thrown if the value is too long. Also all CHARACTER values that are shorter than the specified size are padded with spaces. TIMESTAMP(0) and TIMESTAMP(6) are also allowed in order to specify the subsecond resolution of the values. When false (default), stores the exact string that is inserted. (SET PROPERTY)

                sql.tx_no_multi_rewritefalsetransaction management

                In the default READ_UNCOMMITED mode, a transaction can write over rows inserted or updated by another uncommitted transaction. Setting this property to true will raise an exception when such a write is attempted (SET PROPERTY)

                hsqldb.cache_scale14memory cache exponent

                Indicates the maximum number of rows of cached tables that are held in memory, calculated as 3 *(2**value) (three multiplied by (two to the power value)). The default results in up to 3*16384 rows from all cached tables being held in memory at any time.

                The value can range between 8-18. (SET PROPERTY). If the value is set via SET PROPERTY then it becomes effective after the next database SHUTDOWN or CHECKPOINT. (SET PROPERTY)

                hsqldb.cache_size_scale10memory cache exponent

                Indicates the average size of each row in the memory cache used with cached tables, calculated as 2**value (two to the power value). This result value is multiplied by the maximum number of rows defined by hsqldb.cache_scale to form the maximum number of bytes for all the rows in memory cache. The default results in 1024 bytes per row. This default, combined with the default number of rows, results in approximately 50MB of the .data file to be stored in the memory cache.

                The value can range between 6-20. (SET PROPERTY). If the value is set via SET PROPERTY then it becomes effective after the next database SHUTDOWN or CHECKPOINT. (SET PROPERTY)

                hsqldb.log_size200size of log when checkpoint is performed

                The value is the size in megabytes that the .log file can reach before an automatic checkpoint occurs. A checkpoint and rewrites the .script file and clears the .log file. The value can be changed via the SET LOGSIZE nnn SQL command.

                runtime.gc_interval0forced garbage collection

                This setting forces garbage collection each time a set number of result set row or cache row objects are created. The default, "0" means no garbage collection is forced by the program.

                This should not be set when the database engine is acting as a server inside an exclusive JVM. The setting can be useful when the database is used in-process with the application with some Java Runtime Environments (JRE's). Some JRE's increase the size of the memory heap before doing any automatic garbage collection. This setting would prevent any unnecessary enlargement of the heap. Typical values for this setting would probably be between 10,000 to 100,000. (PROPERTIES FILE ONLY)

                hsqldb.nio_data_filetrueuse of nio access methods for the .data file

                When HSQLDB is compiled and run in Java 1.4 or higher, setting this property to false will avoid the use of nio access methods, resulting in somewhat reduced speed. If the data file is larger than 256MB when it is first opened, nio access methods are not used. Also, if the file gets larger than the amount of available computer memory that needs to be allocated for nio access, non-nio access methods are used.

                (SET PROPERTY). If used before defining any CACHED table, it applies to the current session, otherwise it comes to effect after a SHUTDOWN and restart or CHECKPOINT.

                hsqldb.default_table_typememorytype of table created with unqualified CREATE TABLE

                The CREATE TABLE command results in a MEMORY table by default. Setting the value "cached" for this property will result in a cached table by default. The qualified forms such as CREATE MEMORY TABLE or CREATE CACHED TABLE are not affected at all by this property. (SET PROPERTY)

                hsqldb.applog0application logging level

                The default level 0 indicates no logging. Level 1 results in events related to persistence to be logged, including any failures. The events are logged in a file ending with .app.log

                textdb.*0default properties for new text tables

                Properties that override the database engine defaults for newly created text tables. Settings in the text table SET <tablename> SOURCE <source string> command override both the engine defaults and the database properties defaults. Individual textdb.* properties are listed in the Text Tables chapter. (SET PROPERTY)

                When connecting to an in-process database creates a new database, or opens an existing database (i.e. it is the first connection made to the database by the application), all the user-defined database properties listed in this section can be specified as URL properties.

                Note

                Upgrading: From 1.7.0, the location of the database files can no longer be overridden by paths defined in the properties file. All files belonging to a database should reside in the same directory.

                The property sql.compare_in_locale=true is no longer supported. If the line exists in a .properties file, it will switch the database to the collation for the current default. See the SET DATABASE COLLATION[2] command.

                When HSQLDB is used in OpenOffice.org, some property values will have a different default. The properties and values are:

                hsqldb.default_table_type=cached hsqldb.cache_scale=13 hsqldb.log_size=10; hsqldb.nio_data_file=false sql.enforce_strict_size=true

                SQL Commands for Database Properties

                There are some database properties that are set with dedicated SQL commands beginning with SET.

                Table 4.8. SQL command properties

                SET WRITE_DELAY {{TRUE | FALSE} | <seconds> | <milliseconds> MILLIS

                The default is TRUE and indicates that the changes to the database that have been logged are synched to the file system once every 20 seconds. FALSE indicates there is no delay and at each commit a file synch operation is performed. Numeric values from 0 can also be specified for the synch delay.

                The purpose of this command is to control the amount of data loss in case of a total system crash. A delay of 1 second means at most the data written to disk during the last second before the crash is lost. All data written prior to this has been synced and should be recoverable

                This setting should be specified on the basis of the reliability of the hardware used for running the database engine, the type of disk system used, the possibility of power failure etc. Also the nature of the data stored should be considered.

                In general, when the system is very reliable, the setting can be left to the default. If it is not very reliable, or the data is critical a setting of 1 or 2 seconds would suffice. Only in the worst case scenario or with the most critical data should a setting of 0 or FALSE be specified as this will slow the engine down to the speed at which the file synch operation can be performed by the disk subsystem.

                Values down to 10 millisconds can be specified by adding MILLIS to the command, but in practice a delay of 100 milliseconds provides 99.99999% reliability with an average one system crash per 6 days.

                SET LOG_SIZE <numeric value>

                The engine writes out a log of all the changes to the database as they occur. This log is synched to the disk based on the WRITE_DELAY property above. The log is never reused unless there is an abnormal termination, i.e. the database process is terminated without SHUTDOWN, or it was terminated using SHUTDOWN IMMEDIATELY.

                The default maximum size of the .log file is 200 MB. When the maximum size is reached, a CHECKPOINT operation is performed. This operation will save the other database files in a consistent state and delete the old log. A value of 0 indicates no limit for the .log file.

                SET CHECKPOINT DEFRAG <numeric value>

                When rows in CACHED tables are updated or deleted, the spaces are mostly reused. However, in time, some unused spaces are left in the .data file, especially when large tables are dropped or their structure is modified.

                A CHECKPOINT operation does not normally reclaim the empty spaces, whereas CHECKPOINT DEFRAG always does.

                This property determines when a normal CHECKPOINT, whether initiated by an administrator or when the size of the log exceeds its limit.

                The numeric value is the number of megabytes of recorded empty spaces in the .data file that would force a DEFRAG operation. Low values result in more frequent DEFRAG operations. A value of 0 indicates no automatic DEFRAG is performed. The default is 200 megabytes of lost space.

                SET REFERENTIAL INTEGRITY {TRUE | FALSE}

                This is TRUE by default. If bulk data needs to be loaded into the database, this property can be set FALSE for the duration of bulk load operation. This allows loading data for related tables in any order. The property should be set TRUE after bulk load. If the loaded data is not guaranteed to conform to the referential integrity constraints, SQL queries should be run after loading to identify and modify any non-conforming rows.

                hsqldb-1.8.0.10.orig/doc/guide/apf.html0000644000175000017500000003656610665324665016152 0ustar renereneAppendix F. Database Manager

                Appendix F. Database Manager

                Fred Toussi

                HSQLDB Development Group

                Blaine Simpson

                HSQLDB Development Group

                $Date: 2006/07/27 21:08:21 $

                Brief Introduction

                The Database Manager tool is a simple GUI database query tool with a tree display of the tables. Both AWT and SWING versions of the tool are available and work almost identically. The AWT version class name is org.hsqldb.util.DatabaseManager; the SWING version, org.hsqldb.util.DatabaseManagerSwing.

                The AWT version of the database manager can be deployed as an applet in a browser. A demo HTML file with an embedded Database Manager is included in the /demo directory.

                When the Database Manager is started, a dialogue allows you to enter the JDBC driver, URL, user and password for the new connection. A drop-down box, Type, offers preset values for JDBC driver and URL for most popular database engines, including HSQLDB. Once you have selected an item from this drop-down box, you should edit the URL to specify the details of the database or any additional properties to pass. You should also enter the username and password before clicking on the OK button.

                The connection dialogue allows you to save the settings for the connection you are about to make. You can then access the connection in future sessions. To save a connection setting, enter a name in the Setting Name box before clicking on the OK button. Next time the connection dialogue is displayed, the drop-down box labeled Recent will include the name for all the saved connection settings. When you select a name, the individual settings are displayed in the appropriate boxes.

                The small Clr button next to the drop-down box allows you to clear all the saved settings. If you want to modify an existing setting, first select it from the drop-down box then modify any of the text boxes before making the connection. The modified values will be saved.

                Most menu items have context-sensitive tool tip help text which will appear if you hold the mouse cursor still over the desired menu item. (Assuming that you don't turn Tooltips off under the Help menu.

                The DatabaseManagers do work with HSQLDB servers serving TLS-encrypted JDBC data. See the TLS chapter and the RC File Authentication Setup section of this Guide.

                Tip

                If you are using DatabaseManagerSwing with Oracle, you will want to make sure that Show row counts and Show row counts are both off before connecting to the database. You may also want to turn off Auto tree-update, as described in the next section.

                Auto tree-update

                By default, the object tree in the left panel is refreshed when you execute DDL which may update those objects. If you are on a slow network or performance-challenged PC, use the view / Auto-refresh tree menu item to turn it off. You will then need to use the viewRefresh tree menu item every time that you want to refresh the tree.

                Note

                Auto-refresh tree does not automatically show all updates to database objects, it only refreshes when you submit DDL which may update database objects. (This behavior is a compromise between utility and performance).

                Automatic Connection

                You can use command-line switches to supply connection information. If you use these switch(es), then the connection dialog window will be skipped and a JDBC connection will be established immediately. Assuming that the hsqldb.jar (or an alternative jar) are in your CLASSPATH, this command will list the available command-line options.

                    java org.hsqldb.util.DatabaseManagerSwing --help

                It's convenient to skip the connection dialog window if you always work with the same database account.

                Warning

                Use of the --password switch is not secure. Everything typed on command-lines is generally available to other users on the computer. The problem is compounded if you use a network connection to obtain your command line. The RC File section explains how you can set up automatic connections without supplying a password on the command line.

                RC File

                You can skip the connection dialog window securely by putting the connection information into an RC file and then using the --urlid switch to DatabaseManager or DatabaseManagerSwing. This strategy is great for adding launch menu items and/or launch icons to your desktop. You can set up one icon for each of the database accounts which you regularly use.

                The default location for the RC file is dbmanager.rc in your home directory. The RC File Authentication Setup section explains how to put the connection information into this text file. If you also run SqlTool, then you can share the RC file with SqlTool by using a sym-link (if your operating system supports sym links), or by using the --rcfile switch for either SqlTool or DatabaseManagerSwing.

                Warning

                Use your operating system facilities to prevent others from reading your RC file, since it contains passwords.

                To set up launch items/icons, first experiment on your command line to find exactly what command works. For example,

                    java -cp /path/to/hsqldb.jar org.hsqldb.util.DatabaseManagerSwing --urlid mem
                Then, use your window manager to add an item that runs this command.

                Using the current DatabaseManagers with an older HSQLDB distribution.

                This procedure will allow users of a legacy version of HSQLDB to use all of the new features of the DatabaseManagers. You will also get the new version of the SqlTool! This procedure works for distros going back to 1.7.3.3 at least, probably much farther.

                These instructions assume that you are capable of running an Ant build. See the Building HSQLDB chapter.

                1. Download and extract a current HSQLDB distribution. If you don't want to use the source code, documentation, etc., you can use a temporary directory and remove it afterwards.

                2. Cd to the build directory under the root directory where you extracted the distribution to.

                3. Run ant hsqldbutil.

                4. If you're going to wipe out the build directory, copy hsqldbutil.jar to a safe location first.

                5. For now on, whenver you are going to run DatabaseManager*, make sure that you have this hsqldbutil.jar as the first item in your CLASSPATH.

                Here's a UNIX example where somebody wants to use the new DatabaseManagerSwing with their older HSQLDB database, as well as with Postgresql and a local application.

                CLASSPATH=/path/to/hsqldbutil.jar:/home/bob/myapp/classes:/usr/local/lib/pg.jdbc3.jar
                export CLASSPATH
                java org.hsqldb.util.DatabaseManagerSwing --urlid urlid

                DatabaseManagerSwing as an Applet

                DatabaseManagerSwing is also an applet. You can use it in HTML, JSPs, etc. Be aware that in Applet mode, actions to load or save local files will be disabled, and attempts to access any server other than the HTML-serving-host will be fail.

                Since the Applet can not store or load locally saved preferences, the only way to have persistent preference settings is by using Applet parameters.

                DatabaseManagerSwing Applet Parameters

                jdbcUrl
                URL of a data source to auto-connect to. String value.
                jdbcDriver
                URL of a data source to auto-connect to. String value. Defaults to org.hsqldb.jdbcDriver.
                jdbcUser
                User name for data source to auto-connect to. String value.
                jdbcPassword
                Password for data source to auto-connect to. String value. Defaults to zero-length string.
                schemaFilter
                Display only object from this schema in the object navigator. String value.
                laf
                Look-and-feel. String value.
                loadSampleData
                Auto-load sample data. Boolean value. Defaults to false.
                autoRefresh
                Auto-refresh the object navigator when DDL modifications detected in user SQL commands. Boolean value. Defaults to true.
                showRowCounts
                Show number of rows in each table in the object navigator. Boolean value. Defaults to false.
                showSysTables
                Show system tables in the object navigator. Boolean value. Defaults to false.
                showSchemas
                Show object names like schema.name in object navigator. Boolean value. Defaults to true.
                resultGrid
                Show query results in Gui grid (as opposed to in plain text). Boolean value. Defaults to true.
                showToolTips
                Show help hover-text. Boolean value. Defaults to true.

                hsqldb-1.8.0.10.orig/doc/guide/guide.html0000644000175000017500000217606310665324631016471 0ustar renereneHsqldb User Guide

                Hsqldb User Guide

                The HSQLDB Development Group

                Edited by

                Blaine Simpson

                Fred Toussi

                Copyright 2002-2007 HSQLDB Development Group. Permission is granted to distribute this document without any alteration under the terms of the HSQLDB license.

                $Date: 2007/08/28 12:13:28 $


                Table of Contents

                Introduction
                Available formats for this document
                1. Running and Using Hsqldb
                Introduction
                Running Tools
                Running Hsqldb
                Server Modes
                Hsqldb Server
                Hsqldb Web Server
                Hsqldb Servlet
                In-Process (Standalone) Mode
                Memory-Only Databases
                General
                Closing the Database
                Using Multiple Databases in One JVM
                Creating a New Database
                Using the Database Engine
                Different Types of Tables
                Constraints and Indexes
                SQL Support
                JDBC Support
                2. SQL Issues
                Purpose
                SQL Standard Support
                Constraints and Indexes
                Primary Key Constraints
                Unique Constraints
                Unique Indexes
                FOREIGN KEYS
                Indexes and Query Speed
                Where Condition or Join
                Subqueries and Joins
                Types and Arithmetic Operations
                Integral Types
                Other Numeric Types
                Bit and Boolean Types
                Storage and Handling of Java Objects
                Type Size, Precision and Scale
                Sequences and Identity
                Identity Auto-Increment Columns
                Sequences
                Issues with Transactions
                New Features and Changes
                3. UNIX Quick Start
                Purpose
                Installation
                Setting up Database Instance and Server
                Accessing your Database
                Create additional Accounts
                Shutdown
                Running Hsqldb as a System Daemon
                Portability of hsqldb init script
                Init script Setup Procedure
                Troubleshooting the Init Script
                4. Advanced Topics
                Purpose
                Connections
                Connection properties
                Properties Files
                Server and Web Server Properties
                Starting a Server from your application
                Individual Database Properties
                SQL Commands for Database Properties
                5. Deployment Issues
                Purpose
                Mode of Operation and Tables
                Mode of Operation
                Tables
                Large Objects
                Deployment context
                Memory and Disk Use
                Cache Memory Allocation
                Managing Database Connections
                Upgrading Databases
                Upgrading Using the SCRIPT Command
                Manual Changes to the .script File
                Backing Up Databases
                6. Text Tables
                The Implementation
                Definition of Tables
                Scope and Reassignment
                Null Values in Columns of Text Tables
                Configuration
                Disconnecting Text Tables
                Text File Issues
                Text File Global Properties
                Importing from a Text Table file
                7. TLS
                Requirements
                Encrypting your JDBC connection
                Client-Side
                Server-Side
                JSSE
                Making a Private-key Keystore
                CA-Signed Cert
                Non-CA-Signed Cert
                Automatic Server or WebServer startup on UNIX
                8. SqlTool
                Purpose, Coverage, Changes in Behavior
                Platforms and SqlTool versions covered
                Functional Changes
                The Bare Minimum
                Non-displayable Types
                Desktop shortcuts
                Loading sample data
                RC File Authentication Setup
                Using Inline RC Authentication
                Using the current version of SqlTool with an older HSQLDB distribution.
                Interactive Usage
                Command Types
                Command Types
                Special Commands
                Edit Buffer / History Commands
                PL Commands
                ? Variable
                Storing and retrieving binary files
                Command History
                Shell scripting and command-line piping
                Emulating Non-Interactive mode
                Non-Interactive
                Giving SQL on the Command Line
                SQL Files
                Piping and shell scripting
                Optimally Compatible SQL Files
                Comments
                Special Commands and Edit Buffer Commands in SQL Files
                Automation
                Getting Interactive Functionality with SQL Files
                Character Encoding
                Generating Text or HTML Reports
                SqlTool Procedural Language
                Variables
                PL Aliases
                Logical Expressions
                Flow Control
                Chunking
                Why?
                How?
                Raw Mode
                PL/SQL
                Using hsqltool.jar and hsqldbutil.jar
                Delimiter-Separated-Value Imports and Exports
                Simple DSV exports and imports using default settings
                Specifying queries and options
                Unit Testing SqlTool
                9. SQL Syntax
                Notational Conventions Used in this Chapter
                SQL Commands
                ALTER INDEX
                ALTER SEQUENCE
                ALTER SCHEMA
                ALTER TABLE
                ALTER USER
                CALL
                CHECKPOINT
                COMMIT
                CONNECT
                CREATE ALIAS
                CREATE INDEX
                CREATE ROLE
                CREATE SCHEMA
                CREATE SEQUENCE
                CREATE TABLE
                CREATE TRIGGER
                CREATE USER
                CREATE VIEW
                DELETE
                DISCONNECT
                DROP INDEX
                DROP ROLE
                DROP SEQUENCE
                DROP SCHEMA
                DROP TABLE
                DROP TRIGGER
                DROP USER
                DROP VIEW
                EXPLAIN PLAN
                GRANT
                INSERT
                REVOKE
                ROLLBACK
                SAVEPOINT
                SCRIPT
                SELECT
                SET AUTOCOMMIT
                SET DATABASE COLLATION
                SET CHECKPOINT DEFRAG
                SET IGNORECASE
                SET INITIAL SCHEMA
                SET LOGSIZE
                SET MAXROWS
                SET PASSWORD
                SET PROPERTY
                SET READONLY
                SET REFERENTIAL INTEGRITY
                SET SCHEMA
                SET SCRIPTFORMAT
                SET TABLE INDEX
                SET TABLE READONLY
                SET TABLE SOURCE
                SET WRITE DELAY
                SHUTDOWN
                UPDATE
                Schema object naming
                Data Types
                SQL Comments
                Stored Procedures / Functions
                Built-in Functions and Stored Procedures
                SQL Expression
                A. Building HSQLDB
                Purpose
                Building with Ant
                Obtaining Ant
                Building Hsqldb with Ant
                Building with DOS Batch Files
                Hsqldb CodeSwitcher
                Building documentation
                B. First JDBC Client Example
                C. Hsqldb Database Files and Recovery
                States
                Procedures
                Clean Shutdown
                Startup
                Repair
                D. Running Hsqldb with OpenOffice.org 1.1.x
                Introduction
                Installing
                Setting up OpenOffice.org
                On Windows
                On Linux
                E. Hsqldb Test Utility
                F. Database Manager
                Brief Introduction
                Auto tree-update
                Automatic Connection
                RC File
                Using the current DatabaseManagers with an older HSQLDB distribution.
                DatabaseManagerSwing as an Applet
                G. Transfer Tool
                Brief Introduction

                Introduction

                If you notice any mistakes in this document, please email the author listed at the beginning of the chapter. If you have problems with the procedures themselves, please use the HSQLDB support facilities which are listed at http://hsqldb.org/web/hsqlSupport.html.

                Available formats for this document

                This document is available in several formats.

                You may be reading this document right now at http://hsqldb.org/doc/guide, or in a distribution somewhere else. I hereby call the document distribution from which you are reading this, your current distro.

                http://hsqldb.org/doc/guide hosts the latest production versions of all available formats. If you want a different format of the same version of the document you are reading now, then you should try your current distro. If you want the latest production version, you should try http://hsqldb.org/doc/guide.

                Sometimes, distributions other than http://hsqldb.org/doc/guide do not host all available formats. So, if you can't access the format that you want in your current distro, you have no choice but to use the newest production version at http://hsqldb.org/doc/guide.

                Table 1. Alternate formats of this document

                formatyour distroat http://hsqldb.org/doc/guide
                Chunked HTML index.htmlhttp://hsqldb.org/doc/guide/index.html
                All-in-one HTML guide.htmlhttp://hsqldb.org/doc/guide/guide.html
                PDF guide.pdfhttp://hsqldb.org/doc/guide/guide.pdf

                Chapter 1. Running and Using Hsqldb

                Fred Toussi

                HSQLDB Development Group

                Copyright 2002-2005 Fred Toussi. Permission is granted to distribute this document without any alteration under the terms of the HSQLDB license. Additional permission is granted to the HSQLDB Development Group to distribute this document with or without alterations under the terms of the HSQLDB license.

                $Date: 2007/05/30 18:34:46 $

                Introduction

                The HSQLDB jar package is located in the /lib directory and contains several components and programs. Different commands are used to run each program.

                Components of the Hsqldb jar package

                • HSQLDB RDBMS

                • HSQLDB JDBC Driver

                • Database Manager (Swing and AWT versions)

                • Query Tool (AWT)

                • Sql Tool (command line)

                The HSQLDB RDBMS and JDBC Driver provide the core functionality. The rest are general-purpose database tools that can be used with any database engine that has a JDBC driver.

                Running Tools

                All tools can be run in the standard way for archived Java classes. In the following example the AWT version of the Database Manager, the hsqldb.jar is located in the directory ../lib relative to the current directory.

                    java -cp ../lib/hsqldb.jar org.hsqldb.util.DatabaseManager

                If hsqldb.jar is in the current directory, the command would change to:

                    java -cp hsqldb.jar org.hsqldb.util.DatabaseManager

                Main classes for the Hsqldb tools

                • org.hsqldb.util.DatabaseManager

                • org.hsqldb.util.DatabaseManagerSwing

                • org.hsqldb.util.Transfer

                • org.hsqldb.util.QueryTool

                • org.hsqldb.util.SqlTool

                Some tools, such as the Database Manager or SQL Tool, can use command line arguments or entirely rely on them. You can add the command line argument -? to get a list of available arguments for these tools. Database Manager features a graphical user interface and can be explored interactively.

                Running Hsqldb

                HSQLDB can be run in a number of different ways. In general these are divided into Server Modes and In-Process Mode (also called Standalone Mode). A different sub-program from the jar is used to run HSQLDB in each mode.

                Each HSQLDB database consists of between 2 to 5 files, all named the same but with different extensions, located in the same directory. For example, the database named "test" consists of the following files:

                • test.properties

                • test.script

                • test.log

                • test.data

                • test.backup

                The properties files contains general settings about the database. The script file contains the definition of tables and other database objects, plus the data for non-cached tables. The log file contains recent changes to the database. The data file contains the data for cached tables and the backup file is a zipped backup of the last known consistent state of the data file. All these files are essential and should never be deleted. If the database has no cached tables, the test.data and test.backup files will not be present. In addition to those files, HSQLDB database may link to any formatted text files, such as CSV lists, anywhere on the disk.

                While the "test" database is operational, a test.log file is used to write the changes made to data. This file is removed at a normal SHUTDOWN. Otherwise (with abnormal shutdown) this file is used at the next startup to redo the changes. A test.lck file is also used to record the fact that the database is open. This is deleted at a normal SHUTDOWN. In some circumstances, a test.data.old is created and deleted afterwards.

                Note

                When the engine closes the database at a shutdown, it creates temporary files with the extension .new which it then renames to those listed above.

                Server Modes

                Server modes provide the maximum accessibility. The database engine runs in a JVM and listens for connections from programs on the same computer or other computers on the network. Several different programs can connect to the server and retrieve or update information. Applications programs (clients) connect to the server using the HSQLDB JDBC driver. In most server modes, the server can serve up to 10 databases that are specified at the time of running the server.

                Server modes can use preset properties or command line arguments as detailed in the Advanced Topics chapter. There are three server modes, based on the protocol used for communications between the client and server.

                Hsqldb Server

                This is the preferred way of running a database server and the fastest one. A proprietary communications protocol is used for this mode. A command similar to those used for running tools and described above is used for running the server. The following example of the command for starting the server starts the server with one (default) database with files named "mydb.*".

                    java -cp ../lib/hsqldb.jar org.hsqldb.Server -database.0 file:mydb -dbname.0 xdb

                The command line argument -? can be used to get a list of available arguments.

                Hsqldb Web Server

                This mode is used when access to the computer hosting the database server is restricted to the HTTP protocol. The only reason for using the Web Server mode is restrictions imposed by firewalls on the client or server machines and it should not be used where there are no such restrictions. The HSQLDB Web Server is a special web server that allows JDBC clients to connect via HTTP. From 1.7.2 this mode also supports transactions.

                To run a web server, replace the main class for the server in the example command line above with the following:

                    org.hsqldb.WebServer

                The command line argument -? can be used to get a list of available arguments.

                Hsqldb Servlet

                This uses the same protocol as the Web Server. It is used when a separate servlet engine (or application server) such as Tomcat or Resin provides access to the database. The Servlet Mode cannot be started independently from the servlet engine. The Servlet class, in the HSQLDB jar, should be installed on the application server to provide the connection. The database is specified using an application server property. Refer to the source file org.hsqldb.Servlet.java to see the details.

                Both Web Server and Servlet modes can only be accessed using the JDBC driver at the client end. They do not provide a web front end to the database. The Servlet mode can serve only a single database.

                Please note that you do not normally use this mode if you are using the database engine in an application server.

                Connecting to a Database running as a Server

                Once an HSQLDB server is running, client programs can connect to it using the HSQLDB JDBC Driver contained in hsqldb.jar. Full information on how to connect to a server is provided in the Java Documentation for jdbcConnection (located in the /doc/src directory of HSQLDB distribution. A common example is connection to the default port (9001) used for the hsql protocol on the same machine:

                Example 1.1. Java code to connect to the local Server above

                    try {
                        Class.forName("org.hsqldb.jdbcDriver" );
                    } catch (Exception e) {
                        System.out.println("ERROR: failed to load HSQLDB JDBC driver.");
                        e.printStackTrace();
                        return;
                    }
                
                    Connection c = DriverManager.getConnection("jdbc:hsqldb:hsql://localhost/xdb", "sa", "");

                In some circumstances, you may have to use the following line to get the driver.

                    Class.forName("org.hsqldb.jdbcDriver").newInstance();

                Note in the above connection URL, there is no mention of the database file, as this was specified when running the server. Instead, the value defined for dbname.0 is used. Also, see the Advanced Topics chapter for the connection URL when there is more than one database per server instance.

                Security Considerations

                When HSQLDB is run as a server, network access should be adequately protected. Source IP addresses may be restricted by use of TCP filtering or firewall programs, or standalone firewalls. If the traffic will cross an unprotected network (such as the Internet), the stream should be encrypted (for example by VPN, ssh tunneling, or TLS using the SSL enabled HSQLS and HTTPS variants of the server and web server modes). Only secure passwords should be used-- most importantly, the password for the default system user should be changed from the default empty string. If you are purposefully providing data to the public, then the wide-open public network connection should be used exclusively to access the public data via read-only accounts. (I.e., neither secure data nor privileged accounts should use this connection). These considerations also apply to HSQLDB servers run with the HTTP protocol.

                In-Process (Standalone) Mode

                This mode runs the database engine as part of your application program in the same Java Virtual Machine. For most applications this mode can be faster, as the data is not converted and sent over the network. The main drawback is that it is not possible by default to connect to the database from outside your application. As a result you cannot check the contents of the database with external tools such as Database Manager while your application is running. In 1.8.0, you can run a server instance in a thread from the same virtual machine as your application and provide external access to your in-process database.

                The recommended way of using the in-process mode in an application is to use an HSQLDB Server instance for the database while developing the application and then switch to In-Process mode for deployment.

                An In-Process Mode database is started from JDBC, with the database file path specified in the connection URL. For example, if the database name is testdb and its files are located in the same directory as where the command to run your application was issued, the following code is used for the connection:

                    Connection c = DriverManager.getConnection("jdbc:hsqldb:file:testdb", "sa", "");

                The database file path format can be specified using forward slashes in Windows hosts as well as Linux hosts. So relative paths or paths that refer to the same directory on the same drive can be identical. For example if your database path in Linux is /opt/db/testdb and you create an identical directory structure on the C: drive of a Windows host, you can use the same URL in both Windows and Linux:

                    Connection c = DriverManager.getConnection("jdbc:hsqldb:file:/opt/db/testdb", "sa", "");

                When using relative paths, these paths will be taken relative to the directory in which the shell command to start the Java Virtual Machine was executed. Refer to Javadoc for jdbcConnection for more details.

                Memory-Only Databases

                It is possible to run HSQLDB in a way that the database is not persistent and exists entirely in random access memory. As no information is written to disk, this mode should be used only for internal processing of application data, in applets or certain special applications. This mode is specified by the mem: protocol.

                    Connection c = DriverManager.getConnection("jdbc:hsqldb:mem:aname", "sa", "");

                You can also run a memory-only server instance by specifying the same URL in the server.properties. This usage is not common and is limited to special applications where the database server is used only for exchanging information between clients, or for non-persistent data.

                General

                Closing the Database

                All databases running in different modes can be closed with the SHUTDOWN command, issued as an SQL query. From version 1.7.2, in-process databases are no longer closed when the last connection to the database is explicitly closed via JDBC, a SHUTDOWN is required. In 1.8.0, a connection property, shutdown=true, can be specified on the first connection to the database (the connection that opens the database) to force a shutdown when the last connection closes.

                When SHUTDOWN is issued, all active transactions are rolled back. A special form of closing the database is via the SHUTDOWN COMPACT command. This command rewrites the .data file that contains the information stored in CACHED tables and compacts it to size. This command should be issued periodically, especially when lots of inserts, updates or deletes have been performed on the cached tables. Changes to the structure of the database, such as dropping or modifying populated CACHED tables or indexes also create large amounts of unused file space that can be reclaimed using this command.

                Using Multiple Databases in One JVM

                In the above examples each server serves only one database and only one in-memory database can be created. However, from version 1.7.2, HSQLDB can serve several databases in multiple server modes and allow simultaneous access to multiple in-process and memory-only databases. These capabilities are covered in the Advanced Topics chapter.

                Creating a New Database

                When a server instance is started, or when a connection is made to an in-process database, a new, empty database is created if no database exists at the given path.

                This feature has a side effect that can confuse new users. If a mistake is made in specifying the path for connecting to an existing database, a connection is nevertheless established to a new database. For troubleshooting purposes, you can specify a connection property ifexists=true to allow connection to an existing database only and avoid creating a new database. In this case, if the database does not exist, the getConnection() method will throw an exception.

                Using the Database Engine

                Once a connection is established to a database in any mode, JDBC methods are used to interact with the database. The Javadoc for jdbcConnection , jdbcDriver , jdbcDatabaseMetadata , jdbcResultSet , jdbcStatement , and jdbcPreparedStatement list all the supported JDBC methods together with information that is specific to HSQLDB. JDBC methods are broadly divided into: connection related methods, metadata methods and database access methods. The database access methods use SQL commands to perform actions on the database and return the results either as a Java primitive type or as an instance of the java.sql.ResultSet class.

                You can use Database Manager or other Java database access tools to explore your database and update it with SQL commands. These programs use JDBC internally to submit your commands to the database engine and to display the results in a human readable format.

                The SQL dialect used in HSQLDB is as close to the SQL92 and SQL200n standards as it has been possible to achieve so far in a small-footprint database engine. The full list of SQL commands is in the SQL Syntax chapter.

                Different Types of Tables

                HSQLDB supports TEMP tables and three types of persistent tables.

                TEMP tables are not written to disk and last only for the lifetime of the Connection object. The contents of each TEMP table is visible only from the Connection that was used to populate it; other concurrent connections to the database will have access to their own copies of the table. Since 1.8.0 the definition of TEMP tables conforms to the GLOBAL TEMPORARY type in the SQL standard. The definition of the table persists but each new connections sees its own copy of the table, which is empty at the beginning. When the connection commits, the contents of the table are cleared by default. If the table definition statements includes ON COMMIT PRESERVE ROWS, then the contents are kept when a commit takes place.

                The three types of persistent tables are MEMORY tables, CACHED tables and TEXT tables.

                Memory tables are the default type when the CREATE TABLE command is used. Their data is held entirely in memory but any change to their structure or contents is written to the <dbname>.script file. The script file is read the next time the database is opened, and the MEMORY tables are recreated with all their contents. So unlike TEMP table, the default, MEMORY tables are persistent.

                CACHED tables are created with the CREATE CACHED TABLE command. Only part of their data or indexes is held in memory, allowing large tables that would otherwise take up to several hundred megabytes of memory. Another advantage of cached tables is that the database engine takes less time to start up when a cached table is used for large amounts of data. The disadvantage of cached tables is a reduction in speed. Do not use cached tables if your data set is relatively small. In an application with some small tables and some large ones, it is better to use the default, MEMORY mode for the small tables.

                TEXT tables are supported since version 1.7.0 and use a CSV (Comma Separated Value) or other delimited text file as the source of their data. You can specify an existing CSV file, such as a dump from another database or program, as the source of a TEXT table. Alternatively, you can specify an empty file to be filled with data by the database engine. TEXT tables are efficient in memory usage as they cache only part of the text data and all of the indexes. The Text table data source can always be reassigned to a different file if necessary. Two commands are needed to set up a TEXT table as detailed in the Text Tables chapter.

                With memory-only databases (see above), both MEMORY table and CACHED table declarations are treated as declarations for non-persistent memory tables. TEXT table declarations are not allowed in this mode.

                Constraints and Indexes

                HSQLDB supports PRIMARY KEY, NOT NULL, UNIQUE, CHECK and FOREIGN KEY constraints. In addition, it supports UNIQUE or ordinary indexes. This support is fairly comprehensive and covers multi-column constraints and indexes, plus cascading updates and deletes for foreign keys.

                HSQLDB creates indexes internally to support PRIMARY KEY, UNIQUE and FOREIGN KEY constraints: a unique index is created for each PRIMARY KEY or UNIQUE constraint; an ordinary index is created for each FOREIGN KEY constraint. Because of this, you should not create duplicate user-defined indexes on the same column sets covered by these constraints. This would result in unnecessary memory and speed overheads. See the discussion in the SQL Issues chapter for more information.

                Indexes are crucial for adequate query speed. When queries joining multiple tables are used, there must be an index on each joined column of each table. When range or equality conditions are used e.g. SELECT ... WHERE acol >10 AND bcol = 0, an indexe is required on the acol column used in the condition. Indexes have no effect on ORDER BY clauses or some LIKE conditions.

                As a rule of thumb, HSQLDB is capable of internal processing of queries at over 100,000 rows per second. Any query that runs into several seconds should be checked and indexes should be added to the relevant columns of the tables if necessary.

                SQL Support

                The SQL syntax supported by HSQLDB is essentially that specified by the SQL Standard (92 and 200n). Not all the features of the Standard are supported and there are some proprietary extensions. In 1.8.0 the behaviour of the engine is far more compliant with the Standards than with older versions. The main changes are

                • correct treatment of NULL column values in joins, in UNIQUE constraints and in query conditions

                • correct processing of selects with JOIN and LEFT OUTER JOIN

                • correct processing of aggregate functions contained in expressions or containing expression arguments

                The supported commands are listed in the SQL Syntax chapter. For a well written basic guide to SQL with examples you can consult PostgreSQL: Introduction and Concepts by Bruce Momjian, which is available on the web. Most of the SQL coverage in the book applies also to HSQLDB. There are some differences in keywords supported by one and not the other engine (OUTER, OID's, etc.) or used differently (IDENTITY/SERIAL, TRIGGER, SEQUENCE, etc.).

                JDBC Support

                Since 1.7.2, support for JDBC2 has been significantly extended and some features of JDBC3 are also supported. The relevant classes are thoroughly documented. See the JavaDoc for org.hsqldb.jdbcXXXX classes.

                Chapter 2. SQL Issues

                Fred Toussi

                HSQLDB Development Group

                Copyright 2002-2005 Fred Toussi. Permission is granted to distribute this document without any alteration under the terms of the HSQLDB license. Additional permission is granted to the HSQLDB Development Group to distribute this document with or without alterations under the terms of the HSQLDB license.

                $Date: 2005/07/01 17:06:32 $

                Purpose

                Many questions repeatedly asked in Forums and mailing lists are answered in this guide. If you want to use HSQLDB with your application, you should read this guide.

                SQL Standard Support

                HSQLDB 1.8.0 supports the dialect of SQL defined by SQL standards 92, 99 and 2003. This means where a feature of the standard is supported, e.g. left outer join, the syntax is that specified by the standard text. Many features of SQL92 and 99 up to Advanced Level are supported and there is support for most of SQL 2003 Foundation and several optional features of this standard. However, certain features of the Standards are not supported so no claim is made for full support of any level of the standards.

                The SQL Syntax chapter of this guide SQL Syntax lists all the keywords and syntax that is supported. When writing or converting existing SQL DDL (Data Definition Language) and DML (Data Manipulation Language) statements for HSQLDB, you should consult the supported syntax and modify the statements accordingly.

                Several words are reserved by the standard and cannot be used as table or column names. For example, the word POSITION is reserved as it is a function defined by the Standards with a similar role as String.indexOf() in Java. HSQLDB does not currently prevent you from using a reserved word if it does not support its use or can distinguish it. For example BEGIN is a reserved words that is not currently supported by HSQLDB and is allowed as a table or column name. You should avoid the use of such words as future versions of HSQLDB are likely to support the words and will reject your table definitions or queries. The full list of SQL reserved words is in the source of the org.hsqldb.Token class.

                HSQLDB also supports some keywords and expressions that are not part of the SQL standard as enhancements. Expressions such as SELECT TOP 5 FROM .., SELECT LIMIT 0 10 FROM ... or DROP TABLE mytable IF EXISTS are among such constructs.

                All keywords, can be used for database objects if they are double quoted.

                Constraints and Indexes

                Primary Key Constraints

                Before 1.7.0, a CONSTRAINT <name> PRIMARY KEY was translated internally to a unique index and, in addition, a hidden column was added to the table with an extra unique index. From 1.7.0 both single-column and multi-column PRIMARY KEY constraints are supported. They are supported by a unique index on the primary key column(s) specified and no extra hidden column is maintained for these indexes.

                Unique Constraints

                According to the SQL standards, a unique constraint on a single column means no two values are equal unless one of them is NULL. This means you can have one or more rows where the column value is NULL.

                A unique constraint on multiple columns (c1, c2, c3, ..) means that no two sets of values for the columns are equal unless at lease one of them is NULL. Each single column taken by itself can have repeat values. The following example satisfies a UNIQUE constraint on the two columns:

                Example 2.1. Column values which satisfy a 2-column UNIQUE constraint

                1,2
                2,1
                2,2
                NULL,1
                NULL,1
                1,NULL
                NULL,NULL
                NULL,NULL

                Since version 1.7.2 the behaviour of UNIQUE constraints and indexes with respect to NULL values has changed to conform to SQL standards. A row, in which the value for any of the UNIQUE constraint columns is NULL, can always be added to the table. So multiple rows can contain the same values for the UNIQUE columns if one of the values is NULL.

                Unique Indexes

                In 1.8.0, user defined UNIQUE indexes can still be declared but they are deprecated. You should use a UNIQUE constraint instead.

                CONSTRAINT <name> UNIQUE always creates internally a unique index on the columns, as with previous versions, so it has exactly the same effect as the deprecated UNIQUE index declaration.

                FOREIGN KEYS

                From version 1.7.0, HSQLDB features single and multiple column foreign keys. A foreign key can also be specified to reference a target table without naming the target column(s). In this case the primary key column(s) of the target table is used as the referenced column(s). Each pair of referencing and referenced columns in any foreign key should be of identical type. When a foreign key is declared, a unique constraint (or primary key) must exist on the referenced columns in the primary key table. A non-unique index is automatically created on the referencing columns. For example:

                    CREATE TABLE child(c1 INTEGER, c2 VARCHAR, FOREIGN KEY (c1, c2) REFERENCES parent(p1, p2));

                There must be a UNIQUE constraint on columns (p1,p2) in the table named "parent". A non-unique index is automatically created on columns (c1, c2) in the table named "child". Columns p1 and c1 must be of the same type (INTEGER). Columns p2 and c2 must be of the same type (VARCHAR).

                Indexes and Query Speed

                HSQLDB does not use indexes to improve sorting of query results. But indexes have a crucial role in improving query speed. If no index is used in a query on a single table, such as a DELETE query, then all the rows of the table must be examined. With an index on one of the columns that is in the WHERE clause, it is often possible to start directly from the first candidate row and reduce the number of rows that are examined.

                Indexes are even more important in joins between multiple tables. SELECT ... FROM t1 JOIN t2 ON t1.c1 = t2.c2 is performed by taking rows of t1 one by one and finding a matching row in t2. If there is no index index on t2.c2 then for each row of t1, all the rows of t2 must be checked. Whereas with an index, a matching row can be found in a fraction of the time. If the query also has a condition on t1, e.g., SELECT ... FROM t1 JOIN t2 ON t1.c1 = t2.c2 WHERE t1.c3 = 4 then an index on t1.c3 would eliminate the need for checking all the rows of t1 one by one, and will reduce query time to less than a millisecond per returned row. So if t1 and t2 each contain 10,000 rows, the query without indexes involves checking 100,000,000 row combinations. With an index on t2.c2, this is reduced to 10,000 row checks and index lookups. With the additional index on t2.c2, only about 4 rows are checked to get the first result row.

                Indexes are automatically created for primary key and unique columns. Otherwise you should define an index using the CREATE INDEX command.

                Note that in HSQLDB a unique index on multiple columns can be used internally as a non-unique index on the first column in the list. For example: CONSTRAINT name1 UNIQUE (c1, c2, c3); means there is the equivalent of CREATE INDEX name2 ON atable(c1);. So you do not need to specify an extra index if you require one on the first column of the list.

                In 1.8.0, a multi-column index will speed up queries that contain joins or values on ALL the columns. You need NOT declare additional individual indexes on those columns unless you use queries that search only on a subset of the columns. For example, rows of a table that has a PRIMARY KEY or UNIQUE constraint on three columns or simply an ordinary index on those columns can be found efficiently when values for all three columns are specified in the WHERE clause. For example, SELECT ... FROM t1 WHERE t1.c1 = 4 AND t1.c2 = 6 AND t1.c3 = 8 will use an index on t1(c1,c2,c3) if it exists.

                As a result of the improvements to multiple key indexes, the order of declared columns of the index or constraint has less affect on the speed of searches than before. If the column that contains more diverse values appears first, the searches will be slightly faster.

                A multi-column index will not speed up queries on the second or third column only. The first column must be specified in the JOIN .. ON or WHERE conditions.

                Query speed depends a lot on the order of the tables in the JOIN .. ON or FROM clauses. For example the second query below should be faster with large tables (provided there is an index on TB.COL3). The reason is that TB.COL3 can be evaluated very quickly if it applies to the first table (and there is an index on TB.COL3):

                    (TB is a very large table with only a few rows where TB.COL3 = 4)
                
                    SELECT * FROM TA JOIN TB ON TA.COL1 = TB.COL2 AND TB.COL3 = 4;
                
                    SELECT * FROM TB JOIN TA ON TA.COL1 = TB.COL2 AND TB.COL3 = 4;

                The general rule is to put first the table that has a narrowing condition on one of its columns.

                1.7.3 features automatic, on-the-fly indexes for views and subselects that are used in a query. An index is added to a view when it is joined to a table or another view.

                Where Condition or Join

                Using WHERE conditions to join tables is likely to reduce execution speed. For example the following query will generally be slow, even with indexes:

                    SELECT ... FROM TA, TB, TC WHERE TC.COL3 = TA.COL1 AND TC.COL3=TB.COL2 AND TC.COL4 = 1

                The query implies TA.COL1 = TB.COL2 but does not explicitly set this condition. If TA and TB each contain 100 rows, 10000 combinations will be joined with TC to apply the column conditions, even though there may be indexes on the joined columns. With the JOIN keyword, the TA.COL1 = TB.COL2 condition has to be explicit and will narrow down the combination of TA and TB rows before they are joined with TC, resulting in much faster execution with larger tables:

                    SELECT ... FROM TA JOIN TB ON TA.COL1 = TB.COL2 JOIN TC ON TB.COL2 = TC.COL3 WHERE TC.COL4 = 1

                The query can be speeded up a lot more if the order of tables in joins are changed, so that TC.COL1 = 1 is applied first and a smaller set of rows are joined together:

                    SELECT ... FROM TC JOIN TB ON TC.COL3 = TB.COL2 JOIN TA ON TC.COL3 = TA.COL1 WHERE TC.COL4 = 1

                In the above example the engine automatically applies TC.COL4 = 1 to TC and joins only the set of rows that satisfy this condition with other tables. Indexes on TC.COL4, TB.COL2 and TA.COL1 will be used if present and will speed up the query.

                Subqueries and Joins

                Using joins and setting up the order of tables for maximum performance applies to all areas. For example, the second query below should generally be much faster if there are indexes on TA.COL1 and TB.COL3:

                Example 2.2. Query comparison

                    SELECT ... FROM TA WHERE TA.COL1 = (SELECT MAX(TB.COL2) FROM TB WHERE TB.COL3 = 4)
                
                    SELECT ... FROM (SELECT MAX(TB.COL2) C1 FROM TB WHERE TB.COL3 = 4) T2 JOIN TA ON TA.COL1 = T2.C1

                The second query turns MAX(TB.COL2) into a single row table then joins it with TA. With an index on TA.COL1, this will be very fast. The first query will test each row in TA and evaluate MAX(TB.COL2) again and again.

                Types and Arithmetic Operations

                Table columns of all types supported by HSQLDB can be indexed and can feature in comparisons. Types can be explicitly converted using the CONVERT() library function, but in most cases they are converted automatically. It is recommended not to use indexes on LONGVARBINARY, LONGVARCHAR and OTHER columns, as these indexes will probably not be allowed in future versions.

                Previous versions of HSQLDB featured poor handling of arithmetic operations. For example, it was not possible to insert 10/2.5 into any DOUBLE or DECIMAL column. Since 1.7.0, full operations are possible with the following rules:

                TINYINT, SMALLINT, INTEGER, BIGINT, NUMERIC and DECIMAL (without a decimal point) are supported integral types and map to byte, short, int, long and BigDecimal in Java. The SQL type dictates the maximum and minimum values that can be held in a field of each type. For example the value range for TINYINT is -128 to +127, although the actual Java type used for handling TINYINT is java.lang.Integer.

                REAL, FLOAT, DOUBLE are all mapped to double in Java.

                DECIMAL and NUMERIC are mapped to java.math.BigDecimal and can have very large numbers of digits.

                Integral Types

                TINYINT, SMALLINT, INTEGER, BIGINT, NUMERIC and DECIMAL (without a decimal point) are fully interchangeable internally, and no data narrowing takes place. Depending on the types of the operands, the result of the operations is returned in a JDBC ResultSet in any of related Java types: Integer, Long or BigDecimal. The ResultSet.getXXXX() methods can be used to retrieve the values so long as the returned value can be represented by the resulting type. This type is deterministically based on the query, not on the actual rows returned. The type does not change when the same query that returned one row, returns many rows as a result of adding more data to the tables.

                If the SELECT statement refers to a simple column or function, then the return type is the type corresponding to the column or the return type of the function. For example:

                    CREATE TABLE t(a INTEGER, b BIGINT); SELECT MAX(a), MAX(b) FROM t;

                would return a result set where the type of the first column is java.lang.Integer and the second column is java.lang.Long. However,

                    SELECT MAX(a) + 1, MAX(b) + 1 FROM t;

                would return java.lang.Long and BigDecimal values, generated as a result of uniform type promotion for all the return values.

                There is no built-in limit on the size of intermediate integral values in expressions. As a result, you should check for the type of the ResultSet column and choose an appropriate getXXXX() method to retrieve it. Alternatively, you can use the getObject() method, then cast the result to java.lang.Number and use the intValue() or longValue() methods on the result.

                When the result of an expression is stored in a column of a database table, it has to fit in the target column, otherwise an error is returned. For example when 1234567890123456789012 / 12345687901234567890 is evaluated, the result can be stored in any integral type column, even a TINYINT column, as it is a small value.

                Other Numeric Types

                In SQL statements, numbers with a decimal point are treated as DECIMAL unless they are written with an exponent. Thus 0.2 is considered a DECIMAL value but 0.2E0 is considered a DOUBLE value.

                When PreparedStatement.setDouble() or setFloat() is used, the value is treated as a DOUBLE automatically.

                When a REAL, FLOAT or DOUBLE (all synonymous) is part of an expression, the type of the result is DOUBLE.

                Otherwise, when no DOUBLE value exists, if a DECIMAL or NUMERIC value is part an expression, the type of the result is DECIMAL. The result can be retrieved from a ResultSet in the required type so long as it can be represented. This means DECIMAL values can be converted to DOUBLE unless they are beyond the Double.MIN_VALUE - Double.MAX_VALUE range. Similar to integral values, when the result of an expression is stored in a table column, it has to fit in the target column, otherwise an error is returned.

                The distinction between DOUBLE and DECIMAL is important when a division takes place. When the terms are DECIMAL, the result is a value with a scale (number of digits to the right of the decimal point) equal to the larger of the scales of the two terms. With a DOUBLE term, the scale will reflect the actual result of the operation. For example, 10.0/8.0 (DECIMAL) equals 1.2 but 10.0E0/8.0E0 (DOUBLE) equals 1.25. Without division operations, DECIMAL values represent exact arithmetic; the resulting scale is the sum of the scales of the two terms when multiplication is performed.

                REAL, FLOAT and DOUBLE values are all stored in the database as java.lang.Double objects. Special values such as NaN and +-Infinity are also stored and supported. These values can be submitted to the database via JDBC PreparedStatement methods and are returned in ResultSet objects.

                Bit and Boolean Types

                Since 1.7.2, BIT is simply an alias for BOOLEAN. The primary representation of BOOLEAN column is 'true' or 'false' either as the boolean type or as strings when used from JDBC. This type of column can also be initialised using values of any numeric type. In this case 0 is translated to false and any other value such as 1 is translated to true.

                Since 1.7.3 the BOOLEAN type conforms to the SQL standards and supports the UNDEFINED state in addition to TRUE or FALSE. NULL values are treated as undefined. This improvement affects queries that contain NOT IN. See the test text file, TestSelfNot.txt, for examples of the queries.

                Storage and Handling of Java Objects

                Since version 1.7.2 this support has improved and any serializable JAVA Object can be inserted directly into a column of type OTHER using any variation of PreparedStatement.setObject() methods.

                For comparison purposes and in indexes, any two Java Objects are considered equal unless one of them is NULL. You cannot search for a specific object or perform a join on a column of type OTHER.

                Please note that HSQLDB is not an object-relational database. Java Objects can simply be stored internally and no operations should be performed on them other than assignment between columns of type OTHER or tests for NULL. Tests such as WHERE object1 = object2, or WHERE object1 = ? do not mean what you might expect, as any non-null object would satisfy such a tests. But WHERE object1 IS NOT NULL is perfectly acceptable.

                The engine does not return errors when normal column values are assigned to Java Object columns (for example assigning an INTEGER or STRING to such a column with an SQL statement such as UPDATE mytable SET objectcol = intcol WHERE ...) but this is highly likely to be disallowed in future. So please use columns of type OTHER only to store your objects and nothing else.

                Type Size, Precision and Scale

                Prior to 1.7.2, all table column type definitions with a column size, precision or scale qualifier were accepted and ignored.

                In 1.8.0, such qualifiers must conform to the SQL standards. For example INTEGER(8) is no longer acceptable. The qualifiers are still ignored unless you set a database property. SET PROPERTY "sql.enforce_strict_size" TRUE will enforce sizes for CHARACTER or VARCHAR columns and pad any strings when inserting or updating a CHARACTER column. The precision and scale qualifiers are also enforced for DECIMAL and NUMERIC types. TIMESTAMP can be used with a precision of 0 or 6 only.

                Casting a value to a qualified CHARACTER type will result in truncation or padding as you would expect. So a test such as CAST (mycol AS VARCHAR(2)) = 'xy' will find the values beginning with 'xy'. This is the equivalent of SUBSTRING(mycol FROM 1 FOR 2) = 'xy'.

                Sequences and Identity

                The SEQUENCE keyword was introduced in 1.7.2 with a subset of the SQL 200n standard syntax. Corresponding SQL 200n syntax for IDENTITY columns has also been introduced.

                Identity Auto-Increment Columns

                Each table can contain one auto-increment column, known as the IDENTITY column. An IDENTITY column is always treated as the primary key for the table (as a result, multi-column primary keys are not possible with an IDENTITY column present). Support has been added for CREATE TABLE <tablename>(<colname> IDENTITY, ...) as a shortcut.

                Since 1.7.2, the SQL standard syntax is used by default, which allows the initial value to be specified. The supported form is(<colname> INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH n, [INCREMENT BY m])PRIMARY KEY, ...). Support has also been added for BIGINT identity columns. As a result, an IDENTITY column is simply an INTEGER or BIGINT column with its default value generated by a sequence generator.

                When you add a new row to such a table using an INSERT INTO <tablename> ...; statement, you can use the NULL value for the IDENTITY column, which results in an auto-generated value for the column. The IDENTITY() function returns the last value inserted into any IDENTITY column by this connection. Use CALL IDENTITY(); as an SQL statement to retrieve this value. If you want to use the value for a field in a child table, you can use INSERT INTO <childtable> VALUES (...,IDENTITY(),...);. Both types of call to IDENTITY() must be made before any additional update or insert statements are issued on the database.

                The next IDENTITY value to be used can be set with the

                ALTER TABLE ALTER COLUMN <column name> RESTART WITH <new value>;

                Sequences

                The SQL 200n syntax and usage is different from what is supported by many existing database engines. Sequences are created with the CREATE SEQUENCE command and their current value can be modified at any time with ALTER SEQUENCE. The next value for a sequence is retrieved with the NEXT VALUE FOR <name> expression. This expression can be used for inserting and updating table rows. You can also use it in select statements. For example, if you want to number the returned rows of a SELECT in sequential order, you can use:

                Example 2.3. Numbering returned rows of a SELECT in sequential order

                    SELECT NEXT VALUE FOR mysequence, col1, col2 FROM mytable WHERE ...

                Please note that the semantics of sequences is not exactly the same as defined by SQL 200n. For example if you use the same sequence twice in the same row insert query, you will get two different values, not the same value as required by the standard.

                You can query the SYSTEM_SEQUENCES table for the next value that will be returned from any of the defined sequences. The SEQUENCE_NAME column contains the name and the NEXT_VALUE column contains the next value to be returned.

                Issues with Transactions

                HSQLDB supports transactions at the READ_UNCOMMITTED level, also known as level 0 transaction isolation. This means that during the lifetime of a transaction, other connections to the database can see the changes made to the data. Transaction support works well in general. Reported bugs concerning transactions being committed if the database is abruptly closed have been fixed. However, the following issues may be encountered only with multiple connections to a database using transactions:

                If two transactions modify the same row, no exception is raised when both transactions are committed. This can be avoided by designing your database in such a way that application data consistency does not depend on exclusive modification of data by one transaction. You can set a database property to cause an exception when this happens.

                SET PROPERTY "sql.tx_no_multi_rewrite" TRUE
                When an ALTER TABLE .. INSERT COLUMN or DROP COLUMN command results in changes to the table structure, the current session is committed. If an uncommitted transaction started by another connections has changed the data in the affected table, it may not be possible to roll it back after the ALTER TABLE command. This may also apply to ADD INDEX or ADD CONSTRAINT commands. It is recommended to use these ALTER commands only when it is known that other connections are not using transactions.

                After a CHECKPOINT command is issued, uncommitted transactions can be continued, committed, or rolled back. However, if the database is not subsequently closed properly with the SHUTDOWN command, any such transaction that still remains uncommitted at the time of shutdown, is part committed (to the state at CHECKPOINT) at the next startup. It is recommended to use the CHECKPOINT command either when no uncommitted transactions is in progress, or it is known that any such transaction is not likely to last for such a long time that an abnormal shutdown might affect its data.

                New Features and Changes

                In recent versions leading to 1.8.0 many enhancements were made for better SQL support. These are listed in the SQL Syntax chapter, in ../changelog_1_8_0.txt and ../changelog_1_7_2.txt. Functions and expressions such as POSITION(), SUBSTRING(), NULLIF(), COALESCE(), CASE ... WHEN .. ELSE, ANY, ALL etc. are among them. Other enhancements may not be very obvious in the documentation but can result in changes of behaviour from previous versions. Most significant among these are handling of NULL values in joins (null columns are no longer joined) and OUTER joins (the results are now correct). You should test your applications with the new version to ensure they do not rely on past incorrect behaviour of the engine. The engine will continue to evolve in future versions towards full SQL standard support, so it is best not to rely on any non-standard feature of the current version.

                Chapter 3. UNIX Quick Start

                How to quickly get Hsqldb up and running on UNIX, including Mac OS X

                Blaine Simpson

                HSQLDB Development Group

                $Date: 2005/07/25 23:20:53 $

                Purpose

                This chapter explains how to quickly install, run, and use HSQLDB on UNIX.

                HSQLDB has lots of great optional features. I intend to cover very few of them. I do intend to cover what I think is the most common UNIX setup: To run a multi-user database with permament data persistence. (By the latter I mean that data is stored to disk so that the data will persist across database shutdowns and startups). I also cover how to run HSQLDB as a system daemon.

                Installation

                Go to http://sourceforge.net/projects/hsqldb and click on the "files" link. You want the current version. This will be the highest numbered version under the plain black "hsqldb" heading. See if there's a distribution for the current HSQLDB version in the format that you want.

                If you want an rpm, you should still find out the current version of HSQLDB as described in the previous paragraph. Then click "hsqldb" in the "free section" of http://www.jpackage.org/ and see if they have the current HSQLDB version built yet. Hopefully, the JPackage folk will document what JVM versions their rpm will support (currently they document this neither on their site nor within the package itself). (I really can't document how to download from a site that is totally beyond my control).

                Note

                It could very well happen that some of the file formats which I discuss below are not in fact offered. If so, then we have not gotten around to building them.

                Binary installation depends on the package format that you downloaded.

                Installing from a .pkg.Z file

                This package is only for use by a Solaris super-user. It's a System V package. Download then uncompress the package with uncompress or gunzip

                    uncompress filename.pkg.Z
                You can read about the package by running
                    pkginfo -l -d filename.pkg
                Run pkgadd as root to install.

                    pkgadd -d filename.pkg
                Installing from a .rpm file

                This is a Linux rpm package. After you download the rpm, you can read about it by running

                    rpm -qip /path/to/file.rpm

                Rpms can be installed or upgraded by running

                    rpm -Uvh /path/to/file.rpm
                as root. Suse users may want to keep Yast aware of installed packages by running rpm through Yast: yast2 -i /path/to/file.rpm.

                Installing from a .zip file

                Extract the zip file to the parent directory of the new HSQLDB home. You don't need to create the HSQLDB_HOME directory because the extraction will create it for you with the right name)

                    cd parent/of/new/hsqldb/home
                    unzip /path/to/file.zip

                All the files in the zip archive will be extracted to underneath a new hsqldb directory.

                Take a look at the files you installed. (Under hsqldb for zip file installations. Otherwise, use the utilities for your packaging system). The most important file of the hsqldb system is hsqldb.jar, which resides in the directory lib.

                Important

                For the purposes of this chapter, I define HSQLDB_HOME to be the parent directory of the lib directory that contains hsqldb.jar. E.g., if your path to hsqldb.jar is /a/b/hsqldb/lib/hsqldb.jar, then your HSQLDB_HOME is /a/b/hsqldb.

                If the description of your distribution says that the hsqldb.jar file will work for your Java version, then you are finished with installation. Otherwise you need to build a new hsqldb.jar file.

                If you followed the instructions above and you still don't know what Java version your hsqldb.jar supports, then read HSQLDB_HOME/readme.txt and HSQLDB_HOME/index.html. If that still doesn't help, then you can just try your hsqldb.jar and see if it works, or build your own.

                To use the supplied hsqldb.jar, just skip to the next section of this document. Otherwise build a new hsqldb.jar.

                Procedure 3.1. Building hsqldb.jar

                1. If you don't already have Ant, download the latest stable binary version from http://ant.apache.org. cd to where you want Ant to live, and extract from the archive with

                      unzip /path/to/file.zip
                  or
                      tar -xzf /path/to/file.tar.gz
                  or
                      bunzip2 -c /path/to/file.tar.bz2 | tar -xzf -
                  Everything will be installed into a new subdirectory named apache-ant- + version. You can rename the directory after the extraction if you wish.

                2. Set the environmental variable JAVA_HOME to the base directory of your Java JRE or SDK, like

                      export JAVA_HOME; JAVA_HOME=/usr/java/j2sdk1.4.0
                  The location is entirely dependent upon your variety of UNIX. Sun's rpm distributions of Java normally install to /usr/java/something. Sun's System V package distributions of Java (including those that come with Solaris) normally install to /usr/something, with a sym-link from /usr/java to the default version (so for Solaris you will usually set JAVA_HOME to /usr/java).

                3. Remove the existing file HSQLDB_HOME/lib/hsqldb.jar.

                4. cd to HSQLDB_HOME/build. Make sure that the bin directory under your Ant home is in your search path. Run the following command.

                      ant hsqldb
                  This will build a new HSQLDB_HOME/lib/hsqldb.jar.

                See the Building HSQLDB appendix if you want to build anything other than hsqldb.jar with all default settings.

                Setting up a Hsqldb Persistent Database Instance and a Hsqldb Server

                If you installed from an OS-specific package, you may already have a database instance and server pre-configured. See if your package includes a file named server.properties (make use of your packaging utilities). If you do, then I suggest that you still read this section while you poke around, in order to understand your setup.

                1. Select a UNIX user to run the database as. If this database is for the use of multiple users, or is a production system (or to emulate a production system), you should dedicate a UNIX user for this purpose. In my examples, I use the user name hsqldb. In this chapter, I refer to this user as the HSQLDB_OWNER, since that user will own the database instance files and processes.

                  If the account doesn't exist, then create it. On all system-5 UNIXes and most hybrids (including Linux), you can run (as root) something like

                      useradd -c 'HSQLDB Database Owner' -s /bin/bash -m hsqldb
                  (BSD-variant users can use a similar pw useradd hsqldb... command).

                2. Become the HSQLDB_OWNER. Copy the sample file HSQLDB_HOME/src/org/hsqldb/sample/sample-server.properties to the HSQLDB_OWNER's home directory and rename it to server.properties.

                  # Hsqldb Server cfg file.
                  # See the Advanced Topics chapter of the Hsqldb User Guide.
                  
                  server.database.0   file:db0/db0
                  # I suggest that, for every file: database you define, you add the
                  # connection property "ifexists=true" after the database instance
                  # is created (which happens simply by starting the Server one time).
                  # Just append ";ifexists=true" to the file: URL, like so:
                  # server.database.0   file:db0/db0;ifexists=true
                  

                  Since the value of the first database (server.database.0) begins with file:, the database instance will be persisted to a set of files in the specified directory with names beginning with the specified name. Set the path to whatever you want (relative paths will be relative to the directory containing the properties file). You can read about how to specify other database instances of various types, and how to make settings for the listen port and many other things, in the Advanced Topics chapter.

                3. Set and export the environmental variable CLASSPATH to the value of HSQLDB_HOME (as described above) plus "/lib/hsqldb.jar", like

                      export CLASSPATH; CLASSPATH=/path/to/hsqldb/lib/hsqldb.jar
                  In HSQLDB_OWNER's home directory, run

                      nohup java org.hsqldb.Server &

                  This will start the Server process in the background, and will create your new database instance "db0". Continue on when you see the message containing HSQLDB server... is online. nohup just makes sure that the command will not quit when you exit the current shell (omit it if that's what you want to do).

                Accessing your Database

                Copy the file HSQLDB_HOME/src/org/hsqldb/sample/sqltool.rc to the HSQLDB_OWNER's home directory. Use chmod to make the file readable and writable only to HSQLDB_OWNER.

                # $Id: sqltool.rc,v 1.22 2007/08/09 03:22:21 unsaved Exp $
                
                # This is a sample RC configuration file used by SqlTool, DatabaseManager,
                # and any other program that uses the org.hsqldb.util.RCData class.
                
                # You can run SqlTool right now by copying this file to your home directory
                # and running
                #    java -jar /path/to/hsqldb.jar mem
                # This will access the first urlid definition below in order to use a 
                # personal Memory-Only database.
                # "url" values may, of course, contain JDBC connection properties, delimited
                # with semicolons.
                
                # If you have the least concerns about security, then secure access to
                # your RC file.
                # See the documentation for SqlTool for various ways to use this file.
                
                # A personal Memory-Only (non-persistent) database.
                urlid mem
                url jdbc:hsqldb:mem:memdbid
                username sa
                password
                
                # A personal, local, persistent database.
                urlid personal
                url jdbc:hsqldb:file:${user.home}/db/personal;shutdown=true
                username sa
                password
                # When connecting directly to a file database like this, you should 
                # use the shutdown connection property like this to shut down the DB
                # properly when you exit the JVM.
                
                # This is for a hsqldb Server running with default settings on your local
                # computer (and for which you have not changed the password for "sa").
                urlid localhost-sa
                url jdbc:hsqldb:hsql://localhost
                username sa
                password
                
                
                
                # Template for a urlid for an Oracle database.
                # You will need to put the oracle.jdbc.OracleDriver class into your 
                # classpath.
                # In the great majority of cases, you want to use the file classes12.zip
                # (which you can get from the directory $ORACLE_HOME/jdbc/lib of any
                # Oracle installation compatible with your server).
                # Since you need to add to the classpath, you can't invoke SqlTool with
                # the jar switch, like "java -jar .../hsqldb.jar..." or 
                # "java -jar .../hsqlsqltool.jar...".
                # Put both the HSQLDB jar and classes12.zip in your classpath (and export!)
                # and run something like "java org.hsqldb.util.SqlTool...".
                
                #urlid cardiff2
                #url jdbc:oracle:thin:@aegir.admc.com:1522:TRAFFIC_SID
                #username blaine
                #password secretpassword
                #driver oracle.jdbc.OracleDriver
                
                
                
                # Template for a TLS-encrypted HSQLDB Server.
                # Remember that the hostname in hsqls (and https) JDBC URLs must match the
                # CN of the server certificate (the port and instance alias that follows 
                # are not part of the certificate at all).
                # You only need to set "truststore" if the server cert is not approved by
                # your system default truststore (which a commercial certificate probably
                # would be).
                
                #urlid tls
                #url jdbc:hsqldb:hsqls://db.admc.com:9001/lm2
                #username blaine
                #password asecret
                #truststore /home/blaine/ca/db/db-trust.store
                
                
                # Template for a Postgresql database
                #urlid blainedb
                #url jdbc:postgresql://idun.africawork.org/blainedb
                #username blaine
                #password losung1
                #driver org.postgresql.Driver
                
                # Template for a MySQL database.  MySQL has poor JDBC support.
                #urlid mysql-testdb
                #url jdbc:mysql://hostname:3306/dbname
                #username root
                #username blaine
                #password hiddenpwd
                #driver com.mysql.jdbc.Driver
                
                # Note that "databases" in SQL Server and Sybase are traditionally used for
                # the same purpose as "schemas" with more SQL-compliant databases.
                
                # Template for a Microsoft SQL Server database
                #urlid msprojsvr
                #url jdbc:microsoft:sqlserver://hostname;DatabaseName=DbName;SelectMethod=Cursor
                # The SelectMethod setting is required to do more than one thing on a JDBC
                # session (I guess Microsoft thought nobody would really use Java for 
                # anything other than a "hello world" program).
                # This is for Microsoft's SQL Server 2000 driver (requires mssqlserver.jar
                # and msutil.jar).
                #driver com.microsoft.jdbc.sqlserver.SQLServerDriver
                #username myuser
                #password hiddenpwd
                
                # Template for a Sybase database
                #urlid sybase
                #url jdbc:sybase:Tds:hostname:4100/dbname
                #username blaine
                #password hiddenpwd
                # This is for the jConnect driver (requires jconn3.jar).
                #driver com.sybase.jdbc3.jdbc.SybDriver
                
                # Template for Embedded Derby / Java DB.
                #urlid derby1
                #url jdbc:derby:path/to/derby/directory;create=true
                #username ${user.name}
                #password any_noauthbydefault
                #driver org.apache.derby.jdbc.EmbeddedDriver
                # The embedded Derby driver requires derby.jar.
                # There'a also the org.apache.derby.jdbc.ClientDriver driver with URL
                # like jdbc:derby://<server>[:<port>]/databaseName, which requires
                # derbyclient.jar.
                # You can use \= to commit, since the Derby team decided (why???)
                # not to implement the SQL standard statement "commit"!!
                # Note that SqlTool can not shut down an embedded Derby database properly,
                # since that requires an additional SQL connection just for that purpose.
                # However, I've never lost data by not shutting it down properly.
                # Other than not supporting this quirk of Derby, SqlTool is miles ahead of ij.
                

                We will be using the "localhost-sa" sample urlid definition from the config file. The JDBC URL for this urlid is jdbc:hsqldb:hsql://localhost. That is the URL for the default database instance of a HSQLDB Server running on the default port of the local host. You can read about URLs to connect to other instances and other servers in the Advanced Topics chapter.

                Run SqlTool.

                    java -jar path/to/hsqldb.jar localhost-sa
                If you get a prompt, then all is well. If security is of any concern to you at all, then you should change the privileged password in the database. Use the command SET PASSWORD command to change SA's password.
                    set password "newpassword";

                When you're finished playing, exit with the command \q.

                If you changed the SA password, then you need to fix the password in the sqltool.rc file accordingly.

                You can, of course, also access the database with any JDBC client program. See the First JDBC Client Example appendix. You will need to modify your classpath to include hsqldb.jar as well as your client class(es). You can also use the other HSQLDB client programs, such as org.hsqldb.util.DatabasManagerSwing, a graphical client with a similar purpose to SqlTool.

                You can use any normal UNIX account to run the JDBC clients, including SqlTool, as long as the account has read access to the hsqldb.jar file and to an sqltool.rc file. See the SqlTool chapter about where to put sqltool.rc, how to execute sql files, and other SqlTool features.

                Create additional Accounts

                Connect to the database as SA (or any other Administrative user) and run CREATE USER to create new accounts for your database instance. HSQLDB accounts are database-instance-specific, not Server-specific.

                For the current version of HSQLDB, only users with Role of DBA may create or own database objects. DBA members have privileges to do anything. Non-DBAs may be granted some privileges, but may never create or own database objects. (Before long, non-DBAs will be able to create objects if they have permission to do so in the target schema). When you first create a hsqldb database, it has only one database user-- SA, a DBA account, with an empty string password. You should set a password (as described above). You can create as many additional users as you wish. To make a user a DBA, you can use the "ADMIN" option to the CREATE USER command, or GRANT the DBA Role to the account after creating it.

                If you create a user without the ADMIN tag (and without granting the DBA role to them) this user will be able to read the data dictionary tables, but will be able unable to create or own his own objects. He will have only the rights which the pseudo-user PUBLIC has. To give him more permissions, even rights to read objects, you can GRANT permissions for specific objects, grant Roles (which encompass a set of permissions), or grant the DBA Role itself.

                Since only people with a database account may do anything at all with the database, it is often useful to permit other database users to view the data in your tables. To optimize performance, reduce contention, and minimize administration, it is often best to grant SELECT to PUBLIC on any object that needs to be accessed by multiple database users (with the significant exception of any data which you want to keep secret).

                Shutdown

                Do a clean database shutdown when you are finished with the database instance. You need to connect up as SA or some other Admin user, of course. With SqlTool, you can run

                    java -jar path/to/hsqldb.jar --sql shutdown localhost-sa
                You don't have to worry about stopping the Server because it shuts down automatically when all served database instances are shut down.

                Running Hsqldb as a System Daemon

                You can, of course, run HSQLDB through inittab on System V UNIXes, but usually an init script is more convenient and manageable. This section explains how to set up and use our UNIX init script. Our init script is only for use by root. (That is not to say that the Server will run as root-- it usually should not).

                The main purpose of the init script is to start up a Server with the database instances specified in your server.properties file; and to shut down all of those instances plus additional urlids which you may (optionally) list in your init script config file. These urlids must all have entries in a sqltool.rc file. If, due to firewall issues, you want to run a WebServer instead of a Server, then make sure you have a healthy WebServer with a webserver.properties set up, adjust your URLs in sqltool.rc, and set TARGET_CLASS in the config file. (By following the commented examples in the config file, you can start up any number of Server and/or WebServer listeners with or without TLS ecryption).

                After you have the init script set up, root can use it anytime to start or stop HSQLDB. (I.e., not just at system bootup or shutdown).

                Portability of hsqldb init script

                The primary design criterion of the init script is portability. It does not print pretty color startup/shutdown messages as is common in late-model Linuxes and HPUX; and it does not keep subsystem state files or use the startup/shutdown functions supplied by many UNIXes, because these features are all non-portable.

                Offsetting these limitations, this one script does it's intended job great on the UNIX varieties I have tested, and can easily be modified to accommodate other UNIXes. While you don't have tight integration with OS-specific daemon administration guis, etc., you do have a well tested and well behaved script that gives good, utilitarian feedback.

                Init script Setup Procedure

                The strategy taken here is to get the init script to run your single Server or WebServer first (as specified by TARGET_CLASS). After that's working, you can customize the JVM that is run by running additional Servers in it, running your own application in it (embedding), or even overriding HSQLDB behavior with your own overriding classes.

                1. Copy the init script hsqldb from HSQLDB_HOME/bin into the directory where init scripts live on your variety of UNIX. The most common locations are /etc/init.d or /etc/rc.d/init.d on System V style UNIXes, /usr/local/etc/rc.d on BSD style UNIXes, and /Library/StartupItems/hsqldb on OS X (you'll need to create the directory for the last).

                2. Look at the comment towards the top of the init script which lists recommended locations for the configuration file for various UNIX platforms. Copy the sample config file HSQLDB_HOME/src/org/hsqldb/sample/sample-hsqldb.cfg to one of the listed locations (your choice). Edit the config file according to the instructions in it.

                  # $Id: sample-hsqldb.cfg,v 1.16 2005/07/24 18:33:13 unsaved Exp $
                  
                  # Sample configuration file for HSQLDB database server.
                  # See the "UNIX Quick Start" chapter of the Hsqldb User Guide.
                  
                  # N.b.!!!!  You must place this in the right location for your type of UNIX.
                  # See the init script "hsqldb" to see where this must be placed and
                  # what it should be renamed to.
                  
                  # This file is "sourced" by a Bourne shell, so use Bourne shell syntax.
                  
                  # This file WILL NOT WORK until you set (at least) the non-commented
                  # variables to the appropriate values for your system.
                  # Life will be easier if you avoid all filepaths with spaces or any other
                  # funny characters.  Don't ask for support if you ignore this advice.
                  
                  # Thanks to Meikel Bisping for his contributions.  -- Blaine
                  
                  JAVA_EXECUTABLE=/usr/bin/java
                  
                  # Unless you copied a hsqldb.jar file from another system, this typically
                  # resides at $HSQLDB_HOME/lib/hsqldb.jar, where $HSQLDB_HOME is your HSQLDB
                  # software base directory.
                  HSQLDB_JAR_PATH=/opt/hsqldb/lib/hsqldb.jar
                  
                  # Where the file "server.properties" resides.
                  SERVER_HOME=/opt/hsqldb/data
                  
                  # What UNIX user the server will run as.
                  # (The shutdown client is always run as root or the invoker of the init script).
                  # Runs as root by default, but you should take the time to set database file
                  # ownerships to another user and set that user name here.
                  HSQLDB_OWNER=hsqldb
                  
                  # The HSQLDB jar file specified in HSQLDB_JAR_PATH above will automatically
                  # be in the class path.  This arg specifies additional classpath elements.
                  # To embed your own application, add your jar file(s) or class base
                  # directories here, and add your main class to the INVOC_ADDL_ARGS setting
                  # below.
                  #SERVER_ADDL_CLASSPATH=/usr/local/dist/currencybank.jar
                  
                  # We require all Server/WebServer instances to be accessible within 
                  # $MAX_START_SECS from when the Server/WebServer is started.
                  # Defaults to 60.
                  # Raise this is you are running lots of DB instances or have a slow server.
                  #MAX_START_SECS=200
                  
                  # Time to allow for JVM to die after all HSQLDB instances stopped.
                  # Defaults to 1.
                  #MAX_TERMINATE_SECS=0
                  
                  # These are "urlid" values from a SqlTool authentication file
                  # ** IN ADDITION TO THOSE IN YOUR server.properties OR webserver.properties **
                  # file.  All server.urlid.X values from your properties file will automatically
                  # be started/stopped/tested.  $SHUTDOWN_URLIDS is for additional urlids which
                  # will stopped.  (Therefore, most users will not set this at all).
                  # Separate multiple values with white space.  NO OTHER SPECIAL CHARACTERS!
                  # Make sure to quote the entire value if it contains white space separator(s).
                  # Defaults to none (i.e., only urlids set in properties file will be stopped).
                  #SHUTDOWN_URLIDS='sa mygms'
                  
                  # SqlTool authentication file used only for shutdown.
                  # The default value will be sqltool.rc in root's home directory, since it is 
                  # root who runs the init script.
                  # (See the SqlTool chapter of the HSQLDB User Guide if you don't understand 
                  # this).
                  #AUTH_FILE=/home/blaine/sqltool.rc
                  
                  # Set this to either 'WebServer' or 'Server'.  Defaults to Server.
                  # The JVM that is started can invoke many classes (see the following item
                  # about that), but this is the Server that is used (1) to check status,
                  # (2) to shut down the JVM, (3) to get urlids for #1 from the 
                  # server's server/webserver.properties file.
                  #TARGET_CLASS=WebServer
                  # Note that you don't specify the org.hsqldb package, since you have no 
                  # choice in the matter (you can only run org.hsqldb.Server or 
                  # org.hsqldb.WebServer).  If you specify additional classes with
                  # INVOC_ADDL_ARGS (described next), you do need to specify the
                  # full class name with package name.
                  
                  # This is where you specify exactly what your HSQLDB JVM will run.
                  # The class org.hsqldb.util.MainInvoker will run the TARGET_CLASS
                  # specified above with any arguments supplied here + any other classes
                  # and arguments.  Every additional class (in addition to the TARGET_CLASS)
                  # must be preceded with an empty string, so that MainInvoker will know
                  # you are giving a class name.  MainInvoker will invoke the normal 
                  # static main(String[]) method of each such class.  
                  # By default, MainInvoker will just run TARGET_CLASS with no args.
                  # Example that runs just the TARGET_CLASS with the specified arguments:
                  #INVOC_ADDL_ARGS='-silent false'
                  # Example that runs the TARGET_CLASS plus a WebServer:
                  #INVOC_ADDL_ARGS='"" org.hsqldb.WebServer'
                  # Note the empty string preceding the class name.
                  # Example that starts TARGET_CLASS with an argument + a WebServer +
                  # your own application with its args (i.e., the HSQLDB Servers are
                  # "embedded" in your application).  (Set SERVER_ADDL_CLASSPATH too).:
                  #INVOC_ADDL_ARGS='-silent false "" org.hsqldb.WebServer "" com.acme.Stone --env prod localhost'
                  # Example to run a non-TLS server in same JVM with a TLS server.  In this
                  # case, TARGET_CLASS is Server which will run in TLS mode by virtue of 
                  # setting TLS_KEYSTORE and TLS_PASSWORD above.  The "additional" Server
                  # here overrides the 'tls' and 'port' settings:
                  #INVOC_ADDL_ARGS="'' org.hsqldb.Server -port 9002 -tls false"
                  # Note that you use nested quotes to group arguments and to specify the
                  # empty-string delimiter.
                  
                  # For TLS encryption for your Server, set these two variables.
                  # N.b.:  If you set these, then make this file unreadable to non-root users!!!!
                  # See the TLS chapter of the HSQLDB User Guide, paying attention to the 
                  # security warning(s).
                  # If you are running with a private server cert, then you will also need to 
                  # set "truststore" in the your SqlTool config file (location is set by the
                  # AUTH_FILE variable in this file, or it must be at the default location for 
                  # HSQLDB_OWNER).
                  #TLS_KEYSTORE=/path/to/jks/server.store
                  #TLS_PASSWORD=password
                  
                  # Any JVM args for the invocation of the JDBC client used to verify DB
                  # instances and to shut them down (SqlToolSprayer).
                  # This example specifies the location of a private trust store for TLS 
                  # encryption.
                  # For multiple args, put quotes around entire value.
                  #CLIENT_JVMARGS=-Djavax.net.debug=ssl
                  
                  # Any JVM args for the server.
                  # For multiple args, put quotes around entire value.
                  #SERVER_JVMARGS=-Xmx512m
                  
                3. Either copy HSQLDB_OWNER's sqltool.rc file into root's home directory, or set the value of AUTH_FILE to the absolute path of HSQLDB_OWNER's sqltool.rc file. This file is read (for stops) directly by root, even if you run hsqldb as non-root (by setting HSQLDB_OWNER in the config file). If you copy the file, make sure to use chmod to restrict permissions on the new copy. (The init script now enforces permissions on this file).

                4. Edit your server.properties file. For every server.database.X that you have defined, set a property of name server.urlid.X to the urlid for an Administrative user for that database instance.

                  Example 3.1. server.properties fragment

                      server.database.0=file://home/hsqldb/data/db1
                      server.urlid.0=localhostdb1

                  Warning

                  Make sure to add a urlid for each and every database instance. If you don't then the init script will never know about databases that become inaccessible and will give false diagnostics.

                  For this example, you would need to define the urlid localhostdb1 in your sqltool.rc file.

                  Example 3.2. example sqltool.rc stanza

                      urlid localhostdb1
                      url jdbc:hsqldb:hsql://localhost
                      username sa
                      password secret
                5. Verify that the init script works.

                  Just run

                      /path/to/hsqldb
                  as root to see the arguments you may use. Notice that you can run

                      /path/to/hsqldb status

                  at any time to see whether your HSQLDB Server is running.

                  Re-run the script with each of the possible arguments to really test it good. If anything doesn't work right, then see the Troubleshooting the Init Script section.

                6. Tell your OS to run the init script upon system startup and shutdown. If you are using a UNIX variant that has /etc/rc.conf or /etc/rc.conf.local (like BSD variants and Gentoo), you must set "hsqldb_enable" to "YES" in either of those files. (Just run cd /etc; ls rc.conf rc.conf.local to see if you have one of these files). For good UNIXes that use System V style init, you must set up hard links or soft links either manually or with management tools (such as chkconfig or insserv) or Gui's (like run level editors).

                  This paragraph is for Mac OS X users only. If you followed the instructions above, your init script should reside at /Library/StartupItems/hsqldb/hsqldb. Now copy the file StartupParameters.plist from the directory src/org.hsqldb/sample of your HSQLDB distribution to the same directory as the init script. As long as these two files reside in /Library/StartupItems/hsqldb, your init script is active (for portability reasons, it doesn't check for a setting in /etc/hostconfig). You can run it as a Startup Item by running

                      SystemStarter {start|stop|restart} Hsqldb
                  Hsqldb is the service name. See the man page for SystemStarter. To disable the init script, wipe out the /Library/StartupItems/hsqldb directory. Hard to believe, but the Mac people tell me that during system shutdown the Startup Items don't run at all. Therefore, if you don't want your data corrupted, make sure to run "SystemStarter stop Hsqldb" before shutting down your Mac.

                Follow the examples in the config file to add additional classes to the server JVM's classpath and to execute additional classes in your JVM. (See the SERVER_ADDL_CLASSPATH and INVOC_ADDL_ARGS items).

                Troubleshooting the Init Script

                Do a ps to look for processes containing the string hsqldb, and try to connect to the database from any client. If the init script starts up your database successfully, but incorrectly reports that it has not, then your problem is with specification of urlid(s) or SqlTool setup. If your database really did not start, then skip to the next paragraph. Verify that the urlid(s) listed in the server.properties or webserver.properties are correct. and verify that you can run SqlTool as root to connect to the instances. (For the latter test, use the --rcfile switch if you are setting AUTH_FILE in the init script config file).

                If your database really is not starting, then verify that you can su to the database owner account and start the database. The command su USERNAME -c ... won't work on most UNIXes unless the target user has a real login shell. Therefore, if you try to tighten up security by disabling this user's login shell, you will break the init script. If these possibilities don't pan out, then debug the init script or seek help, as described below.

                To debug the init script, run it in verbose mode to see exactly what is happening (and perhaps manually run the steps that are suspect). To run an init script (in fact, any sh shell script) in verbose mode, use sh with the -x or -v switch, like

                    sh -x path/to/hsqldb start
                See the man page for sh if you don't know the difference between -v and -x.

                If you want troubleshooting help, use the HSQLDB lists/forums or email me at blaine.simpson@admc.com. If you email me, make sure to include the revision number from your hsqldb init script (it's towards the top in the line that starts like "# $Id:"), and the output of a run of

                    sh -x path/to/hsqldb start > /tmp/hstart.log 2>&1

                Chapter 4. Advanced Topics

                Fred Toussi

                HSQLDB Development Group

                Copyright 2002-2005 Fred Toussi. Permission is granted to distribute this document without any alteration under the terms of the HSQLDB license. Additional permission is granted to the HSQLDB Development Group to distribute this document with or without alterations under the terms of the HSQLDB license.

                $Date: 2007/03/24 11:39:08 $

                Purpose

                Many questions repeatedly asked in Forums and mailing lists are answered in this guide. If you want to use HSQLDB with your application, you should read this guide. This document covers system related issues. For issues related to SQL see the SQL Issues chapter.

                Connections

                The normal method of accessing an HSQLDB database is via the JDBC Connection interface. An introduction to different methods of providing database services and accessing them can be found in the SQL Issues chapter. Details and examples of how to connect via JDBC are provided in our JavaDoc for jdbcConnection.

                Version 1.7.2 introduced a uniform method of distinguishing between different types of connection, alongside new capabilities to provide access to multiple databases. The common driver identifier is jdbc:hsqldb: followed by a protocol identifier (mem: file: res: hsql: http: hsqls: https:) then followed by host and port identifiers in the case of servers, then followed by database identifier.

                Table 4.1. Hsqldb URL Components

                Driver and ProtocolHost and PortDatabase
                jdbc:hsqldb:mem:
                not available
                accounts

                Lowercase, single-word identifier creates the in-memory database when the first connection is made. Subsequent use of the same Connection URL connects to the existing DB.

                The old form for the URL, jdbc:hsqldb:. creates or connects to the same database as the new form for the URL, jdbc:hsqldb:mem:.

                jdbc:hsqldb:file:
                not available
                mydb
                /opt/db/accounts
                C:/data/mydb

                The file path specifies the database file. In the above examples the first one refers to a set of mydb.* files in the directory where the javacommand for running the application was issued. The second and third examples refer to absolute paths on the host machine.

                jdbc:hsqldb:res:
                not available
                /adirectory/dbname
                Database files can be loaded from one of the jars specified as part of the Java command the same way as resource files are accessed in Java programs. The /adirectory above stands for a directory in one of the jars.
                jdbc:hsqldb:hsql:
                jdbc:hsqldb:hsqls:
                jdbc:hsqldb:http:
                jdbc:hsqldb:https:
                //localhost
                //192.0.0.10:9500
                //dbserver.somedomain.com
                /an_alias
                /enrollments
                /quickdb

                The host and port specify the IP address or host name of the server and an optional port number. The database to connect to is specified by an alias. This alias is a lowercase string defined in the server.properties file to refer to an actual database on the file system of the server or a transient, in-memory database on the server. The following example lines in server.properties or webserver.properties define the database aliases listed above and accessible to clients to refer to different file and in-memory databases.

                    database.0=file:/opt/db/accounts
                    dbname.0=an_alias
                
                    database.1=file:/opt/db/mydb
                    dbname.1=enrollments
                
                    database.2=mem:adatabase
                    dbname.2=quickdb

                The old form for the server URL, e.g., jdbc:hsqldb:hsql//localhost connects to the same database as the new form for the URL, jdbc:hsqldb:hsql//localhost/ where the alias is a zero length string. In the example below, the database files lists.* in the /home/dbmaster/ directory are associated with the empty alias:

                    database.3=/home/dbmaster/lists
                    dbname.3=

                Connection properties

                Each new JDBC Connection to a database can specify connection properties. The properties user and password are always required. In 1.8.0 the following optional properties can also be used.

                Connection properties are specified either by establishing the connection via the:

                    DriverManager.getConnection (String url, Properties info);

                method call, or the property can be appended to the full Connection URL.

                Table 4.2. Connection Properties

                get_column_nametruecolumn name in ResultSet

                This property is used for compatibility with other JDBC driver implementations. When true (the default), ResultSet.getColumnName(int c) returns the underlying column name

                When false, the above method returns the same value as ResultSet.getColumnLabel(int column) Example below:

                    jdbc:hsqldb:hsql://localhost/enrollments;get_column_name=false
                                    

                When a ResultSet is used inside a user-defined stored procedure, the default, true, is always used for this property.

                ifexistsfalseconnect only if database already exists

                Has an effect only with mem: and file: database. When true, will not create a new database if one does not already exist for the URL.

                When false (the default), a new mem: or file: database will be created if it does not exist.

                Setting the property to true is useful when troubleshooting as no database is created if the URL is malformed. Example below:

                    jdbc:hsqldb:file:enrollments;ifexists=true
                shutdownfalseshut down the database when the last connection is closed

                This mimics the behaviour of 1.7.1 and older versions. When the last connection to a database is closed, the database is automatically shut down. The property takes effect only when the first connection is made to the database. This means the connection that opens the database. It has no effect if used with subsequent, simultaneous connections.

                This command has two uses. One is for test suites, where connections to the database are made from one JVM context, immediately followed by another context. The other use is for applications where it is not easy to configure the environment to shutdown the database. Examples reported by users include web application servers, where the closing of the last connection conisides with the web app being shut down.

                In addition, when a connection to an in-process database creates a new database, or opens an existing database (i.e. it is the first connection made to the database by the application), all the user-defined database properties can be specified as URL properties. This can be used to specify properties to enforce more strict SQL adherence, or to change cache_scale or similar properties before the database files are created. However, for new databases, it is recommended to use the SET PROPERTY command for such settings.

                Properties Files

                HSQLDB relies on a set of properties files for different settings. Since 1.7.0 property naming has been streamlined and a number of new properties have been introduced.

                In all properties files, values are case-sensitive. All values apart from names of files or pages are required in lowercase (e.g. server.silent=FALSE will have no effect, but server.silent=false will work).

                The properties files and the settings stored in them are as follows:

                Table 4.3. Hsqldb Server Properties Files

                File NameLocationFunction
                server.propertiesthe directory where the command to run the Server class is issuedsettings for running HSQLDB as a database server communicating with the HSQL protocol
                webserver.propertiesthe directory where the command to run the WebServer class is issuedsettings for running HSQLDB as a database server communicating with the HTTP protocol
                <dbname>.propertiesthe directory where all the files for a database are locatedsettings for each particular database

                Properties files for running the servers are not created automatically. You should create your own files that contain server.property=value pairs for each property.

                The properties file for each database is generated by the database engine. This file can be edited after closing the database. In 1.8.0, most of these properties can be changed via SQL commands.

                Server and Web Server Properties

                In both server.properties and webserver.properties files, supported values and their defaults are as follows:

                Table 4.4. Property File Properties

                ValueDefaultDescription
                server.database.0testthe path and file name of the first database file to use
                server.dbname.0""lowercase server alias for the first database file
                server.urlid.0NONESqlTool urlid used by UNIX init script. (This property is not used if your are running Server/Webserver on a platform other than UNIX, or of you are not using our UNIX init script).
                server.silenttrueno extensive messages displayed on console
                server.tracefalseJDBC trace messages displayed on console

                In 1.8.0, each server can serve up to 10 different databases simultaneously. The server.database.0 property defines the filename / path whereas the server.dbname.0 defines the lowercase alias used by clients to connect to that database. The digit 0 is incremented for the second database and so on. Values for the server.database.{0-9} property can use the mem:, file: or res: prefixes and properties as discussed above under CONNECTIONS. For example,

                    database.0=mem:temp;sql.enforce_strict_size=true;

                Values specific to server.properties are:

                Table 4.5. Server Property File Properties

                ValueDefaultDescription
                server.port9001 (normal) or 554 (if TLS encrypted)TCP/IP port used for talking to clients. All databases are served on the same port.
                server.no_system_exittrueno System.exit() call when the database is closed

                Values specific to webserver.properties are:

                Table 4.6. WebServer Property File Properties

                ValueDefaultDescription
                server.port80TCP/IP port used for talking to clients
                server.default_pageindex.htmlthe default web page for server
                server.root./the location of served pages
                .<extension>?multiple entries such as .html=text/html define the mime types of the static files served by the web server. See the source for WebServer.java for a list.

                All the above values can be specified on the command line to start the server by omitting the server. prefix.

                Starting a Server from your application

                If you want to start the server from within your application, as opposed to the command line or batch files, you should create an instance of Server or Web Server, then assign the properties in the form of a String and start the Server. An example of this can be found in the org.hsqldb.test.TestBase source.

                Note

                Upgrading: If you have existing custom properties files, change the values to the new naming convention. Note the use of digits at the end of server.database.n and server.dbname.n properties.

                Individual Database Properties

                Each database has its own <dbname>.properties file as part of a small group of files which also includes <dbname>.script and <dbname>.data. The properties files contain key/value pairs for some important settings.

                In version 1.8.0 a new SQL command allows most database properties to be modified as follows:

                    SET PROPERTY "property_name" property_value

                Properties that can be modified via SET PROPERTY are indicated in the table below. Other properties are indicated as PROPERTIES FILE ONLY and can be modified only by editing the .properties file after a shutdown and before a restart. Only the user-defined values listed below should ever be modified. Changing any other value could result in unexpected malfunction in database operations. Most of these values have been introduced for the new features since 1.7.0:

                Table 4.7. Database-specific Property File Properties

                ValueDefaultDescription
                readonlyfalsewhole database is read-only

                When true, the database cannot be modified in use. This setting can be changed to true if the database is to be opened from a CD. Prior to changing this setting, the database should be closed with the SHUTDOWN COMPACT command to ensure consistency and compactness of the data. (PROPERTIES FILE ONLY) but can be used as a connection property to open a normal database as readonly.

                hsqldb.files_readonlyfalsedatabase files will not be written to

                When true, data in MEMORY tables can be modified and new MEMORY tables can be added. However, these changes are not saved when the database is shutdown. CACHED and TEXT tables are always readonly when this setting is true. (PROPERTIES FILE ONLY)

                hsqldb.cache_file_scale1Set larger data file limits. Once set, the limit will go up to 8GB.

                This property can be set to 8 to increase the size limit of the .data file from 2GB to 8GB. To apply the change to an existing database, SHUTDOWN SCRIPT should be performed first, then the property=value line below should be added to the .properties file before reopening the database.

                hsqldb.cache_file_scale=8

                The property can be set with the SQL command (as opposed to changing the value in the properties file) when the database has no CACHED tables (e.g. a new database). (SET PROPERTY)

                sql.enforce_sizefalsetrimming and padding string columns

                This property is no longer supported. Use sql.enforce_sctrict_size

                sql.enforce_strict_sizefalsesize enforcement and padding string columns

                Conforms to SQL standards for size and precision of data types. When true, all CHARACTER, VARCHAR, NUMERIC and DECIMAL values that are in a row affected by an INSERT INTO or UPDATE statement are checked against the size specified in the SQL table definition. An exception is thrown if the value is too long. Also all CHARACTER values that are shorter than the specified size are padded with spaces. TIMESTAMP(0) and TIMESTAMP(6) are also allowed in order to specify the subsecond resolution of the values. When false (default), stores the exact string that is inserted. (SET PROPERTY)

                sql.tx_no_multi_rewritefalsetransaction management

                In the default READ_UNCOMMITED mode, a transaction can write over rows inserted or updated by another uncommitted transaction. Setting this property to true will raise an exception when such a write is attempted (SET PROPERTY)

                hsqldb.cache_scale14memory cache exponent

                Indicates the maximum number of rows of cached tables that are held in memory, calculated as 3 *(2**value) (three multiplied by (two to the power value)). The default results in up to 3*16384 rows from all cached tables being held in memory at any time.

                The value can range between 8-18. (SET PROPERTY). If the value is set via SET PROPERTY then it becomes effective after the next database SHUTDOWN or CHECKPOINT. (SET PROPERTY)

                hsqldb.cache_size_scale10memory cache exponent

                Indicates the average size of each row in the memory cache used with cached tables, calculated as 2**value (two to the power value). This result value is multiplied by the maximum number of rows defined by hsqldb.cache_scale to form the maximum number of bytes for all the rows in memory cache. The default results in 1024 bytes per row. This default, combined with the default number of rows, results in approximately 50MB of the .data file to be stored in the memory cache.

                The value can range between 6-20. (SET PROPERTY). If the value is set via SET PROPERTY then it becomes effective after the next database SHUTDOWN or CHECKPOINT. (SET PROPERTY)

                hsqldb.log_size200size of log when checkpoint is performed

                The value is the size in megabytes that the .log file can reach before an automatic checkpoint occurs. A checkpoint and rewrites the .script file and clears the .log file. The value can be changed via the SET LOGSIZE nnn SQL command.

                runtime.gc_interval0forced garbage collection

                This setting forces garbage collection each time a set number of result set row or cache row objects are created. The default, "0" means no garbage collection is forced by the program.

                This should not be set when the database engine is acting as a server inside an exclusive JVM. The setting can be useful when the database is used in-process with the application with some Java Runtime Environments (JRE's). Some JRE's increase the size of the memory heap before doing any automatic garbage collection. This setting would prevent any unnecessary enlargement of the heap. Typical values for this setting would probably be between 10,000 to 100,000. (PROPERTIES FILE ONLY)

                hsqldb.nio_data_filetrueuse of nio access methods for the .data file

                When HSQLDB is compiled and run in Java 1.4 or higher, setting this property to false will avoid the use of nio access methods, resulting in somewhat reduced speed. If the data file is larger than 256MB when it is first opened, nio access methods are not used. Also, if the file gets larger than the amount of available computer memory that needs to be allocated for nio access, non-nio access methods are used.

                (SET PROPERTY). If used before defining any CACHED table, it applies to the current session, otherwise it comes to effect after a SHUTDOWN and restart or CHECKPOINT.

                hsqldb.default_table_typememorytype of table created with unqualified CREATE TABLE

                The CREATE TABLE command results in a MEMORY table by default. Setting the value "cached" for this property will result in a cached table by default. The qualified forms such as CREATE MEMORY TABLE or CREATE CACHED TABLE are not affected at all by this property. (SET PROPERTY)

                hsqldb.applog0application logging level

                The default level 0 indicates no logging. Level 1 results in events related to persistence to be logged, including any failures. The events are logged in a file ending with .app.log

                textdb.*0default properties for new text tables

                Properties that override the database engine defaults for newly created text tables. Settings in the text table SET <tablename> SOURCE <source string> command override both the engine defaults and the database properties defaults. Individual textdb.* properties are listed in the Text Tables chapter. (SET PROPERTY)

                When connecting to an in-process database creates a new database, or opens an existing database (i.e. it is the first connection made to the database by the application), all the user-defined database properties listed in this section can be specified as URL properties.

                Note

                Upgrading: From 1.7.0, the location of the database files can no longer be overridden by paths defined in the properties file. All files belonging to a database should reside in the same directory.

                The property sql.compare_in_locale=true is no longer supported. If the line exists in a .properties file, it will switch the database to the collation for the current default. See the SET DATABASE COLLATION[2] command.

                When HSQLDB is used in OpenOffice.org, some property values will have a different default. The properties and values are:

                hsqldb.default_table_type=cached hsqldb.cache_scale=13 hsqldb.log_size=10; hsqldb.nio_data_file=false sql.enforce_strict_size=true

                SQL Commands for Database Properties

                There are some database properties that are set with dedicated SQL commands beginning with SET.

                Table 4.8. SQL command properties

                SET WRITE_DELAY {{TRUE | FALSE} | <seconds> | <milliseconds> MILLIS

                The default is TRUE and indicates that the changes to the database that have been logged are synched to the file system once every 20 seconds. FALSE indicates there is no delay and at each commit a file synch operation is performed. Numeric values from 0 can also be specified for the synch delay.

                The purpose of this command is to control the amount of data loss in case of a total system crash. A delay of 1 second means at most the data written to disk during the last second before the crash is lost. All data written prior to this has been synced and should be recoverable

                This setting should be specified on the basis of the reliability of the hardware used for running the database engine, the type of disk system used, the possibility of power failure etc. Also the nature of the data stored should be considered.

                In general, when the system is very reliable, the setting can be left to the default. If it is not very reliable, or the data is critical a setting of 1 or 2 seconds would suffice. Only in the worst case scenario or with the most critical data should a setting of 0 or FALSE be specified as this will slow the engine down to the speed at which the file synch operation can be performed by the disk subsystem.

                Values down to 10 millisconds can be specified by adding MILLIS to the command, but in practice a delay of 100 milliseconds provides 99.99999% reliability with an average one system crash per 6 days.

                SET LOG_SIZE <numeric value>

                The engine writes out a log of all the changes to the database as they occur. This log is synched to the disk based on the WRITE_DELAY property above. The log is never reused unless there is an abnormal termination, i.e. the database process is terminated without SHUTDOWN, or it was terminated using SHUTDOWN IMMEDIATELY.

                The default maximum size of the .log file is 200 MB. When the maximum size is reached, a CHECKPOINT operation is performed. This operation will save the other database files in a consistent state and delete the old log. A value of 0 indicates no limit for the .log file.

                SET CHECKPOINT DEFRAG <numeric value>

                When rows in CACHED tables are updated or deleted, the spaces are mostly reused. However, in time, some unused spaces are left in the .data file, especially when large tables are dropped or their structure is modified.

                A CHECKPOINT operation does not normally reclaim the empty spaces, whereas CHECKPOINT DEFRAG always does.

                This property determines when a normal CHECKPOINT, whether initiated by an administrator or when the size of the log exceeds its limit.

                The numeric value is the number of megabytes of recorded empty spaces in the .data file that would force a DEFRAG operation. Low values result in more frequent DEFRAG operations. A value of 0 indicates no automatic DEFRAG is performed. The default is 200 megabytes of lost space.

                SET REFERENTIAL INTEGRITY {TRUE | FALSE}

                This is TRUE by default. If bulk data needs to be loaded into the database, this property can be set FALSE for the duration of bulk load operation. This allows loading data for related tables in any order. The property should be set TRUE after bulk load. If the loaded data is not guaranteed to conform to the referential integrity constraints, SQL queries should be run after loading to identify and modify any non-conforming rows.

                Chapter 5. Deployment Issues

                Fred Toussi

                HSQLDB Development Group

                Copyright 2005 Fred Toussi. Permission is granted to distribute this document without any alteration under the terms of the HSQLDB license. Additional permission is granted to the HSQLDB Development Group to distribute this document with or without alterations under the terms of the HSQLDB license.

                $Date: 2005/07/02 09:11:39 $

                Purpose

                Many questions repeatedly asked in Forums and mailing lists are answered in this guide. If you want to use HSQLDB with your application, you should read this guide. This document covers system related issues. For issues related to SQL see the SQL Issues chapter.

                Mode of Operation and Tables

                HSQLDB has many modes of operation and features that allow it to be used in very different scenarios. Levels of memory usage, speed and accessibility by different applications are influenced by how HSQLDB is deployed.

                Mode of Operation

                The decision to run HSQLDB as a separate server process or as an in-process database should be based on the following:

                • When HSQLDB is run as a server on a separate machine, it is isolated from hardware failures and crashes on the hosts running the application.

                • When HSQLDB is run as a server on the same machine, it is isolated from application crashes and memory leaks.

                • Server connections are slower than in-process connections due to the overhead of streaming the data for each JDBC call.

                Tables

                TEXT tables are designed for special applications where the data has to be in an interchangeable format, such as CSV. TEXT tables should not be used for routine storage of data.

                MEMORY tables and CACHED tables are generally used for data storage. The difference between the two is as follows:

                • The data for all MEMORY tables is read from the .script file when the database is started and stored in memory. In contrast the data for cached tables is not read into memory until the table is accessed. Furthermore, only part of the data for each CACHED table is held in memory, allowing tables with more data than can be held in memory.

                • When the database is shutdown in the normal way, all the data for MEMORY tables is written out to the disk. In comparison, the data in CACHED tables that has changed is written out at shutdown, plus a compressed backup of all the data in all cached tables.

                • The size and capacity of the data cache for all the CACHED tables is configurable. This makes it possible to allow all the data in CACHED tables to be cached in memory. In this case, speed of access is good, but slightly slower than MEMORY tables.

                • For normal applications it is recommended that MEMORY tables are used for small amounts of data, leaving CACHED tables for large data sets. For special applications in which speed is paramount and a large amount of free memory is available, MEMORY tables can be used for large tables as well

                Large Objects

                JDBC Clobs are supported as columns of the type LONGVARCHAR. JDBC Blobs are supported as columns of the type LONGVARBINARY. When large objects (LONGVARCHAR, LONGVARBINARY, OBJECT) are stored with table definitions that contain several normal fields, it is better to use two tables instead. The first table to contain the normal fields and the second table to contain the large object plus an identity field. Using this method has two benefits. (a) The first table can usually be created as a MEMORY table while only the second table is a CACHED table. (b) The large objects can be retrieved individually using their identity, instead of getting loaded into memory for finding the rows during query processing. An example of two tables and a select query that exploits the separation between the two follows:

                CREATE MEMORY TABLE MAINTABLE(MAINID INTEGER, ......);
                CREATE CACHED TABLE LOBTABLE(LOBID INTEGER, LOBDATA LONGVARBINARY);
                SELECT * FROM (SELECT * FROM MAINTABLE <join any other table> WHERE <various conditions apply>) JOIN LOBTABLE ON MAINID=LOBID;

                The inner SELECT finds the required rows without reference to the LOBTABLE and when it has found all the rows, retrieves the required large objects from the LOBTABLE.

                Deployment context

                The files used for storing HSQLDB database data are all in the same directory. New files are always created and deleted by the database engine. Two simple principles must be observed:

                • The Java process running HSQLDB must have full privileges on the directory where the files are stored. This include create and delete privileges.

                • The file system must have enough spare room both for the 'permanent' and 'temporary' files. The default maximum size of the .log file is 200MB. The .data file can grow to up to 8GB. The .backup file can be up to 50% of the .data file. The temporary file created at the time of a SHUTDOWN COMPACT can be equal in size to the .data file.

                Memory and Disk Use

                Memory used by the program can be thought of as two distinct pools: memory used for table data, and memory used for building result sets and other internal operations. In addition, when transactions are used, memory is utilised for storing the information needed for a rollback.

                Since version 1.7.1, memory use has been significantly reduced compared to previous versions. The memory used for a MEMORY table is the sum of memory used by each row. Each MEMORY table row is a Java object that has 2 int or reference variables. It contains an array of objects for the fields in the row. Each field is an object such as Integer, Long, String, etc. In addition each index on the table adds a node object to the row. Each node object has 6 int or reference variables. As a result, a table with just one column of type INTEGER will have four objects per row, with a total of 10 variables of 4 bytes each - currently taking up 80 bytes per row. Beyond this, each extra column in the table adds at least a few bytes to the size of each row.

                The memory used for a result set row has fewer overheads (fewer variables and no index nodes) but still uses a lot of memory. All the rows in the result set are built in memory, so very large result sets may not be possible. In server mode databases, the result set memory is released from the server once the database server has returned the result set. In-process databases release the memory when the application program releases the java.sql.ResultSet object. Server modes require additional memory for returning result sets, as they convert the full result set into an array of bytes which is then transmitted to the client.

                When UPDATE and DELETE queries are performed on CACHED tables, the full set of rows that are affected, including those affected due to ON UPDATE actions, is held in memory for the duration of the operation. This means it may not be possible to perform deletes or updates involving very large numbers of rows of CACHED tables. Such operations should be performed in smaller sets.

                When transactions support is enabled with SET AUTOCOMMIT OFF, lists of all insert, delete or update operations are stored in memory so that they can be undone when ROLLBACK is issued. Transactions that span hundreds of modification to data will take up a lot of memory until the next COMMIT or ROLLBACK clears the list.

                Most JVM implementations allocate up to a maximum amount of memory (usually 64 MB by default). This amount is generally not adequate when large memory tables are used, or when the average size of rows in cached tables is larger than a few hundred bytes. The maximum amount of allocated memory can be set on the java ... command line that is used for running HSQLDB. For example, with Sun JVM version 1.3.0 the parameter -Xmx256m increases the amount to 256 MB.

                1.8.0 uses a fast cache for immutable objects such as Integer or String that are stored in the database. In most circumstances, this reduces the memory footprint still further as fewer copies of the most frequently-used objects are kept in memory.

                Cache Memory Allocation

                With CACHED tables, the data is stored on disk and only up to a maximum number of rows are held in memory at any time. The default is up to 3*16384 rows. The hsqldb.cache_scale database property can be set to alter this amount. As any random subset of the rows in any of the CACHED tables can be held in the cache, the amount of memory needed by cached rows can reach the sum of the rows containing the largest field data. For example if a table with 100,000 rows contains 40,000 rows with 1,000 bytes of data in each row and 60,000 rows with 100 bytes in each, the cache can grow to contain nearly 50,000 rows, including all the 40,000 larger rows.

                An additional property, hsqldb.cache_size_scale can be used in conjunction with the hsqldb.cache_scale property. This puts a limit in bytes on the total size of rows that are cached. When the default values is used for both properties, the limit on the total size of rows is approximately 50MB. (This is the size of binary images of the rows and indexes. It translates to more actual memory, typically 2-4 times, used for the cache because the data is represented by Java objects.)

                If memory is limited, the hsqldb.cache_scale or hsqldb.cache_size_scale database properties can be reduced. In the example above, if the hsqldb.cache_size_scale is reduced from 10 to 8, then the total binary size limit is reduced from 50MB to 12.5 MB. This will allow the number of cached rows to reach 50,000 small rows, but only 12,500 of the larger rows.

                Managing Database Connections

                In all running modes (server or in-process) multiple connections to the database engine are supported. In-process (standalone) mode supports connections from the client in the same Java Virtual Machine, while server modes support connections over the network from several different clients.

                Connection pooling software can be used to connect to the database but it is not generally necessary. With other database engines, connection pools are used for reasons that may not apply to HSQLDB.

                • To allow new queries to be performed while a time-consuming query is being performed in the background. This is not possible with HSQLDB 1.8.0 as it blocks while performing the first query and deals with the next query once it has finished it. This capability is under development and will be introduced in a future version.

                • To limit the maximum number of simultaneous connections to the database for performance reasons. With HSQLDB this can be useful only if your application is designed in a way that opens and closes connections for each small task.

                • To control transactions in a multi-threaded application. This can be useful with HSQLDB as well. For example, in a web application, a transaction may involve some processing between the queries or user action across web pages. A separate connection should be used for each HTTP session so that the work can be committed when completed or rolled back otherwise. Although this usage cannot be applied to most other database engines, HSQLDB is perfectly capable of handling over 100 simultaneous HTTP sessions as individual JDBC connections.

                An application that is not both multi-threaded and transactional, such as an application for recording user login and logout actions, does not need more than one connection. The connection can stay open indefinitely and reopened only when it is dropped due to network problems.

                When using an in-process database with versions prior to 1.7.2 the application program had to keep at least one connection to the database open, otherwise the database would have been closed and further attempts to create connections could fail. This is not necessary since 1.7.2, which does not automatically close an in-process database that is opened by establishing a connection. An explicit SHUTDOWN command, with or without an argument, is required to close the database. In version 1.8.0 a connection property can be used to revert to the old behaviour.

                When using a server database (and to some extent, an in-process database), care must be taken to avoid creating and dropping JDBC Connections too frequently. Failure to observe this will result in unsuccessful connection attempts when the application is under heavy load.

                Upgrading Databases

                Any database not produced with the release version of HSQLDB 1.8.0 must be upgraded to this version. This includes databases created with the RC versions of 1.8.0. The instructions under the Upgrading Using the SCRIPT Command section should be followed in all cases.

                Once a database is upgraded to 1.8.0, it can no longer be used with Hypersonic or previous versions of HSQLDB.

                There may be some potential legacy issues in the upgrade which should be resolved by editing the .script file:

                • Version 1.8.0 does not accept duplicate names for indexes that were allowed before 1.7.2.

                • Version 1.8.0 does not accept duplicate names for table columns that were allowed before 1.7.0.

                • Version 1.8.0 does not create the same type of index for foreign keys as versions before 1.7.2.

                • Version 1.8.0 does not accept table or column names that are SQL identifiers without double quoting.

                Upgrading Using the SCRIPT Command

                To upgrade from 1.7.2 or 1.7.3 to 1.8.0, simply issue the SET SCRIPTFORMAT TEXT and SHUTDOWN SCRIPT commands with the old version, then open with the new version of the engine. The upgrade is then complete.

                To upgrade from older version database files (1.7.1 and older) that do not contain CACHED tables, simple SHUTDOWN with the older version and open with the new version. If there is any error in the .script file, try again after editing the .script file.

                To upgrade from older version database files (1.7.1 and older) that contain CACHED tables, use the SCRIPT procedure below. In all versions of HSQLDB and Hypersonic 1.43, the SCRIPT 'filename' command (used as an SQL query) allows you to save a full record of your database, including database object definitions and data, to a file of your choice. You can export a script file using the old version of the database engine and open the script as a database with 1.8.0.

                Procedure 5.1. Upgrade Using SCRIPT procedure

                1. Open the original database in the old version of DatabaseManager

                2. Issue the SCRIPT command, for example SCRIPT 'newversion.script' to create a script file containing a copy of the database.

                3. Use the 1.8.0 version of DatabaseManager to create a new database, in this example 'newversion' in a different directory.

                4. SHUTDOWN this database.

                5. Copy the newversion.script file from step 2 over the file of the same name for the new database created in 4.

                6. Try to open the new database using DatabaseManager.

                7. If there is any inconsistency in the data, the script line number is reported on the console and the opening process is aborted. Edit and correct any problems in the newversion.script before attempting to open again. Use the guidelines in the next section (Manual Changes to the .script File). Use a programming editor that is capable of handling very large files and does not wrap long lines of text.

                Manual Changes to the .script File

                In 1.8.0 the full range of ALTER TABLE commands is available to change the data structures and their names. However, if an old database cannot be opened due to data inconsistencies, or the use of index or column names that are not compatible with 1.8.0, manual editing of the SCRIPT file can be performed.

                The following changes can be applied so long as they do not affect the integrity of existing data.

                • Names of tables, columns and indexes can be changed.

                • CREATE UNIQUE INDEX ... to CREATE INDEX ... and vice versa

                  A unique index can always be converted into a normal index. A non-unique index can only be converted into a unique index if the table data for the column(s) is unique in each row.

                • NOT NULL

                  A not-null constraint can always be removed. It can only be added if the table data for the column has no null values.

                • PRIMARY KEY

                  A primary key constraint can be removed or added. It cannot be removed if there is a foreign key referencing the column(s).

                • COLUMN TYPES

                  Some changes to column types are possible. For example an INTEGER column can be changed to BIGINT, or DATE, TIME and TIMESTAMP columns can be changed to VARCHAR.

                After completing the changes and saving the modified *.script file, you can open the database as normal.

                Backing Up Databases

                The data for each database consists of up to 5 files in the same directory. The endings are *.properties, *.script, *.data, *.backup and *.log (a file with the *.lck ending is used for controlling access to the database and should not be backed up). These should be backed up together. The files can be backed up while the engine is running but care should be taken that a CHECKPOINT or SHUTDOWN operation does not take place during the backup. It is more efficient to perform the backup immediately after a CHECKPOINT. The *.data file can be excluded from the backup. In this case, when restoring, a dummy *.data file is needed which can be an empty, 0 length file. The engine will expand the *.backup file to replace this dummy file if the backup is restored. If the *.data file is not backed up, the *.properties file may have to be modified to ensure it contain modified=yes instead of modified=no prior to restoration. If a backup immediately follows a checkpoint, then the *.log file can also be excluded, reducing the significant files to *.properties, *.script and *.backup. Normal backup methods, such as archiving the files in a compressed bundle can be used.

                Chapter 6. Text Tables

                Text Tables as a Standard Feature of Hsqldb

                Bob Preston

                HSQLDB Development Group

                Fred Toussi

                HSQLDB Development Group

                Copyright 2002-2005 Bob Preston and Fred Toussi. Permission is granted to distribute this document without any alteration under the terms of the HSQLDB license. Additional permission is granted to the HSQLDB Development Group to distribute this document with or without alterations under the terms of the HSQLDB license.

                $Date: 2007/08/28 13:19:09 $

                Text Table support for HSQLDB was originally developed by Bob Preston independently from the Project. Subsequently Bob joined the Project and incorporated this feature into version 1.7.0, with a number of enhancements, especially the use of conventional SQL commands for specifying the files used for Text Tables.

                In a nutshell, Text Tables are CSV or other delimited files treated as SQL tables. Any ordinary CSV or other delimited file can be used. The full range of SQL queries can be performed on these files, including SELECT, INSERT, UPDATE and DELETE. Indexes and unique constraints can be set up, and foreign key constraints can be used to enforce referential integrity between Text Tables themselves or with conventional tables.

                HSQLDB with Text Table support is the only comprehensive solution that employs the power of SQL and the universal reach of JDBC to handle data stored in text files and will have wide-ranging use way beyond the currently established Java realm of HSQLDB.

                Goals of the Implementation

                1. We aimed to finalise the DDL for Text Tables so that future releases of HSQLDB use the same DDL scripts.

                2. We aimed to support Text Tables as GLOBAL TEMPORARY or GLOBAL BASE tables in the SQL domain.

                The Implementation

                Definition of Tables

                Text Tables are defined similarly to conventional tables with the added TEXT keyword:

                    CREATE TEXT TABLE <tablename> (<column definition> [<constraint definition>])

                In addition, a SET command specifies the file and the separator character that the Text table uses:

                    SET TABLE <tablename> SOURCE <quoted_filename_and_options> [DESC]

                Text Tables cannot be created in memory-only databases (databases that have no script file).

                Scope and Reassignment

                • A Text table without a file assigned to it is READ ONLY and EMPTY.

                • A Temporary Text table has the scope and the lifetime of the SQL session (a JDBC Connection).

                • Reassigning a Text Table definition to a new file has implications in the following areas:

                  1. The user is required to be an administrator.

                  2. Existing transactions are committed at this point.

                  3. Constraints, including foreign keys referencing this table, are kept intact. It is the responsibility of the administrator to ensure their integrity.

                  From version 1.7.2 the new source file is scanned and indexes are built when it is assigned to the table. At this point any violation of NOT NULL, UNIQUE or PRIMARY KEY constrainst are caught and the assignment is aborted. However, foreign key constraints are not checked at the time of assignment or reassignment of the source file.

                Null Values in Columns of Text Tables

                This has changed since 1.7.2 to support both null values and empty strings.

                • Empty fields are treated as NULL. These are fields where there is nothing or just spaces between the separators.

                • Quoted empty strings are treated as empty strings.

                Configuration

                The default field separator is a comma (,). A different field separator can be specified within the SET TABLE SOURCE statement. For example, to change the field separator for the table mytable to a vertical bar, place the following in the SET TABLE SOURCE statement, for example:

                    SET TABLE mytable SOURCE "myfile;fs=|"

                Since HSQLDB treats CHAR's, VARCHARs, and LONGVARCHARs the same, the ability to assign different separators to the latter two is provided. When a different separator is assigned to a VARCHAR or LONGVARCHAR field, it will terminate any CSV field of that type. For example, if the first field is CHAR, and the second field LONGVARCHAR, and the separator fs has been defined as the pipe (|) and vs as the period (.) then the data in the CSV file for a row will look like:

                    First field data|Second field data.Third field data

                The following example shows how to change the default separator to the pipe (|), VARCHAR separator to the period (.) and the LONGVARCHAR separator to the tilde (~). Place the following within the SET TABLE SOURCE statement, for example:

                    SET TABLE mytable SOURCE "myfile;fs=|;vs=.;lvs=~"

                HSQLDB also recognises the following special indicators for separators:

                special indicators for separators

                \semi

                semicolon

                \quote

                qoute

                \space

                space character

                \apos

                apostrophe

                \n

                newline - Used as an end anchor (like $ in regular expressions)

                \r

                carriage return

                \t

                tab

                \\

                backslash

                \u####

                a Unicode character specified in hexadecimal

                Furthermore, HSQLDB provides csv file support with three additional boolean options: ignore_first, quoted and all_quoted. The ignore_first option (default false) tells HSQLDB to ignore the first line in a file. This option is used when the first line of the file contains column headings. The all_quoted option (default false) tells the program that it should use quotes around all character fields when writing to the source file. The quoted option (default true) uses quotes only when necessary to distinguish a field that contains the separator character. It can be set to false to prevent the use of quoting altogether and treat quote characters as normal characters. These options may be specified within the SET TABLE SOURCE statement:

                    SET TABLE mytable SOURCE "myfile;ignore_first=true;all_quoted=true"

                When the default options all_quoted= false and quoted=true are in force, fields that are written to a line of the csv file will be quoted only if they contain the separator or the quote character. The quote character is doubled when used inside a string. When all_quoted=false and quoted=false the quote character is not doubled. With this option, it is not possible to insert any string containing the separator into the table, as it would become impossible to distinguish from a separator. While reading an existing data source file, the program treats each individual field separately. It determines that a field is quoted only if the first character is the quote character. It interprets the rest of the field on this basis.

                The character encoding for the source file is ASCII by default. To support UNICODE or source files preprared with different encodings this can be changed to UTF-8 or any other encoding. The default is encoding=ASCII and the option encoding=UTF-8 or other supported encodings can be used.

                Finally, HSQLDB provides the ability to read a text file from the bottom up and making them READ ONLY, by placing the keyword "DESC" at the end of the SET TABLE SOURCE statement:

                    SET TABLE mytable SOURCE "myfile" DESC

                This feature provides functionality similar to the Unix tail command, by re-reading the file each time a select is executed. Using this feature sets the table to read-only mode. Afterwards, it will no longer be possible to change the read-only status with SET TABLE <tablename> READONLY TRUE.

                Text table source files are cached in memory. The maximum number of rows of data that are in memory at any time is controlled by the textdb.cache_scale property. The default value for textdb.cache_scale is 10 and can be changed by setting the property in the .properties file for the database. The number of rows in memory is calculated as 3*(2**scale), which translates to 3072 rows for the default textdb.cache_scale setting (10). The property can also be set for individual text tables:

                    SET TABLE mytable SOURCE "myfile;ignore_first=true;all_quoted=true;cache_scale=12"

                Disconnecting Text Tables

                The following describes behaviour present in 1.8.0.8 and later.

                Text tables may be disconnected from their underlying data source, i.e. the text file.

                You can explicitly disconnect a text table from its file by issuing the following statement:

                  SET TABLE mytable SOURCE OFF

                Subsequently, mytable will be empty and read-only. However, the data source description will be preserved, and the table can be re-connected to it with

                  SET TABLE mytable SOURCE ON

                When a database is opened, if the source file for an existing text table is missing the table remains disconnected from its data source, but the source sescription is preserved. This allows the missing source file to be added to the directory and the table re-connected to it with the above command.

                Text File Issues

                Text File Issues

                • File locations are restricted to below the directory that contains the database, unless the textdb.allow_full_path property is set true in the database properties file.

                • Blank lines are allowed anywhere in the text file, and are ignored.

                • The file location for a text table created with

                      SELECT <select list> INTO TEXT <tablename> FROM

                  is the directory that contains the database and the file name is based on the table name. The table name is converted into the file name by replacing all the non-alphanumeric characters with the underscore character, conversion into lowercase, and adding the ".csv" suffix.

                • It is possible to define a primay key or identity column for text tables.

                • When a table source file is used with the ignore_first=true option, the first, ignored line is replaced with a blank line after a SHUTDOWN COMPACT.

                • An existing table source file may include CHARACTER fields that do not begin with the quote character but contain instances of the quote character. These fields are read as literal strings. Alternatively, if any field begins with the quote character, then it is interpreted as a quoted string that should end with the quote character and any instances of the quote character within the string is doubled. When any field containing the quote character or the separator is written out to the source file by the program, the field is enclosed in quote character and any instance of the quote character inside the field is doubled.

                • Inserts or updates of CHARACTER type field values are allowed with strings that contains the linefeed or the carriage return character. This feature is disabled when both quoted and all_quoted properties are false.

                • ALTER TABLE commands that add or drop columns are not supported with non-empty text tables.

                Text File Global Properties

                Complete list of supported global properties in *.properties files

                • textdb.fs

                • textdb.lvs

                • textdb.quoted

                • textdb.all_quoted

                • textdb.ignore_first

                • textdb.encoding

                • textdb.cache_scale

                • textdb.allow_full_path

                Importing a Text Table file in to a Traditional (non-Text Table) Table

                The directory src/org/hsqldb/sample in your HSQLDB distibution contains a file named load_binding_lu.sql. This is a working SQL file which imports a pipe-delimited text file from the database's file directory into an existing normal table. You can edit a copy of this file and use it directly with SqlTool, or you can use the SQL therein as a model (using any SQL client at all).

                Chapter 7. TLS

                TLS Support (a.k.a. SSL)

                Blaine Simpson

                HSQLDB Development Group

                $Date: 2006/07/27 21:08:21 $

                The instructions in this document are liable to change at any time. In particular, we will be changing the method to supply the server-side certificate password.

                Requirements

                Hsqldb TLS Support Requirements

                • Sun Java 2.x and up. (This is probably possible with IBM's Java, but I don't think anybody has attempted to run HSQLDB with TLS under IBM's Java, and I'm sure that nobody in the HSQLDB Development Group has documented how to set up the environment).

                • If Java 2.x or 3.x, then you will need need to install JSSE. Your server and/or client will start up much slower than that of Java 4.x users. Client-side users will not be able to use the https: JDBC protocol (because the https protocol handler is not implemented in 2.x/3.x Java JSSE; if there is demand, we could work around this).

                • A JKS keystore containing a private key, in order to run a server.

                • If you are running the server side, then you'll need to run a HSQLDB Server or WebServer. It doesn't matter if the underlying database instances are new, and it doesn't matter if you are making a new Server configuration or encrypting an existing Server configuration. (You can turn encryption on and off at will).

                • You need a HSQLDB jar file that was built with JSSE present. If you got your HSQLDB 1.7.2 distribution from us, you are all set, because we build with Java 1.4 (which contains JSSE). If you build your own jar file with Java 1.3, make sure to install JSSE first.

                Encrypting your JDBC connection

                At this time, only 1-way, server-cert encryption is tested.

                Client-Side

                Just use one of the following protocol prefixes.

                Hsqldb TLS URL Prefixes

                • jdbc:hsqldb:hsqls://

                • jdbc:hsqldb:https://

                At this time, the latter will only work for clients running with Java 1.4.

                If the server you wish to connect to is using a certificate approved by your default trust keystores, then there is nothing else to do. If not, then you need to tell Java to "trust" the server cert. (It's a slight over-simplification to say that if the server certificate was purchased, then you are all set; if somebody "signed their own" certificate by self-signing or using a private ca certificate, then you need to set up trust).

                First, you need to obtain the cert (only the "public" part of it). Since this cert is passed to all clients, you could obtain it by writing a java client that dumps it to file, or perhaps by using openssl s_client. Since in most cases, if you want to trust a non-commercial cert, you probably have access to the server keystore, I'll show an example of how to get what you need from the server-side JKS keystore.

                You may already have an X509 cert for your server. If you have a server keystore, then you can generate a X509 cert like this.

                Example 7.1. Exporting certificate from the server's keystore

                    keytool -export -keystore server.store -alias existing_alias -file server.cer
                In this example, server.cer is the X509 certificate that you need for the next step.

                Now, you need to add this cert to one of the system trust keystores or to a keystore of your own. See the Customizing Stores section in JSSERefGuide.html to see where your system trust keystores are. You can put private keystores anywhere you want to. The following command will add the cert to an existing keystore, or create a new keystore if client.store doesn't exist.

                Example 7.2. Adding a certificate to the client keystore

                keytool -import -trustcacerts -keystore trust.store -alias new_alias -file server.cer

                If you are making a new keystore, you probably want to start with a copy of your system default keystore which you can find somewhere under your JAVA_HOME directory (typically jre/lib/security/cacerts for a JDK, but I forget exactly where it is for a JRE).

                Unless your OS can't stop other people from writing to your files, you probably do not want to set a password on the trust keystore.

                If you added the cert to a system trust store, then you are finished. Otherwise you will need to specify your custom trust keystore to your client program. The generic way to set the trust keystore is to set the sytem property javax.net.ssl.trustStore every time that you run your client program. For example

                Example 7.3. Specifying your own trust store to a JDBC client

                    java -Djavax.net.ssl.trustStore=/home/blaine/trust.store -jar /path/to/hsqldb.jar dest-urlid
                This example runs the program SqlTool. SqlTool has built-in TLS support, however, so, for SqlTool you can set truststore on a per-urlid basis in the SqlTool configuration file.

                N.b. The hostname in your database URL must match the Common Name of the server's certificate exactly. That means that if a site certificate is admc.com, you can not use jdbc:hsqldb:hsqls://localhost or jdbc:hsqldb:hsqls://www.admc.com:1100 to connect to it.

                If you want more details on anything, see JSSERefGuide.html on Sun's site, or in the subdirectory docs/guide/security/jsse of your Java SE docs.

                Server-Side

                Get yourself a JKS keystore containing a private key. Then set the system property javax.net.ssl.keyStore to the path to that file, and javax.net.ssl.keyStorePassword to the password of the keystore (and to the private key-- they have to be the same).

                Example 7.4. Running an Hsqldb server with TLS encryption

                    java -Djavax.net.ssl.keyStorePassword=secret  \
                        -Djavax.net.ssl.keyStore=/usr/hsqldb/db/db3/server.store  \
                        -cp /path/to/hsqldb.jar org.hsqldb.Server

                (This is a single command that I have broken into 2 lines using my shell's \ line-continuation feature. In this example, I'm using a server.properties file so that I don't need to give arguments to specify database instances or the server endpoint).

                Caution

                Specifying a password on the command-line is definitely not secure. It's really only appropriate when untrusted users do not have any access to your computer.

                If there is any user demand, we will have a more secure way to supply the password before long.

                JSSE

                If you are running Java 4.x, then you are all set. Java 1.x users, you are on your own (Sun does not provide a JSSE that will work with 1.x). Java 2.x and 3.x users continue...

                Go to http://java.sun.com/products/jsse/index-103.html. If you agree to the terms and meet the requirements, download the domestic or global JSSE software. All you need from the software distro is the three jar files. If you have a JDK installation, then move the 3 jar files into the directory $JAVA_HOME/jre/lib/ext. If you have a JRE installation, then move the 3 jar files into the directory $JAVA_HOME/lib/ext.

                Pretty painless.

                Making a Private-key Keystore

                There are two main ways to do this. Either you can use a certificate signed by a certificate authority, or you can make your own. One thing that you need to know in both cases is, the Common Name of the cert has to be the exact hostname that JDBC clients will use in their database URL.

                CA-Signed Cert

                I'm not going to tell you how to get a CA-signed SSL certificate. That is well documented at many other places.

                Assuming that you have a standard pem-style private key certificate, here's how you can use openssl and the program DERImport to get it into a JKS keystore.

                Because I have spent a lot of time on this document already, I am just giving you an example.

                Example 7.5. Getting a pem-style private key into a JKS keystore

                openssl pkcs8 -topk8 -outform DER -in Xpvk.pem -inform PEM -out Xpvk.pk8 -nocrypt
                
                openssl x509 -in Xcert.pem -out Xcert.der -outform DER
                
                java DERImport new.keystore NEWALIAS Xpvk.pk8 Xcert.der

                Important

                Make sure to set the password of the key exactly the same as the password for the keystore!

                You need the program DERImport.class of course. Do some internet searches to find DERImport.java or DERImport.class and download it.

                If DERImport has become difficult to obtain, I can write a program to do the same thing-- just let me know.

                Non-CA-Signed Cert

                Run man keytool or see the Creating a Keystore section of JSSERefGuide.html.

                Automatic Server or WebServer startup on UNIX

                If you are on UNIX and want to automatically start and stop a Server or WebServer running with encryption, follow the instructions in the UNIX Quick Start chapter, and remember to make the init script configuration file readable only to root and to set the variables TLS_PASSWORD and TLS_KEYSTORE.

                If you are using a private server certificate, make sure to also set the trust store filepath as shown in the sample init script configuration file.

                The cautionary warning above still applies. The password will be visible to any minimally competent local UNIX user who wants to see it.

                Chapter 8. SqlTool

                SqlTool Manual

                Blaine Simpson

                HSQLDB Development Group

                $Date: 2007/08/09 23:53:01 $

                Purpose, Coverage, Changes in Behavior

                Purpose, Coverage, Changes in Behavior

                This document explains how to use SqlTool, the main purpose of which is to read your SQL text file or stdin, and execute the SQL commands therein against a JDBC database. There are also a great number of features to facilitate both interactive use and automation. The following paragraphs explain in a general way why SqlTool is better than any existing tool for text-mode interactive SQL work, and for automated SQL tasks. Two important benefits which SqlTool shares with other pure Java JDBC tools is that users can use a consistent interface and syntax to interact with a huge variety of databases-- any database which supports JDBC; plus the tool itself runs on any Java platform. Instead of using isql for Sybase, psql for Postgresql, Sql*plus for Oracle, etc., you can use SqlTool for all of them. As far as I know, SqlTool is the only production-ready, pure Java, command-line, generic JDBC client. Several databases come with a command-line client with limited JDBC abilities (usually designed for use with their specific database).

                SqlTool is purposefully not a Gui tool like Toad or DatabaseManager. There are many use cases where a Gui SQL tool would be better. Where automation is involved in any way, you really need a text client to at least test things properly and usually to prototype and try things out. A command-line tool is really better for executing SQL scripts, any form of automation, direct-to-file fetching, and remote client usage. To clarify this last, if you have to do your SQL client work on a work server on the other side of a VPN connection, you will quickly appreciate the speed difference between text data transmission and graphical data transmission, even if using VNC or Remote Console. Another case would be where you are doing some repetitive or very structured work where variables or language features would be useful. Gui proponents may disagree with me, but scripting (of any sort) is more efficient than repetitive copy & pasting with a Gui editor. SqlTool starts up very quickly, and it takes up a tiny fraction of the RAM required to run a comparably complex Gui like Toad.

                SqlTool is superior for interactive use because over many years it has evolved lots of features proven to be efficient for day-to-day use. Three concise help commands (\?, :?, and *?) list all available commands of the corresponding type. SqlTool doesn't support up-arrow or other OOB escapes (due to basic Java I/O limitations), but it more than makes up for this limitation with aliases, user variables, command-line history and recall, and command-line editing with extended Perl/Java regular expressions. The \d commands deliver JDBC metadata information as consistently as possible (in several cases, database-specific work-arounds are used to obtain the underlying data even though the database doesn't provide metadata according to the JDBC specs). Unlike server-side language features, the same feature set works for any database server. Database access details may be supplied on the command line, but day-to-day users will want to centralize JDBC connection details into a single, protected RC file. You can put connection details (username, password, URL, and other optional settings) for scores of target databases into your RC file, then connect to any of them whenever you want by just giving SqlTool the ID ("urlid") for that database. When you Execute SqlTool interactively, it behaves by default exactly as you would want it to. If errors occur, you are given specific error messages and you can decide whether to roll back your session. You can easily change this behavior to auto-commit, exit-upon-error, etc., for the current session or for all interactive invocations. You can import or export delimiter-separated-value files.

                When you Execute SqlTool with a SQL script, it behaves by default exactly as you would want it to. If any error is encountered, the connection will be rolled back, then SqlTool will exit with an error exit value. If you wish, you can detect and handle error (or other) conditions yourself. For scripts expected to produce errors (like many scripts provided by database vendors), you can have SqlTool continue-upon-error. For SQL script-writers, you will have access to portable scripting features which you've had to live without until now. You can use variables set on the command line or in your script. You can handle specific errors based on the output of SQL commands or of your variables. You can chain SQL scripts, invoke external programs, dump data to files, use prepared statements, Finally, you have a procedural language with if, foreach, while, continue, and break statements.

                Platforms and SqlTool versions covered

                SqlTool runs on any Java 1.4 or later platform. I haven't run it with a non-Sun JVM in years (like Blackdown, IBM, JRockit, etc.), but I've had no reports of problems with them, and SqlTool uses none of the Sun-proprietary classes directly. Some of the examples below use quoting which works exactly as-is for any Bourne-compatible UNIX shell. (Only line-continuation would need to be changed for C-compatible UNIX shells). I have not yet tested these commands on Windows, and I doubt whether the quoting will work just like this (though it is possible). SqlTool is still a very useful tool even if you have no quoting capability at all.

                If you are using SqlTool from a HSQLDB distribution before version 1.8.0.8 final, you should use the documentation with that distribution, because this manual documents many new features, several significant changes to interactive-only commands, and a few changes effecting backwards-compatibility (see next section about that). This document is now updated for the current versions of SqlTool and SqlFile at the time I am writing this (versions 333 and 354 correspondingly, SqlFile is the class which does most of the work for SqlTool). Therefore, if you are using a version of SqlTool or SqlFile that is more than a couple revisions greater, you should find a newer version of this document. (The imprecision is due to content-independent revision increments at build time, and the likelihood of one or two behavior-independent bug fixes after public releases). The startup banner will report both versions when you run SqlTool interactively. (Dotted version numbers of SqlTool and SqlFile are older than 333 and 354).

                This guide covers SqlTool bundled with series 1.8 and 1.9 of HSQLDB. [1]

                Functional Changes

                This section lists changes to SqlTool since the last major release of HSQLDB which may effect the portability of SQL scripts. For this revision of this document, this list consists of script-impacting changes made to SqlTool after the final 1.8.0.0 HSQLDB release. I'm specifically not listing changes to interactive-only commands (":" commands, with one legacy exception which is listed below), since these commands can't be used in SQL scripts; and I'm specifically not listing backwards-compatible feature additions and enhancements. The reason for limiting the change list to only portability- impacting changes is that a list of all enhancements since just 1.8.0.0 would be pages long.

                • SqlTool now consistently outputs \r\n line breaks when on \r\n-linebreak platforms, like Windows. This includes output written to stdout, \w files, and \o files.
                • Time type values are always output with the date as well as the time. This was required in order to produce consistent output for the wildly varying formats provided by different database vendors.
                • DSV input now takes JDBC Timestamp format with date and optionally time of day.
                • The command ":;" is now strictly an interactive command. If you want to repeat a command in an SQL scripts, just repeat the exact text of the command. Non-interactive use now has no dependency on command history.
                • The command ":w" has replace the command \w. Unlike writing "output" to a file with \w, :w is used to write SQL "commands", and this is an interactive feature.
                • Shell scripts using raw mode (e.g. PL/SQL scripts) must terminate the raw code with a line containing ".;", which will also send the code to the database for execution. (The old "." command has been changed to ":." to make it very clear that the command is now an interactive command).
                • The --sql argument will never automatically append a semicolon to the text you provide. If you want to execute a command ending with a semi-- then type a semi.

                Although it doesn't effect scripts, I will mention a significant recent change to interactive commands. Special and PL commands are not stored to the edit buffer and to command history, so they can be recalled and edited just like SQL commands. Now, only edit/history : commands are not stored to the buffer and history.

                The Bare Minimum You Need to Know to Run SqlTool

                Warning

                If you are using an Oracle database server, it will commit your current transaction if you cleanly disconnect, regardless of whether you have set auto-commit or not. This will occur if you exit SqlTool (or any other client) in the normal way (as opposed to killing the process or using Ctrl-C, etc.). This is mentioned in this section only for brevity, so I don't need to mention it in the main text in the many places where auto-commit is discussed. This behavior has nothing to do with SqlTool. It is a quirk of Oracle.

                If you want to use SqlTool, then you either have an SQL text file, or you want to interactively type in SQL commands. If neither case applies to you, then you are looking at the wrong program.

                Procedure 8.1. To run SqlTool...

                1. Copy the file sqltool.rc from the directory sample [1] of your HSQLDB distribution to your home directory and secure access to it if your computer is accessible to anybody else (most likely from the network). This file will work as-is for a Memory Only database instance; or if your target is a HSQLDB Server running on your local computer with default settings and the password for the "sa" account is blank (the sa password is blank when new HSQLDB database instances are created). Edit the file if you need to change the target Server URL, username, password, character set, JDBC driver, or TLS trust store as documented in the RC File Authentication Setup section. (You could, alternatively, use the --inlineRc command-line switch to specify your connection parameters as documented in the Using Inline RC Authentication section).

                2. Find out where your hsqldb.jar file resides. It typically resides at HSQLDB_HOME/lib/hsqldb.jar where HSQLDB_HOME is the base directory of your HSQLDB software installation. For this reason, I'm going to use "$HSQLDB_HOME/lib/hsqldb.jar" as the path to hsqldb.jar for my examples, but understand that you need to use the actual path to your own hsqldb.jar file.

                3. Run

                      java -jar $HSQLDB_HOME/lib/hsqldb.jar --help
                  to see what command-line arguments are available. Note that you don't need to worry about setting the CLASSPATH when you use the -jar switch to java. Assuming that you set up your SqlTool RC file at the default location and you want to use the HSQLDB JDBC driver, you will want to run something like
                      java -jar $HSQLDB_HOME/lib/hsqldb.jar mem
                  for interactive use, or
                      java -jar $HSQLDB_HOME/lib/hsqldb.jar --sql 'SQL statement;' mem
                  or
                      java -jar $HSQLDB_HOME/lib/hsqldb.jar mem filepath1.sql...
                  where mem is an urlid, and the following arguments are paths to text SQL files. For the filepaths, you can use whatever wildcards your operating system shell supports.

                  The urlid mem in these commands is a key into your RC file, as explained in the RC File Authentication Setup section. Since this is a Memory Only database, you can use SqlTool with this urlid immediately with no database setup whatsoever (however, you can't persist any changes that you make to this database). The sample sqltool.rc file also defines the urlid "localhost-sa" for a local HSQLDB Server. At the end of this section, I explain how you can load some sample data to play with, if you want to.

                Important

                SqlTool does not commit SQL changes by default. This leaves it to the user's disgression whether to commit or rollback their modifications. Remember to either run \= to commit before quitting SqlTool (most databases also support the SQL command commit;, or use the --autoCommit command-line switch.

                If you put a file named auto.sql into your home directory, this file will be executed automatically every time that you run SqlTool interactively and without the --noAutoFile switch.

                To use a JDBC Driver other than the HSQLDB driver, you can't use the -jar switch because you need to modify the classpath. You must add the hsqldb.jar file and your JDBC driver classes to your classpath, and you must tell SqlTool what the JDBC driver class name is. The latter can be accomplished by either using the "--driver" switch, or setting "driver" in your config file. The RC File Authentication Setup section. explains the second method. Here's an example of the first method (after you have set the classpath appropriately).

                java org.hsqldb.util.SqlTool --driver oracle.jdbc.OracleDriver urlid

                Tip

                If the tables of query output on your screen are all messy because of lines wrapping, the best and easiest solution is usually to resize your terminal emulator window to make it wider. (With some terms you click & drag the frame edges to resize, with others you use a menu system where you can enter the number of columns).

                If you are using SqlTool to connect to a HSQLDB network server or any non-HSQLDB database, you may prefer to use the jar file hsqltool.jar or hsqldbutil.jar instead of hsqldb.jar. These alternative jar files contain all of SqlTool without stuff you don't need, but you will have to follow a simple procedure to generate these jars. See the Using hsqltool.jar and hsqldbutil.jar section.

                Non-displayable Types

                There are many SQL types which SqlTool (being a text-based program) can't display properly. This includes the SQL types BLOB, JAVA_OBJECT, STRUCT, and OTHER. When you run a query that returns any of these, SqlTool will save the very first such value obtained to the binary buffer and will not display any output from this query. You can then save the binary value to a file, as explained in the Storing and retrieving binary files section.

                There are other types, such as BINARY, which JDBC can make displayable (by using ResultSet.getString()), but which you may very well want to retrieve in raw binary format. You can use the \b command to retrieve any-column-type-at-all in raw binary format (so you can later store the value to a binary file).

                Another restriction which all text-based database clients have is the practical inability for the user to type in binary data such as photos, audio streams, and serialized Java objects. You can use SqlTool to load any binary object into a database by telling SqlTool to get the insert/update datum from a file. This is also explained in the Storing and retrieving binary files section.

                Desktop shortcuts

                Desktop shortcuts and quick launch icons are useful, especially if you often run SqlTool with the same set of arguments. It's really easy to set up several of them-- one for each way that you invoke SqlTool (i.e., each one would start SqlTool with all the arguments for one of your typical startup needs). One typical setup is to have one shortcut for each database account which you normally use (use a different urlid argument in each shortcut's Target specification.

                Desktop icon setup varies depending on your Desktop manager, of course. I'll explain how to set up a SqlTool startup icon in Windows XP. Linux and Mac users should be able to take it from there, since it's easier with the common Linux and Mac desktops.

                Procedure 8.2. Creating a Desktop Shortcut for SqlTool

                1. Right click in the main Windows background.

                2. New

                3. Shortcut

                4. Browse

                5. Navigate to where your good JRE lives. For recent Sun JRE's, it installs to C:\Program Files\Java\*\bin by default (the * will be a JDK or JRE name and version number).

                6. Select java.exe.

                7. OK

                8. Next

                9. Enter any name

                10. Finish

                11. Right click the new icon.

                12. Properties

                13. Edit the Target field.

                14. Leave the path to java.exe exactly as it is, including the quotes, but append to what is there. Beginning with a space, enter the command-line that you want run.

                15. Change Icon... to a pretty icon.

                16. If you want a quick-launch icon instead of (or in addition to) a desktop shortcut icon, click and drag it to your quick launch bar. (You may or may not need to edit the Windows Toolbar properties to let you add new items).

                Loading sample data

                If you want some sample database objects and data to play with, execute the sampledata.sql SQL file. sampledata.sql resides in the sample directory of your HSQLDB distribution [1]. To separate the sample data from your regular data, you can put it into its own schema by running this before you import:

                    CREATE SCHEMA sampledata AUTHORIZATION dba;
                    SET SCHEMA sampledata;
                Run it like this from an SqlTool session
                \i HSQLDB_HOME/sample/sampledata.sql
                where HSQLDB_HOME is the base directory of your HSQLDB software installation [1].

                For memory-only databases, you'll need to run this every time that you run SqlTool. For other (persistent) databases, the data will reside in your database until you drop the tables.

                RC File Authentication Setup

                RC file authentication setup is accomplished by creating a text RC configuration file. In this section, when I say configuration or config file, I mean an RC configuration file. RC files can be used by any JDBC client program that uses the org.hsqldb.util.RCData class-- this includes SqlTool, DatabaseManager, DatabaseManagerSwing. You can use it for your own JDBC client programs too.

                The following sample RC file resides at sample/sqltool.rc in your HSQLDB distribution [1].

                Example 8.1. Sample RC File

                # $Id: sqltool.rc,v 1.22 2007/08/09 03:22:21 unsaved Exp $
                
                # This is a sample RC configuration file used by SqlTool, DatabaseManager,
                # and any other program that uses the org.hsqldb.util.RCData class.
                
                # You can run SqlTool right now by copying this file to your home directory
                # and running
                #    java -jar /path/to/hsqldb.jar mem
                # This will access the first urlid definition below in order to use a 
                # personal Memory-Only database.
                # "url" values may, of course, contain JDBC connection properties, delimited
                # with semicolons.
                
                # If you have the least concerns about security, then secure access to
                # your RC file.
                # See the documentation for SqlTool for various ways to use this file.
                
                # A personal Memory-Only (non-persistent) database.
                urlid mem
                url jdbc:hsqldb:mem:memdbid
                username sa
                password
                
                # A personal, local, persistent database.
                urlid personal
                url jdbc:hsqldb:file:${user.home}/db/personal;shutdown=true
                username sa
                password
                # When connecting directly to a file database like this, you should 
                # use the shutdown connection property like this to shut down the DB
                # properly when you exit the JVM.
                
                # This is for a hsqldb Server running with default settings on your local
                # computer (and for which you have not changed the password for "sa").
                urlid localhost-sa
                url jdbc:hsqldb:hsql://localhost
                username sa
                password
                
                
                
                # Template for a urlid for an Oracle database.
                # You will need to put the oracle.jdbc.OracleDriver class into your 
                # classpath.
                # In the great majority of cases, you want to use the file classes12.zip
                # (which you can get from the directory $ORACLE_HOME/jdbc/lib of any
                # Oracle installation compatible with your server).
                # Since you need to add to the classpath, you can't invoke SqlTool with
                # the jar switch, like "java -jar .../hsqldb.jar..." or 
                # "java -jar .../hsqlsqltool.jar...".
                # Put both the HSQLDB jar and classes12.zip in your classpath (and export!)
                # and run something like "java org.hsqldb.util.SqlTool...".
                
                #urlid cardiff2
                #url jdbc:oracle:thin:@aegir.admc.com:1522:TRAFFIC_SID
                #username blaine
                #password secretpassword
                #driver oracle.jdbc.OracleDriver
                
                
                
                # Template for a TLS-encrypted HSQLDB Server.
                # Remember that the hostname in hsqls (and https) JDBC URLs must match the
                # CN of the server certificate (the port and instance alias that follows 
                # are not part of the certificate at all).
                # You only need to set "truststore" if the server cert is not approved by
                # your system default truststore (which a commercial certificate probably
                # would be).
                
                #urlid tls
                #url jdbc:hsqldb:hsqls://db.admc.com:9001/lm2
                #username blaine
                #password asecret
                #truststore /home/blaine/ca/db/db-trust.store
                
                
                # Template for a Postgresql database
                #urlid blainedb
                #url jdbc:postgresql://idun.africawork.org/blainedb
                #username blaine
                #password losung1
                #driver org.postgresql.Driver
                
                # Template for a MySQL database.  MySQL has poor JDBC support.
                #urlid mysql-testdb
                #url jdbc:mysql://hostname:3306/dbname
                #username root
                #username blaine
                #password hiddenpwd
                #driver com.mysql.jdbc.Driver
                
                # Note that "databases" in SQL Server and Sybase are traditionally used for
                # the same purpose as "schemas" with more SQL-compliant databases.
                
                # Template for a Microsoft SQL Server database
                #urlid msprojsvr
                #url jdbc:microsoft:sqlserver://hostname;DatabaseName=DbName;SelectMethod=Cursor
                # The SelectMethod setting is required to do more than one thing on a JDBC
                # session (I guess Microsoft thought nobody would really use Java for 
                # anything other than a "hello world" program).
                # This is for Microsoft's SQL Server 2000 driver (requires mssqlserver.jar
                # and msutil.jar).
                #driver com.microsoft.jdbc.sqlserver.SQLServerDriver
                #username myuser
                #password hiddenpwd
                
                # Template for a Sybase database
                #urlid sybase
                #url jdbc:sybase:Tds:hostname:4100/dbname
                #username blaine
                #password hiddenpwd
                # This is for the jConnect driver (requires jconn3.jar).
                #driver com.sybase.jdbc3.jdbc.SybDriver
                
                # Template for Embedded Derby / Java DB.
                #urlid derby1
                #url jdbc:derby:path/to/derby/directory;create=true
                #username ${user.name}
                #password any_noauthbydefault
                #driver org.apache.derby.jdbc.EmbeddedDriver
                # The embedded Derby driver requires derby.jar.
                # There'a also the org.apache.derby.jdbc.ClientDriver driver with URL
                # like jdbc:derby://<server>[:<port>]/databaseName, which requires
                # derbyclient.jar.
                # You can use \= to commit, since the Derby team decided (why???)
                # not to implement the SQL standard statement "commit"!!
                # Note that SqlTool can not shut down an embedded Derby database properly,
                # since that requires an additional SQL connection just for that purpose.
                # However, I've never lost data by not shutting it down properly.
                # Other than not supporting this quirk of Derby, SqlTool is miles ahead of ij.
                

                You can put this file anywhere you want to, and specify the location to SqlTool/DatabaseManager/DatabaseManagerSwing by using the --rcfile argument. If there is no reason to not use the default location (and there are situations where you would not want to), then use the default location and you won't have to give --rcfile arguments to SqlTool/DatabaseManager/DatabaseManagerSwing. The default location is sqltool.rc or dbmanager.rc in your home directory (corresponding to the program using it). If you have any doubt about where your home directory is, just run SqlTool with a phony urlid and it will tell you where it expects the configuration file to be.

                    java -jar $HSQLDB_HOME/lib/hsqldb.jar x

                The config file consists of stanza(s) like this:

                    urlid web
                    url jdbc:hsqldb:hsql://localhost
                    username web
                    password webspassword

                These four settings are required for every urlid. (There are optional settings also, which are described a couple paragraphs down). The URL may contain JDBC connection properties. You can have as many blank lines and comments like

                    # This comment

                in the file as you like. The whole point is that the urlid that you give in your SqlTool/DatabaseManager command must match a urlid in your configuration file.

                Important

                Use whatever facilities are at your disposal to protect your configuration file.

                It should be readable, both locally and remotely, only to users who run programs that need it. On UNIX, this is easily accomplished by using chmod/chown commands and making sure that it is protected from anonymous remote access (like via NFS, FTP or Samba).

                You can also put the following optional settings into a urlid stanza. The setting will, of course, only apply to that urlid.

                charset
                This is used by the SqlTool program, but not by the DatabaseManager programs. See the Character Encoding section of the Non-Interactive section. You can, alternatively, set this for one SqlTool invocation by setting the system property sqlfile.charset . Defaults to US-ASCII.
                driver
                Sets the JDBC driver class name. You can, alternatively, set this for one SqlTool/DatabaseManager invocation by using the command line switch --driver. Defaults to org.hsqldb.jdbcDriver.
                truststore
                TLS trust keystore store file path as documented in the TLS chapter. You usually only need to set this if the server is using a non-publicly-certified certificate (like a self-signed self-ca'd cert).

                Property and SqlTool command-line switches override settings made in the configuration file.

                Using Inline RC Authentication

                Inline RC authentication setup is accomplished by using the --inlineRc command-line switch on SqlTool. The --inlineRc command-line switch takes a comma-separated list of key/value elements. The url and user elements are required. The rest are optional.

                url
                The JDBC URL of the database you wish to connect to.
                user
                The username to connect to the database as.
                charset
                Sets the character encoding. Defaults to US-ASCII.
                trust
                The TLS trust keystore file path as documented in the TLS chapter.
                password
                You may only use this element to set empty password, like
                                    password=
                . For any other password value, omit the password element and you will be prompted for the value.

                (Use the --driver switch instead of --inlineRc to specify a JDBC driver class). Here is an example of invoking SqlTool to connect to a standalone database.

                    java -jar $HSQLDB_HOME/lib/hsqldb.jar
                         --inlineRc URL=jdbc:hsqldb:file:/home/dan/dandb,USER=dan

                For security reasons, you cannot specify a non-empty password as an argument. You will be prompted for a password as part of the login process.

                Using the current version of SqlTool with an older HSQLDB distribution.

                This procedure will allow users of a legacy version of HSQLDB to use all of the new features of SqlTool. You will also get the new versions of the DatabaseManagers! This procedure works for distros going back to 1.7.3.3 at least, probably much farther.

                Follow the instructions in the See the Using hsqltool.jar and hsqldbutil.jar section to build the jar file hsqldbutil.jar.

                For now on, whenever you are going to run SqlTool, make sure that you have this hsqldbutil.jar as the first item in your CLASSPATH. You can't run SqlTool with the "-jar" switch (because the -jar switch doesn't permit setting your own class path).

                Here's a UNIX example where somebody wants to use the new SqlTool with their older HSQLDB database, as well as with Postgresql and a local application.

                CLASSPATH=/path/to/hsqldbutil.jar:/home/bob/classes:/usr/local/lib/pg.jdbc3.jar
                export CLASSPATH
                java org.hsqldb.util.SqlTool urlid

                Interactive Usage

                Do read the The Bare Minimum section before you read this section.

                You run SqlTool interactively by specifying no SQL filepaths on the SqlTool command line. Like this.

                    java -jar $HSQLDB_HOME/lib/hsqldb.jar urlid

                Procedure 8.3. What happens when SqlTool is run interactively (using all default settings)

                1. SqlTool starts up and connects to the specified database, using your SqlTool configuration file (as explained in the RC File Authentication Setup section).

                2. SQL file auto.sql in your home directory is executed (if there is one),

                3. SqlTool displays a banner showing the SqlTool and SqlFile version numbers and describes the different command types that you can give, as well as commands to list all of the specific commands available to you.

                You exit your session by using the "\q" special command or ending input (like with Ctrl-D or Ctrl-Z).

                Important

                Every command (regardless of type) and comment must begin at the beginning of a line (or immediately after a comment ends with "*/").

                You can't nest commands or comments. You can only start new commands (and comments) after the preceding statement has been terminated. (Remember that if you're running SqlTool interactively, you can terminate an SQL statement without executing it by entering a blank line).

                (Special Commands, Edit Buffer Commands and PL Commands always consist of just one line. Any of these commands or comments may be preceded by space characters.)

                These rules do not apply at all to Raw Mode. Raw mode is for use by advanced users when they want to completely bypass SqlTool processing in order to enter a chunk of text for direct transmission to the database engine.

                Command Types

                When you are typing into SqlTool, you are always typing part of the immediate command. You execute the immediate command by hitting ENTER after a semi-colon (for SQL commands) or by just hitting ENTER (after any other non-empty command-- see next section about this distinction). The interactive : commands can perform actions with or on the edit buffer. The edit buffer usually contains a copy of the last command executed, and you can always view it with the :b command. If you never use any : commands, you can entirely ignore the edit buffer. If you want to repeat commands or edit previous commands, you will need to work with the edit buffer. The immediate command contains whatever (and exactly what) you type. The command history and edit buffer may contain any type of command other than comments and : commands (i.e., : commands and comments are just not copied to the history or to the edit buffer).

                Hopefully an example will clarify the difference between the immediate command and the edit buffer. If you type in the edit buffer Substitution command ":s/tbl/table/", the :s command that you typed is the immediate command (and it will never be stored to the edit buffer or history, since it is a : command), but the purpose of the substitution command is to modify the contents of the edit buffer (perform a substitution on it)-- the goal being that after your substitutions you would execute the buffer with the ":;" command. The ":a" command is special in that when you hit ENTER to execute it, it copies the contents of the edit buffer to a new immediate command and leaves you in a state where you are appending to that immediate command (nearly) exactly as if you had just typed it in.

                Command Types

                Command types

                Note

                Above, we said that if you enter an SQL command, one SQL command corresponds to one SqlTool command. This is the most typical usage, however, you can actually put multiple SQL statements into one SQL command. One example would be

                    INSERT INTO t1 VALUES(0); SELECT * FROM t1;
                This is one SqlTool command containing two SQL statements. See the Chunking section to see why you may want to chunk SQL commands, how, and the implications.

                SQL Statement

                Any command that you enter which does not begin with "\", ":", or "* " is an SQL Statement. The command is not terminated when you hit ENTER, like most OS shells. You terminate SQL Statements with either ";" at the end of a line, or with a blank line. In the former case, the SQL Statement will be executed against the SQL database and the command will go into the edit buffer and SQL command history for editing or viewing later on. In the former case, execute against the SQL database means to transmit the SQL text to the database engine for execution. In the latter case (you end an SQL Statement with a blank line), the command will go to the edit buffer and SQL history, but will not be executed (but you can execute it later from the edit buffer). (See the note immediately above about multiple SQL statements in one SqlTool command).

                (Blank lines are only interpreted this way when SqlTool is run interactively. In SQL files, blank lines inside of SQL statements remain part of the SQL statement).

                As a result of these termination rules, whenever you are entering text that is not a Special Command, Edit Buffer / History Command, or PL Command, you are always appending lines to an SQL Statement or comment. (In the case of the first line, you will be appending to an empty SQL statement. I.e. you will be starting a new SQL Statement or comment).

                Special Command
                Run the command "\?" to list the Special Commands. All of the Special Commands begin with "\". I'll describe some of the most useful Special Commands below.
                Edit Buffer / History Command
                Run the command ":?" to list the Edit-Buffer/History Commands. All of these commands begin with ":". These commands use commands from the command history, or operate upon the edit "buffer", so that you can edit and/or (re-)execute previously entered commands.
                PL Command

                Procedural Langage commands. Run the command "*?" to list the PL Commands. All of the PL Commands begin with "*". PL commands are for setting and using scripting variables and conditional and flow control statements like * if and * while. A few PL features (such as PL aliases and updating and selecing data directly from/to files) can be a real convenience for nearly all users, so these features will be discussed briefly in this section. More detailed explanation of PL variables and the other PL features, with examples, are covered in the SqlTool Procedural Language section.

                Raw Mode
                The descriptions of command-types above do not apply to Raw Mode. In raw mode, SqlTool doesn't interpret what you type at all. It all just goes into the edit buffer which you can send to the database engine. Beginners can safely ignore raw mode. You will never encounter it unless you run the "\." special command, or enter a PL/SQL command. See the Raw Mode section for the details.

                Special Commands

                Essential Special Commands

                \?
                help
                \q
                quit
                \i path/to/script.sql
                execute the specified SQL script, then continue again interactively.
                \=
                commit the current SQL transaction. Most users are used to typing the SQL statement commit;, but this command is crucial for those databases which don't support the statement. It's obviously unnecessary if you have auto-commit mode on.
                \x?
                List a summary of DSV eXporting, and all available DSV options.
                \m?
                List a summary of DSV iMporting, and all available DSV options.
                \d?
                List a summary of the \d commands below.
                \dt [filter_substring]
                \dv [filter_substring]
                \ds [filter_substring]
                \di [table_name]
                \dS [filter_substring]
                \da [filter_substring]
                \dn [filter_substring]
                \du [filter_substring]
                \dr [filter_substring]
                \d* [filter_substring]

                Lists available objects of the given type.

                • t: non-system Tables
                • v: Views
                • s: Sequences
                • i: Indexes
                • S: System tables
                • a: Aliases
                • n: schema Names
                • u: database Users
                • r: Roles
                • *: all table-like objects
                If your database supports schemas, then the schema name will also be listed.

                If you supply an optional filter substring, then only items which contain the given substring (in the object name or schema name) will be listed.

                Important

                The substring test is case-sensitive! Even though in SQL queries and for the "\d objectname" command object names are usually case-insensitive, for the \dX commands, you must capitalize the filter substring exactly as it will appear in the special command output. This is an inconvenience, since the database engine will change names in SQL to default case unless you double-quote the name, but that is server-side functionality which cannot (portably) be reproduced by SqlTool. You can use spaces and other special characters in the string.

                Tip

                Filter substrings ending with "." are special. If a substring ends with ".", then this means to narrow the search by the exact, case-sensitive schema name given. For example, if I run "\d* BLAINE.", this will list all table-like database objects in the "BLAINE" schema. The capitalization of the schema must be exactly the same as how the schema name is listed by the "\dn" command. You can use spaces and other special characters in the string. (I.e., enter the name exactly how you would enter it inside of double-quotes in an SQL command). This is an inconvenience, since the database engine will change names in SQL to default case unless you double-quote the name, but that is server-side functionality which cannot (portably) be reproduced by SqlTool.

                Important

                Indexes may not be searched for by substring, only by exact target table name. So if I1 is an index on table T1, then you list this index by running "\di T1". In addition, many database vendors will report on indexes only if a target table is identified. Therefore, "\di" with no argument will fail if your database vendor does not support it.

                \d objectname [filter]

                Lists names of columns in the specified table or view. objectname may be a base table name or a schema.object name.

                If you supply a filter string, then only columns with a name containing the given filter will be listed. The objectname is nearly always case-insensitive (depends on your database), but the filter is always case-sensitive. You'll find this filter is a great convenience compared to other database utilities, where you have to list all columns of large tables when you are only interested in one of them.

                Tip

                When working with real data (as opposed to learning or playing), I often find it useful to run two SqlTool sessions in two side-by-side terminal emulator windows. I do all of my real work in one window, and use the other mostly for \d commands. This way I can refer to the data dictionary while writing SQL commands, without having to scroll.

                This list here includes only the essential Special Commands, but n.b. that there are other useful Special Commands which you can list by running \?. (You can, for example, execute SQL from external SQL files, and save your interactive SQL commands to files). Some specifics of these other commands are specified immediately below, and the Generating Text or HTML Reports section explains how to use the "\o" and "\H" special commands to generate reports.

                Be aware that the \! Special Command does not work for external programs that read from standard input. You can invoke non-interactive and graphical interactive programs, but not command-line interactive programs.

                SqlTool executes \! programs directly, it does not run an operating system shell (this is to avoid OS-specific code in SqlTool). Because of this, you can give as many command-line arguments as you wish, but you can't use shell wildcards or redirection.

                The \w command can be used to store any command in your SQL history to a file. Just restore the command to the edit buffer with a command like "\-4" before you give the \w command.

                Edit Buffer / History Commands

                Edit Buffer / History Commands

                :?
                help
                :b
                List the current contents of the edit buffer.
                :h
                Shows the Command History. For each command which has been executed (up to the max history length), the SQL command history will show the command; its command number (#); and also how many commands back it is (as a negative number). : commands are never added to the history list. You can then use either form of the command identifier to recall a command to the edit buffer (the command described next) or as the target of any of the following : commands. This last is accomplished in a manner very similar to the vi editor. You specify the target command number between the colon and the command. As an example, if you gave the command :s/X/Y/, that would perform the substitution on the contents of the edit buffer; but if you gave the command :-3 s/X/Y/, that would perform the substitution on the command 3 back in the command history (and copy the output to the edit buffer). Also, just like vi, you can identify the command to recall by using a regular expression inside of slashes, like :/blue/ s/X/Y/ to operate on the last command you ran which contains "blue".
                :13 OR :-2 OR :/blue/

                Recalls a command from Command history to the edit buffer. Enter ":" followed by the positive command number from Command history, like ":13"... or ":" followed by a negative number like ":-2" for two commands back in the Command history... or ":" followed by a regular expression inside slashes, like ":/blue/" to recall the last command which contains "blue". The specified command will be written to the edit buffer so that you can execute it or edit it using the commands below.

                As described under the :h command immediately above, you can follow the command number here with any of the commands below to perform the given operation on the specified command from history instead of on the edit buffer contents. So, for example, ":4;" would load command 4 from history then execute it (see the ":;" command below).

                :;
                Executes the SQL, Special or PL statement in the edit buffer (by default). This is an extremely useful command. It's easy to remember because it consists of ":", meaning Edit Buffer Command, plus a line-terminating ";", (which generally means to execute an SQL statement, though in this case it will also execute a special or PL command).
                :a

                Enter append mode with the contents of the edit buffer (by default) as the current command. When you hit ENTER, things will be exactly as if you physically re-typed the command that is in the edit buffer. Whatever lines you type next will be appended to the immediate command. As always, you then have the choice of hitting ENTER to execute a Special or PL command, entering a blank line to store back to the edit buffer, or end a SQL statement with semi-colon and ENTER to execute it.

                You can, optionally, put a string after the :a, in which case things will be exactly as just described except the additional text will also be appended to the new immediate command. If you put a string after the :a which ends with ;, then the resultant new immediate command will just be executed right away, as if you typed in and entered the entire thing.

                If your edit buffer contains SELECT x FROM mytab and you run a:le, the resultant command will be SELECT x FROM mytable. If your edit buffer contains SELECT x FROM mytab and you run a: ORDER BY y, the resultant command will be SELECT x FROM mytab ORDER BY y. Notice that in the latter case the append text begins with a space character.

                :s/from regex/to string/switches

                The Substitution Command is the primary method for SqlTool command editing-- it operates upon the current edit buffer by default. The "to string" and the "switches" are both optional (though the final "/" is not). To start with, I'll discuss the use and behavior if you don't supply any substitution mode switches.

                Don't use "/" if it occurs in either "from string" or "to string". You can use any character that you want in place of "/", but it must not occur in the from or to strings. Example

                    :s@from string@to string@

                The to string is substituted for the first occurrence of the (case-specific) from string. The replacement will consider the entire SQL statement, even if it is a multi-line statement.

                In the example above, the from regex was a plain string, but it is interpreted as a regular expression so you can do all kinds of powerful substitutions. See the perlre man page, or the java.util.regex.Pattern API Spec for everything you need to know about extended regular expressions.

                Don't end a to string with ";" in attempt to make a command execute. There is a substitution mode switch to use for that purpose.

                You can use any combination of the substitution mode switches.

                • Use "i" to make the searches for from regex case insensitive.

                • Use "g" to substitute Globally, i.e., to subsitute all occurrences of the from regex instead of only the first occurrence found.

                • Use ";" to execute the command immediately after the substitution is performed.

                • Use "m" for ^ and $ to match each line-break in a multi-line edit buffer, instead of just at the very beginning and every end of the entire buffer.

                If you specify a command number (from the command history), you end up with a feature very reminiscent of vi, but even more powerful, since the Perl/Java regular expression are a superset of the vi regular expressions. As an example,

                                    :24 s/pin/needle/g;
                                    
                would start with command number 24 from command history, substitute "needle" for all occurrences of "pin", then execute the result of that substitution (and this final statement will of course be copied to the edit buffer and to command history).

                :w /path/to/file.sql
                This appends the contents of the current buffer (by default) to the specified file. Since what is being written are Special, PL, or SQL commands, you are effectively creating an SQL script.

                I find the ":/regex/" and ":/regex/;" constructs particularly handy for every-day usage.

                                    :/\\d/;
                re-executes the last \d command that you gave (The extra "\" is needed to escape the special meaning of "\" in regular expressions). It's great to be able to recall and execute the last "insert" command, for example, without needing to check the history or keep track of how many commands back it was. To re-execute the last insert command, just run ":/insert/;". If you want to be safe about it, do it in two steps to verify that you didn't accidentally recall some other command which happened to contain the string "insert", like
                    :/insert/
                    :;
                (Executing the last only if you are satisfied when SqlTool reports what command it restored). Often, of course, you will want to change the command before re-executing, and that's when you combine the :s and :a commands.

                We'll finish up with a couple fine points about Edit/Buffer commands. You generally can't use PL variables in Edit/Buffer commands, to eliminate possible ambiguities and complexities when modifying commands. The :w command is an exception to this rule, since it can be useful to use variables to determine the output file, and this command does not do any "editing".

                The :? help explains how you can change the default regular expression matching behavior (case sensitivity, etc.), but you can always use syntax like "(?i)" inside of your regular expression, as described in the Java API spec for class java.util.regex.Pattern, found here. History-command-matching with the /regex/ construct is purposefully liberal, matching any portion of the command, case sensitive, etc., but you can still use the method just described to modify this behavior. In this case, you could use "(?-i)" at the beginning of your regular expression to be case-sensitive.

                PL Commands

                Essential PL Command

                * VARNAME = value

                Set the value of a variable. If the variable doesn't exist yet, it will be created. The most common use for this is so that you can later use it in SQL statements, print statements, and PL conditionals, by using the *{VARNAME} or *{:VARNAME} construct. The only difference between *{VARNAME} and *{:VARNAME} is that the former produces an error if VARNAME is not set, whereas the latter will expand to a zero-length string if VARNAME is not set.

                If you set a variable to an SQL statement (without the terminating ";") you can then use it as a PL alias like /VARNAME, as shown in this example.

                Example 8.2. Defining and using a PL alias (PL variable)

                    * qry = SELECT COUNT(*) FROM mytable
                    \p The stored query is '*{qry}'
                    /qry;
                    /qry WHERE mass > 200;

                If you put variable definitions into the SQL file auto.sql in your home directory, those aliases/variables will always be available for interactive use.

                PL variables can be expanded within all commands other than : edit/history commands.

                * load VARNAME /file/path.txt
                Sets VARNAME to the content of the specified ASCII file.
                * prepare VARNAME
                Indicate that next command should be a SQL INSERT or UPDATE command containing one question mark. The value of VARNAME will be substuted for the ? variable. This does work for CLOB columns.
                * VARNAME _
                When next SQL command is run, instead of displaying the rows, just store the very first column value to variable VARNAME. This works for CLOB columns too. It also works with Oracle XML type columns if you use column labels and the getclobval function.
                * VARNAME ~
                Exactly the same as
                * VARNAME ~
                except that the fetched results will be displayed in addition to setting the variable.
                * dump VARNAME /file/path.txt
                Store the value of VARNAME to the specified ASCII file.

                ? Variable

                You don't set the ? variable. It is just like the Bourne shell variable ? in that it is always automatically set to the first value of a result set (or the return value of other SQL commands). It works just like the

                * VARNAME ~
                command described above, but it all happens automatically. You can, of course, dereference ? like any PL variable, but it does not list with the
                list
                and
                listvalues
                commands. You can see the value whenever you want by running
                    \p  *{?}

                Note that PL commands are used to upload and download column values to/from local ASCII files, but the corresponding actions for binary files use the special \b commands. This is because PL variables are used for ASCII values and you can store any number of column values in PL variables. This is not true for binary column values. The \b commands work with a single binary byte buffer.

                See the SqlTool Procedural Language section below for information on using variables in other ways, and information on the other PL commands and features.

                Storing and retrieving binary files

                You can upload binary files such as photographs, audio files, or serialized Java objects into database columns. SqlTool keeps one binary buffer which you can load from files with the \bl command, or from a database query by doing a one-row query for any non-displayable type (including BLOB, OBJECT, and OTHER). In the latter case, the data returned for the first non-displayable column of the first result row will be stored into the binary buffer.

                Once you have data in the binary buffer, you can upload it to a database column (including BLOB, OBJECT, and OTHER type columns), or save it to a file. The former is accomplished by the special command \bp followed by a prepared SQL query containing one question mark place-holder to indicate where the data gets inserted. The latter is accomplished with the \bd command.

                You can also store the output from normal, displayable column into the binary buffer by using the special command \b. The very first column value from the first result row of the next SQL command will be stored to the binary byte buffer.

                Example 8.3. Inserting binary data into database from a file

                    \bl /tmp/favoritesong.mp3
                    \bp
                    INSERT INTO musictbl (id, stream) VALUES(3112, ?);

                Example 8.4. Downloading binary data from database to a file

                    SELECT stream FROM musictbl WHERE id = 3112;
                    \bd /tmp/favoritesong.mp3

                You can also store and retrieve text column values to/from ASCII files, as documented in the Essential PL Command section.

                Command History

                The SQL history shown by the \h command, and used by other commands, is truncated to 100 entries, since its utility comes from being able to quickly view the history list. You can change the history length by setting the system property sqltool.historyLength to an integer like

                java -Dsqltool.historyLength=100 -jar $HSQLDB_HOME/lib/hsqldb.jar urlid
                If there is any demand, I'll make the setting of this value more convenient.

                The SQL history list contains all executed commands other than Edit Buffer commands and comments, even if the command has a syntax error or fails upon execution. The reason for including bad commands is so that you can recall and fix them if you wish to. The same applies to the edit buffer. If you copy a command to the edit buffer by entering blank line, or if you edit the edit buffer, that edit buffer value will never make it into the command history until and if you execute it.

                Shell scripting and command-line piping

                You normally use non-interactive mode for input piping. You specify "-" as the SQL file name. See the Piping and shell scripting subsection of the Non-Interactive chapter.

                Emulating Non-Interactive mode

                You can run SqlTool interactively, but have SqlTool behave exactly as if it were processing an SQL file (i.e., no command-line prompts, error-handling that defaults to fail-upon-error, etc.). Just specify "-" as the SQL file name in the command line. This is a good way to test what SqlTool will do when it encounters any specific command in an SQL file. See the Piping and shell scripting subsection of the Non-Interactive chapter for an example.

                Non-Interactive

                Read the Interactive Usage section if you have not already, because much of what is in this section builds upon that. You can skip all discussion about Command History and the edit buffer if you will not use those interactive features.

                Important

                If you're doing data updates, remember to issue a commit command or use the --autoCommit switch.

                As you'll see, SqlTool has many features that are very convenient for scripting. But what really makes it superior for automation tasks (as compared to SQL tools from other vendors) is the ability to reliably detect errors and to control JDBC transactions. SqlTool is designed so that you can reliably determine if errors occurred within SQL scripts themselves, and from the invoking environment (for example, from a perl, Bash, or Python script, or a simple cron tab invocation).

                Giving SQL on the Command Line

                If you just have a couple Commands to run, you can run them directly from the comand-line or from a shell script without an SQL file, like this.

                    java -jar $HSQLDB_HOME/lib/hsqldb.jar --sql 'SQL statement;' urlid

                Note

                The --sql automatically implies --noinput, so if you want to execute the specified SQL before and in addition to an interactive session (or stdin piping), then you must also give the --stdinput switch.

                Since SqlTool transmits SQL statements to the database engine only when a line is terminated with ";", if you want feedback from multiple SQL statements in an --sql expression, you will need to use functionality of your OS shell to include linebreaks after the semicolons in the expression. With any Bourne-compatible shell, you can include linebreaks in the SQL statements like this.

                    java -jar $HSQLDB_HOME/lib/hsqldb.jar --sql '
                        SQL statement number one;
                        SQL statement
                            number two;
                        SQL statement three;
                    ' urlid
                If you don't need feedback, just separate the SQL commands with semicolons and the entire expression will be chunked.

                The --sql switch is very useful for setting shell variables to the output of SQL Statements, like this.

                    # A shell script
                    USERCOUNT=`java -jar $HSQLDB_HOME/lib/hsqldb.jar --sql '
                        select count(*) from usertbl;
                    ' urlid` || {
                        # Handle the SqlTool error
                    }
                    echo "There are $USERCOUNT users registered in the database."
                    [ "$USECOUNT" -gt 3 ] && {   # If there are more than 3 users registered
                        # Some conditional shell scripting

                SQL Files

                Just give paths to sql text file(s) on the command line after the urlid.

                Often, you will want to redirect output to a file, like

                java -jar $HSQLDB_HOME/lib/hsqldb.jar sql... > /tmp/log.sql 2>&1

                (Skip the "2>&1" if you're on Windows).

                You can also execute SQL files from an interactive session with the "\i"' Special Command, but be aware that the default behavior in an interactive session is to continue upon errors. If the SQL file was written without any concern for error handling, then the file will continue to execute after errors occur. You could run \c false before \i filename, but then your SqlTool session will exit if an error is encountered in the SQL file. If you have an SQL file without error handling, and you want to abort that file when an error occurs, but not exit SqlTool, the easiest way to accomplish this is usually to add \c false to the top of the script.

                If you specify multiple SQL files on the command-line, the default behavior is to exit SqlTool immediately if any of the SQL files encounters an error.

                SQL files themselves have ultimate control over error handling. Regardless of what command-line options are set, or what commands you give interactively, if a SQL file gives error handling statements, they will take precedence.

                You can also use \i in SQL files. This results in nested SQL files.

                You can use the following SQL file, sample.sql, which resides in the sample directory of your HSQLDB distribution [1]. It contains SQL as well as Special Commands making good use of most of the Special Commands documented below.

                /*
                    $Id: sample.sql,v 1.5 2005/05/02 15:07:27 unsaved Exp $
                    Examplifies use of SqlTool.
                    PCTASK Table creation
                */
                
                /* Ignore error for these two statements */
                \c true
                DROP TABLE pctasklist;
                DROP TABLE pctask;
                \c false
                
                \p Creating table pctask
                CREATE TABLE pctask (
                    id integer identity,
                    name varchar(40),
                    description varchar,
                    url varchar,
                    UNIQUE (name)
                );
                
                \p Creating table pctasklist
                CREATE TABLE pctasklist (
                    id integer identity,
                    host varchar(20) not null,
                    tasksequence int not null,
                    pctask integer,
                    assigndate timestamp default current_timestamp,
                    completedate timestamp,
                    show bit default true,
                    FOREIGN KEY (pctask) REFERENCES pctask,
                    UNIQUE (host, tasksequence)
                );
                
                \p Granting privileges
                GRANT select ON pctask TO public;
                GRANT all ON pctask TO tomcat;
                GRANT select ON pctasklist TO public;
                GRANT all ON pctasklist TO tomcat;
                
                \p Inserting test records
                INSERT INTO pctask (name, description, url) VALUES (
                    'task one', 'Description for task 1', 'http://cnn.com');
                INSERT INTO pctasklist (host, tasksequence, pctask) VALUES (
                    'admc-masq', 101, SELECT id FROM pctask WHERE name = 'task one');
                
                commit;
                

                You can execute this SQL file with a Memory Only database with a command like

                    java -jar $HSQLDB_HOME/lib/hsqldb.jar  --sql '
                        create user tomcat password "x";
                    ' mem path/to/hsqldb/sample/sample.sql

                (The --sql "create...;" arguments create an account which the script uses). You should see error messages betwen the Continue-on-error...true and Continue-on-error...false. The script purposefully runs commands that might fail there. The reason the script does this is to perform database-independent conditional table removals. (The SQL clause IF EXISTS is more graceful and succinct, and should be used if you don't need to support databases which don't support IF EXISTS). If an error occurs when continue-on-error is false, the script would abort immedately.

                Piping and shell scripting

                You can of course, redirect output from SqlTool to a file or another program.

                    java -jar $HSQLDB_HOME/lib/hsqldb.jar urlid file.sql > file.txt 2>&1
                
                    java -jar $HSQLDB_HOME/lib/hsqldb.jar urlid file.sql 2>&1 | someprogram...

                You can type commands in to SqlTool while being in non-interactive mode by supplying "-" as the file name. This is a good way to test how SqlTool will behave when processing your SQL files.

                        java -jar $HSQLDB_HOME/lib/hsqldb.jar urlid -

                This is how you have SqlTool read its input from another program:

                Example 8.5. Piping input into SqlTool

                        echo "Some SQL commands with '$VARIABLES';" |
                        java -jar $HSQLDB_HOME/lib/hsqldb.jar urlid -

                Make sure that you also read the Giving SQL on the Command Line section. The --sql switch is a great facility to use with shell scripts.

                Optimally Compatible SQL Files

                If you want your SQL scripts optimally compatible among other SQL tools, then don't use any Special or PL Commands. SqlTool has default behavior which I think is far superior to the other SQL tools, but you will have to disable these defaults in order to have optimally compatible behavior.

                These switches provide compatibilty at the cost of poor control and error detection.

                • --continueOnErr

                  The output will still contain error messages about everything that SqlTool doesn't like (malformatted commands, SQL command failures, empty SQL commands), but SqlTool will continue to run. Errors will not cause rollbacks (but that won't matter because of the following setting).

                • --autoCommit

                You don't have to worry about accidental expansion of PL variables, since SqlTool will never expand PL variables if you don't set any variables on the command line, or give any "* " PL commands. (And you could not have "* " commands in a compatible SQL file).

                Comments

                SQL comments of the form /*...*/ must begin where a (SQL/Special/Edit-Buffer/PL) Command could begin, and they end with the very first "*/" (regardless of quotes, nesting, etc. You may have as many blank lines as you want inside of a comment.

                Example 8.6. Valid comment example

                    SELECT count(*) FROM atable;
                    /* Lots of
                     comments interspersed among
                     several lines */   SELECT count(*)
                    FROM btable;

                Notice that a command can start immediate after the comment ends.

                Example 8.7. Invalid comment example

                    SELECT count(*) FROM
                    /* atable */
                    btable;

                This comment is invalid because you could not start another command at the comment location (because it is within an SQL Statement).

                You can try using /*...*/ in other locations, and -- style SQL comments, but SqlTool will not treat them as comments. If they occur within an SQL Statment, SqlTool will pass them to the database engine, and the DB engine will determine whether to parse them as comments.

                Special Commands and Edit Buffer Commands in SQL Files

                Don't use Edit Buffer / History Commands in your sql files, because they won't work. Edit Buffer / History Commands are for interactive use only. (But, see the Raw Mode section for an exception). You can, of course, use any SqlTool command at all interactively. I just wanted to group together the commands most useful to script-writers.

                \q [abort message]

                Be aware that the \q command will cause SqlTool to completely exit. If a script x.sql has a \q command in it, then it doesn't matter if the script is executed like

                    java -jar .../hsqldb.jar urlid a.sql x.sql z.sql
                or if you use \i to read it in interactively, or if another SQL file uses \i to nest it. If \q is encountered, SqlTool will quit. See the SqlTool Procedural Language section for commands to abort an SQL file (or even parts of an SQL file) without causing SqlTool to exit.

                \q takes an optional argument, which is an abort message. If you give an abort message, the message is displayed to the user and SqlTool will exit with a failure status. If you give no abort message, then SqlTool will exit quietly with successful status. As a result,

                \q
                means to make an immediate but graceful exit, whereas
                \q Message
                means to abort immediately.

                \p [text to print]
                Print the given string to stdout. Just give "\p" alone to print a blank line.
                \i /path/to/file.sql
                Include another SQL file at this location. You can use this to nest SQL files. For database installation scripts I often have a master SQL file which includes all of the other SQL files in the correct sequence. Be aware that the current continue-upon-error behavior will apply to included files until such point as the SQL file runs its own error handling commands.
                \o [file/path.txt]

                Tee output to the specified file (or stop doing so). See the Generating Text or HTML Reports section.

                \=
                A database-independent way to commit your SQL session.
                \a [true|false]
                This turns on and off SQL transaction autocommits. Auto-commit defaults to false, but you can change that behavior by using the --autoCommit command-line switch.
                \c [true|false]

                A "true" setting tells SqlTool to Continue when errors are encountered. The current transaction will not be rolled back upon SQL errors, so if \c is true, then run the ROLLCACK; command yourself if that's what you want to happen. The default for interactive use is to continue upon error, but the default for non-interactive use is to abort upon error. You can override this behavior by using the --continueOnErr or the --abortOnErr command-line switch.

                With database setup scripts, I usually find it convenient to set "true" before dropping tables (so that things will continue if the tables aren't there), then set it back to false so that real errors are caught. DROP TABLE tablename IF EXISTS; is a more elegant, but less portable, way to accomplish the same thing.

                Tip

                It depends on what you want your SQL files to do, of course, but I usually want my SQL files to abort when an error is encountered, without necessarily killing the SqlTool session. If this is the behavior that you want, then put an explicit \c false at the top of your SQL file and turn on continue-upon-error only for sections where you really want to permit errors, or where you are using PL commands to handle errors manually. This will give the desired behavior whether your script is called by somebody interactively, from the SqlTool command-line, or included in another SQL file (i.e. nested).

                Important

                The default settings are usually best for people who don't want to put in any explicit \c or error handling code at all. If you run SQL files from the SqlTool command line, then any errors will cause SqlTool to roll back and abort immediately. If you run SqlTool interactively and invoke SQL files with \i commands, the scripts will continue to run upon errors (and will not roll back). This behavior was chosen because there are lots of SQL files out there that produce errors which can be ignored; but we don't want to ignore errors that a user won't see. I reiterate that any and all of this behavior can (and often should) be changed by Special Commands run in your interactive shell or in the SQL files. Only you know whether errors in your SQL files can safely be ignored.

                Automation

                SqlTool is ideal for mission-critical automation because, unlike other SQL tools, SqlTool returns a dependable exit status and gives you control over error handling and SQL transactions. Autocommit is off by default, so you can build a completely dependable solution by intelligently using \c commands (Continue upon Errors) and commit statements, and by verifying exit statuses.

                Using the SqlTool Procedural Language, you have ultimate control over program flow, and you can use variables for database input and output as well as for many other purposes. See the SqlTool Procedural Language section.

                Getting Interactive Functionality with SQL Files

                Some script developers may run into cases where they want to run with sql files but they alwo want SqlTool's interactive behavior. For example, they may want to do command recall in the sql file, or they may want to log SqlTool's command-line prompts (which are not printed in non-interactive mode). In this case, do not give the sql file(s) as an argument to SqlTool, but pipe them in instead, like

                java -jar $HSQLDB_HOME/lib/hsqldb.jar urlid < filepath1.sql > /tmp/log.html 2>&1
                or
                cat filepath1.sql... |
                java -jar $HSQLDB_HOME/lib/hsqldb.jar urlid > /tmp/log.html 2>&1

                Character Encoding

                SqlTool defaults to the US-ASCII character set (for reading). You can use another character set by setting the system property sqlfile.charset, like

                java -Dsqlfile.charset=UTF-8 -jar $HSQLDB_HOME/lib/hsqldb.jar urlid file.sql...

                You can also set this per urlid in the SqlTool configuration file. See the RC File Authentication Setup section about that.

                Generating Text or HTML Reports

                This section is about making a file containing the output of database queries. You can generate reports by using operating system facilities such as redirection, tee, and cutting and pasting. But it is much easier to use the "\o" and "\H" special commands.

                Procedure 8.4. Writing query output to an external file

                1. By default, everthing will be done in plain text. If you want your report to be in HTML format, then give the special command \H. If you do so, you will probably want to use filenames with an suffix of ".html" or ".htm" instead of ".txt" in the next step.

                2. Run the command \o path/to/reportfile.txt. From this point on, output from your queries will be appended to the specified file. (I.e. another copy of the output is generated.) This way you can continue to monitor or use output as usual as the report is generated.

                3. When you want SqlTool to stop writing to the file, run \o (or just quit SqlTool if you have no other work to do).

                4. If you turned on HTML mode with \H before, you can run \H again to turn it back off, if you wish.

                It is not just the output of "SELECT" statements that will make it into the report file, but

                Kinds of output that get teed to \o files

                • Output of SELECT statements.
                • Output of all "\d" Special Commands. (I.e., "\dt", "\dv", etc., and "\d OBJECTNAME").
                • Output of "\p" Special Commands. You will want to use this to add titles, and perhaps spacing, for the output of individual queries.
                Other output will go to your screen or stdout, but will not make it into the report file. Be aware that no error messages will go into the report file. If SqlTool is run non-interactively (including if you give any SQL file(s) on the command line), SqlTool will abort with an error status if errors are encountered. The right way to handle errors is to check the SqlTool exit status. (The described error-handling behavior can be modified with SqlTool command-line switches and Special Commands).

                Warning

                Remember that \o appends to the named file. If you want a new file, then use a new file name or remove the pre-existing target file ahead of time.

                Tip

                So that I don't end up with a bunch of junk in my report file, I usually leave \o off while I perfect my SQL. With \o off, I perfect the SQL query until it produces on my screen exactly what I want saved to file. At this point I turn on \o and run ":;" to repeat the last SQL command. If I have several complex queries to run, I turn \o off and repeat until I'm finished. (Every time you turn \o on, it will append to the file, just like we need).

                Usually it doesn't come to mind that I need a wider screen until a query produces lines that are too long. In this case, stretch your window and repeat the last command with the ":;" Edit Buffer Command.

                SqlTool Procedural Language

                Aka PL

                Most importantly, run SqlTool interactively and give the "*?" command to see what PL commands are available to you. I've tried to design the language features to be intuitive. Readers experience with significant shell scripting in any language can probably learn everything they need to know by looking at (and running!) the sample script sample/pl.sql in your HSQLDB distribution [1] and using the *? command from within an interactive SqlTool session as a reference. (By significant shell scripting, I mean to the extent of using variables, for loops, etc.).

                PL variables will only be expanded after you run a PL command (or set variable(s) from the command-line). We only want to turn on variable expansion if the user wants variable expansion. People who don't use PL don't have to worry about strings getting accidentally expanded.

                All other PL commands imply the "*" command, so you only need to use the "*" statement if your script uses PL variables and it is possible that no variables may be set before-hand (and no PL commands have been run previously). In this case, without "*", your script would silently use a literal value like "*{x}" instead of trying to expand it. With a preceding "*" command, PL will notice that the variable x has not been set and will generate an error. (If x had been set here will be no issue because setting a variable automatically turns on PL variable expansion).

                PL is also used to upload and download column values to/from local ASCII files, analogously to the special \b commands for binary files. This is explained above in the Interactive Essential PL Command section above.

                Variables

                • Use the * list command to list some or all variables; or * listvalues to also see the values.
                • You can set variables using the * VARNAME = value command. This document explains elsewhere how you can set a values to the contents of files, and to the return value of SQL statements and fetches.
                • You can also set variables using the --setvar command-line switch. I give a very brief but useful example of this below.
                • Variables are always expanded in SQL, Special, and PL commands if they are written like *{VARNAME} (assuming that a PL command has been run previously). Your SQL scripts can give good feedback by echoing the value of variables with the "\p" special command. Use the construct *{:VARNAME} to expand the variable, but to expand to a zero-length string instead of fail if VARNAME is not set.
                • A variable written like /VARNAME is expanded if it begins an SQL Statement. This usage is called PL Aliasing. See the PL Aliases section below.

                • Variables are normally written like *VARNAME in logical expressions to prevent them from being evaluated too early. See below about logical expressions.
                • You can't do math with expression variables, but you can get functionality like the traditional for (i = 0; i < x; i++) by appending to a variable and testing the string length, like

                      * while (*i < ${x})
                          * i = *{i}.
                  i will be a growing line of dots.

                • Variable names must not contain white space, or the characters "}" or "=".

                PL Aliases

                PL Aliasing just means the use of a PL variable as the first thing in an SQL statement, with the shortcut notation /VARNAME.

                /VARNAME must be followed by whitespace or terminate the Statement, in order for SqlFile to tell where the variable name ends.

                Note

                Note that PL aliases are a very different thing from SQL aliases or HSQLDB aliases, which are features of databases, not SqlFile.

                If the value of a variable is an entire SQL command, you generally do not want to include the terminating ";" in the value. There is an example of this above.

                PL aliasing may only be used for SQL statements. You can define variables for everything in a Special or PL Command, except for the very first character ("\" or "*"). Therefore, you can use variables other than alias variables in Special and PL Commands. Here is a hyperbolically impractical example to show the extent to which PL variables can be used in Special commands even though you can not use them as PL aliases.

                        sql> * qq = p Hello Butch
                        sql> \*{qq} done now
                        Hello Butch done now
                (Note that the \* here is not the special command "\*", but is the special command "\p" because "*{qq}" resolves to "p").

                Here is a short SQL file that gives the specified user write permissions on some application tables.

                Example 8.8. Simple SQL file using PL

                    /*
                       grantwrite.sql
                
                       Run SqlTool like this:
                           java -jar path/to/hsqldb.jar -setvar USER=debbie grantwrite.sql
                     */
                
                    /* Explicitly turn on PL variable expansion, in case no variables have
                       been set yet.  (Only the case if user did not set USER).
                    */
                    *
                
                    GRANT all ON book TO *{USER};
                    GRANT all ON category TO *{USER};

                Note that this script will work for any (existing) user just by supplying a different user name on the command-line. I.e., no need to modify the tested and proven script. There is no need for a commit statement in this SQL file since no DML is done. If the script is accidentally run without setting the USER variable, SqlTool will give a very clear notificaton of that.

                The purpose of the plain "*" command is just so that the *{USER} variables will be expanded. (This would not be necessary if the USER variable, or any other variable, were set, but we don't want to depend upon that).

                Logical Expressions

                Logical expressions occur only inside of logical expression parentheses in PL statements. For example, if (*var1 > astring) and while (*checkvar). (The parentheses after "foreach" do not enclose a logical expression, they just enclose a list).

                There is a critical difference between *{VARNAME} and *VARNAME inside logical expressions. *{VARNAME} is expanded one time when the parser first encounters the logical expression. *VARNAME is re-expanded every time that the expression is evaluated. So, you would never want to code * while (*{X} < 5) because the statement will always be true or always be false. (I.e. the following block will loop infinitely or will never run).

                Don't use quotes or whitespace of any kind in *{VARNAME} variables in expressions. (They would expand and then the expression would most likely no longer be a valid expression as listed in the table below). Quotes and whitespace are fine in *VARNAME variables, but it is the entire value that will be used in evaluations, regardless of whether quotes match up, etc. I.e. quotes and whitespace are not special to the token evaluator.

                Logical Operators

                TOKEN
                The token may be a literal, a *{VARNAME} which is expanded early, or a *VARNAME which is expanded late. (You usually do not want to use *{VARNAME} in logical expressions). False if the token is not set, empty, or "0". True otherwise.
                TOKEN1 == TOKEN2
                True if the two tokens are equivalent "strings".
                TOKEN1 <> TOKEN2
                Ditto.
                TOKEN1 >< TOKEN2
                Ditto.
                TOKEN1 > TOKEN2
                True if the TOKEN1 string is longer than TOKEN2 or is the same length but is greater according to a string sort.
                TOKEN1 < TOKEN2
                Similarly to TOKEN1 > TOKEN2.
                ! LOGICAL_EXPRESSION
                Logical negation of any of the expressions listed above.

                *VARNAMEs in logical expressions, where the VARNAME variable is not set, evaluate to an empty string. Therefore (*UNSETVAR = 0) would be false, even though (*UNSETVAR) by itself is false and (0) by itself is false. Another way of saying this is that *VARNAME in a logical expression is equivalent to *{:VARNAME} out of a logical expression.

                When developing scripts, you definitely use SqlTool interactively to verify that SqlTool evaluates logical expressions as you expect. Just run * if commands that print something (i.e. \p) if the test expression is true.

                Flow Control

                Flow control works by conditionally executing blocks of Commands according to conditions specified by logical expressions.

                The conditionally executed blocks are called PL Blocks. These PL Blocks always occur between a PL flow control statement (like * foreach, *while, * if) and a corresponding * end PL Command (like * end foreach).

                Caution

                Be aware that the PL block reader is ignorant about SQL statements and comments when looking for the end of the block. It just looks for lines beginning with some specific PL commands. Therefore, if you put a comment line before a PL statement, or if a line of a multi-line SQL statement has a line beginning with a PL command, things may break.

                I am not saying that you shouldn't use PL commands or SQL commands inside of PL blocks-- you definitely should! I'm saying that in PL blocks you should not have lines inside of SQL statments or comments which could be mistaken for PL commands. (Especially, "commenting out" PL end statements will not work if you leave * end at the beginning of the line).

                (This limitation will very likely be removed in a future version of SqlTool).

                The values of control variables for foreach and while PL blocks will change as expected.

                There are * break and * continue, which work as any shell scripter would expect them to. The * break command can also be used to quit the current SQL file without triggering any error processing. (I.e. processing will continue with the next line in the including SQL file or interactive session, or with the next SQL file if you supplied multiple on the command-line).

                Below is an example SQL File that shows how to use most PL features. If you have a question about how to use a particular PL feature, check this example before asking for help. This file resides in the sample directory with the name pl.sql [1]. Definitely give it a run, like

                java -jar $HSQLDB_HOME/lib/hsqldb.jar mem $HSQLDB_HOME/pl.jar

                Example 8.9. SQL File showing use of most PL features

                /*
                    $Id: pl.sql,v 1.4 2005/05/02 15:07:26 unsaved Exp $
                    SQL File to illustrate the use of SqlTool PL features.
                    Invoke like
                        java -jar .../hsqldb.jar .../pl.sql mem
                                                                         -- blaine
                */
                
                * if (! *MYTABLE)
                    \p MYTABLE variable not set!
                    /* You could use \q to Quit SqlTool, but it's often better to just
                       break out of the current SQL file.
                       If people invoke your script from SqlTool interactively (with
                       \i yourscriptname.sql) any \q will kill their SqlTool session. */
                    \p Use arguments "--setvar MYTABLE=mytablename" for SqlTool
                    * break
                * end if
                
                /* Turning on Continue-upon-errors so that we can check for errors ourselves.*/
                \c true
                
                \p
                \p Loading up a table named '*{MYTABLE}'...
                
                /* This sets the PL variable 'retval' to the return status of the following
                   SQL command */
                * retval ~
                CREATE TABLE *{MYTABLE} (
                    i int,
                    s varchar
                );
                \p CREATE status is *{retval}
                \p
                
                /* Validate our return status.  In logical expressions, unset variables like
                   *unsetvar are equivalent to empty string, which is not equal to 0
                   (though both do evaluate to false on their own, i.e. (*retval) is false
                   and (0) is false */
                * if (*retval != 0)
                    \p Our CREATE TABLE command failed.
                    * break
                * end if
                
                /* Default Continue-on-error behavior is what you usually want */
                \c false
                \p
                
                /* Insert data with a foreach loop.
                   These values could be from a read of another table or from variables
                   set on the command line like
                */
                \p Inserting some data int our new table (you should see 3 row update messages)
                * foreach VALUE (12 22 24 15)
                    * if (*VALUE > 23)
                        \p Skipping *{VALUE} because it is greater than 23
                        * continue
                        \p YOU WILL NEVER SEE THIS LINE, because we just 'continued'.
                    * end if
                    INSERT INTO *{MYTABLE} VALUES (*{VALUE}, 'String of *{VALUE}');
                * end foreach
                \p
                
                * themax ~
                /* Can put Special Commands and comments between "* VARNAME ~" and the target 
                   SQL statement. */
                \p We're saving the max value for later.  You'll still see query output here:
                SELECT MAX(i) FROM *{MYTABLE};
                
                /* This is usually unnecessary because if the SELECT failed, retval would
                   be undefined and the following print statement would make SqlTool exit with
                   a failure status */
                * if (! *themax)
                    \p Failed to get the max value.
                    /* It's possible that the query succeeded but themax is "0".
                       You can check for that if you need to. */
                    * break
                    \p YOU WILL NEVER SEE THIS LINE, because we just 'broke'.
                * end if
                
                \p
                \p ##############################################################
                \p The results of our work:
                SELECT * FROM *{MYTABLE};
                \p MAX value is *{themax}
                
                \p
                \p Everything worked.
                

                Chunking

                We hereby call the ability to transmit multiple SQL commands to the database in one transmission chunking. Unless you are in Raw mode, SqlTool only transmits commands to the database engine when it reads in a ";" at the end of a line of an SQL command. Therefore, you normally want to end each and every SQL command with ";" at the end of a line. This is because the database can only send one status reply to each JDBC transmission. So, while you could run

                    SELECT * FROM t1; SELECT * FROM t2;
                SqlTool can only display the results from the last query. This is a limitation of the client/server nature of JDBC, and applies to any JDBC client. There are, however, situations where you don't need immediate feedback from every SQL command. For example,

                Example 8.10. Single-line chunking example

                    INSERT INTO t1 VALUES(0); SELECT * FROM t1;
                It's useful because the output of the second SQL command will tell you whether the first SQL command succeeded. So, you won't miss the status output from the first command.

                Why?

                The first general reason to chunk SQL commands is performance. For standalone databases, the most common performance bottleneck is network latency. Chunking SQL commands can dramatically reduce network traffic.

                The second general reason to chunk SQL commands is if your database requires you to send multiple commands in one transmission. This is often the case when you need to tell the database the SQL or PL/SQL commands that comprise a stored procedure, function, trigger, etc.

                How?

                The most simple way is enter as many SQL commands as you want, but just do not end a line with ";" until you want the chunk to transmit.

                Example 8.11. Multi-line chunking example

                    INSERT INTO t1 VALUES (1)
                    ; INSERT INTO t1 VALUES (2)
                    ; SELECT * FROM t1;
                If you list your command history with \s, you will see that all 3 SQL commands in 3 lines are in one SqlTool command. You can recall this SqlTool command from history to re-execute all three SQL commands.

                The other method is by using Raw Mode. Go to the Raw Mode section to see how. You can enter any text at all, exactly how you want it to be sent to the database engine. Therefore, in addition to chunking SQL commands, you can give commands for non-SQL extensions to the database. For example, you could enter JavaScript code to be used in a stored procedure.

                Raw Mode

                You begin raw mode by issuing the Special Command "\.". You can then enter as much text in any format you want. When you are finished, enter a line consisting of only ".;" to store the input to the edit buffer and send it to the database server for execution.

                This paragraph applies only to interactive usage. Interactive users may may end the raw input with ":." instead of ".;". This will just save the input to the edit buffer so that you can edit it and send it to the database manually. You can look at the edit buffer with the ":b" Buffer Command. You would normally use the command ":;" to send the buffer to the database after you are satisfied with it. You'll notice that your prompt will be the continuation prompt between entering "\." and terminating the raw input with ".;" or ":.".

                Example 8.12. Interactive Raw Mode example

                    sql> \.
                    Enter RAW SQL.  No \, :, * commands.
                    End with a line containing only ".;" to send to database,
                    or ":." to store to edit buffer for editing or saving.
                    -----------------------------------------------------------
                    raw> line one;
                      +> line two;
                      +> line three;
                      +> :.
                    Raw SQL chunk moved into buffer.  Run ":;" to execute the chunk.
                    sql> :;
                    Executing command from buffer:
                    line one;
                    line two;
                    line three;
                
                    SQL Error at 'stdin' line 13:
                    "line one;
                    line two;
                    line three;"
                    Unexpected token: LINE in statement [line]
                    sql>
                The error message "Unexpected token: LINE in statement [line]" comes from the database engine, not SqlTool. All three lines were transmitted to the database engine.

                Edit Buffer Commands are not available when running SqlTool non-interactively.

                PL/SQL

                Note

                PL/SQL is not the same as PL. PL is the procedural language of SqlFile and is independent of your back-end database. PL commands always begin with *. PL/SQL is processed on the server side and you can only use it of your database supports it. You can not intermix PL and PL/SQL (except for setting a PL variable to the output of PL/SQL execution), because when you enter PL/SQL to SqlTool that input is not processed by SqlFile.

                Use Raw Mode to send PL/SQL code blocks to the database engine. You do not need to enter the "\." command to enter raw mode. Just begin a new SqlTool command line with "DECLARE" or "BEGIN", and SqlTool will automatically put you into raw mode. See the Raw Mode section for details.

                The following sample SQL file resides at sample/plsql.sql in your HSQLDB distribution [1]. This script will only work if your database engine supports standard PL/SQL, if you have permission to create the table "T1" in the default schema, and if that object does not already exist.

                Example 8.13. PL/SQL Example

                /*
                 * $Id: plsql.sql,v 1.4 2007/08/09 03:22:21 unsaved Exp $
                 *
                 * This example is copied from the "Simple Programs in PL/SQL"
                 * example by Yu-May Chang, Jeff Ullman, Prof. Jennifer Widom at
                 * the Standord University Database Group's page
                 * http://www-db.stanford.edu/~ullman/fcdb/oracle/or-plsql.html .
                 * I have only removed some blank lines (in case somebody wants to
                 * copy this code interactively-- because you can't use blank
                 * lines inside of SQL commands in non-raw mode SqlTool when running
                 * it interactively); and, at the bottom I have  replaced the
                 * client-specific, non-standard command "run;" with SqlTool's
                 * corresponding command ".;" and added a plain SQL SELECT command
                 * to show whether the PL/SQL code worked.  - Blaine
                 */
                
                CREATE TABLE T1(
                    e INTEGER,
                    f INTEGER
                );
                
                DELETE FROM T1;
                
                INSERT INTO T1 VALUES(1, 3);
                
                INSERT INTO T1 VALUES(2, 4);
                
                /* Above is plain SQL; below is the PL/SQL program. */
                DECLARE
                
                    a NUMBER;
                
                    b NUMBER;
                
                BEGIN
                
                    SELECT e,f INTO a,b FROM T1 WHERE e>1;
                
                    INSERT INTO T1 VALUES(b,a);
                
                END;
                
                .;
                /** The statement on the previous line, ".;" is SqlTool specific.
                 *  This command says to save the input up to this point to the
                 *  edit buffer and send it to the database server for execution.
                 *  I added the SELECT statement below to give imm
                 */
                
                /* This should show 3 rows, one containing values 4 and 2 (in this order)...*/
                SELECT * FROM t1;
                
                Note that, inside of raw mode, you can use any kind of formatting you want: Whatever you enter-- blank lines, comments, everything-- will be transmitted to the database engine.

                Using hsqltool.jar and hsqldbutil.jar

                This section is for those users who want to use SqlTool but without the overhead of hsqldb.jar (or who want to use a new SqlTool build with an older HSQLDB distribution).

                If you do not need to directly use JDBC URLs like jdbc:hsqldb:mem: + something, jdbc:hsqldb:file: + something, or jdbc:hsqldb:res: + something, then you can use hsqltool.jar in place of the much larger hsqldb.jar file. hsqltool.jar will work for all JDBC databases other than HSQLDB Memory-only and In-process databases (the latter are fine if you access them via a HSQLB Server or WebServer). You will have to supply the JDBC driver for non-HSQLDB URLs, of course.

                hsqltool.jar includes the HSQLDB JDBC driver. If you do not need to connect to HSQLDB databases at all, then hsqldbutil.jar is what you want. hsqldbutil.jar contains everything you need to run SqlTool and DatabaseManagerSwing against non-HSQLDB databases... well, besides the JDBC drivers for the target databases.

                The HSQLDB distribution doesn't "come with" pre-built hsqltool.jar and hsqldbutil.jar files. You need to "build" them, but that is very easy to do.

                These instructions assume that you are capable of running an Ant build. See the Building HSQLDB chapter if you need more details than what you see here.

                1. Download and extract a current HSQLDB distribution. If you don't want to use the source code, documentation, etc., you can use a temporary directory and remove it afterwards.

                2. Cd to the build directory under the root directory where you extracted the distribution to.

                3. Run ant hsqldbutil or ant hsqltool according to the criteria above. (If your goal is to use this jar with an older HSQLDB distribution, then you definitely need to build hsqlbutil.jar).

                4. If you're going to clean up afterwards, copy the jar that you built out of lib to a safe location first.

                If you are using the HSQLDB JDBC driver (i.e., you're connecting up to a URL like jdbc:hsqldb:hsql + something or jdbc:hsqldb:http + something), you invoke SqlTool exactly as with hsqldb.jar except you use the file path to your new jar file instead of the path to hsqldb.jar.

                If you are using a non-HSQLDB JDBC driver, you must set your CLASSPATH to include this new jar file and your JDBC driver, then run SqlTool like

                        java org.hsqldb.util.SqlTool ...
                You can specify your JDBC driver class either with the --driver switch to SqlTool, or in your RC file stanza (the last method is usually more convenient).

                Delimiter-Separated-Value Imports and Exports

                Note

                This feature is independent of HSQLDB Text Tables, a server-side feature of HSQLDB. It makes no difference to SqlTool whether the source or target table of your export/import is a memory, cache, or text table. Indeed, like all features of SqlTool, it works fine with other JDBC databases. It works great, for example to migrate data from a table of one type to a table of another type, or to another schema, or to another database instance, or to another database system.

                This feature is what most business people call "CSV", but these files are more accurately called Delimiter Separated Value files because the delimiter is usually not a comma, and, more importantly, we purposefully choose an effective delimiter instead of the CSV method of using a delimiter which works in some cases and then use quotes and back-slashes to escape occurrence of the delimiter in the actual data. Just by choosing a delimiter which never needs escaping, we eliminate the whole mess, and the data in our files always looks just like the corresponding data in the database. To make this CSV / Delimiter-separated-value dintinction clear, I use the suffix ".dsv" for my data files. This leads me to stipulate the abbreviation DSV for the Delimiter Separated Value feature of HSQLDB.

                Use the \x command to eXport a table to a DSV file, and the \m command to iMport a DSV file into a pre-existing table.

                The row and column delimiters may be any String, not just a single character. And just as the delimiter capability is more general than traditional CSV delimiters, the export function is also more general than just a table data exporter. Besides the trivial generalization that you may specify a view or other virtual table name in place of a table name, you can alternatively export the output of any query which produces normal text output. A benefit to this approach is that it allows you to export only some columns of a table, and to specify a WHERE clause to narrow down the rows to be exported (or perform any other SQL transformation, mapping, join, etc.). One specific use for this would be to exclude columns of binary data (which can be exported by other means, such as a PL loop to store binary values to files with the \bd command).

                Note that the import command will not create a new table. This is because of the impossibility of guessing appropriate types and constraints based only on column names and a data sampling (which is all that a DSV-importer has access to). Therefore, if you wish to populate a new table, create the table before running the import. The import file does not need to have data for all columns of a table. The only required columns are those required by database constraints (non-null, indexes, keys, etc.) One specific reason to omit columns is if you want values of some columns to be created automatically by column DEFAULT settings, triggers, HSQLDB identity sequences, etc. Another reason would be to skip binary columns.

                Simple DSV exports and imports using default settings

                Even if you need to change delimiters, table names, or file names from the defaults, I suggest that you run one export and import with default settings as a practice run. A memory-only HSQLDB instance is ideal for test runs like this.

                This command exports the table icf.projects to the file projects.dsv in the current directory (where you invoked SqlTool from). By default, the output file name will be the specified source table name plus the extension .dsv.

                Example 8.14. DSV Export Example

                    SET SCHEMA icf;
                    \x projects
                
                We could also have run \x icf.projects (which would have created a file named icf.projects.dsv) instead of changing the session schema. In this example we have chosen to make the export file name independent of the schema to facilitate importing it into a different schema.

                Take a look at the output file. Notice that the first line consists of column names, not data. This line is present because it will be needed if the file is to used for a DSV import. Notice the following characterstics about the export data. The column delimiter is the pipe character "|". The record delimiter is the default line delimiter character(s) for your operating system. The string used to represent database NULLs is [null]. See the next section for how to change these from their default values.

                This command imports the data from the file projects.dsv in the current directory (where you invoked SqlTool from) into the table newschema.projects. By default, the output table name will be the input filename after removing optional leading directory and trailing final extension.

                Example 8.15. DSV Import Example

                    SET SCHEMA newschema;
                    \m projects.dsv
                
                If the DSV file was named with the target schema, you would have skipped the SET SCHEMA command, like \m newschema.projects.dsv.

                Specifying queries and options

                For a hands on example of a DSM import which generates an import report and uses some other options, change to directory HSQLDB/sample and play with the working script dsv-sample.sql [1]. You can execute it like

                    java -jar ../lib/hsqldb.jar mem dsv-sample.sql
                (assuming that you are using the supplied sqltool.rc file or have have urlid mem set up.

                The header line in the DSV file is required at this time. (If there is user demand, it can be made optional for exporting, but it will remain required for importing).

                Your export will fail if the column or record delimiter, or the null representation value occurs in the data being exported. You change these values by setting the PL variables *DSV_COL_DELIM, *DSV_ROW_DELIM, *DSV_NULL_REP. Notice that the asterisk is part of the variable names, to indicate that these variables are used by SqlTool internally. When specifying delimiters, you can use the escape seqpences \n, \r, \f, \t, \\, and decimal, octal or hex specifications like \20, \020, \0x20. For example, to change the column delimiter to the tab character, you would give the command

                    * *DSV_COL_DELIM = \t

                For imports, you must always specify the source DSV file path. If you want to export to a different file than one in the current directory named according to the source table, set the PL variable *DSV_TARGET_FILE, like

                    * *DSV_TARGET_FILE = /tmp/dtbl.dsv

                For exports, you must always specify the source table name or query. If you want to import to a table other than that derived from the input DSV file name, set the PL variable *DSV_TARGET_TABLE. The table name may contain a schema name prefix.

                You don't need to import all of the columns in a data file. To designate the fields to be skipped, iether set the PL PL variable *DSV_SKIP_COLUMNS, or replace the column names in the header line to "-" (hyphen). The value of *DSV_SKIP_COLUMNS is case-insensitive, and multiple column names are separated with white space and/or commas.

                You can specify a query instead of a tablename with the \x command in order to filter or transform data from a table or view, or to export the output of a join, etc. You must set the PL variable *DSV_TARGET_FILE, as explained above (since there is no table name from which to automatically map a file name).

                Example 8.16. DSV Export of an Arbitrary SELECT Statement

                    * *DSV_TARGET_FILE = outfile.txt
                    \x SELECT entrydate, 2 * aval "Double aval", modtime FROM bs.dtbl
                Note that I specified the column label alias "Double aval" so that the label for that column in the DSV file header will not be blank.

                By default, imports will abort as soon as a error is encountered during parsing the file or inserting data. If you invoke SqlTool with a SQL script on the command line, the failure will cause SqlTool to roll back and exit. If run interactively, you can decide whether to commit or roll back the rows that inserted before the failure. You can modify this behavior with the \a and \c settings.

                If you set either a reject dsv file or a reject report file, then failures during imports will be reported but will not cause the import to abort. When run in this way, SqlTool will give you a report at the end about how many records were skipped, rejected, and successfully inserted. The reject dsv file is just a dsv file with exact copies of the dsv records that failed to insert. The reject report file is a HTML report which lists, for every rejected record, why that record was rejected.

                To allow for user-friendly entry of headers, we require that tables for DSV import/exports use standard column names. I.e., no column names that require quoting. The DSV import and export parsers are very smart and user-friendly. The data types of columns are checked so that the parser can make safe assumptions about white space and blank entries in the data. If a column is a JDBC Boolean type, for example, then we know that a field value of " True " obviously means "True", and that a field value of "" obviously means null. Since we require vanilla style column names, we allow white space anywhere in the header column. We allow blank lines anywhere (where "lines" are delimited by *DSV_ROW_DELIM). By default, commented lines are ignored, and the comment character can be changed from its default value.

                Run the command "\x?" or "\m?" to see the several system PL variables which you can set to adjust reject file behavior, commenting behavior, and other DSV features.

                You can also define some settings right in the DSV file, and you can even specify multiple header lines in a single DSV file. I use this last feature to import data from one data set into multple tables that are joined. Since I don't have any more time to dedicate to explaining all of these features, I'll give you some examples from working DSV files and let you take it from there.

                Example 8.17. Sample DSV headerswitch settings

                    # RCS keyword was here.
                
                    headerswitch{
                    itemdef:name|-|-|hardness|breakdc|-
                    simpleitemdef:itemdef_name|maxvalue|weight|-|-|maxhp
                    }
                I'll just note that the prefixes for the header rows must be of format target-table-name + :. You can use * for target-table-name here, for the obvious purpose.

                Example 8.18. DSV targettable setting

                    targettable=t
                This last example is from the SqlTool unit test file dsv-trimming.dsv. These special commands must be at the top of the file (before any normal data or header lines).

                There is also the *DSV_CONST_COLS setting, which you can use to automatically write static, constant values to the specified columns of all inserted rows.

                Unit Testing SqlTool

                The SqlTool unit tests reside at testrun/sqltool in the HSQLDB source code repository. Just run the runtests.bash script from that directory to execute all of the tests. Read the file README.txt to find out all about it, including everything you'd need to know to test your own scripts or to add more unit test scripts for SqlTool.



                [1] To reduce the time I will need to spend maintaining this document, in this chapter I am giving the path to the sample directory as it is in HSQLDB 1.9.x distributions, namely, HSQLDB_HOME/sample. HSQLDB 1.8.x users should translate these sample directory paths to use HSQLDB_HOME/src/org/hsqldb/sample/....

                Chapter 9. SQL Syntax

                The Hypersonic SQL Group

                Fred Toussi

                HSQLDB Development Group

                Peter Hudson

                HSQLDB Development Group

                Joe Maher

                HSQLDB Development Group

                Edited by

                Blaine Simpson

                $Date: 2007/02/19 21:15:47 $

                HSQLDB version 1.8.0 supports the SQL statements and syntax described in this chapter.

                Notational Conventions Used in this Chapter

                [A] means A is optional.

                { B | C } means either B or C must be used.

                [{ B | C }] means either B or C may optionally be used, or nothing at all.

                ( and ) are the actual characters '(' and ')' used in statements.

                UPPERCASE words are keywords

                SQL Commands

                ALTER INDEX[2]

                ALTER INDEX <indexname> RENAME TO <newname>;

                Index names can be changed so long as they do not conflict with other user-defined or sytem-defined names.

                ALTER SEQUENCE[2]

                ALTER SEQUENCE <sequencename> RESTART WITH <value>;

                Resets the next value to be returned from the sequence.

                ALTER SCHEMA[2]

                ALTER SCHEMA <schemaname> RENAME TO <newname>;

                Renames the schema as specified. All objects of the schema will hereafter be accessible only with the new schema name.

                Requires Administrative privileges.

                ALTER TABLE[2]

                ALTER TABLE <tablename> ADD [COLUMN] <columnname> Datatype
                    [(columnSize[,precision])] [{DEFAULT <defaultValue> |
                    GENERATED BY DEFAULT AS IDENTITY (START WITH <n>[, INCREMENT BY <m>])}] |
                    [[NOT] NULL] [IDENTITY] [PRIMARY KEY]
                    [BEFORE <existingcolumn>];

                Adds the column to the end of the column list. The optional BEFORE <existingcolumn> can be used to specify the name of an existing column so that the new column is inserted in a position just before the <existingcolumn>.

                It accepts a columnDefinition as in a CREATE TABLE command. If NOT NULL is specified and the table is not empty, then a default value must be specified. In all other respects, this command is the equivalent of a column definition statement in a CREATE TABLE statement.

                If an SQL view includes a SELECT * FROM <tablename> in its select statement, the new column is added to the view. This is a non-standard feature which is likely to change in the future.

                ALTER TABLE <tablename> DROP [COLUMN] <columnname>;

                Drops the column from the table. Will drop any single-column primary key or unique constraint on the column as well. The command will not work if there is any multiple key constraint on the column or the column is referenced in a check constraint or a foreign key.

                It will also fail if an SQL view includes the column.

                ALTER TABLE <tablename> ALTER COLUMN <columnname> RENAME TO <newname> 

                Changes a column name.

                ALTER TABLE <tablename> ALTER COLUMN <columnname> SET DEFAULT <defaultvalue>};

                Adds the specified default value to the column. Use NULL to remove a default.

                ALTER TABLE <tablename> ALTER COLUMN <columnname> SET [NOT] NULL

                Sets or removes a NOT NULL constraint for the column.

                ALTER TABLE <tablename> ALTER COLUMN <columnDefinition>;

                This form of ALTER TABLE ALTER COLUMN accepts a columnDefinition as in a CREATE TABLE command, with the following restrictions.

                Restrictions

                • The column must be already be a PK column to accept an IDENTITY definition.
                • If the column is already an IDENTITY column and there is no IDENTITY definition, the existing IDENTITY attribute is removed.
                • The default expression will be that of the new definition, meaning an existing default can be dropped by ommission, or a new default added.
                • The NOT NULL attribute will be that of the new definition (similar to previous item).
                • Depending on the type of change, the table may have to be empty for the command to work. It always works when the type of change is possible in general and the individual existing values can all be converted.
                ALTER TABLE <tablename> ALTER COLUMN <columnname>
                    RESTART WITH <new sequence value>

                This form is used exclusively for IDENTITY columns and changes the next automatic value for the identity sequence.

                ALTER TABLE <tablename> ADD [CONSTRAINT <constraintname>]
                    CHECK (<search condition>);

                Adds a check constraint to the table. In the current version, a check constraint can reference only the row being inserted or updated.

                ALTER TABLE <tablename> ADD [CONSTRAINT <constraintname>] UNIQUE (<column list>);

                Adds a unique constraint to the table. This will not work if there is already a unique constraint covering exactly the same <column list>.

                This will work only if the values of the column list for the existing rows are unique or include a null value.

                ALTER TABLE <tablename> ADD [CONSTRAINT <constraintname>]
                    PRIMARY KEY (<column list>);

                Adds a primary key constraint to the table, using the same constraint syntax as when the primary key is specified in a table definition.

                ALTER TABLE <tablename>
                    ADD [CONSTRAINT <constraintname>] FOREIGN KEY (<column list>)
                    REFERENCES <exptablename> (<column list>)
                    [ON {DELETE | UPDATE} {CASCADE | SET DEFAULT | SET NULL}];

                Adds a foreign key constraint to the table, using the same constraint syntax as when the foreign key is specified in a table definition.

                This will fail if for each existing row in the referring table, a matching row (with equal values for the column list) is not found in the referenced tables.

                ALTER TABLE <tablename> DROP CONSTRAINT <constraintname>;

                Drop a named unique, check or foreign key constraint from the table.

                ALTER TABLE <tablename> RENAME TO <newname>;

                ALTER USER[2]

                ALTER USER <username> SET PASSWORD <password>;

                Changes the password for an existing user. Password must be double quoted. Use "" for an empty password.

                DBA's may change users' base default schema name with the comand

                ALTER USER <username> SET INITIAL SCHEMA <schemaname>;
                This is the schema which database object names will resolve to for this user, unless overridden as explained in Schema object naming. For reasons of backwards compatibility, the initial schema value will not be persisted across database shutdowns until HSQLDB version 1.8.1. (I.e., INITIAL SCHEMA settings will be lost upon database shutdown with HSQLDB versions lower than version 1.8.1).

                Only an administrator may use these commands.

                CALL

                CALL Expression;

                Any expression can be called like a stored procedure, including, but not only Java stored procedures or functions. This command returns a ResultSet with one column and one row (the result) just like a SELECT statement with one row and one column.

                See also: Stored Procedures / Functions, SQL Expression.

                CHECKPOINT

                CHECKPOINT [DEFRAG[2]];

                Closes the database files, rewrites the script file, deletes the log file and opens the database.

                If DEFRAG is specified, this command also shrinks the .data file to its minimal size.

                See also: SHUTDOWN, SET LOGSIZE.

                COMMIT

                COMMIT [WORK];

                Ends a transaction and makes the changes permanent.

                See also: ROLLBACK, SET AUTOCOMMIT, SET LOGSIZE.

                CONNECT

                CONNECT USER <username> PASSWORD <password>;

                Connects to the database as a different user. Password should be double quoted. Use "" for an empty password.

                See also: GRANT, REVOKE.

                CREATE ALIAS

                CREATE ALIAS <function> FOR <javaFunction>;

                Creates an alias for a static Java function to be used as a Stored Procedure. The function must be accessible from the JVM in which the database runs. Example:

                    CREATE ALIAS ABS FOR "java.lang.Math.abs";

                Note

                The CREATE ALIAS command just defines the alias. It does not validate existence of the target method or its containing class. To validate the alias, use it.

                See also: CALL, Stored Procedures / Functions.

                CREATE INDEX

                CREATE [UNIQUE] INDEX <index> ON <table> (<column> [DESC] [, ...]) [DESC];

                Creates an index on one or more columns in a table.

                Creating an index on searched columns may improve performance. The qualifier DESC can be present for command compatibility with other databases but it has no effect. Unique indexes can be defined but this is deprecated. Use UNIQUE constraints instead. The name of an index must be unique within the whole database.

                See also: CREATE TABLE, DROP INDEX.

                CREATE ROLE[2]

                CREATE ROLE <rolename>;

                Creates the named role with no members. Requires Administrative privileges.

                CREATE SCHEMA[2]

                CREATE SCHEMA <schemaname> AUTHORIZATION <grantee>
                    [<createStatement> [<grantStatement>] [...];

                Creates the named schema, with ownership of the specified authorization. The authorization grantee may be a database user or a role.

                Optional (nested) CREATE and GRANT statements can be given only for new objects in this new schema. Only the last nested statement should be terminated with a semicolon, because the first semicolon encountered after "CREATE SCHEMA" will end the CREATE SCHEMA command. In the example below, a new schema, ACCOUNTS, is created, then two tables and a view are added to this schma and some rights on these objects are granted.

                    CREATE SCHEMA ACCOUNTS AUTHORIZATION DBA
                        CREATE TABLE AB(A INTEGER, ...)
                        CREATE TABLE CD(C CHAHR, ...)
                        CREATE VIEW VI AS SELECT ...
                        GRANT SELECT TO PUBLIC ON AB
                        GRANT SELECT TO JOE ON CD;
                
                Note that this example consists of one CREATE SCHEMA statement which is terminated by a semicolon.

                Requires Administrative privileges.

                CREATE SEQUENCE[2]

                CREATE SEQUENCE <sequencename> [AS {INTEGER | BIGINT}]
                    [START WITH <startvalue>] [INCREMENT BY <incrementvalue>];

                Creates a sequence. The default type is INTEGER. The default start value is 0 and the increment 1. Negative values are not allowed. If a sequence goes beyond Integer.MAXVALUE or Long.MAXVALUE, the next result is determined by 2's complement arithmetic.

                The next value for a sequence can be included in SELECT, INSERT and UPDATE statements as in the following example:

                SELECT [...,] NEXT VALUE FOR <sequencename> [, ...] FROM <tablename>;

                In the proposed SQL 200n and in the current version, there is no way of retreiving the last returned value of a sequence.

                CREATE TABLE

                CREATE [MEMORY | CACHED | [GLOBAL] TEMPORARY | TEMP [2] | TEXT[2]] TABLE <name>
                    ( <columnDefinition> [, ...] [, <constraintDefinition>...] )
                    [ON COMMIT {DELETE | PRESERVE} ROWS];

                Creates a tables in memory (default) or on disk and only cached in memory. If the database is all-in-memory, both MEMORY and CACHED forms of CREATE TABLE return a MEMORY table while the TEXT form is not allowed.

                Components of a CREATE TABLE command

                columnDefinition
                columnname Datatype [(columnSize[,precision])]
                    [{DEFAULT <defaultValue> |
                    GENERATED BY DEFAULT AS IDENTITY
                    (START WITH <n>[, INCREMENT BY <m>])}] |
                    [[NOT] NULL] [IDENTITY] [PRIMARY KEY]

                Default values that are allowed are constant values or certain SQL datetime functions.

                Allowed Default Values in Column Definitions

                • For character column, a single-quoted string or NULL. The only SQL function that can be used is CURRENT_USER.

                • For datetime columns, a single-quoted DATE, TIME or TIMESTAMP value or NULL. Or a datetime SQL function such as CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, TODAY, NOW. Each function is allowed for a certain datetime type.

                • For BOOLEAN columns, the literals FALSE, TRUE, NULL.

                • For numeric columns, any valid number or NULL.

                • For binary columns, any valid hex string or NULL.

                Only one identity column is allowed in each table. Identity columns are autoincrement columns. They must be of INTEGER or BIGINT type and are automatically primary key columns (as a result, multi-column primary keys are not possible with an IDENTITY column present). Using the long SQL syntax the (START WITH <n>) clause specifies the first value that will be used. The last inserted value into an identity column for a connection is available using the function IDENTITY(), for example (where Id is the identity column):

                INSERT INTO Test (Id, Name) VALUES (NULL,'Test');
                    CALL IDENTITY();
                constraintDefinition
                [CONSTRAINT <name>]
                    UNIQUE ( <column> [,<column>...] ) |
                    PRIMARY KEY ( <column> [,<column>...] ) |
                    FOREIGN KEY ( <column> [,<column>...] )
                    REFERENCES <refTable> ( <column> [,<column>...]) 
                    [ON {DELETE | UPDATE}
                    {CASCADE | SET DEFAULT | SET NULL}][2] |
                    CHECK(<search condition>)[2]

                Both ON DELETE and ON UPDATE clauses can be used in a single foreign key definition.

                search condition

                A search condition is similar to the set of conditions in a WHERE clause. In the current version of HSQLDB, the conditions for a CHECK constraint can only reference the current row, meaning there should be no SELECT statement. Sample table definitions with CHECK constraints are in TestSelfCheckConstraints.txt. This file is in the /hsqldb/testrun/hsqldb/ directory of the zip.

                General syntax limitations

                HSQLDB databases are initially created in a legacy mode that does not enforce column size and precision. You can set the property: sql.enforce_strict_size=true to enable this feature. When this property has been set, Any supplied column size and precision for numeric and character types (CHARACTER and VARCHAR) are enforced. Use the command, SET PROPERTY "sql.enforce_strict_size" TRUE once before defining the tables.

                NOT NULL constraints can be part of the column definition only. Other constraints cannot be part of the column definition and must appear at the end of the column definition list.

                TEMPORARY TABLE contents for each session (connection) are emptied by default at each commit or rollback. The optional qualifier ON COMMIT PRESERVE ROWS can be used to keep the rows while the session is open. The default is ON COMMIT DELETE ROWS.

                See also: DROP TABLE.

                CREATE TRIGGER[2]

                CREATE TRIGGER <name> {BEFORE | AFTER} {INSERT | UPDATE | DELETE} ON <table>
                    [FOR EACH ROW] [QUEUE n] [NOWAIT] CALL <TriggerClass>;

                TriggerClass is an application-supplied class that implements the org.hsqldb.Trigger interface e.g. "mypackage.TrigClass". It is the fire method of this class that is invoked when the trigger event occurs. You should provide this class, which can have any name, and ensure that this TriggerClass is present in the classpath which you use to start hsqldb.

                Since 1.7.2 the implementation has been changed and enhanced. When the 'fire' method is called, it is passed the following arguments:

                    fire (String name, String table, Object row1[], Object row2[])
                

                where 'row1' and 'row2' represent the 'before' and 'after' states of the row acted on, with each column being a member of the array. The mapping of members of the row arrays to database types is specified in Data Types. For example, BIGINT is represented by a java.lang.Long Object. Note that the number of elements in the row arrays could be larger than the number of columns by one or two elements. Never modify the last elements of the array, which are not part of the actual row.

                If the trigger method wants to access the database, it must establish its own JDBC connection. This can cause data inconsistency and other problems so it is not recommended. The jdbc:default:connection: URL is not currently supported.

                Implementation note:

                If QUEUE 0 is specified, the fire method is execued in the same thread as the database engine. This allows trigger action to alter the data that is about to be stored in the database. Data can be checked or modified in BEFORE INSERT / UPDATE + FOR EACH ROW triggers. All table constraints are then enforced by the database engine and if there is a violation, the action is rejected for the SQL command that initiated the INSERT or UPDATE. There is an exception to this rule, that is with UPDATE queries, referential integrity and cascading actions resulting from ON UPDATE CASCASE / SET NULL / SET DEFAULT are all performed prior to the invocation of the trigger method. If an invalid value that breaks referential integrity is inserted in the row by the trigger method, this action is not checked and results in inconsistent data in the table.

                Alternatively, if the trigger is used for external communications and not for checking or altering the data, a queue size larger than zero can be specified. This is in the interests of not blocking the database's main thread as each trigger will run in a thread that will wait for its firing event to occur. When this happens, the trigger's thread calls TriggerClass.fire. There is a queue of events waiting to be run by each trigger thread. This is particularly useful for 'FOR EACH ROW' triggers, when a large number of trigger events occur in rapid succession, without the trigger thread getting a chance to run. If the queue becomes full, subsequent additions to it cause the database engine to suspend awaiting space in the queue. Take great care to avoid this situation if the trigger action involves accessing the database, as deadlock will occur. This can be avoided either by ensuring the QUEUE parameter makes a large enough queue, or by using the NOWAIT parameter, which causes a new trigger event to overwrite the most recent event in the queue. The default queue size is 1024. Note also that the timing of trigger method calls is not guaranteed, so applications should implement their own synchronization measures if necessary.

                With a non-zero QUEUE parameter, if the trigger methods modifies the 'row2' values, these changes may or may not affect the database and will almost certainly result in data inconsistency.

                Please refer to the code for org.hsqldb.sample.Trigger and org.hsqldb.sample.TriggerSample for more information on how to write a trigger class.

                See also: DROP TRIGGER.

                CREATE USER

                CREATE USER <username> PASSWORD <password> [ADMIN];

                Creates a new user or new administrator in this database. Password must be double quoted. Empty password can be made using "". You can change a password afterwards using a ALTER USER[2] command.

                Only an administrator can do this.

                See also: CONNECT, GRANT, REVOKE. ALTER USER[2],

                CREATE VIEW[2]

                CREATE VIEW <viewname>[(<viewcolumn>,..) AS SELECT ... FROM ... [WHERE Expression]
                [ORDER BY orderExpression [, ...]]
                [LIMIT <limit> [OFFSET <offset>]];

                A view can be thought of as either a virtual table or a stored query. The data accessible through a view is not stored in the database as a distinct object. What is stored in the database is a SELECT statement. The result set of the SELECT statement forms the virtual table returned by the view. A user can use this virtual table by referencing the view name in SQL statements the same way a table is referenced. A view is used to do any or all of these functions:

                • Restrict a user to specific rows in a table. For example, allow an employee to see only the rows recording his or her work in a labor-tracking table.

                • Restrict a user to specific columns. For example, allow employees who do not work in payroll to see the name, office, work phone, and department columns in an employee table, but do not allow them to see any columns with salary information or personal information.

                • Join columns from multiple tables so that they look like a single table.

                • Aggregate information instead of supplying details. For example, present the sum of a column, or the maximum or minimum value from a column.

                Views are created by defining the SELECT statement that retrieves the data to be presented by the view. The data tables referenced by the SELECT statement are known as the base tables for the view. In this example, is a view that selects data from three base tables to present a virtual table of commonly needed data:

                    CREATE VIEW mealsjv AS
                      SELECT m.mid mid, m.name name, t.mealtype mt, a.aid aid,
                             a.gname + ' ' + a.sname author, m.description description,
                             m.asof asof
                        FROM meals m, mealtypes t, authors a
                       WHERE m.mealtype = t.mealtype
                        AND m.aid = a.aid;

                You can then reference mealsjv in statements in the same way you would reference a table:

                    SELECT * FROM mealsjv;

                A view can reference another view. For example, mealsjv presents information that is useful for long descriptions that contain identifiers, but a short list might be all a web page display needs. A view can be built that selects only specific mealsjv columns:

                    CREATE VIEW mealswebv AS SELECT name, author FROM mealsjv;

                The SELECT statement in a VIEW definition should return columns with distinct names. If the names of two columns in the SELECT statement are the same, use a column alias to distinguish between them. A list of new column names can always be defined for a view.

                    CREATE VIEW aview (new_name, new_author) AS
                      SELECT name, author
                      FROM mealsjv

                See also: SQL Expression, SELECT[2], DROP VIEW[2].

                DELETE

                DELETE FROM table [WHERE Expression];

                Removes rows in a table.

                See also: SQL Expression, INSERT, SELECT[2].

                DISCONNECT

                DISCONNECT;

                Closes this connection. It is not required to call this command when using the JDBC interface: it is called automatically when the connection is closed. After disconnecting, it is not possible to execute other queries (including CONNECT) with this connection.

                See also: CONNECT.

                DROP INDEX

                DROP INDEX index [IF EXISTS];

                Removes the specified index from the database. Will not work if the index backs a UNIQUE of FOREIGN KEY constraint.

                See also: CREATE INDEX.

                DROP ROLE[2]

                DROP ROLE <rolename>;

                Removes all members from specified role, then removes the role itself.

                DROP SEQUENCE[2]

                DROP SEQUENCE <sequencename> [IF EXISTS] [RESTRICT | CASCADE];

                Removes the specified sequence from the database. When IF EXIST is used, the statement returns without an error if the sequence does not exist. The RESTRICT option is in effect by default, meaning that DROP will fail if any view reference the sequence. Specify the CASCADE option to silently drop all dependent database objects.

                DROP SCHEMA[2]

                DROP SCHEMA <schemaname> [RESTRICT | CASCADE];

                Removes the specified schema from the database. The RESTRICT option is in effect by default, meaning that DROP will fail if any objects such as tables or sequences have been defined in the schema. Specify the CASCADE option to silently drop all database objects in the schema.

                Requires Administrative privileges.

                DROP TABLE

                DROP TABLE <table> [IF EXISTS] [RESTRICT | CASCADE];

                Removes a table, the data and indexes from the database. When IF EXIST is used, the statement returns without an error even if the table does not exist.

                The RESTRICT option is in effect by default, meaning that DROP will fail if any tables or views refer to this table. Specify the CASCADE option to silently drop all dependent views, and to drop any foreign key constraint that links this table with other tables.

                See also:

                CREATE TABLE.

                DROP TRIGGER

                DROP TRIGGER <trigger>;

                Removes a trigger from the database.

                See also: CREATE TRIGGER[2].

                DROP USER

                DROP USER <username>;

                Removes a user from the database.

                Only an administrator do this.

                See also: CREATE USER.

                DROP VIEW[2]

                DROP VIEW <viewname> [IF EXISTS] [RESTRICT | CASCADE];

                Removes a view from the database. When IF EXIST is used, the statement returns without an error if the view does not exist. The RESTRICT option is in effect by default, meaning that DROP will fail if any other view refers to this view. Specify the CASCADE option to silently drop all dependent views.

                See also: CREATE VIEW[2].

                EXPLAIN PLAN

                EXPLAIN PLAN FOR { SELECT ... | DELETE ... | INSERT ... | UPDATE ..};

                EXPLAIN PLAN FOR can be used with any query to get a detailed list of the elements in the execution plan.

                This list includes the indexes used for performing the query and can be used to optimise the query or to add indexes to tables.

                GRANT

                GRANT { SELECT | DELETE | INSERT | UPDATE | ALL } [,...]
                ON { table | CLASS "package.class" } TO <grantee>;
                GRANT <rolename> [,...] TO <grantee>[2];

                <grantee> is either a user name, a role name, or PUBLIC. PUBLIC means all users.

                The first form of the GRANT command assigns privileges to a grantee for a table or for a class. To allow a user to call a Store Procedure static function, the right ALL must be used. Examples:

                    GRANT SELECT ON Test TO GUEST;
                    GRANT ALL ON CLASS "java.lang.Math.abs" TO PUBLIC;

                Warning

                Even though the command is GRANT ALL ON CLASS, you must specify a static method name. You are actually granting access to a static method, not to a class.

                The second form of the GRANT command gives the specified <grantee> membership in the specified role.

                Requires Administrative privileges.

                See also: REVOKE, CREATE USER, CREATE ROLE[2].

                INSERT

                INSERT INTO table [( column [,...] )]
                { VALUES(Expression [,...]) | SelectStatement};

                Adds one or more new rows of data into a table.

                REVOKE

                REVOKE { SELECT | DELETE | INSERT | UPDATE | ALL } [,...]
                ON { table | CLASS "package.class" } FROM <grantee>;
                REVOKE <rolename> [,...] FROM <grantee>[2];

                <grantee> is either a user name, a role name, or PUBLIC. PUBLIC means all users.

                The first form of the REVOKE command withdraws privileges from a grantee for a table or for a class.

                The second form of the REVOKE command withdraws membership of the specified <grantee> from the specified role.

                Both forms require Administrative privileges.

                See also: GRANT.

                ROLLBACK

                ROLLBACK [TO SAVEPOINT <savepoint name>[2] |  WORK}];

                ROLLBACK used on its own, or with WORK, undoes changes made since the last COMMIT or ROLLBACK.

                ROLLBACK TO SAVEPOINT <savepoint name> undoes the change since the named savepoint. It has no effect if the savepoint is not found.

                See also: COMMIT.

                SAVEPOINT[2]

                SAVEPOINT <savepoint name>;

                Sets up a SAVEPOINT for use with ROLLBACK TO SAVEPOINT.

                See also: COMMIT.

                SCRIPT

                SCRIPT ['file'];

                Creates an SQL script describing the database. If the file is not specified, a result set containing only the DDL script is returned. If the file is specified then this file is saved with the path relative to the machine where the database engine is located.

                Only an administrator may do this.

                SELECT[2]

                SELECT [{LIMIT <offset> <limit> | TOP <limit>}[2]][ALL | DISTINCT]
                { selectExpression | table.* | * } [, ...]
                [INTO [CACHED | TEMP  | TEXT][2] newTable]
                FROM tableList
                [WHERE Expression]
                [GROUP BY Expression [, ...]]
                [HAVING Expression]
                [{ UNION [ALL | DISTINCT] | {MINUS [DISTINCT] | EXCEPT [DISTINCT] } |
                INTERSECT [DISTINCT] } selectStatement]
                [ORDER BY orderExpression [, ...]]
                [LIMIT <limit> [OFFSET <offset>]];

                Retrieves information from one or more tables in the database.

                Components of a SELECT command

                tableList
                table [{CROSS | INNER | LEFT OUTER | RIGHT OUTER}
                    JOIN table ON Expression] [, ...]
                table
                { (selectStatement) [AS] label | tableName}
                selectExpression
                { Expression | COUNT(*) | {
                    COUNT | MIN | MAX | SUM | AVG | SOME | EVERY |
                    VAR_POP | VAR_SAMP | STDDEV_POP | STDDEV_SAMP
                } ([ALL | DISTINCT][2]] Expression) } [[AS] label]

                If DISTINCT is specified, only one instance of several equivalent values is used in the aggregate function. Except COUNT(*), all aggregate functions exclude NULL values. The type of the returned value for SUM is subject to deterministic widenning to ensure lossless results. The returned value type for COUNT is INTEGER, for MIN, MAX and AVG it is the same type as the column, for SOME and EVERY it is BOOLEAN. For VAR_POP, VAR_SAMP, STDDEV_POP and STDDEV_SAMP statistical functions, the type is always DOUBLE. These statistical functions do not allow ALL or DISTINCT qualifiers.

                If CROSS JOIN is specified no ON expression is allowed for the join.

                orderExpression
                { columnNr | columnAlias | selectExpression }
                    [ASC | DESC]
                LIMIT n m

                Creates the result set for the SELECT statement first and then discards the first n rows (OFFSET) and returns the first m rows of the remaining result set (LIMIT). Special cases: LIMIT 0 m is equivalent to TOP m or FIRST m in other RDBMS's; LIMIT n 0 discards the first n rows and returns the rest of the result set.

                LIMIT m OFFSET n

                This form is used at the end of the SELECT statement. The OFFSET term is optional.

                TOP m

                Equivalent to LIMIT 0 m.

                UNION and other set operations

                Multiple SELECT statements joined with UNION, EXCEPT and INTERSECT are possible. Each SELECT is then treated as a term, and the set operation as an operator in an expression. The expression is evaluated from left to right but INTERSECT takes precedence over the rest of the operators and is applied first. You can use parentheses around any number of SELECT statements to change the evaluation order.

                See also: INSERT, UPDATE, DELETE.

                SET AUTOCOMMIT

                SET AUTOCOMMIT { TRUE | FALSE };

                Switches on or off the connection's auto-commit mode. If switched on, then all statements will be committed as individual transactions. Otherwise, the statements are grouped into transactions that are terminated by either COMMIT or ROLLBACK. By default, new connections are in auto-commit mode. This command should not be used directly. Use the JDBC equivalent method, Connection.setAutoCommit(boolean autocommit).

                SET DATABASE COLLATION[2]

                SET DATABASE COLLATION <double quoted collation name>;

                Each database can have its own collation. Sets the collation from the set of collations in the source for org.hsqldb.Collation.

                Once this command has been issued, the database can be opened in any JVM and will retain its collation.

                SET CHECKPOINT DEFRAG[2]

                SET CHECKPOINT DEFRAG <size>;

                The parameter size is the megabytes of abandoned space in the .data file. When a CHECKPOINT is performed either as a result of the .log file reaching the limit set by "SET LOGSIZE size", or by the user issuing a CHECKPOINT command, the amount of space abandoned during the session is checked and if it is larger than size, a CHECKPOINT DEFRAG is performed instead of a checkpoint.

                SET IGNORECASE

                SET IGNORECASE { TRUE | FALSE };

                Disables (ignorecase = true) or enables (ignorecase = false) the case sensitivity of text comparison and indexing for new tables. By default, character columns in new databases are case sensitive. The sensitivity must be switched before creating tables. Existing tables and their data are not affected. When switched on, the data type VARCHAR is set to VARCHAR_IGNORECASE in new tables. Alternatively, you can specify the VARCHAR_IGNORECASE type for the definition of individual columns. So it is possible to have some columns case sensitive and some not, even in the same table.

                Only an administrator may do this.

                SET INITIAL SCHEMA [2]

                Users may change their base default schema name with the comand

                SET INITIAL SCHEMA <schemaname>;
                This is the schema which database object names will resolve to for the current user, unless overridden as explained in Schema object naming. For reasons of backwards compatibility, the initial schema value will not be persisted across database shutdowns until HSQLDB version 1.8.1. (I.e., INITIAL SCHEMA settings will be lost upon database shutdown with HSQLDB versions lower than version 1.8.1).

                SET LOGSIZE

                SET LOGSIZE <size>;

                Sets the maximum size in MB of the .log file. Default is 200 MB. The database will be closed and opened (just like using CHECKPOINT) if the .log file gets over this limit, and so the .log file will shrink. 0 means no limit.

                See also: CHECKPOINT.

                SET MAXROWS

                SET MAXROWS <maxwors>;

                Describe me!

                SET PASSWORD

                SET PASSWORD <password>;

                Changes the password of the currently connected user. Password must be double quotedEmpty password can be set using "".

                SET PROPERTY[2]

                SET PROPERTY <double quoted name> <value>;

                Sets a database property. Properties that can be set using this command are either boolean or integral and are listed in the Advanced Topics chapter.

                SET READONLY

                SET READONLY {TRUE|FALSE};

                Describe me!

                SET REFERENTIAL INTEGRITY

                SET REFERENTIAL_INTEGRITY { TRUE | FALSE };

                This commands enables / disables the referential integrity checking (foreign keys). Normally it should be switched on (this is the default) but when importing data (and the data is imported in the 'wrong' order) the checking can be switched off.

                Warning

                Note that when referential integrity is switched back on, no check is made that the changes to the data are consistent with the existing referential integrity constraints. You can verify consistency using SQL queries and take appropriate actions.

                Only an administrator may do this.

                See also: CREATE TABLE.

                SET SCHEMA[2]

                SET SCHEMA <schemaname>;

                Sets the current JDBC session's schema. The sole purpose for the session schema is to provide a default schema name for schema objects that do not have the schema name specified explicitly in the SQL command, or by association with another object of known schema. For example, if you run SELECT * FROM atbl;, HSQLDB will look for the table or view named atbl in the session's current schema.

                Session schemas last only for the duration of the current session. When a new JDBC session is obtained, the new session will have the default schema.

                SET SCRIPTFORMAT[2]

                SET SCRIPTFORMAT {TEXT | BINARY | COMPRESSED};

                Changes the format of the script file. BINARY and COMPRESSED formats are slightly faster and more compact than the default TEXT. Recommended only for very large script files.

                SET TABLE INDEX

                SET TABLE tableName INDEX 'index1rootPos index2rootPos ... ';

                This command is only used internally to store the position of index roots in the .data file. It appears only in database script files; it should not be used directly.

                SET TABLE READONLY[2]

                SET TABLE <tablename> READONLY {TRUE | FALSE};

                Sets the table as read only.

                SET TABLE SOURCE[2]

                SET TABLE <tablename> SOURCE <file and options> [DESC];

                For details see the Text Tables chapter.

                This command is used exclusively with TEXT tables to specify which file is used for storage of the data. The optional DESC qualifier results in the text file indexed from the end and opened as readonly. The <file and options> argument is a double quoted string that consists of:

                    <file and options>::= <doublequote> <filepath>
                        [<semicolon> <option>...] <doublequote>

                Example:

                    SET TABLE mytable SOURCE "myfile;fs=|;vs=.;lvs=~"

                Supported Properties

                quoted = { true | false }

                default is true. If false, treats double quotes as normal characters

                all_quoted = { true | false }

                default is false. If true, adds double quotes around all fields.

                encoding = <encoding name>

                character encoding for text and character fields, for example, encoding=UTF-8

                ignore_first = { true | false }

                default is false. If true ignores the first line of the file

                cache_scale= <numeric value>

                exponent to calculate rows of the text file in cache. Default is 8, equivalent to nearly 800 rows

                cache_size_scale = <numeric value>r

                exponent to calculate average size of each row in cache. Default is 8, equivalent to 256 bytes per row.

                fs = <unquoted character>

                field separator

                vs = <unquoted character>

                varchar separator

                lvs = <unquoted character>

                long varchar separator

                Special indicators for Hsqldb Text Table separators

                \semi

                semicolon

                \quote

                quote

                \space

                space character

                \apos

                apostrophe

                \n

                newline - Used as an end anchor (like $ in regular expressions)

                \r

                carriage return

                \t

                tab

                \\

                backslash

                \u####

                a Unicode character specified in hexadecimal

                Only an administrator may do this.

                SET WRITE DELAY[2]

                SET WRITE_DELAY {{ TRUE | FALSE } | <seconds> | <milliseconds> MILLIS};

                This controls the frequency of file sync for the log file. When WRITE_DELAY is set to FALSE or 0, the sync takes place immediately at each COMMIT. WRITE_DELAY TRUE performs the sync once every 20 seconds (which is the default). A numeric value can be specified instead.

                The purpose of this command is to control the amount of data loss in case of a total system crash. A delay of 1 second means at most the data written to disk during the last second before the crash is lost. All data written prior to this has been synced and should be recoverable.

                A write delay of 0 impacts performance in high load situations, as the engine has to wait for the file system to catch up.

                To avoid this, you can set write delay down to 10 milliseconds. In practice, a write delay of 100 milliseconds provides better than 99.9999% reliability with an average one system crash per day, or 99.99999% with an average one system crash per 6 days.

                Each time a SET WRITE_DELAY is issued with any value, a sync is immediately performed.

                Only an administrator may do this.

                SHUTDOWN

                SHUTDOWN [IMMEDIATELY | COMPACT | SCRIPT[2]];

                Closes the current database.

                Varieties of the SHUTDOWN command

                SHUTDOWN

                Performs a checkpoint to creates a new .script file that has the minimum size and contains the data for memory tables only. It then backs up the .data file containing the CACHED TABLE data in zipped format to the .backup file and closes the database.

                SHUTDOWN IMMEDIATELY

                Just closes the database files (like when the Java process for the database is terminated); this command is used in tests of the recovery mechanism. This command should not be used as the routine method of closing the database.

                SHUTDOWN COMPACT

                Writes out a new .script file which contains the data for all the tables, including CACHED and TEXT tables. It then deletes the existing text table files and the .data file before rewriting them. After this, it backs up the .data file in the same way as normal SHUTDOWN. This operation shrinks all files to the minimum size.

                SHUTDOWN SCRIPT

                Similar to SHUTDOWN COMPACT but after writing the script and deleting the existing files, it does not rewrite the .data and text table files. After SHUTDOWN SCRIPT, only the .script and .properties file remain. At the next startup, these files are processed and the .data and .backup files are created. This command in effect performs part of the job of SHUTDOWN COMPACT, leaving the other part to be performed automatically at the next startup.

                This command produces a full script of the database which can be edited for special purposes prior to the next startup.

                Only an administrator may use the SHUTDOWN command.

                UPDATE

                UPDATE table SET column = Expression [, ...] [WHERE Expression];

                Modifies data of a table in the database.

                See also: SELECT[2], INSERT, DELETE.

                Schema object naming

                Schema objects are database objects that are always scoped to a specific schema. Each schema has a namespace. There may be multiple schema objects of the same name, each in the namespace of a different schema. A particular schema object may nearly always be uniquely identified using the notation schemaname.objectname. All HSQLDB database objects are schema objects, other than the following.

                Users

                Roles

                Store Procedure Java Classes

                HSQL Aliases

                Our current Java-class-based Triggers are not fully schema objects. However, we are in the process of implementing SQL-conformant triggers which will encompass our Java-class-based triggers. When this work is completed, HSQLDB triggers will be schema objects.

                Sequences are schema objects with creation and removal permission governed by schema authorization (as described hereafter), but GRANT and REVOKE command do not work yet for sequences. In a future version of HSQLDB, sequence GRANTs and REVOKEs will work similarly to the current GRANT and REVOKE commands for table access.

                Most of the time, you do not need to specify the schema for the desired schema object, because the implicit schema is usually the only one that can be used. For example, when creating an index, the target schema will default to that of the table which is the target of the index. Named constraints are an extreme example of this. There is never a need to specify a schema name for a constraint, since constraint names are only specified in a CREATE or ALTER TABLE command, and the schema must be that of the target table. If the implicit schema is not determined by a related object, then the default comes from your JDBC session's current schema setting. The session schema value will be your login user's initial schema, or whatever you last set it to with SET SCHEMA[2] in your current JDBC session with the SET SCHEMA command. (Your initial schema is "PUBLIC" unless changed with the ALTER USER SET INITIAL SCHEMA or the SET INITIAL SCHEMA [2] command).

                In addition to namespace scoping, there are permission aspects to the schema of a database object. The authorization of a schema is a role or user that is basically the owner of the schema. Only a user with the DBA role (an admin user) or the owner of a schema may create objects, or modify the DDL of objects, in the namespace of that schema. In this way, a schema authorization is said to "own" the objects of that schema. A schema authorization/owner can be a role or a user (even a role with no members). The two schemas automatically created when a database is initialized are both owned by the role DBA.

                An important implication to database objects being owned by the schema owner is, if a non-DBA database user is to have permission to create any database object, they must have ownership of a schema. To allow a user to create (or modify DDL of) objects in their own personal schema, you would create a new schema with that user as the authorization. To allow a non-DBA user to share create and DDL privileges in some schema, you would create this schema with a role as the authorization, then GRANT this role to all of the desired users.

                The INFORMATION_SCHEMA is a system defined schema that contains the system tables for the database. This schema is read-only. When a database is created, a shema named PUBLIC is automatically created as the default schma. This schema has the authorization DBA. You can change the name of this schema. If all non-system schemas are dropped from a database, an empty PUBLIC schema is created again. So each database always has at least one non-system schema.

                Data Types

                Table 9.1. Data Types. The types on the same line are equivalent.

                NameRangeJava Type
                INTEGER | INTas Java typeint | java.lang.Integer
                DOUBLE [PRECISION] | FLOATas Java typedouble | java.lang.Double
                VARCHARas Integer.MAXVALUEjava.lang.String
                VARCHAR_IGNORECASEas Integer.MAXVALUEjava.lang.String
                CHAR | CHARACTERas Integer.MAXVALUEjava.lang.String
                LONGVARCHARas Integer.MAXVALUEjava.lang.String
                DATEas Java typejava.sql.Date
                TIMEas Java typejava.sql.Time
                TIMESTAMP | DATETIMEas Java typejava.sql.Timestamp
                DECIMALNo limitjava.math.BigDecimal
                NUMERICNo limitjava.math.BigDecimal
                BOOLEAN | BITas Java typeboolean | java.lang.Boolean
                TINYINTas Java typebyte | java.lang.Byte
                SMALLINTas Java typeshort | java.lang.Short
                BIGINTas Java typelong | java.lang.Long
                REALas Java typedouble | java.lang.Double[2]
                BINARYas Integer.MAXVALUEbyte[]
                VARBINARYas Integer.MAXVALUEbyte[]
                LONGVARBINARYas Integer.MAXVALUEbyte[]
                OTHER | OBJECTas Integer.MAXVALUEjava.lang.Object

                The uppercase names are the data types names defined by the SQL standard or commonly used by RDMS's. The data types in quotes are the Java class names - if these type names are used then they must be enclosed in quotes because in Java names are case-sensitive. Range indicates the maximum size of the object that can be stored. Where Integer.MAXVALUE is stated, this is a theoretical limit and in practice the maximum size of a VARCHAR or BINARY object that can be stored is dictated by the amount of memory available. In practice, objects of up to a megabyte in size have been successfully used in production databases.

                The recommended Java mapping for the JDBC datatype FLOAT is as a Java type "double". Because of the potential confusion it is recommended that DOUBLE is used instead of FLOAT.

                VARCHAR_IGNORECASE is a special case-insensitive type of VARCHAR. This type is not portable.

                In table definition statements, HSQLDB accepts size, precision and scale qualifiers only for certain types: CHAR(s), VARCHAR(s), DOUBLE(p), NUMERIC(p), DECIMAL(p,s) and TIMESTAMP(p).

                TIMESTAMP(p) can take only 0 or 6 as precision. Zero indicates no subsecond part. Without the precision, the default is 6.

                By default specified precision and scale for the column is simply ignored by the engine. Instead, the values for the corresponding Java types are always used, which in the case of DECIMAL is an unlimited precision and scale. If a size is specified, it is stored in the database definition but is not enforeced by default. Once you have created the database (before adding data), you can add a database property value to enforce the sizes:

                    SET PROPERTY "sql.enforce_strict_size" true

                This will enforce the specified size and pad CHAR fields with spaces to fill the size. This complies with SQL standards by throwing an exception if an attempt is made to insert a string longer than the maximum size. It also results in all DECIMAL values conforming to the specified precision and scale.

                CHAR and VARCHAR and LONGVARCHAR columns are by default compared and sorted according to POSIX standards. See the SET DATABASE COLLATION[2] section above to modify this behavior. The property sql.compare_in_locale is no longer supported. Instead, you can define a collation to be used for all character comparisons.

                Columns of the type OTHER or OBJECT contain the serialized form of a Java Object in binary format. To insert or update such columns, a binary format string (see below under Expression) should be used. Using PreparedStatements with JDBC automates this transformation.

                SQL Comments

                -- SQL style line comment
                // Java style line comment
                /* C style line comment */

                All these types of comments are ignored by the database.

                Stored Procedures / Functions

                Stored procedures are static Java functions that are called directly from the SQL language or using an alias. Calling Java functions (directly or using the alias) requires that the Java class can be reached by the database (server). The syntax is:

                    "java.lang.Math.sqrt"(2.0)

                This means the package must be provided, and the name must be written as one word, and inside " because otherwise it is converted to uppercase (and not found).

                An alias can be created using the command CREATE ALIAS:

                    CREATE ALIAS SQRT FOR "java.lang.Math.sqrt";

                When an alias is defined, then the function can be called additionally using this alias:

                    SELECT SQRT(A) , B FROM MYTABLE;

                Only static java methods can be used as stored procedures. If, within the same class, there are overloaded methods with the same number of arguments, then the first one encountered by the program will be used. If you want to use Java library methods, it is recommended that you create your own class with static methods that act as wrappers around the Java library methods. This will allow you to control which method signature is used to call each Java library method.

                Built-in Functions and Stored Procedures

                Numerical built-in Functions / Stored Procedures

                ABS(d)

                returns the absolute value of a double value

                ACOS(d)

                returns the arc cosine of an angle

                ASIN(d)

                returns the arc sine of an angle

                ATAN(d)

                returns the arc tangent of an angle

                ATAN2(a,b)

                returns the tangent of a/b

                BITAND(a,b)

                return a & b

                BITOR(a,b)

                returns a | b

                CEILING(d)

                returns the smallest integer that is not less than d

                COS(d)

                returns the cosine of an angle

                COT(d)

                returns the cotangent of an angle

                DEGREES(d)

                converts radians to degrees

                EXP(d)

                returns e (2.718...) raised to the power of d

                FLOOR(d)

                returns the largest integer that is not greater than d

                LOG(d)

                returns the natural logarithm (base e)

                LOG10(d)

                returns the logarithm (base 10)

                MOD(a,b)

                returns a modulo b

                PI()

                returns pi (3.1415...)

                POWER(a,b)

                returns a raised to the power of b

                RADIANS(d)

                converts degrees to radians

                RAND()

                returns a random number x bigger or equal to 0.0 and smaller than 1.0

                ROUND(a,b)

                rounds a to b digits after the decimal point

                ROUNDMAGIC(d)

                solves rounding problems such as 3.11-3.1-0.01

                SIGN(d)

                returns -1 if d is smaller than 0, 0 if d==0 and 1 if d is bigger than 0

                SIN(d)

                returns the sine of an angle

                SQRT(d)

                returns the square root

                TAN(A)

                returns the trigonometric tangent of an angle

                TRUNCATE(a,b)

                truncates a to b digits after the decimal point

                String built-in Functions / Stored Procedures

                ASCII(s)

                returns the ASCII code of the leftmost character of s

                BIT_LENGTH(str)[2]

                returns the length of the string in bits

                CHAR(c)

                returns a character that has the ASCII code c

                CHAR_LENGTH(str)[2]

                returns the length of the string in characters

                CONCAT(str1,str2)

                returns str1 + str2

                DIFFERENCE(s1,s2)

                returns the difference between the sound of s1 and s2

                HEXTORAW(s1)[2]

                returns translated string

                INSERT(s,start,len,s2)

                returns a string where len number of characters beginning at start has been replaced by s2

                LCASE(s)

                converts s to lower case

                LEFT(s,count)

                returns the leftmost count of characters of s) - requires double quoting - use SUBSTRING() instead

                LENGTH(s)

                returns the number of characters in s

                LOCATE(search,s,[start])

                returns the first index (1=left, 0=not found) where search is found in s, starting at start

                LTRIM(s)

                removes all leading blanks in s

                OCTET_LENGTH(str)[2]

                returns the length of the string in bytes (twice the number of characters)

                RAWTOHEX(s1)[2]

                returns translated string

                REPEAT(s,count)

                returns s repeated count times

                REPLACE(s,replace,s2)

                replaces all occurrences of replace in s with s2

                RIGHT(s,count)

                returns the rightmost count of characters of s

                RTRIM(s)

                removes all trailing spaces

                SOUNDEX(s)

                returns a four character code representing the sound of s

                SPACE(count)

                returns a string consisting of count spaces

                SUBSTR(s,start[,len])

                alias for substring

                SUBSTRING(s,start[,len])

                returns the substring starting at start (1=left) with length len

                UCASE(s)

                converts s to upper case

                LOWER(s)

                converts s to lower case

                UPPER(s)

                converts s to upper case

                Date/Time built-in Functions / Stored Procedures

                CURDATE()

                returns the current date

                CURTIME()

                returns the current time

                DATEDIFF(string, datetime1, datetime2)[2]

                returns the count of units of time elapsed from datetime1 to datetime2. The string indicates the unit of time and can have the following values 'ms'='millisecond', 'ss'='second','mi'='minute','hh'='hour', 'dd'='day', 'mm'='month', 'yy' = 'year'. Both the long and short form of the strings can be used.

                DAYNAME(date)

                returns the name of the day

                DAYOFMONTH(date)

                returns the day of the month (1-31)

                DAYOFWEEK(date)

                returns the day of the week (1 means Sunday)

                DAYOFYEAR(date)

                returns the day of the year (1-366)

                HOUR(time)

                return the hour (0-23)

                MINUTE(time)

                returns the minute (0-59)

                MONTH(date)

                returns the month (1-12)

                MONTHNAME(date)

                returns the name of the month

                NOW()

                returns the current date and time as a timestamp) - use CURRENT_TIMESTAMP instead

                QUARTER(date)

                returns the quarter (1-4)

                SECOND(time)

                returns the second (0-59)

                WEEK(date)

                returns the week of this year (1-53)

                YEAR(date)

                returns the year

                CURRENT_DATE[2]

                returns the current date

                CURRENT_TIME[2]

                returns the current time

                CURRENT_TIMESTAMP[2]

                returns the current timestamp

                System/Connection built-in Functions / Stored Procedures

                DATABASE()

                returns the name of the database of this connection

                USER()

                returns the user name of this connection

                CURRENT_USER

                SQL standard function, returns the user name of this connection

                IDENTITY()

                returns the last identity values that was inserted by this connection

                System built-in Functions / Stored Procedures

                IFNULL(exp,value)

                if exp is null, value is returned else exp) - use COALESCE() instead

                CASEWHEN(exp,v1,v2)

                if exp is true, v1 is returned, else v2) - use CASE WHEN instead

                CONVERT(term,type)

                converts exp to another data type

                CAST(term AS type)[2]

                converts exp to another data type

                COALESCE(expr1,expr2,expr3,...)[2]

                if expr1 is not null then it is returned else, expr2 is evaluated and if not null it is returned and so on

                NULLIF(v1,v2)[2]

                if v1 equals v2 return null, otherwise v1

                CASE v1 WHEN...[2]

                CASE v1 WHEN v2 THEN v3 [ELSE v4] END

                when v1 equals v2 return v3 [otherwise v4 or null if there is no ELSE]

                CASE WHEN...[2]

                CASE WHEN expr1 THEN v1[WHEN expr2 THEN v2] [ELSE v4] END

                when expr1 is true return v1 [optionally repeated for more cases] [otherwise v4 or null if there is no ELSE]

                EXTRACT[2]

                EXTRACT ({YEAR | MONTH | DAY | HOUR | MINUTE | SECOND} FROM <datetime value>)

                POSITION (... IN ..)[2]

                POSITION(<string expression> IN <string expression>)

                if the first string is a sub-string of the second one, returns the position of the sub-string, counting from one; otherwise 0

                SUBSTRING(... FROM ... FOR ...)[2]

                SUBSTRING(<string expression> FROM <numeric expression> [FOR <numeric expression>])

                TRIM( LEDING ... FROM ...)[2]

                TRIM([{LEADING | TRAILING | BOTH}] FROM <string expression>)

                See also: CALL, CREATE ALIAS.

                SQL Expression

                [NOT] condition [{ OR | AND } condition]

                Components of SQL Expressions

                condition
                   { value [|| value]
                  | value { = | < | <= | > | >= | <> | != } value
                  | value IS [NOT] NULL
                  | EXISTS(selectStatement)
                  | value BETWEEN value AND value
                  | value [NOT] IN ( {value [, ...] | selectStatement } )
                  | value [NOT] LIKE value [ESCAPE] value }
                value
                   [+ | -] { term [{ + | - | * | / | || } term]
                  | ( condition )
                  | function ( [parameter] [,...] )
                  | selectStatement giving one value
                  | {ANY|ALL} (selectStatement giving single column)
                term
                   { 'string' | number | floatingpoint
                  | [table.]column | TRUE | FALSE | NULL }
                sequence
                   NEXT VALUE FOR <sequence>

                HSQLDB does not currently enforce the SQL 200n proposed rules on where sequence generated values are allowed to be used. In general, these values can be used in insert and update statements but not in CASE statements, order by clauses, search conditions, aggregate functions, or grouped queries.

                string

                Strings in HSQLDB are Unicode strings. A string starts and ends with a single ' (singlequote). In a string started with ' (singlequote) use '' (two singlequotes) to create a ' (singlequote).

                String contatenation should be performed with the standard SQL operator || rather than the non-standard + operator.

                The LIKE keyword uses '%' to match any (including 0) number of characters, and '_' to match exactly one character. To search for '%' or '_' itself an escape character must also be specified using the ESCAPE clause. For example, if the backslash is the escaping character, '\%' and '\_' can be used to find the '%' and '_' characters themselves. For example, SELECT .... LIKE '\_%' ESCAPE '\' will find the strings beginning with an underscore.

                name

                The character set for quoted identifiers (names) in HSQLDB is Unicode.

                A unquoted identifier (name) starts with a letter and is followed by any number of ASCII letters or digits. When an SQL statement is issued, any lowercase characters in unquoted identifiers are converted to uppercase. Because of this, unquoted names are in fact ALL UPPERCASE when used in SQL statements. An important implication of this is the for accessing columns names via JDBC DatabaseMetaData: the internal form, which is the ALL UPPERCASE must be used if the column name was not quoted in the CREATE TABLE statement.

                Quoted identifiers can be used as names (for tables, columns, constraints or indexes). Quoted identifiers start and end with " (one doublequote). A quoted identifier can contain any Unicode character, including space. In a quoted identifier use "" (two doublequotes) to create a " (one doublequote). With quoted identifiers it is possible to create mixed-case table and column names. Example:

                    CREATE TABLE "Address" ("Nr" INTEGER,"Name" VARCHAR);
                    SELECT "Nr", "Name" FROM "Address";

                The equivalent quoted identifier can be used for an unquoted identifer by converting the identifier to all uppercase and quoting it. For example, if a table name is defined as Address2 (unquoted), it can be referred to by its quoted form, "ADDRESS2", as well as address2, aDDress2 and ADDRESS2. Quoted identifiers should not be confused with SQL strings.

                Quoting can sometimes be used for identifiers, aliases or functions when there is an ambiguity. For example:

                    SELECT COUNT(*) "COUNT" FROM MYTABLE;
                    SELECT "LEFT"(COL1, 2) FROM MYTABLE;

                Although HSQLDB 1.8.0 does not force unquoted identifiers to contain only ASCII characters, the use of non-ASCII characters in these identifiers does not comply with SQL standards. Portability between different JRE locales could be an issue when accented characters (or extended unicode characters) are used in unquoted identifiers. Because native Java methods are used to convert the identifier to uppercase, the result may vary not be expected in different locales. It is recommended that accented characters are used only in quoted identifiers.

                When using JDBC DatabaseMetaData methods that take table, column, or index identifiers as arguments, treat the names as they are registered in the database. With these methods, unquoted identifiers should be used in all-uppercase to get the correct result. Quoted identifiers should be used in the exact case combination as they were defined - no quote character should be included around the name. JDBC methods that return a result set containing such identifiers return unquoted identifiers as all-uppercase and quoted identifiers in the exact case they are registered in the database (a change from 1.6.1 and previous versions).

                Please also note that the JDBC getXXX(String columnName) methods interpret the columnName as case-independent. This is a general feature of JDBC and not specific to HSQLDB.

                password

                Passwords must be double quoted and used consistently. Passwords are case insensitive only for backward compatibility. This may change in future versions.

                values
                • A DATE literal starts and ends with ' (singlequote), the format is yyyy-mm-dd (see java.sql.Date.

                • A TIME liteal starts and ends with ' (singlequote), the format is hh:mm:ss (see java.sql.Time).

                • A TIMESTAMP or DATETIME literal starts and ends with ' (singlequote), the format is yyyy-mm-dd hh:mm:ss.SSSSSSSSS (see java.sql.Timestamp).

                When specifying default values for date / time columns in CREATE TABLE statements, or in SELECT,INSERT, and UPDATE statements, special SQL functions: NOW, SYSDATE, TODAY, CURRENT_TIMESTAMP, CURRENT_TIME and CURRENT_DATE (case independent) can be used. NOW is used for TIME and TIMESTAMP columns, TODAY is used for DATE columns. The data and time variants CURRENT_* are SQL standard versions and should be used in preference to others. Example:

                    CREATE TABLE T(D DATE DEFAULT CURRENT_DATE);
                    CREATE TABLE T1(TS TIMESTAMP DEFAULT CURRENT_TIMESTAMP);

                Binary data starts and ends with ' (singlequote), the format is hexadecimal. '0004ff' for example is 3 bytes, first 0, second 4 and last 255 (0xff).

                Any number of commands may be combined. With combined commands, ';' (semicolon) must be used at the end of each command to ensure data integrity, despite the fact that the engine may understand the end of commands and not return an error when a semicolon is not used.



                [2] These features were added by HSQL Development Group since April 2001

                Appendix A. Building HSQLDB

                Fred Toussi

                HSQLDB Development Group

                $Date: 2005/05/26 23:22:06 $

                Purpose

                From 1.8.0, the supplied hsqldb.jar file is built with Java 1.5. If you want to run the engine under JDK1.3 or earlier, you should rebuild the jar with Ant.

                Building with Ant, from the Apache Jakarta Project

                Ant (Another Neat Tool) is used for building hsqldb. The version currently used to test the build script is 1.6.1 but versions since 1.5.1 should also be compatible.

                Obtaining Ant

                Ant is a part of the Jakarta/Apache Project.

                Building Hsqldb with Ant

                Once you have unpacked the zip package for hsqldb, under the /hsqldb folder, in /build there is a build.xml file that builds the hsqldb.jar with Ant (Ant must be already installed). To use it, change to /build then type:

                 ant -projecthelp

                This displays the available ant targets, which you can supply as command line arguments to ant. These include

                hsqldb

                to make the hsqldb.jar

                explainjars

                Lists all targets which build jar files, with an explanation of the purposes of the different jars.

                clean

                to clean up the /classes directory that is created

                cleanall

                to remove the old jar as well

                javadoc

                to build javadoc

                hsqldbmain

                to build a smaller jar for HSQLDB that does not contain utilities

                hsqljdbc

                to build an extremely small jar containing only the client-side JDBC driver (does not support direct connection to HSQLDB URLs of the form jdbc:hsldb:mem:*, jdbc:hsqldb:file:*, nor jdbc:hsqldb:res:*).

                hsqldbmin

                to build a small jar that supports HSQLDB URLs of the form jdbc:hsqldb:mem:*, jdbc:hsqld:file*, jdbc:hsqldb:res:*; but not network URLs like jdbc:hsql* or jdbc:http*.

                hsqldbtest

                to build a larger jar for hsqldb that contains tests

                ...

                Many more targets are available. Run ant -projecthelp and ant explainjars.

                HSQLDB can be built in any combination of three JRE (Java Runtime Environment) versions and many jar file sizes. The smallest jar size(hsqljdbc.jar) contains only the HSQLDB JDBC Driver client. The default size (hsqldb.jar) also contains server mode support and the utilities. The largest size (hsqldbtest.jar)includes some test classes as well. Before building the hsqldbtest.jar package, you should download the junit jar from http://www.junit.org and put it in the /lib directory, alongside servlet.jar, which is included in the .zip package.

                Just run ant explainjars for a concise list of all available jar files.

                If you want your code built for debugging, as opposed to high performance, make a file named build.properties in your build directory with the contents

                build.debug: true
                The resulting Java binaries will be larger and slower, but exception stack traces will contain source code line numbers, which can be extremely useful for debugging.

                The preferred method of rebuilding the jar is with Ant. After installing Ant on your system use the following command from the /build directory:

                ant explainjars

                The command displays a list of different options for building different sizes of the HSQLDB Jar. The default is built using:

                Example A.1. Buiding the standard Hsqldb jar file with Ant

                ant hsqldb

                The Ant method always builds a jar with the JDK that is used by Ant and specified in its JAVA_HOME environment variable. Building with JDK 1.4.x or 1.5.x will result in a jar that is not backward compatible.

                From version 1.7.2, use of JDK 1.1.x is not recommended for building the JAR, even for running under JDK 1.1.x -- use JDK 1.3.1 for compatibility with 1.1.x. This is done in the following way. JDK 1.3.1 should be used as the JAVA_HOME for ant. You then issue the following commands. The first command will make the sources compatible with JDK 1.3, the second command modifies the sources further so that the compiled result can run under jdk 1.1 as well. The third command builds the jar.

                ant switchtojdk12
                ant switchtojava1target
                ant hsqldb
                

                Building with DOS Batch Files

                UNIX users must use Ant to build hsqldb.

                For DOS/Windows users, a set of MSDOS batch files is provided as an example. These files produce only the default jar size. The path and classpath variables for the JDK should of course be set before running any of the batch files. These files are not currently maintained and will probably need some additions and changes to work correctly. Please see the build.xml file for up-to-date file

                If you are compiling for JDK's other than 1.4.x, you should use the appropriate switchToJDK11.bat or switchToJDK12.bat to adapt the source files to the target JDK before running the appropriate buildJDK11.bat or buildJDK12.bat JDK and JRE versions.

                Hsqldb CodeSwitcher

                CodeSwitcher is a tool to manage different version of Java source code. It allows to compile HSQLDB for different JDKs. It is something like a precompiler in C but it works directly on the source code and does not create intermediate output or extra files.

                CodeSwitcher is used internally in HSQLDB build scripts. You do not have to use it separately to compile HSQLDB.

                CodeSwitcher reads the source code of a file, removes comments where appropriate and comments out the blocks that are not used for a particular version of the file. This operation is done for all files of a defined directory, and all subdirectories.

                Example A.2. Example source code before CodeSwitcher is run

                        ...
                
                    //#ifdef JAVA2
                
                        properties.store(out,"hsqldb database");
                
                    //#else
                
                    /*
                
                        properties.save(out,"hsqldb database");
                
                    */
                
                    //#endif
                
                        ...

                The next step is to run CodeSwitcher.

                Example A.3. CodeSwitcher command line invocation

                    java org.hsqldb.util.CodeSwitcher . -JAVA2

                The '.' means the program works on the current directory (all subdirectories are processed recursively). -JAVA2 means the code labelled with JAVA2 must be switched off.

                Example A.4. Source code after CodeSwitcher processing

                        ...
                
                    //#ifdef JAVA2
                
                    /*
                
                        pProperties.store(out,"hsqldb database");
                
                    */
                
                    //#else
                
                        pProperties.save(out,"hsqldb database");
                
                    //#endif
                
                        ...

                For detailed information on the command line options run java org.hsqldb.util.CodeSwitcher. Usage examples can be found in the switchtojdk1*.bat files in the /build directory.

                Building documentation

                To build the User Guide in HTML format, you must have the Docbook stylesheets installed locally. The Docbook stylesheets are available on the Internet. On Linux, just install the docbook-xsl-stylesheets rpm. Then add an entry to build.properties in your build directory with contents like

                docbook.xsl.home: /usr/share/sgml/docbook/docbook-xsl-stylesheets
                Where you specify your local path to the base directory of your Docbook stylesheet installation. Build like

                Example A.5. Building HTML User Guides

                ant docbooks-html
                ant docbooks-chunk

                To build the User Guide in PDF format, you must also have the Java FOP system installed locally. FOP is available for free download on the Internet. Add an entry to build.properties in your build directory with contents like

                fop.home /usr/local/fop-0.20.5
                Where you specify your local path to the base directory of your FOP installation.

                Example A.6. Building User Guides in all formats

                ant docbook
                Don't pay too much attention to error messages by FOP, because they are really warnings, but do check the output. If there are problems with the PDF output, try using a newer version of FOP.

                Important

                By default, your docs will fail to build if you do not have Internet connectivity. This is because our primary Docbook source file references the Docbook DTDs via Internet URL. You can build without Internet connectivity by installing the Docbook DTDs and editing our primary Docbook source file. Docbook is available on the Internet. On Linux, just install the docbook-dtds or docbook rpm. Then make one edit to the file docsrc/guide/guide.xml in your HSQLDB distribution. Change the line containing

                "http://www.oasis-open.org/docbook/xml/4.2CR1/docbookx.dtd" [
                to
                "file:///usr/share/xml/docbook/schema/dtd/4.2/docbookx.dtd" [
                where the second filepath is the path to the docbookx.dtd file within your Docbook installation.

                Appendix B. First JDBC Client Example

                There is a copy of Testdb.java in the directory src/org/hsqldb/sample of your HSQLDB distribution.

                Example B.1. JDBC Client source code example

                /* Copyright (c) 2001-2005, The HSQL Development Group
                 * All rights reserved.
                 *
                 * Redistribution and use in source and binary forms, with or without
                 * modification, are permitted provided that the following conditions are met:
                 *
                 * Redistributions of source code must retain the above copyright notice, this
                 * list of conditions and the following disclaimer.
                 *
                 * Redistributions in binary form must reproduce the above copyright notice,
                 * this list of conditions and the following disclaimer in the documentation
                 * and/or other materials provided with the distribution.
                 *
                 * Neither the name of the HSQL Development Group nor the names of its
                 * contributors may be used to endorse or promote products derived from this
                 * software without specific prior written permission.
                 *
                 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
                 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
                 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
                 * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG,
                 * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
                 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
                 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
                 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
                 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
                 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
                 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
                 */
                
                
                package org.hsqldb.sample;
                
                import java.sql.Connection;
                import java.sql.DriverManager;
                import java.sql.ResultSet;
                import java.sql.ResultSetMetaData;
                import java.sql.SQLException;
                import java.sql.Statement;
                
                /**
                 * Title:        Testdb
                 * Description:  simple hello world db example of a
                 *               standalone persistent db application
                 *
                 *               every time it runs it adds four more rows to sample_table
                 *               it does a query and prints the results to standard out
                 *
                 * Author: Karl Meissner karl@meissnersd.com
                 */
                public class Testdb {
                
                    Connection conn;                                                //our connnection to the db - presist for life of program
                
                    // we dont want this garbage collected until we are done
                    public Testdb(String db_file_name_prefix) throws Exception {    // note more general exception
                
                        // Load the HSQL Database Engine JDBC driver
                        // hsqldb.jar should be in the class path or made part of the current jar
                        Class.forName("org.hsqldb.jdbcDriver");
                
                        // connect to the database.   This will load the db files and start the
                        // database if it is not alread running.
                        // db_file_name_prefix is used to open or create files that hold the state
                        // of the db.
                        // It can contain directory names relative to the
                        // current working directory
                        conn = DriverManager.getConnection("jdbc:hsqldb:"
                                                           + db_file_name_prefix,    // filenames
                                                           "sa",                     // username
                                                           "");                      // password
                    }
                
                    public void shutdown() throws SQLException {
                
                        Statement st = conn.createStatement();
                
                        // db writes out to files and performs clean shuts down
                        // otherwise there will be an unclean shutdown
                        // when program ends
                        st.execute("SHUTDOWN");
                        conn.close();    // if there are no other open connection
                    }
                
                //use for SQL command SELECT
                    public synchronized void query(String expression) throws SQLException {
                
                        Statement st = null;
                        ResultSet rs = null;
                
                        st = conn.createStatement();         // statement objects can be reused with
                
                        // repeated calls to execute but we
                        // choose to make a new one each time
                        rs = st.executeQuery(expression);    // run the query
                
                        // do something with the result set.
                        dump(rs);
                        st.close();    // NOTE!! if you close a statement the associated ResultSet is
                
                        // closed too
                        // so you should copy the contents to some other object.
                        // the result set is invalidated also  if you recycle an Statement
                        // and try to execute some other query before the result set has been
                        // completely examined.
                    }
                
                //use for SQL commands CREATE, DROP, INSERT and UPDATE
                    public synchronized void update(String expression) throws SQLException {
                
                        Statement st = null;
                
                        st = conn.createStatement();    // statements
                
                        int i = st.executeUpdate(expression);    // run the query
                
                        if (i == -1) {
                            System.out.println("db error : " + expression);
                        }
                
                        st.close();
                    }    // void update()
                
                    public static void dump(ResultSet rs) throws SQLException {
                
                        // the order of the rows in a cursor
                        // are implementation dependent unless you use the SQL ORDER statement
                        ResultSetMetaData meta   = rs.getMetaData();
                        int               colmax = meta.getColumnCount();
                        int               i;
                        Object            o = null;
                
                        // the result set is a cursor into the data.  You can only
                        // point to one row at a time
                        // assume we are pointing to BEFORE the first row
                        // rs.next() points to next row and returns true
                        // or false if there is no next row, which breaks the loop
                        for (; rs.next(); ) {
                            for (i = 0; i < colmax; ++i) {
                                o = rs.getObject(i + 1);    // Is SQL the first column is indexed
                
                                // with 1 not 0
                                System.out.print(o.toString() + " ");
                            }
                
                            System.out.println(" ");
                        }
                    }                                       //void dump( ResultSet rs )
                
                    public static void main(String[] args) {
                
                        Testdb db = null;
                
                        try {
                            db = new Testdb("db_file");
                        } catch (Exception ex1) {
                            ex1.printStackTrace();    // could not start db
                
                            return;                   // bye bye
                        }
                
                        try {
                
                            //make an empty table
                            //
                            // by declaring the id column IDENTITY, the db will automatically
                            // generate unique values for new rows- useful for row keys
                            db.update(
                                "CREATE TABLE sample_table ( id INTEGER IDENTITY, str_col VARCHAR(256), num_col INTEGER)");
                        } catch (SQLException ex2) {
                
                            //ignore
                            //ex2.printStackTrace();  // second time we run program
                            //  should throw execption since table
                            // already there
                            //
                            // this will have no effect on the db
                        }
                
                        try {
                
                            // add some rows - will create duplicates if run more then once
                            // the id column is automatically generated
                            db.update(
                                "INSERT INTO sample_table(str_col,num_col) VALUES('Ford', 100)");
                            db.update(
                                "INSERT INTO sample_table(str_col,num_col) VALUES('Toyota', 200)");
                            db.update(
                                "INSERT INTO sample_table(str_col,num_col) VALUES('Honda', 300)");
                            db.update(
                                "INSERT INTO sample_table(str_col,num_col) VALUES('GM', 400)");
                
                            // do a query
                            db.query("SELECT * FROM sample_table WHERE num_col < 250");
                
                            // at end of program
                            db.shutdown();
                        } catch (SQLException ex3) {
                            ex3.printStackTrace();
                        }
                    }    // main()
                }    // class Testdb
                
                

                Appendix C. Hsqldb Database Files and Recovery

                This text is based on HypersonicSQL documentation, updated to reflect the latest version 1.8.0 of HSQLDB.

                $Date: 2005/07/01 17:06:32 $

                The Standalone and Client/Server modes will in most cases use files to store all data to disk in a persistent and safe way. This document describes the meaning of the files, the states and the procedures followed by the engine to recover the data.

                A database named 'test' is used in this description. The database files will be as follows.

                Database Files

                test.properties

                Contains the entry 'modified'. If the entry 'modified' is set to 'yes' then the database is either running or was not closed correctly (because the close algorithm sets 'modified' to 'no' at the end).

                test.script

                This file contains the SQL statements that makes up the database up to the last checkpoint - it is in synch with test.backup.

                test.data

                This file contains the (binary) data records for CACHED tables only.

                test.backup

                This is compressed file that contains the complete backup of the old test.data file at the time of last checkpoint.

                test.log

                This file contains the extra SQL statements that have modified the database since the last checkpoint (something like the 'Redo-log' or 'Transaction-log', but just text).

                In the above list, a checkpoint results from both a CHECKPOINT command and a SHUTDOWN command.

                States

                Database is closed correctly

                State after using the command SHUTDOWN

                • The test.data file is fully updated.

                • The test.backup contains the compressed test.data file.

                • The test.script contains the information in the database, excluding data for CACHED and TEXT tables.

                • The test.properties contains the entry 'modified' set to 'no'.

                • There is no test.log file.

                Database is closed correctly with SHUTDOWN SCRIPT

                State after using the command SHUTDOWN SCRIPT

                • The test.data file does not exist; all CACHED table data is in the test.script file

                • The test.backup does not exist.

                • The test.script contains the information in the database, including data for CACHED and TEXT tables.

                • The test.properties contains the entry 'modified' set to 'no'.

                • There is no test.log file.

                Database is aborted

                This may happen by sudden power off, Ctrl+C in Windows, but may be simulated using the command SHUTDOWN IMMEDIATELY.

                Aborted Database state

                • The test.properties still containes 'modified=yes'.

                • The test.script contains a snapshot of the database at the last checkpoint and is OK.

                • The test.data file may be corrupt because the cache in memory was not written out completely.

                • The test.backup file contains a snapshot of test.data that corresponds to test.script.

                • The test.log file contain all information to re-do all changes since the snanapshot. As a result of abnormal termination, this file may be partially corrupt.

                Procedures

                The database engine performs the following procedures internally in different circumstances.

                Clean Shutdown

                Procedure C.1. Clean Hsqldb database shutdown

                1. The test.data file is written completely (all the modified cached table rows are witten out) and closed.

                2. The test.backup.new is created (containing the compressed test.data file)

                3. The file test.script.new is created using the information in the database (and thus shrinks because no UPDATE and DELETE statements; only INSERT).

                4. The entry 'modified' in the properties file is set to 'yes-new-files'

                5. The file test.script is deleted

                6. The file test.script.new is renamed to test.script

                7. The file test.backup is deleted

                8. The file test.backup.new is renamed to test.backup

                9. The entry 'modified' in the properties file is set to 'no'

                10. The file test.log is deleted

                Startup

                Procedure C.2. Database is opened

                1. Check if the database files are in use (by checking a special test.lck file).

                2. See if the test.properties file exists, otherwise create it.

                3. If the test.properties did not exist, then this is a new database. Create the empty test.log to append new commands.

                4. If it is an existing database, check in the test.properties file if 'modified=yes'. This would mean last time it was not closed correctly, and thus the test.data file may be corrupted or incomplete. In this case the 'REPAIR' algorithm is executed (see below), before the database is opened normally.

                5. Otherwise, if in the test.properties file 'modified=yes-new-files', then the (old) test.backup and test.script files are deleted and the new test.script.new file is renamed to test.script.

                6. Open the test.script file and execute the commands.

                7. Create the empty test.log to append new commands.

                Repair

                The current test.data file is corrupt, but with the old test.data (from the test.backup file and test.script) and the current test.log, the database is made up-to-date. The database engine takes these steps:

                Procedure C.3. Database Repair

                1. Restore the old test.data file from the backup (uncompress the test.backup and overwrite test.data).

                2. Execute all commands in the test.script file.

                3. Execute all commands in the test.log file. If due to corruption, an exception is thrown, the rest of the lines of command in the test.log file are ignored.

                4. Close the database correctly (including a backup).

                Appendix D. Running Hsqldb with OpenOffice.org 1.1.x

                Hermann Kienlein

                EDV - Systeme Kienlein

                Copyright 2003-2004 Hermann Kienlein. Permission is granted to distribute this document without any alteration under the terms of the HSQLDB license. Additional permission is granted to the HSQLDB Development Group to distribute this document with or without alterations under the terms of the HSQLDB license.

                $Date: 2005/06/08 16:02:34 $

                Introduction

                HSQLDB can now act as a Database with OpenOffice.org. This document is written to help you connecting and running HSQLDB out of OpenOffice.org in a simple way. Without user-managment and only for your single-system.

                If you have problems read the other available documents, because I will not write them here again. If you need a real DB-System with user-management and different rights for different users, read the other documents.

                HSQLDB is included with OpenOffice.org 2.0 and is used by default. Please refer to standard OpenOffice.org 2.0 documentation on how to use HSQLDB with this version.

                Installing

                I assume you have a running OpenOffice.org (OOo) and a JavaRuntimeEnvironment. So place the hsqldb_*.zip file where you want on your disk and unpack it (I assume you have done this already).

                Setting up OpenOffice.org

                Start OOo with a text document and go to the Database-Explorer (simply by pressing F4). In the left frame you see a tree-view with all known databases in OOo.

                A right mouse-click opens a menu where you can manage your databases. So click on New Database and choose a name that you want to have inside OOo. I chose HSQLDB as name.

                As connection-type choose JDBC and then switch to the JDBC-tab.

                As Driver-Class insert org.hsqldb.jdbcDriver and as URL choose the following:

                On Windows

                You can specify a directory where HSQLDB should store the info and data. Something like jdbc:hsqldb:file:c:\javasrc\hsqldb-dev\databasename (where jdbc: is written by OOo). The string c:\javasrc\hsqldb-dev\databasename works only on windows, but you can write this down as linux-path like /javasrc/hsqldb-dev/databasename too. Then HSQLDB takes the c:\ drive as root. This means this works only on c:\ for you.

                The first is the directory-path and the databasename is the identifier for the database.

                On Linux

                Choose a path as said for windows like /opt/db/data

                As username take sa, this is the standard-administrator for HSQLDB.

                Now click the OK-Button

                Now OOo has to find your hsqldb.jar file. So go to options => security and insert the path to the .jar file. If you have problems, search the Online-help for JDBC. You then get help in your own language (this is generally quite better than my English, I think ;-)

                If you cannot write to your Tables, OOo thinks that you don't have permission to write to HSQLDB. Then we tell OOo to ignore the DriverPrivileges because on our single-user-system we do not need them.

                Because OOo is working on this, the next Step is only needed for systems without write - permission.

                So we go to http://dba.openoffice.org and look at the IgnoreDriverPrivileges.html file in the HowTo-section. You find here a macro-code.

                Open tools => macro in OOo to get the Basic-IDE. Here simple copy and paste the code and run the macro. You see a input-box where you only have to insert the name of your DB, in my example I have to insert HSQLDB, because I took this as name in OOo.

                Note that if you change your OOo-DB name, you have to run this macro again!

                Now we only have to stop and restart OOo. Be sure that you exit Quickstarter and all running processes too. On next OOo-Start you should have a running Database in OpenOffice.org.

                Appendix E. Hsqldb Test Utility

                $Date: 2005/05/27 12:41:50 $

                The org.hsqldb.test package contains a number of tests for various functions of the database engine. Among these, the TestSelf class performs the tests that are based on scripts. To run the tests, you should compile the hsqldbtest.jar target with Ant.

                For TestSelf, a batch file is provided in the testrun/hsqldb directory, together with a set of TestSelf*.txt files. To start the application in Windows, change to the directory and type:

                    runtest TestSelf

                In Unix / Linux, type:

                    ./runTest.sh TestSelf

                The new version of TestSelf runs multiple SQL test files to test different SQL operations of the database. All files in the working directory with names matching TestSelf*.txt are processed in alphabetical order.

                You can add your own scripts to test different series of SQL queries. The format of the TestSelf*.txt file is simple text, with some indentation and prefixes in the form of Java-style comments. The prefixes indicate what the expected result should be.

                • Comment lines must start with -- and are ignored

                • Lines starting with spaces are the continuation of the previous line

                • SQL statements with no prefix are simply executed.

                • The remaining items in this list exemplify use of the available command line-prefixes.

                • The /*s*/ option stands for silent. It is used for executing quries regardless of results. Used for preparation of tests, not for actual tests.

                  /*s*/ Any SQL statement - errors are ignored
                • The /*c<rows>*/ option is for SELECT queries and asserts the number of rows in the result matches the given count.

                  /*c<rows>*/ SQL statement returning count of <rows>
                • The /*u*/ option is for queries that return an update count, such as DELETE and UPDATE. It asserts the update count matches.

                  /*u<count>*/ SQL statement returning an update count equal to <count>
                • The /*e*/ option asserts that the given query results in an erros. It is mainly used for testing the error detection capabilities of the engine. It can also be used with syntactically valid queries to assert a certain state in the database. For example a CREATE TABLE can be used to assert the table of the same name already exists.

                  /*e*/ SQL statement that should produce an error when executing
                • The /*r....*/ option asserts the SELECT query returns a single row containing the given set of field values.

                  /*r<string1>,<string2>*/ SQL statement returning a single row ResultSet equal to the specified value
                • The extended /*r...*/ option asserts the SELECT query returns the given rows containing the given set of field values.

                  /*r
                      <string1>,<string2>
                      <string1>,<string2>
                      <string1>,<string2>
                  */ SQL statement returning a multiple row ResultSet equal to the specified values

                  (note that the result set lines are indented).

                • All the options are lowercase letters. During development, an uppercase can be used for a given test to exclude a test from the test run. The utility will just report the test blocks that have been excluded without running them. Once the code has been developed, the option can be turned into lowercase to perform the actual test.

                See the TestSelf*.txt files in the /testrun/hsqldb/ directory for actual examples.

                Appendix F. Database Manager

                Fred Toussi

                HSQLDB Development Group

                Blaine Simpson

                HSQLDB Development Group

                $Date: 2006/07/27 21:08:21 $

                Brief Introduction

                The Database Manager tool is a simple GUI database query tool with a tree display of the tables. Both AWT and SWING versions of the tool are available and work almost identically. The AWT version class name is org.hsqldb.util.DatabaseManager; the SWING version, org.hsqldb.util.DatabaseManagerSwing.

                The AWT version of the database manager can be deployed as an applet in a browser. A demo HTML file with an embedded Database Manager is included in the /demo directory.

                When the Database Manager is started, a dialogue allows you to enter the JDBC driver, URL, user and password for the new connection. A drop-down box, Type, offers preset values for JDBC driver and URL for most popular database engines, including HSQLDB. Once you have selected an item from this drop-down box, you should edit the URL to specify the details of the database or any additional properties to pass. You should also enter the username and password before clicking on the OK button.

                The connection dialogue allows you to save the settings for the connection you are about to make. You can then access the connection in future sessions. To save a connection setting, enter a name in the Setting Name box before clicking on the OK button. Next time the connection dialogue is displayed, the drop-down box labeled Recent will include the name for all the saved connection settings. When you select a name, the individual settings are displayed in the appropriate boxes.

                The small Clr button next to the drop-down box allows you to clear all the saved settings. If you want to modify an existing setting, first select it from the drop-down box then modify any of the text boxes before making the connection. The modified values will be saved.

                Most menu items have context-sensitive tool tip help text which will appear if you hold the mouse cursor still over the desired menu item. (Assuming that you don't turn Tooltips off under the Help menu.

                The DatabaseManagers do work with HSQLDB servers serving TLS-encrypted JDBC data. See the TLS chapter and the RC File Authentication Setup section of this Guide.

                Tip

                If you are using DatabaseManagerSwing with Oracle, you will want to make sure that Show row counts and Show row counts are both off before connecting to the database. You may also want to turn off Auto tree-update, as described in the next section.

                Auto tree-update

                By default, the object tree in the left panel is refreshed when you execute DDL which may update those objects. If you are on a slow network or performance-challenged PC, use the view / Auto-refresh tree menu item to turn it off. You will then need to use the viewRefresh tree menu item every time that you want to refresh the tree.

                Note

                Auto-refresh tree does not automatically show all updates to database objects, it only refreshes when you submit DDL which may update database objects. (This behavior is a compromise between utility and performance).

                Automatic Connection

                You can use command-line switches to supply connection information. If you use these switch(es), then the connection dialog window will be skipped and a JDBC connection will be established immediately. Assuming that the hsqldb.jar (or an alternative jar) are in your CLASSPATH, this command will list the available command-line options.

                    java org.hsqldb.util.DatabaseManagerSwing --help

                It's convenient to skip the connection dialog window if you always work with the same database account.

                Warning

                Use of the --password switch is not secure. Everything typed on command-lines is generally available to other users on the computer. The problem is compounded if you use a network connection to obtain your command line. The RC File section explains how you can set up automatic connections without supplying a password on the command line.

                RC File

                You can skip the connection dialog window securely by putting the connection information into an RC file and then using the --urlid switch to DatabaseManager or DatabaseManagerSwing. This strategy is great for adding launch menu items and/or launch icons to your desktop. You can set up one icon for each of the database accounts which you regularly use.

                The default location for the RC file is dbmanager.rc in your home directory. The RC File Authentication Setup section explains how to put the connection information into this text file. If you also run SqlTool, then you can share the RC file with SqlTool by using a sym-link (if your operating system supports sym links), or by using the --rcfile switch for either SqlTool or DatabaseManagerSwing.

                Warning

                Use your operating system facilities to prevent others from reading your RC file, since it contains passwords.

                To set up launch items/icons, first experiment on your command line to find exactly what command works. For example,

                    java -cp /path/to/hsqldb.jar org.hsqldb.util.DatabaseManagerSwing --urlid mem
                Then, use your window manager to add an item that runs this command.

                Using the current DatabaseManagers with an older HSQLDB distribution.

                This procedure will allow users of a legacy version of HSQLDB to use all of the new features of the DatabaseManagers. You will also get the new version of the SqlTool! This procedure works for distros going back to 1.7.3.3 at least, probably much farther.

                These instructions assume that you are capable of running an Ant build. See the Building HSQLDB chapter.

                1. Download and extract a current HSQLDB distribution. If you don't want to use the source code, documentation, etc., you can use a temporary directory and remove it afterwards.

                2. Cd to the build directory under the root directory where you extracted the distribution to.

                3. Run ant hsqldbutil.

                4. If you're going to wipe out the build directory, copy hsqldbutil.jar to a safe location first.

                5. For now on, whenver you are going to run DatabaseManager*, make sure that you have this hsqldbutil.jar as the first item in your CLASSPATH.

                Here's a UNIX example where somebody wants to use the new DatabaseManagerSwing with their older HSQLDB database, as well as with Postgresql and a local application.

                CLASSPATH=/path/to/hsqldbutil.jar:/home/bob/myapp/classes:/usr/local/lib/pg.jdbc3.jar
                export CLASSPATH
                java org.hsqldb.util.DatabaseManagerSwing --urlid urlid

                DatabaseManagerSwing as an Applet

                DatabaseManagerSwing is also an applet. You can use it in HTML, JSPs, etc. Be aware that in Applet mode, actions to load or save local files will be disabled, and attempts to access any server other than the HTML-serving-host will be fail.

                Since the Applet can not store or load locally saved preferences, the only way to have persistent preference settings is by using Applet parameters.

                DatabaseManagerSwing Applet Parameters

                jdbcUrl
                URL of a data source to auto-connect to. String value.
                jdbcDriver
                URL of a data source to auto-connect to. String value. Defaults to org.hsqldb.jdbcDriver.
                jdbcUser
                User name for data source to auto-connect to. String value.
                jdbcPassword
                Password for data source to auto-connect to. String value. Defaults to zero-length string.
                schemaFilter
                Display only object from this schema in the object navigator. String value.
                laf
                Look-and-feel. String value.
                loadSampleData
                Auto-load sample data. Boolean value. Defaults to false.
                autoRefresh
                Auto-refresh the object navigator when DDL modifications detected in user SQL commands. Boolean value. Defaults to true.
                showRowCounts
                Show number of rows in each table in the object navigator. Boolean value. Defaults to false.
                showSysTables
                Show system tables in the object navigator. Boolean value. Defaults to false.
                showSchemas
                Show object names like schema.name in object navigator. Boolean value. Defaults to true.
                resultGrid
                Show query results in Gui grid (as opposed to in plain text). Boolean value. Defaults to true.
                showToolTips
                Show help hover-text. Boolean value. Defaults to true.

                Appendix G. Transfer Tool

                Fred Toussi

                HSQLDB Development Group

                $Date: 2005/06/29 23:15:13 $

                Table of Contents

                Brief Introduction

                Brief Introduction

                Transfer Tool is a GUI program for transferring SQL schema and data from one JDBC source to another. Source and destination can be different database engines or different databases on the same server.

                Transfer Tool works in two different modes. Direct transfer maintains a connection to both source and destination and performs the transfer. Dump and Restore mode is invoked once to transfer the data from the source to a text file (Dump), then again to transfer the data from the text file to the destination (Restore). With Dump and Restore, it is possible to make any changes to database object definitions and data prior to restoring it to the target.

                Dump and Restore modes can be set via the command line with -d (--dump) or -r (--restore) options. Alternatively the Transfer Tool can be started with any of the three modes from the Database Manager's Tools menu.

                The connection dialogue allows you to save the settings for the connection you are about to make. You can then access the connection in future sessions. These settings are shared with those from the Database Manager tool. See the appendix on Database Manager for details of the connection dialogue box.

                In version 1.8.0 Transfer Tool is no longer part of the hsqldb.jar. You can build the hsqldbutil.jar using the Ant command of the same name, to build a jar that includes Transfer Tool and the Database Manager.

                When collecting meta-data, Transfer Tool performs SELECT * FROM <table> queries on all the tables in the source database. This may take a long time with some database engines. When the source database is HSQLDB, this means memory should be available for the result sets returned from the queries. Therefore, the memory allocation of the java process in which Transfer Tool is executed may have to be high.

                hsqldb-1.8.0.10.orig/doc/guide/guide.pdf0000644000175000017500000224712410665324724016276 0ustar renerene%PDF-1.3 % 4 0 obj << /Type /Info /Producer (FOP 0.20.5) >> endobj 5 0 obj << /Length 262 /Filter [ /ASCII85Decode /FlateDecode ] >> stream Gaqco]+2\3$q9o4E576%fP!!"BL=0,f_dhc%ZB+>PqT)2Qp@gGd&]I/gp>@dq/O>'F^t**(#l(^Hp&_3W%YQC[qI.mnNH~> endstream endobj 6 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 5 0 R >> endobj 7 0 obj << /Length 487 /Filter [ /ASCII85Decode /FlateDecode ] >> stream Garo?:N(h=(rl#lMB4ln12G&TM]S9bZg=?ISX(9]W\f8BgTne:56O[gRGlTWQ^?l`qm;>lB=@L6p7W#VPCp[(_#Q>7#1u?U!J3Z%\er@3p_n)$V9%'kR(@sd76&=qr2HX]JPFBE3W\+\IW):iJ8['"Fl.AV#iLE:UfCi3D=38a5RmQ=)Ns';EGC&Re6^-G\$o34g2FV;C*L.pd;@qW\9\J\^'<\t'5EHYhb*^V?V7!26R_3R&M.8[gka1O=e30&cCJP_7b!ZaEXSMMgF7Vai*W]m/V endstream endobj 8 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 7 0 R >> endobj 9 0 obj << /Length 71 /Filter [ /ASCII85Decode /FlateDecode ] >> stream Garg^iGoCd.c`?]8EV`b1=.gR0K1`91K?+0ZOMGdU/Zh'Y!=Te%#&:?HH*JE! endstream endobj 10 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 9 0 R >> endobj 11 0 obj << /Length 2203 /Filter [ /ASCII85Decode /FlateDecode ] >> stream Gb"/l>BcQ+&BE]$.hqLM\Gj6Q^c2AJTD_W#!)_EjgRdshAlMNbO!I>_//c8.pZT77'i03eOW]C7ncdd^J(o>M5lr?1NBpuba-DDHSbCO&7]9YZ`K!n0Wsbr=,l0I-kdbfGc^h>bYGHJ)[]NM]4?+lhj%pO"d@[SB!Lp8a"iLgH0Q]).'qZJ_p#j"2p'EC5p-a&CPeI51&:0;-L'@qELrXCh5\`HMd+dDeeYF$_c7O*h;"N_$hYWFpuJ2qkbZJHp_?#b9q:R223e+E&EoU^VKC[`=f[9OC'hOGV=`klIDM3?HLO+9I.eo$$0IT-=L[t;k6h@i3)oag4kB$6R=UV`#R'ubqk1%H)$_AC.G$GYiBa-QdDOtp)qfT8k>CH"R,l,3gm]XnS@_'8`Q.MYn`l^*\;l(\B]lAC#]J=N7T.FdMIdX\m@VMYXqnoJ2fUM,\;FiXIEr*#)?s3Q1>5+5N$P%/(/dP-bm>8k?0/<9nAo6WO>Aje6sWXUfgMkj/Mg\rHRMOXbp1O&;Y)GCjhT0QIb:d\lNq'Pp:SA(Gtb_pt,?;J?V.)(1R493UoCW8Tn*F7HdTS^[JS5bR(6,s//5Fui3UR9oep.r:ZWVbR$Ua00G.5/C7WIR7G:Kl:Q;JfL2_7C@Qf;rq7+OKWMb=Q="X0["?a0/9S!WR34a)mgf4$^J%:`oP`*81PXhOg,6^(DO"8-OG7S?@Mn5Ln,<&bKS](W=9``n6'#Lmi7GF2'buAR5-tg*<5CARVX!lqu+?9l#T&*Bm:l9I6*2e+>DB5E,M8(RD*/Yu)(r&OL;Pp7Fi_mY//Je(;t)Mo\[099K!UII1hs+ua_#A[*>7EC%p63[Ic#1PDbebm[R;Fen(q4$^!@#gg'.>)qFm&-F5W6g'9._05o9gCQ.nXdfT#r_\jY0,.6HDkVunbG(qJ6Dg=[%oRqrcqqD?Ts0.60>l&U"2q7#jNKH"eQ'FK/dVjXl'1o#LDVuFHjVgp'eJM$SW5Z<-bbn%BIk89(//oW+%`9DpQD&Sg#([!VI&hFGF0\W;$3KTGFm?]Nc5_uMEo3^knm7sdA5SD"OXjqn>OOH8-!*]5aBfJf0^2jM-qjnc5ZjX5ViDu47.70:@hR5t=H2'skoC?C%.Y9pY%5ZG(&FGRDZZiC5NJ7(qpa2A8emk'7DV$k]M\E?8P81W1('-'fU4EMBS]W@hL2E* endstream endobj 12 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 11 0 R /Annots 13 0 R >> endobj 13 0 obj [ 14 0 R 16 0 R 18 0 R 20 0 R 22 0 R 24 0 R 26 0 R 28 0 R 30 0 R 32 0 R 34 0 R 36 0 R 38 0 R 40 0 R 42 0 R 44 0 R 46 0 R 48 0 R 50 0 R 52 0 R 54 0 R 56 0 R 58 0 R 60 0 R 62 0 R 64 0 R 66 0 R 68 0 R 70 0 R 72 0 R 74 0 R 76 0 R 78 0 R 80 0 R 82 0 R 84 0 R 86 0 R 88 0 R 90 0 R 92 0 R 94 0 R 96 0 R 98 0 R 100 0 R 102 0 R 104 0 R 106 0 R 108 0 R 110 0 R 112 0 R 114 0 R 116 0 R 118 0 R ] endobj 14 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 655.001 169.44 645.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 15 0 R /H /I >> endobj 16 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 644.001 288.98 634.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 17 0 R /H /I >> endobj 18 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 633.001 239.17 623.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 19 0 R /H /I >> endobj 20 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 622.001 193.44 612.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 21 0 R /H /I >> endobj 22 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 611.001 203.73 601.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 23 0 R /H /I >> endobj 24 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 600.001 209.84 590.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 25 0 R /H /I >> endobj 26 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 589.001 199.82 579.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 27 0 R /H /I >> endobj 28 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 578.001 225.49 568.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 29 0 R /H /I >> endobj 30 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 567.001 246.87 557.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 31 0 R /H /I >> endobj 32 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 556.001 227.72 546.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 33 0 R /H /I >> endobj 34 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 545.001 289.64 535.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 35 0 R /H /I >> endobj 36 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 534.001 268.81 524.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 37 0 R /H /I >> endobj 38 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 523.001 175.65 513.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 39 0 R /H /I >> endobj 40 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 512.001 252.99 502.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 41 0 R /H /I >> endobj 42 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 501.001 323.82 491.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 43 0 R /H /I >> endobj 44 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 490.001 269.91 480.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 45 0 R /H /I >> endobj 46 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 479.001 252.59 469.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 47 0 R /H /I >> endobj 48 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 468.001 271.58 458.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 49 0 R /H /I >> endobj 50 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 457.001 264.1 447.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 51 0 R /H /I >> endobj 52 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 446.001 221.06 436.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 53 0 R /H /I >> endobj 54 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 435.001 226.62 425.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 55 0 R /H /I >> endobj 56 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 424.001 175.83 414.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 57 0 R /H /I >> endobj 58 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 413.001 176.22 403.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 59 0 R /H /I >> endobj 60 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 402.001 235.11 392.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 61 0 R /H /I >> endobj 62 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 391.001 240.1 381.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 63 0 R /H /I >> endobj 64 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 380.001 267.44 370.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 65 0 R /H /I >> endobj 66 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 369.001 245.5 359.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 67 0 R /H /I >> endobj 68 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 358.001 231.04 348.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 69 0 R /H /I >> endobj 70 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 347.001 239.94 337.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 71 0 R /H /I >> endobj 72 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 336.001 270.47 326.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 73 0 R /H /I >> endobj 74 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 325.001 267.16 315.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 75 0 R /H /I >> endobj 76 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 314.001 252.44 304.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 77 0 R /H /I >> endobj 78 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 303.001 277.59 293.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 79 0 R /H /I >> endobj 80 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 292.001 226.04 282.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 81 0 R /H /I >> endobj 82 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 281.001 255.2 271.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 83 0 R /H /I >> endobj 84 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 270.001 259.94 260.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 85 0 R /H /I >> endobj 86 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 259.001 319.36 249.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 87 0 R /H /I >> endobj 88 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 248.001 291.59 238.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 89 0 R /H /I >> endobj 90 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 237.001 236.76 227.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 91 0 R /H /I >> endobj 92 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 226.001 304.1 216.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 93 0 R /H /I >> endobj 94 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 215.001 210.21 205.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 95 0 R /H /I >> endobj 96 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 204.001 242.32 194.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 97 0 R /H /I >> endobj 98 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 193.001 253.14 183.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 99 0 R /H /I >> endobj 100 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 182.001 203.32 172.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 101 0 R /H /I >> endobj 102 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 171.001 176.22 161.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 103 0 R /H /I >> endobj 104 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 160.001 189.0 150.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 105 0 R /H /I >> endobj 106 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 149.001 305.35 139.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 107 0 R /H /I >> endobj 108 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 138.001 245.08 128.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 109 0 R /H /I >> endobj 110 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 127.001 252.87 117.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 111 0 R /H /I >> endobj 112 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 116.001 184.56 106.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 113 0 R /H /I >> endobj 114 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 105.001 295.94 95.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 115 0 R /H /I >> endobj 116 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 94.001 290.79 84.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 117 0 R /H /I >> endobj 118 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 83.001 274.93 73.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 119 0 R /H /I >> endobj 120 0 obj << /Length 2418 /Filter [ /ASCII85Decode /FlateDecode ] >> stream Gb"/l>>s9G(l%MX.sr5\'N`_c:7#@/E(Uap:",M*0@mFF[`FWYJX1dm*A$[%Q6Ag#ambI]bd.\s#kn5jo^919e)%:soY.=6Q2YmQ;u4\/g/kS0C0rj"XO:(UTka;!X8\`0VGWH#4?'t]JqX$E62sL)o,#,4Y$=g@q`GIeM%fD50C-R%bJP;7&?)Y*;4=7l%JkSIV]UU6[/WpqlZ.P^s>Ll<,);$#D#,\#Sk":GVAT-P\lrn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SU~> endstream endobj 121 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 120 0 R /Annots 122 0 R >> endobj 122 0 obj [ 123 0 R 125 0 R 127 0 R 129 0 R 131 0 R 133 0 R 135 0 R 137 0 R 139 0 R 141 0 R 143 0 R 145 0 R 147 0 R 149 0 R 151 0 R 153 0 R 155 0 R 157 0 R 159 0 R 161 0 R 163 0 R 165 0 R 167 0 R 169 0 R 171 0 R 173 0 R 175 0 R 177 0 R 179 0 R 181 0 R 183 0 R 185 0 R 187 0 R 189 0 R 191 0 R 193 0 R 195 0 R 197 0 R 199 0 R 201 0 R 203 0 R 205 0 R 207 0 R 209 0 R 211 0 R 213 0 R 215 0 R 217 0 R 219 0 R 221 0 R 223 0 R 225 0 R 227 0 R 229 0 R 231 0 R 233 0 R 235 0 R 237 0 R ] endobj 123 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 719.0 291.61 709.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 124 0 R /H /I >> endobj 125 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 708.0 200.26 698.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 126 0 R /H /I >> endobj 127 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 697.0 176.22 687.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 128 0 R /H /I >> endobj 129 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 686.0 194.0 676.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 130 0 R /H /I >> endobj 131 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 675.0 256.6 665.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 132 0 R /H /I >> endobj 133 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 664.0 206.5 654.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 134 0 R /H /I >> endobj 135 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 653.0 304.07 643.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 136 0 R /H /I >> endobj 137 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 642.0 324.92 632.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 138 0 R /H /I >> endobj 139 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 631.0 291.31 621.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 140 0 R /H /I >> endobj 141 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 620.0 307.31 610.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 142 0 R /H /I >> endobj 143 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 609.0 206.38 599.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 144 0 R /H /I >> endobj 145 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 598.0 176.22 588.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 146 0 R /H /I >> endobj 147 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 587.0 266.75 577.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 148 0 R /H /I >> endobj 149 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 576.0 244.65 566.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 150 0 R /H /I >> endobj 151 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 565.0 194.66 555.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 152 0 R /H /I >> endobj 153 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 554.0 224.37 544.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 154 0 R /H /I >> endobj 155 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 543.0 249.38 533.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 156 0 R /H /I >> endobj 157 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 532.0 234.82 522.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 158 0 R /H /I >> endobj 159 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 521.0 274.65 511.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 160 0 R /H /I >> endobj 161 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 510.0 276.2 500.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 162 0 R /H /I >> endobj 163 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 499.0 229.81 489.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 164 0 R /H /I >> endobj 165 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 488.0 332.45 478.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 166 0 R /H /I >> endobj 167 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 477.0 305.77 467.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 168 0 R /H /I >> endobj 169 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 466.0 235.09 456.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 170 0 R /H /I >> endobj 171 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 455.0 177.49 445.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 172 0 R /H /I >> endobj 173 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 444.0 225.38 434.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 174 0 R /H /I >> endobj 175 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 433.0 249.1 423.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 176 0 R /H /I >> endobj 177 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 422.0 267.99 412.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 178 0 R /H /I >> endobj 179 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 411.0 325.77 401.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 180 0 R /H /I >> endobj 181 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 400.0 224.11 390.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 182 0 R /H /I >> endobj 183 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 389.0 275.76 379.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 184 0 R /H /I >> endobj 185 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 378.0 207.33 368.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 186 0 R /H /I >> endobj 187 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 367.0 253.16 357.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 188 0 R /H /I >> endobj 189 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 356.0 274.81 346.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 190 0 R /H /I >> endobj 191 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 345.0 147.78 335.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 192 0 R /H /I >> endobj 193 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 334.0 199.55 324.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 194 0 R /H /I >> endobj 195 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 323.0 282.6 313.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 196 0 R /H /I >> endobj 197 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 312.0 213.56 302.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 198 0 R /H /I >> endobj 199 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 301.0 215.21 291.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 200 0 R /H /I >> endobj 201 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 290.0 165.12 280.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 202 0 R /H /I >> endobj 203 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 279.0 269.25 269.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 204 0 R /H /I >> endobj 205 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 268.0 232.72 258.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 206 0 R /H /I >> endobj 207 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 257.0 253.27 247.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 208 0 R /H /I >> endobj 209 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 246.0 342.84 236.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 210 0 R /H /I >> endobj 211 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 235.0 162.23 225.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 212 0 R /H /I >> endobj 213 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 224.0 308.42 214.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 214 0 R /H /I >> endobj 215 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 213.0 328.54 203.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 216 0 R /H /I >> endobj 217 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 202.0 247.72 192.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 218 0 R /H /I >> endobj 219 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 191.0 223.44 181.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 220 0 R /H /I >> endobj 221 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 180.0 261.04 170.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 222 0 R /H /I >> endobj 223 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 169.0 239.94 159.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 224 0 R /H /I >> endobj 225 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 158.0 251.32 148.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 226 0 R /H /I >> endobj 227 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 147.0 262.62 137.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 228 0 R /H /I >> endobj 229 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 136.0 271.5 126.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 230 0 R /H /I >> endobj 231 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 125.0 439.82 115.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 232 0 R /H /I >> endobj 233 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 114.0 214.25 104.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 234 0 R /H /I >> endobj 235 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 103.0 236.61 93.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 236 0 R /H /I >> endobj 237 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 92.0 212.61 82.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 238 0 R /H /I >> endobj 239 0 obj << /Length 2206 /Filter [ /ASCII85Decode /FlateDecode ] >> stream Gb"/l>BALX(l%MT'jR&_:s5"t=$)'p$+o7p+R.2U/nB>@nB_tqkBpUKKUE\2JmM\FRC[]B6VL.uQ@ZMJ+4$_OTGJr(m#;[-0@dpB1s)rfg<0^&]s,KmPD2,&f6BaW2DM6B!ke]iddRj[%Ke)+Esc=M79WB@6G^cCC'(#dZMLVNRRucs3p>VOQKkVEmLm'V+0VQN(r>h[#dh'?lJGG'hf+8IjKb:A:e`u%Woke/B%1*W&?%d,=__[(_M*#mC1ZN2_5:dZmNoMJGuf&Af.F4ZWHlicd$>#W3ZC^dI[K3hf0g,^"PPZcU34A&dB3UP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 0 R 254 0 R 256 0 R 258 0 R 260 0 R 262 0 R 264 0 R 266 0 R 268 0 R 270 0 R 272 0 R 274 0 R 276 0 R 278 0 R 280 0 R 282 0 R 284 0 R 286 0 R 288 0 R 290 0 R 292 0 R 294 0 R 296 0 R 298 0 R 300 0 R 302 0 R 304 0 R 306 0 R 308 0 R 310 0 R 312 0 R 314 0 R 316 0 R 318 0 R 320 0 R 322 0 R 324 0 R 326 0 R 328 0 R 330 0 R 332 0 R 334 0 R 336 0 R 338 0 R 340 0 R 342 0 R 344 0 R 346 0 R 348 0 R 350 0 R 352 0 R 354 0 R 356 0 R ] endobj 242 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 719.0 221.5 709.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 243 0 R /H /I >> endobj 244 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 708.0 275.11 698.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 245 0 R /H /I >> endobj 246 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 697.0 203.73 687.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 247 0 R /H /I >> endobj 248 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 686.0 209.37 676.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 249 0 R /H /I >> endobj 250 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 675.0 303.54 665.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 251 0 R /H /I >> endobj 252 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 664.0 242.17 654.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 253 0 R /H /I >> endobj 254 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 653.0 331.33 643.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 255 0 R /H /I >> endobj 256 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 642.0 300.2 632.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 257 0 R /H /I >> endobj 258 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 631.0 207.31 621.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 259 0 R /H /I >> endobj 260 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 620.0 309.39 610.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 261 0 R /H /I >> endobj 262 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 609.0 208.84 599.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 263 0 R /H /I >> endobj 264 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 598.0 269.95 588.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 265 0 R /H /I >> endobj 266 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 587.0 301.07 577.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 267 0 R /H /I >> endobj 268 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 576.0 211.34 566.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 269 0 R /H /I >> endobj 270 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 565.0 411.89 555.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 271 0 R /H /I >> endobj 272 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 554.0 215.78 544.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 273 0 R /H /I >> endobj 274 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 543.0 362.72 533.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 275 0 R /H /I >> endobj 276 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 532.0 247.7 522.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 277 0 R /H /I >> endobj 278 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 521.0 284.53 511.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 279 0 R /H /I >> endobj 280 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 510.0 263.98 500.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 281 0 R /H /I >> endobj 282 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 499.0 206.32 489.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 283 0 R /H /I >> endobj 284 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 488.0 211.61 478.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 285 0 R /H /I >> endobj 286 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 477.0 249.38 467.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 287 0 R /H /I >> endobj 288 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 466.0 221.62 456.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 289 0 R /H /I >> endobj 290 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 455.0 183.45 445.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 291 0 R /H /I >> endobj 292 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 444.0 191.88 434.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 293 0 R /H /I >> endobj 294 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 433.0 191.88 423.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 295 0 R /H /I >> endobj 296 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 422.0 188.16 412.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 297 0 R /H /I >> endobj 298 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 411.0 177.34 401.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 299 0 R /H /I >> endobj 300 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 400.0 288.17 390.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 301 0 R /H /I >> endobj 302 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 389.0 336.46 379.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 303 0 R /H /I >> endobj 304 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 378.0 388.28 368.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 305 0 R /H /I >> endobj 306 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 367.0 291.6 357.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 307 0 R /H /I >> endobj 308 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 356.0 229.01 346.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 309 0 R /H /I >> endobj 310 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 345.0 179.17 335.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 311 0 R /H /I >> endobj 312 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 334.0 323.72 324.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 313 0 R /H /I >> endobj 314 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 323.0 210.95 313.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 315 0 R /H /I >> endobj 316 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 312.0 233.82 302.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 317 0 R /H /I >> endobj 318 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 301.0 254.94 291.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 319 0 R /H /I >> endobj 320 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 290.0 244.39 280.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 321 0 R /H /I >> endobj 322 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 279.0 234.94 269.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 323 0 R /H /I >> endobj 324 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 268.0 228.28 258.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 325 0 R /H /I >> endobj 326 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 257.0 194.11 247.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 327 0 R /H /I >> endobj 328 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 246.0 231.33 236.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 329 0 R /H /I >> endobj 330 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 235.0 209.11 225.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 331 0 R /H /I >> endobj 332 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 224.0 215.22 214.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 333 0 R /H /I >> endobj 334 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 213.0 238.83 203.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 335 0 R /H /I >> endobj 336 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 202.0 240.49 192.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 337 0 R /H /I >> endobj 338 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 191.0 235.5 181.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 339 0 R /H /I >> endobj 340 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 180.0 251.06 170.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 341 0 R /H /I >> endobj 342 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 169.0 261.61 159.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 343 0 R /H /I >> endobj 344 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 158.0 241.61 148.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 345 0 R /H /I >> endobj 346 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 147.0 252.72 137.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 347 0 R /H /I >> endobj 348 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 136.0 234.95 126.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 349 0 R /H /I >> endobj 350 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 125.0 235.49 115.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 351 0 R /H /I >> endobj 352 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 114.0 205.77 104.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 353 0 R /H /I >> endobj 354 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 103.0 231.33 93.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 355 0 R /H /I >> endobj 356 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 92.0 228.27 82.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 357 0 R /H /I >> endobj 358 0 obj << /Length 1963 /Filter [ /ASCII85Decode /FlateDecode ] >> stream Gb"/l?#uH,!/Bt@'jR&_=r*F-9>lg`2.?TUS9*gt(o<4)&l"AZj561,_\.ZB122?kG;>A-(-d"tB3BE8>rtpLh2*`rV6*;9kE[MQ!Rfdo?C!Nfe@)NH00@;5*D*O.FIAN)j`*$6[\M;OtCfSu^$eL4.)]#^_aZ051W&=?rMqG>Y3IMnQnD7*/*#NY,J,k[:C8H(sEGH\:BK2jI]`r+gpMTP$o9Q:nE;9N/_jq&e$&+f[L"[6Yq^D\-0_7Ihnsqu)Q8Ic.CRR.LQ5p0(`pUo6WC'-$dSFsE$j1C1@K`Yp%;'tSrTjLXWPnZNB'JY"I,VF1Wk^B3g%m267.`&I_Y>>Sj/>4RK]bVMLgeKl:tqk00bl\;s&P=+259M_:_EB=3^XIjoJh/DXe?Gke.2V[$\Hr-):r\Z2&Em+n1mN(rLJA\Xqa$R`"]dd=5VH]ADH@Ylpd5fbJ+:!%)Qs;MFSJhu,.5R!%%,N:#CZ$7MN%a(TP#37apliMOqn'[@0%<0*<,R7&aKVWjr0)U@8I&=XBL`s#kKWD($,'STS>TU'd8PfY^bX;B24oT,Hqo)KN.,q;A&l;hbQ6#PBGQ4N#?=@kinCIG")%5bHf!8"BD\%)g(S6MkQGp@9%tB[_rIM;3:dW$e]mW[HMW/h's\jDX8$9XkC)1*jaZf2--GiLc#!A*.8pXaJj?N=WET'+VX^Z/C%V!T^>j-#E'js6rUH,]'Ka(\QF.F&&A7g@8;4U4S""Z:ib\k7g!Ugr[.9`;JLugTFo9P-m)P9aZrPbc]DT*fXW4(%d8[mZ^T:PTg`3gK,J@0oa(=X3"ASP^0JM;kbC2':KPtig34uck[e&+4imfJ'3mG^l/,Fu%b@Wjlm1QFlNs#N8?F6+tD)=$k&ElQP).K;-!J*MNVjT![oFXN&qAsIgT]oS=$3D4[>Li)mEcCf%Ad8/4*V/<5qY-mNVZbF[rik9dA#)om"~> endstream endobj 359 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 358 0 R /Annots 360 0 R >> endobj 360 0 obj [ 361 0 R 363 0 R 365 0 R 367 0 R 369 0 R 371 0 R 373 0 R 375 0 R 377 0 R 379 0 R 381 0 R 383 0 R 385 0 R 387 0 R 389 0 R 391 0 R 393 0 R 395 0 R 397 0 R 399 0 R 401 0 R 403 0 R 405 0 R 407 0 R 409 0 R 411 0 R 413 0 R 415 0 R 417 0 R 419 0 R 421 0 R 423 0 R 425 0 R 427 0 R 429 0 R 431 0 R 433 0 R 435 0 R 437 0 R 439 0 R 441 0 R 443 0 R 445 0 R 447 0 R 449 0 R 451 0 R 453 0 R 455 0 R 457 0 R 459 0 R 461 0 R 463 0 R 465 0 R 467 0 R ] endobj 361 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 719.0 223.28 709.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 362 0 R /H /I >> endobj 363 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 708.0 249.39 698.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 364 0 R /H /I >> endobj 365 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 697.0 238.84 687.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 366 0 R /H /I >> endobj 367 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 686.0 229.39 676.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 368 0 R /H /I >> endobj 369 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 675.0 240.5 665.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 370 0 R /H /I >> endobj 371 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 664.0 222.73 654.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 372 0 R /H /I >> endobj 373 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 653.0 223.27 643.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 374 0 R /H /I >> endobj 375 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 642.0 239.38 632.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 376 0 R /H /I >> endobj 377 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 631.0 202.44 621.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 378 0 R /H /I >> endobj 379 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 620.0 203.0 610.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 380 0 R /H /I >> endobj 381 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 609.0 208.55 599.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 382 0 R /H /I >> endobj 383 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 598.0 221.89 588.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 384 0 R /H /I >> endobj 385 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 587.0 223.55 577.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 386 0 R /H /I >> endobj 387 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 576.0 201.9 566.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 388 0 R /H /I >> endobj 389 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 565.0 204.67 555.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 390 0 R /H /I >> endobj 391 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 554.0 257.16 544.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 392 0 R /H /I >> endobj 393 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 543.0 301.32 533.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 394 0 R /H /I >> endobj 395 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 532.0 294.11 522.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 396 0 R /H /I >> endobj 397 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 521.0 251.61 511.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 398 0 R /H /I >> endobj 399 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 510.0 269.1 500.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 400 0 R /H /I >> endobj 401 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 499.0 229.94 489.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 402 0 R /H /I >> endobj 403 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 488.0 240.5 478.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 404 0 R /H /I >> endobj 405 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 477.0 242.73 467.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 406 0 R /H /I >> endobj 407 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 466.0 239.4 456.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 408 0 R /H /I >> endobj 409 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 455.0 243.27 445.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 410 0 R /H /I >> endobj 411 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 444.0 311.32 434.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 412 0 R /H /I >> endobj 413 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 433.0 229.95 423.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 414 0 R /H /I >> endobj 415 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 422.0 263.85 412.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 416 0 R /H /I >> endobj 417 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 411.0 254.1 401.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 418 0 R /H /I >> endobj 419 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 400.0 277.99 390.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 420 0 R /H /I >> endobj 421 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 389.0 262.45 379.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 422 0 R /H /I >> endobj 423 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 378.0 256.32 368.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 424 0 R /H /I >> endobj 425 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 367.0 225.21 357.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 426 0 R /H /I >> endobj 427 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 356.0 207.44 346.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 428 0 R /H /I >> endobj 429 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 345.0 235.1 335.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 430 0 R /H /I >> endobj 431 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 334.0 189.82 324.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 432 0 R /H /I >> endobj 433 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 323.0 208.73 313.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 434 0 R /H /I >> endobj 435 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 312.0 264.27 302.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 436 0 R /H /I >> endobj 437 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 301.0 309.55 291.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 438 0 R /H /I >> endobj 439 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 290.0 209.83 280.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 440 0 R /H /I >> endobj 441 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 279.0 209.73 269.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 442 0 R /H /I >> endobj 443 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 268.0 176.22 258.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 444 0 R /H /I >> endobj 445 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 257.0 216.79 247.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 446 0 R /H /I >> endobj 447 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 246.0 225.5 236.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 448 0 R /H /I >> endobj 449 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 235.0 272.18 225.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 450 0 R /H /I >> endobj 451 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 224.0 269.57 214.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 452 0 R /H /I >> endobj 453 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 213.0 232.05 203.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 454 0 R /H /I >> endobj 455 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 202.0 240.95 192.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 456 0 R /H /I >> endobj 457 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 191.0 241.96 181.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 458 0 R /H /I >> endobj 459 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 180.0 279.42 170.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 460 0 R /H /I >> endobj 461 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 158.0 167.89 148.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 462 0 R /H /I >> endobj 463 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 114.0 188.43 104.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 464 0 R /H /I >> endobj 465 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 103.0 234.39 93.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 466 0 R /H /I >> endobj 467 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 92.0 196.89 82.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 468 0 R /H /I >> endobj 469 0 obj << /Length 888 /Filter [ /ASCII85Decode /FlateDecode ] >> stream Gb"/j:N)^V(rl#l$BF4EL9V3HfJH=3WDh?#W/#'l&km%s)@C*0^AWR=R&"8\VFi,YRp:Dcph.drj#=0dd+:I@WK&OYdeu_CoVI:aX8F.^3J4Wc7CJ%Xh1+"j?VFQ?nBB640dc!X(M8NR!WiH"8;'PdDhP*`s3U_JaqF(+(tV*6-&ekamIdHB63o30WoA+!&r1O.??,e:9(sbJpJJjFbY5=n=lmWI?WGLiIkrdE_%$oICB1^#jAs$?RMKe9H2O>R)\!1Zd3Zk8i+S!/q4g?ljP=)+J=pk`XBFs0"N-2)84e;Daf_Z:b0T!J=p>*4oPZ4ge:+d*67,=c11T[V8Ad\nPRGGCi]LHLn@T,1Ll;*R,,^%^BaQ`8\`[*s$DeQ/RQH$@kGV.n0=mWW(s"mF%+)?.-eeUS:?qrcO0KA+WQO[j7]n<5+U+IrK8FCs$)aIBZseh\^t@(?:Dkd9T6b&;[pAc3\JqIN`[9WF;FXcbH:8(rSRoG]lr*S84N/WWjSp$PSN=l,/fD@7Mkmb9b?`.,OkkF!0RmUMF3Hi<#qX,HoW3b9SC~> endstream endobj 470 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 469 0 R /Annots 471 0 R >> endobj 471 0 obj [ 472 0 R 474 0 R 476 0 R 478 0 R 480 0 R 482 0 R 484 0 R 486 0 R 488 0 R 490 0 R 492 0 R 494 0 R 496 0 R 498 0 R 500 0 R 502 0 R 504 0 R ] endobj 472 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 719.0 194.66 709.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 473 0 R /H /I >> endobj 474 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 708.0 306.37 698.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 475 0 R /H /I >> endobj 476 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 697.0 193.44 687.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 477 0 R /H /I >> endobj 478 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 686.0 181.78 676.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 479 0 R /H /I >> endobj 480 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 675.0 250.37 665.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 481 0 R /H /I >> endobj 482 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 664.0 221.05 654.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 483 0 R /H /I >> endobj 484 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 653.0 206.61 643.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 485 0 R /H /I >> endobj 486 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 642.0 208.34 632.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 487 0 R /H /I >> endobj 488 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 631.0 205.25 621.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 489 0 R /H /I >> endobj 490 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 620.0 216.49 610.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 491 0 R /H /I >> endobj 492 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 609.0 211.48 599.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 493 0 R /H /I >> endobj 494 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 598.0 234.83 588.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 495 0 R /H /I >> endobj 496 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 587.0 175.4 577.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 497 0 R /H /I >> endobj 498 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 576.0 440.9 566.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 499 0 R /H /I >> endobj 500 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 565.0 294.24 555.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 501 0 R /H /I >> endobj 502 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 554.0 187.48 544.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 503 0 R /H /I >> endobj 504 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 543.0 216.49 533.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 505 0 R /H /I >> endobj 506 0 obj << /Length 658 /Filter [ /ASCII85Decode /FlateDecode ] >> stream Gb"/i95g=S&:j6I$6M3^\/oHr3&WEY;%?;fe3hagbF02\Gm%fGr;5JbOj/cKW`CTHG/WM6J-JK3cUO:[f_]X*#q5(o,gJMA^3`+IIfN>0AL((aNJ&Qs6,'MiohIe>/0Q^A>A,FAjNW[\9d;MPP$)@(>=6h2g>OZ`2BFKeCU`Eb:nkAPs'%OH<4q+:&CijEhmX'GS\>.&\ZTD>V!%XR5fIo=Z/L<^g;Z]k#,E_;s$E+sFWInqAd=ft=^TE38dRCG2`oe7k7NV2]neY'70lZ#jtV8>f1WhCu.B03u9%U\E`Ar2?)l\iHM]5'E-.#P/fa>rNDE>GKS7549[$f1"Z.\9I=_C>'79H%bY-84[YfCW9Y^V5*^G-2#S@QQ.kQ6CK;NAegPmmj]/6$@^CgJ$MlV[<1e,8H6r1&6tE`A("B*-0qAWkA@?M4Nl3g1eMdF$>HcZQh,X/R+qA/e+\n6c=TLK'h)#.pb8`KN,JgMZ1gBYWO/-rPQ31ifJ2]kd3S<)]SlRS_E^p]HegYWRGW`!Lu_O6@@G>Glofh#^]'E5~> endstream endobj 507 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 506 0 R /Annots 508 0 R >> endobj 508 0 obj [ 509 0 R 511 0 R 513 0 R 515 0 R 517 0 R 519 0 R 521 0 R 523 0 R 525 0 R 527 0 R ] endobj 509 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 665.001 269.98 655.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 510 0 R /H /I >> endobj 511 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 654.001 241.95 644.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 512 0 R /H /I >> endobj 513 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 643.001 226.66 633.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 514 0 R /H /I >> endobj 515 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 632.001 259.99 622.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 516 0 R /H /I >> endobj 517 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 621.001 233.05 611.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 518 0 R /H /I >> endobj 519 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 610.001 261.65 600.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 520 0 R /H /I >> endobj 521 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 599.001 280.53 589.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 522 0 R /H /I >> endobj 523 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 588.001 306.63 578.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 524 0 R /H /I >> endobj 525 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 577.001 240.82 567.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 526 0 R /H /I >> endobj 527 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 566.001 183.32 556.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 528 0 R /H /I >> endobj 529 0 obj << /Length 2108 /Filter [ /ASCII85Decode /FlateDecode ] >> stream Gb"/,93^.1']&@2]UNM!C0?!g93?,S*;I<7fc=)/')a/k1>Y7-ho14:o9;,p4ghSSJZ1gOm^a_;N=6PcX0S*7"$_37ahIk\ND!p>Q#*\o(oL&7S,i7"(sH3rd&`7$Jfb5]dW.n!V)^nEb[E9?eB1dnY54Em>Tn$ASFEt`,s7CS4Os.hq?hU"P:=]/k)cVI=)FFdje@45*s?_mr_o7!L_+tF7!ub(r`U%@9(8TV$(diD':G,l]PT<(FB4J)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fk)e_[=MHhb8n^H&meB5$HUM',#k)9bj[H9He`&V90R&c"bjCqVo0i8^C1M"Zl"D?q[%Ma#%*HXJb^:^M;nb`tkIZ*r<6(is^chk/PE"-JoQOP$es;8q"P),S'h]`f1,MZRqo<>Bqc%,qs1ieS.oSbce;WXmZ+m]*HXDmr#3Mcg7ur2%O9Ak^hF$rE@JSeeofO55r]7A+%CkVp2=W2Q2rm="h-<%g3K=Dj8\if/=Hd>W6"B]@'UDZI+1XFi~> endstream endobj 530 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 529 0 R /Annots 531 0 R >> endobj 531 0 obj [ 532 0 R 534 0 R 536 0 R 538 0 R 540 0 R 542 0 R 544 0 R 546 0 R 548 0 R 550 0 R 552 0 R 554 0 R 556 0 R 558 0 R 560 0 R 562 0 R 564 0 R 566 0 R 568 0 R 570 0 R 572 0 R 574 0 R 576 0 R 578 0 R 580 0 R 582 0 R 584 0 R 586 0 R 588 0 R 590 0 R 592 0 R 594 0 R 596 0 R 598 0 R 600 0 R 602 0 R ] endobj 532 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 665.001 322.45 655.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 533 0 R /H /I >> endobj 534 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 654.001 383.86 644.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 535 0 R /H /I >> endobj 536 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 643.001 211.65 633.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 537 0 R /H /I >> endobj 538 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 632.001 374.68 622.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 539 0 R /H /I >> endobj 540 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 621.001 243.02 611.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 541 0 R /H /I >> endobj 542 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 610.001 238.87 600.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 543 0 R /H /I >> endobj 544 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 599.001 325.64 589.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 545 0 R /H /I >> endobj 546 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 588.001 303.02 578.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 547 0 R /H /I >> endobj 548 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 577.001 332.49 567.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 549 0 R /H /I >> endobj 550 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 566.001 328.04 556.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 551 0 R /H /I >> endobj 552 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 555.001 344.14 545.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 553 0 R /H /I >> endobj 554 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 544.001 201.4 534.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 555 0 R /H /I >> endobj 556 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 533.001 311.64 523.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 557 0 R /H /I >> endobj 558 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 522.001 319.96 512.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 559 0 R /H /I >> endobj 560 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 511.001 331.07 501.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 561 0 R /H /I >> endobj 562 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 500.001 239.47 490.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 563 0 R /H /I >> endobj 564 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 489.001 235.82 479.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 565 0 R /H /I >> endobj 566 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 478.001 241.93 468.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 567 0 R /H /I >> endobj 568 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 467.001 241.4 457.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 569 0 R /H /I >> endobj 570 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 456.001 307.77 446.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 571 0 R /H /I >> endobj 572 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 445.001 262.49 435.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 573 0 R /H /I >> endobj 574 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 434.001 259.16 424.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 575 0 R /H /I >> endobj 576 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 423.001 268.3 413.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 577 0 R /H /I >> endobj 578 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 412.001 213.89 402.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 579 0 R /H /I >> endobj 580 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 401.001 230.27 391.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 581 0 R /H /I >> endobj 582 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 390.001 230.27 380.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 583 0 R /H /I >> endobj 584 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 379.001 336.37 369.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 585 0 R /H /I >> endobj 586 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 368.001 283.32 358.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 587 0 R /H /I >> endobj 588 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 357.001 236.38 347.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 589 0 R /H /I >> endobj 590 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 346.001 321.1 336.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 591 0 R /H /I >> endobj 592 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 335.001 337.45 325.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 593 0 R /H /I >> endobj 594 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 324.001 300.54 314.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 595 0 R /H /I >> endobj 596 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 313.001 314.12 303.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 597 0 R /H /I >> endobj 598 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 302.001 257.77 292.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 599 0 R /H /I >> endobj 600 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 291.001 282.77 281.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 601 0 R /H /I >> endobj 602 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 280.001 276.93 270.001 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 603 0 R /H /I >> endobj 604 0 obj << /Length 1712 /Filter [ /ASCII85Decode /FlateDecode ] >> stream Gasaq95iiM%)1n+ppM1c\sNY5cs.?E4ZK\Z)e3(igM*PbIVF]Ml.Aa_!eijrU*tJd7-/^-=M6\Km>N:h's)Z,5"R.+`+JLsR5%jU&FJ[$hdIii"?VGbNUgLR>^AGg)As+9L,@@&pV[ZuO+nq02ieP5s/eg/@0qJO`?N?i7c/7dEb8T`$b>Vk-?LpNVtkNa1Y<)nTm=B[%f]U>1tOo)42ZZ8hc[CafQ,'=JoQ<8TMtBP`YU'Pd`D.AU3>e.]o(N%Jk@_[)nSh<)6\8UVc17r]S;r/9;[ftW/_b%G*_pFX9aSh),]I@m+)L.&D48B2X&W@'b`e#_eUDY(Rh!/HcU?J$O91uY32\H0J11Q?j%6>Yhh(k\HMI+Bkn?Fsg\$.`7%nB#YXMP,EDqpO6NJMaPOo0.Z]MgR&>A9%-e;s$n!@k_&j@4TLN0i"momHK.aCV93t[ZeH+m'\r1d1';VX-(Z`VaP@jp!N+g,@GkTXG%$jr3&%IqQn5.qMml803n(CK2%!8FRQ0h^SJW7b%eE#0a:q8,SA^FItXoc_CHC/r@>9_UZ1Jp0g5cY&Zt;@n4efaN1r&&R'\B5Hg!S5"YE2g^E4+%r^coe@6ab,mB57gYLWN*Q;7Yk]I#'o"F\flH/=(!\66E3>e9QYIYIV[Y`^kran<-Q%:Q-I>/?\;9^10+=b1DmoTL(=:ebC&gStN;Bj;:^;6=M6d5U]YCpp>]_QlPEb>*t?fkJQt@d[m@l"u2&D&^A3]#&rm^gnB7"\Ir/A/I\)LoAo^D*JXSB*9YEJj?QFCd_jC)iO7ZQRi/b#olbC3[EH?nJ8Bj$>o!C`eVG0>)6RKg%pS>[NA".\)MOIU6LI?H-:\RB8;k?3cjeF"L8\ErV>k)u4)jV#e-Q0,VFYGP%H&Ml/bV%'VOnRFLO=m=&V]T8'*?M=O_;C]4k(&Fq=~> endstream endobj 605 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 604 0 R /Annots 606 0 R >> endobj 606 0 obj [ 607 0 R 608 0 R 609 0 R 610 0 R 611 0 R 612 0 R 613 0 R 614 0 R 615 0 R 616 0 R 619 0 R 622 0 R 625 0 R ] endobj 607 0 obj << /Type /Annot /Subtype /Link /Rect [ 209.15 649.009 366.95 639.009 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A << /URI (http://hsqldb.org/web/hsqlSupport.html) /S /URI >> /H /I >> endobj 608 0 obj << /Type /Annot /Subtype /Link /Rect [ 262.0 395.952 305.06 385.952 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A << /URI (index.html) /S /URI >> /H /I >> endobj 609 0 obj << /Type /Annot /Subtype /Link /Rect [ 402.0 395.952 413.11 385.952 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A << /URI (http://hsqldb.org/doc/guide/index.html) /S /URI >> /H /I >> endobj 610 0 obj << /Type /Annot /Subtype /Link /Rect [ 402.0 384.952 535.34 374.952 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A << /URI (http://hsqldb.org/doc/guide/index.html) /S /URI >> /H /I >> endobj 611 0 obj << /Type /Annot /Subtype /Link /Rect [ 402.0 373.952 415.34 363.952 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A << /URI (http://hsqldb.org/doc/guide/index.html) /S /URI >> /H /I >> endobj 612 0 obj << /Type /Annot /Subtype /Link /Rect [ 262.0 358.702 305.06 348.702 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A << /URI (guide.html) /S /URI >> /H /I >> endobj 613 0 obj << /Type /Annot /Subtype /Link /Rect [ 402.0 358.702 413.11 348.702 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A << /URI (http://hsqldb.org/doc/guide/guide.html) /S /URI >> /H /I >> endobj 614 0 obj << /Type /Annot /Subtype /Link /Rect [ 402.0 347.702 535.34 337.702 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A << /URI (http://hsqldb.org/doc/guide/guide.html) /S /URI >> /H /I >> endobj 615 0 obj << /Type /Annot /Subtype /Link /Rect [ 402.0 336.702 415.34 326.702 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A << /URI (http://hsqldb.org/doc/guide/guide.html) /S /URI >> /H /I >> endobj 616 0 obj << /Type /Annot /Subtype /Link /Rect [ 262.0 321.452 300.05 311.452 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 618 0 R /H /I >> endobj 617 0 obj << /Type /FileSpec /F (guide.pdf) >> endobj 618 0 obj << /S /GoToR /F 617 0 R /D [ 0 /XYZ null null null ] >> endobj 619 0 obj << /Type /Annot /Subtype /Link /Rect [ 402.0 321.452 413.11 311.452 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 621 0 R /H /I >> endobj 620 0 obj << /Type /FileSpec /F (http://hsqldb.org/doc/guide/guide.pdf) >> endobj 621 0 obj << /S /GoToR /F 620 0 R /D [ 0 /XYZ null null null ] >> endobj 622 0 obj << /Type /Annot /Subtype /Link /Rect [ 402.0 310.452 535.34 300.452 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 624 0 R /H /I >> endobj 623 0 obj << /Type /FileSpec /F (http://hsqldb.org/doc/guide/guide.pdf) >> endobj 624 0 obj << /S /GoToR /F 623 0 R /D [ 0 /XYZ null null null ] >> endobj 625 0 obj << /Type /Annot /Subtype /Link /Rect [ 402.0 299.452 410.33 289.452 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 627 0 R /H /I >> endobj 626 0 obj << /Type /FileSpec /F (http://hsqldb.org/doc/guide/guide.pdf) >> endobj 627 0 obj << /S /GoToR /F 626 0 R /D [ 0 /XYZ null null null ] >> endobj 628 0 obj << /Length 1702 /Filter [ /ASCII85Decode /FlateDecode ] >> stream GatU4bAQ>u']%q&[$ZOL,d\stYFm;4`(_UF"#LZ->r5h@&oDD6P6rT^PJ8as;C3hsitMRtL@,Y!T8/cb^07,PDibcCOFN#9aS>IAgO3G?]B;@E+OGJ=H1`eIoqlpW#ls[I5O`99r'$HSTaMCI)FR"%>jr7R[Y9ApF7GuJjg?54)/F&u/*B@WLuPs^k\/daX=i[=464k`Dah"km0G!(I0>dt<2Abam^)(g/:b#g.Ut'RHhsEAK!9(R0q2BlL&XP<82b@Qf5<`I>lh!!2c`+YDL`F^(TB+(!6G$ld="lL6c*8N$tRVMjQ"RA,Gl'G]o4^&2\14G^!THW@]7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cGf@2;,K)^I,,q4g(B$6*,FJFSkGEESn.=+q-M_8jb`@*QJ+F8<@'Q4QaOlmKhF9U[)lZs-;H(]."ad+>+L?qr7.WpuH*4VM>$PlS+"'QDchs_KkGo_qTG/gj@PN4_Q$bRJuQ1<,D,q,QS#;BKM6NoatBIm,[nJB_CO9!]Wo_3ll#l.]dQoO]I\';DqSb[\/JC-,*uf&#LhgWCnuPVNJEl8j6D-E-8GMPHVf6_/VDuLCaTN6Ma<6&XsgmW%kr"0GCEo':+:@Qll``])$qC*'MW4KPA/(]#);2dO4M:)$sm#k\Og[OjbiXJ2iQX@XhJUB+#<^80Bt@R!r9mr'tIs_'TNgbl3n>$5YrH%tEg(JZYpHAuqm7!0i4"1#,o+_4Jot88KLk;"kgkjt8lU80^S<'DG]:VaW(50Wt$7feOlpc3En+@>+W5!&jQ2BR9U`m?YfWh>/7d*)dNZh`H7!s_JI&-1Q2.*YX: endstream endobj 633 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 632 0 R /Annots 634 0 R >> endobj 634 0 obj [ 635 0 R 636 0 R ] endobj 635 0 obj << /Type /Annot /Subtype /Link /Rect [ 475.814 677.0 546.074 667.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 126 0 R /H /I >> endobj 636 0 obj << /Type /Annot /Subtype /Link /Rect [ 195.956 96.047 277.456 86.047 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A << /URI (../src/org/hsqldb/jdbc/jdbcConnection.html) /S /URI >> /H /I >> endobj 637 0 obj << /Length 3108 /Filter [ /ASCII85Decode /FlateDecode ] >> stream Gat%&968iI'#+6EW,f2EA4@8)4YjF#]V`[t-^1g#RDX=]&.)Lp:kV/3;I!/thm^F>Ya[J7lrL,+HjuarB_2\*hQ/>9rgJe_8MD$a2A_S)j$bqr^qXh&:*"4"fZ]R74o:+"r;e^`l0R^gYdK@Lj7NN!cE>KpPk^D2_$Q)RJm"N?U<-kh\OAg!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99 455.508 561.25 445.508 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 126 0 R /H /I >> endobj 641 0 obj << /Type /Annot /Subtype /Link /Rect [ 218.218 364.312 235.998 354.312 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 192 0 R /H /I >> endobj 642 0 obj << /Length 3203 /Filter [ /ASCII85Decode /FlateDecode ] >> stream Gau0F968iI'#*O1W,bM1A6O@PU:9:CfTXRUilOri9PS>u#Dds_Ca_UN8B]js^EC*R1hb%gWi7FSn9kEX5bl^;aDY*4cJKD$GS\ONX6khujRu#)R@1g7&ndUU(UGAj`08`#o#Id]=kC<&KWJNVcK;HNbcB/NJ+Cj"-18:S@5Y[Y._=`$+8YBTbPuD0ji(!pW&Et"Xf2"`_f`:g^RTTN0/X-qbAXTanTschAG+f\2t,AQY;PR#q'(Yn>jH.Fc1#8KN0;;`%;XUbBu4u@H?NdR%*cPhj;WfJT'6rb4d>6mVe0RAf1Xh``Am]+>_UKhaeJ5)bpmZRX>Yc?8nTh("'hODHC=Ob@eN>pc[@RXQ?8$AX"-">MjmkXn%;#*&;2=DIi.hG\$b#h4&`\aOHEJLsdJLe[[e!kF;-)>b`[L8\/.paW_6"Z[*:$_1PX*er]P\ZJo2AAAeDr`jD*KrKOljD:u;=?DZF`E-o=O[c`!Xs7%l1*"nN\Fn(]30`"DYrm"-kgfrZJ^.E2e&D`V>H3h)KJ3F$"X8--^%\U3RqXWm'#D*4`9CPG!('7!\^tR)Q;[Tj[Hp1b(7I`>6n^%jIZ9QZp6d'Jo?[!J(1lms@blT.#$Q88qVB24*d)40N*X+N%5\nfQ@Gg=^O!h4cbtm="F^dlJ,3cTNjmL&`'-ZRc9"Ej6,9OHsq0^Sja=_%d-e?W_VA]t24G*=oNd:9/:eb`o0bQFHgkhKl5MG=QJD]t(D>5IKe0fA/DCuf%[?7:5[_7kF1Y']c38@GF@anYTZPXq&%K.N/cF#.JV7Jep,V(-B-HbjXP,]\hL5Cj_tBLMkWp:+_B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Dud/2^=SukfJ,`e++OnM'VP*afK#RK'dh@YQ.*GWGF0O-kkYt6\7m2k(',,0]X/,$^h4[7@o!q9IcPVAFp`_`Ll+).6jQ%7g[,gEVISUDlHh!AqDR4X^UJ4Rc`KJ-J)5lX"WfWE6sX""JFTR_/Q:tksraRHl%*\(!K*`+YQm endstream endobj 643 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 642 0 R /Annots 644 0 R >> endobj 644 0 obj [ 645 0 R 646 0 R ] endobj 645 0 obj << /Type /Annot /Subtype /Link /Rect [ 516.24 574.42 597.74 564.42 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A << /URI (../src/org/hsqldb/jdbc/jdbcConnection.html) /S /URI >> /H /I >> endobj 646 0 obj << /Type /Annot /Subtype /Link /Rect [ 179.15 99.058 249.41 89.058 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 126 0 R /H /I >> endobj 647 0 obj << /Length 3786 /Filter [ /ASCII85Decode /FlateDecode ] >> stream Gatm>h/h=1%Y*qSiQ$*g;6=d4^1Pe=HYo\6F;*R!mHj6C/^^gA=nLu(DZ9O.#Z-%^fu_Oqpk:qo"@3S%!E^G0Dr1NPceR1CP1amSAj1Qdj3Hf`kK[P_REslAe)g^:gVDB_(`Qh<`pT@qQCb_5p=SX@W'kF1,$U@o`Lq)to#`_&);DDl=h6iI4G"Lo,i`gN,s&*W+]DEuJmFM-;][2-*N,S;qdoa5HbH,`=qoi`FOiFX;O9&V`@W,g_FCi0QF$:+>b[6s`)NI=X,ddK>9@bU8Vr&Nbrj%K9=q#m0%/6/ca>D:9e(sI0oQN$8?A0MUp%PaQnhj[jdG!L]*o#%Zu3"V?/Co'f;1j='C?<;RegG$QW/=m0)11T66jUA$Q_8$*$Zkm[9[K.Y%@U_4G>6%mn632[6ZNK;"I9mWC(K\T^XIEh)=FO'-Y$9E?=7g-3kCc4:VKqCC3-(`RY5#2h^%+`KO*ehYiJK(NW7U,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.Xt(*2;5SI8)?X^+$'#6K%#'BbmB;,[')FHJ_CZ4X><6O'M"OO9(XRRu-<,QfW$`)mL!c\=coe"g%_j&O`p2ftdd8sg*^D*G@te54?j3B2R8E?]^7!= endstream endobj 648 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 647 0 R /Annots 649 0 R >> endobj 649 0 obj [ 650 0 R 651 0 R 652 0 R 653 0 R 654 0 R 655 0 R 656 0 R 657 0 R 658 0 R ] endobj 650 0 obj << /Type /Annot /Subtype /Link /Rect [ 252.398 548.236 333.898 538.236 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A << /URI (../src/org/hsqldb/jdbc/jdbcConnection.html) /S /URI >> /H /I >> endobj 651 0 obj << /Type /Annot /Subtype /Link /Rect [ 538.788 548.236 562.788 538.236 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A << /URI (../src/org/hsqldb/jdbcDriver.html) /S /URI >> /H /I >> endobj 652 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 537.236 162.0 527.236 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A << /URI (../src/org/hsqldb/jdbcDriver.html) /S /URI >> /H /I >> endobj 653 0 obj << /Type /Annot /Subtype /Link /Rect [ 587.85 537.236 705.35 527.236 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A << /URI (../src/org/hsqldb/jdbc/jdbcDatabaseMetaData.html) /S /URI >> /H /I >> endobj 654 0 obj << /Type /Annot /Subtype /Link /Rect [ 718.84 526.236 794.34 516.236 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A << /URI (../src/org/hsqldb/jdbc/jdbcResultSet.html) /S /URI >> /H /I >> endobj 655 0 obj << /Type /Annot /Subtype /Link /Rect [ 794.32 515.236 869.82 505.236 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A << /URI (../src/org/hsqldb/jdbc/jdbcStatement.html) /S /URI >> /H /I >> endobj 656 0 obj << /Type /Annot /Subtype /Link /Rect [ 563.34 504.236 686.84 494.236 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A << /URI (../src/org/hsqldb/jdbc/jdbcPreparedStatement.html) /S /URI >> /H /I >> endobj 657 0 obj << /Type /Annot /Subtype /Link /Rect [ 522.82 374.236 541.71 364.236 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 311 0 R /H /I >> endobj 658 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 363.236 147.78 353.236 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 311 0 R /H /I >> endobj 659 0 obj << /Length 3725 /Filter [ /ASCII85Decode /FlateDecode ] >> stream Gasas>BAO[%Xua-aP4-ZY+giXh:\@@`SK\KP1.?4h9O-1*Eo1ST$!3G8oaIkQQeZq;WO_8(OhuI!ea)EKRC$c3ItCB.KWfE2B6cq=eri9LigiaK=(7^mbp7,(rKu1_TgVk38XE,&@M=t]'pX*,kp,N,(MV#k]k5G!]Nl5NMFDa6#?C0D<;GCPk-*7aD`sji(I;gn/'j.\-[o]fLddU@J-d5g7Cct`c_MTo<#'2T$.lJ_AB=u:e->6N#1`n$IH7n%*d;FsDmeo/SMBQJ-%L@\-;UFHR.Vog7Z26R>)p2%6!$Q6"i,EpCoara5W.bbSgQ6`k.CoTPQ%Bi)P`ThlfAgm76(Oa5\j*>E0BDfhX=Q>lnXp'%o?uktJ.._:)p*4%JeAT&fAn^nH8,,2(k;>Uk`M>\$o-48,40bp`SLjJ2mYcrcJmC-BT4g]Sh7@BOlqJDu6#AD;"U>Lh\N`@)$0/NcC-*ZJh-+Su7V5kiTa<9t)@/gA@/qu$IQ)GV;6c9e72,kKB^b%H0:=/p(0`\#k`1h-UQ%^[L'jicOYRkJ_J.A54lZPm6?'0%N@,8<*a:mC2+6Yb&:iegAic2'nqV@eN`knmX,]#Pb@AE22#tWPmZ]_f7nn6Q3gNZWXgXX.b!V]8Z,;;)-ESF)[FrV6?fQ7nKrmR,"L0'&R>dunU3uTh>9._cETS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9Nrs!38I&<6j6Tc;a0o0'FEVjilG-PriW%>9q\)[@&*PQ%k/>A%(d>'>MSkADPnCJJKI*Yps\HdPWc7t,"D8`Yk.oSb-n5J]\Pjo~> endstream endobj 660 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 659 0 R /Annots 661 0 R >> endobj 661 0 obj [ 662 0 R 663 0 R 664 0 R 665 0 R 666 0 R ] endobj 662 0 obj << /Type /Annot /Subtype /Link /Rect [ 542.572 622.0 560.902 612.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 172 0 R /H /I >> endobj 663 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 611.0 146.66 601.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 172 0 R /H /I >> endobj 664 0 obj << /Type /Annot /Subtype /Link /Rect [ 344.41 430.561 390.24 420.561 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 57 0 R /H /I >> endobj 665 0 obj << /Type /Annot /Subtype /Link /Rect [ 300.718 135.122 349.888 125.122 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 311 0 R /H /I >> endobj 666 0 obj << /Type /Annot /Subtype /Link /Rect [ 413.2 124.122 573.47 114.122 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A << /URI (http://www.postgresql.org/files/documentation/books/aw_pgsql/index.html) /S /URI >> /H /I >> endobj 667 0 obj << /Length 566 /Filter [ /ASCII85Decode /FlateDecode ] >> stream Gas1\9i'e'&A@7.pt/1mNT5D+gsQ2)&/&iAFp/l6`;)Zt%lH5KoMq`p$HV%*AP1enL8an:.>rbEd4"i*5/(gUO3W+,Oj^/aN6j2WJt?Q6Q?X\3E7h&3Dg\E!oAXMnt^OT8hMY3/9hr]RC$?t.3%M.'l1r=cV3L19tra3$')"JP]WZ9e?p`V4XahbN*LejjB26FBSdXRL@tR[@S,X'g1pqC47L4G'%b>"?+qG[c4hDFT2g.U4QQt[)F*CMLGJ.I6X&iY&'NP!"17H7ACe$"a,$&?gT,-Jki).Us=aE$i1>-(]rb?f*R"7=IHUe/Dg(+Q` endstream endobj 668 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 667 0 R /Annots 669 0 R >> endobj 669 0 obj [ 670 0 R ] endobj 670 0 obj << /Type /Annot /Subtype /Link /Rect [ 452.592 657.561 543.692 647.561 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A << /URI (../src/index.html) /S /URI >> /H /I >> endobj 671 0 obj << /Length 3265 /Filter [ /ASCII85Decode /FlateDecode ] >> stream Gat=.D/\/g')nJ0i=Gf/"]ACi[Yi&`Os\lTDVAV?"*][hI:+TeelFH,?CLZH+/KiiL9g.e%L!2'O3!aJE&\ic\QYQ;]CffC+;P?7[b@63Zfa,gk3.<_D!hUB(+iu-"nUCsTDeZb_cH1D`3QOME&n3_'/_D:*5:%OEgeuGP%M056d_Td;3\Hh9o^@6+.LN9l-dcYIc`531=j#EWRPlC]br\(Wm1Ke0p[_a@5<0aAM/dn.ECE#K>Z=q5jS'o;J=uTIXe2D'kD`\`$Pj?oqPLu5/fp;#]Pf8)>A3*h'e!o->ch-&B**P-hPbB#O)H>EMRH3c_.G=oOKYX^IZd^(-nu"q8MLNnB'bJu]&lH_p3nXqLG9.g/PT3eYYurdsG?">(4LBNAV>a*$EW(u^r/rRgQ)0s/Hh/&F7]!Cjq%fm(J+#eoI?0bfL@(t(=m+E+@"X2r_F`2?bfJ*N]`&/[>Yp(H;3uqdY,[XZ%#h1p-Z\3:o,XZ1tJBX7-(faRuhW-XYfUohjB*`KO:W@b]_AXI:5#?SIO0N#@51M[ju[VRf+74i&%)f#1s2!g'35;sT/D8>=H8X%cBt8IJ(55WnFpoW3%M9P<]t0G%/%65Y:1dCpa5!l#u&Pq;4B0F=Jmi/O)*K%TMbZkcH^NS\q4rrrc:g6eN5e8/uPJb@'ei)#\D&?!IQ+I&j"_pl%q(BOHG9T+g=MYBOa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 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 671 0 R /Annots 673 0 R >> endobj 673 0 obj [ 674 0 R ] endobj 674 0 obj << /Type /Annot /Subtype /Link /Rect [ 284.678 421.76 333.848 411.76 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 311 0 R /H /I >> endobj 675 0 obj << /Length 2727 /Filter [ /ASCII85Decode /FlateDecode ] >> stream Gau0ED/\H(%fW&,@I0lpaA/SZMks`W^r\TRHA`K,G^Cj-q_4/QYu"Tol=I=$pGW^F,,NHUp4,M\?lj((iGcj]3PJX%I!=bugprNoCpgfmB!3$=bV=V8CbCDtRlc1W_I0h+c2P6NPc(,mI5Q@)kAq4?Y!9P2/b5no;_(;]@C0%bEL#s*2Ud<^rQp^m[,B2Kbot?4kDl\o/");-B[I6rc"9qK&De1tBZ0F-k,"jI*/S).!l1YZ4g^YbAmauQ899j=KPWl;hN?"!2VuG0jd`Z(+IU22SUa="g&T#Z&V:9iT2MaAopXA7`f.gP6\eY1QHuK_c'B?[iBV/SJfqs#$K,Vm24^])\&r!;a&5&CM;iZc0:_Cf2YLb.%6ldH,n/T;)$he!OEdYQuCs7gM6,tbE]s=.fm9kM->V$[]Kl2Qq3DX;2'f82+oPd/J_X1C=72C#K:^l/KB0U>#+/5+YFF@h'!MFjAD>%nP)GZi\0RgnL+/?>cqCufEQmg3d3Su)*r;n*S;58ZO-F;QM.!5+Es$@?7_JYnK'?Q%fuI=MM%i8XB.-*&C]reCtP%$4Iq5S4j?SXOGFnMJ;hb@'[(PD=gqRA5`f^i\IHmOSpT6#1s*&o%oc7.0<1>Sr#5_RF7;eGU`A1"0=(VY@A$$?Q5D:JFbom7+U5RaWmQ'eTSf[p*qYl't+b6&FB8hH8K-C>ErMc[]sShfV-ofM?mL5Jn(bF&27`$!]i,f5"?b#:PCNf'.A=3o/]UWk6WEaLOE60+oM(8EtuDhJX#Q<-KFD`3Arrm=\8nRMg1g%A]srZ:MP]QG65To"E-d1G>6&$p",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lU$+<[_U6O9Gm"@mE;#k`@$ZDoEr*2+A,IZVNq*!#SoMAC#28'gu,$qP6-;cPUsBl4B3^g?EnVF/QV%d>)GN=NBS7".2f^l@-g[B=L29mXhAdU!rcVdoY0O<:>?1A$f4LA=S8-pXd&e9bG\sd%'g4n0D*MJ]qL4`t'=)s:S?_7m)=2K4m8J$s36eH#J!K0_e(;'S%07teGf"&-d/O-f'pY9K[L87@GdKAI]PCu+S/cGQ*.I&![3.eH;5I=9_YY,K#C5aiTWq5!:l:UlQ)@'n!;'`_^"rK>h$4c.u_&EIeZ"2HM-W[]LA]W;KTM0U8OB/NC!.tKrFA(A*YPMl%'FU200Cobo=asnN[$"=^"pq\Ke-nmD)UDEnQo1-LX%M>0P^CiFh0EG^eYY;E5D4ai%beAWaJF]D:5\Z$WI*tSIMdg&a-G8[r;PjWL6>%uPOX]Uc,B-]Hk_-.#!+HQ3uJYq%@uEWl%.UEe!bA!MY endstream endobj 688 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 687 0 R /Annots 689 0 R >> endobj 689 0 obj [ 690 0 R 691 0 R 692 0 R ] endobj 690 0 obj << /Type /Annot /Subtype /Link /Rect [ 161.676 214.63 210.846 204.63 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 311 0 R /H /I >> endobj 691 0 obj << /Type /Annot /Subtype /Link /Rect [ 260.664 214.63 352.604 204.63 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A << /URI (../changelog_1_8_0.txt) /S /URI >> /H /I >> endobj 692 0 obj << /Type /Annot /Subtype /Link /Rect [ 373.348 214.63 465.288 204.63 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A << /URI (../changelog_1_7_2.txt) /S /URI >> /H /I >> endobj 693 0 obj << /Length 2336 /Filter [ /ASCII85Decode /FlateDecode ] >> stream Gat%$D/\Gm')nJ0@4Vb%(&R\=4K=6L$a+c#[+RGh!:];s\)j$f2oof?FGMQ:-)\-a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ZdFen/flZXASH!eSRekJ'R5=-V=_7WN=@aal[h2.eNcZmeVTqQS3bTOaK1&S(%KuO4"Zh'OK+FTJ9D=7Z@OcL&Z5P`B&GhfGfVfKI%LX8BVT?;43$>N@HpaCo1Dt2Y)_.Jpl)EQhj@l1[Nac&5oaiNus)q98Z5T'V8?&cfWn[,jjWCr#75pnWcM3!KJbr3^,@9'(D]1Co1Csg+j&k*tA\PBGH6[K;b`eqroT4Y6"7Y,s^7cfA1"]pNH(s';[&SUG)l7r%dmbam]:R[l%"=Tb:rd@sD2,2u7BpgD0T4S5qc,&d[o"Nqq!o[Snq`JWc3&(K.3L4nR#!\G%6:XBn=7PE'(_,5M`8G+REg?omJ*endJKg%o@3$^W@VN;NR.6SkJci:Ur=dZEm&X82d+_]GZ.oWRs7/#+C^K@+Co#Mp-r9RL'!=%1+crapBIg&@olni0?1*@Jr_2Etn$>81-\YO6Vt$WdXk0 endstream endobj 694 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 693 0 R /Annots 695 0 R >> endobj 695 0 obj [ 696 0 R 697 0 R ] endobj 696 0 obj << /Type /Annot /Subtype /Link /Rect [ 147.8 431.713 297.51 421.713 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A << /URI (http://sourceforge.net/projects/hsqldb) /S /URI >> /H /I >> endobj 697 0 obj << /Type /Annot /Subtype /Link /Rect [ 386.11 377.713 488.32 367.713 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A << /URI (http://www.jpackage.org/) /S /URI >> /H /I >> endobj 698 0 obj << /Length 2527 /Filter [ /ASCII85Decode /FlateDecode ] >> stream GatU5D/\/e&H88.iGV?hLXu@G^9q'uFkG8fFb("f0[M]uEL'$nU>gF4I[#**Og;'a*Ek:XD(;9UH]8F.t[a2O[[jl(dYG'AlAaD'hphAbK4L`Om@tXMY*[pmTXa+EVL2#RO9Ag4s3J/4jXF'ORm3?=bYp>1e?uOWQ58!+\-.gd_$PkG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394Gq]gu0`:N4qFs(i:/OSF,IeIJ=kdoCOI`hE4>h4"#pq?;,5\g1!XV,!ut3kFVN;R82YW+r8F:"$ZX`A98)g)XWf]di*kPT>2d!Y2#_-<*4FC.#Jq&N72iIDZFr),&ra"H<>V)(^oUr-#JGQUjG9]$2'(eH9EC?)ZRtA1C]62mudKNK_MgC]+S;3W[_\P;$"tr/his@mLeJT"QLYc`Of@^>W3h,6EM.2GWfM&[5Te3nEt^r,T\?f(dBb25.*HU..SUm7HV/..1t]9_omDqUg[!a*Q=:t'ni=6;[~> endstream endobj 699 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 698 0 R /Annots 700 0 R >> endobj 700 0 obj [ 701 0 R 702 0 R ] endobj 701 0 obj << /Type /Annot /Subtype /Link /Rect [ 326.993 182.986 444.763 172.986 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 107 0 R /H /I >> endobj 702 0 obj << /Type /Annot /Subtype /Link /Rect [ 460.48 98.814 542.69 88.814 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A << /URI (http://ant.apache.org) /S /URI >> /H /I >> endobj 703 0 obj << /Length 2477 /Filter [ /ASCII85Decode /FlateDecode ] >> stream Gasa2=``=UoA./JDft3K+Pt.\qN+DK9p-Q3,57P;dt('2@SDn65l/Roa*2M7#>NVf]jR2Z`FA:ihHZUgrh$BA%sb4VrL(.+3V-;nr;;hP7"@t:!+k]clF?]^]PkMbVcTpAiplF!RhP3"S$(T6X-t1$l*&Xf#@JBaL728`&P3V.824nZhOZsf0$b"0jG.c<*:ZrU=qo-O4HU2d`0n`V34J^0$UZo24Slm5q"s^_3PI&n^mggA8!U0&1.=XS?ep,>ZF&Gt7(.GGprLi"3m_$9c]C0ITKR7'O=?R7pGMGZ_(69Qt7]9;s-LBKSoq8j/)oIXA]XsXj6rZQ>g23[EX;d@R!.m&3='Y/(bq\Y8E3T)ge$L^i7@ULkS\SiHI"qGH_)Ep'QNJ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(V_q5QX2%0L98lkhq:M4UKX;CCHKb8,(^K0a"M?7q=VnOWu%CkdZIls;`$jNtUnZ:+/iEI:r8=ei)L=:WQ8V8i~> endstream endobj 704 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 703 0 R /Annots 705 0 R >> endobj 705 0 obj [ 706 0 R ] endobj 706 0 obj << /Type /Annot /Subtype /Link /Rect [ 155.588 296.4 233.098 286.4 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 442 0 R /H /I >> endobj 707 0 obj << /Length 2823 /Filter [ /ASCII85Decode /FlateDecode ] >> stream Gat@W#WTqifN"jWkXd_I670MYOUPfL'RgH/2@^AdZp%oS#@fhqq,]EA@SNf/KA_:n]Bc'#G?dVO=fq=eFn>?;Aeh$W-dc0?DB)pSufprhu5?>C[?1CY$U!9VmQ$!u_=28@OXR;Y[)&HjqhP^Y!;SE]pLePf,0mrHhnJY=G_X%Q@/9?staM%f:irI":sq=DY9%iXsrY2VlT&rl^/a@L:S[[6i9\tI`@/`2*1>Q)2`?de&1V:Os2.g:b]j=4p-f+62Gn+L`e@pqQYCX,=.,0sFhX+2#mO)AYM(FOli_[qO9EW>I"amVernq.K7_3/Tga>)"7o'M_\hY[S#m0N=.?50e?0fO/X1%7H\:,iNYX,)m4O*K'hqKOl$=EAh-c&a&"e<#G=#Z.j.IeUG>8Bkdpnh`HS^MbVoSn6+hBV&q.10?g/-!c@"V>R/>C2sW`?5`#b<7pAjAnAq5A<9&8$;fA62[[f"e3ec>q=S/`'9IF+II0Q0[]oD59*$CJnB?\sDOIUskjQ)WSjC8l>;D;_,U[#NU7fQKD`+m:5q$.&o&h_FMr6Wa@)n#9Iea7#6rli1X82]JWBl>V]1;.%*QOuOCl.2XL_?Z@SuFDs43*@<@g^l/Bam<>,_jmPBH_.m#m,`XR!G;;;-9jM$aQYH=;6.Ue`K9HFmT`c"qsT2j13V*m^O9GV,-u&B6!kCa9*1-5A!s:<+KF_QO,Hd/t&#Yk5_kC/-*^;=H^fp#X&0TF'k@aRWYdcF@[j),bZaB-,iEu)D)[*0g%Oa?#H&G1Y!P:g3\^E+W4dnPqg%>Q\%2;:rl!kV#b_?"Eq&_W9-Xa,OLmocN)7JM)sd6'gMNd]/D+OA^+qNAl9IJ@'G2o?nt1M^J<9^<5d54B1bnMEY:C9oaU]^b0FM9fjeI[V)=<-7JhF",N>m%#OtfPG]N<;BcD'U6,N\#%b3iCtsQK.JJ8;.dlj/<40a5X@!)TE?h:Q:jsYQmV+S",H(_[VQBujhGmU._nD]Vi`8#Klie?C@uW`H\-0m6L+(ebW_OHkP^3ZTsh4%3FSPm-J^,4S(;iaj=on?*95tN[W.sg'!1lJc=ZJg04'gR6!JI5]A6=2"^OC416:3(33Cl12:1sV1o1T1FJ<\nEHqrZneFM3iD-CjD3_3FPZAG^&)_o)npia&nttM+#ru4k36W)+k3=BWTb&OKXPh/Dnr=/ZNaZ4pL+cYsq>Jh9,K\B8)%f$Xn2$Cd[=^:t8N[2ArnK[g&=9Bk5`J$>.D5KjAX3bslk/ioL!JaQmYfX-(YgF+=TO=,g0<"n'XV5m&eipugrulpe)s/m3aQ.<6IFme+X6/'VU5.l!d_;U5S*q3@$m%2;VOYX^E#!EKSnnJWNraa5_?"cPua'9HaUVh#nNa2KEeMlZ?Z(qiY!*St[Dhj_Ybdb$FU(+aSdKnJ!<=_bt?3'X"Y7>B@bNY0a4sV$u+MKnmhc5q8fg.o7CMZc'P?.03;[`@uhU,b:?RAXWXTc"\>IK&8sgEL"KdD$rFa5TU#>A`Pj&]3Bo0 endstream endobj 708 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 707 0 R /Annots 709 0 R >> endobj 709 0 obj [ 710 0 R ] endobj 710 0 obj << /Type /Annot /Subtype /Link /Rect [ 434.98 410.54 505.24 400.54 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 126 0 R /H /I >> endobj 711 0 obj << /Length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LQ+-n&c6WabP_IaiW/XuN?=ShZ\#5$@EeqqgCcDRW9GDG`sZoQH,'aiTT'pgN=M6<"\QpZ%K=3PgZm8!G`lG7824JO6>'&#WW6.NN,o`ApK5GP*Zg"Ybs"#*P@+-Kc`,VQEE36MjDVb[QhOmC51Ji<3f2*THM[1pdMLuf6*Obi2$!*JDZBM,q&L')"+FuCUPk8&2CLqO5oCjt;GS1jP1orK^\YS]iJRmK^qAKAaC=c9+[rml&f05ZIg^'e!Pd:Ia1uHbZ1V][7VXI23g"6m=/'I25e[B*TI-6^U?3A'('Xp6DZJKI@=@-t^k7K-7i8X0.;ijM2/!dl$/.8sMU%_T`9%9Aa7J9'AD+34@MUf;POH>-_&J(656nZ7q\>Nk0n@8Z16a-Qbq*5Tn:iTL#!fu.!.ZN`@b7PWFOj;XQ^nFA""#6000*78-1L%$m?:KM"n"`!%*7X[9S'>#r[g*Z$Tm!ee2Mr4`9l"&kT;2-"CLBTUoVEBIICi&+4$:n!W#Ns`27:.0&H=Fl1Ca:>fN5DI.cOU637pU3_QkCiZCr!=8*qf,h'@cbn>I-afIN.=X61eP*URWbG?[a^UM-/%,+osJX-Ah8fpB&2'ii03KbK,c+T78BI&@$qq5$iM^BlN8nllPV(5LU8S6Duhro$WE.hL]4IR'G&&$Z!lp]~> endstream endobj 716 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 715 0 R /Annots 717 0 R >> endobj 717 0 obj [ 718 0 R 719 0 R 720 0 R 721 0 R 722 0 R 723 0 R 724 0 R ] endobj 718 0 obj << /Type /Annot /Subtype /Link /Rect [ 278.02 676.0 348.28 666.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 126 0 R /H /I >> endobj 719 0 obj << /Type /Annot /Subtype /Link /Rect [ 362.418 593.28 437.148 583.28 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 406 0 R /H /I >> endobj 720 0 obj << /Type /Annot /Subtype /Link /Rect [ 475.0 468.56 547.24 458.56 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 458 0 R /H /I >> endobj 721 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 457.56 155.55 447.56 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 458 0 R /H /I >> endobj 722 0 obj << /Type /Annot /Subtype /Link /Rect [ 486.83 392.56 519.06 382.56 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 212 0 R /H /I >> endobj 723 0 obj << /Type /Annot /Subtype /Link /Rect [ 417.99 327.235 484.94 317.235 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 349 0 R /H /I >> endobj 724 0 obj << /Type /Annot /Subtype /Link /Rect [ 258.926 218.235 325.876 208.235 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 349 0 R /H /I >> endobj 725 0 obj << /Length 3480 /Filter [ /ASCII85Decode /FlateDecode ] >> stream Gatm>h/h=1%Y*qSiO;No&k1]`AtRdon(O?#[CaOupZ?M&6X-q"Tp&0g'^EnfRp\`#/k(US&^'GLgrX0K-3"Rl1oR^n!^L-p)Wg2m>Fq67>Q]$>HmXNfXd6`'"U1E2iHs*E$dc#ZaCj3M*/(CgF\O`;B.uc?')(35m7_N'^KLt5V(KZ3WlUm&'?m.S9'!3EO4%ciDj%_@O;EYu/@@Wgm0&)pJ(h_Oh#^&4S8T7hASZ(/g,LSfeXBP1g4#Xd[Wb]05LsR6jsJe3%mYoD!_;P^K(##VbGMB+O?2L`RGiDjV7XhM*9jOUaAFhd^rn3,tEUJP.dcFZS[HQAe9Zj>pg:$Cu,0&,[DLJGVU+oN'1L0]%JC-/tMBlA[[X65+IUAlmW@n'Vf7:t:['/J=qIPKTFI5IGAJp2FRIX(IQE49U^^YKJf8'+M1RZ5S%a,(rkIkBJ`Hhp'LfI](bcG>l%na8W^!bF(\i4=p'F%n3qgLN7Y;t2Pjj5pkeP<\A80H\^a0C(Z'_2^aX.9Zo-9Ri4-7m1")&=j3CW'qSM-X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j << /Type /Annot /Subtype /Link /Rect [ 213.6 617.28 337.21 607.28 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 124 0 R /H /I >> endobj 737 0 obj << /Length 816 /Filter [ /ASCII85Decode /FlateDecode ] >> stream GatU1hf"u<&:Vr4J\#Q4UrL5Y8>rn5WjZW4VFacCBi<[j#>FUg2T9jgrV&*4Jk['P1@]DBq<[R^oD,n!:Zc".#J.]nf'1+q[M.l7qL]8G83=`1"3\J_(XDu5aJR66FR.S;fo*+./@2nJo1V:.ai=+0`0HiRO3[TkAdNdLT#%HJiPG\q@os>;[sLEI?"Oj#0JfB?>AG\L].OSe-'3]>%U$BHUm[HpTl7Fl4A^ZfK'p#Y)TODQ'a]r-TU#NX&kbX"+We+)tL$%moK4i)%)hg1)H]-nDGY3>!.lP-V3tP**Di['11]hNupZlg!p8V]3gA;^'+b2i0#;jfY)M#Gf-l[r>cJLun.POkV7oaY@?0#[3IEZ]@'p@M&.*^?]?4ht;Cl+SjPYi.mTOr$J[rh`da%@eAc%l83>ZbUH7<41f:H(*)sjYTT:Q-$rKB\\PhS(F/=q:K:C1P2+]S`OSV-`QSAuH)?16Aira%)c@QD endstream endobj 738 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 737 0 R /Annots 739 0 R >> endobj 739 0 obj [ 740 0 R ] endobj 740 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 647.28 230.87 637.28 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A << /URI (mailto:blaine.simpson@admc.com?Subject=hsqldb-unix) /S /URI >> /H /I >> endobj 741 0 obj << /Length 2953 /Filter [ /ASCII85Decode /FlateDecode ] >> stream Gatm>9691&&\dR4be](jP_A#mTh;/eP-WcsEiR^\,T#2?%#NAN6PImTps7G?hSY^X?:TWVO`Tkass&8F$R2ecD*:Q>b+L,2Hl_43&-nWBPDPt%]e.qaIES"BTp3Z^'2N1m/r;V%2b(#5\pL?FLK]*SLO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lCN$Y?!lWK@b6O0XL"tj+KsY=Y*6OXZ)\Uml?VTk/3N,n8SCS1H.-Wh`]E/>fo.mE1[]1j"":WlrH[)s(%Ic]gC7'1/)"6bqo4AjhZ.c+1b9T%H`\^AlXs=olU)X<>0]l]j)LeHK]LKcW`RA9qM\R#>bUERg&[IF@rT,f2"Fq03SoMau(E0=fI9s#M3&KquX0u6hMekN]'GIGApkXQUfi[WX$CTh5Jl_9/X4BM26/)\u@S[RM080gbT@srkVd.tBr6V;l8k(ut*$IbaK)T0Q7g#)Bc,c5jF7U3g:&B*=1An.E`dbS[43$>'es:DG~> endstream endobj 742 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 741 0 R /Annots 743 0 R >> endobj 743 0 obj [ 744 0 R 745 0 R 746 0 R 747 0 R 748 0 R ] endobj 744 0 obj << /Type /Annot /Subtype /Link /Rect [ 283.04 530.085 328.87 520.085 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 57 0 R /H /I >> endobj 745 0 obj << /Type /Annot /Subtype /Link /Rect [ 522.826 464.76 541.716 454.76 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 57 0 R /H /I >> endobj 746 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 453.76 144.44 443.76 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 57 0 R /H /I >> endobj 747 0 obj << /Type /Annot /Subtype /Link /Rect [ 465.31 453.76 540.4 443.76 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A << /URI (../src/org/hsqldb/jdbc/jdbcConnection.html) /S /URI >> /H /I >> endobj 748 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 442.76 186.0 432.76 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A << /URI (../src/org/hsqldb/jdbc/jdbcConnection.html) /S /URI >> /H /I >> endobj 749 0 obj << /Length 2236 /Filter [ /ASCII85Decode /FlateDecode ] >> stream Gat=-8TWWE'YaHGn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-f3YNdBs(.'j@>su)\'j`'cW%V]OG%naPf4tKCtUDjCRDhYRr>#ho2$lOQ)Y**a*,1-pi6<[AHBYJ4QD^WK9;c!U]"\2kVQ6\4'\opiVmHk;7c&YO[3e7Fc%BMJ3>0sC6O)cU79<$Oc\LlA<,YY$boiMf(u8lG''h(J>cK>OUsSDq"[0)?:#J0WWl8oe13TsO3GC+L(@VKa`B]#HH-gH/02hpCXj9%dD-RLq)IeT=I#fuD%uXhF@n%i873*=pSR,lGgT%V7-#]bKe:kT,e#(!NG(LD4@j;+:LL"dCssr;8,Q>\hN9RBQEh%i\9+FB4=Xq#^g5:Zfft!B=T;_mrHBo.g#iAIc4);^c4W>Rq>/[]+cSt652S5f8I:Dk)9mp>_r^fe5]HQ)<*?:,~> endstream endobj 762 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 761 0 R /Annots 763 0 R >> endobj 763 0 obj [ 764 0 R 765 0 R 766 0 R ] endobj 764 0 obj << /Type /Annot /Subtype /Link /Rect [ 479.44 544.44 526.93 534.44 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 172 0 R /H /I >> endobj 765 0 obj << /Type /Annot /Subtype /Link /Rect [ 519.038 377.806 652.358 367.806 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 394 0 R /H /I >> endobj 766 0 obj << /Type /Annot /Subtype /Link /Rect [ 177.21 366.806 181.71 356.806 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 394 0 R /H /I >> endobj 767 0 obj << /Length 2322 /Filter [ /ASCII85Decode /FlateDecode ] >> stream GatU5>Ar7S'RnB3nB6=l=>`a;Dnn%LD;<^3e#\DZ$nhd1$RbKet8]tf@!,uHM)s6D!$FPpIbN9ac@YjcW(@:AoXqj54bf`$(Hr;P6N(Y4Y6fjTs2qu,3*Q2KCno4V70I`CJQ8H)od^tce2ZeN9db*qWqP^bT8jfUGQB^VpaVnP;QW[u+]jML9=>Ar#WlfL*8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e;ORDM-gmN)27sP.G+Q$=mfXk=s#Pkac=gZnf'fAalAsg`ZD_q\uLqQl\.eB,i1s;I2Rsc3eEd"Y2t\X9a2dO[/_,/^&3WL^bqg"IJEoiXCFB_isY[fNIJ_p?t?X/S>jr*EUnY=]5YA8Cl=SfqX5&4Odlr/d_l0[GPARjCb@O(`T+WZ#Qr[SAr)>*,D)=)G3/3JcC%Cr4kht3E\7VlbTm^2jqO?bfGuiggDLBd]9kqXI,>@NAhL7\ZF@g+)\8[V=c@bn9usV7a.4__)8,k;3ue4%#I#D4f#Ob=ClX$]eIpN?l=ia]g\4g;C"9Vggb>V-dUq!="[$FMO"p-ECAVV#)5$Z^eVB4#rAE)f^u]!W(oB\(G;&FA]Xn-Z@H^;`p9HS4;Dii,,7,HI#Tea$irKb+bU(E/@'&bj\RW"KCek\5#:NZpjl`gJo_eF$^;Ka$a;k`=8$b=)Qqo/?2_1+Pm]AW%//Fpl!>m=!(d3J<64%VQf%QEMi!DQbhW)K/AuEg^bKcCggHIpX?+S,_]lO@GCV!kG'`'E)B-nZr55q5+h_[2/on7[&eH)"QNQDK71bfuNa5?fBp@X-LX4sqkTNc2Id():6n=jicRAIQX/G6U'L9!4ALTr'XPq)06(\e:EO;U2c[[5G]'`qd&"UL(k^c"#7A(Fj:p*B^t-*T!IIK@5Z9kuEtdokTs5NBqS_66B;(.eT`88j?!d:5T^V[V=:);lgm.ZHlISJl!X:u^$fl5TXGAk;iBjI7!IL34U*=uuK0kH!@^r89&F_o6]Ws#3&ipj(,ls3KqZ0sr5*")t/$IK~> endstream endobj 770 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 769 0 R /Annots 771 0 R >> endobj 771 0 obj [ 772 0 R ] endobj 772 0 obj << /Type /Annot /Subtype /Link /Rect [ 283.04 530.085 328.87 520.085 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 57 0 R /H /I >> endobj 773 0 obj << /Length 3238 /Filter [ /ASC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jTY\%^Q&*&]+0S3/jlGYC0nUi[m5ldXRBONUs1K6+W:.EL703\o.#pVB&`nQqS,!gqSqmffu)H2oZfC2kb#gIntDcVC;o'dkSBjYGaOiWgUVKDDtnD7od]]@]+_Cmf%_YPedmP7cRgVCjR]A[rQK$qt9CUcB":RlY'cpc>)BhEV;[VV1,Cq?`e]F^!6r+=4-S=)9XuW^Gmj@'hVT)1t&#_=GFB~> endstream endobj 778 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 777 0 R /Annots 779 0 R >> endobj 779 0 obj [ 780 0 R 781 0 R ] endobj 780 0 obj << /Type /Annot /Subtype /Link /Rect [ 482.266 180.35 541.976 170.35 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 166 0 R /H /I >> endobj 781 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 169.35 228.07 159.35 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 166 0 R /H /I >> endobj 782 0 obj << /Length 2718 /Filter [ /ASCII85Decode /FlateDecode ] >> stream Gb!#]99\*i%_h\@n1C1\8(%3R9_qW.eRh3AtJ=uZc24PSZT*.RB(enbk&4rEIGl#ArH'C5M(t1+2+8Zn[qEe>lRGRXfO$!nNl(nWT+UretOHieK'4R.)_/)A\Ta,O`uEU5Mu%jX1BGsX/5U-Hb3"t[(V9M.E]i>IM#3c4:.iXE3g4uG@&Vp4'VXC@.eO)rVs"6bF_E#f:jnpD=psk_`ct;f_lbZ;)H-nH+.4T2ShmC//6i("JuDaA4?VPN8B;'q=aD-!cf`i:9LCuR=m6!gXLYl:$sT#^@udEk0PbIV#B;NUL.Q>2U6Yr+3Zk/bZ*aG1EuA>J1,K01lbt^_f";k9/TJb+A&(So"s)Q6[L4Ig5Pg]c.A"@/M,:D^"qi$Eh&cMSfPm#:7NU!@/`Tsf9jK;N;[.B+Mk(W[tFs'&;8D,=$X!jH'b8BS8^!f]5g\L[Va?fKQSL6G.1je=Rl?VYF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pAG[d;M#d?632JY1VCa,)h0q^\.XBGnq7;/JCMR#hq*e[p)AY*d/cL;(Ua;=mYcLGfKT,""&gD2Udrl#`-eGN`/^KFQ<=1$WB[-C71j86Y9E[n#Hq;U=O-Dd:Hgf6ij endstream endobj 793 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 792 0 R >> endobj 794 0 obj << /Length 2207 /Filter [ /ASCII85Decode /FlateDecode ] >> stream Gat=-968iG&AJ$Ckgm6WdsR??oO'b#P>9iEfZA7#NX$ao#nr,&#VqG>I6diY()/4J*F8.dYRg(Q((9Cc]=>S9o),)H\A$uLX),QIqo+3V8!g8,c\qXf(N3LYHo38+N,-EnfhcK5/MlDgQ_X\(#V\/INt)AD`;m+HBIe&POqu:(N->*@i"@Y\nIK#BMhGs&\Qo*>b'oiH2GUr^h1"$c.6e94BY@`Mg2[:l>arZ7fAmTK8Z&PQmgSVD/o8ZDBm15%401A[ID6i@2f'g[@jc4_CHH'2Ym*FYUuC\oD:9C%k_MIq677dEG#l)*?V%#lDDP56osgo&N%Cq)bGYH-?n>oMTC5<#oe,glP6n&a)&h#eQeocl9h=IR>"oqsoQPRb6:gn3fL?KTs'a/Y3f;-4A4[;%j`,kG^m`@KGAkY4p/1e%L!J3j)G\I4#rHUsY9M&t$%iE:f)4+Xfq$8HV'),tY$1s3]:7W=RH4qrjM82:,L1:=Q3$W9>\&\C'N(iDPWdZB2)N;d`9X"ng!giD;A%=:1!YV:U@eBG,(r=?3P'iYKh?XA\)VL9rP>PKC*d87G4ia.b\4L]XqD9\'s5C$;g$!d%GLQs,OeVZ)5En@i%5C<0[pqtMU,6p0[*R04D'.rQm9XGjAH?-HT-hKS'm2SVH"Y%38m6UW,YlTW5W_]1h5hqi0-)VB=?r,2KhV*(41od7kn5\^\UF5+^msfd_KMRbFCDi`"\=%9==M1;TU>^aZXgR[hthZLeMV-rjn?2neJ6rmnC_pKATW>BXFq+I+G*CA`"srA7+AnHGpUo`P/LM$Tdrn;]e5P(nge8jf`M9/#I2Su.U$1'S8LPZ<"MBYeNk0'I?jNl-,MZ,6d-QZ+NBfnih^W%VoK8sE057%kCeG2JVeeU*$Bi$<"TW!@uA\rHfCI\Rj>mJm\^(((.T/%I(C5m?MfU%HmU\nRDBY4)-lWneq9ol4Q.-9YVZ&C6*I92`h'[6HG"!(9]NXS_n*_7=6N&#TJmqY`]\C2jqEIP?K_Mh@LJ;NeF.hKn]jo,u$[;W8j^OL%_/Bbj84&.8GhAPbI)V6`U-!4jqUf)a1Gj57".gj9o=VA+bgSG>3TC`Q3d0XSJl'Bne&6@MAAt+lA=@]87k[##;5"8WBn\9Z`m)9,#P6-]D/9&$;l;(KUrjZ6905.W55P*ioA!pAkp&gO+%e"Q0*.#B!p3q8Fq-&YpbMX` endstream endobj 795 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 794 0 R /Annots 796 0 R >> endobj 796 0 obj [ 797 0 R ] endobj 797 0 obj << /Type /Annot /Subtype /Link /Rect [ 162.22 151.853 194.45 141.853 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 212 0 R /H /I >> endobj 798 0 obj << /Length 2221 /Filter [ /ASCII85Decode /FlateDecode ] >> stream Gat=,95iiK&AI=/kYNB3i6Zf)8rKF5c*j)u"hJIc7FC`m96@7p/:'`6NrOMti^b'2G-W]I0Y\bk0+MVa]O%+&IeG>EB=""=/QQMmom#V$2Z+P1l8%*$B+YOMWO:A\IuiHiq6h!VKluWTV_":i;.trdXH+1lo*ak+CN0T\IEV/K?Sh++%6\N>_#DWfd`DNHc2!::\Qg"4jo=7(7Erq6sfTN^D+!-G"P.MP]/eJH`gE/LLm4a;d/`f4P@Y(QCAtq.5pNRi*q%@$?Gt1L6po"n])(#7]pT`'72c[VhF2;fs<3\0pM,f)8Uk4a/oZab[o7(aC6`i]aft%;4=PkW8]Rt\Y<%Z0%VP?8Ru)"]9'l;_CeLW1*a;nAfS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R:I,;6lD]%bm+nMUFl!:.LkFE782@Ms,+MF3f.o^*LnsC>Gi=r2Ha=j@u$upHOP2)gW-dYFeSLLW.qJr=%P=R=a`+pcPXu2N.uOXj0,$>q^p?6QaJ1Z$")\n8&=8J]HK2otWKFrroNXMUV~> endstream endobj 799 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 798 0 R /Annots 800 0 R >> endobj 800 0 obj [ 801 0 R 802 0 R ] endobj 801 0 obj << /Type /Annot /Subtype /Link /Rect [ 339.598 439.065 387.668 429.065 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 202 0 R /H /I >> endobj 802 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.72 385.065 296.64 375.065 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 204 0 R /H /I >> endobj 803 0 obj << /Length 2876 /Filter [ /ASCII85Decode /FlateDecode ] >> stream Gatm>;/bL)&Ur'00[ba4"VTLO-/!%\LY]RYRp=]:058hnp97pM3bDD.FeTkrrUm!D,\JOI8I?/WiAVI+_]`[T,FqVSBCjHk/6i=9g"ke,0mbkfB++YScGHLnXqjkGY%Dmife;eY[NB+J;::50`-!9G;E?.\dmQmXuC[BEY/P]?%N*72c'Ab$pMfsJqHm(1/;:?QW;#rG.P#(T5!a//AseC<:Hb")j.ImR)A4#O\`VTao0UCNgO#>%GR6!L1[Upr6CA'Pmpe2hV,#EB<;rp=o+njhrQC!;R7@lY,"6%YVRE[V';Q*?81b5"pfPTUQ,^;UpnDhE52@5pPtWfh/YJgJF%OuIs9b]jP646J_PO(],`%QIslh&^*@D@F/Vu!Cg4i(bF6Ug^F#B?WtN%UKIn"G>BCj_6'>g4g/q(R@`Q:i>LrW`Yo/#,#^1E0<(Sb[K[_nsS!G_n^=he76C$d!K?B(+0IP6W>Zrc:qoBNk!%i%K+S-;K&TP+nZ6ZnE&&9T+K(k]9VjlWjIC#[\l+UVLG"(^&c)tDujb8+j^A]458c"UCn!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CHK4hF)^PJBm4_7nSAVq)\:\T'LR-e^JS&gj5Mg@O&(g>"RmkET%FCpj*a8[!=-SLVDpp#S-u>'fO/S&H)mc$)TK6XV6fus^/C]t%!K+U58)bX*5;D#8&jZ.&H#1-nGqM#(n*?\0\'A]R$a0/?BlEXF'=$:#J<\!A%j\RgWa)e4XO#]i_fc&Q$tf[h^DhtK"UB:3),C?IcZW,*Y?D;oi%6FVgm1DTGouDg.I>il(K]pTFFP72uiRd%^q>%+SE-]?2K[r9D=o.60;&QaBgKGd-N9dVa6!*kLSfS%j[bnq4'ZFf=N^Cd7hIJ?6P&scEl1J5"Q0LKG`R_+ns'O]A#T:3RBVCB,5\L`iRQ<9V6c!1jI8/orPK'#O6SH6#N627GCR/oesu#a4K6u(i'hj%P%>1DG~> endstream endobj 804 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 803 0 R /Annots 805 0 R >> endobj 805 0 obj [ 806 0 R 807 0 R ] endobj 806 0 obj << /Type /Annot /Subtype /Link /Rect [ 531.706 434.108 543.926 424.108 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A << /URI (http://java.sun.com/j2se/1.4.2/docs/guide/security/jsse/JSSERefGuide.html#CustomizingStores) /S /URI >> /H /I >> endobj 807 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 423.108 323.07 413.108 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A << /URI (http://java.sun.com/j2se/1.4.2/docs/guide/security/jsse/JSSERefGuide.html#CustomizingStores) /S /URI >> /H /I >> endobj 808 0 obj << /Length 2977 /Filter [ /ASCII85Decode /FlateDecode ] >> stream Gat=->Ar9+&q801nA>:T!\pg8AQ]31Tt?f]2Vh#%STA,GMZ_\-D'bA/MGtSqqrMB7%MdYG%N;#<7c\N#31LBTj8INpQXg^5,adA*YCama.\$Y,?T8?:9h`H\K^%R3Rf)j@IU@o?PA-87,b)GTca5`tbRp;P7\Ac`I6'34f?hYP<*h[_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kn;0^&*dqGK,8UK*,fY'<:GBsVS*<_G/2=WH(kfUgGJI4%!dV)3lY&T/.f=IgPDnsr(rRh)YiXRBJsb(a:1ou9e7ojZ7g4gL"*J7RK1PuZ8(;]PMU4:G("!K-8>6_jqe\4T]eHB)aQ"i`RWWkq-/nq7_sVG_9sfGDso:r('"I2AA^,47LSd@Q>CTUt#b1#,8C\G%R>-k??:W_oC0(G3LdPuMLj$tTb/JG@TmYG1D>`hYSMZkkTC`#IU$%Npk!&T+X!X*11!6rXWNC2,TgT+#IYrr(eT9F?_6h9Son^O&siQlp$)YE-I5(1t0X+NDk;%et1r\5d[j5,IS8j8Z7C;b2[GrQ&%kUu\VVgRIn>ZI[1@&!+7>8S7LoJZerVr8DcbN2gPloU6SI_p4mT!mGWt>\2;hluc]6s0/YK_1Z12,3-uT-%.Y3o9\H)ST\tprP`H^Fa&7GQ=*4)rn",JUeM755=29+VPT7t-=lV7#T]D)>Rs1_q@r;Cg4d'-YUXCpnqii?])%9V9KT'A[o,a^V?!73)EK;]aGICXK.BLEudXsPh.N9Iu9&A+Vn,(RsprAKc7??38>*5?=$C$Tki`QW!Jn!:,AupnZY2QYntrr7DV>2a^(h5>$1k%i0E)]:]\/f[[F=FgUi+s5TqZQp'')\i2gds%1'lJS!n;!5`lkd&ibe%Rl2jbgg endstream endobj 809 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 808 0 R /Annots 810 0 R >> endobj 810 0 obj [ 811 0 R 812 0 R 813 0 R 814 0 R ] endobj 811 0 obj << /Type /Annot /Subtype /Link /Rect [ 247.67 719.0 279.9 709.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 101 0 R /H /I >> endobj 812 0 obj << /Type /Annot /Subtype /Link /Rect [ 599.29 633.0 636.93 623.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A << /URI (http://java.sun.com/j2se/1.4.2/docs/guide/security/jsse/JSSERefGuide.html) /S /URI >> /H /I >> endobj 813 0 obj << /Type /Annot /Subtype /Link /Rect [ 219.944 560.561 371.864 550.561 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 204 0 R /H /I >> endobj 814 0 obj << /Type /Annot /Subtype /Link /Rect [ 147.792 219.49 343.632 209.49 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A << /URI (http://java.sun.com/products/jsse/index-103.html) /S /URI >> /H /I >> endobj 815 0 obj << /Length 2301 /Filter [ /ASCII85Decode /FlateDecode ] >> stream GatTJbDt=8n@i8gU5,O09NuG7\)"t32VGao%[%q?$/h0?NOg]02hlSS_<4TNP6S3dFEf-N&NdhqGdH?&Q35\ZgPZ3FAOZTL0C_Z?C2Zm<_[!B7O.CCC`']Y?g`9YO5%YCnCjoJqP&&cIq)rrk/2jeGuCdj41Y>=tE[URoUW7FF%OHYY(7X-hQL+r1O%rfrU0"iFIV2\<<(j>-R=W$)KcT*C1P.Q`B;9M+_Q:L2*0BQnK?dd1ep45NZrIp".OQPN7m]4GfeWmsjSF^2ej<4O2St?m5VG]7>Lrrt_>*[f:+,$U1TJi,c/b!X<]"&Amop2o#@"a_rD-?cnn@:SB+RrWNgEqBaG[p=d;Hn@31hESb*d?^kJ-+ohX*t3CjIDHOar6(M$R-*tg78-U/W>MI`rV&1/_5,n^_TM.*BI.kNl]kX_nKE(]"Yei?=)%h&CS(n5;9hg[hAKho"&F"$%U3W]n7LBcZ)%P2u!ENK8.3#$MZ*+aidGXR.DP6+Q$AU@Xg!GA/CT)c5bqH6YEf_QS0/p4Fat"a)@a8ood7,jbleer]EJqCJ*8?BLoDX^b6B8;%8+*[+Y3QK$mmdi)38]#qV$OC8kMk5Y>'8?_9h```,]+E#G%2d6VKZE+7HZ!$f"42uaPf#m;9TOY=c''4*o2$dL$23\aS'P(HY6"i+K:t"CM#:[uY;%b@9\$V\)O'0U=od4i>YPY30jC=q'RsUi';Fk)Og_un`Aso+9r0"++Nd,DW1Qbh`&\M;LpF+lkS(X#M)_D)TA/Ne5NQ:19:-R,3='gE9EqBP&(qg(X(b\EE/j]F7hsg_7J8L+=h`^)X7#:@a?%G.b2n$-;,Eh\CppE&83r-@I"->R2=!U'>GEBTi"hoilqE&u,QU^M/[sE9@9CQpf*5f*.V\&u][!Xic"apWVoL3Ur9Q`GQQ!^CAm'Hu^Q;"@WB[X0ZFX9>rVh,Rr:KFV`J"Tg76(-%-,/$1pgVnIr5X#p?@5nYhVBh;g_GXF2'a3Gq+fu],2*e!8CA$L$;_>:JVNKq;X^#"Qm!2rG6+Q!_5A01m9E<52"3833IOiO.HFce@s^baoGF_AlE[/#f"igej1+-m_;W(@QOK7HK0.(P..#HaO:Pso/iL**l.G47l(3re1Zn76i!cWp#m/dVM``GU@!4<8,A(6\;@'q4#=-1Boa/1`Xf=LIhZGs!FTWI`3rToj)Ors$4B#[h&LsRAHV,Dj+Z*/?WEh`B()MX.QVs%+2h<6%-m!c>J.oCZG_0TTE!`Tl_1p%O"5> endstream endobj 816 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 815 0 R /Annots 817 0 R >> endobj 817 0 obj [ 818 0 R 819 0 R 820 0 R 821 0 R ] endobj 818 0 obj << /Type /Annot /Subtype /Link /Rect [ 528.26 636.561 558.26 626.561 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A << /URI (http://www.openssl.org) /S /URI >> /H /I >> endobj 819 0 obj << /Type /Annot /Subtype /Link /Rect [ 312.43 312.656 532.13 302.656 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A << /URI (http://java.sun.com/j2se/1.4.2/docs/guide/security/jsse/JSSERefGuide.html#CreateKeystore) /S /URI >> /H /I >> endobj 820 0 obj << /Type /Annot /Subtype /Link /Rect [ 280.87 213.006 354.19 203.006 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 101 0 R /H /I >> endobj 821 0 obj << /Type /Annot /Subtype /Link /Rect [ 140.158 149.006 244.018 139.006 ] /C [ 0 0 0 ] /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WN^fWD(2AVk1hGW,*"j$,b6Z"*4jAfQ:^+SL9)"qoPWsuC9()?`=iF]8CAk#_l'rU#`,dXf\'J3cpGQB4h3@au\49]9_$0De*XX!C<=bmb3(P"n2l#ajB%t:;9Hb%2N'(?.%."M(M-qNp718<"RcQqM=h-=>,kJB;1oV4O\[t=+f.>8"`e23QOeNk"[99mWe?1H@.faLi+B%RHQO1!VE8C8jBoLn$0U?5qA+%dZjQ_lr#6_NcQ8Fca>6j%uGQQZOLDMhm*ShHQ%M8D*##85/>aGp;Jp)?'XUGNEH9:n9*9I>&<4H=i9Nd/L9V,kdRJW>4Tn7<%\W,*MqY@??4`I;T?O1-JLpqm[T?D%"+/mrC-0t`pk`KY2l9,ejW['4^d^>&CR$dA6aeR>\+V11E,m$7a^cPAeCT&>"+oP>5=9NASlq4j**Y&NlZtWTi7D?LtIUAtrd4@h$bAM5,k=(0#1q&qjh+g_LUV\Nim&HunGmqO^5?P:2]9@Y;T8AGp_>57,,=?:7bLII)*&0eXs"1=O4j9+$\*(35la6S:J"jCLjshj*!!L]\2?`;c@hY6GncNFtb)M5F>aOhLmlscF;'iaW#4->7[s+^m2F[d0g02]DFY(9L^+fNEn4!%)m.>(6eo8o>1@c:RPY'1FDcTqHi*W6aO*T1O$W#d9bo endstream endobj 828 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 827 0 R /Annots 829 0 R >> endobj 829 0 obj [ 830 0 R 831 0 R ] endobj 830 0 obj << /Type /Annot /Subtype /Link /Rect [ 367.87 209.044 486.49 199.044 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 228 0 R /H /I >> endobj 831 0 obj << /Type /Annot /Subtype /Link /Rect [ 256.37 187.044 383.87 177.044 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 230 0 R /H /I >> endobj 832 0 obj << /Length 2955 /Filter [ /ASCII85Decode /FlateDecode ] >> stream Gatm>D3*F2%fSZ,+t*rb'UYhJGDsL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I>?c=So*$2HcORdnQ>*eNSOg1VEWo*_M.#8XMSMN$a&_V6%PqLMc.(.3HWZ(>;re-/NCo9I'XP0c1p[:`jc>!ma^Ged1^d+V75IDk?#Q_i?p]fOG/8_Ugl^jH*hQnZ\eDs()chDY,1]KE95*JCdQWfCSf[ee-%+K_%"3]hF_SjQ\f>(.;d60iBn%Z$^^\Obg&,HBkJsWYA?feL$,rAQNLSBqX>Plc5SCMH$6W)stPW4q'SKt78bIMZYU*.1`rg2lL)*@c/^:MA"%5<7&7R#?#OVrL"WmtR&p&!;*2>ca0M:F)1R8?)CPF)<>a endstream endobj 833 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 832 0 R /Annots 834 0 R >> endobj 834 0 obj [ 835 0 R 836 0 R 837 0 R 838 0 R ] endobj 835 0 obj << /Type /Annot /Subtype /Link /Rect [ 478.72 452.12 545.39 442.12 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 228 0 R /H /I >> endobj 836 0 obj << /Type /Annot /Subtype /Link /Rect [ 140.0 441.12 195.28 431.12 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 228 0 R /H /I >> endobj 837 0 obj << /Type /Annot /Subtype /Link /Rect [ 475.54 211.986 542.21 201.986 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 228 0 R /H /I >> endobj 838 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 200.986 175.28 190.986 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 228 0 R /H /I >> endobj 839 0 obj << /Length 3282 /Filter [ /ASCII85Decode /FlateDecode ] >> stream GatU6968iI'#+6Ekd7drCdreCV"PSe;%l_`ak3&Q9s(k4+:42B;hRhr<]%R?6$.`m:m?@[nc`A6NG^TL"ito:M`2_JK5_Y9#Lh5BE3R%^#=JG+%`13S`,lh"@60cn#QMNgQ$n%612RlYtgf?W'+D[URaMm/\-iM;FbEAthlY\b8<[I(Sk0#XNaB$a0-*P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cl(o_lENt$R.9G/,]tdNO4H~> endstream endobj 840 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 839 0 R /Annots 841 0 R >> endobj 841 0 obj [ 842 0 R 843 0 R 844 0 R 845 0 R ] endobj 842 0 obj << /Type /Annot /Subtype /Link /Rect [ 312.45 644.0 456.62 634.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 301 0 R /H /I >> endobj 843 0 obj << /Type /Annot /Subtype /Link /Rect [ 513.92 560.561 543.37 550.561 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 251 0 R /H /I >> endobj 844 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 549.561 223.59 539.561 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 251 0 R /H /I >> endobj 845 0 obj << /Type /Annot /Subtype /Link /Rect [ 214.16 441.561 349.7 431.561 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 251 0 R /H /I >> endobj 846 0 obj << /Length 2412 /Filter [ /ASCII85Decode /FlateDecode ] >> stream Gasar=`<=Y&:Vs/0[KmG!Y2"&fKLTa0/eaEDO\-ag8693M71s"77Tkl4"c?tk[k@^,'rJ>AGCGK7g=d.C(4gEpX:Mcq?L6faDE&-(1J)6@p,(#E-WPkm:71$=JH1?JS_)Gh.>@7oo^e9apQ,L_EaK"pCN#SON9k<[te[e5F8Y.6cOf[/d3$`Z<_5b5$%5E\jOu*l_50i6duJ1V$bs0;k_U,Mo0;Q'/;pZQoT&S?QqEJ?DJB_gDBomlN.j%Z'B(ALHop4o**hHo.kL*\QJAcC6"\,I]O)W1p9q:QZfWR>5idd\XlS$C<6;MJDtVDUaSD<8VK%77O\NAXtZcl-^8;/0[\f6/5++^)G?iQX^-3)kL9Qq6Fl>W,Lm+\P]OXPrSH%9]>a$-+JqP\99GEXL;@&DF]-U@mi@_r(nOHWUE`XDo/nGNa+_+0F,#pfB+q*-r/rj3L38.k"],$n$iE`(bQQP%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`RX&#BkNA3sM[MI;a%r@S'`1:J%hU2DViXb%FtO6m"(QU079?%^B9SD#L%fLmY/*Lt9_)opDFgBUe@F#e7q;P%O7U+LIX$)sqc"Jm\Y`lgMb)$uXsEX1@I1gk*MV"=$psjXJcK^lLb'q3]\o5t[[2/L+h1`@(#08Gf\Lj7VNbC!8VD^X+TPS1d!+0l7hV!!C*LHgFP?79*?bYnX,BJMr0H/6g7Y$)0O<%!U4#lp!!9aYk9K\^SI9iA1S-p)(0g_,L&ecR2_6j'm)_.%nLQZq>AlF61C0ImmmGnMdnsl.3gh-?TYXXco)!CgFW-4b.F8eTP4QJhY9XO+E0.mR:L6kS68JAZZMkf:#DGmEkK[o6mqpA6p8=H2G%UO]3hVR:md;%IN+YH!1oOl&;'n(.QL1;NOOka-H6 endstream endobj 853 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 852 0 R /Annots 854 0 R >> endobj 854 0 obj [ 855 0 R 856 0 R 857 0 R ] endobj 855 0 obj << /Type /Annot /Subtype /Link /Rect [ 206.014 205.126 285.714 195.126 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 277 0 R /H /I >> endobj 856 0 obj << /Type /Annot /Subtype /Link /Rect [ 351.064 205.126 414.374 195.126 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 259 0 R /H /I >> endobj 857 0 obj << /Type /Annot /Subtype /Link /Rect [ 418.44 119.126 436.22 109.126 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 192 0 R /H /I >> endobj 858 0 obj << /Length 2556 /Filter [ /ASCII85Decode /FlateDecode ] >> stream Gasar>E@OK%Xt$WO^/r7>@=3#)VYGlcn!hE];OCoJ6ct%(5f4>mPn6:[O9>75LdXaja*)_keNu_R\VA&U[i_V1OC3>I#iN9jncudCi90-#QO^Y+%U#'"iO1`bMD6OB3tf!1XR89:SpE/?Tt6-@>Vrj[H,!+N1B?[Y[Ue$27)*#:q$1c23u-%R1Nq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kjiPKcfdC.!V'-sEm=F%jRZPt&g0Zg"tm%rD':k`?B-"`5i*CNTuP\":][?jj;Gf;fMJqi\>;)%d:pH;#>Jn/$t04h=H5R7,B@]s[Jl`JF9?!efN0CG%#*0(\!2et[)*f,9rM%Pc$2)+SDHbG_k"6CUA=b4g[PRY.jRMO"-n]Mb%cj=/6KNY.h&.r?&jYn2&)I\L%tiJ]ZAh$St#?^@q[GR3tOa\'@GpD$+f`jK'7fk$S2&lKikWt[5*MZRm_0'[WIiOZ6YA[LA'-S3MPt`QX4fGm`Hs)mX;5%T0W^#%rUchL'd[=F>D%r'2gZ5S-Wi(A\L)eM/q7mAu%N]'>Z2^Ig3UX/43CU$-CpDfXPhljp^Zc@OP0AG1rHS(Wa1j1EI[l,tc%(Eh&D7%??Ld$2(/T(_W_&c[qUsY*QkrspoNb'$BEBn endstream endobj 859 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 858 0 R /Annots 860 0 R >> endobj 860 0 obj [ 861 0 R ] endobj 861 0 obj << /Type /Annot /Subtype /Link /Rect [ 285.964 211.725 430.134 201.725 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 301 0 R /H /I >> endobj 862 0 obj << /Length 2660 /Filter [ /ASCII85Decode /FlateDecode ] >> stream Gasar>ArQA%Xua-0GXh\*$e_R0))L$:!j`gVsUXFU9+q9`n&e6XY*pcP0L`p,uPpWQI@06o2.:hLVql*n(1XE^KW;FV6aF.pK,PWiQ>FWiSRqN?:Ts@SeJ_oFh[YBqNH5)2iG:]fmU@_X+PJp5A063BcE6r+$XE(ZHRP[>@f.p=o<3CrXjhY$fDiu@4,Xu&UQ2bML_&j_V*j80PnGh=XY`=oh"Vrrn.tjVA6sE++JRV?uIfK;U&)&/N7U9nP#?VRHLR]#09K3*JX%,?eVrK1S4(#r-X+s#[n?-;&%<$j4u(_1&C0^fZ;hEs*t'tqhNdkftJe'[3jT+)2%JBHn#PP-Vf&Rq/]R(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WO"mtmCO9l$0rBpZg5<"0Xc0[a76"!FB=L3FDW(9h*Q74(5=5q7N&a<,sS!><6?c)eJY]s6C*lcFS9:mPtDXj8/Rr.DOG$`a+QFR`nLqs)\O@R7tW`=6q.HYF!EM(ZM*4Gm?qi%;h!A+:o)I!Qo>RSlS,:;/GNH9cgIgH[30=Hef)/1hiIS-M#_B762,+t;3QMEF"$Ou*5]'[RZ;8QL`MT`\C2=`6_?[r9-.12Um:^%muU)Vr&5uF3mgGr[^EMhYg1/_l8/F&LVMaNh+^,ta%I7LHEk6]jm%<>0 endstream endobj 863 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 862 0 R /Annots 864 0 R >> endobj 864 0 obj [ 865 0 R 866 0 R 867 0 R ] endobj 865 0 obj << /Type /Annot /Subtype /Link /Rect [ 169.15 645.815 248.59 635.815 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 220 0 R /H /I >> endobj 866 0 obj << /Type /Annot /Subtype /Link /Rect [ 206.38 487.951 325.0 477.951 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 228 0 R /H /I >> endobj 867 0 obj << /Type /Annot /Subtype /Link /Rect [ 288.504 218.817 332.664 208.817 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 297 0 R /H /I >> endobj 868 0 obj << /Length 3346 /Filter [ /ASCII85Decode /FlateDecode ] >> stream Gasas968iI'#+6EW-knK*162MF%T>*NOQ48:9:"dWRW%<$*q(78.A-Zn\8EBh*hp).AZRb<`GBZ,q';Ua]niY612m:KB-&uP:\P+U:g1C+m1o>!%NG%LbUG6!;&oq:O0!dZV2R4&M3?O;4G<7[hkXY9Ffa[ftPBC5sFZ0qNX%%T*Xii>7:56q6Df04fS^%0hYi]?<%#?]_otG@2[]^Fe_B'dpP);c_W,n`q!@FUO1dbLjZ*P#gCHZ:R5a2OGepNs65RmR@g3:TEqk^hIY8$UfMOpL(k!3N8q/N7Js)ENCk3Ck=Z(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A5r(BC9AI!0#U(I1-]<-&9i93Z8`q"jA8!N=1,gDCEZ6BfgtMn1ToRT3M.;i/3AF!@hCbGqMU\PnIS&pL>1K\b`'KInp8M."E90tu%[fel&u6DY^BiCZ?S%+qr>Y\@!,!GG1-c[Z!PL>>`ohhd(6bj$1>1C2%^M%:@#AKWaK\tV]-)],f.>#og6UN%!Qu+.86EGGEnoo+.?>jIWWF1h)cmE6J87OI2#G8jW_C7sQ`cQCT9%o6SUL3dZE*.YmR4]_@V;t_LQeTc'"NIS&Th1$QZ&'eUfm-.Y`f6VFkgnY*4MrkXupclP@T'-,;5b&N1cM%HA3?hk%!&/7n2(pojSajM#!rL?jXl2S3GB#\^c,lcX#_$7jG6eOQJo>ZERbb%b]:!!/C)*jZ`r'hgq$jbR#MnC&K'f_;A[`'F9o#jA'/A[>B^Y.;8^C+,_,`+58qsK73fnnKY?9)T;EX!l1Q7^e2go/=X_G"*Clh*TaUUtb!:cib@'Trd/.IH!%5X"GiMLI8KM_V,c'j]'hp"\7N6g28WD*OIXJg7N5QrI*n6*:pB8&kl6dkEgcnI_N*[5*g-k2[\d&^,Dq_[t8+akD#:i>UDEp7.4Y]R$".Q5!3Hk6.]6XV-".(Y-DkoaHJhtP7f7qQdl[D25C?oh>*cKPX=38m7o$p2QTfc_&UR^hR%H;g([8RR1GrkGlP$[o@*!lt&:j`gW0F]4(ZLr5)X;IJ*6%p?ea4bd)]Obm#(gX._hE,iIgUe^pJ4_1oEK)h5XHLfpBV)iqm!PRS1%ZCHbhS$MG6E]+^8BVLBKK(Z)PH0k3.Rboh/?QhteQbn>a]Wu=fcqtO'Cs\0fnYU[rs*n" endstream endobj 869 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 868 0 R /Annots 870 0 R >> endobj 870 0 obj [ 871 0 R ] endobj 871 0 obj << /Type /Annot /Subtype /Link /Rect [ 427.664 403.649 467.114 393.649 ] /C [ 0 0 0 ] /Border [ 0 0 0 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0 obj << /Type /Annot /Subtype /Link /Rect [ 424.566 513.0 544.546 503.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 281 0 R /H /I >> endobj 876 0 obj << /Type /Annot /Subtype /Link /Rect [ 534.09 481.0 552.42 471.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 297 0 R /H /I >> endobj 877 0 obj << /Type /Annot /Subtype /Link /Rect [ 274.0 470.0 297.33 460.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 297 0 R /H /I >> endobj 878 0 obj << /Type /Annot /Subtype /Link /Rect [ 421.358 426.0 465.518 416.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 297 0 R /H /I >> endobj 879 0 obj << /Length 2060 /Filter [ /ASCII85Decode /FlateDecode ] >> stream Gb!kuh/D%+&:`#5iV=oOCfTAUpXTBTOJ+)L`Z$fm`B_UgbY=rS;+g-PoqTU'mZ^=]o=?(ur11seI?;*'.W]tRV"T;8XN7-1;`g`'MM4uprO5(,S[92o)lOR+4t"R0[A]-_NkaNRJ'9XKp#dXY9taIBSs)BPb4tT35oks7IZ0GYd/Wlp15]P*kO4<3^Pt,2r.JkP/L"*Q`$jc&J;K"Y4Wm*tS&ef&g5`*48Ee'`W7P+5P+F4[?,s\P2e[Y#-MJ\0aV9U944+>j-EiY/6@B,BtnJ=LS>^8Z[,`\p8,:^f-@"3Tqp8,Q=MUKFIq8kmgc$E=mUq`KKq1^7,'/*&-!RCfr+M>uP8M(_S/h2NMHVs,A(-7_?7jl2rd4f"mou6-=%mZaj/L8%idG3i/BD?ihN_+-Hg,A??*pb.du2ptlC32+Wk+E8rN0[&Tf,O.p'ZpuhI8ZEAq_'tWZs[dru,hK$ELI5`ALPnf;K%KoJa=>W!\8J#JSO.6eofPNDcR%TJP&<*^/]`:@K2TN8r:pAdaC',>08MuO(%1#Lr@mKZ0'jX2TKf[fTbd:)j/OsLA"[GZf8@Z;KP$eOuTOQ7.4o*X!,_.3o0XeI+.BSD$^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H:_+e%-Uu:!;E:#0Tro/qfYjM(p:9>J(ef)ZS[O(S#cY5-Vbr7qu\[uPa2rrWldmCE~> endstream endobj 882 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 881 0 R /Annots 883 0 R >> endobj 883 0 obj [ 884 0 R ] endobj 884 0 obj << /Type /Annot /Subtype /Link /Rect [ 272.24 435.866 412.77 425.866 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 279 0 R /H /I >> endobj 885 0 obj << /Length 3618 /Filter [ /ASCII85Decode /FlateDecode ] >> stream Gasas968iI'#+6EW,u1?8uDE5.&TejWLBs5A0uZ4cQ:fj,:BG.\p)jf:?\/%He"gf"$N-%KANT&oSGEo/JLV32O!^ndVbh1$p@rgb?jJ?j'E,iCqgcLTpOn@D$V1o]5?7(J"+]m40?*.lq`&/"c_lqSm$>AN7K!bOd?UEY'X=G*APg)g)K+:/.R-rO\8bI_G6`CWg[m"`3K$/S,>;<3(dn,"9q'/=[6Lgp8#HV0VAmi+D-j,:)E$KoM4.)AOdDF0<20X&H)!rlNpSQ?]rcWa^,+`7'P7.#!ods7fk7j0Xqkm/o:\SD5c:5[AYRlX7Pt8_Se(je8ZeW`h>4MD?moS%2Wq1:u"bda-_\#j\C3j/OD#=1pcm\uaRF=M216+VRe8Z,7A40./fFJ+"NBJH=*@,$b&[[.Lo!0q#Heu*sKp(Tj_YhJMF$@ZTmZ$'2_I8!e:I[9L*bm7Ua2eni'aGPL)srl[1^:M/?0kc&:Aem-S<7h1fMR1Flp(fR4HOP]@7TC84nrYp%)./e_mYM;^]1rKOTj3?_dO!eRL;i4Ws[lRuha-R@t5!=5[-J"e0"-)Y$`ouionpOpo$Omb&4M..CWlMOS06p6)HMi*LaQJsLoG)T#!aFQ,h.um6Io6U@M$B*`'a+B:Ucm*-f6W\o;,cGCD95r5po8<;/5H]QWt"lI%]iEnF>6n^Fn).OrM(DWFigWZKU,=QPR^i47!j&8u&NT\K%F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d]m8kf-DZVXlVIj:Bm^\Y8I[ZY;X#PqE$=TP6,(\$;J_5SFOL&"Qt)d3cQ>O%jS9/u@N87n)(WWRN/(kDg'5\$EOEZ65j]?tYNlq=0JNp*"_1RM"V12eU%NVF!]J,m??!Dcc*XqQ[Gt/4Oj4`^+mTYYYKmTB%OhY)"/K=*U-Kp^Bji0VIshpT$9CmkXCa&gN]35OJu+[BDee+NKi@[oRJk.[&M0Gb6ogeDfP;!LR_&fQ\ogZmJ$*^H15kZKe0.a!$[[\YIU*ge=&PaGs=g/C_9aK;"gp[*BeLDL.8P8ZAIcdhfhtY/6S@rQ&W[fd\);CgnRbG\2Ij^);MP96jK5_V-SGU,[9tPJ?3eh0%Q\_Lch%lO^s$0N:5TYV8!_4NR&h-0;$)HrW`E@G^[7jnO26b.]UDl!.p1n3T'!9:unK/rP--5,2^_mHYup[BfG+ThHg'(?pZN;je<-k$`)N5="qU%Vn=jFaH^S&WL6'b__Gl))7`gB26h(6]/K6V^]p\$p>/+f2r7js!,_:8Tek!o)PF&4+[)\[3Y^ICZiTC[q?;3\3aE?9C-r!u2q5f)\VNl6bh)lg+2$ig$qiRCTgr)U@0.U@c%8a<]52tJC7[sqh]fo$m#Yi:Y"-96c@=0dRdeG4K=jQelVE54U))l)1fN67hUKk921=/VNpDgpJ%W?ok(Qq9N!I/a#Ke+tiG1*%:NCE/*77":IeC-d$2:RqCpVk2=l~> endstream endobj 888 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 887 0 R /Annots 889 0 R >> endobj 889 0 obj [ 890 0 R ] endobj 890 0 obj << /Type /Annot /Subtype /Link /Rect [ 274.0 496.28 362.04 486.28 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A << /URI (http://http://java.sun.com/javase/6/docs/api/java/util/regex/Pattern.html) /S /URI >> /H /I >> endobj 891 0 obj << /Length 3290 /Filter [ /ASCII85Decode /FlateDecode ] >> stream GasasD0+IA&cV3*U%+I/2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faP]Vj;=P'J4!jTH\\mN9*]nc8QP(k*rjCb^eNCKO]t;^/L_6,d(pY^U'P7K+a&Q\pLp=l:ar3D5M!cVr-q%15>-+rpktn:]eAG]b.3TW!\?)XWF<8%CIigDCaW=emU>$qbNU(K+qX:pAMn@<I3QC2qhe"[@$mHr/lpuCbcH>OJ=QX(I;mD%XDn;>*!'qb:N[/qte.*8ZcKO)3A"9D6AKR5:[$DTPglXL#gXp_Qo:D6sJ@;54fNYp`9`6aL-`'EQYGln@8^(UjrRlN4e`.ZKoo7nr_:75P0Pu["V=J$pHYZNIShK&kJ=4iP+^r8]WE[n43e^l+-k_jdX*44C#foYN9i`.DE7blO`IKJ-L!1/@MBH2Bb,Zm=)r5lXKOH^UK0QfbT,G69mH[]d>IRA$tW7A"p7fKA?!+*3YqYnWA`?b$[*rjR\s7k@G?U$=9(N)F8in,+n>",-u-u(l0+GgW7"as0uo[AJ1/(k>hrB40uY(LZfmX4FjjtqiB(i=V1*A#+&[N`V=UL6i<%$?okT]gc^ku1n9-VVG'q0cs&DO/@eJ>rfXcT&i-j,57@.Yp/8&A6(hSOVq/*]GTGu9cLLZ,0^1(Gr`AFhMr^%PTpK.TPbeq!#0"#c7@TcGL`g!aZI^UFm+n.A\6'9LT"Aig+oK=:Nk:f^[,"e2Z++`?WFWKW9"MQ\>g\W+Qb37PI(VQd_YmiL5]6q1IlI7`E*P4SgMQktjoGfc-J%m>_BBE~> endstream endobj 892 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 891 0 R /Annots 893 0 R >> endobj 893 0 obj [ 894 0 R ] endobj 894 0 obj << /Type /Annot /Subtype /Link /Rect [ 662.266 370.7 679.476 360.7 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A << /URI (http://http://java.sun.com/javase/6/docs/api/java/util/regex/Pattern.html) /S /URI >> /H /I >> endobj 895 0 obj << /Length 2045 /Filter [ /ASCII85Decode /FlateDecode ] >> stream GatU4>Ar7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UjZ%q:4@k85hJ&m@>]RW^HeWY_uJOj5`PakWY-]BhZ=T?,$7c(TBZ]Up4?"fXRieT?CQFa#A.,ko`#F@>E:KUpWWT;=-+INnJXKD*qi:?(u@&I4T3O(Ue"S0i[Y6MG8f.Odb#^mXZU.E?fa;6=p%ZgcBFH+-k/!T2?%]dgeOKQ4W6GV];()[W5$&](<+n(]Hh\Uk3DG.e/B=P^"qt"Cff1i^OOO41 endstream endobj 898 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 897 0 R /Annots 899 0 R >> endobj 899 0 obj [ 900 0 R 901 0 R 902 0 R ] endobj 900 0 obj << /Type /Annot /Subtype /Link /Rect [ 155.248 604.28 275.228 594.28 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 281 0 R /H /I >> endobj 901 0 obj << /Type /Annot /Subtype /Link /Rect [ 512.532 167.477 548.642 157.477 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 247 0 R /H /I >> endobj 902 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 156.477 175.84 146.477 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 247 0 R /H /I >> endobj 903 0 obj << /Length 3013 /Filter [ /ASCII85Decode /FlateDecode ] >> stream Gat%&>AkIm&UsJX&.T$m#,KN#=$k;i3_>eDBmWUM4qr-::g2"N]GG-4G4b7HjU??fX-MMX0DrO13Q'fpAk;`8Hh6Z$Rml7^raL5anJ;]p_8=fR_'0-i1>RW?3a$:B`P:8Y(Jj%6YtFuR_qW^sp.*N\Fl=?@gXXREX/mARiu\?[B:ZbpL=#BQIJ`EtLV*S6qV,@@^+7_$h,-t1ml[LHh\7QT?2T&SrM"F-7boD;AYBp8?CqaSFI8HCh,-(nTPCGXW\]32QD2Ng7!sG^'SK*K.%Np9['K!softq4M!#DC7+&?'A^+60f@?(dPcQnV=$'Pn&r\?rJc_F[gFV2r)\PEj'2`FpO;?7NG5-ph\-QC]cqm@!c,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p#h&khQ$T?'qKW?urPZ;hF#S1)i]PSkQK7`N1)OM4Op&])]SaOsmM>#"50CjQTl\*=d4YX[:c@Y^fK9!$tD"oQPf^T[Q<:A)"2j^OGSdN=gdJLV3Fo5B*:#?9D[FAZe:+WauL;gelZ.rF@=g+'aTc\Sp(:+\qq$BN>!oNNK#fmdEJ-7b&'aCanpc\QcJIK7"Rs*7^b:E/M$b,ND-ErQ`#3DkIpcs?^g,Tsi+Q8#tDX>%9"e1&/2>[ABGW::W7p]LZCePr.*LJVub5E&KYnHH0OpL'@Add&&Mir>Y(W6:Qa2$4tP6Bcn[YWX4f3cGKrr&>@.mG+^.jTaDHfoWhl2mbVH90LY%HaHcN&a&N;[[I9r]FJ;$#iu@>b-))g%(q1d,A,_>*h[iJNZHa$K9f[)ga+hr.\c$b`!1s\>S7a(m9GP-q8*tKj@")"eqOACu])7Nb-)DDQ6)Wfdkp/ER(l%j,O/Z;os.L#=mGf3+6D?$5&P:f^qVIgYaEC\^2LremH[dt(PeL;DXOt"FQaIA'AZUE8asab^.V8!eE'Htif'!A$ubQrB.q&'9JcV`5C!>%~> endstream endobj 904 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 903 0 R /Annots 905 0 R >> endobj 905 0 obj [ 906 0 R 907 0 R 908 0 R ] endobj 906 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 552.841 221.95 542.841 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 265 0 R /H /I >> endobj 907 0 obj << /Type /Annot /Subtype /Link /Rect [ 348.56 469.402 450.51 459.402 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 265 0 R /H /I >> endobj 908 0 obj << /Type /Annot /Subtype /Link /Rect [ 163.67 404.077 233.92 394.077 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 234 0 R /H /I >> endobj 909 0 obj << /Length 2880 /Filter [ /ASCII85Decode /FlateDecode ] >> stream GauHND3*_c&cTMZ_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GYH(fb0r2S$iE`iUgh"GLlN+cteLTfl>e8@(rp=W=X+cdHoFKPMY8OQQB.GA8Gp"'UT-.+8*T94-@%m0^&nsLoont-F\,MR)RHf\?.%2C*VnhIr8oFeOGGO^5rMigu^I*i(p#WkGrjs,&/!_7_i\qRAIi78L.Ni[:;t_Zn^-,Rtu(9601OQ)LZ9cRmPJR!K7'Y/HK^L,oV+b,jg57*CEuP,E]Tm[gBt`Q$F48BPk6>UWFIj8OjMd_K+i+Bj`9U/:We@.#BZ=3a>0`,m\5AK,D\&E@_dLj+<1ZaJYX%sE?SC]W5714Ii0df"p[_gf>gRbh,$4aI)d,Q[AnM<>nWd,B9G/dg3e<3m[;s?`JBSF3$pi#J0@\GZCnsCnqEbe83953(OEFS9k#)'SM7p/i8r23qff5UL/:V)Y^JeAH0>K.qn?Wt[`&9qU5'buY>g7,?N7HJnJ;j[YZ1Z-BbQ"Aa^4Hk`f+,dFJq:bqF=7pY+(6a-%Ig.4UV\hW-%JrIbiTZK%-D)>XbI'11Ib8?LNNM^9MaMRC:29.-9tT_OBRC:BFPdp]?>ksS.OiTj52"`n#1Brn23Qk"Y&$Z'Mi&eLYph%1gUJf=E=5RAu=eg,7QpjlFB1DY<"Do"o'=lP:F]P6GFBJ-SK_Z`C$rGB%!.+pg3r~> endstream endobj 910 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 909 0 R /Annots 911 0 R >> endobj 911 0 obj [ 912 0 R ] endobj 912 0 obj << /Type /Annot /Subtype /Link /Rect [ 150.0 564.98 183.88 554.98 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 291 0 R /H /I >> endobj 913 0 obj << /Length 2191 /Filter [ /ASCII85Decode /FlateDecode ] >> stream GatU4lYkN9&HA?:_C,a:.:QJT6p4`?6]rq$f/.2OG?Zd4""hp/>"Ni.8CINePXq8k7rm&e%1:pZ]Z9I^jRI&40Y/A/dm1o\\i;AJb6)fnLk"R&`&6"$0f%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$C64YH7d*n)d0>O'nR]2,n#?iBZc_u&bd-!e/7R]kgniAhusGtF?gC^'OnB,5bMpecDP((";qLPC)PKTs5!fmb?EP,"rS[`aD*UpmGgSW(]Not;JhUGA]!j`Q.ghoZYaGV,agE(7(3gNNIo+?;_8!k$YK?WIO?Y',uqTk!Yb]qm&2<`p&*K]YCF62I#Mp%5sc#rTU8?UJ-+V7.-pAL5VXjc-`m9QuKDdLGE?JS$b(&bY"DSP):K\Hgn5I78f>@??>=qDL,.*dS?pFf'j\U>aiJOT_e[oqj)`pC-)Ur!n=u@a'R6-QUQ%Sp#C*:LOL?'&8irL=l9YF0MfJu<)\\,=cSJ$op+]/(O:oGO'&PKFHgJV.Hla@Mun*bXm]Wk+,d/(SA'_#C:^d1^IKKD:r\Fs0`,trg9_LK.NS$\0%;9cMa2,qrZ+gn#6Y3=.GDNBGW[%n.;_#>U5JiTZek&a>0Apanh,\66_$)>l&LL:aGq+"W7)cnpd7bP=&VQ)c^Lah*O,@-JMo4SGg#qRsZ4Z-kkLk?MS%>-U5p.iij^nIs"UY"fX&Z.mU.2_kM_>>@2j[OpQcKV^NI"/)u3?N,Lj*!N,TRGO(gJK6>ZC/C16EC\1M_sDnC?=%Zm-RVhj+d?j3Vc/`dNE2iqe'L"6q7S,4"06^Q?cF/,f@[!)o\jaN,da"=^]>Li?\Fj1GgP<+CpQ5YIRs55u";_I.p$N_;09if8[\\S"CfR0k;0kl<3pDrWP7<\)!)6k:dr\2fkKNuWOg!6"O)^="fRdQkb,b7c#*)@rp's)6qFM+iP-oQE:S$toK^&]EVjtpZ+)c endstream endobj 916 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 915 0 R /Annots 917 0 R >> endobj 917 0 obj [ 918 0 R ] endobj 918 0 obj << /Type /Annot /Subtype /Link /Rect [ 266.106 382.649 407.496 372.649 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 261 0 R /H /I >> endobj 919 0 obj << /Length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<:lbogUWD]Lab$Hllmh.gZ(;\i0'kTN@\:EQ39)QA=1(hA$EWd=d9s25uaKtuoYpr$B)Wf^TTQ+Anubb=d5),9JqA5$IkP7.EiMS\5q@AJW.S"!+B93;N.K=)_F1pBPSKCufD!)]cJWb'rsAs062\gFCjNq@CEcl#Fhls-:$:`196],(U@Z@]BmbP86sr+$HdW[XBBhXZ!EX8I_e;A'E>8tl=i.HuRrN,I3VD?WS@J>%K>(s8NE-+uT,$?Ai5XR``E^nX#a3%k0SnD)YWgo>k.+S0L"P7ShaZ5u-Kj-Z4+f-*]%';B%Z8nO!BnN6`V@S\3.$nj/O)FB9j8@^_sgH4/=NBHn*Y#cDMk3ioEmgs6 endstream endobj 920 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 919 0 R /Annots 921 0 R >> endobj 921 0 obj [ 922 0 R 923 0 R 924 0 R ] endobj 922 0 obj << /Type /Annot /Subtype /Link /Rect [ 353.35 267.178 397.51 257.178 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 297 0 R /H /I >> endobj 923 0 obj << /Type /Annot /Subtype /Link /Rect [ 480.41 130.458 546.24 120.458 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 281 0 R /H /I >> endobj 924 0 obj << /Type /Annot /Subtype /Link /Rect [ 250.0 119.458 307.48 109.458 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 281 0 R /H /I >> endobj 925 0 obj << /Length 3132 /Filter [ /ASCII85Decode /FlateDecode ] >> stream Gat%&>E@OM&UrVE@H?MqJ?A$MfdQ]YUe/1rH]Xc95[.dF"';AO6=`ro9/[1Ma-Yiq3?pudSg$G8mh9Uq*6s8p\%A]m+0nf`[2-M1Sd5J'%B%"Z5Qn<7+[?GkQ2s2&(H&+"+g@?3u_6O2S[]a5d!I^[-0@j0Ar?kH0@Zu\QA::$&IeR-tQaK&V1Q>l@u%[]/U48!g47S2]]:02-\`C^&G8/Q8I90\de39[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i>C["n.&R^o0mfB&)^(-g59^;kQ@`5II$Jm4cP69mS.Wn6Cg[*^f'G08XXoqJu^sb6h)BAkbl&Tf+r[dl&8R-YfA0g#nnQfKZ)A"]is\:`6L-9WnPY)CB7NdeoUYg(H5.+22GjMf7*5U?*"RjUCeF)DUJ!J*>']YR5M"kDsI81(j\h9]J`4n+t?l]8\/#nH;e\IaSTd4u!*kbt&ukV7Gb):Ul`U0)g=*bg9*@:HZ%-9"S*k0g7_o[Yc/,D=%n^JUbO,Wf@qnWtW;ss8F*,AE6\J`CAoqrQPitZGi^Y^f4[P4ggWCS.e(ZfMQ)Taa"eanC%iSh('j-R$Zq(oO%&;2A$+=^j;sPB)tm)aG%^elk[.(O`7!="+/^d/XG\tUbHb/*@8AiccMcu,eGkpY-dLcEOpNj1]7iTN'O-~> endstream endobj 926 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 925 0 R /Annots 927 0 R >> endobj 927 0 obj [ 928 0 R 929 0 R ] endobj 928 0 obj << /Type /Annot /Subtype /Link /Rect [ 508.654 477.28 553.084 467.28 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 279 0 R /H /I >> endobj 929 0 obj << /Type /Annot /Subtype /Link /Rect [ 250.0 466.28 343.6 456.28 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 279 0 R /H /I >> endobj 930 0 obj << /Length 2802 /Filter [ /ASCII85Decode /FlateDecode ] >> stream Gau0ED/\IE&cSA/@2t/2(.]/*c'HcNJD7cngF`,<]o2VP;&9CQd5EY@k`r)W"8'X#013u\Q8^t"7DA8:7$GNViOgkJf2m1bnl\)9k-Oa[C-F^a`O!,SMe@$5BQC@MU3J\&f<]s3+'DNCU,flTh'PQ1X_-0H=`Qo(O`=AiLd(0Fr%*0tD;QJGs5bJW]r60G?n6"\l:A@ss'2\&XJf*@X[PZF$dEUA?^"buo8J4/X_c+f:SQ8Fs)YXJlW>h:]@Y5dopq3mSS-?%aod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8N5a,`]XNC4,nc=/sS"^@e2L%aP#=-.sXBFeI!!1kLR<5+KK!mmG8;&fO3=q#\]YIE#nrI>@XZG$!3#]REb,tol)!f=`S3O*V&*ibHX*!=#oOGH8_C9R4CN'3hs6j'+hq[>f\'B&O\3`+pX'`2V2Ap-em$4J@10h,^6OFfcAR;A91fW^e(%_H"oaAU#Smf!_!HDm2T&A=c7oQqh+r/1n"fnT;#qPTAto.*&Ik+m6FTjEGGD^^XnrCA7Pe4SMUkr&-N'St+#-kY"0q1B\U8%r:967XU6'fZX,mm&4Hd'83t#\lQk&gYNgb.%oXqJN3G0fFI'_MIDeQCX#2e:$Dr'pF:Yq,U1R5`=DqA'_h>`_A@*:+P&LFbnh,hj)520HCEqO`A*$?^&q2/G'`;^ti0lUl!>p?.Q>qqnjp5LcK@(Ba,/,]]A%"u.~> endstream endobj 931 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 930 0 R /Annots 932 0 R >> endobj 932 0 obj [ 933 0 R 934 0 R 935 0 R ] endobj 933 0 obj << /Type /Annot /Subtype /Link /Rect [ 469.53 496.561 547.58 486.561 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 281 0 R /H /I >> endobj 934 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 485.561 159.43 475.561 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 281 0 R /H /I >> endobj 935 0 obj << /Type /Annot /Subtype /Link /Rect [ 430.01 179.663 548.63 169.663 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 228 0 R /H /I >> endobj 936 0 obj << /Length 3027 /Filter [ /ASCII85Decode /FlateDecode ] >> stream Gat=.h/D%-&qA57@H:uu^esc=8U!t",)a]PpU\!0U,\\3J[T6M>?Oks&L[VW;<1P0P\$b:-joH&'SjTbE5%itp!*B+ie?PWmUElEE>OBLDrJigStro[\4RB(ra2afMgsX_el4`&oaQD[\G)b,qCZbS#LSl-FJ:l?iEOWt=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<*iT$jV-'*uT]>$,XK1,*heL10R3,^0WU;k&[Vj`N0/s>(E#gS?m/c,:WRBlkf4g(+kQXTh%*P.hE]PKbRdBPA6)o:L:C"1lEml=.':G8KG]UK\@!XLJ"+Wre*9*B^%FCfg[q_841m)Zo"PSQ8>QEJFa:^F\2fN-bU8CHD;-0ioJ)o9,*0TgM@[_a(Ni]e!AThcH&Q!o5rETF]L]SrC?.V#$M_Rh(mI9h&ELDLno-Gp;qM9dFT%2*/#>0W);9$Jo.qX2KL_oXG?3R,##;>Ih(#k0]PU90)R`"0`c3-#^)K-e_b+8sGTW;H1X"P&5:[9Q9Kg6OTeR.^S>YX74R0V+OP(S*l6NEtcEU,'kX5L_j:c0BNojT(QWP49uK(:4n*(CapfS`i&UD>XdXB>f@rCQ,s4o8cPWT0GPil'4]O[f'-h(F8ibSr4ZIU79L)Qa7>,45=-c)`d_YM[tG`?[-Y`!+F1@kVd6,FgP/*g3=@Ne@iB4gH]^n.l27R*17)f-g8e!D-QDWZ^0HZl]R"p9.8_%Hdlr@D+c8p@P4X6ripW]~> endstream endobj 939 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 938 0 R /Annots 940 0 R >> endobj 940 0 obj [ 941 0 R 942 0 R ] endobj 941 0 obj << /Type /Annot /Subtype /Link /Rect [ 428.2 491.75 522.65 481.75 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 247 0 R /H /I >> endobj 942 0 obj << /Type /Annot /Subtype /Link /Rect [ 219.17 248.311 262.78 238.311 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 285 0 R /H /I >> endobj 943 0 obj << /Length 2625 /Filter [ /ASCII85Decode /FlateDecode ] >> stream Gat%%D/\Gm')nJ0@JEK>K1+,!j=>PlmPXD*E8A3FHj:Y:pOSXoR(KZf85pS(k^P63N\j++G&@m7QtJh4ORpI8rI0$7pJWd;'$!d\bKZ;6HbAo]Y5\$)M=7s\`/U9DNb6Jjm([K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7#0uGa=['18/Se[r^`[RYd"R:V.fK[=0J[co]>\B2nE()$_l=tngf>brK[[qojm)<5E$Zam4:f,[VX:2%h1TFd;]k3b%:N&@u2ukr^m'oBHIKN1'acPo=5-[B::_$OT)\H_DT[O983ElVc=+Gj/&;H58s07.0]bS:tY,'p5@6gaUqNF-ZsY&R:g<>Vpd[Du&*$CJ.e4q+0dH5KTtC7>QdQYQ"tooY4$rK:F^^OD,(sS^9"C43:CqE4We)kJn[t?:bg0P-#sS5[A,:(_nYH1-6N>ITq.`ZdCJV$8520=i^\G/qnIh1p/;j[32Z=h:LZdan,SK-slh'`G62oe"MaJ8rEES5Jr>uj3k endstream endobj 950 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 949 0 R >> endobj 951 0 obj << /Length 1973 /Filter [ /ASCII85Decode /FlateDecode ] >> stream Gb!#\>Ar7S'RnB3E3fcs6-DlpXrB8Ac!8I[/njU[$g'Un12U`k77W]S7FD,.;3l$H[&A5g?BtSG8X"qmnt#4ho$-sjoinVtCIIKJk9jGOEME1anZV\/URZE_K/e0q]^#H@G&cAcAS^Do=j$:_5AnKuc?k'6`kNU3[QT8Q<,JCW9^?h#^\*HiA6e8=ZM8p=6oc?R[-Fb!n?"Y;%TbfOmlU:#AqI*1pmpa8b=#KcLR&5$TMeAEu<.u@:;kR`]"e8N5@-h1PnuHcqe7%;`c1?O7Usqn62tdW7PLFBWf^oR>`-g\NA9fNM,)-6Tpm?nDTf+H2liRk?_-OH;[g7,JVa&Y:Li'O_0bb=bJl[I1IF'sj<.l@U>_EL,+m+1.MYB"Z9\1I`*J8@Q&FF$i,O5NGLhGps3&'GEV'\M>fYSdVHpLXRK=L"hahlc=90/t+0O^GG(J\MZB;$<\N58[)1#jC^=NffM-0h>A?s/u'.YCHb:ohP>/O4cp]RE(19m*3K)>N$(^?\f)9q'QYk"u1D3:dqGKXM'=>;-pQYuU]`>"7hc'Y]JY>PZY@9j-BjQr"@t&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jS>#dZ'5CRjfD#Q+2o.Q@NPLuF%6ggYM3Ymp#*nedAP2-0LXX_PO_Fl20n@g?+P)N8LXWAOVE-$_f0$X^pcncL1C^l]7I_/FqT-Nj(%Y3Js9!58mnjDYpD(+uQR/Ou>5DM'VT=o(g7la*>Iit.(H[c5kFB-L!_ZFD3.GNn"uQl?nGR-NAr:r"SFpXdRq:a*?-=n,kd;[R-G,Q0S'-phnFa(9JqQg+G@e=Lo1dLJqdB^!'3@@I]TP!aDm!fSS8s]W#i!*8)"'Hk9T4Q.E^kFUV%IU+TU:3(\!gbha)e@Ybfq#(VrEW_1DAdd+_%@01Yoj!(]ds]LbYY;AJ==F?E>C*$8'$.>AkiT*&YcZI5PS0^b7OY^5f#:GtPS:n<"Q[]gnrg@=/D(n\(H%;^\1TiEhU9@e,CM/$T%RLab?2aX8[0R6f!$EmKE:24=Cf1u3^6AFTc=S%0i!'\]^G_B=co@G:fF<.Due6]'L5,o8hARd5eYZgk?cg`%>Si0i6SZ,rOS"]946m.@kI;;3`%AomJ[reRps:Es5bp0kd>`3`^Yg0X]!nTm"F-nop/b@8rLe0F3/at?D&lLs`#)+/=eN\qXI#cGjDRd!T\h;?0~> endstream endobj 954 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 953 0 R /Annots 955 0 R >> endobj 955 0 obj [ 956 0 R 957 0 R ] endobj 956 0 obj << /Type /Annot /Subtype /Link /Rect [ 247.468 112.573 291.628 102.573 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 297 0 R /H /I >> endobj 957 0 obj << /Type /Annot /Subtype /Link /Rect [ 343.707 112.573 387.867 102.573 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 297 0 R /H /I >> endobj 958 0 obj << /Length 2421 /Filter [ /ASCII85Decode /FlateDecode ] >> stream Gat=-?Z4[Y%"I`D#kG9=f4o;Aa*%[rfFAj>_`$jW%`>O<6$8D]2oj3[\S8hWaX1TIWRBX@"U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ctQeND)RG#i^!R3stIH.`O&)=F_Y'f?dS0tWCGbFF7U+V%R/Lg^(@JHqa2_=bta@*,Sb1=WM)"'99&bq9]fU'tbP-JP&&&Kd6MFX*hfq?]Y(KE]87&]7k9dcra#%c6Re)HFd]%Peb6fZmHEFW]j>8i%6S@OCBX`1X3_B#Z).!jMtFHdT>['6hnkekgT1ja_!KRG$tKj4uUQhZ_q#5/4U^Uji>i/;0ST9F/6MqL'oGiE%tMi'X`>g_SX=-6#+U*lGm+PLeoT?jj9-r&RR-edUC/On\khGJD"9WMDJ64$DH:c/m/!7mg=<0Uc.^DFLus,c*?t_s++/(XA6c:iJ%V8[l>TO"mb&2E&GVW"Ad3J8%(_#lI)Ri2Vm;fa=_J.\:9,BRW6s.`LFn-"MfAp2-**A$[-/Iq#?!9s8TWaecjs+8*=J9-l,+I>VPE:AJ.3W+SEC8OrrQPck.C~> endstream endobj 961 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 960 0 R /Annots 962 0 R >> endobj 962 0 obj [ 963 0 R 964 0 R ] endobj 963 0 obj << /Type /Annot /Subtype /Link /Rect [ 139.622 709.0 183.782 699.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 297 0 R /H /I >> endobj 964 0 obj << /Type /Annot /Subtype /Link /Rect [ 373.88 687.0 418.04 677.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 297 0 R /H /I >> endobj 965 0 obj << /Length 3126 /Filter [ /ASCII85Decode /FlateDecode ] >> stream Gat=.>BAT.%Y"/UfZ?dVM3lckP.*DbVs1"Je(AB4F*o%=>-:r7G@8l[diRR4CX4q"$Jr8AM:dn]Jg?_[d]$06oTVeG/^$&D$=,b#g*VGX5"eq!lG#Rq:53,E_[Y-&#HV\s+H,DSR-59>6/#F/frkhP28oYmKTg&-u,I+0@&\-$kbW\5B+NQNSBbEDql>g6].2jWCp,B2A0AN(Sh0$>DRiFK,b,B/%!P/k9K$^TH]?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4'dF$)RfTO[?E#(]^!qfG(5X$\b;&SS2fN_k;Mb+0g:j`%Hhfg`QJ`"ZM!U7hqA;.8CkAeYb=\h7P)Qlo_!&#a!iK*)/+LiE^Hl=m,!+S2&oHG'+[LA%@Z^?BabSuP7]-eC_c$*\OL!7'oiHBKH2`$6KPM"7r!^q>&K0"K(nM,?gSfs7"4tC&-,+FXTaqa5e_fl765=D9^ln8,VorS&64iYHEro+cHGIq'[3lS*!BR5XCD5';p"33toKbl7uAD\?Zg"pq*\d2#A-dNQ4:CdRA=<86P0L%pJm.+,7@I3sD_R)(8.%6/hsmTrZsr,H#b![&ZN8o0ZA[]Ac"#!)Ob+QLCE,0Eb'5ENans^'uk5gq3V(..[A^_r0BK(t=u%K#)]Uo51Y^l[HZqF)cRC7Ys:2N&iu endstream endobj 966 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 965 0 R /Annots 967 0 R >> endobj 967 0 obj [ 968 0 R ] endobj 968 0 obj << /Type /Annot /Subtype /Link /Rect [ 480.82 429.675 558.33 419.675 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 442 0 R /H /I >> endobj 969 0 obj << /Length 3926 /Filter [ /ASCII85Decode /FlateDecode ] >> stream Gatm>>E@OM&Ur'00_1G.]8A5,CnXY8lp28Se+PU^VZiMQcn`:H3;OjFm.*J+RTEqd\pPBk"LI9@KoXiA+2a=D[d4ttDS,J7aEW74dK]ZXKLm#.hZTJbm,[5)b`BR`.=a0H0ia7VgB@A>96m8q+ZrjG^d'_LG<;Uu]]8SN:jjd[pY&>Qtr1g99ngMbT\g(,AWVl;0YFq$iaG[E2T`gD\Th+i.dtl90,n%1P.6O#s73kYBO)6j3lp_3)cljOR^TeG\1#TPMWS5g*#ndZWd?4fN>P"Ql):*>NN.a5LfS=_@bqB)b)@Gnh407G8>7M704#Bf3(Sci="&8HP7A%j#)#2YT9).cZr@R!O=3a'31DMcB2<(q0,(0a^F.i"Y_IL)Z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csD[WUV7MBb2B-%*uZeOQT0W2kY4SF^Xb@MG7'0Y8rECLI`%I],*R?X?ukJI$h10TGYF@`nf,T)ATl[ko9Wd`G.(o&XuIZ"KMY``9iCl*@K.c[85+i\)a(5u=::)7^bJFKiV&YA+rD<2LpR!3M7l1^:]L&XgTPN?>BnZF[$qouk:DU(GfVbYgF^$r`'P:#6mYPer[huW@'^2,RU?Q#-l@R=UgpF&Wg-I@hP5h0ug/H^U]bN9gNVBX%"f3eQ4+#4`m$h=^Qr,OaW)-I4uS*rSurUQ8Y=bD3mg>.Y-c+J]YHTcI&-7ee-oAVk0)VL-n[5LIHp+LlCnSU.$cZO-lR@70r$>@c5S*._&961l@PTT$'rrB2 endstream endobj 970 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 969 0 R /Annots 971 0 R >> endobj 971 0 obj [ 972 0 R ] endobj 972 0 obj << /Type /Annot /Subtype /Link /Rect [ 322.34 683.866 369.83 673.866 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 172 0 R /H /I >> endobj 973 0 obj << /Length 3430 /Filter [ /ASCII85Decode /FlateDecode ] >> stream Gat=.=`<(T&q9SYBZu[HE+n&4(Aj1eS=L(Y3TAm)#3/"b)Xio7ekF]_oea#3fRD1f/l=7*L,VRkT;g\LO$uM$TX4:RXp!9jAWg8gkGX9-8,d\>u]mYLsXr@f@o5)GW:&Rds?)nfr-]IsGAjPY7N6WO>H+)>14PF9!JnC##SM58a+*W!=N3%9WO.4r>l-=:6,j$H+[XD91M!%7&ag\H]Bg;9Xml6=4)QDFcn?!/N4.FOh]_\'u?Z!1)$QEbJgZEW9!jfQg3O?O4eX0@ng5("5je3MCn2R.6kE_od/&oeKdZCTZ.!:bT8q,AJo"tA0D2\bjFJt[(dr]n(or"^e]\86qJ:Eh=@8Q)#B@Mn1Z8PbB=^L/0g`_;sfh6q;+JI(cggjg^h<)>?BIoS$ThO\s8sN`6W#$QB+AC6@6,!P+eF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976 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 975 0 R >> endobj 977 0 obj << /Length 1338 /Filter [ /ASCII85Decode /FlateDecode ] >> stream GasIh>Ar7S'Roe[cs)\dAotd%fYb"jfSXi>CN%"m%L"F]&Q_PG81M'!oY6_*C%990',[tH*M,@=7D;nXY27k*OE6-]Ba>FV92F*:f'CF&_)9hQ+>Y;Z.ag+^74o38a^-VJg+4aSVj48fW!9r+5g",s,]eP!`d&%RF%(Vc\$T.f5?S',D85XaK?!"Co3f%8[3#=Fn$Gdi?7Ul^c[H+Eo812l:eO.#^XLdRm+EP]!8;L?;3ur4d.G5bU#n9ZO$bU&fgi#!%qrdR*Z/-][;i;VE`9K)q_Be"K\=RKejEa8P*>^3NKch(%YF\CJ[!t'nf4.gM[K^%0K+GQ37f4L8:H&@BB;_2ST0eqqb*]Pbk(CW.n6a5E%Nl*9Y9KK.Bn?+@q*h%$d.*c2*E.-]T@;M.9@HEJ0%9#[.4BI)=%!Gtm>]):FZ]ol3J4b";/:kX`Xg-'hs'*>AEci`SSoL=Qb^"S;:7hABS/bH>gp2(;JU%l.rnCo_eaMF@J6'+YE=)F0rUb8jF&"uJ_=\A-[@Y8^*2_2117&m;(^_SY$:fqNN"_80.`,[/P%O^`qS`cQeN$p8FE*SP#:-^hjXuHOj,b\QW]oC[Y(Vh0LXPb$V]mkCaNdo?3/F8F][c20dQ<\pd%poR[RB_J?>+KJFkGWkH?Jlc(>uBn>MENhfl1+\g@P>jmsC1!M!hX*As0=Fa7K>9U?fu(P+*dg7 endstream endobj 978 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 977 0 R >> endobj 979 0 obj << /Length 1715 /Filter [ /ASCII85Decode /FlateDecode ] >> stream Gau0D=\n'K&:Vs/nA@d"M.ta_+)Q0XRLm?OBODu#m7P8Y3)56R2R.o%"JX`Nmoqufg>lWp+X'ptql@%f=6J*!*1pH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R 985 0 R 987 0 R ] endobj 984 0 obj << /Type /Annot /Subtype /Link /Rect [ 420.0 689.561 468.0 679.561 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 432 0 R /H /I >> endobj 985 0 obj << /Type /Annot /Subtype /Link /Rect [ 171.98 577.261 243.09 567.261 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 986 0 R /H /I >> endobj 987 0 obj << /Type /Annot /Subtype /Link /Rect [ 365.528 225.961 436.638 215.961 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 986 0 R /H /I >> endobj 988 0 obj << /Length 2020 /Filter [ /ASCII85Decode /FlateDecode ] >> stream GauHL95iQE&AI=/pm;%1X/@7PMZU&`m!A!OWNDgARN<<&NetoCUIPr,\,Uk*OV10a*2dMUn:fbeSDan>WHZ2#lO/'4CIfBIlP",SH_M$-rmM+`;%ano5e8`W[Y$62f7m_+%:8;1?2em`C^F>>?s`$[MZu9Wc:1CTu[s<9Ya]i&/?PH/S7jEa+kr=L(p0?C5q7T?-AXZBfS\!/GF\hQ+\1Sl%0e+)o<;PD_6MoRmb+>`*/O&@1!k>OtJ20rk.t^.c>488@)P`\tn-A\0+%aLk.BfH@)9,Cp1)R%"^0ApE\!T<4h2V$a5E7Nb]OcEcf-,1^j4-k;(OTI#d(.Hj/D,DT)%1]N)nqOmun(ojJ?UKLoEbR69!M^p6T&\r0ftLgU"Z@'g?lktfdd0>L6!X@*r:.gQN>U/VnUgF-k[:tTqsA4_WoVL!721J7r-X1&GPIu91Q$B`@_/i%`KidL-s!n2uj&#R0U71j\C/7jpaIk*_ds2p]AJ<@kl*%^YkMfTdd;Pj2?X&PU8;NgE,N>ZCt=AGmsQOZu!pUL7Up(2N+bPc'/;;fWB0jb+-d<$G:>_ls:MCH`LZX8(XaL3(aS)P@H^\mVK`SgUb9h'(?DA7r6N2h:*pA4-:iuXs+OX#.4U8ZB56iIj9)/`"?%D_,SMUp:<+Y6)MR@fVY;g)PY=JRBs/:!Im>`J?A?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c]N4+s]Z_(dR'eW2_au;n\.[1U4V,(JUcW%O%]%/9C@MuXR!,5%BpmjR14AXt(:aO$;5C)+JV2!UAB:\%8P,bba.b"c)m:i%U2/\tN=?'SdD$?#a?e0p1K:H>8;$OBY<-sA_NuOV0i4$eA2/O9>^4o/W]]59*4c77=9N/aN:a_8l&W!O01!dYR*@nm2TGes):AFSe#J'H:6S3;(TSkr!JMQGGr@$iOcr]i9B\Ji@ZcU72Cl9=F\teneZ1+GBDckmC^c9KHP=BlC_`=+60Go)ag*&/Ls;]_hgAp;e$>(kSbC*QDR*M7*(Cl'`MN_^gc=3)hK0Ni3*1Z-k@Bc(I&@$(c]^6T%L8b=P*4XRe*NbiE`X`n$/Oc1Ir8Ga;]CSP64I_]WPJnfcdlWu/.rSf_Du$8791P[iPqE9oPp5:W&/ddh]/Rd34oZVIp"?HeK*+>e[P)0qLH4;`?i`GP_:jti<')sLD.gL74gUlD1s'Uk3Q@/o4rn:#E)guI+uCQA\ki6]sS]@nS!"[S6t_fN8Q<,2t?]N=3]76F^=a1'tCfRG*P56B"2dmKMh)4I$n*[l))ActI(<-l!Q(lEK3Vl=)3sobLg8G_<+E(_"a&3Rs'$!V"1$LeI!gcWVJXI`pti!pZ*4ibXP]GO9LWG9W>R%DMX/6>9jA9#BfU=8h\j^UVr$El@ZW[WU!?M7,D?H?9qqAr5aiU@oQ]b%on%3_+ti$g%/oJ#\'ZXPT?`m?T.;EN9WiZrHF>9%/8C*ks*~> endstream endobj 991 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 990 0 R /Annots 992 0 R >> endobj 992 0 obj [ 993 0 R 994 0 R 995 0 R 996 0 R 997 0 R 998 0 R 999 0 R 1000 0 R 1001 0 R 1002 0 R 1003 0 R ] endobj 993 0 obj << /Type /Annot /Subtype /Link /Rect [ 163.82 625.14 254.92 615.14 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 430 0 R /H /I >> endobj 994 0 obj << /Type /Annot /Subtype /Link /Rect [ 150.0 531.701 210.0 521.701 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 440 0 R /H /I >> endobj 995 0 obj << /Type /Annot /Subtype /Link /Rect [ 158.33 458.841 278.6 448.841 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 436 0 R /H /I >> endobj 996 0 obj << /Type /Annot /Subtype /Link /Rect [ 283.6 458.841 349.43 448.841 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 440 0 R /H /I >> endobj 997 0 obj << /Type /Annot /Subtype /Link /Rect [ 158.33 336.542 215.54 326.542 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 426 0 R /H /I >> endobj 998 0 obj << /Type /Annot /Subtype /Link /Rect [ 220.54 336.542 282.48 326.542 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 402 0 R /H /I >> endobj 999 0 obj << /Type /Annot /Subtype /Link /Rect [ 158.33 235.243 212.22 225.243 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 384 0 R /H /I >> endobj 1000 0 obj << /Type /Annot /Subtype /Link /Rect [ 217.22 235.243 306.38 225.243 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 392 0 R /H /I >> endobj 1001 0 obj << /Type /Annot /Subtype /Link /Rect [ 311.38 235.243 373.32 225.243 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 402 0 R /H /I >> endobj 1002 0 obj << /Type /Annot /Subtype /Link /Rect [ 158.33 122.944 192.77 112.944 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 378 0 R /H /I >> endobj 1003 0 obj << /Type /Annot /Subtype /Link /Rect [ 197.77 122.944 238.32 112.944 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 382 0 R /H /I >> endobj 1004 0 obj << /Length 2263 /Filter [ /ASCII85Decode /FlateDecode ] >> stream Gat%$=`<%S&:Vs/0_1G0.B?ZR[ogFcgt"b0\$j^jCsiPlU2:W+*/VhC^OCq^-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pA7`B\PYC;Ttp\$Lt9a!e>J'f1=Ufj6lVsZmk8SIBl8b3%L]hd2`uP3>A3D&^(fS$B+fr1Q,pPYlhS?OqK8q)"dj6?p`"XenAUXAe#?oU5!nF4!hkuYi9\`Pjl2@&4M[aV_jtUT\SM@Xs@IbpblTPJ8ekjjLMGj;jo+c*N,X-*om7mE$Z_VRl$!kfT&Ki9\6[kF'iQTEt>:H>>6rLuCZ#)PN8h2h`11^:*W*5srE1oL?R<_AWr~> endstream endobj 1005 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 1004 0 R /Annots 1006 0 R >> endobj 1006 0 obj [ 1007 0 R 1008 0 R 1009 0 R 1010 0 R 1011 0 R ] endobj 1007 0 obj << /Type /Annot /Subtype /Link /Rect [ 350.062 679.14 419.212 669.14 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 436 0 R /H /I >> endobj 1008 0 obj << /Type /Annot /Subtype /Link /Rect [ 158.33 560.146 184.44 550.146 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 327 0 R /H /I >> endobj 1009 0 obj << /Type /Annot /Subtype /Link /Rect [ 189.44 560.146 309.71 550.146 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 436 0 R /H /I >> endobj 1010 0 obj << /Type /Annot /Subtype /Link /Rect [ 158.33 404.847 231.94 394.847 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 345 0 R /H /I >> endobj 1011 0 obj << /Type /Annot /Subtype /Link /Rect [ 236.94 404.847 297.21 394.847 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 357 0 R /H /I >> endobj 1012 0 obj << /Length 2165 /Filter [ /ASCII85Decode /FlateDecode ] >> stream GasaqD/\/e&H88.iGVA>Ph#ZSt25561jcS,>4OQ;0r956X-pbm4M!fH'9kSW38dfsnH"YhhEI?[<3lf2h.[inuWsJY9D4]=n.p"(Z6"G.uT;[R7dB+MkB#eIAD.jp&1`?d9U4+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Q\*G>:(9&9>ja@\ib4no,a`+["HM4KPZ>RAA>W__*:a$L@#T1&Pm"m&,)*KiKcoK=?a"[g6./#.:,9^nJ>%s*d<"k2#`ie:7j:&O3=$frpHTXIPcR&_1Lnba5SWN9Q8[u)'Ehl_!CBR4oH(PBN&O<`:YTk=2?;P5QK1PK3snI/E,c2rrQN%rU=U7&`"gtD>1eiP;CF[LE=$r1C2I5qh)L3c\e@YCc32e\9kk+%$\4Yh[.<*-iK`ZQi7_I^#,#D<@[3O\N/I1Km_**>5bL]GUXhqs.k@1lKsCYWf.G3@eW]`]YS.OSj=l@<^]q(.7)OAWhHOQl$-[$^o-\mg)uhdDNf?K2Yk(UkDIF:VbY46gg[)c`NK>\`C;iO,kARfl:G.&b;VY5BUVXHO1TCE(cJ>?oh*Q,\@;76GeT'@BF[hh#0cG+WaMW[3V:(%qX3)r/]:(Y%i&6t*$_P!\]e6O6K+t8RGjFu(3E2Y6i7_]EKRF4FArmP;j"D!KSCPp)/jSD:mh0-2j4O^e)*)_p+$[F/I7EO endstream endobj 1013 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 1012 0 R /Annots 1014 0 R >> endobj 1014 0 obj [ 1015 0 R ] endobj 1015 0 obj << /Type /Annot /Subtype /Link /Rect [ 340.0 255.79 388.0 245.79 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 432 0 R /H /I >> endobj 1016 0 obj << /Length 2786 /Filter [ /ASCII85Decode /FlateDecode ] >> stream GauHMD/\/u')q<++nSEE^h3?onX9h.bB0K0OW93m?pm:G9<3js74KPta6iQ7h^iE^))@GZB_p1GQ'IY%t\2gZhg7Emd;o`;ta-\T58.tRD6?YYW3u0,"e&:h>2H">CK[kV=epD=3)6r/S6eg&q$_Qhra%7>5VCpJrWnc=A+qqOlEfP*aCD4)*T`:RD.8Yq-g8#6F=F`M/rG&j!/>m&l`8GqZPuHK_2;s0S,m)6Tmd4+B4uX-/ZIMeq((EE%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OquBb#%'/1BH=%5l8&p,nGbQ=t-OM'j6oe\%i#CdB./Un9+@/`^M$S:t:;iMsE3[*"RBQh,q]'So#GF2";`q*5Kbpu2[FenOd8A0F<9E\L_)c[%$Vsqqg3?'iq`nssGHj6t::<(D,Z;-+1V[";Z79c#HRR__K5&hT*P4!ke5DXLUiiB;`Ja3Sa,J$b@hjsO6"8QAC=R@/IdusIgBEk@-;fjmW>\?X-O)4Q%/%)bZ5#V#`K-0ippB\X7.KLq85OCB`['i!\rGM]~> endstream endobj 1019 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 1018 0 R /Annots 1020 0 R >> endobj 1020 0 obj [ 1021 0 R 1022 0 R ] endobj 1021 0 obj << /Type /Annot /Subtype /Link /Rect [ 158.33 592.0 219.72 582.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 368 0 R /H /I >> endobj 1022 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 363.981 165.82 353.981 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 432 0 R /H /I >> endobj 1023 0 obj << /Length 3253 /Filter [ /ASCII85Decode /FlateDecode ] >> stream Gau0Fh/_8[%_g7fGkPb(R8hSKm6*P%EEf?1Si19r\!`dD(Q:c:g.7r28o`=X5ElG2TIcq11UHHX56qBX!!E<`Y?".@VpWG(*I"em+1[T[OZ.:AIrF?B%<:\0N]3N1MTO,LFe.^9cR1@I06REKFoBE<;;V]VXeoZ@dn-!?P:L8*X>_^S[@k2^gE%La'tGQ;2Hk"(Z9OWIPncAaVEIZJ6u#nCHE92koV?'[:DB")W2X:UH?P;2?>%k!Vkc1<&33Tt"ATD(Ro!Vc^p4Z&g1J2EO]=8QCi2es)Dbls4PO[#8!9(mbjp>H%ocqsKF.a7)A&n(Ef?lgkp[omcB*"Zbo4i[[A3fdo-T90ThpB(QXPRc1=rV>!2N814B#qdX]JFN/?0Zd^XE1?Bk82a.Z^&A_QAuDk^WhqDJaEIR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jcFrr^'Z-ah>*82VX=3AO5en^24q'oic+/;h[Of1t?9aen2rX^a6ju,Q+e(L%1HnUC+FV=)5FD?9'^i2em49r.`9O#@l29V%[cM4n7(#oo"2.4b"9HbX`/kYHdV;EeJ:k)3T5dBpdkd_N#h#3Pp@HA1*#pm4<4n-G75Rr"(g)S'a>DY%`ifRg1kD@r:k/PV8Rhg7GH$(6g$PWmYAFSVQE'bDIer>4M&YRB#EkfF>%N\;h,A2])*U"8lD/2>pt4l^"_Y0-Lh'rV%q*miRlZ/c@nO!8\e/lhT>[n!CZP3h5spEXW"IFe>.+]?j5a!0*P%OWj#L(C4:brX?Lo!+/g"gW&lC%`/n#U$bSX"Zm?`W!1r~> endstream endobj 1024 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 1023 0 R /Annots 1025 0 R >> endobj 1025 0 obj [ 1026 0 R 1027 0 R 1028 0 R 1029 0 R 1030 0 R 1031 0 R 1032 0 R 1033 0 R ] endobj 1026 0 obj << /Type /Annot /Subtype /Link /Rect [ 252.952 601.0 400.452 591.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A << /URI (../src/org/hsqldb/Trigger.html) /S /URI >> /H /I >> endobj 1027 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 590.0 306.0 580.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A << /URI (../src/org/hsqldb/sample/TriggerSample.html) /S /URI >> /H /I >> endobj 1028 0 obj << /Type /Annot /Subtype /Link /Rect [ 158.33 558.0 230.83 548.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 370 0 R /H /I >> endobj 1029 0 obj << /Type /Annot /Subtype /Link /Rect [ 422.8 466.701 487.58 456.701 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 325 0 R /H /I >> endobj 1030 0 obj << /Type /Annot /Subtype /Link /Rect [ 158.33 424.701 205.55 414.701 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 333 0 R /H /I >> endobj 1031 0 obj << /Type /Annot /Subtype /Link /Rect [ 210.55 424.701 244.99 414.701 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 378 0 R /H /I >> endobj 1032 0 obj << /Type /Annot /Subtype /Link /Rect [ 249.99 424.701 290.54 414.701 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 382 0 R /H /I >> endobj 1033 0 obj << /Type /Annot /Subtype /Link /Rect [ 295.54 424.701 360.32 414.701 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 325 0 R /H /I >> endobj 1034 0 obj << /Length 1882 /Filter [ /ASCII85Decode /FlateDecode ] >> stream Gatm<=``=U&:XAWi*2Db5ma,l3dFPlKd)lj5@h4bRY4kPoV?ir[t1+/6qX^Emr$:YjY8Z*[s>?g;AoD-l!k:7sb[L\S1fp.hFV3KQsMX;?`('Y!$&J[\$8&%tW8#.ar5_u6&6]jJFGfWh/^Uj79qnR?)4L^Z19u4,H;gBUl803W]KP971JVp2J^WgY.QHLA\mHqDba6r#6-re#>]tT/9/SDg=KYaiQnAE:t02j/j\;:s`^WMk7pHj.S9aX6E3sqpDDJ2Is2)UK;$3`,f^MZS0F':Enpc@RJ2KtjjVuq/=,JEn1?scaJUaWeLWlOIf%:,6O4nP?,qb1$+J3lJ8E*q!rHV^E74m08Q[ruPe@TS[jbr'+h9^l*9,e6U3@k&WWdiYARGTRjZ[m(S>P<4>h+8iNhZ.`H^?4&u(j?.#OO^q);0!=l3a!L>iU=g81"#hsGue^Op&6!X[=Gj,rq=dC$7"SVJ0Ta;GcO&,/B530&b5(,-'ls@'[>*]Q>B3G'q$rFI2hB^n0nB/;"GME\I`X/b,3jCaFrh2\(h3BdG[lhFU`mJ_ApiX)n#(MfQ\9a^=(6)]?J`MWXNJGC@/tl2sUOC*Ua.O%O1#Qq;UDooef_7R.EJ%fA=jnSic='S-1tGe\R0FXJP[h,j$i)b;]S<+#jWl5]NhK"3qkW%6*luh@LF8D-81ND9o`qI+:bJ/i1gF!=g0^(S%5RR`XMlT;@9eJ,/L6kZ0OIg5r^e4_\`*qagYDM/UT_'NIk[5L'!TO(D0?`T'7c4kND_rirGbrdh!K@o=7I%h5j@3$q'P38HFV_5&72V0eNIp3aZ^H!3]#0`^Q5SjH_VJ9NDYRblM9gC-"1\(p`l#P0@qp8"AEhR9e#Y]>-O/mDt*b1,`KJh!j5?gQ[rh,L=#IKns9(pRT)K\0u0<-?T&.&k[0N'/7/JXQl@h@dl'4pReb?-^0S9PM^X4auU!4B-l4%!n'O.D5uJI!u66q3Und\^5JH[QM1hIVA(s@,t,ZOH2'SgZ;cWFZ*m)cJC.n>NgaT_f3[m:%ZbpUf@rhq*eS\LRZrWYj*h67h8 endstream endobj 1035 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 1034 0 R /Annots 1036 0 R >> endobj 1036 0 obj [ 1037 0 R 1038 0 R 1039 0 R 1040 0 R 1041 0 R 1042 0 R 1043 0 R ] endobj 1037 0 obj << /Type /Annot /Subtype /Link /Rect [ 158.33 382.68 224.16 372.68 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 440 0 R /H /I >> endobj 1038 0 obj << /Type /Annot /Subtype /Link /Rect [ 229.16 382.68 270.33 372.68 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 390 0 R /H /I >> endobj 1039 0 obj << /Type /Annot /Subtype /Link /Rect [ 275.33 382.68 335.1 372.68 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 374 0 R /H /I >> endobj 1040 0 obj << /Type /Annot /Subtype /Link /Rect [ 158.33 281.381 224.16 271.381 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 440 0 R /H /I >> endobj 1041 0 obj << /Type /Annot /Subtype /Link /Rect [ 229.16 281.381 264.16 271.381 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 380 0 R /H /I >> endobj 1042 0 obj << /Type /Annot /Subtype /Link /Rect [ 269.16 281.381 310.33 271.381 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 390 0 R /H /I >> endobj 1043 0 obj << /Type /Annot /Subtype /Link /Rect [ 158.33 158.082 205.55 148.082 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 333 0 R /H /I >> endobj 1044 0 obj << /Length 1896 /Filter [ /ASCII85Decode /FlateDecode ] >> stream GauHLD/Z4.&H88._8esdq7pBEg8\%W8@mDgdd2"cX%rIUG"pt.(D:+7M:dSQV8rdHJOniPrX:J2Mp93"K^]i/2FufSA?sR!YVa4kkaQXl^cd"3)'$?XZqnL1$!E^+_YWF]Mc=(.mY)8hOT$65i,R-BC3/tZn=REHBr:/"=S:Jtjae^^*d)Lr58a%sAk&c(JB;6j\8AlLog7M`$Nj/r%ECR2C-h'YlRH668B30FQ]-UfC)8@*>)mgKp6p*K.L\dF)"+sFcbfB(gE&X8;k3^,1*:EY^UIK$rA(E[M<-i:AJ"i2;do9##WM.D4+J#%,jVum/BT+GK%#P65cgh(46V<]I\sRTHZkuXGKdT'G2p"'oLTXdU]DD5)ZEfJ.o!j-!3ftLKYD5-\:mslt_pW,r0Q5K"U&F\m6bUl?D3C&ZNsli_h'91kfG;MQ!D2+`>67%a+jMmdY57M\c@A2fZ!ht-[Vd)YF:6fkj%Tomf2f&[?F0*\!UajTj.i8^gg*X9Gqi]EI*^^#KBrkN)tDGPg19lp(p;V_1%X/('27m/LLe.8F$o]3LVO/(<0e92+UR,p%?'K:=kMgEl#Ic-6lW&=u&]"I'mFNC-T&P'Ep070hu_k\XPGhqmkTJria;(KNk<3X#),qf6?J>"1mH+&5bt&6f_uudJi6PO(b*,.fk33R>ITY&[)S2+X/c*9V2DV8J(OG^Wf&>,`hJ''i:"#>G,+.;3*%39fjS@h^"8Uq(*WSY;9]52ARP"i\U;<'dXn+O&d3^Me:\H`=Akp.)ermJ'6`cA'J(FjG+C2Q5gp?8UZJ[>h^P[Y[a3!'m,\i(?PQ[cV_7'a>euFpng3Q%l=1:\p&t7b*2s%QI2^["ebhb_`H'#5G?*dR25%D:STfnqUnPi`XXb4-GD2RGiI2Hf-W]H3tNL$pe7Z^dPV]1JNNeCU0)3,`nR_lj&4ebfT>'=]`59uRiuhAPBMg'%lfOki//K8Vf8,0'Sc0]?%FjO]@TJ^ugudY%G!aj&4\'>omW7mV8eG6br4[AH+>E(&^#j://gXFp%XqWAT>%1PFq0Pg)i^t^bQBjGgaD@3nBUnV7ul?<+&0/Bq<\#AT"isW*#]AM@&&_(W.7oKMVD?A^>jqrC.<5%F[:]?X#,F$Im);V9[k@llZ'6)W3/eD25qt<*ot@,o5)UJP$?Vre_Y9I-R endstream endobj 1045 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 1044 0 R /Annots 1046 0 R >> endobj 1046 0 obj [ 1047 0 R 1048 0 R ] endobj 1047 0 obj << /Type /Annot /Subtype /Link /Rect [ 158.33 677.0 230.82 667.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 337 0 R /H /I >> endobj 1048 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 183.804 193.61 173.804 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 345 0 R /H /I >> endobj 1049 0 obj << /Length 2048 /Filter [ /ASCII85Decode /FlateDecode ] >> stream Gat%$lYkN9&HA?:6Kk<]83+@*>qs,hg`StMUpdRP..VqoBj7&X\WWHf[f5_WOd(*$A35K0R!0hE`Ok#iqNr?&ngUd_S(LcQ33o[JO^m)6F"G@KR??kL-aM1.p$I"HfN[[4)moNQRb-YJ7@m8oUNEU$FE2AM5+]Epm]?&)Xs4N.3q9BA&N^!g+c0H2-udT)c6Te],!hmT6i,o9j[@%HnbU=\rF+cN3"3arZcVl7CL@j=,]J.spi_N'9O;BH!=/do\<3PC#]9")f\]OJ[Pb)m\n8_U]#P7/e9+=;$(\;Cq7p_Z=uC,-.V_hGCIL*2F<#AUd!Js&/gc<:0X95R?0'=&=b4TaF]N$q;phI1C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61kaX"WP+;3aqLMhXD)M[t6qm?aE_^k_@@9@8b?.T-3J-Q>q0~> endstream endobj 1050 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 1049 0 R /Annots 1051 0 R >> endobj 1051 0 obj [ 1052 0 R 1053 0 R 1054 0 R 1055 0 R ] endobj 1052 0 obj << /Type /Annot /Subtype /Link /Rect [ 158.33 709.0 247.55 699.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 347 0 R /H /I >> endobj 1053 0 obj << /Type /Annot /Subtype /Link /Rect [ 158.33 586.701 225.28 576.701 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 349 0 R /H /I >> endobj 1054 0 obj << /Type /Annot /Subtype /Link /Rect [ 158.33 463.402 230.32 453.402 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 351 0 R /H /I >> endobj 1055 0 obj << /Type /Annot /Subtype /Link /Rect [ 197.76 188.084 261.91 178.084 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 436 0 R /H /I >> endobj 1056 0 obj << /Length 1612 /Filter [ /ASCII85Decode /FlateDecode ] >> stream GatU4h,!'#&:`#5@GMSfYg*%!4]ElkHrWc]>[lp7_1ODo"KSeuZOL0io"TD#?@0]63i9$@d*D',mr)jY\I8[,IC:sn,XX.c%u/eM5d_d8UDh\%VDH^.FgN:B^7GI'lr6&*%%Go'8^L$/YdI,&GsEn$^61I?XPBrnMccq:XK[GU82/XUDEd9(VK._-MT.J18niWX.Zn6?:&'L=e2o,p$,5el\5^n,@!FhI7TAp%pSe4:1JUTS,<8No%HGlW-r*R6h5FUI)$Xo_Sr?"*2NBBfD9K\i^cJPj2YUs&pM]s]Sb`Y;mH2Dh3jjG<1hd#QqBXL0O9G<)U1kTq@B':LKYF'"ap63cVjA^UJERe&hAunT>@qaO(\?s1sMho8L/4@MU;9,@_h:Qot2Afp2rRgNGpT,=YCf%@a@BgUgm#B,[(NI$$><;3i#SXJQe&Ke'B,"+!02)Kl0#R#/gI*(Q'*30mRRhP`p:$mVfcCjn#]\:U.7joPue&l>=8Ha/cR[lq93A!"WCodCk#kS(sZSHBEt9CmRV#[&Ne1,<=TsFO0&73:H&=[`/,1b>$AB\bDr*he2P]\&\JCU"]dV'liO4:jb_$K!bZ[*:MrL.WTY#R[bNNK=,q55RFV*j)_Lu),deg$BkqULr0r0.Z]`=,3rGGN\qP#_WNs[qJ=QR[$(hCe[gHtC9*>WC9NU07:5%LH=kncjO#K#aNRUOPuOEG/1PmunJ,N8h,?O?ScA*e>5,D_aXAuS.V>#85CpVd.W[%+Ed@M0$G_%>;[8T8KIDtJUjBtB9rl[t,K>I0+-R><*7VJ%^<2hO*dei1#)u@5V>QP/ig_Y!9^u\O]_sW8_B3Oc]PAG+[I[cWr]*MCWL=;;;"Y>UAiu%~> endstream endobj 1057 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 1056 0 R /Annots 1058 0 R >> endobj 1058 0 obj [ 1059 0 R 1060 0 R 1061 0 R 1062 0 R 1063 0 R 1064 0 R 1065 0 R 1066 0 R ] endobj 1059 0 obj << /Type /Annot /Subtype /Link /Rect [ 158.33 656.0 198.88 646.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 382 0 R /H /I >> endobj 1060 0 obj << /Type /Annot /Subtype /Link /Rect [ 203.88 656.0 270.83 646.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 349 0 R /H /I >> endobj 1061 0 obj << /Type /Annot /Subtype /Link /Rect [ 275.83 656.0 347.83 646.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 339 0 R /H /I >> endobj 1062 0 obj << /Type /Annot /Subtype /Link /Rect [ 174.0 595.701 234.0 585.701 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 440 0 R /H /I >> endobj 1063 0 obj << /Type /Annot /Subtype /Link /Rect [ 300.0 595.701 390.0 585.701 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 390 0 R /H /I >> endobj 1064 0 obj << /Type /Annot /Subtype /Link /Rect [ 158.33 350.822 192.77 340.822 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 378 0 R /H /I >> endobj 1065 0 obj << /Type /Annot /Subtype /Link /Rect [ 158.33 206.523 199.44 196.523 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 331 0 R /H /I >> endobj 1066 0 obj << /Type /Annot /Subtype /Link /Rect [ 158.33 105.224 199.44 95.224 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 331 0 R /H /I >> endobj 1067 0 obj << /Length 2205 /Filter [ /ASCII85Decode /FlateDecode ] >> stream GatTu)lmc9lIJq^q0O%XC.0gn%B5ZAjnWT4e_9QD]1ngRGLq>Q@Z2HbL5P=ebW*X?M$kLt2/Qksa&1">?^;0\?r%d7mSJ`(Aft?uMl'a't];RXm8QHb>4p0j^IPKfPO\@[Fmt(a,k1/Yb;mkaSEjF&/RbGs-rI$?t-5;Z"C1O90hsEN2!PF'S/('X&)r;=c6\bbn!Ark=WJiXTT.0t@/s6.#cKned^;"3TChE%/h!<5oGV^!$Zt\'aIn:'Z0FakVZ4G;uf%N&l'K&;i;A_^RRYXedp8[>Mgm[Na[7q,ha9m-lfZG1Dh<7QH+Q>7q]?R7ChSF7M3jqpu]b2_IprAK])V$#\BF1/*lXX#kIE+lkA>@AoaPe7GGCQ=Mtn;4:5Te:TWp0HB.UCA4+(-N'p/eu:p']ZZ3dQ4UNcb4/maju3d^r\[pbAk?0jkR7@*N+acPHM]kJAZ>+Yb5;2mgRd4'?k094n&G,aApZpK!$jVCO0-*fM8[a63k/'[i]8N=d?!\=>P:n=UIGWtj*,lk]*,6E3raOk>`:o_^CRkG)bLK;jBl3e?X(&gJ?MS5HJLd[gf5DM0FHS"g79e\*O7<;V/LsRT=hZ1F2$6!TP@n*[A[(!5H;`>YRoS0b,Tl6L]PCY<=eYDlM0+N4L=u9lBTe\>Lhm1i-3r;F_sg[7h+$Z*TW^3$6EJ`1CP\p$WE*$Y1rDeO%_,oa)__+3&E\X)T>TRg.oZ0NgpOm*#PKa^o8EUfQX72$Na8W_gIPt3II]O_s#l'EC$:eK"23h3QRYB(]AoGLrfh81mPiJ\r=&])*gX&2.%*I^3#QV:o4X%h%P"Vb2H#q]qi1K'%FkT"R++$s:uQN7&H6ADjD<1o*6+3!''7`=Gg4Ea3ihMIX%DPARqCk@h;]R`?7tG=DJICfXFDdr**ckk6pT\"osAdUniKWeQXYjVTM>jQ?WO;c:Klrd]5CL#kh^5Cqc-U5UdS2O_Np:5-'TK@E32S'^:H@jNQ$^m%8f[UYL.**6(FK+n2:@2ITV&o&@CRkL)NC*]&>m6lt2ZZ6DblK9]C$!SE/2X`b_U(Gi(KHFZVM_bC*/9Qh!1%:W?q]%#IUW(E@&'6]lsW=g5ggO,<9\M+l:Heq@%hm'^V6C(-l_:H!kET_C.!Wm-X&q_5BX]R^G#TDJQ:*R,1oSA>;090*[NW@=s@9n00"2/K"K=1Cj;4%E$jo+K@=4$=X<;OeFV9GcU_(`G&hY)]nsR+7\Z"e^>1C89t`g"Nn!V3Vmc<)KKQQnZ45FfkD\M@\;ht!'^_7Bc0'j`KPVI]e5k7EJ?l=Nm:$CZHYi:#FSPeLB~> endstream endobj 1068 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 1067 0 R /Annots 1069 0 R >> endobj 1069 0 obj [ 1070 0 R ] endobj 1070 0 obj << /Type /Annot /Subtype /Link /Rect [ 162.0 526.822 222.0 516.822 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 440 0 R /H /I >> endobj 1071 0 obj << /Length 2680 /Filter [ /ASCII85Decode /FlateDecode ] >> stream Gasar=``U]&q9SY:us!HPm>K:A?rUCZ7KWOZ)rj/mhP!d&g7Q#*Z?*[Ga&(""`\[KVIl^tK'sr2kQVs]%HqPTp6V7fi]>#GXES=&A:N`:*:\(tY1Je7a!:"o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 0 obj << /Type /Annot /Subtype /Link /Rect [ 158.33 444.28 193.33 434.28 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 380 0 R /H /I >> endobj 1075 0 obj << /Type /Annot /Subtype /Link /Rect [ 198.33 444.28 237.77 434.28 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 428 0 R /H /I >> endobj 1076 0 obj << /Type /Annot /Subtype /Link /Rect [ 242.77 444.28 280.54 434.28 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 353 0 R /H /I >> endobj 1077 0 obj << /Type /Annot /Subtype /Link /Rect [ 199.174 341.981 240.284 331.981 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 331 0 R /H /I >> endobj 1078 0 obj << /Type /Annot /Subtype /Link /Rect [ 258.07 341.981 311.96 331.981 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 384 0 R /H /I >> endobj 1079 0 obj << /Length 2261 /Filter [ /ASCII85Decode /FlateDecode ] >> stream Gat=,=``=U&:XAW;"Nbl3%46jf8P)&EU1Q'Ubk6ikti"'+e]0qTId.aJ+&O#\P&6ogl>aGT>8G6@e\W2:FAY>^2sU'aIHot=WCRs]-DZ1_4Njr*G,aIb@a]1%jn?nYK,[]an*=V-Oa/EgYUl`o$uL\dDadXI.;URgL0S8k_]VR"eU@G>)hp65S1KM$#Q[iYf\%k8o!]g>Y[cWaU`m[o&]@uIe*6bN=GkN)gmE0[12:c-.A)/d,2&A6*ZDDC3iW.T6V/CsQ8U"AXT*OM+62M'a5p,Lt3$`43ppB>]Z,Lq"4W8/6+tN0nB`Q8:L,D,enPVS"L]XXIdS54@ok:j.$-Eh3t+g]YU3'(FmHW-qn)=EW#n9hR,02H7]&o2XDN9Qo2b((1WH2t%UW@EGkT0\S79Oi51pD$Jn>li[K_qF30YeN`HPjL64dUU/Ri&HY;X>4I2l-Qh:mfCi_;S>9cIA`@<5%H8/oR45A2q#:.KDjYN!p7%RhYpjO>j_%oH;f"->@A2jQC9,/AtM`0`IRbDTKK!')53X[0BUNeGCNInGWCj/d@u_d3rBg4a%[9R]O_Z%HRt.V+1e#-*pkAX3`Ur/<-UiVO5PD7Q,+h6BLeFO5F66T;$^?*`M_Z"2K$&CkhNJnKm5^"9HAR)JB^da)Q?T1lfJ`;GM=ePj2'^g*'FX8jsS0Z^-9bWS`IUX(/Xs^Fe6f1nL-L[#5E$+RWY7]D#ecg%D)=)7$Dk.q\U$TI3aMs\OO8C"eLVN$.TcP+KAJVKc%7)+p[2WQ*e1[@SKDqa\id;c^W/K:dJ11GPQD*Q:N4Yj+s8k?pT0fXF`M^XKL`M2@q5\kg=p;[4-+f%L*#qQ5ZhW$p""'!jYXp0cqWu>k'nWZR%pBCTu,(#tJ='f#;O!F$2s"_jd;*er7$dRM=mk"/^Jb(,FmUB8=[HFtLer4o$kE^:>(TIX_2$"%0^;Gb>?1eoSDuR(Xq\Ke*Xb^(b?XD,RGAWW@3,;6HJkA:HJ04Wto`;n'"to5#:*:Z"pq(-C!$6.\+RMS.TH2LM9._)j\dhC.(`hQ5>OW(+cGp?HJ5>AhrJc9X/KY4.ugH^&_rF-rPfEMu'.b*7+0P+>;k/,3DAU`KD.A%e6LIFeF>f7EX3k/39[XtSVGB>m^1l?,3ffnbUM6"qBG?:0Uj'>\2&,kbq&)-lTg>`HXhdrBVD;,i+q?KJ?XD\~> endstream endobj 1080 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 1079 0 R /Annots 1081 0 R >> endobj 1081 0 obj [ 1082 0 R 1083 0 R ] endobj 1082 0 obj << /Type /Annot /Subtype /Link /Rect [ 176.032 481.402 267.132 471.402 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 430 0 R /H /I >> endobj 1083 0 obj << /Type /Annot /Subtype /Link /Rect [ 158.33 336.103 221.66 326.103 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 329 0 R /H /I >> endobj 1084 0 obj << /Length 2187 /Filter [ /ASCII85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-PT$:1giSq%)8jc+kZW(?hjac7R@2QSA['nlArpf$=&<@en6Q72'1&0ESJ@>[uT3.KHbu2b%9,h7hSpiN%*,cd[=[D(HXY?mEh54Uu7"kGSh5CYb:/$LE%[.$Zpd_t(kS^aUd@/m,]$h'?4lE%@X)jraOoBXYd'X"g__.8?9RG'VOcn"^'SA@hYT4Wg4j^)V6+e$;O.oKA\o*&Xgt_N!hS1eI.4_db=Do42H"'H]aRoSRHJ,83Djg;?)q>/[NHeW3=gB34h)or%urr3OMo(#%aXc]biP/CfeDR\kC*29lT'S^`BeYQhD\j\9&_42mSne/;YnI#e4:0I=u?\:P95'tc)*/8oQfB$^,9$&QG#]AZXkDDe?f+hrC0R,^<2hnPV++OEp^!)m*,DoslhjsBoYgF(Cr2t]A:hPJD^6c5nC,<r=du8pXSrIhgOJM~> endstream endobj 1085 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 1084 0 R /Annots 1086 0 R >> endobj 1086 0 obj [ 1087 0 R 1088 0 R ] endobj 1087 0 obj << /Type /Annot /Subtype /Link /Rect [ 183.88 709.0 254.14 699.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 126 0 R /H /I >> endobj 1088 0 obj << /Type /Annot /Subtype /Link /Rect [ 158.33 416.268 231.94 406.268 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 345 0 R /H /I >> endobj 1089 0 obj << /Length 1715 /Filter [ /ASCII85Decode /FlateDecode ] >> stream GatlQBlD`aoQu%@cqc6TEh[I5.+#lJ3X"bP/&6nJ-s2mp"j!E*8SPK=qs>Us;LHpR36d<\!T+RJIF9dSK3uoO#KOnYS?+\hS]_-%\De#\Z%lR3G!hK^Tp'>`pQ(Z!m"t>`Mdr!+3,fpOcX31q7[SCXkHEb?If@q4kG+7>VKdkE$pD_f0_V4T`KB?%3'c,W'lS"58KI.)aaaA<&eQERnmW#-M-TjbcpNF5/brZ!RV_1DMmSojbh)4;"eb^(O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.n6=:%4WPc4>A.StE&2^-fcOIIBoPU":8B5EjB3>&[qB-]:OMsuGEE.<$)k(=-A,[=M>jXLr%db%cG1>$bg]Ob2W!FjM9"@O%H(@n,M\PX^^]&_iT@shLbQ,C-gT$p96G9Y>He@]qjgZa4MN%&lBFt'-U0P!M'6^JEZF%/mS$LBTt@hP.3F_pj%:SW7S`+WJr1NFFa;-5W[TX/T&lS!-FN*C_5k7YQK"'\%T!S_L$cF_4ElRXS^f1Qn+[,$e6(L`G9Gd?77PkMC.YPuHjP+EVR?gJkI2Jss:easB;PU&bJe65ttP!;uBh9NT!&'VZ_S@K#81fT+@2c>&mRR2)F,F%/12l__E"IF9^V<4^Su+]eq0Qh<;bH$]kbI^THUR37!XeoVnMnOCc^UhmP=hsfJ/VNXNpk)#$en#oBcU',j!cK,?m8@6->6E16hJs5(VKgqp"U>7l$Ba)MN0>V64q*`<,=G+QmW![J*aJJ[Ih\u%;qp**@i52<*Z?Uc?/i2nFfML+/K7m!^9!gG:cjs5JOVMXLmLj%A9)"XV1ag#=,XG*i!&jaBRl0Jm0r?9>>>,fR`/`RDTX!jd7u3+';h>W]7Kcq4@#e!KiUrRCHH5KGT?1cPH6l]3tED<5nHr7:UR:hiGO*0hbn"oc/S6P&2X[]db5/qZ3jpWY\/cSKe`B##=]kp!H/!oTf\ScaO'R%I&WOc8(Jq#R7PCtRla>TeHsgm=<&BB[SOe6T;cqZVJ$crNc_;jb,UD7]V0VG*sshqGfWRM+qXi[jldmdg=FTR0qMi,85FgL"$8fafI?A4^WcoE)g;7AD6P51,qIkjKMR&bi/1iimE>@hYTEa_H7t2uJ+0^Y;1 endstream endobj 1096 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 1095 0 R /Annots 1097 0 R >> endobj 1097 0 obj [ 1098 0 R 1099 0 R 1100 0 R ] endobj 1098 0 obj << /Type /Annot /Subtype /Link /Rect [ 158.33 359.701 199.5 349.701 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 390 0 R /H /I >> endobj 1099 0 obj << /Type /Annot /Subtype /Link /Rect [ 204.5 359.701 239.5 349.701 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 380 0 R /H /I >> endobj 1100 0 obj << /Type /Annot /Subtype /Link /Rect [ 244.5 359.701 282.27 349.701 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 353 0 R /H /I >> endobj 1101 0 obj << /Length 4068 /Filter [ /ASCII85Decode /FlateDecode ] >> stream Gat=/>EdgM%Xua-nDr[V1E4E@WFlCP\b]2$]:1nBZXVUt+$=YJFrPWrp'Gn3-*'bGVid@)NPqH\YHG-cQ0Q&_i2X-j2RkiG4b[$YG/,(,(D\#k='s^NSY@")ZOpZbLQFQ#r*q"ALI&&+O5bSl-6jb3mF!Zgg0i(qsOpdof:cC(fch#A$WFX[RnZe$aJuKNRpki@TSj>Y?PVGXS?9^s1,Q/-umMW_74)OfR/"O.(3?jXs2/k.#FnOLQ*E3>qABD3SdluZ-dSt<6EG'F.spO-JH:(j2Mo\gPQZ6oht-m`j2i5]P)$$Kike%[['lg@Zdd!^10jE=Gq$2o?],q<\6b*Q#-W76kp5^M+-7Sm=SN:];k7`[Z52$Y1rh^@_D`JaVJ%>);gFDR$iJHeX<$6s_>j+sF[sgS^#t*BDG]_;m.>Ok*\780"cYbEq5C8WVhQ>!@hTgJbr,G`"Ts7*``@<2>ghQ0pOf0iTjk1%$,3(#J)2?j%MnX^I\OejKQPS]ehJn&e^SMH`QYDc;9N,+M!T6imMf1bpji>APFXaaK-7?&3)%;? ChW3bsn4-Kf/AZC,J!36m4Oa[E$($_/W0=O.K^BAS`MFp2L0Ii0qD[YA=#2;]p`<`frY#AoW#;+/&FkN?/DkW+1H2Bd4sL$=4K4l6+"V,XVjh5FZELJ0JSA`0slsuU#h,PLn:a$2nh!#RRDuPMAi!^d26X.&5,lYEgu/%R_X8pTeVa.MG7:GGqAb1U[fH>.0C_\Jg6X[X0UB$HYXT@t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h?\M$`oNIB+dT$gB5k^'f,r+?`.#dsgt6E9jTWpH*s']aI>s%BG*5ENNb&@.4IH9Er\BeRk^(GC-B[=Y5,M3SmhB=+B"lY2J5XhKf/ZXe25mAmpS@Zn!uh-&ER.ar..Ll8I8)XEYI.Rek-)M7T;TI_im8R(rDB5dYnN-i0j;9ejjiUc9pPB"*)0t49meh=9nMLKeM/oi)EEGIJcRk(T`1hWMSi<_NtEAEq?o/(EfY8b/q*@r+*;`?M%Mr[.^@;BPG56HtKDi`g4\Rhe2*23o6(qF8E9ZLMcS8cU$IlJ_==Q8:[1LAriEC??Ef@:nE6Y*R,%V4F'-Mu*sj#sg'GCH.SSBtU3O."iJhi$7[s,pT+2DVe4=^K9P^$H+.=*BE;ia-^\#]Sq26/]r)TG-Pbm3h[%!-Ic"+7Ci-B(rSErPJu$?JSA'6Y=,o0Ot[\W"h(8(I&Th>1[a;_ppAth#i#tlA1lom?t.<(cC>:^J`ROF(K\a,?H501'c)e2JC)D-dn^dlh'W3Vs.J/g]M@Y\.@9@Jt))hE8tAIY,DoX;F9BW0'NtPNJ-'a\PP$a#sIlN,\5+ss+ZdDWMRh*t(og=0e8-@((O:I]3!fBj""T8#Gq9k"9Zcs4r=NNu$j-o((_.G3Jq5HPOm^'L3XuFu@m\K^/4D-F-6e*QU0/@)DRCYH5k-f]bX"",/SrCKEQoB+Np`Ei)bg?JM9L4Jk+).G\b;Ei>!>51t/kB_lm*reG`=cpSHkI`EkH4tQJh,(8Khk][iiIBJTP1Ss-DH0QlF?^``l,c?a6biFi:*nV:6PB'A4LqfB~> endstream endobj 1102 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 1101 0 R /Annots 1103 0 R >> endobj 1103 0 obj [ 1104 0 R 1105 0 R 1106 0 R 1107 0 R ] endobj 1104 0 obj << /Type /Annot /Subtype /Link /Rect [ 297.189 600.0 363.639 590.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 414 0 R /H /I >> endobj 1105 0 obj << /Type /Annot /Subtype /Link /Rect [ 468.018 589.0 548.578 579.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 325 0 R /H /I >> endobj 1106 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 578.0 200.82 568.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 325 0 R /H /I >> endobj 1107 0 obj << /Type /Annot /Subtype /Link /Rect [ 228.87 578.0 336.97 568.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 400 0 R /H /I >> endobj 1108 0 obj << /Length 3677 /Filter [ /ASCII85Decode /FlateDecode ] >> stream Gat=.h/h=1%Y)f3iT\O^1TAt%Y\`-bS[bd`:>AS!hcjeMm?n#cW5km.qQ5<]$jXISh_@e8U^dgfC_qsb9tOZ.9E!u>Y\+`8Q5`rR'7,";ca9coV-)aLQFl"Gf+2]9Ftd&F8hsSn#8WfJH_^k0rjQ1@$#>SBR9NaIcl`!8h@\%QlV+V90&a[&a9bn;,TDi/qC'H:LMVGGrqi*/C%Q.(opMa!p^SfDJRlDUgGHX4_u\XVd`;.V#4;3c_t8`3&%1bPa-b;YRdJ_fikljm:stm%MtSV[YpNG8O5!1K",q2l!7ngeSTM3!pr,6p:t_fs=""Qho>U)C(3Oam<;gLJQZU*q$8-k$b"]734omQ[+rH%HH[JoGJt`c8`^P[W:kB.6@$+j)I,O[s@_T($OH`.r*oeRU>,]e9%+&M:-O:YJSR)m1a$oOu)C-Bf=K"]=KJq[alC_CL+i"Z&,ejiaLdrSPVUh8l3H"d/7-V1q*0rrV7YcXk02Q/0N>]pr*\E8m_8]7VRVcPI,\:836l*(7QZS/V7BKGU;BH7hRWW9d"2Tu#;E%oQiMb^k]6qrqVNX`#ri0YM>h-JI#$THgJ^J?Atc,"Uh_`ThC0GP-1tH02>gjlKP(q);'bl!rX]!_t'1@5M(op#^e>H[:MF]N=X]\!A`JGN1nST.5+d&"eFWDb^2)+lE"ifTYrR8MZU\'IWL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j << /Length 1343 /Filter [ /ASCII85Decode /FlateDecode ] >> stream Gau`SgN'&K&:O:SnE?j/M$/XX,B68n]88\UnYT4EXY"!4)es62E64(=IN&isnN]F]lEbij^o;KjX,HAOZN%UOh8l*:3=r9]_nc(^Ra:Mi4kAqTIlC?_;V4Y+V#l?RA\-GFM437`2$O*&X.&i0eL)Ls-Gs^oiAeRqcRMVN7*Xi]C)2VXO4de]1_&!X_7ZqR]_U!c%@;%-[fRue,hFb`o5(00'8M!dVXaKn<`]_>c)j=V))f7g>BU,rJmV)0"/n!m_3]?:LDq38EiW^@=@Og&ETIe*@6>Y?9.=*D'7D]W[V`Cde,aH>Yq\(0l`uOfW)*,,#^)ieg3K0Z!NjXQ0%NnX5K&o[Ru:O)_*g_D(TfZJ4#H<0Ok$[:\=*nN58s0G2u8i1c$dU#f+pKNlGNl'.on/BO:-BEUE$4$uVFpZR@r.hkHCt!YOeilW%>D50&Z7nX%k\IEKGtU._o%sN@(Hg%a?;Ql^a5c*fqAWOhZ&qls2t/Kbg4J@$:#MCEc.=m5RkasBE`T'99Y%"K1?DqaT=Rcs6Ra;AVG)PC8,7U`-F]h:DTV/J9A$Z"IEGbH9(udVOin`&9c*5W\!klA;`flJ7ktONh'UqVac""mg5&ISa6p.E\]>.AHS&mp#u!"Rac"5fQ']((E.oSu7pYd[]>a'2+An8d>-[WMG*>rSb"Vn>mL&I$-;J-u")7To5ogH<\hqV0S0i+*2D endstream endobj 1119 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 1118 0 R >> endobj 1120 0 obj << /Length 1885 /Filter [ /ASCII85Decode /FlateDecode ] >> stream GatU4>>O!E'Ro4HGi-@j9KhG5/k$+T8p3SM`^VOPnrO;U)_&%kmA-k7s1VuiloF+M,bPkbRPU:OrQ`Bm#`mhJ>FL=h/R0:[g=IRNl1>L%R-8Y@d;@qU;[_42\3l:aW>>J=^;,'fUqTSDZb0$EG,jd"u5\e&7O0Y%]40h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j 1121 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 1120 0 R /Annots 1122 0 R >> endobj 1122 0 obj [ 1123 0 R 1124 0 R ] endobj 1123 0 obj << /Type /Annot /Subtype /Link /Rect [ 158.33 369.0 184.44 359.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 327 0 R /H /I >> endobj 1124 0 obj << /Type /Annot /Subtype /Link /Rect [ 189.44 369.0 260.27 359.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 335 0 R /H /I >> endobj 1125 0 obj << /Length 3088 /Filter [ /ASCII85Decode /FlateDecode ] >> stream GasasD0+Gi')q<+U!_)DSNDTS^.=LBS"#OW\TQ5<&mK)=VWr7G$F2Xf8;/^:4I>s6#@\M%"\g:;^>O8:ln4U>mK2suo&T8kj+0Gc7YBgrA2JNnnHU<3h]MVZ9?*aBoAdZ-5PXoQQKA+ri4$Pn-T,UM-^b9l)EJd1Aq:cq0]BdM#-TDLG1bJ^#-Drccbg)Wc5G!l$njT_EO('b=dLI5X$,T]Ei*LiWMR[e-'>RBS!45,jEioqn$T[B<(?J#XB-[/=g.YFj-H1]O+M0MJ0_900a.fZ'>56GMAA2JX:MILP".9QD0k1EXpA6n.mIF=b*c$3&RPGVIDKK@gQ%UClkbp@RF?h61]t[4@\^j)P\N#TmTVU@2E3L7qZdK0bnsYLSpNAS33ACEeX')a_ZKu=BUKX9_7Zhg"R"_Fl0Cm`=/7ee#c7g0cn*4R)>.I:f4.E\-DK#N^+S:G:IO[S`&8`sBFS_>&!jGb!]be'd;$]Vi9OO]WI?HH,h!74c@+PF`oaTni9C67;8s-(#$K@>5cV-J"]jk%!nmfi+AF%=+WHdo8M9hcM-uqnpWqV?:qka-13lVg\ih6^/Wr>u9N4)3[Q60EHUZ]A\'Qj@Gj?tQV_cY#^0e#7B0g3g!7U[(lbh-Q!&tGAVXsik<=lOH.@5fjU[[;Y*Mmqs4*(%0PC1e]fT><2!:o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FKS%urV8P*-719$<+F7f2>@l(K2\bU-LbOmAoO$0K2=\KMBGfn@7:GNXTV,8]LIBVK>;e03_JSts[(L]TV^YSiCiHL^'-.uqT]c]-R(*%!bGP.5RXs3bY\B3O>&O+kL?H>RD9,d;Fsp.Y(6fsgpT)k)-KsNuZpT5'%PW#jHd<-fkY4?MXk%?uP[^bkV'.Q)4G;`q2fVLO)7RDo,hi137JMAF3:s5O0^I<1E@gIoZDHGt=rjf[&8&4m+7g/RVj-IECntPo&4Kn*?1/Hal^jpDO1\LWJg[TP/R\W"3J/.NVnc_]eY$*#1skn;'m!)1/]JMK`=g?-GG1$+us.&8gXu;Fp"m_/(_T\Q?Gkb!cD0]O9Qn8KDPqCSN+fcW\TEiKk-$6t8r)bZ#22iooWlTpAe?.A(5#"sr**MeA@'.$TWUe9OX!pd-iC?@u7q`XJ>TQ^OZ=f5bpMk>nBg$8]mp3Z*i$OE1<`!_H=/.faTJc=8^O+XBaX)rkm(.F'.N5FY:5=Q3hJfoQT1]:@ZH%@?43[F]@oo+\!8426Q#c06?5eVL;uH.\*UE2o?:)94#kCgQ%30_Wec#\QN^UsH`5^C>@(m=AB\k'ZNMgFuESY(=3T0Rc#P7[FaR,toc$`AkBX0^,b\+Ak'(l!p]pWQ.I'^u_0;h%C3r6WO_&**s52u~> endstream endobj 1130 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 1129 0 R /Annots 1131 0 R >> endobj 1131 0 obj [ 1132 0 R 1133 0 R 1134 0 R ] endobj 1132 0 obj << /Type /Annot /Subtype /Link /Rect [ 135.0 434.595 265.8 424.595 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A << /URI (http://ant.apache.org) /S /URI >> /H /I >> endobj 1133 0 obj << /Type /Annot /Subtype /Link /Rect [ 158.124 413.595 213.404 403.595 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A << /URI (http://ant.apache.org/manual/install.html#installing) /S /URI >> /H /I >> endobj 1134 0 obj << /Type /Annot /Subtype /Link /Rect [ 507.168 413.595 555.218 403.595 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A << /URI (http://ant.apache.org/manual) /S /URI >> /H /I >> endobj 1135 0 obj << /Length 2890 /Filter [ /ASCII85Decode /FlateDecode ] >> stream Gat=-gN)>a&UjCTkg?!-C%3[pH*T5tRQ.pEg0&9m;K40T8W\WD?F0iLg&(GVTUY;F9M299^#1`(7\e@t"6sbnJ;K;B@FZfB9Qmjq=g_"pA;.qY9l3U@d_4!bDi[S>2XO+'Hkb6_6UZ5n^h,tq<@JQj57TLA/LS90l*[(Cs+;@oR4&LhsF+G=l&0h^\`+)+5L0rr\I\@*Gm!'pt[:PjPT@kXj.VU%q<0NbG)'Tcnb%68t!:ecWAu.o"_u-bbgqOHp?5+s'[mV=[gU:_$o,/==iTub>k=D9ja.YTukb7l\iKTc?U.+(/JA'IcCsu[j=K<0LU1qi+]%*MoDc\R<_Y0,9EJ39b3B3>g5R@pXWq;F+gMH.]m$A>W*=).h0?a(q1*-#Z@j$FWn2/bq[,5qm4Ric\(W@,]fLIF'?4\%J/51-C9!\.7U_Q'Z1:^WI1/KVE.@ORIXJRXXRr^gFnJf`jE1-0dLYst$Vnm80J,P6M[@;+'[Pe,%8PP$nJ6)JBu+2R`#)s`AuN[aFGclebZDAHW@F)C'->3eY#7UTe$hgOc^.FHZAda5CRpBm+,a3+Psqj5qY?#fYGs@^TTM-L)!&uZ+\sAGFKS?9+Rs7KJdT?8kWb=%(b^+(Te2n$M^[h(Z?)Wk:P;6"KUtE#pM@+VB.JSsFToiMpU(8k.6?A>?/8"c0[Debj->#Q]?XQLX+SBV<5%!agARWR8!60O#2msXUFk8ZFO*RB/Jd`"7_2@;5L*e9A!-)a2\PmFLue/8"%.`M^YAKJ_o[A=(XfJPBh]Em=TFfNZ?:uIPVTA+,i[<^>q]2.$C5*TUMI`VF>I8Q":"q024hTLY)fp.P4_h9u1TubAU8;MF5ptc^r(=3d.!o'a!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Z$UFo[KcT@/V5o?4JqP+i+NbY[M`!=7t?Ao=8"Gu4,[;E,$+@R06]rf&BXI>/;+c5-PDHomt,(:f!0pP`UqtJD?#]mi6p=>Wr"[eikH:i+ju_b#9e:'UG:GU5idDF,&bjs@Ub/mjfXTEVdQ<[C"13J^!3=.R"5jlQb=iZ63>NI5*C@l_#EQ=f>:1j?m)2u,GDQ&3Ikr&Yb2Gf9M'*NX;mtY6NF$,4f0-\:"gj1,+;MLCoK>mYA)agJepn>..frELju`,s#M1V1\3adA^S<(Z4>YUg_Z69D.#ErT5W^r4Q#7-qZ0&B+]XgOU[^L)R7bboq2qQK?JC1\Gtr5*?tH2&@8D:!Q[sP+9~> endstream endobj 1136 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 1135 0 R /Annots 1137 0 R >> endobj 1137 0 obj [ 1138 0 R ] endobj 1138 0 obj << /Type /Annot /Subtype /Link /Rect [ 326.68 538.0 408.91 528.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A << /URI (http://www.junit.org) /S /URI >> /H /I >> endobj 1139 0 obj << /Length 2023 /Filter [ /ASCII85Decode /FlateDecode ] >> stream Gat=,=``@V%"@rSd%h1p1,^^]p[lRfPDS*Op%FiO%pXtWc$]1)JBslVf-fYV!:rGd6!;C5NEq._g\BR@l[oSt3gU]Uh/0"RK(&A(GIoSElg9VMm%Q,dVFGB">!M>5q^*>;3n&*#k,n!J>EJGDmZ'=QK9]rGOpVr7MDH]9UjRQ;ro`f@J2W&]&$EDg_jRPA1\`'C4l/>G<0UGY"d+Kgurtl0I([BWJ<$i.8`T97=hgn'"]oc$otAjlpJ1^"XL!_,*sP6"W.hOjNf075/_[r&YsFlg:T_k7o:G.Z[[=C$s_2NV9k'qOXO*18M9:S])EhP9WYYtL:'n/!MaP9^F(pU3'B])[aemK^'O'/&!Jo"T-#nR,kUg%WB,K`HDAd9Nu4cE4$WIeArbQ7dd;jW2`YS;[)#(i#P2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9_o\cB>eBQU#(XpLZ$oEC=Zh#i#P]8RNh6u!EC))fYe^rL8%ldf;JW`X\l?Ja.J"9:e5+PF2A)$V<7pon7B)RuHqt\V^eBfln;=lp!hubjkfrq.[%BStUiUiApD.%kE#D,Zt%kN5O4BnqV;>4cgaEq[i3t[o$UpR`h^_&]'h&q^ZpgeR;X1=P&X7(U4M5U6Pl" endstream endobj 1150 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 1149 0 R >> endobj 1151 0 obj << /Length 792 /Filter [ /ASCII85Decode /FlateDecode ] >> stream Gau1,>>O!-'S,*<.jA:j-SW9Q\S-=->rk5U7%8$(bCiRKQ=rip*(L1+rV&Co]#1L8H8'GVcuetI:]-h/$!]!Ts7XTMCD8)QI!Q5k;AU;M7fH'`#srg"Sk2o(V(#Mh)DSUq-@f%!$^a]KCeDC4A!aPkL[h8p&8+%./BECpSG%D.!_`4O6X1=rmRPIr;QN_>kPR?X?Y"i8SlmNf>d=%g/Jdc^J!GdIaBk^Q'$?/%2!$nY_?We,plJG259f.Mp8hFaH[WYY4IJ&8g:u+)>OEPs#sAFf2^8nPdFDWY!`4j%mVmi\17(KEA[Z&ip%EA5TD,@bL3Gk\TJ%LJ-:TJHYX2iSQ;gop&DH#m^s635gf!$=ihRtAgb5gq>I0oS.$Ij(Z)/si#t?+D^@b&8aae,[tE/tJu%-/EdRF,e5lt,=Wp&"0#iT]\kUQIoO8VD:.IbmPm+?CDu?urV#;ijMih>1mIF,QmG4SoXGmKDV>^N`N7NX~> endstream endobj 1152 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 1151 0 R >> endobj 1153 0 obj << /Length 2063 /Filter [ /ASCII85Decode /FlateDecode ] >> stream GatU495iTD&AJ$CkR_-=^m7DdceK-pL=6o0'5u8"FUqZ4CTEc>N?39:hfgJHi_V.NK*Jo+L7I4A*Zp/`^HT3@TpG#t;+.PZp;F3W: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)4k=S^S@*;D+K*,ldTjaNja80feJHGbAb;U_X1Hb\aaHV/nqi0n;4*mWd.@NkNV2>JeM4qk$GN04,9M_Eg+*FZ$LaA_cKYe=(VCf?Q'2e]Zjol8E9[2rb@_]>[$X#cVk=lV&Pf'A[[U8'1-6/QDouJ_,*AlQ8t%Q!>330^\(2ep,GQ_cp?K^EYpDXWDcYEfggT^BWgL:VOZu9]O`lCRROiO8rTK]AS(hHc=3G#nJ35(O88foZk@>MJU'P>Q6!Mp!-gCL^hf?I'GV`Jmc-?XYf9Yr;"GUB8k2+uu/MT2KrmJBq\"I6oZ8IY3-(5FG(%\O]C65!b^1=*,c8q4XT6ZMM?p7pmK::\*hi!.5]BaXZMF6[7N`B7ghgE`m:Fo#'ql]J+.<\Sb?eat!%6$\r:3PImJ;>TA]MPO(Q`IS`<'kCfaW/&Aifgi>2jP+Lh/Y.:h[DZ"DlUg>q9]#HVQL]`q8aOh'0Ku$^T#Ged"GSMbrJX<>\E42VC(2hok&2=FJk_04L\E>=ph7tPkr2!-F<1FiN@mJ:70aIs$F1&c2H]8>P8]ZO`.QFKtbc?)nXAsR-ciPD:U*3d"Re"J#]1mURV,b#3?^lEP1m[onYtdPU endstream endobj 1158 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 1157 0 R >> endobj 1159 0 obj << /Length 483 /Filter [ /ASCII85Decode /FlateDecode ] >> stream Gasal9iHZu&A@ZcEboAF-BLL'iPnkbPWK[>%!`@i>5B()VQu1+CC>_4g8nOP;a1*:@"Ae(6qi]KAX(\9,:!1I"Sq%Ft7+J06iU6c*khZDC endstream endobj 1160 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 1159 0 R >> endobj 1161 0 obj << /Length 2615 /Filter [ /ASCII85Decode /FlateDecode ] >> stream GatU5D/\IE&cSA/i=GZ+>HA^U>7-7^S'>h0H].%SibME@76t-WXGopL,WUn^lYf0hR\;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p(-P=G9HV%u]Vh<[psK/:]a0lJZ=5CFAk55j"#08(l$L6.W?%N*#+">NE/9Z[*roSuFX:Vje")qU:rjPKfmZ^(*&;uITBJaU5g@phfTJMbfQX22GFC/$,YoCc+8YX'o/Ec3Z+eZ.ZUhL8g_&$n0<7WN`SW**\Lb#Wgc[`9=eM4je/f[dY'\;&9Kf?l<+.sRS/tPD=\u=8?O0YB8$^1T[&@(3L"4%,4[\FU0@W;i\;##AK=]U:LMdoh?5UHr#uUm:Rua8>h.q?G''.]p!#M^s>@ck3%2pK;^2Qp3KaV_0V&n*=YNAJ>WqA".A(/\B@r*t5(gDOWP0g(k_2c34dV4N-L1_oH\BPq[%UtO614r[bV[[tfpi(Hd(m01./8ijII1%@Tob$D1h0:]h7KY6ILXk6@E`X5WFL8OL],S*aB,m%jHpm2WcY5_T+jD/$TNhd`ZYje,H52@DA\1t$%ggj/WdA;s$d7Ou9ZH9uXd$/5+U=p'VUj\UD[!1.\b#5FI6Xf#2_+T"Ou,W_V%lDL1=UR"g,M)@R^'FHBZ2m#b6.`jp_1Jj8W5oAB0h8T280RG"P6?V%o]G,/BKUOr#_Zi]>6fM!MX"+*.G0M2L5AkDRl(9s-:E/mbb`l8d3`7JgBD\0rS+Y@H:ZH#r8i$(9]tJpkRb[Wj?$D%5UktqK:)CW>la<+8l#jC791;q2fA,R(Vb8Q*Is?Z+i;~> endstream endobj 1164 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 1163 0 R >> endobj 1165 0 obj << /Length 2196 /Filter [ /ASCII85Decode /FlateDecode ] >> stream GatU595iTD&AJ$CllcVSnBuWd'EeT0`'G(3cld*<7G@pXipNho8hrj2naA8]80#e#g22rlpl5'9)1M28qSW0jicDU8,*Jh^@_Fqp(:t60iP@a.YmQ;r8CEGBd;#pM/H.cFC`6@9`T,^l10CYLQ?l]>35$LgrjBEio35;)B!$"u2kh].naq"ppL=(9["oO4#NpXJrV:mb"j&5)b>73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bg^ufR62Tc&nQnc:8&\G2HY/2ui4/i[=Y8<$+SD*-h'Xgp_^\Wl8e$n_;%-C>:P#9f/I-7t5il0`4'(llT=5EBl;Z"9'be`W~> endstream endobj 1170 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 1169 0 R /Annots 1171 0 R >> endobj 1171 0 obj [ 1172 0 R 1173 0 R ] endobj 1172 0 obj << /Type /Annot /Subtype /Link /Rect [ 523.396 313.684 541.176 303.684 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 192 0 R /H /I >> endobj 1173 0 obj << /Type /Annot /Subtype /Link /Rect [ 183.59 302.684 302.21 292.684 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 228 0 R /H /I >> endobj 1174 0 obj << /Length 2736 /Filter [ /ASCII85Decode /FlateDecode ] >> stream Gat=-969.'&\e-D.&V2q\Y/Z8X40"pT^q;4-D;6lFrjd]%qg?RbSkCRW9S+0AkE8S2Q?,;oYrlA'0X(!dU`0$SKE*Z;_'79[DrSEGk)6<`uF-a)/Y\!I5c>kW-TO=u9P>(]Ofs9o;X&7=\gqLLS^>Fim!Yr3jrXY)$1;XLCW/lh;gU11e^1c/%h3btA66Ar#n:Fk4^";S6afBWhHk6P*)<^nJrj=\O(\oNtcIoNQ1/kR(%C__YrUCV0L-raDq1oYBh%RZS4X$=9\;aRZJBhNo7HjDBek]1;Hb,q?UX'"D9QTmpQ7S9\icALfg1UoTJaihpEf?f7(U#A9RpJj*nuUu8[DgWf;:7oPdYkIl)K/W1![6=-n/4C7A)J$[geJO89-emI/G3;^:TodXQO:,B/JHe!\R;)Z+WpT*Ql<'&cEf";b&k9<>^M1,[KdlFin[g?oh_R+R#Q]/B[fQd*!gH*6tQ/""dXj4jDns+m\',&^]W+&:u61FWph#*O.mq@l=akf1F?-7bAQp/DFLlFM6oHn&9_Ls*208hqO)G/5fC>(Ife]b^?(GWm)dDD.Z1?o,*]Agh9^;_,2FYY7CX#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Type /Annot /Subtype /Link /Rect [ 464.144 393.496 540.814 383.496 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 228 0 R /H /I >> endobj 1178 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 382.496 165.28 372.496 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 228 0 R /H /I >> endobj 1179 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 371.496 152.23 361.496 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 212 0 R /H /I >> endobj 1180 0 obj << /Type /Annot /Subtype /Link /Rect [ 480.82 99.992 558.33 89.992 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 442 0 R /H /I >> endobj 1181 0 obj << /Length 2228 /Filter [ /ASCII85Decode /FlateDecode ] >> stream Gb!#]>Ar7S'RnB3n6=A8Q7Y_7V#l!7l31ma%Vb82)hpN&&oB(_7@075AAg>e85Haj_V&Z[]OFFcga6^m5di:,oe["Tn&$'JqGiYBCdb6EgOiG.[`q\%9"-a^cj+D,k2\E:!;qSR'#"$D$A!.n$P;R!?a?\rmL#O\_,JJQ<,C6p5.*4_a%`GQui?ua'ABtCt]ib7'FAp*.N!3nCdr7p'*dX(/G>ZeZiih<=UaVFbkT@(UFlOYdIk-9=gs_IA@&&1[u.c9eiZ%BZH?L&QJQ\ej>"O0?>tX?;^07VDMRT*K#>HLB5O+JGW;dp-pH$FEi]*P:jRT(k-unPM*m)Lnr33o%#W;dS7G!>:X``GXckP%3#!G>E(hXmmiuI]%$(9_O\N"Ji5hZ[rf$rC^fEQ>(f92S*c^\dW9>Oo"1ISLnEqJB-h1P6RDKD+OGm_KPQH^OUN^u\#Qq<.<^*!HEG[a3O%[@DfY[`4r)`4'$L":4&#HLo+n/EQ@9"e<:5W/JQWLQo;m-7sgdACAK;dA=j&1[#T".);mA#3;Q(\4G5>%J*D+AaVKHBneZB]gkgJE$FYSq"#?hu*Kl9rpjPpLcp#lne*UAN9LtP,p#E*nCH?:,`PU>b)&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E`NWW.FeN0S]faC.u-&O$bNg7QaqkV:bFX"MT?UgK[ti#K"9;$X"BhV-]5KID*ep>g5/H9V1Tg^nQl0PMFm:tcu0_>doBuX%fhW2Rm9P_e;m4KDb#g_n@m`At;I@%YC-B"EkT+_a8aZ-PKr^0[H1F?^YPo9*eL05T0S`do-Zmd8:`SR&G>'AN9!e3*Y3G%pb@k]ad(c_:U.r!s4PIpr~> endstream endobj 1186 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 1185 0 R >> endobj 1189 0 obj << /Title (\376\377\0\110\0\163\0\161\0\154\0\144\0\142\0\40\0\125\0\163\0\145\0\162\0\40\0\107\0\165\0\151\0\144\0\145) /Parent 1187 0 R /Next 1191 0 R /A 1188 0 R >> endobj 1191 0 obj << /Title (\376\377\0\124\0\141\0\142\0\154\0\145\0\40\0\157\0\146\0\40\0\103\0\157\0\156\0\164\0\145\0\156\0\164\0\163) /Parent 1187 0 R /Prev 1189 0 R /Next 1192 0 R /A 1190 0 R >> endobj 1192 0 obj << /Title (\376\377\0\111\0\156\0\164\0\162\0\157\0\144\0\165\0\143\0\164\0\151\0\157\0\156) /Parent 1187 0 R /First 1193 0 R /Last 1193 0 R /Prev 1191 0 R /Next 1194 0 R /Count -1 /A 15 0 R >> endobj 1193 0 obj << /Title (\376\377\0\101\0\166\0\141\0\151\0\154\0\141\0\142\0\154\0\145\0\40\0\146\0\157\0\162\0\155\0\141\0\164\0\163\0\40\0\146\0\157\0\162\0\40\0\164\0\150\0\151\0\163\0\40\0\144\0\157\0\143\0\165\0\155\0\145\0\156\0\164) /Parent 1192 0 R /A 17 0 R >> endobj 1194 0 obj << /Title (\376\377\0\103\0\150\0\141\0\160\0\164\0\145\0\162\0\240\0\61\0\56\0\240\0\122\0\165\0\156\0\156\0\151\0\156\0\147\0\40\0\141\0\156\0\144\0\40\0\125\0\163\0\151\0\156\0\147\0\40\0\110\0\163\0\161\0\154\0\144\0\142) /Parent 1187 0 R /First 1195 0 R /Last 1212 0 R /Prev 1192 0 R /Next 1217 0 R /Count -20 /A 19 0 R >> endobj 1195 0 obj << /Title (\376\377\0\111\0\156\0\164\0\162\0\157\0\144\0\165\0\143\0\164\0\151\0\157\0\156) /Parent 1194 0 R /Next 1196 0 R /A 21 0 R >> endobj 1196 0 obj << /Title (\376\377\0\122\0\165\0\156\0\156\0\151\0\156\0\147\0\40\0\124\0\157\0\157\0\154\0\163) /Parent 1194 0 R /Prev 1195 0 R /Next 1197 0 R /A 23 0 R >> endobj 1197 0 obj << /Title (\376\377\0\122\0\165\0\156\0\156\0\151\0\156\0\147\0\40\0\110\0\163\0\161\0\154\0\144\0\142) /Parent 1194 0 R /Prev 1196 0 R /Next 1198 0 R /A 25 0 R >> endobj 1198 0 obj << /Title (\376\377\0\123\0\145\0\162\0\166\0\145\0\162\0\40\0\115\0\157\0\144\0\145\0\163) /Parent 1194 0 R /First 1199 0 R /Last 1207 0 R /Prev 1197 0 R /Next 1208 0 R /Count -7 /A 27 0 R >> endobj 1199 0 obj << /Title (\376\377\0\110\0\163\0\161\0\154\0\144\0\142\0\40\0\123\0\145\0\162\0\166\0\145\0\162) /Parent 1198 0 R /Next 1200 0 R /A 29 0 R >> endobj 1200 0 obj << /Title (\376\377\0\110\0\163\0\161\0\154\0\144\0\142\0\40\0\127\0\145\0\142\0\40\0\123\0\145\0\162\0\166\0\145\0\162) /Parent 1198 0 R /Prev 1199 0 R /Next 1201 0 R /A 31 0 R >> endobj 1201 0 obj << /Title (\376\377\0\110\0\163\0\161\0\154\0\144\0\142\0\40\0\123\0\145\0\162\0\166\0\154\0\145\0\164) /Parent 1198 0 R /First 1203 0 R /Last 1205 0 R /Prev 1200 0 R /Next 1206 0 R /Count -2 /A 33 0 R >> endobj 1203 0 obj << /Title (\376\377\0\103\0\157\0\156\0\156\0\145\0\143\0\164\0\151\0\156\0\147\0\40\0\164\0\157\0\40\0\141\0\40\0\104\0\141\0\164\0\141\0\142\0\141\0\163\0\145\0\40\0\162\0\165\0\156\0\156\0\151\0\156\0\147\0\40\0\141\0\163\0\40\0\141\0\40\0\123\0\145\0\162\0\166\0\145\0\162) /Parent 1201 0 R /Next 1205 0 R /A 1202 0 R >> endobj 1205 0 obj << /Title (\376\377\0\123\0\145\0\143\0\165\0\162\0\151\0\164\0\171\0\40\0\103\0\157\0\156\0\163\0\151\0\144\0\145\0\162\0\141\0\164\0\151\0\157\0\156\0\163) /Parent 1201 0 R /Prev 1203 0 R /A 1204 0 R >> endobj 1206 0 obj << /Title (\376\377\0\111\0\156\0\55\0\120\0\162\0\157\0\143\0\145\0\163\0\163\0\40\0\50\0\123\0\164\0\141\0\156\0\144\0\141\0\154\0\157\0\156\0\145\0\51\0\40\0\115\0\157\0\144\0\145) /Parent 1198 0 R /Prev 1201 0 R /Next 1207 0 R /A 35 0 R >> endobj 1207 0 obj << /Title (\376\377\0\115\0\145\0\155\0\157\0\162\0\171\0\55\0\117\0\156\0\154\0\171\0\40\0\104\0\141\0\164\0\141\0\142\0\141\0\163\0\145\0\163) /Parent 1198 0 R /Prev 1206 0 R /A 37 0 R >> endobj 1208 0 obj << /Title (\376\377\0\107\0\145\0\156\0\145\0\162\0\141\0\154) /Parent 1194 0 R /First 1209 0 R /Last 1211 0 R /Prev 1198 0 R /Next 1212 0 R /Count -3 /A 39 0 R >> endobj 1209 0 obj << /Title (\376\377\0\103\0\154\0\157\0\163\0\151\0\156\0\147\0\40\0\164\0\150\0\145\0\40\0\104\0\141\0\164\0\141\0\142\0\141\0\163\0\145) /Parent 1208 0 R /Next 1210 0 R /A 41 0 R >> endobj 1210 0 obj << /Title (\376\377\0\125\0\163\0\151\0\156\0\147\0\40\0\115\0\165\0\154\0\164\0\151\0\160\0\154\0\145\0\40\0\104\0\141\0\164\0\141\0\142\0\141\0\163\0\145\0\163\0\40\0\151\0\156\0\40\0\117\0\156\0\145\0\40\0\112\0\126\0\115) /Parent 1208 0 R /Prev 1209 0 R /Next 1211 0 R /A 43 0 R >> endobj 1211 0 obj << /Title (\376\377\0\103\0\162\0\145\0\141\0\164\0\151\0\156\0\147\0\40\0\141\0\40\0\116\0\145\0\167\0\40\0\104\0\141\0\164\0\141\0\142\0\141\0\163\0\145) /Parent 1208 0 R /Prev 1210 0 R /A 45 0 R >> endobj 1212 0 obj << /Title (\376\377\0\125\0\163\0\151\0\156\0\147\0\40\0\164\0\150\0\145\0\40\0\104\0\141\0\164\0\141\0\142\0\141\0\163\0\145\0\40\0\105\0\156\0\147\0\151\0\156\0\145) /Parent 1194 0 R /First 1213 0 R /Last 1216 0 R /Prev 1208 0 R /Count -4 /A 47 0 R >> endobj 1213 0 obj << /Title (\376\377\0\104\0\151\0\146\0\146\0\145\0\162\0\145\0\156\0\164\0\40\0\124\0\171\0\160\0\145\0\163\0\40\0\157\0\146\0\40\0\124\0\141\0\142\0\154\0\145\0\163) /Parent 1212 0 R /Next 1214 0 R /A 49 0 R >> endobj 1214 0 obj << /Title (\376\377\0\103\0\157\0\156\0\163\0\164\0\162\0\141\0\151\0\156\0\164\0\163\0\40\0\141\0\156\0\144\0\40\0\111\0\156\0\144\0\145\0\170\0\145\0\163) /Parent 1212 0 R /Prev 1213 0 R /Next 1215 0 R /A 51 0 R >> endobj 1215 0 obj << /Title (\376\377\0\123\0\121\0\114\0\40\0\123\0\165\0\160\0\160\0\157\0\162\0\164) /Parent 1212 0 R /Prev 1214 0 R /Next 1216 0 R /A 53 0 R >> endobj 1216 0 obj << /Title (\376\377\0\112\0\104\0\102\0\103\0\40\0\123\0\165\0\160\0\160\0\157\0\162\0\164) /Parent 1212 0 R /Prev 1215 0 R /A 55 0 R >> endobj 1217 0 obj << /Title (\376\377\0\103\0\150\0\141\0\160\0\164\0\145\0\162\0\240\0\62\0\56\0\240\0\123\0\121\0\114\0\40\0\111\0\163\0\163\0\165\0\145\0\163) /Parent 1187 0 R /First 1218 0 R /Last 1238 0 R /Prev 1194 0 R /Next 1239 0 R /Count -21 /A 57 0 R >> endobj 1218 0 obj << /Title (\376\377\0\120\0\165\0\162\0\160\0\157\0\163\0\145) /Parent 1217 0 R /Next 1219 0 R /A 59 0 R >> endobj 1219 0 obj << /Title (\376\377\0\123\0\121\0\114\0\40\0\123\0\164\0\141\0\156\0\144\0\141\0\162\0\144\0\40\0\123\0\165\0\160\0\160\0\157\0\162\0\164) /Parent 1217 0 R /Prev 1218 0 R /Next 1220 0 R /A 61 0 R >> endobj 1220 0 obj << /Title (\376\377\0\103\0\157\0\156\0\163\0\164\0\162\0\141\0\151\0\156\0\164\0\163\0\40\0\141\0\156\0\144\0\40\0\111\0\156\0\144\0\145\0\170\0\145\0\163) /Parent 1217 0 R /First 1221 0 R /Last 1227 0 R /Prev 1219 0 R /Next 1228 0 R /Count -7 /A 63 0 R >> endobj 1221 0 obj << /Title (\376\377\0\120\0\162\0\151\0\155\0\141\0\162\0\171\0\40\0\113\0\145\0\171\0\40\0\103\0\157\0\156\0\163\0\164\0\162\0\141\0\151\0\156\0\164\0\163) /Parent 1220 0 R /Next 1222 0 R /A 65 0 R >> endobj 1222 0 obj << /Title (\376\377\0\125\0\156\0\151\0\161\0\165\0\145\0\40\0\103\0\157\0\156\0\163\0\164\0\162\0\141\0\151\0\156\0\164\0\163) /Parent 1220 0 R /Prev 1221 0 R /Next 1223 0 R /A 67 0 R >> endobj 1223 0 obj << /Title (\376\377\0\125\0\156\0\151\0\161\0\165\0\145\0\40\0\111\0\156\0\144\0\145\0\170\0\145\0\163) /Parent 1220 0 R /Prev 1222 0 R /Next 1224 0 R /A 69 0 R >> endobj 1224 0 obj << /Title (\376\377\0\106\0\117\0\122\0\105\0\111\0\107\0\116\0\40\0\113\0\105\0\131\0\123) /Parent 1220 0 R /Prev 1223 0 R /Next 1225 0 R /A 71 0 R >> endobj 1225 0 obj << /Title (\376\377\0\111\0\156\0\144\0\145\0\170\0\145\0\163\0\40\0\141\0\156\0\144\0\40\0\121\0\165\0\145\0\162\0\171\0\40\0\123\0\160\0\145\0\145\0\144) /Parent 1220 0 R /Prev 1224 0 R /Next 1226 0 R /A 73 0 R >> endobj 1226 0 obj << /Title (\376\377\0\127\0\150\0\145\0\162\0\145\0\40\0\103\0\157\0\156\0\144\0\151\0\164\0\151\0\157\0\156\0\40\0\157\0\162\0\40\0\112\0\157\0\151\0\156) /Parent 1220 0 R /Prev 1225 0 R /Next 1227 0 R /A 75 0 R >> endobj 1227 0 obj << /Title (\376\377\0\123\0\165\0\142\0\161\0\165\0\145\0\162\0\151\0\145\0\163\0\40\0\141\0\156\0\144\0\40\0\112\0\157\0\151\0\156\0\163) /Parent 1220 0 R /Prev 1226 0 R /A 77 0 R >> endobj 1228 0 obj << /Title (\376\377\0\124\0\171\0\160\0\145\0\163\0\40\0\141\0\156\0\144\0\40\0\101\0\162\0\151\0\164\0\150\0\155\0\145\0\164\0\151\0\143\0\40\0\117\0\160\0\145\0\162\0\141\0\164\0\151\0\157\0\156\0\163) /Parent 1217 0 R /First 1229 0 R /Last 1233 0 R /Prev 1220 0 R /Next 1234 0 R /Count -5 /A 79 0 R >> endobj 1229 0 obj << /Title (\376\377\0\111\0\156\0\164\0\145\0\147\0\162\0\141\0\154\0\40\0\124\0\171\0\160\0\145\0\163) /Parent 1228 0 R /Next 1230 0 R /A 81 0 R >> endobj 1230 0 obj << /Title (\376\377\0\117\0\164\0\150\0\145\0\162\0\40\0\116\0\165\0\155\0\145\0\162\0\151\0\143\0\40\0\124\0\171\0\160\0\145\0\163) /Parent 1228 0 R /Prev 1229 0 R /Next 1231 0 R /A 83 0 R >> endobj 1231 0 obj << /Title (\376\377\0\102\0\151\0\164\0\40\0\141\0\156\0\144\0\40\0\102\0\157\0\157\0\154\0\145\0\141\0\156\0\40\0\124\0\171\0\160\0\145\0\163) /Parent 1228 0 R /Prev 1230 0 R /Next 1232 0 R /A 85 0 R >> endobj 1232 0 obj << /Title (\376\377\0\123\0\164\0\157\0\162\0\141\0\147\0\145\0\40\0\141\0\156\0\144\0\40\0\110\0\141\0\156\0\144\0\154\0\151\0\156\0\147\0\40\0\157\0\146\0\40\0\112\0\141\0\166\0\141\0\40\0\117\0\142\0\152\0\145\0\143\0\164\0\163) /Parent 1228 0 R /Prev 1231 0 R /Next 1233 0 R /A 87 0 R >> endobj 1233 0 obj << /Title (\376\377\0\124\0\171\0\160\0\145\0\40\0\123\0\151\0\172\0\145\0\54\0\40\0\120\0\162\0\145\0\143\0\151\0\163\0\151\0\157\0\156\0\40\0\141\0\156\0\144\0\40\0\123\0\143\0\141\0\154\0\145) /Parent 1228 0 R /Prev 1232 0 R /A 89 0 R >> endobj 1234 0 obj << /Title (\376\377\0\123\0\145\0\161\0\165\0\145\0\156\0\143\0\145\0\163\0\40\0\141\0\156\0\144\0\40\0\111\0\144\0\145\0\156\0\164\0\151\0\164\0\171) /Parent 1217 0 R /First 1235 0 R /Last 1236 0 R /Prev 1228 0 R /Next 1237 0 R /Count -2 /A 91 0 R >> endobj 1235 0 obj << /Title (\376\377\0\111\0\144\0\145\0\156\0\164\0\151\0\164\0\171\0\40\0\101\0\165\0\164\0\157\0\55\0\111\0\156\0\143\0\162\0\145\0\155\0\145\0\156\0\164\0\40\0\103\0\157\0\154\0\165\0\155\0\156\0\163) /Parent 1234 0 R /Next 1236 0 R /A 93 0 R >> endobj 1236 0 obj << /Title (\376\377\0\123\0\145\0\161\0\165\0\145\0\156\0\143\0\145\0\163) /Parent 1234 0 R /Prev 1235 0 R /A 95 0 R >> endobj 1237 0 obj << /Title (\376\377\0\111\0\163\0\163\0\165\0\145\0\163\0\40\0\167\0\151\0\164\0\150\0\40\0\124\0\162\0\141\0\156\0\163\0\141\0\143\0\164\0\151\0\157\0\156\0\163) /Parent 1217 0 R /Prev 1234 0 R /Next 1238 0 R /A 97 0 R >> endobj 1238 0 obj << /Title (\376\377\0\116\0\145\0\167\0\40\0\106\0\145\0\141\0\164\0\165\0\162\0\145\0\163\0\40\0\141\0\156\0\144\0\40\0\103\0\150\0\141\0\156\0\147\0\145\0\163) /Parent 1217 0 R /Prev 1237 0 R /A 99 0 R >> endobj 1239 0 obj << /Title (\376\377\0\103\0\150\0\141\0\160\0\164\0\145\0\162\0\240\0\63\0\56\0\240\0\125\0\116\0\111\0\130\0\40\0\121\0\165\0\151\0\143\0\153\0\40\0\123\0\164\0\141\0\162\0\164) /Parent 1187 0 R /First 1240 0 R /Last 1246 0 R /Prev 1217 0 R /Next 1250 0 R /Count -10 /A 101 0 R >> endobj 1240 0 obj << /Title (\376\377\0\120\0\165\0\162\0\160\0\157\0\163\0\145) /Parent 1239 0 R /Next 1241 0 R /A 103 0 R >> endobj 1241 0 obj << /Title (\376\377\0\111\0\156\0\163\0\164\0\141\0\154\0\154\0\141\0\164\0\151\0\157\0\156) /Parent 1239 0 R /Prev 1240 0 R /Next 1242 0 R /A 105 0 R >> endobj 1242 0 obj << /Title (\376\377\0\123\0\145\0\164\0\164\0\151\0\156\0\147\0\40\0\165\0\160\0\40\0\141\0\40\0\110\0\163\0\161\0\154\0\144\0\142\0\40\0\120\0\145\0\162\0\163\0\151\0\163\0\164\0\145\0\156\0\164\0\40\0\104\0\141\0\164\0\141\0\142\0\141\0\163\0\145\0\40\0\111\0\156\0\163\0\164\0\141\0\156\0\143\0\145\0\40\0\141\0\156\0\144\0\40\0\141\0\40\0\110\0\163\0\161\0\154\0\144\0\142\0\40\0\123\0\145\0\162\0\166\0\145\0\162) /Parent 1239 0 R /Prev 1241 0 R /Next 1243 0 R /A 107 0 R >> endobj 1243 0 obj << /Title (\376\377\0\101\0\143\0\143\0\145\0\163\0\163\0\151\0\156\0\147\0\40\0\171\0\157\0\165\0\162\0\40\0\104\0\141\0\164\0\141\0\142\0\141\0\163\0\145) /Parent 1239 0 R /Prev 1242 0 R /Next 1244 0 R /A 109 0 R >> endobj 1244 0 obj << /Title (\376\377\0\103\0\162\0\145\0\141\0\164\0\145\0\40\0\141\0\144\0\144\0\151\0\164\0\151\0\157\0\156\0\141\0\154\0\40\0\101\0\143\0\143\0\157\0\165\0\156\0\164\0\163) /Parent 1239 0 R /Prev 1243 0 R /Next 1245 0 R /A 111 0 R >> endobj 1245 0 obj << /Title (\376\377\0\123\0\150\0\165\0\164\0\144\0\157\0\167\0\156) /Parent 1239 0 R /Prev 1244 0 R /Next 1246 0 R /A 113 0 R >> endobj 1246 0 obj << /Title (\376\377\0\122\0\165\0\156\0\156\0\151\0\156\0\147\0\40\0\110\0\163\0\161\0\154\0\144\0\142\0\40\0\141\0\163\0\40\0\141\0\40\0\123\0\171\0\163\0\164\0\145\0\155\0\40\0\104\0\141\0\145\0\155\0\157\0\156) /Parent 1239 0 R /First 1247 0 R /Last 1249 0 R /Prev 1245 0 R /Count -3 /A 115 0 R >> endobj 1247 0 obj << /Title (\376\377\0\120\0\157\0\162\0\164\0\141\0\142\0\151\0\154\0\151\0\164\0\171\0\40\0\157\0\146\0\40\0\150\0\163\0\161\0\154\0\144\0\142\0\40\0\151\0\156\0\151\0\164\0\40\0\163\0\143\0\162\0\151\0\160\0\164) /Parent 1246 0 R /Next 1248 0 R /A 117 0 R >> endobj 1248 0 obj << /Title (\376\377\0\111\0\156\0\151\0\164\0\40\0\163\0\143\0\162\0\151\0\160\0\164\0\40\0\123\0\145\0\164\0\165\0\160\0\40\0\120\0\162\0\157\0\143\0\145\0\144\0\165\0\162\0\145) /Parent 1246 0 R /Prev 1247 0 R /Next 1249 0 R /A 119 0 R >> endobj 1249 0 obj << /Title (\376\377\0\124\0\162\0\157\0\165\0\142\0\154\0\145\0\163\0\150\0\157\0\157\0\164\0\151\0\156\0\147\0\40\0\164\0\150\0\145\0\40\0\111\0\156\0\151\0\164\0\40\0\123\0\143\0\162\0\151\0\160\0\164) /Parent 1246 0 R /Prev 1248 0 R /A 124 0 R >> endobj 1250 0 obj << /Title (\376\377\0\103\0\150\0\141\0\160\0\164\0\145\0\162\0\240\0\64\0\56\0\240\0\101\0\144\0\166\0\141\0\156\0\143\0\145\0\144\0\40\0\124\0\157\0\160\0\151\0\143\0\163) /Parent 1187 0 R /First 1251 0 R /Last 1258 0 R /Prev 1239 0 R /Next 1259 0 R /Count -8 /A 126 0 R >> endobj 1251 0 obj << /Title (\376\377\0\120\0\165\0\162\0\160\0\157\0\163\0\145) /Parent 1250 0 R /Next 1252 0 R /A 128 0 R >> endobj 1252 0 obj << /Title (\376\377\0\103\0\157\0\156\0\156\0\145\0\143\0\164\0\151\0\157\0\156\0\163) /Parent 1250 0 R /First 1253 0 R /Last 1253 0 R /Prev 1251 0 R /Next 1254 0 R /Count -1 /A 130 0 R >> endobj 1253 0 obj << /Title (\376\377\0\103\0\157\0\156\0\156\0\145\0\143\0\164\0\151\0\157\0\156\0\40\0\160\0\162\0\157\0\160\0\145\0\162\0\164\0\151\0\145\0\163) /Parent 1252 0 R /A 132 0 R >> endobj 1254 0 obj << /Title (\376\377\0\120\0\162\0\157\0\160\0\145\0\162\0\164\0\151\0\145\0\163\0\40\0\106\0\151\0\154\0\145\0\163) /Parent 1250 0 R /First 1255 0 R /Last 1257 0 R /Prev 1252 0 R /Next 1258 0 R /Count -3 /A 134 0 R >> endobj 1255 0 obj << /Title (\376\377\0\123\0\145\0\162\0\166\0\145\0\162\0\40\0\141\0\156\0\144\0\40\0\127\0\145\0\142\0\40\0\123\0\145\0\162\0\166\0\145\0\162\0\40\0\120\0\162\0\157\0\160\0\145\0\162\0\164\0\151\0\145\0\163) /Parent 1254 0 R /Next 1256 0 R /A 136 0 R >> endobj 1256 0 obj << /Title (\376\377\0\123\0\164\0\141\0\162\0\164\0\151\0\156\0\147\0\40\0\141\0\40\0\123\0\145\0\162\0\166\0\145\0\162\0\40\0\146\0\162\0\157\0\155\0\40\0\171\0\157\0\165\0\162\0\40\0\141\0\160\0\160\0\154\0\151\0\143\0\141\0\164\0\151\0\157\0\156) /Parent 1254 0 R /Prev 1255 0 R /Next 1257 0 R /A 138 0 R >> endobj 1257 0 obj << /Title (\376\377\0\111\0\156\0\144\0\151\0\166\0\151\0\144\0\165\0\141\0\154\0\40\0\104\0\141\0\164\0\141\0\142\0\141\0\163\0\145\0\40\0\120\0\162\0\157\0\160\0\145\0\162\0\164\0\151\0\145\0\163) /Parent 1254 0 R /Prev 1256 0 R /A 140 0 R >> endobj 1258 0 obj << /Title (\376\377\0\123\0\121\0\114\0\40\0\103\0\157\0\155\0\155\0\141\0\156\0\144\0\163\0\40\0\146\0\157\0\162\0\40\0\104\0\141\0\164\0\141\0\142\0\141\0\163\0\145\0\40\0\120\0\162\0\157\0\160\0\145\0\162\0\164\0\151\0\145\0\163) /Parent 1250 0 R /Prev 1254 0 R /A 142 0 R >> endobj 1259 0 obj << /Title (\376\377\0\103\0\150\0\141\0\160\0\164\0\145\0\162\0\240\0\65\0\56\0\240\0\104\0\145\0\160\0\154\0\157\0\171\0\155\0\145\0\156\0\164\0\40\0\111\0\163\0\163\0\165\0\145\0\163) /Parent 1187 0 R /First 1260 0 R /Last 1272 0 R /Prev 1250 0 R /Next 1273 0 R /Count -13 /A 144 0 R >> endobj 1260 0 obj << /Title (\376\377\0\120\0\165\0\162\0\160\0\157\0\163\0\145) /Parent 1259 0 R /Next 1261 0 R /A 146 0 R >> endobj 1261 0 obj << /Title (\376\377\0\115\0\157\0\144\0\145\0\40\0\157\0\146\0\40\0\117\0\160\0\145\0\162\0\141\0\164\0\151\0\157\0\156\0\40\0\141\0\156\0\144\0\40\0\124\0\141\0\142\0\154\0\145\0\163) /Parent 1259 0 R /First 1262 0 R /Last 1265 0 R /Prev 1260 0 R /Next 1266 0 R /Count -4 /A 148 0 R >> endobj 1262 0 obj << /Title (\376\377\0\115\0\157\0\144\0\145\0\40\0\157\0\146\0\40\0\117\0\160\0\145\0\162\0\141\0\164\0\151\0\157\0\156) /Parent 1261 0 R /Next 1263 0 R /A 150 0 R >> endobj 1263 0 obj << /Title (\376\377\0\124\0\141\0\142\0\154\0\145\0\163) /Parent 1261 0 R /Prev 1262 0 R /Next 1264 0 R /A 152 0 R >> endobj 1264 0 obj << /Title (\376\377\0\114\0\141\0\162\0\147\0\145\0\40\0\117\0\142\0\152\0\145\0\143\0\164\0\163) /Parent 1261 0 R /Prev 1263 0 R /Next 1265 0 R /A 154 0 R >> endobj 1265 0 obj << /Title (\376\377\0\104\0\145\0\160\0\154\0\157\0\171\0\155\0\145\0\156\0\164\0\40\0\143\0\157\0\156\0\164\0\145\0\170\0\164) /Parent 1261 0 R /Prev 1264 0 R /A 156 0 R >> endobj 1266 0 obj << /Title (\376\377\0\115\0\145\0\155\0\157\0\162\0\171\0\40\0\141\0\156\0\144\0\40\0\104\0\151\0\163\0\153\0\40\0\125\0\163\0\145) /Parent 1259 0 R /First 1267 0 R /Last 1267 0 R /Prev 1261 0 R /Next 1268 0 R /Count -1 /A 158 0 R >> endobj 1267 0 obj << /Title (\376\377\0\103\0\141\0\143\0\150\0\145\0\40\0\115\0\145\0\155\0\157\0\162\0\171\0\40\0\101\0\154\0\154\0\157\0\143\0\141\0\164\0\151\0\157\0\156) /Parent 1266 0 R /A 160 0 R >> endobj 1268 0 obj << /Title (\376\377\0\115\0\141\0\156\0\141\0\147\0\151\0\156\0\147\0\40\0\104\0\141\0\164\0\141\0\142\0\141\0\163\0\145\0\40\0\103\0\157\0\156\0\156\0\145\0\143\0\164\0\151\0\157\0\156\0\163) /Parent 1259 0 R /Prev 1266 0 R /Next 1269 0 R /A 162 0 R >> endobj 1269 0 obj << /Title (\376\377\0\125\0\160\0\147\0\162\0\141\0\144\0\151\0\156\0\147\0\40\0\104\0\141\0\164\0\141\0\142\0\141\0\163\0\145\0\163) /Parent 1259 0 R /First 1270 0 R /Last 1271 0 R /Prev 1268 0 R /Next 1272 0 R /Count -2 /A 164 0 R >> endobj 1270 0 obj << /Title (\376\377\0\125\0\160\0\147\0\162\0\141\0\144\0\151\0\156\0\147\0\40\0\125\0\163\0\151\0\156\0\147\0\40\0\164\0\150\0\145\0\40\0\123\0\103\0\122\0\111\0\120\0\124\0\40\0\103\0\157\0\155\0\155\0\141\0\156\0\144) /Parent 1269 0 R /Next 1271 0 R /A 166 0 R >> endobj 1271 0 obj << /Title (\376\377\0\115\0\141\0\156\0\165\0\141\0\154\0\40\0\103\0\150\0\141\0\156\0\147\0\145\0\163\0\40\0\164\0\157\0\40\0\164\0\150\0\145\0\40\0\56\0\163\0\143\0\162\0\151\0\160\0\164\0\40\0\106\0\151\0\154\0\145) /Parent 1269 0 R /Prev 1270 0 R /A 168 0 R >> endobj 1272 0 obj << /Title (\376\377\0\102\0\141\0\143\0\153\0\151\0\156\0\147\0\40\0\125\0\160\0\40\0\104\0\141\0\164\0\141\0\142\0\141\0\163\0\145\0\163) /Parent 1259 0 R /Prev 1269 0 R /A 170 0 R >> endobj 1273 0 obj << /Title (\376\377\0\103\0\150\0\141\0\160\0\164\0\145\0\162\0\240\0\66\0\56\0\240\0\124\0\145\0\170\0\164\0\40\0\124\0\141\0\142\0\154\0\145\0\163) /Parent 1187 0 R /First 1274 0 R /Last 1282 0 R /Prev 1259 0 R /Next 1283 0 R /Count -9 /A 172 0 R >> endobj 1274 0 obj << /Title (\376\377\0\124\0\150\0\145\0\40\0\111\0\155\0\160\0\154\0\145\0\155\0\145\0\156\0\164\0\141\0\164\0\151\0\157\0\156) /Parent 1273 0 R /First 1275 0 R /Last 1279 0 R /Next 1280 0 R /Count -5 /A 174 0 R >> endobj 1275 0 obj << /Title (\376\377\0\104\0\145\0\146\0\151\0\156\0\151\0\164\0\151\0\157\0\156\0\40\0\157\0\146\0\40\0\124\0\141\0\142\0\154\0\145\0\163) /Parent 1274 0 R /Next 1276 0 R /A 176 0 R >> endobj 1276 0 obj << /Title (\376\377\0\123\0\143\0\157\0\160\0\145\0\40\0\141\0\156\0\144\0\40\0\122\0\145\0\141\0\163\0\163\0\151\0\147\0\156\0\155\0\145\0\156\0\164) /Parent 1274 0 R /Prev 1275 0 R /Next 1277 0 R /A 178 0 R >> endobj 1277 0 obj << /Title (\376\377\0\116\0\165\0\154\0\154\0\40\0\126\0\141\0\154\0\165\0\145\0\163\0\40\0\151\0\156\0\40\0\103\0\157\0\154\0\165\0\155\0\156\0\163\0\40\0\157\0\146\0\40\0\124\0\145\0\170\0\164\0\40\0\124\0\141\0\142\0\154\0\145\0\163) /Parent 1274 0 R /Prev 1276 0 R /Next 1278 0 R /A 180 0 R >> endobj 1278 0 obj << /Title (\376\377\0\103\0\157\0\156\0\146\0\151\0\147\0\165\0\162\0\141\0\164\0\151\0\157\0\156) /Parent 1274 0 R /Prev 1277 0 R /Next 1279 0 R /A 182 0 R >> endobj 1279 0 obj << /Title (\376\377\0\104\0\151\0\163\0\143\0\157\0\156\0\156\0\145\0\143\0\164\0\151\0\156\0\147\0\40\0\124\0\145\0\170\0\164\0\40\0\124\0\141\0\142\0\154\0\145\0\163) /Parent 1274 0 R /Prev 1278 0 R /A 184 0 R >> endobj 1280 0 obj << /Title (\376\377\0\124\0\145\0\170\0\164\0\40\0\106\0\151\0\154\0\145\0\40\0\111\0\163\0\163\0\165\0\145\0\163) /Parent 1273 0 R /Prev 1274 0 R /Next 1281 0 R /A 186 0 R >> endobj 1281 0 obj << /Title (\376\377\0\124\0\145\0\170\0\164\0\40\0\106\0\151\0\154\0\145\0\40\0\107\0\154\0\157\0\142\0\141\0\154\0\40\0\120\0\162\0\157\0\160\0\145\0\162\0\164\0\151\0\145\0\163) /Parent 1273 0 R /Prev 1280 0 R /Next 1282 0 R /A 188 0 R >> endobj 1282 0 obj << /Title (\376\377\0\111\0\155\0\160\0\157\0\162\0\164\0\151\0\156\0\147\0\40\0\141\0\40\0\124\0\145\0\170\0\164\0\40\0\124\0\141\0\142\0\154\0\145\0\40\0\146\0\151\0\154\0\145\0\40\0\151\0\156\0\40\0\164\0\157\0\40\0\141\0\40\0\124\0\162\0\141\0\144\0\151\0\164\0\151\0\157\0\156\0\141\0\154\0\40\0\50\0\156\0\157\0\156\0\55\0\124\0\145\0\170\0\164\0\40\0\124\0\141\0\142\0\154\0\145\0\51\0\40\0\124\0\141\0\142\0\154\0\145) /Parent 1273 0 R /Prev 1281 0 R /A 190 0 R >> endobj 1283 0 obj << /Title (\376\377\0\103\0\150\0\141\0\160\0\164\0\145\0\162\0\240\0\67\0\56\0\240\0\124\0\114\0\123) /Parent 1187 0 R /First 1284 0 R /Last 1292 0 R /Prev 1273 0 R /Next 1293 0 R /Count -9 /A 192 0 R >> endobj 1284 0 obj << /Title (\376\377\0\122\0\145\0\161\0\165\0\151\0\162\0\145\0\155\0\145\0\156\0\164\0\163) /Parent 1283 0 R /Next 1285 0 R /A 194 0 R >> endobj 1285 0 obj << /Title (\376\377\0\105\0\156\0\143\0\162\0\171\0\160\0\164\0\151\0\156\0\147\0\40\0\171\0\157\0\165\0\162\0\40\0\112\0\104\0\102\0\103\0\40\0\143\0\157\0\156\0\156\0\145\0\143\0\164\0\151\0\157\0\156) /Parent 1283 0 R /First 1286 0 R /Last 1287 0 R /Prev 1284 0 R /Next 1288 0 R /Count -2 /A 196 0 R >> endobj 1286 0 obj << /Title (\376\377\0\103\0\154\0\151\0\145\0\156\0\164\0\55\0\123\0\151\0\144\0\145) /Parent 1285 0 R /Next 1287 0 R /A 198 0 R >> endobj 1287 0 obj << /Title (\376\377\0\123\0\145\0\162\0\166\0\145\0\162\0\55\0\123\0\151\0\144\0\145) /Parent 1285 0 R /Prev 1286 0 R /A 200 0 R >> endobj 1288 0 obj << /Title (\376\377\0\112\0\123\0\123\0\105) /Parent 1283 0 R /Prev 1285 0 R /Next 1289 0 R /A 202 0 R >> endobj 1289 0 obj << /Title (\376\377\0\115\0\141\0\153\0\151\0\156\0\147\0\40\0\141\0\40\0\120\0\162\0\151\0\166\0\141\0\164\0\145\0\55\0\153\0\145\0\171\0\40\0\113\0\145\0\171\0\163\0\164\0\157\0\162\0\145) /Parent 1283 0 R /First 1290 0 R /Last 1291 0 R /Prev 1288 0 R /Next 1292 0 R /Count -2 /A 204 0 R >> endobj 1290 0 obj << /Title (\376\377\0\103\0\101\0\55\0\123\0\151\0\147\0\156\0\145\0\144\0\40\0\103\0\145\0\162\0\164) /Parent 1289 0 R /Next 1291 0 R /A 206 0 R >> endobj 1291 0 obj << /Title (\376\377\0\116\0\157\0\156\0\55\0\103\0\101\0\55\0\123\0\151\0\147\0\156\0\145\0\144\0\40\0\103\0\145\0\162\0\164) /Parent 1289 0 R /Prev 1290 0 R /A 208 0 R >> endobj 1292 0 obj << /Title (\376\377\0\101\0\165\0\164\0\157\0\155\0\141\0\164\0\151\0\143\0\40\0\123\0\145\0\162\0\166\0\145\0\162\0\40\0\157\0\162\0\40\0\127\0\145\0\142\0\123\0\145\0\162\0\166\0\145\0\162\0\40\0\163\0\164\0\141\0\162\0\164\0\165\0\160\0\40\0\157\0\156\0\40\0\125\0\116\0\111\0\130) /Parent 1283 0 R /Prev 1289 0 R /A 210 0 R >> endobj 1293 0 obj << /Title (\376\377\0\103\0\150\0\141\0\160\0\164\0\145\0\162\0\240\0\70\0\56\0\240\0\123\0\161\0\154\0\124\0\157\0\157\0\154) /Parent 1187 0 R /First 1294 0 R /Last 1340 0 R /Prev 1283 0 R /Next 1341 0 R /Count -47 /A 212 0 R >> endobj 1294 0 obj << /Title (\376\377\0\120\0\165\0\162\0\160\0\157\0\163\0\145\0\54\0\40\0\103\0\157\0\166\0\145\0\162\0\141\0\147\0\145\0\54\0\40\0\103\0\150\0\141\0\156\0\147\0\145\0\163\0\40\0\151\0\156\0\40\0\102\0\145\0\150\0\141\0\166\0\151\0\157\0\162) /Parent 1293 0 R /First 1295 0 R /Last 1296 0 R /Next 1297 0 R /Count -2 /A 214 0 R >> endobj 1295 0 obj << /Title (\376\377\0\120\0\154\0\141\0\164\0\146\0\157\0\162\0\155\0\163\0\40\0\141\0\156\0\144\0\40\0\123\0\161\0\154\0\124\0\157\0\157\0\154\0\40\0\166\0\145\0\162\0\163\0\151\0\157\0\156\0\163\0\40\0\143\0\157\0\166\0\145\0\162\0\145\0\144) /Parent 1294 0 R /Next 1296 0 R /A 216 0 R >> endobj 1296 0 obj << /Title (\376\377\0\106\0\165\0\156\0\143\0\164\0\151\0\157\0\156\0\141\0\154\0\40\0\103\0\150\0\141\0\156\0\147\0\145\0\163) /Parent 1294 0 R /Prev 1295 0 R /A 218 0 R >> endobj 1297 0 obj << /Title (\376\377\0\124\0\150\0\145\0\40\0\102\0\141\0\162\0\145\0\40\0\115\0\151\0\156\0\151\0\155\0\165\0\155\0\40\0\131\0\157\0\165\0\40\0\116\0\145\0\145\0\144\0\40\0\164\0\157\0\40\0\113\0\156\0\157\0\167\0\40\0\164\0\157\0\40\0\122\0\165\0\156\0\40\0\123\0\161\0\154\0\124\0\157\0\157\0\154) /Parent 1293 0 R /First 1298 0 R /Last 1300 0 R /Prev 1294 0 R /Next 1301 0 R /Count -3 /A 220 0 R >> endobj 1298 0 obj << /Title (\376\377\0\116\0\157\0\156\0\55\0\144\0\151\0\163\0\160\0\154\0\141\0\171\0\141\0\142\0\154\0\145\0\40\0\124\0\171\0\160\0\145\0\163) /Parent 1297 0 R /Next 1299 0 R /A 222 0 R >> endobj 1299 0 obj << /Title (\376\377\0\104\0\145\0\163\0\153\0\164\0\157\0\160\0\40\0\163\0\150\0\157\0\162\0\164\0\143\0\165\0\164\0\163) /Parent 1297 0 R /Prev 1298 0 R /Next 1300 0 R /A 224 0 R >> endobj 1300 0 obj << /Title (\376\377\0\114\0\157\0\141\0\144\0\151\0\156\0\147\0\40\0\163\0\141\0\155\0\160\0\154\0\145\0\40\0\144\0\141\0\164\0\141) /Parent 1297 0 R /Prev 1299 0 R /A 226 0 R >> endobj 1301 0 obj << /Title (\376\377\0\122\0\103\0\40\0\106\0\151\0\154\0\145\0\40\0\101\0\165\0\164\0\150\0\145\0\156\0\164\0\151\0\143\0\141\0\164\0\151\0\157\0\156\0\40\0\123\0\145\0\164\0\165\0\160) /Parent 1293 0 R /Prev 1297 0 R /Next 1302 0 R /A 228 0 R >> endobj 1302 0 obj << /Title (\376\377\0\125\0\163\0\151\0\156\0\147\0\40\0\111\0\156\0\154\0\151\0\156\0\145\0\40\0\122\0\103\0\40\0\101\0\165\0\164\0\150\0\145\0\156\0\164\0\151\0\143\0\141\0\164\0\151\0\157\0\156) /Parent 1293 0 R /Prev 1301 0 R /Next 1303 0 R /A 230 0 R >> endobj 1303 0 obj << /Title (\376\377\0\125\0\163\0\151\0\156\0\147\0\40\0\164\0\150\0\145\0\40\0\143\0\165\0\162\0\162\0\145\0\156\0\164\0\40\0\166\0\145\0\162\0\163\0\151\0\157\0\156\0\40\0\157\0\146\0\40\0\123\0\161\0\154\0\124\0\157\0\157\0\154\0\40\0\167\0\151\0\164\0\150\0\40\0\141\0\156\0\40\0\157\0\154\0\144\0\145\0\162\0\40\0\110\0\123\0\121\0\114\0\104\0\102\0\40\0\144\0\151\0\163\0\164\0\162\0\151\0\142\0\165\0\164\0\151\0\157\0\156\0\56) /Parent 1293 0 R /Prev 1302 0 R /Next 1304 0 R /A 232 0 R >> endobj 1304 0 obj << /Title (\376\377\0\111\0\156\0\164\0\145\0\162\0\141\0\143\0\164\0\151\0\166\0\145\0\40\0\125\0\163\0\141\0\147\0\145) /Parent 1293 0 R /First 1305 0 R /Last 1305 0 R /Prev 1303 0 R /Next 1306 0 R /Count -1 /A 234 0 R >> endobj 1305 0 obj << /Title (\376\377\0\103\0\157\0\155\0\155\0\141\0\156\0\144\0\40\0\124\0\171\0\160\0\145\0\163) /Parent 1304 0 R /A 236 0 R >> endobj 1306 0 obj << /Title (\376\377\0\103\0\157\0\155\0\155\0\141\0\156\0\144\0\40\0\124\0\171\0\160\0\145\0\163) /Parent 1293 0 R /Prev 1304 0 R /Next 1307 0 R /A 238 0 R >> endobj 1307 0 obj << /Title (\376\377\0\123\0\160\0\145\0\143\0\151\0\141\0\154\0\40\0\103\0\157\0\155\0\155\0\141\0\156\0\144\0\163) /Parent 1293 0 R /Prev 1306 0 R /Next 1308 0 R /A 243 0 R >> endobj 1308 0 obj << /Title (\376\377\0\105\0\144\0\151\0\164\0\40\0\102\0\165\0\146\0\146\0\145\0\162\0\40\0\57\0\40\0\110\0\151\0\163\0\164\0\157\0\162\0\171\0\40\0\103\0\157\0\155\0\155\0\141\0\156\0\144\0\163) /Parent 1293 0 R /Prev 1307 0 R /Next 1309 0 R /A 245 0 R >> endobj 1309 0 obj << /Title (\376\377\0\120\0\114\0\40\0\103\0\157\0\155\0\155\0\141\0\156\0\144\0\163) /Parent 1293 0 R /First 1310 0 R /Last 1314 0 R /Prev 1308 0 R /Next 1315 0 R /Count -5 /A 247 0 R >> endobj 1310 0 obj << /Title (\376\377\0\77\0\40\0\126\0\141\0\162\0\151\0\141\0\142\0\154\0\145) /Parent 1309 0 R /Next 1311 0 R /A 249 0 R >> endobj 1311 0 obj << /Title (\376\377\0\123\0\164\0\157\0\162\0\151\0\156\0\147\0\40\0\141\0\156\0\144\0\40\0\162\0\145\0\164\0\162\0\151\0\145\0\166\0\151\0\156\0\147\0\40\0\142\0\151\0\156\0\141\0\162\0\171\0\40\0\146\0\151\0\154\0\145\0\163) /Parent 1309 0 R /Prev 1310 0 R /Next 1312 0 R /A 251 0 R >> endobj 1312 0 obj << /Title (\376\377\0\103\0\157\0\155\0\155\0\141\0\156\0\144\0\40\0\110\0\151\0\163\0\164\0\157\0\162\0\171) /Parent 1309 0 R /Prev 1311 0 R /Next 1313 0 R /A 253 0 R >> endobj 1313 0 obj << /Title (\376\377\0\123\0\150\0\145\0\154\0\154\0\40\0\163\0\143\0\162\0\151\0\160\0\164\0\151\0\156\0\147\0\40\0\141\0\156\0\144\0\40\0\143\0\157\0\155\0\155\0\141\0\156\0\144\0\55\0\154\0\151\0\156\0\145\0\40\0\160\0\151\0\160\0\151\0\156\0\147) /Parent 1309 0 R /Prev 1312 0 R /Next 1314 0 R /A 255 0 R >> endobj 1314 0 obj << /Title (\376\377\0\105\0\155\0\165\0\154\0\141\0\164\0\151\0\156\0\147\0\40\0\116\0\157\0\156\0\55\0\111\0\156\0\164\0\145\0\162\0\141\0\143\0\164\0\151\0\166\0\145\0\40\0\155\0\157\0\144\0\145) /Parent 1309 0 R /Prev 1313 0 R /A 257 0 R >> endobj 1315 0 obj << /Title (\376\377\0\116\0\157\0\156\0\55\0\111\0\156\0\164\0\145\0\162\0\141\0\143\0\164\0\151\0\166\0\145) /Parent 1293 0 R /First 1316 0 R /Last 1324 0 R /Prev 1309 0 R /Next 1325 0 R /Count -9 /A 259 0 R >> endobj 1316 0 obj << /Title (\376\377\0\107\0\151\0\166\0\151\0\156\0\147\0\40\0\123\0\121\0\114\0\40\0\157\0\156\0\40\0\164\0\150\0\145\0\40\0\103\0\157\0\155\0\155\0\141\0\156\0\144\0\40\0\114\0\151\0\156\0\145) /Parent 1315 0 R /Next 1317 0 R /A 261 0 R >> endobj 1317 0 obj << /Title (\376\377\0\123\0\121\0\114\0\40\0\106\0\151\0\154\0\145\0\163) /Parent 1315 0 R /Prev 1316 0 R /Next 1318 0 R /A 263 0 R >> endobj 1318 0 obj << /Title (\376\377\0\120\0\151\0\160\0\151\0\156\0\147\0\40\0\141\0\156\0\144\0\40\0\163\0\150\0\145\0\154\0\154\0\40\0\163\0\143\0\162\0\151\0\160\0\164\0\151\0\156\0\147) /Parent 1315 0 R /Prev 1317 0 R /Next 1319 0 R /A 265 0 R >> endobj 1319 0 obj << /Title (\376\377\0\117\0\160\0\164\0\151\0\155\0\141\0\154\0\154\0\171\0\40\0\103\0\157\0\155\0\160\0\141\0\164\0\151\0\142\0\154\0\145\0\40\0\123\0\121\0\114\0\40\0\106\0\151\0\154\0\145\0\163) /Parent 1315 0 R /Prev 1318 0 R /Next 1320 0 R /A 267 0 R >> endobj 1320 0 obj << /Title (\376\377\0\103\0\157\0\155\0\155\0\145\0\156\0\164\0\163) /Parent 1315 0 R /Prev 1319 0 R /Next 1321 0 R /A 269 0 R >> endobj 1321 0 obj << /Title (\376\377\0\123\0\160\0\145\0\143\0\151\0\141\0\154\0\40\0\103\0\157\0\155\0\155\0\141\0\156\0\144\0\163\0\40\0\141\0\156\0\144\0\40\0\105\0\144\0\151\0\164\0\40\0\102\0\165\0\146\0\146\0\145\0\162\0\40\0\103\0\157\0\155\0\155\0\141\0\156\0\144\0\163\0\40\0\151\0\156\0\40\0\123\0\121\0\114\0\40\0\106\0\151\0\154\0\145\0\163) /Parent 1315 0 R /Prev 1320 0 R /Next 1322 0 R /A 271 0 R >> endobj 1322 0 obj << /Title (\376\377\0\101\0\165\0\164\0\157\0\155\0\141\0\164\0\151\0\157\0\156) /Parent 1315 0 R /Prev 1321 0 R /Next 1323 0 R /A 273 0 R >> endobj 1323 0 obj << /Title (\376\377\0\107\0\145\0\164\0\164\0\151\0\156\0\147\0\40\0\111\0\156\0\164\0\145\0\162\0\141\0\143\0\164\0\151\0\166\0\145\0\40\0\106\0\165\0\156\0\143\0\164\0\151\0\157\0\156\0\141\0\154\0\151\0\164\0\171\0\40\0\167\0\151\0\164\0\150\0\40\0\123\0\121\0\114\0\40\0\106\0\151\0\154\0\145\0\163) /Parent 1315 0 R /Prev 1322 0 R /Next 1324 0 R /A 275 0 R >> endobj 1324 0 obj << /Title (\376\377\0\103\0\150\0\141\0\162\0\141\0\143\0\164\0\145\0\162\0\40\0\105\0\156\0\143\0\157\0\144\0\151\0\156\0\147) /Parent 1315 0 R /Prev 1323 0 R /A 277 0 R >> endobj 1325 0 obj << /Title (\376\377\0\107\0\145\0\156\0\145\0\162\0\141\0\164\0\151\0\156\0\147\0\40\0\124\0\145\0\170\0\164\0\40\0\157\0\162\0\40\0\110\0\124\0\115\0\114\0\40\0\122\0\145\0\160\0\157\0\162\0\164\0\163) /Parent 1293 0 R /Prev 1315 0 R /Next 1326 0 R /A 279 0 R >> endobj 1326 0 obj << /Title (\376\377\0\123\0\161\0\154\0\124\0\157\0\157\0\154\0\40\0\120\0\162\0\157\0\143\0\145\0\144\0\165\0\162\0\141\0\154\0\40\0\114\0\141\0\156\0\147\0\165\0\141\0\147\0\145) /Parent 1293 0 R /First 1327 0 R /Last 1330 0 R /Prev 1325 0 R /Next 1331 0 R /Count -4 /A 281 0 R >> endobj 1327 0 obj << /Title (\376\377\0\126\0\141\0\162\0\151\0\141\0\142\0\154\0\145\0\163) /Parent 1326 0 R /Next 1328 0 R /A 283 0 R >> endobj 1328 0 obj << /Title (\376\377\0\120\0\114\0\40\0\101\0\154\0\151\0\141\0\163\0\145\0\163) /Parent 1326 0 R /Prev 1327 0 R /Next 1329 0 R /A 285 0 R >> endobj 1329 0 obj << /Title (\376\377\0\114\0\157\0\147\0\151\0\143\0\141\0\154\0\40\0\105\0\170\0\160\0\162\0\145\0\163\0\163\0\151\0\157\0\156\0\163) /Parent 1326 0 R /Prev 1328 0 R /Next 1330 0 R /A 287 0 R >> endobj 1330 0 obj << /Title (\376\377\0\106\0\154\0\157\0\167\0\40\0\103\0\157\0\156\0\164\0\162\0\157\0\154) /Parent 1326 0 R /Prev 1329 0 R /A 289 0 R >> endobj 1331 0 obj << /Title (\376\377\0\103\0\150\0\165\0\156\0\153\0\151\0\156\0\147) /Parent 1293 0 R /First 1332 0 R /Last 1333 0 R /Prev 1326 0 R /Next 1334 0 R /Count -2 /A 291 0 R >> endobj 1332 0 obj << /Title (\376\377\0\127\0\150\0\171\0\77) /Parent 1331 0 R /Next 1333 0 R /A 293 0 R >> endobj 1333 0 obj << /Title (\376\377\0\110\0\157\0\167\0\77) /Parent 1331 0 R /Prev 1332 0 R /A 295 0 R >> endobj 1334 0 obj << /Title (\376\377\0\122\0\141\0\167\0\40\0\115\0\157\0\144\0\145) /Parent 1293 0 R /Prev 1331 0 R /Next 1335 0 R /A 297 0 R >> endobj 1335 0 obj << /Title (\376\377\0\120\0\114\0\57\0\123\0\121\0\114) /Parent 1293 0 R /Prev 1334 0 R /Next 1336 0 R /A 299 0 R >> endobj 1336 0 obj << /Title (\376\377\0\125\0\163\0\151\0\156\0\147\0\40\0\150\0\163\0\161\0\154\0\164\0\157\0\157\0\154\0\56\0\152\0\141\0\162\0\40\0\141\0\156\0\144\0\40\0\150\0\163\0\161\0\154\0\144\0\142\0\165\0\164\0\151\0\154\0\56\0\152\0\141\0\162) /Parent 1293 0 R /Prev 1335 0 R /Next 1337 0 R /A 301 0 R >> endobj 1337 0 obj << /Title (\376\377\0\104\0\145\0\154\0\151\0\155\0\151\0\164\0\145\0\162\0\55\0\123\0\145\0\160\0\141\0\162\0\141\0\164\0\145\0\144\0\55\0\126\0\141\0\154\0\165\0\145\0\40\0\111\0\155\0\160\0\157\0\162\0\164\0\163\0\40\0\141\0\156\0\144\0\40\0\105\0\170\0\160\0\157\0\162\0\164\0\163) /Parent 1293 0 R /First 1338 0 R /Last 1339 0 R /Prev 1336 0 R /Next 1340 0 R /Count -2 /A 303 0 R >> endobj 1338 0 obj << /Title (\376\377\0\123\0\151\0\155\0\160\0\154\0\145\0\40\0\104\0\123\0\126\0\40\0\145\0\170\0\160\0\157\0\162\0\164\0\163\0\40\0\141\0\156\0\144\0\40\0\151\0\155\0\160\0\157\0\162\0\164\0\163\0\40\0\165\0\163\0\151\0\156\0\147\0\40\0\144\0\145\0\146\0\141\0\165\0\154\0\164\0\40\0\163\0\145\0\164\0\164\0\151\0\156\0\147\0\163) /Parent 1337 0 R /Next 1339 0 R /A 305 0 R >> endobj 1339 0 obj << /Title (\376\377\0\123\0\160\0\145\0\143\0\151\0\146\0\171\0\151\0\156\0\147\0\40\0\161\0\165\0\145\0\162\0\151\0\145\0\163\0\40\0\141\0\156\0\144\0\40\0\157\0\160\0\164\0\151\0\157\0\156\0\163) /Parent 1337 0 R /Prev 1338 0 R /A 307 0 R >> endobj 1340 0 obj << /Title (\376\377\0\125\0\156\0\151\0\164\0\40\0\124\0\145\0\163\0\164\0\151\0\156\0\147\0\40\0\123\0\161\0\154\0\124\0\157\0\157\0\154) /Parent 1293 0 R /Prev 1337 0 R /A 309 0 R >> endobj 1341 0 obj << /Title (\376\377\0\103\0\150\0\141\0\160\0\164\0\145\0\162\0\240\0\71\0\56\0\240\0\123\0\121\0\114\0\40\0\123\0\171\0\156\0\164\0\141\0\170) /Parent 1187 0 R /First 1342 0 R /Last 1404 0 R /Prev 1293 0 R /Next 1405 0 R /Count -63 /A 311 0 R >> endobj 1342 0 obj << /Title (\376\377\0\116\0\157\0\164\0\141\0\164\0\151\0\157\0\156\0\141\0\154\0\40\0\103\0\157\0\156\0\166\0\145\0\156\0\164\0\151\0\157\0\156\0\163\0\40\0\125\0\163\0\145\0\144\0\40\0\151\0\156\0\40\0\164\0\150\0\151\0\163\0\40\0\103\0\150\0\141\0\160\0\164\0\145\0\162) /Parent 1341 0 R /Next 1343 0 R /A 313 0 R >> endobj 1343 0 obj << /Title (\376\377\0\123\0\121\0\114\0\40\0\103\0\157\0\155\0\155\0\141\0\156\0\144\0\163) /Parent 1341 0 R /First 1344 0 R /Last 1398 0 R /Prev 1342 0 R /Next 1399 0 R /Count -55 /A 315 0 R >> endobj 1344 0 obj << /Title (\376\377\0\101\0\114\0\124\0\105\0\122\0\40\0\111\0\116\0\104\0\105\0\130) /Parent 1343 0 R /Next 1345 0 R /A 317 0 R >> endobj 1345 0 obj << /Title (\376\377\0\101\0\114\0\124\0\105\0\122\0\40\0\123\0\105\0\121\0\125\0\105\0\116\0\103\0\105) /Parent 1343 0 R /Prev 1344 0 R /Next 1346 0 R /A 319 0 R >> endobj 1346 0 obj << /Title (\376\377\0\101\0\114\0\124\0\105\0\122\0\40\0\123\0\103\0\110\0\105\0\115\0\101) /Parent 1343 0 R /Prev 1345 0 R /Next 1347 0 R /A 321 0 R >> endobj 1347 0 obj << /Title (\376\377\0\101\0\114\0\124\0\105\0\122\0\40\0\124\0\101\0\102\0\114\0\105) /Parent 1343 0 R /Prev 1346 0 R /Next 1348 0 R /A 323 0 R >> endobj 1348 0 obj << /Title (\376\377\0\101\0\114\0\124\0\105\0\122\0\40\0\125\0\123\0\105\0\122) /Parent 1343 0 R /Prev 1347 0 R /Next 1349 0 R /A 325 0 R >> endobj 1349 0 obj << /Title (\376\377\0\103\0\101\0\114\0\114) /Parent 1343 0 R /Prev 1348 0 R /Next 1350 0 R /A 327 0 R >> endobj 1350 0 obj << /Title (\376\377\0\103\0\110\0\105\0\103\0\113\0\120\0\117\0\111\0\116\0\124) /Parent 1343 0 R /Prev 1349 0 R /Next 1351 0 R /A 329 0 R >> endobj 1351 0 obj << /Title (\376\377\0\103\0\117\0\115\0\115\0\111\0\124) /Parent 1343 0 R /Prev 1350 0 R /Next 1352 0 R /A 331 0 R >> endobj 1352 0 obj << /Title (\376\377\0\103\0\117\0\116\0\116\0\105\0\103\0\124) /Parent 1343 0 R /Prev 1351 0 R /Next 1353 0 R /A 333 0 R >> endobj 1353 0 obj << /Title (\376\377\0\103\0\122\0\105\0\101\0\124\0\105\0\40\0\101\0\114\0\111\0\101\0\123) /Parent 1343 0 R /Prev 1352 0 R /Next 1354 0 R /A 335 0 R >> endobj 1354 0 obj << /Title (\376\377\0\103\0\122\0\105\0\101\0\124\0\105\0\40\0\111\0\116\0\104\0\105\0\130) /Parent 1343 0 R /Prev 1353 0 R /Next 1355 0 R /A 337 0 R >> endobj 1355 0 obj << /Title (\376\377\0\103\0\122\0\105\0\101\0\124\0\105\0\40\0\122\0\117\0\114\0\105) /Parent 1343 0 R /Prev 1354 0 R /Next 1356 0 R /A 339 0 R >> endobj 1356 0 obj << /Title (\376\377\0\103\0\122\0\105\0\101\0\124\0\105\0\40\0\123\0\103\0\110\0\105\0\115\0\101) /Parent 1343 0 R /Prev 1355 0 R /Next 1357 0 R /A 341 0 R >> endobj 1357 0 obj << /Title (\376\377\0\103\0\122\0\105\0\101\0\124\0\105\0\40\0\123\0\105\0\121\0\125\0\105\0\116\0\103\0\105) /Parent 1343 0 R /Prev 1356 0 R /Next 1358 0 R /A 343 0 R >> endobj 1358 0 obj << /Title (\376\377\0\103\0\122\0\105\0\101\0\124\0\105\0\40\0\124\0\101\0\102\0\114\0\105) /Parent 1343 0 R /Prev 1357 0 R /Next 1359 0 R /A 345 0 R >> endobj 1359 0 obj << /Title (\376\377\0\103\0\122\0\105\0\101\0\124\0\105\0\40\0\124\0\122\0\111\0\107\0\107\0\105\0\122) /Parent 1343 0 R /Prev 1358 0 R /Next 1360 0 R /A 347 0 R >> endobj 1360 0 obj << /Title (\376\377\0\103\0\122\0\105\0\101\0\124\0\105\0\40\0\125\0\123\0\105\0\122) /Parent 1343 0 R /Prev 1359 0 R /Next 1361 0 R /A 349 0 R >> endobj 1361 0 obj << /Title (\376\377\0\103\0\122\0\105\0\101\0\124\0\105\0\40\0\126\0\111\0\105\0\127) /Parent 1343 0 R /Prev 1360 0 R /Next 1362 0 R /A 351 0 R >> endobj 1362 0 obj << /Title (\376\377\0\104\0\105\0\114\0\105\0\124\0\105) /Parent 1343 0 R /Prev 1361 0 R /Next 1363 0 R /A 353 0 R >> endobj 1363 0 obj << /Title (\376\377\0\104\0\111\0\123\0\103\0\117\0\116\0\116\0\105\0\103\0\124) /Parent 1343 0 R /Prev 1362 0 R /Next 1364 0 R /A 355 0 R >> endobj 1364 0 obj << /Title (\376\377\0\104\0\122\0\117\0\120\0\40\0\111\0\116\0\104\0\105\0\130) /Parent 1343 0 R /Prev 1363 0 R /Next 1365 0 R /A 357 0 R >> endobj 1365 0 obj << /Title (\376\377\0\104\0\122\0\117\0\120\0\40\0\122\0\117\0\114\0\105) /Parent 1343 0 R /Prev 1364 0 R /Next 1366 0 R /A 362 0 R >> endobj 1366 0 obj << /Title (\376\377\0\104\0\122\0\117\0\120\0\40\0\123\0\105\0\121\0\125\0\105\0\116\0\103\0\105) /Parent 1343 0 R /Prev 1365 0 R /Next 1367 0 R /A 364 0 R >> endobj 1367 0 obj << /Title (\376\377\0\104\0\122\0\117\0\120\0\40\0\123\0\103\0\110\0\105\0\115\0\101) /Parent 1343 0 R /Prev 1366 0 R /Next 1368 0 R /A 366 0 R >> endobj 1368 0 obj << /Title (\376\377\0\104\0\122\0\117\0\120\0\40\0\124\0\101\0\102\0\114\0\105) /Parent 1343 0 R /Prev 1367 0 R /Next 1369 0 R /A 368 0 R >> endobj 1369 0 obj << /Title (\376\377\0\104\0\122\0\117\0\120\0\40\0\124\0\122\0\111\0\107\0\107\0\105\0\122) /Parent 1343 0 R /Prev 1368 0 R /Next 1370 0 R /A 370 0 R >> endobj 1370 0 obj << /Title (\376\377\0\104\0\122\0\117\0\120\0\40\0\125\0\123\0\105\0\122) /Parent 1343 0 R /Prev 1369 0 R /Next 1371 0 R /A 372 0 R >> endobj 1371 0 obj << /Title (\376\377\0\104\0\122\0\117\0\120\0\40\0\126\0\111\0\105\0\127) /Parent 1343 0 R /Prev 1370 0 R /Next 1372 0 R /A 374 0 R >> endobj 1372 0 obj << /Title (\376\377\0\105\0\130\0\120\0\114\0\101\0\111\0\116\0\40\0\120\0\114\0\101\0\116) /Parent 1343 0 R /Prev 1371 0 R /Next 1373 0 R /A 376 0 R >> endobj 1373 0 obj << /Title (\376\377\0\107\0\122\0\101\0\116\0\124) /Parent 1343 0 R /Prev 1372 0 R /Next 1374 0 R /A 378 0 R >> endobj 1374 0 obj << /Title (\376\377\0\111\0\116\0\123\0\105\0\122\0\124) /Parent 1343 0 R /Prev 1373 0 R /Next 1375 0 R /A 380 0 R >> endobj 1375 0 obj << /Title (\376\377\0\122\0\105\0\126\0\117\0\113\0\105) /Parent 1343 0 R /Prev 1374 0 R /Next 1376 0 R /A 382 0 R >> endobj 1376 0 obj << /Title (\376\377\0\122\0\117\0\114\0\114\0\102\0\101\0\103\0\113) /Parent 1343 0 R /Prev 1375 0 R /Next 1377 0 R /A 384 0 R >> endobj 1377 0 obj << /Title (\376\377\0\123\0\101\0\126\0\105\0\120\0\117\0\111\0\116\0\124) /Parent 1343 0 R /Prev 1376 0 R /Next 1378 0 R /A 386 0 R >> endobj 1378 0 obj << /Title (\376\377\0\123\0\103\0\122\0\111\0\120\0\124) /Parent 1343 0 R /Prev 1377 0 R /Next 1379 0 R /A 388 0 R >> endobj 1379 0 obj << /Title (\376\377\0\123\0\105\0\114\0\105\0\103\0\124) /Parent 1343 0 R /Prev 1378 0 R /Next 1380 0 R /A 390 0 R >> endobj 1380 0 obj << /Title (\376\377\0\123\0\105\0\124\0\40\0\101\0\125\0\124\0\117\0\103\0\117\0\115\0\115\0\111\0\124) /Parent 1343 0 R /Prev 1379 0 R /Next 1381 0 R /A 392 0 R >> endobj 1381 0 obj << /Title (\376\377\0\123\0\105\0\124\0\40\0\104\0\101\0\124\0\101\0\102\0\101\0\123\0\105\0\40\0\103\0\117\0\114\0\114\0\101\0\124\0\111\0\117\0\116) /Parent 1343 0 R /Prev 1380 0 R /Next 1382 0 R /A 394 0 R >> endobj 1382 0 obj << /Title (\376\377\0\123\0\105\0\124\0\40\0\103\0\110\0\105\0\103\0\113\0\120\0\117\0\111\0\116\0\124\0\40\0\104\0\105\0\106\0\122\0\101\0\107) /Parent 1343 0 R /Prev 1381 0 R /Next 1383 0 R /A 396 0 R >> endobj 1383 0 obj << /Title (\376\377\0\123\0\105\0\124\0\40\0\111\0\107\0\116\0\117\0\122\0\105\0\103\0\101\0\123\0\105) /Parent 1343 0 R /Prev 1382 0 R /Next 1384 0 R /A 398 0 R >> endobj 1384 0 obj << /Title (\376\377\0\123\0\105\0\124\0\40\0\111\0\116\0\111\0\124\0\111\0\101\0\114\0\40\0\123\0\103\0\110\0\105\0\115\0\101) /Parent 1343 0 R /Prev 1383 0 R /Next 1385 0 R /A 400 0 R >> endobj 1385 0 obj << /Title (\376\377\0\123\0\105\0\124\0\40\0\114\0\117\0\107\0\123\0\111\0\132\0\105) /Parent 1343 0 R /Prev 1384 0 R /Next 1386 0 R /A 402 0 R >> endobj 1386 0 obj << /Title (\376\377\0\123\0\105\0\124\0\40\0\115\0\101\0\130\0\122\0\117\0\127\0\123) /Parent 1343 0 R /Prev 1385 0 R /Next 1387 0 R /A 404 0 R >> endobj 1387 0 obj << /Title (\376\377\0\123\0\105\0\124\0\40\0\120\0\101\0\123\0\123\0\127\0\117\0\122\0\104) /Parent 1343 0 R /Prev 1386 0 R /Next 1388 0 R /A 406 0 R >> endobj 1388 0 obj << /Title (\376\377\0\123\0\105\0\124\0\40\0\120\0\122\0\117\0\120\0\105\0\122\0\124\0\131) /Parent 1343 0 R /Prev 1387 0 R /Next 1389 0 R /A 408 0 R >> endobj 1389 0 obj << /Title (\376\377\0\123\0\105\0\124\0\40\0\122\0\105\0\101\0\104\0\117\0\116\0\114\0\131) /Parent 1343 0 R /Prev 1388 0 R /Next 1390 0 R /A 410 0 R >> endobj 1390 0 obj << /Title (\376\377\0\123\0\105\0\124\0\40\0\122\0\105\0\106\0\105\0\122\0\105\0\116\0\124\0\111\0\101\0\114\0\40\0\111\0\116\0\124\0\105\0\107\0\122\0\111\0\124\0\131) /Parent 1343 0 R /Prev 1389 0 R /Next 1391 0 R /A 412 0 R >> endobj 1391 0 obj << /Title (\376\377\0\123\0\105\0\124\0\40\0\123\0\103\0\110\0\105\0\115\0\101) /Parent 1343 0 R /Prev 1390 0 R /Next 1392 0 R /A 414 0 R >> endobj 1392 0 obj << /Title (\376\377\0\123\0\105\0\124\0\40\0\123\0\103\0\122\0\111\0\120\0\124\0\106\0\117\0\122\0\115\0\101\0\124) /Parent 1343 0 R /Prev 1391 0 R /Next 1393 0 R /A 416 0 R >> endobj 1393 0 obj << /Title (\376\377\0\123\0\105\0\124\0\40\0\124\0\101\0\102\0\114\0\105\0\40\0\111\0\116\0\104\0\105\0\130) /Parent 1343 0 R /Prev 1392 0 R /Next 1394 0 R /A 418 0 R >> endobj 1394 0 obj << /Title (\376\377\0\123\0\105\0\124\0\40\0\124\0\101\0\102\0\114\0\105\0\40\0\122\0\105\0\101\0\104\0\117\0\116\0\114\0\131) /Parent 1343 0 R /Prev 1393 0 R /Next 1395 0 R /A 420 0 R >> endobj 1395 0 obj << /Title (\376\377\0\123\0\105\0\124\0\40\0\124\0\101\0\102\0\114\0\105\0\40\0\123\0\117\0\125\0\122\0\103\0\105) /Parent 1343 0 R /Prev 1394 0 R /Next 1396 0 R /A 422 0 R >> endobj 1396 0 obj << /Title (\376\377\0\123\0\105\0\124\0\40\0\127\0\122\0\111\0\124\0\105\0\40\0\104\0\105\0\114\0\101\0\131) /Parent 1343 0 R /Prev 1395 0 R /Next 1397 0 R /A 424 0 R >> endobj 1397 0 obj << /Title (\376\377\0\123\0\110\0\125\0\124\0\104\0\117\0\127\0\116) /Parent 1343 0 R /Prev 1396 0 R /Next 1398 0 R /A 426 0 R >> endobj 1398 0 obj << /Title (\376\377\0\125\0\120\0\104\0\101\0\124\0\105) /Parent 1343 0 R /Prev 1397 0 R /A 428 0 R >> endobj 1399 0 obj << /Title (\376\377\0\123\0\143\0\150\0\145\0\155\0\141\0\40\0\157\0\142\0\152\0\145\0\143\0\164\0\40\0\156\0\141\0\155\0\151\0\156\0\147) /Parent 1341 0 R /Prev 1343 0 R /Next 1400 0 R /A 430 0 R >> endobj 1400 0 obj << /Title (\376\377\0\104\0\141\0\164\0\141\0\40\0\124\0\171\0\160\0\145\0\163) /Parent 1341 0 R /Prev 1399 0 R /Next 1401 0 R /A 432 0 R >> endobj 1401 0 obj << /Title (\376\377\0\123\0\121\0\114\0\40\0\103\0\157\0\155\0\155\0\145\0\156\0\164\0\163) /Parent 1341 0 R /Prev 1400 0 R /Next 1402 0 R /A 434 0 R >> endobj 1402 0 obj << /Title (\376\377\0\123\0\164\0\157\0\162\0\145\0\144\0\40\0\120\0\162\0\157\0\143\0\145\0\144\0\165\0\162\0\145\0\163\0\40\0\57\0\40\0\106\0\165\0\156\0\143\0\164\0\151\0\157\0\156\0\163) /Parent 1341 0 R /Prev 1401 0 R /Next 1403 0 R /A 436 0 R >> endobj 1403 0 obj << /Title (\376\377\0\102\0\165\0\151\0\154\0\164\0\55\0\151\0\156\0\40\0\106\0\165\0\156\0\143\0\164\0\151\0\157\0\156\0\163\0\40\0\141\0\156\0\144\0\40\0\123\0\164\0\157\0\162\0\145\0\144\0\40\0\120\0\162\0\157\0\143\0\145\0\144\0\165\0\162\0\145\0\163) /Parent 1341 0 R /Prev 1402 0 R /Next 1404 0 R /A 438 0 R >> endobj 1404 0 obj << /Title (\376\377\0\123\0\121\0\114\0\40\0\105\0\170\0\160\0\162\0\145\0\163\0\163\0\151\0\157\0\156) /Parent 1341 0 R /Prev 1403 0 R /A 440 0 R >> endobj 1405 0 obj << /Title (\376\377\0\101\0\160\0\160\0\145\0\156\0\144\0\151\0\170\0\240\0\101\0\56\0\240\0\102\0\165\0\151\0\154\0\144\0\151\0\156\0\147\0\40\0\110\0\123\0\121\0\114\0\104\0\102) /Parent 1187 0 R /First 1406 0 R /Last 1412 0 R /Prev 1341 0 R /Next 1413 0 R /Count -7 /A 442 0 R >> endobj 1406 0 obj << /Title (\376\377\0\120\0\165\0\162\0\160\0\157\0\163\0\145) /Parent 1405 0 R /Next 1407 0 R /A 444 0 R >> endobj 1407 0 obj << /Title (\376\377\0\102\0\165\0\151\0\154\0\144\0\151\0\156\0\147\0\40\0\167\0\151\0\164\0\150\0\40\0\101\0\156\0\164\0\54\0\40\0\146\0\162\0\157\0\155\0\40\0\164\0\150\0\145\0\40\0\101\0\160\0\141\0\143\0\150\0\145\0\40\0\112\0\141\0\153\0\141\0\162\0\164\0\141\0\40\0\120\0\162\0\157\0\152\0\145\0\143\0\164) /Parent 1405 0 R /First 1408 0 R /Last 1409 0 R /Prev 1406 0 R /Next 1410 0 R /Count -2 /A 446 0 R >> endobj 1408 0 obj << /Title (\376\377\0\117\0\142\0\164\0\141\0\151\0\156\0\151\0\156\0\147\0\40\0\101\0\156\0\164) /Parent 1407 0 R /Next 1409 0 R /A 448 0 R >> endobj 1409 0 obj << /Title (\376\377\0\102\0\165\0\151\0\154\0\144\0\151\0\156\0\147\0\40\0\110\0\163\0\161\0\154\0\144\0\142\0\40\0\167\0\151\0\164\0\150\0\40\0\101\0\156\0\164) /Parent 1407 0 R /Prev 1408 0 R /A 450 0 R >> endobj 1410 0 obj << /Title (\376\377\0\102\0\165\0\151\0\154\0\144\0\151\0\156\0\147\0\40\0\167\0\151\0\164\0\150\0\40\0\104\0\117\0\123\0\40\0\102\0\141\0\164\0\143\0\150\0\40\0\106\0\151\0\154\0\145\0\163) /Parent 1405 0 R /Prev 1407 0 R /Next 1411 0 R /A 452 0 R >> endobj 1411 0 obj << /Title (\376\377\0\110\0\163\0\161\0\154\0\144\0\142\0\40\0\103\0\157\0\144\0\145\0\123\0\167\0\151\0\164\0\143\0\150\0\145\0\162) /Parent 1405 0 R /Prev 1410 0 R /Next 1412 0 R /A 454 0 R >> endobj 1412 0 obj << /Title (\376\377\0\102\0\165\0\151\0\154\0\144\0\151\0\156\0\147\0\40\0\144\0\157\0\143\0\165\0\155\0\145\0\156\0\164\0\141\0\164\0\151\0\157\0\156) /Parent 1405 0 R /Prev 1411 0 R /A 456 0 R >> endobj 1413 0 obj << /Title (\376\377\0\101\0\160\0\160\0\145\0\156\0\144\0\151\0\170\0\240\0\102\0\56\0\240\0\106\0\151\0\162\0\163\0\164\0\40\0\112\0\104\0\102\0\103\0\40\0\103\0\154\0\151\0\145\0\156\0\164\0\40\0\105\0\170\0\141\0\155\0\160\0\154\0\145) /Parent 1187 0 R /Prev 1405 0 R /Next 1414 0 R /A 458 0 R >> endobj 1414 0 obj << /Title (\376\377\0\101\0\160\0\160\0\145\0\156\0\144\0\151\0\170\0\240\0\103\0\56\0\240\0\110\0\163\0\161\0\154\0\144\0\142\0\40\0\104\0\141\0\164\0\141\0\142\0\141\0\163\0\145\0\40\0\106\0\151\0\154\0\145\0\163\0\40\0\141\0\156\0\144\0\40\0\122\0\145\0\143\0\157\0\166\0\145\0\162\0\171) /Parent 1187 0 R /First 1416 0 R /Last 1424 0 R /Prev 1413 0 R /Next 1428 0 R /Count -9 /A 460 0 R >> endobj 1416 0 obj << /Title () /Parent 1414 0 R /Next 1417 0 R /A 1415 0 R >> endobj 1417 0 obj << /Title (\376\377\0\123\0\164\0\141\0\164\0\145\0\163) /Parent 1414 0 R /First 1419 0 R /Last 1423 0 R /Prev 1416 0 R /Next 1424 0 R /Count -3 /A 462 0 R >> endobj 1419 0 obj << /Title () /Parent 1417 0 R /Next 1421 0 R /A 1418 0 R >> endobj 1421 0 obj << /Title () /Parent 1417 0 R /Prev 1419 0 R /Next 1423 0 R /A 1420 0 R >> endobj 1423 0 obj << /Title () /Parent 1417 0 R /Prev 1421 0 R /A 1422 0 R >> endobj 1424 0 obj << /Title (\376\377\0\120\0\162\0\157\0\143\0\145\0\144\0\165\0\162\0\145\0\163) /Parent 1414 0 R /First 1425 0 R /Last 1427 0 R /Prev 1417 0 R /Count -3 /A 464 0 R >> endobj 1425 0 obj << /Title (\376\377\0\103\0\154\0\145\0\141\0\156\0\40\0\123\0\150\0\165\0\164\0\144\0\157\0\167\0\156) /Parent 1424 0 R /Next 1426 0 R /A 466 0 R >> endobj 1426 0 obj << /Title (\376\377\0\123\0\164\0\141\0\162\0\164\0\165\0\160) /Parent 1424 0 R /Prev 1425 0 R /Next 1427 0 R /A 468 0 R >> endobj 1427 0 obj << /Title (\376\377\0\122\0\145\0\160\0\141\0\151\0\162) /Parent 1424 0 R /Prev 1426 0 R /A 473 0 R >> endobj 1428 0 obj << /Title (\376\377\0\101\0\160\0\160\0\145\0\156\0\144\0\151\0\170\0\240\0\104\0\56\0\240\0\122\0\165\0\156\0\156\0\151\0\156\0\147\0\40\0\110\0\163\0\161\0\154\0\144\0\142\0\40\0\167\0\151\0\164\0\150\0\40\0\117\0\160\0\145\0\156\0\117\0\146\0\146\0\151\0\143\0\145\0\56\0\157\0\162\0\147\0\40\0\61\0\56\0\61\0\56\0\170) /Parent 1187 0 R /First 1429 0 R /Last 1431 0 R /Prev 1414 0 R /Next 1434 0 R /Count -5 /A 475 0 R >> endobj 1429 0 obj << /Title (\376\377\0\111\0\156\0\164\0\162\0\157\0\144\0\165\0\143\0\164\0\151\0\157\0\156) /Parent 1428 0 R /Next 1430 0 R /A 477 0 R >> endobj 1430 0 obj << /Title (\376\377\0\111\0\156\0\163\0\164\0\141\0\154\0\154\0\151\0\156\0\147) /Parent 1428 0 R /Prev 1429 0 R /Next 1431 0 R /A 479 0 R >> endobj 1431 0 obj << /Title (\376\377\0\123\0\145\0\164\0\164\0\151\0\156\0\147\0\40\0\165\0\160\0\40\0\117\0\160\0\145\0\156\0\117\0\146\0\146\0\151\0\143\0\145\0\56\0\157\0\162\0\147) /Parent 1428 0 R /First 1432 0 R /Last 1433 0 R /Prev 1430 0 R /Count -2 /A 481 0 R >> endobj 1432 0 obj << /Title (\376\377\0\117\0\156\0\40\0\127\0\151\0\156\0\144\0\157\0\167\0\163) /Parent 1431 0 R /Next 1433 0 R /A 483 0 R >> endobj 1433 0 obj << /Title (\376\377\0\117\0\156\0\40\0\114\0\151\0\156\0\165\0\170) /Parent 1431 0 R /Prev 1432 0 R /A 485 0 R >> endobj 1434 0 obj << /Title (\376\377\0\101\0\160\0\160\0\145\0\156\0\144\0\151\0\170\0\240\0\105\0\56\0\240\0\110\0\163\0\161\0\154\0\144\0\142\0\40\0\124\0\145\0\163\0\164\0\40\0\125\0\164\0\151\0\154\0\151\0\164\0\171) /Parent 1187 0 R /Prev 1428 0 R /Next 1435 0 R /A 487 0 R >> endobj 1435 0 obj << /Title (\376\377\0\101\0\160\0\160\0\145\0\156\0\144\0\151\0\170\0\240\0\106\0\56\0\240\0\104\0\141\0\164\0\141\0\142\0\141\0\163\0\145\0\40\0\115\0\141\0\156\0\141\0\147\0\145\0\162) /Parent 1187 0 R /First 1436 0 R /Last 1441 0 R /Prev 1434 0 R /Next 1442 0 R /Count -6 /A 489 0 R >> endobj 1436 0 obj << /Title (\376\377\0\102\0\162\0\151\0\145\0\146\0\40\0\111\0\156\0\164\0\162\0\157\0\144\0\165\0\143\0\164\0\151\0\157\0\156) /Parent 1435 0 R /Next 1437 0 R /A 491 0 R >> endobj 1437 0 obj << /Title (\376\377\0\101\0\165\0\164\0\157\0\40\0\164\0\162\0\145\0\145\0\55\0\165\0\160\0\144\0\141\0\164\0\145) /Parent 1435 0 R /Prev 1436 0 R /Next 1438 0 R /A 493 0 R >> endobj 1438 0 obj << /Title (\376\377\0\101\0\165\0\164\0\157\0\155\0\141\0\164\0\151\0\143\0\40\0\103\0\157\0\156\0\156\0\145\0\143\0\164\0\151\0\157\0\156) /Parent 1435 0 R /Prev 1437 0 R /Next 1439 0 R /A 495 0 R >> endobj 1439 0 obj << /Title (\376\377\0\122\0\103\0\40\0\106\0\151\0\154\0\145) /Parent 1435 0 R /Prev 1438 0 R /Next 1440 0 R /A 497 0 R >> endobj 1440 0 obj << /Title (\376\377\0\125\0\163\0\151\0\156\0\147\0\40\0\164\0\150\0\145\0\40\0\143\0\165\0\162\0\162\0\145\0\156\0\164\0\40\0\104\0\141\0\164\0\141\0\142\0\141\0\163\0\145\0\115\0\141\0\156\0\141\0\147\0\145\0\162\0\163\0\40\0\167\0\151\0\164\0\150\0\40\0\141\0\156\0\40\0\157\0\154\0\144\0\145\0\162\0\40\0\110\0\123\0\121\0\114\0\104\0\102\0\40\0\144\0\151\0\163\0\164\0\162\0\151\0\142\0\165\0\164\0\151\0\157\0\156\0\56) /Parent 1435 0 R /Prev 1439 0 R /Next 1441 0 R /A 499 0 R >> endobj 1441 0 obj << /Title (\376\377\0\104\0\141\0\164\0\141\0\142\0\141\0\163\0\145\0\115\0\141\0\156\0\141\0\147\0\145\0\162\0\123\0\167\0\151\0\156\0\147\0\40\0\141\0\163\0\40\0\141\0\156\0\40\0\101\0\160\0\160\0\154\0\145\0\164) /Parent 1435 0 R /Prev 1440 0 R /A 501 0 R >> endobj 1442 0 obj << /Title (\376\377\0\101\0\160\0\160\0\145\0\156\0\144\0\151\0\170\0\240\0\107\0\56\0\240\0\124\0\162\0\141\0\156\0\163\0\146\0\145\0\162\0\40\0\124\0\157\0\157\0\154) /Parent 1187 0 R /First 1443 0 R /Last 1443 0 R /Prev 1435 0 R /Count -1 /A 503 0 R >> endobj 1443 0 obj << /Title (\376\377\0\102\0\162\0\151\0\145\0\146\0\40\0\111\0\156\0\164\0\162\0\157\0\144\0\165\0\143\0\164\0\151\0\157\0\156) /Parent 1442 0 R /A 505 0 R >> endobj 1444 0 obj << /Type /Font /Subtype /Type1 /Name /F3 /BaseFont /Helvetica-Bold /Encoding /WinAnsiEncoding >> endobj 1445 0 obj << /Type /Font /Subtype /Type1 /Name /F5 /BaseFont /Times-Roman /Encoding /WinAnsiEncoding >> endobj 1446 0 obj << /Type /Font /Subtype /Type1 /Name /F6 /BaseFont /Times-Italic /Encoding /WinAnsiEncoding >> endobj 1447 0 obj << /Type /Font /Subtype /Type1 /Name /F1 /BaseFont /Helvetica /Encoding /WinAnsiEncoding >> endobj 1448 0 obj << /Type /Font /Subtype /Type1 /Name /F4 /BaseFont /Helvetica-BoldOblique /Encoding /WinAnsiEncoding >> endobj 1449 0 obj << /Type /Font /Subtype /Type1 /Name /F11 /BaseFont /Courier-Bold /Encoding /WinAnsiEncoding >> endobj 1450 0 obj << /Type /Font /Subtype /Type1 /Name /F9 /BaseFont /Courier /Encoding /WinAnsiEncoding >> endobj 1451 0 obj << /Type /Font /Subtype /Type1 /Name /F7 /BaseFont /Times-Bold /Encoding /WinAnsiEncoding >> endobj 1 0 obj << /Type /Pages /Count 156 /Kids [6 0 R 8 0 R 10 0 R 12 0 R 121 0 R 240 0 R 359 0 R 470 0 R 507 0 R 530 0 R 605 0 R 629 0 R 631 0 R 633 0 R 638 0 R 643 0 R 648 0 R 660 0 R 668 0 R 672 0 R 676 0 R 678 0 R 680 0 R 682 0 R 684 0 R 686 0 R 688 0 R 694 0 R 699 0 R 704 0 R 708 0 R 712 0 R 714 0 R 716 0 R 726 0 R 728 0 R 730 0 R 732 0 R 734 0 R 738 0 R 742 0 R 750 0 R 752 0 R 754 0 R 756 0 R 758 0 R 760 0 R 762 0 R 768 0 R 770 0 R 774 0 R 776 0 R 778 0 R 783 0 R 785 0 R 787 0 R 789 0 R 791 0 R 793 0 R 795 0 R 799 0 R 804 0 R 809 0 R 816 0 R 824 0 R 826 0 R 828 0 R 833 0 R 840 0 R 847 0 R 849 0 R 851 0 R 853 0 R 859 0 R 863 0 R 869 0 R 873 0 R 880 0 R 882 0 R 886 0 R 888 0 R 892 0 R 896 0 R 898 0 R 904 0 R 910 0 R 914 0 R 916 0 R 920 0 R 926 0 R 931 0 R 937 0 R 939 0 R 944 0 R 948 0 R 950 0 R 952 0 R 954 0 R 959 0 R 961 0 R 966 0 R 970 0 R 974 0 R 976 0 R 978 0 R 980 0 R 982 0 R 989 0 R 991 0 R 1005 0 R 1013 0 R 1017 0 R 1019 0 R 1024 0 R 1035 0 R 1045 0 R 1050 0 R 1057 0 R 1068 0 R 1072 0 R 1080 0 R 1085 0 R 1090 0 R 1094 0 R 1096 0 R 1102 0 R 1109 0 R 1113 0 R 1115 0 R 1117 0 R 1119 0 R 1121 0 R 1126 0 R 1128 0 R 1130 0 R 1136 0 R 1140 0 R 1142 0 R 1144 0 R 1146 0 R 1148 0 R 1150 0 R 1152 0 R 1154 0 R 1156 0 R 1158 0 R 1160 0 R 1162 0 R 1164 0 R 1166 0 R 1168 0 R 1170 0 R 1175 0 R 1182 0 R 1184 0 R 1186 0 R ] >> endobj 2 0 obj << /Type /Catalog /Pages 1 0 R /Outlines 1187 0 R /PageMode /UseOutlines >> endobj 3 0 obj << /Font << /F3 1444 0 R /F5 1445 0 R /F1 1447 0 R /F6 1446 0 R /F4 1448 0 R /F9 1450 0 R /F11 1449 0 R /F7 1451 0 R >> /ProcSet [ /PDF /ImageC /Text ] >> endobj 15 0 obj << /S /GoTo /D [605 0 R /XYZ 115.0 725.0 null] >> endobj 17 0 obj << /S /GoTo /D [605 0 R /XYZ 115.0 644.009 null] >> endobj 19 0 obj << /S /GoTo /D [629 0 R /XYZ 115.0 725.0 null] >> endobj 21 0 obj << /S /GoTo /D [629 0 R /XYZ 115.0 601.41 null] >> endobj 23 0 obj << /S /GoTo /D [629 0 R /XYZ 115.0 346.913 null] >> endobj 25 0 obj << /S /GoTo /D [631 0 R /XYZ 115.0 609.0 null] >> endobj 27 0 obj << /S /GoTo /D [631 0 R /XYZ 115.0 155.541 null] >> endobj 29 0 obj << /S /GoTo /D [633 0 R /XYZ 115.0 650.0 null] >> endobj 31 0 obj << /S /GoTo /D [633 0 R /XYZ 115.0 505.841 null] >> endobj 33 0 obj << /S /GoTo /D [633 0 R /XYZ 115.0 318.682 null] >> endobj 35 0 obj << /S /GoTo /D [638 0 R /XYZ 115.0 304.312 null] >> endobj 37 0 obj << /S /GoTo /D [643 0 R /XYZ 115.0 558.42 null] >> endobj 39 0 obj << /S /GoTo /D [643 0 R /XYZ 115.0 392.261 null] >> endobj 41 0 obj << /S /GoTo /D [643 0 R /XYZ 115.0 358.936 null] >> endobj 43 0 obj << /S /GoTo /D [643 0 R /XYZ 115.0 177.497 null] >> endobj 45 0 obj << /S /GoTo /D [648 0 R /XYZ 115.0 725.0 null] >> endobj 47 0 obj << /S /GoTo /D [648 0 R /XYZ 115.0 608.561 null] >> endobj 49 0 obj << /S /GoTo /D [648 0 R /XYZ 115.0 358.236 null] >> endobj 51 0 obj << /S /GoTo /D [660 0 R /XYZ 115.0 563.0 null] >> endobj 53 0 obj << /S /GoTo /D [660 0 R /XYZ 115.0 328.561 null] >> endobj 55 0 obj << /S /GoTo /D [668 0 R /XYZ 115.0 714.0 null] >> endobj 57 0 obj << /S /GoTo /D [672 0 R /XYZ 115.0 725.0 null] >> endobj 59 0 obj << /S /GoTo /D [672 0 R /XYZ 115.0 601.41 null] >> endobj 61 0 obj << /S /GoTo /D [672 0 R /XYZ 115.0 536.085 null] >> endobj 63 0 obj << /S /GoTo /D [672 0 R /XYZ 115.0 221.76 null] >> endobj 65 0 obj << /S /GoTo /D [672 0 R /XYZ 115.0 188.435 null] >> endobj 67 0 obj << /S /GoTo /D [676 0 R /XYZ 115.0 725.0 null] >> endobj 69 0 obj << /S /GoTo /D [676 0 R /XYZ 115.0 415.389 null] >> endobj 71 0 obj << /S /GoTo /D [676 0 R /XYZ 115.0 321.95 null] >> endobj 73 0 obj << /S /GoTo /D [676 0 R /XYZ 115.0 133.791 null] >> endobj 75 0 obj << /S /GoTo /D [678 0 R /XYZ 115.0 116.84 null] >> endobj 77 0 obj << /S /GoTo /D [680 0 R /XYZ 115.0 433.84 null] >> endobj 79 0 obj << /S /GoTo /D [680 0 R /XYZ 115.0 206.789 null] >> endobj 81 0 obj << /S /GoTo /D [682 0 R /XYZ 115.0 575.0 null] >> endobj 83 0 obj << /S /GoTo /D [682 0 R /XYZ 115.0 175.121 null] >> endobj 85 0 obj << /S /GoTo /D [684 0 R /XYZ 115.0 498.0 null] >> endobj 87 0 obj << /S /GoTo /D [684 0 R /XYZ 115.0 371.561 null] >> endobj 89 0 obj << /S /GoTo /D [684 0 R /XYZ 115.0 148.122 null] >> endobj 91 0 obj << /S /GoTo /D [686 0 R /XYZ 115.0 606.0 null] >> endobj 93 0 obj << /S /GoTo /D [686 0 R /XYZ 115.0 540.675 null] >> endobj 95 0 obj << /S /GoTo /D [686 0 R /XYZ 115.0 254.376 null] >> endobj 97 0 obj << /S /GoTo /D [688 0 R /XYZ 115.0 599.14 null] >> endobj 99 0 obj << /S /GoTo /D [688 0 R /XYZ 115.0 274.955 null] >> endobj 101 0 obj << /S /GoTo /D [694 0 R /XYZ 115.0 725.0 null] >> endobj 103 0 obj << /S /GoTo /D [694 0 R /XYZ 115.0 589.363 null] >> endobj 105 0 obj << /S /GoTo /D [694 0 R /XYZ 115.0 481.038 null] >> endobj 107 0 obj << /S /GoTo /D [704 0 R /XYZ 115.0 280.4 null] >> endobj 109 0 obj << /S /GoTo /D [708 0 R /XYZ 115.0 209.1 null] >> endobj 111 0 obj << /S /GoTo /D [716 0 R /XYZ 115.0 376.56 null] >> endobj 113 0 obj << /S /GoTo /D [726 0 R /XYZ 115.0 704.0 null] >> endobj 115 0 obj << /S /GoTo /D [726 0 R /XYZ 115.0 576.955 null] >> endobj 117 0 obj << /S /GoTo /D [726 0 R /XYZ 115.0 370.63 null] >> endobj 119 0 obj << /S /GoTo /D [726 0 R /XYZ 115.0 233.191 null] >> endobj 124 0 obj << /S /GoTo /D [734 0 R /XYZ 115.0 302.56 null] >> endobj 126 0 obj << /S /GoTo /D [742 0 R /XYZ 115.0 725.0 null] >> endobj 128 0 obj << /S /GoTo /D [742 0 R /XYZ 115.0 601.41 null] >> endobj 130 0 obj << /S /GoTo /D [742 0 R /XYZ 115.0 525.085 null] >> endobj 132 0 obj << /S /GoTo /D [750 0 R /XYZ 115.0 322.12 null] >> endobj 134 0 obj << /S /GoTo /D [752 0 R /XYZ 115.0 215.7 null] >> endobj 136 0 obj << /S /GoTo /D [754 0 R /XYZ 115.0 492.268 null] >> endobj 138 0 obj << /S /GoTo /D [756 0 R /XYZ 115.0 324.536 null] >> endobj 140 0 obj << /S /GoTo /D [756 0 R /XYZ 115.0 172.963 null] >> endobj 142 0 obj << /S /GoTo /D [762 0 R /XYZ 115.0 297.806 null] >> endobj 144 0 obj << /S /GoTo /D [770 0 R /XYZ 115.0 725.0 null] >> endobj 146 0 obj << /S /GoTo /D [770 0 R /XYZ 115.0 601.41 null] >> endobj 148 0 obj << /S /GoTo /D [770 0 R /XYZ 115.0 525.085 null] >> endobj 150 0 obj << /S /GoTo /D [770 0 R /XYZ 115.0 448.76 null] >> endobj 152 0 obj << /S /GoTo /D [770 0 R /XYZ 115.0 261.321 null] >> endobj 154 0 obj << /S /GoTo /D [774 0 R /XYZ 115.0 575.0 null] >> endobj 156 0 obj << /S /GoTo /D [774 0 R /XYZ 115.0 314.981 null] >> endobj 158 0 obj << /S /GoTo /D [774 0 R /XYZ 115.0 147.542 null] >> endobj 160 0 obj << /S /GoTo /D [776 0 R /XYZ 115.0 303.0 null] >> endobj 162 0 obj << /S /GoTo /D [778 0 R /XYZ 115.0 704.0 null] >> endobj 164 0 obj << /S /GoTo /D [778 0 R /XYZ 115.0 240.675 null] >> endobj 166 0 obj << /S /GoTo /D [783 0 R /XYZ 115.0 620.0 null] >> endobj 168 0 obj << /S /GoTo /D [783 0 R /XYZ 115.0 143.389 null] >> endobj 170 0 obj << /S /GoTo /D [785 0 R /XYZ 115.0 409.0 null] >> endobj 172 0 obj << /S /GoTo /D [787 0 R /XYZ 115.0 725.0 null] >> endobj 174 0 obj << /S /GoTo /D [787 0 R /XYZ 115.0 272.39 null] >> endobj 176 0 obj << /S /GoTo /D [787 0 R /XYZ 115.0 239.065 null] >> endobj 178 0 obj << /S /GoTo /D [789 0 R /XYZ 115.0 704.0 null] >> endobj 180 0 obj << /S /GoTo /D [789 0 R /XYZ 115.0 443.561 null] >> endobj 182 0 obj << /S /GoTo /D [789 0 R /XYZ 115.0 320.122 null] >> endobj 184 0 obj << /S /GoTo /D [793 0 R /XYZ 115.0 537.56 null] >> endobj 186 0 obj << /S /GoTo /D [793 0 R /XYZ 115.0 310.401 null] >> endobj 188 0 obj << /S /GoTo /D [795 0 R /XYZ 115.0 511.0 null] >> endobj 190 0 obj << /S /GoTo /D [795 0 R /XYZ 115.0 257.503 null] >> endobj 192 0 obj << /S /GoTo /D [799 0 R /XYZ 115.0 725.0 null] >> endobj 194 0 obj << /S /GoTo /D [799 0 R /XYZ 115.0 573.562 null] >> endobj 196 0 obj << /S /GoTo /D [799 0 R /XYZ 115.0 273.065 null] >> endobj 198 0 obj << /S /GoTo /D [799 0 R /XYZ 115.0 218.74 null] >> endobj 200 0 obj << /S /GoTo /D [809 0 R /XYZ 115.0 606.0 null] >> endobj 202 0 obj << /S /GoTo /D [809 0 R /XYZ 115.0 300.815 null] >> endobj 204 0 obj << /S /GoTo /D [809 0 R /XYZ 115.0 149.49 null] >> endobj 206 0 obj << /S /GoTo /D [816 0 R /XYZ 115.0 714.0 null] >> endobj 208 0 obj << /S /GoTo /D [816 0 R /XYZ 115.0 358.095 null] >> endobj 210 0 obj << /S /GoTo /D [816 0 R /XYZ 115.0 296.656 null] >> endobj 212 0 obj << /S /GoTo /D [824 0 R /XYZ 115.0 725.0 null] >> endobj 214 0 obj << /S /GoTo /D [824 0 R /XYZ 115.0 605.562 null] >> endobj 216 0 obj << /S /GoTo /D [826 0 R /XYZ 115.0 616.0 null] >> endobj 218 0 obj << /S /GoTo /D [826 0 R /XYZ 115.0 358.561 null] >> endobj 220 0 obj << /S /GoTo /D [828 0 R /XYZ 115.0 533.0 null] >> endobj 222 0 obj << /S /GoTo /D [840 0 R /XYZ 115.0 639.0 null] >> endobj 224 0 obj << /S /GoTo /D [840 0 R /XYZ 115.0 436.561 null] >> endobj 226 0 obj << /S /GoTo /D [847 0 R /XYZ 115.0 483.0 null] >> endobj 228 0 obj << /S /GoTo /D [847 0 R /XYZ 115.0 266.121 null] >> endobj 230 0 obj << /S /GoTo /D [859 0 R /XYZ 115.0 704.0 null] >> endobj 232 0 obj << /S /GoTo /D [859 0 R /XYZ 115.0 327.375 null] >> endobj 234 0 obj << /S /GoTo /D [863 0 R /XYZ 115.0 695.14 null] >> endobj 236 0 obj << /S /GoTo /D [863 0 R /XYZ 115.0 191.817 null] >> endobj 238 0 obj << /S /GoTo /D [869 0 R /XYZ 115.0 583.0 null] >> endobj 243 0 obj << /S /GoTo /D [873 0 R /XYZ 115.0 400.0 null] >> endobj 245 0 obj << /S /GoTo /D [882 0 R /XYZ 115.0 301.866 null] >> endobj 247 0 obj << /S /GoTo /D [892 0 R /XYZ 115.0 321.7 null] >> endobj 249 0 obj << /S /GoTo /D [896 0 R /XYZ 115.0 261.696 null] >> endobj 251 0 obj << /S /GoTo /D [898 0 R /XYZ 115.0 588.28 null] >> endobj 253 0 obj << /S /GoTo /D [898 0 R /XYZ 115.0 151.477 null] >> endobj 255 0 obj << /S /GoTo /D [904 0 R /XYZ 115.0 609.28 null] >> endobj 257 0 obj << /S /GoTo /D [904 0 R /XYZ 115.0 547.841 null] >> endobj 259 0 obj << /S /GoTo /D [904 0 R /XYZ 115.0 453.402 null] >> endobj 261 0 obj << /S /GoTo /D [904 0 R /XYZ 115.0 254.943 null] >> endobj 263 0 obj << /S /GoTo /D [910 0 R /XYZ 115.0 420.38 null] >> endobj 265 0 obj << /S /GoTo /D [916 0 R /XYZ 115.0 703.0 null] >> endobj 267 0 obj << /S /GoTo /D [916 0 R /XYZ 115.0 366.649 null] >> endobj 269 0 obj << /S /GoTo /D [916 0 R /XYZ 115.0 125.21 null] >> endobj 271 0 obj << /S /GoTo /D [920 0 R /XYZ 115.0 343.056 null] >> endobj 273 0 obj << /S /GoTo /D [931 0 R /XYZ 115.0 607.0 null] >> endobj 275 0 obj << /S /GoTo /D [931 0 R /XYZ 115.0 480.561 null] >> endobj 277 0 obj << /S /GoTo /D [931 0 R /XYZ 115.0 296.822 null] >> endobj 279 0 obj << /S /GoTo /D [931 0 R /XYZ 115.0 163.663 null] >> endobj 281 0 obj << /S /GoTo /D [939 0 R /XYZ 115.0 725.0 null] >> endobj 283 0 obj << /S /GoTo /D [939 0 R /XYZ 115.0 475.75 null] >> endobj 285 0 obj << /S /GoTo /D [944 0 R /XYZ 115.0 725.0 null] >> endobj 287 0 obj << /S /GoTo /D [948 0 R /XYZ 115.0 704.0 null] >> endobj 289 0 obj << /S /GoTo /D [948 0 R /XYZ 115.0 161.389 null] >> endobj 291 0 obj << /S /GoTo /D [954 0 R /XYZ 115.0 725.0 null] >> endobj 293 0 obj << /S /GoTo /D [954 0 R /XYZ 115.0 450.063 null] >> endobj 295 0 obj << /S /GoTo /D [954 0 R /XYZ 115.0 334.624 null] >> endobj 297 0 obj << /S /GoTo /D [959 0 R /XYZ 115.0 714.0 null] >> endobj 299 0 obj << /S /GoTo /D [959 0 R /XYZ 115.0 209.723 null] >> endobj 301 0 obj << /S /GoTo /D [966 0 R /XYZ 115.0 673.0 null] >> endobj 303 0 obj << /S /GoTo /D [966 0 R /XYZ 115.0 119.955 null] >> endobj 305 0 obj << /S /GoTo /D [970 0 R /XYZ 115.0 286.866 null] >> endobj 307 0 obj << /S /GoTo /D [974 0 R /XYZ 115.0 470.108 null] >> endobj 309 0 obj << /S /GoTo /D [978 0 R /XYZ 115.0 497.528 null] >> endobj 311 0 obj << /S /GoTo /D [980 0 R /XYZ 115.0 725.0 null] >> endobj 313 0 obj << /S /GoTo /D [980 0 R /XYZ 115.0 543.165 null] >> endobj 315 0 obj << /S /GoTo /D [980 0 R /XYZ 115.0 404.84 null] >> endobj 317 0 obj << /S /GoTo /D [980 0 R /XYZ 115.0 371.515 null] >> endobj 319 0 obj << /S /GoTo /D [980 0 R /XYZ 115.0 280.216 null] >> endobj 321 0 obj << /S /GoTo /D [980 0 R /XYZ 115.0 199.917 null] >> endobj 323 0 obj << /S /GoTo /D [982 0 R /XYZ 115.0 725.0 null] >> endobj 325 0 obj << /S /GoTo /D [989 0 R /XYZ 115.0 137.82 null] >> endobj 327 0 obj << /S /GoTo /D [991 0 R /XYZ 115.0 577.14 null] >> endobj 329 0 obj << /S /GoTo /D [991 0 R /XYZ 115.0 453.841 null] >> endobj 331 0 obj << /S /GoTo /D [991 0 R /XYZ 115.0 331.542 null] >> endobj 333 0 obj << /S /GoTo /D [991 0 R /XYZ 115.0 230.243 null] >> endobj 335 0 obj << /S /GoTo /D [991 0 R /XYZ 115.0 117.944 null] >> endobj 337 0 obj << /S /GoTo /D [1005 0 R /XYZ 115.0 555.146 null] >> endobj 339 0 obj << /S /GoTo /D [1005 0 R /XYZ 115.0 399.847 null] >> endobj 341 0 obj << /S /GoTo /D [1005 0 R /XYZ 115.0 319.548 null] >> endobj 343 0 obj << /S /GoTo /D [1013 0 R /XYZ 115.0 662.0 null] >> endobj 345 0 obj << /S /GoTo /D [1013 0 R /XYZ 115.0 445.981 null] >> endobj 347 0 obj << /S /GoTo /D [1019 0 R /XYZ 115.0 587.0 null] >> endobj 349 0 obj << /S /GoTo /D [1024 0 R /XYZ 115.0 553.0 null] >> endobj 351 0 obj << /S /GoTo /D [1024 0 R /XYZ 115.0 419.701 null] >> endobj 353 0 obj << /S /GoTo /D [1035 0 R /XYZ 115.0 377.68 null] >> endobj 355 0 obj << /S /GoTo /D [1035 0 R /XYZ 115.0 276.381 null] >> endobj 357 0 obj << /S /GoTo /D [1035 0 R /XYZ 115.0 153.082 null] >> endobj 362 0 obj << /S /GoTo /D [1045 0 R /XYZ 115.0 672.0 null] >> endobj 364 0 obj << /S /GoTo /D [1045 0 R /XYZ 115.0 591.701 null] >> endobj 366 0 obj << /S /GoTo /D [1045 0 R /XYZ 115.0 478.402 null] >> endobj 368 0 obj << /S /GoTo /D [1045 0 R /XYZ 115.0 355.103 null] >> endobj 370 0 obj << /S /GoTo /D [1045 0 R /XYZ 115.0 178.804 null] >> endobj 372 0 obj << /S /GoTo /D [1050 0 R /XYZ 115.0 704.0 null] >> endobj 374 0 obj << /S /GoTo /D [1050 0 R /XYZ 115.0 581.701 null] >> endobj 376 0 obj << /S /GoTo /D [1050 0 R /XYZ 115.0 458.402 null] >> endobj 378 0 obj << /S /GoTo /D [1050 0 R /XYZ 115.0 335.103 null] >> endobj 380 0 obj << /S /GoTo /D [1057 0 R /XYZ 115.0 651.0 null] >> endobj 382 0 obj << /S /GoTo /D [1057 0 R /XYZ 115.0 560.841 null] >> endobj 384 0 obj << /S /GoTo /D [1057 0 R /XYZ 115.0 345.822 null] >> endobj 386 0 obj << /S /GoTo /D [1057 0 R /XYZ 115.0 201.523 null] >> endobj 388 0 obj << /S /GoTo /D [1068 0 R /XYZ 115.0 725.0 null] >> endobj 390 0 obj << /S /GoTo /D [1068 0 R /XYZ 115.0 611.701 null] >> endobj 392 0 obj << /S /GoTo /D [1072 0 R /XYZ 115.0 439.28 null] >> endobj 394 0 obj << /S /GoTo /D [1072 0 R /XYZ 115.0 314.981 null] >> endobj 396 0 obj << /S /GoTo /D [1072 0 R /XYZ 115.0 191.682 null] >> endobj 398 0 obj << /S /GoTo /D [1080 0 R /XYZ 115.0 725.0 null] >> endobj 400 0 obj << /S /GoTo /D [1080 0 R /XYZ 115.0 578.701 null] >> endobj 402 0 obj << /S /GoTo /D [1080 0 R /XYZ 115.0 454.402 null] >> endobj 404 0 obj << /S /GoTo /D [1080 0 R /XYZ 115.0 331.103 null] >> endobj 406 0 obj << /S /GoTo /D [1080 0 R /XYZ 115.0 250.804 null] >> endobj 408 0 obj << /S /GoTo /D [1080 0 R /XYZ 115.0 159.505 null] >> endobj 410 0 obj << /S /GoTo /D [1085 0 R /XYZ 115.0 704.0 null] >> endobj 412 0 obj << /S /GoTo /D [1085 0 R /XYZ 115.0 623.701 null] >> endobj 414 0 obj << /S /GoTo /D [1085 0 R /XYZ 115.0 411.268 null] >> endobj 416 0 obj << /S /GoTo /D [1085 0 R /XYZ 115.0 265.969 null] >> endobj 418 0 obj << /S /GoTo /D [1085 0 R /XYZ 115.0 174.67 null] >> endobj 420 0 obj << /S /GoTo /D [1090 0 R /XYZ 115.0 725.0 null] >> endobj 422 0 obj << /S /GoTo /D [1090 0 R /XYZ 115.0 654.701 null] >> endobj 424 0 obj << /S /GoTo /D [1094 0 R /XYZ 115.0 547.0 null] >> endobj 426 0 obj << /S /GoTo /D [1094 0 R /XYZ 115.0 284.701 null] >> endobj 428 0 obj << /S /GoTo /D [1096 0 R /XYZ 115.0 456.0 null] >> endobj 430 0 obj << /S /GoTo /D [1096 0 R /XYZ 115.0 354.701 null] >> endobj 432 0 obj << /S /GoTo /D [1102 0 R /XYZ 115.0 356.0 null] >> endobj 434 0 obj << /S /GoTo /D [1113 0 R /XYZ 115.0 725.0 null] >> endobj 436 0 obj << /S /GoTo /D [1113 0 R /XYZ 115.0 637.675 null] >> endobj 438 0 obj << /S /GoTo /D [1113 0 R /XYZ 115.0 332.77 null] >> endobj 440 0 obj << /S /GoTo /D [1121 0 R /XYZ 115.0 364.0 null] >> endobj 442 0 obj << /S /GoTo /D [1130 0 R /XYZ 115.0 725.0 null] >> endobj 444 0 obj << /S /GoTo /D [1130 0 R /XYZ 115.0 665.009 null] >> endobj 446 0 obj << /S /GoTo /D [1130 0 R /XYZ 115.0 599.684 null] >> endobj 448 0 obj << /S /GoTo /D [1130 0 R /XYZ 115.0 511.034 null] >> endobj 450 0 obj << /S /GoTo /D [1130 0 R /XYZ 115.0 387.595 null] >> endobj 452 0 obj << /S /GoTo /D [1140 0 R /XYZ 115.0 725.0 null] >> endobj 454 0 obj << /S /GoTo /D [1140 0 R /XYZ 115.0 583.675 null] >> endobj 456 0 obj << /S /GoTo /D [1142 0 R /XYZ 115.0 400.348 null] >> endobj 458 0 obj << /S /GoTo /D [1146 0 R /XYZ 115.0 725.0 null] >> endobj 460 0 obj << /S /GoTo /D [1154 0 R /XYZ 115.0 725.0 null] >> endobj 462 0 obj << /S /GoTo /D [1154 0 R /XYZ 115.0 296.846 null] >> endobj 464 0 obj << /S /GoTo /D [1156 0 R /XYZ 115.0 334.656 null] >> endobj 466 0 obj << /S /GoTo /D [1156 0 R /XYZ 115.0 280.331 null] >> endobj 468 0 obj << /S /GoTo /D [1158 0 R /XYZ 115.0 579.0 null] >> endobj 473 0 obj << /S /GoTo /D [1158 0 R /XYZ 115.0 264.389 null] >> endobj 475 0 obj << /S /GoTo /D [1162 0 R /XYZ 115.0 725.0 null] >> endobj 477 0 obj << /S /GoTo /D [1162 0 R /XYZ 115.0 583.018 null] >> endobj 479 0 obj << /S /GoTo /D [1162 0 R /XYZ 115.0 431.693 null] >> endobj 481 0 obj << /S /GoTo /D [1162 0 R /XYZ 115.0 366.368 null] >> endobj 483 0 obj << /S /GoTo /D [1162 0 R /XYZ 115.0 227.043 null] >> endobj 485 0 obj << /S /GoTo /D [1162 0 R /XYZ 115.0 111.604 null] >> endobj 487 0 obj << /S /GoTo /D [1166 0 R /XYZ 115.0 725.0 null] >> endobj 489 0 obj << /S /GoTo /D [1170 0 R /XYZ 115.0 725.0 null] >> endobj 491 0 obj << /S /GoTo /D [1170 0 R /XYZ 115.0 654.009 null] >> endobj 493 0 obj << /S /GoTo /D [1170 0 R /XYZ 115.0 239.55 null] >> endobj 495 0 obj << /S /GoTo /D [1175 0 R /XYZ 115.0 725.0 null] >> endobj 497 0 obj << /S /GoTo /D [1175 0 R /XYZ 115.0 496.821 null] >> endobj 499 0 obj << /S /GoTo /D [1175 0 R /XYZ 115.0 215.642 null] >> endobj 501 0 obj << /S /GoTo /D [1182 0 R /XYZ 115.0 476.56 null] >> endobj 503 0 obj << /S /GoTo /D [1186 0 R /XYZ 115.0 725.0 null] >> endobj 505 0 obj << /S /GoTo /D [1186 0 R /XYZ 115.0 665.009 null] >> endobj 510 0 obj << /S /GoTo /D [605 0 R /XYZ 115.0 451.684 null] >> endobj 512 0 obj << /S /GoTo /D [742 0 R /XYZ 115.0 362.76 null] >> endobj 514 0 obj << /S /GoTo /D [750 0 R /XYZ 115.0 168.961 null] >> endobj 516 0 obj << /S /GoTo /D [754 0 R /XYZ 115.0 715.0 null] >> endobj 518 0 obj << /S /GoTo /D [754 0 R /XYZ 115.0 420.829 null] >> endobj 520 0 obj << /S /GoTo /D [756 0 R /XYZ 115.0 694.0 null] >> endobj 522 0 obj << /S /GoTo /D [756 0 R /XYZ 115.0 541.518 null] >> endobj 524 0 obj << /S /GoTo /D [758 0 R /XYZ 115.0 610.28 null] >> endobj 526 0 obj << /S /GoTo /D [762 0 R /XYZ 115.0 233.481 null] >> endobj 528 0 obj << /S /GoTo /D [1102 0 R /XYZ 115.0 312.675 null] >> endobj 533 0 obj << /S /GoTo /D [638 0 R /XYZ 115.0 704.0 null] >> endobj 535 0 obj << /S /GoTo /D [676 0 R /XYZ 115.0 609.561 null] >> endobj 537 0 obj << /S /GoTo /D [680 0 R /XYZ 115.0 351.401 null] >> endobj 539 0 obj << /S /GoTo /D [686 0 R /XYZ 115.0 138.937 null] >> endobj 541 0 obj << /S /GoTo /D [732 0 R /XYZ 115.0 468.4 null] >> endobj 543 0 obj << /S /GoTo /D [732 0 R /XYZ 115.0 288.514 null] >> endobj 545 0 obj << /S /GoTo /D [804 0 R /XYZ 115.0 543.0 null] >> endobj 547 0 obj << /S /GoTo /D [804 0 R /XYZ 115.0 364.108 null] >> endobj 549 0 obj << /S /GoTo /D [804 0 R /XYZ 115.0 143.216 null] >> endobj 551 0 obj << /S /GoTo /D [809 0 R /XYZ 115.0 523.561 null] >> endobj 553 0 obj << /S /GoTo /D [816 0 R /XYZ 115.0 589.561 null] >> endobj 555 0 obj << /S /GoTo /D [847 0 R /XYZ 115.0 147.796 null] >> endobj 557 0 obj << /S /GoTo /D [896 0 R /XYZ 115.0 705.0 null] >> endobj 559 0 obj << /S /GoTo /D [898 0 R /XYZ 115.0 386.841 null] >> endobj 561 0 obj << /S /GoTo /D [898 0 R /XYZ 115.0 275.229 null] >> endobj 563 0 obj << /S /GoTo /D [916 0 R /XYZ 115.0 490.401 null] >> endobj 565 0 obj << /S /GoTo /D [920 0 R /XYZ 115.0 672.0 null] >> endobj 567 0 obj << /S /GoTo /D [920 0 R /XYZ 115.0 519.668 null] >> endobj 569 0 obj << /S /GoTo /D [944 0 R /XYZ 115.0 374.987 null] >> endobj 571 0 obj << /S /GoTo /D [950 0 R /XYZ 115.0 381.146 null] >> endobj 573 0 obj << /S /GoTo /D [954 0 R /XYZ 115.0 553.955 null] >> endobj 575 0 obj << /S /GoTo /D [954 0 R /XYZ 115.0 263.185 null] >> endobj 577 0 obj << /S /GoTo /D [959 0 R /XYZ 115.0 541.675 null] >> endobj 579 0 obj << /S /GoTo /D [961 0 R /XYZ 115.0 629.0 null] >> endobj 581 0 obj << /S /GoTo /D [970 0 R /XYZ 115.0 161.427 null] >> endobj 583 0 obj << /S /GoTo /D [974 0 R /XYZ 115.0 574.0 null] >> endobj 585 0 obj << /S /GoTo /D [976 0 R /XYZ 115.0 596.0 null] >> endobj 587 0 obj << /S /GoTo /D [976 0 R /XYZ 115.0 168.108 null] >> endobj 589 0 obj << /S /GoTo /D [978 0 R /XYZ 115.0 633.42 null] >> endobj 591 0 obj << /S /GoTo /D [1136 0 R /XYZ 115.0 313.28 null] >> endobj 593 0 obj << /S /GoTo /D [1140 0 R /XYZ 115.0 422.35 null] >> endobj 595 0 obj << /S /GoTo /D [1140 0 R /XYZ 115.0 151.698 null] >> endobj 597 0 obj << /S /GoTo /D [1142 0 R /XYZ 115.0 683.0 null] >> endobj 599 0 obj << /S /GoTo /D [1142 0 R /XYZ 115.0 251.163 null] >> endobj 601 0 obj << /S /GoTo /D [1144 0 R /XYZ 115.0 715.0 null] >> endobj 603 0 obj << /S /GoTo /D [1146 0 R /XYZ 115.0 645.009 null] >> endobj 822 0 obj << /S /GoTo /D [809 0 R /XYZ 115.0 368.949 null] >> endobj 986 0 obj << /S /GoTo /D [1013 0 R /XYZ 115.0 271.79 null] >> endobj 1187 0 obj << /First 1189 0 R /Last 1442 0 R >> endobj 1188 0 obj << /S /GoTo /D [10 0 R /XYZ 115.0 725.0 null] >> endobj 1190 0 obj << /S /GoTo /D [12 0 R /XYZ 115.0 715.0 null] >> endobj 1202 0 obj << /S /GoTo /D [633 0 R /XYZ 115.0 160.243 null] >> endobj 1204 0 obj << /S /GoTo /D [638 0 R /XYZ 115.0 439.508 null] >> endobj 1415 0 obj << /S /GoTo /D [1154 0 R /XYZ 115.0 616.018 null] >> endobj 1418 0 obj << /S /GoTo /D [1154 0 R /XYZ 115.0 263.521 null] >> endobj 1420 0 obj << /S /GoTo /D [1154 0 R /XYZ 115.0 84.349 null] >> endobj 1422 0 obj << /S /GoTo /D [1156 0 R /XYZ 115.0 545.828 null] >> endobj xref 0 1452 0000000000 65535 f 0000558820 00000 n 0000560163 00000 n 0000560257 00000 n 0000000015 00000 n 0000000071 00000 n 0000000424 00000 n 0000000530 00000 n 0000001108 00000 n 0000001214 00000 n 0000001375 00000 n 0000001482 00000 n 0000003778 00000 n 0000003901 00000 n 0000004302 00000 n 0000560430 00000 n 0000004438 00000 n 0000560496 00000 n 0000004574 00000 n 0000560564 00000 n 0000004710 00000 n 0000560630 00000 n 0000004846 00000 n 0000560697 00000 n 0000004982 00000 n 0000560765 00000 n 0000005118 00000 n 0000560831 00000 n 0000005254 00000 n 0000560899 00000 n 0000005390 00000 n 0000560965 00000 n 0000005526 00000 n 0000561033 00000 n 0000005662 00000 n 0000561101 00000 n 0000005798 00000 n 0000561169 00000 n 0000005934 00000 n 0000561236 00000 n 0000006070 00000 n 0000561304 00000 n 0000006206 00000 n 0000561372 00000 n 0000006342 00000 n 0000561440 00000 n 0000006478 00000 n 0000561506 00000 n 0000006614 00000 n 0000561574 00000 n 0000006750 00000 n 0000561642 00000 n 0000006885 00000 n 0000561708 00000 n 0000007021 00000 n 0000561776 00000 n 0000007157 00000 n 0000561842 00000 n 0000007293 00000 n 0000561908 00000 n 0000007429 00000 n 0000561975 00000 n 0000007565 00000 n 0000562043 00000 n 0000007700 00000 n 0000562110 00000 n 0000007836 00000 n 0000562178 00000 n 0000007971 00000 n 0000562244 00000 n 0000008107 00000 n 0000562312 00000 n 0000008243 00000 n 0000562379 00000 n 0000008379 00000 n 0000562447 00000 n 0000008515 00000 n 0000562514 00000 n 0000008651 00000 n 0000562581 00000 n 0000008787 00000 n 0000562649 00000 n 0000008923 00000 n 0000562715 00000 n 0000009058 00000 n 0000562783 00000 n 0000009194 00000 n 0000562849 00000 n 0000009330 00000 n 0000562917 00000 n 0000009466 00000 n 0000562985 00000 n 0000009602 00000 n 0000563051 00000 n 0000009737 00000 n 0000563119 00000 n 0000009873 00000 n 0000563187 00000 n 0000010009 00000 n 0000563254 00000 n 0000010145 00000 n 0000563322 00000 n 0000010283 00000 n 0000563389 00000 n 0000010421 00000 n 0000563458 00000 n 0000010558 00000 n 0000563527 00000 n 0000010696 00000 n 0000563594 00000 n 0000010834 00000 n 0000563661 00000 n 0000010972 00000 n 0000563729 00000 n 0000011110 00000 n 0000563796 00000 n 0000011247 00000 n 0000563865 00000 n 0000011383 00000 n 0000563933 00000 n 0000011519 00000 n 0000014031 00000 n 0000014157 00000 n 0000014642 00000 n 0000564002 00000 n 0000014776 00000 n 0000564070 00000 n 0000014910 00000 n 0000564137 00000 n 0000015044 00000 n 0000564205 00000 n 0000015177 00000 n 0000564274 00000 n 0000015310 00000 n 0000564342 00000 n 0000015443 00000 n 0000564409 00000 n 0000015577 00000 n 0000564478 00000 n 0000015711 00000 n 0000564547 00000 n 0000015845 00000 n 0000564616 00000 n 0000015979 00000 n 0000564685 00000 n 0000016113 00000 n 0000564752 00000 n 0000016247 00000 n 0000564820 00000 n 0000016381 00000 n 0000564889 00000 n 0000016515 00000 n 0000564957 00000 n 0000016649 00000 n 0000565026 00000 n 0000016783 00000 n 0000565093 00000 n 0000016917 00000 n 0000565162 00000 n 0000017051 00000 n 0000565231 00000 n 0000017185 00000 n 0000565298 00000 n 0000017318 00000 n 0000565365 00000 n 0000017452 00000 n 0000565434 00000 n 0000017586 00000 n 0000565501 00000 n 0000017720 00000 n 0000565570 00000 n 0000017854 00000 n 0000565637 00000 n 0000017988 00000 n 0000565704 00000 n 0000018122 00000 n 0000565772 00000 n 0000018255 00000 n 0000565841 00000 n 0000018389 00000 n 0000565908 00000 n 0000018523 00000 n 0000565977 00000 n 0000018657 00000 n 0000566046 00000 n 0000018791 00000 n 0000566114 00000 n 0000018925 00000 n 0000566183 00000 n 0000019059 00000 n 0000566250 00000 n 0000019193 00000 n 0000566319 00000 n 0000019327 00000 n 0000566386 00000 n 0000019461 00000 n 0000566455 00000 n 0000019594 00000 n 0000566524 00000 n 0000019728 00000 n 0000566592 00000 n 0000019862 00000 n 0000566659 00000 n 0000019996 00000 n 0000566728 00000 n 0000020130 00000 n 0000566796 00000 n 0000020264 00000 n 0000566863 00000 n 0000020398 00000 n 0000566932 00000 n 0000020532 00000 n 0000567001 00000 n 0000020666 00000 n 0000567068 00000 n 0000020800 00000 n 0000567137 00000 n 0000020934 00000 n 0000567204 00000 n 0000021068 00000 n 0000567273 00000 n 0000021202 00000 n 0000567340 00000 n 0000021336 00000 n 0000567407 00000 n 0000021470 00000 n 0000567476 00000 n 0000021604 00000 n 0000567543 00000 n 0000021738 00000 n 0000567612 00000 n 0000021871 00000 n 0000567679 00000 n 0000022005 00000 n 0000567748 00000 n 0000022139 00000 n 0000567816 00000 n 0000022272 00000 n 0000567885 00000 n 0000022404 00000 n 0000024704 00000 n 0000024830 00000 n 0000025315 00000 n 0000567952 00000 n 0000025448 00000 n 0000568019 00000 n 0000025582 00000 n 0000568088 00000 n 0000025716 00000 n 0000568155 00000 n 0000025850 00000 n 0000568224 00000 n 0000025984 00000 n 0000568292 00000 n 0000026118 00000 n 0000568361 00000 n 0000026252 00000 n 0000568429 00000 n 0000026385 00000 n 0000568498 00000 n 0000026519 00000 n 0000568567 00000 n 0000026653 00000 n 0000568636 00000 n 0000026787 00000 n 0000568704 00000 n 0000026921 00000 n 0000568771 00000 n 0000027055 00000 n 0000568840 00000 n 0000027189 00000 n 0000568908 00000 n 0000027323 00000 n 0000568977 00000 n 0000027457 00000 n 0000569044 00000 n 0000027591 00000 n 0000569113 00000 n 0000027724 00000 n 0000569182 00000 n 0000027858 00000 n 0000569251 00000 n 0000027992 00000 n 0000569318 00000 n 0000028126 00000 n 0000569386 00000 n 0000028260 00000 n 0000569453 00000 n 0000028394 00000 n 0000569520 00000 n 0000028528 00000 n 0000569589 00000 n 0000028662 00000 n 0000569656 00000 n 0000028796 00000 n 0000569725 00000 n 0000028930 00000 n 0000569794 00000 n 0000029064 00000 n 0000569861 00000 n 0000029198 00000 n 0000569930 00000 n 0000029332 00000 n 0000569997 00000 n 0000029466 00000 n 0000570066 00000 n 0000029600 00000 n 0000570135 00000 n 0000029733 00000 n 0000570204 00000 n 0000029867 00000 n 0000570273 00000 n 0000030001 00000 n 0000570340 00000 n 0000030135 00000 n 0000570409 00000 n 0000030269 00000 n 0000570477 00000 n 0000030403 00000 n 0000570546 00000 n 0000030537 00000 n 0000570615 00000 n 0000030671 00000 n 0000570684 00000 n 0000030805 00000 n 0000570751 00000 n 0000030939 00000 n 0000570819 00000 n 0000031073 00000 n 0000570887 00000 n 0000031207 00000 n 0000570956 00000 n 0000031341 00000 n 0000571025 00000 n 0000031475 00000 n 0000571094 00000 n 0000031609 00000 n 0000571163 00000 n 0000031743 00000 n 0000571233 00000 n 0000031876 00000 n 0000571303 00000 n 0000032010 00000 n 0000571373 00000 n 0000032144 00000 n 0000571441 00000 n 0000032278 00000 n 0000571511 00000 n 0000032412 00000 n 0000571579 00000 n 0000032546 00000 n 0000571647 00000 n 0000032680 00000 n 0000571717 00000 n 0000032814 00000 n 0000571786 00000 n 0000032947 00000 n 0000571856 00000 n 0000033079 00000 n 0000035136 00000 n 0000035262 00000 n 0000035715 00000 n 0000571926 00000 n 0000035849 00000 n 0000571994 00000 n 0000035983 00000 n 0000572064 00000 n 0000036117 00000 n 0000572134 00000 n 0000036251 00000 n 0000572204 00000 n 0000036384 00000 n 0000572274 00000 n 0000036518 00000 n 0000572342 00000 n 0000036652 00000 n 0000572412 00000 n 0000036786 00000 n 0000572482 00000 n 0000036920 00000 n 0000572552 00000 n 0000037053 00000 n 0000572620 00000 n 0000037187 00000 n 0000572690 00000 n 0000037321 00000 n 0000572760 00000 n 0000037455 00000 n 0000572830 00000 n 0000037588 00000 n 0000572898 00000 n 0000037722 00000 n 0000572968 00000 n 0000037856 00000 n 0000573037 00000 n 0000037990 00000 n 0000573107 00000 n 0000038124 00000 n 0000573177 00000 n 0000038258 00000 n 0000573245 00000 n 0000038391 00000 n 0000573315 00000 n 0000038525 00000 n 0000573385 00000 n 0000038658 00000 n 0000573455 00000 n 0000038792 00000 n 0000573525 00000 n 0000038925 00000 n 0000573595 00000 n 0000039059 00000 n 0000573663 00000 n 0000039193 00000 n 0000573733 00000 n 0000039327 00000 n 0000573803 00000 n 0000039461 00000 n 0000573873 00000 n 0000039594 00000 n 0000573942 00000 n 0000039728 00000 n 0000574010 00000 n 0000039862 00000 n 0000574080 00000 n 0000039996 00000 n 0000574148 00000 n 0000040130 00000 n 0000574218 00000 n 0000040264 00000 n 0000574286 00000 n 0000040397 00000 n 0000574356 00000 n 0000040531 00000 n 0000574424 00000 n 0000040665 00000 n 0000574492 00000 n 0000040799 00000 n 0000574562 00000 n 0000040933 00000 n 0000574631 00000 n 0000041067 00000 n 0000574699 00000 n 0000041201 00000 n 0000574767 00000 n 0000041335 00000 n 0000574837 00000 n 0000041469 00000 n 0000574907 00000 n 0000041602 00000 n 0000574977 00000 n 0000041736 00000 n 0000575047 00000 n 0000041870 00000 n 0000575115 00000 n 0000042004 00000 n 0000575185 00000 n 0000042138 00000 n 0000575255 00000 n 0000042272 00000 n 0000575323 00000 n 0000042406 00000 n 0000575391 00000 n 0000042540 00000 n 0000575461 00000 n 0000042674 00000 n 0000575531 00000 n 0000042807 00000 n 0000575601 00000 n 0000042939 00000 n 0000043920 00000 n 0000044046 00000 n 0000044203 00000 n 0000575669 00000 n 0000044337 00000 n 0000575739 00000 n 0000044471 00000 n 0000575807 00000 n 0000044605 00000 n 0000575877 00000 n 0000044739 00000 n 0000575947 00000 n 0000044873 00000 n 0000576017 00000 n 0000045007 00000 n 0000576087 00000 n 0000045141 00000 n 0000576157 00000 n 0000045275 00000 n 0000576225 00000 n 0000045409 00000 n 0000576293 00000 n 0000045543 00000 n 0000576363 00000 n 0000045677 00000 n 0000576432 00000 n 0000045811 00000 n 0000576500 00000 n 0000045944 00000 n 0000576570 00000 n 0000046077 00000 n 0000576640 00000 n 0000046211 00000 n 0000576709 00000 n 0000046345 00000 n 0000576777 00000 n 0000046479 00000 n 0000047230 00000 n 0000047356 00000 n 0000047457 00000 n 0000576847 00000 n 0000047595 00000 n 0000576916 00000 n 0000047733 00000 n 0000576984 00000 n 0000047871 00000 n 0000577053 00000 n 0000048009 00000 n 0000577120 00000 n 0000048147 00000 n 0000577189 00000 n 0000048285 00000 n 0000577256 00000 n 0000048423 00000 n 0000577325 00000 n 0000048561 00000 n 0000577393 00000 n 0000048699 00000 n 0000577462 00000 n 0000048837 00000 n 0000051039 00000 n 0000051165 00000 n 0000051474 00000 n 0000577532 00000 n 0000051612 00000 n 0000577599 00000 n 0000051750 00000 n 0000577668 00000 n 0000051888 00000 n 0000577737 00000 n 0000052026 00000 n 0000577806 00000 n 0000052164 00000 n 0000577873 00000 n 0000052302 00000 n 0000577942 00000 n 0000052440 00000 n 0000578009 00000 n 0000052578 00000 n 0000578078 00000 n 0000052716 00000 n 0000578147 00000 n 0000052854 00000 n 0000578216 00000 n 0000052992 00000 n 0000578285 00000 n 0000053129 00000 n 0000578354 00000 n 0000053267 00000 n 0000578421 00000 n 0000053405 00000 n 0000578490 00000 n 0000053543 00000 n 0000578559 00000 n 0000053681 00000 n 0000578628 00000 n 0000053819 00000 n 0000578695 00000 n 0000053957 00000 n 0000578764 00000 n 0000054094 00000 n 0000578833 00000 n 0000054232 00000 n 0000578902 00000 n 0000054370 00000 n 0000578971 00000 n 0000054508 00000 n 0000579040 00000 n 0000054645 00000 n 0000579109 00000 n 0000054783 00000 n 0000579176 00000 n 0000054921 00000 n 0000579245 00000 n 0000055059 00000 n 0000579312 00000 n 0000055197 00000 n 0000579379 00000 n 0000055335 00000 n 0000579448 00000 n 0000055473 00000 n 0000579516 00000 n 0000055610 00000 n 0000579585 00000 n 0000055748 00000 n 0000579654 00000 n 0000055886 00000 n 0000579724 00000 n 0000056024 00000 n 0000579792 00000 n 0000056162 00000 n 0000579862 00000 n 0000056300 00000 n 0000579930 00000 n 0000056438 00000 n 0000058244 00000 n 0000058370 00000 n 0000058495 00000 n 0000058686 00000 n 0000058848 00000 n 0000059038 00000 n 0000059228 00000 n 0000059418 00000 n 0000059580 00000 n 0000059770 00000 n 0000059960 00000 n 0000060150 00000 n 0000060288 00000 n 0000060342 00000 n 0000060416 00000 n 0000060554 00000 n 0000060636 00000 n 0000060710 00000 n 0000060848 00000 n 0000060930 00000 n 0000061004 00000 n 0000061142 00000 n 0000061224 00000 n 0000061298 00000 n 0000063094 00000 n 0000063204 00000 n 0000066121 00000 n 0000066231 00000 n 0000069317 00000 n 0000069443 00000 n 0000069480 00000 n 0000069617 00000 n 0000069812 00000 n 0000073014 00000 n 0000073140 00000 n 0000073177 00000 n 0000073316 00000 n 0000073457 00000 n 0000076754 00000 n 0000076880 00000 n 0000076917 00000 n 0000077110 00000 n 0000077247 00000 n 0000081127 00000 n 0000081253 00000 n 0000081346 00000 n 0000081543 00000 n 0000081731 00000 n 0000081915 00000 n 0000082116 00000 n 0000082310 00000 n 0000082504 00000 n 0000082706 00000 n 0000082845 00000 n 0000082983 00000 n 0000086802 00000 n 0000086928 00000 n 0000086989 00000 n 0000087126 00000 n 0000087260 00000 n 0000087398 00000 n 0000087539 00000 n 0000087762 00000 n 0000088421 00000 n 0000088547 00000 n 0000088576 00000 n 0000088748 00000 n 0000092107 00000 n 0000092233 00000 n 0000092262 00000 n 0000092401 00000 n 0000095222 00000 n 0000095332 00000 n 0000099323 00000 n 0000099433 00000 n 0000102302 00000 n 0000102412 00000 n 0000105917 00000 n 0000106027 00000 n 0000110176 00000 n 0000110286 00000 n 0000114130 00000 n 0000114240 00000 n 0000118110 00000 n 0000118236 00000 n 0000118281 00000 n 0000118420 00000 n 0000118595 00000 n 0000118770 00000 n 0000121200 00000 n 0000121326 00000 n 0000121363 00000 n 0000121553 00000 n 0000121730 00000 n 0000124351 00000 n 0000124477 00000 n 0000124514 00000 n 0000124655 00000 n 0000124827 00000 n 0000127398 00000 n 0000127524 00000 n 0000127553 00000 n 0000127690 00000 n 0000130607 00000 n 0000130733 00000 n 0000130762 00000 n 0000130899 00000 n 0000133165 00000 n 0000133275 00000 n 0000135357 00000 n 0000135467 00000 n 0000139271 00000 n 0000139397 00000 n 0000139474 00000 n 0000139609 00000 n 0000139748 00000 n 0000139884 00000 n 0000140020 00000 n 0000140157 00000 n 0000140296 00000 n 0000140437 00000 n 0000144011 00000 n 0000144121 00000 n 0000146957 00000 n 0000147067 00000 n 0000150047 00000 n 0000150157 00000 n 0000152373 00000 n 0000152483 00000 n 0000156630 00000 n 0000156756 00000 n 0000156785 00000 n 0000156921 00000 n 0000157830 00000 n 0000157956 00000 n 0000157985 00000 n 0000158185 00000 n 0000161232 00000 n 0000161358 00000 n 0000161419 00000 n 0000161557 00000 n 0000161695 00000 n 0000161830 00000 n 0000162022 00000 n 0000162213 00000 n 0000164543 00000 n 0000164653 00000 n 0000167444 00000 n 0000167554 00000 n 0000170376 00000 n 0000170486 00000 n 0000173165 00000 n 0000173275 00000 n 0000176482 00000 n 0000176592 00000 n 0000179878 00000 n 0000179988 00000 n 0000183070 00000 n 0000183196 00000 n 0000183241 00000 n 0000183378 00000 n 0000183519 00000 n 0000183658 00000 n 0000186074 00000 n 0000186184 00000 n 0000188668 00000 n 0000188794 00000 n 0000188823 00000 n 0000188961 00000 n 0000192293 00000 n 0000192403 00000 n 0000197065 00000 n 0000197175 00000 n 0000200696 00000 n 0000200822 00000 n 0000200859 00000 n 0000200998 00000 n 0000201134 00000 n 0000203946 00000 n 0000204056 00000 n 0000206608 00000 n 0000206718 00000 n 0000209234 00000 n 0000209344 00000 n 0000211798 00000 n 0000211908 00000 n 0000214899 00000 n 0000215009 00000 n 0000217608 00000 n 0000217718 00000 n 0000220019 00000 n 0000220145 00000 n 0000220174 00000 n 0000220313 00000 n 0000222628 00000 n 0000222754 00000 n 0000222791 00000 n 0000222932 00000 n 0000223071 00000 n 0000226041 00000 n 0000226167 00000 n 0000226204 00000 n 0000226450 00000 n 0000226693 00000 n 0000229764 00000 n 0000229890 00000 n 0000229943 00000 n 0000230077 00000 n 0000230299 00000 n 0000230440 00000 n 0000230641 00000 n 0000233036 00000 n 0000233162 00000 n 0000233215 00000 n 0000233390 00000 n 0000233631 00000 n 0000233770 00000 n 0000580000 00000 n 0000233911 00000 n 0000238321 00000 n 0000238431 00000 n 0000243206 00000 n 0000243316 00000 n 0000246873 00000 n 0000246999 00000 n 0000247036 00000 n 0000247175 00000 n 0000247314 00000 n 0000250363 00000 n 0000250489 00000 n 0000250542 00000 n 0000250679 00000 n 0000250815 00000 n 0000250954 00000 n 0000251092 00000 n 0000254468 00000 n 0000254594 00000 n 0000254647 00000 n 0000254782 00000 n 0000254921 00000 n 0000255059 00000 n 0000255197 00000 n 0000257703 00000 n 0000257813 00000 n 0000260094 00000 n 0000260204 00000 n 0000262356 00000 n 0000262466 00000 n 0000265385 00000 n 0000265511 00000 n 0000265556 00000 n 0000265697 00000 n 0000265838 00000 n 0000265977 00000 n 0000268627 00000 n 0000268753 00000 n 0000268782 00000 n 0000268923 00000 n 0000271677 00000 n 0000271803 00000 n 0000271848 00000 n 0000271987 00000 n 0000272125 00000 n 0000272266 00000 n 0000275706 00000 n 0000275832 00000 n 0000275861 00000 n 0000276002 00000 n 0000278627 00000 n 0000278753 00000 n 0000278806 00000 n 0000278943 00000 n 0000279078 00000 n 0000279212 00000 n 0000279349 00000 n 0000281503 00000 n 0000281613 00000 n 0000285103 00000 n 0000285229 00000 n 0000285258 00000 n 0000285397 00000 n 0000289109 00000 n 0000289219 00000 n 0000291926 00000 n 0000292052 00000 n 0000292081 00000 n 0000292304 00000 n 0000295688 00000 n 0000295814 00000 n 0000295843 00000 n 0000296067 00000 n 0000298206 00000 n 0000298316 00000 n 0000301188 00000 n 0000301314 00000 n 0000301359 00000 n 0000301498 00000 n 0000301639 00000 n 0000301777 00000 n 0000304884 00000 n 0000305010 00000 n 0000305055 00000 n 0000305193 00000 n 0000305332 00000 n 0000305471 00000 n 0000308445 00000 n 0000308571 00000 n 0000308600 00000 n 0000308736 00000 n 0000311021 00000 n 0000311131 00000 n 0000313480 00000 n 0000313606 00000 n 0000313635 00000 n 0000313776 00000 n 0000316220 00000 n 0000316346 00000 n 0000316391 00000 n 0000316530 00000 n 0000316669 00000 n 0000316807 00000 n 0000320033 00000 n 0000320159 00000 n 0000320196 00000 n 0000320335 00000 n 0000320470 00000 n 0000323366 00000 n 0000323492 00000 n 0000323537 00000 n 0000323676 00000 n 0000323814 00000 n 0000323953 00000 n 0000327074 00000 n 0000327184 00000 n 0000330920 00000 n 0000331046 00000 n 0000331083 00000 n 0000331219 00000 n 0000331358 00000 n 0000334077 00000 n 0000334203 00000 n 0000334232 00000 n 0000334371 00000 n 0000337515 00000 n 0000337625 00000 n 0000340740 00000 n 0000340850 00000 n 0000342917 00000 n 0000343027 00000 n 0000345623 00000 n 0000345749 00000 n 0000345786 00000 n 0000345927 00000 n 0000346068 00000 n 0000348583 00000 n 0000348693 00000 n 0000351138 00000 n 0000351264 00000 n 0000351301 00000 n 0000351438 00000 n 0000351573 00000 n 0000354793 00000 n 0000354919 00000 n 0000354948 00000 n 0000355087 00000 n 0000359107 00000 n 0000359233 00000 n 0000359262 00000 n 0000359401 00000 n 0000362925 00000 n 0000363035 00000 n 0000366735 00000 n 0000366845 00000 n 0000368277 00000 n 0000368387 00000 n 0000370196 00000 n 0000370306 00000 n 0000372610 00000 n 0000372736 00000 n 0000372781 00000 n 0000372918 00000 n 0000580069 00000 n 0000373057 00000 n 0000373198 00000 n 0000375312 00000 n 0000375422 00000 n 0000377408 00000 n 0000377534 00000 n 0000377647 00000 n 0000377784 00000 n 0000377921 00000 n 0000378059 00000 n 0000378197 00000 n 0000378336 00000 n 0000378475 00000 n 0000378614 00000 n 0000378754 00000 n 0000378894 00000 n 0000379034 00000 n 0000379174 00000 n 0000381532 00000 n 0000381661 00000 n 0000381728 00000 n 0000381868 00000 n 0000382008 00000 n 0000382148 00000 n 0000382288 00000 n 0000382428 00000 n 0000384688 00000 n 0000384817 00000 n 0000384848 00000 n 0000384984 00000 n 0000387865 00000 n 0000387977 00000 n 0000391795 00000 n 0000391924 00000 n 0000391964 00000 n 0000392100 00000 n 0000392239 00000 n 0000395587 00000 n 0000395716 00000 n 0000395810 00000 n 0000395992 00000 n 0000396183 00000 n 0000396319 00000 n 0000396458 00000 n 0000396598 00000 n 0000396738 00000 n 0000396878 00000 n 0000397018 00000 n 0000398995 00000 n 0000399124 00000 n 0000399209 00000 n 0000399347 00000 n 0000399485 00000 n 0000399622 00000 n 0000399762 00000 n 0000399902 00000 n 0000400042 00000 n 0000400182 00000 n 0000402173 00000 n 0000402302 00000 n 0000402342 00000 n 0000402478 00000 n 0000402617 00000 n 0000404760 00000 n 0000404889 00000 n 0000404947 00000 n 0000405083 00000 n 0000405223 00000 n 0000405363 00000 n 0000405503 00000 n 0000407210 00000 n 0000407339 00000 n 0000407433 00000 n 0000407569 00000 n 0000407705 00000 n 0000407841 00000 n 0000407979 00000 n 0000408117 00000 n 0000408257 00000 n 0000408397 00000 n 0000408536 00000 n 0000410836 00000 n 0000410965 00000 n 0000410996 00000 n 0000411134 00000 n 0000413909 00000 n 0000414038 00000 n 0000414105 00000 n 0000414243 00000 n 0000414381 00000 n 0000414519 00000 n 0000414661 00000 n 0000414801 00000 n 0000417157 00000 n 0000417286 00000 n 0000417326 00000 n 0000417468 00000 n 0000417608 00000 n 0000419890 00000 n 0000420019 00000 n 0000420059 00000 n 0000420195 00000 n 0000420335 00000 n 0000422145 00000 n 0000422274 00000 n 0000422305 00000 n 0000422445 00000 n 0000424677 00000 n 0000424789 00000 n 0000427579 00000 n 0000427708 00000 n 0000427757 00000 n 0000427896 00000 n 0000428034 00000 n 0000428173 00000 n 0000432336 00000 n 0000432465 00000 n 0000432523 00000 n 0000432661 00000 n 0000432799 00000 n 0000432934 00000 n 0000433070 00000 n 0000436842 00000 n 0000436971 00000 n 0000437002 00000 n 0000437140 00000 n 0000439178 00000 n 0000439290 00000 n 0000440925 00000 n 0000441037 00000 n 0000442984 00000 n 0000443096 00000 n 0000444534 00000 n 0000444646 00000 n 0000446626 00000 n 0000446755 00000 n 0000446795 00000 n 0000446931 00000 n 0000447067 00000 n 0000450250 00000 n 0000450362 00000 n 0000453488 00000 n 0000453600 00000 n 0000455750 00000 n 0000455879 00000 n 0000455928 00000 n 0000456101 00000 n 0000456309 00000 n 0000456493 00000 n 0000459478 00000 n 0000459607 00000 n 0000459638 00000 n 0000459808 00000 n 0000461926 00000 n 0000462038 00000 n 0000463944 00000 n 0000464056 00000 n 0000465479 00000 n 0000465591 00000 n 0000468153 00000 n 0000468265 00000 n 0000470302 00000 n 0000470414 00000 n 0000472310 00000 n 0000472422 00000 n 0000473308 00000 n 0000473420 00000 n 0000475578 00000 n 0000475690 00000 n 0000477716 00000 n 0000477828 00000 n 0000479941 00000 n 0000480053 00000 n 0000480630 00000 n 0000480742 00000 n 0000483452 00000 n 0000483564 00000 n 0000485314 00000 n 0000485426 00000 n 0000487717 00000 n 0000487829 00000 n 0000489466 00000 n 0000489578 00000 n 0000492988 00000 n 0000493117 00000 n 0000493157 00000 n 0000493299 00000 n 0000493439 00000 n 0000496270 00000 n 0000496399 00000 n 0000496457 00000 n 0000496599 00000 n 0000496738 00000 n 0000496877 00000 n 0000497015 00000 n 0000499338 00000 n 0000499450 00000 n 0000500071 00000 n 0000500183 00000 n 0000502354 00000 n 0000580138 00000 n 0000580195 00000 n 0000502466 00000 n 0000580262 00000 n 0000502656 00000 n 0000502862 00000 n 0000503082 00000 n 0000503360 00000 n 0000503714 00000 n 0000503874 00000 n 0000504055 00000 n 0000504242 00000 n 0000504461 00000 n 0000504626 00000 n 0000504830 00000 n 0000580329 00000 n 0000505061 00000 n 0000580399 00000 n 0000505408 00000 n 0000505635 00000 n 0000505902 00000 n 0000506114 00000 n 0000506304 00000 n 0000506510 00000 n 0000506819 00000 n 0000507042 00000 n 0000507321 00000 n 0000507556 00000 n 0000507796 00000 n 0000507965 00000 n 0000508124 00000 n 0000508396 00000 n 0000508526 00000 n 0000508748 00000 n 0000509032 00000 n 0000509256 00000 n 0000509467 00000 n 0000509654 00000 n 0000509829 00000 n 0000510068 00000 n 0000510307 00000 n 0000510513 00000 n 0000510844 00000 n 0000511015 00000 n 0000511231 00000 n 0000511458 00000 n 0000511773 00000 n 0000512036 00000 n 0000512314 00000 n 0000512585 00000 n 0000512727 00000 n 0000512973 00000 n 0000513202 00000 n 0000513510 00000 n 0000513641 00000 n 0000513818 00000 n 0000514321 00000 n 0000514562 00000 n 0000514821 00000 n 0000514974 00000 n 0000515300 00000 n 0000515583 00000 n 0000515847 00000 n 0000516119 00000 n 0000516421 00000 n 0000516552 00000 n 0000516767 00000 n 0000516965 00000 n 0000517209 00000 n 0000517486 00000 n 0000517820 00000 n 0000518087 00000 n 0000518388 00000 n 0000518703 00000 n 0000518834 00000 n 0000519147 00000 n 0000519336 00000 n 0000519477 00000 n 0000519659 00000 n 0000519855 00000 n 0000520115 00000 n 0000520324 00000 n 0000520601 00000 n 0000520863 00000 n 0000521152 00000 n 0000521439 00000 n 0000521646 00000 n 0000521924 00000 n 0000522164 00000 n 0000522371 00000 n 0000522606 00000 n 0000522927 00000 n 0000523110 00000 n 0000523347 00000 n 0000523546 00000 n 0000523810 00000 n 0000524305 00000 n 0000524536 00000 n 0000524697 00000 n 0000525029 00000 n 0000525183 00000 n 0000525337 00000 n 0000525466 00000 n 0000525785 00000 n 0000525956 00000 n 0000526150 00000 n 0000526503 00000 n 0000526759 00000 n 0000527114 00000 n 0000527427 00000 n 0000527623 00000 n 0000528051 00000 n 0000528264 00000 n 0000528470 00000 n 0000528671 00000 n 0000528941 00000 n 0000529223 00000 n 0000529743 00000 n 0000529993 00000 n 0000530143 00000 n 0000530325 00000 n 0000530525 00000 n 0000530805 00000 n 0000531019 00000 n 0000531166 00000 n 0000531477 00000 n 0000531671 00000 n 0000532005 00000 n 0000532271 00000 n 0000532509 00000 n 0000532773 00000 n 0000532931 00000 n 0000533189 00000 n 0000533471 00000 n 0000533624 00000 n 0000534045 00000 n 0000534210 00000 n 0000534598 00000 n 0000534794 00000 n 0000535081 00000 n 0000535390 00000 n 0000535533 00000 n 0000535697 00000 n 0000535915 00000 n 0000536075 00000 n 0000536272 00000 n 0000536384 00000 n 0000536496 00000 n 0000536648 00000 n 0000536788 00000 n 0000537110 00000 n 0000537524 00000 n 0000537924 00000 n 0000538190 00000 n 0000538397 00000 n 0000538670 00000 n 0000539012 00000 n 0000539233 00000 n 0000539387 00000 n 0000539575 00000 n 0000539751 00000 n 0000539921 00000 n 0000540085 00000 n 0000540214 00000 n 0000540379 00000 n 0000540520 00000 n 0000540667 00000 n 0000540843 00000 n 0000541019 00000 n 0000541189 00000 n 0000541371 00000 n 0000541565 00000 n 0000541741 00000 n 0000541929 00000 n 0000542099 00000 n 0000542269 00000 n 0000542410 00000 n 0000542575 00000 n 0000542739 00000 n 0000542897 00000 n 0000543079 00000 n 0000543249 00000 n 0000543413 00000 n 0000543589 00000 n 0000543747 00000 n 0000543905 00000 n 0000544081 00000 n 0000544216 00000 n 0000544357 00000 n 0000544498 00000 n 0000544651 00000 n 0000544810 00000 n 0000544951 00000 n 0000545092 00000 n 0000545280 00000 n 0000545515 00000 n 0000545744 00000 n 0000545932 00000 n 0000546143 00000 n 0000546313 00000 n 0000546483 00000 n 0000546659 00000 n 0000546835 00000 n 0000547011 00000 n 0000547264 00000 n 0000547428 00000 n 0000547628 00000 n 0000547821 00000 n 0000548032 00000 n 0000548231 00000 n 0000548424 00000 n 0000548577 00000 n 0000548702 00000 n 0000548925 00000 n 0000549089 00000 n 0000549265 00000 n 0000549540 00000 n 0000549880 00000 n 0000550052 00000 n 0000550361 00000 n 0000550492 00000 n 0000550933 00000 n 0000551099 00000 n 0000551329 00000 n 0000551604 00000 n 0000551822 00000 n 0000552042 00000 n 0000552365 00000 n 0000580469 00000 n 0000552785 00000 n 0000552867 00000 n 0000580540 00000 n 0000553052 00000 n 0000580611 00000 n 0000553134 00000 n 0000580681 00000 n 0000553232 00000 n 0000553314 00000 n 0000553507 00000 n 0000553679 00000 n 0000553826 00000 n 0000553951 00000 n 0000554402 00000 n 0000554563 00000 n 0000554728 00000 n 0000555008 00000 n 0000555156 00000 n 0000555292 00000 n 0000555580 00000 n 0000555895 00000 n 0000556091 00000 n 0000556290 00000 n 0000556514 00000 n 0000556660 00000 n 0000557170 00000 n 0000557454 00000 n 0000557735 00000 n 0000557915 00000 n 0000558030 00000 n 0000558142 00000 n 0000558255 00000 n 0000558365 00000 n 0000558487 00000 n 0000558601 00000 n 0000558709 00000 n trailer << /Size 1452 /Root 2 0 R /Info 4 0 R >> startxref 580752 %%EOF hsqldb-1.8.0.10.orig/doc/guide/ch07.html0000644000175000017500000004635510665324653016137 0ustar renereneChapter 7. TLS

                Chapter 7. TLS

                TLS Support (a.k.a. SSL)

                Blaine Simpson

                HSQLDB Development Group

                $Date: 2006/07/27 21:08:21 $

                The instructions in this document are liable to change at any time. In particular, we will be changing the method to supply the server-side certificate password.

                Requirements

                Hsqldb TLS Support Requirements

                • Sun Java 2.x and up. (This is probably possible with IBM's Java, but I don't think anybody has attempted to run HSQLDB with TLS under IBM's Java, and I'm sure that nobody in the HSQLDB Development Group has documented how to set up the environment).

                • If Java 2.x or 3.x, then you will need need to install JSSE. Your server and/or client will start up much slower than that of Java 4.x users. Client-side users will not be able to use the https: JDBC protocol (because the https protocol handler is not implemented in 2.x/3.x Java JSSE; if there is demand, we could work around this).

                • A JKS keystore containing a private key, in order to run a server.

                • If you are running the server side, then you'll need to run a HSQLDB Server or WebServer. It doesn't matter if the underlying database instances are new, and it doesn't matter if you are making a new Server configuration or encrypting an existing Server configuration. (You can turn encryption on and off at will).

                • You need a HSQLDB jar file that was built with JSSE present. If you got your HSQLDB 1.7.2 distribution from us, you are all set, because we build with Java 1.4 (which contains JSSE). If you build your own jar file with Java 1.3, make sure to install JSSE first.

                Encrypting your JDBC connection

                At this time, only 1-way, server-cert encryption is tested.

                Client-Side

                Just use one of the following protocol prefixes.

                Hsqldb TLS URL Prefixes

                • jdbc:hsqldb:hsqls://

                • jdbc:hsqldb:https://

                At this time, the latter will only work for clients running with Java 1.4.

                If the server you wish to connect to is using a certificate approved by your default trust keystores, then there is nothing else to do. If not, then you need to tell Java to "trust" the server cert. (It's a slight over-simplification to say that if the server certificate was purchased, then you are all set; if somebody "signed their own" certificate by self-signing or using a private ca certificate, then you need to set up trust).

                First, you need to obtain the cert (only the "public" part of it). Since this cert is passed to all clients, you could obtain it by writing a java client that dumps it to file, or perhaps by using openssl s_client. Since in most cases, if you want to trust a non-commercial cert, you probably have access to the server keystore, I'll show an example of how to get what you need from the server-side JKS keystore.

                You may already have an X509 cert for your server. If you have a server keystore, then you can generate a X509 cert like this.

                Example 7.1. Exporting certificate from the server's keystore

                    keytool -export -keystore server.store -alias existing_alias -file server.cer
                In this example, server.cer is the X509 certificate that you need for the next step.

                Now, you need to add this cert to one of the system trust keystores or to a keystore of your own. See the Customizing Stores section in JSSERefGuide.html to see where your system trust keystores are. You can put private keystores anywhere you want to. The following command will add the cert to an existing keystore, or create a new keystore if client.store doesn't exist.

                Example 7.2. Adding a certificate to the client keystore

                keytool -import -trustcacerts -keystore trust.store -alias new_alias -file server.cer

                If you are making a new keystore, you probably want to start with a copy of your system default keystore which you can find somewhere under your JAVA_HOME directory (typically jre/lib/security/cacerts for a JDK, but I forget exactly where it is for a JRE).

                Unless your OS can't stop other people from writing to your files, you probably do not want to set a password on the trust keystore.

                If you added the cert to a system trust store, then you are finished. Otherwise you will need to specify your custom trust keystore to your client program. The generic way to set the trust keystore is to set the sytem property javax.net.ssl.trustStore every time that you run your client program. For example

                Example 7.3. Specifying your own trust store to a JDBC client

                    java -Djavax.net.ssl.trustStore=/home/blaine/trust.store -jar /path/to/hsqldb.jar dest-urlid
                This example runs the program SqlTool. SqlTool has built-in TLS support, however, so, for SqlTool you can set truststore on a per-urlid basis in the SqlTool configuration file.

                N.b. The hostname in your database URL must match the Common Name of the server's certificate exactly. That means that if a site certificate is admc.com, you can not use jdbc:hsqldb:hsqls://localhost or jdbc:hsqldb:hsqls://www.admc.com:1100 to connect to it.

                If you want more details on anything, see JSSERefGuide.html on Sun's site, or in the subdirectory docs/guide/security/jsse of your Java SE docs.

                Server-Side

                Get yourself a JKS keystore containing a private key. Then set the system property javax.net.ssl.keyStore to the path to that file, and javax.net.ssl.keyStorePassword to the password of the keystore (and to the private key-- they have to be the same).

                Example 7.4. Running an Hsqldb server with TLS encryption

                    java -Djavax.net.ssl.keyStorePassword=secret  \
                        -Djavax.net.ssl.keyStore=/usr/hsqldb/db/db3/server.store  \
                        -cp /path/to/hsqldb.jar org.hsqldb.Server

                (This is a single command that I have broken into 2 lines using my shell's \ line-continuation feature. In this example, I'm using a server.properties file so that I don't need to give arguments to specify database instances or the server endpoint).

                Caution

                Specifying a password on the command-line is definitely not secure. It's really only appropriate when untrusted users do not have any access to your computer.

                If there is any user demand, we will have a more secure way to supply the password before long.

                JSSE

                If you are running Java 4.x, then you are all set. Java 1.x users, you are on your own (Sun does not provide a JSSE that will work with 1.x). Java 2.x and 3.x users continue...

                Go to http://java.sun.com/products/jsse/index-103.html. If you agree to the terms and meet the requirements, download the domestic or global JSSE software. All you need from the software distro is the three jar files. If you have a JDK installation, then move the 3 jar files into the directory $JAVA_HOME/jre/lib/ext. If you have a JRE installation, then move the 3 jar files into the directory $JAVA_HOME/lib/ext.

                Pretty painless.

                Making a Private-key Keystore

                There are two main ways to do this. Either you can use a certificate signed by a certificate authority, or you can make your own. One thing that you need to know in both cases is, the Common Name of the cert has to be the exact hostname that JDBC clients will use in their database URL.

                CA-Signed Cert

                I'm not going to tell you how to get a CA-signed SSL certificate. That is well documented at many other places.

                Assuming that you have a standard pem-style private key certificate, here's how you can use openssl and the program DERImport to get it into a JKS keystore.

                Because I have spent a lot of time on this document already, I am just giving you an example.

                Example 7.5. Getting a pem-style private key into a JKS keystore

                openssl pkcs8 -topk8 -outform DER -in Xpvk.pem -inform PEM -out Xpvk.pk8 -nocrypt
                
                openssl x509 -in Xcert.pem -out Xcert.der -outform DER
                
                java DERImport new.keystore NEWALIAS Xpvk.pk8 Xcert.der

                Important

                Make sure to set the password of the key exactly the same as the password for the keystore!

                You need the program DERImport.class of course. Do some internet searches to find DERImport.java or DERImport.class and download it.

                If DERImport has become difficult to obtain, I can write a program to do the same thing-- just let me know.

                Non-CA-Signed Cert

                Run man keytool or see the Creating a Keystore section of JSSERefGuide.html.

                Automatic Server or WebServer startup on UNIX

                If you are on UNIX and want to automatically start and stop a Server or WebServer running with encryption, follow the instructions in the UNIX Quick Start chapter, and remember to make the init script configuration file readable only to root and to set the variables TLS_PASSWORD and TLS_KEYSTORE.

                If you are using a private server certificate, make sure to also set the trust store filepath as shown in the sample init script configuration file.

                The cautionary warning above still applies. The password will be visible to any minimally competent local UNIX user who wants to see it.

                hsqldb-1.8.0.10.orig/doc/guide/ch03.html0000644000175000017500000014327310665324647016133 0ustar renereneChapter 3. UNIX Quick Start

                Chapter 3. UNIX Quick Start

                How to quickly get Hsqldb up and running on UNIX, including Mac OS X

                Blaine Simpson

                HSQLDB Development Group

                $Date: 2005/07/25 23:20:53 $

                Purpose

                This chapter explains how to quickly install, run, and use HSQLDB on UNIX.

                HSQLDB has lots of great optional features. I intend to cover very few of them. I do intend to cover what I think is the most common UNIX setup: To run a multi-user database with permament data persistence. (By the latter I mean that data is stored to disk so that the data will persist across database shutdowns and startups). I also cover how to run HSQLDB as a system daemon.

                Installation

                Go to http://sourceforge.net/projects/hsqldb and click on the "files" link. You want the current version. This will be the highest numbered version under the plain black "hsqldb" heading. See if there's a distribution for the current HSQLDB version in the format that you want.

                If you want an rpm, you should still find out the current version of HSQLDB as described in the previous paragraph. Then click "hsqldb" in the "free section" of http://www.jpackage.org/ and see if they have the current HSQLDB version built yet. Hopefully, the JPackage folk will document what JVM versions their rpm will support (currently they document this neither on their site nor within the package itself). (I really can't document how to download from a site that is totally beyond my control).

                Note

                It could very well happen that some of the file formats which I discuss below are not in fact offered. If so, then we have not gotten around to building them.

                Binary installation depends on the package format that you downloaded.

                Installing from a .pkg.Z file

                This package is only for use by a Solaris super-user. It's a System V package. Download then uncompress the package with uncompress or gunzip

                    uncompress filename.pkg.Z
                You can read about the package by running
                    pkginfo -l -d filename.pkg
                Run pkgadd as root to install.

                    pkgadd -d filename.pkg
                Installing from a .rpm file

                This is a Linux rpm package. After you download the rpm, you can read about it by running

                    rpm -qip /path/to/file.rpm

                Rpms can be installed or upgraded by running

                    rpm -Uvh /path/to/file.rpm
                as root. Suse users may want to keep Yast aware of installed packages by running rpm through Yast: yast2 -i /path/to/file.rpm.

                Installing from a .zip file

                Extract the zip file to the parent directory of the new HSQLDB home. You don't need to create the HSQLDB_HOME directory because the extraction will create it for you with the right name)

                    cd parent/of/new/hsqldb/home
                    unzip /path/to/file.zip

                All the files in the zip archive will be extracted to underneath a new hsqldb directory.

                Take a look at the files you installed. (Under hsqldb for zip file installations. Otherwise, use the utilities for your packaging system). The most important file of the hsqldb system is hsqldb.jar, which resides in the directory lib.

                Important

                For the purposes of this chapter, I define HSQLDB_HOME to be the parent directory of the lib directory that contains hsqldb.jar. E.g., if your path to hsqldb.jar is /a/b/hsqldb/lib/hsqldb.jar, then your HSQLDB_HOME is /a/b/hsqldb.

                If the description of your distribution says that the hsqldb.jar file will work for your Java version, then you are finished with installation. Otherwise you need to build a new hsqldb.jar file.

                If you followed the instructions above and you still don't know what Java version your hsqldb.jar supports, then read HSQLDB_HOME/readme.txt and HSQLDB_HOME/index.html. If that still doesn't help, then you can just try your hsqldb.jar and see if it works, or build your own.

                To use the supplied hsqldb.jar, just skip to the next section of this document. Otherwise build a new hsqldb.jar.

                Procedure 3.1. Building hsqldb.jar

                1. If you don't already have Ant, download the latest stable binary version from http://ant.apache.org. cd to where you want Ant to live, and extract from the archive with

                      unzip /path/to/file.zip
                  or
                      tar -xzf /path/to/file.tar.gz
                  or
                      bunzip2 -c /path/to/file.tar.bz2 | tar -xzf -
                  Everything will be installed into a new subdirectory named apache-ant- + version. You can rename the directory after the extraction if you wish.

                2. Set the environmental variable JAVA_HOME to the base directory of your Java JRE or SDK, like

                      export JAVA_HOME; JAVA_HOME=/usr/java/j2sdk1.4.0
                  The location is entirely dependent upon your variety of UNIX. Sun's rpm distributions of Java normally install to /usr/java/something. Sun's System V package distributions of Java (including those that come with Solaris) normally install to /usr/something, with a sym-link from /usr/java to the default version (so for Solaris you will usually set JAVA_HOME to /usr/java).

                3. Remove the existing file HSQLDB_HOME/lib/hsqldb.jar.

                4. cd to HSQLDB_HOME/build. Make sure that the bin directory under your Ant home is in your search path. Run the following command.

                      ant hsqldb
                  This will build a new HSQLDB_HOME/lib/hsqldb.jar.

                See the Building HSQLDB appendix if you want to build anything other than hsqldb.jar with all default settings.

                Setting up a Hsqldb Persistent Database Instance and a Hsqldb Server

                If you installed from an OS-specific package, you may already have a database instance and server pre-configured. See if your package includes a file named server.properties (make use of your packaging utilities). If you do, then I suggest that you still read this section while you poke around, in order to understand your setup.

                1. Select a UNIX user to run the database as. If this database is for the use of multiple users, or is a production system (or to emulate a production system), you should dedicate a UNIX user for this purpose. In my examples, I use the user name hsqldb. In this chapter, I refer to this user as the HSQLDB_OWNER, since that user will own the database instance files and processes.

                  If the account doesn't exist, then create it. On all system-5 UNIXes and most hybrids (including Linux), you can run (as root) something like

                      useradd -c 'HSQLDB Database Owner' -s /bin/bash -m hsqldb
                  (BSD-variant users can use a similar pw useradd hsqldb... command).

                2. Become the HSQLDB_OWNER. Copy the sample file HSQLDB_HOME/src/org/hsqldb/sample/sample-server.properties to the HSQLDB_OWNER's home directory and rename it to server.properties.

                  # Hsqldb Server cfg file.
                  # See the Advanced Topics chapter of the Hsqldb User Guide.
                  
                  server.database.0   file:db0/db0
                  # I suggest that, for every file: database you define, you add the
                  # connection property "ifexists=true" after the database instance
                  # is created (which happens simply by starting the Server one time).
                  # Just append ";ifexists=true" to the file: URL, like so:
                  # server.database.0   file:db0/db0;ifexists=true
                  

                  Since the value of the first database (server.database.0) begins with file:, the database instance will be persisted to a set of files in the specified directory with names beginning with the specified name. Set the path to whatever you want (relative paths will be relative to the directory containing the properties file). You can read about how to specify other database instances of various types, and how to make settings for the listen port and many other things, in the Advanced Topics chapter.

                3. Set and export the environmental variable CLASSPATH to the value of HSQLDB_HOME (as described above) plus "/lib/hsqldb.jar", like

                      export CLASSPATH; CLASSPATH=/path/to/hsqldb/lib/hsqldb.jar
                  In HSQLDB_OWNER's home directory, run

                      nohup java org.hsqldb.Server &

                  This will start the Server process in the background, and will create your new database instance "db0". Continue on when you see the message containing HSQLDB server... is online. nohup just makes sure that the command will not quit when you exit the current shell (omit it if that's what you want to do).

                Accessing your Database

                Copy the file HSQLDB_HOME/src/org/hsqldb/sample/sqltool.rc to the HSQLDB_OWNER's home directory. Use chmod to make the file readable and writable only to HSQLDB_OWNER.

                # $Id: sqltool.rc,v 1.22 2007/08/09 03:22:21 unsaved Exp $
                
                # This is a sample RC configuration file used by SqlTool, DatabaseManager,
                # and any other program that uses the org.hsqldb.util.RCData class.
                
                # You can run SqlTool right now by copying this file to your home directory
                # and running
                #    java -jar /path/to/hsqldb.jar mem
                # This will access the first urlid definition below in order to use a 
                # personal Memory-Only database.
                # "url" values may, of course, contain JDBC connection properties, delimited
                # with semicolons.
                
                # If you have the least concerns about security, then secure access to
                # your RC file.
                # See the documentation for SqlTool for various ways to use this file.
                
                # A personal Memory-Only (non-persistent) database.
                urlid mem
                url jdbc:hsqldb:mem:memdbid
                username sa
                password
                
                # A personal, local, persistent database.
                urlid personal
                url jdbc:hsqldb:file:${user.home}/db/personal;shutdown=true
                username sa
                password
                # When connecting directly to a file database like this, you should 
                # use the shutdown connection property like this to shut down the DB
                # properly when you exit the JVM.
                
                # This is for a hsqldb Server running with default settings on your local
                # computer (and for which you have not changed the password for "sa").
                urlid localhost-sa
                url jdbc:hsqldb:hsql://localhost
                username sa
                password
                
                
                
                # Template for a urlid for an Oracle database.
                # You will need to put the oracle.jdbc.OracleDriver class into your 
                # classpath.
                # In the great majority of cases, you want to use the file classes12.zip
                # (which you can get from the directory $ORACLE_HOME/jdbc/lib of any
                # Oracle installation compatible with your server).
                # Since you need to add to the classpath, you can't invoke SqlTool with
                # the jar switch, like "java -jar .../hsqldb.jar..." or 
                # "java -jar .../hsqlsqltool.jar...".
                # Put both the HSQLDB jar and classes12.zip in your classpath (and export!)
                # and run something like "java org.hsqldb.util.SqlTool...".
                
                #urlid cardiff2
                #url jdbc:oracle:thin:@aegir.admc.com:1522:TRAFFIC_SID
                #username blaine
                #password secretpassword
                #driver oracle.jdbc.OracleDriver
                
                
                
                # Template for a TLS-encrypted HSQLDB Server.
                # Remember that the hostname in hsqls (and https) JDBC URLs must match the
                # CN of the server certificate (the port and instance alias that follows 
                # are not part of the certificate at all).
                # You only need to set "truststore" if the server cert is not approved by
                # your system default truststore (which a commercial certificate probably
                # would be).
                
                #urlid tls
                #url jdbc:hsqldb:hsqls://db.admc.com:9001/lm2
                #username blaine
                #password asecret
                #truststore /home/blaine/ca/db/db-trust.store
                
                
                # Template for a Postgresql database
                #urlid blainedb
                #url jdbc:postgresql://idun.africawork.org/blainedb
                #username blaine
                #password losung1
                #driver org.postgresql.Driver
                
                # Template for a MySQL database.  MySQL has poor JDBC support.
                #urlid mysql-testdb
                #url jdbc:mysql://hostname:3306/dbname
                #username root
                #username blaine
                #password hiddenpwd
                #driver com.mysql.jdbc.Driver
                
                # Note that "databases" in SQL Server and Sybase are traditionally used for
                # the same purpose as "schemas" with more SQL-compliant databases.
                
                # Template for a Microsoft SQL Server database
                #urlid msprojsvr
                #url jdbc:microsoft:sqlserver://hostname;DatabaseName=DbName;SelectMethod=Cursor
                # The SelectMethod setting is required to do more than one thing on a JDBC
                # session (I guess Microsoft thought nobody would really use Java for 
                # anything other than a "hello world" program).
                # This is for Microsoft's SQL Server 2000 driver (requires mssqlserver.jar
                # and msutil.jar).
                #driver com.microsoft.jdbc.sqlserver.SQLServerDriver
                #username myuser
                #password hiddenpwd
                
                # Template for a Sybase database
                #urlid sybase
                #url jdbc:sybase:Tds:hostname:4100/dbname
                #username blaine
                #password hiddenpwd
                # This is for the jConnect driver (requires jconn3.jar).
                #driver com.sybase.jdbc3.jdbc.SybDriver
                
                # Template for Embedded Derby / Java DB.
                #urlid derby1
                #url jdbc:derby:path/to/derby/directory;create=true
                #username ${user.name}
                #password any_noauthbydefault
                #driver org.apache.derby.jdbc.EmbeddedDriver
                # The embedded Derby driver requires derby.jar.
                # There'a also the org.apache.derby.jdbc.ClientDriver driver with URL
                # like jdbc:derby://<server>[:<port>]/databaseName, which requires
                # derbyclient.jar.
                # You can use \= to commit, since the Derby team decided (why???)
                # not to implement the SQL standard statement "commit"!!
                # Note that SqlTool can not shut down an embedded Derby database properly,
                # since that requires an additional SQL connection just for that purpose.
                # However, I've never lost data by not shutting it down properly.
                # Other than not supporting this quirk of Derby, SqlTool is miles ahead of ij.
                

                We will be using the "localhost-sa" sample urlid definition from the config file. The JDBC URL for this urlid is jdbc:hsqldb:hsql://localhost. That is the URL for the default database instance of a HSQLDB Server running on the default port of the local host. You can read about URLs to connect to other instances and other servers in the Advanced Topics chapter.

                Run SqlTool.

                    java -jar path/to/hsqldb.jar localhost-sa
                If you get a prompt, then all is well. If security is of any concern to you at all, then you should change the privileged password in the database. Use the command SET PASSWORD command to change SA's password.
                    set password "newpassword";

                When you're finished playing, exit with the command \q.

                If you changed the SA password, then you need to fix the password in the sqltool.rc file accordingly.

                You can, of course, also access the database with any JDBC client program. See the First JDBC Client Example appendix. You will need to modify your classpath to include hsqldb.jar as well as your client class(es). You can also use the other HSQLDB client programs, such as org.hsqldb.util.DatabasManagerSwing, a graphical client with a similar purpose to SqlTool.

                You can use any normal UNIX account to run the JDBC clients, including SqlTool, as long as the account has read access to the hsqldb.jar file and to an sqltool.rc file. See the SqlTool chapter about where to put sqltool.rc, how to execute sql files, and other SqlTool features.

                Create additional Accounts

                Connect to the database as SA (or any other Administrative user) and run CREATE USER to create new accounts for your database instance. HSQLDB accounts are database-instance-specific, not Server-specific.

                For the current version of HSQLDB, only users with Role of DBA may create or own database objects. DBA members have privileges to do anything. Non-DBAs may be granted some privileges, but may never create or own database objects. (Before long, non-DBAs will be able to create objects if they have permission to do so in the target schema). When you first create a hsqldb database, it has only one database user-- SA, a DBA account, with an empty string password. You should set a password (as described above). You can create as many additional users as you wish. To make a user a DBA, you can use the "ADMIN" option to the CREATE USER command, or GRANT the DBA Role to the account after creating it.

                If you create a user without the ADMIN tag (and without granting the DBA role to them) this user will be able to read the data dictionary tables, but will be able unable to create or own his own objects. He will have only the rights which the pseudo-user PUBLIC has. To give him more permissions, even rights to read objects, you can GRANT permissions for specific objects, grant Roles (which encompass a set of permissions), or grant the DBA Role itself.

                Since only people with a database account may do anything at all with the database, it is often useful to permit other database users to view the data in your tables. To optimize performance, reduce contention, and minimize administration, it is often best to grant SELECT to PUBLIC on any object that needs to be accessed by multiple database users (with the significant exception of any data which you want to keep secret).

                Shutdown

                Do a clean database shutdown when you are finished with the database instance. You need to connect up as SA or some other Admin user, of course. With SqlTool, you can run

                    java -jar path/to/hsqldb.jar --sql shutdown localhost-sa
                You don't have to worry about stopping the Server because it shuts down automatically when all served database instances are shut down.

                Running Hsqldb as a System Daemon

                You can, of course, run HSQLDB through inittab on System V UNIXes, but usually an init script is more convenient and manageable. This section explains how to set up and use our UNIX init script. Our init script is only for use by root. (That is not to say that the Server will run as root-- it usually should not).

                The main purpose of the init script is to start up a Server with the database instances specified in your server.properties file; and to shut down all of those instances plus additional urlids which you may (optionally) list in your init script config file. These urlids must all have entries in a sqltool.rc file. If, due to firewall issues, you want to run a WebServer instead of a Server, then make sure you have a healthy WebServer with a webserver.properties set up, adjust your URLs in sqltool.rc, and set TARGET_CLASS in the config file. (By following the commented examples in the config file, you can start up any number of Server and/or WebServer listeners with or without TLS ecryption).

                After you have the init script set up, root can use it anytime to start or stop HSQLDB. (I.e., not just at system bootup or shutdown).

                Portability of hsqldb init script

                The primary design criterion of the init script is portability. It does not print pretty color startup/shutdown messages as is common in late-model Linuxes and HPUX; and it does not keep subsystem state files or use the startup/shutdown functions supplied by many UNIXes, because these features are all non-portable.

                Offsetting these limitations, this one script does it's intended job great on the UNIX varieties I have tested, and can easily be modified to accommodate other UNIXes. While you don't have tight integration with OS-specific daemon administration guis, etc., you do have a well tested and well behaved script that gives good, utilitarian feedback.

                Init script Setup Procedure

                The strategy taken here is to get the init script to run your single Server or WebServer first (as specified by TARGET_CLASS). After that's working, you can customize the JVM that is run by running additional Servers in it, running your own application in it (embedding), or even overriding HSQLDB behavior with your own overriding classes.

                1. Copy the init script hsqldb from HSQLDB_HOME/bin into the directory where init scripts live on your variety of UNIX. The most common locations are /etc/init.d or /etc/rc.d/init.d on System V style UNIXes, /usr/local/etc/rc.d on BSD style UNIXes, and /Library/StartupItems/hsqldb on OS X (you'll need to create the directory for the last).

                2. Look at the comment towards the top of the init script which lists recommended locations for the configuration file for various UNIX platforms. Copy the sample config file HSQLDB_HOME/src/org/hsqldb/sample/sample-hsqldb.cfg to one of the listed locations (your choice). Edit the config file according to the instructions in it.

                  # $Id: sample-hsqldb.cfg,v 1.16 2005/07/24 18:33:13 unsaved Exp $
                  
                  # Sample configuration file for HSQLDB database server.
                  # See the "UNIX Quick Start" chapter of the Hsqldb User Guide.
                  
                  # N.b.!!!!  You must place this in the right location for your type of UNIX.
                  # See the init script "hsqldb" to see where this must be placed and
                  # what it should be renamed to.
                  
                  # This file is "sourced" by a Bourne shell, so use Bourne shell syntax.
                  
                  # This file WILL NOT WORK until you set (at least) the non-commented
                  # variables to the appropriate values for your system.
                  # Life will be easier if you avoid all filepaths with spaces or any other
                  # funny characters.  Don't ask for support if you ignore this advice.
                  
                  # Thanks to Meikel Bisping for his contributions.  -- Blaine
                  
                  JAVA_EXECUTABLE=/usr/bin/java
                  
                  # Unless you copied a hsqldb.jar file from another system, this typically
                  # resides at $HSQLDB_HOME/lib/hsqldb.jar, where $HSQLDB_HOME is your HSQLDB
                  # software base directory.
                  HSQLDB_JAR_PATH=/opt/hsqldb/lib/hsqldb.jar
                  
                  # Where the file "server.properties" resides.
                  SERVER_HOME=/opt/hsqldb/data
                  
                  # What UNIX user the server will run as.
                  # (The shutdown client is always run as root or the invoker of the init script).
                  # Runs as root by default, but you should take the time to set database file
                  # ownerships to another user and set that user name here.
                  HSQLDB_OWNER=hsqldb
                  
                  # The HSQLDB jar file specified in HSQLDB_JAR_PATH above will automatically
                  # be in the class path.  This arg specifies additional classpath elements.
                  # To embed your own application, add your jar file(s) or class base
                  # directories here, and add your main class to the INVOC_ADDL_ARGS setting
                  # below.
                  #SERVER_ADDL_CLASSPATH=/usr/local/dist/currencybank.jar
                  
                  # We require all Server/WebServer instances to be accessible within 
                  # $MAX_START_SECS from when the Server/WebServer is started.
                  # Defaults to 60.
                  # Raise this is you are running lots of DB instances or have a slow server.
                  #MAX_START_SECS=200
                  
                  # Time to allow for JVM to die after all HSQLDB instances stopped.
                  # Defaults to 1.
                  #MAX_TERMINATE_SECS=0
                  
                  # These are "urlid" values from a SqlTool authentication file
                  # ** IN ADDITION TO THOSE IN YOUR server.properties OR webserver.properties **
                  # file.  All server.urlid.X values from your properties file will automatically
                  # be started/stopped/tested.  $SHUTDOWN_URLIDS is for additional urlids which
                  # will stopped.  (Therefore, most users will not set this at all).
                  # Separate multiple values with white space.  NO OTHER SPECIAL CHARACTERS!
                  # Make sure to quote the entire value if it contains white space separator(s).
                  # Defaults to none (i.e., only urlids set in properties file will be stopped).
                  #SHUTDOWN_URLIDS='sa mygms'
                  
                  # SqlTool authentication file used only for shutdown.
                  # The default value will be sqltool.rc in root's home directory, since it is 
                  # root who runs the init script.
                  # (See the SqlTool chapter of the HSQLDB User Guide if you don't understand 
                  # this).
                  #AUTH_FILE=/home/blaine/sqltool.rc
                  
                  # Set this to either 'WebServer' or 'Server'.  Defaults to Server.
                  # The JVM that is started can invoke many classes (see the following item
                  # about that), but this is the Server that is used (1) to check status,
                  # (2) to shut down the JVM, (3) to get urlids for #1 from the 
                  # server's server/webserver.properties file.
                  #TARGET_CLASS=WebServer
                  # Note that you don't specify the org.hsqldb package, since you have no 
                  # choice in the matter (you can only run org.hsqldb.Server or 
                  # org.hsqldb.WebServer).  If you specify additional classes with
                  # INVOC_ADDL_ARGS (described next), you do need to specify the
                  # full class name with package name.
                  
                  # This is where you specify exactly what your HSQLDB JVM will run.
                  # The class org.hsqldb.util.MainInvoker will run the TARGET_CLASS
                  # specified above with any arguments supplied here + any other classes
                  # and arguments.  Every additional class (in addition to the TARGET_CLASS)
                  # must be preceded with an empty string, so that MainInvoker will know
                  # you are giving a class name.  MainInvoker will invoke the normal 
                  # static main(String[]) method of each such class.  
                  # By default, MainInvoker will just run TARGET_CLASS with no args.
                  # Example that runs just the TARGET_CLASS with the specified arguments:
                  #INVOC_ADDL_ARGS='-silent false'
                  # Example that runs the TARGET_CLASS plus a WebServer:
                  #INVOC_ADDL_ARGS='"" org.hsqldb.WebServer'
                  # Note the empty string preceding the class name.
                  # Example that starts TARGET_CLASS with an argument + a WebServer +
                  # your own application with its args (i.e., the HSQLDB Servers are
                  # "embedded" in your application).  (Set SERVER_ADDL_CLASSPATH too).:
                  #INVOC_ADDL_ARGS='-silent false "" org.hsqldb.WebServer "" com.acme.Stone --env prod localhost'
                  # Example to run a non-TLS server in same JVM with a TLS server.  In this
                  # case, TARGET_CLASS is Server which will run in TLS mode by virtue of 
                  # setting TLS_KEYSTORE and TLS_PASSWORD above.  The "additional" Server
                  # here overrides the 'tls' and 'port' settings:
                  #INVOC_ADDL_ARGS="'' org.hsqldb.Server -port 9002 -tls false"
                  # Note that you use nested quotes to group arguments and to specify the
                  # empty-string delimiter.
                  
                  # For TLS encryption for your Server, set these two variables.
                  # N.b.:  If you set these, then make this file unreadable to non-root users!!!!
                  # See the TLS chapter of the HSQLDB User Guide, paying attention to the 
                  # security warning(s).
                  # If you are running with a private server cert, then you will also need to 
                  # set "truststore" in the your SqlTool config file (location is set by the
                  # AUTH_FILE variable in this file, or it must be at the default location for 
                  # HSQLDB_OWNER).
                  #TLS_KEYSTORE=/path/to/jks/server.store
                  #TLS_PASSWORD=password
                  
                  # Any JVM args for the invocation of the JDBC client used to verify DB
                  # instances and to shut them down (SqlToolSprayer).
                  # This example specifies the location of a private trust store for TLS 
                  # encryption.
                  # For multiple args, put quotes around entire value.
                  #CLIENT_JVMARGS=-Djavax.net.debug=ssl
                  
                  # Any JVM args for the server.
                  # For multiple args, put quotes around entire value.
                  #SERVER_JVMARGS=-Xmx512m
                  
                3. Either copy HSQLDB_OWNER's sqltool.rc file into root's home directory, or set the value of AUTH_FILE to the absolute path of HSQLDB_OWNER's sqltool.rc file. This file is read (for stops) directly by root, even if you run hsqldb as non-root (by setting HSQLDB_OWNER in the config file). If you copy the file, make sure to use chmod to restrict permissions on the new copy. (The init script now enforces permissions on this file).

                4. Edit your server.properties file. For every server.database.X that you have defined, set a property of name server.urlid.X to the urlid for an Administrative user for that database instance.

                  Example 3.1. server.properties fragment

                      server.database.0=file://home/hsqldb/data/db1
                      server.urlid.0=localhostdb1

                  Warning

                  Make sure to add a urlid for each and every database instance. If you don't then the init script will never know about databases that become inaccessible and will give false diagnostics.

                  For this example, you would need to define the urlid localhostdb1 in your sqltool.rc file.

                  Example 3.2. example sqltool.rc stanza

                      urlid localhostdb1
                      url jdbc:hsqldb:hsql://localhost
                      username sa
                      password secret
                5. Verify that the init script works.

                  Just run

                      /path/to/hsqldb
                  as root to see the arguments you may use. Notice that you can run

                      /path/to/hsqldb status

                  at any time to see whether your HSQLDB Server is running.

                  Re-run the script with each of the possible arguments to really test it good. If anything doesn't work right, then see the Troubleshooting the Init Script section.

                6. Tell your OS to run the init script upon system startup and shutdown. If you are using a UNIX variant that has /etc/rc.conf or /etc/rc.conf.local (like BSD variants and Gentoo), you must set "hsqldb_enable" to "YES" in either of those files. (Just run cd /etc; ls rc.conf rc.conf.local to see if you have one of these files). For good UNIXes that use System V style init, you must set up hard links or soft links either manually or with management tools (such as chkconfig or insserv) or Gui's (like run level editors).

                  This paragraph is for Mac OS X users only. If you followed the instructions above, your init script should reside at /Library/StartupItems/hsqldb/hsqldb. Now copy the file StartupParameters.plist from the directory src/org.hsqldb/sample of your HSQLDB distribution to the same directory as the init script. As long as these two files reside in /Library/StartupItems/hsqldb, your init script is active (for portability reasons, it doesn't check for a setting in /etc/hostconfig). You can run it as a Startup Item by running

                      SystemStarter {start|stop|restart} Hsqldb
                  Hsqldb is the service name. See the man page for SystemStarter. To disable the init script, wipe out the /Library/StartupItems/hsqldb directory. Hard to believe, but the Mac people tell me that during system shutdown the Startup Items don't run at all. Therefore, if you don't want your data corrupted, make sure to run "SystemStarter stop Hsqldb" before shutting down your Mac.

                Follow the examples in the config file to add additional classes to the server JVM's classpath and to execute additional classes in your JVM. (See the SERVER_ADDL_CLASSPATH and INVOC_ADDL_ARGS items).

                Troubleshooting the Init Script

                Do a ps to look for processes containing the string hsqldb, and try to connect to the database from any client. If the init script starts up your database successfully, but incorrectly reports that it has not, then your problem is with specification of urlid(s) or SqlTool setup. If your database really did not start, then skip to the next paragraph. Verify that the urlid(s) listed in the server.properties or webserver.properties are correct. and verify that you can run SqlTool as root to connect to the instances. (For the latter test, use the --rcfile switch if you are setting AUTH_FILE in the init script config file).

                If your database really is not starting, then verify that you can su to the database owner account and start the database. The command su USERNAME -c ... won't work on most UNIXes unless the target user has a real login shell. Therefore, if you try to tighten up security by disabling this user's login shell, you will break the init script. If these possibilities don't pan out, then debug the init script or seek help, as described below.

                To debug the init script, run it in verbose mode to see exactly what is happening (and perhaps manually run the steps that are suspect). To run an init script (in fact, any sh shell script) in verbose mode, use sh with the -x or -v switch, like

                    sh -x path/to/hsqldb start
                See the man page for sh if you don't know the difference between -v and -x.

                If you want troubleshooting help, use the HSQLDB lists/forums or email me at blaine.simpson@admc.com. If you email me, make sure to include the revision number from your hsqldb init script (it's towards the top in the line that starts like "# $Id:"), and the output of a run of

                    sh -x path/to/hsqldb start > /tmp/hstart.log 2>&1

                hsqldb-1.8.0.10.orig/doc/guide/index.html0000644000175000017500000007052510665324665016504 0ustar renereneHsqldb User Guide

                Hsqldb User Guide

                The HSQLDB Development Group

                Edited by

                Blaine Simpson

                Fred Toussi

                Copyright 2002-2007 HSQLDB Development Group. Permission is granted to distribute this document without any alteration under the terms of the HSQLDB license.

                $Date: 2007/08/28 12:13:28 $


                Table of Contents

                Introduction
                Available formats for this document
                1. Running and Using Hsqldb
                Introduction
                Running Tools
                Running Hsqldb
                Server Modes
                Hsqldb Server
                Hsqldb Web Server
                Hsqldb Servlet
                In-Process (Standalone) Mode
                Memory-Only Databases
                General
                Closing the Database
                Using Multiple Databases in One JVM
                Creating a New Database
                Using the Database Engine
                Different Types of Tables
                Constraints and Indexes
                SQL Support
                JDBC Support
                2. SQL Issues
                Purpose
                SQL Standard Support
                Constraints and Indexes
                Primary Key Constraints
                Unique Constraints
                Unique Indexes
                FOREIGN KEYS
                Indexes and Query Speed
                Where Condition or Join
                Subqueries and Joins
                Types and Arithmetic Operations
                Integral Types
                Other Numeric Types
                Bit and Boolean Types
                Storage and Handling of Java Objects
                Type Size, Precision and Scale
                Sequences and Identity
                Identity Auto-Increment Columns
                Sequences
                Issues with Transactions
                New Features and Changes
                3. UNIX Quick Start
                Purpose
                Installation
                Setting up Database Instance and Server
                Accessing your Database
                Create additional Accounts
                Shutdown
                Running Hsqldb as a System Daemon
                Portability of hsqldb init script
                Init script Setup Procedure
                Troubleshooting the Init Script
                4. Advanced Topics
                Purpose
                Connections
                Connection properties
                Properties Files
                Server and Web Server Properties
                Starting a Server from your application
                Individual Database Properties
                SQL Commands for Database Properties
                5. Deployment Issues
                Purpose
                Mode of Operation and Tables
                Mode of Operation
                Tables
                Large Objects
                Deployment context
                Memory and Disk Use
                Cache Memory Allocation
                Managing Database Connections
                Upgrading Databases
                Upgrading Using the SCRIPT Command
                Manual Changes to the .script File
                Backing Up Databases
                6. Text Tables
                The Implementation
                Definition of Tables
                Scope and Reassignment
                Null Values in Columns of Text Tables
                Configuration
                Disconnecting Text Tables
                Text File Issues
                Text File Global Properties
                Importing from a Text Table file
                7. TLS
                Requirements
                Encrypting your JDBC connection
                Client-Side
                Server-Side
                JSSE
                Making a Private-key Keystore
                CA-Signed Cert
                Non-CA-Signed Cert
                Automatic Server or WebServer startup on UNIX
                8. SqlTool
                Purpose, Coverage, Changes in Behavior
                Platforms and SqlTool versions covered
                Functional Changes
                The Bare Minimum
                Non-displayable Types
                Desktop shortcuts
                Loading sample data
                RC File Authentication Setup
                Using Inline RC Authentication
                Using the current version of SqlTool with an older HSQLDB distribution.
                Interactive Usage
                Command Types
                Command Types
                Special Commands
                Edit Buffer / History Commands
                PL Commands
                ? Variable
                Storing and retrieving binary files
                Command History
                Shell scripting and command-line piping
                Emulating Non-Interactive mode
                Non-Interactive
                Giving SQL on the Command Line
                SQL Files
                Piping and shell scripting
                Optimally Compatible SQL Files
                Comments
                Special Commands and Edit Buffer Commands in SQL Files
                Automation
                Getting Interactive Functionality with SQL Files
                Character Encoding
                Generating Text or HTML Reports
                SqlTool Procedural Language
                Variables
                PL Aliases
                Logical Expressions
                Flow Control
                Chunking
                Why?
                How?
                Raw Mode
                PL/SQL
                Using hsqltool.jar and hsqldbutil.jar
                Delimiter-Separated-Value Imports and Exports
                Simple DSV exports and imports using default settings
                Specifying queries and options
                Unit Testing SqlTool
                9. SQL Syntax
                Notational Conventions Used in this Chapter
                SQL Commands
                ALTER INDEX
                ALTER SEQUENCE
                ALTER SCHEMA
                ALTER TABLE
                ALTER USER
                CALL
                CHECKPOINT
                COMMIT
                CONNECT
                CREATE ALIAS
                CREATE INDEX
                CREATE ROLE
                CREATE SCHEMA
                CREATE SEQUENCE
                CREATE TABLE
                CREATE TRIGGER
                CREATE USER
                CREATE VIEW
                DELETE
                DISCONNECT
                DROP INDEX
                DROP ROLE
                DROP SEQUENCE
                DROP SCHEMA
                DROP TABLE
                DROP TRIGGER
                DROP USER
                DROP VIEW
                EXPLAIN PLAN
                GRANT
                INSERT
                REVOKE
                ROLLBACK
                SAVEPOINT
                SCRIPT
                SELECT
                SET AUTOCOMMIT
                SET DATABASE COLLATION
                SET CHECKPOINT DEFRAG
                SET IGNORECASE
                SET INITIAL SCHEMA
                SET LOGSIZE
                SET MAXROWS
                SET PASSWORD
                SET PROPERTY
                SET READONLY
                SET REFERENTIAL INTEGRITY
                SET SCHEMA
                SET SCRIPTFORMAT
                SET TABLE INDEX
                SET TABLE READONLY
                SET TABLE SOURCE
                SET WRITE DELAY
                SHUTDOWN
                UPDATE
                Schema object naming
                Data Types
                SQL Comments
                Stored Procedures / Functions
                Built-in Functions and Stored Procedures
                SQL Expression
                A. Building HSQLDB
                Purpose
                Building with Ant
                Obtaining Ant
                Building Hsqldb with Ant
                Building with DOS Batch Files
                Hsqldb CodeSwitcher
                Building documentation
                B. First JDBC Client Example
                C. Hsqldb Database Files and Recovery
                States
                Procedures
                Clean Shutdown
                Startup
                Repair
                D. Running Hsqldb with OpenOffice.org 1.1.x
                Introduction
                Installing
                Setting up OpenOffice.org
                On Windows
                On Linux
                E. Hsqldb Test Utility
                F. Database Manager
                Brief Introduction
                Auto tree-update
                Automatic Connection
                RC File
                Using the current DatabaseManagers with an older HSQLDB distribution.
                DatabaseManagerSwing as an Applet
                G. Transfer Tool
                Brief Introduction
                hsqldb-1.8.0.10.orig/doc/guide/apd.html0000644000175000017500000002161610665324664016135 0ustar renereneAppendix D. Running Hsqldb with OpenOffice.org 1.1.x

                Appendix D. Running Hsqldb with OpenOffice.org 1.1.x

                Hermann Kienlein

                EDV - Systeme Kienlein

                Copyright 2003-2004 Hermann Kienlein. Permission is granted to distribute this document without any alteration under the terms of the HSQLDB license. Additional permission is granted to the HSQLDB Development Group to distribute this document with or without alterations under the terms of the HSQLDB license.

                $Date: 2005/06/08 16:02:34 $

                Introduction

                HSQLDB can now act as a Database with OpenOffice.org. This document is written to help you connecting and running HSQLDB out of OpenOffice.org in a simple way. Without user-managment and only for your single-system.

                If you have problems read the other available documents, because I will not write them here again. If you need a real DB-System with user-management and different rights for different users, read the other documents.

                HSQLDB is included with OpenOffice.org 2.0 and is used by default. Please refer to standard OpenOffice.org 2.0 documentation on how to use HSQLDB with this version.

                Installing

                I assume you have a running OpenOffice.org (OOo) and a JavaRuntimeEnvironment. So place the hsqldb_*.zip file where you want on your disk and unpack it (I assume you have done this already).

                Setting up OpenOffice.org

                Start OOo with a text document and go to the Database-Explorer (simply by pressing F4). In the left frame you see a tree-view with all known databases in OOo.

                A right mouse-click opens a menu where you can manage your databases. So click on New Database and choose a name that you want to have inside OOo. I chose HSQLDB as name.

                As connection-type choose JDBC and then switch to the JDBC-tab.

                As Driver-Class insert org.hsqldb.jdbcDriver and as URL choose the following:

                On Windows

                You can specify a directory where HSQLDB should store the info and data. Something like jdbc:hsqldb:file:c:\javasrc\hsqldb-dev\databasename (where jdbc: is written by OOo). The string c:\javasrc\hsqldb-dev\databasename works only on windows, but you can write this down as linux-path like /javasrc/hsqldb-dev/databasename too. Then HSQLDB takes the c:\ drive as root. This means this works only on c:\ for you.

                The first is the directory-path and the databasename is the identifier for the database.

                On Linux

                Choose a path as said for windows like /opt/db/data

                As username take sa, this is the standard-administrator for HSQLDB.

                Now click the OK-Button

                Now OOo has to find your hsqldb.jar file. So go to options => security and insert the path to the .jar file. If you have problems, search the Online-help for JDBC. You then get help in your own language (this is generally quite better than my English, I think ;-)

                If you cannot write to your Tables, OOo thinks that you don't have permission to write to HSQLDB. Then we tell OOo to ignore the DriverPrivileges because on our single-user-system we do not need them.

                Because OOo is working on this, the next Step is only needed for systems without write - permission.

                So we go to http://dba.openoffice.org and look at the IgnoreDriverPrivileges.html file in the HowTo-section. You find here a macro-code.

                Open tools => macro in OOo to get the Basic-IDE. Here simple copy and paste the code and run the macro. You see a input-box where you only have to insert the name of your DB, in my example I have to insert HSQLDB, because I took this as name in OOo.

                Note that if you change your OOo-DB name, you have to run this macro again!

                Now we only have to stop and restart OOo. Be sure that you exit Quickstarter and all running processes too. On next OOo-Start you should have a running Database in OpenOffice.org.

                hsqldb-1.8.0.10.orig/doc/guide/ape.html0000644000175000017500000001471510665324664016140 0ustar renereneAppendix E. Hsqldb Test Utility

                Appendix E. Hsqldb Test Utility

                $Date: 2005/05/27 12:41:50 $

                The org.hsqldb.test package contains a number of tests for various functions of the database engine. Among these, the TestSelf class performs the tests that are based on scripts. To run the tests, you should compile the hsqldbtest.jar target with Ant.

                For TestSelf, a batch file is provided in the testrun/hsqldb directory, together with a set of TestSelf*.txt files. To start the application in Windows, change to the directory and type:

                    runtest TestSelf

                In Unix / Linux, type:

                    ./runTest.sh TestSelf

                The new version of TestSelf runs multiple SQL test files to test different SQL operations of the database. All files in the working directory with names matching TestSelf*.txt are processed in alphabetical order.

                You can add your own scripts to test different series of SQL queries. The format of the TestSelf*.txt file is simple text, with some indentation and prefixes in the form of Java-style comments. The prefixes indicate what the expected result should be.

                • Comment lines must start with -- and are ignored

                • Lines starting with spaces are the continuation of the previous line

                • SQL statements with no prefix are simply executed.

                • The remaining items in this list exemplify use of the available command line-prefixes.

                • The /*s*/ option stands for silent. It is used for executing quries regardless of results. Used for preparation of tests, not for actual tests.

                  /*s*/ Any SQL statement - errors are ignored
                • The /*c<rows>*/ option is for SELECT queries and asserts the number of rows in the result matches the given count.

                  /*c<rows>*/ SQL statement returning count of <rows>
                • The /*u*/ option is for queries that return an update count, such as DELETE and UPDATE. It asserts the update count matches.

                  /*u<count>*/ SQL statement returning an update count equal to <count>
                • The /*e*/ option asserts that the given query results in an erros. It is mainly used for testing the error detection capabilities of the engine. It can also be used with syntactically valid queries to assert a certain state in the database. For example a CREATE TABLE can be used to assert the table of the same name already exists.

                  /*e*/ SQL statement that should produce an error when executing
                • The /*r....*/ option asserts the SELECT query returns a single row containing the given set of field values.

                  /*r<string1>,<string2>*/ SQL statement returning a single row ResultSet equal to the specified value
                • The extended /*r...*/ option asserts the SELECT query returns the given rows containing the given set of field values.

                  /*r
                      <string1>,<string2>
                      <string1>,<string2>
                      <string1>,<string2>
                  */ SQL statement returning a multiple row ResultSet equal to the specified values

                  (note that the result set lines are indented).

                • All the options are lowercase letters. During development, an uppercase can be used for a given test to exclude a test from the test run. The utility will just report the test blocks that have been excluded without running them. Once the code has been developed, the option can be turned into lowercase to perform the actual test.

                See the TestSelf*.txt files in the /testrun/hsqldb/ directory for actual examples.

                hsqldb-1.8.0.10.orig/doc/guide/guide.css0000644000175000017500000000327510665324631016305 0ustar renerene/* COMMENT: The shared.css stylesheet for the hsqldb/docs directory and elsewhere *? /* This material is published under the Copyrights and Licenses listed at */ /* and in the directory /hsqldb/docs/hypersonic_lic.txt */ a:visited { color: #083194; } span.guimenu { font-family: monospace; font-style: italic; font-weight: bold; } span.guimenuitem { font-family: monospace; font-style: italic; font-weight: bold; } span.guilabel { font-family: monospace; font-style: italic; font-weight: bold; } span.guibutton { font-family: monospace; font-style: italic; font-weight: bold; } span.guiicon { font-family: monospace; font-style: italic; font-weight: bold; } span.guisubmenu { font-family: monospace; font-style: italic; font-weight: bold; } span.term { font-family: monospace; font-weight: bold; background: #083194; color: white; padding: 1px; } span.term a { font-family: monospace; font-weight: bold; background: #083194; color: white; padding: 1px; } div.caption { font-size: 80%; } div.important { background: yellow; } div.warning { background: red; } div.caution { background: #ffb573; } pre.programlisting { background-color: silver; padding: 5px; } pre.screen { background-color: #BDC6DE; padding: 5px; } h1.title { font-size: 200%; } div.chapter h2.title { font-size: 170%; font-weight: bold; color: black; background: white; padding: 2px; border: 2px solid #083194; } div.section h2.title { font-size: 140%; font-weight: bold; color: #083194; background: white; padding: 2px; border: none; } span.remark { font-weight: bold; color: orange; } hsqldb-1.8.0.10.orig/doc/hsqlSoftwareLinks.html0000644000175000017500000000556110036532315017742 0ustar renerene

                ANNOUNCEMENTS OF SOME ADDITIONAL SOFTWARE THAT CAN POSSIBLY BE USED WITH HSQLDB

                 

                This document is a compilation of some information that has been submitted to HSQLDB mailing lists or forums. The HSQLDB project or its developers are not responsible for the software mentioned in this document, its suitability for any purpose, or the accuracy of the information provided in this document.


                LightCrypto is a set of Open Source Java
                classes with basic cryptographic routines using the BouncyCastle lightweight API.

                It uses a minimal amount of memory so it can be used with J2ME, browser applets, on small Java devices such as PDA's or Java enabled mobile phones or in any other situation where Sun's JCE (Java Cryptographic
                Extensions) is too heavy for the job.

                Hsqldb-ready functions are also included.

                Feature list:

                # Create digest from strings and files with MD5 (default), SHA-1, SHA-256 , SHA-512 or RIPEMD160 hash algorithms
                # Encrypt/Decrypt strings and files using the AES (lightweight implementation) algorithm with any keylength (default 128 bits) in CBC mode with PKCS12 padding.
                # Encrypts the symmetric keystore and protects it with a passphrase (PBE)
                # Functions to hash/encrypt/decrypt data in HSQLDB embeddable database engine using SQL statements.
                # Open Source
                # 100% Java
                # Uses the BouncyCastle.org lightweight API instead of Sun's JCE (Java Cryptographic Extensions)

                Homepage: http://jcetaglib.sourceforge.net/lightcrypto/

                Beta 1 (including HSqldb routines + examples) has been released and can be downloaded on
                http://sourceforge.net/project/showfiles.php?group_id=60642


                Open source, lightweight cryptography extensions to Java for use with LightCrypto or HSQLDB for SSL access can be found here:

                http://www.bouncycastle.org/


                The open-source FormattedDataSet may be the easiest way to generate dynamic text such as HTML, and XML.

                I just deployed a demo WAR that allows developers to enter any hsqldb join and render the results as an HTML table that can be sorted by clicking on the column headers. I picked hsqldb for my database as I didn't want anyone that installed the war to have to worry about installing a database.

                The demo also times opening/closing Connections, ResultSets and Statements. This WAR would be useful for you guys to give out to demonstrate your database.

                The demo works with any RDBMS.

                Check it out at http://www.fdsapi.com and select the live demo link.

                 

                 

                hsqldb-1.8.0.10.orig/doc/zaurus/0000755000175000017500000000000010242420102014700 5ustar renerenehsqldb-1.8.0.10.orig/doc/zaurus/installation.html0000644000175000017500000000363707554521204020321 0ustar renerene Installing HSQLDB on Sharp Zaurus
                Index

                Installing HSQLDB on Sharp


                The ipkg-package java-hsqldb_xxx_arm.ipk (where xxx stands for the actual version number) is installed on Sharp Zaurus following the standard installation procedure.

                The ipkg-package contains the following directory structure and files:

                home/ QtPalmtop/ apps/ Jeode/ hsqldb.desktop
                home/ QtPalmtop/ bin/ runhsqldb
                home/ QtPalmtop/ java/ hsqldbz.jar
                home/ QtPalmtop/ pics/ hsqldb.png
                home/ root/ hsqldb/ readme
                home/ QtPalmtop/ help/ html/ hsqldb/ *.html
                home/ QtPalmtop/ help/ html/ hsqldb/ images/*.gif, *.jpeg, *.png

                The databases and scripts are stored in /home/root/hsqldb


                Ulrich Vollert
                hsqldb-1.8.0.10.orig/doc/zaurus/org.hsqldb.util.ZaurusEditor.html0000644000175000017500000001312407554521204023266 0ustar renerene Class org.hsqldb.util.ZaurusEditor
                Index

                Class org.hsqldb.util.ZaurusEditor

                org.hsqldb.util.ZaurusEditor
                

                public class ZaurusEditor
                ZaurusEditor implements an search/input/edit form to search/view/update/insert table records.


                Constructor Index

                 o ZaurusEditor()
                Constructor declaration

                Method Index

                 o actionPerformed(ActionEvent)
                actionPerformed method is the main entry point which interprets the buttons and initiates the actions.
                 o clearStatus()
                The class method clearStatus deletes the status line.
                 o printStatus(String)
                printStatus prints a text into the status line below the panel.
                 o refresh(Connection)
                refresh will read again the meta data of the actual database.

                Constructors

                 o ZaurusEditor
                 public ZaurusEditor()
                
                Constructor declaration

                Methods

                 o printStatus
                 public static void printStatus(String text)
                
                printStatus prints a text into the status line below the panel.

                Parameters:
                text - a String value will be shown
                 o clearStatus
                 public static void clearStatus()
                
                The class method clearStatus deletes the status line.

                 o actionPerformed
                 public void actionPerformed(ActionEvent e)
                
                actionPerformed method is the main entry point which interprets the buttons and initiates the actions.

                Parameters:
                e - an ActionEvent value is been sent to ZaurusEditor as ActionListener

                The possible events are:

                • Buttons on the search panel:
                  Search Row
                  Starts the search of rows in the choosen table with the given search words and search options. Without any search words, all rows will be found.
                  If no row meets the criteria, there will be a message in the status line.
                  New Row
                  An empty input panel for the choosen table is given. Any search words are ignored.
                • Buttons on the edit panel:
                  Any changes to field values on this panel will be updated to the table when the actual row is left, i. e. when pressing one of the buttons 'Prev', 'Next' or 'Search'.
                  Cancel
                  Any changes to field contents are canceled and reset to the previous values.
                  Prev
                  Show the previous row which meets the search criteria.
                  Next
                  Show the next row which meets the search criteria.
                  Delete
                  This button has to be clicked twice and the shown row will be deleted from the table
                  Search
                  With this button a new search is initiated. Any changes made to field contents are saved
                • Buttons on the insert panel:
                  Cancel Insert
                  After beginning to fill a new row, the insert may be cancelled. The search panel will be shown next.
                  New Insert
                  The new row is inserted into the table and a new empty insert panel is shown.
                  New Search
                  The new row is inserted into the table and the search panel is shown again.
                 o refresh
                 public void refresh(Connection c)
                
                refresh will read again the meta data of the actual database. This is useful after changes of the table structures for instance creating or dropping tables, or altering tabel. The method will be called if one asks to refresh the tree or if the connection to the database is changed.

                Parameters:
                c - a Connection is the actual connection to the database

                Index
                hsqldb-1.8.0.10.orig/doc/zaurus/building.html0000644000175000017500000000313707601727771017422 0ustar renerene Building HSQLDB
                Index

                Building HSQL Database for Sharp

                Get the actual version of HSQLDB at sourceforge.net

                For version 1.7.1, you need Ant Ant and a Java Development Kit 1.1. Version 1.7.2 should be compiled with JKD 1.3.1.

                Go to the directory $HSQLDB/build/ and build the jar-file for Sharp Zaurus with the command

                ant jarzaurus

                The directory subtree $HSQLDB/build/packaging/zaurus/package/ contains the necessary directories and files to build an ipkg-package for Sharp Zaurus on a Linux system. Make the ipkg-package by submitting the following command in the directory $HSQLDB/build/packaging/zaurus/

                makePackage

                Ulrich Vollert
                hsqldb-1.8.0.10.orig/doc/zaurus/images/0000755000175000017500000000000010242420102016145 5ustar renerenehsqldb-1.8.0.10.orig/doc/zaurus/images/red-ball-small.gif0000644000175000017500000000037707554521204021454 0ustar renereneGIF89a{BkJc{BRJB9{9Z1{RB)R9)1!cB)ZB1cƽ11Z!Js1s!JJcck!1J!,@p  !2X 'T*I8l;hsqldb-1.8.0.10.orig/doc/zaurus/images/treeBut.png0000644000175000017500000000051507554521204020307 0ustar renerenePNG  IHDR7!WbKGD pHYs  d_tIME  HbIDATx1 0 E咃:X> =CFnZ-Ǘ(03`2ADm|E40(UKΙSJ&_qZqZq "겔$h!K5cDy7ʥRuiMtA?cY҆RCwܑҏcX!(YzZ؛rdR d\b@OIENDB`hsqldb-1.8.0.10.orig/doc/zaurus/images/commandBut.png0000644000175000017500000000053407554521204020767 0ustar renerenePNG  IHDR7CbKGD pHYs  #utIME %`KIDATx10 EMpc:0(,"RRrbދADknǓt`fA\kk*eY{hMK:e=݃! e0]a9n%X H슽?MDhl-ol<}=͉ݔӃ,egPP2+[g.u5cwVOA9ql̒H(%\ NiIENDB`hsqldb-1.8.0.10.orig/doc/zaurus/images/red_up.gif0000644000175000017500000000110407554521204020127 0ustar renereneGIF89a릦렠]]峳㔔ߠzzNN==XXSSKK,,NN::44!!4477,@2:EJZih&@9=91!>EX33B:JCSh:JZW""3:Ћ!IT`[I9߆W8XާǾ-3XaiZSr9&-W'RXb-IdF%'P<) M ;hsqldb-1.8.0.10.orig/doc/zaurus/images/constructor-index.gif0000644000175000017500000000325707554521204022356 0ustar renereneGIF89a&3f3333f333ff3fffff3f3f̙3f3333f3333333333f3333333f3f33ff3f3f3f3333f3333333f3̙333333f333ff3ffffff3f33f3ff3f3f3ffff3fffffffffff3fffffff3fff̙ffff3fffff3f̙3333f33̙3ff3ffff̙f3f̙3f̙̙3f̙3f3333f333ff3fffff̙̙3̙f̙̙̙3f̙3f3f3333f333ff3fffff3f3f̙3f (((555CCCPPP]]]kkkxxx!,& H*\ȰÇ#^@ŋ3jȱcBC"Rɓ(SHʍ-]|Xr͛*[Ĩs'C)e(Q=L*ҧ4B]tTUj]zu+ג11׳-Y]CEKԭݟEk Xm8xܜk;gDž'Wa[.yM;KX0Rɞ<#㴯e-3e;Z4lͨc3:x` Vqk_ޭ79FWSC~NƟH~}=:^(zyןux2`E6m~59WrXXp7q b7^'u}*'|ȹxa^}0$H/N8ZE8fh}9פ Z7"&^9&58'!i!GN6|h[J݂}gIhڍ7w>'J jqf'} ɧ)kz:[Jdg>-ٗYfB*`Ҧ%~9&Fi, H%yȣD/IƤ+[+{n){~͢ pX_oK|qڥ$ zY鸪7~^nq<2?LpGmt;4뮛kgp4Erc}>M0*7=2L.hd0u&L`Dln,w[|SX_7B 8tte~^˝vؖ'+)k:Z/n6Nf36ʫ{CxyƻoIhOw7PkzWognwOއ/Mo觯~;hsqldb-1.8.0.10.orig/doc/zaurus/images/editorBut.png0000644000175000017500000000052207554521204020634 0ustar renerenePNG  IHDR6>bKGD pHYs  d_tIME [IDATx; @Mp!#GȐp }uh*Q7Dy2f@ " 7&@D>̖Z>J9nMs)RY+h^Lb;4~"y.D,16;;+[kt[k1oО^X urC'A-KQk=D`E8# tt8LIENDB`hsqldb-1.8.0.10.orig/doc/zaurus/images/green-ball-small.gif0000644000175000017500000000014607554521204021774 0ustar renereneGIF89a¿22.W""d\!,0DMqFxRF;hsqldb-1.8.0.10.orig/doc/zaurus/images/constructors.gif0000644000175000017500000000303507554521204021426 0ustar renereneGIF89a&3f3333f333ff3fffff3f3f̙3f3333f3333333333f3333333f3f33ff3f3f3f3333f3333333f3̙333333f333ff3ffffff3f33f3ff3f3f3ffff3fffffffffff3fffffff3fff̙ffff3fffff3f̙3333f33̙3ff3ffff̙f3f̙3f̙̙3f̙3f3333f333ff3fffff̙̙3̙f̙̙̙3f̙3f3f3333f333ff3fffff3f3f̙3f (((555CCCPPP]]]kkkxxx!,& H*\ȰaAJHŋ3jxbD -B Iɓ =~Drʖ0cTrI+mI'Ϟ 1(Q>*]j浤L:J'ΫPjjբ_bHgMذ 4RAe*p*]| ۍl5Wզ1cq ly1[ƒK[h/6r叩A)4Zʇ5ߞYݘ.znÑ>7U/zrlԩ o~=%z\!gġÿ=4i~]s}'|9]ۥ߁'^_y-i_E(ngxwلu8^~XK$"h *6&brg^Yb-.~;ږsC淢dAƇctǝF!Z[cybn  k+0+lqbm6oJ2$nHYZ-+w1j3/%E!7`A7T#oNWm@![1WwuAdȨ`Sp tm;hsqldb-1.8.0.10.orig/doc/zaurus/images/yellow-ball.gif0000644000175000017500000000163507554521204021105 0ustar renereneGIF89a ·fffooo[VVV?{ddd[xpkZSW*!1ovb%$J)%oQQKQѷq@6i* mdc]A&)2 ݬ^7{Bc{1̂!WZ^cƽZYJJssqsEJJckk1{BkJc{BRJB9{9Z1{RB)R9)1!cB)ZB1cƽ11Z!Js1s!JJcck!1Jlc/OO޳Ҵڥ PrE\\""R-˚2""k#Uk/d_@{hdFp2̺UݠVkrzsg»iii14(!ZcZJssJKJec!, zH 2dĀQp`B1 yf)SA$TTbe,XHٚeRS(bE)A* ;hsqldb-1.8.0.10.orig/doc/zaurus/images/sqlDML.gif0000644000175000017500000000224707554521204020016 0ustar renereneGIF89a4,,4,H A\Ȱ!C&HË$XcB r豤;4IC(B\r˅0c"̉fM7D̟Jj&D6$iU] U'C;WhFpv-mܻ0[{Wn]ͻNWga;Ӣ57㬆ۚ,nE׍fIusNN:\# sU1x䪗(|8u׹C|wuic^}k}m{/c}dHwyr^{w/gHTDy'8y7KNHaMn Ic4JhcuaX,VzڕGܜQ9eww[2uz-%qO)Cg}ZYHu7qN{mǠ~MizZaBh#t1bhR-2h"@=^%I:)ۏ1m&eMP;hsqldb-1.8.0.10.orig/doc/zaurus/images/red-ball.gif0000644000175000017500000000101707554521204020336 0ustar renereneGIF89a ·fffooo[VVV?{ddd{Bc{1!WZ^cƽZYJJssqsEJJckk1{BkJc{BRJB9{9Z1{RB)R9)1!cB)ZB1cƽ11Z!Js1s!JJcck!1J!, l789987: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%c ōqF qĈʨ AҐ3M#RHYqMQJ7­ w!y3c `5Po;2Fp x@fd2RN{t.;xGߗ(h}/C2/ش]ݼOY8wixD՟Z+[^6qxue6E"w,qwC9߬ی ؅n?e?ehsqldb-1.8.0.10.orig/doc/zaurus/images/yellow-ball-small.gif0000644000175000017500000000037707554521204022215 0ustar renereneGIF89a{Bc{1!WZ^cƽZYJJssqsEJJckk1!,@p a "TP(#RI(l;hsqldb-1.8.0.10.orig/doc/zaurus/images/sqlSecurity.gif0000644000175000017500000000225707554521204021212 0ustar renereneGIF89a3*,3*H A\ȰC #JDbʼn%Zx0Lj-~0dC(K2J-c)7JDM7sN>&0)Q ,4ML:P0TXV% Y&BgEݲA|\g2L0ak{2eW\`" +ʠ1\u3dwS՛7spȆmR8{"{7hR_ٛ lc;7oߔ]#](w\U7w=|li]+~|qوe<7Ϯ k?|Ց~%X4{5~6ՁJQSBE :haE"Z+nR!ѥs4]c#  9I*ɒNbPHe*];hsqldb-1.8.0.10.orig/doc/zaurus/images/green-ball.gif0000644000175000017500000000156607554521204020675 0ustar renereneGIF89a ·fffooo[VVV?{ddd[xpkZSW*!ov{Bc{1!WZ^cƽZYJJssqsEJJckk1{BkJc{BRJB9{9Z1{RB)R9)1!cB)ZB1cƽ11Z!Js1s!JJcck!1J{GBlc{{iiiڥ \\"" 222.W""dUpfͪ\14(!Zc ZJssJKJec!, S H"@)2XaC>|(h@ (H  4ȣC#IzL(( A (jd$s)0L$8И;hsqldb-1.8.0.10.orig/doc/zaurus/images/sharp1.jpeg0000644000175000017500000005764507554521204020254 0ustar renereneJFIFHHPhotoshop 3.08BIM ResolutionHH8BIM FX Global Lighting Angle8BIMFX Global Altitude8BIM Print Flags 8BIM Copyright Flag8BIM'Japanese Print Flags 8BIMColor Halftone SettingsH/fflff/ff2Z5-8BIMColor Transfer Settingsp8BIMGuides@@8BIM URL overrides8BIMSlicespda mit dockingstation8BIMICC Untagged Flag8BIMLayer ID Generator Base8BIM New Windows Thumbnail CLpc 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xc>\}9}>1O)_aρ`ɞ1-LGGR B x:⢥A8pɈs5۾l}*,q6z\~TEǫ<*g֨LN-N2,2U G8b]ZEtp;RI8爻)-,pPHtᚂPK.J#94JQQm[j Y0fЀf7I&A )P)K/  _s<}_9>><~}WǗ|xOO8|}sџ~Gٌg^|>@|y癈MXew dKѻiZ_D|^C >sQ~4que]6`f0p3 n0 ]BLVzR3gUn:qr\?M<dEG3Yn"b' sSnRʾMfilء[5ڿ o]!yqAJ,/걯 c̮ErbaupHE^oն6+}#=~CB0)I78R)Zw&r=,ekUf#ߥ"+l.Mm+?gLB4=Lӧfv$s YnG Y-t.bH~|f!U<*IJ0M3 7q8`~ $"|n%]3@f̪>j5IENDB`hsqldb-1.8.0.10.orig/doc/zaurus/images/nicksant3.gif0000644000175000017500000000144707554521204020560 0ustar renereneGIF89ad(HωԖ߱mN.|;Ubo|ԗ٤!,d( 5dihl"tmx|+1pH,Ƥr9D2P3J =a&EX h8$@CN 9^ r3  c |V~w3 23_A6 M3   x=kӺq 7Z{8k el6̙v*e H x׹lvye}8Ҕ'Q:RM" jz(Gc[+#|\d~ B4cM>$@̠Q #qk@eˌ]I1E(d$1ˤH-fI4ؕ&Ao ٲqA8X8jE͠IV@2`$:p*@|X ;RWT .y2GjQl@w3|Wy`0 i6'@qI  FŠUBFE< &!3D$IJU#+ҰLi$4#h>x'80wU2f4 Xl940jff1 }f 6Ivg^(@*蠄j衈&袆;hsqldb-1.8.0.10.orig/doc/zaurus/images/methods.gif0000644000175000017500000000257307554521204020327 0ustar renereneGIF89a&3f3333f333ff3fffff3f3f̙3f3333f3333333333f3333333f3f33ff3f3f3f3333f3333333f3̙333333f333ff3ffffff3f33f3ff3f3f3ffff3fffffffffff3fffffff3fff̙ffff3fffff3f̙3333f33̙3ff3ffff̙f3f̙3f̙̙3f̙3f3333f333ff3fffff̙̙3̙f̙̙̙3f̙3f3f3333f333ff3fffff3f3f̙3f (((555CCCPPP]]]kkkxxx!,& H@*\p! >Hŋ'bƊ!rIҢG"KJ iʋ_fL0k!ity3"ϞY2gK@LsB*D ԞRg,)4֦DʼzhGlU_˶5hڻJMvܕ};ޠ;}+ο:> q2]g1d??=v0ѧ-ziw%̚vdiF=ѩmӻ=&Kwio{s£ָ<6ƫ unޗwݺh욑rWOzr?*sE#y,^d!qY@Rk\ ej首]ћĦGc]oIszJr3RarW:襘N*W^J$agmZ.XhܪJJYmi)*,GfE ,lZkUAf&;BfZKk@䞫Ү.Լ+[U@;hsqldb-1.8.0.10.orig/doc/zaurus/images/sqlTransact.gif0000644000175000017500000000221107554521204021150 0ustar renereneGIF89a3*,3*H A\ȰC #JDbʼn%Zx0Lj-~0dC(K2J-?reLL ʐ1sH3!Ϟ57ITѢ?/4QI (ϪYO)F$uAԅcv5₻]ңڵu]S# u[(t+Lt`V1QB?+=+Lљ9' ((hto{mP6N qgtͷN}oGCo#ݴkŏW.iޞ׻ ?wA`~7V hPg!zۍ G-M$=`^&d!I/!c(*d"b7MA-"1ͨU6R֋;hsqldb-1.8.0.10.orig/doc/zaurus/images/method-index.gif0000644000175000017500000000306407554521204021245 0ustar renereneGIF89a&3f3333f333ff3fffff3f3f̙3f3333f3333333333f3333333f3f33ff3f3f3f3333f3333333f3̙333333f333ff3ffffff3f33f3ff3f3f3ffff3fffffffffff3fffffff3fff̙ffff3fffff3f̙3333f33̙3ff3ffff̙f3f̙3f̙̙3f̙3f3333f333ff3fffff̙̙3̙f̙̙̙3f̙3f3f3333f333ff3fffff3f3f̙3f (((555CCCPPP]]]kkkxxx!,& H*\p #* ŋ/BQƆ?vRȑ(S:`Lq-*Oā-{r)'|@P?zLguAN_H cd=[RfvfU t}@ۭky߀tnሷ;hsqldb-1.8.0.10.orig/doc/zaurus/images/sqlOther.gif0000644000175000017500000000211007554521204020450 0ustar renereneGIF89a3*,3*H A\ȰC #JDbʼn%Zx0Lj-~0dC(K2J(2-k%ǔ \OB)iK}>*)Ԣ/:TTZJr*ɠbǒpخPz4mZk1={kܿX5iпy/k/*mqW4g,|2b2ҝ9cC݋Ѯp"P=qה˦XٳO7<{%֑(7]\tS_^{Lѥ.nwэ<(/ggϒ=|T^;hsqldb-1.8.0.10.orig/doc/zaurus/images/sourceforge.gif0000644000175000017500000000353507554521204021206 0ustar renereneGIF87a(kkktXƇ1tseeennn׷CXXXiIs̥~}~veqqqӗ|bbbWoĝ[ީ`}vvvhjyyyfn̶z`ECD֬ĭtrsQOP諭׭\[[???hfg^^^}p[[ᴆӅ,(~D33Jz \VVY|N1 1tOHX\ZY^_H~b9ЊHV [|~"5PF~VY~Xcc~U|U~Ղ_((9fEH 5BZHѩ}"BXNͫrph `$4B 44fɖ[Tҳh̎Q>e'Qe !EЈbŠ9%K,#`\j Ni)hܝ6WY` .^h)˽~P䠧 +NG{оX-1&1}#{T>Ւ.9B T1U&A[Y<'S\Rm1ϯ u /_ F VyP!gx h>'u"譑fdiQ X]lh!!h /v<(ÇH"I؃3FL < R =qD ^ rDUNmAYd!UxAaZ$B/YDeDӠU}LM*Pw~GȚu EI%DX#h0`*42!Җ6mxl/~w`VYdF&a*N8` -P7VWn ]tTFw.褧!G+ҏ9 bQ{#$@@ A?~t]q{!b8?Rw1ԇ=;EW '<!WhDһ:O_=~!]o#8/v7o|p2hU@ ` IB׽O! S8(p*l\ p8 5` w~< bPݠ B @'‰4TD8x\p0` $Er1 n0 D|Q "xGƱp\P&>hH1<`d#Ej02C`<!|QF_5H0Y a@יa,.CA6/!: A a@ z~9$4sCp?( | J@q>,eIy{> NuAx? (4z "?jv+;hsqldb-1.8.0.10.orig/doc/zaurus/images/resultBut.png0000644000175000017500000000053007554521204020663 0ustar renerenePNG  IHDR7!WbKGD pHYs  d_tIME  G_IDATx헱 E!bF`KtaE 7Jp5>$O,#m(5U0V%9GuO幐DDRh=":MhxSXհ\fZϣhǓha1 2002-10-20hsqldb-1.8.0.10.orig/doc/zaurus/index.html0000644000175000017500000000376207601727771016740 0ustar renerene HSQL Database for Sharp Zaurus

                HSQL Database for Sharp

                HSQLDB is a relational database engine written in Java, with a JDBC driver, supporting a subset of ANSI-92 SQL. It is a small, fast database engine supporting both in-memory and disk-based tables. This product includes Hypersonic SQL.

                For more information about HSQLDB visit sourceforge.net

                HSQLDB for Sharp Zaurus S-5500 contains a Database Manager with the following functions:

                • Inspecting all tables and columns of a database in a tree view.
                • Editing and executing any SQL statement.
                • Loading and saving of SQL scripts.
                • Using simple forms for each table for searching, editing or deleting rows. The forms are automatically generated and respect referential integrity.

                For further information look at


                Ulrich Vollert
                hsqldb-1.8.0.10.orig/doc/zaurus/todo.html0000644000175000017500000000330707554521204016557 0ustar renerene Further enhancements for HSQLDB
                Index

                Further enhancements of HSQL Database Manager for Sharp


                I have some ideas for more functions for the HSQL Database Manager for Sharp Zaurus. Please send me your feedback. Tell me about your needs or vote for ideas in the following list:

                • More specific entry fields for easier input of data. For instance:
                  • a date field with a pop-up window which shows the days of the week
                  • a memo field with an own panel for long notes and text
                • a graphical view: starting with an arbitrary result table in the result panel, this function would look for numerical data and would try to draw a graphical representation. For instance: a table holding the quotes of one or more share for differents dates, a table with the fuel consumption of a car in different months etc.
                • Default values for new rows: the possibility to define for specific columns default values like max(value)+1, last value, actual date etc. which are used when you want to type new rows.

                Ulrich Vollert
                hsqldb-1.8.0.10.orig/doc/zaurus/usage.html0000644000175000017500000001314107554521204016713 0ustar renerene Using HSQLDB for Zaurus
                Index

                Using HSQL Database Manager for Sharp


                The main functions of the HSQL DatabaseManager for Zaurus are

                There are four different panels which may be chosen from the 'View' menu or with one of the four buttons under the menu:

                1. Tree
                2. Command
                3. Result
                4. Editor

                Starting HSQLDB.

                HSQLDB for Zaurus is started with the appropriate icon , usally located under the Jeode tab. By default, a database called 'test' is opened and the tables in this database are displayed in the tree panel.

                To get an impression of the functionalty, insert some test data by selecting the appropriate point in the 'Options' menu.

                Connecting to a database

                To open a different database, select 'Connect' from the 'File' menu. Select 'HSQL Standalone' as type, and replace the database name 'test' in the URL with a different name.

                If you want to use a different database system (usually on your desktop) you need the appropriate JDBC driver for that system.

                Executing scripts

                You may save and open scripts with the appropriate functions in the 'File' menu. A script consists of one or more valid SQL statements. For example, you may save often-used SQL queries on your tables. If a script is opened, it is shown in the command panel and can be executed from there.

                Tree panel

                The tree panel shows all the tables in the connected database. Use the plus signs to expand the tree. For each table there is a list of the columns with their data type.

                Command panel

                The command panel is used to edit any SQL statement. Use 'Save Script' in the 'File' menu to save the SQL statement.

                The SQL command is executed by clicking on the 'Execute' button at the bottom of the command panel, or by pressing Shift+Enter or Ctrl+Enter. The result is shown in the result panel.

                Any executed SQL statement may be re-loaded to the command panel by selecting from the 'Recent' menu.

                Result panel

                The result of an executed SQL statement is shown in the result panel. In the 'View' menu, you can choose between a text view or a grid view of the result rows.

                If you select an SQL statement from the 'SQL' menu, the keyword is pasted into the command panel and the syntax of that SQL statement is shown in the result panel.

                Editor panel

                The editor shows different forms:

                • a search form
                • an entry form for every table in the database

                Search form

                The editor comes up with a search form where you can select

                • the table that should be searched through,
                • one or more words (or numbers) that should be searched for,
                • whether the rows that are searched contain all or just one search word,
                • whether the case of the search word should be respected,
                • whether the search words can be a part of a column or should match the whole column.

                When clicking on the 'Search Rows' button, all rows of the chosen table that meet the search criteria are identified and the first row is shown in a table form.

                When clicking on the 'Insert New Row' button, an empty table form is shown and one may type a new row for the selected table.

                Table form

                For each table that has a primary key in the database there is a specific table form which shows the column names to the left and entry fields to the right.

                For each reference to another table, a choice field is generated which holds the values of all the rows of the referenced table.

                The entry fields for columns that belong to the primary key of the table are not editable. If you want to update a part of the primary key, you have to delete the row and insert a new row.


                Ulrich Vollert
                hsqldb-1.8.0.10.orig/doc/zaurus/hsqlSyntax.html0000644000175000017500000014354507554521204020001 0ustar renerene HSQLDB

                SQL Syntax

                HSQLDB version 1.7.0 supports the following SQL statements and syntax:

                SELECT
                Expression
                CALL
                Stored Procedures / Functions List
                INSERT
                UPDATE
                DELETE

                ALTER TABLE
                ALTER INDEX
                CREATE ALIAS
                CREATE INDEX
                DROP INDEX
                CREATE TABLE
                DROP TABLE
                CREATE TRIGGER
                DROP TRIGGER
                CREATE VIEW
                DROP VIEW


                Datatypes

                SET AUTOCOMMIT
                COMMIT
                ROLLBACK

                CONNECT
                DISCONNECT
                CREATE USER
                DROP USER
                GRANT
                REVOKE
                SET PASSWORD
                SET REFERENTIAL_INTEGRITY
                SET TABLE READONLY
                SET TABLE SOURCE
                SET WRITE_DELAY

                CHECKPOINT
                SCRIPT
                SET IGNORECASE
                SET LOGSIZE
                SHUTDOWN
                Comments


                Alphabetical list:


                CALL
                CHECKPOINT
                COMMIT
                CONNECT
                CREATE ALIAS
                CREATE INDEX
                CREATE TABLE
                CREATE USER
                CREATE VIEW
                DELETE
                DISCONNECT
                DROP INDEX
                DROP TABLE
                DROP USER
                DROP VIEW
                GRANT
                INSERT
                REVOKE
                ROLLBACK
                SCRIPT
                SELECT
                SET AUTOCOMMIT
                SET IGNORECASE
                SET LOGSIZE
                SET PASSWORD
                SET REFERENTIAL_INTEGRITY
                SET TABLE READONLY
                SET WRITE_DELAY
                SHUTDOWN
                UPDATE

                Expression
                Comments
                Datatypes
                Stored Procedures / Functions List




                ALTER TABLE <tablename>
                ADD COLUMN <columnname> Datatype [(columnSize[,precision])] [DEFAULT 'defaultValue' [NOT NULL]] [BEFORE <existingcolumn>];

                Adds the column to the end of the column list. Optional attributes, size and default value (with or without NOT NULL) can be specified. The optional BEFORE <existingcolumn> can be used to specify the name of an existing column so that the new column is inserted in a position just before the <existingcolumn>. If NOT NULL is specified and the table is not empty, then a default value must be specified.

                ALTER TABLE <tablename> DROP COLUMN <columnname>;

                Drops the column from the table. Will not work if column is part of a primary key, unique or foreign key constraint.

                ALTER TABLE <tablename> ADD CONSTRAINT <constraintname> UNIQUE (<column list>);

                Adds a unique constraint to the table. This will not work if there is already a unique constraints covering exactly the same <column list>.

                ALTER TABLE <tablename> ADD CONSTRAINT <constraintname> FOREIGN KEY (<column list>) REFERENCES <exptablename> (<column list>) [ON DELETE CASCADE];

                Adds a foreign key constraint to the table, using the same constraint syntax as when the foreign key is specified in a table definition.

                ALTER TABLE <tablename> DROP CONSTRAINT <constraintname>;

                Drops a named unique or foreign key constraint from the table.

                ALTER TABLE <tablename> RENAME TO <newname>;


                ALTER INDEX <indexname> RENAME TO <newname>;

                Names can be changed so long as they do not conflict with other user-defined or sytem-defined names.




                CALL Expression ;

                Any expression can be called like a stored procedure, including, but not only Java stored procedures or functions. This command returns a ResultSet with one column and one row (the result) just like a SELECT statement with one row and one column.

                See also: Stored Procedures / Functions, Expression.




                CHECKPOINT ;

                Closes the database files, shrinks the script file and opens the database.

                See also: SHUTDOWN, SET LOGSIZE.




                COMMIT [WORK] ;

                Ends a transaction and makes the changes permanent.

                See also: ROLLBACK, SET AUTOCOMMIT.




                CONNECT USER username PASSWORD password ;

                Connects to the database as a different user. Use "" for an empty password.

                See also: GRANT, REVOKE




                CREATE ALIAS function FOR javaFunction ;

                Creates an alias for a Java function. The function must be accessible from the JVM in that the database runs. Example:
                CREATE ALIAS ABS FOR "java.lang.Math.abs"

                See also: CALL, Stored Procedures / Functions




                CREATE [UNIQUE] INDEX index ON table (column [, ...]) ;

                Creates an index on one or more columns in a table.
                Creating an index on searched columns may improve performance.

                See also: CREATE TABLE, DROP INDEX




                CREATE [ MEMORY | CACHED | TEMP | TEXT ] TABLE name
                ( columnDefinition [, ...] [, constraintDefinition...]) ;

                Creates a tables in the memory (default) or on disk and only cached in memory. Identity columns are autoincrement columns. They must be integer columns and are automatically primary key columns. The last inserted value into an identity column for a connection is available using the function IDENTITY(), for example (where Id is the identity column):
                INSERT INTO Test (Id, Name) VALUES (NULL,'Test'); CALL IDENTITY();

                columnDefinition:
                columnname Datatype [(columnSize[,precision])] [DEFAULT 'defaultValue'] [[NOT] NULL] [IDENTITY] [PRIMARY KEY]

                the default value must be enclosed in singlequotes

                constraintDefinition:
                [ CONSTRAINT name ]
                UNIQUE ( column [,column...] ) |
                PRIMARY KEY ( column [,column...] ) |
                FOREIGN KEY ( column [,column...] ) REFERENCES refTable ( column [,column...]) [ON DELETE CASCADE]

                 

                See also: DROP TABLE



                CREATE TRIGGER name {BEFORE|AFTER} {INSERT|UPDATE|DELETE} ON table [FOR EACH ROW] [QUEUE n] [NOWAIT] CALL triggerClass ;

                triggerClass is an application-supplied class that implements the org.hsqldb.Trigger interface e.g. "myPackage.trigClass". It is the fire method of this class that is invoked when the trigger event occurs. Ensure that triggerClass is present in the classpath which you use to start hsqldb.

                When the 'fire' method is called, it is passed the following arguments:
                fire (String name, String table, Object row[])
                where 'row' represents the row acted on, with each column being a member of the array. The mapping of row classes to database types is specified in Datatypes

                If the trigger method wants to access the database, it must establish its own JDBC connection. Note that this means any access is in a separate transaction. The jdbc:default:connection: URL is not currently supported.

                Implementation note: In the interests of not blocking the database's main thread, each trigger runs in a thread that will wait for its firing event to occur; when this happens, the trigger's thread calls triggerClass.fire. There is a queue of events waiting to be run by each trigger thread. This is particularly useful for 'FOR EACH ROW' triggers, when a large number of trigger events occur in rapid succession, without the trigger thread getting a chance to run. If the queue becomes full, subsequent additions to it cause the database engine to suspend awaiting space in the queue. Take great care to avoid this situation if the trigger action involves accessing the database, as deadlock will occur. This can be avoided either by ensuring the QUEUE parameter makes a large enough queue, or by using the NOWAIT parameter, which causes a new trigger event to overwrite the most recent event in the queue. The default queue size is 1024. Note also that the timing of trigger method calls is not guaranteed, so applications should implement their own synchronization measures if necessary.

                See also: DROP TRIGGER




                CREATE USER username PASSWORD password [ADMIN] ;

                Creates a new user or new administrator in this database. Empty password can be made using "".
                Only an administrator do this.

                See also: CONNECT, GRANT, REVOKE




                CREATE VIEW viewname AS SELECT ... FROM ... [ WHERE Expression ] ;

                A view can be thought of as either a virtual table or a stored query. The data accessible through a view is not stored in the database as a distinct object. What is stored in the database is a SELECT statement. The result set of the SELECT statement forms the virtual table returned by the view. A user can use this virtual table by referencing the view name in SQL statements the same way a table is referenced. A view is used to do any or all of these functions:

                Restrict a user to specific rows in a table. For example, allow an employee to see only the rows recording his or her work in a labor-tracking table.

                Restrict a user to specific columns. For example, allow employees who do not work in payroll to see the name, office, work phone, and department columns in an employee table, but do not allow them to see any columns with salary information or personal information.

                Join columns from multiple tables so that they look like a single table.

                Aggregate information instead of supplying details. For example, present the sum of a column, or the maximum or minimum value from a column.

                Views are created by defining the SELECT statement that retrieves the data to be presented by the view. The data tables referenced by the SELECT statement are known as the base tables for the view. In this example, is a view that selects data from three base tables to present a virtual table of commonly needed data:

                    CREATE VIEW mealsjv AS
                      SELECT m.mid mid, m.name name, t.mealtype mt, a.aid aid,
                             a.gname + ' ' + a.sname author, m.description description,
                             m.asof asof
                        FROM meals m, mealtypes t, authors a
                       WHERE m.mealtype = t.mealtype
                	     AND m.aid = a.aid;
                
                You can then reference mealsjv in statements in the same way you would reference a table:

                    SELECT *
                      FROM mealsjv
                
                A view can reference another view. For example, mealsjv presents information that is useful for long discriptions that contain identifers, but a short list might be all a web page display needs. A view can be built that selects only specific mealsjv columns:

                    CREATE VIEW mealswebv AS
                      SELECT name, author
                        FROM mealsjv
                

                See also: Expression, SELECT, DROP VIEW




                DELETE FROM table [ WHERE Expression ] ;

                Removes rows in a table.

                See also: Expression, INSERT, SELECT




                DISCONNECT ;

                Closes this connection. It is not required to call this command when using the JDBC interface: it is called automatically when the connection is closed. After disconnecting, it is not possible to execute other queries (also not CONNECT) with this connection.

                See also: CONNECT




                DROP INDEX index ;

                Removes the specified index from the database. Will not work if the index backs a UNIQUE of FOREIGN KEY constraint.

                See also: CREATE INDEX




                DROP TABLE table [IF EXISTS] ;

                Removes a table, the data and indexes from the database. When IF EXIST is used, the statement returns true if the table does not exist.

                See also: CREATE TABLE



                DROP TRIGGER trigger
                ;

                Removes a trigger from the database.

                See also: CREATE TRIGGER




                DROP USER username ;

                Removes a user from the database.
                Only an administrator do this.

                See also: CREATE USER




                DROP VIEW viewname [IF EXISTS] ;

                Removes a view from the database. When IF EXIST is used, the statement returns true if the view does not exist.

                See also: CREATE VIEW




                GRANT { SELECT | DELETE | INSERT | UPDATE | ALL } [,...]
                ON { table | CLASS "package.class" } TO { username | PUBLIC } ;

                Assigns privileges to a user or to all users (PUBLIC) for a table or for a class. To allow a user to call a function from a class, the right ALL must be used. Examples:
                GRANT SELECT ON Test TO GUEST
                GRANT ALL ON CLASS "java.lang.String" TO PUBLIC
                Only an administrator do this.

                See also: REVOKE, CREATE USER




                INSERT INTO table [ ( column [,...] ) ]
                { VALUES(Expression [,...]) | SelectStatement } ;

                Adds one or more new rows of data into a table.




                REVOKE { SELECT | DELETE | INSERT | UPDATE | ALL } [,...]
                ON { table | CLASS "package.class" } TO { username | PUBLIC } ;

                Withdraws privileges from a user or for PUBLIC (all users) for a table or class.
                Only an administrator may do this.

                See also: GRANT




                ROLLBACK [WORK] ;

                Undoes changes made since the last COMMIT or ROLLBACK.

                See also: COMMIT




                SCRIPT ['file'] ;

                Creates an SQL script describing the database. This file is saved on the machine where the database files are located.
                Only an administrator may do this.




                SELECT [{LIMIT n m | TOP m}][DISTINCT]
                { selectExpression | table.* | * } [, ... ]
                [ INTO [CACHED | TEMP | TEXT] newTable ]
                FROM tableList
                [ WHERE Expression ]
                [ GROUP BY Expression [, ...] ]
                [ ORDER BY orderExpression [, ...] ]
                [ { UNION [ALL] | {MINUS|EXCEPT} | INTERSECT } selectStatement ] ;

                Retrieves information from one or more tables in the database.

                tableList:
                table [ { INNER | LEFT OUTER } JOIN table ON Expression ] [, ...]

                selectExpression:
                { Expression | COUNT(*) | {COUNT | MIN | MAX | SUM | AVG} ([DISTINCT] Expression) }

                orderExpression:
                { columnNr | columnAlias | selectExpression } [ ASC | DESC ]

                LIMIT n m: creates the result set for the SELECT statement first and then discards the first n rows and returns the first m rows of the remaining result set. Special cases: LIMIT 0 m is equivalent to TOP m or FIRST m in other RDBMS's; LIMIT n 0 discards the first n rows and returns the rest of the result set.

                TOP m is equivalent to LIMIT 0 m

                See also: INSERT, UPDATE, DELETE




                SET AUTOCOMMIT { TRUE | FALSE } ;

                Switches on or off the connection's auto-commit mode. If switched on, then all statements will be committed as individual transactions. Otherwise, the statements are grouped into transactions that are terminated by either COMMIT or ROLLBACK. By default, new connections are in auto-commit mode.




                SET IGNORECASE { TRUE | FALSE } ;

                Disables (ignorecase = true) or enables (ignorecase = false) the case sensitivity of text comparison and indexing. By default, new databases are case sensitive. The sensitivity must be switched before creating tables. Existing tables and their data are not affected. When switched on, the data type VARCHAR is set to VARCHAR_IGNORECASE. This special data type can also be used without switching global ignorecase on. So it is possible to have some columns case sensitive and some not, even in the same table.
                Only an administrator may do this.




                SET LOGSIZE size ;

                Sets the maximum size in MB of the .script file. Default is 200 MB. The database will be closed and opened (just like using CHECKPOINT) if the .script file gets over this limit, and so the .script file will shrink. 0 means no limit.

                See also: CHECKPOINT




                SET PASSWORD password ;

                Changes the password of the currently connected user. Empty password can be set using ""




                SET REFERENTIAL_INTEGRITY { TRUE | FALSE } ;

                This commands enables / disables the referential integrity checking (foreign keys). Normally it should be switched on (this is the default) but when importing data (and the data is imported in the 'wrong' order) the checking can be switched off.
                Only an administrator may do this.

                See also: CREATE TABLE



                SET TABLE tableName INDEX 'index1rootPos index2rootPos ... '.

                This command is only used internally to store the position of index roots in the .data file. It appears only in database script files; it should not be used directly.



                SET TABLE <tablename> READONLY {TRUE | FALSE} ;

                Sets the table as read only




                SET TABLE <tablename> SOURCE <file and options> [DESC] ;

                For details see the document TextTables.html.

                This command is used exclusively with TEXT tables to specify which file is used for storage of the data. The optional DESC qualifier results in the text file indexed from the end and opened as readonly. The <file and options> argument is a double quoted string that consists of:

                <file and options>::= <doublequote> <filepath> [<semicolon> <option>...] <doublequote>

                Example: SET TABLE mytable SOURCE "myfile;fs=|;vs=.;lvs=~"

                HSQLDB also recognises the following special indicators for separators:

                    \semi - semicolon
                    \quote - quote
                    \space - space character
                    \apos - apostrophe
                    \n - newline - Used as an end anchor (like $ in regular expressions)
                    \r - carriage return
                    \t - tab
                    \\ - backslash
                    \u#### - a Unicode character specified in hexadecimal

                Only an administrator may do this.



                SET WRITE_DELAY { TRUE | FALSE } ;

                When the write delay is switched on, the executed commands are written to the log file (.script) at most 1 second after they are executed. This improves the performance of applications that makes a lot of inserts/updates/deletes. When switched off (this is the default) then all SQL commands are written into the log file (.script) just after they are executed.
                Only an administrator may do this.




                SHUTDOWN [ IMMEDIATELY | COMPACT ] ;

                Closes the current database.

                SHUTDOWN performs a checkpoint to creates a new .script file that has the minimum size and contains the data for memory tables only. It then backs up the .data file containing the CACHED TABLE data in zipped format to the .backup file and closes the database.

                SHUTDOWN IMMEDIATELY just closes the database files (like an external poweroff); this command is used internally to test the recovery mechanism. This command should not be used as the routine method of closing the database.

                SHUTDOWN COMPACT writes out a new .script file which contains the data for all the tables, including CACHED and TEXT tables. It then deletes the existing text table files and the .data file before rewriting them. After this, it backs up the .data file in the same way as normal SHUTDOWN. This operations shrinks all files to the minimum size.
                Only an administrator may do this.




                UPDATE table SET column = Expression [, ...] ;
                [WHERE Expression]

                Modifies data of a table in the database.

                See also: SELECT, INSERT, DELETE




                Datatypes: The types on the same line are equivalent.

                INTEGER | INT "int" | "java.lang.Integer"
                DOUBLE [PRECISION] | FLOAT "double" | "java.lang.Double"
                VARCHAR "java.lang.String"
                VARCHAR_IGNORECASE "java.lang.String"
                CHAR | CHARACTER "java.lang.String"
                LONGVARCHAR "java.lang.String"
                DATE "java.sql.Date"
                TIME "java.sql.Time"
                TIMESTAMP | DATETIME "java.sql.Timestamp"
                DECIMAL "java.math.BigDecimal"
                NUMERIC "java.math.BigDecimal"
                BIT "boolean" | "java.lang.Boolean"
                TINYINT "byte" | "java.lang.Byte"
                SMALLINT "short" | "java.lang.Short"
                BIGINT "long" | "java.lang.Long"
                REAL "double" | "java.lang.Double"
                BINARY "byte[]"
                VARBINARY "byte[]"
                LONGVARBINARY "byte[]"
                OTHER | OBJECT "java.lang.Object"

                The uppercase names are the data types names defined by the SQL standard or commonly used by RDMS's. The data types in quotes are the Java class names - if these type names are used then they must be enclosed in quotes because in Java names are case-sensitive.

                The recommended Java mapping for the JDBC datatype FLOAT is as a Java type "double". Because of the potential confusion it is recommended that DOUBLE is used instead of FLOAT.

                VARCHAR_IGNORECASE is a special case-insensitive type of VARCHAR. This type is not portable.

                In HSQLDB, when defining CHAR and VARCHAR columns, the SIZE argument is optional and defaults to 0. If any other size is specified, it is stored in the database definition but is not enforeced by default. Once you have created the database (before adding data), you can close the database and add a database property value:

                sql.enforce_size=true

                This will enforce the specified size and pad CHAR fields with spaces to fill the size.

                CHAR and VARCHAR and LONGVARCHAR columns are by default compared and sorted according to POSIX standards. To use the current JRE locale for sorting and comparison, add the following database property to the properties file.

                sql.compare_in_locale=true

                Columns of the type OTHER or OBJECT contain the serialized form of a Java Object in binary format. To insert or update such columns, a binary format string (see below under Expression) should be used. Using PreparedStatements with JDBC automates this transformation.




                Comments


                -- SQL style line comment
                // Java style line comment
                /* C style line comment */

                All these types of comments are ignored by the database.




                Stored Procedures / Functions

                Stored procedures are Java functions that are called directly from the SQL language or using an alias. Calling Java functions (directly or using the alias) requires that the Java class can be reached by the database (server). The syntax is:

                "java.lang.Math.sqrt"(2.0)

                This means the packacke must be provided, and the name must be written as one word, and inside " because otherwise it is converted to uppercase (and not found).

                An alias can be created using the command CREATE ALIAS:

                CREATE ALIAS SQRT FOR "java.lang.Math.sqrt"

                When an alias is defined, then the function can be called additionally using this alias:

                SQRT(2.0)




                List of built in functions and stored procedures

                Numerical

                ABS(d) (returns the absolute value of a double value)
                ACOS(d) (returns the arc cosine of an angle)
                ASIN(d) (returns the arc sine of an angle)
                ATAN(d) (returns the arc tangent of an angle)
                ATAN2(a,b) (returns the tangent of a/b)
                CEILING(d) (returns the smallest integer that is not less than d)
                COS(d) (returns the cosine of an angle)
                COT(d) (returns the cotangent of an angle)
                DEGREES(d) (converts radians to degrees)
                EXP(d) (returns e (2.718...) raised to the power of d)
                FLOOR(d) (returns the largest integer that is not greater than d)
                LOG(d) (returns the natural logarithm (base e))
                LOG10(d) (returns the logarithm (base 10))
                MOD(a,b) (returns a modulo b)
                PI() (returns pi (3.1415...))
                POWER(a,b) (returns a raised to the power of b)
                RADIANS(d) (converts degrees to radians)
                RAND() (returns a random number x bigger or equal to 0.0 and smaller than 1.0)
                ROUND(a,b) (rounds a to b digits after the decimal point)
                SIGN(d) (returns -1 if d is smaller than 0, 0 if d==0 and 1 if d is bigger than 0)
                SIN(d) (returns the sine of an angle)
                SQRT(d) (returns the square root)
                TAN (returns the trigonometric tangent of an angle)
                TRUNCATE(a,b) (truncates a to b digits after the decimal point)
                BITAND(a,b) (return a & b)
                BITOR(a,b) (returns a | b)
                ROUNDMAGIC(d) (solves rounding problems such as 3.11-3.1-0.01)

                String

                ASCII(s) (returns the ASCII code of the leftmost character of s)
                CHAR(c) (returns a character that has the ASCII code c)
                CONCAT(str1,str2) (returns str1 + str2 )
                DIFFERENCE(s1,s2) (returns the difference between the sound of s1 and s2)
                HEXTORAW(s1) (returns translated string)
                INSERT(s,start,len,s2) (returns a string where len number of characters beginning at start has been replaced by s2)
                LCASE(s) (converts s to lower case)
                LEFT(s,count) (returns the leftmost count of characters of s)
                LENGTH(s) (returns the number of characters in s)
                LOCATE(search,s,[start]) (returns the first index (1=left, 0=not found) where search is found in s, starting at start)
                LTRIM(s) (removes all leading blanks in s)
                RAWTOHEX(s1) (returns translated string)
                REPEAT(s,count) (returns s repeated count times)
                REPLACE(s,replace,s2) (replaces all occurrences of replace in s with s2)
                RIGHT(s,count) (returns the rightmost count of characters of s)
                RTRIM(s) (removes all trailing spaces)
                SOUNDEX(s) (returns a four character code representing the sound of s)
                SPACE(count) (returns a string consisting of count spaces)
                SUBSTR(s,start[,len]) (alias for substring)
                SUBSTRING(s,start[,len]) (returns the substring starting at start (1=left) with length len)
                UCASE(s) (converts s to upper case)
                LOWER(s) (converts s to lower case)
                UPPER(s) (converts s to upper case)

                Date / Time

                CURDATE() (returns the current date)
                CURTIME() (returns the current time)
                DAYNAME(date) (returns the name of the day)
                DAYOFMONTH(date) (returns the day of the month (1-31))
                DAYOFWEEK(date) (returns the day of the week (1 means Sunday))
                DAYOFYEAR(date) (returns the day of the year (1-366))
                HOUR(time) (return the hour (0-23))
                MINUTE(time) (returns the minute (0-59))
                MONTH(date) (returns the month (1-12))
                MONTHNAME(date) (returns the name of the month)
                NOW() (returns the current date and time as a timestamp)
                QUARTER(date) (returns the quarter (1-4))
                SECOND(time) (returns the second (0-59))
                WEEK(date) (returns the week of this year (1-53)
                YEAR(date) (returns the year)

                System / Connection

                DATABASE() (returns the name of the database of this connection)
                USER() (returns the user name of this connection)
                IDENTITY() (returns the last identity values that was inserted by this connection)

                System

                IFNULL(exp,value) (if exp is null, value is returned else exp)
                CASEWHEN(exp,v2,v2) (if exp is true, v1 is returned, else v2)
                CONVERT(term,type) (converts exp to another data type)
                CAST(term AS type) (converts exp to another data type)

                See also: CREATE ALIAS, CALL




                Expression:

                [NOT] condition [ { OR | AND } condition ]

                condition:
                { value [ || value ]
                | value { = | < | <= | > | >= | <> | != | IS [NOT] } value
                | EXISTS(selectStatement)
                | value BETWEEN value AND value
                | value [NOT] IN ( {value [, ...] | selectStatement } )
                | value [NOT] LIKE value [ESCAPE] value }

                value:
                [ + | - ] { term [ { + | - | * | / } term ]
                | ( condition )
                | function ( [parameter] [,...] )
                | selectStatement giving one value

                term:
                { 'string' | number | floatingpoint
                | [table.]column | TRUE | FALSE | NULL }

                string:
                Strings in HSQLDB are Unicode strings. A string starts and ends with a single ' (singlequote). In a string started with ' (singlequote) use '' (two singlequotes) to create a ' (singlequote).

                The LIKE keyword uses '%' to match any (including 0) number of characters, and '_' to match exactly one character. To search for '%' itself, '\%' must be used, for '_' use '\_'; or any other escaping character may be set using the ESCAPE clause.

                name:
                The character set for identifiers (names) in HSQLDB is Unicode.

                A unquoted identifier (name) starts with a letter and is followed by any number of letters or digits. In unquoted identifiers, lowercase characters are converted to uppercase. Because of this, unquoted names are not case sensitive when used in SQL statements.

                Quoted identifiers can be used as names (for tables, columns, constraints or indexes). Quoted identifiers start and end with " (one doublequote). A quoted identifier can contain any Unicode character, including space. In a quoted identifier use "" (two doublequotes) to create a " (one doublequote). With quoted identifiers it is possible to create mixed-case table and column names. Example: CREATE TABLE "Address" ("Nr" INTEGER,"Name" VARCHAR); SELECT "Nr", "Name" FROM "Address";

                The equivalent quoted identifier can be used for an unquoted identifer by converting the identifier to all uppercase and quoting it. For example, if a table name is defined as Address2 (unquoted), it can be referred to by its quoted form, "ADDRESS2", as well as address2, aDDress2 and ADDRESS2. Quoted identifiers should not be confused with SQL strings.

                Quoting can sometimes be used for identifiers when there is an ambiguity. For example:

                SELECT COUNT(*) "COUNT" FROM MYTABLE;

                Portability between different JRE locales is an issue when accented characters are used in unquoted identifiers. Because native Java methods are used to convert the identifier to uppercase, the result may vary among different locales. It is recommended that accented characters are used only in quoted identifiers.

                When using JDBC methods that take table, column, or index identifiers as arguments, treat the names as they are registered in the database. With these methods, unquoted identifiers should be used in all-uppercase to get the correct result. Quoted identifiers should be used in the exact case combination as they were defined - no quote character should be included in the name. JDBC methods that return a result set containing such identifiers return unquoted identifiers as all-uppercase and quoted identifiers in the exact case they are registered in the database (a change from 1.6.1 and previous versions).

                values:
                A 'date' value starts and ends with ' (singlequote), the format is yyyy-mm-dd (see java.sql.Date).
                A 'time' value starts and ends with '
                (singlequote), the format is hh:mm:ss (see java.sql.Time).
                A 'timestamp' or 'datetime' value starts and ends with '
                (singlequote), the format is yyyy-mm-dd hh:mm:ss.SSSSSSSSS (see java.sql.Timestamp).

                When specifying default values for date / time columns in CREATE TABLE statements, or in SELECT,INSERT, and UPDATE statements, special values 'now', 'today', 'current_timestamp', 'sysdate', 'current_time' and 'current_date' (case independent) can be used. 'now' is used for TIME and TIMESTAMP columns, 'today' is used for DATE columns. Example:

                 CREATE TABLE T(D DATE DEFAULT 'today');
                 CREATE TABLE T1(TS TIMESTAMP DEFAULT 'now');  

                Binary data starts and ends with ' (singlequote), the format is hexadecimal. '0004ff' for example is 3 bytes, first 0, second 4 and last 255 (0xff).

                Any number of commands may be combined. With combined commands, ';' (semicolon) must be used at the end of each command to ensure data integrity, despite the fact that the program may not return an error when it is not used.

                Conventions Used in this Document

                [ A ] means A is optional
                { B | C } means either B or C must be used.
                ( and ) are the actual characters '(' and ')' used in statements.
                UPPERCASE words are keywords

                Items in red indicate features added by HSQL Development Group since April 2001
                Based on original Hypersonic documentation. Updates by Peter Hudson, Joe Maher and Fred Toussi

                  hsqldb-1.8.0.10.orig/testrun/0000755000175000017500000000000010166616624014333 5ustar renerenehsqldb-1.8.0.10.orig/testrun/sqltool/0000755000175000017500000000000010665564160016031 5ustar renerenehsqldb-1.8.0.10.orig/testrun/sqltool/dsv-trimming-alt.dsv0000644000175000017500000000041310656504744021745 0ustar renerenetargettable=t} } # Following (header) line has intentional trailing whitespace.} i \ r \ d \ t \ v \ b } } # Following line has intentional trailing whitespace (and mixed case).} 31 \ 3.124 \ 2007-06-07 \ 2006-05-06 12:30:04 \ a B \ tRUe } hsqldb-1.8.0.10.orig/testrun/sqltool/nullrep-alt.dsv0000644000175000017500000000042310656504745021010 0ustar renerenetargettable=t} } # Following (header) line has intentional trailing whitespace.} id: i : r : d : t : v : b } } # Following line has intentional trailing whitespace (and mixed case).} wspaces: %% : %% : %% : %% : %% : %% } nospaces:%%:%%:%%:%%:%%:%%} hsqldb-1.8.0.10.orig/testrun/sqltool/logic.sql0000644000175000017500000000174010656504745017654 0ustar renerene/* * $Id: logic.sql,v 1.1 2007/08/09 03:28:37 unsaved Exp $ * * Logic tests */ *if (1) * T1 = true *end if *if (! *T1) \q Test of (1) failed *end if *if (0) \q Test of (0) failed *end if *if (! 1) \q Test of (! 1) failed *end if *if (! 0) * T2 = true *end if *if (! *T2) \q Test of (! 0) failed *end if *if (!1) \q Test of (!1) failed *end if *if (!0) * T3 = true *end if *if (!*T3) \q Test of (!0) failed *end if * SETVAR=3 *if (*SETVAR) * T4 = true *end if *if (! *T4) \q Test of (*SETVAR) failed *end if *if (*UNSETVAR) \q Test of (*UNSETVAR) failed *end if *if (! *SETVAR) \q Test of (! *SETVAR) failed *end if *if (! *UNSETVAR) * T5 = true *end if *if (! *T5) \q Test of (! *UNSETVAR) failed *end if *if (!*SETVAR) \q Test of (!*SETVAR) failed *end if *if (!*UNSETVAR) * T6 = true *end if *if (!*T6) \q Test of (!*UNSETVAR) failed *end if hsqldb-1.8.0.10.orig/testrun/sqltool/badsqlonly.nsql0000644000175000017500000000035310656504743021102 0ustar renerene/* * $Id: badsqlonly.nsql,v 1.1 2007/08/09 03:28:35 unsaved Exp $ * * Simplest test possible. Does absolutely nothing. */ /** Intentional SQL syntax error here */ CREATE FABLE t(i INTEGER); \p Should never reach here. hsqldb-1.8.0.10.orig/testrun/sqltool/special-q.sql0000644000175000017500000000065510072454146020430 0ustar renerene/* $Id: special-q.sql,v 1.3 2004/07/05 00:49:23 unsaved Exp $ See readme.txt in this directory for how to unit test SqlTool. Tests: Special command \q with no arg. HARNESS_METADATA BEGIN arg --noAutoFile requireStdoutRegex PRE-QUIT rejectStdoutRegex POST-QUIT arg mem HARNESS_METADATA END */ \p PRE-QUIT \q \p POST-QUIT hsqldb-1.8.0.10.orig/testrun/sqltool/hist-recall-runquery.sql0000644000175000017500000000121010064203362022626 0ustar renerene/* $Id: hist-recall-runquery.sql,v 1.2 2004/06/17 02:50:25 unsaved Exp $ See readme.txt in this directory for how to unit test SqlTool. Tests: Recall a SQL query from the SQL buffer and execute it. HARNESS_METADATA BEGIN arg --noAutoFile requireStdoutRegex (?mis)recalling and executing now:.*select \* from t\b.*^31$ arg mem HARNESS_METADATA END */ /* The blank line after a command moves the command to history without executing it. */ select * from t create table t (i int); insert into t values(31); \p Recalling and executing now: \-2; hsqldb-1.8.0.10.orig/testrun/sqltool/testHistory.list0000644000175000017500000000062610072122410021247 0ustar renerene# $Id: testHistory.list,v 1.1 2004/07/05 00:47:03 unsaved Exp $ # List of SQL Test Files for JUnit test method with name corresponding # to this file name. # Empty lines and comment lines beginning with # are ok. # SYNTAX for each non-comment line: filepath Description string hist-recall-19.sql Recall command from SQL History hist-recall-runquery.sql Recall and execute a query from SQL History hsqldb-1.8.0.10.orig/testrun/sqltool/testComments.list0000644000175000017500000000054410072122410021372 0ustar renerene# $Id: testComments.list,v 1.1 2004/07/05 00:47:03 unsaved Exp $ # List of SQL Test Files for JUnit test method with name corresponding # to this file name. # Empty lines and comment lines beginning with # are ok. # SYNTAX for each non-comment line: filepath Description string comment-midline.sql Comments followed immediately by another command hsqldb-1.8.0.10.orig/testrun/sqltool/plcontrolflow.sql0000644000175000017500000001105410656504745021462 0ustar renerene/* * $Id: plcontrolflow.sql,v 1.1 2007/08/09 03:28:37 unsaved Exp $ * * Tests PL control flow. if, foreach statements, etc. */ *if (*UNSET) \q Failed boolean test of an unset variable *end if *if (astring) * y = something *end if *if (*X) \q Failed boolean test of a simple string constant *end if *if (0) \q Failed boolean test of zero constant *end if *if (! x) /* Note that there must be white space to separate the two tokens above. */ \q Failed boolean test of a plain constant *end if /* Nested if tests */ * if (1) * L1 = true * if (2) * L2 = true * end if * L11 = true * end if *if (! *L1) \q Pre-nest failure *end if *if (! *L2) \q Inside-nest failure *end if *if (! *L11) \q Post-nest failure *end if * L1 = * L2 = * L11 = * if (1) * L1 = true * if (2) * L2 = true * end if * L11 = true * end if *if (! *L1) \q Pre-nest failure *end if *if (! *L2) \q Inside-nest failure *end if *if (! *L11) \q Post-nest failure *end if /* Test deep nesting of IFs, including negatives. */ * if (1) * L1 = true * if (0) * N2 = true * end if * if (2) * L2 = true * if (3) * L3 = true * if (4) * L4 = true * if (0) * N5 = true * end if * if (5) * L5 = true * if (0) * N6 = true * end if * if (6) * L6 = true * if (0) * N7 = true * end if * end if * L51 = true * end if * end if * if (0) * N4 = true * end if * L31 = true * end if * if (0) * N3 = true * end if * end if * L11 = true * end if *if (! *L1) \q Pre-deep-nest failure 1 *end if *if (! *L2) \q Inside-deep-nest failure 2 *end if *if (! *L11) \q Post-deep-nest failure 11 *end if *if (! *L3) \q Pre-deep-nest failure 3 *end if *if (! *L4) \q Inside-deep-nest failure 4 *end if *if (! *L31) \q Post-deep-nest failure 31 *end if *if (! *L5) \q Pre-deep-nest failure 5 *end if *if (! *L6) \q Inside-deep-nest failure 6 *end if *if (! *L51) \q Post-deep-nest failure 51 *end if *if (*N2) \q Negative deep-nest failure 2 *end if *if (*N3) \q Negative deep-nest failure 3 *end if *if (*N4) \q Negative deep-nest failure 4 *end if *if (*N5) \q Negative deep-nest failure 5 *end if *if (*N6) \q Negative deep-nest failure 6 *end if *if (*N7) \q Negative deep-nest failure 7 *end if /* Nested foreach tests */ /* Initialize Results to I */ * R = I *foreach L1 (A B C) *foreach L2 (1 2 3 4) *foreach L3 (a b) * R = *{R}:*{L1}*{L2}*{L3} *end foreach *end foreach *end foreach *if (*R != I:A1a:A1b:A2a:A2b:A3a:A3b:A4a:A4b:B1a:B1b:B2a:B2b:B3a:B3b:B4a:B4b:C1a:C1b:C2a:C2b:C3a:C3b:C4a:C4b) \q nested foreach result unexpected: *{R} *end if /* Initialize Results to I */ * R = I *foreach L1 (A B C) *if (*L1 != A) *foreach L2 (1 2 3 4) *if (*L2 != 3) *foreach L3 (a b c) *if (*L3 != b) * R = *{R}:*{L1}*{L2}*{L3} *end if *end foreach *end if *end foreach *end if *end foreach *if (*R != I:B1a:B1c:B2a:B2c:B4a:B4c:C1a:C1c:C2a:C2c:C4a:C4c) \q nested conditional foreach result unexpected: *{R} *end if /* Test break and continue */ /* Initialize Results to I */ * R = I *foreach L1 (A B C) *foreach L2 (1 2 3 4) *foreach L3 (a b) *if (*L3 == a) *continue *end if * R = *{R}:*{L1}*{L2}*{L3} *end foreach *if (*L2 == 3) *break foreach *end if *end foreach *end foreach *if (*R != I:A1b:A2b:A3b:B1b:B2b:B3b:C1b:C2b:C3b) \q nested foreach result unexpected: *{R} *end if /* If something doesn't work right, could get into infinite loop below. */ * accum=L *while (1) * accum = *{accum}P * subcum = M *while (*subcum < MQQ) * subcum = *{subcum}Q *end while * accum = *{accum}*{subcum} *if (*accum == LPMQQPMQQ) *break while *end if *end while *if (*accum != LPMQQPMQQ) \p Wrong value accumulated by nested while loops (*{accum}) *end if hsqldb-1.8.0.10.orig/testrun/sqltool/comment-midline.sql0000644000175000017500000000146410064205002021614 0ustar renerene/* $Id: comment-midline.sql,v 1.1 2004/06/17 03:03:30 unsaved Exp $ See readme.txt in this directory for how to unit test SqlTool. Tests: Special command \s with no arg. HARNESS_METADATA BEGIN arg --noAutoFile requireStdoutRegex (?m)\sPRE-COMMENT-A\n.*\sPOST-COMMENT-A\n.*\sPRE-COMMENT-B\n.*\sPOST-COMMENT-B\n.*\sPRE-COMMENT-C\n.*\sPOST-COMMENT-C$ rejectStdoutRegex Writing some rejectStdoutRegex crap rejectStdoutRegex right here arg mem HARNESS_METADATA END */ \p PRE-COMMENT-A /* Writing some crap right here */\p POST-COMMENT-A \p PRE-COMMENT-B /* Writing some crap right here */ \p POST-COMMENT-B \p PRE-COMMENT-C /* Writing some right here */ \p POST-COMMENT-C hsqldb-1.8.0.10.orig/testrun/sqltool/dsv-trimming.dsv0000644000175000017500000000040410656504744021167 0ustar renerenetargettable=t # Following (header) line has intentional trailing whitespace. i | r | d | t | v | b # Following line has intentional trailing whitespace (and mixed case). 31 | 3.124 | 2007-06-07 | 2006-05-06 12:30:04 | a B | tRUe hsqldb-1.8.0.10.orig/testrun/sqltool/hist-recall-19.sql0000644000175000017500000000157710064203362021205 0ustar renerene/* $Id: hist-recall-19.sql,v 1.3 2004/06/17 02:50:25 unsaved Exp $ See readme.txt in this directory for how to unit test SqlTool. Tests: Recall a command from the SQL buffer 20 commands ago. (command -19, since the history begins at 0). HARNESS_METADATA BEGIN arg --noAutoFile requireStdoutRegex (?mi)restored following command.*\n\Qcommand 06\E$ arg mem HARNESS_METADATA END */ /* The blank line after each command moves the command to history without executing it. */ command 01 command 02 command 03 command 04 command 05 command 06 command 07 command 08 command 09 command 10 command 11 command 12 command 13 command 14 command 15 command 16 command 17 command 18 command 19 command 20 command 21 command 22 command 23 command 24 command 25 \-19 hsqldb-1.8.0.10.orig/testrun/sqltool/dsv-omits.dsv0000644000175000017500000000042410656504744020476 0ustar renerenetargettable=t # Following (header) line has intentional trailing whitespace. - | i | - | a | - | b | - | c # Following line has intentional trailing whitespace (and mixed case). 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 hsqldb-1.8.0.10.orig/testrun/sqltool/nq-noarg1.isql0000644000175000017500000000044210656504745020531 0ustar renerene/* * $Id: nq-noarg1.isql,v 1.1 2007/08/09 03:28:37 unsaved Exp $ * * Simplest test of \q from nested script with no args */ \p Following statement should exit SqlTool immediately with success exit status. \q \q This causes the unit test to fail if the \q above didn't work. hsqldb-1.8.0.10.orig/testrun/sqltool/subst.inter0000644000175000017500000000341110656504746020237 0ustar renerene/* * $Id: subst.inter,v 1.1 2007/08/09 03:28:38 unsaved Exp $ * * Tests interactive commands :s*. */ \c false /* Since running interactively, need to either invoke with --abortOnErr switch, * or use "\c false" Special command, to detect failures. */ CREATE TABLE t(id INTEGER GENERATED BY DEFAULT AS IDENTITY, vc VARCHAR); INSERT INTO t(vc) VALUES('one') /* In interactive mode, the blank line above will move the command to the * edit buffer without executing it. */ :s/n/MM/; /*Since this executes, command #3 in history will become "INSERT... 'oMMe'".*/ SELECT count(*) FROM t; *if (*? != 1) \q Blank lines not behaving right in Interactive mode *end if SELECT count(*) FROM t WHERE vc = 'oMMe'; *if (*? != 1) \q Simple substitution of edit buffer failed. *end if /* Tailing white space in line below, on purpose. */ :3 s@M@.@g; SELECT count(*) FROM t; *if (*? != 2) \q Recall + subst. + exec failed / 1 *end if SELECT count(*) FROM t WHERE vc = 'o..e'; *if (*? != 1) \q Recall + subst. + exec failed / 2 *end if :3 /* Purposeful trailing white space in following line */ :s:MM:x:g :; SELECT count(*) FROM t; *if (*? != 3) \q Recall + subst., then exec failed / 1 *end if SELECT count(*) FROM t WHERE vc = 'oxe'; *if (*? != 1) \q Recall + subst., then exec failed / 2 *end if :/INSERT.*MM/ :s/Me/End/; \q :/INSERT.*MM/s/(?-i)o/Begin/; SELECT count(*) FROM t; *if (*? != 5) \q Regex Recall + subst., then exec failed / 1 *end if SELECT count(*) FROM t WHERE vc = 'oMEnd'; *if (*? != 1) \q Regex Recall + subst., then exec failed / 2 *end if SELECT count(*) FROM t WHERE vc = 'Begin..e'; *if (*? != 1) \q Regex Recall + subst., then exec failed / 3 *end if hsqldb-1.8.0.10.orig/testrun/sqltool/testSQL.list0000644000175000017500000000061510072122410020243 0ustar renerene# $Id: testSQL.list,v 1.1 2004/07/05 00:47:03 unsaved Exp $ # List of SQL Test Files for JUnit test method with name corresponding # to this file name. # Empty lines and comment lines beginning with # are ok. # SYNTAX for each non-comment line: filepath Description string sql-blankint.sql Blank line with SQL command, interactive sql-blankfile.sql Blank line with SQL command, file mode hsqldb-1.8.0.10.orig/testrun/sqltool/special-q-arg.sql0000644000175000017500000000100610072454146021166 0ustar renerene/* $Id: special-q-arg.sql,v 1.4 2004/07/05 00:49:23 unsaved Exp $ See readme.txt in this directory for how to unit test SqlTool. Tests: Special command \q with arg. HARNESS_METADATA BEGIN arg --noAutoFile requireStdoutRegex PRE-QUIT requireErroutRegex Abort message here rejectStdoutRegex POST-QUIT arg mem exitValue 2 HARNESS_METADATA END */ \p PRE-QUIT \q Abort message here \p POST-QUIT hsqldb-1.8.0.10.orig/testrun/sqltool/testArgs.list0000644000175000017500000000065210072122410020501 0ustar renerene# $Id: testArgs.list,v 1.1 2004/07/05 00:47:03 unsaved Exp $ # List of SQL Test Files for JUnit test method with name corresponding # to this file name. # Empty lines and comment lines beginning with # are ok. # SYNTAX for each non-comment line: filepath Description string args-noinput.sql --noinput command-line switch args-sql.sql --sql command-line switch args-sqlni.sql --sql AND --noinput command-line switches hsqldb-1.8.0.10.orig/testrun/sqltool/readme.txt0000644000175000017500000001505610656504743020037 0ustar renerene$Id: README.txt,v 1.1 2007/08/09 03:28:35 unsaved Exp $ SqlTool Unit Tests since: HSQLDB 1.8.0.8, 1.9.x author: Blaine Simpson (unsaved@users.sourceforge.net) PORTABILITY (or lack thereof) At this time, you need to have a Bash shell to run this script, so you'll need a UNIX variant, Cygwin, etc. When I have time, I'll port the test runner script "runtests.bash" to Java so that the tests will run on any Java platform. If you have time and the Java skills to port it now-- please contact me ASAP: blaine.simpson@admc.com (BTW, it will take considerable effort to just port the existing behavior from Bash to Perl, but the real difficultiy would be to improve the run-time by not invoking a new JVM for each test run. Specifically, Java uses a very closed design for providing stdin, stdout, stderr, and one can't open and close these pipes at will, as we do in the Bash script). HOW TO RUN Typical usage (executes all tests): cd .../testrun/sqltool ./runtests.bash Run tests on any SQL files: .../testrun/sqltool/runtests.bash file1.sql file2.sql... If there are any test failures, the failed SQL scripts will be listed at the end of the results. To get details about the failure, run runtests.bash with just one of the failed SQL scripts at a time, and with the Verbose option, like ./runtests.bash -v failedscript.sql To see all available invocation methods: ./runtests.bash -h FILE NAMING AND ASCII/BINARY CONVENTIONS You can name SQL scripts anything that you want, except that the filename suffixes ".nsql" and ".inter" are reserved for negative and interactive SQL scripts, correspondingly (see the next section about that). If you plan to run runtests.bash with no filename arguments, it will execute all *.sql, *.nsql, an d*.inter scripts in the current directory. So, if you plan to run runtests.bash this way, you must take care to name only scripts **which you want executed at the top level** with extensions sql, nsql, inter. By "at the top level", I mean that if you are nesting SQL scripts with the \i command, you can't name the nested script with suffix .sql, .nsql, or .inter or the script will accidentally be executed directly when you run runtests.bash without script arguments. It's a simple concept, but, as you can see, it's a little difficult to explain, so here's an example. You have a script name "top.sql" which contains \i nested.sql You can run "./runtests.bash top.sql" and everything will work fine-- runtests.bash will execute "top.sql" which will nest "nested.sql". But if you run just "./runtests.bash", runtests.bash will run "top.bash", which will nest "nested.bash" just like before, but runtests.bash will also execute "nested.bash" directly, since it executes all files with extensions sql and nsql (and inter). Just use any filename suffix other than .sql, .nsql, and .inter for your nested SQL scripts and everything will work fine. If you are a HSQLDB developer and will be committing test scripts, then please use the following filename and type conventions: purpose suffix filetype -------------------- ------ ---------------------------- top-level SQL script .sql ASCII (mime-type text/plain) top-level neg. SQL .nsql ASCII (mime-type text/plain) interactive SQL script .inter ASCII (mime-type text/plain) nested \i SQL script .isql ASCII (mime-type text/plain) delimiter-sep-values .dsv Binary (no mime-type) If you will be adding new files to HSQLDB, please configure these extensions in for CVS or Subversion client accordingly. FINE POINT JUSTIFYING Binary TYPE FOR DSV FILES (Only read if you give a damned). The reason we're storing DSV files as binaries is because if CVS or Subversion saved them as ASCII, the line delimiters would be determined by the platform performing the check-out, and imports would fail if the computer executing nested.bash happened to be of different EOL type from the computer that checked out. (This would be the case any time that somebody built a distributable of any type which includes the .dsv files). NEGATIVE TESTS runtests.bash determines if a test script succeeds by checking if the exit status of SqlTool is zero. But we also need to test that scripts fail out when they should. I.e., we need to verify that if \c (continue-on-error) is false, and there is a syntax error, or a runtime SQL failure, that SqlTool exits with non-zero exit status, as it should. For this, I have invented the convention that SQL scripts named with suffix ".nsql" are just like normal SQL files, except that they are expected to fail. Here's an example to confirm that you understand. ./runtests.bash 1.sql 2.sql 3.nsql 4.nsql 5.sql This test run will report test failures for 1.sql, 2.sql, and 5.sql only if SqlTool fails when executing them. It will report test failures for 3.nsql and 4.nsql only if SqlTool succeeds when executing them. I.e., runtests.bash _expects_ SqlTool to fail when executing *.nsql files. Negative test scripts should be small and should fail out as early as possible. The reason for this is that if there is an accidental error before the point of your test, the script will fail out early providing a false negative SqlTool exit code, thereby silently missing your test completely. INTERACTIVE TESTS Interactive test are invoked like java... SqlTool... mem < scriptname.inter in order to test interactive ":" commands. The : commands are disabled if an SQL script path(s) is given directly as an SqlTool parameter. I.e., SqlTool runs non-interactively if an SQL script path is given as a pareter; therefore, to test interactive commands, we invoke SqlTool without a script name, and instead pipe the script into SqlTool as stdin. (Using script name of "-" would do the reverse, it would run in interactive mode even though getting input from stdin). Remember to put "\c false" at the top of your interacive scripts, or errors will be ignored. Account for this command when counting command numbers in the command history. hsqldb-1.8.0.10.orig/testrun/sqltool/args-noinput.sql0000644000175000017500000000061410064205664021173 0ustar renerene/* $Id: args-noinput.sql,v 1.1 2004/06/17 03:10:43 unsaved Exp $ See readme.txt in this directory for how to unit test SqlTool. Tests: --noinput arg HARNESS_METADATA BEGIN arg --noAutoFile arg --noinput rejectStdoutRegex See this arg mem HARNESS_METADATA END */ \p See this hsqldb-1.8.0.10.orig/testrun/sqltool/pl-variable.sql0000644000175000017500000000147210064203230020731 0ustar renerene/* $Id: pl-variable.sql,v 1.1 2004/06/17 02:48:56 unsaved Exp $ See readme.txt in this directory for how to unit test SqlTool. Tests: PL variable definition and use. HARNESS_METADATA BEGIN arg --noAutoFile requireStdoutRegex (?m)\sMARK A\n.*\d\d?:\d\d?:\d\d$ requireStdoutRegex (?m)\sMARK B: \(CALL CURRENT_TIME\)$ requireStdoutRegex (?m)\sMARK C\n.* 4$ requireStdoutRegex (?m)\sMARK D\n.* 3$ arg mem HARNESS_METADATA END */ * ct = CALL CURRENT_TIME \p MARK A *ct; \p MARK B: (*{ct}) CREATE TABLE t (i INT); INSERT INTO t VALUES (10); INSERT INTO t VALUES (20); INSERT INTO t VALUES (30); INSERT INTO t VALUES (40); * mycount = SELECT COUNT(*) FROM t \p MARK C *mycount; \p MARK D *mycount WHERE i > 15; hsqldb-1.8.0.10.orig/testrun/sqltool/dsv-roundtrip.sql0000644000175000017500000000230110656504744021370 0ustar renerene/* * $Id: dsv-roundtrip.sql,v 1.1 2007/08/09 03:28:36 unsaved Exp $ * * Tests a DSV "round trip". * Create a table, export the data, import it back, cf. imported and original. */ /** This is the default on UNIX. * Our *.dsv test files are stored as binaries, so this is required * to run tests on Windows: */ * *DSV_ROW_DELIM = \n * *DSV_TARGET_FILE = ${java.io.tmpdir}/test-roundtrip-${user.name}.dsv * *DSV_TARGET_TABLE = t CREATE TABLE t (i INT, a INT, d DATE); INSERT INTO t(i, a, d) VALUES (1, 149, null); INSERT INTO t(i, a, d) VALUES (2, null, '2007-06-24'); /* Export */ \x t SELECT count(*) FROM t WHERE i = 1 AND a = 149 AND d IS null; *if (*? != 1) \q Pre-check of inserted data failed (1) *end if SELECT count(*) FROM t WHERE i = 2 AND a IS NULL AND d = '2007-06-24'; *if (*? != 1) \q Pre-check of inserted data failed (2) *end if /* Import */ \m *{*DSV_TARGET_FILE} SELECT count(*) FROM t WHERE i = 1 AND a = 149 AND d IS null; *if (*? != 2) \q Post-check of imported data failed (1) *end if SELECT count(*) FROM t WHERE i = 2 AND a IS NULL AND d = '2007-06-24'; *if (*? != 2) \q Post-check of imported data failed (2) *end if hsqldb-1.8.0.10.orig/testrun/sqltool/testSpecials.list0000644000175000017500000000060410072122410021345 0ustar renerene# $Id: testSpecials.list,v 1.1 2004/07/05 00:47:03 unsaved Exp $ # List of SQL Test Files for JUnit test method with name corresponding # to this file name. # Empty lines and comment lines beginning with # are ok. # SYNTAX for each non-comment line: filepath Description string special-q.sql \\q command w/ no arg special-q-arg.sql \\q command w/ arg special-d.sql \\dX commands hsqldb-1.8.0.10.orig/testrun/sqltool/annotated-raw.sql0000644000175000017500000000775510064156062021323 0ustar renerene/* $Id: annotated-raw.sql,v 1.7 2004/06/16 23:48:02 unsaved Exp $ See readme.txt in this directory for how to unit test SqlTool. This is an annotated example. Don't use this as a template. See the readme.txt file about that. This is an annotated example on how to test SqlTool run in raw mode. By raw mode, I mean running SqlTool with a hyphen as the only SQL file argument, like java org.hsqldb.util.SqlTool mem - This causes SqlTool to read stdin, but non-interactively (e.g. command-line editing won't work and there is no login banner, etc.). This SQL test file runs SqlTool in raw mode by virtue of using "inputAsFile" false (the default) and specifying filename of "-" with "arg". N.b. that there are no annotations between the "HARNESS_METADATA BEGIN" line and the "HARNESS_METADATA END" lines below. This is because only harness metadata name/value pairs are permitted between those lines. In general, you are best off using urlid of "mem", which we assume that the user has configured as a memory-only database (as documented in the readme.txt file). You specify the urlid to be used by this file by using the 'arg' setting as described below. Harness metadata settings: arg: An argument for SqlTool. Unless you are testing bad command-line args, you must give at least a urlid as an arg. The only SqlTool arg that you do not give is, if you set inputAsFile to true (see below), you do not use 'arg' to specify this file name. jvmarg: An argument to come between "java" and "org.hsqldb.util.SqlTool" requireStdoutRegex: Regular expression to require from stdout of SqlTool rejectStdoutRegex: Regular expression to reject from stdout of SqlTool requireErroutRegex: Regular expression to require from errout of SqlTool rejectErroutRegex: Regular expression to reject from errout of SqlTool exitValue: Required exit value from the SqlTool run. Default is 0. Specify no value at all (i.e. a line containing just "exitValue") to ignore the exit value. inputAsFile: "true" or "false" (defaults to "false"). If "false", this file you are reading will be passed to SqlTool via stdin. If "true", the filename of the file you are reading will be given to SqlTool as the last command-line argument (do NOT give it with 'arg' or SqlTool will get that argument twice!). All settings are optional. For all but the last 2, you can give as many as you want. You could, for example give 3 args, 2 jvmargs, 20 requireStdoutRegexes. The reason for the exception where a filename 'arg' is automatically added if inputAsFile is true, is so you don't have to maintain hard-coded file names in SQL files, and you don't need to be concerned about operating system case sensitivity or case-munging problems. You can add args for other filenames, to test "SqlTool... file1 file2...", just be aware that this current file will be appended in last position if inputAsFile is true. This specific example emulates the command: SqlTool --sql '\p Print message from --sql argument.' mem - Then pipes this entire file into stdin of SqlTool. This test will INTENTIONALLY FAIL since the required regular expression does not show up in Stdout. HARNESS_METADATA BEGIN requireStdoutRegex Nonexistent string arg --sql arg \p Print message from --sql argument. arg mem arg - HARNESS_METADATA END */ \p Print message from normal SQL file area. hsqldb-1.8.0.10.orig/testrun/sqltool/nq-arg1.isql0000644000175000017500000000044110656504745020173 0ustar renerene/* * $Id: nq-arg1.isql,v 1.1 2007/08/09 03:28:37 unsaved Exp $ * * Simplest test of \q from nested script with args */ \q This should cause SqlTool to exit immediately with non-zero exit value. /* Following line causes the unit test to fail if the \q above didn't work. \q hsqldb-1.8.0.10.orig/testrun/sqltool/nq-noarg1.sql0000644000175000017500000000027610656504745020365 0ustar renerene/* * $Id: nq-noarg1.sql,v 1.1 2007/08/09 03:28:37 unsaved Exp $ * * Test of \q with arg from nested script. */ \i nq-noarg1.isql \q Should not have returned from nested script! hsqldb-1.8.0.10.orig/testrun/sqltool/special-d.sql0000644000175000017500000000175010073242364020406 0ustar renerene/* $Id: special-d.sql,v 1.2 2004/07/06 14:52:47 unsaved Exp $ See readme.txt in this directory for how to unit test SqlTool. Tests: Special commands \dX. Right now it only tests \d*, \dt, \dv, and even these only partially. HARNESS_METADATA BEGIN arg --noAutoFile rejectStdoutRegex (?s)\bNEW_\b.*\bMARK A\b rejectStdoutRegex (?s)\bMARK B.*\bNEW_VIEW.*\bMARK C\b requireStdoutRegex (?s)\bMARK B\b.*\bNEW_TBL\b.*\bMARK C requireStdoutRegex (?s)\bMARK C\b.*\bNEW_VW\b.*\bMARK D rejectStdoutRegex (?s)\bMARK C\b.*\bNEW_TBL\b.*\bMARK D rejectStdoutRegex (?s)\bMARK D\b.*\bNEW_.*\bMARK E requireStdoutRegex (?s)\bMARK E\b.*\bNEW_TBL\b arg mem HARNESS_METADATA END */ \d* \dt \dv \p MARK A CREATE TABLE NEW_TBL (vc VARCHAR); CREATE VIEW NEW_VW AS SELECT vc FROM NEW_TBL; \p MARK B \dt \p MARK C \dv /* Test substring filter */ \p MARK D \dt other \p MARK E \dt new hsqldb-1.8.0.10.orig/testrun/sqltool/goodsqlonly.sql0000644000175000017500000000021710656504744021126 0ustar renerene/* * $Id: goodsqlonly.sql,v 1.1 2007/08/09 03:28:36 unsaved Exp $ * * Just runs some successful SQL. */ CREATE TABLE t(i INTEGER); hsqldb-1.8.0.10.orig/testrun/sqltool/runtests.bash0000755000175000017500000000777010665564161020576 0ustar renerene#!/bin/bash -p PROGNAME="${0##*/}" # $Id: runtests.bash,v 1.2 2007/08/09 03:28:37 unsaved Exp $ # author: Blaine Simpson, unsaved@users.sourceforge.net # since: HSQLDB 1.8.0.8 / 1.9.x # see: README.txt in this same directory. set +u shopt -s xpg_echo # This will fail for very old implementations of Bash # The %% is for when this script is renamed with an extension like .sh or .bash. TMPDIR=/var/tmp/${PROGNAME%%.*}.$$ # If this is changed, make sure it never contains spaces or other shell # metacharacters. SYNTAX_MSG="$PROGNAME [-nvh] [testscript.sql...] With -v, output from SqlTool will be shown. Otherwise, only tests and results will be shown. If no script names are supplied, *.sql and *.nsql from the current directory will be executed. Exit value is number of test failures, or 1 for other errors or if number of test failures exceeds 255 (shell scripts can't handle exit values > 255). Non-verbose Result Key: T = Testing + = test Succeeded - = test Failed" [ $# -gt 0 ] && case "$1" in -*) case "$1" in *v*) VERBOSE=1;; esac case "$1" in *n*) NORUN=1;; esac case "$1" in *h*) echo "$SYNTAX_MSG" exit 0 ;; esac shift esac REDIROUT= [ -n "$VERBOSE" ] || REDIROUT='>&- 2>&-' Failout() { echo "Aborting $PROGNAME: $*" 1>&2 exit 1 } java -version >&- 2>&- || Failout 'You must put the version of Java to test (early) in your search path' [ -n "$CLASSPATH" ] || Failout "You must put the HSQLDB jar file (or class directory) in your CLASSPATH (and export)" java org.hsqldb.util.SqlTool --help >&- 2>&- || Failout 'org.hsqldb.util.SqlTool is not in your CLASSPATH. Add, export, and re-run.' declare -a Scripts if [ $# -gt 0 ]; then Scripts=($@) else declare -a tmpScripts tmpScripts=(*.sql) [ "${#tmpScripts[@]}" -ne 1 ] || [ "${tmpScripts[0]}" != '*.sql' ] && Scripts=("${Scripts[@]}" "${tmpScripts[@]}") tmpScripts=(*.nsql) [ "${#tmpScripts[@]}" -ne 1 ] || [ "${tmpScripts[0]}" != '*.nsql' ] && Scripts=("${Scripts[@]}" "${tmpScripts[@]}") tmpScripts=(*.inter) [ "${#tmpScripts[@]}" -ne 1 ] || [ "${tmpScripts[0]}" != '*.inter' ] && Scripts=("${Scripts[@]}" "${tmpScripts[@]}") [ ${#Scripts[@]} -eq 0 ] && Failout "No *.sql, *.ndsql or *.inter script(s) in current directory" fi [ -n "$VERBOSE" ] && echo "Scripts to execute: ${Scripts[@]}" for script in "${Scripts[@]}"; do [ -f "$script" ] || Failout "Script '$script' not present" [ -r "$script" ] || Failout "Script '$script' not readable" done [ -d $TMPDIR ] || { mkdir -p $TMPDIR || Failout "Failed to create temp directory '$TMPDIR'" } trap "rm -rf $TMPDIR" EXIT declare -a FailedScripts echo "${#Scripts[@]} test(s) to run..." for script in "${Scripts[@]}"; do case "$script" in *.inter) REDIRIN='<';; *) REDIRIN=;; esac if [ -n "$VERBOSE" ]; then echo java -Dsqltool.testsp=spval org.hsqldb.util.SqlTool --setVar testvar=plval --inlineRc user=sa,url=jdbc:hsqldb:mem:utst,password= $REDIRIN "$script" else echo -n T fi [ -n "$NORUN" ] || { succeed= eval java -Dsqltool.testsp=spval org.hsqldb.util.SqlTool --setVar testvar=plval --inlineRc user=sa,url=jdbc:hsqldb:mem:utst,password= $REDIRIN "$script" $REDIROUT case "$script" in *.nsql) [ $? -ne 0 ] && succeed=1;; *) [ $? -eq 0 ] && succeed=1;; esac [ -n "$succeed" ] || FailedScripts=("${FailedScripts[@]}" "$script") if [ -n "$VERBOSE" ]; then if [ -n "$succeed" ]; then echo SUCCESS else echo FAIL fi else if [ -n "$succeed" ]; then echo -n '\b+' else echo -n '\b-' fi fi } done [ -n "$VERBOSE" ] || echo # Line break after the plusses and minuses [ ${#FailedScripts[@]} -eq 0 ] && exit 0 echo "${#FailedScripts[@]} tests failed out of ${#Scripts[@]}:" IFS=' ' echo "${FailedScripts[*]}" [ ${#FailedScripts[@]} -gt 255 ] && exit 1 exit ${#FailedScripts[@]} hsqldb-1.8.0.10.orig/testrun/sqltool/annotated-interactive.sql0000644000175000017500000000753610064156062023044 0ustar renerene/* $Id: annotated-interactive.sql,v 1.4 2004/06/16 23:48:02 unsaved Exp $ See readme.txt in this directory for how to unit test SqlTool. This is an annotated example. Don't use this as a template. See the readme.txt file about that. This is an annotated example on how to test SqlTool run in interactive mode. SqlTool will be run without any filename arguments, and this file will be fed to SqlTool via stdin. This SQL test file runs SqlTool in interactive mode by virtue of using "inputAsFile" false (the default) and not specifying any SQL filename (or "-") with "arg". N.b. that there are no annotations between the "HARNESS_METADATA BEGIN" line and the "HARNESS_METADATA END" lines below. This is because only harness metadata name/value pairs are permitted between those lines. In general, you are best off using urlid of "mem", which we assume that the user has configured as a memory-only database (as documented in the readme.txt file). You specify the urlid to be used by this file by using the 'arg' setting as described below. Harness metadata settings: arg: An argument for SqlTool. Unless you are testing bad command-line args, you must give at least a urlid as an arg. The only SqlTool arg that you do not give is, if you set inputAsFile to true (see below), you do not use 'arg' to specify this file name. jvmarg: An argument to come between "java" and "org.hsqldb.util.SqlTool" requireStdoutRegex: Regular expression to require from stdout of SqlTool rejectStdoutRegex: Regular expression to reject from stdout of SqlTool requireErroutRegex: Regular expression to require from errout of SqlTool rejectErroutRegex: Regular expression to reject from errout of SqlTool exitValue: Required exit value from the SqlTool run. Default is 0. Specify no value at all (i.e. a line containing just "exitValue") to ignore the exit value. inputAsFile: "true" or "false" (defaults to "false"). If "false", this file you are reading will be passed to SqlTool via stdin. If "true", the filename of the file you are reading will be given to SqlTool as the last command-line argument (do NOT give it with 'arg' or SqlTool will get that argument twice!). All settings are optional. For all but the last 2, you can give as many as you want. You could, for example give 3 args, 2 jvmargs, 20 requireStdoutRegexes. The reason for the exception where a filename 'arg' is automatically added if inputAsFile is true, is so you don't have to maintain hard-coded file names in SQL files, and you don't need to be concerned about operating system case sensitivity or case-munging problems. You can add args for other filenames, to test "SqlTool... file1 file2...", just be aware that this current file will be appended in last position if inputAsFile is true. This specific example emulates the command: SqlTool --sql '\p Print message from --sql argument.' mem Then pipes this entire file into stdin of SqlTool. This test will INTENTIONALLY FAIL since the required regular expression does not show up in Stdout. HARNESS_METADATA BEGIN requireStdoutRegex Nonexistent string arg --sql arg \p Print message from --sql argument. arg mem HARNESS_METADATA END */ \p Print message from normal SQL file area. hsqldb-1.8.0.10.orig/testrun/sqltool/edit-a.sql0000644000175000017500000000126110064203362017700 0ustar renerene/* $Id: edit-a.sql,v 1.2 2004/06/17 02:50:25 unsaved Exp $ See readme.txt in this directory for how to unit test SqlTool. Tests: Command-line editing with append command. HARNESS_METADATA BEGIN arg --noAutoFile requireStdoutRegex (?m)\sMARK A\n.*Current Buffer:\nalpha beta$ requireStdoutRegex (?m)\sMARK B\n.*Current Buffer:\nalpha beta\n gamma$ arg mem HARNESS_METADATA END */ /* The blank line after each command moves the command to history without executing it. */ alpha /* Should change nothing because case doesn't match */ :a beta \p MARK A :l :a gamma \p MARK B :l hsqldb-1.8.0.10.orig/testrun/sqltool/nullrep.dsv0000644000175000017500000000047310656504745020237 0ustar renerenetargettable=t # Following (header) line has intentional trailing whitespace. id| i | r | d | t | v | b # Following line has intentional trailing whitespace (and mixed case). wspaces| [null] | [null] | [null] | [null] | [null] | [null] nospaces|[null]|[null]|[null]|[null]|[null]|[null] hsqldb-1.8.0.10.orig/testrun/sqltool/args-sqlni.sql0000644000175000017500000000077310064205664020633 0ustar renerene/* $Id: args-sqlni.sql,v 1.1 2004/06/17 03:10:43 unsaved Exp $ See readme.txt in this directory for how to unit test SqlTool. Tests: --noinput AND --sql args HARNESS_METADATA BEGIN arg --noAutoFile arg --noinput arg --sql arg \p See this requireStdoutRegex See this rejectStdoutRegex invisible arg mem HARNESS_METADATA END */ \p invisible hsqldb-1.8.0.10.orig/testrun/sqltool/sql-blankfile.sql0000644000175000017500000000102610064210156021257 0ustar renerene/* $Id: sql-blankfile.sql,v 1.1 2004/06/17 03:30:53 unsaved Exp $ See readme.txt in this directory for how to unit test SqlTool. Tests: Blank line within a SQL statement. HARNESS_METADATA BEGIN arg --noAutoFile arg --abortOnErr arg mem rejectStdoutRegex moved into buffer requireStdoutRegex row updated inputAsFile true HARNESS_METADATA END */ CREATE TABLE t (i int); insert into t values(4); hsqldb-1.8.0.10.orig/testrun/sqltool/annotated-file.sql0000644000175000017500000000751510064156062021443 0ustar renerene/* $Id: annotated-file.sql,v 1.3 2004/06/16 23:48:02 unsaved Exp $ See readme.txt in this directory for how to unit test SqlTool. This is an annotated example. Don't use this as a template. See the readme.txt file about that. This is an annotated example on how to test SqlTool run in SQL file mode. SqlTool will be run without this filename (the name of the file you are now reading), and nothing be fed to SqlTool via stdin. This SQL test file runs SqlTool in SQL file mode by virtue of the "inputAsFile true" setting below. N.b. that there are no annotations between the "HARNESS_METADATA BEGIN" line and the "HARNESS_METADATA END" lines below. This is because only harness metadata name/value pairs are permitted between those lines. In general, you are best off using urlid of "mem", which we assume that the user has configured as a memory-only database (as documented in the readme.txt file). You specify the urlid to be used by this file by using the 'arg' setting as described below. Harness metadata settings: arg: An argument for SqlTool. Unless you are testing bad command-line args, you must give at least a urlid as an arg. The only SqlTool arg that you do not give is, if you set inputAsFile to true (see below), you do not use 'arg' to specify this file name. jvmarg: An argument to come between "java" and "org.hsqldb.util.SqlTool" requireStdoutRegex: Regular expression to require from stdout of SqlTool rejectStdoutRegex: Regular expression to reject from stdout of SqlTool requireErroutRegex: Regular expression to require from errout of SqlTool rejectErroutRegex: Regular expression to reject from errout of SqlTool exitValue: Required exit value from the SqlTool run. Default is 0. Specify no value at all (i.e. a line containing just "exitValue") to ignore the exit value. inputAsFile: "true" or "false" (defaults to "false"). If "false", this file you are reading will be passed to SqlTool via stdin. If "true", the filename of the file you are reading will be given to SqlTool as the last command-line argument (do NOT give it with 'arg' or SqlTool will get that argument twice!). All settings are optional. For all but the last 2, you can give as many as you want. You could, for example give 3 args, 2 jvmargs, 20 requireStdoutRegexes. The reason for the exception where a filename 'arg' is automatically added if inputAsFile is true, is so you don't have to maintain hard-coded file names in SQL files, and you don't need to be concerned about operating system case sensitivity or case-munging problems. You can add args for other filenames, to test "SqlTool... file1 file2...", just be aware that this current file will be appended in last position if inputAsFile is true. This specific example emulates the command: SqlTool --sql '\p Print message from --sql argument.' mem thisfilename.sql Then closes off stdin to the process. This test will INTENTIONALLY FAIL since the required regular expression does not show up in Stdout. HARNESS_METADATA BEGIN requireStdoutRegex Nonexistent string arg --sql arg \p Print message from --sql argument. arg mem inputAsFile true HARNESS_METADATA END */ \p Print message from normal SQL file area. hsqldb-1.8.0.10.orig/testrun/sqltool/dsv-rejects.dsv0000644000175000017500000000066410656504744021010 0ustar renerenetargettable=t i | r | d | t | v | b 31 | 3.124 | 2007-06-07 | 2006-05-06 12:30:04 | a B | true 42 | 1.5 | 2007-07-08 | 2006-05-07 10:20 | a string | false # Letter in int field: 5 | a | 2007-07-08 | 2006-05-07 10:20 | a string | false # No seconds in time field 42 | 1.5 | 2007-07-08 | 2006-05-07 10:20 | a string | false 42 | 1.5 | 2007-07-08 | 2006-05-07 10:20:0 | a string | false hsqldb-1.8.0.10.orig/testrun/sqltool/dsv-rejects.sql0000644000175000017500000000111010656504744020776 0ustar renerene/* * $Id: dsv-rejects.sql,v 1.1 2007/08/09 03:28:36 unsaved Exp $ * * Tests proper rejection of bad DSV input records */ /** This is the default on UNIX. * Our *.dsv test files are stored as binaries, so this is required * to run tests on Windows: */ * *DSV_ROW_DELIM = \n CREATE TABLE t (i INT, r REAL, d DATE, t TIMESTAMP, v VARCHAR, b BOOLEAN); * *DSV_REJECT_REPORT = ${java.io.tmpdir}/sqltoolutst-${user.name}.html \m dsv-rejects.dsv SELECT COUNT(*) FROM t; *if (*? != 2) \q Should have imported 2 good DSV records, but imported *{?} *end if hsqldb-1.8.0.10.orig/testrun/sqltool/dsv-omits.sql0000644000175000017500000000233710656504744020506 0ustar renerene/* * $Id: dsv-omits.sql,v 1.1 2007/08/09 03:28:36 unsaved Exp $ * * Tests omitting columns via header line and *DSV_SKIP_COLS */ /** This is the default on UNIX. * Our *.dsv test files are stored as binaries, so this is required * to run tests on Windows: */ * *DSV_ROW_DELIM = \n CREATE TABLE t (i INT, a INT, b INT, c INT); \m dsv-omits.dsv SELECT COUNT(*) FROM t WHERE i IS NOT null AND a IS NOT null AND b IS NOT null AND c IS NOT null; *if (*? != 2) \q Import using header line - column-skips failed *end if /** Repeat test with some non-default DSV settings */ * *DSV_SKIP_COLS = c| a DELETE FROM t; \m dsv-omits.dsv SELECT COUNT(*) FROM t WHERE i IS NOT null AND b IS NOT null AND a IS null AND c IS null; *if (*? != 2) \q Import using header line - AND *DSV_SKIP_COLS column-skips failed *end if /* Now test that behavior reverts when PL variable is cleared */ * *DSV_SKIP_COLS = * listvalues DELETE FROM t; \m dsv-omits.dsv SELECT COUNT(*) FROM t WHERE i IS NOT null AND a IS NOT null AND b IS NOT null AND c IS NOT null; \p Post everything *if (*? != 2) SELECT * FROM t; \q *DSV_SKIP_COLS behavior failed to revert when variable was cleared *end if hsqldb-1.8.0.10.orig/testrun/sqltool/testPL.list0000644000175000017500000000047110072122410020117 0ustar renerene# $Id: testPL.list,v 1.1 2004/07/05 00:47:03 unsaved Exp $ # List of SQL Test Files for JUnit test method with name corresponding # to this file name. # Empty lines and comment lines beginning with # are ok. # SYNTAX for each non-comment line: filepath Description string pl-variable.sql PL variable use hsqldb-1.8.0.10.orig/testrun/sqltool/nullrep.sql0000644000175000017500000000615210656504745020242 0ustar renerene/* * $Id: nullrep.sql,v 1.1 2007/08/09 03:28:37 unsaved Exp $ * * Tests enforcement of null-representation token */ /** This is the default on UNIX. * Our *.dsv test files are stored as binaries, so this is required * to run tests on Windows: */ * *DSV_ROW_DELIM = \n CREATE TABLE t (i INT, vc VARCHAR); INSERT INTO t VALUES(1, 'one'); /** For INPUT, the NULLREP is only used for DSV imports, since unquoted * null works perfectly for other forms of input. * Therefore, following should enter "[null]" literally. */ INSERT INTO t VALUES(2, '[null]'); INSERT INTO t VALUES(3, null); * COUNT _ SELECT count(*) FROM t WHERE i = 2 AND vc IS NULL; * if (*COUNT != 0) \q Seems that non-DSV insertion of '[null]' inserted a real NULL * end if * COUNT _ SELECT count(*) FROM t WHERE i = 3 AND vc IS null; * if (*COUNT != 1) \q Seems that non-DSV insertion of plain null did not insert a SQL NULL * end if DROP TABLE t; /* Now test nullrep tokens with DSV imports */ CREATE TABLE t ( id VARCHAR PRIMARY KEY, i INTEGER, r REAL, d DATE, t TIMESTAMP, v VARCHAR, b BOOLEAN ); \m nullrep.dsv SELECT count(*) FROM t WHERE id = 'wspaces' AND i IS null; *if (*? != 1) \q Insertion of INTEGER space-embedded null-rep-token failed *end if SELECT count(*) FROM t WHERE id = 'wspaces' AND r IS null; *if (*? != 1) \q Insertion of REAL space-embedded null-rep-token failed *end if SELECT count(*) FROM t WHERE id = 'wspaces' AND d IS null; *if (*? != 1) \q Insertion of DATE space-embedded null-rep-token failed *end if SELECT count(*) FROM t WHERE id = 'wspaces' AND t IS null; *if (*? != 1) \q Insertion of TIMESTAMP space-embedded null-rep-token failed *end if SELECT count(*) FROM t WHERE id = 'wspaces' AND v = ' [null] '; *if (*? != 1) \q Insertion of VARCHAR w/ space-embedded null-rep-token failed *end if SELECT count(*) FROM t WHERE id = 'wspaces' AND b IS null; *if (*? != 1) \q Insertion of BOOLEAN space-embedded null-rep-token failed *end if DELETE FROM t; /** Repeat test with some non-default DSV settings */ * *NULL_REP_TOKEN = %% * *DSV_COL_DELIM = : * *DSV_ROW_DELIM = }\n \m nullrep-alt.dsv SELECT count(*) FROM t WHERE id = 'wspaces' AND i IS null; *if (*? != 1) \q Insertion of INTEGER space-embedded null-rep-token failed *end if SELECT count(*) FROM t WHERE id = 'wspaces' AND r IS null; *if (*? != 1) \q Insertion of REAL space-embedded null-rep-token failed *end if SELECT count(*) FROM t WHERE id = 'wspaces' AND d IS null; *if (*? != 1) \q Insertion of DATE space-embedded null-rep-token failed *end if SELECT count(*) FROM t WHERE id = 'wspaces' AND t IS null; *if (*? != 1) \q Insertion of TIMESTAMP space-embedded null-rep-token failed *end if SELECT count(*) FROM t WHERE id = 'wspaces' AND v = ' %% '; *if (*? != 1) \q Insertion of VARCHAR w/ space-embedded null-rep-token failed *end if SELECT count(*) FROM t WHERE id = 'wspaces' AND b IS null; *if (*? != 1) \q Insertion of BOOLEAN space-embedded null-rep-token failed *end if hsqldb-1.8.0.10.orig/testrun/sqltool/rawmode.sql0000644000175000017500000000047010656504745020214 0ustar renerene/* * $Id: rawmode.sql,v 1.1 2007/08/09 03:28:37 unsaved Exp $ * * Tests raw mode */ CREATE TABLE t (i INTEGER); INSERT INTO t values (42); /** Adding a few blank lines in what is sent to server on purpose. */ \. SELECT i FROM t .; *if (*? != 42) \q Raw command failed *end if hsqldb-1.8.0.10.orig/testrun/sqltool/edit-s-noswitches.sql0000644000175000017500000000155010064203362022107 0ustar renerene/* $Id: edit-s-noswitches.sql,v 1.3 2004/06/17 02:50:25 unsaved Exp $ See readme.txt in this directory for how to unit test SqlTool. Tests: Command-line editing with switch command. No subst. switches. HARNESS_METADATA BEGIN arg --noAutoFile requireStdoutRegex (?m)\sMARK A\n.*Current Buffer:\nalpha beta gamma delta$ requireStdoutRegex (?m)\sMARK B\n.*Current Buffer:\nalphREPLbeta gamma delta$ requireStdoutRegex (?m)\sMARK C\n.*Current Buffer:\nalphREPLbeta g delta$ arg mem HARNESS_METADATA END */ /* The blank line after each command moves the command to history without executing it. */ alpha beta gamma delta /* Should change nothing because case doesn't match */ \p MARK A :s/A /REPL/ /* Should work */ \p MARK B :s/a /REPL/ \p MARK C :s/amma// hsqldb-1.8.0.10.orig/testrun/sqltool/append.inter0000644000175000017500000000225310656505027020342 0ustar renerene/* * $Id: append.inter,v 1.1 2007/08/09 03:29:27 unsaved Exp $ * * Tests interactive commands :a*. */ \c false /* Since running interactively, need to either invoke with --abortOnErr switch, * or use "\c false" Special command, to detect failures. */ CREATE TABLE t(id INTEGER GENERATED BY DEFAULT AS IDENTITY, vc VARCHAR); INSERT INTO t (vc) VALUES('a'); INSERT INTO t (vc) VALUES('b'); INSERT INTO t (vc) VALUES('c'); INSERT INTO t (vc) VALUES('b'); SELECT count(*) FROM t *if (*? != 4) \q Sanity check failed / 1 *end if SELECT count(*) FROM t WHERE vc = 'b'; *if (*? != 2) \q Sanity check failed / 2 *end if INSERT INTO t(vc) VALUES ('pref :apost'); SELECT count(*) FROM t *if (*? != 5) \q Append + repl failed / 1 *end if SELECT vc FROM t; SELECT count(*) FROM t WHERE vc = 'prefpost'; *if (*? != 1) \q Append + repl failed / 2 *end if SELECT count(*) FROM t; \p Intervening command making previous become command # -2. :h :-2a WHERE vc = 'b'; *if (*? != 2) \q Recall + Append + exec failed / 1 *end if :-2 :a AND id = 1 :; *if (*? != 1) \q Recall + multi-line Append failed / 1 *end if hsqldb-1.8.0.10.orig/testrun/sqltool/edit-s-switches.sql0000644000175000017500000000162110064203362021551 0ustar renerene/* $Id: edit-s-switches.sql,v 1.2 2004/06/17 02:50:25 unsaved Exp $ See readme.txt in this directory for how to unit test SqlTool. Tests: Command-line editing with switch command. With subst. switches. HARNESS_METADATA BEGIN arg --noAutoFile requireStdoutRegex (?m)\sMARK A\n.*Current Buffer:\nalpha beta gamma delta$ requireStdoutRegex (?m)\sMARK B\n.*Current Buffer:\nalphALTbeta gamma delta$ requireStdoutRegex (?m)\sMARK C\n.*Current Buffer:\nGLOBlphALTbetGLOB gGLOBmmGLOB deltGLOB$ arg mem HARNESS_METADATA END */ /* The blank line after each command moves the command to history without executing it. */ alpha beta gamma delta /* case-sensitive has nothing to do here */ \p MARK A :s/A /REPL/ /* case-insensitive does work here */ \p MARK B :s/A /ALT/i /* global */ \p MARK C :s/a/GLOB/g hsqldb-1.8.0.10.orig/testrun/sqltool/dsv-prepare.sql0000644000175000017500000000055510656504744021011 0ustar renerene/* * $Id: dsv-prepare.sql,v 1.1 2007/08/09 03:28:36 unsaved Exp $ * * Tests PL 'prepare' command */ CREATE TABLE t (i INT, a INT, b INT, c INT); * N = 4567 * prepare N INSERT INTO t(i, a, b, c) VALUES (1, ?, 8, 9); SELECT count(*) FROM t WHERE i = 1 AND a = 4567 AND b= 8 AND c = 9; *if (*? != 1) \q PL prepare command failed *end if hsqldb-1.8.0.10.orig/testrun/sqltool/dsv-constcols.dsv0000644000175000017500000000030110656504743021343 0ustar renerenetargettable=t # Following (header) line has intentional trailing whitespace. i | - | d # Following line has intentional trailing whitespace (and mixed case). 1 | 1 | 2006-12-11 2 | 2 | hsqldb-1.8.0.10.orig/testrun/sqltool/testEditing.list0000644000175000017500000000061510072122410021167 0ustar renerene# $Id: testEditing.list,v 1.1 2004/07/05 00:47:03 unsaved Exp $ # List of SQL Test Files for JUnit test method with name corresponding # to this file name. # Empty lines and comment lines beginning with # are ok. # SYNTAX for each non-comment line: filepath Description string edit-s-noswitches.sql s: command, no switches edit-s-switches.sql s: command w/ switches edit-a.sql a: command hsqldb-1.8.0.10.orig/testrun/sqltool/nq-arg1.nsql0000644000175000017500000000042610656504745020203 0ustar renerene/* * $Id: nq-arg1.nsql,v 1.1 2007/08/09 03:28:37 unsaved Exp $ * * Test of \q with arg from nested script. */ \i nq-arg1.isql \p Should not have returned from nested script which ran \q. /* Following line exits with success status to fail the .nsql unit test. \q hsqldb-1.8.0.10.orig/testrun/sqltool/q-noarg1.sql0000644000175000017500000000026410656504745020204 0ustar renerene/* * $Id: q-noarg1.sql,v 1.1 2007/08/09 03:28:37 unsaved Exp $ * * Simplest test of \q with no args */ \p Just quitting. Should exit with 0 (success) exit status. \q hsqldb-1.8.0.10.orig/testrun/sqltool/lastval.sql0000644000175000017500000000157410656504744020231 0ustar renerene/* * $Id: lastval.sql,v 1.1 2007/08/09 03:28:36 unsaved Exp $ * * Tests auto-variable ? */ CREATE TABLE t (i INT); * if (*? != 0) \p ? variable not capturing CREATE TABLE return value * end if INSERT INTO t values (21); * if (*? != 1) \p ? variable not capturing INSERT return value * end if INSERT INTO t values (10); * if (*? != 1) \p ? variable not capturing INSERT return value * end if INSERT INTO t values (43); * if (*? != 1) \p ? variable not capturing INSERT return value * end if SELECT * FROM t ORDER BY i DESC; * if (*? != 10) \p ? variable not capturing last fetched value * end if \p echo some stuff \p to verify that ? variable value is preserved * list * if (*? != 10) \p ? value not retained after special commands * end if * if (*{?} != 10) \p ? value not dereferenced with {} usage * end if hsqldb-1.8.0.10.orig/testrun/sqltool/testcases.txt0000644000175000017500000000267510656504746020606 0ustar renerene$Id: testcases.txt,v 1.1 2007/08/09 03:28:38 unsaved Exp $ file items/features tested ----------- ---------------------------- dsv-trimming.sql DSV import tests, including trimming of whitespace. lastval.sql Test automatic ? variable. nullrep.sql Test the null-representation token (default and custom). q-noarg*.sql Test for success status \q exits. q-arg*.nsql Tests for failure status "\q arg..." exits. noop.sql Does nothing (exit status should be success). goodsqlonly.sql Executes some successful SQL. badsqlonly.nsql Executes some bad SQL. logic.sql Conditional expression tests. nq-noarg*.sql Test for success status \q exits, in nested script. nq-arg*.nsql Tests for failure status "\q arg..." exits, in nested script. plcontrolflow.sql Test of PL control flow commands like if, foreach, etc. rawmode.sql Test of raw input mode. dsv-constcols.sql *DSV_CONST_COLS usage. dsv-omits.sql Test omitting of columns in DSV imports. dsv-prepare.sql Test "* prepare" command. dsv-rejects.sql Test import behavior when a reject file/report is in place. dsv-roundtrip.sql Exports and re-import data, verifying that is hasn't changed. subst.inter Tests interactive commands :s... write.inter Tests interactive command :w append.inter Tests interactive commands :a... history.inter Tests interactive recall/execute commands (plus :h, :b) hsqldb-1.8.0.10.orig/testrun/sqltool/dsv-constcols.sql0000644000175000017500000000170110656504743021353 0ustar renerene/* * $Id: dsv-constcols.sql,v 1.1 2007/08/09 03:28:35 unsaved Exp $ * * Tests setting column values with *DSV_CONST_COLS */ /** This is the default on UNIX. * Our *.dsv test files are stored as binaries, so this is required * to run tests on Windows: */ * *DSV_ROW_DELIM = \n * *DSV_CONST_COLS= d = 2007-05-14 0:00:00 | a = 139 CREATE TABLE t (i INT, a INT, d DATE); \m dsv-constcols.dsv SELECT COUNT(*) FROM t WHERE a = 139 AND d = '2007-05-14'; /* The d const value will override the .dsv-specified values. */ *if (*? != 2) \q Import using constants for int and date columns failed *end if DELETE from t; * *DSV_CONST_COLS= \m dsv-constcols.dsv SELECT COUNT(*) FROM t WHERE a IS null AND d IS null; *if (*? != 1) \q Failed to reset CONST_COLS behavior (1) *end if SELECT COUNT(*) FROM t WHERE a IS null AND d = '2006-12-11'; *if (*? != 1) \q Failed to reset CONST_COLS behavior (2) *end if hsqldb-1.8.0.10.orig/testrun/sqltool/noop.sql0000644000175000017500000000017510656504745017533 0ustar renerene/* * $Id: noop.sql,v 1.1 2007/08/09 03:28:37 unsaved Exp $ * * Simplest test possible. Does absolutely nothing. */ hsqldb-1.8.0.10.orig/testrun/sqltool/write.inter0000644000175000017500000000402610656504746020234 0ustar renerene/* * $Id: write.inter,v 1.1 2007/08/09 03:28:38 unsaved Exp $ * * Tests interactive command :w*. * * This script has some serious portability concerns, as detailed here. * * Can't think of a portable way to prepare/purge the output file. * Depending on existence of "rm" program until a better solution found. */ \c false /* Since running interactively, need to either invoke with --abortOnErr switch, * or use "\c false" Special command, to detect failures. */ * TARGETSCRIPT = ${java.io.tmpdir}${file.separator}sqltool-wtest-${user.name}.sql CREATE TABLE t(id INTEGER GENERATED BY DEFAULT AS IDENTITY, vc VARCHAR); \p Testing write of non-sql, #1 :w *{TARGETSCRIPT} INSERT INTO t (vc) VALUES ('a'); :w *{TARGETSCRIPT} :; INSERT INTO t (vc) VALUES ('b'); INSERT INTO t (vc) VALUES ('c'); :w *{TARGETSCRIPT} \p Testing write of non-sql, #2 :w *{TARGETSCRIPT} INSERT INTO t (vc) VALUES ('d'); INSERT INTO t (vc) VALUES ('e'); INSERT INTO t (vc) VALUES ('f'); :-2w *{TARGETSCRIPT} :w *{TARGETSCRIPT} /* Following line has trailing white space */ :w *{TARGETSCRIPT} :; /* The :; commands will do non-effectual INSERTs, not :w's, since : commands may not be recalled (since they don't make it into the buffer). */ /* Clean up the temp file if at all possible! */ \p deleting DELETE FROM t; \p selecting SELECT * FROM t; \p executing \i *{TARGETSCRIPT} \p executed SELECT * FROM t; \q SELECT COUNT(*) FROM t; *if (*? != 5) \! rm -f *{TARGETSCRIPT} \q :w test failed / 1 *end if SELECT COUNT(*) FROM t WHERE vc = 'a'; *if (*? != 1) \! rm -f *{TARGETSCRIPT} \q :w test failed / 2 *end if SELECT COUNT(*) FROM t WHERE vc = 'c'; *if (*? != 1) \! rm -f *{TARGETSCRIPT} \q :w test failed / 3 *end if SELECT COUNT(*) FROM t WHERE vc = 'e'; *if (*? != 1) \! rm -f *{TARGETSCRIPT} \q :w test failed / 4 *end if SELECT COUNT(*) FROM t WHERE vc = 'f'; *if (*? != 2) \! rm -f *{TARGETSCRIPT} \q :w test failed / 5 *end if \! rm -f *{TARGETSCRIPT} hsqldb-1.8.0.10.orig/testrun/sqltool/dsv-trimming.sql0000644000175000017500000000417510656504744021203 0ustar renerene/* * $Id: dsv-trimming.sql,v 1.1 2007/08/09 03:28:36 unsaved Exp $ * * Tests trimming in DSV imports */ /** This is the default on UNIX. * Our *.dsv test files are stored as binaries, so this is required * to run tests on Windows: */ * *DSV_ROW_DELIM = \n CREATE TABLE t (i INT, r REAL, d DATE, t TIMESTAMP, v VARCHAR, b BOOLEAN); \m dsv-trimming.dsv SELECT count(*) FROM t WHERE i = 31; *if (*? != 1) \q Import of space-embedded INT failed *end if SELECT count(*) FROM t WHERE r = 3.124; *if (*? != 1) \q Import of space-embedded REAL failed *end if SELECT count(*) FROM t WHERE d = '2007-06-07'; *if (*? != 1) \q Import of space-embedded DATE failed *end if SELECT count(*) FROM t WHERE t = '2006-05-06 12:30:04'; *if (*? != 1) \q Import of space-embedded TIMESTAMP failed *end if SELECT count(*) FROM t WHERE v = ' a B '; *if (*? != 1) \q Import of space-embedded VARCHAR failed *end if /** I dont' know if "IS true" or "= true" is preferred, but the former * doesn't work with HSQLDB 1.7.0.7 */ SELECT count(*) FROM t WHERE b = true; *if (*? != 1) \q Import of space-embedded BOOLEAN failed *end if /** Repeat test with some non-default DSV settings */ * *DSV_COL_DELIM = \\ * *DSV_ROW_DELIM = }\n DELETE FROM t; \m dsv-trimming-alt.dsv SELECT count(*) FROM t WHERE i = 31; *if (*? != 1) \q Import of space-embedded INT failed *end if SELECT count(*) FROM t WHERE r = 3.124; *if (*? != 1) \q Import of space-embedded REAL failed *end if SELECT count(*) FROM t WHERE d = '2007-06-07'; *if (*? != 1) \q Import of space-embedded DATE failed *end if SELECT count(*) FROM t WHERE t = '2006-05-06 12:30:04'; *if (*? != 1) \q Import of space-embedded TIMESTAMP failed *end if SELECT count(*) FROM t WHERE v = ' a B '; *if (*? != 1) \q Import of space-embedded VARCHAR failed *end if /** I dont' know if "IS true" or "= true" is preferred, but the former * doesn't work with HSQLDB 1.7.0.7 */ SELECT count(*) FROM t WHERE b = true; *if (*? != 1) \q Import of space-embedded BOOLEAN failed *end if hsqldb-1.8.0.10.orig/testrun/sqltool/args-sql.sql0000644000175000017500000000064510064205664020302 0ustar renerene/* $Id: args-sql.sql,v 1.1 2004/06/17 03:10:43 unsaved Exp $ See readme.txt in this directory for how to unit test SqlTool. Tests: --sql arg HARNESS_METADATA BEGIN arg --noAutoFile arg --sql arg \p See this requireStdoutRegex See this arg mem HARNESS_METADATA END */ \p See this hsqldb-1.8.0.10.orig/testrun/sqltool/history.inter0000644000175000017500000000213310656504744020576 0ustar renerene/* * $Id: history.inter,v 1.1 2007/08/09 03:28:36 unsaved Exp $ * * Tests simple recalls and executes : and :;. */ \c false /* Since running interactively, need to either invoke with --abortOnErr switch, * or use "\c false" Special command, to detect failures. */ CREATE TABLE t(id INTEGER GENERATED BY DEFAULT AS IDENTITY, vc VARCHAR); /* Just verify that an error is not thrown by the two following commands. And that they don't effect the command history. */ :b :h INSERT INTO t(vc) VALUES('one'); INSERT INTO t(vc) VALUES('two'); INSERT INTO t(vc) VALUES('three'); /* Test simple recall and execution */ :4 :; :4; :; SELECT count(*) FROM t *if (*? != 6) \q Recall and execs failed / 1 *end if /* SELECT vc FROM t; */ SELECT count(*) FROM t WHERE vc = 'two'; *if (*? != 4) \q Recall and execs failed / 2 *end if :/ee/; SELECT count(*) FROM t; *if (*? != 7) \q Regex Recall and execs failed / 1 *end if /* SELECT vc FROM t; */ SELECT count(*) FROM t WHERE vc = 'three'; *if (*? != 2) \q Regex Recall and execs failed / 2 *end if hsqldb-1.8.0.10.orig/testrun/sqltool/q-arg1.nsql0000644000175000017500000000022410656504745020021 0ustar renerene/* * $Id: q-arg1.nsql,v 1.1 2007/08/09 03:28:37 unsaved Exp $ * * Simplest test of \q with arg */ \q Quitting with non-zero exit status hsqldb-1.8.0.10.orig/testrun/sqltool/sql-blankint.sql0000644000175000017500000000102210064210156021126 0ustar renerene/* $Id: sql-blankint.sql,v 1.1 2004/06/17 03:30:53 unsaved Exp $ See readme.txt in this directory for how to unit test SqlTool. Tests: Blank line within a SQL statement. HARNESS_METADATA BEGIN arg --noAutoFile arg --abortOnErr arg mem requireStdoutRegex moved into buffer rejectStdoutRegex row updated exitValue 1 HARNESS_METADATA END */ CREATE TABLE t (i int); insert into t values(4); hsqldb-1.8.0.10.orig/testrun/hsqldb/0000755000175000017500000000000010665014027015601 5ustar renerenehsqldb-1.8.0.10.orig/testrun/hsqldb/TestSelfLeftJoin.txt0000644000175000017500000003157010405021733021526 0ustar renerene-- SIMPLE OUTER - NO NULLS drop table x if exists; drop table y if exists; create table x(a int, b int); create table y(a int, b int); insert into x values(2, 1); insert into x values(5, 1); insert into y values(1, 1); insert into y values(2, 1); insert into y values(3, 1); insert into y values(4, 1); /*r1*/ select count(*) from x inner join y on (x.a = y.a); /*r2*/ select count(*) from x left outer join y on (x.a = y.a); /*r1*/ select count(*) from y inner join x on (x.a = y.a); /*r4*/ select count(*) from y left outer join x on (x.a = y.a); create index idx1 on y(a); create index idx2 on x(a); /*r1*/ select count(*) from x inner join y on (x.a = y.a); /*r2*/ select count(*) from x left outer join y on (x.a = y.a); /*r1*/ select count(*) from y inner join x on (x.a = y.a); /*r4*/ select count(*) from y left outer join x on (x.a = y.a); --MULTIPLE OUTER -- GROUPED --OWNERS are possible account owners --ACCOUNTS are existing accounts, each with an owner id --CREDITS are account transactions drop table credits if exists; drop table accounts if exists; drop table owners if exists; create table owners( id int not null primary key, name varchar(100) ); create table accounts( id int not null primary key, accountname varchar(100), accountnr int, accounttype int, ownerid int, constraint fk_accounts foreign key (ownerid) references owners(id) ); create table credits( id int, accountid int, amount float, constraint fk_credits foreign key (accountid) references accounts(id) on update cascade ); insert into owners values(1,'John'); insert into owners values(2,'Mary'); insert into owners values(3,'Jane'); insert into accounts values(1,'Bank',5101,0,1); insert into accounts values(2,'Cash',5202,0,1); insert into accounts values(3,'Giro',5303,0,2); insert into accounts values(4,'Invoice',7505,1,1); insert into credits values(1,1,1000); insert into credits values(2,1,2000); insert into credits values(3,2,100); insert into credits values(4,2,200); --outer join /*c7*/select own.*, ac.*, cred.* from owners own left outer join accounts ac on own.id = ac.ownerid left outer join credits cred on cred.accountid = ac.id --ACCOUNTS are outer joined with credits to show account balance /*c4*/select ac.accountname,ac.accountnr,sum(cred.amount) from accounts ac left outer join credits cred on cred.accountid=ac.id group by ac.accountnr,ac.accountname --like above but filtered with only one account type /*c3*/select ac.accountname,ac.accountnr,sum(cred.amount) from accounts ac left outer join credits cred on cred.accountid=ac.id where accounttype=0 group by ac.accountnr,ac.accountname --join like above but condition changed to return only one not-null item from cred table /*c4*/select ac.accountname,ac.accountnr, cred.amount from accounts ac left outer join credits cred on cred.accountid=ac.id and amount=200 --OWNER and ACCOUNT are inner joined then outer joined with credits to show balance /*c3*/select own.name, ac.accountname,ac.accountnr,sum(cred.amount) from owners own inner join accounts ac on own.id = ac.ownerid left outer join credits cred on cred.accountid = ac.id where accounttype=0 group by own.name,ac.accountnr,ac.accountname --OWNER and ACCOUNT are outer joined then outer joined with credits to show balance /*c5*/select own.name, ac.accountname,ac.accountnr,sum(cred.amount) from owners own left outer join accounts ac on own.id = ac.ownerid left outer join credits cred on cred.accountid = ac.id group by own.name,ac.accountnr,ac.accountname --ERROR when a condition column has not been defined in the join so far /*e*/select own.*, ac.*, cred.* from owners own left outer join accounts ac on own.id = ac.ownerid and cred.accountid = 1 left outer join credits cred on cred.accountid = ac.id --from 1.8.1 functions and different conditions are accepted in outer joins /*R Bank,5101,NULL Cash,5202,200.0 Giro,5303,NULL Invoice,7505,NULL */select ac.accountname,ac.accountnr, cred.amount from accounts ac left outer join credits cred on cred.accountid=ac.id and abs(amount) = 200 /*R Bank,5101,NULL Cash,5202,100.0 Cash,5202,200.0 Giro,5303,NULL Invoice,7505,NULL */select ac.accountname,ac.accountnr, cred.amount from accounts ac left outer join credits cred on cred.accountid=ac.id and abs(amount) in( 200, 100) --MULTIPLE OUTER --STUDENTS contains id's for students --TEACHERS contains id's for teachers --STUDENT_TEACHER links a teacher to a student DROP TABLE STUDENT IF EXISTS; DROP TABLE TEACHER IF EXISTS; DROP TABLE STUDENT_TEACHER IF EXISTS; CREATE TABLE STUDENT(STUDENT_ID BIGINT NOT NULL PRIMARY KEY); CREATE TABLE TEACHER(TEACHER_ID BIGINT NOT NULL PRIMARY KEY); CREATE TABLE STUDENT_TEACHER(STUDENT_ID BIGINT NOT NULL, TEACHER_ID BIGINT NOT NULL); INSERT INTO STUDENT VALUES (1); INSERT INTO STUDENT VALUES (2); INSERT INTO TEACHER VALUES (100); INSERT INTO STUDENT_TEACHER VALUES (1, 100); --show all students with their links to teachers, include students without a teacher /*c2*/SELECT S.STUDENT_ID, T.TEACHER_ID FROM STUDENT S LEFT JOIN STUDENT_TEACHER MAP ON S.STUDENT_ID=MAP.STUDENT_ID LEFT JOIN TEACHER T ON MAP.TEACHER_ID=T.TEACHER_ID --filter the above to show students for teacher_id 100 /*c1*/SELECT S.STUDENT_ID, T.TEACHER_ID FROM STUDENT S LEFT JOIN STUDENT_TEACHER MAP ON S.STUDENT_ID=MAP.STUDENT_ID LEFT JOIN TEACHER T ON MAP.TEACHER_ID=T.TEACHER_ID WHERE T.TEACHER_ID = 100; --filter the first query to show only students with no teacher /*c1*/SELECT S.STUDENT_ID, T.TEACHER_ID FROM STUDENT S LEFT JOIN STUDENT_TEACHER MAP ON S.STUDENT_ID=MAP.STUDENT_ID LEFT JOIN TEACHER T ON MAP.TEACHER_ID=T.TEACHER_ID WHERE T.TEACHER_ID IS NULL; --show the result of nonsensical query --returns one row per STUDENT_ID with TEACHER_ID set to null in each row /*c2*/SELECT S.STUDENT_ID, T.TEACHER_ID FROM STUDENT S LEFT JOIN STUDENT_TEACHER MAP ON S.STUDENT_ID=MAP.STUDENT_ID LEFT JOIN TEACHER T ON MAP.TEACHER_ID=T.TEACHER_ID AND T.TEACHER_ID IS NULL; --ANOTHER OUTER WITH AND create table BASE (ID integer) create table CHILD(ID integer, BASE_ID integer) insert into BASE values (1) insert into BASE values (2) insert into CHILD values (1,1) /*r 1,1 2,NULL */select BASE.ID,CHILD.ID from BASE left join CHILD on CHILD.BASE_ID=BASE.ID /*r 1,NULL 2,NULL */select BASE.ID,CHILD.ID from BASE left join CHILD on CHILD.BASE_ID=BASE.ID and CHILD.ID>1 /*r 1,NULL 2,NULL */select BASE.ID,CHILD.ID from BASE left join CHILD on CHILD.BASE_ID=BASE.ID and CHILD.ID<>1 --bug #736327 create table emp(company_id varchar(10),id varchar(20),supervisor_id varchar(20), primary key (company_id,id)); insert into emp values ('01','1000',null); insert into emp values ('01','1001','1000'); /*c2*/select id,supervisor_id from emp e left join emp s on e.company_id = s.company_id and e.supervisor_id = s.id; -- --bug #676083 -- DROP TABLE T_BOSS IF EXISTS; DROP TABLE T_EMPLOYEE IF EXISTS; CREATE TABLE T_BOSS (FIRST VARCHAR(10),LAST VARCHAR(10)); CREATE TABLE T_EMPLOYEE (FIRST VARCHAR(10),LAST VARCHAR(10)); INSERT INTO T_BOSS VALUES ('Ludovic','ANCIAUX'); INSERT INTO T_EMPLOYEE VALUES ('Ludovic','ANCIAUX'); INSERT INTO T_EMPLOYEE VALUES ('Bill','GATES'); /*rBill,GATES,NULL,NULL*/SELECT * FROM T_EMPLOYEE LEFT JOIN T_BOSS ON T_EMPLOYEE.FIRST = T_BOSS.FIRST WHERE T_BOSS.FIRST IS Null; -- --bug #674025 -- CREATE TABLE boss (id INTEGER PRIMARY KEY, name VARCHAR(10), UNIQUE(name)); CREATE TABLE employee (id INTEGER PRIMARY KEY, name VARCHAR(10), bossid INTEGER, FOREIGN KEY(bossid) REFERENCES boss (id), UNIQUE(name)); INSERT INTO boss (id, name) VALUES (1, 'phb'); INSERT INTO employee (id, name, bossid) VALUES (2,'dilbert', 1); INSERT INTO employee (id, name, bossid) VALUES (3, 'wally', null); /*c2*/SELECT * FROM employee e LEFT JOIN boss b ON (b.id=e.bossid); /*c2*/SELECT * FROM employee e LEFT JOIN boss b ON (b.id=e.bossid AND e.name='dilbert'); /*c2*/SELECT * FROM employee e LEFT JOIN boss b ON (b.id=e.bossid AND b.name='dilbert'); --bug #959678 CREATE CACHED TABLE propertyvalue ( id INT, name CHAR(36), value VARCHAR(255)); INSERT INTO propertyvalue VALUES (1, 'title', 'Foo'); INSERT INTO propertyvalue VALUES (2, 'title', 'Bar'); /*r 2,2,Bar */ SELECT * FROM (SELECT id FROM propertyvalue WHERE name = 'title') AS id LEFT JOIN (SELECT id, value FROM propertyvalue WHERE name = 'title') AS title ON id.id = title.id WHERE title.value != 'Foo' --bug #1018584 drop table a if exists; drop table b if exists; create table a (aid int, id int); create table b (bid int, aid int); insert into a (aid,id) values (1,1); insert into a (aid,id) values (2,1); insert into a (aid,id) values (3,2); insert into a (aid,id) values (4,2); insert into b (bid,aid) values (1,1); insert into b (bid,aid) values (2,1); /*c0*/select * from b left outer join a on b.aId = a.aId where Id =10; create index idx_test on a (ID); /*c0*/select * from b left outer join a on b.aId = a.aId where Id =10; /*c2*/select * from b left outer join a on b.aId = a.aId and Id =10; --bug #1027143 drop table testc if exists; drop table testb if exists; drop table testa if exists; create table testa (oid int, name varchar(20)); create table testb (oid int, name varchar(20), a_oid int); insert into testa (oid, name) values(1, 'first'); insert into testa (oid, name) values(2, 'second'); insert into testa (oid, name) values(3, 'third'); insert into testa (oid, name) values(4, 'fourth'); insert into testb (oid, name, a_oid) values(21,'first', 1); insert into testb (oid, name, a_oid) values(22,'second', null); insert into testb (oid, name, a_oid) values(23,'third', 2); insert into testb (oid, name, a_oid) values(24,'fourth', null); insert into testb (oid, name, a_oid) values(25,'fifth', 3); insert into testb (oid, name, a_oid) values(26,'sixth', null); /*r 1,first,21,first,1 2,second,23,third,2 3,third,25,fifth,3 4,fourth,NULL,NULL,NULL */ select * from testa a LEFT OUTER JOIN testb b ON a.oid = b.a_oid create index idx3 on testb(a_oid) /*r 1,first,21,first,1 2,second,23,third,2 3,third,25,fifth,3 4,fourth,NULL,NULL,NULL */ select * from testa a LEFT OUTER JOIN testb b ON a.oid = b.a_oid -- tests with OR in LEFT outer join condition drop table a if exists; drop table b if exists; create table a (a1 varchar(10), a2 integer); insert into a values(null,12); insert into a values('a',22); insert into a values('b','32'); create table b (b1 varchar(10), b2 integer); insert into b values(null,14); insert into b values('a',14); insert into b values('c',15); -- should return 3 rows: /*r NULL,12,NULL,14 a,22,a,14 b,32,NULL,NULL */select * from a left outer join b on ((a.a1=b.b1) or (a.a1 is null and b.b1 is null)) order by a1 -- should return 2 rows: /*r NULL,12,NULL,14 a,22,a,14 */select * from a left outer join b on (1=1) where ((a.a1=b.b1) or (a.a1 is null and b.b1 is null)) order by a1 -- should return 1 row: /*r a,22,a,14 */select * from a left outer join b on (1=1) where a.a1=b.b1 order by a1 -- should return 3 rows: /*r NULL,12,NULL,NULL a,22,a,14 b,32,NULL,NULL */select * from a left outer join b on a.a1=b.b1 where (1=1) order by a1 /*r NULL,12,NULL,NULL a,22,a,14 b,32,NULL,NULL */select * from a left outer join b on a.a1=b.b1 order by a1 -- add an index and retest create index idxa on a(a2); /*r NULL,12,NULL,NULL a,22,a,14 b,32,NULL,NULL */select * from a left outer join b on a.a1=b.b1 order by a1 -- tests with OR in RIGHT join condition drop table a if exists; drop table b if exists; create table a (a1 varchar(10), a2 integer); insert into a values(null,12); insert into a values('a',22); insert into a values('b','32'); create table b (b1 varchar(10), b2 integer); insert into b values(null,14); insert into b values('a',14); insert into b values('c',15); -- should return 3 rows: /*r NULL,12,NULL,14 a,22,a,14 b,32,NULL,NULL */select * from b right outer join a on ((a.a1=b.b1) or (a.a1 is null and b.b1 is null)) order by a1 -- should return 2 rows: /*r NULL,12,NULL,14 a,22,a,14 */select * from b right outer join a on (1=1) where ((a.a1=b.b1) or (a.a1 is null and b.b1 is null)) order by a1 -- should return 1 row: /*r a,22,a,14 */select * from b right outer join a on (1=1) where a.a1=b.b1 order by a1 -- should return 3 rows: /*r NULL,12,NULL,NULL a,22,a,14 b,32,NULL,NULL */select * from b right outer join a on a.a1=b.b1 where (1=1) order by a1 /*r NULL,12,NULL,NULL a,22,a,14 b,32,NULL,NULL */select * from b right outer join a on a.a1=b.b1 order by a1 -- add an index and retest create index idxa on a(a2); /*r NULL,12,NULL,NULL a,22,a,14 b,32,NULL,NULL */select * from b right outer join a on a.a1=b.b1 order by a1 --- CREATE TABLE names (name VARCHAR(20) PRIMARY KEY); CREATE TABLE params (name VARCHAR(20) PRIMARY KEY, value VARCHAR(20) NULL); INSERT INTO names VALUES ('name1'); INSERT INTO names VALUES ('name2'); INSERT INTO params (name, value) VALUES ('name1', 'value1'); /*r name1,NULL name2,NULL */SELECT n.name, p.value FROM names n LEFT OUTER JOIN params p ON n.name = p.name AND p.value <> 'value1'; /*r name1,NULL name2,NULL */SELECT n.name, p.value FROM names n LEFT JOIN params p ON n.name = p.name AND p.value = 'value3'; hsqldb-1.8.0.10.orig/testrun/hsqldb/TestSelfCreate.txt0000644000175000017500000000735710330246571021233 0ustar renerene-- -- TestSelfCreate.txt -- -- TestSelfCreate.txt is used by TestSelf.java to test the database -- -- This is part of a three part suite of scripts to test persistence in the same DB -- -- Comment lines must start with -- and are ignored -- Lines starting with spaces belongs to last line -- Checked lines start with comments containing where is: -- c ResultSet expects a with columns -- r ResultSet expected with result in first row/column -- u Update count expected -- e Exception must occur -- Correct handling of index creation for foreign keys create cached table VEREIN ( VCODE CHAR(10) not null, primary key (VCODE) ); create unique index VEREIN_PK on VEREIN (VCODE); create cached table BEWERB ( VCODE CHAR(10) not null, ID SMALLINT not null , primary key (ID) ); create unique index BEWERB_FK2 on BEWERB(ID); create unique index BEWERB_FK1 on BEWERB(VCODE); alter table BEWERB add constraint bv foreign key (VCODE) references VEREIN(VCODE); -- forward FK with index CREATE Cached TABLE t1( ID INTEGER NOT NULL PRIMARY KEY, t2ref INTEGER ); CREATE Cached TABLE t2( ID INTEGER NOT NULL PRIMARY KEY ); CREATE INDEX idx on t1(t2ref); ALTER TABLE t1 ADD CONSTRAINT fk1 FOREIGN KEY (t2ref) REFERENCES t2(ID); -- forward FK with no index CREATE Cached TABLE tt1( ID INTEGER NOT NULL PRIMARY KEY, tt2ref INTEGER ); CREATE Cached TABLE tt2( ID INTEGER NOT NULL PRIMARY KEY ); ALTER TABLE tt1 ADD CONSTRAINT fk2 FOREIGN KEY (tt2ref) REFERENCES tt2(ID); -- column default values - scripting test CREATE TABLE TDEF1 ( I1 IDENTITY, C1 CHAR DEFAULT '-', C2 CHAR(10) DEFAULT 'hsqldb', I3 INTEGER DEFAULT -1, D4 DOUBLE DEFAULT -0.3e-5, T5 TIMESTAMP DEFAULT CURRENT_TIMESTAMP, T6 TIME DEFAULT current_time, D7 DATE DEFAULT current_date, D8 VARCHAR(10) DEFAULT current_user ); CREATE TABLE TDEF2 ( B1 BIT DEFAULT TRUE, B2 BIT DEFAULT 'false', T5 TIMESTAMP DEFAULT '1999-12-01 21:30', T6 TIME DEFAULT '23:12:01', T7 DATE DEFAULT '2002-02-15' ); INSERT INTO TDEF1 (I3) VALUES (0); INSERT INTO TDEF1 (D4) VALUES (0); INSERT INTO TDEF2 (B1) VALUES (FALSE); INSERT INTO TDEF2 (T7) VALUES (NULL); --bug #824031 --scripting test for order of indexes CREATE CACHED TABLE APP ( VARIANT_ID INTEGER NOT NULL, APP_ID INTEGER NOT NULL, APP_NAME VARCHAR (35) NOT NULL, CONSTRAINT PK_APP PRIMARY KEY( VARIANT_ID)); CREATE INDEX APP ON APP(APP_ID); ALTER TABLE APP ADD CONSTRAINT APP_IX1 UNIQUE( APP_NAME); INSERT INTO APP VALUES (1, 1, 'Shelly'); INSERT INTO APP VALUES (2, 2, 'Eran'); /*c1*/SELECT * FROM APP WHERE APP_NAME = 'Shelly'; --test identity increment CREATE CACHED TABLE APP2 ( ID BIGINT NOT NULL IDENTITY, VALUE INTEGER NOT NULL) INSERT INTO APP2 (VALUE) VALUES(10); --test update with no primary key DROP TABLE FILE IF EXISTS; CREATE TABLE FILE(ID VARCHAR(10), NAME VARCHAR(10), DESCRIPTION VARCHAR(10), FIELD1 INT, FIELD2 VARCHAR(10)); /*c0*/select * from file; insert into file(id, name) values('14', 'dir'); /*c1*/select * from file; update file set name = 'newdir' where id = '14'; /*r 14,newdir,NULL,NULL,NULL */select * from file; --test TEMP TABLE create TEMPORARY TABLE TTEMP(C CHAR) ON COMMIT PRESERVE ROWS; create TEMPORARY TABLE TTEMP2(C CHAR) ON COMMIT DELETE ROWS; --test VIEW persistence with quoted column names create table "TView" ("First Column" int, "Second Column" bigint); create view "View" ("Id", "The Name", "The Description") as select ID,NAME,DESCRIPTION FROM FILE; create view "View2" as select ID,NAME "The Name",DESCRIPTION "The Description" FROM FILE; create view "View3" as select "First Column", "Second Column" from "TView"; -- SHUTDOWN is necessary for test1 SHUTDOWN; hsqldb-1.8.0.10.orig/testrun/hsqldb/TestSelfRoleNesting.txt0000644000175000017500000001421010416747564022260 0ustar renerene-- First with a table grant /*s*/DROP USER peon1; /*s*/DROP USER peon2; /*s*/DROP USER peon3; /*s*/DROP ROLE r1; /*s*/DROP ROLE r2; /*s*/DROP ROLE r3; /*s*/DROP ROLE r12; DROP TABLE t1 IF exists; DROP TABLE t2 IF exists; DROP TABLE t3 IF exists; DROP TABLE t4 IF exists; CREATE TABLE t1(i int); CREATE TABLE t2(i int); CREATE TABLE t3(i int); CREATE TABLE t4(i int); INSERT INTO t1 VALUES(1); INSERT INTO t2 VALUES(2); INSERT INTO t3 VALUES(3); INSERT INTO t4 VALUES(4); COMMIT; CREATE USER peon1 PASSWORD password; CREATE USER peon2 PASSWORD password; CREATE USER peon3 PASSWORD password; /*u0*/CREATE ROLE r1; /*u0*/CREATE ROLE r2; /*u0*/CREATE ROLE r3; /*u0*/GRANT r3 TO r2; /*u0*/GRANT r2 TO r1; -- Same role may be nested under the same user/role multiple times. /*u0*/GRANT r3 TO r1; /*u0*/REVOKE r3 FROM r1; /*u0*/GRANT r1 TO peon1; -- Circular nesting not allowed. /*e*/GRANT r1 TO r3; CONNECT USER peon1 PASSWORD password; /*e*/SELECT * FROM t1; CONNECT USER SA PASSWORD ""; /*u0*/GRANT SELECT on t1 TO r3; CONNECT USER peon1 PASSWORD password; /*c1*/SELECT * FROM t1; CONNECT USER SA PASSWORD ""; /*u0*/REVOKE ALL ON t1 FROM r3; CONNECT USER peon1 PASSWORD password; /*e*/SELECT * FROM t1; CONNECT USER SA PASSWORD ""; /*u0*/GRANT SELECT ON t1 TO r3; CONNECT USER peon1 PASSWORD password; /*c1*/SELECT * FROM t1; CONNECT USER SA PASSWORD ""; /*u0*/DROP ROLE r3; CONNECT USER peon1 PASSWORD password; /*e*/SELECT * FROM t1; -- Now with Admin priv CONNECT USER SA PASSWORD ""; /*s*/DROP USER peon1; /*s*/DROP USER peon2; /*s*/DROP USER peon3; /*s*/DROP ROLE r1; /*s*/DROP ROLE r2; /*s*/DROP ROLE r3; /*s*/DROP ROLE r12; DROP TABLE t1 IF exists; CREATE TABLE t1(i int); INSERT INTO t1 VALUES(1); COMMIT; CREATE USER peon1 PASSWORD password; CREATE USER peon2 PASSWORD password; CREATE USER peon3 PASSWORD password; /*u0*/CREATE ROLE r1; /*u0*/CREATE ROLE r2; /*u0*/CREATE ROLE r3; /*u0*/GRANT r3 TO r2; /*u0*/GRANT r2 TO r1; /*u0*/GRANT r1 TO peon1; CONNECT USER peon1 PASSWORD password; /*e*/SET TABLE t1 READONLY false; CONNECT USER SA PASSWORD ""; /*u0*/GRANT dba TO r3; CONNECT USER peon1 PASSWORD password; /*u0*/SET TABLE t1 READONLY false; CONNECT USER SA PASSWORD ""; /*e*/REVOKE dba FROM r1; /*e*/REVOKE dba FROM r2; /*u0*/REVOKE dba FROM r3; CONNECT USER peon1 PASSWORD password; /*e*/SET TABLE t1 READONLY false; CONNECT USER SA PASSWORD ""; /*u0*/GRANT dba TO r3; CONNECT USER peon1 PASSWORD password; /*u0*/SET TABLE t1 READONLY false; CONNECT USER SA PASSWORD ""; /*e*/DROP ROLE dba; -- Massively redundant privileges CONNECT USER SA PASSWORD ""; DROP TABLE t1 IF exists; CREATE TABLE t1(i int); /*s*/DROP USER peon1; /*s*/DROP ROLE r1; /*s*/DROP ROLE r2; /*s*/DROP ROLE r3; /*s*/DROP ROLE r31; /*s*/DROP ROLE r311; /*u0*/CREATE ROLE r1; /*u0*/CREATE ROLE r2; /*u0*/CREATE ROLE r3; /*u0*/CREATE ROLE r31; /*u0*/CREATE ROLE r311; /*u0*/GRANT r31 to r3; /*u0*/GRANT dba TO r1; /*u0*/GRANT dba TO r2; /*u0*/GRANT dba TO r3; /*u0*/GRANT dba TO r31; /*u0*/GRANT dba TO r311; /*u0*/GRANT r311 TO r31; CREATE USER peon1 PASSWORD password ADMIN; CONNECT USER sa PASSWORD ""; /*u0*/GRANT r1 TO peon1; /*u0*/GRANT r2 TO peon1; /*u0*/GRANT r3 TO peon1; /*u0*/GRANT r31 TO peon1; /*u0*/GRANT r311 TO peon1; CONNECT USER peon1 PASSWORD password; /*u0*/SET TABLE t1 READONLY false; -- Start revoking, piecemeal CONNECT USER sa PASSWORD ""; /*u0*/REVOKE dba FROM peon1; CONNECT USER peon1 PASSWORD password; /*u0*/SET TABLE t1 READONLY false; CONNECT USER sa PASSWORD ""; /*u0*/REVOKE r1 FROM peon1; CONNECT USER peon1 PASSWORD password; /*u0*/SET TABLE t1 READONLY false; CONNECT USER sa PASSWORD ""; /*u0*/DROP ROLE r2; CONNECT USER peon1 PASSWORD password; /*u0*/SET TABLE t1 READONLY false; CONNECT USER sa PASSWORD ""; /*u0*/REVOKE r311 FROM peon1; CONNECT USER peon1 PASSWORD password; /*u0*/SET TABLE t1 READONLY false; CONNECT USER sa PASSWORD ""; /*u0*/REVOKE r3 FROM peon1; CONNECT USER peon1 PASSWORD password; /*u0*/SET TABLE t1 READONLY false; CONNECT USER sa PASSWORD ""; /*u0*/REVOKE r31 FROM peon1; CONNECT USER peon1 PASSWORD password; /*e*/SET TABLE t1 READONLY false; -- Ditto for table privilege CONNECT USER SA PASSWORD ""; DROP TABLE t1 IF exists; CREATE TABLE t1(i int); /*u1*/INSERT INTO t1 VALUES(1); COMMIT; /*s*/DROP USER peon1; /*s*/DROP ROLE r1; /*s*/DROP ROLE r2; /*s*/DROP ROLE r3; /*s*/DROP ROLE r31; /*s*/DROP ROLE r311; /*u0*/CREATE ROLE r1; /*u0*/CREATE ROLE r2; /*u0*/CREATE ROLE r3; /*u0*/CREATE ROLE r31; /*u0*/CREATE ROLE r311; /*u0*/GRANT r31 to r3; /*u0*/GRANT SELECT ON t1 TO r1; /*u0*/GRANT SELECT ON t1 TO r2; /*u0*/GRANT SELECT ON t1 TO r3; /*u0*/GRANT SELECT ON t1 TO r31; /*u0*/GRANT SELECT ON t1 TO r311; /*u0*/GRANT r311 TO r31; CREATE USER peon1 PASSWORD password; CONNECT USER peon1 PASSWORD password; /*e*/SELECT * FROM t1; CONNECT USER sa PASSWORD ""; /*u0*/GRANT SELECT ON t1 TO peon1; /*u0*/GRANT r1 TO peon1; /*u0*/GRANT r2 TO peon1; /*u0*/GRANT r3 TO peon1; /*u0*/GRANT r31 TO peon1; /*u0*/GRANT r311 TO peon1; CONNECT USER peon1 PASSWORD password; /*c1*/SELECT * FROM t1; -- Start revoking, piecemeal CONNECT USER sa PASSWORD ""; /*u0*/REVOKE SELECT ON t1 FROM peon1; CONNECT USER peon1 PASSWORD password; /*c1*/SELECT * FROM t1; CONNECT USER sa PASSWORD ""; /*u0*/REVOKE r1 FROM peon1; CONNECT USER peon1 PASSWORD password; /*c1*/SELECT * FROM t1; CONNECT USER sa PASSWORD ""; /*u0*/DROP ROLE r2; CONNECT USER peon1 PASSWORD password; /*c1*/SELECT * FROM t1; CONNECT USER sa PASSWORD ""; /*u0*/REVOKE r311 FROM peon1; CONNECT USER peon1 PASSWORD password; /*c1*/SELECT * FROM t1; CONNECT USER sa PASSWORD ""; /*u0*/REVOKE r3 FROM peon1; CONNECT USER peon1 PASSWORD password; /*c1*/SELECT * FROM t1; CONNECT USER sa PASSWORD ""; /*u0*/REVOKE r31 FROM peon1; CONNECT USER peon1 PASSWORD password; /*e*/SELECT * FROM t1; CONNECT USER sa PASSWORD ""; /*s*/DROP ROLE r1 CASCADE; /*s*/DROP ROLE r2 CASCADE; /*s*/DROP ROLE r3 CASCADE; /*U0*/ Workaround for bug where DDL will not Commit /*s*/CREATE TABLE bug_workaround (i int); /*s*/INSERT INTO bug_workaround VALUES(1); /*u0*/SHUTDOWN; hsqldb-1.8.0.10.orig/testrun/hsqldb/TestSelfVerify.txt0000644000175000017500000000300510330246624021255 0ustar renerene-- -- TestSelfVerify.txt -- -- This is part of a three part suite of scripts to test persistence in the same DB -- Correct handling of index creation for foreign keys -- check the consistency of foreign keys and primary keys /*e*/create table VEREIN(VCODE CHAR(10) not null); /*e*/create unique index VEREIN_PK on VEREIN (VCODE); /*e*/create table BEWERB(VCODE CHAR(10) not null, ID SMALLINT not null); /*e*/create unique index BEWERB_FK2 on BEWERB(ID); /*e*/create unique index BEWERB_FK1 on BEWERB(VCODE); /*e*/alter table BEWERB add constraint bv foreign key (VCODE) references VEREIN (VCODE); -- null value in not null column /*e*/insert into verein values (null); -- referential no matching row /*e*/insert into bewerb values ('aaaaaaa',18); -- duplicate row /*e*/insert into bewerb values ('hijklmn',7); -- referential integrity row has reference /*e*/delete from verein where vcode='opqrstu' --test identity increment INSERT INTO APP2 (VALUE) VALUES(13); INSERT INTO APP2 (VALUE) VALUES(14); /*r5,14*/ SELECT COUNT(ID), MAX(VALUE) FROM APP2 --test persistence of insert into operations /*c2*/SELECT * FROM NEWAPP WHERE APP_NAME = 'Eran'; /*c2*/SELECT * FROM NEWAPP WHERE APP_NAME = 'Shelly'; /*c4*/SELECT * FROM NEWAPP; --test correct persistent of view defined in TestSelfCreate.txt /*r 14,newdir,NULL */select * from "View" /*r 14,newdir,NULL */select * from "View2" --test INSERT .. INTO and indexes select * into cached bewerb_copy from bewerb; create index idx_bewerb_copy on bewerb_copy(VCODE,ID); /*u0*/SHUTDOWN; hsqldb-1.8.0.10.orig/testrun/hsqldb/TestSelfSchemaPersistA2.txt0000644000175000017500000006312710234016270022754 0ustar renerene-- TEST OBJECTS -- This TESTS the schema-specific objects created in a previous script. -- (See the *C[12].txt scripts for similar tests of ALTER comands (which -- this script purposefully omits). CREATE USER otheruser PASSWORD otheruser; -- ****************************** MEM Tables /*c2*/SELECT * FROM tblt1; /*c1*/SELECT * FROM tblt1 WHERE i = 0; /*c2*/SELECT * FROM tblt1 WHERE i in (0, 1, 11, 12); /*c1*/SELECT * FROM tblt1 WHERE i < 1; /*c1*/SELECT * FROM tblt1 WHERE tblt1.i = (SELECT i FROM tblj1); /*c1*/SELECT * FROM tblt1 WHERE tblt1.i = (SELECT i FROM tblj1 WHERE tblj1.i = 1); /*c1*/SELECT * FROM tblt1 WHERE tblt1.i in (SELECT i FROM tblj1); /*c0*/SELECT * FROM tblt1 WHERE tblt1.i = (SELECT i FROM tblj1 WHERE i = 0); /*c1*/SELECT * FROM public.tblt1 WHERE tblt1.i = (SELECT i FROM tblj1); /*c1*/SELECT * FROM public.tblt1 WHERE tblt1.i in (SELECT i FROM tblj1); /*c1*/SELECT * FROM public.tblt1 WHERE tblt1.i = (SELECT i FROM tblj1 WHERE i = 1); /*c1*/SELECT * FROM tblt1 WHERE tblt1.i = (SELECT i FROM public.tblj1); /*c1*/SELECT * FROM tblt1 WHERE tblt1.i in (SELECT i FROM public.tblj1); /*c1*/SELECT * FROM tblt1 WHERE tblt1.i = (SELECT i FROM public.tblj1 WHERE i = 1); /*c1*/SELECT * FROM tblt1 WHERE tblt1.i = (SELECT tblj1.i FROM public.tblj1); /*c1*/SELECT * FROM tblt1 WHERE tblt1.i in (SELECT tblj1.i FROM tblj1); /*c1*/SELECT * FROM tblt1 WHERE tblt1.i = (SELECT tblj1.i FROM tblj1 WHERE i = 1); /*c1*/SELECT * FROM tblt1 WHERE tblt1.i = (SELECT i FROM public.tblj1 WHERE tblj1.i = 1); /*c1*/SELECT * FROM tblt1 WHERE tblt1.i = (SELECT tblj1.i FROM tblj1 WHERE tblj1.i = 1); /*c1*/SELECT * FROM tblt1 WHERE i = (SELECT i FROM tblj1); /*c1*/SELECT * FROM tblt1 WHERE i in (SELECT i FROM tblj1); /*c1*/SELECT * FROM tblt1 WHERE i = (SELECT i FROM tblj1 WHERE i = 1); /*c1*/SELECT * FROM public.tblt1 WHERE i = (SELECT i FROM tblj1); /*c1*/SELECT * FROM public.tblt1 WHERE i in (SELECT i FROM tblj1); /*c0*/SELECT * FROM public.tblt1 WHERE i = (SELECT i FROM tblj1 WHERE i = 0); /*c1*/SELECT * FROM tblt1 WHERE i = (SELECT i FROM public.tblj1); /*c1*/SELECT * FROM tblt1 WHERE i in (SELECT i FROM public.tblj1); /*c0*/SELECT * FROM tblt1 WHERE i = (SELECT i FROM public.tblj1 WHERE i = 0); /*c1*/SELECT * FROM tblt1 WHERE i = (SELECT tblj1.i FROM public.tblj1); /*c1*/SELECT * FROM tblt1 WHERE i in (SELECT tblj1.i FROM tblj1); /*c0*/SELECT * FROM tblt1 WHERE i = (SELECT tblj1.i FROM tblj1 WHERE i = 0); /*c1*/SELECT * FROM tblt1 WHERE i = (SELECT i FROM public.tblj1 WHERE tblj1.i = 1); /*c1*/SELECT * FROM tblt1 WHERE i = (SELECT tblj1.i FROM tblj1 WHERE tblj1.i = 1); /*e*/SELECT * FROM system_users WHERE user = 'SA'; /*e*/SELECT * FROM other.tblt1; /*e*/SELECT * FROM other.system_users; /*e*/SELECT * FROM information_schema.tblt1; /*e*/SELECT * FROM public.system_users; /*c2*/SELECT * FROM public.tblt1; /*c1*/SELECT * FROM information_schema.system_users WHERE user = 'SA'; /*c1*/SELECT * FROM public.tblt1 WHERE i = 0; /*e*/SELECT * FROM other.tblt1 WHERE i = 0; /*e*/SELECT * FROM information_schema.tblt1 WHERE i = 0; /*c1*/SELECT * FROM public.tblt1, public.tblj1 WHERE tblt1.i = tblj1.i; /*c1*/SELECT * FROM tblt1, public.tblj1 WHERE tblt1.i = tblj1.i; /*c1*/SELECT * FROM public.tblt1, tblj1 WHERE tblt1.i = tblj1.i; /*c1*/SELECT * FROM tblt1, tblj1 WHERE tblt1.i = tblj1.i; /*c1*/SELECT vc FROM public.tblt1, public.tblj1 WHERE tblt1.i = tblj1.i; /*c1*/SELECT vc FROM tblt1, public.tblj1 WHERE tblt1.i = tblj1.i; /*c1*/SELECT vc FROM public.tblt1, tblj1 WHERE tblt1.i = tblj1.i; /*c1*/SELECT vc FROM tblt1, tblj1 WHERE tblt1.i = tblj1.i; /*c1*/SELECT tblj1.vc FROM public.tblt1, public.tblj1 WHERE tblt1.i = tblj1.i; /*c1*/SELECT tblj1.vc FROM tblt1, public.tblj1 WHERE tblt1.i = tblj1.i; /*c1*/SELECT tblj1.vc FROM public.tblt1, tblj1 WHERE tblt1.i = tblj1.i; /*c1*/SELECT tblj1.vc FROM tblt1, tblj1 WHERE tblt1.i = tblj1.i; /*c1*/SELECT lbla.vc FROM tblt1, tblj1 lbla WHERE tblt1.i = lbla.i; /*c1*/SELECT tblj1.vc FROM tblt1 lblb, tblj1 WHERE lblb.i = tblj1.i; /*c1*/SELECT lbla.vc FROM tblt1 lblb, tblj1 lbla WHERE lblb.i = lbla.i; /*c1*/SELECT lbla.vc FROM public.tblt1, tblj1 lbla WHERE tblt1.i = lbla.i; /*c1*/SELECT tblj1.vc FROM public.tblt1 lblb, tblj1 WHERE lblb.i = tblj1.i; /*c1*/SELECT lbla.vc FROM public.tblt1 lblb, tblj1 lbla WHERE lblb.i = lbla.i; /*c1*/SELECT lbla.vc FROM tblt1, public.tblj1 lbla WHERE tblt1.i = lbla.i; /*c1*/SELECT tblj1.vc FROM tblt1 lblb, public.tblj1 WHERE lblb.i = tblj1.i; /*c1*/SELECT lbla.vc FROM tblt1 lblb, public.tblj1 lbla WHERE lblb.i = lbla.i; /*u0*/SET TABLE tblt1 READONLY true; /*e*/UPDATE tblt1 set i = 11 WHERE i = 1; /*u0*/SET TABLE public.tblt1 READONLY true; /*e*/SET TABLE information_schema.tblt1 READONLY true; /*e*/SET TABLE other.tblt1 READONLY true; /*u0*/SET TABLE tblt1 READONLY false; /*u0*/SET TABLE public.tblt1 READONLY false; /*c2*/SELECT i FROM tblt1; -- N.b.: Do not commit DML changes so that this whole block may be repeated. COMMIT; SET AUTOCOMMIT false; /*u1*/UPDATE tblt1 set i = 11 WHERE i = 1; /*u1*/UPDATE tblt1 set tblt1.i = 12 WHERE i = 11; /*u1*/UPDATE tblt1 set tblt1.i = 13 WHERE tblt1.i = 12; /*u1*/UPDATE public.tblt1 set i = 14 WHERE i = 13; /*u1*/UPDATE public.tblt1 set tblt1.i = 15 WHERE i = 14; /*u1*/UPDATE public.tblt1 set tblt1.i = 16 WHERE tblt1.i = 15; /*e*/UPDATE other.tblt1 set tblt1.i = 17 WHERE tblt1.i = 16; /*e*/UPDATE information_schema.tblt1 set tblt1.i = 17 WHERE tblt1.i = 16; /*u1*/UPDATE tblt1 ali set i = 17 WHERE i = 16; /*u1*/UPDATE tblt1 ali set ali.i = 18 WHERE i = 17; /*u1*/UPDATE tblt1 ali set ali.i = 19 WHERE ali.i = 18; /*u1*/UPDATE tblt1 ali set i = 20 WHERE ali.i = 19; /*u1*/UPDATE public.tblt1 ali set i = 21 WHERE i = 20; /*u1*/UPDATE public.tblt1 ali set ali.i = 22 WHERE i = 21; /*u1*/UPDATE public.tblt1 ali set ali.i = 23 WHERE ali.i = 22; /*u1*/UPDATE public.tblt1 ali set i = 24 WHERE ali.i = 23; /*e*/UPDATE other.tblt1 ali set i = 25 WHERE ali.i = 24; /*e*/UPDATE other.tblt1 ali set i = 25 WHERE .i = 24; /*e*/UPDATE other.tblt1 set i = 25 WHERE i = 24; /*e*/DELETE FROM other.tblt1 ali WHERE ali.i = 24; /*e*/DELETE FROM other.tblt1 ali; /*e*/DELETE FROM other.tblt1 set WHERE i = 24; /*e*/DELETE FROM other.tblt1 WHERE i = 24; /*e*/DELETE FROM system_information.tblj1 WHERE tblj1.i = 1; /*u1*/DELETE FROM tblt1 WHERE i = 0; /*u1*/DELETE FROM public.tblt1 WHERE i = 24; /*u1*/DELETE FROM public.tblj1 WHERE tblj1.i = 1; ROLLBACK; /*c2*/SELECT i FROM tblt1; /*u0*/GRANT ALL ON tblt1 TO otheruser; /*u0*/GRANT ALL ON public.tblt2 TO otheruser; /*e*/GRANT ALL ON other.tblt3 TO otheruser; /*e*/GRANT ALL ON information_schema.tblt3 TO otheruser; /*u0*/REVOKE ALL ON tblt1 FROM otheruser; /*u0*/REVOKE ALL ON public.tblt2 FROM otheruser; /*e*/REVOKE ALL ON other.tblt3 FROM otheruser; /*e*/REVOKE ALL ON information_schema.tblt3 FROM otheruser; /*e*/DROP TABLE other.tblt3; /*e*/DROP TABLE information_schema.tblt4; /*e*/DROP TABLE tblt101; /*e*/DROP TABLE public.tblt101; /*u0*/DROP TABLE tblt101 IF EXISTS; /*u0*/DROP TABLE public.tblt101 IF EXISTS; -- Should "DROP TABLE nonexistentschema.notable IF EXISTS" work? /*u0*/DROP TABLE other.system_users IF exists; /*u0*/DROP TABLE system_users IF exists; -- ****************************** CACH Tables /*c2*/SELECT * FROM ctblt1; /*c1*/SELECT * FROM ctblt1 WHERE i = 0; /*c2*/SELECT * FROM ctblt1 WHERE i in (0, 1, 11, 12); /*c1*/SELECT * FROM ctblt1 WHERE i < 1; /*c1*/SELECT * FROM ctblt1 WHERE ctblt1.i = (SELECT i FROM tblj1); /*c1*/SELECT * FROM ctblt1 WHERE ctblt1.i = (SELECT i FROM tblj1 WHERE tblj1.i = 1); /*c1*/SELECT * FROM ctblt1 WHERE ctblt1.i in (SELECT i FROM tblj1); /*c0*/SELECT * FROM ctblt1 WHERE ctblt1.i = (SELECT i FROM tblj1 WHERE i = 0); /*c1*/SELECT * FROM public.ctblt1 WHERE ctblt1.i = (SELECT i FROM tblj1); /*c1*/SELECT * FROM public.ctblt1 WHERE ctblt1.i in (SELECT i FROM tblj1); /*c1*/SELECT * FROM public.ctblt1 WHERE ctblt1.i = (SELECT i FROM tblj1 WHERE i = 1); /*c1*/SELECT * FROM ctblt1 WHERE ctblt1.i = (SELECT i FROM public.tblj1); /*c1*/SELECT * FROM ctblt1 WHERE ctblt1.i in (SELECT i FROM public.tblj1); /*c1*/SELECT * FROM ctblt1 WHERE ctblt1.i = (SELECT i FROM public.tblj1 WHERE i = 1); /*c1*/SELECT * FROM ctblt1 WHERE ctblt1.i = (SELECT tblj1.i FROM public.tblj1); /*c1*/SELECT * FROM ctblt1 WHERE ctblt1.i in (SELECT tblj1.i FROM tblj1); /*c1*/SELECT * FROM ctblt1 WHERE ctblt1.i = (SELECT tblj1.i FROM tblj1 WHERE i = 1); /*c1*/SELECT * FROM ctblt1 WHERE ctblt1.i = (SELECT i FROM public.tblj1 WHERE tblj1.i = 1); /*c1*/SELECT * FROM ctblt1 WHERE ctblt1.i = (SELECT tblj1.i FROM tblj1 WHERE tblj1.i = 1); /*c1*/SELECT * FROM ctblt1 WHERE i = (SELECT i FROM tblj1); /*c1*/SELECT * FROM ctblt1 WHERE i in (SELECT i FROM tblj1); /*c1*/SELECT * FROM ctblt1 WHERE i = (SELECT i FROM tblj1 WHERE i = 1); /*c1*/SELECT * FROM public.ctblt1 WHERE i = (SELECT i FROM tblj1); /*c1*/SELECT * FROM public.ctblt1 WHERE i in (SELECT i FROM tblj1); /*c0*/SELECT * FROM public.ctblt1 WHERE i = (SELECT i FROM tblj1 WHERE i = 0); /*c1*/SELECT * FROM ctblt1 WHERE i = (SELECT i FROM public.tblj1); /*c1*/SELECT * FROM ctblt1 WHERE i in (SELECT i FROM public.tblj1); /*c0*/SELECT * FROM ctblt1 WHERE i = (SELECT i FROM public.tblj1 WHERE i = 0); /*c1*/SELECT * FROM ctblt1 WHERE i = (SELECT tblj1.i FROM public.tblj1); /*c1*/SELECT * FROM ctblt1 WHERE i in (SELECT tblj1.i FROM tblj1); /*c0*/SELECT * FROM ctblt1 WHERE i = (SELECT tblj1.i FROM tblj1 WHERE i = 0); /*c1*/SELECT * FROM ctblt1 WHERE i = (SELECT i FROM public.tblj1 WHERE tblj1.i = 1); /*c1*/SELECT * FROM ctblt1 WHERE i = (SELECT tblj1.i FROM tblj1 WHERE tblj1.i = 1); /*e*/SELECT * FROM system_users WHERE user = 'SA'; /*e*/SELECT * FROM other.ctblt1; /*e*/SELECT * FROM other.system_users; /*e*/SELECT * FROM information_schema.ctblt1; /*e*/SELECT * FROM public.system_users; /*c2*/SELECT * FROM public.ctblt1; /*c1*/SELECT * FROM information_schema.system_users WHERE user = 'SA'; /*c1*/SELECT * FROM public.ctblt1 WHERE i = 0; /*e*/SELECT * FROM other.ctblt1 WHERE i = 0; /*e*/SELECT * FROM information_schema.ctblt1 WHERE i = 0; /*c1*/SELECT * FROM public.ctblt1, public.tblj1 WHERE ctblt1.i = tblj1.i; /*c1*/SELECT * FROM ctblt1, public.tblj1 WHERE ctblt1.i = tblj1.i; /*c1*/SELECT * FROM public.ctblt1, tblj1 WHERE ctblt1.i = tblj1.i; /*c1*/SELECT * FROM ctblt1, tblj1 WHERE ctblt1.i = tblj1.i; /*c1*/SELECT vc FROM public.ctblt1, public.tblj1 WHERE ctblt1.i = tblj1.i; /*c1*/SELECT vc FROM ctblt1, public.tblj1 WHERE ctblt1.i = tblj1.i; /*c1*/SELECT vc FROM public.ctblt1, tblj1 WHERE ctblt1.i = tblj1.i; /*c1*/SELECT vc FROM ctblt1, tblj1 WHERE ctblt1.i = tblj1.i; /*c1*/SELECT tblj1.vc FROM public.ctblt1, public.tblj1 WHERE ctblt1.i = tblj1.i; /*c1*/SELECT tblj1.vc FROM ctblt1, public.tblj1 WHERE ctblt1.i = tblj1.i; /*c1*/SELECT tblj1.vc FROM public.ctblt1, tblj1 WHERE ctblt1.i = tblj1.i; /*c1*/SELECT tblj1.vc FROM ctblt1, tblj1 WHERE ctblt1.i = tblj1.i; /*c1*/SELECT lbla.vc FROM ctblt1, tblj1 lbla WHERE ctblt1.i = lbla.i; /*c1*/SELECT tblj1.vc FROM ctblt1 lblb, tblj1 WHERE lblb.i = tblj1.i; /*c1*/SELECT lbla.vc FROM ctblt1 lblb, tblj1 lbla WHERE lblb.i = lbla.i; /*c1*/SELECT lbla.vc FROM public.ctblt1, tblj1 lbla WHERE ctblt1.i = lbla.i; /*c1*/SELECT tblj1.vc FROM public.ctblt1 lblb, tblj1 WHERE lblb.i = tblj1.i; /*c1*/SELECT lbla.vc FROM public.ctblt1 lblb, tblj1 lbla WHERE lblb.i = lbla.i; /*c1*/SELECT lbla.vc FROM ctblt1, public.tblj1 lbla WHERE ctblt1.i = lbla.i; /*c1*/SELECT tblj1.vc FROM ctblt1 lblb, public.tblj1 WHERE lblb.i = tblj1.i; /*c1*/SELECT lbla.vc FROM ctblt1 lblb, public.tblj1 lbla WHERE lblb.i = lbla.i; /*u0*/SET TABLE ctblt1 READONLY true; /*e*/UPDATE ctblt1 set i = 11 WHERE i = 1; /*u0*/SET TABLE public.ctblt1 READONLY true; /*e*/SET TABLE information_schema.ctblt1 READONLY true; /*e*/SET TABLE other.ctblt1 READONLY true; /*u0*/SET TABLE ctblt1 READONLY false; /*u0*/SET TABLE public.ctblt1 READONLY false; /*c2*/SELECT i FROM ctblt1; -- N.b.: Do not commit DML changes so that this whole block may be repeated. COMMIT; SET AUTOCOMMIT false; /*u1*/UPDATE ctblt1 set i = 11 WHERE i = 1; /*u1*/UPDATE ctblt1 set ctblt1.i = 12 WHERE i = 11; /*u1*/UPDATE ctblt1 set ctblt1.i = 13 WHERE ctblt1.i = 12; /*u1*/UPDATE public.ctblt1 set i = 14 WHERE i = 13; /*u1*/UPDATE public.ctblt1 set ctblt1.i = 15 WHERE i = 14; /*u1*/UPDATE public.ctblt1 set ctblt1.i = 16 WHERE ctblt1.i = 15; /*e*/UPDATE other.ctblt1 set ctblt1.i = 17 WHERE ctblt1.i = 16; /*e*/UPDATE information_schema.ctblt1 set ctblt1.i = 17 WHERE ctblt1.i = 16; /*u1*/UPDATE ctblt1 ali set i = 17 WHERE i = 16; /*u1*/UPDATE ctblt1 ali set ali.i = 18 WHERE i = 17; /*u1*/UPDATE ctblt1 ali set ali.i = 19 WHERE ali.i = 18; /*u1*/UPDATE ctblt1 ali set i = 20 WHERE ali.i = 19; /*u1*/UPDATE public.ctblt1 ali set i = 21 WHERE i = 20; /*u1*/UPDATE public.ctblt1 ali set ali.i = 22 WHERE i = 21; /*u1*/UPDATE public.ctblt1 ali set ali.i = 23 WHERE ali.i = 22; /*u1*/UPDATE public.ctblt1 ali set i = 24 WHERE ali.i = 23; /*e*/UPDATE other.ctblt1 ali set i = 25 WHERE ali.i = 24; /*e*/UPDATE other.ctblt1 ali set i = 25 WHERE .i = 24; /*e*/UPDATE other.ctblt1 set i = 25 WHERE i = 24; /*e*/DELETE FROM other.ctblt1 ali WHERE ali.i = 24; /*e*/DELETE FROM other.ctblt1 ali; /*e*/DELETE FROM other.ctblt1 set WHERE i = 24; /*e*/DELETE FROM other.ctblt1 WHERE i = 24; /*e*/DELETE FROM system_information.tblj1 WHERE tblj1.i = 1; /*u1*/DELETE FROM ctblt1 WHERE i = 0; /*u1*/DELETE FROM public.ctblt1 WHERE i = 24; /*u1*/DELETE FROM public.tblj1 WHERE tblj1.i = 1; ROLLBACK; /*c2*/SELECT i FROM ctblt1; /*u0*/GRANT ALL ON ctblt1 TO otheruser; /*u0*/GRANT ALL ON public.ctblt2 TO otheruser; /*e*/GRANT ALL ON other.ctblt3 TO otheruser; /*e*/GRANT ALL ON information_schema.ctblt3 TO otheruser; /*u0*/REVOKE ALL ON ctblt1 FROM otheruser; /*u0*/REVOKE ALL ON public.ctblt2 FROM otheruser; /*e*/REVOKE ALL ON other.ctblt3 FROM otheruser; /*e*/REVOKE ALL ON information_schema.ctblt3 FROM otheruser; /*e*/DROP TABLE other.ctblt3; /*e*/DROP TABLE information_schema.ctblt4; /*e*/DROP TABLE ctblt101; /*e*/DROP TABLE public.ctblt101; /*u0*/DROP TABLE ctblt101 IF EXISTS; /*u0*/DROP TABLE public.ctblt101 IF EXISTS; -- Should "DROP TABLE nonexistentschema.notable IF EXISTS" work? /*u0*/DROP TABLE other.system_users IF exists; /*u0*/DROP TABLE system_users IF exists; -- ****************************** Views /*c2*/SELECT * FROM vwv1; /*c2*/SELECT * FROM public.vwv1; /*c2*/SELECT * FROM vwv2; /*c2*/SELECT * FROM vwv3; /*c1*/SELECT * FROM vwv4; /*c1*/SELECT * FROM vwv5; /*c1*/SELECT * FROM vwv8; /*c0*/SELECT * FROM vwv9; /*c0*/SELECT * FROM vwv10; /*c0*/SELECT * FROM vwv11; /*c0*/SELECT * FROM vwv12; /*c0*/SELECT * FROM vwv13; /*c0*/SELECT * FROM vwv14; /*c0*/SELECT * FROM vwv15; /*c0*/SELECT * FROM vwv16; /*c0*/SELECT * FROM vwv17; /*c0*/SELECT * FROM vwv18; /*c1*/SELECT * FROM vwv19; /*c1*/SELECT * FROM vwv20; /*c1*/SELECT * FROM vwv21; /*c1*/SELECT * FROM vwv22; /*c1*/SELECT * FROM vwv23; /*c1*/SELECT * FROM vwv24; /*c1*/SELECT * FROM vwv25; /*c1*/SELECT * FROM vwv26; /*c2*/SELECT * FROM vwv28; /*c1*/SELECT * FROM vwv29; /*c1*/SELECT * FROM vwv30; /*c1*/SELECT * FROM vwv31; /*c0*/SELECT * FROM vwv32; /*c1*/SELECT * FROM vwv33; /*c1*/SELECT * FROM vwv34; /*c0*/SELECT * FROM vwv35; /*c1*/SELECT * FROM vwv36; /*c1*/SELECT * FROM vwv37; /*c1*/SELECT * FROM vwv38; /*c1*/SELECT * FROM vwv39; /*c1*/SELECT * FROM vwv40; /*c1*/SELECT * FROM vwv41; /*c1*/SELECT * FROM vwv42; /*c1*/SELECT * FROM vwv43; /*c1*/SELECT * FROM vwv44; /*c1*/SELECT * FROM vwv45; /*c1*/SELECT * FROM vwv46; /*c1*/SELECT * FROM vwv47; /*c1*/SELECT * FROM vwv48; /*c1*/SELECT * FROM vwv49; /*c1*/SELECT * FROM vwv50; /*c1*/SELECT * FROM vwv51; /*c1*/SELECT * FROM vwv52; /*c1*/SELECT * FROM vwv53; /*c1*/SELECT * FROM vwv54; /*c1*/SELECT * FROM vwv55; /*c1*/SELECT * FROM vwv56; /*c1*/SELECT * FROM vwv57; /*c1*/SELECT * FROM vwv1, vwj1 WHERE vwv1.i = vwj1.i; /*c1*/SELECT * FROM public.vwv1, public.vwj1 WHERE vwv1.i = vwj1.i; /*c2*/SELECT * FROM vwv1 WHERE i in (0, 1, 11, 12); /*c1*/SELECT * FROM vwv1 WHERE i < 1; /*c1*/SELECT * FROM vwv1 WHERE vwv1.i = (SELECT i FROM vwj1); /*c1*/SELECT * FROM vwv1 WHERE vwv1.i in (SELECT i FROM vwj1); /*c1*/SELECT * FROM vwv1 WHERE vwv1.i = (SELECT i FROM vwj1 WHERE i = 1); /*c1*/SELECT * FROM public.vwv1 WHERE vwv1.i in (SELECT i FROM vwj1); /*c1*/SELECT * FROM public.vwv1 WHERE vwv1.i = (SELECT i FROM vwj1 WHERE i = 1); /*c1*/SELECT * FROM vwv1 WHERE vwv1.i = (SELECT i FROM public.vwj1); /*c1*/SELECT * FROM vwv1 WHERE vwv1.i in (SELECT i FROM public.vwj1); /*c0*/SELECT * FROM vwv1 WHERE vwv1.i = (SELECT i FROM public.vwj1 WHERE i = 0); /*c1*/SELECT * FROM vwv1 WHERE vwv1.i = (SELECT vwj1.i FROM public.vwj1); /*c1*/SELECT * FROM vwv1 WHERE vwv1.i in (SELECT vwj1.i FROM vwj1); /*c1*/SELECT * FROM vwv1 WHERE vwv1.i = (SELECT vwj1.i FROM vwj1 WHERE i = 1); /*c0*/SELECT * FROM vwv1 WHERE vwv1.i = (SELECT i FROM public.vwj1 WHERE vwj1.i = 0); /*c0*/SELECT * FROM vwv1 WHERE vwv1.i = (SELECT vwj1.i FROM vwj1 WHERE vwj1.i = 0); /*c1*/SELECT * FROM vwv1 WHERE i = (SELECT i FROM vwj1); /*c1*/SELECT * FROM vwv1 WHERE i in (SELECT i FROM vwj1); /*c1*/SELECT * FROM vwv1 WHERE i = (SELECT i FROM vwj1 WHERE i = 1); /*c1*/SELECT * FROM public.vwv1 WHERE i = (SELECT i FROM vwj1); /*c1*/SELECT * FROM public.vwv1 WHERE i in (SELECT i FROM vwj1); /*c1*/SELECT * FROM public.vwv1 WHERE i = (SELECT i FROM vwj1 WHERE i = 1); /*c1*/SELECT * FROM vwv1 WHERE i = (SELECT i FROM public.vwj1); /*c1*/SELECT * FROM vwv1 WHERE i in (SELECT i FROM public.vwj1); /*c1*/SELECT * FROM vwv1 WHERE i = (SELECT i FROM public.vwj1 WHERE i = 1); /*c1*/SELECT * FROM vwv1 WHERE i = (SELECT vwj1.i FROM public.vwj1); /*c1*/SELECT * FROM vwv1 WHERE i in (SELECT vwj1.i FROM vwj1); /*c1*/SELECT * FROM vwv1 WHERE i = (SELECT vwj1.i FROM vwj1 WHERE i = 1); /*c1*/SELECT * FROM vwv1 WHERE i = (SELECT i FROM public.vwj1 WHERE vwj1.i = 1); /*c1*/SELECT * FROM vwv1 WHERE i = (SELECT vwj1.i FROM vwj1 WHERE vwj1.i = 1); /*c2*/SELECT * FROM vwv1; /*c1*/SELECT * FROM vwv1 WHERE i = 0; /*c2*/SELECT * FROM vwv1 WHERE i in (0, 1, 11, 12); /*c1*/SELECT * FROM vwv1 WHERE i < 1; /*c1*/SELECT * FROM vwv1 WHERE vwv1.i = (SELECT i FROM vwj1); /*c1*/SELECT * FROM vwv1 WHERE vwv1.i in (SELECT i FROM vwj1); /*c1*/SELECT * FROM vwv1 WHERE vwv1.i = (SELECT i FROM vwj1 WHERE i = 1); /*c1*/SELECT * FROM public.vwv1 WHERE vwv1.i = (SELECT i FROM vwj1); /*c1*/SELECT * FROM public.vwv1 WHERE vwv1.i in (SELECT i FROM vwj1); /*c1*/SELECT * FROM public.vwv1 WHERE vwv1.i = (SELECT i FROM vwj1 WHERE i = 1); /*c1*/SELECT * FROM vwv1 WHERE vwv1.i = (SELECT i FROM public.vwj1); /*c1*/SELECT * FROM vwv1 WHERE vwv1.i in (SELECT i FROM public.vwj1); /*c1*/SELECT * FROM vwv1 WHERE vwv1.i = (SELECT i FROM public.vwj1 WHERE i = 1); /*c1*/SELECT * FROM vwv1 WHERE vwv1.i = (SELECT vwj1.i FROM public.vwj1); /*c1*/SELECT * FROM vwv1 WHERE vwv1.i in (SELECT vwj1.i FROM vwj1); /*c1*/SELECT * FROM vwv1 WHERE vwv1.i = (SELECT vwj1.i FROM vwj1 WHERE i = 1); /*c1*/SELECT * FROM vwv1 WHERE vwv1.i = (SELECT i FROM public.vwj1 WHERE vwj1.i = 1); /*c1*/SELECT * FROM vwv1 WHERE vwv1.i = (SELECT vwj1.i FROM vwj1 WHERE vwj1.i = 1); /*c1*/SELECT * FROM vwv1 WHERE i = (SELECT i FROM vwj1); /*c1*/SELECT * FROM vwv1 WHERE i in (SELECT i FROM vwj1); /*c1*/SELECT * FROM vwv1 WHERE i = (SELECT i FROM vwj1 WHERE i = 1); /*c1*/SELECT * FROM public.vwv1 WHERE i = (SELECT i FROM vwj1); /*c1*/SELECT * FROM public.vwv1 WHERE i in (SELECT i FROM vwj1); /*c1*/SELECT * FROM public.vwv1 WHERE i = (SELECT i FROM vwj1 WHERE i = 1); /*c1*/SELECT * FROM vwv1 WHERE i = (SELECT i FROM public.vwj1); /*c1*/SELECT * FROM vwv1 WHERE i in (SELECT i FROM public.vwj1); /*c1*/SELECT * FROM vwv1 WHERE i = (SELECT i FROM public.vwj1 WHERE i = 1); /*c1*/SELECT * FROM vwv1 WHERE i = (SELECT vwj1.i FROM public.vwj1); /*c1*/SELECT * FROM vwv1 WHERE i in (SELECT vwj1.i FROM vwj1); /*c1*/SELECT * FROM vwv1 WHERE i = (SELECT vwj1.i FROM vwj1 WHERE i = 1); /*c1*/SELECT * FROM vwv1 WHERE i = (SELECT i FROM public.vwj1 WHERE vwj1.i = 1); /*c1*/SELECT * FROM vwv1 WHERE i = (SELECT vwj1.i FROM vwj1 WHERE vwj1.i = 1); /*e*/SELECT * FROM other.vwv1; /*e*/SELECT * FROM information_schema.vwv1; /*c2*/SELECT * FROM public.vwv1; /*c1*/SELECT * FROM public.vwv1 WHERE i = 0; /*e*/SELECT * FROM other.vwv1 WHERE i = 0; /*e*/SELECT * FROM information_schema.vwv1 WHERE i = 0; /*u1*/SELECT * INTO public.vwt2 FROM public.vwv1 WHERE i = 0; /*c1*/SELECT * FROM public.vwt2; DROP TABLE vwt2; /*c1*/SELECT * FROM public.vwv1, public.vwj1 WHERE vwv1.i = vwj1.i; /*c1*/SELECT * FROM vwv1, public.vwj1 WHERE vwv1.i = vwj1.i; /*c1*/SELECT * FROM public.vwv1, vwj1 WHERE vwv1.i = vwj1.i; /*c1*/SELECT * FROM vwv1, vwj1 WHERE vwv1.i = vwj1.i; /*c1*/SELECT vc FROM public.vwv1, public.vwj1 WHERE vwv1.i = vwj1.i; /*c1*/SELECT vc FROM vwv1, public.vwj1 WHERE vwv1.i = vwj1.i; /*c1*/SELECT vc FROM public.vwv1, vwj1 WHERE vwv1.i = vwj1.i; /*c1*/SELECT vc FROM vwv1, vwj1 WHERE vwv1.i = vwj1.i; /*c1*/SELECT vwj1.vc FROM public.vwv1, public.vwj1 WHERE vwv1.i = vwj1.i; /*c1*/SELECT vwj1.vc FROM vwv1, public.vwj1 WHERE vwv1.i = vwj1.i; /*c1*/SELECT vwj1.vc FROM public.vwv1, vwj1 WHERE vwv1.i = vwj1.i; /*c1*/SELECT vwj1.vc FROM vwv1, vwj1 WHERE vwv1.i = vwj1.i; /*c1*/SELECT lbla.vc FROM vwv1, vwj1 lbla WHERE vwv1.i = lbla.i; /*c1*/SELECT vwj1.vc FROM vwv1 lblb, vwj1 WHERE lblb.i = vwj1.i; /*c1*/SELECT lbla.vc FROM vwv1 lblb, vwj1 lbla WHERE lblb.i = lbla.i; /*c1*/SELECT lbla.vc FROM public.vwv1, vwj1 lbla WHERE vwv1.i = lbla.i; /*c1*/SELECT vwj1.vc FROM public.vwv1 lblb, vwj1 WHERE lblb.i = vwj1.i; /*c1*/SELECT lbla.vc FROM public.vwv1 lblb, vwj1 lbla WHERE lblb.i = lbla.i; /*c1*/SELECT lbla.vc FROM vwv1, public.vwj1 lbla WHERE vwv1.i = lbla.i; /*c1*/SELECT vwj1.vc FROM vwv1 lblb, public.vwj1 WHERE lblb.i = vwj1.i; /*c1*/SELECT lbla.vc FROM vwv1 lblb, public.vwj1 lbla WHERE lblb.i = lbla.i; /*u0*/GRANT ALL ON vwv1 TO otheruser; /*u0*/GRANT ALL ON public.vwv2 TO otheruser; /*e*/GRANT ALL ON other.vwv3 TO otheruser; /*e*/GRANT ALL ON information_schema.vwv3 TO otheruser; /*u0*/REVOKE ALL ON vwv1 FROM otheruser; /*u0*/REVOKE ALL ON public.vwv2 FROM otheruser; /*e*/REVOKE ALL ON other.vwv3 FROM otheruser; /*e*/REVOKE ALL ON information_schema.vwv3 FROM otheruser; -- ****************************** Indexes /*c2*/SELECT * from indt1; /*c2*/SELECT * from public.indt2; /*c2*/SELECT * from public.indt3; /*c2*/SELECT * from indt4; -- ****************************** CACH Indexes /*c2*/SELECT * from cindt1; /*c2*/SELECT * from public.cindt2; /*c2*/SELECT * from public.cindt3; /*c2*/SELECT * from cindt4; -- ****************************** Sequences -- N.b.: Do not commit DML changes so that this whole block may be repeated. /*r0*/SELECT next value FOR s1 FROM seqt1; /*r2*/SELECT next value FOR public.s2 FROM seqt1; /*r1*/SELECT next value FOR s1 FROM public.seqt1; /*r3*/SELECT next value FOR public.s2 FROM public.seqt1; /*r2*/SELECT next value FOR public.s1 FROM seqt1; /*r4*/SELECT next value FOR s2 FROM seqt1; /*r3*/SELECT next value FOR public.s1 FROM seqt1; /*r5*/SELECT next value FOR s2 FROM seqt1; -- Just to reset orig. value before persisting (can't roll back seq.s). ALTER SEQUENCE s1 RESTART WITH 0; ALTER SEQUENCE s2 RESTART WITH 2; /*e*/DROP SEQUENCE s101; /*e*/DROP SEQUENCE public.s101; /*e*/DROP SEQUENCE information_schema.s1; /*e*/DROP SEQUENCE other.s1; -- ****************************** Triggers /*e*/CREATE TRIGGER trgtrig1 AFTER INSERT ON trgt1 CALL 'org.hsqldb.test.BlaineTrig'; -- Create existing /*e*/CREATE TRIGGER public.trgtrig2 AFTER INSERT ON trgt2 CALL 'org.hsqldb.test.BlaineTrig'; -- Create existing -- ****************************** Constraints -- N.b.: Do not commit DML changes so that this whole block may be repeated. COMMIT; SET AUTOCOMMIT false; /*u1*/INSERT INTO cont1 VALUES (0); /*u1*/INSERT INTO public.cont2 VALUES (0); /*u1*/INSERT INTO cont3 VALUES (0); /*u1*/INSERT INTO cont4 VALUES (0); /*u1*/INSERT INTO cont5 VALUES (0); /*u1*/INSERT INTO cont6 VALUES (0); /*u1*/INSERT INTO cont7 VALUES (0); /*u1*/INSERT INTO cont8 VALUES (0); -- Note that error message implies that problem is due to table conj1, not data: /*u1*/INSERT INTO cont9 VALUES (1); /*u1*/INSERT INTO cont10 VALUES (1); /*u1*/INSERT INTO cont11 VALUES (1); /*u1*/INSERT INTO cont12 VALUES (1); /*u1*/INSERT INTO cont13 VALUES (1); /*u1*/INSERT INTO cont14 VALUES (1); /*u1*/INSERT INTO cont15 VALUES (1); /*u1*/INSERT INTO cont16 VALUES (1); /*u1*/INSERT INTO cont17 VALUES (0); /*u1*/INSERT INTO cont18 VALUES (0); /*u1*/INSERT INTO cont19 VALUES (0); /*u1*/INSERT INTO cont20 VALUES (0); /*e*/INSERT INTO cont1 VALUES (0); /*e*/INSERT INTO cont2 VALUES (0); /*e*/INSERT INTO cont3 VALUES (0); /*e*/INSERT INTO cont4 VALUES (0); /*e*/INSERT INTO cont5 VALUES (0); /*e*/INSERT INTO cont6 VALUES (0); /*e*/INSERT INTO cont7 VALUES (0); /*e*/INSERT INTO cont8 VALUES (0); /*e*/INSERT INTO cont9 VALUES (0); /*e*/INSERT INTO cont10 VALUES (0); /*e*/INSERT INTO cont11 VALUES (0); /*e*/INSERT INTO cont12 VALUES (0); /*e*/INSERT INTO cont13 VALUES (0); /*e*/INSERT INTO cont14 VALUES (0); /*e*/INSERT INTO cont15 VALUES (0); /*e*/INSERT INTO cont16 VALUES (0); /*e*/INSERT INTO cont17 VALUES (1); /*e*/INSERT INTO cont18 VALUES (1); /*e*/INSERT INTO cont19 VALUES (1); /*e*/INSERT INTO cont20 VALUES (1); /*c1*/SELECT * FROM cont1; /*c1*/SELECT * FROM cont2; /*c1*/SELECT * FROM cont3; /*c1*/SELECT * FROM cont4; /*c1*/SELECT * FROM cont5; /*c1*/SELECT * FROM cont6; /*c1*/SELECT * FROM cont7; /*c1*/SELECT * FROM cont8; /*c1*/SELECT * FROM cont9; /*c1*/SELECT * FROM cont10; /*c1*/SELECT * FROM cont11; /*c1*/SELECT * FROM cont12; /*c1*/SELECT * FROM cont13; /*c1*/SELECT * FROM cont14; /*c1*/SELECT * FROM cont15; /*c1*/SELECT * FROM cont16; /*c1*/SELECT * FROM cont17; /*c1*/SELECT * FROM cont18; /*c1*/SELECT * FROM cont19; /*c1*/SELECT * FROM cont20; ROLLBACK; -- ****************************** ALTERs -- Add tests when time permits. DROP USER otheruser; -- This to test .script persistence. SHUTDOWN; hsqldb-1.8.0.10.orig/testrun/hsqldb/TestSelfFieldLimits.txt0000644000175000017500000000304410256341030022213 0ustar renerene-- field limit tests -- works fully with sql.enforce_strict_size -- from 1.8.0.RC9 DECIMAL precision and scale is enforced -- when scale is specified, all input is rounded down to the relevant scale -- precision is then enforced on the result of rounding down drop table flimit if exists; create table flimit (charf1 character(4), vcharf1 varchar(4), decf1 decimal(10,2)); insert into flimit values('one', 'two', 10.2); /*r one ,two,10.20 */select * from flimit; /*u1*/delete from flimit; /*e*/insert into flimit values('twenty', 'two', 10.2); /*e*/insert into flimit values('one', 'twenty', 10.2); insert into flimit values('one', 'two', 99999999.11111); /*r one ,two,99999999.11 */select * from flimit; /*r one ,two,99999999.11 */select * from flimit where charf1 in('one','two'); /*r one ,two,99999999.11 */select * from flimit where charf1 in('one ','two'); /*r 99999999 */select cast(decf1 as numeric(8)) from flimit; /*r 99999999.1100 */select cast(decf1 as numeric(12,4)) from flimit; /*r one tw,tw */select cast((charf1 || vcharf1) as varchar(6)), cast(vcharf1 as varchar(2)) from flimit; /*e*/insert into flimit values('one', 'two', 999999999.11); /*e*/insert into flimit values('one', 'two', cast(999999999.11111 as decimal(10,2)); drop table flimit; create table flimit (a timestamp(0), b timestamp(6), c timestamp); insert into flimit values('2005-05-21 10:10:10.123456','2005-05-21 10:10:10.123456','2005-05-21 10:10:10.123456'); /*c0*/select * from flimit where a = b; /*c0*/select * from flimit where a = c; /*c1*/select * from flimit where b = b; hsqldb-1.8.0.10.orig/testrun/hsqldb/TestSelfConstraints.txt0000644000175000017500000000343510240554051022323 0ustar renerene-- -- TestSelfConstraints.txt -- -- Tests for Constraints -- bug #733940 -- NOT NULL enforcement -- IDENTITY can be set to NULL to be regenerated but other NOT NULL columns can't CREATE CACHED TABLE THEME (idTheme integer NOT NULL IDENTITY,libelle VARCHAR(10) NOT NULL,description VARCHAR(10)); insert into theme(libelle, description) values('ESSAI', 'ESSAI'); /*e*/update theme set libelle = null where idtheme = 0; /*u1*/update theme set idTheme = null where idtheme = 0; -- bug #722442 create table confignodetype (cnt_nodetypeid numeric(10) not null primary key, cnt_parentid numeric(10) not null,cnt_name varchar(40) not null, constraint fk_cnt_parentid foreign key (cnt_parentid) references confignodetype(cnt_nodetypeid)); /*u1*/INSERT INTO confignodetype VALUES (-1,-1,'prj'); -- bug #1114899 create table mytable(field1 int not null, field2 int); alter table mytable add constraint pk primary key (field1); /*e*/alter table mytable add constraint pk foreign key (field2) references mytable(field1) ; alter table mytable add constraint fk foreign key (field2) references mytable(field1) ; /*u1*/insert into mytable values (0,0); /*u1*/insert into mytable values (1,1); /*u1*/insert into mytable values (2,1); /*u1*/delete from mytable where field1= 2; /*u1*/delete from mytable where field1= 1; /*u1*/delete from mytable where field1= 0; /*r0*/select count(*) from mytable; alter table mytable drop constraint fk; alter table mytable drop constraint pk; drop table mytable; -- CREATE TABLE "Table3" ("ID" INTEGER NOT NULL,"dd" INTEGER, PRIMARY KEY ("ID")); ALTER TABLE "Table3" ALTER COLUMN "ID" INTEGER IDENTITY; ALTER TABLE "Table3" ALTER COLUMN "ID" INTEGER; ALTER TABLE "Table3" DROP PRIMARY KEY; ALTER TABLE "Table3" ADD PRIMARY KEY("dd"); ALTER TABLE "Table3" ALTER COLUMN "dd" INTEGER IDENTITY; hsqldb-1.8.0.10.orig/testrun/hsqldb/TestSelfSchemaPerCachTbl1.txt0000644000175000017500000000314410240555364023172 0ustar renerene-- CREATE AND INITIALIZE CACHED TABLE OBJECTS -- This CREATES the schema-specific objects to be used for -- schema-specific persistence tests. -- ****************************** CACH Tables --DROP TABLE nosuch; DROP TABLE ctblt1 IF exists; DROP TABLE ctblt2 IF exists; DROP TABLE ctblt3 IF exists; DROP TABLE ctblt4 IF exists; DROP TABLE ctblt101 IF exists; DROP TABLE tblj1 IF exists; /*u0*/CREATE CACHED TABLE ctblt1 (i int); /*u0*/CREATE CACHED TABLE public.ctblt2 (i int); /*u0*/CREATE CACHED TABLE ctblt3 (i int); /*u0*/CREATE CACHED TABLE tblj1 (i int, vc varchar(10)); -- For testing Joins /*e*/CREATE CACHED TABLE information_schema.ctblt101 (i int); /*e*/CREATE CACHED TABLE ctblt1 (i int); -- Create existing object /*e*/CREATE CACHED TABLE public.ctblt1 (i int); -- Create existing object /*e*/CREATE CACHED TABLE information_schema.system_users (i int); -- Existing object /*e*/INSERT INTO other.ctblt1 values(0); /*e*/INSERT INTO information_schema.ctblt1 values(1); /*u1*/INSERT INTO ctblt1 values(0); /*u1*/INSERT INTO public.ctblt1 values(100); -- Test one update that will be persisted (most update tests won't be) /*u1*/UPDATE public.ctblt1 set i = 1 WHERE i = 100; /*u1*/INSERT INTO tblj1 values(1, 'one'); /*u1*/SELECT * INTO public.ctblt4 FROM public.ctblt1 WHERE i = 0; /*c1*/SELECT * FROM public.ctblt4; -- Work-around ALTER TABLE ctblt1 ADD CONSTRAINT cpk_workaround PRIMARY KEY(i); -- ****************************** ALTERs -- Add tests when time permits. -- This to test recovery from .log files. SHUTDOWN IMMEDIATELY; hsqldb-1.8.0.10.orig/testrun/hsqldb/TestSelfViewSchemaResolve.txt0000644000175000017500000000640310237002161023401 0ustar renerene/*s*/DROP SCHEMA alts CASCADE; CREATE SCHEMA alts AUTHORIZATION dba; DROP VIEW v1 IF EXISTS; DROP VIEW v2 IF EXISTS; DROP VIEW v3 IF EXISTS; DROP VIEW v4 IF EXISTS; DROP VIEW v5 IF EXISTS; DROP VIEW v6 IF EXISTS; DROP VIEW v7 IF EXISTS; DROP VIEW v8 IF EXISTS; DROP TABLE t1 IF EXISTS; DROP TABLE t2 IF EXISTS; DROP TABLE t3 IF EXISTS; DROP TABLE t4 IF EXISTS; CREATE TABLE t1(t1c1 int, t1c2 int); CREATE TABLE t2(t2c1 int, t2c2 int); CREATE TABLE t3(c1 int, c2 int); CREATE TABLE t4(c1 int, c2 int); /*u1*/INSERT INTO t1 VALUES(1, 11); /*u1*/INSERT INTO t2 VALUES(2, 12); /*u1*/INSERT INTO t3 VALUES(3, 13); /*u1*/INSERT INTO t4 VALUES(4, 14); /*u0*/CREATE VIEW public.v1 AS SELECT * FROM t1; /*u0*/CREATE VIEW public.v2 AS SELECT * FROM t2; /*u0*/CREATE VIEW public.v3 AS SELECT * FROM t3; /*u0*/CREATE VIEW public.v4 AS SELECT * FROM t4; /*u0*/CREATE VIEW public.v5 (vc1, vc2) AS SELECT * FROM t1; /*u0*/CREATE VIEW public.v6 (vc1, vc2) AS SELECT * FROM t2; /*u0*/CREATE VIEW public.v7 (vc1, vc2) AS SELECT * FROM t3; /*u0*/CREATE VIEW public.v8 (vc1, vc2) AS SELECT * FROM t4; /*r1,11*/SELECT t1c1, t1c2 FROM v1; /*r2,12*/SELECT t2c1, t2c2 FROM v2; /*r3,13*/SELECT c1, c2 FROM v3; /*r4,14*/SELECT c1, c2 FROM v4; /*r1,11*/SELECT vc1, vc2 FROM v5; /*r2,12*/SELECT vc1, vc2 FROM v6; /*r3,13*/SELECT vc1, vc2 FROM v7; /*r4,14*/SELECT vc1, vc2 FROM v8; SET SCHEMA alts; /*e*/SELECT t1c1, t1c2 FROM v1; /*e*/SELECT t2c1, t2c2 FROM v2; /*e*/SELECT c1, c2 FROM v3; /*e*/SELECT c1, c2 FROM v4; /*e*/SELECT vc1, vc2 FROM v5; /*e*/SELECT vc1, vc2 FROM v6; /*e*/SELECT vc1, vc2 FROM v7; /*e*/SELECT vc1, vc2 FROM v8; /*r1,11*/SELECT t1c1, t1c2 FROM public.v1; /*r2,12*/SELECT t2c1, t2c2 FROM public.v2; /*r3,13*/SELECT c1, c2 FROM public.v3; /*r4,14*/SELECT c1, c2 FROM public.v4; /*r1,11*/SELECT vc1, vc2 FROM public.v5; /*r2,12*/SELECT vc1, vc2 FROM public.v6; /*r3,13*/SELECT vc1, vc2 FROM public.v7; /*r4,14*/SELECT vc1, vc2 FROM public.v8; CREATE INDEX i1 ON public.t1(t1c1); CREATE INDEX i2 ON public.t2(t2c1); CREATE INDEX i3 ON public.t3(c1); CREATE INDEX i4 ON public.t4(c1); /*e*/SELECT t1c1, t1c2 FROM v1; /*e*/SELECT t2c1, t2c2 FROM v2; /*e*/SELECT c1, c2 FROM v3; /*e*/SELECT c1, c2 FROM v4; /*e*/SELECT vc1, vc2 FROM v5; /*e*/SELECT vc1, vc2 FROM v6; /*e*/SELECT vc1, vc2 FROM v7; /*e*/SELECT vc1, vc2 FROM v8; /*r1,11*/SELECT t1c1, t1c2 FROM public.v1; /*r2,12*/SELECT t2c1, t2c2 FROM public.v2; /*r3,13*/SELECT c1, c2 FROM public.v3; /*r4,14*/SELECT c1, c2 FROM public.v4; /*r1,11*/SELECT vc1, vc2 FROM public.v5; /*r2,12*/SELECT vc1, vc2 FROM public.v6; /*r3,13*/SELECT vc1, vc2 FROM public.v7; /*r4,14*/SELECT vc1, vc2 FROM public.v8; SET SCHEMA alts; /*e*/SELECT t1c1, t1c2 FROM v1; /*e*/SELECT t2c1, t2c2 FROM v2; /*e*/SELECT c1, c2 FROM v3; /*e*/SELECT c1, c2 FROM v4; /*e*/SELECT vc1, vc2 FROM v5; /*e*/SELECT vc1, vc2 FROM v6; /*e*/SELECT vc1, vc2 FROM v7; /*e*/SELECT vc1, vc2 FROM v8; /*r1,11*/SELECT t1c1, t1c2 FROM public.v1; /*r2,12*/SELECT t2c1, t2c2 FROM public.v2; /*r3,13*/SELECT c1, c2 FROM public.v3; /*r4,14*/SELECT c1, c2 FROM public.v4; /*r1,11*/SELECT vc1, vc2 FROM public.v5; /*r2,12*/SELECT vc1, vc2 FROM public.v6; /*r3,13*/SELECT vc1, vc2 FROM public.v7; /*r4,14*/SELECT vc1, vc2 FROM public.v8; hsqldb-1.8.0.10.orig/testrun/hsqldb/runTest.sh0000755000175000017500000000240210162547064017606 0ustar renerene#!/bin/sh # ----------------------------------------------------- # Run with -help for usage. # If $JAVA_HOME is set, editing this script should not be required. # Send any questions to fchoong@user.sourceforge.net # ----------------------------------------------------- # the value set here will override the value passed by $JAVA_HOME or the -jdkhome switch jdkhome="" jargs="" thread_flag="" PRG=$0 # # resolve symlinks # while [ -h "$PRG" ]; do ls=`ls -ld "$PRG"` link=`expr "$ls" : '^.*-> \(.*\)$' 2>/dev/null` if expr "$link" : '^/' 2> /dev/null >/dev/null; then PRG="$link" else PRG="`dirname $PRG`/$link" fi done progdir=`dirname $PRG` progname=`basename $0` # ../.. will lead us to the home dbhome="$progdir/../.." # absolutize dbhome dbhome=`cd ${dbhome}; pwd` # # bring in needed functions . ${dbhome}/lib/functions #-------------------------------------------------------------------------------------------------------------- pre_main # # let's go # This presumes that hsqldbtest.jar was built in ${dbhome}/lib. # If you haven't done this run "ant jartest" in the ${dbhome}/build directory. # cp=$cp:${dbhome}/lib/hsqldbtest.jar exec "$jdkhome/bin/java" $thread_flag -classpath "$cp" $jargs "org.hsqldb.test.$@" # and we exit. hsqldb-1.8.0.10.orig/testrun/hsqldb/TestSelfPrimaryKeys.txt0000644000175000017500000000410510175030104022261 0ustar renerene-- -- TestSelfPrimaryKeys.txt -- -- Tests for add / drop primary key constraints -- drop table testtable if exists; create cached table testtable ( aString varchar(256) not null, firstNum integer not null, aDate date not null, secondNum integer not null, thirdNum integer not null, aName varchar(32) not null ); insert into TESTTABLE(aString, firstNum, aDate, secondNum, thirdNum, aName) values ('Current', 22, '2003-11-10', 18, 3, 'my name goes here'); insert into TESTTABLE(aString, firstNum, aDate, secondNum, thirdNum, aName) values ('Popular', 23, '2003-11-10', 18, 3, 'my name goes here'); insert into TESTTABLE(aString, firstNum, aDate, secondNum, thirdNum, aName) values ('New', 5, '2003-11-10', 18, 3, 'my name goes here'); insert into TESTTABLE(aString, firstNum, aDate, secondNum, thirdNum, aName) values ('Old', 5, '2003-11-10', 18, 3, 'my name goes here'); insert into TESTTABLE(aString, firstNum, aDate, secondNum, thirdNum, aName) values ('CCurrent', 5, '2003-11-10', 18, 3, 'my name goes here'); insert into TESTTABLE(aString, firstNum, aDate, secondNum, thirdNum, aName) values ('ELV', 5, '2003-11-10', 18, 3, 'my name goes here'); insert into TESTTABLE(aString, firstNum, aDate, secondNum, thirdNum, aName) values ('ELNA', 5, '2003-11-10', 18, 3, 'my name goes here'); insert into TESTTABLE(aString, firstNum, aDate, secondNum, thirdNum, aName) values ('Older', 5, '2003-11-10', 18, 3, 'my name goes here'); insert into TESTTABLE(aString, firstNum, aDate, secondNum, thirdNum, aName) values ('RA', 20, '2003-11-10', 18, 3, 'my name goes here'); insert into TESTTABLE(aString, firstNum, aDate, secondNum, thirdNum, aName) values ('RP', 2, '2003-11-10', 18, 3, 'my name goes here'); alter table testtable add constraint pk_testtable primary key (aString); alter table testtable drop constraint pk_testtable hsqldb-1.8.0.10.orig/testrun/hsqldb/TestSelfGroupBy.txt0000644000175000017500000000135210627114047021405 0ustar renerenedrop table t0 if exists; create table t0(c varchar(20), i integer, d date); insert into t0 values ('first', 1, '2000-01-01'); insert into t0 values ('second', 2, '2000-01-02'); insert into t0 values ('third', 3, '2000-02-01'); select year(d), month(d), day(d) from t0; select year(d) y, month(d) m, day(d) d from t0 group by y, d, m; drop table trades_a if exists; create table trades_a(opened timestamp, userid int, points int); CREATE VIEW trades_scores AS SELECT (EXTRACT(YEAR FROM opened) || '-' || EXTRACT(MONTH FROM opened) || '-' || EXTRACT(DAY FROM opened)) AS date, userid, SUM(points) AS score FROM trades_a GROUP BY date, userid insert into trades_a values (now, 1, 10); select * from trades_scores; drop table trades_a cascade; hsqldb-1.8.0.10.orig/testrun/hsqldb/TestSelfMultiGrants.txt0000644000175000017500000000511410330250013022250 0ustar renerene/*s*/DROP USER peon1; /*s*/DROP USER peon2; /*s*/DROP USER peon3; /*s*/DROP ROLE r1; /*s*/DROP ROLE r2; /*s*/DROP ROLE r3; /*s*/DROP ROLE r12; DROP TABLE t1 IF exists; DROP TABLE t2 IF exists; DROP TABLE t3 IF exists; DROP TABLE t4 IF exists; CREATE TABLE t1(i int); CREATE TABLE t2(i int); CREATE TABLE t3(i int); CREATE TABLE t4(i int); INSERT INTO t1 VALUES(1); INSERT INTO t2 VALUES(2); INSERT INTO t3 VALUES(3); INSERT INTO t4 VALUES(4); COMMIT; CREATE USER peon1 PASSWORD password; CREATE USER peon2 PASSWORD password; CREATE USER peon3 PASSWORD password; /*u0*/CREATE ROLE r1; /*u0*/CREATE ROLE r2; /*u0*/CREATE ROLE r3; /*u0*/CREATE ROLE r12; /*u0*/GRANT ALL ON t1 TO r1; /*u0*/GRANT ALL ON t1 TO r12; /*u0*/GRANT ALL ON t2 TO r2; /*u0*/GRANT ALL ON t2 TO r12; /*u0*/GRANT ALL ON t3 TO r3; -- Can't mix right-grants and role-grants /*e*/GRANT r1, SELECT ON t1 TO peon1; /*e*/GRANT SELECT ON t1, r1 TO peon1; /*u0*/GRANT SELECT, INSERT ON t1 TO peon1; /*u0*/GRANT r2, r3 TO peon2; /*u0*/GRANT r12 TO peon3; CONNECT USER peon1 PASSWORD password; /*c1*/SELECT * FROM t1; /*e*/SELECT * FROM t2; /*e*/SELECT * FROM t3; /*e*/SELECT * FROM t4; CONNECT USER peon2 PASSWORD password; /*e*/SELECT * FROM t1; /*c1*/SELECT * FROM t2; /*c1*/SELECT * FROM t3; /*e*/SELECT * FROM t4; CONNECT USER peon3 PASSWORD password; /*c1*/SELECT * FROM t1; /*c1*/SELECT * FROM t2; /*e*/SELECT * FROM t3; /*e*/SELECT * FROM t4; CONNECT USER sa PASSWORD ""; /*u0*/GRANT r2 TO peon1; /*u0*/GRANT r3 TO r12; -- r12 held by peon3. Nest r3 into it too. /*u0*/GRANT SELECT ON t1 TO peon2; CONNECT USER peon1 PASSWORD password; /*c1*/SELECT * FROM t1; /*c1*/SELECT * FROM t2; /*e*/SELECT * FROM t3; /*e*/SELECT * FROM t4; CONNECT USER peon2 PASSWORD password; /*c1*/SELECT * FROM t1; /*c1*/SELECT * FROM t2; /*c1*/SELECT * FROM t3; /*e*/SELECT * FROM t4; CONNECT USER peon3 PASSWORD password; /*c1*/SELECT * FROM t1; /*c1*/SELECT * FROM t2; /*c1*/SELECT * FROM t3; /*e*/SELECT * FROM t4; -- Access to t3 has been granted only through r3, either directly or -- indirectly (the latter through nesting r3 in another role). CONNECT USER sa PASSWORD ""; DROP ROLE r3; CONNECT USER peon1 PASSWORD password; /*c1*/SELECT * FROM t1; /*c1*/SELECT * FROM t2; /*e*/SELECT * FROM t3; /*e*/SELECT * FROM t4; CONNECT USER peon2 PASSWORD password; /*c1*/SELECT * FROM t1; /*c1*/SELECT * FROM t2; /*e*/SELECT * FROM t3; /*e*/SELECT * FROM t4; CONNECT USER peon3 PASSWORD password; /*c1*/SELECT * FROM t1; /*c1*/SELECT * FROM t2; /*e*/SELECT * FROM t3; /*e*/SELECT * FROM t4; hsqldb-1.8.0.10.orig/testrun/hsqldb/TestSelfAlterColumn.txt0000644000175000017500000000723310767041120022243 0ustar renerenedrop table "testac" if exists; -- tests for various column definition statements create table "testac" ("a" integer, "b" integer); insert into "testac" values(6,6); insert into "testac" values(5,5); /*r2*/select count(*) from "testac" -- add column without COLUMN keyword alter table "testac" add "c" varchar(10) /*e*/alter table "testac" add "c" varchar(10) alter table "testac" alter column "c" varchar(2) /*e*/insert into "testac" values(5,5,'long string'); insert into "testac" values(4,4,'ls'); /*r 6,6,NULL 5,5,NULL 4,4,ls */select * from "testac" order by "a" desc -- drop column without COLUMN keyword alter table "testac" drop "c" /*r 6,6 5,5 4,4 */select * from "testac" order by "a" desc -- add column with COLUMN keyword alter table "testac" add column "c" varchar(10) default 'XX' not null before "b" /*e*/alter table "testac" add column "c" varchar(10) before "b" /*r 6,XX,6 5,XX,5 4,XX,4 */select * from "testac" order by "a" desc; -- drop column with COLUMN keyword alter table "testac" drop column "c"; /*r 6,6 5,5 4,4 */select * from "testac" order by "a" desc; -- add column without COLUMN keyword - unquoted alter table "testac" add c varchar(10); /*r 6,6,NULL 5,5,NULL 4,4,NULL */select * from "testac" order by "a" desc; -- drop column without COLUMN keyword - unquoted alter table "testac" drop c; /*r 6,6 5,5 4,4 */select * from "testac" order by "a" desc; -- -- PK definition not allowed in alter column /*e*/alter table "testac" alter column "a" integer primary key; /*e*/alter table "testac" alter column "a" integer identity; alter table "testac" add primary key("a"); /*e*/insert into "testac" values (null,7); -- IDENTITY can be added to an existing PK column alter table "testac" alter column "a" integer identity insert into "testac" values (null,7); insert into "testac" ("b") values (8); /*r 4,4 5,5 6,6 7,7 8,8 */select * from "testac"; select * into "testacc" from "testac"; -- IDENTITY can be dropped from PK column alter table "testac" alter column "a" integer; /*e*/insert into "testac" values (null,9); insert into "testac" values (9,9); /*r 4,4 5,5 6,6 7,7 8,8 9,9 */select * from "testac"; alter table "testac" drop primary key; /*e*/insert into "testac" values (null,7); -- column with a PK constraint can be added alter table "testac" add column "c" integer generated by default as identity primary key -- no second IDENTITY or PK /*e*/alter table "testac" add column "d" integer generated by default as identity primary key /*e*/alter table "testac" add column "d" integer generated by default as identity /*e*/alter table "testac" add column "d" integer primary key; -- column with a PK constraint can be dropped alter table "testac" drop "c"; alter table "testac" add unique("a"); /*e*/insert into "testac" values(9,9); alter table "testac" drop "a"; /*r 4 5 6 7 8 9 */select * from "testac"; -- tests for changing column size alter table "testacc" add column "c" varchar(4) default 'aa' not null; update "testacc" set "c" = "c" || cast("a" as varchar); alter table "testacc" add primary key ("c") /*r 4,4,aa4 5,5,aa5 6,6,aa6 7,7,aa7 8,8,aa8 */select * from "testacc"; /*e*/insert into "testacc" values (9,9,'aa9000000'); alter table "testacc" alter column "c" varchar(10) not null; alter table "testacc" alter column "c" varchar(10) not null; insert into "testacc" values (9,9,'aa9000000'); /*e*/insert into "testacc" values (10,10,null); /*e*/alter table "testacc" alter column "c" set null; alter table "testacc" drop primary key; alter table "testacc" alter column "c" set null; insert into "testacc" values (10,10,null); hsqldb-1.8.0.10.orig/testrun/hsqldb/TestSelfTempTable2.txt0000644000175000017500000000130310330250410021733 0ustar renerene-- This script depends on TestSelfTempTable1.txt to set up the objects tested. SET AUTOCOMMIT false; /*c0*/SELECT * FROM tmptbl1; /*c0*/SELECT * FROM tmptbl2; CONNECT USER altuser2 PASSWORD password; /*e*/SELECT * FROM tmptbl1; /*e*/SELECT * FROM tmptbl2; CONNECT USER altuser1 PASSWORD password; /*c0*/SELECT * FROM tmptbl1; /*c0*/SELECT * FROM tmptbl2; /*u1*/INSERT INTO tmptbl1 VALUES(1); /*u1*/INSERT INTO tmptbl1 VALUES(2); /*c2*/SELECT * FROM tmptbl1; COMMIT; -- Purposefully not committing these inserts /*c0*/SELECT * FROM tmptbl1; /*u1*/INSERT INTO tmptbl2 VALUES(1); /*u1*/INSERT INTO tmptbl2 VALUES(2); /*c2*/SELECT * FROM tmptbl2; CONNECT USER SA password ""; SHUTDOWN; hsqldb-1.8.0.10.orig/testrun/hsqldb/TestSelfSchemaPersistC2.txt0000644000175000017500000001156710234514604022763 0ustar renerene-- Test ALTER commands on objects set up by other script -- SEQUENCES /*r22*/SELECT next value FOR public.s00 FROM public.mt01; /*r23*/SELECT next value FOR blaine.bs00 FROM public.mt01; /*r24*/SELECT next value FOR blaine.bs01 FROM public.mt01; /*r25*/SELECT next value FOR public.s01 FROM public.mt01; -- Resetting all sequence vals so next script can retest them. /*u0*/ALTER SEQUENCE public.s00 RESTART WITH 22; /*u0*/ALTER SEQUENCE blaine.bs00 RESTART WITH 23; /*u0*/ALTER SEQUENCE blaine.bs01 RESTART WITH 24; /*u0*/ALTER SEQUENCE public.s01 RESTART WITH 25; -- RENAMES /*c0*/SELECT * FROM blaine.rbmt00; /*c0*/SELECT * FROM blaine.rbct00; /*c0*/SELECT * FROM public.rmt00; /*c0*/SELECT * FROM public.rct00; /*u0*/SET SCHEMA public; /*u0*/ALTER TABLE blaine.rbmt00 RENAME TO bmt00; /*u0*/ALTER TABLE blaine.bmt00 RENAME TO blaine.rbmt00 /*u0*/ALTER TABLE blaine.rbct00 RENAME TO blaine.bct00 /*u0*/ALTER TABLE rct00 RENAME TO ct00; /*u0*/ALTER TABLE ct00 RENAME TO public.rct00; /*u0*/SET SCHEMA blaine; /*u0*/ALTER TABLE bct00 RENAME TO rbct00 /*u0*/ALTER TABLE public.rmt00 RENAME TO public.mt00; /*u0*/ALTER TABLE public.mt00 RENAME TO rmt00; /*c0*/SELECT * FROM blaine.rbmt00; /*c0*/SELECT * FROM blaine.rbct00; /*c0*/SELECT * FROM public.rmt00; /*c0*/SELECT * FROM public.rct00; /*u0*/SET SCHEMA public; /*u0*/ALTER INDEX blaine.rbmi00 RENAME TO bmi00; /*u0*/SET SCHEMA blaine; /*u0*/ALTER INDEX rbci00 RENAME TO bci00; /*u0*/ALTER INDEX public.rmi00 RENAME TO public.mi00; /*u0*/ALTER INDEX public.rci00 RENAME TO ci00; /*u0*/SET SCHEMA public; /*u0*/ALTER INDEX blaine.bmi00 RENAME TO rbmi00; /*u0*/SET SCHEMA blaine; /*u0*/ALTER INDEX bci00 RENAME TO rbci00; /*u0*/ALTER INDEX public.mi00 RENAME TO public.rmi00; /*u0*/ALTER INDEX public.ci00 RENAME TO rci00; /*u0*/SET SCHEMA public; /*u0*/ALTER INDEX blaine.rbmui05 RENAME TO bmui05; /*u0*/SET SCHEMA blaine; /*u0*/ALTER INDEX rbcui05 RENAME TO bcui05; /*u0*/ALTER INDEX public.rmui05 RENAME TO public.mui05; /*u0*/ALTER INDEX public.rcui05 RENAME TO cui05; /*u0*/SET SCHEMA public; /*u0*/ALTER INDEX blaine.bmui05 RENAME TO rbmui05; /*u0*/SET SCHEMA blaine; /*u0*/ALTER INDEX bcui05 RENAME TO rbcui05; /*u0*/ALTER INDEX public.mui05 RENAME TO public.rmui05; /*u0*/ALTER INDEX public.cui05 RENAME TO rcui05; -- ALTER TABLE ADD/DROP CONS -- We'll roll all this work back so we can repeat it. -- Check constraints but no unique constraints, so cam commit duplicate vals. /*e*/INSERT INTO public.mt11 values(0); /*e*/INSERT INTO public.mt12 values(0); /*e*/INSERT INTO public.mt13 values(0); /*e*/INSERT INTO public.mt14 values(0); /*e*/INSERT INTO blaine.bmt11 values(0); /*e*/INSERT INTO blaine.bmt12 values(0); /*e*/INSERT INTO blaine.bmt13 values(0); /*e*/INSERT INTO blaine.bmt14 values(0); /*u1*/INSERT INTO public.mt11 values(1); /*u1*/INSERT INTO public.mt12 values(1); /*u1*/INSERT INTO public.mt13 values(1); /*u1*/INSERT INTO public.mt14 values(1); /*u1*/INSERT INTO blaine.bmt11 values(1); /*u1*/INSERT INTO blaine.bmt12 values(1); /*u1*/INSERT INTO blaine.bmt13 values(1); /*u1*/INSERT INTO blaine.bmt14 values(1); COMMIT; SET AUTOCOMMIT FALSE; -- Test vs. some values entered in previous sessoin, and some that we'll add. /*e*/INSERT INTO public.ct11 values(1); /*e*/INSERT INTO public.ct12 values(1); /*e*/INSERT INTO public.ct13 values(1); /*e*/INSERT INTO public.ct14 values(1); /*u1*/INSERT INTO public.ct11 values(2); /*u1*/INSERT INTO public.ct12 values(2); /*u1*/INSERT INTO public.ct13 values(2); /*u1*/INSERT INTO public.ct14 values(2); /*u1*/INSERT INTO blaine.bct11 values(2); /*u1*/INSERT INTO blaine.bct12 values(2); /*u1*/INSERT INTO blaine.bct13 values(2); /*u1*/INSERT INTO blaine.bct14 values(2); /*e*/INSERT INTO blaine.bct11 values(2); /*e*/INSERT INTO blaine.bct12 values(2); /*e*/INSERT INTO blaine.bct13 values(2); /*e*/INSERT INTO blaine.bct14 values(2); ROLLBACK; -- Unique constraints on the PK tables, but not on our FK tables here, -- so cam commit duplicate vals. /*u1*/INSERT INTO public.ct15 values(10); /*u1*/INSERT INTO public.ct16 values(10); /*u1*/INSERT INTO public.ct17 values(10); /*u1*/INSERT INTO blaine.bct18 values(10); /*u1*/INSERT INTO blaine.bct17 values(10); /*e*/INSERT INTO public.ct15 values(8); /*e*/INSERT INTO public.ct16 values(8); /*e*/INSERT INTO public.ct17 values(8); /*e*/INSERT INTO public.ct18 values(8); /*e*/INSERT INTO blaine.bct17 values(8); /*e*/INSERT INTO blaine.bmt21 VALUES (2); /*u1*/INSERT INTO blaine.bmt21 VALUES (1); /*e*/INSERT INTO blaine.bmt20 VALUES (2); /*u1*/INSERT INTO blaine.bmt20 VALUES (1); /*e*/INSERT INTO blaine.bmt22 VALUES (2); /*u1*/INSERT INTO blaine.bmt22 VALUES (1); /*e*/INSERT INTO blaine.bmt23 VALUES (2); /*u1*/INSERT INTO blaine.bmt23 VALUES (1); /*e*/INSERT INTO blaine.bmt25 VALUES (2); /*u1*/INSERT INTO blaine.bmt25 VALUES (1); SHUTDOWN; hsqldb-1.8.0.10.orig/testrun/hsqldb/TestSelf.txt0000644000175000017500000014411110405022401020060 0ustar renerene-- -- TestSelf.txt -- -- TestSelf.txt is used by TestSelf.java to test the database -- -- Comment lines must start with -- and are ignored -- Lines starting with spaces belongs to last line -- Checked lines start with comments containing where is: -- c ResultSet expects a with rows -- r ResultSet expected with result in first row/column -- u Update count expected -- e Exception must occur -- Miscelaneous tests by fredt -- bug #897591 /*rgood*/CALL CASEWHEN(CURTIME() BETWEEN CAST('0:0:0' AS TIME) AND CAST('23:59:59' AS TIME), 'good', 'bad') -- Referential integrity with cascading delete -- identity column create table main(id int identity,name varchar) create table ref(id int identity,idMain int, foreign key(idMain)references main(id) on delete cascade) create table ref2(id int identity,idMain int, foreign key(idMain)references ref(id) on delete cascade) /*u1*/ insert into main values(null,'test') /*e*/ insert into ref values(null,2) /*u1*/ insert into ref values(null,0) /*u1*/ insert into main values(10,1) -- next main.id value should be 11 /*u1*/ insert into main values(null,1) /*u1*/ insert into ref values(null,11) /*e*/ insert into ref values(null,12) /*u1*/ insert into ref2 values(null,1) /*u3*/ delete from main /*c0*/ select * from main /*c0*/ select * from ref /*c0*/ select * from ref2 /*u1*/ insert into main values(1,'test') /*u1*/ insert into main values(2,'test2') /*u1*/ insert into ref values(2,2) /*e*/ update main set id=2-id /*e*/ drop table main;drop table ref; drop table ref2 drop table ref2;drop table ref;drop table main -- Data Definition create table T1(Nr integer) create table T2(Nr integer primary Key) create table T3(Nr integer,dbl double,vc varchar(10),cc char(1)) create table T4(nr integer,lvc longVarChar,dt date,tm time) create table T5(dec decimal(10) primary key,b binary(1) not null) create table "T6"("x" tinyint,s smallint not null,b bigint) create table t7("-x's'-" real,f float(2),n numeric,t timestamp) create table t8(bin binary,vb varbinary,lvb longvarbinary) create table t9(nr integer not null,x smallint not null primary key) create unique index it1 on t1(nr) script create index it2 on t2(nr) create index it3 on t3(nr,dbl,vc,cc) create unique index it4 on t4(nr,lvc,tm) drop index it4 create unique index it4 on t4(nr,tm) drop index it4 create index it4 on t4(tm,nr) create index it4b on t4(tm,nr) create unique index it4c on t4(tm,nr) drop index it4b create index it9 on t9(nr,x); drop table t1;drop table t2;drop table "T3"; DROP TABLE T4;Drop Table T5; drop table T6 drop table t7; drop table t8; drop table t9 create user "test" password "test-p" create table test (id integer) revoke all on test from "test" select * from test order by test.id grant all on test to "test" grant select on test to "test" revoke select,insert,update,delete on test from "test" connect user "test" password "test-p" set password "test-p2" connect user sa password "" connect user "test" password "test-p2" connect user sa password "" set autocommit false insert into test values (1) update test set id = 3 rollback insert into test values (2) delete from test rollback commit script drop table test drop user "test" script set autocommit true create memory table test (id integer) drop table test create cached table test (id integer null) drop table test -- Data Manipulation without result create table address(nr integer,name varchar,placezip smallint) insert into address values(1,'Boss',3000) insert into address (nr,name,placezip) values(2,'Walt',8000) insert into address values(-3,'',0) insert into address select * from address where nr>0 update address set nr=4 where nr=-2 insert into address values(3,'x',3000) insert into address (name,nr,placezip) values('y',4,8000) insert into address (name,nr,placezip) select name,placezip,nr from address where name like 'x%' delete from address where name like 'x%' update address set name='Rene' where nr=4 update address set nr=5, name='What' where nr=1 and name='Boss' create table place(zip smallint,name longvarchar,country char) insert into place values(3000,'Langenthal\t1','CH') insert into place values(0,'\\\\Heaven',null) insert into place values(8000,'Zrich','CH') insert into place values(-1,'NULL','null') create table invoice(addressnr integer,total decimal) insert into invoice values(4,1003834.05) insert into invoice values(2,-4987770.01) insert into invoice select * from invoice where not total>=0. update invoice set total=10 where total < 0 insert into invoice values(2,10) set schema INFORMATION_SCHEMA select * from system_tables select * from SYSTEM_SESSIONINFO set schema PUBLIC create table t_double(id integer,d double,f double) insert into t_double values(1,1.2,1.4) insert into t_double values(2,1.4,1.0) create table t_date (id integer,d date,t time,ts timestamp ) insert into t_DATE values(0,{d '1999-08-21'},'18:53:00',null) insert into t_date values(1,'1999-08-22','17:00:01','2000-02-29 10:00:00') create table t_bit (b1 bit,b2 bit) insert into t_bit values(false,false) insert into t_bit select b2,b1 from t_bit insert into t_bit values(true,false) insert into t_bit values(true,true) create table Problem(Nr bigint,ClassNr bigint,StateNr bigint,Name varchar); create table Class(Nr bigint, Name varchar, Node varchar); insert into Problem values(10, 1, 3, 'Problem 10; Class 1; State 3'); insert into Problem values(20, 2, 2, 'Problem 20; Class 2; State 2'); insert into Problem values(30, 3, 2, 'Problem 30; Class 3; State 2'); insert into Class values(1, 'Class/State 1','Node A'); insert into Class values(2, 'Class/State 2','Node B'); insert into Class values(3, 'Class/State 3','Node C'); CREATE CACHED TABLE HLO(NRO INTEGER,NIMI VARCHAR,PTMP INTEGER) CREATE INDEX INRO ON HLO(NRO) INSERT INTO HLO VALUES(1,'hlo 1',0) INSERT INTO HLO VALUES(2,'hlo 2',0) INSERT INTO HLO VALUES(3,'hlo 3',0) INSERT INTO HLO VALUES(4,'hlo 4',0) INSERT INTO HLO VALUES(5,'hlo 5',0) insert into hlo values(10,'10',0); delete from hlo where nro=10; DROP TABLE HLO -- Select with update count /*c6*/ select * from address /*c0*/ select * from address where nr in(-1) /*c4*/ select * from place /*c4*/ select * from invoice /*c1*/ select nr from address where nr<0 /*c0*/ select * from address where nr>=0 and nr<=0 /*c1*/ select count(*) from address where nr=-99 /*c0*/ select * from address where not name like '%' /*c1*/ select * from address,place p where (nr=4) and p.zip=placezip /*c1*/ select * from address,place p where (nr=4 or nr>3 and nr<2) and p.zip=placezip or (p.zip>0 and p.zip<-1 or p.zip=-2) /*c1*/select * from address a,place p,invoice i where a.placezip=p.zip and a.nr=i.addressnr and i.addressnr=4 /*c1*/ select p.zip,p.*,country from address a,place p,invoice i where a.placezip=p.zip and a.nr=i.addressnr and i.addressnr=4 /*c7*/ select * from address union all select * from address where nr=4 /*c1*/ select max(place.zip) x from place /*c0*/ select * from address where name like 'Wal_' escape 'l' /*c2*/ select * from address where name like 'Wal_' escape '+' /*c4*/ select total as x from invoice order by addressnr desc,total asc /*c3*/ select place.* from place where not country = 'NULL' and not name is null and not name is NULL and not name = 'null' and not country = 'NULL' order by zip /*c3*/ select * from address where nr in (1,5,99,5,4) /*c1*/ select * from (select * from address) as address where nr=4 -- from 1.7.2, next result no longer returns null == null /*c5*/ select p1.country from place p1,place p2 where p1.country=p2.country /*c1*/ select * from t_double where id>-10 and d>1.3 and d>.3 /*c2*/ select * from t_double where d>-20 or f<10.2 /*c2*/ select d,t,d from t_date where d>'1900-08-21'; /*c1*/ select d,*,d from t_date where ts>'2000-01-01 00:00:00' /*c0*/ select t_date.*,* from t_date where t<='01:00:00' /*c2*/ select * from t_bit where b1<=false or b2>true /*c2*/ select * from t_bit where not(b1<=false or b2>true) /*c2*/ select P.*, C.Name ClassName from Problem P,Class C where P.Nr in(10,20) and P.ClassNr=C.Nr /*c1*/ select P.*, S.Name StateName, S.Node StateNode, C.Name ClassName, C.Node ClassNode from Problem P, Class S, Class C where P.Nr = 10 and P.ClassNr = C.Nr and P.StateNr = S.Nr -- ResultSet with value /*r0*/ create table test(nr integer,name char);select count(*) from test /*r1*/ insert into test values(1,null);select nr from test group by nr /*r2*/ update test set nr=2;select avg(nr) from test /*r3*/ update test set nr=1+1*2;select sum(nr) from test /*r-3*/ update test set nr=-(select max(t2.nr) from test t2);select nr from test /*r4*/ update test set nr=2*(1- -1);select nr from test /*r4*/ select sum(nr) from test where nr in(select t2.nr from test t2) /*e*/ update test set nr=1/0 update test set nr=null; /*rNULL*/ select nr from test update test set nr=8/(1+(null*3)-1); /*rNULL*/ select nr from test /*r2*/ update test set nr=4/2;select "TEST"."NR" from test /*r34*/ update test set name='3' || '4';select distinct name from test /*rHo*/ select 'Ho' as hhoo from TEsT where name in ('34','y','z') /*rNULL*/ update test set name=null || 'x' || null;select name from "TEST" -- case sensitivity tests create table "t6"("x" char,s smallint not null,b bigint, c binary); /*r0*/ select count(*) from "t6" /*u1*/ insert into "t6" values('CaseS',100, 1000000000000, null); /*rCaseS*/ select "x" from "t6" /*u1*/ delete from "t6" /*u1*/ insert into "t6" values(null,100, 1000000000000, null); /*u1*/ delete from "t6" -- Finish drop table address drop table place drop table invoice drop table t_double;drop table t_date drop table t_bit drop table problem; drop table class -- Other tests CREATE TABLE Address(ID INTEGER PRIMARY KEY,organization VARCHAR, address1 VARCHAR,address2 VARCHAR,address3 VARCHAR,city VARCHAR, state VARCHAR,zipCode VARCHAR,countryID INTEGER,phone VARCHAR, phoneExtension VARCHAR,fax VARCHAR,eMail VARCHAR) CREATE TABLE Country(ID INTEGER PRIMARY KEY,name VARCHAR) INSERT INTO COUNTRY(ID, name) VALUES(23, 'USA') INSERT INTO ADDRESS(ID, countryID) VALUES(5, SELECT ID FROM Country WHERE name = 'USA') SELECT * FROM ADDRESS INNER JOIN COUNTRY ON CountryID = COUNTRY.ID SELECT * FROM ADDRESS LEFT JOIN COUNTRY ON CountryID = COUNTRY.ID INSERT INTO ADDRESS(ID) VALUES(6) /*c1*/SELECT * FROM ADDRESS ad INNER JOIN COUNTRY ON ad.CountryID = COUNTRY.ID /*c2*/SELECT * FROM ADDRESS LEFT JOIN COUNTRY ON CountryID = COUNTRY.ID SELECT * FROM Address,Country WHERE Address.countryID=Country.ID AND EXISTS (SELECT C.Name FROM Country AS C WHERE C.ID=Country.ID) AND EXISTS (SELECT * FROM Country AS C WHERE C.ID=Address.countryID) -- retain metadata CREATE TABLE META_TEST( ID numeric(10), GEOX decimal(10,2), BLURB VARCHAR(50)); -- ignorecase tests create table test_ic(name varchar_ignorecase) insert into test_ic values('Hello') insert into test_ic values('World') /*c0*/select * from test_ic where name like 'HALLO' /*c1*/select * from test_ic where name like 'HELLO' /*c1*/select * from test_ic where 'HELLO' like name /*c1*/select * from test_ic where name = 'world' drop table test_ic -- test maxrows create table test_maxrows(id int) insert into test_maxrows values(0); insert into test_maxrows select id+1 from test_maxrows; insert into test_maxrows select id+2 from test_maxrows; insert into test_maxrows select id+4 from test_maxrows; /*R 7 6 5 4 */select id from test_maxrows limit 4 /*r 4 3 2 1 */select id from test_maxrows order by id desc limit 4 offset 3 /*r 4 3 2 1 */select limit 3 4 id from test_maxrows order by id desc /*r 4 3 */select id from test_maxrows order by id desc limit 2 offset 3 set maxrows 3 /*c3*/select * from test_maxrows /*c3*/select id from test_maxrows order by id desc /*r 7 6 5 */select id from test_maxrows order by id desc /*r 4 3 2 */select id from test_maxrows order by id desc limit 4 offset 3 /*r 4 3 */select id from test_maxrows order by id desc limit 2 offset 3 /*r8*/select count(*) from test_maxrows /*r7*/select max(id) from test_maxrows /*c0*/select id from test_maxrows minus select id from test_maxrows /*c3*/select id from test_maxrows group by id set maxrows 0 /*c8*/select * from test_maxrows drop table test_maxrows -- test functions CREATE TABLE Product(ID INTEGER PRIMARY KEY,Name VARCHAR(255),Cost DECIMAL) insert into product values (0,'Test',10.3444) /*r10.34*/select round(cost,2) from product /*r10.3444*/select cost from product drop table product -- IN (subquery) create table A ( C1 VARCHAR) create table B ( C1 VARCHAR) insert into A (C1) values ('one') insert into A (C1) values ('two') insert into B (C1) values ('one') /*c1*/ select * from B where C1 in (select C1 from A) drop table A drop table B -- simple transactional tests CREATE TABLE PRODUCT(ID INTEGER PRIMARY KEY,NAME VARCHAR,COST DECIMAL) INSERT INTO PRODUCT VALUES(0,'Iron',5.4) INSERT INTO PRODUCT VALUES(1,'Wood',24.8) INSERT INTO PRODUCT VALUES(2,'Fire',24.8) SET AUTOCOMMIT FALSE INSERT INTO PRODUCT VALUES(3,'ERR1',0.0) INSERT INTO PRODUCT VALUES(4,'ERR1',0.0) DELETE FROM PRODUCT WHERE ID=2 UPDATE PRODUCT SET NAME='ERR2' WHERE NAME<>'ERR1' /*c2*/ SELECT * FROM PRODUCT WHERE NAME='ERR1' /*c2*/ SELECT * FROM PRODUCT WHERE NAME='ERR2' /*c4*/ SELECT * FROM PRODUCT ROLLBACK /*c0*/ SELECT * FROM PRODUCT WHERE NAME='ERR1' /*c0*/ SELECT * FROM PRODUCT WHERE NAME='ERR2' /*c3*/ SELECT * FROM PRODUCT SET AUTOCOMMIT TRUE DROP TABLE PRODUCT -- Exceptions /*e*/ + /*e*/ select nr from address union select nr,nr from address /*e*/ create something /*e*/ create index x on address (nr + /*e*/ create table p2 (id integer primary key, id2 integer primary key) /*e*/ create table p3 (id integer primary key + 2) /*e*/ drop index x /*e*/ drop all /*e*/ create table test(nr integer); insert into test values (10 and) /*e*/ select oh from test /*e*/ create table test(nr integer) /*e*/ create user 'test' password 'test';connect user 'test' password 'test'; select * from test; /*e*/ connect user 'sa' password ''; drop user 'test'; drop it now /*e*/ insert into test values(1);insert into test rows /*e*/ create unique index i1 on test(id);select * from (oh what) /*e*/ insert into test values(2); update test set id=1; /*e*/ select * from test where id in (1 (2) 3) /*e*/ select o.* from test /*e*/ select * from test where id like '0' escape 'maybe' /*e*/ insert into test (nr and so on) values (1) /*e*/ insert into test values (select * from test union select * from test) /*e*/ update test set nr=1+(3+5 'x' /*e*/ update test set nr=1.....3 /*e*/ select *.* from test /*e*/ select * from test where id>2 and (id>3; /*e*/ select * from test order it /*e*/ creat unique index 1 /*e*/ select id from test where yes>2; /*e*/ select id from test where id has 5 /*e*/ drop table test; grant access /*e*/ connect user or maybe not /*e*/ set parameter /*e*/ set autocommit and /*e*/ select column as column plus /*e*/ select * from hm /*e*/ grant all about it /*e*/ create table wrong(id usertype) /*e*/ select #strange# /*e*/ create table mem(i int)drop table mem", -- ResultSet with sizes and padded/truncated values -- Should be modified and run with sql.enforce_size=true in .properties file create table test(nr integer,name char(5), other varchar(10)); /*r0*/ select count(*) from test; insert into test values(1,null,null); /*r1*/ select nr from test group by nr; -- this should be truncated insert into test values(2,'1234567',''); /*r1234567*/ select name from test where nr=2; -- this should be padded /*r123*/insert into test values(3,'123',''); select name from test where nr=3; -- thi should be truncated /*r123456789012345*/ insert into test values(4,'','123456789012345'); select other from test where nr=4; -- This should be as is insert into test values(5,'','123'); /*r123*/ select other from test where nr=5; drop table test; DROP TABLE POS IF EXISTS DROP TABLE DOCUMENT IF EXISTS DROP TABLE PRODUCT IF EXISTS DROP TABLE ADDRESS IF EXISTS CREATE TABLE ADDRESS(ID INTEGER PRIMARY KEY,FIRSTNAME VARCHAR(255), LASTNAME VARCHAR(255),STREET VARCHAR(255),CITY VARCHAR(255)) CREATE TABLE PRODUCT(ID INTEGER PRIMARY KEY,NAME VARCHAR(255),COST DECIMAL) CREATE TABLE DOCUMENT(ID INTEGER PRIMARY KEY,ADDRESSID INTEGER,TOTAL DECIMAL) CREATE TABLE POS(DOCUMENTID INTEGER,POS INTEGER,PRODUCTID INTEGER, QUANTITY INTEGER,PRICE DECIMAL, CONSTRAINT SYSTEM_PK PRIMARY KEY(DOCUMENTID,POS)) INSERT INTO ADDRESS VALUES(0,'Laura','Steel','429 Seventh Av.','Dallas') INSERT INTO ADDRESS VALUES(1,'Susanne','King','366 - 20th Ave.','Olten') INSERT INTO ADDRESS VALUES(2,'Anne','Miller','20 Upland Pl.','Lyon') INSERT INTO ADDRESS VALUES(3,'Michael','Clancy','542 Upland Pl.','San Francisco') INSERT INTO ADDRESS VALUES(4,'Sylvia','Ringer','365 College Av.','Dallas') INSERT INTO ADDRESS VALUES(5,'Laura','Miller','294 Seventh Av.','Paris') INSERT INTO ADDRESS VALUES(6,'Laura','White','506 Upland Pl.','Palo Alto') INSERT INTO ADDRESS VALUES(7,'James','Peterson','231 Upland Pl.','San Francisco') INSERT INTO ADDRESS VALUES(8,'Andrew','Miller','288 - 20th Ave.','Seattle') INSERT INTO ADDRESS VALUES(9,'James','Schneider','277 Seventh Av.','Berne') INSERT INTO ADDRESS VALUES(10,'Anne','Fuller','135 Upland Pl.','Dallas') INSERT INTO ADDRESS VALUES(11,'Julia','White','412 Upland Pl.','Chicago') INSERT INTO ADDRESS VALUES(12,'George','Ott','381 Upland Pl.','Palo Alto') INSERT INTO ADDRESS VALUES(13,'Laura','Ringer','38 College Av.','New York') INSERT INTO ADDRESS VALUES(14,'Bill','Karsen','53 College Av.','Oslo') INSERT INTO ADDRESS VALUES(15,'Bill','Clancy','319 Upland Pl.','Seattle') INSERT INTO ADDRESS VALUES(16,'John','Fuller','195 Seventh Av.','New York') INSERT INTO ADDRESS VALUES(17,'Laura','Ott','443 Seventh Av.','Lyon') INSERT INTO ADDRESS VALUES(18,'Sylvia','Fuller','158 - 20th Ave.','Paris') INSERT INTO ADDRESS VALUES(19,'Susanne','Heiniger','86 - 20th Ave.','Dallas') INSERT INTO ADDRESS VALUES(20,'Janet','Schneider','309 - 20th Ave.','Oslo') INSERT INTO ADDRESS VALUES(21,'Julia','Clancy','18 Seventh Av.','Seattle') INSERT INTO ADDRESS VALUES(22,'Bill','Ott','250 - 20th Ave.','Berne') INSERT INTO ADDRESS VALUES(23,'Julia','Heiniger','358 College Av.','Boston') INSERT INTO ADDRESS VALUES(24,'James','Sommer','333 Upland Pl.','Olten') INSERT INTO ADDRESS VALUES(25,'Sylvia','Steel','269 College Av.','Paris') INSERT INTO ADDRESS VALUES(26,'James','Clancy','195 Upland Pl.','Oslo') INSERT INTO ADDRESS VALUES(27,'Bob','Sommer','509 College Av.','Seattle') INSERT INTO ADDRESS VALUES(28,'Susanne','White','74 - 20th Ave.','Lyon') INSERT INTO ADDRESS VALUES(29,'Andrew','Smith','254 College Av.','New York') INSERT INTO ADDRESS VALUES(30,'Bill','Sommer','362 - 20th Ave.','Olten') INSERT INTO ADDRESS VALUES(31,'Bob','Ringer','371 College Av.','Olten') INSERT INTO ADDRESS VALUES(32,'Michael','Ott','339 College Av.','Boston') INSERT INTO ADDRESS VALUES(33,'Mary','King','491 College Av.','Oslo') INSERT INTO ADDRESS VALUES(34,'Julia','May','33 Upland Pl.','Seattle') INSERT INTO ADDRESS VALUES(35,'George','Karsen','412 College Av.','Chicago') INSERT INTO ADDRESS VALUES(36,'John','Steel','276 Upland Pl.','Dallas') INSERT INTO ADDRESS VALUES(37,'Michael','Clancy','19 Seventh Av.','Dallas') INSERT INTO ADDRESS VALUES(38,'Andrew','Heiniger','347 College Av.','Lyon') INSERT INTO ADDRESS VALUES(39,'Mary','Karsen','202 College Av.','Chicago') INSERT INTO ADDRESS VALUES(40,'Susanne','Miller','440 - 20th Ave.','Dallas') INSERT INTO ADDRESS VALUES(41,'Bill','King','546 College Av.','New York') INSERT INTO ADDRESS VALUES(42,'Robert','Ott','503 Seventh Av.','Oslo') INSERT INTO ADDRESS VALUES(43,'Susanne','Smith','2 Upland Pl.','Dallas') INSERT INTO ADDRESS VALUES(44,'Sylvia','Ott','361 College Av.','New York') INSERT INTO ADDRESS VALUES(45,'Janet','May','396 Seventh Av.','Oslo') INSERT INTO ADDRESS VALUES(46,'Andrew','May','172 Seventh Av.','New York') INSERT INTO ADDRESS VALUES(47,'Janet','Fuller','445 Upland Pl.','Dallas') INSERT INTO ADDRESS VALUES(48,'Robert','White','549 Seventh Av.','San Francisco') INSERT INTO ADDRESS VALUES(49,'George','Fuller','534 - 20th Ave.','Olten') INSERT INTO PRODUCT VALUES(0,'Iron Iron',5.4) INSERT INTO PRODUCT VALUES(1,'Chair Shoe',24.8) INSERT INTO PRODUCT VALUES(2,'Telephone Clock',24.8) INSERT INTO PRODUCT VALUES(3,'Chair Chair',25.4) INSERT INTO PRODUCT VALUES(4,'Ice Tea Shoe',12.8) INSERT INTO PRODUCT VALUES(5,'Clock Clock',23.6) INSERT INTO PRODUCT VALUES(6,'Ice Tea Chair',9.8) INSERT INTO PRODUCT VALUES(7,'Telephone Shoe',8.4) INSERT INTO PRODUCT VALUES(8,'Ice Tea Clock',22.6) INSERT INTO PRODUCT VALUES(9,'Clock Telephone',17.2) INSERT INTO PRODUCT VALUES(10,'Telephone Ice Tea',20.4) INSERT INTO PRODUCT VALUES(11,'Telephone Iron',8.8) INSERT INTO PRODUCT VALUES(12,'Clock Ice Tea',16.8) INSERT INTO PRODUCT VALUES(13,'Telephone Clock',18.0) INSERT INTO PRODUCT VALUES(14,'Telephone Iron',12.4) INSERT INTO PRODUCT VALUES(15,'Ice Tea Chair',9.4) INSERT INTO PRODUCT VALUES(16,'Ice Tea Shoe',19.4) INSERT INTO PRODUCT VALUES(17,'Clock Ice Tea',22.0) INSERT INTO PRODUCT VALUES(18,'Chair Clock',17.2) INSERT INTO PRODUCT VALUES(19,'Ice Tea Ice Tea',11.0) INSERT INTO PRODUCT VALUES(20,'Ice Tea Telephone',20.0) INSERT INTO PRODUCT VALUES(21,'Chair Chair',11.4) INSERT INTO PRODUCT VALUES(22,'Iron Iron',6.6) INSERT INTO PRODUCT VALUES(23,'Shoe Chair',7.6) INSERT INTO PRODUCT VALUES(24,'Chair Shoe',7.2) INSERT INTO PRODUCT VALUES(25,'Shoe Shoe',16.2) INSERT INTO PRODUCT VALUES(26,'Shoe Shoe',25.2) INSERT INTO PRODUCT VALUES(27,'Telephone Iron',23.0) INSERT INTO PRODUCT VALUES(28,'Clock Iron',3.0) INSERT INTO PRODUCT VALUES(29,'Chair Telephone',11.2) INSERT INTO PRODUCT VALUES(30,'Shoe Iron',23.2) INSERT INTO PRODUCT VALUES(31,'Ice Tea Telephone',4.8) INSERT INTO PRODUCT VALUES(32,'Clock Iron',19.0) INSERT INTO PRODUCT VALUES(33,'Iron Chair',18.2) INSERT INTO PRODUCT VALUES(34,'Chair Iron',25.6) INSERT INTO PRODUCT VALUES(35,'Telephone Shoe',7.6) INSERT INTO PRODUCT VALUES(36,'Ice Tea Iron',3.2) INSERT INTO PRODUCT VALUES(37,'Clock Shoe',9.4) INSERT INTO PRODUCT VALUES(38,'Clock Ice Tea',21.6) INSERT INTO PRODUCT VALUES(39,'Ice Tea Shoe',15.4) INSERT INTO PRODUCT VALUES(40,'Shoe Clock',2.8) INSERT INTO PRODUCT VALUES(41,'Clock Ice Tea',20.6) INSERT INTO PRODUCT VALUES(42,'Iron Chair',19.8) INSERT INTO PRODUCT VALUES(43,'Telephone Clock',9.4) INSERT INTO PRODUCT VALUES(44,'Ice Tea Ice Tea',9.6) INSERT INTO PRODUCT VALUES(45,'Iron Ice Tea',18.0) INSERT INTO PRODUCT VALUES(46,'Ice Tea Clock',6.2) INSERT INTO PRODUCT VALUES(47,'Ice Tea Iron',17.8) INSERT INTO PRODUCT VALUES(48,'Clock Clock',21.0) INSERT INTO PRODUCT VALUES(49,'Iron Iron',2.2) INSERT INTO DOCUMENT VALUES(0,0,2607.60) INSERT INTO DOCUMENT VALUES(1,33,1610.70) INSERT INTO DOCUMENT VALUES(2,23,3789.00) INSERT INTO DOCUMENT VALUES(3,21,5974.50) INSERT INTO DOCUMENT VALUES(4,30,1953.00) INSERT INTO DOCUMENT VALUES(5,34,4182.90) INSERT INTO DOCUMENT VALUES(6,19,3340.20) INSERT INTO DOCUMENT VALUES(7,26,5328.60) INSERT INTO DOCUMENT VALUES(8,29,2675.10) INSERT INTO DOCUMENT VALUES(9,38,6982.20) INSERT INTO DOCUMENT VALUES(10,24,3274.50) INSERT INTO DOCUMENT VALUES(11,24,2532.30) INSERT INTO DOCUMENT VALUES(12,23,4578.30) INSERT INTO DOCUMENT VALUES(13,39,7001.70) INSERT INTO DOCUMENT VALUES(14,35,4940.40) INSERT INTO DOCUMENT VALUES(15,39,1027.80) INSERT INTO DOCUMENT VALUES(16,45,3657.30) INSERT INTO DOCUMENT VALUES(17,46,3776.40) INSERT INTO DOCUMENT VALUES(18,4,3772.80) INSERT INTO DOCUMENT VALUES(19,9,804.30) INSERT INTO DOCUMENT VALUES(20,19,3139.20) INSERT INTO DOCUMENT VALUES(21,8,3740.10) INSERT INTO DOCUMENT VALUES(22,40,2289.90) INSERT INTO DOCUMENT VALUES(23,36,5166.60) INSERT INTO DOCUMENT VALUES(24,15,4344.30) INSERT INTO DOCUMENT VALUES(25,31,2054.10) INSERT INTO DOCUMENT VALUES(26,27,4972.80) INSERT INTO DOCUMENT VALUES(27,24,583.50) INSERT INTO DOCUMENT VALUES(28,35,1664.40) INSERT INTO DOCUMENT VALUES(29,46,2515.50) INSERT INTO DOCUMENT VALUES(30,13,2117.40) INSERT INTO DOCUMENT VALUES(31,22,2715.90) INSERT INTO DOCUMENT VALUES(32,20,1098.60) INSERT INTO DOCUMENT VALUES(33,40,4300.20) INSERT INTO DOCUMENT VALUES(34,33,4290.60) INSERT INTO DOCUMENT VALUES(35,4,3102.60) INSERT INTO DOCUMENT VALUES(36,42,3200.10) INSERT INTO DOCUMENT VALUES(37,39,7331.10) INSERT INTO DOCUMENT VALUES(38,46,6373.80) INSERT INTO DOCUMENT VALUES(39,5,1311.60) INSERT INTO DOCUMENT VALUES(40,4,5288.40) INSERT INTO DOCUMENT VALUES(41,19,5475.60) INSERT INTO DOCUMENT VALUES(42,38,1436.40) INSERT INTO DOCUMENT VALUES(43,13,4827.60) INSERT INTO DOCUMENT VALUES(44,32,3388.20) INSERT INTO DOCUMENT VALUES(45,42,4731.00) INSERT INTO DOCUMENT VALUES(46,24,5827.20) INSERT INTO DOCUMENT VALUES(47,45,2320.80) INSERT INTO DOCUMENT VALUES(48,22,3494.70) INSERT INTO DOCUMENT VALUES(49,32,4944.30) INSERT INTO POS VALUES(0,0,7,12,12.60) INSERT INTO POS VALUES(0,1,14,19,18.60) INSERT INTO POS VALUES(0,2,47,3,26.70) INSERT INTO POS VALUES(0,3,1,9,37.20) INSERT INTO POS VALUES(0,4,47,1,26.70) INSERT INTO POS VALUES(0,5,12,15,25.20) INSERT INTO POS VALUES(0,6,16,9,29.10) INSERT INTO POS VALUES(0,7,7,10,12.60) INSERT INTO POS VALUES(0,8,0,23,8.10) INSERT INTO POS VALUES(0,9,35,4,11.40) INSERT INTO POS VALUES(0,10,4,8,19.20) INSERT INTO POS VALUES(0,11,12,4,25.20) INSERT INTO POS VALUES(0,12,1,11,37.20) INSERT INTO POS VALUES(1,0,40,8,4.20) INSERT INTO POS VALUES(1,1,0,9,8.10) INSERT INTO POS VALUES(1,2,19,6,16.50) INSERT INTO POS VALUES(1,3,38,8,32.40) INSERT INTO POS VALUES(1,4,16,16,29.10) INSERT INTO POS VALUES(1,5,25,9,24.30) INSERT INTO POS VALUES(1,6,25,19,24.30) INSERT INTO POS VALUES(2,0,4,18,19.20) INSERT INTO POS VALUES(2,1,25,3,24.30) INSERT INTO POS VALUES(2,2,11,9,13.20) INSERT INTO POS VALUES(2,3,19,13,16.50) INSERT INTO POS VALUES(2,4,38,18,32.40) INSERT INTO POS VALUES(2,5,30,4,34.80) INSERT INTO POS VALUES(2,6,43,8,14.10) INSERT INTO POS VALUES(2,7,30,5,34.80) INSERT INTO POS VALUES(2,8,39,2,23.10) INSERT INTO POS VALUES(2,9,18,7,25.80) INSERT INTO POS VALUES(2,10,49,11,3.30) INSERT INTO POS VALUES(2,11,42,21,29.70) INSERT INTO POS VALUES(2,12,21,15,17.10) INSERT INTO POS VALUES(2,13,12,1,25.20) INSERT INTO POS VALUES(2,14,48,19,31.50) INSERT INTO POS VALUES(2,15,0,18,8.10) INSERT INTO POS VALUES(2,16,36,24,4.80) INSERT INTO POS VALUES(3,0,11,21,13.20) INSERT INTO POS VALUES(3,1,1,20,37.20) INSERT INTO POS VALUES(3,2,49,3,3.30) INSERT INTO POS VALUES(3,3,0,22,8.10) INSERT INTO POS VALUES(3,4,20,12,30.00) INSERT INTO POS VALUES(3,5,30,10,34.80) INSERT INTO POS VALUES(3,6,13,18,27.00) INSERT INTO POS VALUES(3,7,26,4,37.80) INSERT INTO POS VALUES(3,8,49,9,3.30) INSERT INTO POS VALUES(3,9,29,17,16.80) INSERT INTO POS VALUES(3,10,10,17,30.60) INSERT INTO POS VALUES(3,11,7,11,12.60) INSERT INTO POS VALUES(3,12,41,22,30.90) INSERT INTO POS VALUES(3,13,41,2,30.90) INSERT INTO POS VALUES(3,14,17,22,33.00) INSERT INTO POS VALUES(3,15,23,18,11.40) INSERT INTO POS VALUES(3,16,19,11,16.50) INSERT INTO POS VALUES(3,17,30,17,34.80) INSERT INTO POS VALUES(4,0,28,9,4.50) INSERT INTO POS VALUES(4,1,35,15,11.40) INSERT INTO POS VALUES(4,2,41,23,30.90) INSERT INTO POS VALUES(4,3,23,20,11.40) INSERT INTO POS VALUES(4,4,9,18,25.80) INSERT INTO POS VALUES(4,5,37,24,14.10) INSERT INTO POS VALUES(5,0,9,5,25.80) INSERT INTO POS VALUES(5,1,9,23,25.80) INSERT INTO POS VALUES(5,2,20,18,30.00) INSERT INTO POS VALUES(5,3,24,12,10.80) INSERT INTO POS VALUES(5,4,32,14,28.50) INSERT INTO POS VALUES(5,5,46,15,9.30) INSERT INTO POS VALUES(5,6,7,9,12.60) INSERT INTO POS VALUES(5,7,2,4,37.20) INSERT INTO POS VALUES(5,8,20,3,30.00) INSERT INTO POS VALUES(5,9,37,9,14.10) INSERT INTO POS VALUES(5,10,28,18,4.50) INSERT INTO POS VALUES(5,11,38,23,32.40) INSERT INTO POS VALUES(5,12,8,15,33.90) INSERT INTO POS VALUES(5,13,18,17,25.80) INSERT INTO POS VALUES(6,0,15,20,14.10) INSERT INTO POS VALUES(6,1,38,21,32.40) INSERT INTO POS VALUES(6,2,23,8,11.40) INSERT INTO POS VALUES(6,3,30,2,34.80) INSERT INTO POS VALUES(6,4,31,20,7.20) INSERT INTO POS VALUES(6,5,14,20,18.60) INSERT INTO POS VALUES(6,6,37,22,14.10) INSERT INTO POS VALUES(6,7,26,10,37.80) INSERT INTO POS VALUES(6,8,41,19,30.90) INSERT INTO POS VALUES(6,9,19,2,16.50) INSERT INTO POS VALUES(6,10,16,13,29.10) INSERT INTO POS VALUES(6,11,44,1,14.40) INSERT INTO POS VALUES(7,0,43,16,14.10) INSERT INTO POS VALUES(7,1,23,12,11.40) INSERT INTO POS VALUES(7,2,27,17,34.50) INSERT INTO POS VALUES(7,3,30,2,34.80) INSERT INTO POS VALUES(7,4,2,13,37.20) INSERT INTO POS VALUES(7,5,24,10,10.80) INSERT INTO POS VALUES(7,6,14,4,18.60) INSERT INTO POS VALUES(7,7,2,22,37.20) INSERT INTO POS VALUES(7,8,42,19,29.70) INSERT INTO POS VALUES(7,9,9,21,25.80) INSERT INTO POS VALUES(7,10,7,1,12.60) INSERT INTO POS VALUES(7,11,19,13,16.50) INSERT INTO POS VALUES(7,12,40,16,4.20) INSERT INTO POS VALUES(7,13,32,23,28.50) INSERT INTO POS VALUES(7,14,47,14,26.70) INSERT INTO POS VALUES(7,15,24,17,10.80) INSERT INTO POS VALUES(7,16,7,12,12.60) INSERT INTO POS VALUES(7,17,40,1,4.20) INSERT INTO POS VALUES(7,18,23,5,11.40) INSERT INTO POS VALUES(8,0,34,15,38.40) INSERT INTO POS VALUES(8,1,44,16,14.40) INSERT INTO POS VALUES(8,2,11,8,13.20) INSERT INTO POS VALUES(8,3,41,16,30.90) INSERT INTO POS VALUES(8,4,15,8,14.10) INSERT INTO POS VALUES(8,5,24,18,10.80) INSERT INTO POS VALUES(8,6,15,19,14.10) INSERT INTO POS VALUES(8,7,6,5,14.70) INSERT INTO POS VALUES(8,8,38,7,32.40) INSERT INTO POS VALUES(8,9,21,23,17.10) INSERT INTO POS VALUES(9,0,45,8,27.00) INSERT INTO POS VALUES(9,1,18,21,25.80) INSERT INTO POS VALUES(9,2,29,12,16.80) INSERT INTO POS VALUES(9,3,4,14,19.20) INSERT INTO POS VALUES(9,4,36,16,4.80) INSERT INTO POS VALUES(9,5,6,2,14.70) INSERT INTO POS VALUES(9,6,18,10,25.80) INSERT INTO POS VALUES(9,7,2,22,37.20) INSERT INTO POS VALUES(9,8,24,11,10.80) INSERT INTO POS VALUES(9,9,13,6,27.00) INSERT INTO POS VALUES(9,10,38,11,32.40) INSERT INTO POS VALUES(9,11,12,16,25.20) INSERT INTO POS VALUES(9,12,25,23,24.30) INSERT INTO POS VALUES(9,13,42,13,29.70) INSERT INTO POS VALUES(9,14,15,8,14.10) INSERT INTO POS VALUES(9,15,48,23,31.50) INSERT INTO POS VALUES(9,16,24,10,10.80) INSERT INTO POS VALUES(9,17,13,17,27.00) INSERT INTO POS VALUES(9,18,3,12,38.10) INSERT INTO POS VALUES(9,19,48,23,31.50) INSERT INTO POS VALUES(10,0,20,1,30.00) INSERT INTO POS VALUES(10,1,33,17,27.30) INSERT INTO POS VALUES(10,2,7,9,12.60) INSERT INTO POS VALUES(10,3,46,1,9.30) INSERT INTO POS VALUES(10,4,10,24,30.60) INSERT INTO POS VALUES(10,5,5,24,35.40) INSERT INTO POS VALUES(10,6,18,14,25.80) INSERT INTO POS VALUES(10,7,4,13,19.20) INSERT INTO POS VALUES(10,8,22,11,9.90) INSERT INTO POS VALUES(10,9,5,10,35.40) INSERT INTO POS VALUES(11,0,45,10,27.00) INSERT INTO POS VALUES(11,1,21,21,17.10) INSERT INTO POS VALUES(11,2,0,3,8.10) INSERT INTO POS VALUES(11,3,32,21,28.50) INSERT INTO POS VALUES(11,4,47,16,26.70) INSERT INTO POS VALUES(11,5,19,2,16.50) INSERT INTO POS VALUES(11,6,0,12,8.10) INSERT INTO POS VALUES(11,7,48,22,31.50) INSERT INTO POS VALUES(11,8,20,1,30.00) INSERT INTO POS VALUES(12,0,1,24,37.20) INSERT INTO POS VALUES(12,1,41,19,30.90) INSERT INTO POS VALUES(12,2,6,5,14.70) INSERT INTO POS VALUES(12,3,0,18,8.10) INSERT INTO POS VALUES(12,4,20,11,30.00) INSERT INTO POS VALUES(12,5,37,17,14.10) INSERT INTO POS VALUES(12,6,31,15,7.20) INSERT INTO POS VALUES(12,7,48,7,31.50) INSERT INTO POS VALUES(12,8,48,2,31.50) INSERT INTO POS VALUES(12,9,25,22,24.30) INSERT INTO POS VALUES(12,10,46,19,9.30) INSERT INTO POS VALUES(12,11,28,16,4.50) INSERT INTO POS VALUES(12,12,13,12,27.00) INSERT INTO POS VALUES(12,13,36,21,4.80) INSERT INTO POS VALUES(12,14,25,11,24.30) INSERT INTO POS VALUES(12,15,22,16,9.90) INSERT INTO POS VALUES(12,16,0,9,8.10) INSERT INTO POS VALUES(12,17,31,15,7.20) INSERT INTO POS VALUES(12,18,9,4,25.80) INSERT INTO POS VALUES(13,0,16,10,29.10) INSERT INTO POS VALUES(13,1,1,1,37.20) INSERT INTO POS VALUES(13,2,13,20,27.00) INSERT INTO POS VALUES(13,3,32,2,28.50) INSERT INTO POS VALUES(13,4,26,21,37.80) INSERT INTO POS VALUES(13,5,22,19,9.90) INSERT INTO POS VALUES(13,6,19,8,16.50) INSERT INTO POS VALUES(13,7,29,24,16.80) INSERT INTO POS VALUES(13,8,48,11,31.50) INSERT INTO POS VALUES(13,9,24,10,10.80) INSERT INTO POS VALUES(13,10,45,24,27.00) INSERT INTO POS VALUES(13,11,14,3,18.60) INSERT INTO POS VALUES(13,12,17,3,33.00) INSERT INTO POS VALUES(13,13,10,20,30.60) INSERT INTO POS VALUES(13,14,1,12,37.20) INSERT INTO POS VALUES(13,15,0,20,8.10) INSERT INTO POS VALUES(13,16,22,23,9.90) INSERT INTO POS VALUES(13,17,32,18,28.50) INSERT INTO POS VALUES(13,18,0,16,8.10) INSERT INTO POS VALUES(13,19,42,18,29.70) INSERT INTO POS VALUES(13,20,5,19,35.40) INSERT INTO POS VALUES(13,21,40,1,4.20) INSERT INTO POS VALUES(14,0,42,18,29.70) INSERT INTO POS VALUES(14,1,9,22,25.80) INSERT INTO POS VALUES(14,2,15,18,14.10) INSERT INTO POS VALUES(14,3,34,11,38.40) INSERT INTO POS VALUES(14,4,41,17,30.90) INSERT INTO POS VALUES(14,5,11,8,13.20) INSERT INTO POS VALUES(14,6,26,18,37.80) INSERT INTO POS VALUES(14,7,43,4,14.10) INSERT INTO POS VALUES(14,8,23,7,11.40) INSERT INTO POS VALUES(14,9,13,16,27.00) INSERT INTO POS VALUES(14,10,44,16,14.40) INSERT INTO POS VALUES(14,11,25,15,24.30) INSERT INTO POS VALUES(14,12,4,20,19.20) INSERT INTO POS VALUES(14,13,11,23,13.20) INSERT INTO POS VALUES(15,0,17,12,33.00) INSERT INTO POS VALUES(15,1,13,21,27.00) INSERT INTO POS VALUES(15,2,24,6,10.80) INSERT INTO POS VALUES(16,0,18,15,25.80) INSERT INTO POS VALUES(16,1,36,20,4.80) INSERT INTO POS VALUES(16,2,20,15,30.00) INSERT INTO POS VALUES(16,3,0,3,8.10) INSERT INTO POS VALUES(16,4,10,24,30.60) INSERT INTO POS VALUES(16,5,11,15,13.20) INSERT INTO POS VALUES(16,6,44,7,14.40) INSERT INTO POS VALUES(16,7,8,17,33.90) INSERT INTO POS VALUES(16,8,13,17,27.00) INSERT INTO POS VALUES(16,9,11,10,13.20) INSERT INTO POS VALUES(16,10,43,8,14.10) INSERT INTO POS VALUES(16,11,24,7,10.80) INSERT INTO POS VALUES(16,12,18,2,25.80) INSERT INTO POS VALUES(16,13,20,1,30.00) INSERT INTO POS VALUES(16,14,0,19,8.10) INSERT INTO POS VALUES(16,15,12,3,25.20) INSERT INTO POS VALUES(17,0,16,8,29.10) INSERT INTO POS VALUES(17,1,19,19,16.50) INSERT INTO POS VALUES(17,2,44,11,14.40) INSERT INTO POS VALUES(17,3,24,4,10.80) INSERT INTO POS VALUES(17,4,23,2,11.40) INSERT INTO POS VALUES(17,5,44,1,14.40) INSERT INTO POS VALUES(17,6,43,6,14.10) INSERT INTO POS VALUES(17,7,6,15,14.70) INSERT INTO POS VALUES(17,8,49,8,3.30) INSERT INTO POS VALUES(17,9,8,15,33.90) INSERT INTO POS VALUES(17,10,10,12,30.60) INSERT INTO POS VALUES(17,11,45,10,27.00) INSERT INTO POS VALUES(17,12,22,16,9.90) INSERT INTO POS VALUES(17,13,41,5,30.90) INSERT INTO POS VALUES(17,14,18,2,25.80) INSERT INTO POS VALUES(17,15,35,10,11.40) INSERT INTO POS VALUES(17,16,8,16,33.90) INSERT INTO POS VALUES(17,17,7,5,12.60) INSERT INTO POS VALUES(17,18,5,9,35.40) INSERT INTO POS VALUES(17,19,46,12,9.30) INSERT INTO POS VALUES(18,0,32,1,28.50) INSERT INTO POS VALUES(18,1,33,12,27.30) INSERT INTO POS VALUES(18,2,40,12,4.20) INSERT INTO POS VALUES(18,3,19,8,16.50) INSERT INTO POS VALUES(18,4,28,6,4.50) INSERT INTO POS VALUES(18,5,15,6,14.10) INSERT INTO POS VALUES(18,6,29,4,16.80) INSERT INTO POS VALUES(18,7,15,14,14.10) INSERT INTO POS VALUES(18,8,1,24,37.20) INSERT INTO POS VALUES(18,9,2,2,37.20) INSERT INTO POS VALUES(18,10,34,18,38.40) INSERT INTO POS VALUES(18,11,30,8,34.80) INSERT INTO POS VALUES(18,12,37,12,14.10) INSERT INTO POS VALUES(18,13,14,12,18.60) INSERT INTO POS VALUES(18,14,28,20,4.50) INSERT INTO POS VALUES(18,15,44,20,14.40) INSERT INTO POS VALUES(18,16,31,12,7.20) INSERT INTO POS VALUES(18,17,8,1,33.90) INSERT INTO POS VALUES(18,18,10,1,30.60) INSERT INTO POS VALUES(19,0,12,7,25.20) INSERT INTO POS VALUES(19,1,31,2,7.20) INSERT INTO POS VALUES(19,2,4,22,19.20) INSERT INTO POS VALUES(19,3,49,23,3.30) INSERT INTO POS VALUES(19,4,36,24,4.80) INSERT INTO POS VALUES(20,0,47,15,26.70) INSERT INTO POS VALUES(20,1,29,6,16.80) INSERT INTO POS VALUES(20,2,24,22,10.80) INSERT INTO POS VALUES(20,3,25,14,24.30) INSERT INTO POS VALUES(20,4,30,13,34.80) INSERT INTO POS VALUES(20,5,8,14,33.90) INSERT INTO POS VALUES(20,6,20,2,30.00) INSERT INTO POS VALUES(20,7,9,9,25.80) INSERT INTO POS VALUES(20,8,44,18,14.40) INSERT INTO POS VALUES(20,9,12,8,25.20) INSERT INTO POS VALUES(20,10,25,11,24.30) INSERT INTO POS VALUES(20,11,15,8,14.10) INSERT INTO POS VALUES(21,0,9,10,25.80) INSERT INTO POS VALUES(21,1,38,19,32.40) INSERT INTO POS VALUES(21,2,31,17,7.20) INSERT INTO POS VALUES(21,3,30,13,34.80) INSERT INTO POS VALUES(21,4,49,22,3.30) INSERT INTO POS VALUES(21,5,27,18,34.50) INSERT INTO POS VALUES(21,6,26,7,37.80) INSERT INTO POS VALUES(21,7,8,9,33.90) INSERT INTO POS VALUES(21,8,44,19,14.40) INSERT INTO POS VALUES(21,9,35,17,11.40) INSERT INTO POS VALUES(21,10,19,14,16.50) INSERT INTO POS VALUES(21,11,20,11,30.00) INSERT INTO POS VALUES(22,0,9,6,25.80) INSERT INTO POS VALUES(22,1,30,11,34.80) INSERT INTO POS VALUES(22,2,12,20,25.20) INSERT INTO POS VALUES(22,3,22,5,9.90) INSERT INTO POS VALUES(22,4,5,21,35.40) INSERT INTO POS VALUES(22,5,24,5,10.80) INSERT INTO POS VALUES(22,6,4,11,19.20) INSERT INTO POS VALUES(22,7,21,6,17.10) INSERT INTO POS VALUES(22,8,3,2,38.10) INSERT INTO POS VALUES(22,9,23,1,11.40) INSERT INTO POS VALUES(23,0,48,22,31.50) INSERT INTO POS VALUES(23,1,26,8,37.80) INSERT INTO POS VALUES(23,2,33,18,27.30) INSERT INTO POS VALUES(23,3,40,19,4.20) INSERT INTO POS VALUES(23,4,23,19,11.40) INSERT INTO POS VALUES(23,5,32,14,28.50) INSERT INTO POS VALUES(23,6,16,1,29.10) INSERT INTO POS VALUES(23,7,39,3,23.10) INSERT INTO POS VALUES(23,8,6,17,14.70) INSERT INTO POS VALUES(23,9,20,18,30.00) INSERT INTO POS VALUES(23,10,4,18,19.20) INSERT INTO POS VALUES(23,11,41,8,30.90) INSERT INTO POS VALUES(23,12,4,17,19.20) INSERT INTO POS VALUES(23,13,14,17,18.60) INSERT INTO POS VALUES(23,14,44,2,14.40) INSERT INTO POS VALUES(23,15,13,17,27.00) INSERT INTO POS VALUES(23,16,8,11,33.90) INSERT INTO POS VALUES(24,0,43,14,14.10) INSERT INTO POS VALUES(24,1,46,18,9.30) INSERT INTO POS VALUES(24,2,38,10,32.40) INSERT INTO POS VALUES(24,3,17,23,33.00) INSERT INTO POS VALUES(24,4,15,17,14.10) INSERT INTO POS VALUES(24,5,35,16,11.40) INSERT INTO POS VALUES(24,6,40,3,4.20) INSERT INTO POS VALUES(24,7,7,13,12.60) INSERT INTO POS VALUES(24,8,5,18,35.40) INSERT INTO POS VALUES(24,9,21,8,17.10) INSERT INTO POS VALUES(24,10,27,4,34.50) INSERT INTO POS VALUES(24,11,1,4,37.20) INSERT INTO POS VALUES(24,12,0,8,8.10) INSERT INTO POS VALUES(24,13,15,21,14.10) INSERT INTO POS VALUES(24,14,1,13,37.20) INSERT INTO POS VALUES(24,15,39,17,23.10) INSERT INTO POS VALUES(25,0,5,15,35.40) INSERT INTO POS VALUES(25,1,43,13,14.10) INSERT INTO POS VALUES(25,2,13,8,27.00) INSERT INTO POS VALUES(25,3,19,4,16.50) INSERT INTO POS VALUES(25,4,47,10,26.70) INSERT INTO POS VALUES(25,5,10,5,30.60) INSERT INTO POS VALUES(25,6,21,18,17.10) INSERT INTO POS VALUES(25,7,16,8,29.10) INSERT INTO POS VALUES(25,8,38,3,32.40) INSERT INTO POS VALUES(26,0,42,16,29.70) INSERT INTO POS VALUES(26,1,43,21,14.10) INSERT INTO POS VALUES(26,2,33,7,27.30) INSERT INTO POS VALUES(26,3,16,3,29.10) INSERT INTO POS VALUES(26,4,46,7,9.30) INSERT INTO POS VALUES(26,5,38,4,32.40) INSERT INTO POS VALUES(26,6,7,23,12.60) INSERT INTO POS VALUES(26,7,4,16,19.20) INSERT INTO POS VALUES(26,8,40,13,4.20) INSERT INTO POS VALUES(26,9,1,23,37.20) INSERT INTO POS VALUES(26,10,34,16,38.40) INSERT INTO POS VALUES(26,11,18,3,25.80) INSERT INTO POS VALUES(26,12,27,20,34.50) INSERT INTO POS VALUES(26,13,13,10,27.00) INSERT INTO POS VALUES(26,14,26,6,37.80) INSERT INTO POS VALUES(26,15,8,6,33.90) INSERT INTO POS VALUES(26,16,30,4,34.80) INSERT INTO POS VALUES(27,0,24,15,10.80) INSERT INTO POS VALUES(27,1,45,15,27.00) INSERT INTO POS VALUES(27,2,19,1,16.50) INSERT INTO POS VALUES(28,0,35,13,11.40) INSERT INTO POS VALUES(28,1,15,13,14.10) INSERT INTO POS VALUES(28,2,44,22,14.40) INSERT INTO POS VALUES(28,3,6,3,14.70) INSERT INTO POS VALUES(28,4,45,17,27.00) INSERT INTO POS VALUES(28,5,49,4,3.30) INSERT INTO POS VALUES(28,6,33,16,27.30) INSERT INTO POS VALUES(28,7,28,8,4.50) INSERT INTO POS VALUES(28,8,28,6,4.50) INSERT INTO POS VALUES(29,0,33,17,27.30) INSERT INTO POS VALUES(29,1,38,12,32.40) INSERT INTO POS VALUES(29,2,17,23,33.00) INSERT INTO POS VALUES(29,3,7,21,12.60) INSERT INTO POS VALUES(29,4,4,7,19.20) INSERT INTO POS VALUES(29,5,31,13,7.20) INSERT INTO POS VALUES(29,6,4,16,19.20) INSERT INTO POS VALUES(29,7,5,1,35.40) INSERT INTO POS VALUES(29,8,35,6,11.40) INSERT INTO POS VALUES(30,0,14,7,18.60) INSERT INTO POS VALUES(30,1,16,19,29.10) INSERT INTO POS VALUES(30,2,10,18,30.60) INSERT INTO POS VALUES(30,3,33,2,27.30) INSERT INTO POS VALUES(30,4,34,2,38.40) INSERT INTO POS VALUES(30,5,43,23,14.10) INSERT INTO POS VALUES(30,6,14,23,18.60) INSERT INTO POS VALUES(31,0,33,10,27.30) INSERT INTO POS VALUES(31,1,4,23,19.20) INSERT INTO POS VALUES(31,2,4,3,19.20) INSERT INTO POS VALUES(31,3,12,10,25.20) INSERT INTO POS VALUES(31,4,8,14,33.90) INSERT INTO POS VALUES(31,5,1,4,37.20) INSERT INTO POS VALUES(31,6,26,16,37.80) INSERT INTO POS VALUES(31,7,38,3,32.40) INSERT INTO POS VALUES(31,8,7,5,12.60) INSERT INTO POS VALUES(31,9,14,15,18.60) INSERT INTO POS VALUES(31,10,0,3,8.10) INSERT INTO POS VALUES(32,0,35,11,11.40) INSERT INTO POS VALUES(32,1,30,13,34.80) INSERT INTO POS VALUES(32,2,1,14,37.20) INSERT INTO POS VALUES(33,0,36,5,4.80) INSERT INTO POS VALUES(33,1,10,21,30.60) INSERT INTO POS VALUES(33,2,36,16,4.80) INSERT INTO POS VALUES(33,3,48,1,31.50) INSERT INTO POS VALUES(33,4,24,1,10.80) INSERT INTO POS VALUES(33,5,8,11,33.90) INSERT INTO POS VALUES(33,6,17,16,33.00) INSERT INTO POS VALUES(33,7,43,10,14.10) INSERT INTO POS VALUES(33,8,3,15,38.10) INSERT INTO POS VALUES(33,9,29,5,16.80) INSERT INTO POS VALUES(33,10,24,9,10.80) INSERT INTO POS VALUES(33,11,5,7,35.40) INSERT INTO POS VALUES(33,12,16,23,29.10) INSERT INTO POS VALUES(33,13,25,16,24.30) INSERT INTO POS VALUES(33,14,44,13,14.40) INSERT INTO POS VALUES(33,15,38,7,32.40) INSERT INTO POS VALUES(34,0,10,22,30.60) INSERT INTO POS VALUES(34,1,4,3,19.20) INSERT INTO POS VALUES(34,2,28,22,4.50) INSERT INTO POS VALUES(34,3,44,15,14.40) INSERT INTO POS VALUES(34,4,27,1,34.50) INSERT INTO POS VALUES(34,5,45,13,27.00) INSERT INTO POS VALUES(34,6,32,7,28.50) INSERT INTO POS VALUES(34,7,21,22,17.10) INSERT INTO POS VALUES(34,8,3,1,38.10) INSERT INTO POS VALUES(34,9,8,17,33.90) INSERT INTO POS VALUES(34,10,41,16,30.90) INSERT INTO POS VALUES(34,11,4,17,19.20) INSERT INTO POS VALUES(34,12,43,21,14.10) INSERT INTO POS VALUES(34,13,30,14,34.80) INSERT INTO POS VALUES(34,14,46,7,9.30) INSERT INTO POS VALUES(35,0,20,17,30.00) INSERT INTO POS VALUES(35,1,3,9,38.10) INSERT INTO POS VALUES(35,2,14,4,18.60) INSERT INTO POS VALUES(35,3,27,10,34.50) INSERT INTO POS VALUES(35,4,14,17,18.60) INSERT INTO POS VALUES(35,5,33,5,27.30) INSERT INTO POS VALUES(35,6,5,4,35.40) INSERT INTO POS VALUES(35,7,22,15,9.90) INSERT INTO POS VALUES(35,8,0,1,8.10) INSERT INTO POS VALUES(35,9,19,1,16.50) INSERT INTO POS VALUES(35,10,17,11,33.00) INSERT INTO POS VALUES(35,11,44,9,14.40) INSERT INTO POS VALUES(35,12,7,23,12.60) INSERT INTO POS VALUES(35,13,19,17,16.50) INSERT INTO POS VALUES(36,0,18,13,25.80) INSERT INTO POS VALUES(36,1,15,23,14.10) INSERT INTO POS VALUES(36,2,1,6,37.20) INSERT INTO POS VALUES(36,3,10,8,30.60) INSERT INTO POS VALUES(36,4,40,5,4.20) INSERT INTO POS VALUES(36,5,25,8,24.30) INSERT INTO POS VALUES(36,6,39,20,23.10) INSERT INTO POS VALUES(36,7,39,19,23.10) INSERT INTO POS VALUES(36,8,4,21,19.20) INSERT INTO POS VALUES(36,9,31,18,7.20) INSERT INTO POS VALUES(36,10,47,11,26.70) INSERT INTO POS VALUES(36,11,44,9,14.40) INSERT INTO POS VALUES(37,0,41,24,30.90) INSERT INTO POS VALUES(37,1,15,20,14.10) INSERT INTO POS VALUES(37,2,36,8,4.80) INSERT INTO POS VALUES(37,3,26,7,37.80) INSERT INTO POS VALUES(37,4,13,20,27.00) INSERT INTO POS VALUES(37,5,1,14,37.20) INSERT INTO POS VALUES(37,6,34,12,38.40) INSERT INTO POS VALUES(37,7,24,19,10.80) INSERT INTO POS VALUES(37,8,46,9,9.30) INSERT INTO POS VALUES(37,9,47,16,26.70) INSERT INTO POS VALUES(37,10,1,18,37.20) INSERT INTO POS VALUES(37,11,30,5,34.80) INSERT INTO POS VALUES(37,12,24,23,10.80) INSERT INTO POS VALUES(37,13,32,3,28.50) INSERT INTO POS VALUES(37,14,12,3,25.20) INSERT INTO POS VALUES(37,15,32,12,28.50) INSERT INTO POS VALUES(37,16,27,8,34.50) INSERT INTO POS VALUES(37,17,38,18,32.40) INSERT INTO POS VALUES(37,18,26,22,37.80) INSERT INTO POS VALUES(37,19,19,20,16.50) INSERT INTO POS VALUES(37,20,14,1,18.60) INSERT INTO POS VALUES(37,21,6,9,14.70) INSERT INTO POS VALUES(38,0,48,14,31.50) INSERT INTO POS VALUES(38,1,45,13,27.00) INSERT INTO POS VALUES(38,2,4,8,19.20) INSERT INTO POS VALUES(38,3,27,19,34.50) INSERT INTO POS VALUES(38,4,45,14,27.00) INSERT INTO POS VALUES(38,5,48,17,31.50) INSERT INTO POS VALUES(38,6,5,19,35.40) INSERT INTO POS VALUES(38,7,15,1,14.10) INSERT INTO POS VALUES(38,8,40,10,4.20) INSERT INTO POS VALUES(38,9,27,20,34.50) INSERT INTO POS VALUES(38,10,4,18,19.20) INSERT INTO POS VALUES(38,11,19,18,16.50) INSERT INTO POS VALUES(38,12,1,18,37.20) INSERT INTO POS VALUES(38,13,8,7,33.90) INSERT INTO POS VALUES(38,14,20,7,30.00) INSERT INTO POS VALUES(38,15,47,10,26.70) INSERT INTO POS VALUES(38,16,40,18,4.20) INSERT INTO POS VALUES(38,17,32,4,28.50) INSERT INTO POS VALUES(38,18,28,20,4.50) INSERT INTO POS VALUES(38,19,4,7,19.20) INSERT INTO POS VALUES(39,0,10,12,30.60) INSERT INTO POS VALUES(39,1,24,6,10.80) INSERT INTO POS VALUES(39,2,39,16,23.10) INSERT INTO POS VALUES(39,3,20,17,30.00) INSERT INTO POS VALUES(40,0,46,24,9.30) INSERT INTO POS VALUES(40,1,45,24,27.00) INSERT INTO POS VALUES(40,2,4,5,19.20) INSERT INTO POS VALUES(40,3,26,10,37.80) INSERT INTO POS VALUES(40,4,18,13,25.80) INSERT INTO POS VALUES(40,5,32,18,28.50) INSERT INTO POS VALUES(40,6,28,12,4.50) INSERT INTO POS VALUES(40,7,31,1,7.20) INSERT INTO POS VALUES(40,8,11,4,13.20) INSERT INTO POS VALUES(40,9,40,17,4.20) INSERT INTO POS VALUES(40,10,6,11,14.70) INSERT INTO POS VALUES(40,11,27,2,34.50) INSERT INTO POS VALUES(40,12,35,13,11.40) INSERT INTO POS VALUES(40,13,6,8,14.70) INSERT INTO POS VALUES(40,14,4,24,19.20) INSERT INTO POS VALUES(40,15,22,12,9.90) INSERT INTO POS VALUES(40,16,27,16,34.50) INSERT INTO POS VALUES(40,17,4,20,19.20) INSERT INTO POS VALUES(40,18,33,11,27.30) INSERT INTO POS VALUES(40,19,7,23,12.60) INSERT INTO POS VALUES(40,20,4,16,19.20) INSERT INTO POS VALUES(41,0,5,24,35.40) INSERT INTO POS VALUES(41,1,47,19,26.70) INSERT INTO POS VALUES(41,2,36,2,4.80) INSERT INTO POS VALUES(41,3,29,20,16.80) INSERT INTO POS VALUES(41,4,16,22,29.10) INSERT INTO POS VALUES(41,5,9,21,25.80) INSERT INTO POS VALUES(41,6,17,11,33.00) INSERT INTO POS VALUES(41,7,22,18,9.90) INSERT INTO POS VALUES(41,8,9,22,25.80) INSERT INTO POS VALUES(41,9,26,21,37.80) INSERT INTO POS VALUES(41,10,24,20,10.80) INSERT INTO POS VALUES(41,11,48,15,31.50) INSERT INTO POS VALUES(42,0,48,9,31.50) INSERT INTO POS VALUES(42,1,18,21,25.80) INSERT INTO POS VALUES(42,2,40,19,4.20) INSERT INTO POS VALUES(42,3,40,14,4.20) INSERT INTO POS VALUES(42,4,48,15,31.50) INSERT INTO POS VALUES(43,0,15,22,14.10) INSERT INTO POS VALUES(43,1,18,19,25.80) INSERT INTO POS VALUES(43,2,2,15,37.20) INSERT INTO POS VALUES(43,3,6,18,14.70) INSERT INTO POS VALUES(43,4,32,22,28.50) INSERT INTO POS VALUES(43,5,33,6,27.30) INSERT INTO POS VALUES(43,6,24,1,10.80) INSERT INTO POS VALUES(43,7,11,15,13.20) INSERT INTO POS VALUES(43,8,44,8,14.40) INSERT INTO POS VALUES(43,9,7,23,12.60) INSERT INTO POS VALUES(43,10,35,1,11.40) INSERT INTO POS VALUES(43,11,49,23,3.30) INSERT INTO POS VALUES(43,12,40,24,4.20) INSERT INTO POS VALUES(43,13,44,22,14.40) INSERT INTO POS VALUES(43,14,3,18,38.10) INSERT INTO POS VALUES(43,15,48,7,31.50) INSERT INTO POS VALUES(43,16,38,12,32.40) INSERT INTO POS VALUES(44,0,33,20,27.30) INSERT INTO POS VALUES(44,1,34,17,38.40) INSERT INTO POS VALUES(44,2,17,14,33.00) INSERT INTO POS VALUES(44,3,3,14,38.10) INSERT INTO POS VALUES(44,4,12,3,25.20) INSERT INTO POS VALUES(44,5,41,22,30.90) INSERT INTO POS VALUES(44,6,14,15,18.60) INSERT INTO POS VALUES(44,7,49,17,3.30) INSERT INTO POS VALUES(44,8,28,23,4.50) INSERT INTO POS VALUES(45,0,44,6,14.40) INSERT INTO POS VALUES(45,1,11,6,13.20) INSERT INTO POS VALUES(45,2,46,8,9.30) INSERT INTO POS VALUES(45,3,14,11,18.60) INSERT INTO POS VALUES(45,4,3,14,38.10) INSERT INTO POS VALUES(45,5,45,17,27.00) INSERT INTO POS VALUES(45,6,39,5,23.10) INSERT INTO POS VALUES(45,7,6,24,14.70) INSERT INTO POS VALUES(45,8,9,2,25.80) INSERT INTO POS VALUES(45,9,26,18,37.80) INSERT INTO POS VALUES(45,10,41,24,30.90) INSERT INTO POS VALUES(45,11,31,22,7.20) INSERT INTO POS VALUES(45,12,32,13,28.50) INSERT INTO POS VALUES(45,13,47,8,26.70) INSERT INTO POS VALUES(45,14,3,16,38.10) INSERT INTO POS VALUES(46,0,5,21,35.40) INSERT INTO POS VALUES(46,1,12,24,25.20) INSERT INTO POS VALUES(46,2,30,14,34.80) INSERT INTO POS VALUES(46,3,21,19,17.10) INSERT INTO POS VALUES(46,4,17,5,33.00) INSERT INTO POS VALUES(46,5,25,9,24.30) INSERT INTO POS VALUES(46,6,41,18,30.90) INSERT INTO POS VALUES(46,7,49,9,3.30) INSERT INTO POS VALUES(46,8,8,22,33.90) INSERT INTO POS VALUES(46,9,7,4,12.60) INSERT INTO POS VALUES(46,10,11,24,13.20) INSERT INTO POS VALUES(46,11,1,4,37.20) INSERT INTO POS VALUES(46,12,21,24,17.10) INSERT INTO POS VALUES(46,13,36,20,4.80) INSERT INTO POS VALUES(46,14,24,10,10.80) INSERT INTO POS VALUES(46,15,40,11,4.20) INSERT INTO POS VALUES(46,16,46,21,9.30) INSERT INTO POS VALUES(46,17,12,23,25.20) INSERT INTO POS VALUES(47,0,23,15,11.40) INSERT INTO POS VALUES(47,1,23,13,11.40) INSERT INTO POS VALUES(47,2,17,6,33.00) INSERT INTO POS VALUES(47,3,1,4,37.20) INSERT INTO POS VALUES(47,4,15,1,14.10) INSERT INTO POS VALUES(47,5,40,8,4.20) INSERT INTO POS VALUES(47,6,8,10,33.90) INSERT INTO POS VALUES(47,7,28,14,4.50) INSERT INTO POS VALUES(47,8,16,2,29.10) INSERT INTO POS VALUES(47,9,32,9,28.50) INSERT INTO POS VALUES(47,10,45,2,27.00) INSERT INTO POS VALUES(47,11,35,10,11.40) INSERT INTO POS VALUES(47,12,12,20,25.20) INSERT INTO POS VALUES(47,13,33,8,27.30) INSERT INTO POS VALUES(48,0,6,23,14.70) INSERT INTO POS VALUES(48,1,26,23,37.80) INSERT INTO POS VALUES(48,2,23,10,11.40) INSERT INTO POS VALUES(48,3,10,2,30.60) INSERT INTO POS VALUES(48,4,48,4,31.50) INSERT INTO POS VALUES(48,5,24,16,10.80) INSERT INTO POS VALUES(48,6,11,17,13.20) INSERT INTO POS VALUES(48,7,30,19,34.80) INSERT INTO POS VALUES(48,8,5,12,35.40) INSERT INTO POS VALUES(48,9,35,17,11.40) INSERT INTO POS VALUES(48,10,41,10,30.90) INSERT INTO POS VALUES(49,0,18,6,25.80) INSERT INTO POS VALUES(49,1,22,16,9.90) INSERT INTO POS VALUES(49,2,29,6,16.80) INSERT INTO POS VALUES(49,3,17,19,33.00) INSERT INTO POS VALUES(49,4,47,14,26.70) INSERT INTO POS VALUES(49,5,16,1,29.10) INSERT INTO POS VALUES(49,6,29,15,16.80) INSERT INTO POS VALUES(49,7,6,21,14.70) INSERT INTO POS VALUES(49,8,48,24,31.50) INSERT INTO POS VALUES(49,9,7,24,12.60) INSERT INTO POS VALUES(49,10,30,16,34.80) INSERT INTO POS VALUES(49,11,40,15,4.20) INSERT INTO POS VALUES(49,12,21,17,17.10) INSERT INTO POS VALUES(49,13,6,22,14.70) INSERT INTO POS VALUES(49,14,23,5,11.40) INSERT INTO POS VALUES(49,15,19,24,16.50) INSERT INTO POS VALUES(49,16,24,18,10.80) CREATE VIEW DOC_ADDR AS SELECT D.ID,D.TOTAL,A.CITY FROM DOCUMENT D, ADDRESS A WHERE D.ADDRESSID=A.ID AND A.ID < 10 /*c88*/SELECT * FROM DOC_ADDR D, POS P WHERE P.DOCUMENTID = D.ID hsqldb-1.8.0.10.orig/testrun/hsqldb/TestSelfCasewhen.txt0000644000175000017500000000464610405021230021545 0ustar renerene-- TESTS FOR CASE AND SIMILAR OPERATIONS -- drop table testcase if exists; create table testcase(id integer, data varchar(10), filler varchar(10)); insert into testcase values(100,'xxxx',null); insert into testcase values(200,'yyyy',null); /*u1*/insert into testcase values(300,null,null); /*c2*/select id from testcase where data is not null; /*r300*/select id from testcase where data is null; /*rNULLVALUE*/select ifnull(data,'NULLVALUE') from testcase where data is null; /*rNULLVALUE*/select case data when 'xxxx' then 'X' else 'NULLVALUE' end from testcase where data is null; SELECT CASE data WHEN 'xxxx' THEN 'X' ELSE (CASE data WHEN 'yyyy' THEN 'Y' ELSE (CASE data WHEN 'zzzz' THEN 'Z' ELSE 'NOTFOUND' END) END) END FROM testcase; SELECT CASE data WHEN 'xxxx' THEN 'X' WHEN 'yyyy' THEN 'Y' WHEN 'zzzz' THEN 'Z' ELSE 'NOTFOUND' END FROM testcase; /*rALLNULL*/SELECT COALESCE (filler, data, 'ALLNULL') FROM testcase WHERE id = 300; /*r600.0*/select cast (sum(id) as double) from testcase; /*r600*/select coalesce(sum(id), 0) from testcase; /*r600.0*/select abs(coalesce(sum(id), 0)) from testcase; drop table testcase2 if exists; create table testcase2(id integer, data varchar(10), filler varchar(10), datecol date); /*rNULL*/select cast (sum(id) as double) from testcase2; /*r0*/select coalesce(sum(id), 0) from testcase2; /*r0.0*/select abs(coalesce(sum(id), 0)) from testcase2; /*R2005-10-25*/select coalesce(datecol, '2005-10-25') from testcase2; drop table test if exists; create table test (sel int, name1 varchar(3), name2 varchar(3)); insert into test (sel, name1, name2) values (0, 'foo', 'bar') insert into test (sel, name1, name2) values (1, 'baz', 'foo') insert into test (sel, name1, name2) values (1, 'foo', 'qux') select coalesce(a.name1, a.name2) as name,count(a.sel) as counter from test a group by coalesce(a.name1, a.name2) select case when a.sel=1 then a.name2 else a.name1 end as name, count(a.name1) as counter from test a group by case when a.sel=1 then a.name2 else a.name1 end -- nested expressions create table single (c char); select case c when 'X' then 1 else 2 end from single; insert into single values('X'); select case c when 'X' then 1 else 2 end from single; insert into single values(null); /*r X Y */select ifnull(c,'Y') from single /*r X Y */select coalesce(c,'Y') from single /*e*/select coalesce() from single /*e*/select coalesce(c) from single /*e*/select ifnull() from single /*e*/select ifnull(c) from single hsqldb-1.8.0.10.orig/testrun/hsqldb/TestSelfSchemaPersistA1.txt0000644000175000017500000004634410240556211022756 0ustar renerene-- CREATE AND INITIALIZE OBJECTS -- This CREATES the schema-specific objects to be used for -- schema-specific persistence tests. -- (See the *C[12].txt scripts for similar tests of ALTER comands (which -- this script purposefully omits). -- ****************************** MEM Tables --DROP TABLE nosuch; DROP TABLE tblt1 IF exists; DROP TABLE tblt2 IF exists; DROP TABLE tblt3 IF exists; DROP TABLE tblt4 IF exists; DROP TABLE tblt101 IF exists; DROP TABLE tblj1 IF exists; /*u0*/CREATE TABLE tblt1 (i int); /*u0*/CREATE TABLE public.tblt2 (i int); /*u0*/CREATE TABLE tblt3 (i int); /*u0*/CREATE TABLE tblj1 (i int, vc varchar(10)); -- For testing Joins /*e*/CREATE TABLE information_schema.tblt101 (i int); /*e*/CREATE TABLE tblt1 (i int); -- Create existing object /*e*/CREATE TABLE public.tblt1 (i int); -- Create existing object /*e*/CREATE TABLE information_schema.system_users (i int); -- Existing object /*e*/INSERT INTO other.tblt1 values(0); /*e*/INSERT INTO information_schema.tblt1 values(1); /*u1*/INSERT INTO tblt1 values(0); /*u1*/INSERT INTO public.tblt1 values(100); -- Test one update that will be persisted (most update tests won't be) /*u1*/UPDATE public.tblt1 set i = 1 WHERE i = 100; /*u1*/INSERT INTO tblj1 values(1, 'one'); /*u1*/SELECT * INTO public.tblt4 FROM public.tblt1 WHERE i = 0; /*c1*/SELECT * FROM public.tblt4; -- ****************************** CACH Tables --DROP TABLE nosuch; DROP TABLE ctblt1 IF exists; DROP TABLE ctblt2 IF exists; DROP TABLE ctblt3 IF exists; DROP TABLE ctblt4 IF exists; DROP TABLE ctblt101 IF exists; DROP TABLE tblj1 IF exists; /*u0*/CREATE CACHED TABLE ctblt1 (i int); /*u0*/CREATE CACHED TABLE public.ctblt2 (i int); /*u0*/CREATE CACHED TABLE ctblt3 (i int); /*u0*/CREATE CACHED TABLE tblj1 (i int, vc varchar(10)); -- For testing Joins /*e*/CREATE CACHED TABLE information_schema.ctblt101 (i int); /*e*/CREATE CACHED TABLE ctblt1 (i int); -- Create existing object /*e*/CREATE CACHED TABLE public.ctblt1 (i int); -- Create existing object /*e*/CREATE CACHED TABLE information_schema.system_users (i int); -- Existing object /*e*/INSERT INTO other.ctblt1 values(0); /*e*/INSERT INTO information_schema.ctblt1 values(1); /*u1*/INSERT INTO ctblt1 values(0); /*u1*/INSERT INTO public.ctblt1 values(100); -- Test one update that will be persisted (most update tests won't be) /*u1*/UPDATE public.ctblt1 set i = 1 WHERE i = 100; /*u1*/INSERT INTO tblj1 values(1, 'one'); /*u1*/SELECT * INTO public.ctblt4 FROM public.ctblt1 WHERE i = 0; /*c1*/SELECT * FROM public.ctblt4; -- ****************************** Views DROP VIEW vwv1 IF exists; DROP VIEW vwv2 IF exists; DROP VIEW vwv3 IF exists; DROP VIEW vwv4 IF exists; DROP VIEW vwv5 IF exists; DROP VIEW vwv6 IF exists; DROP VIEW vwv7 IF exists; DROP VIEW vwv8 IF exists; DROP VIEW vwv9 IF exists; DROP VIEW vwv10 IF exists; DROP VIEW vwv11 IF exists; DROP VIEW vwv12 IF exists; DROP VIEW vwv13 IF exists; DROP VIEW vwv14 IF exists; DROP VIEW vwv15 IF exists; DROP VIEW vwv16 IF exists; DROP VIEW vwv17 IF exists; DROP VIEW vwv18 IF exists; DROP VIEW vwv19 IF exists; DROP VIEW vwv20 IF exists; DROP VIEW vwv21 IF exists; DROP VIEW vwv22 IF exists; DROP VIEW vwv23 IF exists; DROP VIEW vwv24 IF exists; DROP VIEW vwv25 IF exists; DROP VIEW vwv26 IF exists; DROP VIEW vwv101 IF exists; DROP TABLE vwt1 IF exists; DROP TABLE vwt2 IF exists; DROP TABLE vwj1 IF exists; CREATE TABLE vwt1 (i int); CREATE TABLE vwj1 (i int, vc varchar(10)); INSERT INTO vwt1 values(0); INSERT INTO vwt1 values(1); INSERT INTO vwj1 values(1, 'one'); /*e*/CREATE VIEW information_schema.vwv101 AS SELECT * FROM information_schema.system_users; /*e*/CREATE VIEW information_schema.vwv101 AS SELECT * FROM vwt1; -- I think we prohibit ANY manual creation of objects in information_schema. /*e*/CREATE VIEW information_schema.vwv4 AS SELECT * FROM public.vwt1; /*e*/CREATE VIEW vwv101 AS SELECT * FROM other.vwt1; /*e*/CREATE VIEW public.vwv101 AS SELECT * FROM other.vwt1; /*e*/CREATE VIEW other.vwv101 AS SELECT * FROM information_schema.system_users, vwj1 WHERE user = vc; /*e*/CREATE VIEW other.vwv101 AS SELECT * FROM information_schema.system_users, public.vwj1 WHERE user = vc; /*e*/CREATE VIEW other.vwv101 AS SELECT * FROM information_schema.system_users, vwj1 WHERE information_schema.user = vc; /*e*/CREATE VIEW other.vwv101 AS SELECT * FROM information_schema.system_users, vwj1 WHERE information_schema.user = public.vc; /*e*/CREATE VIEW information_schema.vwv101 AS SELECT * FROM information_schema.system_users, vwj1 WHERE user = vc; /*e*/CREATE VIEW information_schema.vwv101 AS SELECT * FROM information_schema.system_users, public.vwj1 WHERE user = vc; /*e*/CREATE VIEW information_schema.vwv101 AS SELECT * FROM information_schema.system_users, vwj1 WHERE information_schema.user = vc; /*e*/CREATE VIEW information_schema.vwv101 AS SELECT * FROM information_schema.system_users, vwj1 WHERE information_schema.user = public.vc; /*e*/CREATE VIEW vwv101 AS SELECT * FROM system_users, vwj1 WHERE user = vc; /*e*/CREATE VIEW vwv101 AS SELECT * FROM information_schema.system_users, information_schema.vwj1 WHERE user = vc; /*e*/CREATE VIEW vwv101 AS SELECT * FROM information_schema.system_users, vwj1 WHERE other.user = vc; /*e*/CREATE VIEW vwv101 AS SELECT * FROM information_schema.system_users, vwj1 WHERE public.user = public.vc; /*u0*/CREATE VIEW vwv1 AS SELECT * FROM vwt1; /*e*/CREATE VIEW public.vwv1 AS SELECT * FROM vwt1; -- Create existing object /*e*/CREATE VIEW public.vwv1 AS SELECT * FROM public.vwt1; -- Existing object /*u0*/CREATE VIEW public.vwv2 AS SELECT * FROM vwt1; /*u0*/CREATE VIEW public.vwv3 AS SELECT * FROM public.vwt1; /*u0*/CREATE VIEW public.vwv4 AS SELECT * FROM vwt1 WHERE i = 0; /*u0*/CREATE VIEW public.vwv5 AS SELECT * FROM vwt1 WHERE i < 1; /*u0*/CREATE VIEW public.vwv6 AS SELECT * FROM information_schema.system_users WHERE user = 'SA'; /*u0*/CREATE VIEW vwv7 AS SELECT * FROM information_schema.system_users; /*u0*/CREATE VIEW vwv8 AS SELECT * FROM information_schema.system_users WHERE user = 'SA'; /*u0*/CREATE VIEW vwv9 AS SELECT * FROM information_schema.system_users, vwj1 WHERE user = vc; /*u0*/CREATE VIEW vwv10 AS SELECT * FROM information_schema.system_users, public.vwj1 WHERE user = vc; /*u0*/CREATE VIEW vwv11 AS SELECT * FROM information_schema.system_users, vwj1 WHERE system_users.user = vc; /*u0*/CREATE VIEW vwv12 AS SELECT * FROM information_schema.system_users, vwj1 WHERE system_users.user = vwj1.vc; /*u0*/CREATE VIEW public.vwv13 AS SELECT * FROM information_schema.system_users, vwj1 WHERE user = vc; /*u0*/CREATE VIEW public.vwv14 AS SELECT * FROM information_schema.system_users, public.vwj1 WHERE user = vc; /*u0*/CREATE VIEW public.vwv15 AS SELECT * FROM information_schema.system_users, vwj1 WHERE system_users.user = vc; /*u0*/CREATE VIEW public.vwv16 AS SELECT * FROM information_schema.system_users, public.vwj1 WHERE system_users.user = vwj1.vc; /*u0*/CREATE VIEW vwv17 AS SELECT * FROM information_schema.system_users, vwj1 WHERE user = vc; /*u0*/CREATE VIEW vwv18 AS SELECT * FROM information_schema.system_users, public.vwj1 WHERE user = vc; /*u0*/CREATE VIEW vwv19 (v1, v2, v3) AS SELECT * FROM vwt1, vwj1 WHERE vwt1.i = vwj1.i; /*u0*/CREATE VIEW vwv20 (v1, v2, v3) AS SELECT * FROM public.vwt1, public.vwj1 WHERE vwt1.i = vwj1.i; /*u0*/CREATE VIEW vwv21 (v1, v2, v3) AS SELECT * FROM public.vwt1, vwj1 WHERE vwt1.i = vwj1.i; /*u0*/CREATE VIEW vwv22 (v1, v2, v3) AS SELECT * FROM vwt1, public.vwj1 WHERE vwt1.i = vwj1.i; /*u0*/CREATE VIEW public.vwv23 (v1, v2, v3) AS SELECT * FROM vwt1, vwj1 WHERE vwt1.i = vwj1.i; /*u0*/CREATE VIEW public.vwv24 (v1, v2, v3) AS SELECT * FROM public.vwt1, public.vwj1 WHERE vwt1.i = vwj1.i; /*u0*/CREATE VIEW public.vwv25 (v1, v2, v3) AS SELECT * FROM public.vwt1, vwj1 WHERE vwt1.i = vwj1.i; /*u0*/CREATE VIEW public.vwv26 (v1, v2, v3) AS SELECT * FROM vwt1, public.vwj1 WHERE vwt1.i = vwj1.i; /*u0*/CREATE VIEW vwv28 AS SELECT * FROM vwt1 WHERE i in (0, 1, 11, 12); /*u0*/CREATE VIEW public.vwv29 AS SELECT * FROM vwt1 WHERE i < 1; /*u0*/CREATE VIEW vwv30 AS SELECT * FROM vwt1 WHERE vwt1.i = (SELECT i FROM vwj1); /*u0*/CREATE VIEW vwv31 AS SELECT * FROM vwt1 WHERE vwt1.i in (SELECT i FROM vwj1); /*u0*/CREATE VIEW vwv32 AS SELECT * FROM vwt1 WHERE vwt1.i = (SELECT i FROM vwj1 WHERE i = 0); /*u0*/CREATE VIEW vwv33 AS SELECT * FROM public.vwt1 WHERE vwt1.i = (SELECT i FROM vwj1); /*u0*/CREATE VIEW PUBLIC.vwv34 AS SELECT * FROM public.vwt1 WHERE vwt1.i in (SELECT i FROM vwj1); /*u0*/CREATE VIEW PUBLIC.vwv35 AS SELECT * FROM public.vwt1 WHERE vwt1.i = (SELECT i FROM vwj1 WHERE i = 0); /*u0*/CREATE VIEW PUBLIC.vwv36 AS SELECT * FROM vwt1 WHERE vwt1.i = (SELECT i FROM public.vwj1); /*u0*/CREATE VIEW PUBLIC.vwv37 AS SELECT * FROM vwt1 WHERE vwt1.i in (SELECT i FROM public.vwj1); /*u0*/CREATE VIEW PUBLIC.vwv38 AS SELECT * FROM vwt1 WHERE vwt1.i = (SELECT i FROM public.vwj1 WHERE i = 1); /*u0*/CREATE VIEW PUBLIC.vwv39 AS SELECT * FROM vwt1 WHERE vwt1.i = (SELECT vwj1.i FROM public.vwj1); /*u0*/CREATE VIEW PUBLIC.vwv40 AS SELECT * FROM vwt1 WHERE vwt1.i in (SELECT vwj1.i FROM vwj1); /*u0*/CREATE VIEW PUBLIC.vwv41 AS SELECT * FROM vwt1 WHERE vwt1.i = (SELECT vwj1.i FROM vwj1 WHERE i = 1); /*u0*/CREATE VIEW PUBLIC.vwv42 AS SELECT * FROM vwt1 WHERE vwt1.i = (SELECT i FROM public.vwj1 WHERE vwj1.i = 1); /*u0*/CREATE VIEW PUBLIC.vwv43 AS SELECT * FROM vwt1 WHERE vwt1.i = (SELECT vwj1.i FROM vwj1 WHERE vwj1.i = 1); /*u0*/CREATE VIEW PUBLIC.vwv44 AS SELECT * FROM vwt1 WHERE i = (SELECT i FROM vwj1); /*u0*/CREATE VIEW PUBLIC.vwv45 AS SELECT * FROM vwt1 WHERE i in (SELECT i FROM vwj1); /*u0*/CREATE VIEW PUBLIC.vwv46 AS SELECT * FROM vwt1 WHERE i = (SELECT i FROM vwj1 WHERE i = 1); /*u0*/CREATE VIEW PUBLIC.vwv47 AS SELECT * FROM public.vwt1 WHERE i = (SELECT i FROM vwj1); /*u0*/CREATE VIEW PUBLIC.vwv48 AS SELECT * FROM public.vwt1 WHERE i in (SELECT i FROM vwj1); /*u0*/CREATE VIEW PUBLIC.vwv49 AS SELECT * FROM public.vwt1 WHERE i = (SELECT i FROM vwj1 WHERE i = 1); /*u0*/CREATE VIEW PUBLIC.vwv50 AS SELECT * FROM vwt1 WHERE i = (SELECT i FROM public.vwj1); /*u0*/CREATE VIEW PUBLIC.vwv51 AS SELECT * FROM vwt1 WHERE i in (SELECT i FROM public.vwj1); /*u0*/CREATE VIEW PUBLIC.vwv52 AS SELECT * FROM vwt1 WHERE i = (SELECT i FROM public.vwj1 WHERE i = 1); /*u0*/CREATE VIEW PUBLIC.vwv53 AS SELECT * FROM vwt1 WHERE i = (SELECT vwj1.i FROM public.vwj1); /*u0*/CREATE VIEW PUBLIC.vwv54 AS SELECT * FROM vwt1 WHERE i in (SELECT vwj1.i FROM vwj1); /*u0*/CREATE VIEW PUBLIC.vwv55 AS SELECT * FROM vwt1 WHERE i = (SELECT vwj1.i FROM vwj1 WHERE i = 1); /*u0*/CREATE VIEW PUBLIC.vwv56 AS SELECT * FROM vwt1 WHERE i = (SELECT i FROM public.vwj1 WHERE vwj1.i = 1); /*u0*/CREATE VIEW PUBLIC.vwv57 AS SELECT * FROM vwt1 WHERE i = (SELECT vwj1.i FROM vwj1 WHERE vwj1.i = 1); /*e*/DROP VIEW other.vwv1; /*e*/DROP VIEW information_schema.vwv2; -- ****************************** MEM Indexes DROP INDEX indi1 IF exists; DROP INDEX indi2 IF exists; DROP INDEX indi3 IF exists; DROP INDEX indi4 IF exists; DROP INDEX indi5 IF exists; DROP TABLE indt1 IF exists; DROP TABLE indt2 IF exists; DROP TABLE indt3 IF exists; DROP TABLE indt4 IF exists; DROP TABLE indt101 IF exists; CREATE TABLE indt1 (i int); INSERT INTO indt1 values(0); INSERT INTO indt1 values(1); CREATE TABLE indt2 (i int); INSERT INTO indt2 values(0); INSERT INTO indt2 values(1); CREATE TABLE indt3 (i int); INSERT INTO indt3 values(0); INSERT INTO indt3 values(1); CREATE TABLE indt4 (i int); INSERT INTO indt4 values(0); INSERT INTO indt4 values(1); /*e*/CREATE UNIQUE INDEX other.indi101 on indt101(i); /*e*/CREATE INDEX other.indi101 on indt101(i); CREATE TABLE indt101 (i int); INSERT INTO indt101 values(0); INSERT INTO indt101 values(1); /*e*/CREATE UNIQUE INDEX information_schema.indi101 on indt101(i int); /*u0*/CREATE UNIQUE INDEX indi1 ON indt1(i); /*e*/CREATE UNIQUE INDEX indi1 ON indt1(i); -- Create existing object /*u0*/CREATE UNIQUE INDEX public.indi2 ON indt2(i); /*e*/CREATE UNIQUE INDEX public.indi2 ON indt2(i); -- Create existing object /*u0*/CREATE UNIQUE INDEX indi3 ON indt3(i); /*u0*/CREATE UNIQUE INDEX indi4 ON indt4(i); -- The error message says that the schema name is invalid. Problem here -- is creating an index in a different schema than the target table. /*e*/CREATE UNIQUE INDEX indi5 ON information_schema.system_users(user); /*e*/DROP INDEX other.indi1; /*e*/DROP INDEX information_schema.indi2; -- ****************************** CACH Indexes DROP INDEX cindi1 IF exists; DROP INDEX cindi2 IF exists; DROP INDEX cindi3 IF exists; DROP INDEX cindi4 IF exists; DROP INDEX cindi5 IF exists; DROP TABLE cindt1 IF exists; DROP TABLE cindt2 IF exists; DROP TABLE cindt3 IF exists; DROP TABLE cindt4 IF exists; DROP TABLE cindt101 IF exists; CREATE TABLE cindt1 (i int); INSERT INTO cindt1 values(0); INSERT INTO cindt1 values(1); CREATE TABLE cindt2 (i int); INSERT INTO cindt2 values(0); INSERT INTO cindt2 values(1); CREATE TABLE cindt3 (i int); INSERT INTO cindt3 values(0); INSERT INTO cindt3 values(1); CREATE TABLE cindt4 (i int); INSERT INTO cindt4 values(0); INSERT INTO cindt4 values(1); /*e*/CREATE UNIQUE INDEX other.cindi101 on cindt101(i); CREATE TABLE cindt101 (i int); INSERT INTO cindt101 values(0); INSERT INTO cindt101 values(1); /*e*/CREATE UNIQUE INDEX information_schema.cindi101 on cindt101(i int); /*u0*/CREATE UNIQUE INDEX cindi1 ON cindt1(i); /*e*/CREATE UNIQUE INDEX cindi1 ON cindt1(i); -- Create existing object /*u0*/CREATE UNIQUE INDEX public.cindi2 ON cindt2(i); /*e*/CREATE UNIQUE INDEX public.cindi2 ON cindt2(i); -- Create existing object /*u0*/CREATE UNIQUE INDEX cindi3 ON cindt3(i); /*u0*/CREATE UNIQUE INDEX cindi4 ON cindt4(i); -- The error message says that the schema name is invalid. Problem here -- is creating an index in a different schema than the target table. /*e*/CREATE UNIQUE INDEX cindi5 ON information_schema.system_users(user); /*e*/DROP INDEX other.cindi1; /*e*/DROP INDEX information_schema.cindi2; -- ****************************** Sequences DROP TABLE seqt1 IF EXISTS; CREATE TABLE seqt1 (i int); INSERT INTO seqt1 VALUES(10); -- No "IF EXISTS" allowed with sequences, so can't verify they don't exists. /*e*/CREATE SEQUENCE other.s101; /*e*/CREATE SEQUENCE information_schema.s101; /*u0*/CREATE SEQUENCE s1; /*e*/CREATE SEQUENCE s1; -- Create existing object /*u0*/CREATE SEQUENCE public.s2; /*e*/CREATE SEQUENCE public.s2; -- Create existing object -- To test persisting of incremented value /*r0*/SELECT next value FOR s2 FROM seqt1; /*r1*/SELECT next value FOR s2 FROM seqt1; -- ****************************** Triggers DROP TABLE trgt1 IF EXISTS; DROP TABLE trgt2 IF EXISTS; DROP TABLE trgt3 IF EXISTS; DROP TABLE trgt4 IF EXISTS; DROP TABLE trgt101 IF EXISTS; -- No "IF EXISTS" allowed with triggers, so can't verify they don't exists. CREATE TABLE trgt1 (i int); CREATE TABLE trgt2 (i int); CREATE TABLE trgt3 (i int); CREATE TABLE trgt4 (i int); /*e*/CREATE TRIGGER other.trgtrig101 AFTER INSERT ON trgt1 CALL "org.hsqldb.test.BlaineTrig"; /*e*/CREATE TRIGGER trgtrig101 AFTER INSERT ON other.trgt1 CALL "org.hsqldb.test.BlaineTrig"; /*e*/CREATE TRIGGER trgtrig101 AFTER INSERT ON information_schema.trgt1 CALL "org.hsqldb.test.BlaineTrig"; /*e*/CREATE TRIGGER trgtrig101 AFTER INSERT ON trgt101 QUEUE 0 CALL "org.hsqldb.test.BlaineTrig"; /*u0*/CREATE TRIGGER trgtrig1 AFTER INSERT ON trgt1 QUEUE 0 CALL "org.hsqldb.test.BlaineTrig"; /*u0*/CREATE TRIGGER public.trgtrig2 AFTER INSERT ON trgt2 QUEUE 0 CALL "org.hsqldb.test.BlaineTrig"; /*u0*/CREATE TRIGGER trgtrig3 AFTER INSERT ON public.trgt3 QUEUE 0 CALL "org.hsqldb.test.BlaineTrig"; /*u0*/CREATE TRIGGER public.trgtrig4 AFTER INSERT ON public.trgt4 QUEUE 0 CALL "org.hsqldb.test.BlaineTrig"; /*e*/DROP TRIGGER information_schema.trgtrig1; /*e*/DROP TRIGGER other.trgtrig1; -- ****************************** Constraints DROP TABLE cont1 IF EXISTS; DROP TABLE cont2 IF EXISTS; DROP TABLE cont3 IF EXISTS; DROP TABLE cont4 IF EXISTS; DROP TABLE cont5 IF EXISTS; DROP TABLE cont6 IF EXISTS; DROP TABLE cont7 IF EXISTS; DROP TABLE cont8 IF EXISTS; DROP TABLE cont9 IF EXISTS; DROP TABLE cont10 IF EXISTS; DROP TABLE cont11 IF EXISTS; DROP TABLE cont12 IF EXISTS; DROP TABLE cont13 IF EXISTS; DROP TABLE cont14 IF EXISTS; DROP TABLE cont15 IF EXISTS; DROP TABLE cont16 IF EXISTS; DROP TABLE cont17 IF EXISTS; DROP TABLE cont18 IF EXISTS; DROP TABLE cont19 IF EXISTS; DROP TABLE cont20 IF EXISTS; DROP TABLE cont101 IF EXISTS; CREATE TABLE conj1(i int, vc varchar(10), PRIMARY KEY (i)); INSERT INTO conj1 values(1, 'one'); -- No "IF EXISTS" allowed with constrs., so can't verify they don't exists. /*e*/CREATE TABLE other.cont101 (i int, CONSTRAINT conuc1 UNIQUE(i)); /*e*/CREATE TABLE system_information.cont1 (i int, CONSTRAINT conuc1 UNIQUE(i)); /*u0*/CREATE TABLE cont1 (i int, CONSTRAINT conuc1 UNIQUE(i)); /*e*/CREATE TABLE cont1 (i int, CONSTRAINT conuc1 UNIQUE(i)); /*e*/CREATE TABLE cont101 (i int, CONSTRAINT conuc1 UNIQUE(i)); -- conuc1 already exists /*e*/CREATE TABLE cont101 (i int, CONSTRAINT public.conuc1 UNIQUE(i)); -- ditto /*u0*/CREATE TABLE public.cont2 (i int, CONSTRAINT conuc2 UNIQUE(i)); /*e*/CREATE TABLE public.cont101 (i int, CONSTRAINT conuc2 UNIQUE(i)); -- conuc2 already /*e*/CREATE TABLE public.cont101 (i int, CONSTRAINT public.conuc2 UNIQUE(i)); -- dit /*u0*/CREATE TABLE cont3 (i int, CONSTRAINT public.conuc3 UNIQUE(i)); /*u0*/CREATE TABLE public.cont4 (i int, CONSTRAINT public.conuc4 UNIQUE(i)); /*u0*/CREATE TABLE cont5 (i int, CONSTRAINT conpk5 PRIMARY KEY(i)); /*u0*/CREATE TABLE public.cont6 (i int, CONSTRAINT conpk6 PRIMARY KEY(i)); /*u0*/CREATE TABLE cont7 (i int, CONSTRAINT public.conpk7 PRIMARY KEY(i)); /*u0*/CREATE TABLE public.cont8 (i int, CONSTRAINT public.conpk8 PRIMARY KEY(i)); /*u0*/CREATE TABLE cont9 (i int, CONSTRAINT confk9 FOREIGN KEY(i) REFERENCES conj1(i)); /*e*/CREATE TABLE cont101 (i int, CONSTRAINT confk9 FOREIGN KEY(i) REFERENCES other.conj1(i)); /*e*/CREATE TABLE cont101 (i int, CONSTRAINT confk9 FOREIGN KEY(i) REFERENCES information_schema.conj1(i)); /*u0*/CREATE TABLE public.cont10 (i int, CONSTRAINT confk10 FOREIGN KEY(i) REFERENCES conj1(i)); /*u0*/CREATE TABLE cont11 (i int, CONSTRAINT public.confk11 FOREIGN KEY(i) REFERENCES conj1(i)); /*u0*/CREATE TABLE public.cont12 (i int, CONSTRAINT public.confk12 FOREIGN KEY(i) REFERENCES conj1(i)); /*u0*/CREATE TABLE cont13 (i int, CONSTRAINT confk13 FOREIGN KEY(i) REFERENCES public.conj1(i)); /*u0*/CREATE TABLE public.cont14 (i int, CONSTRAINT confk14 FOREIGN KEY(i) REFERENCES public.conj1(i)); /*u0*/CREATE TABLE cont15 (i int, CONSTRAINT public.confk15 FOREIGN KEY(i) REFERENCES public.conj1(i)); /*u0*/CREATE TABLE public.cont16 (i int, CONSTRAINT public.confk16 FOREIGN KEY(i) REFERENCES public.conj1(i)); /*u0*/CREATE TABLE cont17 (i int, CONSTRAINT conc17 CHECK (i < 1)); /*u0*/CREATE TABLE public.cont18 (i int, CONSTRAINT conc18 CHECK (i in (0, 2))); /*u0*/CREATE TABLE cont19 (i int, CONSTRAINT public.conc19 CHECK (i = 0)); /*u0*/CREATE TABLE public.cont20 (i int, CONSTRAINT public.conc20 CHECK (i != 1)); -- This to test recovery from .log files. COMMIT; SHUTDOWN IMMEDIATELY; hsqldb-1.8.0.10.orig/testrun/hsqldb/TestSelfImmediateShutdownRecover.txt0000644000175000017500000000025210207167134024773 0ustar renerene/*c4*/SELECT * FROM TABLE1; /*c4*/SELECT * FROM TABLE2; /*c1*/SELECT * FROM TABLE2 WHERE COLUMN2=15; -- bug #1110517 /*rnewdir*/SELECT NAME FROM FILE2; DROP TABLE FILE2; hsqldb-1.8.0.10.orig/testrun/hsqldb/TestSelfNameResolution.txt0000644000175000017500000000661110416747555023001 0ustar renerenedrop table t0 if exists; create table t0(c varchar(20), i integer); insert into t0 values ('first', 1); insert into t0 values ('second', 2); insert into t0 values ('third', 3); select * from t0 order by c; select t0.c, t0.i from t0 order by c, t0.i; select c as cc from t0 order by cc; select c as cc from t0 order by i; select upper(c) as uc from t0 t order by uc; select i, c from t0 order by upper(c); /*c3*/select i, c as cc from t0 order by upper(cc); /*e*/select distinct upper(c) as uc from t0 t order by i; /*c3*/select c as ccol, sum(i) as sumi from t0 group by ccol; /*c1*/select c as ccol, sum(i) as sumi from t0 group by c having substring(upper(c) from 1 for 1) = 'S' /*c2*/select c as ccol, sum(i) as sumi from t0 group by c having avg(i) < 3 /*c1*/select c as ccol, sum(i) as sumi from t0 group by c having substring(upper(c) from 1 for 1) = 'S' and avg(i) < 10 order by c desc -- bug item #1167704 drop table test if exists; create table test(id integer, cost float); insert into test values(1,10); insert into test values(2,20); insert into test values (3,1); insert into test values (4,2); /*r 3,kr 1.0 4,kr 2.0 1,kr 10.0 2,kr 20.0 */SELECT ID, 'kr ' + Cost FROM Test ORDER BY Cost; /*r 3,kr 1.0 4,kr 2.0 1,kr 10.0 2,kr 20.0 */SELECT ID, 'kr ' || Cost FROM Test ORDER BY Cost; DROP TABLE "CD" IF EXISTS CASCADE; CREATE CACHED TABLE "CD"("ID" INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 0) NOT NULL PRIMARY KEY,"Title" VARCHAR(50)); CREATE CACHED TABLE "Artist"("ID" INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 0) NOT NULL PRIMARY KEY,"Name" VARCHAR(50)); CREATE CACHED TABLE "Album"("ID" INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 0) NOT NULL PRIMARY KEY,"Artist" INTEGER NOT NULL,"Name" VARCHAR(200),"Year" DATE,"CD" INTEGER NOT NULL,CONSTRAINT SYS_FK_42 FOREIGN KEY("CD") REFERENCES "CD"("ID"),CONSTRAINT SYS_FK_52 FOREIGN KEY("Artist") REFERENCES "Artist"("ID") ON DELETE CASCADE); CREATE CACHED TABLE "Song"("ID" INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 0) NOT NULL PRIMARY KEY,"Album" INTEGER NOT NULL,"Name" VARCHAR(300),"Track" INTEGER,"Duration" TIME,"Genre" VARCHAR(50),CONSTRAINT SYS_FK_55 FOREIGN KEY("Album") REFERENCES "Album"("ID") ON DELETE CASCADE); INSERT INTO "CD" VALUES(21,'24'); INSERT INTO "Artist" VALUES(123,'Annie Lennox'); INSERT INTO "Album" VALUES(172,123,'Medusa',NULL,21); INSERT INTO "Song" VALUES(2669,172,'waiting in vain',9,'00:05:39',NULL); -- issue with aliases - bug 1344316 create table test1 (idtest int,test varchar(100),primary key(idtest)); create table test2 (idtest2 int,idtest int,test varchar(100),primary key(idtest2),foreign key (idtest) REFERENCES test1(idtest)); INSERT INTO test1 (idtest, test) VALUES (1,'hello'); INSERT INTO test2 (idtest2,idtest, test) VALUES(2,1,'world'); select t1.test, t2.idtest2 as idtest from test1 t1 join test2 t2 on (t1.idtest=t2.idtest) select t1.test, t1.test as idtest from test1 t1 JOIN test2 t2 on (t1.idtest=t2.idtest) ----- drop table tablea if exists; drop table tableb if exists; create table tablea (cola int, colb int, colc int); create table tableb (cola int, colb int, colc int); SELECT T1.colA, T1.colB FROM tableA T1 WHERE T1.colC = ( SELECT MAX(T2.colC) FROM tableA T2 WHERE T1.colB = T2.colB); SELECT T1.colA, T1.colB FROM tableA T1 WHERE T1.colC IN ( SELECT MAX(T2.colC) FROM tableA T2 WHERE T1.colB = T2.colB); hsqldb-1.8.0.10.orig/testrun/hsqldb/TestSelfSysTables.txt0000644000175000017500000000273310232725564021737 0ustar renereneSET SCHEMA information_schema; SELECT * FROM SYSTEM_ALIASES; SELECT * FROM SYSTEM_ALLTYPEINFO; SELECT * FROM SYSTEM_BESTROWIDENTIFIER; SELECT * FROM SYSTEM_CACHEINFO; SELECT * FROM SYSTEM_CATALOGS; SELECT * FROM SYSTEM_CHECK_COLUMN_USAGE; SELECT * FROM SYSTEM_CHECK_CONSTRAINTS; SELECT * FROM SYSTEM_CHECK_ROUTINE_USAGE; SELECT * FROM SYSTEM_CHECK_TABLE_USAGE; SELECT * FROM SYSTEM_CLASSPRIVILEGES; SELECT * FROM SYSTEM_COLUMNPRIVILEGES; SELECT * FROM SYSTEM_COLUMNS; SELECT * FROM SYSTEM_CROSSREFERENCE; SELECT * FROM SYSTEM_INDEXINFO; SELECT * FROM SYSTEM_PRIMARYKEYS; SELECT * FROM SYSTEM_PROCEDURECOLUMNS; SELECT * FROM SYSTEM_PROCEDURES; SELECT * FROM SYSTEM_PROPERTIES; SELECT * FROM SYSTEM_SCHEMAS; SELECT * FROM SYSTEM_SEQUENCES; SELECT * FROM SYSTEM_SESSIONINFO; SELECT * FROM SYSTEM_SESSIONS; SELECT * FROM SYSTEM_SUPERTABLES; SELECT * FROM SYSTEM_SUPERTYPES; SELECT * FROM SYSTEM_TABLEPRIVILEGES; SELECT * FROM SYSTEM_TABLES; SELECT * FROM SYSTEM_TABLETYPES; SELECT * FROM SYSTEM_TABLE_CONSTRAINTS; SELECT * FROM SYSTEM_TEXTTABLES; SELECT * FROM SYSTEM_TRIGGERCOLUMNS; SELECT * FROM SYSTEM_TRIGGERS; SELECT * FROM SYSTEM_TYPEINFO; SELECT * FROM SYSTEM_UDTATTRIBUTES; SELECT * FROM SYSTEM_UDTS; SELECT * FROM SYSTEM_USAGE_PRIVILEGES; SELECT * FROM SYSTEM_USERS; SELECT * FROM SYSTEM_VERSIONCOLUMNS; SELECT * FROM SYSTEM_VIEWS; SELECT * FROM SYSTEM_VIEW_COLUMN_USAGE; SELECT * FROM SYSTEM_VIEW_ROUTINE_USAGE; SELECT * FROM SYSTEM_VIEW_TABLE_USAGE; hsqldb-1.8.0.10.orig/testrun/hsqldb/TestSelfSchemaPersistD1.txt0000644000175000017500000000061510453732535022763 0ustar renerene-- bug 1479110 -- logging and readback of nested creates in schema -- part 1 of 2 scripts create schema TESTSCHEMAD1 authorization DBA create table TSD1T1(C VARCHAR(10)) create table TSD1T2(C VARCHAR(10)); set schema TESTSCHEMAD1; insert into TSD1T2 values('test'); insert into TSD1T1 values('test'); select * from TESTSCHEMAD1.TSD1T2; select * from TESTSCHEMAD1.TSD1T1; shutdown immediately; hsqldb-1.8.0.10.orig/testrun/hsqldb/TestSelfUnions.txt0000644000175000017500000000643610301232244021266 0ustar renerenedrop table a if exists; drop table b if exists; drop table c if exists; CREATE TABLE A(ID INTEGER NOT NULL) CREATE TABLE B(ID INTEGER NOT NULL) CREATE TABLE C(ID INTEGER NOT NULL) INSERT INTO A VALUES(1) INSERT INTO A VALUES(2) INSERT INTO A VALUES(3) INSERT INTO B VALUES(1) INSERT INTO B VALUES(2) INSERT INTO C VALUES(3) INSERT INTO C VALUES(4) INSERT INTO C VALUES(5) /*e*/SELECT * FROM A UNION (SELECT * FROM C /*e*/SELECT * FROM A UNION SELECT * FROM C) /*e*/(SELECT * FROM A UNION (SELECT * FROM C /*e*/(SELECT * FROM A /*c5*/SELECT * FROM A UNION SELECT * FROM C /*c5*/(SELECT * FROM A) UNION SELECT * FROM C /*c5*/SELECT * FROM A UNION (SELECT * FROM C) /*c5*/(SELECT * FROM A UNION SELECT * FROM C) -- limits /*c5*/SELECT * FROM A UNION SELECT * FROM C ORDER BY ID /*c4*/(SELECT * FROM A ORDER BY ID LIMIT 1 OFFSET 0) UNION SELECT * FROM C /*c4*/SELECT * FROM A UNION (SELECT * FROM C ORDER BY ID LIMIT 2 OFFSET 0) LIMIT 4 OFFSET 0 /*r 2 3 4 */SELECT * FROM A UNION (SELECT * FROM C ORDER BY ID LIMIT 2 OFFSET 0) LIMIT 0 OFFSET 1 /*r 4 3 2 1 */SELECT * FROM A UNION (SELECT * FROM C ORDER BY ID LIMIT 2 OFFSET 0) ORDER BY ID DESC --LIMIT 0 OFFSET 1 /*r 4 5 */SELECT * FROM A UNION SELECT * FROM C ORDER BY ID LIMIT 2 OFFSET 3 -- /*c3*/SELECT * FROM A UNION SELECT * FROM B /*c5*/SELECT * FROM B UNION SELECT * FROM C /*c2*/SELECT * FROM A EXCEPT SELECT * FROM C /*c2*/(SELECT * FROM A) EXCEPT SELECT * FROM C /*c2*/SELECT * FROM A EXCEPT (SELECT * FROM C) /*c1*/(SELECT * FROM A INTERSECT SELECT * FROM C) /*c2*/SELECT * FROM A INTERSECT (SELECT * FROM B) /*c0*/(SELECT * FROM B) INTERSECT SELECT * FROM C /*r 1 2 3 */SELECT * FROM A UNION SELECT * FROM C INTERSECT SELECT * FROM B /*r 1 2 */(SELECT * FROM A UNION SELECT * FROM C) INTERSECT SELECT * FROM B /*r */SELECT * FROM A EXCEPT SELECT * FROM C EXCEPT SELECT * FROM B /*r 3 */SELECT * FROM A UNION SELECT * FROM C INTERSECT SELECT * FROM B EXCEPT SELECT * FROM B /*r 1 2 3 */SELECT * FROM A UNION SELECT * FROM C INTERSECT (SELECT * FROM B EXCEPT SELECT * FROM B) CREATE VIEW V1 AS (SELECT * FROM A UNION SELECT * FROM C) INTERSECT SELECT * FROM B /*r 1 2 */SELECT * FROM V1 CREATE VIEW V3 AS SELECT * FROM A UNION SELECT * FROM C INTERSECT (SELECT * FROM B EXCEPT SELECT * FROM B) /*r 1 2 3 */SELECT * FROM V3; /*c3*/SELECT * FROM A WHERE ID IN (SELECT * FROM A UNION SELECT * FROM C INTERSECT (SELECT * FROM B EXCEPT SELECT * FROM B)) /*c3*/SELECT * FROM A WHERE EXISTS (SELECT * FROM A UNION SELECT * FROM C INTERSECT (SELECT * FROM B EXCEPT SELECT * FROM B)) /*c0*/SELECT * FROM A WHERE EXISTS (SELECT * FROM A EXCEPT SELECT * FROM C EXCEPT SELECT * FROM B) --- correlated union create table bt1 ( id varchar(10) ); create table bt2 ( id varchar(10) ); create table bt3 ( id varchar(10) ); insert into bt1( id ) values ( 'aaa' ); insert into bt1( id ) values ( 'bbb' ); insert into bt1( id ) values ( 'ccc' ); insert into bt2( id ) values ( 'aaa' ); insert into bt3( id ) values ( 'bbb' ); /*c1*/select * from bt1 as t1 where not exists( select id from bt2 as t2 where t2.id = t1.id union all select id from bt3 as t3 where t3.id = t1.id ); --- null as column in first select create table au (id int, b1 bit); create table bu (id int); insert into au values(1,true); insert into bu values(2); select id, null as b1 from bu union select id, b1 from au; hsqldb-1.8.0.10.orig/testrun/hsqldb/runTest.bat0000644000175000017500000000015210064561722017735 0ustar renerene@java -classpath ..\..\lib\junit.jar;..\..\lib\hsqldbtest.jar org.hsqldb.test.%1 %2 %3 %4 %5 %6 %7 %8 %9 hsqldb-1.8.0.10.orig/testrun/hsqldb/TestSelfViewsReconnect.txt0000644000175000017500000000304310767514660022765 0ustar renerene-- v_colors_a has been defined as SELECT * FROM COLORS -- at the time COLORS had 2 columns, while it meanwhile has three /*r1,red,null 2,green,null 3,orange,null 4,indigo,null*/select * from colors; /*r1,red 2,green 3,orange 4,indigo*/select * from v_colors_a; -- check the availability/content of all those views with asterisks /*r1,a,b,c 2,d,e,f*/select * from S1; /*r1,a,b,c 2,d,e,f*/select * from S2; /*r1,a,b,c 2,d,e,f*/select * from S3; /*r1,a,b,c 2,d,e,f*/select * from S4; /*r1,a,b,c 2,d,e,f*/select * from S5; /*r1,a,b,c 2,d,e,f*/select * from S6; /*r1,a,b,c 2,d,e,f*/select * from S7; /*r1,a,b,c,a 2,d,e,f,d*/select * from C1; /*rb,1,a,b,c e,2,d,e,f*/select * from C2; /*r 1,first A,1,first B 1,first A,2,second B 2,second A,1,first B 2,second A,2,second B*/select * from M1; /*r 1,first B,1,first A 2,second B,1,first A 1,first B,2,second A 2,second B,2,second A*/select * from M2; /*r 1,first A 1,first A 2,second A 2,second A*/select * from M3; /*c2*/select * from Q1; /*c4*/select * from Q2; /*c2*/select * from Q3; /*c4*/select * from Q4; /*r1,a,b,c 2,d,e,f*/select * from L1; /*r1,a,b,c 2,d,e,f*/select * from VV1; /*r1 2*/select * from VV2; /*r1,first A 1,first B 2,second A 2,second B*/select * from U1; /*r1,first A 1,first B 2,second A 2,second B*/select * from U2; /*r 1,first A 2,second A*/select * from VM1; /*r 1,first A,1,first B 1,first A,2,second B 2,second A,1,first B 2,second A,2,second B*/select * from VM2; hsqldb-1.8.0.10.orig/testrun/hsqldb/TestSelfJoins.txt0000644000175000017500000000130110301332707021064 0ustar renerene-- -- TestSelfJoins.txt -- create table tsj1 (a integer primary key, b integer); insert into tsj1 values(5,5); insert into tsj1 values(6,6); insert into tsj1 values(11,21); insert into tsj1 values(12,22); insert into tsj1 values(13,23); insert into tsj1 values(14,24); insert into tsj1 values(15,25); insert into tsj1 values(16,26); insert into tsj1 values(17,27); /*r3*/select count(*) from tsj1 where a > 14 /*r3*/select count(*) from tsj1 where a > '14' /*r5*/select count(*) from tsj1 where cast(a as character) > '14' /*r81*/select count(*) from tsj1 a cross join tsj1 b /*e*/select count(*) from tsj1 a cross join tsj1 b on a.a = b.a /*r9*/select count(*) from tsj1 a inner join tsj1 b on a.a = b.a hsqldb-1.8.0.10.orig/testrun/hsqldb/TestSelfConversions.txt0000644000175000017500000000037710242164355022334 0ustar renereneDROP TABLE T1 IF EXISTS; CREATE TABLE T1(ID IDENTITY, DT DATE,TI TIME,TS TIMESTAMP); INSERT INTO T1 (ID, DT, TI, TS) VALUES (NULL, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP); SELECT DAYOFMONTH(DT) FROM T1; SELECT DAYOFMONTH(TS) FROM T1; DROP TABLE T1 hsqldb-1.8.0.10.orig/testrun/hsqldb/TestSelfCheckConstraints.txt0000644000175000017500000000435010416747424023273 0ustar renereneDROP TABLE "Tab" IF EXISTS; DROP TABLE TC0 IF EXISTS; DROP TABLE TC1 IF EXISTS; DROP TABLE TC2 IF EXISTS; DROP TABLE TC3 IF EXISTS; DROP TABLE TC4 IF EXISTS; DROP TABLE TC5 IF EXISTS; CREATE TABLE "TAB"("a" INT, "b" INT, "c" INT, CHECK("a" > "b" AND "b">"c")); /*E*/INSERT INTO TAB VALUES(null,2,3); INSERT INTO TAB VALUES(2,1,null); INSERT INTO TAB VALUES(NULL,2,NULL); INSERT INTO TAB VALUES(NULL,NULL,NULL); CREATE TABLE TC0(A INT, B INT, C INT, CHECK(A > B AND B>C)); CREATE TABLE TC1(A CHAR(10), B CHAR(10), C CHAR(10), CHECK(TRIM(BOTH '*' FROM A) > TRIM(LEADING FROM B))); CREATE TABLE TC2(A CHAR(10), B CHAR(10), C CHAR(10), CHECK(TRIM(TRAILING '*' FROM A) > UPPER(B))); CREATE TABLE TC3(A CHAR(10), B CHAR(10), C CHAR(10), CHECK(A LIKE B ESCAPE ';' AND B LIKE 'test%')); CREATE TABLE TC4(A CHAR(10), B CHAR(10), C CHAR(10), D INT, CHECK(SUBSTRING(A FROM D FOR 3) LIKE C ESCAPE ';')); CREATE TABLE TC5(A CHAR(10), B CHAR(10), C CHAR(10), D INT, CHECK(A IN (B,C, 'Sunday', 'Monday'))); INSERT INTO TC5(A,C) VALUES ('Sunday', null); INSERT INTO TC5(A,C) VALUES ('Today', 'Today'); INSERT INTO TC5(A,C) VALUES ('Tomorrow', 'Tomorrow'); /*e*/INSERT INTO TC5(A,C) VALUES ('Yesterday', 'Tomorrow'); INSERT INTO TC5(A,C) VALUES (null, null); /*c4*/SELECT * FROM TC5; ALTER TABLE TC5 DROP COLUMN D /*c4*/SELECT * FROM TC5; INSERT INTO TC5(A) VALUES ('Monday'); UPDATE TC5 SET A='Monday' WHERE B IS NULL; /*e*/INSERT INTO TC5(A,C) VALUES ('Yesterday', 'Tomorrow'); /*e*/CREATE TABLE TC6(A CHAR, B CHAR, C CHAR, D INT, CHECK(A IN (SELECT A FROM TC5))); CREATE TABLE TC6(A INT, CHECK(A IS NULL OR A > 1)); INSERT INTO TC6(A) VALUES (2); INSERT INTO TC6(A) VALUES (null); /*e*/INSERT INTO TC6(A) VALUES (0); CREATE TABLE TC7(A INT, B TIMESTAMP, CONSTRAINT CH1 CHECK(B > CURRENT_TIMESTAMP)); INSERT INTO TC7 VALUES (10, '2015-01-01 12:00:00'); /*e*/INSERT INTO TC7 VALUES (10, '2004-01-01 12:00:00'); INSERT INTO TC7 VALUES (11, NULL); SCRIPT -- some type conversion tests ALTER TABLE TC7 ALTER COLUMN A DECIMAL(6,2); /*e*/ALTER TABLE TC7 ALTER COLUMN B DATE; /*r 10.00,2015-01-01 12:00:00.000000000 11.00,NULL */SELECT * FROM TC7 ORDER BY A; ALTER TABLE TC7 DROP CONSTRAINT CH1; ALTER TABLE TC7 ALTER COLUMN B DATE; /*r 10.00,2015-01-01 11.00,NULL */SELECT * FROM TC7 ORDER BY A; hsqldb-1.8.0.10.orig/testrun/hsqldb/TestSelfModify.txt0000644000175000017500000000370410176236523021253 0ustar renerene-- -- TestSelfModify.txt -- -- TestSelfModify.txt is used by TestSelf.java to test the database -- -- This is part of a three part suite of scripts to test persistence in the same DB -- -- Comment lines must start with -- and are ignored -- Lines starting with spaces belongs to last line -- Checked lines start with comments containing where is: -- c ResultSet expects a with columns -- r ResultSet expected with result in first row/column -- u Update count expected -- e Exception must occur -- --bug #824031 continued --scripting test for order of indexes /*c1*/SELECT * FROM APP WHERE APP_NAME = 'Eran'; /*c1*/SELECT * FROM APP WHERE APP_NAME = 'Shelly'; /*c2*/SELECT * FROM APP; -- -- TEST 1 -- Correct handling of index creation for foreign keys -- insert some values /*u1*/insert into verein values ('abcdefg'); /*u1*/insert into verein values ('hijklmn'); /*u1*/insert into verein values ('opqrstu'); /*u1*/insert into verein values ('vwxyz'); /*u1*/insert into bewerb values ('abcdefg',1); /*e*/insert into bewerb values ('abcdefg',2); /*u1*/insert into bewerb values ('hijklmn',5); /*e*/insert into bewerb values ('hijklmn',6); /*u1*/insert into bewerb values ('opqrstu',8); /*e*/insert into bewerb values ('opqrstu',9); /*u1*/insert into bewerb values ('vwxyz',10); --test identity increment INSERT INTO APP2 (VALUE) VALUES(11); INSERT INTO APP2 (VALUE) VALUES(12); --test result of update before previous shutdown /*r 14,newdir,NULL,NULL,NULL */select * from file; --test insert into table SELECT * INTO NEWAPP FROM APP; /*c1*/SELECT * FROM NEWAPP WHERE APP_NAME = 'Eran'; /*c1*/SELECT * FROM NEWAPP WHERE APP_NAME = 'Shelly'; /*c2*/SELECT * FROM NEWAPP; INSERT INTO NEWAPP (SELECT * FROM APP) /*c2*/SELECT * FROM NEWAPP WHERE APP_NAME = 'Eran'; /*c2*/SELECT * FROM NEWAPP WHERE APP_NAME = 'Shelly'; /*c4*/SELECT * FROM NEWAPP; -- SHUTDOWN is necessary for test1 /*u0*/SHUTDOWN; hsqldb-1.8.0.10.orig/testrun/hsqldb/TestSelfSchemaPersistB2.txt0000644000175000017500000006763210234724544022774 0ustar renerene-- TEST OBJECTS -- This TESTS the schema-specific objects created in a previous script. -- (See the *C[12].txt scripts for similar tests of ALTER comands (which -- this script purposefully omits). /*u0*/SET SCHEMA blaine; CREATE USER otheruser PASSWORD otheruser; -- ****************************** MEM Tables /*c2*/SELECT * FROM xtblt1; /*c1*/SELECT * FROM xtblt1 WHERE i = 0; /*c2*/SELECT * FROM xtblt1 WHERE i in (0, 1, 11, 12); /*c1*/SELECT * FROM xtblt1 WHERE i < 1; /*c1*/SELECT * FROM xtblt1 WHERE xtblt1.i = (SELECT i FROM blaine.xtblj1); /*c1*/SELECT * FROM xtblt1 WHERE xtblt1.i = (SELECT i FROM xtblj1 WHERE xtblj1.i = 1); /*c1*/SELECT * FROM xtblt1 WHERE xtblt1.i in (SELECT i FROM xtblj1); /*c0*/SELECT * FROM xtblt1 WHERE xtblt1.i = (SELECT i FROM xtblj1 WHERE i = 0); /*c1*/SELECT * FROM blaine.xtblt1 WHERE xtblt1.i = (SELECT i FROM xtblj1); /*c1*/SELECT * FROM blaine.xtblt1 WHERE xtblt1.i in (SELECT i FROM xtblj1); /*c1*/SELECT * FROM blaine.xtblt1 WHERE xtblt1.i = (SELECT i FROM xtblj1 WHERE i = 1); /*c1*/SELECT * FROM xtblt1 WHERE xtblt1.i = (SELECT i FROM blaine.xtblj1); /*c1*/SELECT * FROM xtblt1 WHERE xtblt1.i in (SELECT i FROM blaine.xtblj1); /*c1*/SELECT * FROM xtblt1 WHERE xtblt1.i = (SELECT i FROM blaine.xtblj1 WHERE i = 1); /*c1*/SELECT * FROM xtblt1 WHERE xtblt1.i = (SELECT xtblj1.i FROM blaine.xtblj1); /*c1*/SELECT * FROM xtblt1 WHERE xtblt1.i in (SELECT xtblj1.i FROM xtblj1); /*c1*/SELECT * FROM xtblt1 WHERE xtblt1.i = (SELECT xtblj1.i FROM xtblj1 WHERE i = 1); /*c1*/SELECT * FROM xtblt1 WHERE xtblt1.i = (SELECT i FROM blaine.xtblj1 WHERE xtblj1.i = 1); /*c1*/SELECT * FROM xtblt1 WHERE xtblt1.i = (SELECT xtblj1.i FROM xtblj1 WHERE xtblj1.i = 1); /*c1*/SELECT * FROM xtblt1 WHERE i = (SELECT i FROM xtblj1); /*c1*/SELECT * FROM xtblt1 WHERE i in (SELECT i FROM xtblj1); /*c1*/SELECT * FROM xtblt1 WHERE i = (SELECT i FROM xtblj1 WHERE i = 1); /*c1*/SELECT * FROM blaine.xtblt1 WHERE i = (SELECT i FROM xtblj1); /*c1*/SELECT * FROM blaine.xtblt1 WHERE i in (SELECT i FROM xtblj1); /*c0*/SELECT * FROM blaine.xtblt1 WHERE i = (SELECT i FROM xtblj1 WHERE i = 0); /*c1*/SELECT * FROM xtblt1 WHERE i = (SELECT i FROM blaine.xtblj1); /*c1*/SELECT * FROM xtblt1 WHERE i in (SELECT i FROM blaine.xtblj1); /*c0*/SELECT * FROM xtblt1 WHERE i = (SELECT i FROM blaine.xtblj1 WHERE i = 0); /*c1*/SELECT * FROM xtblt1 WHERE i = (SELECT xtblj1.i FROM blaine.xtblj1); /*c1*/SELECT * FROM xtblt1 WHERE i in (SELECT xtblj1.i FROM xtblj1); /*c0*/SELECT * FROM xtblt1 WHERE i = (SELECT xtblj1.i FROM xtblj1 WHERE i = 0); /*c1*/SELECT * FROM xtblt1 WHERE i = (SELECT i FROM blaine.xtblj1 WHERE xtblj1.i = 1); /*c1*/SELECT * FROM xtblt1 WHERE i = (SELECT xtblj1.i FROM xtblj1 WHERE xtblj1.i = 1); /*e*/SELECT * FROM system_users WHERE user = 'SA'; /*e*/SELECT * FROM other.xtblt1; /*e*/SELECT * FROM other.system_users; /*e*/SELECT * FROM information_schema.xtblt1; SET SCHEMA public; /*e*/SELECT * FROM blaine.system_users; /*c2*/SELECT * FROM blaine.xtblt1; SET SCHEMA blaine; /*c1*/SELECT * FROM information_schema.system_users WHERE user = 'SA'; SET SCHEMA public; /*c1*/SELECT * FROM blaine.xtblt1 WHERE i = 0; SET SCHEMA blaine; /*e*/SELECT * FROM other.xtblt1 WHERE i = 0; /*e*/SELECT * FROM information_schema.xtblt1 WHERE i = 0; SET SCHEMA public; /*c1*/SELECT * FROM blaine.xtblt1, blaine.xtblj1 WHERE xtblt1.i = xtblj1.i; SET SCHEMA blaine; /*c1*/SELECT * FROM xtblt1, blaine.xtblj1 WHERE xtblt1.i = xtblj1.i; /*c1*/SELECT * FROM blaine.xtblt1, xtblj1 WHERE xtblt1.i = xtblj1.i; /*c1*/SELECT * FROM xtblt1, xtblj1 WHERE xtblt1.i = xtblj1.i; SET SCHEMA public; /*c1*/SELECT vc FROM blaine.xtblt1, blaine.xtblj1 WHERE xtblt1.i = xtblj1.i; SET SCHEMA blaine; /*c1*/SELECT vc FROM xtblt1, blaine.xtblj1 WHERE xtblt1.i = xtblj1.i; /*c1*/SELECT vc FROM blaine.xtblt1, xtblj1 WHERE xtblt1.i = xtblj1.i; /*c1*/SELECT vc FROM xtblt1, xtblj1 WHERE xtblt1.i = xtblj1.i; SET SCHEMA public; /*c1*/SELECT xtblj1.vc FROM blaine.xtblt1, blaine.xtblj1 WHERE xtblt1.i = xtblj1.i; SET SCHEMA blaine; /*c1*/SELECT xtblj1.vc FROM xtblt1, blaine.xtblj1 WHERE xtblt1.i = xtblj1.i; /*c1*/SELECT xtblj1.vc FROM blaine.xtblt1, xtblj1 WHERE xtblt1.i = xtblj1.i; /*c1*/SELECT xtblj1.vc FROM xtblt1, xtblj1 WHERE xtblt1.i = xtblj1.i; /*c1*/SELECT lbla.vc FROM xtblt1, xtblj1 lbla WHERE xtblt1.i = lbla.i; /*c1*/SELECT xtblj1.vc FROM xtblt1 lblb, xtblj1 WHERE lblb.i = xtblj1.i; /*c1*/SELECT lbla.vc FROM xtblt1 lblb, xtblj1 lbla WHERE lblb.i = lbla.i; /*c1*/SELECT lbla.vc FROM blaine.xtblt1, xtblj1 lbla WHERE xtblt1.i = lbla.i; /*c1*/SELECT xtblj1.vc FROM blaine.xtblt1 lblb, xtblj1 WHERE lblb.i = xtblj1.i; /*c1*/SELECT lbla.vc FROM blaine.xtblt1 lblb, xtblj1 lbla WHERE lblb.i = lbla.i; /*c1*/SELECT lbla.vc FROM xtblt1, blaine.xtblj1 lbla WHERE xtblt1.i = lbla.i; /*c1*/SELECT xtblj1.vc FROM xtblt1 lblb, blaine.xtblj1 WHERE lblb.i = xtblj1.i; /*c1*/SELECT lbla.vc FROM xtblt1 lblb, blaine.xtblj1 lbla WHERE lblb.i = lbla.i; /*u0*/SET TABLE xtblt1 READONLY true; /*e*/UPDATE xtblt1 set i = 11 WHERE i = 1; SET SCHEMA public; /*u0*/SET TABLE blaine.xtblt1 READONLY true; /*e*/SET TABLE information_schema.xtblt1 READONLY true; /*e*/SET TABLE other.xtblt1 READONLY true; SET SCHEMA blaine; /*u0*/SET TABLE xtblt1 READONLY false; SET SCHEMA public; /*u0*/SET TABLE blaine.xtblt1 READONLY false; SET SCHEMA blaine; /*c2*/SELECT i FROM xtblt1; -- N.b.: Do not commit DML changes so that this whole block may be repeated. COMMIT; SET AUTOCOMMIT false; /*u1*/UPDATE xtblt1 set i = 11 WHERE i = 1; /*u1*/UPDATE xtblt1 set xtblt1.i = 12 WHERE i = 11; /*u1*/UPDATE xtblt1 set xtblt1.i = 13 WHERE xtblt1.i = 12; SET SCHEMA public; /*u1*/UPDATE blaine.xtblt1 set i = 14 WHERE i = 13; /*u1*/UPDATE blaine.xtblt1 set xtblt1.i = 15 WHERE i = 14; /*u1*/UPDATE blaine.xtblt1 set xtblt1.i = 16 WHERE xtblt1.i = 15; SET SCHEMA blaine; /*e*/UPDATE other.xtblt1 set xtblt1.i = 17 WHERE xtblt1.i = 16; /*e*/UPDATE information_schema.xtblt1 set xtblt1.i = 17 WHERE xtblt1.i = 16; /*u1*/UPDATE xtblt1 ali set i = 17 WHERE i = 16; /*u1*/UPDATE xtblt1 ali set ali.i = 18 WHERE i = 17; /*u1*/UPDATE xtblt1 ali set ali.i = 19 WHERE ali.i = 18; /*u1*/UPDATE xtblt1 ali set i = 20 WHERE ali.i = 19; SET SCHEMA public; /*u1*/UPDATE blaine.xtblt1 ali set i = 21 WHERE i = 20; /*u1*/UPDATE blaine.xtblt1 ali set ali.i = 22 WHERE i = 21; /*u1*/UPDATE blaine.xtblt1 ali set ali.i = 23 WHERE ali.i = 22; /*u1*/UPDATE blaine.xtblt1 ali set i = 24 WHERE ali.i = 23; SET SCHEMA blaine; /*e*/UPDATE other.xtblt1 ali set i = 25 WHERE ali.i = 24; /*e*/UPDATE other.xtblt1 ali set i = 25 WHERE .i = 24; /*e*/UPDATE other.xtblt1 set i = 25 WHERE i = 24; /*e*/DELETE FROM other.xtblt1 ali WHERE ali.i = 24; /*e*/DELETE FROM other.xtblt1 ali; /*e*/DELETE FROM other.xtblt1 set WHERE i = 24; /*e*/DELETE FROM other.xtblt1 WHERE i = 24; /*e*/DELETE FROM system_information.xtblj1 WHERE xtblj1.i = 1; /*u1*/DELETE FROM xtblt1 WHERE i = 0; SET SCHEMA public; /*u1*/DELETE FROM blaine.xtblt1 WHERE i = 24; /*u1*/DELETE FROM blaine.xtblj1 WHERE xtblj1.i = 1; SET SCHEMA blaine; ROLLBACK; /*c2*/SELECT i FROM xtblt1; /*u0*/GRANT ALL ON xtblt1 TO otheruser; SET SCHEMA public; /*u0*/GRANT ALL ON blaine.xtblt2 TO otheruser; SET SCHEMA blaine; /*e*/GRANT ALL ON other.xtblt3 TO otheruser; /*e*/GRANT ALL ON information_schema.xtblt3 TO otheruser; /*u0*/REVOKE ALL ON xtblt1 FROM otheruser; SET SCHEMA public; /*u0*/REVOKE ALL ON blaine.xtblt2 FROM otheruser; SET SCHEMA blaine; /*e*/REVOKE ALL ON other.xtblt3 FROM otheruser; /*e*/REVOKE ALL ON information_schema.xtblt3 FROM otheruser; /*e*/DROP TABLE other.xtblt3; /*e*/DROP TABLE information_schema.xtblt4; /*e*/DROP TABLE xtblt101; /*e*/DROP TABLE blaine.xtblt101; /*u0*/DROP TABLE xtblt101 IF EXISTS; SET SCHEMA public; /*u0*/DROP TABLE blaine.xtblt101 IF EXISTS; SET SCHEMA blaine; -- Should "DROP TABLE nonexistentschema.notable IF EXISTS" work? /*u0*/DROP TABLE other.system_users IF exists; /*u0*/DROP TABLE system_users IF exists; -- ****************************** CACH Tables /*c2*/SELECT * FROM xctblt1; /*c1*/SELECT * FROM xctblt1 WHERE i = 0; /*c2*/SELECT * FROM xctblt1 WHERE i in (0, 1, 11, 12); /*c1*/SELECT * FROM xctblt1 WHERE i < 1; /*c1*/SELECT * FROM xctblt1 WHERE xctblt1.i = (SELECT i FROM xtblj1); /*c1*/SELECT * FROM xctblt1 WHERE xctblt1.i = (SELECT i FROM xtblj1 WHERE xtblj1.i = 1); /*c1*/SELECT * FROM xctblt1 WHERE xctblt1.i in (SELECT i FROM xtblj1); /*c0*/SELECT * FROM xctblt1 WHERE xctblt1.i = (SELECT i FROM xtblj1 WHERE i = 0); /*c1*/SELECT * FROM blaine.xctblt1 WHERE xctblt1.i = (SELECT i FROM xtblj1); /*c1*/SELECT * FROM blaine.xctblt1 WHERE xctblt1.i in (SELECT i FROM xtblj1); /*c1*/SELECT * FROM blaine.xctblt1 WHERE xctblt1.i = (SELECT i FROM xtblj1 WHERE i = 1); /*c1*/SELECT * FROM xctblt1 WHERE xctblt1.i = (SELECT i FROM blaine.xtblj1); /*c1*/SELECT * FROM xctblt1 WHERE xctblt1.i in (SELECT i FROM blaine.xtblj1); /*c1*/SELECT * FROM xctblt1 WHERE xctblt1.i = (SELECT i FROM blaine.xtblj1 WHERE i = 1); /*c1*/SELECT * FROM xctblt1 WHERE xctblt1.i = (SELECT xtblj1.i FROM blaine.xtblj1); /*c1*/SELECT * FROM xctblt1 WHERE xctblt1.i in (SELECT xtblj1.i FROM xtblj1); /*c1*/SELECT * FROM xctblt1 WHERE xctblt1.i = (SELECT xtblj1.i FROM xtblj1 WHERE i = 1); /*c1*/SELECT * FROM xctblt1 WHERE xctblt1.i = (SELECT i FROM blaine.xtblj1 WHERE xtblj1.i = 1); /*c1*/SELECT * FROM xctblt1 WHERE xctblt1.i = (SELECT xtblj1.i FROM xtblj1 WHERE xtblj1.i = 1); /*c1*/SELECT * FROM xctblt1 WHERE i = (SELECT i FROM xtblj1); /*c1*/SELECT * FROM xctblt1 WHERE i in (SELECT i FROM xtblj1); /*c1*/SELECT * FROM xctblt1 WHERE i = (SELECT i FROM xtblj1 WHERE i = 1); /*c1*/SELECT * FROM blaine.xctblt1 WHERE i = (SELECT i FROM xtblj1); /*c1*/SELECT * FROM blaine.xctblt1 WHERE i in (SELECT i FROM xtblj1); /*c0*/SELECT * FROM blaine.xctblt1 WHERE i = (SELECT i FROM xtblj1 WHERE i = 0); /*c1*/SELECT * FROM xctblt1 WHERE i = (SELECT i FROM blaine.xtblj1); /*c1*/SELECT * FROM xctblt1 WHERE i in (SELECT i FROM blaine.xtblj1); /*c0*/SELECT * FROM xctblt1 WHERE i = (SELECT i FROM blaine.xtblj1 WHERE i = 0); /*c1*/SELECT * FROM xctblt1 WHERE i = (SELECT xtblj1.i FROM blaine.xtblj1); /*c1*/SELECT * FROM xctblt1 WHERE i in (SELECT xtblj1.i FROM xtblj1); /*c0*/SELECT * FROM xctblt1 WHERE i = (SELECT xtblj1.i FROM xtblj1 WHERE i = 0); /*c1*/SELECT * FROM xctblt1 WHERE i = (SELECT i FROM blaine.xtblj1 WHERE xtblj1.i = 1); /*c1*/SELECT * FROM xctblt1 WHERE i = (SELECT xtblj1.i FROM xtblj1 WHERE xtblj1.i = 1); /*e*/SELECT * FROM system_users WHERE user = 'SA'; /*e*/SELECT * FROM other.xctblt1; /*e*/SELECT * FROM other.system_users; /*e*/SELECT * FROM information_schema.xctblt1; /*e*/SELECT * FROM blaine.system_users; SET SCHEMA public; /*c2*/SELECT * FROM blaine.xctblt1; /*c1*/SELECT * FROM information_schema.system_users WHERE user = 'SA'; /*c1*/SELECT * FROM blaine.xctblt1 WHERE i = 0; /*e*/SELECT * FROM other.xctblt1 WHERE i = 0; /*e*/SELECT * FROM information_schema.xctblt1 WHERE i = 0; /*c1*/SELECT * FROM blaine.xctblt1, blaine.xtblj1 WHERE xctblt1.i = xtblj1.i; SET SCHEMA blaine; /*c1*/SELECT * FROM xctblt1, blaine.xtblj1 WHERE xctblt1.i = xtblj1.i; /*c1*/SELECT * FROM blaine.xctblt1, xtblj1 WHERE xctblt1.i = xtblj1.i; /*c1*/SELECT * FROM xctblt1, xtblj1 WHERE xctblt1.i = xtblj1.i; SET SCHEMA public; /*c1*/SELECT vc FROM blaine.xctblt1, blaine.xtblj1 WHERE xctblt1.i = xtblj1.i; SET SCHEMA blaine; /*c1*/SELECT vc FROM xctblt1, blaine.xtblj1 WHERE xctblt1.i = xtblj1.i; /*c1*/SELECT vc FROM blaine.xctblt1, xtblj1 WHERE xctblt1.i = xtblj1.i; /*c1*/SELECT vc FROM xctblt1, xtblj1 WHERE xctblt1.i = xtblj1.i; SET SCHEMA public; /*c1*/SELECT xtblj1.vc FROM blaine.xctblt1, blaine.xtblj1 WHERE xctblt1.i = xtblj1.i; SET SCHEMA blaine; /*c1*/SELECT xtblj1.vc FROM xctblt1, blaine.xtblj1 WHERE xctblt1.i = xtblj1.i; /*c1*/SELECT xtblj1.vc FROM blaine.xctblt1, xtblj1 WHERE xctblt1.i = xtblj1.i; /*c1*/SELECT xtblj1.vc FROM xctblt1, xtblj1 WHERE xctblt1.i = xtblj1.i; /*c1*/SELECT lbla.vc FROM xctblt1, xtblj1 lbla WHERE xctblt1.i = lbla.i; /*c1*/SELECT xtblj1.vc FROM xctblt1 lblb, xtblj1 WHERE lblb.i = xtblj1.i; /*c1*/SELECT lbla.vc FROM xctblt1 lblb, xtblj1 lbla WHERE lblb.i = lbla.i; /*c1*/SELECT lbla.vc FROM blaine.xctblt1, xtblj1 lbla WHERE xctblt1.i = lbla.i; /*c1*/SELECT xtblj1.vc FROM blaine.xctblt1 lblb, xtblj1 WHERE lblb.i = xtblj1.i; /*c1*/SELECT lbla.vc FROM blaine.xctblt1 lblb, xtblj1 lbla WHERE lblb.i = lbla.i; /*c1*/SELECT lbla.vc FROM xctblt1, blaine.xtblj1 lbla WHERE xctblt1.i = lbla.i; /*c1*/SELECT xtblj1.vc FROM xctblt1 lblb, blaine.xtblj1 WHERE lblb.i = xtblj1.i; /*c1*/SELECT lbla.vc FROM xctblt1 lblb, blaine.xtblj1 lbla WHERE lblb.i = lbla.i; /*u0*/SET TABLE xctblt1 READONLY true; /*e*/UPDATE xctblt1 set i = 11 WHERE i = 1; SET SCHEMA public; /*u0*/SET TABLE blaine.xctblt1 READONLY true; SET SCHEMA blaine; /*e*/SET TABLE information_schema.xctblt1 READONLY true; /*e*/SET TABLE other.xctblt1 READONLY true; /*u0*/SET TABLE xctblt1 READONLY false; SET SCHEMA public; /*u0*/SET TABLE blaine.xctblt1 READONLY false; SET SCHEMA blaine; /*c2*/SELECT i FROM xctblt1; -- N.b.: Do not commit DML changes so that this whole block may be repeated. COMMIT; SET AUTOCOMMIT false; /*u1*/UPDATE xctblt1 set i = 11 WHERE i = 1; /*u1*/UPDATE xctblt1 set xctblt1.i = 12 WHERE i = 11; /*u1*/UPDATE xctblt1 set xctblt1.i = 13 WHERE xctblt1.i = 12; SET SCHEMA public; /*u1*/UPDATE blaine.xctblt1 set i = 14 WHERE i = 13; /*u1*/UPDATE blaine.xctblt1 set xctblt1.i = 15 WHERE i = 14; /*u1*/UPDATE blaine.xctblt1 set xctblt1.i = 16 WHERE xctblt1.i = 15; SET SCHEMA blaine; /*e*/UPDATE other.xctblt1 set xctblt1.i = 17 WHERE xctblt1.i = 16; /*e*/UPDATE information_schema.xctblt1 set xctblt1.i = 17 WHERE xctblt1.i = 16; /*u1*/UPDATE xctblt1 ali set i = 17 WHERE i = 16; /*u1*/UPDATE xctblt1 ali set ali.i = 18 WHERE i = 17; /*u1*/UPDATE xctblt1 ali set ali.i = 19 WHERE ali.i = 18; /*u1*/UPDATE xctblt1 ali set i = 20 WHERE ali.i = 19; SET SCHEMA public; /*u1*/UPDATE blaine.xctblt1 ali set i = 21 WHERE i = 20; /*u1*/UPDATE blaine.xctblt1 ali set ali.i = 22 WHERE i = 21; /*u1*/UPDATE blaine.xctblt1 ali set ali.i = 23 WHERE ali.i = 22; /*u1*/UPDATE blaine.xctblt1 ali set i = 24 WHERE ali.i = 23; SET SCHEMA blaine; /*e*/UPDATE other.xctblt1 ali set i = 25 WHERE ali.i = 24; /*e*/UPDATE other.xctblt1 ali set i = 25 WHERE .i = 24; /*e*/UPDATE other.xctblt1 set i = 25 WHERE i = 24; /*e*/DELETE FROM other.xctblt1 ali WHERE ali.i = 24; /*e*/DELETE FROM other.xctblt1 ali; /*e*/DELETE FROM other.xctblt1 set WHERE i = 24; /*e*/DELETE FROM other.xctblt1 WHERE i = 24; /*e*/DELETE FROM system_information.xtblj1 WHERE xtblj1.i = 1; /*u1*/DELETE FROM xctblt1 WHERE i = 0; SET SCHEMA public; /*u1*/DELETE FROM blaine.xctblt1 WHERE i = 24; /*u1*/DELETE FROM blaine.xtblj1 WHERE xtblj1.i = 1; SET SCHEMA blaine; ROLLBACK; /*c2*/SELECT i FROM xctblt1; /*u0*/GRANT ALL ON xctblt1 TO otheruser; SET SCHEMA public; /*u0*/GRANT ALL ON blaine.xctblt2 TO otheruser; SET SCHEMA blaine; /*e*/GRANT ALL ON other.xctblt3 TO otheruser; /*e*/GRANT ALL ON information_schema.xctblt3 TO otheruser; /*u0*/REVOKE ALL ON xctblt1 FROM otheruser; SET SCHEMA public; /*u0*/REVOKE ALL ON blaine.xctblt2 FROM otheruser; SET SCHEMA blaine; /*e*/REVOKE ALL ON other.xctblt3 FROM otheruser; /*e*/REVOKE ALL ON information_schema.xctblt3 FROM otheruser; /*e*/DROP TABLE other.xctblt3; /*e*/DROP TABLE information_schema.xctblt4; /*e*/DROP TABLE xctblt101; /*e*/DROP TABLE blaine.xctblt101; /*u0*/DROP TABLE xctblt101 IF EXISTS; SET SCHEMA public; /*u0*/DROP TABLE blaine.xctblt101 IF EXISTS; SET SCHEMA blaine; -- Should "DROP TABLE nonexistentschema.notable IF EXISTS" work? /*u0*/DROP TABLE other.system_users IF exists; /*u0*/DROP TABLE system_users IF exists; -- ****************************** Views /*c2*/SELECT * FROM xvwv1; SET SCHEMA public; /*c2*/SELECT * FROM blaine.xvwv1; SET SCHEMA blaine; /*c2*/SELECT * FROM xvwv2; /*c2*/SELECT * FROM xvwv3; /*c1*/SELECT * FROM xvwv4; /*c1*/SELECT * FROM xvwv5; /*c1*/SELECT * FROM xvwv8; /*c0*/SELECT * FROM xvwv9; /*c0*/SELECT * FROM xvwv10; /*c0*/SELECT * FROM xvwv11; /*c0*/SELECT * FROM xvwv12; /*e*/SELECT * FROM xvwv13; /*c0*/SELECT * FROM xvwv14; /*c0*/SELECT * FROM xvwv15; /*c0*/SELECT * FROM xvwv16; /*c0*/SELECT * FROM xvwv17; /*c0*/SELECT * FROM xvwv18; /*c1*/SELECT * FROM xvwv19; /*c1*/SELECT * FROM xvwv20; /*c1*/SELECT * FROM xvwv21; /*c1*/SELECT * FROM xvwv22; /*c1*/SELECT * FROM xvwv23; /*c1*/SELECT * FROM xvwv24; /*c1*/SELECT * FROM xvwv25; /*c1*/SELECT * FROM xvwv26; /*c2*/SELECT * FROM xvwv28; /*c1*/SELECT * FROM xvwv29; /*c1*/SELECT * FROM xvwv30; /*c1*/SELECT * FROM xvwv31; /*c0*/SELECT * FROM xvwv32; /*c1*/SELECT * FROM xvwv33; /*c1*/SELECT * FROM xvwv34; /*c0*/SELECT * FROM xvwv35; /*c1*/SELECT * FROM xvwv36; /*c1*/SELECT * FROM xvwv37; /*c1*/SELECT * FROM xvwv38; /*c1*/SELECT * FROM xvwv39; /*c1*/SELECT * FROM xvwv40; /*c1*/SELECT * FROM xvwv41; /*c1*/SELECT * FROM xvwv42; /*c1*/SELECT * FROM xvwv43; /*c1*/SELECT * FROM xvwv44; /*c1*/SELECT * FROM xvwv45; /*c1*/SELECT * FROM xvwv46; /*c1*/SELECT * FROM xvwv47; /*c1*/SELECT * FROM xvwv48; /*c1*/SELECT * FROM xvwv49; /*c1*/SELECT * FROM xvwv50; /*c1*/SELECT * FROM xvwv51; /*c1*/SELECT * FROM xvwv52; /*c1*/SELECT * FROM xvwv53; /*c1*/SELECT * FROM xvwv54; /*c1*/SELECT * FROM xvwv55; /*c1*/SELECT * FROM xvwv56; /*c1*/SELECT * FROM xvwv57; /*c1*/SELECT * FROM xvwv1, xvwj1 WHERE xvwv1.i = xvwj1.i; SET SCHEMA public; /*c1*/SELECT * FROM blaine.xvwv1, blaine.xvwj1 WHERE xvwv1.i = xvwj1.i; SET SCHEMA blaine; /*c2*/SELECT * FROM xvwv1 WHERE i in (0, 1, 11, 12); /*c1*/SELECT * FROM xvwv1 WHERE i < 1; /*c1*/SELECT * FROM xvwv1 WHERE xvwv1.i = (SELECT i FROM xvwj1); /*c1*/SELECT * FROM xvwv1 WHERE xvwv1.i in (SELECT i FROM xvwj1); /*c1*/SELECT * FROM xvwv1 WHERE xvwv1.i = (SELECT i FROM xvwj1 WHERE i = 1); /*c1*/SELECT * FROM blaine.xvwv1 WHERE xvwv1.i in (SELECT i FROM xvwj1); /*c1*/SELECT * FROM blaine.xvwv1 WHERE xvwv1.i = (SELECT i FROM xvwj1 WHERE i = 1); /*c1*/SELECT * FROM xvwv1 WHERE xvwv1.i = (SELECT i FROM blaine.xvwj1); /*c1*/SELECT * FROM xvwv1 WHERE xvwv1.i in (SELECT i FROM blaine.xvwj1); /*c0*/SELECT * FROM xvwv1 WHERE xvwv1.i = (SELECT i FROM blaine.xvwj1 WHERE i = 0); /*c1*/SELECT * FROM xvwv1 WHERE xvwv1.i = (SELECT xvwj1.i FROM blaine.xvwj1); /*c1*/SELECT * FROM xvwv1 WHERE xvwv1.i in (SELECT xvwj1.i FROM xvwj1); /*c1*/SELECT * FROM xvwv1 WHERE xvwv1.i = (SELECT xvwj1.i FROM xvwj1 WHERE i = 1); /*c0*/SELECT * FROM xvwv1 WHERE xvwv1.i = (SELECT i FROM blaine.xvwj1 WHERE xvwj1.i = 0); /*c0*/SELECT * FROM xvwv1 WHERE xvwv1.i = (SELECT xvwj1.i FROM xvwj1 WHERE xvwj1.i = 0); /*c1*/SELECT * FROM xvwv1 WHERE i = (SELECT i FROM xvwj1); /*c1*/SELECT * FROM xvwv1 WHERE i in (SELECT i FROM xvwj1); /*c1*/SELECT * FROM xvwv1 WHERE i = (SELECT i FROM xvwj1 WHERE i = 1); /*c1*/SELECT * FROM blaine.xvwv1 WHERE i = (SELECT i FROM xvwj1); /*c1*/SELECT * FROM blaine.xvwv1 WHERE i in (SELECT i FROM xvwj1); /*c1*/SELECT * FROM blaine.xvwv1 WHERE i = (SELECT i FROM xvwj1 WHERE i = 1); /*c1*/SELECT * FROM xvwv1 WHERE i = (SELECT i FROM blaine.xvwj1); /*c1*/SELECT * FROM xvwv1 WHERE i in (SELECT i FROM blaine.xvwj1); /*c1*/SELECT * FROM xvwv1 WHERE i = (SELECT i FROM blaine.xvwj1 WHERE i = 1); /*c1*/SELECT * FROM xvwv1 WHERE i = (SELECT xvwj1.i FROM blaine.xvwj1); /*c1*/SELECT * FROM xvwv1 WHERE i in (SELECT xvwj1.i FROM xvwj1); /*c1*/SELECT * FROM xvwv1 WHERE i = (SELECT xvwj1.i FROM xvwj1 WHERE i = 1); /*c1*/SELECT * FROM xvwv1 WHERE i = (SELECT i FROM blaine.xvwj1 WHERE xvwj1.i = 1); /*c1*/SELECT * FROM xvwv1 WHERE i = (SELECT xvwj1.i FROM xvwj1 WHERE xvwj1.i = 1); /*c2*/SELECT * FROM xvwv1; /*c1*/SELECT * FROM xvwv1 WHERE i = 0; /*c2*/SELECT * FROM xvwv1 WHERE i in (0, 1, 11, 12); /*c1*/SELECT * FROM xvwv1 WHERE i < 1; /*c1*/SELECT * FROM xvwv1 WHERE xvwv1.i = (SELECT i FROM xvwj1); /*c1*/SELECT * FROM xvwv1 WHERE xvwv1.i in (SELECT i FROM xvwj1); /*c1*/SELECT * FROM xvwv1 WHERE xvwv1.i = (SELECT i FROM xvwj1 WHERE i = 1); /*c1*/SELECT * FROM blaine.xvwv1 WHERE xvwv1.i = (SELECT i FROM xvwj1); /*c1*/SELECT * FROM blaine.xvwv1 WHERE xvwv1.i in (SELECT i FROM xvwj1); /*c1*/SELECT * FROM blaine.xvwv1 WHERE xvwv1.i = (SELECT i FROM xvwj1 WHERE i = 1); /*c1*/SELECT * FROM xvwv1 WHERE xvwv1.i = (SELECT i FROM blaine.xvwj1); /*c1*/SELECT * FROM xvwv1 WHERE xvwv1.i in (SELECT i FROM blaine.xvwj1); /*c1*/SELECT * FROM xvwv1 WHERE xvwv1.i = (SELECT i FROM blaine.xvwj1 WHERE i = 1); /*c1*/SELECT * FROM xvwv1 WHERE xvwv1.i = (SELECT xvwj1.i FROM blaine.xvwj1); /*c1*/SELECT * FROM xvwv1 WHERE xvwv1.i in (SELECT xvwj1.i FROM xvwj1); /*c1*/SELECT * FROM xvwv1 WHERE xvwv1.i = (SELECT xvwj1.i FROM xvwj1 WHERE i = 1); /*c1*/SELECT * FROM xvwv1 WHERE xvwv1.i = (SELECT i FROM blaine.xvwj1 WHERE xvwj1.i = 1); /*c1*/SELECT * FROM xvwv1 WHERE xvwv1.i = (SELECT xvwj1.i FROM xvwj1 WHERE xvwj1.i = 1); /*c1*/SELECT * FROM xvwv1 WHERE i = (SELECT i FROM xvwj1); /*c1*/SELECT * FROM xvwv1 WHERE i in (SELECT i FROM xvwj1); /*c1*/SELECT * FROM xvwv1 WHERE i = (SELECT i FROM xvwj1 WHERE i = 1); /*c1*/SELECT * FROM blaine.xvwv1 WHERE i = (SELECT i FROM xvwj1); /*c1*/SELECT * FROM blaine.xvwv1 WHERE i in (SELECT i FROM xvwj1); /*c1*/SELECT * FROM blaine.xvwv1 WHERE i = (SELECT i FROM xvwj1 WHERE i = 1); /*c1*/SELECT * FROM xvwv1 WHERE i = (SELECT i FROM blaine.xvwj1); /*c1*/SELECT * FROM xvwv1 WHERE i in (SELECT i FROM blaine.xvwj1); /*c1*/SELECT * FROM xvwv1 WHERE i = (SELECT i FROM blaine.xvwj1 WHERE i = 1); /*c1*/SELECT * FROM xvwv1 WHERE i = (SELECT xvwj1.i FROM blaine.xvwj1); /*c1*/SELECT * FROM xvwv1 WHERE i in (SELECT xvwj1.i FROM xvwj1); /*c1*/SELECT * FROM xvwv1 WHERE i = (SELECT xvwj1.i FROM xvwj1 WHERE i = 1); /*c1*/SELECT * FROM xvwv1 WHERE i = (SELECT i FROM blaine.xvwj1 WHERE xvwj1.i = 1); /*c1*/SELECT * FROM xvwv1 WHERE i = (SELECT xvwj1.i FROM xvwj1 WHERE xvwj1.i = 1); /*e*/SELECT * FROM other.xvwv1; /*e*/SELECT * FROM information_schema.xvwv1; SET SCHEMA public; /*c2*/SELECT * FROM blaine.xvwv1; /*c1*/SELECT * FROM blaine.xvwv1 WHERE i = 0; SET SCHEMA blaine; /*e*/SELECT * FROM other.xvwv1 WHERE i = 0; /*e*/SELECT * FROM information_schema.xvwv1 WHERE i = 0; SET SCHEMA public; /*u1*/SELECT * INTO blaine.vwt2 FROM blaine.xvwv1 WHERE i = 0; /*c1*/SELECT * FROM blaine.vwt2; SET SCHEMA blaine; DROP TABLE vwt2; SET SCHEMA public; /*c1*/SELECT * FROM blaine.xvwv1, blaine.xvwj1 WHERE xvwv1.i = xvwj1.i; SET SCHEMA blaine; /*c1*/SELECT * FROM xvwv1, blaine.xvwj1 WHERE xvwv1.i = xvwj1.i; /*c1*/SELECT * FROM blaine.xvwv1, xvwj1 WHERE xvwv1.i = xvwj1.i; /*c1*/SELECT * FROM xvwv1, xvwj1 WHERE xvwv1.i = xvwj1.i; SET SCHEMA public; /*c1*/SELECT vc FROM blaine.xvwv1, blaine.xvwj1 WHERE xvwv1.i = xvwj1.i; SET SCHEMA blaine; /*c1*/SELECT vc FROM xvwv1, blaine.xvwj1 WHERE xvwv1.i = xvwj1.i; /*c1*/SELECT vc FROM blaine.xvwv1, xvwj1 WHERE xvwv1.i = xvwj1.i; /*c1*/SELECT vc FROM xvwv1, xvwj1 WHERE xvwv1.i = xvwj1.i; SET SCHEMA public; /*c1*/SELECT xvwj1.vc FROM blaine.xvwv1, blaine.xvwj1 WHERE xvwv1.i = xvwj1.i; SET SCHEMA blaine; /*c1*/SELECT xvwj1.vc FROM xvwv1, blaine.xvwj1 WHERE xvwv1.i = xvwj1.i; /*c1*/SELECT xvwj1.vc FROM blaine.xvwv1, xvwj1 WHERE xvwv1.i = xvwj1.i; /*c1*/SELECT xvwj1.vc FROM xvwv1, xvwj1 WHERE xvwv1.i = xvwj1.i; /*c1*/SELECT lbla.vc FROM xvwv1, xvwj1 lbla WHERE xvwv1.i = lbla.i; /*c1*/SELECT xvwj1.vc FROM xvwv1 lblb, xvwj1 WHERE lblb.i = xvwj1.i; /*c1*/SELECT lbla.vc FROM xvwv1 lblb, xvwj1 lbla WHERE lblb.i = lbla.i; /*c1*/SELECT lbla.vc FROM blaine.xvwv1, xvwj1 lbla WHERE xvwv1.i = lbla.i; /*c1*/SELECT xvwj1.vc FROM blaine.xvwv1 lblb, xvwj1 WHERE lblb.i = xvwj1.i; /*c1*/SELECT lbla.vc FROM blaine.xvwv1 lblb, xvwj1 lbla WHERE lblb.i = lbla.i; /*c1*/SELECT lbla.vc FROM xvwv1, blaine.xvwj1 lbla WHERE xvwv1.i = lbla.i; /*c1*/SELECT xvwj1.vc FROM xvwv1 lblb, blaine.xvwj1 WHERE lblb.i = xvwj1.i; /*c1*/SELECT lbla.vc FROM xvwv1 lblb, blaine.xvwj1 lbla WHERE lblb.i = lbla.i; /*u0*/GRANT ALL ON xvwv1 TO otheruser; SET SCHEMA public; /*u0*/GRANT ALL ON blaine.xvwv2 TO otheruser; SET SCHEMA blaine; /*e*/GRANT ALL ON other.xvwv3 TO otheruser; /*e*/GRANT ALL ON information_schema.xvwv3 TO otheruser; /*u0*/REVOKE ALL ON xvwv1 FROM otheruser; SET SCHEMA public; /*u0*/REVOKE ALL ON blaine.xvwv2 FROM otheruser; SET SCHEMA blaine; /*e*/REVOKE ALL ON other.xvwv3 FROM otheruser; /*e*/REVOKE ALL ON information_schema.xvwv3 FROM otheruser; -- ****************************** Indexes /*c2*/SELECT * from xindt1; SET SCHEMA public; /*c2*/SELECT * from blaine.xindt2; /*c2*/SELECT * from blaine.xindt3; SET SCHEMA blaine; /*c2*/SELECT * from xindt4; -- ****************************** CACH Indexes /*c2*/SELECT * from xcindt1; SET SCHEMA public; /*c2*/SELECT * from blaine.xcindt2; /*c2*/SELECT * from blaine.xcindt3; SET SCHEMA blaine; /*c2*/SELECT * from xcindt4; -- ****************************** Sequences -- N.b.: Do not commit DML changes so that this whole block may be repeated. /*r0*/SELECT next value FOR xs1 FROM xseqt1; SET SCHEMA public; -- Sequence dflt schema should come from Session (set schema), not table. /*e*/SELECT next value FOR xs2 FROM blaine.xseqt1; /*e*/SELECT next value FOR blaine.xs1 FROM xseqt1; /*r2*/SELECT next value FOR blaine.xs2 FROM blaine.xseqt1; SET SCHEMA blaine; -- Just to reset orig. value before persisting (can't roll back seq.s). ALTER SEQUENCE xs1 RESTART WITH 0; ALTER SEQUENCE xs2 RESTART WITH 2; /*e*/DROP SEQUENCE xs101; /*e*/DROP SEQUENCE blaine.xs101; /*e*/DROP SEQUENCE information_schema.xs1; /*e*/DROP SEQUENCE other.xs1; -- ****************************** Triggers /*e*/CREATE TRIGGER xtrgtrig1 AFTER INSERT ON xtrgt1 CALL 'org.hsqldb.test.BlaineTrig'; -- Create existing /*e*/CREATE TRIGGER blaine.xtrgtrig2 AFTER INSERT ON xtrgt2 CALL 'org.hsqldb.test.BlaineTrig'; -- Create existing SET SCHEMA public; /*e*/CREATE TRIGGER blaine.xtrgtrig2 AFTER INSERT ON blaine.xtrgt2 CALL 'org.hsqldb.test.BlaineTrig'; -- Create existing SET SCHEMA blaine; -- ****************************** Constraints -- N.b.: Do not commit DML changes so that this whole block may be repeated. COMMIT; SET AUTOCOMMIT false; /*u1*/INSERT INTO xcont1 VALUES (0); SET SCHEMA public; /*u1*/INSERT INTO blaine.xcont2 VALUES (0); SET SCHEMA blaine; /*u1*/INSERT INTO xcont3 VALUES (0); /*u1*/INSERT INTO xcont4 VALUES (0); /*u1*/INSERT INTO xcont5 VALUES (0); /*u1*/INSERT INTO xcont6 VALUES (0); /*u1*/INSERT INTO xcont7 VALUES (0); /*u1*/INSERT INTO xcont8 VALUES (0); -- Note that error message implies that problem is due to table xconj1, not data: /*u1*/INSERT INTO xcont9 VALUES (1); /*u1*/INSERT INTO xcont10 VALUES (1); /*u1*/INSERT INTO xcont11 VALUES (1); /*u1*/INSERT INTO xcont12 VALUES (1); /*u1*/INSERT INTO xcont13 VALUES (1); /*u1*/INSERT INTO xcont14 VALUES (1); /*u1*/INSERT INTO xcont15 VALUES (1); /*u1*/INSERT INTO xcont16 VALUES (1); /*u1*/INSERT INTO xcont17 VALUES (0); /*u1*/INSERT INTO xcont18 VALUES (0); /*u1*/INSERT INTO xcont19 VALUES (0); /*u1*/INSERT INTO xcont20 VALUES (0); /*e*/INSERT INTO xcont1 VALUES (0); /*e*/INSERT INTO xcont2 VALUES (0); /*e*/INSERT INTO xcont3 VALUES (0); /*e*/INSERT INTO xcont4 VALUES (0); /*e*/INSERT INTO xcont5 VALUES (0); /*e*/INSERT INTO xcont6 VALUES (0); /*e*/INSERT INTO xcont7 VALUES (0); /*e*/INSERT INTO xcont8 VALUES (0); /*e*/INSERT INTO xcont9 VALUES (0); /*e*/INSERT INTO xcont10 VALUES (0); /*e*/INSERT INTO xcont11 VALUES (0); /*e*/INSERT INTO xcont12 VALUES (0); /*e*/INSERT INTO xcont13 VALUES (0); /*e*/INSERT INTO xcont14 VALUES (0); /*e*/INSERT INTO xcont15 VALUES (0); /*e*/INSERT INTO xcont16 VALUES (0); /*e*/INSERT INTO xcont17 VALUES (1); /*e*/INSERT INTO xcont18 VALUES (1); /*e*/INSERT INTO xcont19 VALUES (1); /*e*/INSERT INTO xcont20 VALUES (1); /*c1*/SELECT * FROM xcont1; /*c1*/SELECT * FROM xcont2; /*c1*/SELECT * FROM xcont3; /*c1*/SELECT * FROM xcont4; /*c1*/SELECT * FROM xcont5; /*c1*/SELECT * FROM xcont6; /*c1*/SELECT * FROM xcont7; /*c1*/SELECT * FROM xcont8; /*c1*/SELECT * FROM xcont9; /*c1*/SELECT * FROM xcont10; /*c1*/SELECT * FROM xcont11; /*c1*/SELECT * FROM xcont12; /*c1*/SELECT * FROM xcont13; /*c1*/SELECT * FROM xcont14; /*c1*/SELECT * FROM xcont15; /*c1*/SELECT * FROM xcont16; /*c1*/SELECT * FROM xcont17; /*c1*/SELECT * FROM xcont18; /*c1*/SELECT * FROM xcont19; /*c1*/SELECT * FROM xcont20; ROLLBACK; -- ****************************** ALTERs -- Add tests when time permits. DROP USER otheruser; -- This to test .script persistence. SHUTDOWN; hsqldb-1.8.0.10.orig/testrun/hsqldb/TestSelfQueries.txt0000644000175000017500000001367210240555526021445 0ustar renerene-- -- TestSelfQueries.txt -- -- Tests for Query results, especially the neutrality of constraints and indexes -- drop table TESTTABLE if exists; create cached table TESTTABLE ( aString varchar(256) not null, firstNum integer not null, aDate date not null, secondNum integer not null, thirdNum integer not null, aName varchar(32) not null ); create index IDX_TESTTABLE_aString on TESTTABLE (aString); create index IDX_TESTTABLE_aDate_secondNum on TESTTABLE (aDate,secondNum); insert into TESTTABLE(aString, firstNum, aDate, secondNum, thirdNum, aName) values ('Current', 22, '2003-11-10', 18, 3, 'my name goes here'); insert into TESTTABLE(aString, firstNum, aDate, secondNum, thirdNum, aName) values ('Popular', 23, '2003-11-10', 18, 3, 'my name goes here'); insert into TESTTABLE(aString, firstNum, aDate, secondNum, thirdNum, aName) values ('New', 5, '2003-11-10', 18, 3, 'my name goes here'); insert into TESTTABLE(aString, firstNum, aDate, secondNum, thirdNum, aName) values ('Old', 5, '2003-11-10', 18, 3, 'my name goes here'); insert into TESTTABLE(aString, firstNum, aDate, secondNum, thirdNum, aName) values ('CCurrent', 5, '2003-11-10', 18, 3, 'my name goes here'); insert into TESTTABLE(aString, firstNum, aDate, secondNum, thirdNum, aName) values ('ELV', 5, '2003-11-10', 18, 3, 'my name goes here'); insert into TESTTABLE(aString, firstNum, aDate, secondNum, thirdNum, aName) values ('ELNA', 5, '2003-11-10', 18, 3, 'my name goes here'); insert into TESTTABLE(aString, firstNum, aDate, secondNum, thirdNum, aName) values ('Older', 5, '2003-11-10', 18, 3, 'my name goes here'); insert into TESTTABLE(aString, firstNum, aDate, secondNum, thirdNum, aName) values ('RA', 20, '2003-11-10', 18, 3, 'my name goes here'); insert into TESTTABLE(aString, firstNum, aDate, secondNum, thirdNum, aName) values ('RP', 2, '2003-11-10', 18, 3, 'my name goes here'); insert into TESTTABLE(aString, firstNum, aDate, secondNum, thirdNum, aName) values ('VS', 3, '2003-11-10', 18, 3, 'my name goes here'); -- /*c11*/select * from testtable where adate = '2003-11-10' and secondNum = 18; /*c11*/select * from testtable where adate = '2003-11-10'; /*c1*/select * from testtable where adate = '2003-11-10' and firstNum = 20; /*c11*/select * from testtable where adate = '2003-11-10' and thirdNum = 3; drop index IDX_TESTTABLE_aString; drop index IDX_TESTTABLE_aDate_secondNum; alter table TESTTABLE add constraint tt_pk primary key (astring); /*c11*/select * from testtable where adate = '2003-11-10' and secondNum = 18; /*c11*/select * from testtable where adate = '2003-11-10'; /*c1*/select * from testtable where adate = '2003-11-10' and firstNum = 20; /*c11*/select * from testtable where adate = '2003-11-10' and thirdNum = 3; alter table testtable drop column aname; /*c1*/select * from testtable where adate = '2003-11-10' and firstNum = 20; /*c11*/select * from testtable where adate = '2003-11-10' and thirdNum = 3; alter table testtable add column aname char(10) default 'a string' not null; /*c1*/select * from testtable where adate = '2003-11-10' and firstNum = 20; /*c11*/select * from testtable where adate = '2003-11-10' and thirdNum = 3; /*e*/update testtable set name=null; -- bug #722443 DROP TABLE CONFIGUSER IF EXISTS; CREATE CACHED TABLE CONFIGUSER(USR_USERID NUMERIC NOT NULL PRIMARY KEY,USR_USERNAME VARCHAR(10) NOT NULL,USR_PASSWORD VARCHAR(10)); INSERT INTO CONFIGUSER VALUES(-5,'guest','guest'); INSERT INTO CONFIGUSER VALUES(-4,'user','user'); INSERT INTO CONFIGUSER VALUES(-3,'owner','owner'); INSERT INTO CONFIGUSER VALUES(-2,'admin','xxx'); INSERT INTO CONFIGUSER VALUES(-1,'sadmin','xxx'); INSERT INTO CONFIGUSER VALUES(0,'nobody',null); -- select all users with their username as password /*c3*/select * from configuser where usr_username = usr_password; -- create a unique index on one column CREATE UNIQUE INDEX IDX_USERNAME ON CONFIGUSER(USR_USERNAME); -- select all users with their username as password /*c3*/select * from configuser where usr_username = usr_password; /*c3*/select * from configuser where usr_username in (select usr_password from configuser) /*c3*/select * from configuser where usr_password in (select usr_username from configuser) /*c3*/select * from configuser where usr_password in (usr_username); /*c2*/select * from configuser where usr_password in ('guest', 'user', 'wrong') DROP INDEX IDX_USERNAME -- select all users with their username as password /*c3*/select * from configuser where usr_username = usr_password; /*c3*/select * from configuser where usr_username in (select usr_password from configuser) /*c3*/select * from configuser where usr_password in (select usr_username from configuser) /*c3*/select * from configuser where usr_password in (usr_username); /*c2*/select * from configuser where usr_password in ('guest', 'user', 'wrong') CREATE INDEX IDX_USERNAME ON CONFIGUSER(USR_USERNAME); -- select all users with their username as password /*c3*/select * from configuser where usr_username = usr_password; /*c3*/select * from configuser where usr_username in (select usr_password from configuser) /*c3*/select * from configuser where usr_password in (select usr_username from configuser) /*c3*/select * from configuser where usr_password in (usr_username); /*c2*/select * from configuser where usr_password in ('guest', 'user', 'wrong') -- -- COUNT(DISTINCT ) when there are no records -- bug #718866 CREATE TABLE IBANX_PERMIT(ID INT, A1 VARCHAR(10)); /*r0*/SELECT count(distinct A0.ID) FROM IBANX_PERMIT A0; -- -- use of column aliases in the where clause --bug #696595 CREATE TABLE "liste"("kosten" INT, "preis" INT); insert into "liste" values(100, 10); /*r100*/SELECT "kosten" AS "total" FROM "liste" WHERE "total" > 0 ORDER BY "total" DESC; /*r110*/SELECT ("kosten"+"preis") AS "total" FROM "liste" WHERE "total" > 0 ORDER BY "total" DESC; hsqldb-1.8.0.10.orig/testrun/hsqldb/TestSelfGrantees.txt0000644000175000017500000001420110767041135021565 0ustar renerene/*e*/CREATE USER public PASSWORD public ADMIN /*e*/CREATE USER _SYSTEM PASSWORD system ADMIN /*e*/CREATE USER public PASSWORD public /*e*/CREATE USER _SYSTEM PASSWORD system CREATE USER blaine PASSWORD blaine; CREATE USER blaineadm PASSWORD blaineadm ADMIN; CREATE USER debbie PASSWORD debbie; DROP TABLE public.t1 IF EXISTS; CREATE TABLE public.t1 (i int); INSERT INTO public.t1 VALUES (1); CREATE USER us3 PASSWORD us3; ----------------------------------------------------------------------- -- RESERVED USERS and ROLES -- Test public grants DROP TABLE t2 IF EXISTS; CREATE TABLE public.t2 (i int); INSERT INTO public.t2 VALUES (1); CONNECT USER us3 PASSWORD us3; /*e*/SELECT * FROM t2; CONNECT USER sa PASSWORD ""; GRANT SELECT ON t2 TO public; CONNECT USER us3 PASSWORD us3; /*c1*/SELECT * FROM t2; CONNECT USER sa PASSWORD ""; REVOKE SELECT ON t2 FROM public; CONNECT USER us3 PASSWORD us3; /*e*/SELECT * FROM t2; CONNECT USER sa PASSWORD ""; -- Prohibit adding/dropping reserved Roles and Users -- _SYSTEM role? /*e*/DROP ROLE dba; -- Spec says can't create a user or role called "public" /*e*/DROP USER public password x; /*e*/DROP USER _system password x; /*e*/DROP USER dba password x; /*e*/CREATE ROLE public; /*e*/CREATE ROLE _system; /*e*/CREATE ROLE dba; -- We prohibit change the built-in permissions for the DBA group, since -- the role is not persisted. -- Prohibit grants/revokes for _SYSTEM, DBA /*e*/GRANT ALL ON public.t1 TO dba; /*e*/GRANT ALL ON public.t1 TO _system; /*e*/REVOKE ALL ON public.t1 TO dba; /*e*/REVOKE ALL ON public.t1 TO _system; ----------------------------------------------------------------------- -- Roles and Users share a namespace CREATE USER conflict1 PASSWORD conflict1; /*e*/CREATE ROLE conflict1; /*u0*/CREATE ROLE conflict2; /*e*/CREATE USER conflict2 PASSWORD conflict2; -- Can grant a Role but not a user /*e*/GRANT us3 TO conflict2; -- Grant and revoke lists for users and roles GRANT SELECT, UPDATE, DELETE, INSERT ON public.t2 TO conflict1; GRANT SELECT, UPDATE, DELETE, INSERT ON public.t2 TO conflict2; REVOKE SELECT, UPDATE, DELETE, INSERT ON public.t2 FROM conflict1; REVOKE SELECT, UPDATE, DELETE, INSERT ON public.t2 FROM conflict2; -- Wrong right names /*e*/GRANT SELECT, TABLE, COLUMN ON public.t2 TO conflict1; /*e*/REVOKE SELECT, TABLE, COLUMN ON public.t2 FROM conflict1; -- Roles are not schemas /*e*/CREATE TABLE dba.x1 (i int); -- Test global (non-object) permissions of DBA Role GRANT ALL ON public.t1 TO blaine; CONNECT USER blaineadm PASSWORD blaineadm; /*u0*/SET TABLE public.t1 READONLY true; CONNECT USER blaine PASSWORD blaine; /*e*/INSERT INTO public.t1 VALUES(1); /*e*/SET TABLE public.t1 READONLY true; /*e*/CREATE USER user1 password user1; /*e*/GRANT dba TO debbie; CONNECT USER blaineadm PASSWORD blaineadm; /*u0*/GRANT dba TO blaine; CONNECT USER blaine PASSWORD blaine; /*e*/INSERT INTO public.t1 VALUES(1); /*u0*/SET TABLE public.t1 READONLY false; /*u1*/INSERT INTO public.t1 VALUES(1); /*u0*/CREATE USER user1 password user1; /*u0*/GRANT dba TO debbie; CONNECT USER sa PASSWORD ""; /*u0*/REVOKE dba FROM blaine; CONNECT USER blaine PASSWORD blaine; /*e*/SET TABLE public.t1 READONLY true; /*e*/CREATE USER user2 password user2; /*e*/REVOKE dba FROM debbie; -- Test using non-existent roles and re-creating existing roles. CONNECT USER sa PASSWORD ""; CREATE USER us1 PASSWORD us1; CREATE USER us2 PASSWORD us2; /*e*/DROP ROLE r1; /*u0*/CREATE ROLE r1; /*u0*/GRANT r1 TO us1; /*e*/GRANT r1 TO us1; /*u0*/REVOKE r1 FROM us1; /*e*/REVOKE r1 FROM us1; /*e*/REVOKE r2 FROM us1; /*u0*/DROP ROLE r1; -- Basics CONNECT USER blaineadm PASSWORD blaineadm; /*e*/GRANT ALL ON t1 TO r1; /*u0*/CREATE ROLE r1; /*e*/GRANT r1 TO r1; -- us1: no privs CONNECT USER us1 PASSWORD us1; /*e*/SELECT * FROM public.t1; /*e*/CREATE TABLE us1t1 (i int); CONNECT USER sa PASSWORD ""; GRANT r1 TO us1; -- us1: no privs CONNECT USER us1 PASSWORD us1; /*e*/SELECT * FROM public.t1; /*e*/CREATE TABLE us1t1 (i int); CONNECT USER sa PASSWORD ""; GRANT SELECT ON t1 TO r1; -- us1: t1 rights via role r1 CONNECT USER us1 PASSWORD us1; /*c2*/SELECT * FROM public.t1; /*e*/CREATE TABLE us1t1 (i int); CONNECT USER sa PASSWORD ""; GRANT dba TO us1; -- us1: DBA + t1 rights via role r1 CONNECT USER us1 PASSWORD us1; /*c2*/SELECT * FROM public.t1; /*u0*/CREATE TABLE us1t1 (i int); /*u0*/DROP TABLE us1t1; CONNECT USER sa PASSWORD ""; /*u0*/REVOKE dba FROM us1; -- us1: t1 rights via role r1 CONNECT USER us1 PASSWORD us1; /*c2*/SELECT * FROM public.t1; /*e*/CREATE TABLE us1t1 (i int); CONNECT USER sa PASSWORD ""; /*u0*/REVOKE r1 FROM us1; -- us1: no privs CONNECT USER us1 PASSWORD us1; /*e*/SELECT * FROM public.t1; /*e*/CREATE TABLE us1t1 (i int); CONNECT USER sa PASSWORD ""; /*u0*/GRANT r1 TO us1; -- us1: t1 rights via role r1 CONNECT USER us1 PASSWORD us1; /*c2*/SELECT * FROM public.t1; /*e*/CREATE TABLE us1t1 (i int); CONNECT USER sa PASSWORD ""; /*u0*/REVOKE ALL ON t1 FROM r1; -- us1: no privs CONNECT USER us1 PASSWORD us1; /*e*/SELECT * FROM public.t1; /*e*/CREATE TABLE us1t1 (i int); CONNECT USER sa PASSWORD ""; /*u0*/GRANT ALL ON t1 TO r1; -- us1: t1 rights via role r1 CONNECT USER us1 PASSWORD us1; /*c2*/SELECT * FROM public.t1; /*e*/CREATE TABLE us1t1 (i int); CONNECT USER sa PASSWORD ""; /*u0*/DROP ROLE r1; -- us1: no privs CONNECT USER us1 PASSWORD us1; /*e*/SELECT * FROM public.t1; /*e*/CREATE TABLE us1t1 (i int); CONNECT USER sa PASSWORD ''; /*u0*/GRANT SELECT ON t1 TO us1; -- us1: t1 rights via role table right CONNECT USER us1 PASSWORD us1; /*c2*/SELECT * FROM public.t1; /*e*/CREATE TABLE us1t1 (i int); CONNECT USER sa PASSWORD ""; /*u0*/REVOKE ALL ON t1 FROM us1; -- Role nesting CREATE ROLE r1; CONNECT USER us1 PASSWORD us1; /*e*/CREATE TABLE us1t1 (i int); CONNECT USER sa PASSWORD ""; GRANT r1 TO us1; CONNECT USER us1 PASSWORD us1; /*e*/CREATE TABLE us1t1 (i int); CONNECT USER sa PASSWORD ""; GRANT dba TO r1; CONNECT USER us1 PASSWORD us1; /*u0*/CREATE TABLE us1t1 (i int); /*u0*/DROP TABLE us1t1; CONNECT USER sa PASSWORD ""; REVOKE dba FROM r1; hsqldb-1.8.0.10.orig/testrun/hsqldb/TestSelfSchemaPersistC1.txt0000644000175000017500000005565610235710201022761 0ustar renerene-- This script series tests ALT commands on schema objects, including -- persistence. ALTER USER involves no schemas. -- Commands tested: ALTER INDEX, ALTER SEQUENCE, ALTER TABLE -- The blaine schema will exist if a previous script created it already. /*s*/DROP SCHEMA blaine CASCADE; /*u0*/CREATE SCHEMA blaine authorization dba; -- PREP -- Create a zillion simple objects to play with /*u0*/SET SCHEMA public; DROP TABLE public.mt00 IF EXISTS; DROP TABLE public.mt01 IF EXISTS; DROP TABLE public.mt02 IF EXISTS; DROP TABLE public.mt03 IF EXISTS; DROP TABLE mt04 IF EXISTS; DROP TABLE mt05 IF EXISTS; DROP TABLE mt06 IF EXISTS; DROP TABLE mt07 IF EXISTS; DROP TABLE public.mt08 IF EXISTS; DROP TABLE public.mt09 IF EXISTS; DROP TABLE public.mt10 IF EXISTS; DROP TABLE public.mt11 IF EXISTS; DROP TABLE public.mt12 IF EXISTS; DROP TABLE public.mt13 IF EXISTS; DROP TABLE mt14 IF EXISTS; DROP TABLE mt15 IF EXISTS; DROP TABLE mt16 IF EXISTS; DROP TABLE mt17 IF EXISTS; DROP TABLE public.mt18 IF EXISTS; DROP TABLE public.mt19 IF EXISTS; DROP TABLE public.mt20 IF EXISTS; DROP TABLE public.mt21 IF EXISTS; DROP TABLE public.mt22 IF EXISTS; DROP TABLE public.mt23 IF EXISTS; DROP TABLE public.mt24 IF EXISTS; DROP TABLE public.mt25 IF EXISTS; DROP TABLE public.mt26 IF EXISTS; DROP TABLE public.mt27 IF EXISTS; DROP TABLE public.mt28 IF EXISTS; DROP TABLE public.mt29 IF EXISTS; DROP TABLE ct00 IF EXISTS; DROP TABLE ct01 IF EXISTS; DROP TABLE ct02 IF EXISTS; DROP TABLE ct03 IF EXISTS; DROP TABLE ct04 IF EXISTS; DROP TABLE ct05 IF EXISTS; DROP TABLE ct06 IF EXISTS; DROP TABLE ct07 IF EXISTS; DROP TABLE ct08 IF EXISTS; DROP TABLE ct09 IF EXISTS; DROP TABLE ct10 IF EXISTS; DROP TABLE ct11 IF EXISTS; DROP TABLE ct12 IF EXISTS; DROP TABLE ct13 IF EXISTS; DROP TABLE ct14 IF EXISTS; DROP TABLE ct15 IF EXISTS; DROP TABLE ct16 IF EXISTS; DROP TABLE ct17 IF EXISTS; DROP TABLE ct18 IF EXISTS; DROP TABLE ct19 IF EXISTS; DROP TABLE t101 IF EXISTS; CREATE TABLE mt00 (i int); CREATE TABLE mt01 (i int); CREATE TABLE mt02 (i int); /*u0*/SET SCHEMA blaine; CREATE TABLE public.mt03 (i int); CREATE TABLE public.mt04 (i int); CREATE TABLE public.mt05 (i int); CREATE TABLE public.mt06 (i int); CREATE TABLE public.mt07 (i int); /*u0*/SET SCHEMA public; CREATE TABLE mt08 (i int); CREATE TABLE mt09 (i int); CREATE TABLE mt10 (i int); CREATE TABLE mt11 (i int); CREATE TABLE mt12 (i int); /*u0*/SET SCHEMA blaine; CREATE TABLE public.mt13 (i int); CREATE TABLE public.mt14 (i int); CREATE TABLE public.mt15 (i int); CREATE TABLE public.mt16 (i int); CREATE TABLE public.mt17 (i int); /*u0*/SET SCHEMA public; CREATE TABLE mt18 (i int); CREATE TABLE mt19 (i int); CREATE TABLE mt20 (i int); CREATE TABLE mt21 (i int); CREATE TABLE mt22 (i int); CREATE TABLE mt23 (i int); CREATE TABLE mt24 (i int); CREATE TABLE mt25 (i int); CREATE TABLE mt26 (i int); CREATE TABLE mt27 (i int); CREATE TABLE mt28 (i int); CREATE TABLE mt29 (i int); CREATE CACHED TABLE ct00 (i int); CREATE CACHED TABLE ct01 (i int); CREATE CACHED TABLE ct02 (i int); /*u0*/SET SCHEMA blaine; CREATE CACHED TABLE public.ct03 (i int); CREATE CACHED TABLE public.ct04 (i int); CREATE CACHED TABLE public.ct05 (i int); CREATE CACHED TABLE public.ct06 (i int); CREATE CACHED TABLE public.ct07 (i int); /*u0*/SET SCHEMA public; CREATE CACHED TABLE ct08 (i int); CREATE CACHED TABLE ct09 (i int); CREATE CACHED TABLE ct10 (i int); CREATE CACHED TABLE ct11 (i int); CREATE CACHED TABLE ct12 (i int); /*u0*/SET SCHEMA blaine; CREATE CACHED TABLE public.ct13 (i int); CREATE CACHED TABLE public.ct14 (i int); CREATE CACHED TABLE public.ct15 (i int); CREATE CACHED TABLE public.ct16 (i int); CREATE CACHED TABLE public.ct17 (i int); /*u0*/SET SCHEMA public; CREATE CACHED TABLE ct18 (i int); CREATE CACHED TABLE ct19 (i int); DROP INDEX mi00 IF EXISTS; DROP INDEX mi01 IF EXISTS; DROP INDEX mi02 IF EXISTS; DROP INDEX mi03 IF EXISTS; DROP INDEX mi04 IF EXISTS; DROP INDEX mui05 IF EXISTS; DROP INDEX mui06 IF EXISTS; DROP INDEX mui07 IF EXISTS; DROP INDEX mui08 IF EXISTS; DROP INDEX mui09 IF EXISTS; DROP INDEX ci00 IF EXISTS; DROP INDEX ci01 IF EXISTS; DROP INDEX ci02 IF EXISTS; DROP INDEX ci03 IF EXISTS; DROP INDEX ci04 IF EXISTS; DROP INDEX cui05 IF EXISTS; DROP INDEX cui06 IF EXISTS; DROP INDEX cui07 IF EXISTS; DROP INDEX cui08 IF EXISTS; DROP INDEX cui09 IF EXISTS; DROP INDEX i101 IF EXISTS; CREATE INDEX mi00 ON mt00 (i); CREATE INDEX mi01 ON mt01 (i); CREATE INDEX mi02 ON mt02 (i); CREATE INDEX mi03 ON mt03 (i); CREATE INDEX mi04 ON mt04 (i); /*u0*/SET SCHEMA blaine; CREATE INDEX public.mui05 ON public.mt05 (i); CREATE INDEX public.mui06 ON public.mt06 (i); CREATE INDEX public.mui07 ON public.mt07 (i); CREATE INDEX public.mui08 ON public.mt08 (i); CREATE INDEX public.mui09 ON public.mt09 (i); CREATE INDEX public.ci00 ON public.ct00 (i); CREATE INDEX public.ci01 ON public.ct01 (i); CREATE INDEX public.ci02 ON public.ct02 (i); CREATE INDEX public.ci03 ON public.ct03 (i); CREATE INDEX public.ci04 ON public.ct04 (i); CREATE INDEX public.cui05 ON public.ct05 (i); /*u0*/SET SCHEMA public; CREATE INDEX cui06 ON ct06 (i); CREATE INDEX cui07 ON ct07 (i); CREATE INDEX cui08 ON ct08 (i); CREATE INDEX cui09 ON ct09 (i); CREATE SEQUENCE s00; CREATE SEQUENCE s01; CREATE SEQUENCE s02; /*u0*/SET SCHEMA blaine; CREATE SEQUENCE public.s03; CREATE SEQUENCE public.s04; CREATE SEQUENCE public.s05; CREATE SEQUENCE public.s06; CREATE SEQUENCE public.s07; /*u0*/SET SCHEMA public; CREATE SEQUENCE s08; CREATE SEQUENCE s09; CREATE SEQUENCE s10; CREATE SEQUENCE s11; /*u0*/SET SCHEMA blaine; CREATE SEQUENCE public.s12; CREATE SEQUENCE public.s13; CREATE SEQUENCE public.s14; CREATE SEQUENCE public.s15; CREATE SEQUENCE public.s16; /*u0*/SET SCHEMA public; CREATE SEQUENCE s17; CREATE SEQUENCE s18; CREATE SEQUENCE s19; -- blaine schema /*u0*/ SET SCHEMA blaine; DROP TABLE bmt00 IF EXISTS; DROP TABLE bmt01 IF EXISTS; DROP TABLE bmt02 IF EXISTS; DROP TABLE bmt03 IF EXISTS; DROP TABLE bmt04 IF EXISTS; DROP TABLE bmt05 IF EXISTS; DROP TABLE bmt06 IF EXISTS; DROP TABLE bmt07 IF EXISTS; DROP TABLE bmt08 IF EXISTS; DROP TABLE bmt09 IF EXISTS; DROP TABLE bmt10 IF EXISTS; DROP TABLE bmt11 IF EXISTS; DROP TABLE bmt12 IF EXISTS; DROP TABLE bmt13 IF EXISTS; DROP TABLE bmt14 IF EXISTS; DROP TABLE bmt15 IF EXISTS; DROP TABLE bmt16 IF EXISTS; DROP TABLE bmt17 IF EXISTS; DROP TABLE bmt18 IF EXISTS; DROP TABLE bmt19 IF EXISTS; DROP TABLE bmt20 IF EXISTS; DROP TABLE bmt21 IF EXISTS; DROP TABLE bmt22 IF EXISTS; DROP TABLE bmt23 IF EXISTS; DROP TABLE bmt24 IF EXISTS; DROP TABLE bmt25 IF EXISTS; DROP TABLE bmt26 IF EXISTS; DROP TABLE bmt27 IF EXISTS; DROP TABLE bmt28 IF EXISTS; DROP TABLE bmt29 IF EXISTS; DROP TABLE bct00 IF EXISTS; DROP TABLE bct01 IF EXISTS; DROP TABLE bct02 IF EXISTS; DROP TABLE bct03 IF EXISTS; DROP TABLE bct04 IF EXISTS; DROP TABLE bct05 IF EXISTS; DROP TABLE bct06 IF EXISTS; DROP TABLE bct07 IF EXISTS; DROP TABLE bct08 IF EXISTS; DROP TABLE bct09 IF EXISTS; DROP TABLE bct10 IF EXISTS; DROP TABLE bct11 IF EXISTS; DROP TABLE bct12 IF EXISTS; DROP TABLE bct13 IF EXISTS; DROP TABLE bct14 IF EXISTS; DROP TABLE bct15 IF EXISTS; DROP TABLE bct16 IF EXISTS; DROP TABLE bct17 IF EXISTS; DROP TABLE bct18 IF EXISTS; DROP TABLE bct19 IF EXISTS; DROP TABLE bt101 IF EXISTS; CREATE TABLE bmt00 (i int); CREATE TABLE bmt01 (i int); CREATE TABLE bmt02 (i int); /*u0*/SET SCHEMA public; CREATE TABLE blaine.bmt03 (i int); CREATE TABLE blaine.bmt04 (i int); CREATE TABLE blaine.bmt05 (i int); CREATE TABLE blaine.bmt06 (i int); CREATE TABLE blaine.bmt07 (i int); /*u0*/SET SCHEMA blaine; CREATE TABLE bmt08 (i int); CREATE TABLE bmt09 (i int); CREATE TABLE bmt10 (i int); CREATE TABLE bmt11 (i int); CREATE TABLE bmt12 (i int); /*u0*/SET SCHEMA public; CREATE TABLE blaine.bmt13 (i int); CREATE TABLE blaine.bmt14 (i int); CREATE TABLE blaine.bmt15 (i int); CREATE TABLE blaine.bmt16 (i int); CREATE TABLE blaine.bmt17 (i int); /*u0*/SET SCHEMA blaine; CREATE TABLE bmt18 (i int); CREATE TABLE bmt19 (i int); CREATE TABLE bmt20 (i int); CREATE TABLE bmt21 (i int); CREATE TABLE bmt22 (i int); CREATE TABLE bmt23 (i int); CREATE TABLE bmt24 (i int); CREATE TABLE bmt25 (i int); CREATE TABLE bmt26 (i int); CREATE TABLE bmt27 (i int); CREATE TABLE bmt28 (i int); CREATE TABLE bmt29 (i int); CREATE CACHED TABLE bct00 (i int); CREATE CACHED TABLE bct01 (i int); CREATE CACHED TABLE bct02 (i int); /*u0*/SET SCHEMA public; CREATE CACHED TABLE blaine.bct03 (i int); CREATE CACHED TABLE blaine.bct04 (i int); CREATE CACHED TABLE blaine.bct05 (i int); CREATE CACHED TABLE blaine.bct06 (i int); CREATE CACHED TABLE blaine.bct07 (i int); /*u0*/SET SCHEMA blaine; CREATE CACHED TABLE bct08 (i int); CREATE CACHED TABLE bct09 (i int); CREATE CACHED TABLE bct10 (i int); CREATE CACHED TABLE bct11 (i int); CREATE CACHED TABLE bct12 (i int); /*u0*/SET SCHEMA public; CREATE CACHED TABLE blaine.bct13 (i int); CREATE CACHED TABLE blaine.bct14 (i int); CREATE CACHED TABLE blaine.bct15 (i int); CREATE CACHED TABLE blaine.bct16 (i int); CREATE CACHED TABLE blaine.bct17 (i int); /*u0*/SET SCHEMA blaine; CREATE CACHED TABLE bct18 (i int); CREATE CACHED TABLE bct19 (i int); DROP INDEX bmi00 IF EXISTS; DROP INDEX bmi01 IF EXISTS; DROP INDEX bmi02 IF EXISTS; DROP INDEX bmi03 IF EXISTS; DROP INDEX bmi04 IF EXISTS; DROP INDEX bmui05 IF EXISTS; DROP INDEX bmui06 IF EXISTS; DROP INDEX bmui07 IF EXISTS; DROP INDEX bmui08 IF EXISTS; DROP INDEX bmui09 IF EXISTS; DROP INDEX bci00 IF EXISTS; DROP INDEX bci01 IF EXISTS; DROP INDEX bci02 IF EXISTS; DROP INDEX bci03 IF EXISTS; DROP INDEX bci04 IF EXISTS; DROP INDEX bcui05 IF EXISTS; DROP INDEX bcui06 IF EXISTS; DROP INDEX bcui07 IF EXISTS; DROP INDEX bcui08 IF EXISTS; DROP INDEX bcui09 IF EXISTS; DROP INDEX bi101 IF EXISTS; CREATE INDEX bmi00 ON bmt00 (i); CREATE INDEX bmi01 ON bmt01 (i); CREATE INDEX bmi02 ON bmt02 (i); CREATE INDEX bmi03 ON bmt03 (i); CREATE INDEX bmi04 ON bmt04 (i); /*u0*/SET SCHEMA public; CREATE INDEX blaine.bmui05 ON blaine.bmt05 (i); CREATE INDEX blaine.bmui06 ON blaine.bmt06 (i); CREATE INDEX blaine.bmui07 ON blaine.bmt07 (i); CREATE INDEX blaine.bmui08 ON blaine.bmt08 (i); CREATE INDEX blaine.bmui09 ON blaine.bmt09 (i); /*u0*/SET SCHEMA blaine; CREATE INDEX bci00 ON bct00 (i); CREATE INDEX bci01 ON bct01 (i); CREATE INDEX bci02 ON bct02 (i); CREATE INDEX bci03 ON bct03 (i); CREATE INDEX bci04 ON bct04 (i); /*u0*/SET SCHEMA public; CREATE INDEX blaine.bcui05 ON blaine.bct05 (i); CREATE INDEX blaine.bcui06 ON blaine.bct06 (i); CREATE INDEX blaine.bcui07 ON blaine.bct07 (i); CREATE INDEX blaine.bcui08 ON blaine.bct08 (i); CREATE INDEX blaine.bcui09 ON blaine.bct09 (i); CREATE SEQUENCE blaine.bs00; CREATE SEQUENCE blaine.bs01; CREATE SEQUENCE blaine.bs02; CREATE SEQUENCE blaine.bs03; /*u0*/SET SCHEMA blaine; CREATE SEQUENCE bs04; CREATE SEQUENCE bs05; CREATE SEQUENCE bs06; CREATE SEQUENCE bs07; CREATE SEQUENCE bs08; /*u0*/SET SCHEMA public; CREATE SEQUENCE blaine.bs09; CREATE SEQUENCE blaine.bs10; CREATE SEQUENCE blaine.bs11; CREATE SEQUENCE blaine.bs12; /*u0*/SET SCHEMA blaine; CREATE SEQUENCE bs13; CREATE SEQUENCE bs14; CREATE SEQUENCE bs15; CREATE SEQUENCE bs16; CREATE SEQUENCE bs17; /*u0*/SET SCHEMA public; CREATE SEQUENCE blaine.bs18; CREATE SEQUENCE blaine.bs19; -- These are the only tests for SEQUENCEs in this script. SEQUENCES -- The only ALTER command for sequences is here. INSERT INTO public.mt01 VALUES(0); INSERT INTO blaine.bmt01 VALUES(0); /*u0*/SET SCHEMA blaine; /*r0*/SELECT next value FOR public.s00 FROM public.mt01; /*r1*/SELECT next value FOR public.s00 FROM public.mt01; /*r0*/SELECT next value FOR public.s04 FROM blaine.bmt01; /*r1*/SELECT next value FOR public.s04 FROM blaine.bmt01; /*u0*/SET SCHEMA public; /*r0*/SELECT next value FOR public.s01 FROM mt01; /*r1*/SELECT next value FOR public.s01 FROM mt01; /*r0*/SELECT next value FOR s02 FROM public.mt01; /*r1*/SELECT next value FOR s02 FROM public.mt01; /*r0*/SELECT next value FOR s03 FROM mt01; /*r1*/SELECT next value FOR s03 FROM mt01; /*r0*/SELECT next value FOR blaine.bs00 FROM blaine.bmt01; -- Sequence inherits default schema from Session, not table. /*e*/SELECT next value FOR bs00 FROM blaine.bmt01; /*r0*/SELECT next value FOR blaine.bs04 FROM public.mt01; /*r1*/SELECT next value FOR blaine.bs04 FROM public.mt01; /*u0*/SET SCHEMA blaine; /*r0*/SELECT next value FOR blaine.bs01 FROM bmt01; /*r1*/SELECT next value FOR blaine.bs01 FROM bmt01; /*r0*/SELECT next value FOR bs02 FROM blaine.bmt01; /*r1*/SELECT next value FOR bs02 FROM blaine.bmt01; /*r0*/SELECT next value FOR bs03 FROM bmt01; /*r1*/SELECT next value FOR bs03 FROM bmt01; /*u0*/ALTER SEQUENCE public.s00 RESTART WITH 21; /*u0*/ALTER SEQUENCE bs00 RESTART WITH 22; /*u0*/SET SCHEMA public; /*u0*/ALTER SEQUENCE blaine.bs01 RESTART WITH 23; /*u0*/ALTER SEQUENCE s01 RESTART WITH 24; /*r21*/SELECT next value FOR public.s00 FROM public.mt01; /*r22*/SELECT next value FOR blaine.bs00 FROM public.mt01; /*r23*/SELECT next value FOR blaine.bs01 FROM public.mt01; /*r24*/SELECT next value FOR s01 FROM public.mt01; -- May only rename: Indexes, Tables, Columns RENAMES -- (Will only test Column renames if I have time) -- Can't change schemas for existing objects. -- 1st all permutations of PUBLICs -> blaines /*e*/SELECT * FROM blaine.rbmt00; /*e*/SELECT * FROM blaine.rbct00; /*e*/SELECT * FROM public.rmt00; /*e*/SELECT * FROM public.cmt00; /*u0*/SET SCHEMA public; /*e*/ALTER INDEX mi00 RENAME TO blaine.bi101; /*e*/ALTER INDEX mui05 RENAME TO blaine.bi101; /*e*/ALTER TABLE mt10 RENAME TO blaine.bt101; /*e*/ALTER TABLE ct10 RENAME TO blaine.bt101; /*e*/ALTER INDEX public.mi00 RENAME TO blaine.bi101; /*e*/ALTER INDEX public.mui05 RENAME TO blaine.bi101; /*e*/ALTER TABLE public.mt10 RENAME TO blaine.bt101; /*e*/ALTER TABLE public.ct10 RENAME TO blaine.bt101; /*e*/ALTER INDEX blaine.mi00 RENAME TO public.bi101; /*e*/ALTER INDEX blaine.mui05 RENAME TO public.bi101; /*u0*/SET SCHEMA blaine; /*e*/ALTER TABLE mt10 RENAME TO public.bt101; /*e*/ALTER TABLE ct10 RENAME TO public.bt101; /*u0*/SET SCHEMA public; /*u0*/ALTER TABLE blaine.bmt00 RENAME TO rbmt00; /*u0*/ALTER TABLE blaine.bct00 RENAME TO blaine.rbct00; /*u0*/ALTER INDEX blaine.bmi00 RENAME TO rbmi00; /*u0*/SET SCHEMA blaine; /*u0*/ALTER INDEX bci00 RENAME TO rbci00; /*u0*/ALTER INDEX public.mi00 RENAME TO public.rmi00; /*u0*/ALTER INDEX public.ci00 RENAME TO rci00; /*u0*/SET SCHEMA public; /*u0*/ALTER TABLE public.mt00 RENAME TO public.rmt00; /*u0*/ALTER TABLE ct00 RENAME TO rct00; /*u0*/SET SCHEMA public; /*u0*/ALTER INDEX blaine.bmui05 RENAME TO rbmui05; /*u0*/SET SCHEMA blaine; /*u0*/ALTER INDEX bcui05 RENAME TO rbcui05; /*u0*/ALTER INDEX public.mui05 RENAME TO public.rmui05; /*u0*/ALTER INDEX public.cui05 RENAME TO rcui05; /*u0*/SET SCHEMA public; /*e*/ALTER INDEX public.mui05 RENAME TO blaine.bi101; /*e*/ALTER TABLE public.mt10 RENAME TO blaine.bt101; /*e*/ALTER TABLE public.ct10 RENAME TO blaine.bt101; /*e*/ALTER INDEX public.mi00 RENAME TO blaine.bi101; /*e*/ALTER INDEX public.mui05 RENAME TO blaine.bi101; /*e*/ALTER TABLE public.mt10 RENAME TO blaine.bt101; /*e*/ALTER TABLE public.ct10 RENAME TO blaine.bt101; /*c0*/SELECT * FROM blaine.rbmt00; /*c0*/SELECT * FROM blaine.rbct00; /*c0*/SELECT * FROM public.rmt00; /*c0*/SELECT * FROM public.rct00; -- The only schema-specific ALTERs left are ALTER TABLE ADD/DROP CONS -- ADD NAMED Check/Unique CONSTRAINTS -- First, CHECK constraints on MEM tables /*e*/ALTER TABLE public.mt11 ADD CONSTRAINT blaine.mt11ck1 CHECK (i > 0); /*e*/ALTER TABLE blaine.bmt11 ADD CONSTRAINT public.bmt11ck1 CHECK (i > 0); /*e*/ALTER TABLE mt11 ADD CONSTRAINT blaine.mt11ck1 CHECK (i > 0); /*u0*/ALTER TABLE mt11 ADD CONSTRAINT mt11ck1 CHECK (i > 0); /*u0*/ALTER TABLE mt12 ADD CONSTRAINT public.mt12ck1 CHECK (i = 1); SET SCHEMA blaine; /*u0*/ALTER TABLE public.mt13 ADD CONSTRAINT mt13ck1 CHECK (i in (1, 2, 3)); /*u0*/ALTER TABLE public.mt14 ADD CONSTRAINT public.mt14ck1 CHECK (i != 0); /*e*/ALTER TABLE blaine.bmt11 ADD CONSTRAINT public.bmt11ck1 CHECK (i > 0); /*e*/ALTER TABLE public.mt11 ADD CONSTRAINT blaine.mt11ck1 CHECK (i > 0); /*e*/ALTER TABLE bmt11 ADD CONSTRAINT public.bmt11ck1 CHECK (i > 0); /*u0*/ALTER TABLE bmt11 ADD CONSTRAINT bmt11ck1 CHECK (i > 0); /*u0*/ALTER TABLE bmt12 ADD CONSTRAINT blaine.bmt12ck1 CHECK (i = 1); SET SCHEMA public; /*u0*/ALTER TABLE blaine.bmt13 ADD CONSTRAINT bmt13ck1 CHECK (i in (1, 2, 3)); /*u0*/ALTER TABLE blaine.bmt14 ADD CONSTRAINT blaine.bmt14ck1 CHECK (i != 0); /*e*/INSERT INTO public.mt11 values(0); /*e*/INSERT INTO public.mt12 values(0); /*e*/INSERT INTO public.mt13 values(0); /*e*/INSERT INTO public.mt14 values(0); /*e*/INSERT INTO blaine.bmt11 values(0); /*e*/INSERT INTO blaine.bmt12 values(0); /*e*/INSERT INTO blaine.bmt13 values(0); /*e*/INSERT INTO blaine.bmt14 values(0); /*u1*/INSERT INTO public.mt11 values(1); /*u1*/INSERT INTO public.mt12 values(1); /*u1*/INSERT INTO public.mt13 values(1); /*u1*/INSERT INTO public.mt14 values(1); /*u1*/INSERT INTO blaine.bmt11 values(1); /*u1*/INSERT INTO blaine.bmt12 values(1); /*u1*/INSERT INTO blaine.bmt13 values(1); /*u1*/INSERT INTO blaine.bmt14 values(1); -- Now, UNIQUE constraints on CACHED tables /*e*/ALTER TABLE public.ct11 ADD CONSTRAINT blaine.ct11ck1 UNIQUE (i); /*e*/ALTER TABLE blaine.bct11 ADD CONSTRAINT public.bct11ck1 UNIQUE (i); /*e*/ALTER TABLE ct11 ADD CONSTRAINT blaine.ct11ck1 UNIQUE (i); /*u0*/ALTER TABLE ct11 ADD CONSTRAINT ct11ck1 UNIQUE (i); /*u0*/ALTER TABLE ct12 ADD CONSTRAINT public.ct12ck1 UNIQUE (i); SET SCHEMA blaine; /*u0*/ALTER TABLE public.ct13 ADD CONSTRAINT ct13ck1 UNIQUE (i); /*u0*/ALTER TABLE public.ct14 ADD CONSTRAINT public.ct14ck1 UNIQUE (i); /*e*/ALTER TABLE blaine.bct11 ADD CONSTRAINT public.bct11ck1 UNIQUE (i); /*e*/ALTER TABLE public.ct11 ADD CONSTRAINT blaine.ct11ck1 UNIQUE (i); /*e*/ALTER TABLE bct11 ADD CONSTRAINT public.bct11ck1 UNIQUE (i); /*u0*/ALTER TABLE bct11 ADD CONSTRAINT bct11ck1 UNIQUE (i); /*u0*/ALTER TABLE bct12 ADD CONSTRAINT blaine.bct12ck1 UNIQUE (i); SET SCHEMA public; /*u0*/ALTER TABLE blaine.bct13 ADD CONSTRAINT bct13ck1 UNIQUE (i); /*u0*/ALTER TABLE blaine.bct14 ADD CONSTRAINT blaine.bct14ck1 UNIQUE (i); /*u1*/INSERT INTO public.ct11 values(1); /*u1*/INSERT INTO public.ct12 values(1); /*u1*/INSERT INTO public.ct13 values(1); /*u1*/INSERT INTO public.ct14 values(1); /*u1*/INSERT INTO blaine.bct11 values(1); /*u1*/INSERT INTO blaine.bct12 values(1); /*u1*/INSERT INTO blaine.bct13 values(1); /*u1*/INSERT INTO blaine.bct14 values(1); /*e*/INSERT INTO public.ct11 values(1); /*e*/INSERT INTO public.ct12 values(1); /*e*/INSERT INTO public.ct13 values(1); /*e*/INSERT INTO public.ct14 values(1); /*e*/INSERT INTO blaine.bct11 values(1); /*e*/INSERT INTO blaine.bct12 values(1); /*e*/INSERT INTO blaine.bct13 values(1); /*e*/INSERT INTO blaine.bct14 values(1); -- ADD UNNAMED FK CONSTRAINTS -- Index some MEM tables to reference. (table ct1[1-4],bct1[1-4] already set). ALTER TABLE public.mt15 ADD unique(i); ALTER TABLE public.mt16 ADD unique(i); ALTER TABLE public.mt17 ADD unique(i); ALTER TABLE public.mt18 ADD unique(i); ALTER TABLE blaine.bmt15 ADD unique(i); ALTER TABLE blaine.bmt16 ADD unique(i); ALTER TABLE blaine.bmt17 ADD unique(i); ALTER TABLE blaine.bmt18 ADD unique(i); INSERT INTO public.mt15 VALUES(10); INSERT INTO public.mt16 VALUES(10); INSERT INTO public.mt17 VALUES(10); INSERT INTO public.mt18 VALUES(10); INSERT INTO blaine.bmt15 VALUES(10); INSERT INTO blaine.bmt16 VALUES(10); INSERT INTO blaine.bmt17 VALUES(10); INSERT INTO blaine.bmt18 VALUES(10); /*u0*/ALTER TABLE ct15 ADD FOREIGN KEY (i) REFERENCES mt15 (i); /*e*/ALTER TABLE ct16 ADD FOREIGN KEY (i) REFERENCES blaine.bct11 (i); /*e*/ALTER TABLE public.ct16 ADD FOREIGN KEY (i) REFERENCES blaine.bct11 (i); /*u0*/ALTER TABLE ct16 ADD FOREIGN KEY (i) REFERENCES public.mt16 (i); SET SCHEMA blaine; /*u0*/ALTER TABLE public.ct17 ADD FOREIGN KEY (i) REFERENCES public.mt17 (i); /*e*/ALTER TABLE public.ct17 ADD FOREIGN KEY (i) REFERENCES public.mt17 (i); /*u0*/ALTER TABLE public.ct18 ADD FOREIGN KEY (i) REFERENCES mt18 (i); -- fks can't reference tables in other schemas. /*e*/ALTER TABLE bct15 ADD FOREIGN KEY (i) REFERENCES public.mt15 (i); SET SCHEMA public; /*u0*/ALTER TABLE blaine.bct17 ADD FOREIGN KEY (i) REFERENCES blaine.bmt17 (i); /*u0*/ALTER TABLE blaine.bct18 ADD FOREIGN KEY (i) REFERENCES bmt18 (i); /*u1*/INSERT INTO public.ct15 values(10); /*u1*/INSERT INTO public.ct16 values(10); /*u1*/INSERT INTO public.ct17 values(10); /*u1*/INSERT INTO blaine.bct18 values(10); /*u1*/INSERT INTO blaine.bct17 values(10); /*e*/INSERT INTO public.ct15 values(9); /*e*/INSERT INTO public.ct16 values(9); /*e*/INSERT INTO public.ct17 values(9); /*e*/INSERT INTO public.bct18 values(9); /*e*/INSERT INTO blaine.bct17 values(9); -- Finally, ADD NAMED FK CONSTRAINTS -- (TARGETS ct1[1-4],bct1[1-4] already set). SET SCHEMA blaine; /*e*/ALTER TABLE bmt21 ADD CONSTRAINT public.bmt21fk FOREIGN KEY (i) REFERENCES blaine.bct11 (i); /*e*/ALTER TABLE bmt20 ADD CONSTRAINT public.bmt20fk FOREIGN KEY (i) REFERENCES bct12 (i); /*u0*/ALTER TABLE bmt21 ADD CONSTRAINT bmt21fk FOREIGN KEY (i) REFERENCES blaine.bct11 (i); /*e*/ALTER TABLE bmt21 ADD CONSTRAINT bmt21fk FOREIGN KEY (i) REFERENCES blaine.bct11 (i); -- Already exists /*u0*/ALTER TABLE bmt20 ADD CONSTRAINT blaine.cmt20fk FOREIGN KEY (i) REFERENCES bct12 (i); /*e*/ALTER TABLE bmt20 ADD CONSTRAINT blaine.cmt20fk FOREIGN KEY (i) REFERENCES bct12 (i); -- Already exists SET SCHEMA public; /*e*/ALTER TABLE blaine.bmt22 ADD CONSTRAINT public.bmt22fk FOREIGN KEY (i) REFERENCES blaine.bct13 (i); /*e*/ALTER TABLE blaine.bmt23 ADD CONSTRAINT public.bmt23fk FOREIGN KEY (i) REFERENCES bct14 (i); /*u0*/ALTER TABLE blaine.bmt22 ADD CONSTRAINT bmt2fk FOREIGN KEY (i) REFERENCES blaine.bct13 (i); /*u0*/ALTER TABLE blaine.bmt23 ADD CONSTRAINT blaine.bmt23fk FOREIGN KEY (i) REFERENCES bct14 (i); SET SCHEMA blaine; /*e*/ALTER TABLE bmt24 ADD CONSTRAINT public.bmt24fk FOREIGN KEY (i) REFERENCES public.ct11 (i); /*e*/ALTER TABLE bmt24 ADD CONSTRAINT blaine.bmt24fk FOREIGN KEY (i) REFERENCES public.ct11 (i); SET SCHEMA public; /*e*/ALTER TABLE blaine.bmt22 ADD CONSTRAINT public.bmt22fk FOREIGN KEY (i) REFERENCES blaine.bct13 (i); /*u0*/ALTER TABLE blaine.bmt25 ADD CONSTRAINT bmt25fk FOREIGN KEY (i) REFERENCES bct14 (i); /*e*/INSERT INTO blaine.bmt21 VALUES (0); /*u1*/INSERT INTO blaine.bmt21 VALUES (1); /*e*/INSERT INTO blaine.bmt20 VALUES (0); /*u1*/INSERT INTO blaine.bmt20 VALUES (1); /*e*/INSERT INTO blaine.bmt22 VALUES (0); /*u1*/INSERT INTO blaine.bmt22 VALUES (1); /*e*/INSERT INTO blaine.bmt23 VALUES (0); /*u1*/INSERT INTO blaine.bmt23 VALUES (1); /*e*/INSERT INTO blaine.bmt25 VALUES (0); /*u1*/INSERT INTO blaine.bmt25 VALUES (1); SHUTDOWN IMMEDIATELY; hsqldb-1.8.0.10.orig/testrun/hsqldb/TestSelfSchemaPersistB1.txt0000644000175000017500000007414010240557324022760 0ustar renerene-- CREATE AND INITIALIZE OBJECTS -- This CREATES the schema-specific objects to be used for -- schema-specific persistence tests. -- (See the *C[12].txt scripts for similar tests of ALTER comands (which -- this script purposefully omits). -- This *1.txt script tests whether objects can/do get CREATED in the correct -- schemas, since there is no reason why that would change in consequent -- connections to the same database (*[23].txt scripts). -- This script must, of course, persist objects in different specific -- schemas so that scripts *[23] may verify that they continue to reside -- and be accessible only in the correct schema. -- In the main (object-type-specific) test blocks, for every command that -- has ALL SCHEMA OBJECTS explicitly specified, -- I always do a SET SCHEMA so that an accidental -- fallback to Session schema will always lead to a test failure. -- ****************************** Schemas -- Non-persistence Schema testing. -- Test the _INITIAL_ Session default schema (currently "PUBLIC"). -- After the objects are created in the correct schema, it makes no difference -- whether the "INITIAL" schema was used or not. Therefore, no need to test -- this stuff in scripts *[23].txt. DROP TABLE public.pschct1 IF exists; DROP TABLE public.pschct2 IF exists; DROP TABLE public.pschct3 IF exists; DROP VIEW public.pschv1 IF exists; DROP VIEW public.pschv2 IF exists; DROP INDEX public.pschi1 IF exists; DROP TABLE public.pscht1 IF exists; DROP TABLE public.pscht2 IF exists; -- Verify all SELECTs fail before we start /*e*/SELECT * FROM public.pscht1; /*e*/SELECT * FROM public.pscht2; /*e*/SELECT * FROM public.pschv1; /*e*/SELECT * FROM public.pschv2; /*e*/SELECT * FROM public.pschct1; /*e*/SELECT * FROM public.pschct2; /*e*/SELECT * FROM public.pschct3; /*e*/SELECT * FROM blaine.pscht1; /*e*/SELECT * FROM blaine.pscht2; /*e*/SELECT * FROM blaine.pschv1; /*e*/SELECT * FROM blaine.pschv2; /*e*/SELECT * FROM blaine.pschct1; /*e*/SELECT * FROM blaine.pschct2; /*e*/SELECT * FROM blaine.pschct3; /*e*/SELECT * FROM pscht1; /*e*/SELECT * FROM pscht2; /*e*/SELECT * FROM pschv1; /*e*/SELECT * FROM pschv2; /*e*/SELECT * FROM pschct1; /*e*/SELECT * FROM pschct2; /*e*/SELECT * FROM pschct3; /*u0*/CREATE TABLE pscht1 (i int); /*u1*/INSERT INTO pscht1 values(0); /*u1*/INSERT INTO pscht1 values(1); /*u0*/CREATE UNIQUE INDEX pschi1 ON pscht1(i); /*e*/INSERT INTO pscht1 values(1); /*u0*/CREATE TABLE pscht2 (i int); /*u1*/INSERT INTO pscht2 values(0); /*u1*/INSERT INTO pscht2 values(1); /*u0*/CREATE VIEW pschv1 AS SELECT * FROM pscht1; /*u0*/CREATE VIEW pschv2 AS SELECT * FROM public.pscht1; -- Create then remove using explicit schema. This is a workaround for no -- DROP TRIGGER... IF EXISTS; /*u0*/CREATE TRIGGER public.ptrig1 AFTER INSERT ON pscht1 QUEUE 0 CALL "org.hsqldb.test.BlaineTrig"; DROP TRIGGER public.ptrig1; /*u0*/CREATE TRIGGER ptrig1 AFTER INSERT ON pscht1 QUEUE 0 CALL "org.hsqldb.test.BlaineTrig"; /*u0*/CREATE TRIGGER public.ptrig2 AFTER INSERT ON public.pscht2 QUEUE 0 CALL "org.hsqldb.test.BlaineTrig"; DROP TRIGGER public.ptrig2; /*u0*/CREATE TRIGGER ptrig2 AFTER INSERT ON public.pscht2 QUEUE 0 CALL "org.hsqldb.test.BlaineTrig"; /*u0*/CREATE TABLE pschct1 (i int, CONSTRAINT pschuc1 UNIQUE(i)); /*u0*/CREATE TABLE public.pschct2 (i int, CONSTRAINT pschuc2 UNIQUE(i)); /*u0*/CREATE TABLE pschct3 (i int, CONSTRAINT public.pschuc3 UNIQUE(i)); /*u1*/INSERT INTO pschct1 values(0); /*u1*/INSERT INTO pschct2 values(0); /*u1*/INSERT INTO pschct3 values(0); /*e*/INSERT INTO pschct1 values(0); /*e*/INSERT INTO pschct2 values(0); /*e*/INSERT INTO pschct3 values(0); -- Verify created in correct schemas /*c2*/SELECT * FROM public.pscht1; /*c2*/SELECT * FROM public.pscht2; /*c2*/SELECT * FROM public.pschv1; /*c2*/SELECT * FROM public.pschv2; /*c1*/SELECT * FROM public.pschct1; /*c1*/SELECT * FROM public.pschct2; /*c1*/SELECT * FROM public.pschct3; /*e*/CREATE TRIGGER public.ptrig1 AFTER INSERT ON pscht1 QUEUE 0 CALL "org.hsqldb.test.BlaineTrig"; /*e*/CREATE TRIGGER public.ptrig2 AFTER INSERT ON public.pscht1 QUEUE 0 CALL "org.hsqldb.test.BlaineTrig"; /*e*/SELECT * FROM blaine.pscht1; /*e*/SELECT * FROM blaine.pscht2; /*e*/SELECT * FROM blaine.pschv1; /*e*/SELECT * FROM blaine.pschv2; /*e*/SELECT * FROM blaine.pschct1; /*e*/SELECT * FROM blaine.pschct2; /*e*/SELECT * FROM blaine.pschct3; -- Verify SELECTs using default schema /*c2*/SELECT * FROM pscht1; /*c2*/SELECT * FROM pscht2; /*c2*/SELECT * FROM pschv1; /*c2*/SELECT * FROM pschv2; /*c1*/SELECT * FROM pschct1; /*c1*/SELECT * FROM pschct2; /*c1*/SELECT * FROM pschct3; -- Following 2 just to confirm that TRIGGERs created. /*e*/CREATE TRIGGER ptrig1 AFTER INSERT ON pscht1 CALL "org.hsqldb.test.BlaineTrig"; /*e*/CREATE TRIGGER public.ptrig2 AFTER INSERT ON public.pscht1 CALL "org.hsqldb.test.BlaineTrig"; /*u0*/CREATE SCHEMA blaine AUTHORIZATION dba; /*e*/CREATE SCHEMA blaine AUTHORIZATION dba; /*u0*/SET SCHEMA blaine; -- Verify created in correct schemas /*c2*/SELECT * FROM public.pscht1; /*c2*/SELECT * FROM public.pscht2; /*c2*/SELECT * FROM public.pschv1; /*c2*/SELECT * FROM public.pschv2; /*c1*/SELECT * FROM public.pschct1; /*c1*/SELECT * FROM public.pschct2; /*c1*/SELECT * FROM public.pschct3; -- Following 2 just to confirm that TRIGGERs created. /*e*/CREATE TRIGGER public.ptrig1 AFTER INSERT ON pscht1 CALL "org.hsqldb.test.BlaineTrig"; /*e*/CREATE TRIGGER public.ptrig2 AFTER INSERT ON public.pscht1 CALL "org.hsqldb.test.BlaineTrig"; /*e*/SELECT * FROM blaine.pscht1; /*e*/SELECT * FROM blaine.pscht2; /*e*/SELECT * FROM blaine.pschv1; /*e*/SELECT * FROM blaine.pschv2; /*e*/SELECT * FROM blaine.pschct1; /*e*/SELECT * FROM blaine.pschct2; /*e*/SELECT * FROM blaine.pschct3; -- Verify SELECTs using default schema /*e*/SELECT * FROM pscht1; /*e*/SELECT * FROM pscht2; /*e*/SELECT * FROM pschv1; /*e*/SELECT * FROM pschv2; /*e*/SELECT * FROM pschct1; /*e*/SELECT * FROM pschct2; /*e*/SELECT * FROM pschct3; -- Test of SET SCHEMA /*u0*/SET SCHEMA public; /*c2*/SELECT * FROM public.pscht1; /*c2*/SELECT * FROM public.pscht2; /*c2*/SELECT * FROM public.pschv1; /*c2*/SELECT * FROM public.pschv2; /*c1*/SELECT * FROM public.pschct1; /*c1*/SELECT * FROM public.pschct2; /*c1*/SELECT * FROM public.pschct3; -- Following 2 just to confirm that TRIGGERs created. /*e*/CREATE TRIGGER public.ptrig1 AFTER INSERT ON pscht1 CALL "org.hsqldb.test.BlaineTrig"; /*e*/CREATE TRIGGER public.ptrig2 AFTER INSERT ON public.pscht1 CALL "org.hsqldb.test.BlaineTrig"; /*e*/SELECT * FROM blaine.pscht1; /*e*/SELECT * FROM blaine.pscht2; /*e*/SELECT * FROM blaine.pschv1; /*e*/SELECT * FROM blaine.pschv2; /*e*/SELECT * FROM blaine.pschct1; /*e*/SELECT * FROM blaine.pschct2; /*e*/SELECT * FROM blaine.pschct3; -- Verify SELECTs using default schema /*c2*/SELECT * FROM public.pscht1; -- Sanity check DEBUG /*u0*/SET SCHEMA public; -- Sanity check DEBUG /*c2*/SELECT * FROM pscht1; /*c2*/SELECT * FROM pscht2; /*c2*/SELECT * FROM pschv1; /*c2*/SELECT * FROM pschv2; /*c1*/SELECT * FROM pschct1; /*c1*/SELECT * FROM pschct2; /*c1*/SELECT * FROM pschct3; -- Following 2 just to confirm that TRIGGERs created. /*e*/CREATE TRIGGER ptrig1 AFTER INSERT ON pscht1 CALL "org.hsqldb.test.BlaineTrig"; /*e*/CREATE TRIGGER public.ptrig2 AFTER INSERT ON public.pscht1 CALL "org.hsqldb.test.BlaineTrig"; /*e*/SET SCHEMA nosuch; /*u0*/SET SCHEMA blaine; -- ****************************** MEM Tables /*e*/DROP TABLE nosuch; DROP TABLE xtblt1 IF exists; DROP TABLE xtblt2 IF exists; DROP TABLE xtblt3 IF exists; DROP TABLE xtblt4 IF exists; DROP TABLE xtblt101 IF exists; DROP TABLE xtblj1 IF exists; /*u0*/CREATE TABLE xtblt1 (i int); SET SCHEMA public; /*u0*/CREATE TABLE blaine.xtblt2 (i int); SET SCHEMA blaine; /*u0*/CREATE TABLE xtblt3 (i int); /*u0*/CREATE TABLE xtblj1 (i int, vc varchar(10)); -- For testing Joins /*e*/CREATE TABLE information_schema.xtblt101 (i int); /*e*/CREATE TABLE xtblt1 (i int); -- Create existing object SET SCHEMA public; /*e*/CREATE TABLE blaine.xtblt1 (i int); -- Create existing object SET SCHEMA blaine; /*e*/CREATE TABLE information_schema.system_users (i int); -- Existing object /*e*/INSERT INTO other.xtblt1 values(0); /*e*/INSERT INTO information_schema.xtblt1 values(1); /*u1*/INSERT INTO xtblt1 values(0); SET SCHEMA public; /*u1*/INSERT INTO blaine.xtblt1 values(100); SET SCHEMA blaine; -- Test one update that will be persisted (most update tests won't be) SET SCHEMA public; /*u1*/UPDATE blaine.xtblt1 set i = 1 WHERE i = 100; SET SCHEMA blaine; /*u1*/INSERT INTO xtblj1 values(1, 'one'); SET SCHEMA public; /*u1*/SELECT * INTO blaine.xtblt4 FROM blaine.xtblt1 WHERE i = 0; /*c1*/SELECT * FROM blaine.xtblt4; SET SCHEMA blaine; -- ****************************** CACH Tables /*e*/DROP TABLE nosuch; DROP TABLE xctblt1 IF exists; DROP TABLE xctblt2 IF exists; DROP TABLE xctblt3 IF exists; DROP TABLE xctblt4 IF exists; DROP TABLE xctblt101 IF exists; DROP TABLE xtblj1 IF exists; /*u0*/CREATE CACHED TABLE xctblt1 (i int); SET SCHEMA public; /*u0*/CREATE CACHED TABLE blaine.xctblt2 (i int); SET SCHEMA blaine; /*u0*/CREATE CACHED TABLE xctblt3 (i int); /*u0*/CREATE CACHED TABLE xtblj1 (i int, vc varchar(10)); -- For testing Joins /*e*/CREATE CACHED TABLE information_schema.xctblt101 (i int); /*e*/CREATE CACHED TABLE xctblt1 (i int); -- Create existing object SET SCHEMA public; /*e*/CREATE CACHED TABLE blaine.xctblt1 (i int); -- Create existing object SET SCHEMA blaine; /*e*/CREATE CACHED TABLE information_schema.system_users (i int); -- Existing object /*e*/INSERT INTO other.xctblt1 values(0); /*e*/INSERT INTO information_schema.xctblt1 values(1); /*u1*/INSERT INTO xctblt1 values(0); SET SCHEMA public; /*u1*/INSERT INTO blaine.xctblt1 values(100); -- Test one update that will be persisted (most update tests won't be) /*u1*/UPDATE blaine.xctblt1 set i = 1 WHERE i = 100; SET SCHEMA blaine; /*u1*/INSERT INTO xtblj1 values(1, 'one'); SET SCHEMA public; /*u1*/SELECT * INTO blaine.xctblt4 FROM blaine.xctblt1 WHERE i = 0; /*c1*/SELECT * FROM blaine.xctblt4; SET SCHEMA blaine; -- ****************************** Views DROP VIEW xvwv1 IF exists; DROP VIEW xvwv2 IF exists; DROP VIEW xvwv3 IF exists; DROP VIEW xvwv4 IF exists; DROP VIEW xvwv5 IF exists; DROP VIEW xvwv6 IF exists; DROP VIEW xvwv7 IF exists; DROP VIEW xvwv8 IF exists; DROP VIEW xvwv9 IF exists; DROP VIEW xvwv10 IF exists; DROP VIEW xvwv11 IF exists; DROP VIEW xvwv12 IF exists; DROP VIEW xvwv13 IF exists; DROP VIEW xvwv14 IF exists; DROP VIEW xvwv15 IF exists; DROP VIEW xvwv16 IF exists; DROP VIEW xvwv17 IF exists; DROP VIEW xvwv18 IF exists; DROP VIEW xvwv19 IF exists; DROP VIEW xvwv20 IF exists; DROP VIEW xvwv21 IF exists; DROP VIEW xvwv22 IF exists; DROP VIEW xvwv23 IF exists; DROP VIEW xvwv24 IF exists; DROP VIEW xvwv25 IF exists; DROP VIEW xvwv26 IF exists; DROP VIEW xvwv27 IF exists; DROP VIEW xvwv101 IF exists; DROP TABLE xvwt1 IF exists; DROP TABLE xvwt2 IF exists; DROP TABLE xvwj1 IF exists; DROP TABLE public.pubtbl IF exists; CREATE TABLE xvwt1 (i int); CREATE TABLE xvwj1 (i int, vc varchar(10)); CREATE TABLE public.pubtbl (i int); INSERT INTO public.pubtbl values(0); INSERT INTO xvwt1 values(0); INSERT INTO xvwt1 values(1); INSERT INTO xvwj1 values(1, 'one'); /*e*/CREATE VIEW information_schema.xvwv101 AS SELECT * FROM information_schema.system_users; /*e*/CREATE VIEW information_schema.xvwv101 AS SELECT * FROM xvwt1; SET SCHEMA public; /*e*/CREATE VIEW information_schema.xvwv4 AS SELECT * FROM blaine.xvwt1; SET SCHEMA blaine; /*e*/CREATE VIEW xvwv101 AS SELECT * FROM other.xvwt1; SET SCHEMA public; /*e*/CREATE VIEW blaine.xvwv101 AS SELECT * FROM other.xvwt1; SET SCHEMA blaine; /*e*/CREATE VIEW other.xvwv101 AS SELECT * FROM information_schema.system_users, xvwj1 WHERE user = vc; SET SCHEMA public; /*e*/CREATE VIEW other.xvwv101 AS SELECT * FROM information_schema.system_users, blaine.xvwj1 WHERE user = vc; SET SCHEMA blaine; /*e*/CREATE VIEW other.xvwv101 AS SELECT * FROM information_schema.system_users, xvwj1 WHERE information_schema.user = vc; /*e*/CREATE VIEW other.xvwv101 AS SELECT * FROM information_schema.system_users, xvwj1 WHERE information_schema.user = blaine.vc; /*e*/CREATE VIEW information_schema.xvwv101 AS SELECT * FROM information_schema.system_users, xvwj1 WHERE user = vc; SET SCHEMA public; /*e*/CREATE VIEW information_schema.xvwv101 AS SELECT * FROM information_schema.system_users, blaine.xvwj1 WHERE user = vc; SET SCHEMA blaine; /*e*/CREATE VIEW information_schema.xvwv101 AS SELECT * FROM information_schema.system_users, xvwj1 WHERE information_schema.user = vc; /*e*/CREATE VIEW information_schema.xvwv101 AS SELECT * FROM information_schema.system_users, xvwj1 WHERE information_schema.user = blaine.vc; /*e*/CREATE VIEW xvwv101 AS SELECT * FROM system_users, xvwj1 WHERE user = vc; /*e*/CREATE VIEW xvwv101 AS SELECT * FROM information_schema.system_users, information_schema.xvwj1 WHERE user = vc; /*e*/CREATE VIEW xvwv101 AS SELECT * FROM information_schema.system_users, xvwj1 WHERE other.user = vc; /*e*/CREATE VIEW xvwv101 AS SELECT * FROM information_schema.system_users, xvwj1 WHERE blaine.user = blaine.vc; /*c2*/SELECT * FROM xvwt1; -- Sanity check /*u0*/CREATE VIEW xvwv1 AS SELECT * FROM xvwt1; /*e*/CREATE VIEW blaine.xvwv1 AS SELECT * FROM xvwt1; -- Create existing object SET SCHEMA public; /*e*/CREATE VIEW blaine.xvwv1 AS SELECT * FROM blaine.xvwt1; -- Existing object SET SCHEMA blaine; /*u0*/CREATE VIEW blaine.xvwv2 AS SELECT * FROM xvwt1; SET SCHEMA public; /*u0*/CREATE VIEW blaine.xvwv3 AS SELECT * FROM blaine.xvwt1; SET SCHEMA blaine; /*u0*/CREATE VIEW blaine.xvwv4 AS SELECT * FROM xvwt1 WHERE i = 0; /*u0*/CREATE VIEW blaine.xvwv5 AS SELECT * FROM xvwt1 WHERE i < 1; SET SCHEMA public; /*u0*/CREATE VIEW blaine.xvwv6 AS SELECT * FROM information_schema.system_users WHERE user = 'SA'; SET SCHEMA blaine; /*u0*/CREATE VIEW xvwv7 AS SELECT * FROM information_schema.system_users; /*u0*/CREATE VIEW xvwv8 AS SELECT * FROM information_schema.system_users WHERE user = 'SA'; /*u0*/CREATE VIEW xvwv9 AS SELECT * FROM information_schema.system_users, xvwj1 WHERE user = vc; /*u0*/CREATE VIEW xvwv10 AS SELECT * FROM information_schema.system_users, blaine.xvwj1 WHERE user = vc; /*u0*/CREATE VIEW xvwv11 AS SELECT * FROM information_schema.system_users, xvwj1 WHERE system_users.user = vc; /*u0*/CREATE VIEW xvwv12 AS SELECT * FROM information_schema.system_users, xvwj1 WHERE system_users.user = xvwj1.vc; SET SCHEMA public; -- Should FAIL because SEL sub-q gets default schema from Session default. /*e*/CREATE VIEW blaine.xvwv13 AS SELECT * FROM information_schema.system_users, xvwj1 WHERE user = vc; /*u0*/CREATE VIEW blaine.xvwv14 AS SELECT * FROM information_schema.system_users, blaine.xvwj1 WHERE user = vc; SET SCHEMA blaine; /*u0*/CREATE VIEW blaine.xvwv15 AS SELECT * FROM information_schema.system_users, xvwj1 WHERE system_users.user = vc; /*u0*/CREATE VIEW blaine.xvwv16 AS SELECT * FROM information_schema.system_users, blaine.xvwj1 WHERE system_users.user = xvwj1.vc; /*u0*/CREATE VIEW xvwv17 AS SELECT * FROM information_schema.system_users, xvwj1 WHERE user = vc; /*u0*/CREATE VIEW xvwv18 AS SELECT * FROM information_schema.system_users, blaine.xvwj1 WHERE user = vc; /*u0*/CREATE VIEW xvwv19 (v1, v2, v3) AS SELECT * FROM xvwt1, xvwj1 WHERE xvwt1.i = xvwj1.i; /*u0*/CREATE VIEW xvwv20 (v1, v2, v3) AS SELECT * FROM blaine.xvwt1, blaine.xvwj1 WHERE xvwt1.i = xvwj1.i; /*u0*/CREATE VIEW xvwv21 (v1, v2, v3) AS SELECT * FROM blaine.xvwt1, xvwj1 WHERE xvwt1.i = xvwj1.i; /*u0*/CREATE VIEW xvwv22 (v1, v2, v3) AS SELECT * FROM xvwt1, blaine.xvwj1 WHERE xvwt1.i = xvwj1.i; /*u0*/CREATE VIEW blaine.xvwv23 (v1, v2, v3) AS SELECT * FROM xvwt1, xvwj1 WHERE xvwt1.i = xvwj1.i; SET SCHEMA public; /*u0*/CREATE VIEW blaine.xvwv24 (v1, v2, v3) AS SELECT * FROM blaine.xvwt1, blaine.xvwj1 WHERE xvwt1.i = xvwj1.i; -- Sub-SEL (2nd) should default to public schema!: (don't know 'bout 1st SEL) /*e*/CREATE VIEW blaine.xvwv101 AS SELECT * FROM xvwt1 WHERE xvwt1.i = (SELECT i FROM xvwj1); /*e*/CREATE VIEW blaine.xvwv101 AS SELECT * FROM blaine.xvwt1 WHERE xvwt1.i = (SELECT i FROM xvwj1); SET SCHEMA blaine; /*u0*/CREATE VIEW blaine.xvwv25 (v1, v2, v3) AS SELECT * FROM blaine.xvwt1, xvwj1 WHERE xvwt1.i = xvwj1.i; /*u0*/CREATE VIEW blaine.xvwv26 (v1, v2, v3) AS SELECT * FROM xvwt1, blaine.xvwj1 WHERE xvwt1.i = xvwj1.i; -- We do not permit views to reference tables in another schema, except -- for information_schema. /*e*/CREATE VIEW blaine.xvwv27 AS SELECT * FROM public.pubtbl; /*u0*/CREATE VIEW xvwv28 AS SELECT * FROM xvwt1 WHERE i in (0, 1, 11, 12); /*u0*/CREATE VIEW blaine.xvwv29 AS SELECT * FROM xvwt1 WHERE i < 1; /*u0*/CREATE VIEW xvwv30 AS SELECT * FROM xvwt1 WHERE xvwt1.i = (SELECT i FROM xvwj1); /*u0*/CREATE VIEW xvwv31 AS SELECT * FROM xvwt1 WHERE xvwt1.i in (SELECT i FROM xvwj1); /*u0*/CREATE VIEW xvwv32 AS SELECT * FROM xvwt1 WHERE xvwt1.i = (SELECT i FROM xvwj1 WHERE i = 0); /*u0*/CREATE VIEW xvwv33 AS SELECT * FROM blaine.xvwt1 WHERE xvwt1.i = (SELECT i FROM xvwj1); SET SCHEMA public; -- (2nd SEL sub-query) should use Session default schema /*e*/CREATE VIEW blaine.xvwv101 AS SELECT * FROM blaine.xvwt1 WHERE xvwt1.i in (SELECT i FROM xvwj1); SET SCHEMA blaine; /*u0*/CREATE VIEW blaine.xvwv34 AS SELECT * FROM blaine.xvwt1 WHERE xvwt1.i in (SELECT i FROM xvwj1); /*u0*/CREATE VIEW blaine.xvwv35 AS SELECT * FROM blaine.xvwt1 WHERE xvwt1.i = (SELECT i FROM xvwj1 WHERE i = 0); /*u0*/CREATE VIEW blaine.xvwv36 AS SELECT * FROM xvwt1 WHERE xvwt1.i = (SELECT i FROM blaine.xvwj1); /*u0*/CREATE VIEW blaine.xvwv37 AS SELECT * FROM xvwt1 WHERE xvwt1.i in (SELECT i FROM blaine.xvwj1); /*u0*/CREATE VIEW blaine.xvwv38 AS SELECT * FROM xvwt1 WHERE xvwt1.i = (SELECT i FROM blaine.xvwj1 WHERE i = 1); /*u0*/CREATE VIEW blaine.xvwv39 AS SELECT * FROM xvwt1 WHERE xvwt1.i = (SELECT xvwj1.i FROM blaine.xvwj1); /*u0*/CREATE VIEW blaine.xvwv40 AS SELECT * FROM xvwt1 WHERE xvwt1.i in (SELECT xvwj1.i FROM xvwj1); /*u0*/CREATE VIEW blaine.xvwv41 AS SELECT * FROM xvwt1 WHERE xvwt1.i = (SELECT xvwj1.i FROM xvwj1 WHERE i = 1); /*u0*/CREATE VIEW blaine.xvwv42 AS SELECT * FROM xvwt1 WHERE xvwt1.i = (SELECT i FROM blaine.xvwj1 WHERE xvwj1.i = 1); /*u0*/CREATE VIEW blaine.xvwv43 AS SELECT * FROM xvwt1 WHERE xvwt1.i = (SELECT xvwj1.i FROM xvwj1 WHERE xvwj1.i = 1); /*u0*/CREATE VIEW blaine.xvwv44 AS SELECT * FROM xvwt1 WHERE i = (SELECT i FROM xvwj1); /*u0*/CREATE VIEW blaine.xvwv45 AS SELECT * FROM xvwt1 WHERE i in (SELECT i FROM xvwj1); /*u0*/CREATE VIEW blaine.xvwv46 AS SELECT * FROM xvwt1 WHERE i = (SELECT i FROM xvwj1 WHERE i = 1); /*u0*/CREATE VIEW blaine.xvwv47 AS SELECT * FROM blaine.xvwt1 WHERE i = (SELECT i FROM xvwj1); /*u0*/CREATE VIEW blaine.xvwv48 AS SELECT * FROM blaine.xvwt1 WHERE i in (SELECT i FROM xvwj1); /*u0*/CREATE VIEW blaine.xvwv49 AS SELECT * FROM blaine.xvwt1 WHERE i = (SELECT i FROM xvwj1 WHERE i = 1); /*u0*/CREATE VIEW blaine.xvwv50 AS SELECT * FROM xvwt1 WHERE i = (SELECT i FROM blaine.xvwj1); /*u0*/CREATE VIEW blaine.xvwv51 AS SELECT * FROM xvwt1 WHERE i in (SELECT i FROM blaine.xvwj1); /*u0*/CREATE VIEW blaine.xvwv52 AS SELECT * FROM xvwt1 WHERE i = (SELECT i FROM blaine.xvwj1 WHERE i = 1); /*u0*/CREATE VIEW blaine.xvwv53 AS SELECT * FROM xvwt1 WHERE i = (SELECT xvwj1.i FROM blaine.xvwj1); /*u0*/CREATE VIEW blaine.xvwv54 AS SELECT * FROM xvwt1 WHERE i in (SELECT xvwj1.i FROM xvwj1); /*u0*/CREATE VIEW blaine.xvwv55 AS SELECT * FROM xvwt1 WHERE i = (SELECT xvwj1.i FROM xvwj1 WHERE i = 1); /*u0*/CREATE VIEW blaine.xvwv56 AS SELECT * FROM xvwt1 WHERE i = (SELECT i FROM blaine.xvwj1 WHERE xvwj1.i = 1); /*u0*/CREATE VIEW blaine.xvwv57 AS SELECT * FROM xvwt1 WHERE i = (SELECT xvwj1.i FROM xvwj1 WHERE xvwj1.i = 1); /*e*/DROP VIEW other.xvwv1; /*e*/DROP VIEW information_schema.xvwv2; -- ****************************** MEM Indexes DROP INDEX xindi1 IF exists; DROP INDEX xindi2 IF exists; DROP INDEX xindi3 IF exists; DROP INDEX xindi4 IF exists; DROP INDEX xindi5 IF exists; DROP TABLE xindt1 IF exists; DROP TABLE xindt2 IF exists; DROP TABLE xindt3 IF exists; DROP TABLE xindt4 IF exists; DROP TABLE xindt101 IF exists; CREATE TABLE xindt1 (i int); INSERT INTO xindt1 values(0); INSERT INTO xindt1 values(1); CREATE TABLE xindt2 (i int); INSERT INTO xindt2 values(0); INSERT INTO xindt2 values(1); CREATE TABLE xindt3 (i int); INSERT INTO xindt3 values(0); INSERT INTO xindt3 values(1); CREATE TABLE xindt4 (i int); INSERT INTO xindt4 values(0); INSERT INTO xindt4 values(1); /*e*/CREATE UNIQUE INDEX other.xindi101 ON xindt4(i); /*e*/CREATE UNIQUE INDEX xindi101 ON xindt101(i); /*e*/CREATE UNIQUE INDEX blaine.xindi101 ON public.pscht2(i); /*e*/CREATE UNIQUE INDEX public.xindi101 ON xindt1(i); CREATE TABLE xindt101 (i int); INSERT INTO xindt101 values(0); INSERT INTO xindt101 values(1); /*e*/CREATE UNIQUE INDEX information_schema.xindi101 on xindt101(i int); /*u0*/CREATE UNIQUE INDEX xindi1 ON xindt1(i); /*e*/CREATE UNIQUE INDEX xindi1 ON xindt1(i); -- Create existing object /*u0*/CREATE UNIQUE INDEX blaine.xindi2 ON xindt2(i); /*e*/CREATE UNIQUE INDEX blaine.xindi2 ON xindt2(i); -- Create existing object /*u0*/CREATE UNIQUE INDEX xindi3 ON xindt3(i); SET SCHEMA public; /*u0*/CREATE UNIQUE INDEX xindi4 ON blaine.xindt4(i); SET SCHEMA blaine; -- The error message says that the schema name is invalid. -- Can only create indexes in same schema as target table. /*e*/CREATE UNIQUE INDEX xindi5 ON information_schema.system_users(user); /*e*/DROP INDEX other.xindi1; /*e*/DROP INDEX information_schema.xindi2; -- ****************************** CACH Indexes DROP INDEX xcindi1 IF exists; DROP INDEX xcindi2 IF exists; DROP INDEX xcindi3 IF exists; DROP INDEX xcindi4 IF exists; DROP INDEX xcindi5 IF exists; DROP TABLE xcindt1 IF exists; DROP TABLE xcindt2 IF exists; DROP TABLE xcindt3 IF exists; DROP TABLE xcindt4 IF exists; DROP TABLE xcindt101 IF exists; CREATE TABLE xcindt1 (i int); INSERT INTO xcindt1 values(0); INSERT INTO xcindt1 values(1); CREATE TABLE xcindt2 (i int); INSERT INTO xcindt2 values(0); INSERT INTO xcindt2 values(1); CREATE TABLE xcindt3 (i int); INSERT INTO xcindt3 values(0); INSERT INTO xcindt3 values(1); CREATE TABLE xcindt4 (i int); INSERT INTO xcindt4 values(0); INSERT INTO xcindt4 values(1); /*e*/CREATE UNIQUE INDEX other.xcindi101 on xcindt101(i); CREATE TABLE xcindt101 (i int); INSERT INTO xcindt101 values(0); INSERT INTO xcindt101 values(1); /*e*/CREATE UNIQUE INDEX information_schema.xcindi101 on xcindt101(i int); /*u0*/CREATE UNIQUE INDEX xcindi1 ON xcindt1(i); /*e*/CREATE UNIQUE INDEX xcindi1 ON xcindt1(i); -- Create existing object /*u0*/CREATE UNIQUE INDEX blaine.xcindi2 ON xcindt2(i); /*e*/CREATE UNIQUE INDEX blaine.xcindi2 ON xcindt2(i); -- Create existing object /*u0*/CREATE UNIQUE INDEX xcindi3 ON xcindt3(i); /*u0*/CREATE UNIQUE INDEX xcindi4 ON xcindt4(i); -- The error message says that the schema name is invalid. -- Can only create indexes in same schema as target table. /*e*/CREATE UNIQUE INDEX xcindi5 ON information_schema.system_users(user); /*e*/DROP INDEX other.xcindi1; /*e*/DROP INDEX information_schema.xcindi2; -- ****************************** Sequences DROP TABLE xseqt1 IF EXISTS; CREATE TABLE xseqt1 (i int); INSERT INTO xseqt1 VALUES(10); -- No "IF EXISTS" allowed with xsequences, so can't verify they don't exists. /*e*/CREATE SEQUENCE other.xs101; /*e*/CREATE SEQUENCE information_schema.xs101; /*u0*/CREATE SEQUENCE xs1; /*e*/CREATE SEQUENCE xs1; -- Create existing object SET SCHEMA public; /*u0*/CREATE SEQUENCE blaine.xs2; /*e*/CREATE SEQUENCE blaine.xs2; -- Create existing object -- To test persistence of incremented value: /*r0*/SELECT next value FOR blaine.xs2 FROM information_schema.system_users where user = 'SA'; SET SCHEMA blaine; /*r1*/SELECT next value FOR xs2 FROM information_schema.system_users where user = 'SA'; -- ****************************** Triggers DROP TABLE xtrgt1 IF EXISTS; DROP TABLE xtrgt2 IF EXISTS; DROP TABLE xtrgt3 IF EXISTS; DROP TABLE xtrgt4 IF EXISTS; DROP TABLE xtrgt101 IF EXISTS; -- No "IF EXISTS" allowed with triggers, so can't verify they don't exists. CREATE TABLE xtrgt1 (i int); CREATE TABLE xtrgt2 (i int); CREATE TABLE xtrgt3 (i int); CREATE TABLE xtrgt4 (i int); /*e*/CREATE TRIGGER other.xtrgtrig101 AFTER INSERT ON xtrgt1 CALL "org.hsqldb.test.BlaineTrig"; /*e*/CREATE TRIGGER xtrgtrig101 AFTER INSERT ON other.xtrgt1 CALL "org.hsqldb.test.BlaineTrig"; /*e*/CREATE TRIGGER xtrgtrig101 AFTER INSERT ON information_schema.xtrgt1 CALL "org.hsqldb.test.BlaineTrig"; /*e*/CREATE TRIGGER xtrgtrig101 AFTER INSERT ON xtrgt101 CALL "org.hsqldb.test.BlaineTrig"; /*u0*/CREATE TRIGGER xtrgtrig1 AFTER INSERT ON xtrgt1 QUEUE 0 CALL "org.hsqldb.test.BlaineTrig"; /*u0*/CREATE TRIGGER blaine.xtrgtrig2 AFTER INSERT ON xtrgt2 QUEUE 0 CALL "org.hsqldb.test.BlaineTrig"; /*u0*/CREATE TRIGGER xtrgtrig3 AFTER INSERT ON blaine.xtrgt3 QUEUE 0 CALL "org.hsqldb.test.BlaineTrig"; SET SCHEMA public; /*u0*/CREATE TRIGGER blaine.xtrgtrig4 AFTER INSERT ON blaine.xtrgt4 QUEUE 0 CALL "org.hsqldb.test.BlaineTrig"; SET SCHEMA blaine; /*e*/DROP TRIGGER information_schema.xtrgtrig1; /*e*/DROP TRIGGER other.xtrgtrig1; -- ****************************** Constraints DROP TABLE xcont1 IF EXISTS; DROP TABLE xcont2 IF EXISTS; DROP TABLE xcont3 IF EXISTS; DROP TABLE xcont4 IF EXISTS; DROP TABLE xcont5 IF EXISTS; DROP TABLE xcont6 IF EXISTS; DROP TABLE xcont7 IF EXISTS; DROP TABLE xcont8 IF EXISTS; DROP TABLE xcont9 IF EXISTS; DROP TABLE xcont10 IF EXISTS; DROP TABLE xcont11 IF EXISTS; DROP TABLE xcont12 IF EXISTS; DROP TABLE xcont13 IF EXISTS; DROP TABLE xcont14 IF EXISTS; DROP TABLE xcont15 IF EXISTS; DROP TABLE xcont16 IF EXISTS; DROP TABLE xcont17 IF EXISTS; DROP TABLE xcont18 IF EXISTS; DROP TABLE xcont19 IF EXISTS; DROP TABLE xcont20 IF EXISTS; DROP TABLE xcont101 IF EXISTS; CREATE TABLE xconj1(i int, vc varchar(10), PRIMARY KEY (i)); INSERT INTO xconj1 values(1, 'one'); -- No "IF EXISTS" allowed with xconstrs., so can't verify they don't exists. /*e*/CREATE TABLE other.xcont101 (i int, CONSTRAINT xconuc1 UNIQUE(i)); /*e*/CREATE TABLE system_information.xcont1 (i int, CONSTRAINT xconuc1 UNIQUE(i)); /*u0*/CREATE TABLE xcont1 (i int, CONSTRAINT xconuc1 UNIQUE(i)); /*e*/CREATE TABLE xcont1 (i int, CONSTRAINT xconuc1 UNIQUE(i)); /*e*/CREATE TABLE xcont101 (i int, CONSTRAINT xconuc1 UNIQUE(i)); -- xconuc1 already exists /*e*/CREATE TABLE xcont101 (i int, CONSTRAINT blaine.xconuc1 UNIQUE(i)); -- ditto /*u0*/CREATE TABLE blaine.xcont2 (i int, CONSTRAINT xconuc2 UNIQUE(i)); /*e*/CREATE TABLE blaine.xcont101 (i int, CONSTRAINT xconuc2 UNIQUE(i)); -- xconuc2 already SET SCHEMA public; /*e*/CREATE TABLE blaine.xcont101 (i int, CONSTRAINT blaine.xconuc2 UNIQUE(i)); -- dit SET SCHEMA blaine; /*u0*/CREATE TABLE xcont3 (i int, CONSTRAINT blaine.xconuc3 UNIQUE(i)); SET SCHEMA public; /*u0*/CREATE TABLE blaine.xcont4 (i int, CONSTRAINT blaine.xconuc4 UNIQUE(i)); SET SCHEMA blaine; /*u0*/CREATE TABLE xcont5 (i int, CONSTRAINT xconpk5 PRIMARY KEY(i)); /*u0*/CREATE TABLE blaine.xcont6 (i int, CONSTRAINT xconpk6 PRIMARY KEY(i)); /*u0*/CREATE TABLE xcont7 (i int, CONSTRAINT blaine.xconpk7 PRIMARY KEY(i)); /*u0*/CREATE TABLE blaine.xcont8 (i int, CONSTRAINT blaine.xconpk8 PRIMARY KEY(i)); /*u0*/CREATE TABLE xcont9 (i int, CONSTRAINT xconfk9 FOREIGN KEY(i) REFERENCES xconj1(i)); /*e*/CREATE TABLE xcont101 (i int, CONSTRAINT xconfk9 FOREIGN KEY(i) REFERENCES other.xconj1(i)); /*e*/CREATE TABLE xcont101 (i int, CONSTRAINT xconfk9 FOREIGN KEY(i) REFERENCES information_schema.xconj1(i)); /*u0*/CREATE TABLE blaine.xcont10 (i int, CONSTRAINT xconfk10 FOREIGN KEY(i) REFERENCES xconj1(i)); /*u0*/CREATE TABLE xcont11 (i int, CONSTRAINT blaine.xconfk11 FOREIGN KEY(i) REFERENCES xconj1(i)); /*u0*/CREATE TABLE blaine.xcont12 (i int, CONSTRAINT blaine.xconfk12 FOREIGN KEY(i) REFERENCES xconj1(i)); -- Test prohibit create fk -> another-schema with every thing else ok. CREATE TABLE public.badtarget(i int, unique (i)); /*e*/CREATE TABLE xcont13 (i int, CONSTRAINT xconfk13 FOREIGN KEY(i) REFERENCES public.badtarget(i)); /*u0*/CREATE TABLE xcont13 (i int, CONSTRAINT xconfk13 FOREIGN KEY(i) REFERENCES blaine.xconj1(i)); /*u0*/CREATE TABLE blaine.xcont14 (i int, CONSTRAINT xconfk14 FOREIGN KEY(i) REFERENCES blaine.xconj1(i)); /*u0*/CREATE TABLE xcont15 (i int, CONSTRAINT blaine.xconfk15 FOREIGN KEY(i) REFERENCES blaine.xconj1(i)); SET SCHEMA public; /*u0*/CREATE TABLE blaine.xcont16 (i int, CONSTRAINT blaine.xconfk16 FOREIGN KEY(i) REFERENCES blaine.xconj1(i)); SET SCHEMA blaine; /*u0*/CREATE TABLE xcont17 (i int, CONSTRAINT xconc17 CHECK (i < 1)); /*u0*/CREATE TABLE blaine.xcont18 (i int, CONSTRAINT xconc18 CHECK (i in (0, 2))); /*u0*/CREATE TABLE xcont19 (i int, CONSTRAINT blaine.xconc19 CHECK (i = 0)); SET SCHEMA public; /*u0*/CREATE TABLE blaine.xcont20 (i int, CONSTRAINT blaine.xconc20 CHECK (i != 1)); -- schema definition with table, view and sequenence -- schema definition containing illegal DDL statement /*e*/CREATE SCHEMA FELIX AUTHORIZATION DBA CREATE TABLE FELIXT1 (AV1 VARCHAR(10), BV VARCHAR(10)) CREATE TABLE FELIXT2 (AV2 VARCHAR(10), BI INTEGER) CREATE SEQUENCE FELIXS1 CREATE VIEW FELIXV1 AS SELECT * FROM FELIXT1 JOIN FELIXT2 ON AV1 = AV2 CREATE VIEW FELIXV2 AS SELECT AV1 AS C1, NEXT VALUE FOR FELIXS1 AS C2 FROM FELIXT1 ALTER TABLE FELIXT1 ADD PRIMARY KEY; /*e*/SET SCHEMA FELIX /*e*/SELECT * FROM FELIX.FELIXT1 -- schema definition CREATE SCHEMA FELIX AUTHORIZATION DBA CREATE TABLE FELIXT1 (AV1 VARCHAR(10), BV VARCHAR(10)) CREATE TABLE FELIXT2 (AV2 VARCHAR(10), BI INTEGER) CREATE SEQUENCE FELIXS1 CREATE VIEW FELIXV1 AS SELECT * FROM FELIXT1 JOIN FELIXT2 ON AV1 = AV2 CREATE VIEW FELIXV2 AS SELECT AV1 AS C1, NEXT VALUE FOR FELIXS1 AS C2 FROM FELIXT1; /*e*/SELECT * FROM FELIXV1 SET SCHEMA FELIX /*c0*/SELECT * FROM FELIXV1 -- ****************************** ALTERs -- Add tests when time permits. /*u0*/SET SCHEMA blaine; -- Sanity. Cf. 1st 2 lines of B2 script. /*c2*/SELECT * FROM xtblt1; -- Sanity. Cf. 1st 2 lines of B2 script. -- This to test recovery from .log files. COMMIT; SHUTDOWN IMMEDIATELY; hsqldb-1.8.0.10.orig/testrun/hsqldb/TestSelfRightCaching.txt0000644000175000017500000001233310325730173022350 0ustar renerene-- Rights Map and Adminstrative Right Caching tests DROP TABLE m IF EXISTS; CREATE TABLE m(i int); INSERT INTO m VALUES(11); CREATE USER cani PASSWORD cani; CONNECT USER cani PASSWORD cani; /*e*/SELECT * FROM m; -- Sanity check of individual grants for user and for public CONNECT USER sa PASSWORD ""; GRANT SELECT ON m TO PUBLIC; CONNECT USER cani PASSWORD cani; /*c1*/SELECT * FROM m; CONNECT USER sa PASSWORD ""; REVOKE SELECT ON m FROM PUBLIC; CONNECT USER cani PASSWORD cani; /*e*/SELECT * FROM m; -- Dual grants, but with SELECTs in between (which will rebuild the caches) CONNECT USER sa PASSWORD ""; GRANT SELECT ON m TO cani; CONNECT USER cani PASSWORD cani; /*c1*/SELECT * FROM m; CONNECT USER sa PASSWORD ""; GRANT SELECT ON m TO PUBLIC; CONNECT USER cani PASSWORD cani; /*c1*/SELECT * FROM m; CONNECT USER sa PASSWORD ""; REVOKE SELECT ON m FROM PUBLIC; CONNECT USER cani PASSWORD cani; /*c1*/SELECT * FROM m; CONNECT USER sa PASSWORD ""; REVOKE SELECT ON m FROM cani; CONNECT USER cani PASSWORD cani; /*e*/SELECT * FROM m; -- Dual grants. No cache build until both GRANTS added. CONNECT USER sa PASSWORD ""; GRANT SELECT ON m TO PUBLIC; GRANT SELECT ON m TO cani; CONNECT USER cani PASSWORD cani; /*c1*/SELECT * FROM m; CONNECT USER sa PASSWORD ""; REVOKE SELECT ON m FROM PUBLIC; CONNECT USER cani PASSWORD cani; /*c1*/SELECT * FROM m; CONNECT USER sa PASSWORD ""; REVOKE SELECT ON m FROM cani; CONNECT USER cani PASSWORD cani; /*e1*/SELECT * FROM m; -- Ditto, in different sequence. CONNECT USER sa PASSWORD ""; GRANT SELECT ON m TO cani; GRANT SELECT ON m TO PUBLIC; CONNECT USER cani PASSWORD cani; /*c1*/SELECT * FROM m; CONNECT USER sa PASSWORD ""; REVOKE SELECT ON m FROM PUBLIC; CONNECT USER cani PASSWORD cani; /*c1*/SELECT * FROM m; CONNECT USER sa PASSWORD ""; REVOKE SELECT ON m FROM cani; CONNECT USER cani PASSWORD cani; /*e1*/SELECT * FROM m; -- ... different sequence CONNECT USER sa PASSWORD ""; GRANT SELECT ON m TO PUBLIC; GRANT SELECT ON m TO cani; CONNECT USER cani PASSWORD cani; /*c1*/SELECT * FROM m; CONNECT USER sa PASSWORD ""; REVOKE SELECT ON m FROM cani; CONNECT USER cani PASSWORD cani; /*c1*/SELECT * FROM m; CONNECT USER sa PASSWORD ""; REVOKE SELECT ON m FROM PUBLIC; CONNECT USER cani PASSWORD cani; /*e1*/SELECT * FROM m; -- Ditto, in different sequence. CONNECT USER sa PASSWORD ""; GRANT SELECT ON m TO cani; GRANT SELECT ON m TO PUBLIC; CONNECT USER cani PASSWORD cani; /*c1*/SELECT * FROM m; CONNECT USER sa PASSWORD ""; REVOKE SELECT ON m FROM cani; CONNECT USER cani PASSWORD cani; /*c1*/SELECT * FROM m; CONNECT USER sa PASSWORD ""; REVOKE SELECT ON m FROM PUBLIC; CONNECT USER cani PASSWORD cani; /*e1*/SELECT * FROM m; -- REPEAT SAME WITH A NAMED ROLE INSTEAD OF PUBLIC CONNECT USER sa PASSWORD ""; CREATE ROLE sesamerole; GRANT sesamerole TO cani; -- Sanity check of individual grants for user and for sesamerole CONNECT USER sa PASSWORD ""; GRANT SELECT ON m TO sesamerole; CONNECT USER cani PASSWORD cani; /*c1*/SELECT * FROM m; CONNECT USER sa PASSWORD ""; REVOKE SELECT ON m FROM sesamerole; CONNECT USER cani PASSWORD cani; /*e*/SELECT * FROM m; -- Dual grants, but with SELECTs in between (which will rebuild the caches) CONNECT USER sa PASSWORD ""; GRANT SELECT ON m TO cani; CONNECT USER cani PASSWORD cani; /*c1*/SELECT * FROM m; CONNECT USER sa PASSWORD ""; GRANT SELECT ON m TO sesamerole; CONNECT USER cani PASSWORD cani; /*c1*/SELECT * FROM m; CONNECT USER sa PASSWORD ""; REVOKE SELECT ON m FROM sesamerole; CONNECT USER cani PASSWORD cani; /*c1*/SELECT * FROM m; CONNECT USER sa PASSWORD ""; REVOKE SELECT ON m FROM cani; CONNECT USER cani PASSWORD cani; /*e*/SELECT * FROM m; -- Dual grants. No cache build until both GRANTS added. CONNECT USER sa PASSWORD ""; GRANT SELECT ON m TO sesamerole; GRANT SELECT ON m TO cani; CONNECT USER cani PASSWORD cani; /*c1*/SELECT * FROM m; CONNECT USER sa PASSWORD ""; REVOKE SELECT ON m FROM sesamerole; CONNECT USER cani PASSWORD cani; /*c1*/SELECT * FROM m; CONNECT USER sa PASSWORD ""; REVOKE SELECT ON m FROM cani; CONNECT USER cani PASSWORD cani; /*e1*/SELECT * FROM m; -- Ditto, in different sequence. CONNECT USER sa PASSWORD ""; GRANT SELECT ON m TO cani; GRANT SELECT ON m TO sesamerole; CONNECT USER cani PASSWORD cani; /*c1*/SELECT * FROM m; CONNECT USER sa PASSWORD ""; REVOKE SELECT ON m FROM sesamerole; CONNECT USER cani PASSWORD cani; /*c1*/SELECT * FROM m; CONNECT USER sa PASSWORD ""; REVOKE SELECT ON m FROM cani; CONNECT USER cani PASSWORD cani; /*e1*/SELECT * FROM m; -- ... different sequence CONNECT USER sa PASSWORD ""; GRANT SELECT ON m TO sesamerole; GRANT SELECT ON m TO cani; CONNECT USER cani PASSWORD cani; /*c1*/SELECT * FROM m; CONNECT USER sa PASSWORD ""; REVOKE SELECT ON m FROM cani; CONNECT USER cani PASSWORD cani; /*c1*/SELECT * FROM m; CONNECT USER sa PASSWORD ""; REVOKE SELECT ON m FROM sesamerole; CONNECT USER cani PASSWORD cani; /*e1*/SELECT * FROM m; -- Ditto, in different sequence. CONNECT USER sa PASSWORD ""; GRANT SELECT ON m TO cani; GRANT SELECT ON m TO sesamerole; CONNECT USER cani PASSWORD cani; /*c1*/SELECT * FROM m; CONNECT USER sa PASSWORD ""; REVOKE SELECT ON m FROM cani; CONNECT USER cani PASSWORD cani; /*c1*/SELECT * FROM m; CONNECT USER sa PASSWORD ""; REVOKE SELECT ON m FROM sesamerole; CONNECT USER cani PASSWORD cani; /*e1*/SELECT * FROM m; hsqldb-1.8.0.10.orig/testrun/hsqldb/TestSelfInsertDeleteQueries.txt0000644000175000017500000000616210171247130023741 0ustar renerene-- -- TestSelfInsertDeleteQueries.txt -- -- Parser tests for insert and delete queries -- create cached table testtable ( aString varchar(256) not null, firstNum integer not null, aDate date not null, secondNum integer not null, thirdNum integer not null, aName varchar(32) not null ); insert into TESTTABLE(aString, firstNum, aDate, secondNum, thirdNum, aName) values ('Current', 22, '2003-11-10', 18, 3, 'my name goes here'); insert into TESTTABLE(aString, firstNum, aDate, secondNum, thirdNum, aName) values ('Popular', 23, '2003-11-10', 18, 3, 'my name goes here'); insert into TESTTABLE(aString, firstNum, aDate, secondNum, thirdNum, aName) values ('New', 5, '2003-11-10', 18, 3, 'my name goes here'); insert into TESTTABLE(aString, firstNum, aDate, secondNum, thirdNum, aName) values ('Old', 5, '2003-11-10', 18, 3, 'my name goes here'); insert into TESTTABLE(aString, firstNum, aDate, secondNum, thirdNum, aName) values ('CCurrent', 5, '2003-11-10', 18, 3, 'my name goes here'); insert into TESTTABLE(aString, firstNum, aDate, secondNum, thirdNum, aName) values ('ELV', 5, '2003-11-10', 18, 3, 'my name goes here'); insert into TESTTABLE(aString, firstNum, aDate, secondNum, thirdNum, aName) values ('ELNA', 5, '2003-11-10', 18, 3, 'my name goes here'); insert into TESTTABLE(aString, firstNum, aDate, secondNum, thirdNum, aName) values ('Older', 5, '2003-11-10', 18, 3, 'my name goes here'); insert into TESTTABLE(aString, firstNum, aDate, secondNum, thirdNum, aName) values ('RA', 20, '2003-11-10', 18, 3, 'my name goes here'); insert into TESTTABLE(aString, firstNum, aDate, secondNum, thirdNum, aName) values ('RP', 2, '2003-11-10', 18, 3, 'my name goes here'); insert into TESTTABLE values ('VS', 3, '2003-11-10', 18, 3, 'my name goes here'); -- /*c11*/select * from testtable where adate = '2003-11-10' and secondNum = 18; /*c11*/select * from testtable where adate = '2003-11-10'; /*c1*/select * from testtable where adate = '2003-11-10' and firstNum = 20; /*c11*/select * from testtable where adate = '2003-11-10' and thirdNum = 3; -- create table tt (col varchar(256)); insert into tt (col) select aString from testtable; insert into tt (col) select aString from testtable union select aName from testtable; insert into tt (col) (select aString from testtable union select aName from testtable); insert into tt (col) ((select aString from testtable union select aName from testtable) intersect select aString from testtable where firstNum = 20); insert into tt select aString from testtable; insert into tt select aString from testtable union select aName from testtable; insert into tt (select aString from testtable union select aName from testtable); insert into tt ((select aString from testtable union select aName from testtable) intersect select aString from testtable where firstNum = 20); drop table tt; drop table testtable;hsqldb-1.8.0.10.orig/testrun/hsqldb/TestSelfSchemaPerCachTbl2.txt0000644000175000017500000001662010232240133023160 0ustar renerene-- TEST CACHED TABLE OBJECTS -- This TESTS the schema-specific objects created in a previous script. CREATE USER otheruser PASSWORD otheruser; -- ****************************** CACH Tables /*c2*/SELECT * FROM ctblt1; /*c1*/SELECT * FROM ctblt1 WHERE i = 0; /*c2*/SELECT * FROM ctblt1 WHERE i in (0, 1, 11, 12); /*c1*/SELECT * FROM ctblt1 WHERE i < 1; /*c1*/SELECT * FROM ctblt1 WHERE ctblt1.i = (SELECT i FROM tblj1); /*c1*/SELECT * FROM ctblt1 WHERE ctblt1.i = (SELECT i FROM tblj1 WHERE tblj1.i = 1); /*c1*/SELECT * FROM ctblt1 WHERE ctblt1.i in (SELECT i FROM tblj1); /*c0*/SELECT * FROM ctblt1 WHERE ctblt1.i = (SELECT i FROM tblj1 WHERE i = 0); /*c1*/SELECT * FROM public.ctblt1 WHERE ctblt1.i = (SELECT i FROM tblj1); /*c1*/SELECT * FROM public.ctblt1 WHERE ctblt1.i in (SELECT i FROM tblj1); /*c1*/SELECT * FROM public.ctblt1 WHERE ctblt1.i = (SELECT i FROM tblj1 WHERE i = 1); /*c1*/SELECT * FROM ctblt1 WHERE ctblt1.i = (SELECT i FROM public.tblj1); /*c1*/SELECT * FROM ctblt1 WHERE ctblt1.i in (SELECT i FROM public.tblj1); /*c1*/SELECT * FROM ctblt1 WHERE ctblt1.i = (SELECT i FROM public.tblj1 WHERE i = 1); /*c1*/SELECT * FROM ctblt1 WHERE ctblt1.i = (SELECT tblj1.i FROM public.tblj1); /*c1*/SELECT * FROM ctblt1 WHERE ctblt1.i in (SELECT tblj1.i FROM tblj1); /*c1*/SELECT * FROM ctblt1 WHERE ctblt1.i = (SELECT tblj1.i FROM tblj1 WHERE i = 1); /*c1*/SELECT * FROM ctblt1 WHERE ctblt1.i = (SELECT i FROM public.tblj1 WHERE tblj1.i = 1); /*c1*/SELECT * FROM ctblt1 WHERE ctblt1.i = (SELECT tblj1.i FROM tblj1 WHERE tblj1.i = 1); /*c1*/SELECT * FROM ctblt1 WHERE i = (SELECT i FROM tblj1); /*c1*/SELECT * FROM ctblt1 WHERE i in (SELECT i FROM tblj1); /*c1*/SELECT * FROM ctblt1 WHERE i = (SELECT i FROM tblj1 WHERE i = 1); /*c1*/SELECT * FROM public.ctblt1 WHERE i = (SELECT i FROM tblj1); /*c1*/SELECT * FROM public.ctblt1 WHERE i in (SELECT i FROM tblj1); /*c0*/SELECT * FROM public.ctblt1 WHERE i = (SELECT i FROM tblj1 WHERE i = 0); /*c1*/SELECT * FROM ctblt1 WHERE i = (SELECT i FROM public.tblj1); /*c1*/SELECT * FROM ctblt1 WHERE i in (SELECT i FROM public.tblj1); /*c0*/SELECT * FROM ctblt1 WHERE i = (SELECT i FROM public.tblj1 WHERE i = 0); /*c1*/SELECT * FROM ctblt1 WHERE i = (SELECT tblj1.i FROM public.tblj1); /*c1*/SELECT * FROM ctblt1 WHERE i in (SELECT tblj1.i FROM tblj1); /*c0*/SELECT * FROM ctblt1 WHERE i = (SELECT tblj1.i FROM tblj1 WHERE i = 0); /*c1*/SELECT * FROM ctblt1 WHERE i = (SELECT i FROM public.tblj1 WHERE tblj1.i = 1); /*c1*/SELECT * FROM ctblt1 WHERE i = (SELECT tblj1.i FROM tblj1 WHERE tblj1.i = 1); /*e*/SELECT * FROM system_users WHERE user = 'SA'; /*e*/SELECT * FROM other.ctblt1; /*e*/SELECT * FROM other.system_users; /*e*/SELECT * FROM information_schema.ctblt1; /*e*/SELECT * FROM public.system_users; /*c2*/SELECT * FROM public.ctblt1; /*c1*/SELECT * FROM information_schema.system_users WHERE user = 'SA'; /*c1*/SELECT * FROM public.ctblt1 WHERE i = 0; /*e*/SELECT * FROM other.ctblt1 WHERE i = 0; /*e*/SELECT * FROM information_schema.ctblt1 WHERE i = 0; /*c1*/SELECT * FROM public.ctblt1, public.tblj1 WHERE ctblt1.i = tblj1.i; /*c1*/SELECT * FROM ctblt1, public.tblj1 WHERE ctblt1.i = tblj1.i; /*c1*/SELECT * FROM public.ctblt1, tblj1 WHERE ctblt1.i = tblj1.i; /*c1*/SELECT * FROM ctblt1, tblj1 WHERE ctblt1.i = tblj1.i; /*c1*/SELECT vc FROM public.ctblt1, public.tblj1 WHERE ctblt1.i = tblj1.i; /*c1*/SELECT vc FROM ctblt1, public.tblj1 WHERE ctblt1.i = tblj1.i; /*c1*/SELECT vc FROM public.ctblt1, tblj1 WHERE ctblt1.i = tblj1.i; /*c1*/SELECT vc FROM ctblt1, tblj1 WHERE ctblt1.i = tblj1.i; /*c1*/SELECT tblj1.vc FROM public.ctblt1, public.tblj1 WHERE ctblt1.i = tblj1.i; /*c1*/SELECT tblj1.vc FROM ctblt1, public.tblj1 WHERE ctblt1.i = tblj1.i; /*c1*/SELECT tblj1.vc FROM public.ctblt1, tblj1 WHERE ctblt1.i = tblj1.i; /*c1*/SELECT tblj1.vc FROM ctblt1, tblj1 WHERE ctblt1.i = tblj1.i; /*c1*/SELECT lbla.vc FROM ctblt1, tblj1 lbla WHERE ctblt1.i = lbla.i; /*c1*/SELECT tblj1.vc FROM ctblt1 lblb, tblj1 WHERE lblb.i = tblj1.i; /*c1*/SELECT lbla.vc FROM ctblt1 lblb, tblj1 lbla WHERE lblb.i = lbla.i; /*c1*/SELECT lbla.vc FROM public.ctblt1, tblj1 lbla WHERE ctblt1.i = lbla.i; /*c1*/SELECT tblj1.vc FROM public.ctblt1 lblb, tblj1 WHERE lblb.i = tblj1.i; /*c1*/SELECT lbla.vc FROM public.ctblt1 lblb, tblj1 lbla WHERE lblb.i = lbla.i; /*c1*/SELECT lbla.vc FROM ctblt1, public.tblj1 lbla WHERE ctblt1.i = lbla.i; /*c1*/SELECT tblj1.vc FROM ctblt1 lblb, public.tblj1 WHERE lblb.i = tblj1.i; /*c1*/SELECT lbla.vc FROM ctblt1 lblb, public.tblj1 lbla WHERE lblb.i = lbla.i; /*u0*/SET TABLE ctblt1 READONLY true; /*e*/UPDATE ctblt1 set i = 11 WHERE i = 1; /*u0*/SET TABLE public.ctblt1 READONLY true; /*e*/SET TABLE information_schema.ctblt1 READONLY true; /*e*/SET TABLE other.ctblt1 READONLY true; /*u0*/SET TABLE ctblt1 READONLY false; /*u0*/SET TABLE public.ctblt1 READONLY false; /*c2*/SELECT i FROM ctblt1; -- N.b.: Do not commit DML changes so that this whole block may be repeated. COMMIT; SET AUTOCOMMIT false; /*u1*/UPDATE ctblt1 set i = 11 WHERE i = 1; /*u1*/UPDATE ctblt1 set ctblt1.i = 12 WHERE i = 11; /*u1*/UPDATE ctblt1 set ctblt1.i = 13 WHERE ctblt1.i = 12; /*u1*/UPDATE public.ctblt1 set i = 14 WHERE i = 13; /*u1*/UPDATE public.ctblt1 set ctblt1.i = 15 WHERE i = 14; /*u1*/UPDATE public.ctblt1 set ctblt1.i = 16 WHERE ctblt1.i = 15; /*e*/UPDATE other.ctblt1 set ctblt1.i = 17 WHERE ctblt1.i = 16; /*e*/UPDATE information_schema.ctblt1 set ctblt1.i = 17 WHERE ctblt1.i = 16; /*u1*/UPDATE ctblt1 ali set i = 17 WHERE i = 16; /*u1*/UPDATE ctblt1 ali set ali.i = 18 WHERE i = 17; /*u1*/UPDATE ctblt1 ali set ali.i = 19 WHERE ali.i = 18; /*u1*/UPDATE ctblt1 ali set i = 20 WHERE ali.i = 19; /*u1*/UPDATE public.ctblt1 ali set i = 21 WHERE i = 20; /*u1*/UPDATE public.ctblt1 ali set ali.i = 22 WHERE i = 21; /*u1*/UPDATE public.ctblt1 ali set ali.i = 23 WHERE ali.i = 22; /*u1*/UPDATE public.ctblt1 ali set i = 24 WHERE ali.i = 23; /*e*/UPDATE other.ctblt1 ali set i = 25 WHERE ali.i = 24; /*e*/UPDATE other.ctblt1 ali set i = 25 WHERE .i = 24; /*e*/UPDATE other.ctblt1 set i = 25 WHERE i = 24; /*e*/DELETE FROM other.ctblt1 ali WHERE ali.i = 24; /*e*/DELETE FROM other.ctblt1 ali; /*e*/DELETE FROM other.ctblt1 set WHERE i = 24; /*e*/DELETE FROM other.ctblt1 WHERE i = 24; /*e*/DELETE FROM system_information.tblj1 WHERE tblj1.i = 1; /*u1*/DELETE FROM ctblt1 WHERE i = 0; /*u1*/DELETE FROM public.ctblt1 WHERE i = 24; /*u1*/DELETE FROM public.tblj1 WHERE tblj1.i = 1; ROLLBACK; /*c2*/SELECT i FROM ctblt1; /*u0*/GRANT ALL ON ctblt1 TO otheruser; /*u0*/GRANT ALL ON public.ctblt2 TO otheruser; /*e*/GRANT ALL ON other.ctblt3 TO otheruser; /*e*/GRANT ALL ON information_schema.ctblt3 TO otheruser; /*u0*/REVOKE ALL ON ctblt1 FROM otheruser; /*u0*/REVOKE ALL ON public.ctblt2 FROM otheruser; /*e*/REVOKE ALL ON other.ctblt3 FROM otheruser; /*e*/REVOKE ALL ON information_schema.ctblt3 FROM otheruser; /*e*/DROP TABLE other.ctblt3; /*e*/DROP TABLE information_schema.ctblt4; /*e*/DROP TABLE ctblt101; /*e*/DROP TABLE public.ctblt101; /*u0*/DROP TABLE ctblt101 IF EXISTS; /*u0*/DROP TABLE public.ctblt101 IF EXISTS; -- Should "DROP TABLE nonexistentschema.notable IF EXISTS" work? /*u0*/DROP TABLE other.system_users IF exists; /*u0*/DROP TABLE system_users IF exists; -- ****************************** ALTERs -- Add tests when time permits. DROP USER otheruser; -- This to test .script persistence. SHUTDOWN; hsqldb-1.8.0.10.orig/testrun/hsqldb/TestSelfTempTable1.txt0000644000175000017500000000165710330250374021757 0ustar renerene/*s*/DROP tmptbl1 IF EXISTS; /*s*/DROP tmptbl2 IF EXISTS; /*s*/DROP user altuser1; /*s*/DROP user altuser2; CREATE USER altuser1 PASSWORD password; CREATE USER altuser2 PASSWORD password; SET AUTOCOMMIT false; /*u0*/CREATE TEMP TABLE tmptbl1 (i int); /*u0*/CREATE TEMP TABLE tmptbl2 (i int); /*u1*/INSERT INTO tmptbl1 VALUES(1); /*u1*/INSERT INTO tmptbl1 VALUES(2); /*c2*/SELECT * FROM tmptbl1; COMMIT; -- Purposefully not committing these inserts /*u1*/INSERT INTO tmptbl2 VALUES(1); /*u1*/INSERT INTO tmptbl2 VALUES(2); /*c0*/SELECT * FROM tmptbl1; /*c2*/SELECT * FROM tmptbl2; /*u0*/GRANT ALL ON tmptbl1 TO altuser1; /*u0*/GRANT ALL ON tmptbl2 TO altuser1; CONNECT USER altuser1 PASSWORD password; /*c0*/SELECT * FROM tmptbl1; /*c0*/SELECT * FROM tmptbl2; CONNECT USER altuser2 PASSWORD password; /*e*/SELECT * FROM tmptbl1; /*e*/SELECT * FROM tmptbl2; CONNECT USER SA password ""; SHUTDOWN IMMEDIATELY; hsqldb-1.8.0.10.orig/testrun/hsqldb/TestSelfSchemaPersistD2.txt0000644000175000017500000000024010453732535022756 0ustar renerene-- bug 1479110 -- logging and readback of nested creates in schema -- part 2 of 2 scripts select * from TESTSCHEMAD1.TSD1T2; select * from TESTSCHEMAD1.TSD1T1; hsqldb-1.8.0.10.orig/testrun/hsqldb/TestSelfImmediateShutdown.txt0000644000175000017500000000224010240554657023453 0ustar renereneCREATE TABLE TABLE1(USER_ID INT NOT NULL PRIMARY KEY ); INSERT INTO TABLE1 (USER_ID) VALUES (1); INSERT INTO TABLE1 (USER_ID) VALUES (2); INSERT INTO TABLE1 (USER_ID) VALUES (3); INSERT INTO TABLE1 (USER_ID) VALUES (4); COMMIT; CREATE TABLE TABLE2(USER_ID INT NOT NULL, COLUMN2 SMALLINT DEFAULT 0 NOT NULL, COLUMN3 CHARACTER(10) DEFAULT 'TEST') ; COMMIT; ALTER TABLE TABLE2 ADD CONSTRAINT USER_FK FOREIGN KEY (USER_ID) REFERENCES TABLE1(USER_ID); CREATE INDEX USER_FK ON TABLE2(USER_ID); INSERT INTO TABLE2 (USER_ID) VALUES ( 1 ) ; COMMIT; INSERT INTO TABLE2 (USER_ID) VALUES ( 2 ) ; COMMIT; INSERT INTO TABLE2 (USER_ID) VALUES ( 3 ) ; COMMIT; INSERT INTO TABLE2 (USER_ID) VALUES ( 4 ) ; COMMIT; UPDATE TABLE2 SET COLUMN2=15 WHERE USER_ID=3; COMMIT; /*c4*/SELECT * FROM TABLE1; /*c4*/SELECT * FROM TABLE2; /*c1*/SELECT * FROM TABLE2 WHERE COLUMN2=15; -- bug #1110517 DROP TABLE FILE2 IF EXISTS; CREATE TABLE FILE2(ID VARCHAR(10) PRIMARY KEY,NAME VARCHAR(10),DESCRIPTION VARCHAR(10), field1 INT, field2 VARCHAR(10)); -- DESCRIPTION must be NULL /*u1*/insert into file2(id, name) values('14', 'dir'); /*u1*/update file2 set name = 'newdir' where id = '14'; SHUTDOWN IMMEDIATELY; hsqldb-1.8.0.10.orig/testrun/hsqldb/TestSelfIssues.txt0000644000175000017500000000705010456251475021301 0ustar renerene-- -- TestSelfIssues.txt -- -- Tests demonstrating remaining issues -- -- bug #901313 - fixed - subselect results in error when it returns no rows -- corrected for 1.8.0 RC10 - scalar subquery should return null if no rows are returned drop table table2 if exists; drop table table1 if exists; create table table1 (col1 integer not null, col2 integer not null); create table table2 (col1 integer, col2 integer); insert into table1 (col1, col2) values (1, 1) insert into table1 (col1, col2) values (2, 2) insert into table2 (col1, col2) values (1, 3) insert into table2 (col1, col2) values (2, 4) /*c2*/select t1.col1, t1.col2, t2.col2 from table1 t1, table2 t2 where t1.col1 = t2.col1 /*u2*/update table2 set col2=(select table1.col2 from table1 where table1.col1 = table2.col1) /*c2*/select t1.col1, t1.col2, t2.col2 from table1 t1, table2 t2 where t1.col1 = t2.col1 /*u1*/insert into table2 (col1, col2) values (null, 5) /*u3*/update table2 set col2=(select table1.col2 from table1 where table1.col1 = table2.col1) -- support for aliases in UPDATE has been added /*u3*/update table2 b set col2 = (select a.col2 from table1 a where a.col1 = b.col1) /*c2*/select t1.col1, t1.col2, t2.col2 from table1 t1, table2 t2 where t1.col1 = t2.col1 -- query returns only rows for which the correlated subquery returns a value /*c3*/select table2.col2,(select table1.col2 from table1 where table1.col1 = table2.col1) from table2 -- add row so that subquery returns two rows /*u1*/insert into table1 (col1, col2) values (1, 6) /*e*/select table2.col2,(select table1.col2 from table1 where table1.col1 = table2.col1) from table2 -- reported bug - fixed - first bigint in value list was ignored DROP TABLE T IF EXISTS; CREATE TABLE T(A BIGINT); INSERT INTO T VALUES(7223955391172290801); INSERT INTO T VALUES(8124225344737252039); INSERT INTO T VALUES(8112873400132257948); INSERT INTO T VALUES(100); /*c4*/SELECT * FROM T WHERE A IN (7223955391172290801,8124225344737252039,8112873400132257948,100); -- check with different types /*c4*/SELECT * FROM T WHERE A IN (7223955391172290801,8124225344737252039,8112873400132257948,100.2E0,'MONDAY'); -- reported bug - fixed - TRUE and FALSE in conditions /*c4*/SELECT * FROM T WHERE A IN (7223955391172290801,8124225344737252039,8112873400132257948,100.2E0,'MONDAY') AND TRUE; /*c0*/SELECT * FROM T WHERE A IN (7223955391172290801,8124225344737252039,8112873400132257948,100.2E0,'MONDAY') AND FALSE; -- demonstration of contatenation from Blaine CREATE TABLE tsttbl( id IDENTITY, FirstName VARCHAR(10), MiddleName VARCHAR(10), LastName VARCHAR(10), CommonLink VARCHAR(20) ); INSERT INTO tsttbl(firstname, middlename, lastname, commonlink) VALUES ('John', 'Paul', 'Jones', 'http://cnn.com'); INSERT INTO tsttbl(firstname, middlename, lastname, commonlink) VALUES ('Bridget', 'Paula', 'Murphy', 'http://cnn.com'); -- Raw SELECT using ||: SELECT FirstName || MiddleName || LastName, CommonLink FROM tsttbl; -- Creating View using ||: CREATE VIEW tstview AS SELECT FirstName || MiddleName || LastName, CommonLink FROM tsttbl; -- Executing View Query: SELECT * FROM tstview; -- Raw SELECT using +: SELECT FirstName + ' ' + MiddleName + ' ' + LastName, CommonLink FROM tsttbl; -- reported bug #1487591 CREATE TABLE TESTTABLE(ID IDENTITY, MY_VALUE VARCHAR(10), MY_ROW_TYPE VARCHAR(10)); INSERT INTO TESTTABLE (MY_VALUE,MY_ROW_TYPE) VALUES ('A', 'B'); SELECT ID, MY_VALUE FROM TESTTABLE AS TBL1 WHERE ID = (SELECT MAX(ID) AS ID FROM TESTTABLE AS TBL2 WHERE TBL1.MY_VALUE=TBL2.MY_VALUE); hsqldb-1.8.0.10.orig/testrun/hsqldb/TestSelfTransaction.txt0000644000175000017500000000423510234240170022275 0ustar renerene-- ON DELETE SET NULL set property "hsqldb.nio_data_file" false set write_delay false; set autocommit false; drop table testB if exists; create cached table testB(id integer, parent integer, ref integer, data varchar(200), unique (id), foreign key (parent) references testB(id) on delete set null); /*u1*/insert into testB values(100,100,1,'xxxx'); /*u1*/insert into testB values(101,100,1,'xxxx'); /*u1*/insert into testB values(102,100,1,'xxxx'); /*u1*/insert into testB values(200,200,1,'xxxx'); commit; /*u1*/delete from testB where id=100; /*r 101,NULL,1,xxxx 102,NULL,1,xxxx 200,200,1,xxxx */select * from testB order by id /*c2*/select * from testB where parent is null rollback; /*c4*/select * from testB; -- ON DELETE SET DEFAULT drop table testB if exists; create cached table testB(id integer, parent integer default 20, ref integer, data varchar(200), unique (id),foreign key (parent) references testB(id) on delete set default); /*u1*/insert into testB values(20,20,1,'xxxx'); /*u1*/insert into testB values(100,100,1,'xxxx'); /*u1*/insert into testB values(101,100,1,'xxxx'); /*u1*/insert into testB values(200,200,1,'xxxx'); commit; /*u1*/delete from testB where id=100; /*r 20,20,1,xxxx 101,20,1,xxxx 200,200,1,xxxx */select * from testB order by id /*c2*/select * from testB where parent=20 rollback; /*c4*/select * from testB; -- CHAINED SELF REFERENCING FK -- ON DELETE CASCADE drop table testA if exists; create cached table testA(a int primary key,b int, foreign key(b) references testA(a) on update cascade on delete cascade); insert into testA(a,b) values(1,1); insert into testA(a,b) values(2,1); insert into testA(a,b) values(3,1); insert into testA(a,b) values(4,2); insert into testA(a,b) values(5,2); insert into testA(a,b) values(6,2); insert into testA(a,b) values(7,3); insert into testA(a,b) values(8,3); insert into testA(a,b) values(9,3); commit; /*u9*/update testA set a = a+1; /*r3*/select count(*) from testA where b=4; /*u9*/update testA set a = a-1; /*r0*/select count(*) from testA where b=4; /*r3*/select count(*) from testA where b=3; /*u1*/delete from testA where a=1; /*r0*/select count(*) from testA; rollback; /*r9*/select count(*) from testA; hsqldb-1.8.0.10.orig/testrun/hsqldb/TestSelfNameResolutionSchemas.txt0000644000175000017500000006011010240555224024260 0ustar renerene-- Tests for phase 1 of Schema implementation. -- PHASE 1 = on schemas PUBLIC and INFORMATION_SCHEMA; No "SET SCHEMA" cmd; -- Can't create INFORMATION_SCHEMA objects from normal Sessions. -- (Alter commands tested separately after because there are so many -- alter permutations to test) -- ****************************** PHASE 1 Tables --DROP TABLE nosuch; DROP TABLE t1 IF exists; DROP TABLE t2 IF exists; DROP TABLE t3 IF exists; DROP TABLE t4 IF exists; DROP TABLE t5 IF exists; DROP TABLE t101 IF exists; DROP TABLE j1 IF exists; DROP TABLE other.t1 IF exists; DROP TABLE other.system_users IF exists; DROP TABLE system_users IF exists; /*u0*/CREATE TABLE t1 (i int); /*u0*/CREATE TABLE public.t2 (i int); /*u0*/CREATE TABLE t3 (i int); /*u0*/CREATE TABLE j1 (i int, vc varchar(10)); /*u0*/CREATE CACHED TABLE public.t5 (i int); /*e*/CREATE TABLE information_schema.t101 (i int); /*e*/CREATE TABLE t1 (i int); -- Create existing object /*e*/CREATE TABLE public.t1 (i int); -- Create existing object /*e*/CREATE TABLE information_schema.system_users (i int); -- Existing object /*u1*/INSERT INTO t1 values(0); /*u1*/INSERT INTO t1 values(1); /*u1*/INSERT INTO j1 values(1, 'one'); /*c2*/SELECT * FROM t1; /*c1*/SELECT * FROM t1 WHERE i = 0; /*c2*/SELECT * FROM t1 WHERE i in (0, 1, 11, 12); /*c1*/SELECT * FROM t1 WHERE i < 1; /*c1*/SELECT * FROM t1 WHERE t1.i = (SELECT i FROM j1); /*c1*/SELECT * FROM t1 WHERE t1.i in (SELECT i FROM j1); /*c0*/SELECT * FROM t1 WHERE t1.i = (SELECT i FROM j1 WHERE i = 0); /*c1*/SELECT * FROM public.t1 WHERE t1.i = (SELECT i FROM j1); /*c1*/SELECT * FROM public.t1 WHERE t1.i in (SELECT i FROM j1); /*c1*/SELECT * FROM public.t1 WHERE t1.i = (SELECT i FROM j1 WHERE i = 1); /*c1*/SELECT * FROM t1 WHERE t1.i = (SELECT i FROM public.j1); /*c1*/SELECT * FROM t1 WHERE t1.i in (SELECT i FROM public.j1); /*c1*/SELECT * FROM t1 WHERE t1.i = (SELECT i FROM public.j1 WHERE i = 1); /*c1*/SELECT * FROM t1 WHERE t1.i = (SELECT j1.i FROM public.j1); /*c1*/SELECT * FROM t1 WHERE t1.i in (SELECT j1.i FROM j1); /*c1*/SELECT * FROM t1 WHERE t1.i = (SELECT j1.i FROM j1 WHERE i = 1); /*c1*/SELECT * FROM t1 WHERE t1.i = (SELECT i FROM public.j1 WHERE j1.i = 1); /*c1*/SELECT * FROM t1 WHERE t1.i = (SELECT j1.i FROM j1 WHERE j1.i = 1); /*c1*/SELECT * FROM t1 WHERE i = (SELECT i FROM j1); /*c1*/SELECT * FROM t1 WHERE i in (SELECT i FROM j1); /*c1*/SELECT * FROM t1 WHERE i = (SELECT i FROM j1 WHERE i = 1); /*c1*/SELECT * FROM public.t1 WHERE i = (SELECT i FROM j1); /*c1*/SELECT * FROM public.t1 WHERE i in (SELECT i FROM j1); /*c0*/SELECT * FROM public.t1 WHERE i = (SELECT i FROM j1 WHERE i = 0); /*c1*/SELECT * FROM t1 WHERE i = (SELECT i FROM public.j1); /*c1*/SELECT * FROM t1 WHERE i in (SELECT i FROM public.j1); /*c0*/SELECT * FROM t1 WHERE i = (SELECT i FROM public.j1 WHERE i = 0); /*c1*/SELECT * FROM t1 WHERE i = (SELECT j1.i FROM public.j1); /*c1*/SELECT * FROM t1 WHERE i in (SELECT j1.i FROM j1); /*c0*/SELECT * FROM t1 WHERE i = (SELECT j1.i FROM j1 WHERE i = 0); /*c1*/SELECT * FROM t1 WHERE i = (SELECT i FROM public.j1 WHERE j1.i = 1); /*c1*/SELECT * FROM t1 WHERE i = (SELECT j1.i FROM j1 WHERE j1.i = 1); /*e*/SELECT * FROM system_users WHERE user = 'SA'; /*e*/SELECT * FROM other.t1; /*e*/SELECT * FROM other.system_users; /*e*/SELECT * FROM information_schema.t1; /*e*/SELECT * FROM public.system_users; /*c2*/SELECT * FROM public.t1; /*c1*/SELECT * FROM information_schema.system_users WHERE user = 'SA'; /*c1*/SELECT * FROM public.t1 WHERE i = 0; /*e*/SELECT * FROM other.t1 WHERE i = 0; /*e*/SELECT * FROM information_schema.t1 WHERE i = 0; /*u1*/SELECT * INTO public.t4 FROM public.t1 WHERE i = 0; /*c1*/SELECT * FROM public.t4; /*c1*/SELECT * FROM public.t1, public.j1 WHERE t1.i = j1.i; /*c1*/SELECT * FROM t1, public.j1 WHERE t1.i = j1.i; /*c1*/SELECT * FROM public.t1, j1 WHERE t1.i = j1.i; /*c1*/SELECT * FROM t1, j1 WHERE t1.i = j1.i; /*c1*/SELECT vc FROM public.t1, public.j1 WHERE t1.i = j1.i; /*c1*/SELECT vc FROM t1, public.j1 WHERE t1.i = j1.i; /*c1*/SELECT vc FROM public.t1, j1 WHERE t1.i = j1.i; /*c1*/SELECT vc FROM t1, j1 WHERE t1.i = j1.i; /*c1*/SELECT j1.vc FROM public.t1, public.j1 WHERE t1.i = j1.i; /*c1*/SELECT j1.vc FROM t1, public.j1 WHERE t1.i = j1.i; /*c1*/SELECT j1.vc FROM public.t1, j1 WHERE t1.i = j1.i; /*c1*/SELECT j1.vc FROM t1, j1 WHERE t1.i = j1.i; /*c1*/SELECT lbla.vc FROM t1, j1 lbla WHERE t1.i = lbla.i; /*c1*/SELECT j1.vc FROM t1 lblb, j1 WHERE lblb.i = j1.i; /*c1*/SELECT lbla.vc FROM t1 lblb, j1 lbla WHERE lblb.i = lbla.i; /*c1*/SELECT lbla.vc FROM public.t1, j1 lbla WHERE t1.i = lbla.i; /*c1*/SELECT j1.vc FROM public.t1 lblb, j1 WHERE lblb.i = j1.i; /*c1*/SELECT lbla.vc FROM public.t1 lblb, j1 lbla WHERE lblb.i = lbla.i; /*c1*/SELECT lbla.vc FROM t1, public.j1 lbla WHERE t1.i = lbla.i; /*c1*/SELECT j1.vc FROM t1 lblb, public.j1 WHERE lblb.i = j1.i; /*c1*/SELECT lbla.vc FROM t1 lblb, public.j1 lbla WHERE lblb.i = lbla.i; /*u0*/SET TABLE t1 READONLY true; /*u0*/SET TABLE public.t1 READONLY true; /*e*/SET TABLE information_schema.t1 READONLY true; /*e*/SET TABLE other.t1 READONLY true; /*u0*/SET TABLE t1 READONLY false; /*u0*/SET TABLE public.t1 READONLY false; /*u1*/UPDATE t1 set i = 11 WHERE i = 1; /*u1*/UPDATE t1 set t1.i = 12 WHERE i = 11; /*u1*/UPDATE t1 set t1.i = 13 WHERE t1.i = 12; /*u1*/UPDATE public.t1 set i = 14 WHERE i = 13; /*u1*/UPDATE public.t1 set t1.i = 15 WHERE i = 14; /*u1*/UPDATE public.t1 set t1.i = 16 WHERE t1.i = 15; /*e*/UPDATE other.t1 set t1.i = 17 WHERE t1.i = 16; /*e*/UPDATE information_schema.t1 set t1.i = 17 WHERE t1.i = 16; /*u1*/UPDATE t1 ali set i = 17 WHERE i = 16; /*u1*/UPDATE t1 ali set ali.i = 18 WHERE i = 17; /*u1*/UPDATE t1 ali set ali.i = 19 WHERE ali.i = 18; /*u1*/UPDATE t1 ali set i = 20 WHERE ali.i = 19; /*u1*/UPDATE public.t1 ali set i = 21 WHERE i = 20; /*u1*/UPDATE public.t1 ali set ali.i = 22 WHERE i = 21; /*u1*/UPDATE public.t1 ali set ali.i = 23 WHERE ali.i = 22; /*u1*/UPDATE public.t1 ali set i = 24 WHERE ali.i = 23; /*e*/UPDATE other.t1 ali set i = 25 WHERE ali.i = 24; /*e*/UPDATE other.t1 ali set i = 25 WHERE .i = 24; /*e*/UPDATE other.t1 set i = 25 WHERE i = 24; /*e*/DELETE FROM other.t1 ali WHERE ali.i = 24; /*e*/DELETE FROM other.t1 ali; /*e*/DELETE FROM other.t1 set WHERE i = 24; CREATE USER otheruser PASSWORD otheruser; /*u0*/GRANT ALL ON t1 TO otheruser; /*u0*/GRANT ALL ON public.t2 TO otheruser; /*e*/GRANT ALL ON other.t3 TO otheruser; /*e*/GRANT ALL ON information_schema.t3 TO otheruser; /*u0*/REVOKE ALL ON t1 FROM otheruser; /*u0*/REVOKE ALL ON public.t2 FROM otheruser; /*e*/REVOKE ALL ON other.t3 FROM otheruser; /*e*/REVOKE ALL ON information_schema.t3 FROM otheruser; DROP USER otheruser; /*u1*/DELETE FROM t1 WHERE i = 0; /*u1*/DELETE FROM public.t1 WHERE i = 24; /*u1*/DELETE FROM public.j1 WHERE j1.i = 1; /*u0*/DROP TABLE t1; /*e*/DROP TABLE t1; /*u0*/DROP TABLE t2; /*e*/DROP TABLE other.t3; /*u0*/DROP TABLE public.t3; /*e*/DROP TABLE information_schema.t4; /*u0*/DROP TABLE t4; /*u0*/DROP TABLE t5; /*u0*/DROP TABLE j1; /*e*/DROP TABLE t101; /*e*/DROP TABLE public.t101; -- ****************************** PHASE 1 Views DROP VIEW v1 IF exists; DROP VIEW v2 IF exists; DROP VIEW v3 IF exists; DROP VIEW v4 IF exists; DROP VIEW v5 IF exists; DROP VIEW v6 IF exists; DROP VIEW v7 IF exists; DROP VIEW v8 IF exists; DROP VIEW v9 IF exists; DROP VIEW v10 IF exists; DROP VIEW v11 IF exists; DROP VIEW v12 IF exists; DROP VIEW v13 IF exists; DROP VIEW v14 IF exists; DROP VIEW v15 IF exists; DROP VIEW v16 IF exists; DROP VIEW v17 IF exists; DROP VIEW v18 IF exists; DROP VIEW v19 IF exists; DROP VIEW v20 IF exists; DROP VIEW v21 IF exists; DROP VIEW v22 IF exists; DROP VIEW v23 IF exists; DROP VIEW v24 IF exists; DROP VIEW v25 IF exists; DROP VIEW v26 IF exists; DROP VIEW v101 IF exists; DROP TABLE t1 IF exists; DROP TABLE t2 IF exists; DROP TABLE j1 IF exists; CREATE TABLE t1 (i int); CREATE TABLE j1 (i int, vc varchar(10)); INSERT INTO t1 values(0); INSERT INTO t1 values(1); INSERT INTO j1 values(1, 'one'); /*e*/CREATE VIEW information_schema.v101 AS SELECT * FROM information_schema.system_users; /*e*/CREATE VIEW information_schema.v101 AS SELECT * FROM t1; /*e*/CREATE VIEW information_schema.v4 AS SELECT * FROM public.t1; /*e*/CREATE VIEW v101 AS SELECT * FROM other.t1; /*e*/CREATE VIEW public.v101 AS SELECT * FROM other.t1; /*e*/CREATE VIEW other.v101 AS SELECT * FROM information_schema.system_users, j1 WHERE user = vc; /*e*/CREATE VIEW other.v101 AS SELECT * FROM information_schema.system_users, public.j1 WHERE user = vc; /*e*/CREATE VIEW other.v101 AS SELECT * FROM information_schema.system_users, j1 WHERE information_schema.user = vc; /*e*/CREATE VIEW other.v101 AS SELECT * FROM information_schema.system_users, j1 WHERE information_schema.user = public.vc; /*e*/CREATE VIEW information_schema.v101 AS SELECT * FROM information_schema.system_users, j1 WHERE user = vc; /*e*/CREATE VIEW information_schema.v101 AS SELECT * FROM information_schema.system_users, public.j1 WHERE user = vc; /*e*/CREATE VIEW information_schema.v101 AS SELECT * FROM information_schema.system_users, j1 WHERE information_schema.user = vc; /*e*/CREATE VIEW information_schema.v101 AS SELECT * FROM information_schema.system_users, j1 WHERE information_schema.user = public.vc; /*e*/CREATE VIEW v101 AS SELECT * FROM system_users, j1 WHERE user = vc; /*e*/CREATE VIEW v101 AS SELECT * FROM information_schema.system_users, information_schema.j1 WHERE user = vc; /*e*/CREATE VIEW v101 AS SELECT * FROM information_schema.system_users, j1 WHERE other.user = vc; /*e*/CREATE VIEW v101 AS SELECT * FROM information_schema.system_users, j1 WHERE public.user = public.vc; /*u0*/CREATE VIEW v1 AS SELECT * FROM t1; /*e*/CREATE VIEW public.v1 AS SELECT * FROM t1; -- Create existing object /*e*/CREATE VIEW public.v1 AS SELECT * FROM public.t1; -- Existing object /*u0*/CREATE VIEW public.v2 AS SELECT * FROM t1; /*u0*/CREATE VIEW public.v3 AS SELECT * FROM public.t1; /*u0*/CREATE VIEW public.v4 AS SELECT * FROM t1 WHERE i = 0; /*u0*/CREATE VIEW public.v5 AS SELECT * FROM t1 WHERE i < 1; /*u0*/CREATE VIEW public.v6 AS SELECT * FROM information_schema.system_users WHERE user = 'SA'; /*u0*/CREATE VIEW v7 AS SELECT * FROM information_schema.system_users; /*u0*/CREATE VIEW v8 AS SELECT * FROM information_schema.system_users WHERE user = 'SA'; /*u0*/CREATE VIEW v9 AS SELECT * FROM information_schema.system_users, j1 WHERE user = vc; /*u0*/CREATE VIEW v10 AS SELECT * FROM information_schema.system_users, public.j1 WHERE user = vc; /*u0*/CREATE VIEW v11 AS SELECT * FROM information_schema.system_users, j1 WHERE system_users.user = vc; /*e*/CREATE VIEW v12 AS SELECT * FROM information_schema.system_users, j1 WHERE system_users.user = public.vc; /*u0*/CREATE VIEW public.v13 AS SELECT * FROM information_schema.system_users, j1 WHERE user = vc; /*u0*/CREATE VIEW public.v14 AS SELECT * FROM information_schema.system_users, public.j1 WHERE user = vc; /*e*/CREATE VIEW public.v15 AS SELECT * FROM information_schema.system_users, j1 WHERE information_schema.user = vc; /*e*/CREATE VIEW public.v16 AS SELECT * FROM information_schema.system_users, j1 WHERE information_schema.user = public.vc; /*u0*/CREATE VIEW v17 AS SELECT * FROM information_schema.system_users, j1 WHERE user = vc; /*u0*/CREATE VIEW v18 AS SELECT * FROM information_schema.system_users, public.j1 WHERE user = vc; /*u0*/CREATE VIEW v19 (v1, v2, v3) AS SELECT * FROM t1, j1 WHERE t1.i = j1.i; /*u0*/CREATE VIEW v20 (v1, v2, v3) AS SELECT * FROM public.t1, public.j1 WHERE t1.i = j1.i; /*u0*/CREATE VIEW v21 (v1, v2, v3) AS SELECT * FROM public.t1, j1 WHERE t1.i = j1.i; /*u0*/CREATE VIEW v22 (v1, v2, v3) AS SELECT * FROM t1, public.j1 WHERE t1.i = j1.i; /*u0*/CREATE VIEW public.v23 (v1, v2, v3) AS SELECT * FROM t1, j1 WHERE t1.i = j1.i; /*u0*/CREATE VIEW public.v24 (v1, v2, v3) AS SELECT * FROM public.t1, public.j1 WHERE t1.i = j1.i; /*u0*/CREATE VIEW public.v25 (v1, v2, v3) AS SELECT * FROM public.t1, j1 WHERE t1.i = j1.i; /*u0*/CREATE VIEW public.v26 (v1, v2, v3) AS SELECT * FROM t1, public.j1 WHERE t1.i = j1.i; /*u0*/CREATE VIEW v28 AS SELECT * FROM t1 WHERE i in (0, 1, 11, 12); /*u0*/CREATE VIEW public.v29 AS SELECT * FROM t1 WHERE i < 1; /*u0*/CREATE VIEW v30 AS SELECT * FROM t1 WHERE t1.i = (SELECT i FROM j1); /*u0*/CREATE VIEW v31 AS SELECT * FROM t1 WHERE t1.i in (SELECT i FROM j1); /*u0*/CREATE VIEW v32 AS SELECT * FROM t1 WHERE t1.i = (SELECT i FROM j1 WHERE i = 0); /*u0*/CREATE VIEW v33 AS SELECT * FROM public.t1 WHERE t1.i = (SELECT i FROM j1); /*u0*/CREATE VIEW PUBLIC.v34 AS SELECT * FROM public.t1 WHERE t1.i in (SELECT i FROM j1); /*u0*/CREATE VIEW PUBLIC.v35 AS SELECT * FROM public.t1 WHERE t1.i = (SELECT i FROM j1 WHERE i = 0); /*u0*/CREATE VIEW PUBLIC.v36 AS SELECT * FROM t1 WHERE t1.i = (SELECT i FROM public.j1); /*u0*/CREATE VIEW PUBLIC.v37 AS SELECT * FROM t1 WHERE t1.i in (SELECT i FROM public.j1); /*u0*/CREATE VIEW PUBLIC.v38 AS SELECT * FROM t1 WHERE t1.i = (SELECT i FROM public.j1 WHERE i = 1); /*u0*/CREATE VIEW PUBLIC.v39 AS SELECT * FROM t1 WHERE t1.i = (SELECT j1.i FROM public.j1); /*u0*/CREATE VIEW PUBLIC.v40 AS SELECT * FROM t1 WHERE t1.i in (SELECT j1.i FROM j1); /*u0*/CREATE VIEW PUBLIC.v41 AS SELECT * FROM t1 WHERE t1.i = (SELECT j1.i FROM j1 WHERE i = 1); /*u0*/CREATE VIEW PUBLIC.v42 AS SELECT * FROM t1 WHERE t1.i = (SELECT i FROM public.j1 WHERE j1.i = 1); /*u0*/CREATE VIEW PUBLIC.v43 AS SELECT * FROM t1 WHERE t1.i = (SELECT j1.i FROM j1 WHERE j1.i = 1); /*u0*/CREATE VIEW PUBLIC.v44 AS SELECT * FROM t1 WHERE i = (SELECT i FROM j1); /*u0*/CREATE VIEW PUBLIC.v45 AS SELECT * FROM t1 WHERE i in (SELECT i FROM j1); /*u0*/CREATE VIEW PUBLIC.v46 AS SELECT * FROM t1 WHERE i = (SELECT i FROM j1 WHERE i = 1); /*u0*/CREATE VIEW PUBLIC.v47 AS SELECT * FROM public.t1 WHERE i = (SELECT i FROM j1); /*u0*/CREATE VIEW PUBLIC.v48 AS SELECT * FROM public.t1 WHERE i in (SELECT i FROM j1); /*u0*/CREATE VIEW PUBLIC.v49 AS SELECT * FROM public.t1 WHERE i = (SELECT i FROM j1 WHERE i = 1); /*u0*/CREATE VIEW PUBLIC.v50 AS SELECT * FROM t1 WHERE i = (SELECT i FROM public.j1); /*u0*/CREATE VIEW PUBLIC.v51 AS SELECT * FROM t1 WHERE i in (SELECT i FROM public.j1); /*u0*/CREATE VIEW PUBLIC.v52 AS SELECT * FROM t1 WHERE i = (SELECT i FROM public.j1 WHERE i = 0); /*u0*/CREATE VIEW PUBLIC.v53 AS SELECT * FROM t1 WHERE i = (SELECT j1.i FROM public.j1); /*u0*/CREATE VIEW PUBLIC.v54 AS SELECT * FROM t1 WHERE i in (SELECT j1.i FROM j1); /*u0*/CREATE VIEW PUBLIC.v55 AS SELECT * FROM t1 WHERE i = (SELECT j1.i FROM j1 WHERE i = 1); /*u0*/CREATE VIEW PUBLIC.v56 AS SELECT * FROM t1 WHERE i = (SELECT i FROM public.j1 WHERE j1.i = 1); /*u0*/CREATE VIEW PUBLIC.v57 AS SELECT * FROM t1 WHERE i = (SELECT j1.i FROM j1 WHERE j1.i = 1); /*c2*/SELECT * FROM v1; /*c2*/SELECT * FROM public.v1; /*c2*/SELECT * FROM v2; /*c2*/SELECT * FROM v3; /*c1*/SELECT * FROM v4; /*c1*/SELECT * FROM v5; /*c1*/SELECT * FROM v8; /*c0*/SELECT * FROM v9; /*c0*/SELECT * FROM v10; /*c0*/SELECT * FROM v11; /*e*/SELECT * FROM v12; /*c0*/SELECT * FROM v13; /*c0*/SELECT * FROM v14; /*e*/SELECT * FROM v15; /*e*/SELECT * FROM v16; /*c0*/SELECT * FROM v17; /*c0*/SELECT * FROM v18; /*c1*/SELECT * FROM v19; /*c1*/SELECT * FROM v20; /*c1*/SELECT * FROM v21; /*c1*/SELECT * FROM v22; /*c1*/SELECT * FROM v23; /*c1*/SELECT * FROM v24; /*c1*/SELECT * FROM v25; /*c1*/SELECT * FROM v26; /*c2*/SELECT * FROM v28; /*c1*/SELECT * FROM v29; /*c1*/SELECT * FROM v30; /*c1*/SELECT * FROM v31; /*c0*/SELECT * FROM v32; /*c1*/SELECT * FROM v33; /*c1*/SELECT * FROM v34; /*c0*/SELECT * FROM v35; /*c1*/SELECT * FROM v36; /*c1*/SELECT * FROM v37; /*c1*/SELECT * FROM v38; /*c1*/SELECT * FROM v39; /*c1*/SELECT * FROM v40; /*c1*/SELECT * FROM v41; /*c1*/SELECT * FROM v42; /*c1*/SELECT * FROM v43; /*c1*/SELECT * FROM v44; /*c1*/SELECT * FROM v45; /*c1*/SELECT * FROM v46; /*c1*/SELECT * FROM v47; /*c1*/SELECT * FROM v48; /*c1*/SELECT * FROM v49; /*c1*/SELECT * FROM v50; /*c1*/SELECT * FROM v51; /*c0*/SELECT * FROM v52; /*c1*/SELECT * FROM v53; /*c1*/SELECT * FROM v54; /*c1*/SELECT * FROM v55; /*c1*/SELECT * FROM v56; /*c1*/SELECT * FROM v57; /*c1*/SELECT * FROM v1, j1 WHERE v1.i = j1.i; /*c1*/SELECT * FROM public.v1, public.j1 WHERE v1.i = j1.i; /*c2*/SELECT * FROM v1 WHERE i in (0, 1, 11, 12); /*c1*/SELECT * FROM v1 WHERE i < 1; /*c1*/SELECT * FROM v1 WHERE v1.i = (SELECT i FROM j1); /*c1*/SELECT * FROM v1 WHERE v1.i in (SELECT i FROM j1); /*c1*/SELECT * FROM v1 WHERE v1.i = (SELECT i FROM j1 WHERE i = 1); /*c1*/SELECT * FROM public.v1 WHERE v1.i in (SELECT i FROM j1); /*c1*/SELECT * FROM public.v1 WHERE v1.i = (SELECT i FROM j1 WHERE i = 1); /*c1*/SELECT * FROM v1 WHERE v1.i = (SELECT i FROM public.j1); /*c1*/SELECT * FROM v1 WHERE v1.i in (SELECT i FROM public.j1); /*c0*/SELECT * FROM v1 WHERE v1.i = (SELECT i FROM public.j1 WHERE i = 0); /*c1*/SELECT * FROM v1 WHERE v1.i = (SELECT j1.i FROM public.j1); /*c1*/SELECT * FROM v1 WHERE v1.i in (SELECT j1.i FROM j1); /*c1*/SELECT * FROM v1 WHERE v1.i = (SELECT j1.i FROM j1 WHERE i = 1); /*c0*/SELECT * FROM v1 WHERE v1.i = (SELECT i FROM public.j1 WHERE j1.i = 0); /*c0*/SELECT * FROM v1 WHERE v1.i = (SELECT j1.i FROM j1 WHERE j1.i = 0); /*c1*/SELECT * FROM v1 WHERE i = (SELECT i FROM j1); /*c1*/SELECT * FROM v1 WHERE i in (SELECT i FROM j1); /*c1*/SELECT * FROM v1 WHERE i = (SELECT i FROM j1 WHERE i = 1); /*c1*/SELECT * FROM public.v1 WHERE i = (SELECT i FROM j1); /*c1*/SELECT * FROM public.v1 WHERE i in (SELECT i FROM j1); /*c1*/SELECT * FROM public.v1 WHERE i = (SELECT i FROM j1 WHERE i = 1); /*c1*/SELECT * FROM v1 WHERE i = (SELECT i FROM public.j1); /*c1*/SELECT * FROM v1 WHERE i in (SELECT i FROM public.j1); /*c1*/SELECT * FROM v1 WHERE i = (SELECT i FROM public.j1 WHERE i = 1); /*c1*/SELECT * FROM v1 WHERE i = (SELECT j1.i FROM public.j1); /*c1*/SELECT * FROM v1 WHERE i in (SELECT j1.i FROM j1); /*c1*/SELECT * FROM v1 WHERE i = (SELECT j1.i FROM j1 WHERE i = 1); /*c1*/SELECT * FROM v1 WHERE i = (SELECT i FROM public.j1 WHERE j1.i = 1); /*c1*/SELECT * FROM v1 WHERE i = (SELECT j1.i FROM j1 WHERE j1.i = 1); /*c2*/SELECT * FROM v1; /*c1*/SELECT * FROM v1 WHERE i = 0; /*c2*/SELECT * FROM v1 WHERE i in (0, 1, 11, 12); /*c1*/SELECT * FROM v1 WHERE i < 1; /*c1*/SELECT * FROM v1 WHERE v1.i = (SELECT i FROM j1); /*c1*/SELECT * FROM v1 WHERE v1.i in (SELECT i FROM j1); /*c1*/SELECT * FROM v1 WHERE v1.i = (SELECT i FROM j1 WHERE i = 1); /*c1*/SELECT * FROM public.v1 WHERE v1.i = (SELECT i FROM j1); /*c1*/SELECT * FROM public.v1 WHERE v1.i in (SELECT i FROM j1); /*c1*/SELECT * FROM public.v1 WHERE v1.i = (SELECT i FROM j1 WHERE i = 1); /*c1*/SELECT * FROM v1 WHERE v1.i = (SELECT i FROM public.j1); /*c1*/SELECT * FROM v1 WHERE v1.i in (SELECT i FROM public.j1); /*c1*/SELECT * FROM v1 WHERE v1.i = (SELECT i FROM public.j1 WHERE i = 1); /*c1*/SELECT * FROM v1 WHERE v1.i = (SELECT j1.i FROM public.j1); /*c1*/SELECT * FROM v1 WHERE v1.i in (SELECT j1.i FROM j1); /*c1*/SELECT * FROM v1 WHERE v1.i = (SELECT j1.i FROM j1 WHERE i = 1); /*c1*/SELECT * FROM v1 WHERE v1.i = (SELECT i FROM public.j1 WHERE j1.i = 1); /*c1*/SELECT * FROM v1 WHERE v1.i = (SELECT j1.i FROM j1 WHERE j1.i = 1); /*c1*/SELECT * FROM v1 WHERE i = (SELECT i FROM j1); /*c1*/SELECT * FROM v1 WHERE i in (SELECT i FROM j1); /*c1*/SELECT * FROM v1 WHERE i = (SELECT i FROM j1 WHERE i = 1); /*c1*/SELECT * FROM public.v1 WHERE i = (SELECT i FROM j1); /*c1*/SELECT * FROM public.v1 WHERE i in (SELECT i FROM j1); /*c1*/SELECT * FROM public.v1 WHERE i = (SELECT i FROM j1 WHERE i = 1); /*c1*/SELECT * FROM v1 WHERE i = (SELECT i FROM public.j1); /*c1*/SELECT * FROM v1 WHERE i in (SELECT i FROM public.j1); /*c1*/SELECT * FROM v1 WHERE i = (SELECT i FROM public.j1 WHERE i = 1); /*c1*/SELECT * FROM v1 WHERE i = (SELECT j1.i FROM public.j1); /*c1*/SELECT * FROM v1 WHERE i in (SELECT j1.i FROM j1); /*c1*/SELECT * FROM v1 WHERE i = (SELECT j1.i FROM j1 WHERE i = 1); /*c1*/SELECT * FROM v1 WHERE i = (SELECT i FROM public.j1 WHERE j1.i = 1); /*c1*/SELECT * FROM v1 WHERE i = (SELECT j1.i FROM j1 WHERE j1.i = 1); /*e*/SELECT * FROM other.v1; /*e*/SELECT * FROM information_schema.v1; /*c2*/SELECT * FROM public.v1; /*c1*/SELECT * FROM public.v1 WHERE i = 0; /*e*/SELECT * FROM other.v1 WHERE i = 0; /*e*/SELECT * FROM information_schema.v1 WHERE i = 0; /*u1*/SELECT * INTO public.t2 FROM public.v1 WHERE i = 0; /*c1*/SELECT * FROM public.t2; /*c1*/SELECT * FROM public.v1, public.j1 WHERE v1.i = j1.i; /*c1*/SELECT * FROM v1, public.j1 WHERE v1.i = j1.i; /*c1*/SELECT * FROM public.v1, j1 WHERE v1.i = j1.i; /*c1*/SELECT * FROM v1, j1 WHERE v1.i = j1.i; /*c1*/SELECT vc FROM public.v1, public.j1 WHERE v1.i = j1.i; /*c1*/SELECT vc FROM v1, public.j1 WHERE v1.i = j1.i; /*c1*/SELECT vc FROM public.v1, j1 WHERE v1.i = j1.i; /*c1*/SELECT vc FROM v1, j1 WHERE v1.i = j1.i; /*c1*/SELECT j1.vc FROM public.v1, public.j1 WHERE v1.i = j1.i; /*c1*/SELECT j1.vc FROM v1, public.j1 WHERE v1.i = j1.i; /*c1*/SELECT j1.vc FROM public.v1, j1 WHERE v1.i = j1.i; /*c1*/SELECT j1.vc FROM v1, j1 WHERE v1.i = j1.i; /*c1*/SELECT lbla.vc FROM v1, j1 lbla WHERE v1.i = lbla.i; /*c1*/SELECT j1.vc FROM v1 lblb, j1 WHERE lblb.i = j1.i; /*c1*/SELECT lbla.vc FROM v1 lblb, j1 lbla WHERE lblb.i = lbla.i; /*c1*/SELECT lbla.vc FROM public.v1, j1 lbla WHERE v1.i = lbla.i; /*c1*/SELECT j1.vc FROM public.v1 lblb, j1 WHERE lblb.i = j1.i; /*c1*/SELECT lbla.vc FROM public.v1 lblb, j1 lbla WHERE lblb.i = lbla.i; /*c1*/SELECT lbla.vc FROM v1, public.j1 lbla WHERE v1.i = lbla.i; /*c1*/SELECT j1.vc FROM v1 lblb, public.j1 WHERE lblb.i = j1.i; /*c1*/SELECT lbla.vc FROM v1 lblb, public.j1 lbla WHERE lblb.i = lbla.i; CREATE USER otheruser PASSWORD otheruser; /*u0*/GRANT ALL ON v1 TO otheruser; /*u0*/GRANT ALL ON public.v2 TO otheruser; /*e*/GRANT ALL ON other.v3 TO otheruser; /*e*/GRANT ALL ON information_schema.v3 TO otheruser; /*u0*/REVOKE ALL ON v1 FROM otheruser; /*u0*/REVOKE ALL ON public.v2 FROM otheruser; /*e*/REVOKE ALL ON other.v3 FROM otheruser; /*e*/REVOKE ALL ON information_schema.v3 FROM otheruser; DROP USER otheruser; /*e*/DROP VIEW other.v1; /*u0*/DROP VIEW public.v1; /*e*/DROP VIEW information_schema.v2; /*u0*/DROP VIEW v2; /*e*/DROP VIEW v2; /*u0*/DROP VIEW v3; /*u0*/DROP VIEW v4; /*u0*/DROP VIEW v5; /*u0*/DROP VIEW v6; /*u0*/DROP VIEW v7; /*u0*/DROP VIEW v8; /*u0*/DROP VIEW v9; /*u0*/DROP VIEW v10; /*u0*/DROP VIEW v11; /*u0*/DROP VIEW v13; /*u0*/DROP VIEW v14; /*u0*/DROP VIEW v17; /*u0*/DROP VIEW v18; /*u0*/DROP VIEW v19; /*u0*/DROP VIEW v20; /*u0*/DROP VIEW v21; /*u0*/DROP VIEW v22; /*u0*/DROP VIEW v23; /*u0*/DROP VIEW v24; /*u0*/DROP VIEW v25; /*u0*/DROP VIEW v26; /*u0*/DROP VIEW v28; /*u0*/DROP VIEW v29; /*u0*/DROP VIEW v30; /*u0*/DROP VIEW v31; /*u0*/DROP VIEW v32; /*u0*/DROP VIEW v33; /*u0*/DROP VIEW v34; /*u0*/DROP VIEW v35; /*u0*/DROP VIEW v36; /*u0*/DROP VIEW v37; /*u0*/DROP VIEW v38; /*u0*/DROP VIEW v39; /*u0*/DROP VIEW v40; /*u0*/DROP VIEW v41; /*u0*/DROP VIEW v42; /*u0*/DROP VIEW v43; /*u0*/DROP VIEW v44; /*u0*/DROP VIEW v45; /*u0*/DROP VIEW v46; /*u0*/DROP VIEW v47; /*u0*/DROP VIEW v48; /*u0*/DROP VIEW v49; /*u0*/DROP VIEW v50; /*u0*/DROP VIEW v51; /*u0*/DROP VIEW v52; /*u0*/DROP VIEW v53; /*u0*/DROP VIEW v54; /*u0*/DROP VIEW v55; /*u0*/DROP VIEW v56; /*u0*/DROP VIEW v57; DROP TABLE t1; DROP TABLE t2; DROP TABLE j1; -- ****************************** PHASE 1 Indexes drop view v1 if exists; drop view v2 if exists; drop table t1 if exists; drop table t3 if exists; drop table t4 if exists; /*u0*/CREATE TABLE t1 (i int); /*u0*/CREATE TABLE t3 (i int); /*u0*/CREATE TABLE t4 (i int); /*u0*/CREATE UNIQUE INDEX i1 ON t1(i); /*u0*/CREATE UNIQUE INDEX public.i2 on t3(i); /*e*/CREATE UNIQUE INDEX other.i3 on t4(i); /*e*/CREATE UNIQUE INDEX information_schema.i3 on t4(i int); /*e*/DROP INDEX other.i1; /*u0*/DROP INDEX public.i1; /*e*/DROP INDEX information_schema.i2; /*u0*/DROP INDEX i2; -- Objects created from Sessions are created as public.object for Phase 1 /*e*/CREATE TABLE other.t2 (i int); SHOULD FAIL since no such schema -- Create the schema "other" -- /*u0*/CREATE TABLE other.t2 (i int); -- /*u1*/INSERT INTO t2 values(0); -- /*u1*/INSERT INTO t2 values(0); -- /*e*/SELECT * FROM wrong.t2; -- /*c1*/SELECT * FROM other.t2; -- /*c2*/SELECT * FROM other.t1; SHOULD FAIL since we created public.t1 hsqldb-1.8.0.10.orig/testrun/hsqldb/TestSelfUserFunction.txt0000644000175000017500000000224710330247650022444 0ustar renerene-- -- TestSelfUserFunction.txt -- -- This test checks if the USER() function works correctly when used within -- prepared statements such as VIEW's and constraints in TABLE's -- Setup tables and views DROP TABLE USER_PROFILE IF EXISTS CREATE TABLE USER_PROFILE(NAME VARCHAR(10), PROFILE INT, CHECK(USER() = NAME)) DROP VIEW USER_SECURITY_PROFILE_VIEW IF EXISTS CREATE VIEW USER_SECURITY_PROFILE_VIEW AS SELECT * FROM USER_PROFILE WHERE Name = USER() -- Create user for test CREATE USER MATT PASSWORD MATT ADMIN -- This checks that you are allowed to insert a row as long as your username matches the NAME field /*u1*/ INSERT INTO USER_PROFILE(NAME, PROFILE) VALUES('SA',10) -- This checks that you aren't allowed to insert a row as a different user /*e*/ INSERT INTO USER_PROFILE(NAME, PROFILE) VALUES('MATT',100) -- Connect as MATT CONNECT USER MATT PASSWORD MATT -- Insert a row as the connected user /*u1*/ INSERT INTO USER_PROFILE(NAME, PROFILE) VALUES('MATT',20) -- There are two rows in the table but the select should only return the row -- associated with the connected user i.e. one row /*c1*/ SELECT COUNT(*) FROM USER_SECURITY_PROFILE_VIEW hsqldb-1.8.0.10.orig/testrun/hsqldb/TestSelfSubselects.txt0000644000175000017500000000365310240560137022134 0ustar renerenedrop table colors if exists; drop table sizes if exists; drop table fruits if exists; drop table trees if exists; create table colors(id int, val char(20)); insert into colors values(1,'red'); insert into colors values(2,'green'); insert into colors values(3,'orange'); insert into colors values(4,'indigo'); create table sizes(id int, val char(20)); insert into sizes values(1,'small'); insert into sizes values(2,'medium'); insert into sizes values(3,'large'); insert into sizes values(4,'odd'); create table fruits(id int, name char(30), color_id int); insert into fruits values(1, 'golden delicious',2); insert into fruits values(2, 'macintosh',1); insert into fruits values(3, 'red delicious',1); insert into fruits values(4, 'granny smith',2); insert into fruits values(5, 'tangerine',4); create table trees(id int, name char(30), fruit_id int, size_id int); insert into trees values(1, 'small golden delicious tree',1,1); insert into trees values(2, 'large macintosh tree',2,3); insert into trees values(3, 'large red delicious tree',3,3); insert into trees values(4, 'small red delicious tree',3,1); insert into trees values(5, 'medium granny smith tree',4,2); select a.val, b.name from sizes a, trees b where a.id = b.size_id and b.id in (select a.id from trees a, fruits b where a.fruit_id = b.id and b.name='red delicious') order by a.val; -- -- bug #547764 -- name in subquery must resolve to the subquery first drop table trees if exists; drop table fruits if exists; create table trees(id integer primary key,name varchar(30) not null); create table fruits(id integer primary key,name varchar(30) not null, tree_id integer not null,foreign key (tree_id) references trees(id)); insert into trees (id, name) values (1, 'apple'); insert into fruits (id, name, tree_id) values(1, 'pippin', 1); insert into fruits (id, name, tree_id) values(2, 'granny smith', 1); /*c2*/select id from fruits where tree_id in(select id from trees where name = 'apple'); hsqldb-1.8.0.10.orig/testrun/hsqldb/TestSelfInPredicateReferencing.txt0000644000175000017500000000662210416747525024373 0ustar renereneDROP TABLE dups IF EXISTS; CREATE TABLE dups(pk INTEGER NOT NULL PRIMARY KEY,val VARCHAR(10) NOT NULL); INSERT INTO dups VALUES (1, 'first'); INSERT INTO dups VALUES (2, 'second'); INSERT INTO dups VALUES (3, 'third'); INSERT INTO dups VALUES (4, 'first'); INSERT INTO dups VALUES (5, 'first'); INSERT INTO dups VALUES (6, 'second'); SELECT sa.pk FROM dups sa, dups sb WHERE sa.val=sb.val AND sa.pk!=sb.pk; SELECT a.pk, a.val FROM dups a WHERE a.pk in (1, 2, 4, 5, 6); SELECT a.pk, a.val FROM dups a WHERE a.pk in (SELECT sa.pk FROM dups sa, dups sb WHERE sa.val=sb.val AND sa.pk!=sb.pk); -- ALL /*r 1,first 4,first 5,first */SELECT a.pk, a.val FROM dups a WHERE a.val = ALL(SELECT sa.val FROM dups sa WHERE sa.val = 'first') ORDER BY a.pk; /*r 1,first 2,second 3,third 4,first 5,first 6,second */SELECT a.pk, a.val FROM dups a WHERE a.val >= ALL(SELECT sa.val FROM dups sa WHERE sa.val = 'first') ORDER BY a.pk; /*r 2,second 3,third 6,second */SELECT a.pk, a.val FROM dups a WHERE a.val > ALL(SELECT sa.val FROM dups sa WHERE sa.val = 'first') ORDER BY a.pk; /*r 1,first 2,second 4,first 5,first 6,second */SELECT a.pk, a.val FROM dups a WHERE a.val <= ALL(SELECT sa.val FROM dups sa WHERE sa.val = 'second') ORDER BY a.pk; /*r 1,first 2,second 4,first 5,first 6,second */SELECT a.pk, a.val FROM dups a WHERE a.val < ALL(SELECT sa.val FROM dups sa WHERE sa.val = 'third') ORDER BY a.pk; /*r 1,first 4,first 5,first */SELECT a.pk, a.val FROM dups a WHERE a.val <= ALL(SELECT sa.val FROM dups sa) ORDER BY a.pk; -- ANY /*r 1,first 2,second 4,first 5,first 6,second */SELECT a.pk, a.val FROM dups a WHERE a.val < ANY(SELECT sa.val FROM dups sa) ORDER BY a.pk; /*r 2,second 3,third 6,second */SELECT a.pk, a.val FROM dups a WHERE a.val > ANY(SELECT sa.val FROM dups sa) ORDER BY a.pk; /*r 1,first 2,second 3,third 4,first 5,first 6,second */SELECT a.pk, a.val FROM dups a WHERE a.val <= ANY(SELECT sa.val FROM dups sa) ORDER BY a.pk; /*c0*/SELECT a.pk, a.val FROM dups a WHERE a.val <= ANY(SELECT NULL FROM dups sa) ORDER BY a.pk; /*c0*/SELECT a.pk, a.val FROM dups a WHERE a.val <= ANY(SELECT NULL FROM dups sa WHERE sa.val ='fourth') ORDER BY a.pk; -- non-correlated single value /*r 1,first 4,first 5,first */SELECT a.pk, a.val FROM dups a WHERE a.val = (SELECT sa.val FROM dups sa WHERE sa.pk = 4) ORDER BY a.pk; -- bug item #1100384 drop table a if exists; drop table b if exists; drop table m if exists; create table a(a_id integer); create table b(b_id integer); create table m(m_a_id integer, m_b_id integer); insert into a(a_id) values(1); insert into b(b_id) values(10); insert into m(m_a_id, m_b_id) values(1, 5); insert into m(m_a_id, m_b_id) values(1, 10); insert into m(m_a_id, m_b_id) values(1, 20); /*r1,10*/select a.a_id, b.b_id from a, b where a.a_id in (select m.m_a_id from m where b.b_id = m.m_b_id); /*R1,10*/select a.a_id, b.b_id from a join b on a.a_id in (select m.m_a_id from m where b.b_id = m.m_b_id); -- DROP TABLE T IF EXISTS; CREATE TABLE T(C VARCHAR_IGNORECASE(10)); INSERT INTO T VALUES ('felix'); /*r felix */SELECT * FROM T WHERE C IN ('Felix', 'Feline'); /*c0*/SELECT * FROM T WHERE C IN ('Pink', 'Feline'); DROP TABLE T; CREATE TABLE T(C CHAR(10)); INSERT INTO T VALUES ('felix'); /*c1*/SELECT * FROM T WHERE C IN ('felix', 'pink'); DROP TABLE T; hsqldb-1.8.0.10.orig/testrun/hsqldb/TestSelfAlterTable.txt0000644000175000017500000000041710326416735022043 0ustar renerenecreate memory table ss(TIMED BIGINT NOT NULL IDENTITY PRIMARY KEY); insert into ss values(10); alter table ss rename to ss2; create memory table ss(TIMED BIGINT NOT NULL IDENTITY PRIMARY KEY); insert into ss values(20); /*r20*/select * from ss; /*r10*/select * from ss2; hsqldb-1.8.0.10.orig/testrun/hsqldb/TestSelfViews.txt0000644000175000017500000001224210767514621021122 0ustar renerenedrop view v_my_server if exists; drop table my_group if exists; drop table dual if exists; drop table my_server if exists; -- test subselect in view create cached table my_group (id integer, group_id integer); insert into my_group values (1, 1); insert into my_group values (2, 1); insert into my_group values (3, 1); insert into my_group values (4, 1); create cached table dual (a integer); insert into dual values (0); create cached table my_server (group_id integer, server_id integer, weight integer); insert into my_server values (-1, 1, 1); insert into my_server values (-1, 2, 0); insert into my_server values (100, 11, 1); -- CREATE VIEW v_my_server AS SELECT DISTINCT mg.id, ms.server_id, ms.weight FROM (SELECT id, group_id FROM my_group UNION SELECT -1, -1 FROM DUAL) mg, my_server ms WHERE mg.group_id = ms.group_id; -- /*c2*/select * from v_my_server; /*c2*/select * from (select * from v_my_server); -- test view in view drop view v_test_view if exists; CREATE VIEW v_test_view AS SELECT a.id, b.server_id, b.weight FROM v_my_server a JOIN v_my_server b ON a.id = b.id; /*c4*/select * from v_test_view; /*c4*/select * from (select * from v_test_view); -- drop table colors if exists; create table colors(id int, val varchar(10)); insert into colors values(1,'red'); insert into colors values(2,'green'); insert into colors values(3,'orange'); insert into colors values(4,'indigo'); -- drop view v_colors if exists; create view v_colors(vid, vval) as select id, val from colors; create view v_colors_o(vid, vval) as select id, val from colors order by id desc; create view v_colors_o_l(vid, vval) as select id, val from colors order by id desc limit 1 offset 0; /*e*/create view v_colors_o_l_x(vid, vval) as select id, val from colors limit 1 offset 0; /*e*/create view v_colors_o_l_x(vid, vval) as select id, val into newtable from colors; -- /*c4*/select * from v_colors join v_test_view on server_id=vid; /*c2*/select distinct * from v_test_view join v_colors on server_id=vid; -- -- for http://www.openoffice.org/issues/show_bug.cgi?id=78296 -- adding a column to a table which is referenced in a view, via SELECT *, should -- be possible (of course), and HSQL should be able to re-connect to the DB afterwards -- (see TestSelfViewReconnect.txt) drop view v_colors_a if exists; create view v_colors_a as select * from colors; alter table colors add column frequency integer; -- -- since now asterisks in view statements are replaced with the actual column list, -- there are some cases to check -- table setup for those cases drop table if exists abc cascade; drop table if exists table_a cascade; drop table if exists table_b cascade; -- create table abc (id integer not null primary key, a varchar(50), b varchar(50), c varchar(50)); insert into abc values (1, 'a', 'b', 'c'); insert into abc values (2, 'd', 'e', 'f'); -- create table table_a (id_a integer not null primary key, name_a varchar(50)); insert into table_a values (1, 'first A'); insert into table_a values (2, 'second A'); -- create table table_b (id_b integer not null primary key, name_b varchar(50)); insert into table_b values (1, 'first B'); insert into table_b values (2, 'second B'); -- simple views with asterisks create view S1 as select * from abc; create view S2 as select limit 0 2 * from abc order by id; create view S3 as select top 2 * from abc order by id; create view S4 as select distinct * from abc; create view S5 as select abc.* from abc; create view S6 as select a.* from abc as a; create view S7 as ( select * from abc ); create view S11 as select*from abc; create view S12 as select limit 0 2*from abc cba order by id; create view S13 as select top 2 * from abc cfc order by id; create view S14 as select distinct *from abc; create view S15 as select bcd.* from abc bcd; create view S16 as select a.*from abc as a; create view S17 as ( select * from abc ); -- asterisks combined with other columns create view C1 as select *, a as a2 from abc; create view C2 as select b as b2, * from abc; -- selecting asterisks from multiple tables; create view M1 as select * from table_a, table_b; create view M2 as select table_b.*, table_a.* from table_a, table_b; create view M3 as select table_a.* from table_a, table_b; -- sub selects create view Q1 as select * from ( select * from abc ); create view Q2 as select * from ( select * from table_a ), ( select * from table_b ); create view Q3 as select a.* from ( select * from table_a ) as a; create view Q4 as select a.*, b.* from ( select * from table_a ) as a, ( select * from table_b ) as b; -- views with column lists /*e*/create view impossible (a) as select * from abc; create view L1 ("c1","c2","c3","c4") as select * from abc; -- views on views create view VV1 as select * from S1; create view VV2 as select id from S1; -- views with UNION SELECT create view U1 as select * from table_a union select * from table_b; create view U2 as select * from ( select * from table_a union select * from table_b ); -- views with ... well, simply some more views create view VM1 as select id_a, name_a from ( select * from table_a ); create view VM2 as select distinct * from VM1, ( select * from table_b ); -- SHUTDOWN hsqldb-1.8.0.10.orig/testrun/hsqldb/TestSelfNot.txt0000644000175000017500000011310510137051614020552 0ustar renerene-- -- -------------------------------------------------------------------- -- Checking compliance of type INTEGER drop table SQLUNKNOWNCOMPLIANCECHECK if exists create table SQLUNKNOWNCOMPLIANCECHECK(a INTEGER, b INTEGER) -- Checking v = NULL /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values (1, NULL) /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a = b -- -- Checking NOT v = NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where not a = b -- -- Checking v <> NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a <> b -- -- Checking NOT v <> NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where not a <> b -- -- Checking v < NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a < b -- -- Checking NOT v < NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where not a < b -- -- Checking v <= NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a <= b -- -- Checking NOT v <= NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where not a <= b -- -- Checking v > NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a > b -- -- Checking NOT v > NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where not a > b -- -- Checking v >= NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a >= b -- -- Checking NOT v >= NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where not a >= b -- -- Checking BETWEEN /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where b between 1 and 2 -- -- Checking NOT BETWEEN /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where not b between 1 and 2 -- -- Checking IN /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where b in (1, 2) -- -- Checking NOT IN /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where not b in (1, 2) -- -- Checking T && T = T /*u1*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values (1, 2) /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values (2, 1) /*c1*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a < b and 1 = 1 -- -- Checking T && F = F /*u2*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values (1, 2) /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values (2, 1) /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a < b and 1 = 0 -- -- Checking T && U = U /*u2*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values (1, NULL) /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where 1 = 1 and a < b -- -- Checking F && F = F /*u1*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values (1, 1) /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a < b and 1 = 0 -- -- Checking F && F = F /*u1*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values (1, NULL) /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where 1 = 0 and a < b -- -- Checking F && F = F /*u1*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values (1, NULL) /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where b != a and a < b -- -- Checking T || T = T /*u1*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values (1, 2) /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values (2, 1) /*c2*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a < b or a > b -- -- Checking T || F = T /*u2*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values (1, 2) /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values (2, 1) /*c1*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a < b or 1 = 0 -- -- Checking T || U = T /*u2*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values (1, NULL) /*c1*/ select* from SQLUNKNOWNCOMPLIANCECHECK where 1 = 1 or a < b -- -- Checking F || F = F /*u1*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values (1, 1) /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a < b or 1 = 0 -- -- Checking F || F = F /*u1*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values (1, NULL) /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where 1 = 0 or a < b -- -- Checking F || F = F /*u1*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values (1, NULL) /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where b != a or a < b -- -- Checking BETWEEN: >= and <= /*u1*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values (1, 2) /*c1*/ select* from SQLUNKNOWNCOMPLIANCECHECK where (a between 1 and 2) or (b between 1 and 2) -- -- -- -------------------------------------------------------------------- -- Checking compliance of type SMALLINT drop table SQLUNKNOWNCOMPLIANCECHECK if exists create table SQLUNKNOWNCOMPLIANCECHECK(a SMALLINT, b SMALLINT) -- Checking v = NULL /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values (1, NULL) /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a = b -- -- Checking NOT v = NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where not a = b -- -- Checking v <> NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a <> b -- -- Checking NOT v <> NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where not a <> b -- -- Checking v < NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a < b -- -- Checking NOT v < NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where not a < b -- -- Checking v <= NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a <= b -- -- Checking NOT v <= NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where not a <= b -- -- Checking v > NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a > b -- -- Checking NOT v > NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where not a > b -- -- Checking v >= NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a >= b -- -- Checking NOT v >= NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where not a >= b -- -- Checking BETWEEN /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where b between 1 and 2 -- -- Checking NOT BETWEEN /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where not b between 1 and 2 -- -- Checking IN /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where b in (1, 2) -- -- Checking NOT IN /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where not b in (1, 2) -- -- Checking T && T = T /*u1*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values (1, 2) /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values (2, 1) /*c1*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a < b and 1 = 1 -- -- Checking T && F = F /*u2*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values (1, 2) /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values (2, 1) /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a < b and 1 = 0 -- -- Checking T && U = U /*u2*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values (1, NULL) /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where 1 = 1 and a < b -- -- Checking F && F = F /*u1*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values (1, 1) /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a < b and 1 = 0 -- -- Checking F && F = F /*u1*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values (1, NULL) /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where 1 = 0 and a < b -- -- Checking F && F = F /*u1*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values (1, NULL) /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where b != a and a < b -- -- Checking T || T = T /*u1*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values (1, 2) /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values (2, 1) /*c2*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a < b or a > b -- -- Checking T || F = T /*u2*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values (1, 2) /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values (2, 1) /*c1*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a < b or 1 = 0 -- -- Checking T || U = T /*u2*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values (1, NULL) /*c1*/ select* from SQLUNKNOWNCOMPLIANCECHECK where 1 = 1 or a < b -- -- Checking F || F = F /*u1*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values (1, 1) /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a < b or 1 = 0 -- -- Checking F || F = F /*u1*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values (1, NULL) /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where 1 = 0 or a < b -- -- Checking F || F = F /*u1*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values (1, NULL) /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where b != a or a < b -- -- Checking BETWEEN: >= and <= /*u1*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values (1, 2) /*c1*/ select* from SQLUNKNOWNCOMPLIANCECHECK where (a between 1 and 2) or (b between 1 and 2) -- -- -- -------------------------------------------------------------------- -- Checking compliance of type FLOAT drop table SQLUNKNOWNCOMPLIANCECHECK if exists create table SQLUNKNOWNCOMPLIANCECHECK(a FLOAT, b FLOAT) -- Checking v = NULL /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values (1.0, NULL) /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a = b -- -- Checking NOT v = NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where not a = b -- -- Checking v <> NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a <> b -- -- Checking NOT v <> NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where not a <> b -- -- Checking v < NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a < b -- -- Checking NOT v < NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where not a < b -- -- Checking v <= NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a <= b -- -- Checking NOT v <= NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where not a <= b -- -- Checking v > NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a > b -- -- Checking NOT v > NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where not a > b -- -- Checking v >= NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a >= b -- -- Checking NOT v >= NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where not a >= b -- -- Checking BETWEEN /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where b between 1.0 and 2.0 -- -- Checking NOT BETWEEN /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where not b between 1.0 and 2.0 -- -- Checking IN /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where b in (1.0, 2.0) -- -- Checking NOT IN /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where not b in (1.0, 2.0) -- -- Checking T && T = T /*u1*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values (1.0, 2.0) /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values (2.0, 1.0) /*c1*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a < b and 1 = 1 -- -- Checking T && F = F /*u2*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values (1.0, 2.0) /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values (2.0, 1.0) /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a < b and 1 = 0 -- -- Checking T && U = U /*u2*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values (1.0, NULL) /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where 1 = 1 and a < b -- -- Checking F && F = F /*u1*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values (1.0, 1.0) /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a < b and 1 = 0 -- -- Checking F && F = F /*u1*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values (1.0, NULL) /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where 1 = 0 and a < b -- -- Checking F && F = F /*u1*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values (1.0, NULL) /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where b != a and a < b -- -- Checking T || T = T /*u1*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values (1.0, 2.0) /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values (2.0, 1.0) /*c2*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a < b or a > b -- -- Checking T || F = T /*u2*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values (1.0, 2.0) /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values (2.0, 1.0) /*c1*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a < b or 1 = 0 -- -- Checking T || U = T /*u2*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values (1.0, NULL) /*c1*/ select* from SQLUNKNOWNCOMPLIANCECHECK where 1 = 1 or a < b -- -- Checking F || F = F /*u1*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values (1.0, 1.0) /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a < b or 1 = 0 -- -- Checking F || F = F /*u1*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values (1.0, NULL) /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where 1 = 0 or a < b -- -- Checking F || F = F /*u1*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values (1.0, NULL) /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where b != a or a < b -- -- Checking BETWEEN: >= and <= /*u1*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values (1.0, 2.0) /*c1*/ select* from SQLUNKNOWNCOMPLIANCECHECK where (a between 1.0 and 2.0) or (b between 1.0 and 2.0) -- -- -- -------------------------------------------------------------------- -- Checking compliance of type DATE drop table SQLUNKNOWNCOMPLIANCECHECK if exists create table SQLUNKNOWNCOMPLIANCECHECK(a DATE, b DATE) -- Checking v = NULL /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('2003-10-20', NULL) /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a = b -- -- Checking NOT v = NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where not a = b -- -- Checking v <> NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a <> b -- -- Checking NOT v <> NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where not a <> b -- -- Checking v < NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a < b -- -- Checking NOT v < NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where not a < b -- -- Checking v <= NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a <= b -- -- Checking NOT v <= NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where not a <= b -- -- Checking v > NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a > b -- -- Checking NOT v > NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where not a > b -- -- Checking v >= NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a >= b -- -- Checking NOT v >= NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where not a >= b -- -- Checking BETWEEN /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where b between '2003-10-20' and '2005-05-06' -- -- Checking NOT BETWEEN /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where not b between '2003-10-20' and '2005-05-06' -- -- Checking IN /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where b in ('2003-10-20', '2005-05-06') -- -- Checking NOT IN /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where not b in ('2003-10-20', '2005-05-06') -- -- Checking T && T = T /*u1*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('2003-10-20', '2005-05-06') /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('2005-05-06', '2003-10-20') /*c1*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a < b and 1 = 1 -- -- Checking T && F = F /*u2*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('2003-10-20', '2005-05-06') /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('2005-05-06', '2003-10-20') /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a < b and 1 = 0 -- -- Checking T && U = U /*u2*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('2003-10-20', NULL) /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where 1 = 1 and a < b -- -- Checking F && F = F /*u1*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('2003-10-20', '2003-10-20') /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a < b and 1 = 0 -- -- Checking F && F = F /*u1*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('2003-10-20', NULL) /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where 1 = 0 and a < b -- -- Checking F && F = F /*u1*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('2003-10-20', NULL) /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where b != a and a < b -- -- Checking T || T = T /*u1*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('2003-10-20', '2005-05-06') /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('2005-05-06', '2003-10-20') /*c2*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a < b or a > b -- -- Checking T || F = T /*u2*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('2003-10-20', '2005-05-06') /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('2005-05-06', '2003-10-20') /*c1*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a < b or 1 = 0 -- -- Checking T || U = T /*u2*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('2003-10-20', NULL) /*c1*/ select* from SQLUNKNOWNCOMPLIANCECHECK where 1 = 1 or a < b -- -- Checking F || F = F /*u1*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('2003-10-20', '2003-10-20') /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a < b or 1 = 0 -- -- Checking F || F = F /*u1*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('2003-10-20', NULL) /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where 1 = 0 or a < b -- -- Checking F || F = F /*u1*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('2003-10-20', NULL) /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where b != a or a < b -- -- Checking BETWEEN: >= and <= /*u1*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('2003-10-20', '2005-05-06') /*c1*/ select* from SQLUNKNOWNCOMPLIANCECHECK where (a between '2003-10-20' and '2005-05-06') or (b between '2003-10-20' and '2005-05-06') -- -- -- -------------------------------------------------------------------- -- Checking compliance of type TIME drop table SQLUNKNOWNCOMPLIANCECHECK if exists create table SQLUNKNOWNCOMPLIANCECHECK(a TIME, b TIME) -- Checking v = NULL /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('10:00:00', NULL) /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a = b -- -- Checking NOT v = NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where not a = b -- -- Checking v <> NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a <> b -- -- Checking NOT v <> NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where not a <> b -- -- Checking v < NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a < b -- -- Checking NOT v < NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where not a < b -- -- Checking v <= NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a <= b -- -- Checking NOT v <= NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where not a <= b -- -- Checking v > NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a > b -- -- Checking NOT v > NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where not a > b -- -- Checking v >= NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a >= b -- -- Checking NOT v >= NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where not a >= b -- -- Checking BETWEEN /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where b between '10:00:00' and '12:32:36' -- -- Checking NOT BETWEEN /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where not b between '10:00:00' and '12:32:36' -- -- Checking IN /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where b in ('10:00:00', '12:32:36') -- -- Checking NOT IN /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where not b in ('10:00:00', '12:32:36') -- -- Checking T && T = T /*u1*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('10:00:00', '12:32:36') /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('12:32:36', '10:00:00') /*c1*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a < b and 1 = 1 -- -- Checking T && F = F /*u2*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('10:00:00', '12:32:36') /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('12:32:36', '10:00:00') /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a < b and 1 = 0 -- -- Checking T && U = U /*u2*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('10:00:00', NULL) /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where 1 = 1 and a < b -- -- Checking F && F = F /*u1*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('10:00:00', '10:00:00') /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a < b and 1 = 0 -- -- Checking F && F = F /*u1*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('10:00:00', NULL) /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where 1 = 0 and a < b -- -- Checking F && F = F /*u1*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('10:00:00', NULL) /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where b != a and a < b -- -- Checking T || T = T /*u1*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('10:00:00', '12:32:36') /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('12:32:36', '10:00:00') /*c2*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a < b or a > b -- -- Checking T || F = T /*u2*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('10:00:00', '12:32:36') /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('12:32:36', '10:00:00') /*c1*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a < b or 1 = 0 -- -- Checking T || U = T /*u2*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('10:00:00', NULL) /*c1*/ select* from SQLUNKNOWNCOMPLIANCECHECK where 1 = 1 or a < b -- -- Checking F || F = F /*u1*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('10:00:00', '10:00:00') /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a < b or 1 = 0 -- -- Checking F || F = F /*u1*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('10:00:00', NULL) /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where 1 = 0 or a < b -- -- Checking F || F = F /*u1*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('10:00:00', NULL) /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where b != a or a < b -- -- Checking BETWEEN: >= and <= /*u1*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('10:00:00', '12:32:36') /*c1*/ select* from SQLUNKNOWNCOMPLIANCECHECK where (a between '10:00:00' and '12:32:36') or (b between '10:00:00' and '12:32:36') -- -- -- -------------------------------------------------------------------- -- Checking compliance of type TIMESTAMP drop table SQLUNKNOWNCOMPLIANCECHECK if exists create table SQLUNKNOWNCOMPLIANCECHECK(a TIMESTAMP, b TIMESTAMP) -- Checking v = NULL /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('2004-05-06 12:32:36.491', NULL) /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a = b -- -- Checking NOT v = NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where not a = b -- -- Checking v <> NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a <> b -- -- Checking NOT v <> NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where not a <> b -- -- Checking v < NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a < b -- -- Checking NOT v < NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where not a < b -- -- Checking v <= NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a <= b -- -- Checking NOT v <= NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where not a <= b -- -- Checking v > NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a > b -- -- Checking NOT v > NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where not a > b -- -- Checking v >= NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a >= b -- -- Checking NOT v >= NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where not a >= b -- -- Checking BETWEEN /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where b between '2004-05-06 12:32:36.491' and '2005-05-06 12:32:36.491' -- -- Checking NOT BETWEEN /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where not b between '2004-05-06 12:32:36.491' and '2005-05-06 12:32:36.491' -- -- Checking IN /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where b in ('2004-05-06 12:32:36.491', '2005-05-06 12:32:36.491') -- -- Checking NOT IN /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where not b in ('2004-05-06 12:32:36.491', '2005-05-06 12:32:36.491') -- -- Checking T && T = T /*u1*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('2004-05-06 12:32:36.491', '2005-05-06 12:32:36.491') /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('2005-05-06 12:32:36.491', '2004-05-06 12:32:36.491') /*c1*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a < b and 1 = 1 -- -- Checking T && F = F /*u2*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('2004-05-06 12:32:36.491', '2005-05-06 12:32:36.491') /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('2005-05-06 12:32:36.491', '2004-05-06 12:32:36.491') /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a < b and 1 = 0 -- -- Checking T && U = U /*u2*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('2004-05-06 12:32:36.491', NULL) /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where 1 = 1 and a < b -- -- Checking F && F = F /*u1*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('2004-05-06 12:32:36.491', '2004-05-06 12:32:36.491') /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a < b and 1 = 0 -- -- Checking F && F = F /*u1*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('2004-05-06 12:32:36.491', NULL) /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where 1 = 0 and a < b -- -- Checking F && F = F /*u1*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('2004-05-06 12:32:36.491', NULL) /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where b != a and a < b -- -- Checking T || T = T /*u1*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('2004-05-06 12:32:36.491', '2005-05-06 12:32:36.491') /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('2005-05-06 12:32:36.491', '2004-05-06 12:32:36.491') /*c2*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a < b or a > b -- -- Checking T || F = T /*u2*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('2004-05-06 12:32:36.491', '2005-05-06 12:32:36.491') /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('2005-05-06 12:32:36.491', '2004-05-06 12:32:36.491') /*c1*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a < b or 1 = 0 -- -- Checking T || U = T /*u2*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('2004-05-06 12:32:36.491', NULL) /*c1*/ select* from SQLUNKNOWNCOMPLIANCECHECK where 1 = 1 or a < b -- -- Checking F || F = F /*u1*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('2004-05-06 12:32:36.491', '2004-05-06 12:32:36.491') /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a < b or 1 = 0 -- -- Checking F || F = F /*u1*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('2004-05-06 12:32:36.491', NULL) /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where 1 = 0 or a < b -- -- Checking F || F = F /*u1*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('2004-05-06 12:32:36.491', NULL) /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where b != a or a < b -- -- Checking BETWEEN: >= and <= /*u1*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('2004-05-06 12:32:36.491', '2005-05-06 12:32:36.491') /*c1*/ select* from SQLUNKNOWNCOMPLIANCECHECK where (a between '2004-05-06 12:32:36.491' and '2005-05-06 12:32:36.491') or (b between '2004-05-06 12:32:36.491' and '2005-05-06 12:32:36.491') -- -- -- -------------------------------------------------------------------- -- Checking compliance of type CHAR(1) drop table SQLUNKNOWNCOMPLIANCECHECK if exists create table SQLUNKNOWNCOMPLIANCECHECK(a CHAR(1), b CHAR(1)) -- Checking v = NULL /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('a', NULL) /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a = b -- -- Checking NOT v = NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where not a = b -- -- Checking v <> NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a <> b -- -- Checking NOT v <> NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where not a <> b -- -- Checking v < NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a < b -- -- Checking NOT v < NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where not a < b -- -- Checking v <= NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a <= b -- -- Checking NOT v <= NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where not a <= b -- -- Checking v > NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a > b -- -- Checking NOT v > NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where not a > b -- -- Checking v >= NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a >= b -- -- Checking NOT v >= NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where not a >= b -- -- Checking BETWEEN /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where b between 'a' and 'b' -- -- Checking NOT BETWEEN /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where not b between 'a' and 'b' -- -- Checking IN /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where b in ('a', 'b') -- -- Checking NOT IN /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where not b in ('a', 'b') -- -- Checking T && T = T /*u1*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('a', 'b') /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('b', 'a') /*c1*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a < b and 1 = 1 -- -- Checking T && F = F /*u2*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('a', 'b') /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('b', 'a') /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a < b and 1 = 0 -- -- Checking T && U = U /*u2*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('a', NULL) /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where 1 = 1 and a < b -- -- Checking F && F = F /*u1*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('a', 'a') /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a < b and 1 = 0 -- -- Checking F && F = F /*u1*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('a', NULL) /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where 1 = 0 and a < b -- -- Checking F && F = F /*u1*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('a', NULL) /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where b != a and a < b -- -- Checking T || T = T /*u1*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('a', 'b') /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('b', 'a') /*c2*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a < b or a > b -- -- Checking T || F = T /*u2*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('a', 'b') /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('b', 'a') /*c1*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a < b or 1 = 0 -- -- Checking T || U = T /*u2*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('a', NULL) /*c1*/ select* from SQLUNKNOWNCOMPLIANCECHECK where 1 = 1 or a < b -- -- Checking F || F = F /*u1*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('a', 'a') /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a < b or 1 = 0 -- -- Checking F || F = F /*u1*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('a', NULL) /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where 1 = 0 or a < b -- -- Checking F || F = F /*u1*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('a', NULL) /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where b != a or a < b -- -- Checking BETWEEN: >= and <= /*u1*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('a', 'b') /*c1*/ select* from SQLUNKNOWNCOMPLIANCECHECK where (a between 'a' and 'b') or (b between 'a' and 'b') -- -- -- -------------------------------------------------------------------- -- Checking compliance of type VARCHAR(1) drop table SQLUNKNOWNCOMPLIANCECHECK if exists create table SQLUNKNOWNCOMPLIANCECHECK(a VARCHAR(1), b VARCHAR(1)) -- Checking v = NULL /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('a', NULL) /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a = b -- -- Checking NOT v = NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where not a = b -- -- Checking v <> NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a <> b -- -- Checking NOT v <> NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where not a <> b -- -- Checking v < NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a < b -- -- Checking NOT v < NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where not a < b -- -- Checking v <= NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a <= b -- -- Checking NOT v <= NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where not a <= b -- -- Checking v > NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a > b -- -- Checking NOT v > NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where not a > b -- -- Checking v >= NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a >= b -- -- Checking NOT v >= NULL /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where not a >= b -- -- Checking BETWEEN /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where b between 'a' and 'b' -- -- Checking NOT BETWEEN /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where not b between 'a' and 'b' -- -- Checking IN /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where b in ('a', 'b') -- -- Checking NOT IN /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where not b in ('a', 'b') -- -- Checking T && T = T /*u1*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('a', 'b') /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('b', 'a') /*c1*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a < b and 1 = 1 -- -- Checking T && F = F /*u2*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('a', 'b') /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('b', 'a') /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a < b and 1 = 0 -- -- Checking T && U = U /*u2*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('a', NULL) /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where 1 = 1 and a < b -- -- Checking F && F = F /*u1*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('a', 'a') /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a < b and 1 = 0 -- -- Checking F && F = F /*u1*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('a', NULL) /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where 1 = 0 and a < b -- -- Checking F && F = F /*u1*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('a', NULL) /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where b != a and a < b -- -- Checking T || T = T /*u1*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('a', 'b') /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('b', 'a') /*c2*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a < b or a > b -- -- Checking T || F = T /*u2*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('a', 'b') /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('b', 'a') /*c1*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a < b or 1 = 0 -- -- Checking T || U = T /*u2*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('a', NULL) /*c1*/ select* from SQLUNKNOWNCOMPLIANCECHECK where 1 = 1 or a < b -- -- Checking F || F = F /*u1*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('a', 'a') /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where a < b or 1 = 0 -- -- Checking F || F = F /*u1*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('a', NULL) /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where 1 = 0 or a < b -- -- Checking F || F = F /*u1*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('a', NULL) /*c0*/ select* from SQLUNKNOWNCOMPLIANCECHECK where b != a or a < b -- -- Checking BETWEEN: >= and <= /*u1*/ delete from SQLUNKNOWNCOMPLIANCECHECK /*u1*/ insert into SQLUNKNOWNCOMPLIANCECHECK values ('a', 'b') /*c1*/ select* from SQLUNKNOWNCOMPLIANCECHECK where (a between 'a' and 'b') or (b between 'a' and 'b') -- hsqldb-1.8.0.10.orig/testrun/hsqldb/TestSelfFKModes.txt0000644000175000017500000001202310416747436021315 0ustar renerene-- CIRCULAR SELF REFERENCING FK -- ON DELETE CASCADE drop table testB if exists; create cached table testB(id integer, parent integer, ref integer, data varchar(200), unique(parent), primary key (id),foreign key (parent) references testB(id) on delete cascade, foreign key (id) references testB(parent) on delete cascade); /*u1*/insert into testB values(100,100,1,'xxxx'); /*u1*/insert into testB values(200,200,1,'xxxx'); /*u1*/delete from testB where id=100; /*r200,200,1,xxxx*/select * from testB -- NORMAL SELF REFERENCING FK -- ON DELETE CASCADE drop table testB if exists; create cached table testB(id integer, parent integer, ref integer, data varchar(200), unique (id), foreign key (parent) references testB(id) on delete cascade); /*u1*/insert into testB values(100,100,1,'xxxx'); /*u1*/insert into testB values(101,100,1,'xxxx'); /*u1*/insert into testB values(102,100,1,'xxxx'); /*u1*/insert into testB values(200,200,1,'xxxx'); /*u1*/delete from testB where id=100; /*r200,200,1,xxxx*/select * from testB -- ON DELETE SET NULL drop table testB if exists; create cached table testB(id integer, parent integer, ref integer, data varchar(200), unique (id), foreign key (parent) references testB(id) on delete set null); /*u1*/insert into testB values(100,100,1,'xxxx'); /*u1*/insert into testB values(101,100,1,'xxxx'); /*u1*/insert into testB values(102,100,1,'xxxx'); /*u1*/insert into testB values(200,200,1,'xxxx'); /*u1*/delete from testB where id=100; /*r 101,NULL,1,xxxx 102,NULL,1,xxxx 200,200,1,xxxx */select * from testB order by id /*c2*/select * from testB where parent is null -- ON DELETE SET DEFAULT drop table testB if exists; create cached table testB(id integer, parent integer default 20, ref integer, data varchar(200), unique (id),foreign key (parent) references testB(id) on delete set default); /*u1*/insert into testB values(20,20,1,'xxxx'); /*u1*/insert into testB values(100,100,1,'xxxx'); /*u1*/insert into testB values(101,100,1,'xxxx'); /*u1*/insert into testB values(200,200,1,'xxxx'); /*u1*/delete from testB where id=100; /*r 20,20,1,xxxx 101,20,1,xxxx 200,200,1,xxxx */select * from testB order by id /*c2*/select * from testB where parent=20 -- CHAINED SELF REFERENCING FK -- ON DELETE CASCADE drop table testA if exists; create cached table testA(a int primary key,b int, foreign key(b) references testA(a) on update cascade on delete cascade); insert into testA(a,b) values(1,1); insert into testA(a,b) values(2,1); insert into testA(a,b) values(3,1); insert into testA(a,b) values(4,2); insert into testA(a,b) values(5,2); insert into testA(a,b) values(6,2); insert into testA(a,b) values(7,3); insert into testA(a,b) values(8,3); insert into testA(a,b) values(9,3); /*u9*/update testA set a = a+1; /*r3*/select count(*) from testA where b=4; /*u9*/update testA set a = a-1; /*r0*/select count(*) from testA where b=4; /*r3*/select count(*) from testA where b=3; /*u1*/delete from testA where a=1; /*r0*/select count(*) from testA; -- bug 870835 -- MIXED SELF AND FORWARD REFERENCE -- UPDATE ISSUE CREATE CACHED TABLE GroupSubject ( description VARCHAR(10), parent BIGINT, admin BIGINT NOT NULL, id_ BIGINT, UNIQUE ( id_ )); CREATE CACHED TABLE UserSubject ( subjectName VARCHAR(10) NOT NULL, id_ BIGINT, UNIQUE ( id_ ), PRIMARY KEY ( subjectName )); ALTER TABLE GroupSubject ADD CONSTRAINT GroupSubject_REF_parent FOREIGN KEY ( parent ) REFERENCES GroupSubject ( id_ ); ALTER TABLE GroupSubject ADD CONSTRAINT GroupSubject_REF_admin FOREIGN KEY ( admin ) REFERENCES UserSubject ( id_ ); insert into UserSubject values ('admin', 100); insert into GroupSubject values (null, null, 100, 200); /*u1*/update GroupSubject set description = null, parent = null, admin = 100 where id_ = 200; /*r admin,100 */select * from UserSubject /*r NULL,NULL,100,200 */select * from GroupSubject -- MULTIPLE FK ISSUE drop table testA if exists; drop table testB if exists; drop table testC if exists; create cached table testA(id integer primary key); create cached table testB(id integer, foreign key (id) references testA(id) on delete cascade); create cached table testC(id integer, foreign key (id) references testA(id)); insert into testA values(1); insert into testA values(2); insert into testB values(1); insert into testB values(2); insert into testC values(1); /*e*/delete from testA /*c2*/select * from testB /*c1*/select * from testC /*u1*/delete from testA where id=2 /*c1*/select * from testA /*c1*/select * from testB /*c1*/select * from testC -- INVALID SET DEFAULT /*e*/create cached table testE(id integer, foreign key (id) references testA(id) on delete set default); /*e*/create cached table testE(id integer primary key, idref integer, foreign key (idref) references teste(id) on delete set default); create cached table testE(id integer primary key, idref integer); /*e*/alter table testE add foreign key(idref) references testE(id) on delete set default; alter table testE alter column idref set default 10; alter table testE add foreign key(idref) references testE(id) on delete set default; /*e*/alter table testE alter column idref drop default; hsqldb-1.8.0.10.orig/build/0000755000175000017500000000000010264605023013714 5ustar renerenehsqldb-1.8.0.10.orig/build/build.properties0000644000175000017500000000010510052131034017114 0ustar renerenedocbook.xsl.home: C:/docbook-xsl-1.65.1 fop.home: C:/java/fop-0.20.5hsqldb-1.8.0.10.orig/build/readmedocbook.txt0000644000175000017500000001005710273521157017263 0ustar renereneHow to build Hsqldb documentation from DocBook source ----------------------------------------------------- $Id: readmedocbook.txt,v 1.7 2005/07/25 21:05:46 unsaved Exp $ 1. OBTAIN REQUIRED LIBRARIES AND STYLE SHEETS If you are using a version of Java earlier than 1.4, then you will have to get XML and XSLT libraries supported by DocBook. (Java 1.4 users skip to the next paragraph). I suggest the Xerces XML library and Xalan XSLT libraries, both of which are available in the Xalan Java 2 distribution file xalan-j-*-bin.* (not xalan-j--bin-2jars.*), available at http://www.apache.org/dyn/closer.cgi/xml/xalan-j You will need to put the jars xalan.jar, xml-apis.jar, and xercesImpl.jar into your classpath. If you are using the Sun JDK 1.4, and get an exception when building the docbooks, you may need newer Xerces / Xalan libraries. See also http://xml.apache.org/xalan-j/faq.html If you are building on one of the Sourceforge shell servers, then you can skip this step because I have all of the needed resources under /home/users/us/unsaved. You shouldn't build docs on Sourceforge unless you are a developer who is building the documentation for publishing. You need the following resources. In all cases, use the latest stable version unless there is some specific reason to use something else. ant-contrib*.jar from ant-contrib-*-bin.*, available from http://sourceforge.net/project/showfiles.php?group_id=36177 Place this jar into the lib subdirectory of your Ant installation. [Some distros spread the Ant files all over the place, and the lib directory isn't referenced at all. In that case, just add the jar file to your classpath (exporting if needed by your shell) before running ant. The docbook-xsl package from http://sourceforge.net/project/showfiles.php?group_id=21935&package_id=16608 (or, for Linux RPM users, the docbook-xsl-stylesheets package). You need at least version 1.61. Extract anyplace. That's all if you just want to build HTML docs. If you want to build PDF or postscript, then you also need the following. Binary distro of FOP, available from http://www.apache.org/dyn/closer.cgi/xml/fop Extract it anyplace. JimiProClasses.zip from Sun's JIMI SDK, available at http://java.sun.com/products/jimi Just pull the JimiProClasses.zip file out and rename it to jimi-1.0.jar in the lib subdirectory of your FOP installation. (If this seems weird to you, read about it in the FOP docs. Note that we use JIMI instead of JAI because JAI is non-portable). 2. MAKE A build.properties TO TELL Ant WHERE TO FIND THE LIBRARIES AND STYLE SHEETS Create a Java properties file named "build.properties" in the same directory as this readme file. (If there's already one there, then just add to it). Add values for 'docbook.xsl.home' and for 'fop.home'. This example build.properties file (which works on cvs.sourceforge.net) shows what is needed. docbook.xsl.home: /home/users/u/un/unsaved/docbook-xsl-1.65.1 fop.home: /home/users/u/un/unsaved/fop-0.20.5 (RPM users be aware that docbook-xsl-stylesheets installs the style sheets under /usr/share/sgml/docbook/docbook-xsl-stylesheets. Run "rpm -ql docbook-xsl-stylesheets"). THE REMAINDER OF THIS DOCUMENT IS ONLY FOR PEOPLE MESSING WITH THE BUILD FILE ITSELF. There's no need to understand this stuff if you are only using external targets. RELATIONSHIPS AMONG THE HSQLDB DOCBOOK-RELATED ANT TARGETS: * denotes inheritall invocations. docbook docbooks-html -> html docbooks-chunk -> *-ddIterate ->*-condlGenBook -> chunk docbooks-pdf -> pdf [docbooks-ps ->] ps pdf/ps fo *-fop -> -initfop chunk/html/fo -setXslFilesets -preDocbook *-htmlXslt/*-foXslt -postDocbook -preDocbook -> *-sandwich -postDocbook (There's a good chance that this relationship "diagram" will get out-of-date. Best to use this as a guide and verify any assumptions against the real build.xml file). hsqldb-1.8.0.10.orig/build/switchToJDK14.bat0000644000175000017500000000223710036536603016716 0ustar renerenecd ..\ md classes del /s classes\*.class cd build cd ..\src\org\hsqldb\util javac -d ..\..\..\..\classes CodeSwitcher.java cd ..\..\..\..\build java -classpath "%classpath%;../classes" org.hsqldb.util.CodeSwitcher ../src/org/hsqldb/jdbc/jdbcStubs.java +JAVA2 +JDBC3 java -classpath "%classpath%;../classes" org.hsqldb.util.CodeSwitcher ../src/org/hsqldb/jdbc/jdbcCallableStatement.java +JAVA2 +JDBC3 java -classpath "%classpath%;../classes" org.hsqldb.util.CodeSwitcher ../src/org/hsqldb/jdbc/jdbcConnection.java +JAVA2 +JDBC3 java -classpath "%classpath%;../classes" org.hsqldb.util.CodeSwitcher ../src/org/hsqldb/jdbc/jdbcDatabaseMetaData.java +JAVA2 +JDBC3 java -classpath "%classpath%;../classes" org.hsqldb.util.CodeSwitcher ../src/org/hsqldb/jdbc/jdbcPreparedStatement.java +JAVA2 +JDBC3 java -classpath "%classpath%;../classes" org.hsqldb.util.CodeSwitcher ../src/org/hsqldb/jdbc/jdbcResultSet.java +JAVA2 +JDBC3 java -classpath "%classpath%;../classes" org.hsqldb.util.CodeSwitcher ../src/org/hsqldb/jdbc/jdbcStatement.java +JAVA2 +JDBC3 java -classpath "%classpath%;../classes" org.hsqldb.util.CodeSwitcher ../src/org/hsqldb/HsqlDateTime.java +JAVA2 +JDBC3 hsqldb-1.8.0.10.orig/build/buildJDK11.bat0000644000175000017500000000334710036536603016211 0ustar renerene@echo HSQLDB build file for jdk 1.1.x @echo *** we recommend the use of the ANT build.xml instead of this method @echo for all jdk's include the path to jdk1.x.x\bin in your system path statement @echo for jdk1.1.x also set the system classpath to include the path to @echo jdk1.1.x\lib\classes.zip on your system @echo example: set classpath=c:\jdk1.1.8\lib\classes.zip cd ..\ md classes del /s classes\*.class cd src mkdir ..\temp copy org\hsqldb\jdbc\jdbcDataSource*.java ..\temp\ copy org\hsqldb\jdbc\jdbcSavepoint.java ..\temp\ copy org\hsqldb\jdbc\jdbcParameterMetaData.java ..\temp\ copy org\hsqldb\NIOLockFile.java ..\temp\ copy org\hsqldb\NIOScaledRAFile.java ..\temp\ del org\hsqldb\jdbc\jdbcDataSource*.java del org\hsqldb\jdbc\jdbcSavepoint.java del org\hsqldb\jdbc\jdbcParameterMetaData.java del org\hsqldb\NIOLockFile.java del org\hsqldb\NIOScaledRAFile.java copy org\hsqldb\util\*Swing.java ..\temp\ del org\hsqldb\util\*Swing.java javac -O -nowarn -d ../classes -classpath "%classpath%;../classes;../lib/servlet.jar;." ./*.java org/hsqldb/*.java org/hsqldb/lib/*.java org/hsqldb/util/*.java copy ..\temp\jdbcDataSource*.java org\hsqldb\jdbc copy ..\temp\jdbcSavepoint.java org\hsqldb\jdbc copy ..\temp\jdbcParameterMetaData.java org\hsqldb\jdbc copy ..\temp\NIOLockFile.java org\hsqldb copy ..\temp\NIOScaledRAFile.java org\hsqldb del ..\temp\jdbcDataSource*.java del ..\temp\jdbcSavepoint.java del ..\temp\jdbcParameterMetaData.java del ..\temp\NIOLockFile.java del ..\temp\NIOScaledRAFile.java copy ..\temp\*Swing.java org\hsqldb\util del ..\temp\*Swing.java rmdir ..\temp cd ..\classes jar -cf ../lib/hsqldb.jar *.class org/hsqldb/*.class org/hsqldb/lib/*.class org/hsqldb/util/*.class cd ..\build pause hsqldb-1.8.0.10.orig/build/switchToJDK11.bat0000644000175000017500000000330710147117430016706 0ustar renerene@echo HSQLDB source switch file for jdk 1.1.x @echo *** we recommend the use of the ANT build.xml instead of this method @echo for all jdk's include the path to jdk1.x.x\bin in your system path statement @echo for jdk1.1.x also set the system classpath to include the path to @echo jdk1.1.x\lib\classes.zip on your system @echo example: set classpath=c:\jdk1.1.8\lib\classes.zip cd ..\ md classes del /s classes\*.class cd build cd ..\src\org\hsqldb\util javac -d ..\..\..\..\classes CodeSwitcher.java cd ..\..\..\..\build java -classpath "%classpath%;../classes" org.hsqldb.util.CodeSwitcher ../src/org/hsqldb/jdbc/jdbcStubs.java -JAVA2 -JDBC3 java -classpath "%classpath%;../classes" org.hsqldb.util.CodeSwitcher ../src/org/hsqldb/jdbc/jdbcCallableStatement.java -JAVA2 -JDBC3 java -classpath "%classpath%;../classes" org.hsqldb.util.CodeSwitcher ../src/org/hsqldb/jdbc/jdbcConnection.java -JAVA2 -JDBC3 java -classpath "%classpath%;../classes" org.hsqldb.util.CodeSwitcher ../src/org/hsqldb/jdbc/jdbcDatabaseMetaData.java -JAVA2 -JDBC3 java -classpath "%classpath%;../classes" org.hsqldb.util.CodeSwitcher ../src/org/hsqldb/jdbc/jdbcPreparedStatement.java -JAVA2 -JDBC3 +JAVA1TARGET java -classpath "%classpath%;../classes" org.hsqldb.util.CodeSwitcher ../src/org/hsqldb/jdbc/jdbcResultSet.java -JAVA2 -JDBC3 +JAVA1TARGET java -classpath "%classpath%;../classes" org.hsqldb.util.CodeSwitcher ../src/org/hsqldb/jdbc/jdbcStatement.java -JAVA2 -JDBC3 +JAVA1TARGET java -classpath "%classpath%;../classes" org.hsqldb.util.CodeSwitcher ../src/org/hsqldb/HsqlDateTime.java -JAVA2 -JDBC3 java -classpath "%classpath%;../classes" org.hsqldb.util.CodeSwitcher ../src/org/hsqldb/lib/java/JavaSystem.java +JAVA1TARGET hsqldb-1.8.0.10.orig/build/packaging/0000755000175000017500000000000010242420070015631 5ustar renerenehsqldb-1.8.0.10.orig/build/packaging/pkg/0000755000175000017500000000000010416761657016440 5ustar renerenehsqldb-1.8.0.10.orig/build/packaging/pkg/upgrading.txt0000644000175000017500000000730710271030043021141 0ustar renereneUPGRADING FROM HSQLDBhsqldb v. 1.7.1 $Id: upgrading.txt,v 1.2 2005/07/25 00:19:47 unsaved Exp $ Remove the old package pkgrm HSQLDBhsqldb Your "data" and your configuration settings will not be removed. If you use default locations, here are the remnants which you need to be concerned about: Your databases will still reside in directories like /usr/hsqldb-1.7.1/data/db1 (and similar for databases you may have created). One server.properties or webserver.properties file in each of the database instance directories (see previous item). You main configuration file will be backed up to a file like /etc/hsqldb.conf.20050724 (where the last element of the file name is a date stamp). READ THIS PARAGRAPH ONLY IF YOU ARE RUNNING MULTIPLE DB INSTANCES The version 1.7.1 init script ran a separate JVM for each database instance. You can still do this in the new version by using multiple copies of the init script and the main configuration file (/etc/hsqldb.conf). See the main readme.txt file about how to do that. The primary method to support multiple database instances in this version, however, is to run all of your instances in a single JVM. This is the most efficient way to run HSQLDB for most (but certainly not all) environments. The new init script uses server.properties files directly in /opt/hsqldb/data, not in the instance-specific directories like /opt/hsqldb/data/db1; and it depends on the server.properties files to specify the data sources (instead of the rather restive method of supporting only standalone type databases which rely on the directory name). Therefore, you need to merge your web/server.properties files from /usr/hsqldb-1.7.1/data/*/*server.properties to the directory /opt/hsqldb/data and specify the database instances as documented in the server.properties section of the Advanced chapter of the HSQLDB User Guide. Most users will just want a single server.properties file that will simply list all database instances. You can, however, run different listeners on different ports in order to serve all combinations of Server/WebServer/port-numbers/SSL/etc. To run multiple listeners like this (all in the single JVM), you set INVOC_ADDL_ARGS to specify the *Server classes to run, and the startup parameters which will override the web/server.properties settings for that one listener. I. Make sure your data is accessible. Your instance data for 1.7.1 resides under /usr/hsqldb-1.7.1/data/db1. You can either leave it there and change the value of SERVER_HOME in /etc/hsqldb.conf to /usr/hsqldb-1.7.1/data, or move everything from /usr/hsqldb-1.7.1/data/db1 to the new default location, /opt/hsqldb/data/db1. II. Make your web/server.properties file accessible. Move the new server.properties to server.properties or webserver.properties in your SERVER_HOME (see previous item). III.Update your web/server.properties file. Edit the web/server.properties file to (a) merge in changes which you have made to the old web/server.properties residing in your .../data/db1 directory (which will no longer be used); and (b) to make sure that the path to .../data/db1 is correct. If the filepath is relative, it is relative to SERVER_HOME. IV. Merge any customizations which you may have made from /etc/hsqldb.conf.20050724 into /etc/hsqldb.conf. You will see that the way several settings are made have changed, but the variable names and comments should make it clear how to make new settings which are equivalent to your old settings. As an example, version 1.7.1 had settings for HSQLDB_HOME and JAVA_HOME. The new version has the more specific settings HSQLDB_JAR_PATH and JAVA_EXECUTABLE instead. hsqldb-1.8.0.10.orig/build/packaging/pkg/readme.txt0000644000175000017500000001605210273521157020430 0ustar renereneREADME FOR THE SOLARIS HSQLDB PACKAGE $Id: readme.txt,v 1.14 2005/07/28 15:47:19 unsaved Exp $ JAVA SUPPORT The delivered hsqldb.conf uses /usr/bin/java (which on Solaris is equivalent to /bin/java since /bin is just a sym-link to /usr/bin). To use some other JRE, set JAVA_EXECUTABLE in /etc/hsqldb.conf. The hsqldb.jar file was built with Sun Java 1.5.0. It works with Sun JRE's 4.x and 5.x... You can certainly use this package with earlier versions of Java, but you will have to build a hsqldb.jar file for your Java version. All you need to do so is a HSQLDB distribution (this package will do, but you could also build it on another computer, even with a different operating system). a recent version of Ant, and a Java 1.3 JDK. It's pretty easy. Follow the instructions in the Building chapter of the HSQLDB User Guide at the bottom of the Building With Ant subsection. If you are going to run Java 1.x on Solaris (why!!!?), read the next paragraph. If you use this package with an IBM or open source JRE, please let me know how it works. If I get another job where I need to run a non-Sun JRE on Solaris, I'll make whatever changes are necessary. You can run multiple HSQLDB versions under different JRE's, or toggle back and forth, by renaming your hsqldb.jar's to indicate the JRE target version (like "hsqldb-jre23.jar" and "hsqldb-jre45.jar"), and changing the settings JAVA_EXECUTABLE and HSQLDB_JAR_PATH in /etc/hsqldb.conf as needed. Sun JRE 1.x USERS. (Do read the previous paragraph about rebuilding hsqldb.jar). Sym-links don't work right for at least some Java 1.x builds. Make sure that every element of your JAVA_EXECUTABLE path is a real directory (as opposed to a sym link). Known bug with Java 1.x: If you run the daemons as root (which is not the default), the default shutdown method fails and results in a long wait before shutdown with TERM signal succeeds. If this bothers you, then upgrade your java, don't run as root, or set a short timeout in the hsqldb config file. runUtil.sh and demo scripts: Don't use them. They are there for backwards compatibility only. Run "man java" to learn how to execute the HSQLDB classes. CONFIGURATION Main config file is /etc/hsqldb.conf on Solaris. You can have multiple versions of hsqldb installed, and you can have them installed to the same or different install bases (like /usr and /usr/local). Defaults to /opt. To keep these different baselines straight, the hsqldb homes have a version-number in their name. The last installation gets a sym-link called "hsqldb" (i.e., no version in it) right at the install base. So, to use the default (last) installation at any install base, just access "hsqldb". Example /opt/hsqldb-1.7.1 (default location on Solaris) /opt/hsqldb -> hsqldb-1.7.1 (sym-link to default hsqldb instance) By default, /etc/init.d/hsqldb will start up one HSQLDB Server which serves one database instance living at /opt/hsqldb/data/db1. It will run on the default Server port 9001 under user "hsqldb". You can customize this in lots of ways by editing /etc/hsqldb.conf and/or /opt/hsqldb/data/*server.properties files. You can, for example, serve standard hsql on multiple ports, plus http over multiple ports, some with SSL encrytion. Each port can serve its own list of database instances of various types (memory-only, file, jar, etc.). If multiple ports specify the same DB instance, then they will serve out a single, shared DB instance, just like you would want. All of this happening in a single JVM instance. See the comments in /etc/hsqldb.conf and the HSQLDB User Guide for information on how to do all this stuff. If you need JVM isolation for any reason, then you'll need to copy /etc/init.d/hsqldb to something else (perhaps /etc/init.d/hsqldb-alt) and edit this to use a different config file (perhaps /etc/hsqldb-alt.conf). Edit your new conf file as necessary and set up your hard links in /etc/rc?.d as required. (Linux users be aware that Solaris uses hard links for this, not sym links, and that you use links only for runlevels with state "changes"). In general, we recommend against it, but if you want to run your servers as root, just change OWNER to root in /etc/hsqldb.conf and skip the rest of this file. The rest of this file assumes that you are not running the daemons as user 'root'. By default, the daemons run as user 'hsqldb' (but you invoke the init scripts as root). You can not run a WebServer on the default port of 80 (since 80 is a privileged port). See the Advanced chapter of the HSQLDB User Guide. SOLARIS To install the Solaris package uncompress HSQLDBhsqldb-1_8_1-solaris.pkg.Z pkgadd -d HSQLDBhsqldb-1_8_1-solaris.pkg HSQLDBhsqldb (The version number will vary, of course). To install to an install base other than /opt, make an Admin file (like copy /var/sadm/install/admin/default) and set "basedir" whatever you want, then specify the Admin file to pkgadd with -a. pkgadd -a file.admin -d HSQLDBhsqldb-1_7_1-solaris.pkg HSQLDBhsqldb MULTIPLE INSTANCES You can install multiple instances of HSQLhsqldb, as long as the version is unique. If you want more than one copy of the same version, then you will have to copy files manually because Solaris doesn't permit that. If pkgadd refuses to let you install an additional package even though the version is unique, then you probably need to set the Admin file variable "instance" to "unique". If you don't understand what I say about Admin files, run "man pkgadd" and "man -s 4 admin". HSQLDB DEVELOPERS Most of the files in .../pkg/cfg are named like HSQLhsqldb.something. The intention was for the base name to be the entire package name, so they should be HSQLDBhsqldb.something. They will probably be renamed properly in some future version. To build a Solaris package, you need to do a cvs checkout of the hsqldb-dev module (HEAD or a static tag, depending on what you want). For suggestions of the checkout command, click the CVS tab at http://sourceforge.net/projects/hsqldb. Make sure to build documentation and hsqldb.jar before building this package! .../build/packaging/pkg/pkgbuild is the main script to build a Solaris package. Give the -p switch to rebuild the prototype file (definitely need to do that if there were any changes to anything in the software to be delivered... as opposed to just a version or package parameter change). Contents of the Solaris package. The package will contain exactly what is listed in the .../build/packaging/pkg/cfg/*.proto file which is generated by "pkgbuild -p". Several files in the checkedout out module are specifically not included in the Solaris package. To find out exactly what files are currently excluded, see the command beginning with "perl -ni.safe -we" in the pkgbuild script. At the time I am writing this, the perl command excludes the following: $HSQLDB_HOME/classes/... $HSQLDB_HOME/build/packaging $HSQLDB_HOME/.../CVS... (Not necessary if you ran "cvs... export") $HSQLDB_HOME/lib/hsqldb.jar Blaine blaine.simpson@admc.com unsaved at Sourceforge.net hsqldb-1.8.0.10.orig/build/packaging/pkg/pkgbuild0000644000175000017500000001264410273521157020161 0ustar renerene#!/bin/sh # $Id: pkgbuild,v 1.9 2005/07/25 02:42:10 unsaved Exp $ # TODO: Perhaps use RCS keywords to generate versions and write them # into the install scripts, the info file, and to use in the # stream package file name. # Makes the very large assumption that files here are owned by # user $USER and group $USER, and therefore fixes ownerships from # "$USER $USER$" to "root bin". set +u PROGNAME=`basename "$0"` Failout() { echo "Aborting $PROGNAME. $@" 1>&2 exit 1 } case "`uname`" in SunOS) echonoterm() { # Echo without trailing newline echo "$@\c" } ;; Linux) echonoterm() { # Echo without trailing newline echo -n "$@" } ;; *) echo 'Aborting. Your OS is not supported yet. If you seriously' 1>&2 echo "want support for it, email ${AUTHOR_EMAILADDR}." exit 10 ;; esac # Being VERY careful here, because we do a relative "rm -rf" below!! [ "$0" = "./$PROGNAME" ] || Failout "You have to run this script like './$PROGNAME'" GENPROTO= while [ "$#" -gt 0 ]; do case "$1" in -*n*) pkgmk() { echo "pkgmk $@" 1>&2 } pkgtrans() { echo "pkgtransmk $@" 1>&2 } compress() { echo "compress $@" 1>&2 } rm() { echo "rm $@" 1>&2 } ;; esac case "$1" in -*p*) GENPROTO=1;; esac case "$1" in -*v*) set -x;; esac # Verbose shift done [ -n "$GENPROTO" ] || echo "Warning: Using existing .proto file. Quit and invoke with '-p' if any component file(s) have changed." getent passwd hsqldb > /dev/null || Failout "You need to have the user account 'hsqldb' on this sytem (dead shell ok)" getent group hsqldb > /dev/null || Failout "You need to have the group 'hsqldb' on this sytem" PKGNAME=`sed -n '/^PKG=/ { s:^PKG=:: p }' cfg/HSQLhsqldb.info` || Failout 'Failed to package name version from info file' [ -n "$PKGNAME" ] || Failout 'Failed to retrieve package name from info file' VERINFO=`sed -n '/^VERDIR=/ { s:^VERDIR=:: p }' cfg/HSQLhsqldb.info` || Failout 'Failed to retrieve version from info file' [ -n "$VERINFO" ] || Failout 'Failed to retrieve version from info file' VERPOST=`sed -n '/^BASE=/ { s:^BASE=:: p }' cfg/HSQLhsqldb.postinstall` || Failout 'Failed to retrieve version from info postinstall script' [ -n "$VERPOST" ] || Failout 'Failed to retrieve version from info postinstall script' VERPRE=`sed -n '/^BASE=/ { s:^BASE=:: p }' cfg/HSQLhsqldb.preremove ` || Failout 'Failed to retrieve version from info preremove script' [ -n "$VERPRE" ] || Failout 'Failed to retrieve version from info preremove script' [ "$VERPRE" = "$VERPOST" ] || Failout \ "Version specs (BASE) don't agree in preremove script and postinstall script" [ "$VERPRE" = "$VERINFO" ] || Failout "Version specs (BASE and VERDIR) don't agree in preremove script and info script" case "$VERPRE" in hsqldb-*);; *) Failout \ "Sorry, but this script requires BASE/VERDIR to be of the form 'hsqldb-VERSION' (Yours is '$VERPRE')";; esac VER=`echo $VERPRE | sed s:hsqldb-::` PWD=`pwd` # Bourne doesn't necessarily set $PWD SRCBASE=`dirname $PWD` SRCBASE=`dirname $SRCBASE` SRCBASE=`dirname $SRCBASE` [ -f "$SRCBASE/lib/hsqldb.jar" ] || Failout "Looks like your hsqldb.jar file is not built" PROTOFILE="`echo cfg/H*.proto`" [ -f "$PROTOFILE" ] || Failout "You need to fix cfg/H*.proto, or fix the wildcard in this script Even if you're generating it, you have to start with an old version." [ -f cfg/HSQLhsqldb.copyright ] || cp -p ../../../doc/hsqldb_lic.txt cfg/HSQLhsqldb.copyright [ -z "$USER" ] && USER=LOGNAME export USER [ -n "$GENPROTO" ] && { perl -v > /dev/null 2>&1 || Failout 'You need perl in your search path to generate the proto file' echo 'Generating prototype file...' # Remove all lines after "# REGENERATE..." perl -pi -we 'if (/^# REGENERATE AFTER HERE/i) {print; exit;}' $PROTOFILE (cd $SRCBASE && pkgproto '.=$VERDIR') >> $PROTOFILE perl -ni.safe -we ' next if m:^\s*\S\s+none\s+\$VERDIR/classes:; #next if m:^\s*\S\s+none\s+\$VERDIR/src:; Keep SOURCE! next if m:^[^#=]*build/packaging:; next if m:^[^#]*[/ ]CVS:; s/ $ENV{USER} $ENV{USER}$/ root bin/; s/ 0644 root bin$// unless /^\!default\s/; s/ 0664 root bin$// unless /^\!default\s/; s/ 0775 root bin$/ 0755 root bin/; print; ' $PROTOFILE } # Be careful if you edit this [ -r "$PKGNAME" ] && { echonoterm "Remove old dir package '$PKGNAME'? " read REPLY case "$REPLY" in [Yy]*) echonoterm 'Removing old dir package... ' rm -rf "./$PKGNAME" echo Done;; [Qq]*) exit 0;; esac } echo "Building version $VER with source base $SRCBASE" pkgmk -o -b $SRCBASE -d . -f $PROTOFILE || exit 1 # Package file name format is the Solaris package standard: # PKGNAME-ver_with_underscores-platform.pkg[.Z] # So, we need to convert dots to underscores in the version name export VER VER="`perl -we '$_ = $ENV{VER}; s:\.:_:g; print;'`" echonoterm \ "ENTER to quit, Y to build stream package ${PKGNAME}-${VER}-solaris.pkg.Z: " read REPLY case "$REPLY" in [Yy]*) rm -f "${PKGNAME}-${VER}-solaris.pkg" "${PKGNAME}-${VER}-solaris.pkg.Z" pkgtrans -os . "$PWD/${PKGNAME}-${VER}-solaris.pkg" $PKGNAME && echonoterm 'Now compressing... ' compress "${PKGNAME}-${VER}-solaris.pkg" echo 'Done (If there is a message above that the file is "unchanged", that just means that the file compression was skipped because compression resulted in no savings).' ;; [Qq]*) exit 0;; esac hsqldb-1.8.0.10.orig/build/packaging/pkg/cfg/0000755000175000017500000000000010416761717017174 5ustar renerenehsqldb-1.8.0.10.orig/build/packaging/pkg/cfg/HSQLhsqldb.preinstall0000644000175000017500000000237310273521201023224 0ustar renerene # Bourne shell Solaris packaging script (no interpreter line on purpose) # $Id: HSQLhsqldb.preinstall,v 1.2 2005/07/25 02:42:10 unsaved Exp $ # Do not set path. Pkgadd sets a safe path, it does not use any inherited path # Not knowing what name service is in use for groups and passwords, I # know of no way on the command-line to portably get a list of uids and gids. # (would be easy enough in C). # We need this user and group in place before installing the software # (due to file ownerships) # If getent isn't installed, we will "attempt" to create the user and # group. That won't hurt anything. getent group hsqldb > /dev/null || { # Add group 'hsqldb' groupadd hsqldb } if getent passwd hsqldb > /dev/null; then # If account shell has been disabled by our pkgrm script, then enable it. grep '^hsqldb:.*:/bin/false$' /etc/passwd > /dev/null && usermod -s /bin/sh hsqldb else # Add user 'hsqldb' # We just set temporary home dir and login shell, because at this # point, the intended dir and shell don't exist yet. # A real login shell is required due our use of "su hsqldb -c ...". # (as opposed to setting to /dev/false or similar for security purposes). useradd -d /dev/null -c 'hsqldb owner' hsqldb fi exit 0 hsqldb-1.8.0.10.orig/build/packaging/pkg/cfg/HSQLhsqldb.preremove0000644000175000017500000000122210273521201023043 0ustar renerene # Bourne shell Solaris packaging script (no interpreter line on purpose) # $Id: HSQLhsqldb.preremove,v 1.3 2005/07/25 02:42:10 unsaved Exp $ # Do not set path. Pkgadd sets a safe path, it does not use any inherited path BASE=hsqldb-1.8.0.1a /etc/init.d/hsqldb stop DATESTAMP=`date "+%Y%m%d"` FILEBASE=/etc/hsqldb.conf BACKUPFILE="$FILEBASE.$DATESTAMP" [ -r $BACKUPFILE ] || cp -p $FILEBASE $BACKUPFILE FILEBASE=$BASEDIR/hsqldb/data/server.properties BACKUPFILE="$FILEBASE.$DATESTAMP" [ -r $BACKUPFILE ] || cp -p $FILEBASE $BACKUPFILE FILEBASE=/sqltool.rc BACKUPFILE="$FILEBASE.$DATESTAMP" [ -r $BACKUPFILE ] || cp -p $FILEBASE $BACKUPFILE exit 0 hsqldb-1.8.0.10.orig/build/packaging/pkg/cfg/HSQLhsqldb.checkinstall0000644000175000017500000000063607551673702023536 0ustar renerene # Bourne shell Solaris packaging script (no interpreter line on purpose) # $Id: HSQLhsqldb.checkinstall,v 1.1 2002/10/12 01:15:46 unsaved Exp $ # Do not set path. Pkgadd sets a safe path, it does not use any inherited path sed >&- 2>&- || { echo 'sed not in search path' 1>&2 exit 1 } nawk -- '' /dev/null > /dev/null 2>&1 || { echo 'Aborting. nawk not in search path' 1>&2 exit 10 } exit 0 hsqldb-1.8.0.10.orig/build/packaging/pkg/cfg/HSQLhsqldb.proto0000644000175000017500000014744710273521202022227 0ustar renerene# $Id: HSQLhsqldb.proto,v 1.5 2005/07/25 02:42:10 unsaved Exp $ # Additions for this package are isolated up at the top here. # Everything beneath is stuff straight our of the hsqldb tree. # (This facilitates running commands like "pkgproto... >> .../thisfile.proto") # Unfortunately, this file has to be regenerated whenever hsqldb code # changes :( i pkginfo=HSQLhsqldb.info i preinstall=HSQLhsqldb.preinstall i postinstall=HSQLhsqldb.postinstall i postremove=HSQLhsqldb.postremove i preremove=HSQLhsqldb.preremove i checkinstall=HSQLhsqldb.checkinstall i copyright=HSQLhsqldb.copyright !default 0644 root bin # Special stuff needed for our package d none /var/run 0755 root bin e none /etc/hsqldb.conf=src/org/hsqldb/sample/sample-hsqldb.cfg e none /sqltool.rc=build/packaging/pkg/cfg/sqltool.rc 0600 root bin e none $VERDIR/data/server.properties=build/packaging/pkg/cfg/server.properties f none /etc/init.d/hsqldb=bin/hsqldb 0744 root bin l none /etc/rc0.d/K36hsqldb=/etc/init.d/hsqldb l none /etc/rc1.d/K36hsqldb=/etc/init.d/hsqldb l none /etc/rc2.d/S84hsqldb=/etc/init.d/hsqldb l none /etc/rcS.d/K36hsqldb=/etc/init.d/hsqldb f none $VERDIR/readme.solarispkg=build/packaging/pkg/readme.txt d none $VERDIR/data 0755 root bin d none $VERDIR/data/db1 2770 hsqldb hsqldb # Do NOT!!! change the following line. It is used by scripts. # REGENERATE AFTER HERE d none $VERDIR 0755 root bin d none $VERDIR/bin 0755 root bin f none $VERDIR/bin/runUtil.bat=bin/runUtil.bat 0755 root bin f none $VERDIR/bin/hsqldb=bin/hsqldb 0755 root bin f none $VERDIR/bin/runUtil.sh=bin/runUtil.sh 0755 root bin d none $VERDIR/doc 0755 root bin f none $VERDIR/doc/hsqldb_lic.txt=doc/hsqldb_lic.txt f none $VERDIR/doc/.cvsignore=doc/.cvsignore d none $VERDIR/doc/images 0755 root bin f none $VERDIR/doc/images/sqlOther.gif=doc/images/sqlOther.gif f none $VERDIR/doc/images/sqlDDL.gif=doc/images/sqlDDL.gif f none $VERDIR/doc/images/sqlDML.gif=doc/images/sqlDML.gif f none $VERDIR/doc/images/sqlSecurity.gif=doc/images/sqlSecurity.gif f none $VERDIR/doc/images/sqlSelect.gif=doc/images/sqlSelect.gif f none $VERDIR/doc/images/sqlTransact.gif=doc/images/sqlTransact.gif d none $VERDIR/doc/src 0755 root bin f none $VERDIR/doc/src/.cvsignore=doc/src/.cvsignore f none $VERDIR/doc/src/hsqldb.gif=doc/src/hsqldb.gif f none $VERDIR/doc/src/hsqldbstylesheet.css=doc/src/hsqldbstylesheet.css f none $VERDIR/doc/changelist_1_7_2.txt=doc/changelist_1_7_2.txt 0755 root bin f none $VERDIR/doc/changelist_1_7_3.txt=doc/changelist_1_7_3.txt 0755 root bin f none $VERDIR/doc/changelist_1_8_0.txt=doc/changelist_1_8_0.txt 0755 root bin f none $VERDIR/doc/changelog_1_7_1.txt=doc/changelog_1_7_1.txt 0755 root bin f none $VERDIR/doc/changelog_1_7_2.txt=doc/changelog_1_7_2.txt 0755 root bin f none $VERDIR/doc/changelog_1_8_0.txt=doc/changelog_1_8_0.txt 0755 root bin f none $VERDIR/doc/databaseinjar.txt=doc/databaseinjar.txt f none $VERDIR/doc/hsqlFindFile.html=doc/hsqlFindFile.html f none $VERDIR/doc/hsqlSoftwareLinks.html=doc/hsqlSoftwareLinks.html 0755 root bin f none $VERDIR/doc/hypersonic_lic.txt=doc/hypersonic_lic.txt f none $VERDIR/doc/readme_linux.txt=doc/readme_linux.txt 0755 root bin d none $VERDIR/doc/zaurus 0755 root bin f none $VERDIR/doc/zaurus/hsqlSyntax.html=doc/zaurus/hsqlSyntax.html f none $VERDIR/doc/zaurus/building.html=doc/zaurus/building.html f none $VERDIR/doc/zaurus/index.html=doc/zaurus/index.html f none $VERDIR/doc/zaurus/todo.html=doc/zaurus/todo.html f none $VERDIR/doc/zaurus/readme=doc/zaurus/readme d none $VERDIR/doc/zaurus/images 0755 root bin f none $VERDIR/doc/zaurus/images/constructors.gif=doc/zaurus/images/constructors.gif f none $VERDIR/doc/zaurus/images/buttons.png=doc/zaurus/images/buttons.png f none $VERDIR/doc/zaurus/images/commandBut.png=doc/zaurus/images/commandBut.png f none $VERDIR/doc/zaurus/images/constructor-index.gif=doc/zaurus/images/constructor-index.gif f none $VERDIR/doc/zaurus/images/editorBut.png=doc/zaurus/images/editorBut.png f none $VERDIR/doc/zaurus/images/green-ball-small.gif=doc/zaurus/images/green-ball-small.gif f none $VERDIR/doc/zaurus/images/green-ball.gif=doc/zaurus/images/green-ball.gif f none $VERDIR/doc/zaurus/images/hsqldb.gif=doc/zaurus/images/hsqldb.gif f none $VERDIR/doc/zaurus/images/method-index.gif=doc/zaurus/images/method-index.gif f none $VERDIR/doc/zaurus/images/methods.gif=doc/zaurus/images/methods.gif f none $VERDIR/doc/zaurus/images/nicksant3.gif=doc/zaurus/images/nicksant3.gif f none $VERDIR/doc/zaurus/images/red-ball-small.gif=doc/zaurus/images/red-ball-small.gif f none $VERDIR/doc/zaurus/images/red-ball.gif=doc/zaurus/images/red-ball.gif f none $VERDIR/doc/zaurus/images/red_up.gif=doc/zaurus/images/red_up.gif f none $VERDIR/doc/zaurus/images/resultBut.png=doc/zaurus/images/resultBut.png f none $VERDIR/doc/zaurus/images/sharp1.jpeg=doc/zaurus/images/sharp1.jpeg f none $VERDIR/doc/zaurus/images/sourceforge.gif=doc/zaurus/images/sourceforge.gif f none $VERDIR/doc/zaurus/images/sqlDDL.gif=doc/zaurus/images/sqlDDL.gif f none $VERDIR/doc/zaurus/images/sqlDML.gif=doc/zaurus/images/sqlDML.gif f none $VERDIR/doc/zaurus/images/sqlOther.gif=doc/zaurus/images/sqlOther.gif f none $VERDIR/doc/zaurus/images/sqlSecurity.gif=doc/zaurus/images/sqlSecurity.gif f none $VERDIR/doc/zaurus/images/sqlSelect.gif=doc/zaurus/images/sqlSelect.gif f none $VERDIR/doc/zaurus/images/sqlTransact.gif=doc/zaurus/images/sqlTransact.gif f none $VERDIR/doc/zaurus/images/treeBut.png=doc/zaurus/images/treeBut.png f none $VERDIR/doc/zaurus/images/yellow-ball-small.gif=doc/zaurus/images/yellow-ball-small.gif f none $VERDIR/doc/zaurus/images/yellow-ball.gif=doc/zaurus/images/yellow-ball.gif f none $VERDIR/doc/zaurus/images/zaurus.jpeg=doc/zaurus/images/zaurus.jpeg f none $VERDIR/doc/zaurus/installation.html=doc/zaurus/installation.html f none $VERDIR/doc/zaurus/org.hsqldb.util.ZaurusEditor.html=doc/zaurus/org.hsqldb.util.ZaurusEditor.html f none $VERDIR/doc/zaurus/usage.html=doc/zaurus/usage.html f none $VERDIR/.cvsignore=.cvsignore f none $VERDIR/index.html=index.html f none $VERDIR/readme.txt=readme.txt d none $VERDIR/build 0755 root bin f none $VERDIR/build/buildDoc.bat=build/buildDoc.bat 0755 root bin f none $VERDIR/build/.cvsignore=build/.cvsignore f none $VERDIR/build/build.xml=build/build.xml f none $VERDIR/build/readmebuild.txt=build/readmebuild.txt f none $VERDIR/build/buildJDK11.bat=build/buildJDK11.bat 0755 root bin f none $VERDIR/build/buildJDK12.bat=build/buildJDK12.bat 0755 root bin f none $VERDIR/build/buildJDK14.bat=build/buildJDK14.bat 0755 root bin f none $VERDIR/build/readmedocbook.txt=build/readmedocbook.txt f none $VERDIR/build/switchToJDK11.bat=build/switchToJDK11.bat 0755 root bin f none $VERDIR/build/switchToJDK12.bat=build/switchToJDK12.bat 0755 root bin f none $VERDIR/build/switchToJDK14.bat=build/switchToJDK14.bat 0755 root bin d none $VERDIR/build/templates 0755 root bin d none $VERDIR/build/templates/hsqldb-dev1 0755 root bin d none $VERDIR/build/templates/hsqldb-dev1/build 0755 root bin d none $VERDIR/build/templates/hsqldb-dev1/doc 0755 root bin d none $VERDIR/build/templates/hsqldb-dev1/src 0755 root bin d none $VERDIR/build/templates/hsqldb-dev1/src/org 0755 root bin d none $VERDIR/build/templates/hsqldb-dev1/src/org/hsqldb 0755 root bin d none $VERDIR/build/templates/hsqldb-dev1/src/org/hsqldb/index 0755 root bin d none $VERDIR/build/templates/hsqldb-dev1/src/org/hsqldb/jdbc 0755 root bin d none $VERDIR/build/templates/hsqldb-dev1/src/org/hsqldb/lib 0755 root bin d none $VERDIR/build/templates/hsqldb-dev1/src/org/hsqldb/persist 0755 root bin d none $VERDIR/build/templates/hsqldb-dev1/src/org/hsqldb/resources 0755 root bin d none $VERDIR/build/templates/hsqldb-dev1/src/org/hsqldb/rowio 0755 root bin d none $VERDIR/build/templates/hsqldb-dev1/src/org/hsqldb/sample 0755 root bin d none $VERDIR/build/templates/hsqldb-dev1/src/org/hsqldb/scriptio 0755 root bin d none $VERDIR/build/templates/hsqldb-dev1/src/org/hsqldb/store 0755 root bin d none $VERDIR/build/templates/hsqldb-dev1/src/org/hsqldb/test 0755 root bin d none $VERDIR/build/templates/hsqldb-dev1/src/org/hsqldb/types 0755 root bin d none $VERDIR/build/templates/hsqldb-dev1/src/org/hsqldb/util 0755 root bin d none $VERDIR/build/templates/hsqldb-dev2 0755 root bin d none $VERDIR/demo 0755 root bin f none $VERDIR/demo/runWebServer.sh=demo/runWebServer.sh 0755 root bin f none $VERDIR/demo/runUtil.sh=demo/runUtil.sh 0755 root bin f none $VERDIR/demo/localhost_clientserver.html=demo/localhost_clientserver.html f none $VERDIR/demo/memorydbmanager.html=demo/memorydbmanager.html f none $VERDIR/demo/memoryquery.html=demo/memoryquery.html f none $VERDIR/demo/runManager.bat=demo/runManager.bat 0755 root bin f none $VERDIR/demo/runManager.sh=demo/runManager.sh 0755 root bin f none $VERDIR/demo/runManagerSwing.bat=demo/runManagerSwing.bat 0755 root bin f none $VERDIR/demo/runServer.bat=demo/runServer.bat 0755 root bin f none $VERDIR/demo/runServer.sh=demo/runServer.sh 0755 root bin f none $VERDIR/demo/runUtil.bat=demo/runUtil.bat 0755 root bin f none $VERDIR/demo/runWebServer.bat=demo/runWebServer.bat 0755 root bin f none $VERDIR/demo/servletdemo.html=demo/servletdemo.html d none $VERDIR/devdoc 0755 root bin f none $VERDIR/devdoc/schemastrategy.txt=devdoc/schemastrategy.txt f none $VERDIR/devdoc/schemas.html=devdoc/schemas.html 0755 root bin d none $VERDIR/docsrc 0755 root bin d none $VERDIR/docsrc/guide 0755 root bin d none $VERDIR/docsrc/guide/navicons 0755 root bin f none $VERDIR/docsrc/guide/navicons/home.gif=docsrc/guide/navicons/home.gif f none $VERDIR/docsrc/guide/navicons/next.gif=docsrc/guide/navicons/next.gif f none $VERDIR/docsrc/guide/navicons/prev.gif=docsrc/guide/navicons/prev.gif f none $VERDIR/docsrc/guide/navicons/up.gif=docsrc/guide/navicons/up.gif f none $VERDIR/docsrc/guide/advancedtopics.xml=docsrc/guide/advancedtopics.xml f none $VERDIR/docsrc/guide/building.xml=docsrc/guide/building.xml f none $VERDIR/docsrc/guide/dbfiles.xml=docsrc/guide/dbfiles.xml f none $VERDIR/docsrc/guide/dbmanager.xml=docsrc/guide/dbmanager.xml f none $VERDIR/docsrc/guide/deployment.xml=docsrc/guide/deployment.xml 0755 root bin f none $VERDIR/docsrc/guide/guide.css=docsrc/guide/guide.css f none $VERDIR/docsrc/guide/guide.xml=docsrc/guide/guide.xml f none $VERDIR/docsrc/guide/openoffice.xml=docsrc/guide/openoffice.xml 0755 root bin f none $VERDIR/docsrc/guide/running.xml=docsrc/guide/running.xml f none $VERDIR/docsrc/guide/sqlissues.xml=docsrc/guide/sqlissues.xml 0755 root bin f none $VERDIR/docsrc/guide/sqlsyntax.xml=docsrc/guide/sqlsyntax.xml f none $VERDIR/docsrc/guide/sqltool.xml=docsrc/guide/sqltool.xml f none $VERDIR/docsrc/guide/testutility.xml=docsrc/guide/testutility.xml f none $VERDIR/docsrc/guide/texttables.xml=docsrc/guide/texttables.xml f none $VERDIR/docsrc/guide/tls.xml=docsrc/guide/tls.xml f none $VERDIR/docsrc/guide/transfertool.xml=docsrc/guide/transfertool.xml f none $VERDIR/docsrc/guide/unix.xml=docsrc/guide/unix.xml d none $VERDIR/docsrc/sqltool 0755 root bin f none $VERDIR/docsrc/formats-section.xml=docsrc/formats-section.xml f none $VERDIR/docsrc/readme-docauthors.txt=docsrc/readme-docauthors.txt d none $VERDIR/lib 0755 root bin f none $VERDIR/lib/servlet.jar=lib/servlet.jar f none $VERDIR/lib/.cvsignore=lib/.cvsignore f none $VERDIR/lib/functions=lib/functions 0755 root bin f none $VERDIR/lib/hsqldb.jar=lib/hsqldb.jar d none $VERDIR/src 0755 root bin d none $VERDIR/src/org 0755 root bin d none $VERDIR/src/org/hsqldb 0755 root bin f none $VERDIR/src/org/hsqldb/DatabaseScript.java=src/org/hsqldb/DatabaseScript.java f none $VERDIR/src/org/hsqldb/BaseMemoryNode.java=src/org/hsqldb/BaseMemoryNode.java f none $VERDIR/src/org/hsqldb/BaseTable.java=src/org/hsqldb/BaseTable.java 0755 root bin f none $VERDIR/src/org/hsqldb/CachedDataRow.java=src/org/hsqldb/CachedDataRow.java f none $VERDIR/src/org/hsqldb/CachedRow.java=src/org/hsqldb/CachedRow.java f none $VERDIR/src/org/hsqldb/Collation.java=src/org/hsqldb/Collation.java 0755 root bin f none $VERDIR/src/org/hsqldb/Column.java=src/org/hsqldb/Column.java f none $VERDIR/src/org/hsqldb/CompiledStatement.java=src/org/hsqldb/CompiledStatement.java f none $VERDIR/src/org/hsqldb/Constraint.java=src/org/hsqldb/Constraint.java f none $VERDIR/src/org/hsqldb/DITypeInfo.java=src/org/hsqldb/DITypeInfo.java f none $VERDIR/src/org/hsqldb/CompiledStatementExecutor.java=src/org/hsqldb/CompiledStatementExecutor.java f none $VERDIR/src/org/hsqldb/CompiledStatementManager.java=src/org/hsqldb/CompiledStatementManager.java 0755 root bin f none $VERDIR/src/org/hsqldb/ConstraintCore.java=src/org/hsqldb/ConstraintCore.java f none $VERDIR/src/org/hsqldb/DINameSpace.java=src/org/hsqldb/DINameSpace.java f none $VERDIR/src/org/hsqldb/DIProcedureInfo.java=src/org/hsqldb/DIProcedureInfo.java f none $VERDIR/src/org/hsqldb/DITableInfo.java=src/org/hsqldb/DITableInfo.java f none $VERDIR/src/org/hsqldb/Database.java=src/org/hsqldb/Database.java f none $VERDIR/src/org/hsqldb/DatabaseCommandInterpreter.java=src/org/hsqldb/DatabaseCommandInterpreter.java f none $VERDIR/src/org/hsqldb/DatabaseInformation.java=src/org/hsqldb/DatabaseInformation.java f none $VERDIR/src/org/hsqldb/DatabaseInformationFull.java=src/org/hsqldb/DatabaseInformationFull.java f none $VERDIR/src/org/hsqldb/DatabaseInformationMain.java=src/org/hsqldb/DatabaseInformationMain.java f none $VERDIR/src/org/hsqldb/DatabaseManager.java=src/org/hsqldb/DatabaseManager.java 0755 root bin f none $VERDIR/src/org/hsqldb/DatabaseObjectNames.java=src/org/hsqldb/DatabaseObjectNames.java f none $VERDIR/src/org/hsqldb/DatabaseURL.java=src/org/hsqldb/DatabaseURL.java 0755 root bin f none $VERDIR/src/org/hsqldb/DiskNode.java=src/org/hsqldb/DiskNode.java f none $VERDIR/src/org/hsqldb/Expression.java=src/org/hsqldb/Expression.java f none $VERDIR/src/org/hsqldb/Function.java=src/org/hsqldb/Function.java f none $VERDIR/src/org/hsqldb/GrantConstants.java=src/org/hsqldb/GrantConstants.java 0755 root bin f none $VERDIR/src/org/hsqldb/Grantee.java=src/org/hsqldb/Grantee.java 0755 root bin f none $VERDIR/src/org/hsqldb/GranteeManager.java=src/org/hsqldb/GranteeManager.java 0755 root bin f none $VERDIR/src/org/hsqldb/GroupedResult.java=src/org/hsqldb/GroupedResult.java f none $VERDIR/src/org/hsqldb/HSQLClientConnection.java=src/org/hsqldb/HSQLClientConnection.java 0755 root bin f none $VERDIR/src/org/hsqldb/Library.java=src/org/hsqldb/Library.java f none $VERDIR/src/org/hsqldb/Index.java=src/org/hsqldb/Index.java f none $VERDIR/src/org/hsqldb/HTTPClientConnection.java=src/org/hsqldb/HTTPClientConnection.java 0755 root bin f none $VERDIR/src/org/hsqldb/HsqlDateTime.java=src/org/hsqldb/HsqlDateTime.java f none $VERDIR/src/org/hsqldb/HsqlException.java=src/org/hsqldb/HsqlException.java 0755 root bin f none $VERDIR/src/org/hsqldb/HsqlInternalException.java=src/org/hsqldb/HsqlInternalException.java 0755 root bin f none $VERDIR/src/org/hsqldb/HsqlNameManager.java=src/org/hsqldb/HsqlNameManager.java 0755 root bin f none $VERDIR/src/org/hsqldb/HsqlServerFactory.java=src/org/hsqldb/HsqlServerFactory.java f none $VERDIR/src/org/hsqldb/HsqlSocketFactory.java=src/org/hsqldb/HsqlSocketFactory.java 0755 root bin f none $VERDIR/src/org/hsqldb/HsqlSocketFactorySecure.java=src/org/hsqldb/HsqlSocketFactorySecure.java 0755 root bin f none $VERDIR/src/org/hsqldb/HsqlSocketRequestHandler.java=src/org/hsqldb/HsqlSocketRequestHandler.java f none $VERDIR/src/org/hsqldb/MemoryNode.java=src/org/hsqldb/MemoryNode.java f none $VERDIR/src/org/hsqldb/Like.java=src/org/hsqldb/Like.java f none $VERDIR/src/org/hsqldb/Parser.java=src/org/hsqldb/Parser.java f none $VERDIR/src/org/hsqldb/Node.java=src/org/hsqldb/Node.java f none $VERDIR/src/org/hsqldb/ResultBase.java=src/org/hsqldb/ResultBase.java 0755 root bin f none $VERDIR/src/org/hsqldb/NumberSequence.java=src/org/hsqldb/NumberSequence.java 0755 root bin f none $VERDIR/src/org/hsqldb/PointerNode.java=src/org/hsqldb/PointerNode.java f none $VERDIR/src/org/hsqldb/Record.java=src/org/hsqldb/Record.java f none $VERDIR/src/org/hsqldb/Result.java=src/org/hsqldb/Result.java f none $VERDIR/src/org/hsqldb/ServerConfiguration.java=src/org/hsqldb/ServerConfiguration.java 0755 root bin f none $VERDIR/src/org/hsqldb/ResultConstants.java=src/org/hsqldb/ResultConstants.java 0755 root bin f none $VERDIR/src/org/hsqldb/Row.java=src/org/hsqldb/Row.java f none $VERDIR/src/org/hsqldb/SchemaManager.java=src/org/hsqldb/SchemaManager.java 0755 root bin f none $VERDIR/src/org/hsqldb/Select.java=src/org/hsqldb/Select.java f none $VERDIR/src/org/hsqldb/SequenceManager.java=src/org/hsqldb/SequenceManager.java 0755 root bin f none $VERDIR/src/org/hsqldb/Server.java=src/org/hsqldb/Server.java f none $VERDIR/src/org/hsqldb/ServerConnection.java=src/org/hsqldb/ServerConnection.java f none $VERDIR/src/org/hsqldb/ServerConstants.java=src/org/hsqldb/ServerConstants.java 0755 root bin f none $VERDIR/src/org/hsqldb/Servlet.java=src/org/hsqldb/Servlet.java f none $VERDIR/src/org/hsqldb/Session.java=src/org/hsqldb/Session.java f none $VERDIR/src/org/hsqldb/SessionInterface.java=src/org/hsqldb/SessionInterface.java 0755 root bin f none $VERDIR/src/org/hsqldb/SessionManager.java=src/org/hsqldb/SessionManager.java f none $VERDIR/src/org/hsqldb/SetFunction.java=src/org/hsqldb/SetFunction.java 0755 root bin f none $VERDIR/src/org/hsqldb/SubQuery.java=src/org/hsqldb/SubQuery.java 0755 root bin f none $VERDIR/src/org/hsqldb/Table.java=src/org/hsqldb/Table.java f none $VERDIR/src/org/hsqldb/TableFilter.java=src/org/hsqldb/TableFilter.java f none $VERDIR/src/org/hsqldb/TriggerDef.java=src/org/hsqldb/TriggerDef.java f none $VERDIR/src/org/hsqldb/Trigger.java=src/org/hsqldb/Trigger.java f none $VERDIR/src/org/hsqldb/TableWorks.java=src/org/hsqldb/TableWorks.java f none $VERDIR/src/org/hsqldb/TextTable.java=src/org/hsqldb/TextTable.java f none $VERDIR/src/org/hsqldb/Token.java=src/org/hsqldb/Token.java f none $VERDIR/src/org/hsqldb/Tokenizer.java=src/org/hsqldb/Tokenizer.java f none $VERDIR/src/org/hsqldb/Trace.java=src/org/hsqldb/Trace.java f none $VERDIR/src/org/hsqldb/Transaction.java=src/org/hsqldb/Transaction.java f none $VERDIR/src/org/hsqldb/TransactionManager.java=src/org/hsqldb/TransactionManager.java 0755 root bin f none $VERDIR/src/org/hsqldb/Types.java=src/org/hsqldb/Types.java 0755 root bin f none $VERDIR/src/org/hsqldb/User.java=src/org/hsqldb/User.java f none $VERDIR/src/org/hsqldb/View.java=src/org/hsqldb/View.java f none $VERDIR/src/org/hsqldb/WebServerConnection.java=src/org/hsqldb/WebServerConnection.java f none $VERDIR/src/org/hsqldb/UserManager.java=src/org/hsqldb/UserManager.java f none $VERDIR/src/org/hsqldb/WebServer.java=src/org/hsqldb/WebServer.java d none $VERDIR/src/org/hsqldb/index 0755 root bin f none $VERDIR/src/org/hsqldb/index/RowIterator.java=src/org/hsqldb/index/RowIterator.java 0755 root bin d none $VERDIR/src/org/hsqldb/jdbc 0755 root bin f none $VERDIR/src/org/hsqldb/jdbc/jdbcBlob.java=src/org/hsqldb/jdbc/jdbcBlob.java 0755 root bin f none $VERDIR/src/org/hsqldb/jdbc/Util.java=src/org/hsqldb/jdbc/Util.java 0755 root bin f none $VERDIR/src/org/hsqldb/jdbc/jdbcCallableStatement.java=src/org/hsqldb/jdbc/jdbcCallableStatement.java 0755 root bin f none $VERDIR/src/org/hsqldb/jdbc/jdbcClob.java=src/org/hsqldb/jdbc/jdbcClob.java 0755 root bin f none $VERDIR/src/org/hsqldb/jdbc/jdbcColumnMetaData.java=src/org/hsqldb/jdbc/jdbcColumnMetaData.java 0755 root bin f none $VERDIR/src/org/hsqldb/jdbc/jdbcConnection.java=src/org/hsqldb/jdbc/jdbcConnection.java 0755 root bin f none $VERDIR/src/org/hsqldb/jdbc/jdbcDataSource.java=src/org/hsqldb/jdbc/jdbcDataSource.java 0755 root bin f none $VERDIR/src/org/hsqldb/jdbc/jdbcDataSourceFactory.java=src/org/hsqldb/jdbc/jdbcDataSourceFactory.java 0755 root bin f none $VERDIR/src/org/hsqldb/jdbc/jdbcDatabaseMetaData.java=src/org/hsqldb/jdbc/jdbcDatabaseMetaData.java 0755 root bin f none $VERDIR/src/org/hsqldb/jdbc/jdbcParameterMetaData.java=src/org/hsqldb/jdbc/jdbcParameterMetaData.java 0755 root bin f none $VERDIR/src/org/hsqldb/jdbc/jdbcPreparedStatement.java=src/org/hsqldb/jdbc/jdbcPreparedStatement.java 0755 root bin f none $VERDIR/src/org/hsqldb/jdbc/jdbcResultSet.java=src/org/hsqldb/jdbc/jdbcResultSet.java 0755 root bin f none $VERDIR/src/org/hsqldb/jdbc/jdbcResultSetMetaData.java=src/org/hsqldb/jdbc/jdbcResultSetMetaData.java 0755 root bin f none $VERDIR/src/org/hsqldb/jdbc/jdbcSavepoint.java=src/org/hsqldb/jdbc/jdbcSavepoint.java 0755 root bin f none $VERDIR/src/org/hsqldb/jdbc/jdbcStatement.java=src/org/hsqldb/jdbc/jdbcStatement.java 0755 root bin f none $VERDIR/src/org/hsqldb/jdbc/jdbcStubs.java=src/org/hsqldb/jdbc/jdbcStubs.java 0755 root bin f none $VERDIR/src/org/hsqldb/jdbcDriver.java=src/org/hsqldb/jdbcDriver.java d none $VERDIR/src/org/hsqldb/lib 0755 root bin f none $VERDIR/src/org/hsqldb/lib/ArrayCounter.java=src/org/hsqldb/lib/ArrayCounter.java 0755 root bin f none $VERDIR/src/org/hsqldb/lib/ArrayUtil.java=src/org/hsqldb/lib/ArrayUtil.java f none $VERDIR/src/org/hsqldb/lib/BaseList.java=src/org/hsqldb/lib/BaseList.java 0755 root bin f none $VERDIR/src/org/hsqldb/lib/HashMappedList.java=src/org/hsqldb/lib/HashMappedList.java 0755 root bin f none $VERDIR/src/org/hsqldb/lib/FileUtil.java=src/org/hsqldb/lib/FileUtil.java f none $VERDIR/src/org/hsqldb/lib/AsciiStringInputStream.java=src/org/hsqldb/lib/AsciiStringInputStream.java f none $VERDIR/src/org/hsqldb/lib/BooleanConverter.java=src/org/hsqldb/lib/BooleanConverter.java 0755 root bin f none $VERDIR/src/org/hsqldb/lib/Collection.java=src/org/hsqldb/lib/Collection.java 0755 root bin f none $VERDIR/src/org/hsqldb/lib/DoubleIntIndex.java=src/org/hsqldb/lib/DoubleIntIndex.java 0755 root bin f none $VERDIR/src/org/hsqldb/lib/FileAccess.java=src/org/hsqldb/lib/FileAccess.java 0755 root bin f none $VERDIR/src/org/hsqldb/lib/HashMap.java=src/org/hsqldb/lib/HashMap.java 0755 root bin f none $VERDIR/src/org/hsqldb/lib/HsqlArrayHeap.java=src/org/hsqldb/lib/HsqlArrayHeap.java f none $VERDIR/src/org/hsqldb/lib/HashSet.java=src/org/hsqldb/lib/HashSet.java 0755 root bin f none $VERDIR/src/org/hsqldb/lib/HsqlArrayList.java=src/org/hsqldb/lib/HsqlArrayList.java f none $VERDIR/src/org/hsqldb/lib/MD5.java=src/org/hsqldb/lib/MD5.java 0755 root bin f none $VERDIR/src/org/hsqldb/lib/HsqlByteArrayInputStream.java=src/org/hsqldb/lib/HsqlByteArrayInputStream.java d none $VERDIR/src/org/hsqldb/lib/enum 0755 root bin d none $VERDIR/src/org/hsqldb/lib/java 0755 root bin f none $VERDIR/src/org/hsqldb/lib/java/JavaSystem.java=src/org/hsqldb/lib/java/JavaSystem.java 0755 root bin f none $VERDIR/src/org/hsqldb/lib/HsqlByteArrayOutputStream.java=src/org/hsqldb/lib/HsqlByteArrayOutputStream.java f none $VERDIR/src/org/hsqldb/lib/HsqlDeque.java=src/org/hsqldb/lib/HsqlDeque.java f none $VERDIR/src/org/hsqldb/lib/HsqlHeap.java=src/org/hsqldb/lib/HsqlHeap.java f none $VERDIR/src/org/hsqldb/lib/HsqlLinkedList.java=src/org/hsqldb/lib/HsqlLinkedList.java f none $VERDIR/src/org/hsqldb/lib/HsqlList.java=src/org/hsqldb/lib/HsqlList.java f none $VERDIR/src/org/hsqldb/lib/HsqlTaskQueue.java=src/org/hsqldb/lib/HsqlTaskQueue.java 0755 root bin f none $VERDIR/src/org/hsqldb/lib/HsqlThreadFactory.java=src/org/hsqldb/lib/HsqlThreadFactory.java f none $VERDIR/src/org/hsqldb/lib/HsqlTimer.java=src/org/hsqldb/lib/HsqlTimer.java f none $VERDIR/src/org/hsqldb/lib/InOutUtil.java=src/org/hsqldb/lib/InOutUtil.java 0755 root bin f none $VERDIR/src/org/hsqldb/lib/IntKeyHashMap.java=src/org/hsqldb/lib/IntKeyHashMap.java 0755 root bin f none $VERDIR/src/org/hsqldb/lib/IntKeyIntValueHashMap.java=src/org/hsqldb/lib/IntKeyIntValueHashMap.java 0755 root bin f none $VERDIR/src/org/hsqldb/lib/IntKeyLongValueHashMap.java=src/org/hsqldb/lib/IntKeyLongValueHashMap.java 0755 root bin f none $VERDIR/src/org/hsqldb/lib/IntLookup.java=src/org/hsqldb/lib/IntLookup.java 0755 root bin f none $VERDIR/src/org/hsqldb/lib/IntValueHashMap.java=src/org/hsqldb/lib/IntValueHashMap.java 0755 root bin f none $VERDIR/src/org/hsqldb/lib/Iterator.java=src/org/hsqldb/lib/Iterator.java 0755 root bin f none $VERDIR/src/org/hsqldb/lib/LongKeyIntValueHashMap.java=src/org/hsqldb/lib/LongKeyIntValueHashMap.java 0755 root bin f none $VERDIR/src/org/hsqldb/lib/ObjectComparator.java=src/org/hsqldb/lib/ObjectComparator.java f none $VERDIR/src/org/hsqldb/lib/Set.java=src/org/hsqldb/lib/Set.java 0755 root bin f none $VERDIR/src/org/hsqldb/lib/SimpleLog.java=src/org/hsqldb/lib/SimpleLog.java 0755 root bin f none $VERDIR/src/org/hsqldb/lib/Sort.java=src/org/hsqldb/lib/Sort.java 0755 root bin f none $VERDIR/src/org/hsqldb/lib/StopWatch.java=src/org/hsqldb/lib/StopWatch.java f none $VERDIR/src/org/hsqldb/lib/Storage.java=src/org/hsqldb/lib/Storage.java 0755 root bin f none $VERDIR/src/org/hsqldb/lib/StringConverter.java=src/org/hsqldb/lib/StringConverter.java f none $VERDIR/src/org/hsqldb/lib/StringInputStream.java=src/org/hsqldb/lib/StringInputStream.java f none $VERDIR/src/org/hsqldb/lib/StringUtil.java=src/org/hsqldb/lib/StringUtil.java f none $VERDIR/src/org/hsqldb/lib/ThreadFactory.java=src/org/hsqldb/lib/ThreadFactory.java f none $VERDIR/src/org/hsqldb/lib/WrapperIterator.java=src/org/hsqldb/lib/WrapperIterator.java 0755 root bin f none $VERDIR/src/org/hsqldb/lib/ZipUnzipFile.java=src/org/hsqldb/lib/ZipUnzipFile.java 0755 root bin d none $VERDIR/src/org/hsqldb/persist 0755 root bin f none $VERDIR/src/org/hsqldb/persist/Cache.java=src/org/hsqldb/persist/Cache.java 0755 root bin f none $VERDIR/src/org/hsqldb/persist/LockFile.java=src/org/hsqldb/persist/LockFile.java 0755 root bin f none $VERDIR/src/org/hsqldb/persist/NIOScaledRAFile.java=src/org/hsqldb/persist/NIOScaledRAFile.java 0755 root bin f none $VERDIR/src/org/hsqldb/persist/CachedObject.java=src/org/hsqldb/persist/CachedObject.java 0755 root bin f none $VERDIR/src/org/hsqldb/persist/DataFileBlockManager.java=src/org/hsqldb/persist/DataFileBlockManager.java 0755 root bin f none $VERDIR/src/org/hsqldb/persist/DataFileCache.java=src/org/hsqldb/persist/DataFileCache.java 0755 root bin f none $VERDIR/src/org/hsqldb/persist/DataFileDefrag.java=src/org/hsqldb/persist/DataFileDefrag.java 0755 root bin f none $VERDIR/src/org/hsqldb/persist/HsqlDatabaseProperties.java=src/org/hsqldb/persist/HsqlDatabaseProperties.java 0755 root bin f none $VERDIR/src/org/hsqldb/persist/HsqlProperties.java=src/org/hsqldb/persist/HsqlProperties.java 0755 root bin f none $VERDIR/src/org/hsqldb/persist/Log.java=src/org/hsqldb/persist/Log.java 0755 root bin f none $VERDIR/src/org/hsqldb/persist/Logger.java=src/org/hsqldb/persist/Logger.java 0755 root bin f none $VERDIR/src/org/hsqldb/persist/NIOLockFile.java=src/org/hsqldb/persist/NIOLockFile.java 0755 root bin f none $VERDIR/src/org/hsqldb/persist/PersistentStore.java=src/org/hsqldb/persist/PersistentStore.java 0755 root bin f none $VERDIR/src/org/hsqldb/persist/ScaledRAFile.java=src/org/hsqldb/persist/ScaledRAFile.java 0755 root bin f none $VERDIR/src/org/hsqldb/persist/ScaledRAFileInJar.java=src/org/hsqldb/persist/ScaledRAFileInJar.java 0755 root bin f none $VERDIR/src/org/hsqldb/persist/ScriptRunner.java=src/org/hsqldb/persist/ScriptRunner.java 0755 root bin f none $VERDIR/src/org/hsqldb/persist/TextCache.java=src/org/hsqldb/persist/TextCache.java 0755 root bin d none $VERDIR/src/org/hsqldb/resources 0755 root bin f none $VERDIR/src/org/hsqldb/resources/BundleHandler.java=src/org/hsqldb/resources/BundleHandler.java f none $VERDIR/src/org/hsqldb/resources/webserver.properties=src/org/hsqldb/resources/webserver.properties 0755 root bin f none $VERDIR/src/org/hsqldb/resources/column-remarks.properties=src/org/hsqldb/resources/column-remarks.properties f none $VERDIR/src/org/hsqldb/resources/content-types.properties=src/org/hsqldb/resources/content-types.properties f none $VERDIR/src/org/hsqldb/resources/data-type-create-parameters.properties=src/org/hsqldb/resources/data-type-create-parameters.properties f none $VERDIR/src/org/hsqldb/resources/data-type-names.properties=src/org/hsqldb/resources/data-type-names.properties f none $VERDIR/src/org/hsqldb/resources/data-type-remarks.properties=src/org/hsqldb/resources/data-type-remarks.properties f none $VERDIR/src/org/hsqldb/resources/java_lang_Math.properties=src/org/hsqldb/resources/java_lang_Math.properties f none $VERDIR/src/org/hsqldb/resources/org_hsqldb_DatabaseClassLoader.properties=src/org/hsqldb/resources/org_hsqldb_DatabaseClassLoader.properties f none $VERDIR/src/org/hsqldb/resources/org_hsqldb_Library.properties=src/org/hsqldb/resources/org_hsqldb_Library.properties f none $VERDIR/src/org/hsqldb/resources/org_hsqldb_Server_messages.properties=src/org/hsqldb/resources/org_hsqldb_Server_messages.properties 0755 root bin f none $VERDIR/src/org/hsqldb/resources/sql-error-messages.properties=src/org/hsqldb/resources/sql-error-messages.properties 0755 root bin f none $VERDIR/src/org/hsqldb/resources/sql-error-messages_it.properties=src/org/hsqldb/resources/sql-error-messages_it.properties 0755 root bin f none $VERDIR/src/org/hsqldb/resources/table-remarks.properties=src/org/hsqldb/resources/table-remarks.properties d none $VERDIR/src/org/hsqldb/rowio 0755 root bin f none $VERDIR/src/org/hsqldb/rowio/RowInputBinary.java=src/org/hsqldb/rowio/RowInputBinary.java 0755 root bin f none $VERDIR/src/org/hsqldb/rowio/RowInputBase.java=src/org/hsqldb/rowio/RowInputBase.java 0755 root bin f none $VERDIR/src/org/hsqldb/rowio/RowInputInterface.java=src/org/hsqldb/rowio/RowInputInterface.java 0755 root bin f none $VERDIR/src/org/hsqldb/rowio/RowInputText.java=src/org/hsqldb/rowio/RowInputText.java 0755 root bin f none $VERDIR/src/org/hsqldb/rowio/RowInputTextLog.java=src/org/hsqldb/rowio/RowInputTextLog.java 0755 root bin f none $VERDIR/src/org/hsqldb/rowio/RowInputTextQuoted.java=src/org/hsqldb/rowio/RowInputTextQuoted.java 0755 root bin f none $VERDIR/src/org/hsqldb/rowio/RowOutputBase.java=src/org/hsqldb/rowio/RowOutputBase.java 0755 root bin f none $VERDIR/src/org/hsqldb/rowio/RowOutputBinary.java=src/org/hsqldb/rowio/RowOutputBinary.java 0755 root bin f none $VERDIR/src/org/hsqldb/rowio/RowOutputInterface.java=src/org/hsqldb/rowio/RowOutputInterface.java 0755 root bin f none $VERDIR/src/org/hsqldb/rowio/RowOutputText.java=src/org/hsqldb/rowio/RowOutputText.java 0755 root bin f none $VERDIR/src/org/hsqldb/rowio/RowOutputTextLog.java=src/org/hsqldb/rowio/RowOutputTextLog.java 0755 root bin f none $VERDIR/src/org/hsqldb/rowio/RowOutputTextQuoted.java=src/org/hsqldb/rowio/RowOutputTextQuoted.java 0755 root bin d none $VERDIR/src/org/hsqldb/sample 0755 root bin f none $VERDIR/src/org/hsqldb/sample/pl.sql=src/org/hsqldb/sample/pl.sql f none $VERDIR/src/org/hsqldb/sample/ConnectionTypesSample.java=src/org/hsqldb/sample/ConnectionTypesSample.java f none $VERDIR/src/org/hsqldb/sample/DatabaseManagerSample.java=src/org/hsqldb/sample/DatabaseManagerSample.java f none $VERDIR/src/org/hsqldb/sample/FindFile.java=src/org/hsqldb/sample/FindFile.java f none $VERDIR/src/org/hsqldb/sample/StartupParameters.plist=src/org/hsqldb/sample/StartupParameters.plist f none $VERDIR/src/org/hsqldb/sample/Testdb.java=src/org/hsqldb/sample/Testdb.java f none $VERDIR/src/org/hsqldb/sample/TriggerSample.java=src/org/hsqldb/sample/TriggerSample.java f none $VERDIR/src/org/hsqldb/sample/load_binding_lu.sql=src/org/hsqldb/sample/load_binding_lu.sql f none $VERDIR/src/org/hsqldb/sample/plsql.sql=src/org/hsqldb/sample/plsql.sql f none $VERDIR/src/org/hsqldb/sample/sample.sql=src/org/hsqldb/sample/sample.sql f none $VERDIR/src/org/hsqldb/sample/sample-hsqldb.cfg=src/org/hsqldb/sample/sample-hsqldb.cfg f none $VERDIR/src/org/hsqldb/sample/sample-server.properties=src/org/hsqldb/sample/sample-server.properties f none $VERDIR/src/org/hsqldb/sample/sampledata.sql=src/org/hsqldb/sample/sampledata.sql f none $VERDIR/src/org/hsqldb/sample/sqltool.rc=src/org/hsqldb/sample/sqltool.rc d none $VERDIR/src/org/hsqldb/scriptio 0755 root bin f none $VERDIR/src/org/hsqldb/scriptio/ScriptReaderBinary.java=src/org/hsqldb/scriptio/ScriptReaderBinary.java 0755 root bin f none $VERDIR/src/org/hsqldb/scriptio/ScriptReaderBase.java=src/org/hsqldb/scriptio/ScriptReaderBase.java 0755 root bin f none $VERDIR/src/org/hsqldb/scriptio/ScriptReaderText.java=src/org/hsqldb/scriptio/ScriptReaderText.java 0755 root bin f none $VERDIR/src/org/hsqldb/scriptio/ScriptReaderZipped.java=src/org/hsqldb/scriptio/ScriptReaderZipped.java 0755 root bin f none $VERDIR/src/org/hsqldb/scriptio/ScriptWriterBase.java=src/org/hsqldb/scriptio/ScriptWriterBase.java 0755 root bin f none $VERDIR/src/org/hsqldb/scriptio/ScriptWriterBinary.java=src/org/hsqldb/scriptio/ScriptWriterBinary.java 0755 root bin f none $VERDIR/src/org/hsqldb/scriptio/ScriptWriterText.java=src/org/hsqldb/scriptio/ScriptWriterText.java 0755 root bin f none $VERDIR/src/org/hsqldb/scriptio/ScriptWriterZipped.java=src/org/hsqldb/scriptio/ScriptWriterZipped.java 0755 root bin d none $VERDIR/src/org/hsqldb/store 0755 root bin f none $VERDIR/src/org/hsqldb/store/ObjectCacheHashMap.java=src/org/hsqldb/store/ObjectCacheHashMap.java 0755 root bin f none $VERDIR/src/org/hsqldb/store/BaseHashMap.java=src/org/hsqldb/store/BaseHashMap.java 0755 root bin f none $VERDIR/src/org/hsqldb/store/BitMap.java=src/org/hsqldb/store/BitMap.java 0755 root bin f none $VERDIR/src/org/hsqldb/store/HashIndex.java=src/org/hsqldb/store/HashIndex.java 0755 root bin f none $VERDIR/src/org/hsqldb/store/ValuePool.java=src/org/hsqldb/store/ValuePool.java 0755 root bin f none $VERDIR/src/org/hsqldb/store/ValuePoolHashMap.java=src/org/hsqldb/store/ValuePoolHashMap.java 0755 root bin d none $VERDIR/src/org/hsqldb/test 0755 root bin f none $VERDIR/src/org/hsqldb/test/ClearTests.java=src/org/hsqldb/test/ClearTests.java 0755 root bin f none $VERDIR/src/org/hsqldb/test/AllTests.java=src/org/hsqldb/test/AllTests.java 0755 root bin f none $VERDIR/src/org/hsqldb/test/TestBatchExecution.java=src/org/hsqldb/test/TestBatchExecution.java 0755 root bin f none $VERDIR/src/org/hsqldb/test/ExecHarness.java=src/org/hsqldb/test/ExecHarness.java 0755 root bin f none $VERDIR/src/org/hsqldb/test/JDBCBench.java=src/org/hsqldb/test/JDBCBench.java f none $VERDIR/src/org/hsqldb/test/SqlToolHarness.java=src/org/hsqldb/test/SqlToolHarness.java 0755 root bin f none $VERDIR/src/org/hsqldb/test/TestAll.java=src/org/hsqldb/test/TestAll.java f none $VERDIR/src/org/hsqldb/test/TestAllTypes.java=src/org/hsqldb/test/TestAllTypes.java 0755 root bin f none $VERDIR/src/org/hsqldb/test/TestBase.java=src/org/hsqldb/test/TestBase.java 0755 root bin f none $VERDIR/src/org/hsqldb/test/TestBatchBug.java=src/org/hsqldb/test/TestBatchBug.java 0755 root bin f none $VERDIR/src/org/hsqldb/test/TestBug778213.java=src/org/hsqldb/test/TestBug778213.java 0755 root bin f none $VERDIR/src/org/hsqldb/test/TestBug785429.java=src/org/hsqldb/test/TestBug785429.java 0755 root bin f none $VERDIR/src/org/hsqldb/test/TestBug808460.java=src/org/hsqldb/test/TestBug808460.java 0755 root bin f none $VERDIR/src/org/hsqldb/test/TestBugBase.java=src/org/hsqldb/test/TestBugBase.java 0755 root bin f none $VERDIR/src/org/hsqldb/test/TestCacheSize.java=src/org/hsqldb/test/TestCacheSize.java f none $VERDIR/src/org/hsqldb/test/TestCascade.java=src/org/hsqldb/test/TestCascade.java f none $VERDIR/src/org/hsqldb/test/TestLikePredicateOptimizations.java=src/org/hsqldb/test/TestLikePredicateOptimizations.java 0755 root bin f none $VERDIR/src/org/hsqldb/test/TestCollation.java=src/org/hsqldb/test/TestCollation.java 0755 root bin f none $VERDIR/src/org/hsqldb/test/TestDataStructures.java=src/org/hsqldb/test/TestDataStructures.java f none $VERDIR/src/org/hsqldb/test/TestDatabaseMetaData.java=src/org/hsqldb/test/TestDatabaseMetaData.java 0755 root bin f none $VERDIR/src/org/hsqldb/test/TestDateTime.java=src/org/hsqldb/test/TestDateTime.java 0755 root bin f none $VERDIR/src/org/hsqldb/test/TestGroupByHaving.java=src/org/hsqldb/test/TestGroupByHaving.java f none $VERDIR/src/org/hsqldb/test/TestHashStructures.java=src/org/hsqldb/test/TestHashStructures.java 0755 root bin f none $VERDIR/src/org/hsqldb/test/TestInstantiation.java=src/org/hsqldb/test/TestInstantiation.java f none $VERDIR/src/org/hsqldb/test/TestJDBCSavepoints.java=src/org/hsqldb/test/TestJDBCSavepoints.java 0755 root bin f none $VERDIR/src/org/hsqldb/test/TestINPredicateParameterizationAndCorrelation.java=src/org/hsqldb/test/TestINPredicateParameterizationAndCorrelation.java 0755 root bin f none $VERDIR/src/org/hsqldb/test/TestLibSpeed.java=src/org/hsqldb/test/TestLibSpeed.java f none $VERDIR/src/org/hsqldb/test/TestMultipleConnections.java=src/org/hsqldb/test/TestMultipleConnections.java f none $VERDIR/src/org/hsqldb/test/TestObjectSize.java=src/org/hsqldb/test/TestObjectSize.java 0755 root bin f none $VERDIR/src/org/hsqldb/test/TestPreparedSubQueries.java=src/org/hsqldb/test/TestPreparedSubQueries.java 0755 root bin f none $VERDIR/src/org/hsqldb/test/TestQuotes.java=src/org/hsqldb/test/TestQuotes.java f none $VERDIR/src/org/hsqldb/test/TestSchemaParse.java=src/org/hsqldb/test/TestSchemaParse.java 0755 root bin f none $VERDIR/src/org/hsqldb/test/TestScript.java=src/org/hsqldb/test/TestScript.java 0755 root bin f none $VERDIR/src/org/hsqldb/test/TestSelf.java=src/org/hsqldb/test/TestSelf.java f none $VERDIR/src/org/hsqldb/test/TestSql.java=src/org/hsqldb/test/TestSql.java f none $VERDIR/src/org/hsqldb/test/TestSqlPersistent.java=src/org/hsqldb/test/TestSqlPersistent.java f none $VERDIR/src/org/hsqldb/test/TestSqlTool.java=src/org/hsqldb/test/TestSqlTool.java f none $VERDIR/src/org/hsqldb/test/TestStoredProcedure.java=src/org/hsqldb/test/TestStoredProcedure.java 0755 root bin f none $VERDIR/src/org/hsqldb/test/TestSubselect.java=src/org/hsqldb/test/TestSubselect.java f none $VERDIR/src/org/hsqldb/test/TestTimestamp.java=src/org/hsqldb/test/TestTimestamp.java 0755 root bin f none $VERDIR/src/org/hsqldb/test/TestSubQueriesInPreparedStatements.java=src/org/hsqldb/test/TestSubQueriesInPreparedStatements.java 0755 root bin f none $VERDIR/src/org/hsqldb/test/TestUtil.java=src/org/hsqldb/test/TestUtil.java 0755 root bin d none $VERDIR/src/org/hsqldb/types 0755 root bin f none $VERDIR/src/org/hsqldb/types/JavaObject.java=src/org/hsqldb/types/JavaObject.java 0755 root bin f none $VERDIR/src/org/hsqldb/types/Binary.java=src/org/hsqldb/types/Binary.java 0755 root bin d none $VERDIR/src/org/hsqldb/util 0755 root bin f none $VERDIR/src/org/hsqldb/util/CSVWriter.java=src/org/hsqldb/util/CSVWriter.java 0755 root bin f none $VERDIR/src/org/hsqldb/util/Bold.gif=src/org/hsqldb/util/Bold.gif 0755 root bin f none $VERDIR/src/org/hsqldb/util/Clear.png=src/org/hsqldb/util/Clear.png 0755 root bin f none $VERDIR/src/org/hsqldb/util/Close.png=src/org/hsqldb/util/Close.png 0755 root bin f none $VERDIR/src/org/hsqldb/util/Colors.png=src/org/hsqldb/util/Colors.png 0755 root bin f none $VERDIR/src/org/hsqldb/util/ConnectionDialogCommon.java=src/org/hsqldb/util/ConnectionDialogCommon.java f none $VERDIR/src/org/hsqldb/util/CodeSwitcher.java=src/org/hsqldb/util/CodeSwitcher.java f none $VERDIR/src/org/hsqldb/util/CommonSwing.java=src/org/hsqldb/util/CommonSwing.java f none $VERDIR/src/org/hsqldb/util/ConnectionDialog.java=src/org/hsqldb/util/ConnectionDialog.java f none $VERDIR/src/org/hsqldb/util/DataAccessPointException.java=src/org/hsqldb/util/DataAccessPointException.java f none $VERDIR/src/org/hsqldb/util/ConnectionDialogSwing.java=src/org/hsqldb/util/ConnectionDialogSwing.java f none $VERDIR/src/org/hsqldb/util/ConnectionSetting.java=src/org/hsqldb/util/ConnectionSetting.java 0755 root bin f none $VERDIR/src/org/hsqldb/util/DataAccessPoint.java=src/org/hsqldb/util/DataAccessPoint.java f none $VERDIR/src/org/hsqldb/util/DatabaseManagerCommon.java=src/org/hsqldb/util/DatabaseManagerCommon.java f none $VERDIR/src/org/hsqldb/util/DatabaseManager.java=src/org/hsqldb/util/DatabaseManager.java f none $VERDIR/src/org/hsqldb/util/InformixTransferHelper.java=src/org/hsqldb/util/InformixTransferHelper.java f none $VERDIR/src/org/hsqldb/util/DatabaseManagerSwing.java=src/org/hsqldb/util/DatabaseManagerSwing.java f none $VERDIR/src/org/hsqldb/util/FontDialogSwing.java=src/org/hsqldb/util/FontDialogSwing.java 0755 root bin f none $VERDIR/src/org/hsqldb/util/GreenCircle.gif=src/org/hsqldb/util/GreenCircle.gif 0755 root bin f none $VERDIR/src/org/hsqldb/util/Grid.java=src/org/hsqldb/util/Grid.java f none $VERDIR/src/org/hsqldb/util/GridSwing.java=src/org/hsqldb/util/GridSwing.java f none $VERDIR/src/org/hsqldb/util/HelperFactory.java=src/org/hsqldb/util/HelperFactory.java f none $VERDIR/src/org/hsqldb/util/Hourglass.gif=src/org/hsqldb/util/Hourglass.gif 0755 root bin f none $VERDIR/src/org/hsqldb/util/HsqldbTransferHelper.java=src/org/hsqldb/util/HsqldbTransferHelper.java f none $VERDIR/src/org/hsqldb/util/JDBCTypes.java=src/org/hsqldb/util/JDBCTypes.java f none $VERDIR/src/org/hsqldb/util/Italic.gif=src/org/hsqldb/util/Italic.gif 0755 root bin f none $VERDIR/src/org/hsqldb/util/MainInvoker.java=src/org/hsqldb/util/MainInvoker.java f none $VERDIR/src/org/hsqldb/util/QueryTool.java=src/org/hsqldb/util/QueryTool.java f none $VERDIR/src/org/hsqldb/util/RCData.java=src/org/hsqldb/util/RCData.java f none $VERDIR/src/org/hsqldb/util/McKoiTransferHelper.java=src/org/hsqldb/util/McKoiTransferHelper.java f none $VERDIR/src/org/hsqldb/util/OracleTransferHelper.java=src/org/hsqldb/util/OracleTransferHelper.java f none $VERDIR/src/org/hsqldb/util/PostgresTransferHelper.java=src/org/hsqldb/util/PostgresTransferHelper.java f none $VERDIR/src/org/hsqldb/util/RedCircle.gif=src/org/hsqldb/util/RedCircle.gif 0755 root bin f none $VERDIR/src/org/hsqldb/util/SqlServerTransferHelper.java=src/org/hsqldb/util/SqlServerTransferHelper.java f none $VERDIR/src/org/hsqldb/util/SQLStatements.java=src/org/hsqldb/util/SQLStatements.java f none $VERDIR/src/org/hsqldb/util/ScriptTool.java=src/org/hsqldb/util/ScriptTool.java f none $VERDIR/src/org/hsqldb/util/ShutdownServer.java=src/org/hsqldb/util/ShutdownServer.java f none $VERDIR/src/org/hsqldb/util/SqlFile.java=src/org/hsqldb/util/SqlFile.java f none $VERDIR/src/org/hsqldb/util/SqlToolError.java=src/org/hsqldb/util/SqlToolError.java f none $VERDIR/src/org/hsqldb/util/SqlTool.java=src/org/hsqldb/util/SqlTool.java f none $VERDIR/src/org/hsqldb/util/ZaurusComponent.java=src/org/hsqldb/util/ZaurusComponent.java f none $VERDIR/src/org/hsqldb/util/SqlToolSprayer.java=src/org/hsqldb/util/SqlToolSprayer.java f none $VERDIR/src/org/hsqldb/util/TableSorter.java=src/org/hsqldb/util/TableSorter.java 0755 root bin f none $VERDIR/src/org/hsqldb/util/Traceable.java=src/org/hsqldb/util/Traceable.java f none $VERDIR/src/org/hsqldb/util/Transfer.java=src/org/hsqldb/util/Transfer.java f none $VERDIR/src/org/hsqldb/util/TransferCommon.java=src/org/hsqldb/util/TransferCommon.java f none $VERDIR/src/org/hsqldb/util/TransferDb.java=src/org/hsqldb/util/TransferDb.java f none $VERDIR/src/org/hsqldb/util/TransferHelper.java=src/org/hsqldb/util/TransferHelper.java f none $VERDIR/src/org/hsqldb/util/TransferResultSet.java=src/org/hsqldb/util/TransferResultSet.java f none $VERDIR/src/org/hsqldb/util/TransferSQLText.java=src/org/hsqldb/util/TransferSQLText.java f none $VERDIR/src/org/hsqldb/util/TransferTable.java=src/org/hsqldb/util/TransferTable.java f none $VERDIR/src/org/hsqldb/util/Tree.java=src/org/hsqldb/util/Tree.java f none $VERDIR/src/org/hsqldb/util/ZaurusChoice.java=src/org/hsqldb/util/ZaurusChoice.java f none $VERDIR/src/org/hsqldb/util/problems.gif=src/org/hsqldb/util/problems.gif 0755 root bin f none $VERDIR/src/org/hsqldb/util/hsqldb.gif=src/org/hsqldb/util/hsqldb.gif f none $VERDIR/src/org/hsqldb/util/ZaurusConnectionDialog.java=src/org/hsqldb/util/ZaurusConnectionDialog.java f none $VERDIR/src/org/hsqldb/util/ZaurusDatabaseManager.java=src/org/hsqldb/util/ZaurusDatabaseManager.java f none $VERDIR/src/org/hsqldb/util/ZaurusEditor.java=src/org/hsqldb/util/ZaurusEditor.java f none $VERDIR/src/org/hsqldb/util/ZaurusTableForm.java=src/org/hsqldb/util/ZaurusTableForm.java f none $VERDIR/src/org/hsqldb/util/ZaurusTextField.java=src/org/hsqldb/util/ZaurusTextField.java f none $VERDIR/src/org/hsqldb/util/run_exc.gif=src/org/hsqldb/util/run_exc.gif 0755 root bin f none $VERDIR/src/hsqlServlet.java=src/hsqlServlet.java d none $VERDIR/testrun 0755 root bin d none $VERDIR/testrun/hsqldb 0755 root bin f none $VERDIR/testrun/hsqldb/TestSelf.txt=testrun/hsqldb/TestSelf.txt f none $VERDIR/testrun/hsqldb/TestSelfCreate.txt=testrun/hsqldb/TestSelfCreate.txt f none $VERDIR/testrun/hsqldb/TestSelfImmediateShutdown.txt=testrun/hsqldb/TestSelfImmediateShutdown.txt 0755 root bin f none $VERDIR/testrun/hsqldb/TestSelfAlterColumn.txt=testrun/hsqldb/TestSelfAlterColumn.txt 0755 root bin f none $VERDIR/testrun/hsqldb/TestSelfCasewhen.txt=testrun/hsqldb/TestSelfCasewhen.txt 0755 root bin f none $VERDIR/testrun/hsqldb/TestSelfCheckConstraints.txt=testrun/hsqldb/TestSelfCheckConstraints.txt 0755 root bin f none $VERDIR/testrun/hsqldb/TestSelfConstraints.txt=testrun/hsqldb/TestSelfConstraints.txt 0755 root bin f none $VERDIR/testrun/hsqldb/TestSelfConversions.txt=testrun/hsqldb/TestSelfConversions.txt 0755 root bin f none $VERDIR/testrun/hsqldb/TestSelfFKModes.txt=testrun/hsqldb/TestSelfFKModes.txt 0755 root bin f none $VERDIR/testrun/hsqldb/TestSelfFieldLimits.txt=testrun/hsqldb/TestSelfFieldLimits.txt 0755 root bin f none $VERDIR/testrun/hsqldb/TestSelfGrantees.txt=testrun/hsqldb/TestSelfGrantees.txt 0755 root bin f none $VERDIR/testrun/hsqldb/runTest.bat=testrun/hsqldb/runTest.bat 0755 root bin f none $VERDIR/testrun/hsqldb/TestSelfImmediateShutdownRecover.txt=testrun/hsqldb/TestSelfImmediateShutdownRecover.txt 0755 root bin f none $VERDIR/testrun/hsqldb/TestSelfNot.txt=testrun/hsqldb/TestSelfNot.txt 0755 root bin f none $VERDIR/testrun/hsqldb/TestSelfInPredicateReferencing.txt=testrun/hsqldb/TestSelfInPredicateReferencing.txt 0755 root bin f none $VERDIR/testrun/hsqldb/TestSelfInsertDeleteQueries.txt=testrun/hsqldb/TestSelfInsertDeleteQueries.txt 0755 root bin f none $VERDIR/testrun/hsqldb/TestSelfIssues.txt=testrun/hsqldb/TestSelfIssues.txt 0755 root bin f none $VERDIR/testrun/hsqldb/TestSelfJoins.txt=testrun/hsqldb/TestSelfJoins.txt 0755 root bin f none $VERDIR/testrun/hsqldb/TestSelfLeftJoin.txt=testrun/hsqldb/TestSelfLeftJoin.txt 0755 root bin f none $VERDIR/testrun/hsqldb/TestSelfModify.txt=testrun/hsqldb/TestSelfModify.txt f none $VERDIR/testrun/hsqldb/TestSelfMultiGrants.txt=testrun/hsqldb/TestSelfMultiGrants.txt 0755 root bin f none $VERDIR/testrun/hsqldb/TestSelfNameResolution.txt=testrun/hsqldb/TestSelfNameResolution.txt 0755 root bin f none $VERDIR/testrun/hsqldb/TestSelfNameResolutionSchemas.txt=testrun/hsqldb/TestSelfNameResolutionSchemas.txt 0755 root bin f none $VERDIR/testrun/hsqldb/TestSelfPrimaryKeys.txt=testrun/hsqldb/TestSelfPrimaryKeys.txt 0755 root bin f none $VERDIR/testrun/hsqldb/TestSelfQueries.txt=testrun/hsqldb/TestSelfQueries.txt 0755 root bin f none $VERDIR/testrun/hsqldb/TestSelfRightCaching.txt=testrun/hsqldb/TestSelfRightCaching.txt f none $VERDIR/testrun/hsqldb/TestSelfRoleNesting.txt=testrun/hsqldb/TestSelfRoleNesting.txt 0755 root bin f none $VERDIR/testrun/hsqldb/TestSelfSchemaPerCachTbl1.txt=testrun/hsqldb/TestSelfSchemaPerCachTbl1.txt 0755 root bin f none $VERDIR/testrun/hsqldb/TestSelfSubselects.txt=testrun/hsqldb/TestSelfSubselects.txt 0755 root bin f none $VERDIR/testrun/hsqldb/TestSelfSchemaPerCachTbl2.txt=testrun/hsqldb/TestSelfSchemaPerCachTbl2.txt 0755 root bin f none $VERDIR/testrun/hsqldb/TestSelfSchemaPersistA1.txt=testrun/hsqldb/TestSelfSchemaPersistA1.txt 0755 root bin f none $VERDIR/testrun/hsqldb/TestSelfSchemaPersistA2.txt=testrun/hsqldb/TestSelfSchemaPersistA2.txt 0755 root bin f none $VERDIR/testrun/hsqldb/TestSelfSchemaPersistB1.txt=testrun/hsqldb/TestSelfSchemaPersistB1.txt 0755 root bin f none $VERDIR/testrun/hsqldb/TestSelfSchemaPersistB2.txt=testrun/hsqldb/TestSelfSchemaPersistB2.txt 0755 root bin f none $VERDIR/testrun/hsqldb/TestSelfSchemaPersistC1.txt=testrun/hsqldb/TestSelfSchemaPersistC1.txt 0755 root bin f none $VERDIR/testrun/hsqldb/TestSelfSchemaPersistC2.txt=testrun/hsqldb/TestSelfSchemaPersistC2.txt 0755 root bin f none $VERDIR/testrun/hsqldb/TestSelfSysTables.txt=testrun/hsqldb/TestSelfSysTables.txt 0755 root bin f none $VERDIR/testrun/hsqldb/TestSelfTempTable1.txt=testrun/hsqldb/TestSelfTempTable1.txt 0755 root bin f none $VERDIR/testrun/hsqldb/TestSelfTempTable2.txt=testrun/hsqldb/TestSelfTempTable2.txt 0755 root bin f none $VERDIR/testrun/hsqldb/TestSelfTransaction.txt=testrun/hsqldb/TestSelfTransaction.txt 0755 root bin f none $VERDIR/testrun/hsqldb/TestSelfUnions.txt=testrun/hsqldb/TestSelfUnions.txt 0755 root bin f none $VERDIR/testrun/hsqldb/TestSelfUserFunction.txt=testrun/hsqldb/TestSelfUserFunction.txt 0755 root bin f none $VERDIR/testrun/hsqldb/TestSelfVerify.txt=testrun/hsqldb/TestSelfVerify.txt f none $VERDIR/testrun/hsqldb/TestSelfViews.txt=testrun/hsqldb/TestSelfViews.txt 0755 root bin f none $VERDIR/testrun/hsqldb/TestSelfViewSchemaResolve.txt=testrun/hsqldb/TestSelfViewSchemaResolve.txt 0755 root bin f none $VERDIR/testrun/hsqldb/runTest.sh=testrun/hsqldb/runTest.sh 0755 root bin d none $VERDIR/testrun/sqltool 0755 root bin f none $VERDIR/testrun/sqltool/annotated-file.sql=testrun/sqltool/annotated-file.sql f none $VERDIR/testrun/sqltool/annotated-raw.sql=testrun/sqltool/annotated-raw.sql f none $VERDIR/testrun/sqltool/edit-a.sql=testrun/sqltool/edit-a.sql f none $VERDIR/testrun/sqltool/annotated-interactive.sql=testrun/sqltool/annotated-interactive.sql f none $VERDIR/testrun/sqltool/args-noinput.sql=testrun/sqltool/args-noinput.sql f none $VERDIR/testrun/sqltool/args-sql.sql=testrun/sqltool/args-sql.sql f none $VERDIR/testrun/sqltool/args-sqlni.sql=testrun/sqltool/args-sqlni.sql f none $VERDIR/testrun/sqltool/comment-midline.sql=testrun/sqltool/comment-midline.sql f none $VERDIR/testrun/sqltool/pl-variable.sql=testrun/sqltool/pl-variable.sql f none $VERDIR/testrun/sqltool/edit-s-noswitches.sql=testrun/sqltool/edit-s-noswitches.sql f none $VERDIR/testrun/sqltool/edit-s-switches.sql=testrun/sqltool/edit-s-switches.sql f none $VERDIR/testrun/sqltool/hist-recall-19.sql=testrun/sqltool/hist-recall-19.sql f none $VERDIR/testrun/sqltool/hist-recall-runquery.sql=testrun/sqltool/hist-recall-runquery.sql f none $VERDIR/testrun/sqltool/readme.txt=testrun/sqltool/readme.txt f none $VERDIR/testrun/sqltool/special-d.sql=testrun/sqltool/special-d.sql f none $VERDIR/testrun/sqltool/special-q-arg.sql=testrun/sqltool/special-q-arg.sql f none $VERDIR/testrun/sqltool/special-q.sql=testrun/sqltool/special-q.sql f none $VERDIR/testrun/sqltool/sql-blankfile.sql=testrun/sqltool/sql-blankfile.sql f none $VERDIR/testrun/sqltool/sql-blankint.sql=testrun/sqltool/sql-blankint.sql f none $VERDIR/testrun/sqltool/testArgs.list=testrun/sqltool/testArgs.list f none $VERDIR/testrun/sqltool/testComments.list=testrun/sqltool/testComments.list f none $VERDIR/testrun/sqltool/testEditing.list=testrun/sqltool/testEditing.list f none $VERDIR/testrun/sqltool/testHistory.list=testrun/sqltool/testHistory.list f none $VERDIR/testrun/sqltool/testPL.list=testrun/sqltool/testPL.list f none $VERDIR/testrun/sqltool/testSQL.list=testrun/sqltool/testSQL.list f none $VERDIR/testrun/sqltool/testSpecials.list=testrun/sqltool/testSpecials.list d none $VERDIR/website 0755 root bin d none $VERDIR/website/images 0755 root bin f none $VERDIR/website/images/Thumbs.db=website/images/Thumbs.db 0755 root bin f none $VERDIR/website/images/line-1.gif=website/images/line-1.gif 0755 root bin f none $VERDIR/website/images/kattare-logo.jpg=website/images/kattare-logo.jpg 0755 root bin f none $VERDIR/website/images/logo.gif=website/images/logo.gif 0755 root bin f none $VERDIR/website/index.html=website/index.html 0755 root bin d none $VERDIR/website/templates 0755 root bin f none $VERDIR/website/templates/defaulttemplate.dwt=website/templates/defaulttemplate.dwt 0755 root bin d none $VERDIR/website/web 0755 root bin f none $VERDIR/website/web/hsqlDocIndex.html=website/web/hsqlDocIndex.html 0755 root bin f none $VERDIR/website/web/changelog.html=website/web/changelog.html 0755 root bin f none $VERDIR/website/web/hsqlDevelopment.html=website/web/hsqlDevelopment.html 0755 root bin f none $VERDIR/website/web/hsqlDocsFrame.html=website/web/hsqlDocsFrame.html 0755 root bin f none $VERDIR/website/web/hsqlFAQ.html=website/web/hsqlFAQ.html 0755 root bin f none $VERDIR/website/web/hsqlFeatures.html=website/web/hsqlFeatures.html 0755 root bin f none $VERDIR/website/web/hsqlHistory.html=website/web/hsqlHistory.html 0755 root bin f none $VERDIR/website/web/hsqlLicense.html=website/web/hsqlLicense.html 0755 root bin f none $VERDIR/website/web/hsqlSupport.html=website/web/hsqlSupport.html 0755 root bin f none $VERDIR/website/web/hsqlUsing.html=website/web/hsqlUsing.html f none $VERDIR/website/web/style.css=website/web/style.css 0755 root bin f none $VERDIR/website/web/topframe.html=website/web/topframe.html 0755 root bin hsqldb-1.8.0.10.orig/build/packaging/pkg/cfg/HSQLhsqldb.info0000644000175000017500000000044210273521160022001 0ustar renereneBASEDIR=/opt PKG=HSQLDBhsqldb NAME=Hsqldb Database DESC=The HSQLDB pure Java database ARCH=sparc,i386,ppc VERSION=1.8.0.1a CATEGORY=application VENDOR=Hsqldb development team, http://hsqldb.org HOTLINE=unsaved at Sourceforge EMAIL=blaine.simpson@admc.com MAXINST=100 VERDIR=hsqldb-1.8.0.1a hsqldb-1.8.0.10.orig/build/packaging/pkg/cfg/server.properties0000644000175000017500000000060510271050602022600 0ustar renerene# Hsqldb Server cfg file. # See the Advanced Topics chapter of the Hsqldb User Guide # at /opt/hsqldb/doc/guide/index.html or http://hsqldb.org . server.database.0 file:db1/db1 server.urlid.0 localhostdb1 # JDBC access url will end with hostname or hostname:port by default. To # require an "instance alias" after the hostname/port, set server.dbname.X: # server.dbname.1 db1 hsqldb-1.8.0.10.orig/build/packaging/pkg/cfg/HSQLhsqldb.postinstall0000644000175000017500000000313110273521160023420 0ustar renerene # Bourne shell Solaris packaging script (no interpreter line on purpose) # $Id: HSQLhsqldb.postinstall,v 1.3 2005/07/25 02:42:10 unsaved Exp $ # N.b. If $BASEDIR/hsqldb exists before installing this package, this # stuff will set up for that to be the default hsqldb home. The # newly installed hsqldb branch will be a non-default baseline. # Do not set path. Pkgadd sets a safe path, it does not use any inherited path #set -x Failout() { echo "Aborting. $@" 1>&2 exit 1 } safecd() { # Failure of the built-in "cd" command can completely kill the shell, # thereby aborting this script with no error-handling at all. # Therefore, we need to try to see if the cd will work first. `cd "$@"` || return $? cd "$@" } BASE=hsqldb-1.8.0.1a LINK=$BASEDIR/hsqldb [ -L $LINK ] && { rm $LINK || Failout "Failed to remove link $LINK" } safecd $BASEDIR 2> /dev/null || Failout "Failed to cd to '$BASEDIR'" # Existence tests do not work with Solaris Bourne (bullshit if you ask me). # Since this is run by root, every existing fs node is readable. [ -r hsqldb ] || { ln -s $BASE hsqldb || Failout "Failed to create sym link '$LINK'" } # Assertions. If these fail, then the following usermod will fail. [ -d $LINK ] || Failout "Postscript assertion failed. '$LINK' is not a directory." # This method preserves perms/ownership & preserves both hard and sym links XTMPFILE=hsqldb.expand.$$ cp /etc/hsqldb.conf $XTMPFILE sed -e "s:/opt:$BASEDIR:g;" $XTMPFILE > /etc/hsqldb.conf rm -f $XTMPFILE usermod -d $LINK hsqldb || Failout "Failed to set home directory for user 'hsqldb'" exit 0 hsqldb-1.8.0.10.orig/build/packaging/pkg/cfg/sqltool.rc0000644000175000017500000000030310271050602021172 0ustar renerene# Sqltool runtime config file. # See the HSQLDB User Guide at /opt/hsqldb/doc/guide/index.html or # http://hsqldb.org . urlid localhostdb1 url jdbc:hsqldb:hsql://localhost username sa password hsqldb-1.8.0.10.orig/build/packaging/pkg/cfg/HSQLhsqldb.postremove0000644000175000017500000000110707551673702023267 0ustar renerene # Bourne shell Solaris packaging script (no interpreter line on purpose) # $Id: HSQLhsqldb.postremove,v 1.1 2002/10/12 01:15:46 unsaved Exp $ # Do not set path. Pkgadd sets a safe path, it does not use any inherited path [ -L $BASEDIR/hsqldb ] && rm $BASEDIR/hsqldb # rmdir $BASEDIR # Leave the 'hsqldb' user and groups in place. We do not want to orphan # any files that the end user may have created. # But do be safe... usermod -s /bin/false -d /dev/null hsqldb 2> /dev/null || echo "WARNING: Failed to disable shell and home directory for user 'hsqldb'" \ 1>&2 exit 0 hsqldb-1.8.0.10.orig/build/packaging/zaurus/0000755000175000017500000000000010242420102017156 5ustar renerenehsqldb-1.8.0.10.orig/build/packaging/zaurus/ipkg-build0000644000175000017500000000776107554527004021170 0ustar renerene#!/bin/sh # ipkg-build -- construct a .ipk from a directory # Carl Worth # based on a script by Steve Redler IV, steve@sr-tech.com 5-21-2001 set -e ipkg_extract_value() { sed -e "s/^[^:]*:[[:space:]]*//" } required_field() { field=$1 value=`grep "^$field:" < $CONTROL/control | ipkg_extract_value` if [ -z "$value" ]; then echo "*** Error: $CONTROL/control is missing field $field" >&2 return 1 fi echo $value return 0 } pkg_appears_sane() { local pkg_dir=$1 local owd=`pwd` cd $pkg_dir PKG_ERROR=0 large_uid_files=`find . -uid +99` if [ -n "$large_uid_files" ]; then echo "*** Warning: The following files have a UID greater than 99. You probably want to chown these to a system user: " >&2 ls -ld $large_uid_files echo >&2 fi if [ ! -f "$CONTROL/control" ]; then echo "*** Error: Control file $pkg_dir/$CONTROL/control not found." >&2 cd $owd return 1 fi pkg=`required_field Package` [ "$?" -ne 0 ] && PKG_ERROR=1 version=`required_field Version | sed 's/.*://;'` [ "$?" -ne 0 ] && PKG_ERROR=1 arch=`required_field Architecture` [ "$?" -ne 0 ] && PKG_ERROR=1 required_field Maintainer >/dev/null [ "$?" -ne 0 ] && PKG_ERROR=1 required_field Description >/dev/null [ "$?" -ne 0 ] && PKG_ERROR=1 section=`required_field Section` [ "$?" -ne 0 ] && PKG_ERROR=1 if [ -z "$section" ]; then echo "The Section field should have one of the following values:" >&2 echo "admin, base, comm, editors, extras, games, graphics, kernel, libs, misc, net, text, web, x11" >&2 fi priority=`required_field Priority` [ "$?" -ne 0 ] && PKG_ERROR=1 if [ -z "$priority" ]; then echo "The Priority field should have one of the following values:" >&2 echo "required, important, standard, optional, extra." >&2 echo "If you don't know which priority value you should be using, then use \`optional'" >&2 fi if echo $pkg | grep '[^a-z0-9.+-]'; then echo "*** Error: Package name $name contains illegal characters, (other than [a-z0-9.+-])" >&2 PKG_ERROR=1; fi local bad_fields=`sed -ne 's/^\([^[:space:]][^:[:space:]]\+[[:space:]]\+\)[^:].*/\1/p' < $CONTROL/control | sed -e 's/\\n//'` if [ -n "$bad_fields" ]; then bad_fields=`echo $bad_fields` echo "*** Error: The following fields in $CONTROL/control are missing a ':'" >&2 echo " $bad_fields" >&2 echo "ipkg-build: This may be due to a missing initial space for a multi-line field value" >&2 PKG_ERROR=1 fi for script in $CONTROL/preinst $CONTROL/postinst $CONTROL/prerm $CONTROL/postrm; do if [ -f $script -a ! -x $script ]; then echo "*** Error: package script $script is not executable" >&2 PKG_ERROR=1 fi done if [ -f $CONTROL/conffiles ]; then for cf in `cat $CONTROL/conffiles`; do if [ ! -f ./$cf ]; then echo "*** Error: $CONTROL/conffiles mentions conffile $cf which does not exist" >&2 PKG_ERROR=1 fi done fi cd $owd return $PKG_ERROR } ### # ipkg-build "main" ### case $# in 1) dest_dir=. ;; 2) dest_dir=$2 ;; *) echo "Usage: ipkg-build []" >&2 exit 1 ;; esac pkg_dir=$1 if [ ! -d $pkg_dir ]; then echo "*** Error: Directory $pkg_dir does not exist" >&2 exit 1 fi # CONTROL is second so that it takes precedence CONTROL= [ -d $pkg_dir/DEBIAN ] && CONTROL=DEBIAN [ -d $pkg_dir/CONTROL ] && CONTROL=CONTROL if [ -z "$CONTROL" ]; then echo "*** Error: Directory $pkg_dir has no CONTROL subdirectory." >&2 exit 1 fi if ! pkg_appears_sane $pkg_dir; then echo >&2 echo "ipkg-build: Please fix the above errors and try again." >&2 exit 1 fi tmp_dir=$dest_dir/IPKG_BUILD.$$ mkdir $tmp_dir tar -C $pkg_dir -czf $tmp_dir/data.tar.gz . --exclude=$CONTROL tar -C $pkg_dir/$CONTROL -czf $tmp_dir/control.tar.gz . echo "2.0" > $tmp_dir/debian-binary pkg_file=$dest_dir/${pkg}_${version}_${arch}.ipk tar -C $tmp_dir -czf $pkg_file ./debian-binary ./data.tar.gz ./control.tar.gz rm $tmp_dir/debian-binary $tmp_dir/data.tar.gz $tmp_dir/control.tar.gz rmdir $tmp_dir echo "Packaged contents of $pkg_dir into $pkg_file" hsqldb-1.8.0.10.orig/build/packaging/zaurus/package/0000755000175000017500000000000010242420102020551 5ustar renerenehsqldb-1.8.0.10.orig/build/packaging/zaurus/package/CONTROL/0000755000175000017500000000000010242420102021671 5ustar renerenehsqldb-1.8.0.10.orig/build/packaging/zaurus/package/CONTROL/control0000644000175000017500000000037107555064451023325 0ustar renerenePackage: java-hsqldb Installed-Size: 400k Filename: ./java-hsqldb_1.0_arm.ipk Section: java Maintainer: ulrivo Architecture: arm Version: 1.0 Priority: optional Description: 100% Java Database Engine with a Database Managerhsqldb-1.8.0.10.orig/build/packaging/zaurus/package/home/0000755000175000017500000000000010242420102021501 5ustar renerenehsqldb-1.8.0.10.orig/build/packaging/zaurus/package/home/QtPalmtop/0000755000175000017500000000000010242420102023422 5ustar renerenehsqldb-1.8.0.10.orig/build/packaging/zaurus/package/home/QtPalmtop/pics/0000755000175000017500000000000010242420102024360 5ustar renerenehsqldb-1.8.0.10.orig/build/packaging/zaurus/package/home/QtPalmtop/pics/hsqldb.png0000644000175000017500000000102207555051207026361 0ustar renerenePNG  IHDR DxPLTEĜ䷶㌼ݩ}zrmj֙c]ZYTό}|zfff`][4bRPM*Ng*OhCA?%DZ333&# '3:tRNS@fbKGDH pHYs  d_tIME /5IDATxI EYR7^o )*_Rt!03 _*](JHo >oZa?!8~G # 2002-10-19 # # script to build ipkg-package for Zaurus # # 1. checks whether there is a directory package/home/QtPalmtop # 2. copies ../../../lib/hsqldbz.jar to package/home/QtPalmtop/java # 3. copies ../../../doc/zaurus/* to package/home/QtPalmtop/help/html/hsqldb # 4. copies ../../../doc/zaurus/readme to package/home/root/hqldb # 5. calls ipkg-build with the subdirectory name package # if [ ! -d package/home/QtPalmtop ] then echo 'Directory package/home/QtPalmtop is missing.' exit 1 fi if [ ! -d package/home/QtPalmtop/java ] then mkdir package/home/QtPalmtop/java fi if [ ! -d package/home/QtPalmtop/help ] then mkdir package/home/QtPalmtop/help fi if [ ! -d package/home/QtPalmtop/help/html ] then mkdir package/home/QtPalmtop/help/html fi if [ ! -d package/home/QtPalmtop/help/html/hsqldb ] then mkdir package/home/QtPalmtop/help/html/hsqldb fi if [ ! -d package/home/root ] then mkdir package/home/root fi if [ ! -d package/home/root/hsqldb ] then mkdir package/home/root/hsqldb fi if [ -s ../../../lib/hsqldbz.jar ] then cp ../../../lib/hsqldbz.jar package/home/QtPalmtop/java else echo 'lib/hsqldbz.jar is missing.' exit 1 fi cp -r ../../../doc/zaurus/* package/home/QtPalmtop/help/html/hsqldb/ cp ../../../doc/zaurus/readme package/home/root/hsqldb ipkg-build package hsqldb-1.8.0.10.orig/build/build.xml0000644000175000017500000015656511020615451015554 0ustar renerene jar filename build command explanation -------------- ------------- ----------------------------------- hsqldb.jar ant hsqldb Default distribution jar hsqljdbc.jar ant hsqljdbc JDBC client only. (No direct urls of form jdbc:hsqldb:mem/file/res:*) hsqldbmain.jar ant hsqldbmain No utility programs hsqldbutil.jar ant hsqldbutil Utility programs only. No JDBC driver. (Includes SqlTool and DatabaseManagers) hsqldbmin.jar ant hsqldbmin No utility or server programs. (Include JDBC driver, but no support for urls of form jdbc:hsqldb:ht*...) hsqldbtest.jar ant hsqldbtest All, including test classes hsqldbz.jar ant hsqldbz Min jar plus necessary util classes for Zaurus hsqltool.jar ant hsqltool SqlTool client and JDBC driver. (No direct urls of form jdbc:hsqldb:mem/file/res:*) transfer.jar ant transfer Transfer Tool classes only. jars built with JDK 1.2 OR 1.3 can now be used with JRE 1.1. usage: ant -help Display ant help screen ant -projecthelp Display all invocable targets ant explainjars List all targets which build jar files ant ANYTHING ELSE Run 'ant -projecthelp' for details jars built with JDK 1.2 OR 1.3 can now be used with JRE 1.1 examples: ant jar ant clean hsqldb-1.8.0.10.orig/build/readmebuild.txt0000644000175000017500000000661310211347256016743 0ustar renereneBuild instructions for HSQLDB 1.8.0 A jar file for HSQLDB is provided in the /lib directory of the .zip package. This jar contains both the database and the utilities and has been built with JDK 1.4.2. The supplied jar can be used with JRE version 1.4.x., and 1.5.x. It cannot be used with older version or JRE. JDK and JRE versions For use with JRE 1.1.x, 1.2.x or 1.3.x recompilation is necessary. For all the older versions, always use JDK 1.3.x to build the jar. The default build with JDK 1.3.x is not compatible to run under 1.1. If you require this compatibility, you should use the following ant command prior to the build (note the digit 1 in java1): ant switchtojava1target The jars compiled after this switch will run under JRE 1.3 too, but they use some deprecated JDK 1.1 methods. To switch back to non-deprecated code, use: ant switchoffjava1target Different jar sizes HSQLDB can be built in any combination of five different sizes. The smallest jar, hsqljdbc.jar, contains only the client side of the JDBC driver, without any server or client standalone programs. The next smallest jar, hsqldbmin.jar, contains only the database and JDBC support for in-process mode databases. The next smallest jar, hsqldbmain.jar, also contains support for server modes. The default size jar, hsqldb.jar, additionally contains the utilities such as Database Manager and Transfer Tool. The largest jar, hsqldbtest.jar, includes some test classes as well. You need the JUnit jar in the /lib directory in order to build and run the test classes. Run "ant explainjars" to see a summary of the contents of the different pre-defined jar targets. Javadoc can be built with Ant and batch files. The JDK used for the build has a marginal effect on the size. Newer JDK's support more JDBC methods and classes, resulting in slightly larger jars. JDK 1.1.x It is recommended not to use JDK 1.1.x for building the jar, as this version produces much larger jar sizes and the result is not upward compatible with newer JDK'S / JRE's. Use JDK 1.3.x to build the jar instead. You can then deploy the jar in JRE 1.1. Build methods: The preferred method of rebuilding the jar is with Ant. After installing Ant on your system use the following command from the /build directory: ant The command displays a list of different options for building different sizes of the HSQLDB Jar. The default jar is built using: ant jar The Ant method always builds a jar with the JDK that is used by Ant and specified in the JAVA_HOME environment variable. The script automatically converts the source files for compatibility with the given JDK. Before building the hsqldbtest.jar package, you should download the junit.jar and put it in the /lib directory, alongside servlet.jar, which is included in the .zip package. Batch Build A set of MSDOS batch files is also provided. These produce only the default jar size. The path and classpath variables for the JDK should of course be set before running any of the batch files. If you are compiling for JDK's other than 1.4.x, you should use the appropriate switchtoJDK11.bat or switchtoJDK12.bat to adapt the source files to the target JDK before running the appropriate buildJDK11.bat or buildJDK12.bat. As explained before, it is not recommended to use this method for building jars for use on JRE 1.1.x targets. fredt@users hsqldb-1.8.0.10.orig/build/switchToJDK12.bat0000644000175000017500000000223510036536603016712 0ustar renerenecd ..\ md classes del /s classes\*.class cd build cd ..\src\org\hsqldb\util javac -d ..\..\..\..\classes CodeSwitcher.java cd ..\..\..\..\build java -classpath "%classpath%;../classes" org.hsqldb.util.CodeSwitcher ../src/org/hsqldb/jdbc/jdbcStubs.java +JAVA2 -JDBC3 java -classpath "%classpath%;../classes" org.hsqldb.util.CodeSwitcher ../src/org/hsqldb/jdbc/jdbcCallableStatement.java +JAVA2 -JDBC3 java -classpath "%classpath%;../classes" org.hsqldb.util.CodeSwitcher ../src/org/hsqldb/jdbc/jdbcConnection.java +JAVA2 -JDBC3 java -classpath "%classpath%;../classes" org.hsqldb.util.CodeSwitcher ../src/org/hsqldb/jdbc/jdbcDatabaseMetaData.java +JAVA2 -JDBC3 java -classpath "%classpath%;../classes" org.hsqldb.util.CodeSwitcher ../src/org/hsqldb/jdbc/jdbcPreparedStatement.java +JAVA2 -JDBC3 java -classpath "%classpath%;../classes" org.hsqldb.util.CodeSwitcher ../src/org/hsqldb/jdbc/jdbcResultSet.java +JAVA2 -JDBC3 java -classpath "%classpath%;../classes" org.hsqldb.util.CodeSwitcher ../src/org/hsqldb/jdbc/jdbcStatement.java +JAVA2 -JDBC3 java -classpath "%classpath%;../classes" org.hsqldb.util.CodeSwitcher ../src/org/hsqldb/HsqlDateTime.java +JAVA2 -JDBC3 hsqldb-1.8.0.10.orig/build/buildDoc.bat0000644000175000017500000000033410036536603016135 0ustar renerenejavadoc -classpath ..\lib\servlet.jar;..\lib\junit.jar -sourcepath ..\src -d ..\doc\src -noindex -package org.hsqldb org.hsqldb.util org.hsqldb.lib org.hsqldb.store org.hsqldb.scriptio org.hsqldb.rowio org.hsqldb.jdbc hsqldb-1.8.0.10.orig/build/buildJDK14.bat0000644000175000017500000000115310245621257016207 0ustar renerene@echo HSQLDB build file for jdk 1.4 @echo *** we recommend the use of the ANT build.xml instead of this method @echo for all jdk's include the path to jdk1.x.x\bin in your system path statement cd ..\ md classes del /s classes\*.class cd src javac -O -nowarn -d ../classes -classpath "%classpath%;../classes;../lib/servlet.jar;." ./*.java org/hsqldb/*.java org/hsqldb/lib/*.java org/hsqldb/util/*.java cd ..\classes copy ..\src\org\hsqldb\util\*.gif org\hsqldb\util jar -cf ../lib/hsqldb.jar *.class org/hsqldb/*.class org/hsqldb/lib/*.class org/hsqldb/util/*.class org/hsqldb/util/*.gif cd ..\build pause hsqldb-1.8.0.10.orig/build/buildJDK12.bat0000644000175000017500000000344410245621455016212 0ustar renerene@echo HSQLDB build file for jdk 1.2.x and 1.3.x @echo *** we recommend the use of the ANT build.xml instead of this method @echo for all jdk's include the path to jdk1.x.x\bin in your system path statement cd ..\ md classes del /s classes\*.class cd src mkdir ..\temp copy org\hsqldb\jdbc\jdbcDataSource*.java ..\temp\ copy org\hsqldb\jdbc\jdbcSavepoint.java ..\temp\ copy org\hsqldb\jdbc\jdbcParameterMetaData.java ..\temp\ copy org\hsqldb\persist\NIOLockFile.java ..\temp\ copy org\hsqldb\persist\NIOScaledRAFile.java ..\temp\ del org\hsqldb\jdbc\jdbcDataSource*.java del org\hsqldb\jdbc\jdbcSavepoint.java del org\hsqldb\jdbc\jdbcParameterMetaData.java del org\hsqldb\persist\NIOLockFile.java del org\hsqldb\persist\NIOScaledRAFile.java javac -O -nowarn -d ../classes -classpath "%classpath%;../classes;../lib/servlet.jar;." ./*.java org/hsqldb/*.java org/hsqldb/jdbc/*.java org/hsqldb/persist/*.java org/hsqldb/rowio/*.java org/hsqldb/scriptio/*.java org/hsqldb/store/*.java org/hsqldb/lib/*.java org/hsqldb/util/*.java copy ..\temp\jdbcDataSource*.java org\hsqldb\jdbc copy ..\temp\jdbcSavepoint.java org\hsqldb\jdbc copy ..\temp\jdbcParameterMetaData.java org\hsqldb\jdbc copy ..\temp\NIOLockFile.java org\hsqldb\persist copy ..\temp\NIOScaledRAFile.java org\hsqldb\persist del ..\temp\jdbcDataSource*.java del ..\temp\jdbcSavepoint.java del ..\temp\jdbcParameterMetaData.java del ..\temp\NIOLockFile.java del ..\temp\NIOScaledRAFile.java rmdir ..\temp cd ..\classes copy ..\src\org\hsqldb\util\*.gif org\hsqldb\util jar -cf ../lib/hsqldb.jar *.class org/hsqldb/*.class org/hsqldb/jdbc/*.class org/hsqldb/persist/*.class org/hsqldb/rowio/*.class org/hsqldb/scriptio/*.class org/hsqldb/store/*.class org/hsqldb/lib/*.class org/hsqldb/util/*.class org/hsqldb/util/*.gif cd ..\build pause hsqldb-1.8.0.10.orig/data/0000755000175000017500000000000010416767250013540 5ustar renerenehsqldb-1.8.0.10.orig/bin/0000755000175000017500000000000010665471633013402 5ustar renerenehsqldb-1.8.0.10.orig/bin/hsqldb0000755000175000017500000004154310665471636014617 0ustar renerene#!/bin/sh # For boot-up and system shutdown, most UNIXes explicitly run a shell # interpreter. In that case, the interpreter line above is ignored. # There are a few UNIXes (notably Darwin) that require the interpreter line. # Copyright (c) 2001-2004, The HSQL Development Group # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # Redistributions of source code must retain the above copyright notice, this # list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright notice, # this list of conditions and the following disclaimer in the documentation # and/or other materials provided with the distribution. # # Neither the name of the HSQL Development Group nor the names of its # contributors may be used to endorse or promote products derived from this # software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, # OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # $Id: hsqldb,v 1.38 2007/08/29 22:55:10 unsaved Exp $ # UNIX init script for HSQLDB. # See the "UNIX Quick Start" chapter of the Hsqldb User Guide for how to # use this file. # This stuff will be ignored by systems that don't use chkconfig. # chkconfig: 345 87 13 # description: Hsqldb, A High Performance Java Database # pidfile: /var/run/hsqldb.pid # config: /etc/sysconfig/hsqldb # This stuff for SuSE Linux. Contributed by M. Bisping. ### BEGIN INIT INFO # Provides: HSQLDB-Server # Required-Start: $syslog $remote_fs $network $named # Required-Stop: # Default-Start: 3 5 # Default-Stop: 0 1 2 6 # Short-Description: HSQLDB-Server # Description: Hsqldb, A High Performance Java Database Server ### END INIT INFO # N.b. Being a system script, this script does not use inherited variables. # If you want to adjust a setting, edit the config file. # Strategy of this init script is to avoid shell-specific functionality, # and use only lowest-common-denominator Bourne capabilities. # We don't include OS-specific functions, and we don't use shell- # implementation-specific functionality like "echo ...\c" or "echo -n...". # Since some Bourne shells don't support shell functions at all, we don't # even define any local functions. # This script has been generalized to the point that it can now "start" # any combination of classes with the normal static main methods. # However, you must still have a TARGET_CLASS which is a HSQLDB Server or # WebServer We connect to this server to check for status and to shut down. # This is the one class which must use the default server property file # name, either "server.properties" or "webserver.properties" (because # we get the list of urlids to check from this file). # Other than these constraints, you can supply invocation arguments to the # Server/WebServer invocation, and can start as many other classes as you # wish by using the INVOC_ADDL_ARGS setting (this includes running # multiple HSQLDB Servers of various types). # Recommended locations for configuration file: # Darwin, SunOS, Solaris: /etc/hsqldb.conf # (However, Sunfreeware.com builds use /usr/local/etc). # Linux: /etc/sysconfig # FreeBSD: /usr/local/etc/hsqldb.cfg # You can put it at any of these locations and it will be used. For # your sanity, only put a file at one of these locations. # -- blaine.simpson@admc.com set +u # This is only used for recursive invocations. # Will not necessarily be set correctly at system bootup invocations # (where it is sometimes invoked like "sh... /path/to/hsqldb start"), # but, in those cases there will be no recursion. INVOC_PATH=`dirname "$0"` || { echo "'dirname' failed" 1>&2 exit 2 } [ -n "$INVOC_PATH" ] && INVOC_PATH="${INVOC_PATH}/" SYNTAX_MSG="SYNTAX: ${INVOC_PATH}hsqldb start|stop|stopcompact|restart|restartcmpacted|status" # You can override any of these default values in your config file: # Allow this much time for background su command to start up and echo pid. # (0 works for moderately fast servers). SU_ECHO_SECS=1 # File used as semaphore. If file is removed, a running pid checker # process will exit. PIDCHECKER_FLAGFILE=/tmp/pidchecker.run # The following settings get overridden by optional setting in the config file. # Time to allow for JVM to die after all HSQLDB instances stopped. MAX_TERMINATE_SECS=1 # We require all Server/WebServer instances to be accessible within # $MAX_START_SECS from when the Server/WebServer is started. MAX_START_SECS=60 # Class in the org.hsqldb package to start. # At this time, only the values "Server" or "WebServer" will work. TARGET_CLASS=Server CLIENT_JVMARGS= SERVER_JVMARGS= TLS_KEYSTORE= TLS_PASSWORD= CFGFILE= LOGFILE= PIDFILE= BASEDIR= AUTH_FILE= SHUTDOWN_OPTION= SERVER_ADDL_CLASSPATH= INVOC_ADDL_ARGS= case "`uname`" in Darwin) # I.e. Mac OS X. I don't know about older Mac OSes. LOGFILE=/var/log/hsqldb.log PIDFILE=/var/run/hsqldb.pid ;; Linux) LOGFILE=/var/log/hsqldb.log PIDFILE=/var/run/hsqldb.pid ;; FreeBSD) LOGFILE=/var/log/hsqldb.log PIDFILE=/var/run/hsqldb.pid ;; SunOS) LOGFILE=/var/log/hsqldb.log PIDFILE=/etc/hsqldb.pid ;; *) LOGFILE=/var/log/hsqldb.log PIDFILE=/etc/hsqldb.pid ;; esac for candidate in /etc/sysconfig/hsqldb /etc/hsqldb.conf /etc/hsqldb.cfg \ /usr/local/etc/hsqldb.cfg; do [ -f $candidate ] && { CFGFILE=$candidate break } done [ -n "$CFGFILE" ] || { echo "No global config file found in any of allowed locations" 1>&2 exit 11 } # Sanity check [ -n "$LOGFILE" ] && [ -n "$PIDFILE" ] || { echo "Internal problem in init script" 1>&2 exit 11 } [ $# -eq 1 ] || { echo "$SYNTAX_MSG" 1>&2 exit 4 } # It would be nice to permit some uses, like "status" by non-root users, # but for now our goal is a superuser init script. [ -w / ] || { # Very portable, but perhaps not perfect, test for superuser. echo "Only 'root' may use this init script" 1>&2 exit 4 } # Use bsd-style enable/disable if it's in place. BSDCFG= [ -r /etc/rc.conf ] && [ -f /etc/rc.conf ] && { . /etc/rc.conf BSDCFG=1 } [ -r /etc/rc.conf.local ] && [ -f /etc/rc.conf.local ] && { . /etc/rc.conf.local BSDCFG=1 } [ -n "$BSDCFG" ] && { case "$hsqldb_enable" in [Yy][Ee][Ss]);; [Oo][Nn]);; [Tt][Rr][Uu][Ee]);; *) exit 0;; # Don't run if not enabled for BSD startup esac } COMMAND="$1"; shift [ -r "$CFGFILE" ] || { echo "Unable to read config file '$CFGFILE'" 1>&2 exit 2 } [ -f "$CFGFILE" ] || { echo "'$CFGFILE' is not a regular file" 1>&2 exit 2 } HSQLDB_OWNER= JAVA_EXECUTABLE= HSQLDB_JAR_PATH= SERVER_HOME= SHUTDOWN_URLIDS= . "$CFGFILE" # Suffix delimiter to $SERVER_ADDL_CLASSPATH, if it is set. [ -n "$SERVER_ADDL_CLASSPATH" ] && SERVER_ADDL_CLASSPATH="${SERVER_ADDL_CLASSPATH}:" # Validate that config file sets all required variables. [ -n "$JAVA_EXECUTABLE" ] && [ -n "$HSQLDB_JAR_PATH" ] && [ -n "$SERVER_HOME" ] || { echo "Config file '$CFGFILE' does not set one or more of following variables JAVA_EXECUTABLE, HSQLDB_JAR_PATH, SERVER_HOME" 1>&2 exit 2 } [ -d "$SERVER_HOME" ] || { echo "SERVER_HOME variable in '$CFGFILE' is set to a non-directory." 1>&2 exit 2 } [ -f "$JAVA_EXECUTABLE" ] && [ -f "$HSQLDB_JAR_PATH" ] || { echo "JAVA_EXECUTABLE or HSQLDB_JAR_PATH in '$CFGFILE' is set to a non-file." 1>&2 exit 2 } # PROPERTY_FILE is a derived value. case "$TARGET_CLASS" in Server) PROPERTY_FILE="$SERVER_HOME"/server.properties;; WebServer) PROPERTY_FILE="$SERVER_HOME"/webserver.properties;; *) echo 'Unsupported value for $TARGET_CLASS: '"$TARGET_CLASS" 1>&2 exit 2;; esac [ -f "$PROPERTY_FILE" ] || { echo "'$PROPERTY_FILE' is missing" 1>&2 exit 2 } [ -r "$PROPERTY_FILE" ] || { echo "'$PROPERTY_FILE' isn't readable" 1>&2 exit 2 } [ -r "$HSQLDB_JAR_PATH" ] || { echo "'$HSQLDB_JAR_PATH' isn't readable" 1>&2 exit 2 } [ -x "$JAVA_EXECUTABLE" ] || { echo "No Java executable found at '$JAVA_EXECUTABLE'" 1>&2 exit 2 } # "chown" lives here on some UNIXes. PATH="$PATH:/usr/sbin" # Make a good effort (but not bullet-proof) check on permissions of the # auth file. Unfortunately, if auth-file is not specified, this depends # upon both (a) $HOME being set; and (b) SqlToolSprayer and SqlTool defaults. # On the other hand, it works great if AUTH_FILE is set explicitly by user. if [ -z "$AUTH_FILE" ] && [ -z "$HOME" ]; then : # Lousy init environment didn't set $HOME, so can't find dflt cfg file. else _AUTH_TEST_PATH="$AUTH_FILE" [ -n "${_AUTH_TEST_PATH}" ] || _AUTH_TEST_PATH="$HOME/sqltool.rc" [ -f "$_AUTH_TEST_PATH" ] || { echo "No auth file found at '$_AUTH_TEST_PATH'" 1>&2 exit 2 } [ -r "$_AUTH_TEST_PATH" ] || { echo "Auth file '$_AUTH_TEST_PATH' not readable" 1>&2 exit 2 } ls -ld "$_AUTH_TEST_PATH" | grep '^-..------' > /dev/null 2>&1 || { echo "Fix permissions on '$_AUTH_TEST_PATH' like 'chmod 600 $_AUTH_TEST_PATH'" 1>&2 exit 2 } fi # Set HSQLDB_PID according to pid file. HSQLDB_PID= [ -r "$PIDFILE" ] && { [ -f "$PIDFILE" ] || { echo "'$PIDFILE' is not a regular file" 1>&2 exit 6 } [ -w "$PIDFILE" ] || { echo "'$PIDFILE' is not writable" 1>&2 exit 6 } HSQLDB_PID="`cat $PIDFILE`" || { echo "Failed to read pid file '$PIDFILE'" 1>&2 exit 6 } case "$HSQLDB_PID" in *[a-zA-Z/!@#$%*+=_~]*) HSQLDB_PID=;; *'^'*) HSQLDB_PID=;; esac [ -n "$HSQLDB_PID" ] || { echo "Pid file '$PIDFILE' does not contain a valid process identifier" 1>&2 exit 6 } kill -0 "$HSQLDB_PID" > /dev/null 2>&1 || { echo 'Removing stale pid file' rm -f "$PIDFILE" || { echo "Failed to remove pid file '$PIDFILE'" 1>&2 exit 6 } HSQLDB_PID= } #echo "PID is ($HSQLDB_PID)" } case "$COMMAND" in status) [ -n "$HSQLDB_PID" ] || { echo "I don't know of any running hsqldb server." exit 0 } echo "There is an hsqldb server loaded from $HSQLDB_JAR_PATH running with pid $HSQLDB_PID." # I would give a nice ps command here, were ps not so damned # OS-specific. AUTH_FILE_SWITCH= # N.b., there will be a problem if there are special characters or # spaces inside of $AUTH_FILE. [ -n "$AUTH_FILE" ] && AUTH_FILE_SWITCH="-Dsqltoolsprayer.rcfile=$AUTH_FILE" # Might as well set CLASSPATH for a cleaner command. CLASSPATH="$HSQLDB_JAR_PATH" export CLASSPATH export PATH # Required only for some funny init environments. exec "$JAVA_EXECUTABLE" $AUTH_FILE_SWITCH $CLIENT_JVMARGS \ "-Dsqltoolsprayer.propfile=$PROPERTY_FILE" \ "-Dsqltoolsprayer.monfile=$PIDFILE" \ org.hsqldb.util.SqlToolSprayer '--;' ;; start) [ -n "$HSQLDB_PID" ] && { echo "There is already a hsqldb server running with pid $HSQLDB_PID." 1>&2 exit 1 } TLS_SWITCHES= [ -n "$TLS_KEYSTORE" ] && TLS_SWITCHES="-Djavax.net.ssl.keyStore=$TLS_KEYSTORE -Djavax.net.ssl.keyStorePassword=$TLS_PASSWORD" if [ -n "$HSQLDB_OWNER" ]; then touch "$PIDFILE" || { echo "Failed to create pid file" 1>&2 exit 1 } chown "$HSQLDB_OWNER" "$PIDFILE" || { echo "Failed to chown pid file to '$HSQLDB_OWNER'" 1>&2 exit 1 } # Some OSes choke if there are newlines in this string. # N.b.!!! The shell of the -c command is the target user's default # login shell, so keep this command shell-independent! nohup su "$HSQLDB_OWNER" -c "cd '$SERVER_HOME' && echo "'$$'" > '$PIDFILE' && exec '$JAVA_EXECUTABLE' $SERVER_JVMARGS $TLS_SWITCHES -classpath '${SERVER_ADDL_CLASSPATH}${HSQLDB_JAR_PATH}' org.hsqldb.util.MainInvoker org.hsqldb.$TARGET_CLASS $INVOC_ADDL_ARGS" >> "$LOGFILE" 2>&1 & else cd "$SERVER_HOME" || { echo "Failed to cd to '$SERVER_HOME'" 1>&2 exit 1 } export JAVA_EXECUTABLE export HSQLDB_JAR_PATH export PIDFILE export TLS_SWITCHES export SERVER_JVMARGS export TARGET_CLASS export INVOC_ADDL_ARGS nohup sh -c ' echo $$ > "$PIDFILE" || { echo "Failed to write pid to pid file" 1>&2 exit 1 } eval exec "$JAVA_EXECUTABLE" $SERVER_JVMARGS $TLS_SWITCHES -classpath "${SERVER_ADDL_CLASSPATH}${HSQLDB_JAR_PATH}" org.hsqldb.util.MainInvoker org.hsqldb.$TARGET_CLASS $INVOC_ADDL_ARGS ' >> "$LOGFILE" 2>&1 & fi sleep $SU_ECHO_SECS # Make sure bg commands have time to echo pid. AUTH_FILE_SWITCH= # N.b., there will be a problem if there are special characters or # spaces inside of $AUTH_FILE. [ -n "$AUTH_FILE" ] && AUTH_FILE_SWITCH="-Dsqltoolsprayer.rcfile=$AUTH_FILE" # Might as well set CLASSPATH for a cleaner command. CLASSPATH="$HSQLDB_JAR_PATH" export CLASSPATH export PATH # Required only for some funny init environments. # There are many reasons why we could fail to read the pid file, # but regardless of why, the pid file does not contain a valid pid. touch "$PIDCHECKER_FLAGFILE" || { echo "Failed to touch file '$PIDCHECKER_FLAGFILE'" 1>&2 exit 1 } export PIDCHECKER_FLAGFILE export PIDFILE ( while true; do # -a and -e tests are not portable. [ -f "$PIDCHECKER_FLAGFILE" ] || exit 0 kill -0 "`cat $PIDFILE`" > /dev/null 2>&1 || { rm -f "$PIDFILE" "$PIDCHECKER_FLAGFILE" exit 1 } sleep 1 done ) & "$JAVA_EXECUTABLE" $AUTH_FILE_SWITCH $CLIENT_JVMARGS \ "-Dsqltoolsprayer.propfile=$PROPERTY_FILE" \ "-Dsqltoolsprayer.monfile=$PIDFILE" \ "-Dsqltoolsprayer.maxtime=${MAX_START_SECS}000" \ org.hsqldb.util.SqlToolSprayer '--;' && { rm -f "$PIDCHECKER_FLAGFILE" echo "org.hsqldb.$TARGET_CLASS started with pid `cat $PIDFILE`" exit 0 } rm -f "$PIDCHECKER_FLAGFILE" echo "Failed to start org.hsqldb.$TARGET_CLASS. See log file '$LOGFILE'." 1>&2 exit 1 ;; stop|stopcompact) [ "$COMMAND" = stopcompact ] && SHUTDOWN_OPTION='compact' [ -n "$HSQLDB_PID" ] || { echo "I don't know of any running hsqldb server." 1>&2 exit 1 } AUTH_FILE_SWITCH= # N.b., there will be a problem if there are special characters or # spaces inside of $AUTH_FILE. [ -n "$AUTH_FILE" ] && AUTH_FILE_SWITCH="-Dsqltoolsprayer.rcfile=$AUTH_FILE" # Might as well set CLASSPATH for a cleaner command. CLASSPATH="$HSQLDB_JAR_PATH" export CLASSPATH export PATH # Required only for some funny init environments. "$JAVA_EXECUTABLE" $AUTH_FILE_SWITCH $CLIENT_JVMARGS \ "-Dsqltoolsprayer.propfile=$PROPERTY_FILE" \ org.hsqldb.util.SqlToolSprayer "shutdown ${SHUTDOWN_OPTION};" \ $SHUTDOWN_URLIDS sleep $MAX_TERMINATE_SECS # Give the JVM a sec. or 2 to fully exit. kill -0 "$HSQLDB_PID" > /dev/null 2>&1 && { echo "WARNING: hsqldb is still running!" 1>&2 exit 1 } rm -f "$PIDFILE" || { echo "Failed to remove pid file '$PIDFILE'" 1>&2 exit 1 } echo "Successful shutdown ${SHUTDOWN_OPTION} (for the $TARGET_CLASS process)!" exit 0 ;; restart|restartcompacted) STOP_COMMAND=stop [ "$COMMAND" = restartcompacted ] && STOP_COMMAND=stopcompact "${INVOC_PATH}"hsqldb $STOP_COMMAND || exit $? exec "${INVOC_PATH}"/hsqldb start ;; *) echo "$SYNTAX_MSG" 1>&2 exit 5 ;; esac hsqldb-1.8.0.10.orig/bin/runUtil.sh0000755000175000017500000000214510075541603015373 0ustar renerene#!/bin/sh # ----------------------------------------------------- # Run with -help for usage. # If $JAVA_HOME is set, editing this script should not be required. # Send any questions to fchoong@user.sourceforge.net # ----------------------------------------------------- # the value set here will override the value passed by $JAVA_HOME or the -jdkhome switch jdkhome="" jdkhome="" jargs="" thread_flag="" PRG=$0 # # resolve symlinks # while [ -h "$PRG" ]; do ls=`ls -ld "$PRG"` link=`expr "$ls" : '^.*-> \(.*\)$' 2>/dev/null` if expr "$link" : '^/' 2> /dev/null >/dev/null; then PRG="$link" else PRG="`dirname $PRG`/$link" fi done progdir=`dirname $PRG` progname=`basename $0` # ../ will lead us to the home dbhome="$progdir/.." # absolutize dbhome dbhome=`cd ${dbhome}; pwd` # # bring in needed functions . ${dbhome}/lib/functions #-------------------------------------------------------------------------------------------------------------- pre_main # # let's go # cd $dbhome/data exec "$jdkhome/bin/java" $thread_flag -classpath "$cp" $jargs "org.hsqldb.util.$@" # and we exit. hsqldb-1.8.0.10.orig/bin/runUtil.bat0000755000175000017500000000013307550074034015525 0ustar renerenecd ..\data @java -classpath ..\lib\hsqldb.jar org.hsqldb.util.%1 %2 %3 %4 %5 %6 %7 %8 %9 hsqldb-1.8.0.10.orig/docsrc/0000755000175000017500000000000010250423353014071 5ustar renerenehsqldb-1.8.0.10.orig/docsrc/formats-section.xml0000644000175000017500000000464210273521212017734 0ustar renerene

                Available formats for this document This document is available in several formats. You may be reading this document right now at &baseurl;, or in a distribution somewhere else. I hereby call the document distribution from which you are reading this, your current distro. &baseurl; hosts the latest production versions of all available formats. If you want a different format of the same version of the document you are reading now, then you should try your current distro. If you want the latest production version, you should try &baseurl;. Sometimes, distributions other than &baseurl; do not host all available formats. So, if you can't access the format that you want in your current distro, you have no choice but to use the newest production version at &baseurl;. Alternate formats of this document format your distro at &baseurl; Chunked HTML All-in-one HTML PDF
                hsqldb-1.8.0.10.orig/docsrc/readme-docauthors.txt0000644000175000017500000001143610242235363020250 0ustar renereneHOW TO CREATE AND WORK WITH DOCBOOK DOCUMENTS FOR HSQLDB At some point, this document itself should be converted to DocBook format. Our DocBook strategy is still subject to change. For now... TO CREATE A NEW DOCBOOK BOOK Think up a base filename for your document. It should be nice and short, without funny characters (but hyphens, other than leading hypends, are ok). Example: sqltool. Hereafter, I'll refer to this as your "book name". Create a subdirectory of "docsrc" with name of your book name. I'll refer to this directory (docsrc + book name) as "your book directory". Inside your book directory, create your main DocBook source file with name of your book name + ".xml", e.g. "sqltool.xml". Your DocBook document may reference or include shared files in the main 'docsrc' directory as well as any files which you put into your book directory. You may want to include sample .java files, screen shots, or component DocBook source files. Usually you will just copy these files right into your book directory. For examples of just about everything, see .../docsrc/sqltool/sqltool.xml. Notice that sqltool.xml pulls in a document section from the main docsrc directory. Add your book name to the .cvsignore file in the doc directory. Until all of the CVS artifacts are moved out of the "doc" directory, you will need to edit the clean-doc target in the build.xml file in the build directory so that it will remove the derived files for your book from under the doc directory. HOW TO REFERENCE OR INCLUDE OTHER FILES IN YOUR DOCBOOK SOURCE FILE(s). To link to outside documents (which you supply or not), you'll usually use the DocBook element. To "import" other documents, just use the general external parsed entity mechanism. This is a basic DTD-style XML feature where you use macros like &entityname;. Either find an XML reference or look around our existing DocBook source files for an example to follow. One tricky point is how to include external files verbatim. If you just read in external files as parsed entities, they will be parsed as DocBook source (and therefore they must consist of, at least, legal XML)*. But often you will want to import a real, working file (like a configuration file, sql file, Java source file), and you won't want to hack it up just so you can import it. (For one thing, you shouldn't have to; for another, you may want to provide a link to the file for download, so you wouldn't want people to download a hacked-up version). It would be nice if you could CDATA, then include the entity, but that won't work since the &...; inclusion directive would thereby be escaped. If you don't know what the hell CDATA is, just follow the instructions in the next paragraph. To import a document verbatim, define an external parsed entity for the file ../../docwork/BOOKNAME/cdata/file.name, where BOOKNAME is your book name and file.name is the name of the file to be imported (which resides in the current directory). If you want to know, what will happen is, the Ant build will copy the file-to-be-imported to the directory .../docwork/BOOKNAME/cdata and will sandwich it in a CDATA directive. If you want to provide a link to the document, you just ulink to the document in the current directory, not to the one in the cdata POSTNOTE: The long-term way to do this is with XInclude, or some other generic XML inclusion mechanism. Unfortunately, none of the good methods work with the Java ports of DocBook! ======================================================================= CONVENTIONS Please use elements to mark up notes for yourself or for other developers. All s should be removed before the doc goes public! Please capitalize HSQLDB like "Hsqldb" in titles, and capitalize like "HSQLDB" elsewhere. (In filepaths and package names you code as required for the filepath or package name, of course). ======================================================================= TIPS When closing DocBook and elements, make sure that there is no line break after the text to display and before the closing or tag. Otherwise the resultant display will not look right. Don't capitalize words or phrases to emphasize them (including in section titles or headings). If you want to emphasize something a certain way, then use a DocBook emphasis role, and leave the presentation decisions to the style sheets. It is very easy to set a CSS style to capitalize headings if you want them to appear that way. * Theoretically it would be better and SHOULD be simpler to use unparsed entities for this purpose, but unparsed entities are a messy legacy feature of DTD which is more convoluted than the strategy described here. hsqldb-1.8.0.10.orig/docsrc/guide/0000755000175000017500000000000010416761742015201 5ustar renerenehsqldb-1.8.0.10.orig/docsrc/guide/deployment.xml0000644000175000017500000005617610261455113020110 0ustar renerene Deployment Issues Fred Toussi HSQLDB Development Group ft@cluedup.com $Revision: 1.3 $ $Date: 2005/07/02 09:11:39 $ Hsqldb Guide Copyright 2005 Fred Toussi. Permission is granted to distribute this document without any alteration under the terms of the HSQLDB license. Additional permission is granted to the HSQLDB Development Group to distribute this document with or without alterations under the terms of the HSQLDB license.
                Purpose Many questions repeatedly asked in Forums and mailing lists are answered in this guide. If you want to use HSQLDB with your application, you should read this guide. This document covers system related issues. For issues related to SQL see the chapter.
                Mode of Operation and Tables HSQLDB has many modes of operation and features that allow it to be used in very different scenarios. Levels of memory usage, speed and accessibility by different applications are influenced by how HSQLDB is deployed.
                Mode of Operation The decision to run HSQLDB as a separate server process or as an in-process database should be based on the following: When HSQLDB is run as a server on a separate machine, it is isolated from hardware failures and crashes on the hosts running the application. When HSQLDB is run as a server on the same machine, it is isolated from application crashes and memory leaks. Server connections are slower than in-process connections due to the overhead of streaming the data for each JDBC call.
                Tables TEXT tables are designed for special applications where the data has to be in an interchangeable format, such as CSV. TEXT tables should not be used for routine storage of data. MEMORY tables and CACHED tables are generally used for data storage. The difference between the two is as follows: The data for all MEMORY tables is read from the .script file when the database is started and stored in memory. In contrast the data for cached tables is not read into memory until the table is accessed. Furthermore, only part of the data for each CACHED table is held in memory, allowing tables with more data than can be held in memory. When the database is shutdown in the normal way, all the data for MEMORY tables is written out to the disk. In comparison, the data in CACHED tables that has changed is written out at shutdown, plus a compressed backup of all the data in all cached tables. The size and capacity of the data cache for all the CACHED tables is configurable. This makes it possible to allow all the data in CACHED tables to be cached in memory. In this case, speed of access is good, but slightly slower than MEMORY tables. For normal applications it is recommended that MEMORY tables are used for small amounts of data, leaving CACHED tables for large data sets. For special applications in which speed is paramount and a large amount of free memory is available, MEMORY tables can be used for large tables as well
                Large Objects JDBC Clobs are supported as columns of the type LONGVARCHAR. JDBC Blobs are supported as columns of the type LONGVARBINARY. When large objects (LONGVARCHAR, LONGVARBINARY, OBJECT) are stored with table definitions that contain several normal fields, it is better to use two tables instead. The first table to contain the normal fields and the second table to contain the large object plus an identity field. Using this method has two benefits. (a) The first table can usually be created as a MEMORY table while only the second table is a CACHED table. (b) The large objects can be retrieved individually using their identity, instead of getting loaded into memory for finding the rows during query processing. An example of two tables and a select query that exploits the separation between the two follows: CREATE MEMORY TABLE MAINTABLE(MAINID INTEGER, ......); CREATE CACHED TABLE LOBTABLE(LOBID INTEGER, LOBDATA LONGVARBINARY); SELECT * FROM (SELECT * FROM MAINTABLE <join any other table> WHERE <various conditions apply>) JOIN LOBTABLE ON MAINID=LOBID; The inner SELECT finds the required rows without reference to the LOBTABLE and when it has found all the rows, retrieves the required large objects from the LOBTABLE.
                Deployment context The files used for storing HSQLDB database data are all in the same directory. New files are always created and deleted by the database engine. Two simple principles must be observed: The Java process running HSQLDB must have full privileges on the directory where the files are stored. This include create and delete privileges. The file system must have enough spare room both for the 'permanent' and 'temporary' files. The default maximum size of the .log file is 200MB. The .data file can grow to up to 8GB. The .backup file can be up to 50% of the .data file. The temporary file created at the time of a SHUTDOWN COMPACT can be equal in size to the .data file.
                Memory and Disk Use Memory used by the program can be thought of as two distinct pools: memory used for table data, and memory used for building result sets and other internal operations. In addition, when transactions are used, memory is utilised for storing the information needed for a rollback. Since version 1.7.1, memory use has been significantly reduced compared to previous versions. The memory used for a MEMORY table is the sum of memory used by each row. Each MEMORY table row is a Java object that has 2 int or reference variables. It contains an array of objects for the fields in the row. Each field is an object such as Integer, Long, String, etc. In addition each index on the table adds a node object to the row. Each node object has 6 int or reference variables. As a result, a table with just one column of type INTEGER will have four objects per row, with a total of 10 variables of 4 bytes each - currently taking up 80 bytes per row. Beyond this, each extra column in the table adds at least a few bytes to the size of each row. The memory used for a result set row has fewer overheads (fewer variables and no index nodes) but still uses a lot of memory. All the rows in the result set are built in memory, so very large result sets may not be possible. In server mode databases, the result set memory is released from the server once the database server has returned the result set. In-process databases release the memory when the application program releases the java.sql.ResultSet object. Server modes require additional memory for returning result sets, as they convert the full result set into an array of bytes which is then transmitted to the client. When UPDATE and DELETE queries are performed on CACHED tables, the full set of rows that are affected, including those affected due to ON UPDATE actions, is held in memory for the duration of the operation. This means it may not be possible to perform deletes or updates involving very large numbers of rows of CACHED tables. Such operations should be performed in smaller sets. When transactions support is enabled with SET AUTOCOMMIT OFF, lists of all insert, delete or update operations are stored in memory so that they can be undone when ROLLBACK is issued. Transactions that span hundreds of modification to data will take up a lot of memory until the next COMMIT or ROLLBACK clears the list. Most JVM implementations allocate up to a maximum amount of memory (usually 64 MB by default). This amount is generally not adequate when large memory tables are used, or when the average size of rows in cached tables is larger than a few hundred bytes. The maximum amount of allocated memory can be set on the java ... command line that is used for running HSQLDB. For example, with Sun JVM version 1.3.0 the parameter -Xmx256m increases the amount to 256 MB. 1.8.0 uses a fast cache for immutable objects such as Integer or String that are stored in the database. In most circumstances, this reduces the memory footprint still further as fewer copies of the most frequently-used objects are kept in memory.
                Cache Memory Allocation With CACHED tables, the data is stored on disk and only up to a maximum number of rows are held in memory at any time. The default is up to 3*16384 rows. The hsqldb.cache_scale database property can be set to alter this amount. As any random subset of the rows in any of the CACHED tables can be held in the cache, the amount of memory needed by cached rows can reach the sum of the rows containing the largest field data. For example if a table with 100,000 rows contains 40,000 rows with 1,000 bytes of data in each row and 60,000 rows with 100 bytes in each, the cache can grow to contain nearly 50,000 rows, including all the 40,000 larger rows. An additional property, hsqldb.cache_size_scale can be used in conjunction with the hsqldb.cache_scale property. This puts a limit in bytes on the total size of rows that are cached. When the default values is used for both properties, the limit on the total size of rows is approximately 50MB. (This is the size of binary images of the rows and indexes. It translates to more actual memory, typically 2-4 times, used for the cache because the data is represented by Java objects.) If memory is limited, the hsqldb.cache_scale or hsqldb.cache_size_scale database properties can be reduced. In the example above, if the hsqldb.cache_size_scale is reduced from 10 to 8, then the total binary size limit is reduced from 50MB to 12.5 MB. This will allow the number of cached rows to reach 50,000 small rows, but only 12,500 of the larger rows.
                Managing Database Connections In all running modes (server or in-process) multiple connections to the database engine are supported. In-process (standalone) mode supports connections from the client in the same Java Virtual Machine, while server modes support connections over the network from several different clients. Connection pooling software can be used to connect to the database but it is not generally necessary. With other database engines, connection pools are used for reasons that may not apply to HSQLDB. To allow new queries to be performed while a time-consuming query is being performed in the background. This is not possible with HSQLDB 1.8.0 as it blocks while performing the first query and deals with the next query once it has finished it. This capability is under development and will be introduced in a future version. To limit the maximum number of simultaneous connections to the database for performance reasons. With HSQLDB this can be useful only if your application is designed in a way that opens and closes connections for each small task. To control transactions in a multi-threaded application. This can be useful with HSQLDB as well. For example, in a web application, a transaction may involve some processing between the queries or user action across web pages. A separate connection should be used for each HTTP session so that the work can be committed when completed or rolled back otherwise. Although this usage cannot be applied to most other database engines, HSQLDB is perfectly capable of handling over 100 simultaneous HTTP sessions as individual JDBC connections. An application that is not both multi-threaded and transactional, such as an application for recording user login and logout actions, does not need more than one connection. The connection can stay open indefinitely and reopened only when it is dropped due to network problems. When using an in-process database with versions prior to 1.7.2 the application program had to keep at least one connection to the database open, otherwise the database would have been closed and further attempts to create connections could fail. This is not necessary since 1.7.2, which does not automatically close an in-process database that is opened by establishing a connection. An explicit SHUTDOWN command, with or without an argument, is required to close the database. In version 1.8.0 a connection property can be used to revert to the old behaviour. When using a server database (and to some extent, an in-process database), care must be taken to avoid creating and dropping JDBC Connections too frequently. Failure to observe this will result in unsuccessful connection attempts when the application is under heavy load.
                Upgrading Databases Any database not produced with the release version of HSQLDB 1.8.0 must be upgraded to this version. This includes databases created with the RC versions of 1.8.0. The instructions under the section should be followed in all cases. Once a database is upgraded to 1.8.0, it can no longer be used with Hypersonic or previous versions of HSQLDB. There may be some potential legacy issues in the upgrade which should be resolved by editing the .script file: Version 1.8.0 does not accept duplicate names for indexes that were allowed before 1.7.2. Version 1.8.0 does not accept duplicate names for table columns that were allowed before 1.7.0. Version 1.8.0 does not create the same type of index for foreign keys as versions before 1.7.2. Version 1.8.0 does not accept table or column names that are SQL identifiers without double quoting.
                Upgrading Using the SCRIPT Command To upgrade from 1.7.2 or 1.7.3 to 1.8.0, simply issue the SET SCRIPTFORMAT TEXT and SHUTDOWN SCRIPT commands with the old version, then open with the new version of the engine. The upgrade is then complete. To upgrade from older version database files (1.7.1 and older) that do not contain CACHED tables, simple SHUTDOWN with the older version and open with the new version. If there is any error in the .script file, try again after editing the .script file. To upgrade from older version database files (1.7.1 and older) that contain CACHED tables, use the SCRIPT procedure below. In all versions of HSQLDB and Hypersonic 1.43, the SCRIPT 'filename' command (used as an SQL query) allows you to save a full record of your database, including database object definitions and data, to a file of your choice. You can export a script file using the old version of the database engine and open the script as a database with 1.8.0. Upgrade Using SCRIPT procedure Open the original database in the old version of DatabaseManager Issue the SCRIPT command, for example SCRIPT 'newversion.script' to create a script file containing a copy of the database. Use the 1.8.0 version of DatabaseManager to create a new database, in this example 'newversion' in a different directory. SHUTDOWN this database. Copy the newversion.script file from step 2 over the file of the same name for the new database created in 4. Try to open the new database using DatabaseManager. If there is any inconsistency in the data, the script line number is reported on the console and the opening process is aborted. Edit and correct any problems in the newversion.script before attempting to open again. Use the guidelines in the next section (Manual Changes to the .script File). Use a programming editor that is capable of handling very large files and does not wrap long lines of text.
                Manual Changes to the .script File In 1.8.0 the full range of ALTER TABLE commands is available to change the data structures and their names. However, if an old database cannot be opened due to data inconsistencies, or the use of index or column names that are not compatible with 1.8.0, manual editing of the SCRIPT file can be performed. The following changes can be applied so long as they do not affect the integrity of existing data. Names of tables, columns and indexes can be changed. CREATE UNIQUE INDEX ... to CREATE INDEX ... and vice versa A unique index can always be converted into a normal index. A non-unique index can only be converted into a unique index if the table data for the column(s) is unique in each row. NOT NULL A not-null constraint can always be removed. It can only be added if the table data for the column has no null values. PRIMARY KEY A primary key constraint can be removed or added. It cannot be removed if there is a foreign key referencing the column(s). COLUMN TYPES Some changes to column types are possible. For example an INTEGER column can be changed to BIGINT, or DATE, TIME and TIMESTAMP columns can be changed to VARCHAR. After completing the changes and saving the modified *.script file, you can open the database as normal.
                Backing Up Databases The data for each database consists of up to 5 files in the same directory. The endings are *.properties, *.script, *.data, *.backup and *.log (a file with the *.lck ending is used for controlling access to the database and should not be backed up). These should be backed up together. The files can be backed up while the engine is running but care should be taken that a CHECKPOINT or SHUTDOWN operation does not take place during the backup. It is more efficient to perform the backup immediately after a CHECKPOINT. The *.data file can be excluded from the backup. In this case, when restoring, a dummy *.data file is needed which can be an empty, 0 length file. The engine will expand the *.backup file to replace this dummy file if the backup is restored. If the *.data file is not backed up, the *.properties file may have to be modified to ensure it contain modified=yes instead of modified=no prior to restoration. If a backup immediately follows a checkpoint, then the *.log file can also be excluded, reducing the significant files to *.properties, *.script and *.backup. Normal backup methods, such as archiving the files in a compressed bundle can be used.
                hsqldb-1.8.0.10.orig/docsrc/guide/sqltool.xml0000644000175000017500000046711010665323316017426 0ustar renerene SqlTool SqlTool Manual Blaine Simpson blaine.simpson@admc.com HSQLDB Development Group $Revision: 1.102 $ $Date: 2007/08/09 23:53:01 $ SqlTool HSQLDB SQL JDBC
                Purpose, Coverage, Changes in Behavior Purpose This document explains how to use SqlTool, the main purpose of which is to read your SQL text file or stdin, and execute the SQL commands therein against a JDBC database. There are also a great number of features to facilitate both interactive use and automation. The following paragraphs explain in a general way why SqlTool is better than any existing tool for text-mode interactive SQL work, and for automated SQL tasks. Two important benefits which SqlTool shares with other pure Java JDBC tools is that users can use a consistent interface and syntax to interact with a huge variety of databases-- any database which supports JDBC; plus the tool itself runs on any Java platform. Instead of using isql for Sybase, psql for Postgresql, Sql*plus for Oracle, etc., you can use SqlTool for all of them. As far as I know, SqlTool is the only production-ready, pure Java, command-line, generic JDBC client. Several databases come with a command-line client with limited JDBC abilities (usually designed for use with their specific database). SqlTool is purposefully not a Gui tool like Toad or DatabaseManager. There are many use cases where a Gui SQL tool would be better. Where automation is involved in any way, you really need a text client to at least test things properly and usually to prototype and try things out. A command-line tool is really better for executing SQL scripts, any form of automation, direct-to-file fetching, and remote client usage. To clarify this last, if you have to do your SQL client work on a work server on the other side of a VPN connection, you will quickly appreciate the speed difference between text data transmission and graphical data transmission, even if using VNC or Remote Console. Another case would be where you are doing some repetitive or very structured work where variables or language features would be useful. Gui proponents may disagree with me, but scripting (of any sort) is more efficient than repetitive copy & pasting with a Gui editor. SqlTool starts up very quickly, and it takes up a tiny fraction of the RAM required to run a comparably complex Gui like Toad. SqlTool is superior for interactive use because over many years it has evolved lots of features proven to be efficient for day-to-day use. Three concise help commands (\?, :?, and *?) list all available commands of the corresponding type. SqlTool doesn't support up-arrow or other OOB escapes (due to basic Java I/O limitations), but it more than makes up for this limitation with aliases, user variables, command-line history and recall, and command-line editing with extended Perl/Java regular expressions. The \d commands deliver JDBC metadata information as consistently as possible (in several cases, database-specific work-arounds are used to obtain the underlying data even though the database doesn't provide metadata according to the JDBC specs). Unlike server-side language features, the same feature set works for any database server. Database access details may be supplied on the command line, but day-to-day users will want to centralize JDBC connection details into a single, protected RC file. You can put connection details (username, password, URL, and other optional settings) for scores of target databases into your RC file, then connect to any of them whenever you want by just giving SqlTool the ID ("urlid") for that database. When you Execute SqlTool interactively, it behaves by default exactly as you would want it to. If errors occur, you are given specific error messages and you can decide whether to roll back your session. You can easily change this behavior to auto-commit, exit-upon-error, etc., for the current session or for all interactive invocations. You can import or export delimiter-separated-value files. When you Execute SqlTool with a SQL script, it behaves by default exactly as you would want it to. If any error is encountered, the connection will be rolled back, then SqlTool will exit with an error exit value. If you wish, you can detect and handle error (or other) conditions yourself. For scripts expected to produce errors (like many scripts provided by database vendors), you can have SqlTool continue-upon-error. For SQL script-writers, you will have access to portable scripting features which you've had to live without until now. You can use variables set on the command line or in your script. You can handle specific errors based on the output of SQL commands or of your variables. You can chain SQL scripts, invoke external programs, dump data to files, use prepared statements, Finally, you have a procedural language with if, foreach, while, continue, and break statements.
                Platforms and SqlTool versions covered SqlTool runs on any Java 1.4 or later platform. I haven't run it with a non-Sun JVM in years (like Blackdown, IBM, JRockit, etc.), but I've had no reports of problems with them, and SqlTool uses none of the Sun-proprietary classes directly. Some of the examples below use quoting which works exactly as-is for any Bourne-compatible UNIX shell. (Only line-continuation would need to be changed for C-compatible UNIX shells). I have not yet tested these commands on Windows, and I doubt whether the quoting will work just like this (though it is possible). SqlTool is still a very useful tool even if you have no quoting capability at all. If you are using SqlTool from a HSQLDB distribution before version 1.8.0.8 final, you should use the documentation with that distribution, because this manual documents many new features, several significant changes to interactive-only commands, and a few changes effecting backwards-compatibility (see next section about that). This document is now updated for the current versions of SqlTool and SqlFile at the time I am writing this (versions 333 and 354 correspondingly, SqlFile is the class which does most of the work for SqlTool). Therefore, if you are using a version of SqlTool or SqlFile that is more than a couple revisions greater, you should find a newer version of this document. (The imprecision is due to content-independent revision increments at build time, and the likelihood of one or two behavior-independent bug fixes after public releases). The startup banner will report both versions when you run SqlTool interactively. (Dotted version numbers of SqlTool and SqlFile are older than 333 and 354). This guide covers SqlTool bundled with series 1.8 and 1.9 of HSQLDB. To reduce the time I will need to spend maintaining this document, in this chapter I am giving the path to the sample directory as it is in HSQLDB 1.9.x distributions, namely, HSQLDB_HOME/sample. HSQLDB 1.8.x users should translate these sample directory paths to use HSQLDB_HOME/src/org/hsqldb/sample/....
                Functional Changes This section lists changes to SqlTool since the last major release of HSQLDB which may effect the portability of SQL scripts. For this revision of this document, this list consists of script-impacting changes made to SqlTool after the final 1.8.0.0 HSQLDB release. I'm specifically not listing changes to interactive-only commands (":" commands, with one legacy exception which is listed below), since these commands can't be used in SQL scripts; and I'm specifically not listing backwards-compatible feature additions and enhancements. The reason for limiting the change list to only portability- impacting changes is that a list of all enhancements since just 1.8.0.0 would be pages long. SqlTool now consistently outputs \r\n line breaks when on \r\n-linebreak platforms, like Windows. This includes output written to stdout, \w files, and \o files. Time type values are always output with the date as well as the time. This was required in order to produce consistent output for the wildly varying formats provided by different database vendors. DSV input now takes JDBC Timestamp format with date and optionally time of day. The command ":;" is now strictly an interactive command. If you want to repeat a command in an SQL scripts, just repeat the exact text of the command. Non-interactive use now has no dependency on command history. The command ":w" has replace the command \w. Unlike writing "output" to a file with \w, :w is used to write SQL "commands", and this is an interactive feature. Shell scripts using raw mode (e.g. PL/SQL scripts) must terminate the raw code with a line containing ".;", which will also send the code to the database for execution. (The old "." command has been changed to ":." to make it very clear that the command is now an interactive command). The --sql argument will never automatically append a semicolon to the text you provide. If you want to execute a command ending with a semi-- then type a semi. Although it doesn't effect scripts, I will mention a significant recent change to interactive commands. Special and PL commands are not stored to the edit buffer and to command history, so they can be recalled and edited just like SQL commands. Now, only edit/history : commands are not stored to the buffer and history.
                The Bare Minimum You Need to Know to Run SqlTool The Bare Minimum If you are using an Oracle database server, it will commit your current transaction if you cleanly disconnect, regardless of whether you have set auto-commit or not. This will occur if you exit SqlTool (or any other client) in the normal way (as opposed to killing the process or using Ctrl-C, etc.). This is mentioned in this section only for brevity, so I don't need to mention it in the main text in the many places where auto-commit is discussed. This behavior has nothing to do with SqlTool. It is a quirk of Oracle. If you want to use SqlTool, then you either have an SQL text file, or you want to interactively type in SQL commands. If neither case applies to you, then you are looking at the wrong program. To run SqlTool... Copy the file sqltool.rc from the directory sample of your HSQLDB distribution to your home directory and secure access to it if your computer is accessible to anybody else (most likely from the network). This file will work as-is for a Memory Only database instance; or if your target is a HSQLDB Server running on your local computer with default settings and the password for the "sa" account is blank (the sa password is blank when new HSQLDB database instances are created). Edit the file if you need to change the target Server URL, username, password, character set, JDBC driver, or TLS trust store as documented in the section. (You could, alternatively, use the --inlineRc command-line switch to specify your connection parameters as documented in the section). Find out where your hsqldb.jar file resides. It typically resides at HSQLDB_HOME/lib/hsqldb.jar where HSQLDB_HOME is the base directory of your HSQLDB software installation. For this reason, I'm going to use "$HSQLDB_HOME/lib/hsqldb.jar" as the path to hsqldb.jar for my examples, but understand that you need to use the actual path to your own hsqldb.jar file. Run java -jar $HSQLDB_HOME/lib/hsqldb.jar --help to see what command-line arguments are available. Note that you don't need to worry about setting the CLASSPATH when you use the -jar switch to java. Assuming that you set up your SqlTool RC file at the default location and you want to use the HSQLDB JDBC driver, you will want to run something like java -jar $HSQLDB_HOME/lib/hsqldb.jar mem for interactive use, or java -jar $HSQLDB_HOME/lib/hsqldb.jar --sql 'SQL statement;' mem or java -jar $HSQLDB_HOME/lib/hsqldb.jar mem filepath1.sql... where mem is an urlid, and the following arguments are paths to text SQL files. For the filepaths, you can use whatever wildcards your operating system shell supports. The urlid mem in these commands is a key into your RC file, as explained in the section. Since this is a Memory Only database, you can use SqlTool with this urlid immediately with no database setup whatsoever (however, you can't persist any changes that you make to this database). The sample sqltool.rc file also defines the urlid "localhost-sa" for a local HSQLDB Server. At the end of this section, I explain how you can load some sample data to play with, if you want to. SqlTool does not commit SQL changes by default. This leaves it to the user's disgression whether to commit or rollback their modifications. Remember to either run \= to commit before quitting SqlTool (most databases also support the SQL command commit;, or use the --autoCommit command-line switch. If you put a file named auto.sql into your home directory, this file will be executed automatically every time that you run SqlTool interactively and without the --noAutoFile switch. To use a JDBC Driver other than the HSQLDB driver, you can't use the -jar switch because you need to modify the classpath. You must add the hsqldb.jar file and your JDBC driver classes to your classpath, and you must tell SqlTool what the JDBC driver class name is. The latter can be accomplished by either using the "--driver" switch, or setting "driver" in your config file. The section. explains the second method. Here's an example of the first method (after you have set the classpath appropriately). java org.hsqldb.util.SqlTool --driver oracle.jdbc.OracleDriver urlid If the tables of query output on your screen are all messy because of lines wrapping, the best and easiest solution is usually to resize your terminal emulator window to make it wider. (With some terms you click & drag the frame edges to resize, with others you use a menu system where you can enter the number of columns). If you are using SqlTool to connect to a HSQLDB network server or any non-HSQLDB database, you may prefer to use the jar file hsqltool.jar or hsqldbutil.jar instead of hsqldb.jar. These alternative jar files contain all of SqlTool without stuff you don't need, but you will have to follow a simple procedure to generate these jars. See the section.
                Non-displayable Types There are many SQL types which SqlTool (being a text-based program) can't display properly. This includes the SQL types BLOB, JAVA_OBJECT, STRUCT, and OTHER. When you run a query that returns any of these, SqlTool will save the very first such value obtained to the binary buffer and will not display any output from this query. You can then save the binary value to a file, as explained in the section. There are other types, such as BINARY, which JDBC can make displayable (by using ResultSet.getString()), but which you may very well want to retrieve in raw binary format. You can use the \b command to retrieve any-column-type-at-all in raw binary format (so you can later store the value to a binary file). Another restriction which all text-based database clients have is the practical inability for the user to type in binary data such as photos, audio streams, and serialized Java objects. You can use SqlTool to load any binary object into a database by telling SqlTool to get the insert/update datum from a file. This is also explained in the section.
                Desktop shortcuts Desktop shortcuts and quick launch icons are useful, especially if you often run SqlTool with the same set of arguments. It's really easy to set up several of them-- one for each way that you invoke SqlTool (i.e., each one would start SqlTool with all the arguments for one of your typical startup needs). One typical setup is to have one shortcut for each database account which you normally use (use a different urlid argument in each shortcut's Target specification. Desktop icon setup varies depending on your Desktop manager, of course. I'll explain how to set up a SqlTool startup icon in Windows XP. Linux and Mac users should be able to take it from there, since it's easier with the common Linux and Mac desktops. Creating a Desktop Shortcut for SqlTool Right click in the main Windows background. New Shortcut Browse Navigate to where your good JRE lives. For recent Sun JRE's, it installs to C:\Program Files\Java\*\bin by default (the * will be a JDK or JRE name and version number). Select java.exe. OK Next Enter any name Finish Right click the new icon. Properties Edit the Target field. Leave the path to java.exe exactly as it is, including the quotes, but append to what is there. Beginning with a space, enter the command-line that you want run. Change Icon... to a pretty icon. If you want a quick-launch icon instead of (or in addition to) a desktop shortcut icon, click and drag it to your quick launch bar. (You may or may not need to edit the Windows Toolbar properties to let you add new items).
                Loading sample data If you want some sample database objects and data to play with, execute the sampledata.sql SQL file. sampledata.sql resides in the sample directory of your HSQLDB distribution . To separate the sample data from your regular data, you can put it into its own schema by running this before you import: CREATE SCHEMA sampledata AUTHORIZATION dba; SET SCHEMA sampledata; Run it like this from an SqlTool session \i HSQLDB_HOME/sample/sampledata.sql where HSQLDB_HOME is the base directory of your HSQLDB software installation . For memory-only databases, you'll need to run this every time that you run SqlTool. For other (persistent) databases, the data will reside in your database until you drop the tables.
                RC File Authentication Setup RC file authentication setup is accomplished by creating a text RC configuration file. In this section, when I say configuration or config file, I mean an RC configuration file. RC files can be used by any JDBC client program that uses the org.hsqldb.util.RCData class-- this includes SqlTool, DatabaseManager, DatabaseManagerSwing. You can use it for your own JDBC client programs too. The following sample RC file resides at sample/sqltool.rc in your HSQLDB distribution . Sample RC File &sqltool.rc-cdata; You can put this file anywhere you want to, and specify the location to SqlTool/DatabaseManager/DatabaseManagerSwing by using the --rcfile argument. If there is no reason to not use the default location (and there are situations where you would not want to), then use the default location and you won't have to give --rcfile arguments to SqlTool/DatabaseManager/DatabaseManagerSwing. The default location is sqltool.rc or dbmanager.rc in your home directory (corresponding to the program using it). If you have any doubt about where your home directory is, just run SqlTool with a phony urlid and it will tell you where it expects the configuration file to be. java -jar $HSQLDB_HOME/lib/hsqldb.jar x The config file consists of stanza(s) like this: urlid web url jdbc:hsqldb:hsql://localhost username web password webspassword These four settings are required for every urlid. (There are optional settings also, which are described a couple paragraphs down). The URL may contain JDBC connection properties. You can have as many blank lines and comments like # This comment in the file as you like. The whole point is that the urlid that you give in your SqlTool/DatabaseManager command must match a urlid in your configuration file. Use whatever facilities are at your disposal to protect your configuration file. It should be readable, both locally and remotely, only to users who run programs that need it. On UNIX, this is easily accomplished by using chmod/chown commands and making sure that it is protected from anonymous remote access (like via NFS, FTP or Samba). You can also put the following optional settings into a urlid stanza. The setting will, of course, only apply to that urlid. charset This is used by the SqlTool program, but not by the DatabaseManager programs. See the section of the section. You can, alternatively, set this for one SqlTool invocation by setting the system property sqlfile.charset . Defaults to US-ASCII. driver Sets the JDBC driver class name. You can, alternatively, set this for one SqlTool/DatabaseManager invocation by using the command line switch --driver. Defaults to org.hsqldb.jdbcDriver. truststore TLS trust keystore store file path as documented in the chapter. You usually only need to set this if the server is using a non-publicly-certified certificate (like a self-signed self-ca'd cert). Property and SqlTool command-line switches override settings made in the configuration file.
                Using Inline RC Authentication Inline RC authentication setup is accomplished by using the --inlineRc command-line switch on SqlTool. The --inlineRc command-line switch takes a comma-separated list of key/value elements. The url and user elements are required. The rest are optional. url The JDBC URL of the database you wish to connect to. user The username to connect to the database as. charset Sets the character encoding. Defaults to US-ASCII. trust The TLS trust keystore file path as documented in the TLS chapter. password You may only use this element to set empty password, like password= . For any other password value, omit the password element and you will be prompted for the value. (Use the --driver switch instead of --inlineRc to specify a JDBC driver class). Here is an example of invoking SqlTool to connect to a standalone database. java -jar $HSQLDB_HOME/lib/hsqldb.jar --inlineRc URL=jdbc:hsqldb:file:/home/dan/dandb,USER=dan For security reasons, you cannot specify a non-empty password as an argument. You will be prompted for a password as part of the login process.
                Using the current version of SqlTool with an older HSQLDB distribution. This procedure will allow users of a legacy version of HSQLDB to use all of the new features of SqlTool. You will also get the new versions of the DatabaseManagers! This procedure works for distros going back to 1.7.3.3 at least, probably much farther. Follow the instructions in the See the section to build the jar file hsqldbutil.jar. For now on, whenever you are going to run SqlTool, make sure that you have this hsqldbutil.jar as the first item in your CLASSPATH. You can't run SqlTool with the "-jar" switch (because the -jar switch doesn't permit setting your own class path). Here's a UNIX example where somebody wants to use the new SqlTool with their older HSQLDB database, as well as with Postgresql and a local application. CLASSPATH=/path/to/hsqldbutil.jar:/home/bob/classes:/usr/local/lib/pg.jdbc3.jar export CLASSPATH java org.hsqldb.util.SqlTool urlid
                Interactive Usage Do read the section before you read this section. You run SqlTool interactively by specifying no SQL filepaths on the SqlTool command line. Like this. java -jar $HSQLDB_HOME/lib/hsqldb.jar urlid What happens when SqlTool is run interactively (using all default settings) SqlTool starts up and connects to the specified database, using your SqlTool configuration file (as explained in the section). SQL file auto.sql in your home directory is executed (if there is one), SqlTool displays a banner showing the SqlTool and SqlFile version numbers and describes the different command types that you can give, as well as commands to list all of the specific commands available to you. You exit your session by using the "\q" special command or ending input (like with Ctrl-D or Ctrl-Z). Every command (regardless of type) and comment must begin at the beginning of a line (or immediately after a comment ends with "*/"). You can't nest commands or comments. You can only start new commands (and comments) after the preceding statement has been terminated. (Remember that if you're running SqlTool interactively, you can terminate an SQL statement without executing it by entering a blank line). (Special Commands, Edit Buffer Commands and PL Commands always consist of just one line. Any of these commands or comments may be preceded by space characters.) These rules do not apply at all to . Raw mode is for use by advanced users when they want to completely bypass SqlTool processing in order to enter a chunk of text for direct transmission to the database engine.
                Command Types When you are typing into SqlTool, you are always typing part of the immediate command. You execute the immediate command by hitting ENTER after a semi-colon (for SQL commands) or by just hitting ENTER (after any other non-empty command-- see next section about this distinction). The interactive : commands can perform actions with or on the edit buffer. The edit buffer usually contains a copy of the last command executed, and you can always view it with the :b command. If you never use any : commands, you can entirely ignore the edit buffer. If you want to repeat commands or edit previous commands, you will need to work with the edit buffer. The immediate command contains whatever (and exactly what) you type. The command history and edit buffer may contain any type of command other than comments and : commands (i.e., : commands and comments are just not copied to the history or to the edit buffer). Hopefully an example will clarify the difference between the immediate command and the edit buffer. If you type in the edit buffer Substitution command ":s/tbl/table/", the :s command that you typed is the immediate command (and it will never be stored to the edit buffer or history, since it is a : command), but the purpose of the substitution command is to modify the contents of the edit buffer (perform a substitution on it)-- the goal being that after your substitutions you would execute the buffer with the ":;" command. The ":a" command is special in that when you hit ENTER to execute it, it copies the contents of the edit buffer to a new immediate command and leaves you in a state where you are appending to that immediate command (nearly) exactly as if you had just typed it in.
                Command Types Command types SQL Statement Any command that you enter which does not begin with "\", ":", or "* " is an SQL Statement. The command is not terminated when you hit ENTER, like most OS shells. You terminate SQL Statements with either ";" at the end of a line, or with a blank line. In the former case, the SQL Statement will be executed against the SQL database and the command will go into the edit buffer and SQL command history for editing or viewing later on. In the former case, execute against the SQL database means to transmit the SQL text to the database engine for execution. In the latter case (you end an SQL Statement with a blank line), the command will go to the edit buffer and SQL history, but will not be executed (but you can execute it later from the edit buffer). (See the note immediately above about multiple SQL statements in one SqlTool command). (Blank lines are only interpreted this way when SqlTool is run interactively. In SQL files, blank lines inside of SQL statements remain part of the SQL statement). As a result of these termination rules, whenever you are entering text that is not a Special Command, Edit Buffer / History Command, or PL Command, you are always appending lines to an SQL Statement or comment. (In the case of the first line, you will be appending to an empty SQL statement. I.e. you will be starting a new SQL Statement or comment). Special Command Run the command "\?" to list the Special Commands. All of the Special Commands begin with "\". I'll describe some of the most useful Special Commands below. Edit Buffer / History Command Run the command ":?" to list the Edit-Buffer/History Commands. All of these commands begin with ":". These commands use commands from the command history, or operate upon the edit "buffer", so that you can edit and/or (re-)execute previously entered commands. PL Command Procedural Langage commands. Run the command "*?" to list the PL Commands. All of the PL Commands begin with "*". PL commands are for setting and using scripting variables and conditional and flow control statements like * if and * while. A few PL features (such as PL aliases and updating and selecing data directly from/to files) can be a real convenience for nearly all users, so these features will be discussed briefly in this section. More detailed explanation of PL variables and the other PL features, with examples, are covered in the section. Raw Mode The descriptions of command-types above do not apply to . In raw mode, SqlTool doesn't interpret what you type at all. It all just goes into the edit buffer which you can send to the database engine. Beginners can safely ignore raw mode. You will never encounter it unless you run the "\." special command, or enter a PL/SQL command. See the section for the details. Above, we said that if you enter an SQL command, one SQL command corresponds to one SqlTool command. This is the most typical usage, however, you can actually put multiple SQL statements into one SQL command. One example would be INSERT INTO t1 VALUES(0); SELECT * FROM t1; This is one SqlTool command containing two SQL statements. See the section to see why you may want to chunk SQL commands, how, and the implications.
                Special Commands Essential Special Commands \? help \q quit \i path/to/script.sql execute the specified SQL script, then continue again interactively. \= commit the current SQL transaction. Most users are used to typing the SQL statement commit;, but this command is crucial for those databases which don't support the statement. It's obviously unnecessary if you have auto-commit mode on. \x? List a summary of DSV eXporting, and all available DSV options. \m? List a summary of DSV iMporting, and all available DSV options. \d? List a summary of the \d commands below. \dt [filter_substring] \dv [filter_substring] \ds [filter_substring] \di [table_name] \dS [filter_substring] \da [filter_substring] \dn [filter_substring] \du [filter_substring] \dr [filter_substring] \d* [filter_substring] Lists available objects of the given type. t: non-system Tables v: Views s: Sequences i: Indexes S: System tables a: Aliases n: schema Names u: database Users r: Roles *: all table-like objects If your database supports schemas, then the schema name will also be listed. If you supply an optional filter substring, then only items which contain the given substring (in the object name or schema name) will be listed. The substring test is case-sensitive! Even though in SQL queries and for the "\d objectname" command object names are usually case-insensitive, for the \dX commands, you must capitalize the filter substring exactly as it will appear in the special command output. This is an inconvenience, since the database engine will change names in SQL to default case unless you double-quote the name, but that is server-side functionality which cannot (portably) be reproduced by SqlTool. You can use spaces and other special characters in the string. Filter substrings ending with "." are special. If a substring ends with ".", then this means to narrow the search by the exact, case-sensitive schema name given. For example, if I run "\d* BLAINE.", this will list all table-like database objects in the "BLAINE" schema. The capitalization of the schema must be exactly the same as how the schema name is listed by the "\dn" command. You can use spaces and other special characters in the string. (I.e., enter the name exactly how you would enter it inside of double-quotes in an SQL command). This is an inconvenience, since the database engine will change names in SQL to default case unless you double-quote the name, but that is server-side functionality which cannot (portably) be reproduced by SqlTool. Indexes may not be searched for by substring, only by exact target table name. So if I1 is an index on table T1, then you list this index by running "\di T1". In addition, many database vendors will report on indexes only if a target table is identified. Therefore, "\di" with no argument will fail if your database vendor does not support it. \d objectname [filter] Lists names of columns in the specified table or view. objectname may be a base table name or a schema.object name. If you supply a filter string, then only columns with a name containing the given filter will be listed. The objectname is nearly always case-insensitive (depends on your database), but the filter is always case-sensitive. You'll find this filter is a great convenience compared to other database utilities, where you have to list all columns of large tables when you are only interested in one of them. When working with real data (as opposed to learning or playing), I often find it useful to run two SqlTool sessions in two side-by-side terminal emulator windows. I do all of my real work in one window, and use the other mostly for \d commands. This way I can refer to the data dictionary while writing SQL commands, without having to scroll. This list here includes only the essential Special Commands, but n.b. that there are other useful Special Commands which you can list by running \?. (You can, for example, execute SQL from external SQL files, and save your interactive SQL commands to files). Some specifics of these other commands are specified immediately below, and the section explains how to use the "\o" and "\H" special commands to generate reports. Be aware that the \! Special Command does not work for external programs that read from standard input. You can invoke non-interactive and graphical interactive programs, but not command-line interactive programs. SqlTool executes \! programs directly, it does not run an operating system shell (this is to avoid OS-specific code in SqlTool). Because of this, you can give as many command-line arguments as you wish, but you can't use shell wildcards or redirection. The \w command can be used to store any command in your SQL history to a file. Just restore the command to the edit buffer with a command like "\-4" before you give the \w command.
                Edit Buffer / History Commands Edit Buffer / History Commands :? help :b List the current contents of the edit buffer. :h Shows the Command History. For each command which has been executed (up to the max history length), the SQL command history will show the command; its command number (#); and also how many commands back it is (as a negative number). : commands are never added to the history list. You can then use either form of the command identifier to recall a command to the edit buffer (the command described next) or as the target of any of the following : commands. This last is accomplished in a manner very similar to the vi editor. You specify the target command number between the colon and the command. As an example, if you gave the command :s/X/Y/, that would perform the substitution on the contents of the edit buffer; but if you gave the command :-3 s/X/Y/, that would perform the substitution on the command 3 back in the command history (and copy the output to the edit buffer). Also, just like vi, you can identify the command to recall by using a regular expression inside of slashes, like :/blue/ s/X/Y/ to operate on the last command you ran which contains "blue". :13 OR :-2 OR :/blue/ Recalls a command from Command history to the edit buffer. Enter ":" followed by the positive command number from Command history, like ":13"... or ":" followed by a negative number like ":-2" for two commands back in the Command history... or ":" followed by a regular expression inside slashes, like ":/blue/" to recall the last command which contains "blue". The specified command will be written to the edit buffer so that you can execute it or edit it using the commands below. As described under the :h command immediately above, you can follow the command number here with any of the commands below to perform the given operation on the specified command from history instead of on the edit buffer contents. So, for example, ":4;" would load command 4 from history then execute it (see the ":;" command below). :; Executes the SQL, Special or PL statement in the edit buffer (by default). This is an extremely useful command. It's easy to remember because it consists of ":", meaning Edit Buffer Command, plus a line-terminating ";", (which generally means to execute an SQL statement, though in this case it will also execute a special or PL command). :a Enter append mode with the contents of the edit buffer (by default) as the current command. When you hit ENTER, things will be exactly as if you physically re-typed the command that is in the edit buffer. Whatever lines you type next will be appended to the immediate command. As always, you then have the choice of hitting ENTER to execute a Special or PL command, entering a blank line to store back to the edit buffer, or end a SQL statement with semi-colon and ENTER to execute it. You can, optionally, put a string after the :a, in which case things will be exactly as just described except the additional text will also be appended to the new immediate command. If you put a string after the :a which ends with ;, then the resultant new immediate command will just be executed right away, as if you typed in and entered the entire thing. If your edit buffer contains SELECT x FROM mytab and you run a:le, the resultant command will be SELECT x FROM mytable. If your edit buffer contains SELECT x FROM mytab and you run a: ORDER BY y, the resultant command will be SELECT x FROM mytab ORDER BY y. Notice that in the latter case the append text begins with a space character. :s/from regex/to string/switches The Substitution Command is the primary method for SqlTool command editing-- it operates upon the current edit buffer by default. The "to string" and the "switches" are both optional (though the final "/" is not). To start with, I'll discuss the use and behavior if you don't supply any substitution mode switches. Don't use "/" if it occurs in either "from string" or "to string". You can use any character that you want in place of "/", but it must not occur in the from or to strings. Example :s@from string@to string@ The to string is substituted for the first occurrence of the (case-specific) from string. The replacement will consider the entire SQL statement, even if it is a multi-line statement. In the example above, the from regex was a plain string, but it is interpreted as a regular expression so you can do all kinds of powerful substitutions. See the perlre man page, or the java.util.regex.Pattern API Spec for everything you need to know about extended regular expressions. Don't end a to string with ";" in attempt to make a command execute. There is a substitution mode switch to use for that purpose. You can use any combination of the substitution mode switches. Use "i" to make the searches for from regex case insensitive. Use "g" to substitute Globally, i.e., to subsitute all occurrences of the from regex instead of only the first occurrence found. Use ";" to execute the command immediately after the substitution is performed. Use "m" for ^ and $ to match each line-break in a multi-line edit buffer, instead of just at the very beginning and every end of the entire buffer. If you specify a command number (from the command history), you end up with a feature very reminiscent of vi, but even more powerful, since the Perl/Java regular expression are a superset of the vi regular expressions. As an example, :24 s/pin/needle/g; would start with command number 24 from command history, substitute "needle" for all occurrences of "pin", then execute the result of that substitution (and this final statement will of course be copied to the edit buffer and to command history). :w /path/to/file.sql This appends the contents of the current buffer (by default) to the specified file. Since what is being written are Special, PL, or SQL commands, you are effectively creating an SQL script. I find the ":/regex/" and ":/regex/;" constructs particularly handy for every-day usage. :/\\d/; re-executes the last \d command that you gave (The extra "\" is needed to escape the special meaning of "\" in regular expressions). It's great to be able to recall and execute the last "insert" command, for example, without needing to check the history or keep track of how many commands back it was. To re-execute the last insert command, just run ":/insert/;". If you want to be safe about it, do it in two steps to verify that you didn't accidentally recall some other command which happened to contain the string "insert", like :/insert/ :;(Executing the last only if you are satisfied when SqlTool reports what command it restored). Often, of course, you will want to change the command before re-executing, and that's when you combine the :s and :a commands. We'll finish up with a couple fine points about Edit/Buffer commands. You generally can't use PL variables in Edit/Buffer commands, to eliminate possible ambiguities and complexities when modifying commands. The :w command is an exception to this rule, since it can be useful to use variables to determine the output file, and this command does not do any "editing". The :? help explains how you can change the default regular expression matching behavior (case sensitivity, etc.), but you can always use syntax like "(?i)" inside of your regular expression, as described in the Java API spec for class java.util.regex.Pattern, found here. History-command-matching with the /regex/ construct is purposefully liberal, matching any portion of the command, case sensitive, etc., but you can still use the method just described to modify this behavior. In this case, you could use "(?-i)" at the beginning of your regular expression to be case-sensitive.
                PL Commands Essential PL Command * VARNAME = value Set the value of a variable. If the variable doesn't exist yet, it will be created. The most common use for this is so that you can later use it in SQL statements, print statements, and PL conditionals, by using the *{VARNAME} or *{:VARNAME} construct. The only difference between *{VARNAME} and *{:VARNAME} is that the former produces an error if VARNAME is not set, whereas the latter will expand to a zero-length string if VARNAME is not set. If you set a variable to an SQL statement (without the terminating ";") you can then use it as a PL alias like /VARNAME, as shown in this example. Defining and using a PL alias (PL variable) * qry = SELECT COUNT(*) FROM mytable \p The stored query is '*{qry}' /qry; /qry WHERE mass > 200; If you put variable definitions into the SQL file auto.sql in your home directory, those aliases/variables will always be available for interactive use. PL variables can be expanded within all commands other than : edit/history commands. * load VARNAME /file/path.txt Sets VARNAME to the content of the specified ASCII file. * prepare VARNAME Indicate that next command should be a SQL INSERT or UPDATE command containing one question mark. The value of VARNAME will be substuted for the ? variable. This does work for CLOB columns. * VARNAME _ When next SQL command is run, instead of displaying the rows, just store the very first column value to variable VARNAME. This works for CLOB columns too. It also works with Oracle XML type columns if you use column labels and the getclobval function. * VARNAME ~ Exactly the same as * VARNAME ~ except that the fetched results will be displayed in addition to setting the variable. * dump VARNAME /file/path.txt Store the value of VARNAME to the specified ASCII file.
                ? Variable You don't set the ? variable. It is just like the Bourne shell variable ? in that it is always automatically set to the first value of a result set (or the return value of other SQL commands). It works just like the * VARNAME ~ command described above, but it all happens automatically. You can, of course, dereference ? like any PL variable, but it does not list with the list and listvalues commands. You can see the value whenever you want by running \p *{?} Note that PL commands are used to upload and download column values to/from local ASCII files, but the corresponding actions for binary files use the special \b commands. This is because PL variables are used for ASCII values and you can store any number of column values in PL variables. This is not true for binary column values. The \b commands work with a single binary byte buffer. See the section below for information on using variables in other ways, and information on the other PL commands and features.
                Storing and retrieving binary files You can upload binary files such as photographs, audio files, or serialized Java objects into database columns. SqlTool keeps one binary buffer which you can load from files with the \bl command, or from a database query by doing a one-row query for any non-displayable type (including BLOB, OBJECT, and OTHER). In the latter case, the data returned for the first non-displayable column of the first result row will be stored into the binary buffer. Once you have data in the binary buffer, you can upload it to a database column (including BLOB, OBJECT, and OTHER type columns), or save it to a file. The former is accomplished by the special command \bp followed by a prepared SQL query containing one question mark place-holder to indicate where the data gets inserted. The latter is accomplished with the \bd command. You can also store the output from normal, displayable column into the binary buffer by using the special command \b. The very first column value from the first result row of the next SQL command will be stored to the binary byte buffer. Inserting binary data into database from a file \bl /tmp/favoritesong.mp3 \bp INSERT INTO musictbl (id, stream) VALUES(3112, ?); Downloading binary data from database to a file SELECT stream FROM musictbl WHERE id = 3112; \bd /tmp/favoritesong.mp3 You can also store and retrieve text column values to/from ASCII files, as documented in the section.
                Command History The SQL history shown by the \h command, and used by other commands, is truncated to 100 entries, since its utility comes from being able to quickly view the history list. You can change the history length by setting the system property sqltool.historyLength to an integer like java -Dsqltool.historyLength=100 -jar $HSQLDB_HOME/lib/hsqldb.jar urlid If there is any demand, I'll make the setting of this value more convenient. The SQL history list contains all executed commands other than Edit Buffer commands and comments, even if the command has a syntax error or fails upon execution. The reason for including bad commands is so that you can recall and fix them if you wish to. The same applies to the edit buffer. If you copy a command to the edit buffer by entering blank line, or if you edit the edit buffer, that edit buffer value will never make it into the command history until and if you execute it.
                Shell scripting and command-line piping You normally use non-interactive mode for input piping. You specify "-" as the SQL file name. See the subsection of the Non-Interactive chapter.
                Emulating Non-Interactive mode You can run SqlTool interactively, but have SqlTool behave exactly as if it were processing an SQL file (i.e., no command-line prompts, error-handling that defaults to fail-upon-error, etc.). Just specify "-" as the SQL file name in the command line. This is a good way to test what SqlTool will do when it encounters any specific command in an SQL file. See the subsection of the Non-Interactive chapter for an example.
                Non-Interactive Read the section if you have not already, because much of what is in this section builds upon that. You can skip all discussion about Command History and the edit buffer if you will not use those interactive features. If you're doing data updates, remember to issue a commit command or use the --autoCommit switch. As you'll see, SqlTool has many features that are very convenient for scripting. But what really makes it superior for automation tasks (as compared to SQL tools from other vendors) is the ability to reliably detect errors and to control JDBC transactions. SqlTool is designed so that you can reliably determine if errors occurred within SQL scripts themselves, and from the invoking environment (for example, from a perl, Bash, or Python script, or a simple cron tab invocation).
                Giving SQL on the Command Line If you just have a couple Commands to run, you can run them directly from the comand-line or from a shell script without an SQL file, like this. java -jar $HSQLDB_HOME/lib/hsqldb.jar --sql 'SQL statement;' urlid The --sql automatically implies --noinput, so if you want to execute the specified SQL before and in addition to an interactive session (or stdin piping), then you must also give the --stdinput switch. Since SqlTool transmits SQL statements to the database engine only when a line is terminated with ";", if you want feedback from multiple SQL statements in an --sql expression, you will need to use functionality of your OS shell to include linebreaks after the semicolons in the expression. With any Bourne-compatible shell, you can include linebreaks in the SQL statements like this. java -jar $HSQLDB_HOME/lib/hsqldb.jar --sql ' SQL statement number one; SQL statement number two; SQL statement three; ' urlid If you don't need feedback, just separate the SQL commands with semicolons and the entire expression will be chunked. The --sql switch is very useful for setting shell variables to the output of SQL Statements, like this. # A shell script USERCOUNT=`java -jar $HSQLDB_HOME/lib/hsqldb.jar --sql ' select count(*) from usertbl; ' urlid` || { # Handle the SqlTool error } echo "There are $USERCOUNT users registered in the database." [ "$USECOUNT" -gt 3 ] && { # If there are more than 3 users registered # Some conditional shell scripting
                SQL Files Just give paths to sql text file(s) on the command line after the urlid. Often, you will want to redirect output to a file, like java -jar $HSQLDB_HOME/lib/hsqldb.jar sql... > /tmp/log.sql 2>&1 (Skip the "2>&1" if you're on Windows). You can also execute SQL files from an interactive session with the "\i"' Special Command, but be aware that the default behavior in an interactive session is to continue upon errors. If the SQL file was written without any concern for error handling, then the file will continue to execute after errors occur. You could run \c false before \i filename, but then your SqlTool session will exit if an error is encountered in the SQL file. If you have an SQL file without error handling, and you want to abort that file when an error occurs, but not exit SqlTool, the easiest way to accomplish this is usually to add \c false to the top of the script. If you specify multiple SQL files on the command-line, the default behavior is to exit SqlTool immediately if any of the SQL files encounters an error. SQL files themselves have ultimate control over error handling. Regardless of what command-line options are set, or what commands you give interactively, if a SQL file gives error handling statements, they will take precedence. You can also use \i in SQL files. This results in nested SQL files. You can use the following SQL file, sample.sql, which resides in the sample directory of your HSQLDB distribution . It contains SQL as well as Special Commands making good use of most of the Special Commands documented below. &sample.sql-cdata; You can execute this SQL file with a Memory Only database with a command like java -jar $HSQLDB_HOME/lib/hsqldb.jar --sql ' create user tomcat password "x"; ' mem path/to/hsqldb/sample/sample.sql (The --sql "create...;" arguments create an account which the script uses). You should see error messages betwen the Continue-on-error...true and Continue-on-error...false. The script purposefully runs commands that might fail there. The reason the script does this is to perform database-independent conditional table removals. (The SQL clause IF EXISTS is more graceful and succinct, and should be used if you don't need to support databases which don't support IF EXISTS). If an error occurs when continue-on-error is false, the script would abort immedately.
                Piping and shell scripting You can of course, redirect output from SqlTool to a file or another program. java -jar $HSQLDB_HOME/lib/hsqldb.jar urlid file.sql > file.txt 2>&1 java -jar $HSQLDB_HOME/lib/hsqldb.jar urlid file.sql 2>&1 | someprogram... You can type commands in to SqlTool while being in non-interactive mode by supplying "-" as the file name. This is a good way to test how SqlTool will behave when processing your SQL files. java -jar $HSQLDB_HOME/lib/hsqldb.jar urlid - This is how you have SqlTool read its input from another program: Piping input into SqlTool echo "Some SQL commands with '$VARIABLES';" | java -jar $HSQLDB_HOME/lib/hsqldb.jar urlid - Make sure that you also read the section. The --sql switch is a great facility to use with shell scripts.
                Optimally Compatible SQL Files If you want your SQL scripts optimally compatible among other SQL tools, then don't use any Special or PL Commands. SqlTool has default behavior which I think is far superior to the other SQL tools, but you will have to disable these defaults in order to have optimally compatible behavior. These switches provide compatibilty at the cost of poor control and error detection. --continueOnErr The output will still contain error messages about everything that SqlTool doesn't like (malformatted commands, SQL command failures, empty SQL commands), but SqlTool will continue to run. Errors will not cause rollbacks (but that won't matter because of the following setting). --autoCommit You don't have to worry about accidental expansion of PL variables, since SqlTool will never expand PL variables if you don't set any variables on the command line, or give any "* " PL commands. (And you could not have "* " commands in a compatible SQL file).
                Comments SQL comments of the form /*...*/ must begin where a (SQL/Special/Edit-Buffer/PL) Command could begin, and they end with the very first "*/" (regardless of quotes, nesting, etc. You may have as many blank lines as you want inside of a comment. Valid comment example SELECT count(*) FROM atable; /* Lots of comments interspersed among several lines */ SELECT count(*) FROM btable; Notice that a command can start immediate after the comment ends. Invalid comment example SELECT count(*) FROM /* atable */ btable; This comment is invalid because you could not start another command at the comment location (because it is within an SQL Statement). You can try using /*...*/ in other locations, and -- style SQL comments, but SqlTool will not treat them as comments. If they occur within an SQL Statment, SqlTool will pass them to the database engine, and the DB engine will determine whether to parse them as comments.
                Special Commands and Edit Buffer Commands in SQL Files Don't use Edit Buffer / History Commands in your sql files, because they won't work. Edit Buffer / History Commands are for interactive use only. (But, see the section for an exception). You can, of course, use any SqlTool command at all interactively. I just wanted to group together the commands most useful to script-writers. \q [abort message] Be aware that the \q command will cause SqlTool to completely exit. If a script x.sql has a \q command in it, then it doesn't matter if the script is executed like java -jar .../hsqldb.jar urlid a.sql x.sql z.sql or if you use \i to read it in interactively, or if another SQL file uses \i to nest it. If \q is encountered, SqlTool will quit. See the section for commands to abort an SQL file (or even parts of an SQL file) without causing SqlTool to exit. \q takes an optional argument, which is an abort message. If you give an abort message, the message is displayed to the user and SqlTool will exit with a failure status. If you give no abort message, then SqlTool will exit quietly with successful status. As a result, \q means to make an immediate but graceful exit, whereas \q Message means to abort immediately. \p [text to print] Print the given string to stdout. Just give "\p" alone to print a blank line. \i /path/to/file.sql Include another SQL file at this location. You can use this to nest SQL files. For database installation scripts I often have a master SQL file which includes all of the other SQL files in the correct sequence. Be aware that the current continue-upon-error behavior will apply to included files until such point as the SQL file runs its own error handling commands. \o [file/path.txt] Tee output to the specified file (or stop doing so). See the section. \= A database-independent way to commit your SQL session. \a [true|false] This turns on and off SQL transaction autocommits. Auto-commit defaults to false, but you can change that behavior by using the --autoCommit command-line switch. \c [true|false] A "true" setting tells SqlTool to Continue when errors are encountered. The current transaction will not be rolled back upon SQL errors, so if \c is true, then run the ROLLCACK; command yourself if that's what you want to happen. The default for interactive use is to continue upon error, but the default for non-interactive use is to abort upon error. You can override this behavior by using the --continueOnErr or the --abortOnErr command-line switch. With database setup scripts, I usually find it convenient to set "true" before dropping tables (so that things will continue if the tables aren't there), then set it back to false so that real errors are caught. DROP TABLE tablename IF EXISTS; is a more elegant, but less portable, way to accomplish the same thing. It depends on what you want your SQL files to do, of course, but I usually want my SQL files to abort when an error is encountered, without necessarily killing the SqlTool session. If this is the behavior that you want, then put an explicit \c false at the top of your SQL file and turn on continue-upon-error only for sections where you really want to permit errors, or where you are using PL commands to handle errors manually. This will give the desired behavior whether your script is called by somebody interactively, from the SqlTool command-line, or included in another SQL file (i.e. nested). The default settings are usually best for people who don't want to put in any explicit \c or error handling code at all. If you run SQL files from the SqlTool command line, then any errors will cause SqlTool to roll back and abort immediately. If you run SqlTool interactively and invoke SQL files with \i commands, the scripts will continue to run upon errors (and will not roll back). This behavior was chosen because there are lots of SQL files out there that produce errors which can be ignored; but we don't want to ignore errors that a user won't see. I reiterate that any and all of this behavior can (and often should) be changed by Special Commands run in your interactive shell or in the SQL files. Only you know whether errors in your SQL files can safely be ignored.
                Automation SqlTool is ideal for mission-critical automation because, unlike other SQL tools, SqlTool returns a dependable exit status and gives you control over error handling and SQL transactions. Autocommit is off by default, so you can build a completely dependable solution by intelligently using \c commands (Continue upon Errors) and commit statements, and by verifying exit statuses. Using the SqlTool Procedural Language, you have ultimate control over program flow, and you can use variables for database input and output as well as for many other purposes. See the section.
                Getting Interactive Functionality with SQL Files Some script developers may run into cases where they want to run with sql files but they alwo want SqlTool's interactive behavior. For example, they may want to do command recall in the sql file, or they may want to log SqlTool's command-line prompts (which are not printed in non-interactive mode). In this case, do not give the sql file(s) as an argument to SqlTool, but pipe them in instead, like java -jar $HSQLDB_HOME/lib/hsqldb.jar urlid < filepath1.sql > /tmp/log.html 2>&1 or cat filepath1.sql... | java -jar $HSQLDB_HOME/lib/hsqldb.jar urlid > /tmp/log.html 2>&1
                Character Encoding SqlTool defaults to the US-ASCII character set (for reading). You can use another character set by setting the system property sqlfile.charset, like java -Dsqlfile.charset=UTF-8 -jar $HSQLDB_HOME/lib/hsqldb.jar urlid file.sql... You can also set this per urlid in the SqlTool configuration file. See the section about that.
                Generating Text or HTML Reports This section is about making a file containing the output of database queries. You can generate reports by using operating system facilities such as redirection, tee, and cutting and pasting. But it is much easier to use the "\o" and "\H" special commands. Writing query output to an external file By default, everthing will be done in plain text. If you want your report to be in HTML format, then give the special command \H. If you do so, you will probably want to use filenames with an suffix of ".html" or ".htm" instead of ".txt" in the next step. Run the command \o path/to/reportfile.txt. From this point on, output from your queries will be appended to the specified file. (I.e. another copy of the output is generated.) This way you can continue to monitor or use output as usual as the report is generated. When you want SqlTool to stop writing to the file, run \o (or just quit SqlTool if you have no other work to do). If you turned on HTML mode with \H before, you can run \H again to turn it back off, if you wish. It is not just the output of "SELECT" statements that will make it into the report file, but Kinds of output that get teed to \o files Output of SELECT statements. Output of all "\d" Special Commands. (I.e., "\dt", "\dv", etc., and "\d OBJECTNAME"). Output of "\p" Special Commands. You will want to use this to add titles, and perhaps spacing, for the output of individual queries. Other output will go to your screen or stdout, but will not make it into the report file. Be aware that no error messages will go into the report file. If SqlTool is run non-interactively (including if you give any SQL file(s) on the command line), SqlTool will abort with an error status if errors are encountered. The right way to handle errors is to check the SqlTool exit status. (The described error-handling behavior can be modified with SqlTool command-line switches and Special Commands). Remember that \o appends to the named file. If you want a new file, then use a new file name or remove the pre-existing target file ahead of time. So that I don't end up with a bunch of junk in my report file, I usually leave \o off while I perfect my SQL. With \o off, I perfect the SQL query until it produces on my screen exactly what I want saved to file. At this point I turn on \o and run ":;" to repeat the last SQL command. If I have several complex queries to run, I turn \o off and repeat until I'm finished. (Every time you turn \o on, it will append to the file, just like we need). Usually it doesn't come to mind that I need a wider screen until a query produces lines that are too long. In this case, stretch your window and repeat the last command with the ":;" Edit Buffer Command.
                SqlTool Procedural Language Aka PL Most importantly, run SqlTool interactively and give the "*?" command to see what PL commands are available to you. I've tried to design the language features to be intuitive. Readers experience with significant shell scripting in any language can probably learn everything they need to know by looking at (and running!) the sample script sample/pl.sql in your HSQLDB distribution and using the *? command from within an interactive SqlTool session as a reference. (By significant shell scripting, I mean to the extent of using variables, for loops, etc.). PL variables will only be expanded after you run a PL command (or set variable(s) from the command-line). We only want to turn on variable expansion if the user wants variable expansion. People who don't use PL don't have to worry about strings getting accidentally expanded. All other PL commands imply the "*" command, so you only need to use the "*" statement if your script uses PL variables and it is possible that no variables may be set before-hand (and no PL commands have been run previously). In this case, without "*", your script would silently use a literal value like "*{x}" instead of trying to expand it. With a preceding "*" command, PL will notice that the variable x has not been set and will generate an error. (If x had been set here will be no issue because setting a variable automatically turns on PL variable expansion). PL is also used to upload and download column values to/from local ASCII files, analogously to the special \b commands for binary files. This is explained above in the Interactive section above.
                Variables Use the * list command to list some or all variables; or * listvalues to also see the values. You can set variables using the * VARNAME = value command. This document explains elsewhere how you can set a values to the contents of files, and to the return value of SQL statements and fetches. You can also set variables using the --setvar command-line switch. I give a very brief but useful example of this below. Variables are always expanded in SQL, Special, and PL commands if they are written like *{VARNAME} (assuming that a PL command has been run previously). Your SQL scripts can give good feedback by echoing the value of variables with the "\p" special command. Use the construct *{:VARNAME} to expand the variable, but to expand to a zero-length string instead of fail if VARNAME is not set. A variable written like /VARNAME is expanded if it begins an SQL Statement. This usage is called PL Aliasing. See the section below. Variables are normally written like *VARNAME in logical expressions to prevent them from being evaluated too early. See below about logical expressions. You can't do math with expression variables, but you can get functionality like the traditional for (i = 0; i < x; i++) by appending to a variable and testing the string length, like * while (*i < ${x}) * i = *{i}. i will be a growing line of dots. Variable names must not contain white space, or the characters "}" or "=".
                PL Aliases PL Aliasing just means the use of a PL variable as the first thing in an SQL statement, with the shortcut notation /VARNAME. /VARNAME must be followed by whitespace or terminate the Statement, in order for SqlFile to tell where the variable name ends. Note that PL aliases are a very different thing from SQL aliases or HSQLDB aliases, which are features of databases, not SqlFile. If the value of a variable is an entire SQL command, you generally do not want to include the terminating ";" in the value. There is an example of this above. PL aliasing may only be used for SQL statements. You can define variables for everything in a Special or PL Command, except for the very first character ("\" or "*"). Therefore, you can use variables other than alias variables in Special and PL Commands. Here is a hyperbolically impractical example to show the extent to which PL variables can be used in Special commands even though you can not use them as PL aliases. sql> * qq = p Hello Butch sql> \*{qq} done now Hello Butch done now (Note that the \* here is not the special command "\*", but is the special command "\p" because "*{qq}" resolves to "p").
                Here is a short SQL file that gives the specified user write permissions on some application tables. Simple SQL file using PL /* grantwrite.sql Run SqlTool like this: java -jar path/to/hsqldb.jar -setvar USER=debbie grantwrite.sql */ /* Explicitly turn on PL variable expansion, in case no variables have been set yet. (Only the case if user did not set USER). */ * GRANT all ON book TO *{USER}; GRANT all ON category TO *{USER}; Note that this script will work for any (existing) user just by supplying a different user name on the command-line. I.e., no need to modify the tested and proven script. There is no need for a commit statement in this SQL file since no DML is done. If the script is accidentally run without setting the USER variable, SqlTool will give a very clear notificaton of that. The purpose of the plain "*" command is just so that the *{USER} variables will be expanded. (This would not be necessary if the USER variable, or any other variable, were set, but we don't want to depend upon that).
                Logical Expressions Logical expressions occur only inside of logical expression parentheses in PL statements. For example, if (*var1 > astring) and while (*checkvar). (The parentheses after "foreach" do not enclose a logical expression, they just enclose a list). There is a critical difference between *{VARNAME} and *VARNAME inside logical expressions. *{VARNAME} is expanded one time when the parser first encounters the logical expression. *VARNAME is re-expanded every time that the expression is evaluated. So, you would never want to code * while (*{X} < 5) because the statement will always be true or always be false. (I.e. the following block will loop infinitely or will never run). Don't use quotes or whitespace of any kind in *{VARNAME} variables in expressions. (They would expand and then the expression would most likely no longer be a valid expression as listed in the table below). Quotes and whitespace are fine in *VARNAME variables, but it is the entire value that will be used in evaluations, regardless of whether quotes match up, etc. I.e. quotes and whitespace are not special to the token evaluator. Logical Operators TOKEN The token may be a literal, a *{VARNAME} which is expanded early, or a *VARNAME which is expanded late. (You usually do not want to use *{VARNAME} in logical expressions). False if the token is not set, empty, or "0". True otherwise. TOKEN1 == TOKEN2 True if the two tokens are equivalent "strings". TOKEN1 <> TOKEN2 Ditto. TOKEN1 >< TOKEN2 Ditto. TOKEN1 > TOKEN2 True if the TOKEN1 string is longer than TOKEN2 or is the same length but is greater according to a string sort. TOKEN1 < TOKEN2 Similarly to TOKEN1 > TOKEN2. ! LOGICAL_EXPRESSION Logical negation of any of the expressions listed above. *VARNAMEs in logical expressions, where the VARNAME variable is not set, evaluate to an empty string. Therefore (*UNSETVAR = 0) would be false, even though (*UNSETVAR) by itself is false and (0) by itself is false. Another way of saying this is that *VARNAME in a logical expression is equivalent to *{:VARNAME} out of a logical expression. When developing scripts, you definitely use SqlTool interactively to verify that SqlTool evaluates logical expressions as you expect. Just run * if commands that print something (i.e. \p) if the test expression is true.
                Flow Control Flow control works by conditionally executing blocks of Commands according to conditions specified by logical expressions. The conditionally executed blocks are called PL Blocks. These PL Blocks always occur between a PL flow control statement (like * foreach, *while, * if) and a corresponding * end PL Command (like * end foreach). Be aware that the PL block reader is ignorant about SQL statements and comments when looking for the end of the block. It just looks for lines beginning with some specific PL commands. Therefore, if you put a comment line before a PL statement, or if a line of a multi-line SQL statement has a line beginning with a PL command, things may break. I am not saying that you shouldn't use PL commands or SQL commands inside of PL blocks-- you definitely should! I'm saying that in PL blocks you should not have lines inside of SQL statments or comments which could be mistaken for PL commands. (Especially, "commenting out" PL end statements will not work if you leave * end at the beginning of the line). (This limitation will very likely be removed in a future version of SqlTool). The values of control variables for foreach and while PL blocks will change as expected. There are * break and * continue, which work as any shell scripter would expect them to. The * break command can also be used to quit the current SQL file without triggering any error processing. (I.e. processing will continue with the next line in the including SQL file or interactive session, or with the next SQL file if you supplied multiple on the command-line).
                Below is an example SQL File that shows how to use most PL features. If you have a question about how to use a particular PL feature, check this example before asking for help. This file resides in the sample directory with the name pl.sql . Definitely give it a run, like java -jar $HSQLDB_HOME/lib/hsqldb.jar mem $HSQLDB_HOME/pl.jar SQL File showing use of most PL features &pl.sql-cdata;
                Chunking We hereby call the ability to transmit multiple SQL commands to the database in one transmission chunking. Unless you are in Raw mode, SqlTool only transmits commands to the database engine when it reads in a ";" at the end of a line of an SQL command. Therefore, you normally want to end each and every SQL command with ";" at the end of a line. This is because the database can only send one status reply to each JDBC transmission. So, while you could run SELECT * FROM t1; SELECT * FROM t2; SqlTool can only display the results from the last query. This is a limitation of the client/server nature of JDBC, and applies to any JDBC client. There are, however, situations where you don't need immediate feedback from every SQL command. For example, Single-line chunking example INSERT INTO t1 VALUES(0); SELECT * FROM t1; It's useful because the output of the second SQL command will tell you whether the first SQL command succeeded. So, you won't miss the status output from the first command.
                Why? The first general reason to chunk SQL commands is performance. For standalone databases, the most common performance bottleneck is network latency. Chunking SQL commands can dramatically reduce network traffic. The second general reason to chunk SQL commands is if your database requires you to send multiple commands in one transmission. This is often the case when you need to tell the database the SQL or PL/SQL commands that comprise a stored procedure, function, trigger, etc.
                How? The most simple way is enter as many SQL commands as you want, but just do not end a line with ";" until you want the chunk to transmit. Multi-line chunking example INSERT INTO t1 VALUES (1) ; INSERT INTO t1 VALUES (2) ; SELECT * FROM t1; If you list your command history with \s, you will see that all 3 SQL commands in 3 lines are in one SqlTool command. You can recall this SqlTool command from history to re-execute all three SQL commands. The other method is by using . Go to the section to see how. You can enter any text at all, exactly how you want it to be sent to the database engine. Therefore, in addition to chunking SQL commands, you can give commands for non-SQL extensions to the database. For example, you could enter JavaScript code to be used in a stored procedure.
                Raw Mode You begin raw mode by issuing the Special Command "\.". You can then enter as much text in any format you want. When you are finished, enter a line consisting of only ".;" to store the input to the edit buffer and send it to the database server for execution. This paragraph applies only to interactive usage. Interactive users may may end the raw input with ":." instead of ".;". This will just save the input to the edit buffer so that you can edit it and send it to the database manually. You can look at the edit buffer with the ":b" Buffer Command. You would normally use the command ":;" to send the buffer to the database after you are satisfied with it. You'll notice that your prompt will be the continuation prompt between entering "\." and terminating the raw input with ".;" or ":.". Interactive Raw Mode example sql> \. Enter RAW SQL. No \, :, * commands. End with a line containing only ".;" to send to database, or ":." to store to edit buffer for editing or saving. ----------------------------------------------------------- raw> line one; +> line two; +> line three; +> :. Raw SQL chunk moved into buffer. Run ":;" to execute the chunk. sql> :; Executing command from buffer: line one; line two; line three; SQL Error at 'stdin' line 13: "line one; line two; line three;" Unexpected token: LINE in statement [line] sql> The error message "Unexpected token: LINE in statement [line]" comes from the database engine, not SqlTool. All three lines were transmitted to the database engine. Edit Buffer Commands are not available when running SqlTool non-interactively.
                PL/SQL PL/SQL is not the same as PL. PL is the procedural language of SqlFile and is independent of your back-end database. PL commands always begin with *. PL/SQL is processed on the server side and you can only use it of your database supports it. You can not intermix PL and PL/SQL (except for setting a PL variable to the output of PL/SQL execution), because when you enter PL/SQL to SqlTool that input is not processed by SqlFile. Use to send PL/SQL code blocks to the database engine. You do not need to enter the "\." command to enter raw mode. Just begin a new SqlTool command line with "DECLARE" or "BEGIN", and SqlTool will automatically put you into raw mode. See the section for details. The following sample SQL file resides at sample/plsql.sql in your HSQLDB distribution . This script will only work if your database engine supports standard PL/SQL, if you have permission to create the table "T1" in the default schema, and if that object does not already exist. PL/SQL Example &plsql.sql-cdata; Note that, inside of raw mode, you can use any kind of formatting you want: Whatever you enter-- blank lines, comments, everything-- will be transmitted to the database engine.
                Using hsqltool.jar and hsqldbutil.jar This section is for those users who want to use SqlTool but without the overhead of hsqldb.jar (or who want to use a new SqlTool build with an older HSQLDB distribution). If you do not need to directly use JDBC URLs like jdbc:hsqldb:mem: + something, jdbc:hsqldb:file: + something, or jdbc:hsqldb:res: + something, then you can use hsqltool.jar in place of the much larger hsqldb.jar file. hsqltool.jar will work for all JDBC databases other than HSQLDB Memory-only and In-process databases (the latter are fine if you access them via a HSQLB Server or WebServer). You will have to supply the JDBC driver for non-HSQLDB URLs, of course. hsqltool.jar includes the HSQLDB JDBC driver. If you do not need to connect to HSQLDB databases at all, then hsqldbutil.jar is what you want. hsqldbutil.jar contains everything you need to run SqlTool and DatabaseManagerSwing against non-HSQLDB databases... well, besides the JDBC drivers for the target databases. The HSQLDB distribution doesn't "come with" pre-built hsqltool.jar and hsqldbutil.jar files. You need to "build" them, but that is very easy to do. These instructions assume that you are capable of running an Ant build. See the chapter if you need more details than what you see here. Download and extract a current HSQLDB distribution. If you don't want to use the source code, documentation, etc., you can use a temporary directory and remove it afterwards. Cd to the build directory under the root directory where you extracted the distribution to. Run ant hsqldbutil or ant hsqltool according to the criteria above. (If your goal is to use this jar with an older HSQLDB distribution, then you definitely need to build hsqlbutil.jar). If you're going to clean up afterwards, copy the jar that you built out of lib to a safe location first. If you are using the HSQLDB JDBC driver (i.e., you're connecting up to a URL like jdbc:hsqldb:hsql + something or jdbc:hsqldb:http + something), you invoke SqlTool exactly as with hsqldb.jar except you use the file path to your new jar file instead of the path to hsqldb.jar. If you are using a non-HSQLDB JDBC driver, you must set your CLASSPATH to include this new jar file and your JDBC driver, then run SqlTool like java org.hsqldb.util.SqlTool ... You can specify your JDBC driver class either with the --driver switch to SqlTool, or in your RC file stanza (the last method is usually more convenient).
                Delimiter-Separated-Value Imports and Exports This feature is independent of HSQLDB , a server-side feature of HSQLDB. It makes no difference to SqlTool whether the source or target table of your export/import is a memory, cache, or text table. Indeed, like all features of SqlTool, it works fine with other JDBC databases. It works great, for example to migrate data from a table of one type to a table of another type, or to another schema, or to another database instance, or to another database system. This feature is what most business people call "CSV", but these files are more accurately called Delimiter Separated Value files because the delimiter is usually not a comma, and, more importantly, we purposefully choose an effective delimiter instead of the CSV method of using a delimiter which works in some cases and then use quotes and back-slashes to escape occurrence of the delimiter in the actual data. Just by choosing a delimiter which never needs escaping, we eliminate the whole mess, and the data in our files always looks just like the corresponding data in the database. To make this CSV / Delimiter-separated-value dintinction clear, I use the suffix ".dsv" for my data files. This leads me to stipulate the abbreviation DSV for the Delimiter Separated Value feature of HSQLDB. Use the \x command to eXport a table to a DSV file, and the \m command to iMport a DSV file into a pre-existing table. The row and column delimiters may be any String, not just a single character. And just as the delimiter capability is more general than traditional CSV delimiters, the export function is also more general than just a table data exporter. Besides the trivial generalization that you may specify a view or other virtual table name in place of a table name, you can alternatively export the output of any query which produces normal text output. A benefit to this approach is that it allows you to export only some columns of a table, and to specify a WHERE clause to narrow down the rows to be exported (or perform any other SQL transformation, mapping, join, etc.). One specific use for this would be to exclude columns of binary data (which can be exported by other means, such as a PL loop to store binary values to files with the \bd command). Note that the import command will not create a new table. This is because of the impossibility of guessing appropriate types and constraints based only on column names and a data sampling (which is all that a DSV-importer has access to). Therefore, if you wish to populate a new table, create the table before running the import. The import file does not need to have data for all columns of a table. The only required columns are those required by database constraints (non-null, indexes, keys, etc.) One specific reason to omit columns is if you want values of some columns to be created automatically by column DEFAULT settings, triggers, HSQLDB identity sequences, etc. Another reason would be to skip binary columns.
                Simple DSV exports and imports using default settings Even if you need to change delimiters, table names, or file names from the defaults, I suggest that you run one export and import with default settings as a practice run. A memory-only HSQLDB instance is ideal for test runs like this. This command exports the table icf.projects to the file projects.dsv in the current directory (where you invoked SqlTool from). By default, the output file name will be the specified source table name plus the extension .dsv. DSV Export Example SET SCHEMA icf; \x projects We could also have run \x icf.projects (which would have created a file named icf.projects.dsv) instead of changing the session schema. In this example we have chosen to make the export file name independent of the schema to facilitate importing it into a different schema. Take a look at the output file. Notice that the first line consists of column names, not data. This line is present because it will be needed if the file is to used for a DSV import. Notice the following characterstics about the export data. The column delimiter is the pipe character "|". The record delimiter is the default line delimiter character(s) for your operating system. The string used to represent database NULLs is [null]. See the next section for how to change these from their default values. This command imports the data from the file projects.dsv in the current directory (where you invoked SqlTool from) into the table newschema.projects. By default, the output table name will be the input filename after removing optional leading directory and trailing final extension. DSV Import Example SET SCHEMA newschema; \m projects.dsv If the DSV file was named with the target schema, you would have skipped the SET SCHEMA command, like \m newschema.projects.dsv.
                Specifying queries and options For a hands on example of a DSM import which generates an import report and uses some other options, change to directory HSQLDB/sample and play with the working script dsv-sample.sql . You can execute it like java -jar ../lib/hsqldb.jar mem dsv-sample.sql (assuming that you are using the supplied sqltool.rc file or have have urlid mem set up. The header line in the DSV file is required at this time. (If there is user demand, it can be made optional for exporting, but it will remain required for importing). Your export will fail if the column or record delimiter, or the null representation value occurs in the data being exported. You change these values by setting the PL variables *DSV_COL_DELIM, *DSV_ROW_DELIM, *DSV_NULL_REP. Notice that the asterisk is part of the variable names, to indicate that these variables are used by SqlTool internally. When specifying delimiters, you can use the escape seqpences \n, \r, \f, \t, \\, and decimal, octal or hex specifications like \20, \020, \0x20. For example, to change the column delimiter to the tab character, you would give the command * *DSV_COL_DELIM = \t For imports, you must always specify the source DSV file path. If you want to export to a different file than one in the current directory named according to the source table, set the PL variable *DSV_TARGET_FILE, like * *DSV_TARGET_FILE = /tmp/dtbl.dsv For exports, you must always specify the source table name or query. If you want to import to a table other than that derived from the input DSV file name, set the PL variable *DSV_TARGET_TABLE. The table name may contain a schema name prefix. You don't need to import all of the columns in a data file. To designate the fields to be skipped, iether set the PL PL variable *DSV_SKIP_COLUMNS, or replace the column names in the header line to "-" (hyphen). The value of *DSV_SKIP_COLUMNS is case-insensitive, and multiple column names are separated with white space and/or commas. You can specify a query instead of a tablename with the \x command in order to filter or transform data from a table or view, or to export the output of a join, etc. You must set the PL variable *DSV_TARGET_FILE, as explained above (since there is no table name from which to automatically map a file name). DSV Export of an Arbitrary SELECT Statement * *DSV_TARGET_FILE = outfile.txt \x SELECT entrydate, 2 * aval "Double aval", modtime FROM bs.dtbl Note that I specified the column label alias "Double aval" so that the label for that column in the DSV file header will not be blank. By default, imports will abort as soon as a error is encountered during parsing the file or inserting data. If you invoke SqlTool with a SQL script on the command line, the failure will cause SqlTool to roll back and exit. If run interactively, you can decide whether to commit or roll back the rows that inserted before the failure. You can modify this behavior with the \a and \c settings. If you set either a reject dsv file or a reject report file, then failures during imports will be reported but will not cause the import to abort. When run in this way, SqlTool will give you a report at the end about how many records were skipped, rejected, and successfully inserted. The reject dsv file is just a dsv file with exact copies of the dsv records that failed to insert. The reject report file is a HTML report which lists, for every rejected record, why that record was rejected. To allow for user-friendly entry of headers, we require that tables for DSV import/exports use standard column names. I.e., no column names that require quoting. The DSV import and export parsers are very smart and user-friendly. The data types of columns are checked so that the parser can make safe assumptions about white space and blank entries in the data. If a column is a JDBC Boolean type, for example, then we know that a field value of " True " obviously means "True", and that a field value of "" obviously means null. Since we require vanilla style column names, we allow white space anywhere in the header column. We allow blank lines anywhere (where "lines" are delimited by *DSV_ROW_DELIM). By default, commented lines are ignored, and the comment character can be changed from its default value. Run the command "\x?" or "\m?" to see the several system PL variables which you can set to adjust reject file behavior, commenting behavior, and other DSV features. You can also define some settings right in the DSV file, and you can even specify multiple header lines in a single DSV file. I use this last feature to import data from one data set into multple tables that are joined. Since I don't have any more time to dedicate to explaining all of these features, I'll give you some examples from working DSV files and let you take it from there. Sample DSV headerswitch settings # RCS keyword was here. headerswitch{ itemdef:name|-|-|hardness|breakdc|- simpleitemdef:itemdef_name|maxvalue|weight|-|-|maxhp } I'll just note that the prefixes for the header rows must be of format target-table-name + :. You can use * for target-table-name here, for the obvious purpose. DSV targettable setting targettable=t This last example is from the SqlTool unit test file dsv-trimming.dsv. These special commands must be at the top of the file (before any normal data or header lines). There is also the *DSV_CONST_COLS setting, which you can use to automatically write static, constant values to the specified columns of all inserted rows.
                Unit Testing SqlTool The SqlTool unit tests reside at testrun/sqltool in the HSQLDB source code repository. Just run the runtests.bash script from that directory to execute all of the tests. Read the file README.txt to find out all about it, including everything you'd need to know to test your own scripts or to add more unit test scripts for SqlTool.
                hsqldb-1.8.0.10.orig/docsrc/guide/testutility.xml0000644000175000017500000001227710245612616020332 0ustar renerene Hsqldb Test Utility $Revision: 1.12 $ $Date: 2005/05/27 12:41:50 $ Hsqldb Test Utility The org.hsqldb.test package contains a number of tests for various functions of the database engine. Among these, the TestSelf class performs the tests that are based on scripts. To run the tests, you should compile the hsqldbtest.jar target with Ant. For TestSelf, a batch file is provided in the testrun/hsqldb directory, together with a set of TestSelf*.txt files. To start the application in Windows, change to the directory and type: runtest TestSelf In Unix / Linux, type: ./runTest.sh TestSelf The new version of TestSelf runs multiple SQL test files to test different SQL operations of the database. All files in the working directory with names matching TestSelf*.txt are processed in alphabetical order. You can add your own scripts to test different series of SQL queries. The format of the TestSelf*.txt file is simple text, with some indentation and prefixes in the form of Java-style comments. The prefixes indicate what the expected result should be. Comment lines must start with -- and are ignored Lines starting with spaces are the continuation of the previous line SQL statements with no prefix are simply executed. The remaining items in this list exemplify use of the available command line-prefixes. The /*s*/ option stands for silent. It is used for executing quries regardless of results. Used for preparation of tests, not for actual tests. /*s*/ Any SQL statement - errors are ignored The /*c<rows>*/ option is for SELECT queries and asserts the number of rows in the result matches the given count. /*c<rows>*/ SQL statement returning count of <rows> The /*u*/ option is for queries that return an update count, such as DELETE and UPDATE. It asserts the update count matches. /*u<count>*/ SQL statement returning an update count equal to <count> The /*e*/ option asserts that the given query results in an erros. It is mainly used for testing the error detection capabilities of the engine. It can also be used with syntactically valid queries to assert a certain state in the database. For example a CREATE TABLE can be used to assert the table of the same name already exists. /*e*/ SQL statement that should produce an error when executing The /*r....*/ option asserts the SELECT query returns a single row containing the given set of field values. /*r<string1>,<string2>*/ SQL statement returning a single row ResultSet equal to the specified value The extended /*r...*/ option asserts the SELECT query returns the given rows containing the given set of field values. /*r <string1>,<string2> <string1>,<string2> <string1>,<string2> */ SQL statement returning a multiple row ResultSet equal to the specified values (note that the result set lines are indented). All the options are lowercase letters. During development, an uppercase can be used for a given test to exclude a test from the test run. The utility will just report the test blocks that have been excluded without running them. Once the code has been developed, the option can be turned into lowercase to perform the actual test. See the TestSelf*.txt files in the /testrun/hsqldb/ directory for actual examples. hsqldb-1.8.0.10.orig/docsrc/guide/dbmanager.xml0000644000175000017500000003201710462225505017637 0ustar renerene Database Manager Fred Toussi HSQLDB Development Group ft@cluedup.com Blaine Simpson HSQLDB Development Group ft@cluedup.com $Revision: 1.13 $ $Date: 2006/07/27 21:08:21 $ Hsqldb Database Manager
                Brief Introduction The Database Manager tool is a simple GUI database query tool with a tree display of the tables. Both AWT and SWING versions of the tool are available and work almost identically. The AWT version class name is org.hsqldb.util.DatabaseManager; the SWING version, org.hsqldb.util.DatabaseManagerSwing. The AWT version of the database manager can be deployed as an applet in a browser. A demo HTML file with an embedded Database Manager is included in the /demo directory. When the Database Manager is started, a dialogue allows you to enter the JDBC driver, URL, user and password for the new connection. A drop-down box, Type, offers preset values for JDBC driver and URL for most popular database engines, including HSQLDB. Once you have selected an item from this drop-down box, you should edit the URL to specify the details of the database or any additional properties to pass. You should also enter the username and password before clicking on the OK button. The connection dialogue allows you to save the settings for the connection you are about to make. You can then access the connection in future sessions. To save a connection setting, enter a name in the Setting Name box before clicking on the OK button. Next time the connection dialogue is displayed, the drop-down box labeled Recent will include the name for all the saved connection settings. When you select a name, the individual settings are displayed in the appropriate boxes. The small Clr button next to the drop-down box allows you to clear all the saved settings. If you want to modify an existing setting, first select it from the drop-down box then modify any of the text boxes before making the connection. The modified values will be saved. Most menu items have context-sensitive tool tip help text which will appear if you hold the mouse cursor still over the desired menu item. (Assuming that you don't turn Tooltips off under the Help menu. The DatabaseManagers do work with HSQLDB servers serving TLS-encrypted JDBC data. See the chapter and the section of this Guide. If you are using DatabaseManagerSwing with Oracle, you will want to make sure that Show row counts and Show row counts are both off before connecting to the database. You may also want to turn off Auto tree-update, as described in the next section.
                Auto tree-update By default, the object tree in the left panel is refreshed when you execute DDL which may update those objects. If you are on a slow network or performance-challenged PC, use the view / Auto-refresh tree menu item to turn it off. You will then need to use the viewRefresh tree menu item every time that you want to refresh the tree. Auto-refresh tree does not automatically show all updates to database objects, it only refreshes when you submit DDL which may update database objects. (This behavior is a compromise between utility and performance).
                Automatic Connection You can use command-line switches to supply connection information. If you use these switch(es), then the connection dialog window will be skipped and a JDBC connection will be established immediately. Assuming that the hsqldb.jar (or an alternative jar) are in your CLASSPATH, this command will list the available command-line options. java org.hsqldb.util.DatabaseManagerSwing --help It's convenient to skip the connection dialog window if you always work with the same database account. Use of the --password switch is not secure. Everything typed on command-lines is generally available to other users on the computer. The problem is compounded if you use a network connection to obtain your command line. The RC File section explains how you can set up automatic connections without supplying a password on the command line.
                RC File You can skip the connection dialog window securely by putting the connection information into an RC file and then using the --urlid switch to DatabaseManager or DatabaseManagerSwing. This strategy is great for adding launch menu items and/or launch icons to your desktop. You can set up one icon for each of the database accounts which you regularly use. The default location for the RC file is dbmanager.rc in your home directory. The section explains how to put the connection information into this text file. If you also run , then you can share the RC file with SqlTool by using a sym-link (if your operating system supports sym links), or by using the --rcfile switch for either SqlTool or DatabaseManagerSwing. Use your operating system facilities to prevent others from reading your RC file, since it contains passwords. To set up launch items/icons, first experiment on your command line to find exactly what command works. For example, java -cp /path/to/hsqldb.jar org.hsqldb.util.DatabaseManagerSwing --urlid mem Then, use your window manager to add an item that runs this command.
                Using the current DatabaseManagers with an older HSQLDB distribution. This procedure will allow users of a legacy version of HSQLDB to use all of the new features of the DatabaseManagers. You will also get the new version of the SqlTool! This procedure works for distros going back to 1.7.3.3 at least, probably much farther. These instructions assume that you are capable of running an Ant build. See the chapter. Download and extract a current HSQLDB distribution. If you don't want to use the source code, documentation, etc., you can use a temporary directory and remove it afterwards. Cd to the build directory under the root directory where you extracted the distribution to. Run ant hsqldbutil. If you're going to wipe out the build directory, copy hsqldbutil.jar to a safe location first. For now on, whenver you are going to run DatabaseManager*, make sure that you have this hsqldbutil.jar as the first item in your CLASSPATH. Here's a UNIX example where somebody wants to use the new DatabaseManagerSwing with their older HSQLDB database, as well as with Postgresql and a local application. CLASSPATH=/path/to/hsqldbutil.jar:/home/bob/myapp/classes:/usr/local/lib/pg.jdbc3.jar export CLASSPATH java org.hsqldb.util.DatabaseManagerSwing --urlid urlid
                DatabaseManagerSwing as an Applet DatabaseManagerSwing is also an applet. You can use it in HTML, JSPs, etc. Be aware that in Applet mode, actions to load or save local files will be disabled, and attempts to access any server other than the HTML-serving-host will be fail. Since the Applet can not store or load locally saved preferences, the only way to have persistent preference settings is by using Applet parameters. DatabaseManagerSwing Applet Parameters jdbcUrl URL of a data source to auto-connect to. String value. jdbcDriver URL of a data source to auto-connect to. String value. Defaults to org.hsqldb.jdbcDriver. jdbcUser User name for data source to auto-connect to. String value. jdbcPassword Password for data source to auto-connect to. String value. Defaults to zero-length string. schemaFilter Display only object from this schema in the object navigator. String value. laf Look-and-feel. String value. loadSampleData Auto-load sample data. Boolean value. Defaults to false. autoRefresh Auto-refresh the object navigator when DDL modifications detected in user SQL commands. Boolean value. Defaults to true. showRowCounts Show number of rows in each table in the object navigator. Boolean value. Defaults to false. showSysTables Show system tables in the object navigator. Boolean value. Defaults to false. showSchemas Show object names like schema.name in object navigator. Boolean value. Defaults to true. resultGrid Show query results in Gui grid (as opposed to in plain text). Boolean value. Defaults to true. showToolTips Show help hover-text. Boolean value. Defaults to true.
                hsqldb-1.8.0.10.orig/docsrc/guide/texttables.xml0000644000175000017500000004553610665323467020123 0ustar renerene Text Tables Text Tables as a Standard Feature of Hsqldb Bob Preston HSQLDB Development Group Fred Toussi HSQLDB Development Group ft@cluedup.com $Revision: 1.16 $ $Date: 2007/08/28 13:19:09 $ Text Tables Copyright 2002-2005 Bob Preston and Fred Toussi. Permission is granted to distribute this document without any alteration under the terms of the HSQLDB license. Additional permission is granted to the HSQLDB Development Group to distribute this document with or without alterations under the terms of the HSQLDB license. Text Table support for HSQLDB was originally developed by Bob Preston independently from the Project. Subsequently Bob joined the Project and incorporated this feature into version 1.7.0, with a number of enhancements, especially the use of conventional SQL commands for specifying the files used for Text Tables. In a nutshell, Text Tables are CSV or other delimited files treated as SQL tables. Any ordinary CSV or other delimited file can be used. The full range of SQL queries can be performed on these files, including SELECT, INSERT, UPDATE and DELETE. Indexes and unique constraints can be set up, and foreign key constraints can be used to enforce referential integrity between Text Tables themselves or with conventional tables. HSQLDB with Text Table support is the only comprehensive solution that employs the power of SQL and the universal reach of JDBC to handle data stored in text files and will have wide-ranging use way beyond the currently established Java realm of HSQLDB. Goals of the Implementation We aimed to finalise the DDL for Text Tables so that future releases of HSQLDB use the same DDL scripts. We aimed to support Text Tables as GLOBAL TEMPORARY or GLOBAL BASE tables in the SQL domain.
                The Implementation
                Definition of Tables Text Tables are defined similarly to conventional tables with the added TEXT keyword: CREATE TEXT TABLE <tablename> (<column definition> [<constraint definition>]) In addition, a SET command specifies the file and the separator character that the Text table uses: SET TABLE <tablename> SOURCE <quoted_filename_and_options> [DESC] Text Tables cannot be created in memory-only databases (databases that have no script file).
                Scope and Reassignment A Text table without a file assigned to it is READ ONLY and EMPTY. A Temporary Text table has the scope and the lifetime of the SQL session (a JDBC Connection). Reassigning a Text Table definition to a new file has implications in the following areas: The user is required to be an administrator. Existing transactions are committed at this point. Constraints, including foreign keys referencing this table, are kept intact. It is the responsibility of the administrator to ensure their integrity. From version 1.7.2 the new source file is scanned and indexes are built when it is assigned to the table. At this point any violation of NOT NULL, UNIQUE or PRIMARY KEY constrainst are caught and the assignment is aborted. However, foreign key constraints are not checked at the time of assignment or reassignment of the source file.
                Null Values in Columns of Text Tables This has changed since 1.7.2 to support both null values and empty strings. Empty fields are treated as NULL. These are fields where there is nothing or just spaces between the separators. Quoted empty strings are treated as empty strings.
                Configuration The default field separator is a comma (,). A different field separator can be specified within the SET TABLE SOURCE statement. For example, to change the field separator for the table mytable to a vertical bar, place the following in the SET TABLE SOURCE statement, for example: SET TABLE mytable SOURCE "myfile;fs=|" Since HSQLDB treats CHAR's, VARCHARs, and LONGVARCHARs the same, the ability to assign different separators to the latter two is provided. When a different separator is assigned to a VARCHAR or LONGVARCHAR field, it will terminate any CSV field of that type. For example, if the first field is CHAR, and the second field LONGVARCHAR, and the separator fs has been defined as the pipe (|) and vs as the period (.) then the data in the CSV file for a row will look like: First field data|Second field data.Third field data The following example shows how to change the default separator to the pipe (|), VARCHAR separator to the period (.) and the LONGVARCHAR separator to the tilde (~). Place the following within the SET TABLE SOURCE statement, for example: SET TABLE mytable SOURCE "myfile;fs=|;vs=.;lvs=~" HSQLDB also recognises the following special indicators for separators: special indicators for separators \semi semicolon \quote qoute \space space character \apos apostrophe \n newline - Used as an end anchor (like $ in regular expressions) \r carriage return \t tab \\ backslash \u#### a Unicode character specified in hexadecimal Furthermore, HSQLDB provides csv file support with three additional boolean options: ignore_first, quoted and all_quoted. The ignore_first option (default false) tells HSQLDB to ignore the first line in a file. This option is used when the first line of the file contains column headings. The all_quoted option (default false) tells the program that it should use quotes around all character fields when writing to the source file. The quoted option (default true) uses quotes only when necessary to distinguish a field that contains the separator character. It can be set to false to prevent the use of quoting altogether and treat quote characters as normal characters. These options may be specified within the SET TABLE SOURCE statement: SET TABLE mytable SOURCE "myfile;ignore_first=true;all_quoted=true" When the default options all_quoted= false and quoted=true are in force, fields that are written to a line of the csv file will be quoted only if they contain the separator or the quote character. The quote character is doubled when used inside a string. When all_quoted=false and quoted=false the quote character is not doubled. With this option, it is not possible to insert any string containing the separator into the table, as it would become impossible to distinguish from a separator. While reading an existing data source file, the program treats each individual field separately. It determines that a field is quoted only if the first character is the quote character. It interprets the rest of the field on this basis. The character encoding for the source file is ASCII by default. To support UNICODE or source files preprared with different encodings this can be changed to UTF-8 or any other encoding. The default is encoding=ASCII and the option encoding=UTF-8 or other supported encodings can be used. Finally, HSQLDB provides the ability to read a text file from the bottom up and making them READ ONLY, by placing the keyword "DESC" at the end of the SET TABLE SOURCE statement: SET TABLE mytable SOURCE "myfile" DESC This feature provides functionality similar to the Unix tail command, by re-reading the file each time a select is executed. Using this feature sets the table to read-only mode. Afterwards, it will no longer be possible to change the read-only status with SET TABLE <tablename> READONLY TRUE. Text table source files are cached in memory. The maximum number of rows of data that are in memory at any time is controlled by the textdb.cache_scale property. The default value for textdb.cache_scale is 10 and can be changed by setting the property in the .properties file for the database. The number of rows in memory is calculated as 3*(2**scale), which translates to 3072 rows for the default textdb.cache_scale setting (10). The property can also be set for individual text tables: SET TABLE mytable SOURCE "myfile;ignore_first=true;all_quoted=true;cache_scale=12"
                Disconnecting Text Tables The following describes behaviour present in 1.8.0.8 and later. Text tables may be disconnected from their underlying data source, i.e. the text file. You can explicitly disconnect a text table from its file by issuing the following statement: SET TABLE mytable SOURCE OFF Subsequently, mytable will be empty and read-only. However, the data source description will be preserved, and the table can be re-connected to it with SET TABLE mytable SOURCE ON When a database is opened, if the source file for an existing text table is missing the table remains disconnected from its data source, but the source sescription is preserved. This allows the missing source file to be added to the directory and the table re-connected to it with the above command.
                Text File Issues Text File Issues File locations are restricted to below the directory that contains the database, unless the textdb.allow_full_path property is set true in the database properties file. Blank lines are allowed anywhere in the text file, and are ignored. The file location for a text table created with SELECT <select list> INTO TEXT <tablename> FROM is the directory that contains the database and the file name is based on the table name. The table name is converted into the file name by replacing all the non-alphanumeric characters with the underscore character, conversion into lowercase, and adding the ".csv" suffix. It is possible to define a primay key or identity column for text tables. When a table source file is used with the ignore_first=true option, the first, ignored line is replaced with a blank line after a SHUTDOWN COMPACT. An existing table source file may include CHARACTER fields that do not begin with the quote character but contain instances of the quote character. These fields are read as literal strings. Alternatively, if any field begins with the quote character, then it is interpreted as a quoted string that should end with the quote character and any instances of the quote character within the string is doubled. When any field containing the quote character or the separator is written out to the source file by the program, the field is enclosed in quote character and any instance of the quote character inside the field is doubled. Inserts or updates of CHARACTER type field values are allowed with strings that contains the linefeed or the carriage return character. This feature is disabled when both quoted and all_quoted properties are false. ALTER TABLE commands that add or drop columns are not supported with non-empty text tables.
                Text File Global Properties Complete list of supported global properties in *.properties files textdb.fs textdb.lvs textdb.quoted textdb.all_quoted textdb.ignore_first textdb.encoding textdb.cache_scale textdb.allow_full_path
                Importing a Text Table file in to a Traditional (non-Text Table) Table Importing from a Text Table file The directory src/org/hsqldb/sample in your HSQLDB distibution contains a file named load_binding_lu.sql. This is a working SQL file which imports a pipe-delimited text file from the database's file directory into an existing normal table. You can edit a copy of this file and use it directly with SqlTool, or you can use the SQL therein as a model (using any SQL client at all).
                hsqldb-1.8.0.10.orig/docsrc/guide/tls.xml0000644000175000017500000003755010462225505016530 0ustar renerene TLS TLS Support (a.k.a. SSL) BlaineSimpson &blaineaddr; HSQLDB Development Group $Revision: 1.17 $ $Date: 2006/07/27 21:08:21 $ Hsqldb TLS SSL JSSE Security The instructions in this document are liable to change at any time. In particular, we will be changing the method to supply the server-side certificate password.
                Requirements Hsqldb TLS Support Requirements Sun Java 2.x and up. (This is probably possible with IBM's Java, but I don't think anybody has attempted to run HSQLDB with TLS under IBM's Java, and I'm sure that nobody in the HSQLDB Development Group has documented how to set up the environment). If Java 2.x or 3.x, then you will need need to install JSSE. Your server and/or client will start up much slower than that of Java 4.x users. Client-side users will not be able to use the https: JDBC protocol (because the https protocol handler is not implemented in 2.x/3.x Java JSSE; if there is demand, we could work around this). A JKS keystore containing a private key, in order to run a server. If you are running the server side, then you'll need to run a HSQLDB Server or WebServer. It doesn't matter if the underlying database instances are new, and it doesn't matter if you are making a new Server configuration or encrypting an existing Server configuration. (You can turn encryption on and off at will). You need a HSQLDB jar file that was built with JSSE present. If you got your HSQLDB 1.7.2 distribution from us, you are all set, because we build with Java 1.4 (which contains JSSE). If you build your own jar file with Java 1.3, make sure to install JSSE first.
                Encrypting your JDBC connection At this time, only 1-way, server-cert encryption is tested.
                Client-Side Just use one of the following protocol prefixes. Hsqldb TLS URL Prefixes jdbc:hsqldb:hsqls:// jdbc:hsqldb:https:// At this time, the latter will only work for clients running with Java 1.4. If the server you wish to connect to is using a certificate approved by your default trust keystores, then there is nothing else to do. If not, then you need to tell Java to "trust" the server cert. (It's a slight over-simplification to say that if the server certificate was purchased, then you are all set; if somebody "signed their own" certificate by self-signing or using a private ca certificate, then you need to set up trust). First, you need to obtain the cert (only the "public" part of it). Since this cert is passed to all clients, you could obtain it by writing a java client that dumps it to file, or perhaps by using openssl s_client. Since in most cases, if you want to trust a non-commercial cert, you probably have access to the server keystore, I'll show an example of how to get what you need from the server-side JKS keystore. You may already have an X509 cert for your server. If you have a server keystore, then you can generate a X509 cert like this. Exporting certificate from the server's keystore keytool -export -keystore server.store -alias existing_alias -file server.cer In this example, server.cer is the X509 certificate that you need for the next step. Now, you need to add this cert to one of the system trust keystores or to a keystore of your own. See the Customizing Stores section in JSSERefGuide.html to see where your system trust keystores are. You can put private keystores anywhere you want to. The following command will add the cert to an existing keystore, or create a new keystore if client.store doesn't exist. Adding a certificate to the client keystore keytool -import -trustcacerts -keystore trust.store -alias new_alias -file server.cer If you are making a new keystore, you probably want to start with a copy of your system default keystore which you can find somewhere under your JAVA_HOME directory (typically jre/lib/security/cacerts for a JDK, but I forget exactly where it is for a JRE). Unless your OS can't stop other people from writing to your files, you probably do not want to set a password on the trust keystore. If you added the cert to a system trust store, then you are finished. Otherwise you will need to specify your custom trust keystore to your client program. The generic way to set the trust keystore is to set the sytem property javax.net.ssl.trustStore every time that you run your client program. For example Specifying your own trust store to a JDBC client java -Djavax.net.ssl.trustStore=/home/blaine/trust.store -jar /path/to/hsqldb.jar dest-urlid This example runs the program SqlTool. SqlTool has built-in TLS support, however, so, for SqlTool you can set truststore on a per-urlid basis in the SqlTool configuration file. N.b. The hostname in your database URL must match the Common Name of the server's certificate exactly. That means that if a site certificate is admc.com, you can not use jdbc:hsqldb:hsqls://localhost or jdbc:hsqldb:hsqls://www.admc.com:1100 to connect to it. If you want more details on anything, see JSSERefGuide.html on Sun's site, or in the subdirectory docs/guide/security/jsse of your Java SE docs.
                Server-Side Get yourself a JKS keystore containing a private key. Then set the system property javax.net.ssl.keyStore to the path to that file, and javax.net.ssl.keyStorePassword to the password of the keystore (and to the private key-- they have to be the same). Running an Hsqldb server with TLS encryption java -Djavax.net.ssl.keyStorePassword=secret \ -Djavax.net.ssl.keyStore=/usr/hsqldb/db/db3/server.store \ -cp /path/to/hsqldb.jar org.hsqldb.Server (This is a single command that I have broken into 2 lines using my shell's \ line-continuation feature. In this example, I'm using a server.properties file so that I don't need to give arguments to specify database instances or the server endpoint). Specifying a password on the command-line is definitely not secure. It's really only appropriate when untrusted users do not have any access to your computer. If there is any user demand, we will have a more secure way to supply the password before long.
                JSSE If you are running Java 4.x, then you are all set. Java 1.x users, you are on your own (Sun does not provide a JSSE that will work with 1.x). Java 2.x and 3.x users continue... Go to . If you agree to the terms and meet the requirements, download the domestic or global JSSE software. All you need from the software distro is the three jar files. If you have a JDK installation, then move the 3 jar files into the directory $JAVA_HOME/jre/lib/ext. If you have a JRE installation, then move the 3 jar files into the directory $JAVA_HOME/lib/ext. Pretty painless.
                Making a Private-key Keystore There are two main ways to do this. Either you can use a certificate signed by a certificate authority, or you can make your own. One thing that you need to know in both cases is, the Common Name of the cert has to be the exact hostname that JDBC clients will use in their database URL.
                CA-Signed Cert I'm not going to tell you how to get a CA-signed SSL certificate. That is well documented at many other places. Assuming that you have a standard pem-style private key certificate, here's how you can use openssl and the program DERImport to get it into a JKS keystore. Because I have spent a lot of time on this document already, I am just giving you an example. Getting a pem-style private key into a JKS keystore openssl pkcs8 -topk8 -outform DER -in Xpvk.pem -inform PEM -out Xpvk.pk8 -nocrypt openssl x509 -in Xcert.pem -out Xcert.der -outform DER java DERImport new.keystore NEWALIAS Xpvk.pk8 Xcert.der Make sure to set the password of the key exactly the same as the password for the keystore! You need the program DERImport.class of course. Do some internet searches to find DERImport.java or DERImport.class and download it. If DERImport has become difficult to obtain, I can write a program to do the same thing-- just let me know.
                Non-CA-Signed Cert Run man keytool or see the Creating a Keystore section of JSSERefGuide.html.
                Automatic Server or WebServer startup on UNIX If you are on UNIX and want to automatically start and stop a Server or WebServer running with encryption, follow the instructions in the chapter, and remember to make the init script configuration file readable only to root and to set the variables TLS_PASSWORD and TLS_KEYSTORE. If you are using a private server certificate, make sure to also set the trust store filepath as shown in the sample init script configuration file. The cautionary warning above still applies. The password will be visible to any minimally competent local UNIX user who wants to see it.
                hsqldb-1.8.0.10.orig/docsrc/guide/navicons/0000755000175000017500000000000010242420102016774 5ustar renerenehsqldb-1.8.0.10.orig/docsrc/guide/navicons/prev.gif0000644000175000017500000000064610057437043020465 0ustar renereneGIF89a̽׻չӷѵϵϴͳ̮Ǭƨ33f!1,@ppH,DQy^r StdjBXFeAY4TFCYt;<15H o{azmJpx*u{OQKyiue} # !/0l`A!OCopyright 2000 by Sun Microsystems, Inc. All Rights Reserved. JLF GR Ver 1.0 ;hsqldb-1.8.0.10.orig/docsrc/guide/navicons/home.gif0000644000175000017500000000224610057437043020437 0ustar renereneGIF89a{zåɠÝ˦ʤǢŨ˭Ъͷ۲կҹ00a==nnnUUz\\^^rrffkknnuuzz||ŞÛɡƠğޝ̥ͧʤȣǢƜѨ̧˦ʥɤǰխѬЫϪΩͷܵڲְԯӮҷ۶ڵٴس׸ܴ׹ܸefklmntuʭҬѩΦʯԬЩͷܷ۳!,H*\Ȑ !V@ >b QE'B\SO  !52\N ,dz=P 6|x8@t?-xpC Transfer Tool Fred Toussi HSQLDB Development Group ft@cluedup.com $Revision: 1.5 $ $Date: 2005/06/29 23:15:13 $ Hsqldb Transfer
                Brief Introduction Transfer Tool is a GUI program for transferring SQL schema and data from one JDBC source to another. Source and destination can be different database engines or different databases on the same server. Transfer Tool works in two different modes. Direct transfer maintains a connection to both source and destination and performs the transfer. Dump and Restore mode is invoked once to transfer the data from the source to a text file (Dump), then again to transfer the data from the text file to the destination (Restore). With Dump and Restore, it is possible to make any changes to database object definitions and data prior to restoring it to the target. Dump and Restore modes can be set via the command line with -d (--dump) or -r (--restore) options. Alternatively the Transfer Tool can be started with any of the three modes from the Database Manager's Tools menu. The connection dialogue allows you to save the settings for the connection you are about to make. You can then access the connection in future sessions. These settings are shared with those from the Database Manager tool. See the appendix on Database Manager for details of the connection dialogue box. In version 1.8.0 Transfer Tool is no longer part of the hsqldb.jar. You can build the hsqldbutil.jar using the Ant command of the same name, to build a jar that includes Transfer Tool and the Database Manager. When collecting meta-data, Transfer Tool performs SELECT * FROM <table> queries on all the tables in the source database. This may take a long time with some database engines. When the source database is HSQLDB, this means memory should be available for the result sets returned from the queries. Therefore, the memory allocation of the java process in which Transfer Tool is executed may have to be high.
                hsqldb-1.8.0.10.orig/docsrc/guide/building.xml0000644000175000017500000003253710245455036017526 0ustar renerene Building HSQLDB Fred Toussi HSQLDB Development Group ft@cluedup.com $Revision: 1.15 $ $Date: 2005/05/26 23:22:06 $ Hsqldb Building Ant
                Purpose From 1.8.0, the supplied hsqldb.jar file is built with Java 1.5. If you want to run the engine under JDK1.3 or earlier, you should rebuild the jar with Ant.
                Building with Ant, from the Apache Jakarta Project Building with Ant Ant (Another Neat Tool) is used for building hsqldb. The version currently used to test the build script is 1.6.1 but versions since 1.5.1 should also be compatible.
                Obtaining Ant Ant is a part of the Jakarta/Apache Project. Home of the Apache Ant project The Installing Ant page of the Ant Manual . Follow the directions for your platform.
                Building Hsqldb with Ant Once you have unpacked the zip package for hsqldb, under the /hsqldb folder, in /build there is a build.xml file that builds the hsqldb.jar with Ant (Ant must be already installed). To use it, change to /build then type: ant -projecthelp This displays the available ant targets, which you can supply as command line arguments to ant. These include hsqldb to make the hsqldb.jar explainjars Lists all targets which build jar files, with an explanation of the purposes of the different jars. clean to clean up the /classes directory that is created cleanall to remove the old jar as well javadoc to build javadoc hsqldbmain to build a smaller jar for HSQLDB that does not contain utilities hsqljdbc to build an extremely small jar containing only the client-side JDBC driver (does not support direct connection to HSQLDB URLs of the form jdbc:hsldb:mem:*, jdbc:hsqldb:file:*, nor jdbc:hsqldb:res:*). hsqldbmin to build a small jar that supports HSQLDB URLs of the form jdbc:hsqldb:mem:*, jdbc:hsqld:file*, jdbc:hsqldb:res:*; but not network URLs like jdbc:hsql* or jdbc:http*. hsqldbtest to build a larger jar for hsqldb that contains tests ... Many more targets are available. Run ant -projecthelp and ant explainjars. HSQLDB can be built in any combination of three JRE (Java Runtime Environment) versions and many jar file sizes. The smallest jar size(hsqljdbc.jar) contains only the HSQLDB JDBC Driver client. The default size (hsqldb.jar) also contains server mode support and the utilities. The largest size (hsqldbtest.jar)includes some test classes as well. Before building the hsqldbtest.jar package, you should download the junit jar from and put it in the /lib directory, alongside servlet.jar, which is included in the .zip package. Just run ant explainjars for a concise list of all available jar files. If you want your code built for debugging, as opposed to high performance, make a file named build.properties in your build directory with the contents build.debug: true The resulting Java binaries will be larger and slower, but exception stack traces will contain source code line numbers, which can be extremely useful for debugging. The preferred method of rebuilding the jar is with Ant. After installing Ant on your system use the following command from the /build directory: ant explainjars The command displays a list of different options for building different sizes of the HSQLDB Jar. The default is built using: Buiding the standard Hsqldb jar file with Ant ant hsqldb The Ant method always builds a jar with the JDK that is used by Ant and specified in its JAVA_HOME environment variable. Building with JDK 1.4.x or 1.5.x will result in a jar that is not backward compatible. From version 1.7.2, use of JDK 1.1.x is not recommended for building the JAR, even for running under JDK 1.1.x -- use JDK 1.3.1 for compatibility with 1.1.x. This is done in the following way. JDK 1.3.1 should be used as the JAVA_HOME for ant. You then issue the following commands. The first command will make the sources compatible with JDK 1.3, the second command modifies the sources further so that the compiled result can run under jdk 1.1 as well. The third command builds the jar. ant switchtojdk12 ant switchtojava1target ant hsqldb
                Building with DOS Batch Files UNIX users must use Ant to build hsqldb. For DOS/Windows users, a set of MSDOS batch files is provided as an example. These files produce only the default jar size. The path and classpath variables for the JDK should of course be set before running any of the batch files. These files are not currently maintained and will probably need some additions and changes to work correctly. Please see the build.xml file for up-to-date file If you are compiling for JDK's other than 1.4.x, you should use the appropriate switchToJDK11.bat or switchToJDK12.bat to adapt the source files to the target JDK before running the appropriate buildJDK11.bat or buildJDK12.bat JDK and JRE versions.
                Hsqldb CodeSwitcher CodeSwitcher is a tool to manage different version of Java source code. It allows to compile HSQLDB for different JDKs. It is something like a precompiler in C but it works directly on the source code and does not create intermediate output or extra files. CodeSwitcher is used internally in HSQLDB build scripts. You do not have to use it separately to compile HSQLDB. CodeSwitcher reads the source code of a file, removes comments where appropriate and comments out the blocks that are not used for a particular version of the file. This operation is done for all files of a defined directory, and all subdirectories. Example source code before CodeSwitcher is run ... //#ifdef JAVA2 properties.store(out,"hsqldb database"); //#else /* properties.save(out,"hsqldb database"); */ //#endif ... The next step is to run CodeSwitcher. CodeSwitcher command line invocation java org.hsqldb.util.CodeSwitcher . -JAVA2 The '.' means the program works on the current directory (all subdirectories are processed recursively). -JAVA2 means the code labelled with JAVA2 must be switched off. Source code after CodeSwitcher processing ... //#ifdef JAVA2 /* pProperties.store(out,"hsqldb database"); */ //#else pProperties.save(out,"hsqldb database"); //#endif ... For detailed information on the command line options run java org.hsqldb.util.CodeSwitcher. Usage examples can be found in the switchtojdk1*.bat files in the /build directory.
                Building documentation To build the User Guide in HTML format, you must have the Docbook stylesheets installed locally. The Docbook stylesheets are available on the Internet. On Linux, just install the docbook-xsl-stylesheets rpm. Then add an entry to build.properties in your build directory with contents like docbook.xsl.home: /usr/share/sgml/docbook/docbook-xsl-stylesheets Where you specify your local path to the base directory of your Docbook stylesheet installation. Build like Building HTML User Guides ant docbooks-html ant docbooks-chunk To build the User Guide in PDF format, you must also have the Java FOP system installed locally. FOP is available for free download on the Internet. Add an entry to build.properties in your build directory with contents like fop.home /usr/local/fop-0.20.5 Where you specify your local path to the base directory of your FOP installation. Building User Guides in all formats ant docbook Don't pay too much attention to error messages by FOP, because they are really warnings, but do check the output. If there are problems with the PDF output, try using a newer version of FOP. By default, your docs will fail to build if you do not have Internet connectivity. This is because our primary Docbook source file references the Docbook DTDs via Internet URL. You can build without Internet connectivity by installing the Docbook DTDs and editing our primary Docbook source file. Docbook is available on the Internet. On Linux, just install the docbook-dtds or docbook rpm. Then make one edit to the file docsrc/guide/guide.xml in your HSQLDB distribution. Change the line containing "http://www.oasis-open.org/docbook/xml/4.2CR1/docbookx.dtd" [ to "file:///usr/share/xml/docbook/schema/dtd/4.2/docbookx.dtd" [ where the second filepath is the path to the docbookx.dtd file within your Docbook installation.
                hsqldb-1.8.0.10.orig/docsrc/guide/dbfiles.xml0000644000175000017500000002543110261274030017323 0ustar renerene Hsqldb Database Files and Recovery $Revision: 1.4 $ $Date: 2005/07/01 17:06:32 $ HSQLDB Data Files This text is based on HypersonicSQL documentation, updated to reflect the latest version 1.8.0 of HSQLDB.
                The Standalone and Client/Server modes will in most cases use files to store all data to disk in a persistent and safe way. This document describes the meaning of the files, the states and the procedures followed by the engine to recover the data. A database named 'test' is used in this description. The database files will be as follows.
                Database Files test.properties Contains the entry 'modified'. If the entry 'modified' is set to 'yes' then the database is either running or was not closed correctly (because the close algorithm sets 'modified' to 'no' at the end). test.script This file contains the SQL statements that makes up the database up to the last checkpoint - it is in synch with test.backup. test.data This file contains the (binary) data records for CACHED tables only. test.backup This is compressed file that contains the complete backup of the old test.data file at the time of last checkpoint. test.log This file contains the extra SQL statements that have modified the database since the last checkpoint (something like the 'Redo-log' or 'Transaction-log', but just text). In the above list, a checkpoint results from both a CHECKPOINT command and a SHUTDOWN command.
                States
                Database is closed correctly
                State after using the command <literal>SHUTDOWN</literal> The test.data file is fully updated. The test.backup contains the compressed test.data file. The test.script contains the information in the database, excluding data for CACHED and TEXT tables. The test.properties contains the entry 'modified' set to 'no'. There is no test.log file.
                Database is closed correctly with SHUTDOWN SCRIPT
                State after using the command <literal>SHUTDOWN SCRIPT</literal> The test.data file does not exist; all CACHED table data is in the test.script file The test.backup does not exist. The test.script contains the information in the database, including data for CACHED and TEXT tables. The test.properties contains the entry 'modified' set to 'no'. There is no test.log file.
                Database is aborted
                This may happen by sudden power off, Ctrl+C in Windows, but may be simulated using the command SHUTDOWN IMMEDIATELY. Aborted Database state The test.properties still containes 'modified=yes'. The test.script contains a snapshot of the database at the last checkpoint and is OK. The test.data file may be corrupt because the cache in memory was not written out completely. The test.backup file contains a snapshot of test.data that corresponds to test.script. The test.log file contain all information to re-do all changes since the snanapshot. As a result of abnormal termination, this file may be partially corrupt.
                Procedures The database engine performs the following procedures internally in different circumstances.
                Clean Shutdown Clean Hsqldb database shutdown The test.data file is written completely (all the modified cached table rows are witten out) and closed. The test.backup.new is created (containing the compressed test.data file) The file test.script.new is created using the information in the database (and thus shrinks because no UPDATE and DELETE statements; only INSERT). The entry 'modified' in the properties file is set to 'yes-new-files' The file test.script is deleted The file test.script.new is renamed to test.script The file test.backup is deleted The file test.backup.new is renamed to test.backup The entry 'modified' in the properties file is set to 'no' The file test.log is deleted
                Startup Database is opened Check if the database files are in use (by checking a special test.lck file). See if the test.properties file exists, otherwise create it. If the test.properties did not exist, then this is a new database. Create the empty test.log to append new commands. If it is an existing database, check in the test.properties file if 'modified=yes'. This would mean last time it was not closed correctly, and thus the test.data file may be corrupted or incomplete. In this case the 'REPAIR' algorithm is executed (see below), before the database is opened normally. Otherwise, if in the test.properties file 'modified=yes-new-files', then the (old) test.backup and test.script files are deleted and the new test.script.new file is renamed to test.script. Open the test.script file and execute the commands. Create the empty test.log to append new commands.
                Repair The current test.data file is corrupt, but with the old test.data (from the test.backup file and test.script) and the current test.log, the database is made up-to-date. The database engine takes these steps: Database Repair Restore the old test.data file from the backup (uncompress the test.backup and overwrite test.data). Execute all commands in the test.script file. Execute all commands in the test.log file. If due to corruption, an exception is thrown, the rest of the lines of command in the test.log file are ignored. Close the database correctly (including a backup).
                hsqldb-1.8.0.10.orig/docsrc/guide/running.xml0000644000175000017500000006757510627341706017425 0ustar renerene Running and Using Hsqldb Fred Toussi HSQLDB Development Group ft@cluedup.com $Revision: 1.22 $ $Date: 2007/05/30 18:34:46 $ Hsqldb Guide Copyright 2002-2005 Fred Toussi. Permission is granted to distribute this document without any alteration under the terms of the HSQLDB license. Additional permission is granted to the HSQLDB Development Group to distribute this document with or without alterations under the terms of the HSQLDB license.
                Introduction The HSQLDB jar package is located in the /lib directory and contains several components and programs. Different commands are used to run each program. Components of the Hsqldb jar package HSQLDB RDBMS HSQLDB JDBC Driver Database Manager (Swing and AWT versions) Query Tool (AWT) Sql Tool (command line) The HSQLDB RDBMS and JDBC Driver provide the core functionality. The rest are general-purpose database tools that can be used with any database engine that has a JDBC driver.
                Running Tools All tools can be run in the standard way for archived Java classes. In the following example the AWT version of the Database Manager, the hsqldb.jar is located in the directory ../lib relative to the current directory. java -cp ../lib/hsqldb.jar org.hsqldb.util.DatabaseManager If hsqldb.jar is in the current directory, the command would change to: java -cp hsqldb.jar org.hsqldb.util.DatabaseManager Main classes for the Hsqldb tools org.hsqldb.util.DatabaseManager org.hsqldb.util.DatabaseManagerSwing org.hsqldb.util.Transfer org.hsqldb.util.QueryTool org.hsqldb.util.SqlTool Some tools, such as the Database Manager or SQL Tool, can use command line arguments or entirely rely on them. You can add the command line argument -? to get a list of available arguments for these tools. Database Manager features a graphical user interface and can be explored interactively.
                Running Hsqldb HSQLDB can be run in a number of different ways. In general these are divided into Server Modes and In-Process Mode (also called Standalone Mode). A different sub-program from the jar is used to run HSQLDB in each mode. Each HSQLDB database consists of between 2 to 5 files, all named the same but with different extensions, located in the same directory. For example, the database named "test" consists of the following files: test.properties test.script test.log test.data test.backup The properties files contains general settings about the database. The script file contains the definition of tables and other database objects, plus the data for non-cached tables. The log file contains recent changes to the database. The data file contains the data for cached tables and the backup file is a zipped backup of the last known consistent state of the data file. All these files are essential and should never be deleted. If the database has no cached tables, the test.data and test.backup files will not be present. In addition to those files, HSQLDB database may link to any formatted text files, such as CSV lists, anywhere on the disk. While the "test" database is operational, a test.log file is used to write the changes made to data. This file is removed at a normal SHUTDOWN. Otherwise (with abnormal shutdown) this file is used at the next startup to redo the changes. A test.lck file is also used to record the fact that the database is open. This is deleted at a normal SHUTDOWN. In some circumstances, a test.data.old is created and deleted afterwards. When the engine closes the database at a shutdown, it creates temporary files with the extension .new which it then renames to those listed above.
                Server Modes Server modes provide the maximum accessibility. The database engine runs in a JVM and listens for connections from programs on the same computer or other computers on the network. Several different programs can connect to the server and retrieve or update information. Applications programs (clients) connect to the server using the HSQLDB JDBC driver. In most server modes, the server can serve up to 10 databases that are specified at the time of running the server. Server modes can use preset properties or command line arguments as detailed in the chapter. There are three server modes, based on the protocol used for communications between the client and server.
                Hsqldb Server This is the preferred way of running a database server and the fastest one. A proprietary communications protocol is used for this mode. A command similar to those used for running tools and described above is used for running the server. The following example of the command for starting the server starts the server with one (default) database with files named "mydb.*". java -cp ../lib/hsqldb.jar org.hsqldb.Server -database.0 file:mydb -dbname.0 xdb The command line argument -? can be used to get a list of available arguments.
                Hsqldb Web Server This mode is used when access to the computer hosting the database server is restricted to the HTTP protocol. The only reason for using the Web Server mode is restrictions imposed by firewalls on the client or server machines and it should not be used where there are no such restrictions. The HSQLDB Web Server is a special web server that allows JDBC clients to connect via HTTP. From 1.7.2 this mode also supports transactions. To run a web server, replace the main class for the server in the example command line above with the following: org.hsqldb.WebServer The command line argument -? can be used to get a list of available arguments.
                Hsqldb Servlet This uses the same protocol as the Web Server. It is used when a separate servlet engine (or application server) such as Tomcat or Resin provides access to the database. The Servlet Mode cannot be started independently from the servlet engine. The Servlet class, in the HSQLDB jar, should be installed on the application server to provide the connection. The database is specified using an application server property. Refer to the source file org.hsqldb.Servlet.java to see the details. Both Web Server and Servlet modes can only be accessed using the JDBC driver at the client end. They do not provide a web front end to the database. The Servlet mode can serve only a single database. Please note that you do not normally use this mode if you are using the database engine in an application server.
                Connecting to a Database running as a Server Once an HSQLDB server is running, client programs can connect to it using the HSQLDB JDBC Driver contained in hsqldb.jar. Full information on how to connect to a server is provided in the Java Documentation for jdbcConnection (located in the /doc/src directory of HSQLDB distribution. A common example is connection to the default port (9001) used for the hsql protocol on the same machine: Java code to connect to the local Server above try { Class.forName("org.hsqldb.jdbcDriver" ); } catch (Exception e) { System.out.println("ERROR: failed to load HSQLDB JDBC driver."); e.printStackTrace(); return; } Connection c = DriverManager.getConnection("jdbc:hsqldb:hsql://localhost/xdb", "sa", ""); In some circumstances, you may have to use the following line to get the driver. Class.forName("org.hsqldb.jdbcDriver").newInstance(); Note in the above connection URL, there is no mention of the database file, as this was specified when running the server. Instead, the value defined for dbname.0 is used. Also, see the chapter for the connection URL when there is more than one database per server instance.
                Security Considerations When HSQLDB is run as a server, network access should be adequately protected. Source IP addresses may be restricted by use of TCP filtering or firewall programs, or standalone firewalls. If the traffic will cross an unprotected network (such as the Internet), the stream should be encrypted (for example by VPN, ssh tunneling, or using the SSL enabled HSQLS and HTTPS variants of the server and web server modes). Only secure passwords should be used-- most importantly, the password for the default system user should be changed from the default empty string. If you are purposefully providing data to the public, then the wide-open public network connection should be used exclusively to access the public data via read-only accounts. (I.e., neither secure data nor privileged accounts should use this connection). These considerations also apply to HSQLDB servers run with the HTTP protocol.
                In-Process (Standalone) Mode This mode runs the database engine as part of your application program in the same Java Virtual Machine. For most applications this mode can be faster, as the data is not converted and sent over the network. The main drawback is that it is not possible by default to connect to the database from outside your application. As a result you cannot check the contents of the database with external tools such as Database Manager while your application is running. In 1.8.0, you can run a server instance in a thread from the same virtual machine as your application and provide external access to your in-process database. The recommended way of using the in-process mode in an application is to use an HSQLDB Server instance for the database while developing the application and then switch to In-Process mode for deployment. An In-Process Mode database is started from JDBC, with the database file path specified in the connection URL. For example, if the database name is testdb and its files are located in the same directory as where the command to run your application was issued, the following code is used for the connection: Connection c = DriverManager.getConnection("jdbc:hsqldb:file:testdb", "sa", ""); The database file path format can be specified using forward slashes in Windows hosts as well as Linux hosts. So relative paths or paths that refer to the same directory on the same drive can be identical. For example if your database path in Linux is /opt/db/testdb and you create an identical directory structure on the C: drive of a Windows host, you can use the same URL in both Windows and Linux: Connection c = DriverManager.getConnection("jdbc:hsqldb:file:/opt/db/testdb", "sa", ""); When using relative paths, these paths will be taken relative to the directory in which the shell command to start the Java Virtual Machine was executed. Refer to Javadoc for jdbcConnection for more details.
                Memory-Only Databases It is possible to run HSQLDB in a way that the database is not persistent and exists entirely in random access memory. As no information is written to disk, this mode should be used only for internal processing of application data, in applets or certain special applications. This mode is specified by the mem: protocol. Connection c = DriverManager.getConnection("jdbc:hsqldb:mem:aname", "sa", ""); You can also run a memory-only server instance by specifying the same URL in the server.properties. This usage is not common and is limited to special applications where the database server is used only for exchanging information between clients, or for non-persistent data.
                General
                Closing the Database All databases running in different modes can be closed with the SHUTDOWN command, issued as an SQL query. From version 1.7.2, in-process databases are no longer closed when the last connection to the database is explicitly closed via JDBC, a SHUTDOWN is required. In 1.8.0, a connection property, shutdown=true, can be specified on the first connection to the database (the connection that opens the database) to force a shutdown when the last connection closes. When SHUTDOWN is issued, all active transactions are rolled back. A special form of closing the database is via the SHUTDOWN COMPACT command. This command rewrites the .data file that contains the information stored in CACHED tables and compacts it to size. This command should be issued periodically, especially when lots of inserts, updates or deletes have been performed on the cached tables. Changes to the structure of the database, such as dropping or modifying populated CACHED tables or indexes also create large amounts of unused file space that can be reclaimed using this command.
                Using Multiple Databases in One JVM In the above examples each server serves only one database and only one in-memory database can be created. However, from version 1.7.2, HSQLDB can serve several databases in multiple server modes and allow simultaneous access to multiple in-process and memory-only databases. These capabilities are covered in the chapter.
                Creating a New Database When a server instance is started, or when a connection is made to an in-process database, a new, empty database is created if no database exists at the given path. This feature has a side effect that can confuse new users. If a mistake is made in specifying the path for connecting to an existing database, a connection is nevertheless established to a new database. For troubleshooting purposes, you can specify a connection property ifexists=true to allow connection to an existing database only and avoid creating a new database. In this case, if the database does not exist, the getConnection() method will throw an exception.
                Using the Database Engine Once a connection is established to a database in any mode, JDBC methods are used to interact with the database. The Javadoc for jdbcConnection , jdbcDriver , jdbcDatabaseMetadata , jdbcResultSet , jdbcStatement , and jdbcPreparedStatement list all the supported JDBC methods together with information that is specific to HSQLDB. JDBC methods are broadly divided into: connection related methods, metadata methods and database access methods. The database access methods use SQL commands to perform actions on the database and return the results either as a Java primitive type or as an instance of the java.sql.ResultSet class. You can use Database Manager or other Java database access tools to explore your database and update it with SQL commands. These programs use JDBC internally to submit your commands to the database engine and to display the results in a human readable format. The SQL dialect used in HSQLDB is as close to the SQL92 and SQL200n standards as it has been possible to achieve so far in a small-footprint database engine. The full list of SQL commands is in the chapter.
                Different Types of Tables HSQLDB supports TEMP tables and three types of persistent tables. TEMP tables are not written to disk and last only for the lifetime of the Connection object. The contents of each TEMP table is visible only from the Connection that was used to populate it; other concurrent connections to the database will have access to their own copies of the table. Since 1.8.0 the definition of TEMP tables conforms to the GLOBAL TEMPORARY type in the SQL standard. The definition of the table persists but each new connections sees its own copy of the table, which is empty at the beginning. When the connection commits, the contents of the table are cleared by default. If the table definition statements includes ON COMMIT PRESERVE ROWS, then the contents are kept when a commit takes place. The three types of persistent tables are MEMORY tables, CACHED tables and TEXT tables. Memory tables are the default type when the CREATE TABLE command is used. Their data is held entirely in memory but any change to their structure or contents is written to the <dbname>.script file. The script file is read the next time the database is opened, and the MEMORY tables are recreated with all their contents. So unlike TEMP table, the default, MEMORY tables are persistent. CACHED tables are created with the CREATE CACHED TABLE command. Only part of their data or indexes is held in memory, allowing large tables that would otherwise take up to several hundred megabytes of memory. Another advantage of cached tables is that the database engine takes less time to start up when a cached table is used for large amounts of data. The disadvantage of cached tables is a reduction in speed. Do not use cached tables if your data set is relatively small. In an application with some small tables and some large ones, it is better to use the default, MEMORY mode for the small tables. TEXT tables are supported since version 1.7.0 and use a CSV (Comma Separated Value) or other delimited text file as the source of their data. You can specify an existing CSV file, such as a dump from another database or program, as the source of a TEXT table. Alternatively, you can specify an empty file to be filled with data by the database engine. TEXT tables are efficient in memory usage as they cache only part of the text data and all of the indexes. The Text table data source can always be reassigned to a different file if necessary. Two commands are needed to set up a TEXT table as detailed in the chapter. With memory-only databases (see above), both MEMORY table and CACHED table declarations are treated as declarations for non-persistent memory tables. TEXT table declarations are not allowed in this mode.
                Constraints and Indexes HSQLDB supports PRIMARY KEY, NOT NULL, UNIQUE, CHECK and FOREIGN KEY constraints. In addition, it supports UNIQUE or ordinary indexes. This support is fairly comprehensive and covers multi-column constraints and indexes, plus cascading updates and deletes for foreign keys. HSQLDB creates indexes internally to support PRIMARY KEY, UNIQUE and FOREIGN KEY constraints: a unique index is created for each PRIMARY KEY or UNIQUE constraint; an ordinary index is created for each FOREIGN KEY constraint. Because of this, you should not create duplicate user-defined indexes on the same column sets covered by these constraints. This would result in unnecessary memory and speed overheads. See the discussion in the chapter for more information. Indexes are crucial for adequate query speed. When queries joining multiple tables are used, there must be an index on each joined column of each table. When range or equality conditions are used e.g. SELECT ... WHERE acol >10 AND bcol = 0, an indexe is required on the acol column used in the condition. Indexes have no effect on ORDER BY clauses or some LIKE conditions. As a rule of thumb, HSQLDB is capable of internal processing of queries at over 100,000 rows per second. Any query that runs into several seconds should be checked and indexes should be added to the relevant columns of the tables if necessary.
                SQL Support The SQL syntax supported by HSQLDB is essentially that specified by the SQL Standard (92 and 200n). Not all the features of the Standard are supported and there are some proprietary extensions. In 1.8.0 the behaviour of the engine is far more compliant with the Standards than with older versions. The main changes are correct treatment of NULL column values in joins, in UNIQUE constraints and in query conditions correct processing of selects with JOIN and LEFT OUTER JOIN correct processing of aggregate functions contained in expressions or containing expression arguments The supported commands are listed in the chapter. For a well written basic guide to SQL with examples you can consult PostgreSQL: Introduction and Concepts by Bruce Momjian, which is available on the web. Most of the SQL coverage in the book applies also to HSQLDB. There are some differences in keywords supported by one and not the other engine (OUTER, OID's, etc.) or used differently (IDENTITY/SERIAL, TRIGGER, SEQUENCE, etc.).
                JDBC Support Since 1.7.2, support for JDBC2 has been significantly extended and some features of JDBC3 are also supported. The relevant classes are thoroughly documented. See the JavaDoc for org.hsqldb.jdbcXXXX classes.
                hsqldb-1.8.0.10.orig/docsrc/guide/sqlsyntax.xml0000644000175000017500000033553610621620035017773 0ustar renerene SQL Syntax The Hypersonic SQL Group Fred Toussi HSQLDB Development Group ft@cluedup.com Peter Hudson HSQLDB Development Group Joe Maher HSQLDB Development Group jrmaher@ameritech.net Blaine Simpson HSQLDB Development Group blaine.simpson@admc.com $Revision: 1.49 $ $Date: 2007/02/19 21:15:47 $ Hsqldb Syntax SQL HSQLDB version 1.8.0 supports the SQL statements and syntax described in this chapter.
                Notational Conventions Used in this Chapter [A] means A is optional. { B | C } means either B or C must be used. [{ B | C }] means either B or C may optionally be used, or nothing at all. ( and ) are the actual characters '(' and ')' used in statements. UPPERCASE words are keywords
                SQL Commands
                ALTER INDEX<footnote id="posthyper"> <para>These features were added by HSQL Development Group since April 2001</para> </footnote> ALTER INDEX <indexname> RENAME TO <newname>; Index names can be changed so long as they do not conflict with other user-defined or sytem-defined names.
                ALTER SEQUENCE<footnoteref linkend="posthyper" /> ALTER SEQUENCE <sequencename> RESTART WITH <value>; Resets the next value to be returned from the sequence.
                ALTER SCHEMA<footnoteref linkend="posthyper" /> ALTER SCHEMA <schemaname> RENAME TO <newname>; Renames the schema as specified. All objects of the schema will hereafter be accessible only with the new schema name. Requires Administrative privileges.
                ALTER TABLE<footnoteref linkend="posthyper" /> ALTER TABLE <tablename> ADD [COLUMN] <columnname> Datatype [(columnSize[,precision])] [{DEFAULT <defaultValue> | GENERATED BY DEFAULT AS IDENTITY (START WITH <n>[, INCREMENT BY <m>])}] | [[NOT] NULL] [IDENTITY] [PRIMARY KEY] [BEFORE <existingcolumn>]; Adds the column to the end of the column list. The optional BEFORE <existingcolumn> can be used to specify the name of an existing column so that the new column is inserted in a position just before the <existingcolumn>. It accepts a as in a CREATE TABLE command. If NOT NULL is specified and the table is not empty, then a default value must be specified. In all other respects, this command is the equivalent of a column definition statement in a CREATE TABLE statement. If an SQL view includes a SELECT * FROM <tablename> in its select statement, the new column is added to the view. This is a non-standard feature which is likely to change in the future. ALTER TABLE <tablename> DROP [COLUMN] <columnname>; Drops the column from the table. Will drop any single-column primary key or unique constraint on the column as well. The command will not work if there is any multiple key constraint on the column or the column is referenced in a check constraint or a foreign key. It will also fail if an SQL view includes the column. ALTER TABLE <tablename> ALTER COLUMN <columnname> RENAME TO <newname> Changes a column name. ALTER TABLE <tablename> ALTER COLUMN <columnname> SET DEFAULT <defaultvalue>}; Adds the specified default value to the column. Use NULL to remove a default. ALTER TABLE <tablename> ALTER COLUMN <columnname> SET [NOT] NULL Sets or removes a NOT NULL constraint for the column. ALTER TABLE <tablename> ALTER COLUMN <columnDefinition>; This form of ALTER TABLE ALTER COLUMN accepts a as in a CREATE TABLE command, with the following restrictions. Restrictions The column must be already be a PK column to accept an IDENTITY definition. If the column is already an IDENTITY column and there is no IDENTITY definition, the existing IDENTITY attribute is removed. The default expression will be that of the new definition, meaning an existing default can be dropped by ommission, or a new default added. The NOT NULL attribute will be that of the new definition (similar to previous item). Depending on the type of change, the table may have to be empty for the command to work. It always works when the type of change is possible in general and the individual existing values can all be converted. ALTER TABLE <tablename> ALTER COLUMN <columnname> RESTART WITH <new sequence value> This form is used exclusively for IDENTITY columns and changes the next automatic value for the identity sequence. ALTER TABLE <tablename> ADD [CONSTRAINT <constraintname>] CHECK (<search condition>); Adds a check constraint to the table. In the current version, a check constraint can reference only the row being inserted or updated. ALTER TABLE <tablename> ADD [CONSTRAINT <constraintname>] UNIQUE (<column list>); Adds a unique constraint to the table. This will not work if there is already a unique constraint covering exactly the same <column list>. This will work only if the values of the column list for the existing rows are unique or include a null value. ALTER TABLE <tablename> ADD [CONSTRAINT <constraintname>] PRIMARY KEY (<column list>); Adds a primary key constraint to the table, using the same constraint syntax as when the primary key is specified in a table definition. ALTER TABLE <tablename> ADD [CONSTRAINT <constraintname>] FOREIGN KEY (<column list>) REFERENCES <exptablename> (<column list>) [ON {DELETE | UPDATE} {CASCADE | SET DEFAULT | SET NULL}]; Adds a foreign key constraint to the table, using the same constraint syntax as when the foreign key is specified in a table definition. This will fail if for each existing row in the referring table, a matching row (with equal values for the column list) is not found in the referenced tables. ALTER TABLE <tablename> DROP CONSTRAINT <constraintname>; Drop a named unique, check or foreign key constraint from the table. ALTER TABLE <tablename> RENAME TO <newname>;
                ALTER USER<footnoteref linkend="posthyper" /> ALTER USER <username> SET PASSWORD <password>; Changes the password for an existing user. Password must be double quoted. Use "" for an empty password. DBA's may change users' base default schema name with the comand ALTER USER <username> SET INITIAL SCHEMA <schemaname>; This is the schema which database object names will resolve to for this user, unless overridden as explained in . For reasons of backwards compatibility, the initial schema value will not be persisted across database shutdowns until HSQLDB version 1.8.1. (I.e., INITIAL SCHEMA settings will be lost upon database shutdown with HSQLDB versions lower than version 1.8.1). Only an administrator may use these commands.
                CALL CALL Expression; Any expression can be called like a stored procedure, including, but not only Java stored procedures or functions. This command returns a ResultSet with one column and one row (the result) just like a SELECT statement with one row and one column. See also: , .
                CHECKPOINT CHECKPOINT [DEFRAG]; Closes the database files, rewrites the script file, deletes the log file and opens the database. If DEFRAG is specified, this command also shrinks the .data file to its minimal size. See also: , .
                COMMIT COMMIT [WORK]; Ends a transaction and makes the changes permanent. See also: , , .
                CONNECT CONNECT USER <username> PASSWORD <password>; Connects to the database as a different user. Password should be double quoted. Use "" for an empty password. See also: , .
                CREATE ALIAS CREATE ALIAS <function> FOR <javaFunction>; Creates an alias for a static Java function to be used as a Stored Procedure. The function must be accessible from the JVM in which the database runs. Example: CREATE ALIAS ABS FOR "java.lang.Math.abs"; The CREATE ALIAS command just defines the alias. It does not validate existence of the target method or its containing class. To validate the alias, use it. See also: , .
                CREATE INDEX CREATE [UNIQUE] INDEX <index> ON <table> (<column> [DESC] [, ...]) [DESC]; Creates an index on one or more columns in a table. Creating an index on searched columns may improve performance. The qualifier DESC can be present for command compatibility with other databases but it has no effect. Unique indexes can be defined but this is deprecated. Use UNIQUE constraints instead. The name of an index must be unique within the whole database. See also: , .
                CREATE ROLE<footnoteref linkend="posthyper" /> CREATE ROLE <rolename>; Creates the named role with no members. Requires Administrative privileges.
                CREATE SCHEMA<footnoteref linkend="posthyper" /> CREATE SCHEMA <schemaname> AUTHORIZATION <grantee> [<createStatement> [<grantStatement>] [...]; Creates the named schema, with ownership of the specified authorization. The authorization grantee may be a database user or a role. Optional (nested) CREATE and GRANT statements can be given only for new objects in this new schema. Only the last nested statement should be terminated with a semicolon, because the first semicolon encountered after "CREATE SCHEMA" will end the CREATE SCHEMA command. In the example below, a new schema, ACCOUNTS, is created, then two tables and a view are added to this schma and some rights on these objects are granted. CREATE SCHEMA ACCOUNTS AUTHORIZATION DBA CREATE TABLE AB(A INTEGER, ...) CREATE TABLE CD(C CHAHR, ...) CREATE VIEW VI AS SELECT ... GRANT SELECT TO PUBLIC ON AB GRANT SELECT TO JOE ON CD; Note that this example consists of one CREATE SCHEMA statement which is terminated by a semicolon. Requires Administrative privileges.
                CREATE SEQUENCE<footnoteref linkend="posthyper" /> CREATE SEQUENCE <sequencename> [AS {INTEGER | BIGINT}] [START WITH <startvalue>] [INCREMENT BY <incrementvalue>]; Creates a sequence. The default type is INTEGER. The default start value is 0 and the increment 1. Negative values are not allowed. If a sequence goes beyond Integer.MAXVALUE or Long.MAXVALUE, the next result is determined by 2's complement arithmetic. The next value for a sequence can be included in SELECT, INSERT and UPDATE statements as in the following example: SELECT [...,] NEXT VALUE FOR <sequencename> [, ...] FROM <tablename>; In the proposed SQL 200n and in the current version, there is no way of retreiving the last returned value of a sequence.
                CREATE TABLE CREATE [MEMORY | CACHED | [GLOBAL] TEMPORARY | TEMP | TEXT] TABLE <name> ( <columnDefinition> [, ...] [, <constraintDefinition>...] ) [ON COMMIT {DELETE | PRESERVE} ROWS]; Creates a tables in memory (default) or on disk and only cached in memory. If the database is all-in-memory, both MEMORY and CACHED forms of CREATE TABLE return a MEMORY table while the TEXT form is not allowed. Components of a CREATE TABLE command columnDefinition columnname Datatype [(columnSize[,precision])] [{DEFAULT <defaultValue> | GENERATED BY DEFAULT AS IDENTITY (START WITH <n>[, INCREMENT BY <m>])}] | [[NOT] NULL] [IDENTITY] [PRIMARY KEY] Default values that are allowed are constant values or certain SQL datetime functions. Allowed Default Values in Column Definitions For character column, a single-quoted string or NULL. The only SQL function that can be used is CURRENT_USER. For datetime columns, a single-quoted DATE, TIME or TIMESTAMP value or NULL. Or a datetime SQL function such as CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, TODAY, NOW. Each function is allowed for a certain datetime type. For BOOLEAN columns, the literals FALSE, TRUE, NULL. For numeric columns, any valid number or NULL. For binary columns, any valid hex string or NULL. Only one identity column is allowed in each table. Identity columns are autoincrement columns. They must be of INTEGER or BIGINT type and are automatically primary key columns (as a result, multi-column primary keys are not possible with an IDENTITY column present). Using the long SQL syntax the (START WITH <n>) clause specifies the first value that will be used. The last inserted value into an identity column for a connection is available using the function IDENTITY(), for example (where Id is the identity column): INSERT INTO Test (Id, Name) VALUES (NULL,'Test'); CALL IDENTITY(); constraintDefinition [CONSTRAINT <name>] UNIQUE ( <column> [,<column>...] ) | PRIMARY KEY ( <column> [,<column>...] ) | FOREIGN KEY ( <column> [,<column>...] ) REFERENCES <refTable> ( <column> [,<column>...]) [ON {DELETE | UPDATE} {CASCADE | SET DEFAULT | SET NULL}] | CHECK(<search condition>) Both ON DELETE and ON UPDATE clauses can be used in a single foreign key definition. search condition A search condition is similar to the set of conditions in a WHERE clause. In the current version of HSQLDB, the conditions for a CHECK constraint can only reference the current row, meaning there should be no SELECT statement. Sample table definitions with CHECK constraints are in TestSelfCheckConstraints.txt. This file is in the /hsqldb/testrun/hsqldb/ directory of the zip. General syntax limitations HSQLDB databases are initially created in a legacy mode that does not enforce column size and precision. You can set the property: sql.enforce_strict_size=true to enable this feature. When this property has been set, Any supplied column size and precision for numeric and character types (CHARACTER and VARCHAR) are enforced. Use the command, SET PROPERTY "sql.enforce_strict_size" TRUE once before defining the tables. NOT NULL constraints can be part of the column definition only. Other constraints cannot be part of the column definition and must appear at the end of the column definition list. TEMPORARY TABLE contents for each session (connection) are emptied by default at each commit or rollback. The optional qualifier ON COMMIT PRESERVE ROWS can be used to keep the rows while the session is open. The default is ON COMMIT DELETE ROWS. See also: .
                CREATE TRIGGER<footnoteref linkend="posthyper" /> CREATE TRIGGER <name> {BEFORE | AFTER} {INSERT | UPDATE | DELETE} ON <table> [FOR EACH ROW] [QUEUE n] [NOWAIT] CALL <TriggerClass>; TriggerClass is an application-supplied class that implements the org.hsqldb.Trigger interface e.g. "mypackage.TrigClass". It is the fire method of this class that is invoked when the trigger event occurs. You should provide this class, which can have any name, and ensure that this TriggerClass is present in the classpath which you use to start hsqldb. Since 1.7.2 the implementation has been changed and enhanced. When the 'fire' method is called, it is passed the following arguments: fire (String name, String table, Object row1[], Object row2[]) where 'row1' and 'row2' represent the 'before' and 'after' states of the row acted on, with each column being a member of the array. The mapping of members of the row arrays to database types is specified in . For example, BIGINT is represented by a java.lang.Long Object. Note that the number of elements in the row arrays could be larger than the number of columns by one or two elements. Never modify the last elements of the array, which are not part of the actual row. If the trigger method wants to access the database, it must establish its own JDBC connection. This can cause data inconsistency and other problems so it is not recommended. The jdbc:default:connection: URL is not currently supported. Implementation note: If QUEUE 0 is specified, the fire method is execued in the same thread as the database engine. This allows trigger action to alter the data that is about to be stored in the database. Data can be checked or modified in BEFORE INSERT / UPDATE + FOR EACH ROW triggers. All table constraints are then enforced by the database engine and if there is a violation, the action is rejected for the SQL command that initiated the INSERT or UPDATE. There is an exception to this rule, that is with UPDATE queries, referential integrity and cascading actions resulting from ON UPDATE CASCASE / SET NULL / SET DEFAULT are all performed prior to the invocation of the trigger method. If an invalid value that breaks referential integrity is inserted in the row by the trigger method, this action is not checked and results in inconsistent data in the table. Alternatively, if the trigger is used for external communications and not for checking or altering the data, a queue size larger than zero can be specified. This is in the interests of not blocking the database's main thread as each trigger will run in a thread that will wait for its firing event to occur. When this happens, the trigger's thread calls TriggerClass.fire. There is a queue of events waiting to be run by each trigger thread. This is particularly useful for 'FOR EACH ROW' triggers, when a large number of trigger events occur in rapid succession, without the trigger thread getting a chance to run. If the queue becomes full, subsequent additions to it cause the database engine to suspend awaiting space in the queue. Take great care to avoid this situation if the trigger action involves accessing the database, as deadlock will occur. This can be avoided either by ensuring the QUEUE parameter makes a large enough queue, or by using the NOWAIT parameter, which causes a new trigger event to overwrite the most recent event in the queue. The default queue size is 1024. Note also that the timing of trigger method calls is not guaranteed, so applications should implement their own synchronization measures if necessary. With a non-zero QUEUE parameter, if the trigger methods modifies the 'row2' values, these changes may or may not affect the database and will almost certainly result in data inconsistency. Please refer to the code for org.hsqldb.sample.Trigger and org.hsqldb.sample.TriggerSample for more information on how to write a trigger class. See also: .
                CREATE USER CREATE USER <username> PASSWORD <password> [ADMIN]; Creates a new user or new administrator in this database. Password must be double quoted. Empty password can be made using "". You can change a password afterwards using a command. Only an administrator can do this. See also: , , . ,
                CREATE VIEW<footnoteref linkend="posthyper" /> CREATE VIEW <viewname>[(<viewcolumn>,..) AS SELECT ... FROM ... [WHERE Expression] [ORDER BY orderExpression [, ...]] [LIMIT <limit> [OFFSET <offset>]]; A view can be thought of as either a virtual table or a stored query. The data accessible through a view is not stored in the database as a distinct object. What is stored in the database is a SELECT statement. The result set of the SELECT statement forms the virtual table returned by the view. A user can use this virtual table by referencing the view name in SQL statements the same way a table is referenced. A view is used to do any or all of these functions: Restrict a user to specific rows in a table. For example, allow an employee to see only the rows recording his or her work in a labor-tracking table. Restrict a user to specific columns. For example, allow employees who do not work in payroll to see the name, office, work phone, and department columns in an employee table, but do not allow them to see any columns with salary information or personal information. Join columns from multiple tables so that they look like a single table. Aggregate information instead of supplying details. For example, present the sum of a column, or the maximum or minimum value from a column. Views are created by defining the SELECT statement that retrieves the data to be presented by the view. The data tables referenced by the SELECT statement are known as the base tables for the view. In this example, is a view that selects data from three base tables to present a virtual table of commonly needed data: CREATE VIEW mealsjv AS SELECT m.mid mid, m.name name, t.mealtype mt, a.aid aid, a.gname + ' ' + a.sname author, m.description description, m.asof asof FROM meals m, mealtypes t, authors a WHERE m.mealtype = t.mealtype AND m.aid = a.aid; You can then reference mealsjv in statements in the same way you would reference a table: SELECT * FROM mealsjv; A view can reference another view. For example, mealsjv presents information that is useful for long descriptions that contain identifiers, but a short list might be all a web page display needs. A view can be built that selects only specific mealsjv columns: CREATE VIEW mealswebv AS SELECT name, author FROM mealsjv; The SELECT statement in a VIEW definition should return columns with distinct names. If the names of two columns in the SELECT statement are the same, use a column alias to distinguish between them. A list of new column names can always be defined for a view. CREATE VIEW aview (new_name, new_author) AS SELECT name, author FROM mealsjv See also: , , .
                DELETE DELETE FROM table [WHERE Expression]; Removes rows in a table. See also: , , .
                DISCONNECT DISCONNECT; Closes this connection. It is not required to call this command when using the JDBC interface: it is called automatically when the connection is closed. After disconnecting, it is not possible to execute other queries (including CONNECT) with this connection. See also: .
                DROP INDEX DROP INDEX index [IF EXISTS]; Removes the specified index from the database. Will not work if the index backs a UNIQUE of FOREIGN KEY constraint. See also: .
                DROP ROLE<footnoteref linkend="posthyper" /> DROP ROLE <rolename>; Removes all members from specified role, then removes the role itself.
                DROP SEQUENCE<footnoteref linkend="posthyper" /> DROP SEQUENCE <sequencename> [IF EXISTS] [RESTRICT | CASCADE]; Removes the specified sequence from the database. When IF EXIST is used, the statement returns without an error if the sequence does not exist. The RESTRICT option is in effect by default, meaning that DROP will fail if any view reference the sequence. Specify the CASCADE option to silently drop all dependent database objects.
                DROP SCHEMA<footnoteref linkend="posthyper" /> DROP SCHEMA <schemaname> [RESTRICT | CASCADE]; Removes the specified schema from the database. The RESTRICT option is in effect by default, meaning that DROP will fail if any objects such as tables or sequences have been defined in the schema. Specify the CASCADE option to silently drop all database objects in the schema. Requires Administrative privileges.
                DROP TABLE DROP TABLE <table> [IF EXISTS] [RESTRICT | CASCADE]; Removes a table, the data and indexes from the database. When IF EXIST is used, the statement returns without an error even if the table does not exist. The RESTRICT option is in effect by default, meaning that DROP will fail if any tables or views refer to this table. Specify the CASCADE option to silently drop all dependent views, and to drop any foreign key constraint that links this table with other tables. See also: .
                DROP TRIGGER DROP TRIGGER <trigger>; Removes a trigger from the database. See also: .
                DROP USER DROP USER <username>; Removes a user from the database. Only an administrator do this. See also: .
                DROP VIEW<footnoteref linkend="posthyper" /> DROP VIEW <viewname> [IF EXISTS] [RESTRICT | CASCADE]; Removes a view from the database. When IF EXIST is used, the statement returns without an error if the view does not exist. The RESTRICT option is in effect by default, meaning that DROP will fail if any other view refers to this view. Specify the CASCADE option to silently drop all dependent views. See also: .
                EXPLAIN PLAN EXPLAIN PLAN FOR { SELECT ... | DELETE ... | INSERT ... | UPDATE ..}; EXPLAIN PLAN FOR can be used with any query to get a detailed list of the elements in the execution plan. This list includes the indexes used for performing the query and can be used to optimise the query or to add indexes to tables.
                GRANT GRANT { SELECT | DELETE | INSERT | UPDATE | ALL } [,...] ON { table | CLASS "package.class" } TO <grantee>; GRANT <rolename> [,...] TO <grantee>; <grantee> is either a user name, a role name, or PUBLIC. PUBLIC means all users. The first form of the GRANT command assigns privileges to a grantee for a table or for a class. To allow a user to call a Store Procedure static function, the right ALL must be used. Examples: GRANT SELECT ON Test TO GUEST; GRANT ALL ON CLASS "java.lang.Math.abs" TO PUBLIC; Even though the command is GRANT ALL ON CLASS, you must specify a static method name. You are actually granting access to a static method, not to a class. The second form of the GRANT command gives the specified <grantee> membership in the specified role. Requires Administrative privileges. See also: , , .
                INSERT INSERT INTO table [( column [,...] )] { VALUES(Expression [,...]) | SelectStatement}; Adds one or more new rows of data into a table.
                REVOKE REVOKE { SELECT | DELETE | INSERT | UPDATE | ALL } [,...] ON { table | CLASS "package.class" } FROM <grantee>; REVOKE <rolename> [,...] FROM <grantee>; <grantee> is either a user name, a role name, or PUBLIC. PUBLIC means all users. The first form of the REVOKE command withdraws privileges from a grantee for a table or for a class. The second form of the REVOKE command withdraws membership of the specified <grantee> from the specified role. Both forms require Administrative privileges. See also: .
                ROLLBACK ROLLBACK [TO SAVEPOINT <savepoint name> | WORK}]; ROLLBACK used on its own, or with WORK, undoes changes made since the last COMMIT or ROLLBACK. ROLLBACK TO SAVEPOINT <savepoint name> undoes the change since the named savepoint. It has no effect if the savepoint is not found. See also: .
                SAVEPOINT<footnoteref linkend="posthyper" /> SAVEPOINT <savepoint name>; Sets up a SAVEPOINT for use with ROLLBACK TO SAVEPOINT. See also: .
                SCRIPT SCRIPT ['file']; Creates an SQL script describing the database. If the file is not specified, a result set containing only the DDL script is returned. If the file is specified then this file is saved with the path relative to the machine where the database engine is located. Only an administrator may do this.
                SELECT<footnoteref linkend="posthyper" /> SELECT [{LIMIT <offset> <limit> | TOP <limit>}][ALL | DISTINCT] { selectExpression | table.* | * } [, ...] [INTO [CACHED | TEMP | TEXT] newTable] FROM tableList [WHERE Expression] [GROUP BY Expression [, ...]] [HAVING Expression] [{ UNION [ALL | DISTINCT] | {MINUS [DISTINCT] | EXCEPT [DISTINCT] } | INTERSECT [DISTINCT] } selectStatement] [ORDER BY orderExpression [, ...]] [LIMIT <limit> [OFFSET <offset>]]; Retrieves information from one or more tables in the database. Components of a SELECT command tableList table [{CROSS | INNER | LEFT OUTER | RIGHT OUTER} JOIN table ON Expression] [, ...] table { (selectStatement) [AS] label | tableName} selectExpression { Expression | COUNT(*) | { COUNT | MIN | MAX | SUM | AVG | SOME | EVERY | VAR_POP | VAR_SAMP | STDDEV_POP | STDDEV_SAMP } ([ALL | DISTINCT]] Expression) } [[AS] label] If DISTINCT is specified, only one instance of several equivalent values is used in the aggregate function. Except COUNT(*), all aggregate functions exclude NULL values. The type of the returned value for SUM is subject to deterministic widenning to ensure lossless results. The returned value type for COUNT is INTEGER, for MIN, MAX and AVG it is the same type as the column, for SOME and EVERY it is BOOLEAN. For VAR_POP, VAR_SAMP, STDDEV_POP and STDDEV_SAMP statistical functions, the type is always DOUBLE. These statistical functions do not allow ALL or DISTINCT qualifiers. If CROSS JOIN is specified no ON expression is allowed for the join. orderExpression { columnNr | columnAlias | selectExpression } [ASC | DESC] LIMIT n m Creates the result set for the SELECT statement first and then discards the first n rows (OFFSET) and returns the first m rows of the remaining result set (LIMIT). Special cases: LIMIT 0 m is equivalent to TOP m or FIRST m in other RDBMS's; LIMIT n 0 discards the first n rows and returns the rest of the result set. LIMIT m OFFSET n This form is used at the end of the SELECT statement. The OFFSET term is optional. TOP m Equivalent to LIMIT 0 m. UNION and other set operations Multiple SELECT statements joined with UNION, EXCEPT and INTERSECT are possible. Each SELECT is then treated as a term, and the set operation as an operator in an expression. The expression is evaluated from left to right but INTERSECT takes precedence over the rest of the operators and is applied first. You can use parentheses around any number of SELECT statements to change the evaluation order. See also: , , .
                SET AUTOCOMMIT SET AUTOCOMMIT { TRUE | FALSE }; Switches on or off the connection's auto-commit mode. If switched on, then all statements will be committed as individual transactions. Otherwise, the statements are grouped into transactions that are terminated by either COMMIT or ROLLBACK. By default, new connections are in auto-commit mode. This command should not be used directly. Use the JDBC equivalent method, Connection.setAutoCommit(boolean autocommit).
                SET DATABASE COLLATION<footnoteref linkend="posthyper" /> SET DATABASE COLLATION <double quoted collation name>; Each database can have its own collation. Sets the collation from the set of collations in the source for org.hsqldb.Collation. Once this command has been issued, the database can be opened in any JVM and will retain its collation.
                SET CHECKPOINT DEFRAG<footnoteref linkend="posthyper" /> SET CHECKPOINT DEFRAG <size>; The parameter size is the megabytes of abandoned space in the .data file. When a CHECKPOINT is performed either as a result of the .log file reaching the limit set by "SET LOGSIZE size", or by the user issuing a CHECKPOINT command, the amount of space abandoned during the session is checked and if it is larger than size, a CHECKPOINT DEFRAG is performed instead of a checkpoint.
                SET IGNORECASE SET IGNORECASE { TRUE | FALSE }; Disables (ignorecase = true) or enables (ignorecase = false) the case sensitivity of text comparison and indexing for new tables. By default, character columns in new databases are case sensitive. The sensitivity must be switched before creating tables. Existing tables and their data are not affected. When switched on, the data type VARCHAR is set to VARCHAR_IGNORECASE in new tables. Alternatively, you can specify the VARCHAR_IGNORECASE type for the definition of individual columns. So it is possible to have some columns case sensitive and some not, even in the same table. Only an administrator may do this.
                SET INITIAL SCHEMA <footnoteref linkend="posthyper" /> Users may change their base default schema name with the comand SET INITIAL SCHEMA <schemaname>; This is the schema which database object names will resolve to for the current user, unless overridden as explained in . For reasons of backwards compatibility, the initial schema value will not be persisted across database shutdowns until HSQLDB version 1.8.1. (I.e., INITIAL SCHEMA settings will be lost upon database shutdown with HSQLDB versions lower than version 1.8.1).
                SET LOGSIZE SET LOGSIZE <size>; Sets the maximum size in MB of the .log file. Default is 200 MB. The database will be closed and opened (just like using CHECKPOINT) if the .log file gets over this limit, and so the .log file will shrink. 0 means no limit. See also: .
                SET MAXROWS SET MAXROWS <maxwors>; Describe me!
                SET PASSWORD SET PASSWORD <password>; Changes the password of the currently connected user. Password must be double quotedEmpty password can be set using "".
                SET PROPERTY<footnoteref linkend="posthyper" /> SET PROPERTY <double quoted name> <value>; Sets a database property. Properties that can be set using this command are either boolean or integral and are listed in the chapter.
                SET READONLY SET READONLY {TRUE|FALSE}; Describe me!
                SET REFERENTIAL INTEGRITY SET REFERENTIAL_INTEGRITY { TRUE | FALSE }; This commands enables / disables the referential integrity checking (foreign keys). Normally it should be switched on (this is the default) but when importing data (and the data is imported in the 'wrong' order) the checking can be switched off. Note that when referential integrity is switched back on, no check is made that the changes to the data are consistent with the existing referential integrity constraints. You can verify consistency using SQL queries and take appropriate actions. Only an administrator may do this. See also: .
                SET SCHEMA<footnoteref linkend="posthyper" /> SET SCHEMA <schemaname>; Sets the current JDBC session's schema. The sole purpose for the session schema is to provide a default schema name for schema objects that do not have the schema name specified explicitly in the SQL command, or by association with another object of known schema. For example, if you run SELECT * FROM atbl;, HSQLDB will look for the table or view named atbl in the session's current schema. Session schemas last only for the duration of the current session. When a new JDBC session is obtained, the new session will have the default schema.
                SET SCRIPTFORMAT<footnoteref linkend="posthyper" /> SET SCRIPTFORMAT {TEXT | BINARY | COMPRESSED}; Changes the format of the script file. BINARY and COMPRESSED formats are slightly faster and more compact than the default TEXT. Recommended only for very large script files.
                SET TABLE INDEX SET TABLE tableName INDEX 'index1rootPos index2rootPos ... '; This command is only used internally to store the position of index roots in the .data file. It appears only in database script files; it should not be used directly.
                SET TABLE READONLY<footnoteref linkend="posthyper" /> SET TABLE <tablename> READONLY {TRUE | FALSE}; Sets the table as read only.
                SET TABLE SOURCE<footnoteref linkend="posthyper" /> SET TABLE <tablename> SOURCE <file and options> [DESC]; For details see the chapter. This command is used exclusively with TEXT tables to specify which file is used for storage of the data. The optional DESC qualifier results in the text file indexed from the end and opened as readonly. The <file and options> argument is a double quoted string that consists of: <file and options>::= <doublequote> <filepath> [<semicolon> <option>...] <doublequote> Example: SET TABLE mytable SOURCE "myfile;fs=|;vs=.;lvs=~" Supported Properties quoted = { true | false } default is true. If false, treats double quotes as normal characters all_quoted = { true | false } default is false. If true, adds double quotes around all fields. encoding = <encoding name> character encoding for text and character fields, for example, encoding=UTF-8 ignore_first = { true | false } default is false. If true ignores the first line of the file cache_scale= <numeric value> exponent to calculate rows of the text file in cache. Default is 8, equivalent to nearly 800 rows cache_size_scale = <numeric value>r exponent to calculate average size of each row in cache. Default is 8, equivalent to 256 bytes per row. fs = <unquoted character> field separator vs = <unquoted character> varchar separator lvs = <unquoted character> long varchar separator Special indicators for Hsqldb Text Table separators \semi semicolon \quote quote \space space character \apos apostrophe \n newline - Used as an end anchor (like $ in regular expressions) \r carriage return \t tab \\ backslash \u#### a Unicode character specified in hexadecimal Only an administrator may do this.
                SET WRITE DELAY<footnoteref linkend="posthyper" /> SET WRITE_DELAY {{ TRUE | FALSE } | <seconds> | <milliseconds> MILLIS}; This controls the frequency of file sync for the log file. When WRITE_DELAY is set to FALSE or 0, the sync takes place immediately at each COMMIT. WRITE_DELAY TRUE performs the sync once every 20 seconds (which is the default). A numeric value can be specified instead. The purpose of this command is to control the amount of data loss in case of a total system crash. A delay of 1 second means at most the data written to disk during the last second before the crash is lost. All data written prior to this has been synced and should be recoverable. A write delay of 0 impacts performance in high load situations, as the engine has to wait for the file system to catch up. To avoid this, you can set write delay down to 10 milliseconds. In practice, a write delay of 100 milliseconds provides better than 99.9999% reliability with an average one system crash per day, or 99.99999% with an average one system crash per 6 days. Each time a SET WRITE_DELAY is issued with any value, a sync is immediately performed. Only an administrator may do this.
                SHUTDOWN SHUTDOWN [IMMEDIATELY | COMPACT | SCRIPT]; Closes the current database. Varieties of the SHUTDOWN command SHUTDOWN Performs a checkpoint to creates a new .script file that has the minimum size and contains the data for memory tables only. It then backs up the .data file containing the CACHED TABLE data in zipped format to the .backup file and closes the database. SHUTDOWN IMMEDIATELY Just closes the database files (like when the Java process for the database is terminated); this command is used in tests of the recovery mechanism. This command should not be used as the routine method of closing the database. SHUTDOWN COMPACT Writes out a new .script file which contains the data for all the tables, including CACHED and TEXT tables. It then deletes the existing text table files and the .data file before rewriting them. After this, it backs up the .data file in the same way as normal SHUTDOWN. This operation shrinks all files to the minimum size. SHUTDOWN SCRIPT Similar to SHUTDOWN COMPACT but after writing the script and deleting the existing files, it does not rewrite the .data and text table files. After SHUTDOWN SCRIPT, only the .script and .properties file remain. At the next startup, these files are processed and the .data and .backup files are created. This command in effect performs part of the job of SHUTDOWN COMPACT, leaving the other part to be performed automatically at the next startup. This command produces a full script of the database which can be edited for special purposes prior to the next startup. Only an administrator may use the SHUTDOWN command.
                UPDATE UPDATE table SET column = Expression [, ...] [WHERE Expression]; Modifies data of a table in the database. See also: , , .
                Schema object naming Schema objects are database objects that are always scoped to a specific schema. Each schema has a namespace. There may be multiple schema objects of the same name, each in the namespace of a different schema. A particular schema object may nearly always be uniquely identified using the notation schemaname.objectname. All HSQLDB database objects are schema objects, other than the following. HSQLDB Non-Schema Object Types Users Roles Store Procedure Java Classes HSQL Aliases Our current Java-class-based Triggers are not fully schema objects. However, we are in the process of implementing SQL-conformant triggers which will encompass our Java-class-based triggers. When this work is completed, HSQLDB triggers will be schema objects. Sequences are schema objects with creation and removal permission governed by schema authorization (as described hereafter), but GRANT and REVOKE command do not work yet for sequences. In a future version of HSQLDB, sequence GRANTs and REVOKEs will work similarly to the current GRANT and REVOKE commands for table access. Most of the time, you do not need to specify the schema for the desired schema object, because the implicit schema is usually the only one that can be used. For example, when creating an index, the target schema will default to that of the table which is the target of the index. Named constraints are an extreme example of this. There is never a need to specify a schema name for a constraint, since constraint names are only specified in a CREATE or ALTER TABLE command, and the schema must be that of the target table. If the implicit schema is not determined by a related object, then the default comes from your JDBC session's current schema setting. The session schema value will be your login user's initial schema, or whatever you last set it to with in your current JDBC session with the SET SCHEMA command. (Your initial schema is "PUBLIC" unless changed with the ALTER USER SET INITIAL SCHEMA or the command). In addition to namespace scoping, there are permission aspects to the schema of a database object. The authorization of a schema is a role or user that is basically the owner of the schema. Only a user with the DBA role (an admin user) or the owner of a schema may create objects, or modify the DDL of objects, in the namespace of that schema. In this way, a schema authorization is said to "own" the objects of that schema. A schema authorization/owner can be a role or a user (even a role with no members). The two schemas automatically created when a database is initialized are both owned by the role DBA. An important implication to database objects being owned by the schema owner is, if a non-DBA database user is to have permission to create any database object, they must have ownership of a schema. To allow a user to create (or modify DDL of) objects in their own personal schema, you would create a new schema with that user as the authorization. To allow a non-DBA user to share create and DDL privileges in some schema, you would create this schema with a role as the authorization, then GRANT this role to all of the desired users. The INFORMATION_SCHEMA is a system defined schema that contains the system tables for the database. This schema is read-only. When a database is created, a shema named PUBLIC is automatically created as the default schma. This schema has the authorization DBA. You can change the name of this schema. If all non-system schemas are dropped from a database, an empty PUBLIC schema is created again. So each database always has at least one non-system schema.
                Data Types Data Types. The types on the same line are equivalent.Data Types Name Range Java Type INTEGER | INT as Java type int | java.lang.Integer DOUBLE [PRECISION] | FLOAT as Java type double | java.lang.Double VARCHAR as Integer.MAXVALUE java.lang.String VARCHAR_IGNORECASE as Integer.MAXVALUE java.lang.String CHAR | CHARACTER as Integer.MAXVALUE java.lang.String LONGVARCHAR as Integer.MAXVALUE java.lang.String DATE as Java type java.sql.Date TIME as Java type java.sql.Time TIMESTAMP | DATETIME as Java type java.sql.Timestamp DECIMAL No limit java.math.BigDecimal NUMERIC No limit java.math.BigDecimal BOOLEAN | BIT as Java type boolean | java.lang.Boolean TINYINT as Java type byte | java.lang.Byte SMALLINT as Java type short | java.lang.Short BIGINT as Java type long | java.lang.Long REAL as Java type double | java.lang.Double BINARY as Integer.MAXVALUE byte[] VARBINARY as Integer.MAXVALUE byte[] LONGVARBINARY as Integer.MAXVALUE byte[] OTHER | OBJECT as Integer.MAXVALUE java.lang.Object
                The uppercase names are the data types names defined by the SQL standard or commonly used by RDMS's. The data types in quotes are the Java class names - if these type names are used then they must be enclosed in quotes because in Java names are case-sensitive. Range indicates the maximum size of the object that can be stored. Where Integer.MAXVALUE is stated, this is a theoretical limit and in practice the maximum size of a VARCHAR or BINARY object that can be stored is dictated by the amount of memory available. In practice, objects of up to a megabyte in size have been successfully used in production databases. The recommended Java mapping for the JDBC datatype FLOAT is as a Java type "double". Because of the potential confusion it is recommended that DOUBLE is used instead of FLOAT. VARCHAR_IGNORECASE is a special case-insensitive type of VARCHAR. This type is not portable. In table definition statements, HSQLDB accepts size, precision and scale qualifiers only for certain types: CHAR(s), VARCHAR(s), DOUBLE(p), NUMERIC(p), DECIMAL(p,s) and TIMESTAMP(p). TIMESTAMP(p) can take only 0 or 6 as precision. Zero indicates no subsecond part. Without the precision, the default is 6. By default specified precision and scale for the column is simply ignored by the engine. Instead, the values for the corresponding Java types are always used, which in the case of DECIMAL is an unlimited precision and scale. If a size is specified, it is stored in the database definition but is not enforeced by default. Once you have created the database (before adding data), you can add a database property value to enforce the sizes: SET PROPERTY "sql.enforce_strict_size" true This will enforce the specified size and pad CHAR fields with spaces to fill the size. This complies with SQL standards by throwing an exception if an attempt is made to insert a string longer than the maximum size. It also results in all DECIMAL values conforming to the specified precision and scale. CHAR and VARCHAR and LONGVARCHAR columns are by default compared and sorted according to POSIX standards. See the section above to modify this behavior. The property sql.compare_in_locale is no longer supported. Instead, you can define a collation to be used for all character comparisons. Columns of the type OTHER or OBJECT contain the serialized form of a Java Object in binary format. To insert or update such columns, a binary format string (see below under Expression) should be used. Using PreparedStatements with JDBC automates this transformation.
                SQL Comments -- SQL style line comment // Java style line comment /* C style line comment */ All these types of comments are ignored by the database.
                Stored Procedures / Functions Stored procedures are static Java functions that are called directly from the SQL language or using an alias. Calling Java functions (directly or using the alias) requires that the Java class can be reached by the database (server). The syntax is: "java.lang.Math.sqrt"(2.0) This means the package must be provided, and the name must be written as one word, and inside " because otherwise it is converted to uppercase (and not found). An alias can be created using the command CREATE ALIAS: CREATE ALIAS SQRT FOR "java.lang.Math.sqrt"; When an alias is defined, then the function can be called additionally using this alias: SELECT SQRT(A) , B FROM MYTABLE; Only static java methods can be used as stored procedures. If, within the same class, there are overloaded methods with the same number of arguments, then the first one encountered by the program will be used. If you want to use Java library methods, it is recommended that you create your own class with static methods that act as wrappers around the Java library methods. This will allow you to control which method signature is used to call each Java library method.
                Built-in Functions and Stored Procedures Numerical built-in Functions / Stored Procedures ABS(d) returns the absolute value of a double value ACOS(d) returns the arc cosine of an angle ASIN(d) returns the arc sine of an angle ATAN(d) returns the arc tangent of an angle ATAN2(a,b) returns the tangent of a/b BITAND(a,b) return a & b BITOR(a,b) returns a | b CEILING(d) returns the smallest integer that is not less than d COS(d) returns the cosine of an angle COT(d) returns the cotangent of an angle DEGREES(d) converts radians to degrees EXP(d) returns e (2.718...) raised to the power of d FLOOR(d) returns the largest integer that is not greater than d LOG(d) returns the natural logarithm (base e) LOG10(d) returns the logarithm (base 10) MOD(a,b) returns a modulo b PI() returns pi (3.1415...) POWER(a,b) returns a raised to the power of b RADIANS(d) converts degrees to radians RAND() returns a random number x bigger or equal to 0.0 and smaller than 1.0 ROUND(a,b) rounds a to b digits after the decimal point ROUNDMAGIC(d) solves rounding problems such as 3.11-3.1-0.01 SIGN(d) returns -1 if d is smaller than 0, 0 if d==0 and 1 if d is bigger than 0 SIN(d) returns the sine of an angle SQRT(d) returns the square root TAN(A) returns the trigonometric tangent of an angle TRUNCATE(a,b) truncates a to b digits after the decimal point String built-in Functions / Stored Procedures ASCII(s) returns the ASCII code of the leftmost character of s BIT_LENGTH(str) returns the length of the string in bits CHAR(c) returns a character that has the ASCII code c CHAR_LENGTH(str) returns the length of the string in characters CONCAT(str1,str2) returns str1 + str2 DIFFERENCE(s1,s2) returns the difference between the sound of s1 and s2 HEXTORAW(s1) returns translated string INSERT(s,start,len,s2) returns a string where len number of characters beginning at start has been replaced by s2 LCASE(s) converts s to lower case LEFT(s,count) returns the leftmost count of characters of s) - requires double quoting - use SUBSTRING() instead LENGTH(s) returns the number of characters in s LOCATE(search,s,[start]) returns the first index (1=left, 0=not found) where search is found in s, starting at start LTRIM(s) removes all leading blanks in s OCTET_LENGTH(str) returns the length of the string in bytes (twice the number of characters) RAWTOHEX(s1) returns translated string REPEAT(s,count) returns s repeated count times REPLACE(s,replace,s2) replaces all occurrences of replace in s with s2 RIGHT(s,count) returns the rightmost count of characters of s RTRIM(s) removes all trailing spaces SOUNDEX(s) returns a four character code representing the sound of s SPACE(count) returns a string consisting of count spaces SUBSTR(s,start[,len]) alias for substring SUBSTRING(s,start[,len]) returns the substring starting at start (1=left) with length len UCASE(s) converts s to upper case LOWER(s) converts s to lower case UPPER(s) converts s to upper case Date/Time built-in Functions / Stored Procedures CURDATE() returns the current date CURTIME() returns the current time DATEDIFF(string, datetime1, datetime2) returns the count of units of time elapsed from datetime1 to datetime2. The string indicates the unit of time and can have the following values 'ms'='millisecond', 'ss'='second','mi'='minute','hh'='hour', 'dd'='day', 'mm'='month', 'yy' = 'year'. Both the long and short form of the strings can be used. DAYNAME(date) returns the name of the day DAYOFMONTH(date) returns the day of the month (1-31) DAYOFWEEK(date) returns the day of the week (1 means Sunday) DAYOFYEAR(date) returns the day of the year (1-366) HOUR(time) return the hour (0-23) MINUTE(time) returns the minute (0-59) MONTH(date) returns the month (1-12) MONTHNAME(date) returns the name of the month NOW() returns the current date and time as a timestamp) - use CURRENT_TIMESTAMP instead QUARTER(date) returns the quarter (1-4) SECOND(time) returns the second (0-59) WEEK(date) returns the week of this year (1-53) YEAR(date) returns the year CURRENT_DATE returns the current date CURRENT_TIME returns the current time CURRENT_TIMESTAMP returns the current timestamp System/Connection built-in Functions / Stored Procedures DATABASE() returns the name of the database of this connection USER() returns the user name of this connection CURRENT_USER SQL standard function, returns the user name of this connection IDENTITY() returns the last identity values that was inserted by this connection System built-in Functions / Stored Procedures IFNULL(exp,value) if exp is null, value is returned else exp) - use COALESCE() instead CASEWHEN(exp,v1,v2) if exp is true, v1 is returned, else v2) - use CASE WHEN instead CONVERT(term,type) converts exp to another data type CAST(term AS type) converts exp to another data type COALESCE(expr1,expr2,expr3,...) if expr1 is not null then it is returned else, expr2 is evaluated and if not null it is returned and so on NULLIF(v1,v2) if v1 equals v2 return null, otherwise v1 CASE v1 WHEN... CASE v1 WHEN v2 THEN v3 [ELSE v4] END when v1 equals v2 return v3 [otherwise v4 or null if there is no ELSE] CASE WHEN... CASE WHEN expr1 THEN v1[WHEN expr2 THEN v2] [ELSE v4] END when expr1 is true return v1 [optionally repeated for more cases] [otherwise v4 or null if there is no ELSE] EXTRACT EXTRACT ({YEAR | MONTH | DAY | HOUR | MINUTE | SECOND} FROM <datetime value>) POSITION (... IN ..) POSITION(<string expression> IN <string expression>) if the first string is a sub-string of the second one, returns the position of the sub-string, counting from one; otherwise 0 SUBSTRING(... FROM ... FOR ...) SUBSTRING(<string expression> FROM <numeric expression> [FOR <numeric expression>]) TRIM( LEDING ... FROM ...) TRIM([{LEADING | TRAILING | BOTH}] FROM <string expression>) See also: , .
                SQL Expression [NOT] condition [{ OR | AND } condition] Components of SQL Expressions condition { value [|| value] | value { = | < | <= | > | >= | <> | != } value | value IS [NOT] NULL | EXISTS(selectStatement) | value BETWEEN value AND value | value [NOT] IN ( {value [, ...] | selectStatement } ) | value [NOT] LIKE value [ESCAPE] value } value [+ | -] { term [{ + | - | * | / | || } term] | ( condition ) | function ( [parameter] [,...] ) | selectStatement giving one value | {ANY|ALL} (selectStatement giving single column) term { 'string' | number | floatingpoint | [table.]column | TRUE | FALSE | NULL } sequence NEXT VALUE FOR <sequence> HSQLDB does not currently enforce the SQL 200n proposed rules on where sequence generated values are allowed to be used. In general, these values can be used in insert and update statements but not in CASE statements, order by clauses, search conditions, aggregate functions, or grouped queries. string Strings in HSQLDB are Unicode strings. A string starts and ends with a single ' (singlequote). In a string started with ' (singlequote) use '' (two singlequotes) to create a ' (singlequote). String contatenation should be performed with the standard SQL operator || rather than the non-standard + operator. The LIKE keyword uses '%' to match any (including 0) number of characters, and '_' to match exactly one character. To search for '%' or '_' itself an escape character must also be specified using the ESCAPE clause. For example, if the backslash is the escaping character, '\%' and '\_' can be used to find the '%' and '_' characters themselves. For example, SELECT .... LIKE '\_%' ESCAPE '\' will find the strings beginning with an underscore. name The character set for quoted identifiers (names) in HSQLDB is Unicode. A unquoted identifier (name) starts with a letter and is followed by any number of ASCII letters or digits. When an SQL statement is issued, any lowercase characters in unquoted identifiers are converted to uppercase. Because of this, unquoted names are in fact ALL UPPERCASE when used in SQL statements. An important implication of this is the for accessing columns names via JDBC DatabaseMetaData: the internal form, which is the ALL UPPERCASE must be used if the column name was not quoted in the CREATE TABLE statement. Quoted identifiers can be used as names (for tables, columns, constraints or indexes). Quoted identifiers start and end with " (one doublequote). A quoted identifier can contain any Unicode character, including space. In a quoted identifier use "" (two doublequotes) to create a " (one doublequote). With quoted identifiers it is possible to create mixed-case table and column names. Example: CREATE TABLE "Address" ("Nr" INTEGER,"Name" VARCHAR); SELECT "Nr", "Name" FROM "Address"; The equivalent quoted identifier can be used for an unquoted identifer by converting the identifier to all uppercase and quoting it. For example, if a table name is defined as Address2 (unquoted), it can be referred to by its quoted form, "ADDRESS2", as well as address2, aDDress2 and ADDRESS2. Quoted identifiers should not be confused with SQL strings. Quoting can sometimes be used for identifiers, aliases or functions when there is an ambiguity. For example: SELECT COUNT(*) "COUNT" FROM MYTABLE; SELECT "LEFT"(COL1, 2) FROM MYTABLE; Although HSQLDB 1.8.0 does not force unquoted identifiers to contain only ASCII characters, the use of non-ASCII characters in these identifiers does not comply with SQL standards. Portability between different JRE locales could be an issue when accented characters (or extended unicode characters) are used in unquoted identifiers. Because native Java methods are used to convert the identifier to uppercase, the result may vary not be expected in different locales. It is recommended that accented characters are used only in quoted identifiers. When using JDBC DatabaseMetaData methods that take table, column, or index identifiers as arguments, treat the names as they are registered in the database. With these methods, unquoted identifiers should be used in all-uppercase to get the correct result. Quoted identifiers should be used in the exact case combination as they were defined - no quote character should be included around the name. JDBC methods that return a result set containing such identifiers return unquoted identifiers as all-uppercase and quoted identifiers in the exact case they are registered in the database (a change from 1.6.1 and previous versions). Please also note that the JDBC getXXX(String columnName) methods interpret the columnName as case-independent. This is a general feature of JDBC and not specific to HSQLDB. password Passwords must be double quoted and used consistently. Passwords are case insensitive only for backward compatibility. This may change in future versions. values A DATE literal starts and ends with ' (singlequote), the format is yyyy-mm-dd (see java.sql.Date. A TIME liteal starts and ends with ' (singlequote), the format is hh:mm:ss (see java.sql.Time). A TIMESTAMP or DATETIME literal starts and ends with ' (singlequote), the format is yyyy-mm-dd hh:mm:ss.SSSSSSSSS (see java.sql.Timestamp). When specifying default values for date / time columns in CREATE TABLE statements, or in SELECT,INSERT, and UPDATE statements, special SQL functions: NOW, SYSDATE, TODAY, CURRENT_TIMESTAMP, CURRENT_TIME and CURRENT_DATE (case independent) can be used. NOW is used for TIME and TIMESTAMP columns, TODAY is used for DATE columns. The data and time variants CURRENT_* are SQL standard versions and should be used in preference to others. Example: CREATE TABLE T(D DATE DEFAULT CURRENT_DATE); CREATE TABLE T1(TS TIMESTAMP DEFAULT CURRENT_TIMESTAMP); Binary data starts and ends with ' (singlequote), the format is hexadecimal. '0004ff' for example is 3 bytes, first 0, second 4 and last 255 (0xff). Any number of commands may be combined. With combined commands, ';' (semicolon) must be used at the end of each command to ensure data integrity, despite the fact that the engine may understand the end of commands and not return an error when a semicolon is not used.
                hsqldb-1.8.0.10.orig/docsrc/guide/unix.xml0000644000175000017500000010404710273521213016700 0ustar renerene UNIX Quick Start How to quickly get Hsqldb up and running on UNIX, including Mac OS X BlaineSimpson &blaineaddr; HSQLDB Development Group $Revision: 1.30 $ $Date: 2005/07/25 23:20:53 $ HSQLDB UNIX HOWTO
                Purpose This chapter explains how to quickly install, run, and use HSQLDB on UNIX. HSQLDB has lots of great optional features. I intend to cover very few of them. I do intend to cover what I think is the most common UNIX setup: To run a multi-user database with permament data persistence. (By the latter I mean that data is stored to disk so that the data will persist across database shutdowns and startups). I also cover how to run HSQLDB as a system daemon.
                Installation Go to and click on the "files" link. You want the current version. This will be the highest numbered version under the plain black "hsqldb" heading. See if there's a distribution for the current HSQLDB version in the format that you want. If you want an rpm, you should still find out the current version of HSQLDB as described in the previous paragraph. Then click "hsqldb" in the "free section" of and see if they have the current HSQLDB version built yet. Hopefully, the JPackage folk will document what JVM versions their rpm will support (currently they document this neither on their site nor within the package itself). (I really can't document how to download from a site that is totally beyond my control). It could very well happen that some of the file formats which I discuss below are not in fact offered. If so, then we have not gotten around to building them. Binary installation depends on the package format that you downloaded. Installing from a .pkg.Z file This package is only for use by a Solaris super-user. It's a System V package. Download then uncompress the package with uncompress or gunzip uncompress filename.pkg.Z You can read about the package by running pkginfo -l -d filename.pkg Run pkgadd as root to install. pkgadd -d filename.pkg Installing from a .rpm file This is a Linux rpm package. After you download the rpm, you can read about it by running rpm -qip /path/to/file.rpm Rpms can be installed or upgraded by running rpm -Uvh /path/to/file.rpm as root. Suse users may want to keep Yast aware of installed packages by running rpm through Yast: yast2 -i /path/to/file.rpm. Installing from a .zip file Extract the zip file to the parent directory of the new HSQLDB home. You don't need to create the HSQLDB_HOME directory because the extraction will create it for you with the right name) cd parent/of/new/hsqldb/home unzip /path/to/file.zip All the files in the zip archive will be extracted to underneath a new hsqldb directory. Take a look at the files you installed. (Under hsqldb for zip file installations. Otherwise, use the utilities for your packaging system). The most important file of the hsqldb system is hsqldb.jar, which resides in the directory lib. For the purposes of this chapter, I define HSQLDB_HOME to be the parent directory of the lib directory that contains hsqldb.jar. E.g., if your path to hsqldb.jar is /a/b/hsqldb/lib/hsqldb.jar, then your HSQLDB_HOME is /a/b/hsqldb. If the description of your distribution says that the hsqldb.jar file will work for your Java version, then you are finished with installation. Otherwise you need to build a new hsqldb.jar file. If you followed the instructions above and you still don't know what Java version your hsqldb.jar supports, then read HSQLDB_HOME/readme.txt and HSQLDB_HOME/index.html. If that still doesn't help, then you can just try your hsqldb.jar and see if it works, or build your own. To use the supplied hsqldb.jar, just skip to the next section of this document. Otherwise build a new hsqldb.jar. Building hsqldb.jar If you don't already have Ant, download the latest stable binary version from . cd to where you want Ant to live, and extract from the archive with unzip /path/to/file.zip or tar -xzf /path/to/file.tar.gz or bunzip2 -c /path/to/file.tar.bz2 | tar -xzf - Everything will be installed into a new subdirectory named apache-ant- + version. You can rename the directory after the extraction if you wish. Set the environmental variable JAVA_HOME to the base directory of your Java JRE or SDK, like export JAVA_HOME; JAVA_HOME=/usr/java/j2sdk1.4.0 The location is entirely dependent upon your variety of UNIX. Sun's rpm distributions of Java normally install to /usr/java/something. Sun's System V package distributions of Java (including those that come with Solaris) normally install to /usr/something, with a sym-link from /usr/java to the default version (so for Solaris you will usually set JAVA_HOME to /usr/java). Remove the existing file HSQLDB_HOME/lib/hsqldb.jar. cd to HSQLDB_HOME/build. Make sure that the bin directory under your Ant home is in your search path. Run the following command. ant hsqldb This will build a new HSQLDB_HOME/lib/hsqldb.jar. See the appendix if you want to build anything other than hsqldb.jar with all default settings.
                Setting up a Hsqldb Persistent Database Instance and a Hsqldb Server Setting up Database Instance and Server If you installed from an OS-specific package, you may already have a database instance and server pre-configured. See if your package includes a file named server.properties (make use of your packaging utilities). If you do, then I suggest that you still read this section while you poke around, in order to understand your setup. Select a UNIX user to run the database as. If this database is for the use of multiple users, or is a production system (or to emulate a production system), you should dedicate a UNIX user for this purpose. In my examples, I use the user name hsqldb. In this chapter, I refer to this user as the HSQLDB_OWNER, since that user will own the database instance files and processes. If the account doesn't exist, then create it. On all system-5 UNIXes and most hybrids (including Linux), you can run (as root) something like useradd -c 'HSQLDB Database Owner' -s /bin/bash -m hsqldb (BSD-variant users can use a similar pw useradd hsqldb... command). Become the HSQLDB_OWNER. Copy the sample file HSQLDB_HOME/src/org/hsqldb/sample/sample-server.properties to the HSQLDB_OWNER's home directory and rename it to server.properties. &sample-server.properties-cdata; Since the value of the first database (server.database.0) begins with file:, the database instance will be persisted to a set of files in the specified directory with names beginning with the specified name. Set the path to whatever you want (relative paths will be relative to the directory containing the properties file). You can read about how to specify other database instances of various types, and how to make settings for the listen port and many other things, in the chapter. Set and export the environmental variable CLASSPATH to the value of HSQLDB_HOME (as described above) plus "/lib/hsqldb.jar", like export CLASSPATH; CLASSPATH=/path/to/hsqldb/lib/hsqldb.jar In HSQLDB_OWNER's home directory, run nohup java org.hsqldb.Server & This will start the Server process in the background, and will create your new database instance "db0". Continue on when you see the message containing HSQLDB server... is online. nohup just makes sure that the command will not quit when you exit the current shell (omit it if that's what you want to do).
                Accessing your Database Copy the file HSQLDB_HOME/src/org/hsqldb/sample/sqltool.rc to the HSQLDB_OWNER's home directory. Use chmod to make the file readable and writable only to HSQLDB_OWNER. &sqltool.rc-cdata; We will be using the "localhost-sa" sample urlid definition from the config file. The JDBC URL for this urlid is jdbc:hsqldb:hsql://localhost. That is the URL for the default database instance of a HSQLDB Server running on the default port of the local host. You can read about URLs to connect to other instances and other servers in the chapter. Run SqlTool. java -jar path/to/hsqldb.jar localhost-sa If you get a prompt, then all is well. If security is of any concern to you at all, then you should change the privileged password in the database. Use the command SET PASSWORD command to change SA's password. set password "newpassword"; When you're finished playing, exit with the command \q. If you changed the SA password, then you need to fix the password in the sqltool.rc file accordingly. You can, of course, also access the database with any JDBC client program. See the appendix. You will need to modify your classpath to include hsqldb.jar as well as your client class(es). You can also use the other HSQLDB client programs, such as org.hsqldb.util.DatabasManagerSwing, a graphical client with a similar purpose to SqlTool. You can use any normal UNIX account to run the JDBC clients, including SqlTool, as long as the account has read access to the hsqldb.jar file and to an sqltool.rc file. See the chapter about where to put sqltool.rc, how to execute sql files, and other SqlTool features.
                Create additional Accounts Connect to the database as SA (or any other Administrative user) and run CREATE USER to create new accounts for your database instance. HSQLDB accounts are database-instance-specific, not Server-specific. For the current version of HSQLDB, only users with Role of DBA may create or own database objects. DBA members have privileges to do anything. Non-DBAs may be granted some privileges, but may never create or own database objects. (Before long, non-DBAs will be able to create objects if they have permission to do so in the target schema). When you first create a hsqldb database, it has only one database user-- SA, a DBA account, with an empty string password. You should set a password (as described above). You can create as many additional users as you wish. To make a user a DBA, you can use the "ADMIN" option to the CREATE USER command, or GRANT the DBA Role to the account after creating it. If you create a user without the ADMIN tag (and without granting the DBA role to them) this user will be able to read the data dictionary tables, but will be able unable to create or own his own objects. He will have only the rights which the pseudo-user PUBLIC has. To give him more permissions, even rights to read objects, you can GRANT permissions for specific objects, grant Roles (which encompass a set of permissions), or grant the DBA Role itself. Since only people with a database account may do anything at all with the database, it is often useful to permit other database users to view the data in your tables. To optimize performance, reduce contention, and minimize administration, it is often best to grant SELECT to PUBLIC on any object that needs to be accessed by multiple database users (with the significant exception of any data which you want to keep secret).
                Shutdown Do a clean database shutdown when you are finished with the database instance. You need to connect up as SA or some other Admin user, of course. With SqlTool, you can run java -jar path/to/hsqldb.jar --sql shutdown localhost-sa You don't have to worry about stopping the Server because it shuts down automatically when all served database instances are shut down.
                Running Hsqldb as a System Daemon You can, of course, run HSQLDB through inittab on System V UNIXes, but usually an init script is more convenient and manageable. This section explains how to set up and use our UNIX init script. Our init script is only for use by root. (That is not to say that the Server will run as root-- it usually should not). The main purpose of the init script is to start up a Server with the database instances specified in your server.properties file; and to shut down all of those instances plus additional urlids which you may (optionally) list in your init script config file. These urlids must all have entries in a sqltool.rc file. If, due to firewall issues, you want to run a WebServer instead of a Server, then make sure you have a healthy WebServer with a webserver.properties set up, adjust your URLs in sqltool.rc, and set TARGET_CLASS in the config file. (By following the commented examples in the config file, you can start up any number of Server and/or WebServer listeners with or without TLS ecryption). After you have the init script set up, root can use it anytime to start or stop HSQLDB. (I.e., not just at system bootup or shutdown).
                Portability of <filename>hsqldb</filename> init script The primary design criterion of the init script is portability. It does not print pretty color startup/shutdown messages as is common in late-model Linuxes and HPUX; and it does not keep subsystem state files or use the startup/shutdown functions supplied by many UNIXes, because these features are all non-portable. Offsetting these limitations, this one script does it's intended job great on the UNIX varieties I have tested, and can easily be modified to accommodate other UNIXes. While you don't have tight integration with OS-specific daemon administration guis, etc., you do have a well tested and well behaved script that gives good, utilitarian feedback.
                Init script Setup Procedure The strategy taken here is to get the init script to run your single Server or WebServer first (as specified by TARGET_CLASS). After that's working, you can customize the JVM that is run by running additional Servers in it, running your own application in it (embedding), or even overriding HSQLDB behavior with your own overriding classes. Copy the init script hsqldb from HSQLDB_HOME/bin into the directory where init scripts live on your variety of UNIX. The most common locations are /etc/init.d or /etc/rc.d/init.d on System V style UNIXes, /usr/local/etc/rc.d on BSD style UNIXes, and /Library/StartupItems/hsqldb on OS X (you'll need to create the directory for the last). Look at the comment towards the top of the init script which lists recommended locations for the configuration file for various UNIX platforms. Copy the sample config file HSQLDB_HOME/src/org/hsqldb/sample/sample-hsqldb.cfg to one of the listed locations (your choice). Edit the config file according to the instructions in it. &sample-hsqldb.cfg-cdata; Either copy HSQLDB_OWNER's sqltool.rc file into root's home directory, or set the value of AUTH_FILE to the absolute path of HSQLDB_OWNER's sqltool.rc file. This file is read (for stops) directly by root, even if you run hsqldb as non-root (by setting HSQLDB_OWNER in the config file). If you copy the file, make sure to use chmod to restrict permissions on the new copy. (The init script now enforces permissions on this file). Edit your server.properties file. For every server.database.X that you have defined, set a property of name server.urlid.X to the urlid for an Administrative user for that database instance. server.properties fragment server.database.0=file://home/hsqldb/data/db1 server.urlid.0=localhostdb1 Make sure to add a urlid for each and every database instance. If you don't then the init script will never know about databases that become inaccessible and will give false diagnostics. For this example, you would need to define the urlid localhostdb1 in your sqltool.rc file. example sqltool.rc stanza urlid localhostdb1 url jdbc:hsqldb:hsql://localhost username sa password secret Verify that the init script works. Just run /path/to/hsqldb as root to see the arguments you may use. Notice that you can run /path/to/hsqldb status at any time to see whether your HSQLDB Server is running. Re-run the script with each of the possible arguments to really test it good. If anything doesn't work right, then see the section. Tell your OS to run the init script upon system startup and shutdown. If you are using a UNIX variant that has /etc/rc.conf or /etc/rc.conf.local (like BSD variants and Gentoo), you must set "hsqldb_enable" to "YES" in either of those files. (Just run cd /etc; ls rc.conf rc.conf.local to see if you have one of these files). For good UNIXes that use System V style init, you must set up hard links or soft links either manually or with management tools (such as chkconfig or insserv) or Gui's (like run level editors). This paragraph is for Mac OS X users only. If you followed the instructions above, your init script should reside at /Library/StartupItems/hsqldb/hsqldb. Now copy the file StartupParameters.plist from the directory src/org.hsqldb/sample of your HSQLDB distribution to the same directory as the init script. As long as these two files reside in /Library/StartupItems/hsqldb, your init script is active (for portability reasons, it doesn't check for a setting in /etc/hostconfig). You can run it as a Startup Item by running SystemStarter {start|stop|restart} Hsqldb Hsqldb is the service name. See the man page for SystemStarter. To disable the init script, wipe out the /Library/StartupItems/hsqldb directory. Hard to believe, but the Mac people tell me that during system shutdown the Startup Items don't run at all. Therefore, if you don't want your data corrupted, make sure to run "SystemStarter stop Hsqldb" before shutting down your Mac. Follow the examples in the config file to add additional classes to the server JVM's classpath and to execute additional classes in your JVM. (See the SERVER_ADDL_CLASSPATH and INVOC_ADDL_ARGS items).
                Troubleshooting the Init Script Do a ps to look for processes containing the string hsqldb, and try to connect to the database from any client. If the init script starts up your database successfully, but incorrectly reports that it has not, then your problem is with specification of urlid(s) or SqlTool setup. If your database really did not start, then skip to the next paragraph. Verify that the urlid(s) listed in the server.properties or webserver.properties are correct. and verify that you can run SqlTool as root to connect to the instances. (For the latter test, use the --rcfile switch if you are setting AUTH_FILE in the init script config file). If your database really is not starting, then verify that you can su to the database owner account and start the database. The command su USERNAME -c ... won't work on most UNIXes unless the target user has a real login shell. Therefore, if you try to tighten up security by disabling this user's login shell, you will break the init script. If these possibilities don't pan out, then debug the init script or seek help, as described below. To debug the init script, run it in verbose mode to see exactly what is happening (and perhaps manually run the steps that are suspect). To run an init script (in fact, any sh shell script) in verbose mode, use sh with the -x or -v switch, like sh -x path/to/hsqldb start See the man page for sh if you don't know the difference between -v and -x. If you want troubleshooting help, use the HSQLDB lists/forums or email me at &blaineaddr;. If you email me, make sure to include the revision number from your hsqldb init script (it's towards the top in the line that starts like "# $Id:"), and the output of a run of sh -x path/to/hsqldb start > /tmp/hstart.log 2>&1
                hsqldb-1.8.0.10.orig/docsrc/guide/sqlissues.xml0000644000175000017500000007712610261274030017756 0ustar renerene SQL Issues Fred Toussi HSQLDB Development Group ft@cluedup.com $Revision: 1.20 $ $Date: 2005/07/01 17:06:32 $ Hsqldb SQL Copyright 2002-2005 Fred Toussi. Permission is granted to distribute this document without any alteration under the terms of the HSQLDB license. Additional permission is granted to the HSQLDB Development Group to distribute this document with or without alterations under the terms of the HSQLDB license.
                Purpose Many questions repeatedly asked in Forums and mailing lists are answered in this guide. If you want to use HSQLDB with your application, you should read this guide.
                SQL Standard Support HSQLDB 1.8.0 supports the dialect of SQL defined by SQL standards 92, 99 and 2003. This means where a feature of the standard is supported, e.g. left outer join, the syntax is that specified by the standard text. Many features of SQL92 and 99 up to Advanced Level are supported and there is support for most of SQL 2003 Foundation and several optional features of this standard. However, certain features of the Standards are not supported so no claim is made for full support of any level of the standards. The SQL Syntax chapter of this guide lists all the keywords and syntax that is supported. When writing or converting existing SQL DDL (Data Definition Language) and DML (Data Manipulation Language) statements for HSQLDB, you should consult the supported syntax and modify the statements accordingly. Several words are reserved by the standard and cannot be used as table or column names. For example, the word POSITION is reserved as it is a function defined by the Standards with a similar role as String.indexOf() in Java. HSQLDB does not currently prevent you from using a reserved word if it does not support its use or can distinguish it. For example BEGIN is a reserved words that is not currently supported by HSQLDB and is allowed as a table or column name. You should avoid the use of such words as future versions of HSQLDB are likely to support the words and will reject your table definitions or queries. The full list of SQL reserved words is in the source of the org.hsqldb.Token class. HSQLDB also supports some keywords and expressions that are not part of the SQL standard as enhancements. Expressions such as SELECT TOP 5 FROM .., SELECT LIMIT 0 10 FROM ... or DROP TABLE mytable IF EXISTS are among such constructs. All keywords, can be used for database objects if they are double quoted.
                Constraints and Indexes
                Primary Key Constraints Before 1.7.0, a CONSTRAINT <name> PRIMARY KEY was translated internally to a unique index and, in addition, a hidden column was added to the table with an extra unique index. From 1.7.0 both single-column and multi-column PRIMARY KEY constraints are supported. They are supported by a unique index on the primary key column(s) specified and no extra hidden column is maintained for these indexes.
                Unique Constraints According to the SQL standards, a unique constraint on a single column means no two values are equal unless one of them is NULL. This means you can have one or more rows where the column value is NULL. A unique constraint on multiple columns (c1, c2, c3, ..) means that no two sets of values for the columns are equal unless at lease one of them is NULL. Each single column taken by itself can have repeat values. The following example satisfies a UNIQUE constraint on the two columns: Column values which satisfy a 2-column UNIQUE constraint 1, 2 2, 1 2, 2 NULL, 1 NULL, 1 1, NULL NULL, NULL NULL, NULL Since version 1.7.2 the behaviour of UNIQUE constraints and indexes with respect to NULL values has changed to conform to SQL standards. A row, in which the value for any of the UNIQUE constraint columns is NULL, can always be added to the table. So multiple rows can contain the same values for the UNIQUE columns if one of the values is NULL.
                Unique Indexes In 1.8.0, user defined UNIQUE indexes can still be declared but they are deprecated. You should use a UNIQUE constraint instead. CONSTRAINT <name> UNIQUE always creates internally a unique index on the columns, as with previous versions, so it has exactly the same effect as the deprecated UNIQUE index declaration.
                FOREIGN KEYS From version 1.7.0, HSQLDB features single and multiple column foreign keys. A foreign key can also be specified to reference a target table without naming the target column(s). In this case the primary key column(s) of the target table is used as the referenced column(s). Each pair of referencing and referenced columns in any foreign key should be of identical type. When a foreign key is declared, a unique constraint (or primary key) must exist on the referenced columns in the primary key table. A non-unique index is automatically created on the referencing columns. For example: CREATE TABLE child(c1 INTEGER, c2 VARCHAR, FOREIGN KEY (c1, c2) REFERENCES parent(p1, p2)); There must be a UNIQUE constraint on columns (p1,p2) in the table named "parent". A non-unique index is automatically created on columns (c1, c2) in the table named "child". Columns p1 and c1 must be of the same type (INTEGER). Columns p2 and c2 must be of the same type (VARCHAR).
                Indexes and Query Speed HSQLDB does not use indexes to improve sorting of query results. But indexes have a crucial role in improving query speed. If no index is used in a query on a single table, such as a DELETE query, then all the rows of the table must be examined. With an index on one of the columns that is in the WHERE clause, it is often possible to start directly from the first candidate row and reduce the number of rows that are examined. Indexes are even more important in joins between multiple tables. SELECT ... FROM t1 JOIN t2 ON t1.c1 = t2.c2 is performed by taking rows of t1 one by one and finding a matching row in t2. If there is no index index on t2.c2 then for each row of t1, all the rows of t2 must be checked. Whereas with an index, a matching row can be found in a fraction of the time. If the query also has a condition on t1, e.g., SELECT ... FROM t1 JOIN t2 ON t1.c1 = t2.c2 WHERE t1.c3 = 4 then an index on t1.c3 would eliminate the need for checking all the rows of t1 one by one, and will reduce query time to less than a millisecond per returned row. So if t1 and t2 each contain 10,000 rows, the query without indexes involves checking 100,000,000 row combinations. With an index on t2.c2, this is reduced to 10,000 row checks and index lookups. With the additional index on t2.c2, only about 4 rows are checked to get the first result row. Indexes are automatically created for primary key and unique columns. Otherwise you should define an index using the CREATE INDEX command. Note that in HSQLDB a unique index on multiple columns can be used internally as a non-unique index on the first column in the list. For example: CONSTRAINT name1 UNIQUE (c1, c2, c3); means there is the equivalent of CREATE INDEX name2 ON atable(c1);. So you do not need to specify an extra index if you require one on the first column of the list. In 1.8.0, a multi-column index will speed up queries that contain joins or values on ALL the columns. You need NOT declare additional individual indexes on those columns unless you use queries that search only on a subset of the columns. For example, rows of a table that has a PRIMARY KEY or UNIQUE constraint on three columns or simply an ordinary index on those columns can be found efficiently when values for all three columns are specified in the WHERE clause. For example, SELECT ... FROM t1 WHERE t1.c1 = 4 AND t1.c2 = 6 AND t1.c3 = 8 will use an index on t1(c1,c2,c3) if it exists. As a result of the improvements to multiple key indexes, the order of declared columns of the index or constraint has less affect on the speed of searches than before. If the column that contains more diverse values appears first, the searches will be slightly faster. A multi-column index will not speed up queries on the second or third column only. The first column must be specified in the JOIN .. ON or WHERE conditions. Query speed depends a lot on the order of the tables in the JOIN .. ON or FROM clauses. For example the second query below should be faster with large tables (provided there is an index on TB.COL3). The reason is that TB.COL3 can be evaluated very quickly if it applies to the first table (and there is an index on TB.COL3): (TB is a very large table with only a few rows where TB.COL3 = 4) SELECT * FROM TA JOIN TB ON TA.COL1 = TB.COL2 AND TB.COL3 = 4; SELECT * FROM TB JOIN TA ON TA.COL1 = TB.COL2 AND TB.COL3 = 4; The general rule is to put first the table that has a narrowing condition on one of its columns. 1.7.3 features automatic, on-the-fly indexes for views and subselects that are used in a query. An index is added to a view when it is joined to a table or another view.
                Where Condition or Join Using WHERE conditions to join tables is likely to reduce execution speed. For example the following query will generally be slow, even with indexes: SELECT ... FROM TA, TB, TC WHERE TC.COL3 = TA.COL1 AND TC.COL3=TB.COL2 AND TC.COL4 = 1 The query implies TA.COL1 = TB.COL2 but does not explicitly set this condition. If TA and TB each contain 100 rows, 10000 combinations will be joined with TC to apply the column conditions, even though there may be indexes on the joined columns. With the JOIN keyword, the TA.COL1 = TB.COL2 condition has to be explicit and will narrow down the combination of TA and TB rows before they are joined with TC, resulting in much faster execution with larger tables: SELECT ... FROM TA JOIN TB ON TA.COL1 = TB.COL2 JOIN TC ON TB.COL2 = TC.COL3 WHERE TC.COL4 = 1 The query can be speeded up a lot more if the order of tables in joins are changed, so that TC.COL1 = 1 is applied first and a smaller set of rows are joined together: SELECT ... FROM TC JOIN TB ON TC.COL3 = TB.COL2 JOIN TA ON TC.COL3 = TA.COL1 WHERE TC.COL4 = 1 In the above example the engine automatically applies TC.COL4 = 1 to TC and joins only the set of rows that satisfy this condition with other tables. Indexes on TC.COL4, TB.COL2 and TA.COL1 will be used if present and will speed up the query.
                Subqueries and Joins Using joins and setting up the order of tables for maximum performance applies to all areas. For example, the second query below should generally be much faster if there are indexes on TA.COL1 and TB.COL3: Query comparison SELECT ... FROM TA WHERE TA.COL1 = (SELECT MAX(TB.COL2) FROM TB WHERE TB.COL3 = 4) SELECT ... FROM (SELECT MAX(TB.COL2) C1 FROM TB WHERE TB.COL3 = 4) T2 JOIN TA ON TA.COL1 = T2.C1 The second query turns MAX(TB.COL2) into a single row table then joins it with TA. With an index on TA.COL1, this will be very fast. The first query will test each row in TA and evaluate MAX(TB.COL2) again and again.
                Types and Arithmetic Operations Table columns of all types supported by HSQLDB can be indexed and can feature in comparisons. Types can be explicitly converted using the CONVERT() library function, but in most cases they are converted automatically. It is recommended not to use indexes on LONGVARBINARY, LONGVARCHAR and OTHER columns, as these indexes will probably not be allowed in future versions. Previous versions of HSQLDB featured poor handling of arithmetic operations. For example, it was not possible to insert 10/2.5 into any DOUBLE or DECIMAL column. Since 1.7.0, full operations are possible with the following rules: TINYINT, SMALLINT, INTEGER, BIGINT, NUMERIC and DECIMAL (without a decimal point) are supported integral types and map to byte, short, int, long and BigDecimal in Java. The SQL type dictates the maximum and minimum values that can be held in a field of each type. For example the value range for TINYINT is -128 to +127, although the actual Java type used for handling TINYINT is java.lang.Integer. REAL, FLOAT, DOUBLE are all mapped to double in Java. DECIMAL and NUMERIC are mapped to java.math.BigDecimal and can have very large numbers of digits.
                Integral Types TINYINT, SMALLINT, INTEGER, BIGINT, NUMERIC and DECIMAL (without a decimal point) are fully interchangeable internally, and no data narrowing takes place. Depending on the types of the operands, the result of the operations is returned in a JDBC ResultSet in any of related Java types: Integer, Long or BigDecimal. The ResultSet.getXXXX() methods can be used to retrieve the values so long as the returned value can be represented by the resulting type. This type is deterministically based on the query, not on the actual rows returned. The type does not change when the same query that returned one row, returns many rows as a result of adding more data to the tables. If the SELECT statement refers to a simple column or function, then the return type is the type corresponding to the column or the return type of the function. For example: CREATE TABLE t(a INTEGER, b BIGINT); SELECT MAX(a), MAX(b) FROM t; would return a result set where the type of the first column is java.lang.Integer and the second column is java.lang.Long. However, SELECT MAX(a) + 1, MAX(b) + 1 FROM t; would return java.lang.Long and BigDecimal values, generated as a result of uniform type promotion for all the return values. There is no built-in limit on the size of intermediate integral values in expressions. As a result, you should check for the type of the ResultSet column and choose an appropriate getXXXX() method to retrieve it. Alternatively, you can use the getObject() method, then cast the result to java.lang.Number and use the intValue() or longValue() methods on the result. When the result of an expression is stored in a column of a database table, it has to fit in the target column, otherwise an error is returned. For example when 1234567890123456789012 / 12345687901234567890 is evaluated, the result can be stored in any integral type column, even a TINYINT column, as it is a small value.
                Other Numeric Types In SQL statements, numbers with a decimal point are treated as DECIMAL unless they are written with an exponent. Thus 0.2 is considered a DECIMAL value but 0.2E0 is considered a DOUBLE value. When PreparedStatement.setDouble() or setFloat() is used, the value is treated as a DOUBLE automatically. When a REAL, FLOAT or DOUBLE (all synonymous) is part of an expression, the type of the result is DOUBLE. Otherwise, when no DOUBLE value exists, if a DECIMAL or NUMERIC value is part an expression, the type of the result is DECIMAL. The result can be retrieved from a ResultSet in the required type so long as it can be represented. This means DECIMAL values can be converted to DOUBLE unless they are beyond the Double.MIN_VALUE - Double.MAX_VALUE range. Similar to integral values, when the result of an expression is stored in a table column, it has to fit in the target column, otherwise an error is returned. The distinction between DOUBLE and DECIMAL is important when a division takes place. When the terms are DECIMAL, the result is a value with a scale (number of digits to the right of the decimal point) equal to the larger of the scales of the two terms. With a DOUBLE term, the scale will reflect the actual result of the operation. For example, 10.0/8.0 (DECIMAL) equals 1.2 but 10.0E0/8.0E0 (DOUBLE) equals 1.25. Without division operations, DECIMAL values represent exact arithmetic; the resulting scale is the sum of the scales of the two terms when multiplication is performed. REAL, FLOAT and DOUBLE values are all stored in the database as java.lang.Double objects. Special values such as NaN and +-Infinity are also stored and supported. These values can be submitted to the database via JDBC PreparedStatement methods and are returned in ResultSet objects.
                Bit and Boolean Types Since 1.7.2, BIT is simply an alias for BOOLEAN. The primary representation of BOOLEAN column is 'true' or 'false' either as the boolean type or as strings when used from JDBC. This type of column can also be initialised using values of any numeric type. In this case 0 is translated to false and any other value such as 1 is translated to true. Since 1.7.3 the BOOLEAN type conforms to the SQL standards and supports the UNDEFINED state in addition to TRUE or FALSE. NULL values are treated as undefined. This improvement affects queries that contain NOT IN. See the test text file, TestSelfNot.txt, for examples of the queries.
                Storage and Handling of Java Objects Since version 1.7.2 this support has improved and any serializable JAVA Object can be inserted directly into a column of type OTHER using any variation of PreparedStatement.setObject() methods. For comparison purposes and in indexes, any two Java Objects are considered equal unless one of them is NULL. You cannot search for a specific object or perform a join on a column of type OTHER. Please note that HSQLDB is not an object-relational database. Java Objects can simply be stored internally and no operations should be performed on them other than assignment between columns of type OTHER or tests for NULL. Tests such as WHERE object1 = object2, or WHERE object1 = ? do not mean what you might expect, as any non-null object would satisfy such a tests. But WHERE object1 IS NOT NULL is perfectly acceptable. The engine does not return errors when normal column values are assigned to Java Object columns (for example assigning an INTEGER or STRING to such a column with an SQL statement such as UPDATE mytable SET objectcol = intcol WHERE ...) but this is highly likely to be disallowed in future. So please use columns of type OTHER only to store your objects and nothing else.
                Type Size, Precision and Scale Prior to 1.7.2, all table column type definitions with a column size, precision or scale qualifier were accepted and ignored. In 1.8.0, such qualifiers must conform to the SQL standards. For example INTEGER(8) is no longer acceptable. The qualifiers are still ignored unless you set a database property. SET PROPERTY "sql.enforce_strict_size" TRUE will enforce sizes for CHARACTER or VARCHAR columns and pad any strings when inserting or updating a CHARACTER column. The precision and scale qualifiers are also enforced for DECIMAL and NUMERIC types. TIMESTAMP can be used with a precision of 0 or 6 only. Casting a value to a qualified CHARACTER type will result in truncation or padding as you would expect. So a test such as CAST (mycol AS VARCHAR(2)) = 'xy' will find the values beginning with 'xy'. This is the equivalent of SUBSTRING(mycol FROM 1 FOR 2) = 'xy'.
                Sequences and Identity The SEQUENCE keyword was introduced in 1.7.2 with a subset of the SQL 200n standard syntax. Corresponding SQL 200n syntax for IDENTITY columns has also been introduced.
                Identity Auto-Increment Columns Each table can contain one auto-increment column, known as the IDENTITY column. An IDENTITY column is always treated as the primary key for the table (as a result, multi-column primary keys are not possible with an IDENTITY column present). Support has been added for CREATE TABLE <tablename>(<colname> IDENTITY, ...) as a shortcut. Since 1.7.2, the SQL standard syntax is used by default, which allows the initial value to be specified. The supported form is(<colname> INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH n, [INCREMENT BY m])PRIMARY KEY, ...). Support has also been added for BIGINT identity columns. As a result, an IDENTITY column is simply an INTEGER or BIGINT column with its default value generated by a sequence generator. When you add a new row to such a table using an INSERT INTO <tablename> ...; statement, you can use the NULL value for the IDENTITY column, which results in an auto-generated value for the column. The IDENTITY() function returns the last value inserted into any IDENTITY column by this connection. Use CALL IDENTITY(); as an SQL statement to retrieve this value. If you want to use the value for a field in a child table, you can use INSERT INTO <childtable> VALUES (...,IDENTITY(),...);. Both types of call to IDENTITY() must be made before any additional update or insert statements are issued on the database. The next IDENTITY value to be used can be set with the ALTER TABLE ALTER COLUMN <column name> RESTART WITH <new value>;
                Sequences The SQL 200n syntax and usage is different from what is supported by many existing database engines. Sequences are created with the CREATE SEQUENCE command and their current value can be modified at any time with ALTER SEQUENCE. The next value for a sequence is retrieved with the NEXT VALUE FOR <name> expression. This expression can be used for inserting and updating table rows. You can also use it in select statements. For example, if you want to number the returned rows of a SELECT in sequential order, you can use: Numbering returned rows of a SELECT in sequential order SELECT NEXT VALUE FOR mysequence, col1, col2 FROM mytable WHERE ... Please note that the semantics of sequences is not exactly the same as defined by SQL 200n. For example if you use the same sequence twice in the same row insert query, you will get two different values, not the same value as required by the standard. You can query the SYSTEM_SEQUENCES table for the next value that will be returned from any of the defined sequences. The SEQUENCE_NAME column contains the name and the NEXT_VALUE column contains the next value to be returned.
                Issues with Transactions HSQLDB supports transactions at the READ_UNCOMMITTED level, also known as level 0 transaction isolation. This means that during the lifetime of a transaction, other connections to the database can see the changes made to the data. Transaction support works well in general. Reported bugs concerning transactions being committed if the database is abruptly closed have been fixed. However, the following issues may be encountered only with multiple connections to a database using transactions: If two transactions modify the same row, no exception is raised when both transactions are committed. This can be avoided by designing your database in such a way that application data consistency does not depend on exclusive modification of data by one transaction. You can set a database property to cause an exception when this happens.SET PROPERTY "sql.tx_no_multi_rewrite" TRUEWhen an ALTER TABLE .. INSERT COLUMN or DROP COLUMN command results in changes to the table structure, the current session is committed. If an uncommitted transaction started by another connections has changed the data in the affected table, it may not be possible to roll it back after the ALTER TABLE command. This may also apply to ADD INDEX or ADD CONSTRAINT commands. It is recommended to use these ALTER commands only when it is known that other connections are not using transactions. After a CHECKPOINT command is issued, uncommitted transactions can be continued, committed, or rolled back. However, if the database is not subsequently closed properly with the SHUTDOWN command, any such transaction that still remains uncommitted at the time of shutdown, is part committed (to the state at CHECKPOINT) at the next startup. It is recommended to use the CHECKPOINT command either when no uncommitted transactions is in progress, or it is known that any such transaction is not likely to last for such a long time that an abnormal shutdown might affect its data.
                New Features and Changes In recent versions leading to 1.8.0 many enhancements were made for better SQL support. These are listed in the chapter, in and . Functions and expressions such as POSITION(), SUBSTRING(), NULLIF(), COALESCE(), CASE ... WHEN .. ELSE, ANY, ALL etc. are among them. Other enhancements may not be very obvious in the documentation but can result in changes of behaviour from previous versions. Most significant among these are handling of NULL values in joins (null columns are no longer joined) and OUTER joins (the results are now correct). You should test your applications with the new version to ensure they do not rely on past incorrect behaviour of the engine. The engine will continue to evolve in future versions towards full SQL standard support, so it is best not to rely on any non-standard feature of the current version.
                hsqldb-1.8.0.10.orig/docsrc/guide/advancedtopics.xml0000644000175000017500000013510110701770233020703 0ustar renerene Advanced Topics Fred Toussi HSQLDB Development Group ft@cluedup.com $Revision: 1.35 $ $Date: 2007/10/06 20:31:23 $ Hsqldb Advanced Copyright 2002-2005 Fred Toussi. Permission is granted to distribute this document without any alteration under the terms of the HSQLDB license. Additional permission is granted to the HSQLDB Development Group to distribute this document with or without alterations under the terms of the HSQLDB license.
                Purpose Many questions repeatedly asked in Forums and mailing lists are answered in this guide. If you want to use HSQLDB with your application, you should read this guide. This document covers system related issues. For issues related to SQL see the chapter.
                Connections The normal method of accessing an HSQLDB database is via the JDBC Connection interface. An introduction to different methods of providing database services and accessing them can be found in the chapter. Details and examples of how to connect via JDBC are provided in our JavaDoc for jdbcConnection. Version 1.7.2 introduced a uniform method of distinguishing between different types of connection, alongside new capabilities to provide access to multiple databases. The common driver identifier is jdbc:hsqldb: followed by a protocol identifier (mem: file: res: hsql: http: hsqls: https:) then followed by host and port identifiers in the case of servers, then followed by database identifier. Hsqldb URL Components Driver and Protocol Host and Port Database jdbc:hsqldb:mem: not available accounts Lowercase, single-word identifier creates the in-memory database when the first connection is made. Subsequent use of the same Connection URL connects to the existing DB. The old form for the URL, jdbc:hsqldb:. creates or connects to the same database as the new form for the URL, jdbc:hsqldb:mem:. jdbc:hsqldb:file: not available mydb /opt/db/accounts C:/data/mydb The file path specifies the database file. In the above examples the first one refers to a set of mydb.* files in the directory where the javacommand for running the application was issued. The second and third examples refer to absolute paths on the host machine. jdbc:hsqldb:res: not available /adirectory/dbname Database files can be loaded from one of the jars specified as part of the Java command the same way as resource files are accessed in Java programs. The /adirectory above stands for a directory in one of the jars. jdbc:hsqldb:hsql: jdbc:hsqldb:hsqls: jdbc:hsqldb:http: jdbc:hsqldb:https: //localhost //192.0.0.10:9500 //dbserver.somedomain.com /an_alias /enrollments /quickdb The host and port specify the IP address or host name of the server and an optional port number. The database to connect to is specified by an alias. This alias is a lowercase string defined in the server.properties file to refer to an actual database on the file system of the server or a transient, in-memory database on the server. The following example lines in server.properties or webserver.properties define the database aliases listed above and accessible to clients to refer to different file and in-memory databases. database.0=file:/opt/db/accounts dbname.0=an_alias database.1=file:/opt/db/mydb dbname.1=enrollments database.2=mem:adatabase dbname.2=quickdb The old form for the server URL, e.g., jdbc:hsqldb:hsql//localhost connects to the same database as the new form for the URL, jdbc:hsqldb:hsql//localhost/ where the alias is a zero length string. In the example below, the database files lists.* in the /home/dbmaster/ directory are associated with the empty alias: database.3=/home/dbmaster/lists dbname.3=
                Connection properties Each new JDBC Connection to a database can specify connection properties. The properties user and password are always required. In 1.8.0 the following optional properties can also be used. Connection properties are specified either by establishing the connection via the: DriverManager.getConnection (String url, Properties info); method call, or the property can be appended to the full Connection URL. Connection Properties get_column_name true column name in ResultSet This property is used for compatibility with other JDBC driver implementations. When true (the default), ResultSet.getColumnName(int c) returns the underlying column name When false, the above method returns the same value as ResultSet.getColumnLabel(int column) Example below: jdbc:hsqldb:hsql://localhost/enrollments;get_column_name=false When a ResultSet is used inside a user-defined stored procedure, the default, true, is always used for this property. ifexists false connect only if database already exists Has an effect only with mem: and file: database. When true, will not create a new database if one does not already exist for the URL. When false (the default), a new mem: or file: database will be created if it does not exist. Setting the property to true is useful when troubleshooting as no database is created if the URL is malformed. Example below: jdbc:hsqldb:file:enrollments;ifexists=true shutdown false shut down the database when the last connection is closed This mimics the behaviour of 1.7.1 and older versions. When the last connection to a database is closed, the database is automatically shut down. The property takes effect only when the first connection is made to the database. This means the connection that opens the database. It has no effect if used with subsequent, simultaneous connections. This command has two uses. One is for test suites, where connections to the database are made from one JVM context, immediately followed by another context. The other use is for applications where it is not easy to configure the environment to shutdown the database. Examples reported by users include web application servers, where the closing of the last connection conisides with the web app being shut down.
                In addition, when a connection to an in-process database creates a new database, or opens an existing database (i.e. it is the first connection made to the database by the application), all the user-defined database properties can be specified as URL properties. This can be used to specify properties to enforce more strict SQL adherence, or to change cache_scale or similar properties before the database files are created. However, for new databases, it is recommended to use the SET PROPERTY command for such settings.
                Properties Files HSQLDB relies on a set of properties files for different settings. Since 1.7.0 property naming has been streamlined and a number of new properties have been introduced. In all properties files, values are case-sensitive. All values apart from names of files or pages are required in lowercase (e.g. server.silent=FALSE will have no effect, but server.silent=false will work). The properties files and the settings stored in them are as follows: Hsqldb Server Properties Files File Name Location Function server.properties the directory where the command to run the Server class is issued settings for running HSQLDB as a database server communicating with the HSQL protocol webserver.properties the directory where the command to run the WebServer class is issued settings for running HSQLDB as a database server communicating with the HTTP protocol <dbname>.properties the directory where all the files for a database are located settings for each particular database
                Properties files for running the servers are not created automatically. You should create your own files that contain server.property=value pairs for each property. The properties file for each database is generated by the database engine. This file can be edited after closing the database. In 1.8.0, most of these properties can be changed via SQL commands.
                Server and Web Server Properties In both server.properties and webserver.properties files, supported values and their defaults are as follows: Property File Properties Value Default Description server.database.0 test the path and file name of the first database file to use server.dbname.0 "" lowercase server alias for the first database file server.urlid.0 NONE SqlTool urlid used by UNIX init script. (This property is not used if your are running Server/Webserver on a platform other than UNIX, or of you are not using our UNIX init script). server.silent true no extensive messages displayed on console server.trace false JDBC trace messages displayed on console
                In 1.8.0, each server can serve up to 10 different databases simultaneously. The server.database.0 property defines the filename / path whereas the server.dbname.0 defines the lowercase alias used by clients to connect to that database. The digit 0 is incremented for the second database and so on. Values for the server.database.{0-9} property can use the mem:, file: or res: prefixes and properties as discussed above under CONNECTIONS. For example, database.0=mem:temp;sql.enforce_strict_size=true; Values specific to server.properties are: Server Property File Properties Value Default Description server.port 9001 (normal) or 554 (if TLS encrypted) TCP/IP port used for talking to clients. All databases are served on the same port. server.no_system_exit true no System.exit() call when the database is closed
                Values specific to webserver.properties are: WebServer Property File Properties Value Default Description server.port 80 TCP/IP port used for talking to clients server.default_page index.html the default web page for server server.root ./ the location of served pages .<extension> ? multiple entries such as .html=text/html define the mime types of the static files served by the web server. See the source for WebServer.java for a list.
                All the above values can be specified on the command line to start the server by omitting the server. prefix.
                Starting a Server from your application If you want to start the server from within your application, as opposed to the command line or batch files, you should create an instance of Server or Web Server, then assign the properties in the form of a String and start the Server. An example of this can be found in the org.hsqldb.test.TestBase source. Upgrading: If you have existing custom properties files, change the values to the new naming convention. Note the use of digits at the end of server.database.n and server.dbname.n properties.
                Individual Database Properties Each database has its own <dbname>.properties file as part of a small group of files which also includes <dbname>.script and <dbname>.data. The properties files contain key/value pairs for some important settings. In version 1.8.0 a new SQL command allows most database properties to be modified as follows: SET PROPERTY "property_name" property_value Properties that can be modified via SET PROPERTY are indicated in the table below. Other properties are indicated as PROPERTIES FILE ONLY and can be modified only by editing the .properties file after a shutdown and before a restart. Only the user-defined values listed below should ever be modified. Changing any other value could result in unexpected malfunction in database operations. Most of these values have been introduced for the new features since 1.7.0: Database-specific Property File Properties Value Default Description readonly false whole database is read-only When true, the database cannot be modified in use. This setting can be changed to true if the database is to be opened from a CD. Prior to changing this setting, the database should be closed with the SHUTDOWN COMPACT command to ensure consistency and compactness of the data. (PROPERTIES FILE ONLY) but can be used as a connection property to open a normal database as readonly. hsqldb.files_readonly false database files will not be written to When true, data in MEMORY tables can be modified and new MEMORY tables can be added. However, these changes are not saved when the database is shutdown. CACHED and TEXT tables are always readonly when this setting is true. (PROPERTIES FILE ONLY) hsqldb.cache_file_scale 1 Set larger data file limits. Once set, the limit will go up to 8GB. This property can be set to 8 to increase the size limit of the .data file from 2GB to 8GB. To apply the change to an existing database, SHUTDOWN SCRIPT should be performed first, then the property=value line below should be added to the .properties file before reopening the database. hsqldb.cache_file_scale=8 The property can be set with the SQL command (as opposed to changing the value in the properties file) when the database has no CACHED tables (e.g. a new database). (SET PROPERTY) sql.enforce_size false trimming and padding string columns This property is no longer supported. Use sql.enforce_sctrict_size sql.enforce_strict_size false size enforcement and padding string columns Conforms to SQL standards for size and precision of data types. When true, all CHARACTER, VARCHAR, NUMERIC and DECIMAL values that are in a row affected by an INSERT INTO or UPDATE statement are checked against the size specified in the SQL table definition. An exception is thrown if the value is too long. Also all CHARACTER values that are shorter than the specified size are padded with spaces. TIMESTAMP(0) and TIMESTAMP(6) are also allowed in order to specify the subsecond resolution of the values. When false (default), stores the exact string that is inserted. (SET PROPERTY) sql.tx_no_multi_rewrite false transaction management In the default READ_UNCOMMITED mode, a transaction can write over rows inserted or updated by another uncommitted transaction. Setting this property to true will raise an exception when such a write is attempted (SET PROPERTY) hsqldb.cache_scale 14 memory cache exponent Indicates the maximum number of rows of cached tables that are held in memory, calculated as 3 *(2**value) (three multiplied by (two to the power value)). The default results in up to 3*16384 rows from all cached tables being held in memory at any time. The value can range between 8-18. (SET PROPERTY). If the value is set via SET PROPERTY then it becomes effective after the next database SHUTDOWN or CHECKPOINT. (SET PROPERTY) hsqldb.cache_size_scale 10 memory cache exponent Indicates the average size of each row in the memory cache used with cached tables, calculated as 2**value (two to the power value). This result value is multiplied by the maximum number of rows defined by hsqldb.cache_scale to form the maximum number of bytes for all the rows in memory cache. The default results in 1024 bytes per row. This default, combined with the default number of rows, results in approximately 50MB of the .data file to be stored in the memory cache. The value can range between 6-20. (SET PROPERTY). If the value is set via SET PROPERTY then it becomes effective after the next database SHUTDOWN or CHECKPOINT. (SET PROPERTY) hsqldb.log_size 200 size of log when checkpoint is performed The value is the size in megabytes that the .log file can reach before an automatic checkpoint occurs. A checkpoint and rewrites the .script file and clears the .log file. The value can be changed via the SET LOGSIZE nnn SQL command. runtime.gc_interval 0 forced garbage collection This setting forces garbage collection each time a set number of result set row or cache row objects are created. The default, "0" means no garbage collection is forced by the program. This should not be set when the database engine is acting as a server inside an exclusive JVM. The setting can be useful when the database is used in-process with the application with some Java Runtime Environments (JRE's). Some JRE's increase the size of the memory heap before doing any automatic garbage collection. This setting would prevent any unnecessary enlargement of the heap. Typical values for this setting would probably be between 10,000 to 100,000. (PROPERTIES FILE ONLY) hsqldb.nio_data_file true use of nio access methods for the .data file When HSQLDB is compiled and run in Java 1.4 or higher, setting this property to false will avoid the use of nio access methods, resulting in somewhat reduced speed. If the data file is larger than 256MB when it is first opened, nio access methods are not used. Also, if the file gets larger than the amount of available computer memory that needs to be allocated for nio access, non-nio access methods are used. (SET PROPERTY). If used before defining any CACHED table, it applies to the current session, otherwise it comes to effect after a SHUTDOWN and restart or CHECKPOINT. hsqldb.default_table_type memory type of table created with unqualified CREATE TABLE The CREATE TABLE command results in a MEMORY table by default. Setting the value "cached" for this property will result in a cached table by default. The qualified forms such as CREATE MEMORY TABLE or CREATE CACHED TABLE are not affected at all by this property. (SET PROPERTY) hsqldb.applog 0 application logging level The default level 0 indicates no logging. Level 1 results in events related to persistence to be logged, including any failures. The events are logged in a file ending with .app.log textdb.* 0 default properties for new text tables Properties that override the database engine defaults for newly created text tables. Settings in the text table SET <tablename> SOURCE <source string> command override both the engine defaults and the database properties defaults. Individual textdb.* properties are listed in the chapter. (SET PROPERTY)
                When connecting to an in-process database creates a new database, or opens an existing database (i.e. it is the first connection made to the database by the application), all the user-defined database properties listed in this section can be specified as URL properties. Upgrading: From 1.7.0, the location of the database files can no longer be overridden by paths defined in the properties file. All files belonging to a database should reside in the same directory. The property sql.compare_in_locale=true is no longer supported. If the line exists in a .properties file, it will switch the database to the collation for the current default. See the command. When HSQLDB is used in OpenOffice.org, some property values will have a different default. The properties and values are: hsqldb.default_table_type=cached hsqldb.cache_scale=13 hsqldb.log_size=10; hsqldb.nio_data_file=false sql.enforce_strict_size=true
                SQL Commands for Database Properties There are some database properties that are set with dedicated SQL commands beginning with SET. SQL command properties SET WRITE_DELAY {{TRUE | FALSE} | <seconds> | <milliseconds> MILLIS The default is TRUE and indicates that the changes to the database that have been logged are synched to the file system once every 20 seconds. FALSE indicates there is no delay and at each commit a file synch operation is performed. Numeric values from 0 can also be specified for the synch delay. The purpose of this command is to control the amount of data loss in case of a total system crash. A delay of 1 second means at most the data written to disk during the last second before the crash is lost. All data written prior to this has been synced and should be recoverable This setting should be specified on the basis of the reliability of the hardware used for running the database engine, the type of disk system used, the possibility of power failure etc. Also the nature of the data stored should be considered. In general, when the system is very reliable, the setting can be left to the default. If it is not very reliable, or the data is critical a setting of 1 or 2 seconds would suffice. Only in the worst case scenario or with the most critical data should a setting of 0 or FALSE be specified as this will slow the engine down to the speed at which the file synch operation can be performed by the disk subsystem. Values down to 10 millisconds can be specified by adding MILLIS to the command, but in practice a delay of 100 milliseconds provides 99.99999% reliability with an average one system crash per 6 days. SET LOG_SIZE <numeric value> The engine writes out a log of all the changes to the database as they occur. This log is synched to the disk based on the WRITE_DELAY property above. The log is never reused unless there is an abnormal termination, i.e. the database process is terminated without SHUTDOWN, or it was terminated using SHUTDOWN IMMEDIATELY. The default maximum size of the .log file is 200 MB. When the maximum size is reached, a CHECKPOINT operation is performed. This operation will save the other database files in a consistent state and delete the old log. A value of 0 indicates no limit for the .log file. SET CHECKPOINT DEFRAG <numeric value> When rows in CACHED tables are updated or deleted, the spaces are mostly reused. However, in time, some unused spaces are left in the .data file, especially when large tables are dropped or their structure is modified. A CHECKPOINT operation does not normally reclaim the empty spaces, whereas CHECKPOINT DEFRAG always does. This property determines when to perform a CHECKPOINT DEFRAG when a normal CHECKPOINT occurs (whether initiated by an administrator or when the size of the log exceeds its limit). The numeric value is the number of megabytes of recorded empty spaces in the .data file that would force a DEFRAG operation. Low values result in more frequent DEFRAG operations. A value of 0 indicates no automatic DEFRAG is performed. The default is 200 megabytes of lost space. SET REFERENTIAL INTEGRITY {TRUE | FALSE} This is TRUE by default. If bulk data needs to be loaded into the database, this property can be set FALSE for the duration of bulk load operation. This allows loading data for related tables in any order. The property should be set TRUE after bulk load. If the loaded data is not guaranteed to conform to the referential integrity constraints, SQL queries should be run after loading to identify and modify any non-conforming rows.
                hsqldb-1.8.0.10.orig/docsrc/guide/guide.xml0000644000175000017500000001220410665010550017005 0ustar renerene ]> Hsqldb User Guide The HSQLDB Development Group BlaineSimpson &blaineaddr; HSQLDB Development Group FredToussi &fredaddr; HSQLDB Development Group &revision; &date; Hsqldb Hypersonic Database JDBC Java Copyright 2002-2007 HSQLDB Development Group. Permission is granted to distribute this document without any alteration under the terms of the HSQLDB license. Introduction If you notice any mistakes in this document, please email the author listed at the beginning of the chapter. If you have problems with the procedures themselves, please use the HSQLDB support facilities which are listed at . &alts; &running-chapter.xml; &sqlissues-chapter.xml; &unix-chapter.xml; &advancedtopics-chapter.xml; &deployment-chapter.xml; &texttables-chapter.xml; &tls-chapter.xml; &sqltool-chapter.xml; &sqlsyntax-chapter.xml; &building-appendix.xml; First JDBC Client Example There is a copy of Testdb.java in the directory src/org/hsqldb/sample of your HSQLDB distribution. JDBC Client source code example &Testdb.java-cdata; &dbfiles-appendix.xml; &openoffice-appendix.xml; &testutility-appendix.xml; &dbmanager-appendix.xml; &transfertool-appendix.xml; hsqldb-1.8.0.10.orig/docsrc/guide/openoffice.xml0000644000175000017500000001453110253073343020034 0ustar renerene Running Hsqldb with OpenOffice.org 1.1.x HermannKienlein hermann@kienlein.com EDV - Systeme Kienlein $Revision: 1.6 $ $Date: 2005/06/08 16:02:34 $ HSQLDB OpenOffice Copyright 2003-2004 Hermann Kienlein. Permission is granted to distribute this document without any alteration under the terms of the HSQLDB license. Additional permission is granted to the HSQLDB Development Group to distribute this document with or without alterations under the terms of the HSQLDB license.
                Introduction HSQLDB can now act as a Database with OpenOffice.org. This document is written to help you connecting and running HSQLDB out of OpenOffice.org in a simple way. Without user-managment and only for your single-system. If you have problems read the other available documents, because I will not write them here again. If you need a real DB-System with user-management and different rights for different users, read the other documents. HSQLDB is included with OpenOffice.org 2.0 and is used by default. Please refer to standard OpenOffice.org 2.0 documentation on how to use HSQLDB with this version.
                Installing I assume you have a running OpenOffice.org (OOo) and a JavaRuntimeEnvironment. So place the hsqldb_*.zip file where you want on your disk and unpack it (I assume you have done this already).
                Setting up OpenOffice.org Start OOo with a text document and go to the Database-Explorer (simply by pressing F4). In the left frame you see a tree-view with all known databases in OOo. A right mouse-click opens a menu where you can manage your databases. So click on New Database and choose a name that you want to have inside OOo. I chose HSQLDB as name. As connection-type choose JDBC and then switch to the JDBC-tab. As Driver-Class insert org.hsqldb.jdbcDriver and as URL choose the following:
                On Windows You can specify a directory where HSQLDB should store the info and data. Something like jdbc:hsqldb:file:c:\javasrc\hsqldb-dev\databasename (where jdbc: is written by OOo). The string c:\javasrc\hsqldb-dev\databasename works only on windows, but you can write this down as linux-path like /javasrc/hsqldb-dev/databasename too. Then HSQLDB takes the c:\ drive as root. This means this works only on c:\ for you. The first is the directory-path and the databasename is the identifier for the database.
                On Linux Choose a path as said for windows like /opt/db/data As username take sa, this is the standard-administrator for HSQLDB. Now click the OK-Button
                Now OOo has to find your hsqldb.jar file. So go to options => security and insert the path to the .jar file. If you have problems, search the Online-help for JDBC. You then get help in your own language (this is generally quite better than my English, I think ;-) If you cannot write to your Tables, OOo thinks that you don't have permission to write to HSQLDB. Then we tell OOo to ignore the DriverPrivileges because on our single-user-system we do not need them. Because OOo is working on this, the next Step is only needed for systems without write - permission. So we go to http://dba.openoffice.org and look at the IgnoreDriverPrivileges.html file in the HowTo-section. You find here a macro-code. Open tools => macro in OOo to get the Basic-IDE. Here simple copy and paste the code and run the macro. You see a input-box where you only have to insert the name of your DB, in my example I have to insert HSQLDB, because I took this as name in OOo. Note that if you change your OOo-DB name, you have to run this macro again! Now we only have to stop and restart OOo. Be sure that you exit Quickstarter and all running processes too. On next OOo-Start you should have a running Database in OpenOffice.org.
                hsqldb-1.8.0.10.orig/docsrc/guide/guide.css0000644000175000017500000000327510057435643017016 0ustar renerene/* COMMENT: The shared.css stylesheet for the hsqldb/docs directory and elsewhere *? /* This material is published under the Copyrights and Licenses listed at */ /* and in the directory /hsqldb/docs/hypersonic_lic.txt */ a:visited { color: #083194; } span.guimenu { font-family: monospace; font-style: italic; font-weight: bold; } span.guimenuitem { font-family: monospace; font-style: italic; font-weight: bold; } span.guilabel { font-family: monospace; font-style: italic; font-weight: bold; } span.guibutton { font-family: monospace; font-style: italic; font-weight: bold; } span.guiicon { font-family: monospace; font-style: italic; font-weight: bold; } span.guisubmenu { font-family: monospace; font-style: italic; font-weight: bold; } span.term { font-family: monospace; font-weight: bold; background: #083194; color: white; padding: 1px; } span.term a { font-family: monospace; font-weight: bold; background: #083194; color: white; padding: 1px; } div.caption { font-size: 80%; } div.important { background: yellow; } div.warning { background: red; } div.caution { background: #ffb573; } pre.programlisting { background-color: silver; padding: 5px; } pre.screen { background-color: #BDC6DE; padding: 5px; } h1.title { font-size: 200%; } div.chapter h2.title { font-size: 170%; font-weight: bold; color: black; background: white; padding: 2px; border: 2px solid #083194; } div.section h2.title { font-size: 140%; font-weight: bold; color: #083194; background: white; padding: 2px; border: none; } span.remark { font-weight: bold; color: orange; }