Return-Path: Delivered-To: apmail-db-torque-dev-archive@www.apache.org Received: (qmail 92973 invoked from network); 31 Oct 2007 22:24:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 31 Oct 2007 22:24:21 -0000 Received: (qmail 73622 invoked by uid 500); 31 Oct 2007 22:24:08 -0000 Delivered-To: apmail-db-torque-dev-archive@db.apache.org Received: (qmail 73602 invoked by uid 500); 31 Oct 2007 22:24:08 -0000 Mailing-List: contact torque-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Apache Torque Developers List" Reply-To: "Apache Torque Developers List" Delivered-To: mailing list torque-dev@db.apache.org Received: (qmail 73590 invoked by uid 500); 31 Oct 2007 22:24:08 -0000 Received: (qmail 73587 invoked by uid 99); 31 Oct 2007 22:24:08 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 31 Oct 2007 15:24:08 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 31 Oct 2007 22:24:09 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 78DF41A9832; Wed, 31 Oct 2007 15:23:48 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r590852 - in /db/torque/village/trunk: ./ docs/ docs/ChangeLog.txt docs/INSTALL.txt docs/ImplementationStatus.txt docs/README.txt docs/Schema.txt Date: Wed, 31 Oct 2007 22:23:46 -0000 To: torque-commits@db.apache.org From: tv@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20071031222348.78DF41A9832@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: tv Date: Wed Oct 31 15:23:36 2007 New Revision: 590852 URL: http://svn.apache.org/viewvc?rev=590852&view=rev Log: Added more docs Added: db/torque/village/trunk/docs/ db/torque/village/trunk/docs/ChangeLog.txt db/torque/village/trunk/docs/INSTALL.txt db/torque/village/trunk/docs/ImplementationStatus.txt db/torque/village/trunk/docs/README.txt db/torque/village/trunk/docs/Schema.txt Modified: db/torque/village/trunk/ (props changed) Propchange: db/torque/village/trunk/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Wed Oct 31 15:23:36 2007 @@ -1,5 +1,3 @@ target .classpath .project -docs -etc Added: db/torque/village/trunk/docs/ChangeLog.txt URL: http://svn.apache.org/viewvc/db/torque/village/trunk/docs/ChangeLog.txt?rev=590852&view=auto ============================================================================== --- db/torque/village/trunk/docs/ChangeLog.txt (added) +++ db/torque/village/trunk/docs/ChangeLog.txt Wed Oct 31 15:23:36 2007 @@ -0,0 +1,147 @@ +Major Release - Version 2.0 +(Jon S. Stevens) +- Added support for JDBC BLOB type +- No longer support JDK 1.1 (only JDK 1.2 and higher) +- Imports are fully qualified. thanks to: Stephen Haberman +- Value.java: patch to add 'y' as a valid option to the private isTrue() + method thanks to: Scott Eade + +Minor Fixes Release - +Version 1.5.3 (Jon S. Stevens, Daniel Rall) +- include the README.txt in the distribution thanks to: Sam Ruby (jss) +- Value.java was not checking for "t" = true/"f"=false, which Postgres + 7.1 returns for boolean values thanks to: + Scott Dietrich (jss) +- Fix problem with getPrecision() throwing an exception because + the integer is to large. + http://share.whichever.com/pipermail/village-dev/2002-March/000044.html + (jss, dlr) + +Minor Fixes Release - Version 1.5.2 +(Jon S. Stevens) +- moved the build system to the top level directory (jss) +- get a string out of the database and then wrap in a BigDecimal. this fixes + the precision lost with getting a bigdecimal from the database. + credit: "Diethelm Guallar, Gonzalo" (jss) + +Minor Fixes Release - Version 1.5.1 +(Jon S. Stevens, Daniel Rall, John McNally) +- Updated to Ant 1.3 and require Ant to be "installed" now. +- Make Value.asUtilDate() and Value.asDate() properly handle Timestamp + nanosecond granularity. Before it was just dropping that information. +- Small speed improvement in Value.asTimestamp() +- Updated to Ant 1.2, Crimson, JAXP +- Fixed deprecated warning in Value.java +- Fixed Javadoc example in TableDataSet.java +- The DataSet's reference to its Connection object should be nulled when + the DataSet is closed. This doesn't actually affect the object + pointed to, rather, it just clears the DataSet's pointer. This more + comprehensively releases the DataSet's resources. (DR) + +Speed Release - Version 1.5 +(Jon S. Stevens, Daniel L. Rall) +- Code format change (DLR) +- Major potential speed improvement: + +Schema now caches its own Schema objects in a static hashtable so that +they don't need to be created for every single request. This should save +a lot of object overhead creation as well as a connection to the database. + +Bug Fix Release - Version 1.4 +(Jon S. Stevens, Leon Messerschmidt , Daniel L. Rall, +Alex HAUMONT ) +- Fixed NPE in QueryDataSet with the Constructor that takes only a + ResultSet (Leon). +- ResultSetMetaData may report table name as the empty string when a + database-specific function has been called to generate a Column (DLR). +- Fixed bug when ResultSet was closed at the wrong time (Alex). + +Bug Fix Release - Version 1.3 +(Jon S. Stevens, Nissim Karpenstein, Daniel L. Rall, Rafal Krzewski) +- the weblogic driver just returns null for RSMD.getTableName() + rather than throwing an exception (NK) +- the Schema object returned by QueryDataSet's schema() method does + not have its private instance field tableName set. This is the result + of an instantiation using Schema's zero argument constructor, and then + calling Schema's package private populate() method (incidently, with a + bogus tableName argument). Schema's populate() method does not set its + tableName attribute. This patch includes a fix for that and some very + minor cleanup. :) (DLR) +- fixes for Sybase and the fact that its JDBC driver isn't fully implemented + (RK) +- minor fix for building on NT (JSS) + +Bug Fix Release - Version 1.2 +(Jon S. Stevens) +- fixed a bug reported by Thomas Weitzel + where multiple records were not being deleted properly. +- fixed a bug reported by Jeff Prickett + where a column that is an integer or other type that had a null value + would return 0 instead of null. +- updated to the latest version of the Ant build system + +Bug Fix Release - Version 1.1 +(Jon S. Stevens, John Mcnally) +- fixed a couple bugs I can't remember now +- john added some features for joins that he needed for turbine +- new build system. see build/README +- new Apache/BSD Style license + +Bug Fix Release - Version 1.0.7 +(Jon S. Stevens, Serge Knystautas) +- fixed asString to work if values are stored as byte[] +- remove requirement for SELECT only +- use java.sql.Types instead of hard coded numbers + +Bug Fix Release - Version 1.0.6 +(Jon S. Stevens, Serge Knystautas, Edwin Glaser) +- Fixed bug with Record.initializeRecords where the record +was being created as a ZOMBIE instead of UNKNOWN. This +had the result of screwing up deletes. +- Fixed bug with DataSet.removeRecord() because it was +using Record.getNumber() and that method was never actually +implemented. +- Fixed updating and deleting records when 0 records are +updated/deleted. +- Fixed setValueNull error on saving. setPreparedStatement +was incorrectly handling null values +- Fixed behavior on how java.util.Date related objects are +handled + +Bug Fix Release - Version 1.0.5 +(Jon S. Stevens) +- Fixed bug in the way that Record.setValueNull worked as + well as how the various Record.*save* methods were treating + values that were null. + +Bug Fix Release - Version 1.0.4 +(Jon S. Stevens) +- Fixed a problem with the way the .jar file was created. + +Bug Fix Release - Version 1.0.3 +(Jon S. Stevens, Stephane SENART) +- Stephane found some bugs regarding the implementation + of DataSet.addRecord() that made it not work when used + with TableDataSet.save(). +- Fixed a couple potential NullPointerException bugs in + DataSet.close() + +Bug Fix Release - Version 1.0.2 +(Jon S. Stevens, Serge Knystautas) +- Fixed bug in DataSet.addRecord() logic (SK). +- Fixed KeyDef so that it will compile with JDK 1.1 (SK). + +Bug Fix Release - Version 1.0.1 +(Jon S. Stevens, Stephane SENART, Raphael Spannocchi) + +- Added more tests to the TestMySQL test suite (JSS). +- Fixed bug with DataSet.fetchRecords() and Value() where + my interpretation of ResultSet.wasNull() was incorrect. + Bug submitted by (SS). +- Fixed bug with QueryDataSet.getRecord(). Bug submitted + by (SS). +- Added ability to pass arguments to main() method. + Suggestion and code by (RS). + +Initial Implementation - Version 1.0 +(Jon S. Stevens jon@working-dogs.com) Added: db/torque/village/trunk/docs/INSTALL.txt URL: http://svn.apache.org/viewvc/db/torque/village/trunk/docs/INSTALL.txt?rev=590852&view=auto ============================================================================== --- db/torque/village/trunk/docs/INSTALL.txt (added) +++ db/torque/village/trunk/docs/INSTALL.txt Wed Oct 31 15:23:36 2007 @@ -0,0 +1,16 @@ +V I L L A G E +============= + +For more information about what Village is, please see the README.txt +file. + +Installation of Village is simple, just add the village.jar file to your +classpath. + +In order to use the Village API within your code, all you need to do is +use the import statement. For example: + +import com.workingdogs.village.*; + +Please read the javadoc within the /docs/ directory for more information +about how to implement code with Village. Added: db/torque/village/trunk/docs/ImplementationStatus.txt URL: http://svn.apache.org/viewvc/db/torque/village/trunk/docs/ImplementationStatus.txt?rev=590852&view=auto ============================================================================== --- db/torque/village/trunk/docs/ImplementationStatus.txt (added) +++ db/torque/village/trunk/docs/ImplementationStatus.txt Wed Oct 31 15:23:36 2007 @@ -0,0 +1,293 @@ +A B O U T +--------- +This file describes the current implementation status of the project. +If you implement a method, please be sure to also update this file +with the latest information. At the present time, approximately +90% or more of this project has been completed. Contributions in the form +of diff output are welcome. Please note that all contributed code must +be in the form of 100% Pure Java and fully clean room implemented. + +JSFormatter +has been used to format the source code into a standard +format. Here is the arguments that were used: + +java jstyle.JSFormatter -b + +K E Y +----- +An x marks a method that has been implemented. +An o marks a method that has not been implemented. +On the right hand side are comments about the method. + +N O T E S +--------- +Serialization of any type has not been implemented. + +The entire SelectStmt class has not been implemented, as a result, +any methods or constructors that depended on that class have also not +been implemented. + +The TableDataSet.saveWithoutStatusUpdate() functionality has not been +implemented yet. + +The TableDataSet.setOptimisticLockingCol() functionality has not been +implemented yet. + +C L A S S E S +------------- + +Column() +x autoIncrement() +o dbKonaMethod() // unknown use +x dbtype() +o destroy() // private used for serialization +o initialize() // private used for serialization +x isBigDecimal() +x isBinary() +x isBoolean() +x isByte() +x isBytes() +x isDate() +x isDouble() +x isFloat() +x isInt() +x isLong() +x isLongVarBinary() +x isShort() +x isString() +x isTime() +x isTimestamp() +x isVarBinary() +o javaType() // unknown use +x length() +x name() +x nullAllowed() +x precision() +o preparedStatemntBindMethod() // unknown use +x readOnly() +o resultSetMethod() // unknown use +x scale() +x searchable() +x type() +x typeEnum() + +DataSet() +x addRecord() +x addRecord(DataSet) // additional method +x allRecordsRetrieved() +x clearRecords() +x close() +x connection() +x containsRecord(int) +o destroy() // private used for serialization +x fetchRecords() +x fetchRecords(int) +x fetchRecords(int, int) +x getRecord(int) +x getResultSet() +x getSelectString() +o initialize() // private used for serialization +x lastFetchSize() +o maxColumnWidths(boolean) // unknown use +o readObject() // private used for serialization +x releaseRecords() +x removeRecord(Record) +x reset() +x resultSet() +x schema() +x size() +x toString() // implemented by Serge Knystautas http://www.lokitech.com + +x Enums() +x AFTERDELETE +x AFTERINSERT +x AFTERUPDATE +x BEFOREDELETE +x BEFOREINSERT +x BEFOREUPDATE +x DELETE +x INSERT +x ORACLE +x SQLSERVER +x SYBASE +x UNKNOWN +x UPDATE +x ZOMBIE + +x KeyDef() +x addAttrib(String) +x containsAttrib(String) +x getAttrib(int) +x size() + +x QueryDataSet() +o QueryDataSet(Connection, SelectStmt) // not yet implemented NO SelectStmt yet +x QueryDataSet(Connection, String) +x QueryDataSet(ResultSet) +x getSelectString() +x resultSet() + +x Record() +x Record(DataSet) +o asFormattedString(String, int[]) // not yet implemented +x dataset() +x getRefreshQueryString() +x getSaveString() +x getValue(int) +x getValue(String) +x isAZombie() +x markForInsert() +x markForUpdate() +x markRecordClean() // guessed on implementation +x markToBeDeleted() +x markValueClean(int) +x markValueClean(String) +x markValueDirty(int) +x markValueDirty(String) +x needsToBeSaved() +x recordIsClean() +x refresh(Connection) +x save() +x save(Connection) +o saveWithoutStatusUpdate(Connection) // not yet implemented +x schema() +x setValue(int, BigDecimal) +x setValue(int, boolean) +x setValue(int, byte[]) +x setValue(int, Date) +x setValue(int, Date) +x setValue(int, double) +x setValue(int, float) +x setValue(int, int) +x setValue(int, long) +x setValue(int, String) +x setValue(int, Time) +x setValue(int, Timestamp) +x setValue(int, Value) +x setValue(String, BigDecimal) +x setValue(String, boolean) +x setValue(String, byte[]) +x setValue(String, Date) +x setValue(String, Date) +x setValue(String, double) +x setValue(String, float) +x setValue(String, int) +x setValue(String, long) +x setValue(String, String) +x setValue(String, Time) +x setValue(String, Timestamp) +x setValue(String, Value) +x setValueNull(int) +x setValueNull(String) +x size() +x toBeSavedWithDelete() +x toBeSavedWithInsert() +x toBeSavedWithUpdate() +x toString() // implemented by Serge Knystautas http://www.lokitech.com +x unmarkToBeDeleted() +x updateStatus() // not yet implemented +x valueIsClean(int) + +Schema() +x attributes() +x column(int) +x column(String) +o destroy() // private used for serialization +x index(String) +o initialize() // private used for serialization +x numberOfColumns() +x schema(Connection, String) +x schema(Connection, String, String) +x tableName() +x toString() // implemented by Serge Knystautas http://www.lokitech.com + +// NOT YET IMPLEMENTED +SelectStmt(int) + addQbe(String, float) + addQbe(String, int) + addQbe(String, String) + addUnquotedQbe(String, String) + clearQbe() + clearQbe(String) + field(String) + field(String, String) + from(String) + getQbeWhere() + group(String) + having(String) + order(String) + setQbe(String, float) + setQbe(String, float[]) + setQbe(String, int) + setQbe(String, int[]) + setQbe(String, String) + setQbe(String, String[]) + setUnquotedQbe(String, String) + setUnquotedQbe(String, String[]) + toString() + unique() + where(String) + +x TableDataSet() +x TableDataSet(Connection, Schema, KeyDef) +x TableDataSet(Connection, String) +x TableDataSet(Connection, String, KeyDef) +x TableDataSet(Connection, String, String) +x TableDataSet(Connection, String, String, KeyDef) +x attributes() // implemented in DataSet() +o debugInfo() // Unknown +x fetchRecords(int, int) +x getSelectString() +x keydef() +x optimisticLockingCol() // not used +x order(String) +x other(String) +x refresh(Connection) +x refreshOnSave() +x removeDeletedRecords() +x resultSet() +x save() +x save(boolean) // doesn't currently do anything with the boolean +x save(Connection, boolean) // doesn't currently do anything with the boolean +o saveWithoutStatusUpdate(Connection) // not yet implemented +x schema() +o selectStmt() // not yet implemented +x setOptimisticLockingColumn(String) // not used +o setRefreshOnSave(boolean) // not yet implemented +x tableName() +x tableQualifier(String) // implemented correctly? +o updateStatus() // not yet implemented +x where(String) + +x Value(ResultSet, int, int) +x asBigDecimal() +x asBigDecimal(int) +x asBoolean() +x asByte() +x asBytes() +x asDate() +x asDouble() +x asFloat() +x asInt() +x asLong() +x asShort() +x asString() +x asTime() +x asTimestamp() +x asUtilDate() +x isBigDecimal() +x isBytes() +x isDate() +x isDouble() +x isFloat() +x isInt() +x isLong() +x isNull() +x isString() +x isTime() +x isTimestamp() +x isUtilDate() +x toString() +x type() + + \ No newline at end of file Added: db/torque/village/trunk/docs/README.txt URL: http://svn.apache.org/viewvc/db/torque/village/trunk/docs/README.txt?rev=590852&view=auto ============================================================================== --- db/torque/village/trunk/docs/README.txt (added) +++ db/torque/village/trunk/docs/README.txt Wed Oct 31 15:23:36 2007 @@ -0,0 +1,75 @@ +V I L L A G E +============= + + +What is it? +----------- +Village is a 100% Pure Java API that sits on top of the JDBC API. The purpose +of this API is to make it easier to interact with a JDBC compliant relational database. +By using Village, it is possible to execute and manage +select/insert/update/delete SQL statements without having to actually write +a single line of SQL. Village can use any valid JDBC Connection object, so it +is possible to use Village with a JDBC Connection pool. + +This software is being freely released under the Apache License, Version 2.0. Please see +common/LICENSE.txt in the distribution for more information. + + +Why the name Village? +--------------------- +A Village is an interface to the database. The huts are the tables and the +people are the rows. + + +History +------- +Village is inspired by the dbKona API documents available on BEA/Weblogic's website +. + +The BEA WebXpress product is an excellent piece of software and it is highly +recommended that you purchase it. + + +How to use it +------------- +Documentation included with Village is extremely thin at this point. Although, +there is comprehensive documentation of dbKona on the BEA/Weblogic website. +All of the methods in Village are lightly documented in the javadoc format. There +is also some example code in the javadoc for TableDataSet and QueryDataSet. + +Please also refer to the com.workingdogs.village.Test*.java class for some +other examples of code. + + +Frequently Asked Questions + +Why is the package name com.workingdogs.village +instead of com.working-dogs.village? +----------------------------------------------- +Because for some reason, Sun decided that package naming conventions should +conform to domain names for which the package originated. But, they did not +consider the fact that domain names can contain a "-" in it and made that +an illegal character in package names. Arrrggg... + + +Could you tell me the difference between Village and SQLJ? +Why should/would I choose your API over an ANSI standard? +From what I have read at http://www.oracle.com/java/sqlj/index.html +I dont see why you are creating your own standard. +----------------------------------------------- + +SQLJ might be an ANSI standard, but who said that screwing up Java +standards is right? SQLJ requires a pre-compiler to convert +your .sqlj files into .java files. Hello? javac doesn't have a +pre-compiler for a reason! How can you reliably do rapid java +development if you have to first run your pre-source code through +something that munges it into something else? + +Also, I'm not creating my own standard, Village is inspired by the +dbKona API that WebLogic/BEA developed for use with their WebXpress +product. WebLogic/BEA's product is the number one java application server in +use today. I think that point alone justifies the creation of this API. + +Lastly, this API is easy to use and easy to learn. It will save you +hours worth of typing as well as help prevent you from making countless +mistakes. The PreparedStatement handling alone makes using this API worth it. Added: db/torque/village/trunk/docs/Schema.txt URL: http://svn.apache.org/viewvc/db/torque/village/trunk/docs/Schema.txt?rev=590852&view=auto ============================================================================== --- db/torque/village/trunk/docs/Schema.txt (added) +++ db/torque/village/trunk/docs/Schema.txt Wed Oct 31 15:23:36 2007 @@ -0,0 +1,31 @@ +# Below is the schema that TestMySQL.java depends on. + +drop table if exists test; + +CREATE TABLE test +( + a TINYINT null, + b SMALLINT null, + c MEDIUMINT null, + d INT null, + e INTEGER null, + f BIGINT null, + g REAL null, + h DOUBLE null, + i FLOAT null, + j DECIMAL(8,1) null, + k NUMERIC(8,1) null, + l CHAR(255) null, + m VARCHAR(255) null, + n DATE null, + o TIME null, + p TIMESTAMP null, + q DATETIME null, + r TINYBLOB null, + s BLOB null, + t MEDIUMBLOB null, + u LONGBLOB null, + v TINYTEXT null, + w TEXT null, + x MEDIUMTEXT null +); --------------------------------------------------------------------- To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org For additional commands, e-mail: torque-dev-help@db.apache.org