avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From froehl...@apache.org
Subject cvs commit: jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/basic/parser BasicLXSQLParser.java
Date Fri, 09 Nov 2001 11:58:57 GMT
froehlich    01/11/09 03:58:57

  Modified:    apps/db/src/java/org/apache/avalon/db/basic/parser
                        BasicLXSQLParser.java
  Log:
  added select statement
  
  Revision  Changes    Path
  1.3       +7 -2      jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/basic/parser/BasicLXSQLParser.java
  
  Index: BasicLXSQLParser.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/basic/parser/BasicLXSQLParser.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- BasicLXSQLParser.java	2001/11/09 11:16:59	1.2
  +++ BasicLXSQLParser.java	2001/11/09 11:58:57	1.3
  @@ -21,6 +21,7 @@
   import org.apache.avalon.db.bcel.actions.AbstractBCELAction;
   import org.apache.avalon.db.basic.actions.BasicCreateTable;
   import org.apache.avalon.db.basic.actions.BasicInsert;
  +import org.apache.avalon.db.basic.actions.BasicSelect;
   import org.apache.avalon.db.basic.data.BasicTable;
   import org.apache.avalon.framework.component.ComponentManager;
   import org.apache.avalon.framework.component.ComponentException;
  @@ -56,10 +57,14 @@
        *
        */
       public Select createSelectAction(SelectRequest request) throws ActionException {
  +        Document doc = parseLXSQLString(request.getSql());
   
  -      // TODO
  -      return null;
  +        Element rootElement = doc.getDocumentElement();
  +        String tableName = rootElement.getAttribute("name");
   
  +        Select action = new BasicSelect(doc);
  +        action.setDatabasePersistor(mDatabasePersistor);
  +        return action;
       }
   
       /**
  
  
  

--
To unsubscribe, e-mail:   <mailto:avalon-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-dev-help@jakarta.apache.org>


Mime
View raw message