crossdb-developers Mailing List for crossdb - Java - database independent co (Page 2)
Status: Beta
Brought to you by:
prophecyslides
You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
(28) |
Jun
(14) |
Jul
(7) |
Aug
(7) |
Sep
(2) |
Oct
(1) |
Nov
|
Dec
(1) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(9) |
Feb
(2) |
Mar
(6) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
|
From: Thomas M. <tho...@po...> - 2002-08-29 22:53:37
|
Hi Travis, > Use the ldbc sql parser to parse into a crossdb query/tree, then let crossdb finish off the db specific sql code. What do you think? LDBC is currently using Antlr (www.antlr.org) as the parser, and antlr uses it's own tree representation... not sure how to convert that to crossdb query/tree. I think on the high level it would be a good idea, but there may be some nasty technical problems. But probably nothing we can't solve. I think it would be great if the user can choose the method he would like to use, writing SQL statements and letting LDBC/CrossDB convert then, or only using CrossDB to generate SQL for him (for higher performance). Thomas P.S. I will be on vacation until mid next week. |
From: <tr...@th...> - 2002-08-28 21:23:01
|
Actually, I can see a good fit now. Use the ldbc sql parser to parse into a crossdb query/tree, then let crossdb finish off the db specific sql code. What do you think? Travis ---- Original Message ---- From: Thomas Mueller <tho...@po...> Sent: 2002-08-28 To: "'cro...@li...'" <cro...@li...> Subject: [Crossdb-developers] CrossDB and LDBC > Seems both projects are trying to accomplish the same thing, ie: database independent code. But they are quite different in how this is accomplished. I agree. > How do you handle all the variations? ex: outer joins in Oracle vs outer joins in SQL Server or mySQL? or IDENTITY vs auto_increment ? Actually outer join and autoincrement are not implemented yet in LDBC. But they will be implemented in the following way: All statements are first parsed into a tree (all statements are parsed in this way): SELECT * FROM A LEFT OUTER JOIN B ON A.X=B.Y WHERE A.Z=1 SELECT select_list * table_list outer_join A B join_condition = A.X B.Y condition = A.Z 1 and then the tree is used to construct the vendor specific SQL statement, very similar in how CrossDB works, for example Oracle: SELECT * FROM A, B WHERE (A.X *= B.Y) AND (A.Z=1) Not sure if that's actually correct... I will look into CrossDB and try to understand how you guys solve some tricky problems, like Oracle empty String is converted to null, Oracle Blobs, MySQL binary columns and case insensitive varchar and so on. Thomas ------------------------------------------------------- This sf.net email is sponsored by: Jabber - The world's fastest growing real-time communications platform! Don't just IM. Build it in! http://www.jabber.com/osdn/xim _______________________________________________ Crossdb-developers mailing list Cro...@li... https://lists.sourceforge.net/lists/listinfo/crossdb-developers |
From: Thomas M. <tho...@po...> - 2002-08-28 20:53:34
|
> Seems both projects are trying to accomplish the same thing, ie: database independent code. But they are quite different in how this is accomplished. I agree. > How do you handle all the variations? ex: outer joins in Oracle vs outer joins in SQL Server or mySQL? or IDENTITY vs auto_increment ? Actually outer join and autoincrement are not implemented yet in LDBC. But they will be implemented in the following way: All statements are first parsed into a tree (all statements are parsed in this way): SELECT * FROM A LEFT OUTER JOIN B ON A.X=B.Y WHERE A.Z=1 SELECT select_list * table_list outer_join A B join_condition = A.X B.Y condition = A.Z 1 and then the tree is used to construct the vendor specific SQL statement, very similar in how CrossDB works, for example Oracle: SELECT * FROM A, B WHERE (A.X *= B.Y) AND (A.Z=1) Not sure if that's actually correct... I will look into CrossDB and try to understand how you guys solve some tricky problems, like Oracle empty String is converted to null, Oracle Blobs, MySQL binary columns and case insensitive varchar and so on. Thomas |
From: <tr...@th...> - 2002-08-28 17:15:53
|
Just looked at LDBC site, looks very interesting. Seems both projects are trying to accomplish the same thing, ie: database independent code. But they are quite different in how this is accomplished. crossdb eliminates the use of SQL statements by the developer. How do you handle all the variations? ex: outer joins in Oracle vs outer joins in SQL Server or mySQL? or IDENTITY vs auto_increment ? Travis ---- Original Message ---- From: Thomas Mueller <tho...@po...> Sent: 2002-08-28 To: "'cro...@li...'" <cro...@li...> Subject: [Crossdb-developers] CrossDB and LDBC You project sounds very similar to the open source project LDBC (Liberty Data Base Connectivity), also at SourceForge, <http://ldbc.sourceforge.net> (LDBC stands for Liberty Database Connectivity and is a JDBC driver, a Java library and a set of documentation for vendor-independent database access. Using LDBC, one can write applications that run with most/all popular databases without change. LDBC simplifies porting of existing or new applications to new databases. LDBC contains a JDBC driver and tools that shield the application from database vendor specific code. LDBC is based on ANSI SQL and JDBC and includes documentation on how to write vendor independent code, and the SQL grammar supported. LDBC is not meant to be a persistence layer or object relation mapping. The main idea of LDBC is providing a standard way to access a SQL database from Java.) The difference seems to be, LDBC is a complete JDBC driver while CrossDB is more a SQL generator, and provides a new API. Main difference (as far as I see, please correct me): CrossDB is mainly used to creates a SQL statement. LDBC parses the statement first, then re-builds it using the syntax tree representation. Not sure also if we should combine the projects - probably not. It seems there are many differences in how 'the problem' is solved. What do you think? Thomas ------------------------------------------------------- This sf.net email is sponsored by: Jabber - The world's fastest growing real-time communications platform! Don't just IM. Build it in! http://www.jabber.com/osdn/xim _______________________________________________ Crossdb-developers mailing list Cro...@li... https://lists.sourceforge.net/lists/listinfo/crossdb-developers |
From: Thomas M. <tho...@po...> - 2002-08-28 06:42:30
|
You project sounds very similar to the open source project LDBC (Liberty Data Base Connectivity), also at SourceForge, <http://ldbc.sourceforge.net> (LDBC stands for Liberty Database Connectivity and is a JDBC driver, a Java library and a set of documentation for vendor-independent database access. Using LDBC, one can write applications that run with most/all popular databases without change. LDBC simplifies porting of existing or new applications to new databases. LDBC contains a JDBC driver and tools that shield the application from database vendor specific code. LDBC is based on ANSI SQL and JDBC and includes documentation on how to write vendor independent code, and the SQL grammar supported. LDBC is not meant to be a persistence layer or object relation mapping. The main idea of LDBC is providing a standard way to access a SQL database from Java.) The difference seems to be, LDBC is a complete JDBC driver while CrossDB is more a SQL generator, and provides a new API. Main difference (as far as I see, please correct me): CrossDB is mainly used to creates a SQL statement. LDBC parses the statement first, then re-builds it using the syntax tree representation. Not sure also if we should combine the projects - probably not. It seems there are many differences in how 'the problem' is solved. What do you think? Thomas |
From: <tr...@th...> - 2002-08-07 07:11:53
|
Any ideas on how we should implement SQL functions like MAX, COUNT, etc? Travis |
From: <tr...@th...> - 2002-07-30 15:48:10
|
Neat little tool... travis ---- Original Message ---- From: Olof Edlund <olo...@up...> Sent: 2002-07-30 To: tr...@th... Subject: SQL Validator Hi, I found crossdb (and also noticed that you worked on other related projects) so I thought I'd tell you about a useful resource. You can find an SQL validator at developer.mimer.com/validator. This validator can also be accessed through a web service. This service can be called for free by anyone and you can find more information about it at sqlvalidator.mimer.com. Please ignore the ugly page design. It is not meant to be viewed by much people. I'm thinking that the web service could be useful during your development. Even though many constructs are different with different databases it is probably helpful if you adhere to the standard whenever possible. Regards, Olof Edlund, Upright database. |
From: <tr...@th...> - 2002-07-12 23:32:26
|
u used it? any good? ---- Original Message ---- From: Matthew Baird <ma...@so...> Sent: 2002-07-12 To: "'gu...@sa... '" <Gu...@Sa...>, "'cro...@li... '" <cro...@li...> Subject: RE: [Crossdb-developers] http://hibernate.sourceforge.net/ I speak regularly with the lead on Hibernate. Hibernate is a true OR mapping solution, nothing more. OJB is more of a transaction object system built on top of OR on top of database. I can understand when using hibernate would make sense to use instead of OJB. They don't *really* compete, just kinda :) m -----Original Message----- From: gu...@sa... To: cro...@li... Sent: 7/12/02 12:36 PM Subject: [Crossdb-developers] http://hibernate.sourceforge.net/ Hi Travis: Hi ALL: Did somebody checked http://hibernate.sourceforge.net/ out already? Somebody on another list just pointed this project out to me. Won't have too much time to check it out in the next little while! Any comments? TIA Gunter ---------------------- ---------------------- CUSTOMER SOLUTIONS IN: JAVA, C++, VISUAL BASIC, JSP, SERVLETS, PHP, PERL, HTML, XML, INTERBASE, ORACLE, MYSQL, UNIX, LINUX, MICROSOFT ---------------------- Gunter Sammet SAMMYSOLUTIONS.COM LTD ---------------------- 2102-12 AVE NW Calgary/AB, T2N 4X1, CANADA Phone: +1 (403) 210-2603, Cell: +1 (403) 830-0705 Fax: +1 (403) 282-2603 E-mail: Gu...@Sa... Web: www.SammySolutions.com ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Gadgets, caffeine, t-shirts, fun stuff. http://thinkgeek.com/sf _______________________________________________ Crossdb-developers mailing list Cro...@li... https://lists.sourceforge.net/lists/listinfo/crossdb-developers ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Gadgets, caffeine, t-shirts, fun stuff. http://thinkgeek.com/sf _______________________________________________ Crossdb-developers mailing list Cro...@li... https://lists.sourceforge.net/lists/listinfo/crossdb-developers |
From: Matthew B. <ma...@so...> - 2002-07-12 22:48:09
|
I speak regularly with the lead on Hibernate. Hibernate is a true OR mapping solution, nothing more. OJB is more of a transaction object system built on top of OR on top of database. I can understand when using hibernate would make sense to use instead of OJB. They don't *really* compete, just kinda :) m -----Original Message----- From: gu...@sa... To: cro...@li... Sent: 7/12/02 12:36 PM Subject: [Crossdb-developers] http://hibernate.sourceforge.net/ Hi Travis: Hi ALL: Did somebody checked http://hibernate.sourceforge.net/ out already? Somebody on another list just pointed this project out to me. Won't have too much time to check it out in the next little while! Any comments? TIA Gunter ---------------------- ---------------------- CUSTOMER SOLUTIONS IN: JAVA, C++, VISUAL BASIC, JSP, SERVLETS, PHP, PERL, HTML, XML, INTERBASE, ORACLE, MYSQL, UNIX, LINUX, MICROSOFT ---------------------- Gunter Sammet SAMMYSOLUTIONS.COM LTD ---------------------- 2102-12 AVE NW Calgary/AB, T2N 4X1, CANADA Phone: +1 (403) 210-2603, Cell: +1 (403) 830-0705 Fax: +1 (403) 282-2603 E-mail: Gu...@Sa... Web: www.SammySolutions.com ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Gadgets, caffeine, t-shirts, fun stuff. http://thinkgeek.com/sf _______________________________________________ Crossdb-developers mailing list Cro...@li... https://lists.sourceforge.net/lists/listinfo/crossdb-developers |
From: <tr...@th...> - 2002-07-12 19:48:33
|
Looks pretty good. Might want to check out http://jakarta.apache.org/ojb/ for O/R persistence since it rocks! ;-) (i'm involved with the ojb project). And it will have a JDO implementation soon. Those are quite different than crossdb though, those types of projects could use crossdb for their underlying database querying. Travis ---- Original Message ---- From: "gu...@sa..." <Gu...@Sa...> Sent: 2002-07-12 To: cro...@li... Subject: [Crossdb-developers] http://hibernate.sourceforge.net/ Hi Travis: Hi ALL: Did somebody checked http://hibernate.sourceforge.net/ out already? Somebody on another list just pointed this project out to me. Won't have too much time to check it out in the next little while! Any comments? TIA Gunter ---------------------- ---------------------- CUSTOMER SOLUTIONS IN: JAVA, C++, VISUAL BASIC, JSP, SERVLETS, PHP, PERL, HTML, XML, INTERBASE, ORACLE, MYSQL, UNIX, LINUX, MICROSOFT ---------------------- Gunter Sammet SAMMYSOLUTIONS.COM LTD ---------------------- 2102-12 AVE NW Calgary/AB, T2N 4X1, CANADA Phone: +1 (403) 210-2603, Cell: +1 (403) 830-0705 Fax: +1 (403) 282-2603 E-mail: Gu...@Sa... Web: www.SammySolutions.com ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Gadgets, caffeine, t-shirts, fun stuff. http://thinkgeek.com/sf _______________________________________________ Crossdb-developers mailing list Cro...@li... https://lists.sourceforge.net/lists/listinfo/crossdb-developers |
From: <gu...@sa...> - 2002-07-12 19:36:46
|
Hi Travis: Hi ALL: Did somebody checked http://hibernate.sourceforge.net/ out already? Somebody on another list just pointed this project out to me. Won't have too much time to check it out in the next little while! Any comments? TIA Gunter ---------------------- ---------------------- CUSTOMER SOLUTIONS IN: JAVA, C++, VISUAL BASIC, JSP, SERVLETS, PHP, PERL, HTML, XML, INTERBASE, ORACLE, MYSQL, UNIX, LINUX, MICROSOFT ---------------------- Gunter Sammet SAMMYSOLUTIONS.COM LTD ---------------------- 2102-12 AVE NW Calgary/AB, T2N 4X1, CANADA Phone: +1 (403) 210-2603, Cell: +1 (403) 830-0705 Fax: +1 (403) 282-2603 E-mail: Gu...@Sa... Web: www.SammySolutions.com |
From: <gu...@sa...> - 2002-07-09 17:10:51
|
Hi Travis, Hi All, sorry that I have been so quiet in the last few months. Had to learn PHP and worked in PHP the last few months. Didn't get around to play with Java much during that time. Hope by next week that I will be able to update the stuff. Will keep you posted. Cheers, Gunter |
From: <tr...@th...> - 2002-07-09 16:05:28
|
Gunther, Could you update the interbase and firebird code to work with the new stuff? Travis Reeder |
From: <tr...@th...> - 2002-06-28 03:33:08
|
Also created some starting classes and interfaces for the extensions framework to allow database dependent features... Check it out here: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/crossdb/crossdb/src/java/com/crossdb/sql/ext/ Feedback would be appreciated. Travis |
From: <tr...@th...> - 2002-06-28 03:31:58
|
I've committed a bunch of changes today, best example is to look at Mysql impl and Oracle impl, I pulled out all the code that was similar (which is most things) and put them into DefaultXXXQuery classes. So now the implementations only override the methods that need changing like the execute or toString's. This should make it much, much easier to create new Implementations. Thanks Kevin for the idea. Travis |
From: <tr...@th...> - 2002-06-28 03:23:50
|
On OracleInsertQuery and OracleUpdateQuery, if it's a 0 length string, i insert a space. On OracleResultSet, if it's a space, I return a 0 length string. Travis ---- Original Message ---- From: Matthew Baird <ma...@so...> Sent: 2002-06-27 To: "'cro...@li...'" <cro...@li...> Subject: RE: [Crossdb-developers] oracle empty string = null issue - solve d What was the final decision on the change? -----Original Message----- From: tr...@th... [mailto:tr...@th...] Sent: Thursday, June 27, 2002 4:01 PM To: cro...@li... Subject: [Crossdb-developers] oracle empty string = null issue - solved Committed some changes to oracle implementation to get around the problem of oracle treating an empty string as null. Travis Reeder ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Bringing you mounds of caffeinated joy. http://thinkgeek.com/sf _______________________________________________ Crossdb-developers mailing list Cro...@li... https://lists.sourceforge.net/lists/listinfo/crossdb-developers ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Bringing you mounds of caffeinated joy. http://thinkgeek.com/sf _______________________________________________ Crossdb-developers mailing list Cro...@li... https://lists.sourceforge.net/lists/listinfo/crossdb-developers |
From: Matthew B. <ma...@so...> - 2002-06-28 01:40:43
|
What was the final decision on the change? -----Original Message----- From: tr...@th... [mailto:tr...@th...] Sent: Thursday, June 27, 2002 4:01 PM To: cro...@li... Subject: [Crossdb-developers] oracle empty string = null issue - solved Committed some changes to oracle implementation to get around the problem of oracle treating an empty string as null. Travis Reeder ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Bringing you mounds of caffeinated joy. http://thinkgeek.com/sf _______________________________________________ Crossdb-developers mailing list Cro...@li... https://lists.sourceforge.net/lists/listinfo/crossdb-developers |
From: <tr...@th...> - 2002-06-27 23:06:42
|
Committed some changes to oracle implementation to get around the problem of oracle treating an empty string as null. Travis Reeder |
From: <tr...@th...> - 2002-06-27 22:35:59
|
Kevin, can you send me the column scale patch? Travis Reeder |
From: <tr...@th...> - 2002-06-25 18:17:29
|
I've talked with Matt Baird about the idea of adding support for database dependent functions, yet still keeping to the whole idea of this project. The main idea is to have a sort of pyramid structure of interfaces starting from basic, which all databases support and moving up for example, a SupportsUnion interface that all implementations that support unions could implement then in your programs, you could verify that the db supports unions and use it or not. Or you could even say that your app supports the level of crossdb and must be used on a db that is at that level. I'm not sure the best way to organize this because each db has support that is all over the board. Possible interfaces in hierarchical order: Basic - all implementations implement this SQL92 SQL99 etc. Or maybe we make our own since not every db follows the above exactly? Or maybe both so they can implement sql92 if it follows the spec exactly and one of our own interfaces which may be a subset of SQL92. Travis |
From: <tr...@th...> - 2002-06-13 00:25:13
|
Ya, Town and Village are different in the following ways, I think code examples will be best for explanation: Town: QueryDataSet qds = new QueryDataSet ( connection, "SELECT * from my_table" ); qds.fetchRecords(10); // fetch only the first 10 records for ( int i = 0; i < qds.size(); i++ ) { Record rec = qds.getRecord(i); int value = rec.getValue("column").asInt(); System.out.println ( "The value is: " + value ); } qds.close(); Crossdb: SelectQuery sq = factory.getSelectQuery(); sq.addTable("my_table"); ResultSet rs = sq.execute(conn); while(rs.next()){ ....... Major differences here: 1. Town requires that you know SQL syntax and to use strings to build up a statement. (this can get quite cumbersome if you need to build the query string dynamically with conditional branches). crossdb does not require that you know any SQL syntax, just simple API methods. 2. Town fetches full record sets and stores them in Record objects which seems quite inefficient? (imagine a record set with a million rows). crossdb uses a java.sql.ResultSet which fetches on demand and sticks to the jdbc roots. I'm sure there are others such as how they make it database independent? And i'm sure there are lots of reasons why Village/Town is better than crossdb. But the point of crossdb is to use an object oriented approach to creating sql statements that will run on all databases. And that's exactly what it does. Try it and see what you think. Travis Travis Reeder Chief Software Architect www.ThinkVirtual.com |
From: <tr...@th...> - 2002-06-11 18:42:12
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Type content="text/html; charset=iso-8859-1"> <META content="MSHTML 6.00.2716.2200" name=GENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=#ffffff>Ya, <br> <br> Town and Village are different in the following ways, I think code examples will be best for explanation: <br> <br> Town: <br> QueryDataSet qds = new QueryDataSet ( connection, "SELECT * from my_table" ); <br> qds.fetchRecords(10); // fetch only the first 10 records <br> for ( int i = 0; i < qds.size(); i++ ) <br> { <br> Record rec = qds.getRecord(i); <br> int value = rec.getValue("column").asInt(); <br> System.out.println ( "The value is: " + value ); <br> } <br> qds.close(); <br> <br> Crossdb: <br> SelectQuery sq = factory.getSelectQuery(); <br> sq.addTable("my_table"); <br> ResultSet rs = sq.execute(conn); <br> while(rs.next()){ <br> ....... <br> <br> Major differences here: <br> <br> 1. Town requires that you know SQL syntax and to use strings to build up a statement. (this can get quite cumbersome if you need to build the query string dynamically with conditional branches). crossdb does not require that you know any SQL syntax, just simple API methods. <br> <br> 2. Town fetches full record sets and stores them in Record objects which seems quite inefficient? (imagine a record set with a million rows). crossdb uses a java.sql.ResultSet which fetches on demand and sticks to the jdbc roots. <br> <br> I'm sure there are others such as how they make it database independent? And i'm sure there are lots of reasons why Village/Town is better than crossdb. <br> <br> But the point of crossdb is to use an object oriented approach to creating sql statements that will run on all databases. And that's exactly what it does. Try it and see what you think. <br> <br> Travis <br> <br> <br> <br> <br> <br> <br> ---- Original Message ---- <br> From: James Strachan <<a href="mailto:jam...@ya...">jam...@ya...</a>> <br> Sent: 2002-06-11 <br> To: <a href="mailto:cro...@li...">cro...@li...</a> <br> Subject: Re: [Crossdb-developers] Abstract Classes <br> <br> <DIV><FONT face=Arial size=2>Have you seen Town</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2><A href="http://share.whichever.com/index.php?SCREEN=town">http://share.whichever.com/index.php?SCREEN=town</A></FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>and Village</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2><A href="http://share.whichever.com/index.php?SCREEN=village">http://share.whichever.com/index.php?SCREEN=village</A></FONT></DIV> <DIV><FONT face=Arial size=2></FONT><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>worth a look as both projects are pretty stable and have been used inside Torque and (I think) Castor.</FONT></DIV> <DIV><BR>James</DIV> <BLOCKQUOTE style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"> <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV> <DIV style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> <A title=tr...@th... href="mailto:tr...@th...">tr...@th...</A> </DIV> <DIV style="FONT: 10pt arial"><B>To:</B> <A title=cro...@li... href="mailto:cro...@li...">cro...@li...</A> </DIV> <DIV style="FONT: 10pt arial"><B>Sent:</B> Tuesday, June 11, 2002 6:44 PM</DIV> <DIV style="FONT: 10pt arial"><B>Subject:</B> RE: [Crossdb-developers] Abstract Classes</DIV> <DIV><BR></DIV>Well the only thing that's really common here is the addColumn methods for teh XXXTableQuery classes, so those could definitely be put into an abstract class, i think they all act the same across the board. <BR><BR>And another place where an abstract class would be useful is in the classes that use WhereClause's, because they all pretty much have the same addWhereCondition, etc, methods. And if they don't they should, so a WhereQuery abstract class could be used for these. <BR><BR>BUT for this to happen we'll need to modify WhereCondition to accept Object and all primitive types so that you can make a WhereCondition or Clause and then pass it to whatever you want. Right now, the formatting is done when you do something like SelectQuery.addWhereCondition(x, EQUAL_TO, Date). The formatting should probably be done at execute time instead. I just ran into this problem last night when trying to use the same WhereClause for a select then a delete, I wanted to Select everything from a table, go through them and process things, then delete everything that was selected. I had to do the format on my own though because I wasn't using a Query class, just the WhereClause/condition. So the WhereCondition should use a List of objects rather than strings and the object should be formatted at execution time based on the implementation. This would probably require a Formatter interface and implementations so the WhereClause can generate the where string using the factory provided Formatter. <BR><BR>Which brings me to another point, the xxxQuery interfaces should extends a WhereStatement or some kind of global interface so that they all have the same addWherexxx methods. <BR><BR>+1 to all of this on my end. Anybody want to help? <BR><BR>Travis <BR><BR><BR><BR>---- Original Message ---- <BR>From: Kevin Lentle <<A href="mailto:ke...@me...">ke...@me...</A>> <BR>Sent: 2002-06-10 <BR>To: CrossDB Developers <<A href="mailto:cro...@li...">cro...@li...</A>> <BR>Subject: [Crossdb-developers] Abstract Classes <BR><BR> <DIV><FONT face=Arial size=2>Hi All,</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>I've been looking at the problems with the getQuery method within the abstract classes and came up with a solution, but a nasty one....</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>Firstly looked at the batch level processing within the Statement interface, but this is all optional...</FONT></DIV> <DIV><FONT face=Arial size=2>Next tried using delimiters, such as semi-colons, in the SQL query but again support seems to be optional...</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>The only thing that seemed to work across the board was to return either an array or an iterator over a set of statements to create the tables</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>or</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>for db's like Oracle the developer also over-rides the execute(Statement s) method of the xxxTableQuery.</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>Neither of which is really ideal, although returning an array from the getQuery seems the easier.</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>Any suggestions ?</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>Kev.</FONT></DIV>_______________________________________________________________ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas - http://devcon.sprintpcs.com/adp/index.cfm?source=dntextlink _______________________________________________ Crossdb-developers mailing list Cro...@li... https://lists.sourceforge.net/lists/listinfo/crossdb-developers </BLOCKQUOTE></BODY></HTML> |
From: James S. <jam...@ya...> - 2002-06-11 17:58:11
|
Have you seen Town http://share.whichever.com/index.php?SCREEN=3Dtown and Village http://share.whichever.com/index.php?SCREEN=3Dvillage worth a look as both projects are pretty stable and have been used = inside Torque and (I think) Castor. James ----- Original Message -----=20 From: tr...@th...=20 To: cro...@li...=20 Sent: Tuesday, June 11, 2002 6:44 PM Subject: RE: [Crossdb-developers] Abstract Classes Well the only thing that's really common here is the addColumn methods = for teh XXXTableQuery classes, so those could definitely be put into an = abstract class, i think they all act the same across the board.=20 And another place where an abstract class would be useful is in the = classes that use WhereClause's, because they all pretty much have the = same addWhereCondition, etc, methods. And if they don't they should, so = a WhereQuery abstract class could be used for these. =20 BUT for this to happen we'll need to modify WhereCondition to accept = Object and all primitive types so that you can make a WhereCondition or = Clause and then pass it to whatever you want. Right now, the formatting = is done when you do something like SelectQuery.addWhereCondition(x, = EQUAL_TO, Date). The formatting should probably be done at execute time = instead. I just ran into this problem last night when trying to use the = same WhereClause for a select then a delete, I wanted to Select = everything from a table, go through them and process things, then delete = everything that was selected. I had to do the format on my own though = because I wasn't using a Query class, just the WhereClause/condition. = So the WhereCondition should use a List of objects rather than strings = and the object should be formatted at execution time based on the = implementation. This would probably require a Formatter interface and = implementations so the WhereClause can generate the where string using = the factory provided Formatter.=20 Which brings me to another point, the xxxQuery interfaces should = extends a WhereStatement or some kind of global interface so that they = all have the same addWherexxx methods.=20 +1 to all of this on my end. Anybody want to help?=20 Travis=20 ---- Original Message ----=20 From: Kevin Lentle <ke...@me...>=20 Sent: 2002-06-10=20 To: CrossDB Developers <cro...@li...>=20 Subject: [Crossdb-developers] Abstract Classes=20 Hi All, I've been looking at the problems with the getQuery method within the = abstract classes and came up with a solution, but a nasty one.... Firstly looked at the batch level processing within the Statement = interface, but this is all optional... Next tried using delimiters, such as semi-colons, in the SQL query but = again support seems to be optional... The only thing that seemed to work across the board was to return = either an array or an iterator over a set of statements to create the = tables or for db's like Oracle the developer also over-rides the = execute(Statement s) method of the xxxTableQuery. Neither of which is really ideal, although returning an array from the = getQuery seems the easier. Any suggestions ? Kev. _______________________________________________________________ Don't = miss the 2002 Sprint PCS Application Developer's Conference August 25-28 = in Las Vegas - = http://devcon.sprintpcs.com/adp/index.cfm?source=3Ddntextlink = _______________________________________________ Crossdb-developers = mailing list Cro...@li... = https://lists.sourceforge.net/lists/listinfo/crossdb-developers=20 |
From: <tr...@th...> - 2002-06-11 17:50:35
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=3DContent-Type content=3D"text/html; charset=3Diso-8859-1"= > <META content=3D"MSHTML 6.00.2600.0" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff>Well the only thing that's really common here is th= e addColumn methods for teh XXXTableQuery classes, so those could definitel= y be put into an abstract class, i think they all act the same across the b= oard. <br> <br>And another place where an abstract class would be useful is in the cla= sses that use WhereClause's, because they all pretty much have the same add= WhereCondition, etc, methods. And if they don't they should, so a Whe= reQuery abstract class could be used for these. <br> <br>BUT for this to happen we'll need to modify WhereCondition to accept Ob= ject and all primitive types so that you can make a WhereCondition or Claus= e and then pass it to whatever you want. Right now, the formatting is= done when you do something like SelectQuery.addWhereCondition(x, EQUAL_TO,= Date). The formatting should probably be done at execute time instea= d. I just ran into this problem last night when trying to use the sam= e WhereClause for a select then a delete, I wanted to Select everything fro= m a table, go through them and process things, then delete everything that = was selected. I had to do the format on my own though because I wasn'= t using a Query class, just the WhereClause/condition. So the WhereCo= ndition should use a List of objects rather than strings and the object sho= uld be formatted at execution time based on the implementation. This = would probably require a Formatter interface and implementations so the Whe= reClause can generate the where string using the factory provided Formatter= . <br> <br>Which brings me to another point, the xxxQuery interfaces should extend= s a WhereStatement or some kind of global interface so that they all have t= he same addWherexxx methods. <br> <br>+1 to all of this on my end. Anybody want to help? <br> <br>Travis <br> <br> <br> <br>---- Original Message ---- <br>From: Kevin Lentle <<a href=3D"mailto:ke...@me...">kev= @metalised.fsnet.co.uk</a>> <br>Sent: 2002-06-10 <br>To: CrossDB Developers <<a href=3D"mailto:crossdb-developers@lists.s= ourceforge.net">cro...@li...</a>> <br>Subject: [Crossdb-developers] Abstract Classes <br> <br> <DIV><FONT face=3DArial size=3D2>Hi All,</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>I've been looking at the problems with the= getQuery=20 method within the abstract classes and came up with a solution, but a nasty= =20 one....</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>Firstly looked at the batch level processi= ng within=20 the Statement interface, but this is all optional...</FONT></DIV> <DIV><FONT face=3DArial size=3D2>Next tried using delimiters, such as semi-= colons,=20 in the SQL query but again support seems to be optional...</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>The only thing that seemed to work across = the board=20 was to return either an array or an iterator over a set of statements to cr= eate=20 the tables</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>or</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>for db's like Oracle the developer also ov= er-rides=20 the execute(Statement s) method of the xxxTableQuery.</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>Neither of which is really ideal, although= =20 returning an array from the getQuery seems the easier.</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>Any suggestions ?</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>Kev.</FONT></DIV></BODY></HTML> |
From: Kevin L. <ke...@me...> - 2002-06-10 22:39:08
|
Hi All, I've been looking at the problems with the getQuery method within the = abstract classes and came up with a solution, but a nasty one.... Firstly looked at the batch level processing within the Statement = interface, but this is all optional... Next tried using delimiters, such as semi-colons, in the SQL query but = again support seems to be optional... The only thing that seemed to work across the board was to return either = an array or an iterator over a set of statements to create the tables or for db's like Oracle the developer also over-rides the execute(Statement = s) method of the xxxTableQuery. Neither of which is really ideal, although returning an array from the = getQuery seems the easier. Any suggestions ? Kev. |