[teiid-commits] teiid SVN: r1977 - in trunk: client/src/main/java/com/metamatrix/dqp/message and 24 other directories.
teiid-commits at lists.jboss.org
teiid-commits at lists.jboss.org
Fri Mar 19 12:17:15 EDT 2010
Author: shawkins
Date: 2010-03-19 12:17:09 -0400 (Fri, 19 Mar 2010)
New Revision: 1977
Added:
trunk/client-jdbc/src/main/java/org/teiid/jdbc/ExecutionProperties.java
trunk/client-jdbc/src/main/java/org/teiid/jdbc/TeiidStatement.java
trunk/client-jdbc/src/main/java/org/teiid/jdbc/plan/
trunk/client-jdbc/src/test/java/org/teiid/jdbc/TestMMJDBCURL.java
trunk/client-jdbc/src/test/java/org/teiid/jdbc/plan/
trunk/client-jdbc/src/test/java/org/teiid/jdbc/plan/TestTextOutputVisitor.java
trunk/client-jdbc/src/test/java/org/teiid/jdbc/plan/TestXMLOutputVisitor.java
trunk/test-integration/common/src/test/resources/test-schema.xsd
Removed:
trunk/client-jdbc/src/main/java/org/teiid/jdbc/api/
trunk/client-jdbc/src/main/java/org/teiid/jdbc/plan/ExecutionProperties.java
trunk/client-jdbc/src/main/java/org/teiid/jdbc/plan/QueryPlanDisplayHelper.java
trunk/client-jdbc/src/test/java/com/metamatrix/jdbc/
trunk/client-jdbc/src/test/java/org/teiid/jdbc/api/FakeDisplayHelper.java
trunk/client-jdbc/src/test/java/org/teiid/jdbc/api/FakePlanNode.java
trunk/client-jdbc/src/test/java/org/teiid/jdbc/api/TestQueryPlanDisplayHelper.java
trunk/client-jdbc/src/test/java/org/teiid/jdbc/api/TestTextOutputVisitor.java
trunk/client-jdbc/src/test/java/org/teiid/jdbc/api/TestXMLOutputVisitor.java
trunk/client-jdbc/src/test/java/org/teiid/jdbc/util/TestMMJDBCURL.java
trunk/client/src/main/java/org/teiid/plan/api/
trunk/client/src/test/java/com/metamatrix/admin/api/
trunk/documentation/connector-developer-guide/src/main/docbook/en-US/content/connector-development-kit.xml
Modified:
trunk/client-jdbc/src/main/java/org/teiid/jdbc/BaseDataSource.java
trunk/client-jdbc/src/main/java/org/teiid/jdbc/BatchResults.java
trunk/client-jdbc/src/main/java/org/teiid/jdbc/ConnectionImpl.java
trunk/client-jdbc/src/main/java/org/teiid/jdbc/JDBCURL.java
trunk/client-jdbc/src/main/java/org/teiid/jdbc/PreparedStatementImpl.java
trunk/client-jdbc/src/main/java/org/teiid/jdbc/ResultSetImpl.java
trunk/client-jdbc/src/main/java/org/teiid/jdbc/StatementImpl.java
trunk/client-jdbc/src/main/java/org/teiid/jdbc/plan/Annotation.java
trunk/client-jdbc/src/main/java/org/teiid/jdbc/plan/DefaultDisplayHelper.java
trunk/client-jdbc/src/main/java/org/teiid/jdbc/plan/DisplayHelper.java
trunk/client-jdbc/src/main/java/org/teiid/jdbc/plan/PlanNode.java
trunk/client-jdbc/src/main/java/org/teiid/jdbc/plan/PlanVisitor.java
trunk/client-jdbc/src/main/java/org/teiid/jdbc/plan/TextOutputVisitor.java
trunk/client-jdbc/src/main/java/org/teiid/jdbc/plan/XMLOutputVisitor.java
trunk/client-jdbc/src/test/java/org/teiid/jdbc/TestBatchResults.java
trunk/client-jdbc/src/test/java/org/teiid/jdbc/TestEmbeddedProfile.java
trunk/client-jdbc/src/test/java/org/teiid/jdbc/TestMMDriver.java
trunk/client-jdbc/src/test/java/org/teiid/jdbc/TestSocketProfile.java
trunk/client-jdbc/src/test/java/org/teiid/jdbc/TestTeiidDataSource.java
trunk/client/src/main/java/com/metamatrix/dqp/message/RequestMessage.java
trunk/client/src/test/java/com/metamatrix/dqp/message/TestRequestMessage.java
trunk/common-core/src/main/java/com/metamatrix/common/types/SQLXMLImpl.java
trunk/documentation/connector-developer-guide/src/main/docbook/en-US/connector_developer_guide.xml
trunk/documentation/reference/src/main/docbook/en-US/content/federated_planning.xml
trunk/documentation/reference/src/main/docbook/en-US/content/grammar.xml
trunk/engine/src/main/java/org/teiid/dqp/internal/process/AbstractWorkItem.java
trunk/engine/src/main/java/org/teiid/dqp/internal/process/Request.java
trunk/engine/src/main/java/org/teiid/metadata/TransformationMetadata.java
trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestDQPCore.java
trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestWorkItemState.java
trunk/metadata/src/main/java/org/teiid/metadata/index/IndexMetadataFactory.java
trunk/metadata/src/test/java/org/teiid/metadata/index/VDBMetadataFactory.java
trunk/pom.xml
trunk/runtime/src/main/java/org/teiid/deployers/VDBDeployer.java
trunk/runtime/src/main/java/org/teiid/deployers/VDBParserDeployer.java
trunk/test-integration/common/src/test/java/org/teiid/dqp/internal/process/TestXMLTypeTranslations.java
trunk/test-integration/db/src/main/java/org/teiid/test/framework/ConfigPropertyNames.java
trunk/test-integration/db/src/main/java/org/teiid/test/framework/query/AbstractQueryTransactionTest.java
Log:
TEIID-1020 TEIID-918 moved the plan api under jdbc.plan. also fixed vdb resources to start with /
Modified: trunk/client/src/main/java/com/metamatrix/dqp/message/RequestMessage.java
===================================================================
--- trunk/client/src/main/java/com/metamatrix/dqp/message/RequestMessage.java 2010-03-19 01:45:14 UTC (rev 1976)
+++ trunk/client/src/main/java/com/metamatrix/dqp/message/RequestMessage.java 2010-03-19 16:17:09 UTC (rev 1977)
@@ -31,8 +31,6 @@
import java.util.Collections;
import java.util.List;
-import org.teiid.plan.api.ExecutionProperties;
-
import com.metamatrix.api.exception.MetaMatrixProcessingException;
import com.metamatrix.common.comm.CommonCommPlugin;
import com.metamatrix.core.util.ExternalizeUtil;
@@ -44,6 +42,19 @@
public static final int DEFAULT_FETCH_SIZE = 2048;
+ /** Transaction auto wrap constant - never wrap a command execution in a transaction */
+ public static final String TXN_WRAP_OFF = "OFF"; //$NON-NLS-1$
+
+ /** Transaction auto wrap constant - always wrap commands in a transaction. */
+ public static final String TXN_WRAP_ON = "ON"; //$NON-NLS-1$
+
+ /**
+ * Transaction auto wrap constant - checks if a command
+ * requires a transaction and will be automatically wrap it.
+ */
+ public static final String TXN_WRAP_DETECT = "DETECT"; //$NON-NLS-1$
+
+
public enum StatementType {
PREPARED, CALLABLE, STATEMENT
}
@@ -189,7 +200,7 @@
*/
public String getTxnAutoWrapMode() {
if (txnAutoWrapMode == null) {
- return ExecutionProperties.TXN_WRAP_DETECT;
+ return TXN_WRAP_DETECT;
}
return txnAutoWrapMode;
}
@@ -202,9 +213,9 @@
public void setTxnAutoWrapMode(String txnAutoWrapMode) throws MetaMatrixProcessingException {
if (txnAutoWrapMode != null) {
txnAutoWrapMode = txnAutoWrapMode.toUpperCase();
- if (!(txnAutoWrapMode.equals(ExecutionProperties.TXN_WRAP_OFF)
- || txnAutoWrapMode.equals(ExecutionProperties.TXN_WRAP_ON)
- || txnAutoWrapMode.equals(ExecutionProperties.TXN_WRAP_DETECT))) {
+ if (!(txnAutoWrapMode.equals(TXN_WRAP_OFF)
+ || txnAutoWrapMode.equals(TXN_WRAP_ON)
+ || txnAutoWrapMode.equals(TXN_WRAP_DETECT))) {
throw new MetaMatrixProcessingException(CommonCommPlugin.Util.getString("RequestMessage.invalid_txnAutoWrap", txnAutoWrapMode)); //$NON-NLS-1$
}
}
Modified: trunk/client/src/test/java/com/metamatrix/dqp/message/TestRequestMessage.java
===================================================================
--- trunk/client/src/test/java/com/metamatrix/dqp/message/TestRequestMessage.java 2010-03-19 01:45:14 UTC (rev 1976)
+++ trunk/client/src/test/java/com/metamatrix/dqp/message/TestRequestMessage.java 2010-03-19 16:17:09 UTC (rev 1977)
@@ -25,8 +25,6 @@
import java.util.ArrayList;
import java.util.List;
-import org.teiid.plan.api.ExecutionProperties;
-
import junit.framework.TestCase;
import com.metamatrix.api.exception.MetaMatrixProcessingException;
@@ -58,7 +56,7 @@
message.setStyleSheet("myStyleSheet"); //$NON-NLS-1$
message.setExecutionPayload("myExecutionPayload"); //$NON-NLS-1$
try {
- message.setTxnAutoWrapMode(ExecutionProperties.TXN_WRAP_ON);
+ message.setTxnAutoWrapMode(RequestMessage.TXN_WRAP_ON);
} catch (MetaMatrixProcessingException e) {
throw new RuntimeException(e);
}
@@ -85,7 +83,7 @@
assertFalse(copy.isPreparedStatement());
assertEquals("myStyleSheet", copy.getStyleSheet()); //$NON-NLS-1$
assertEquals("myExecutionPayload", copy.getExecutionPayload()); //$NON-NLS-1$
- assertEquals(ExecutionProperties.TXN_WRAP_ON, copy.getTxnAutoWrapMode()); //$NON-NLS-1$
+ assertEquals(RequestMessage.TXN_WRAP_ON, copy.getTxnAutoWrapMode());
assertTrue(copy.getValidationMode());
assertEquals("xMLFormat", copy.getXMLFormat()); //$NON-NLS-1$
assertTrue(copy.getShowPlan());
Modified: trunk/client-jdbc/src/main/java/org/teiid/jdbc/BaseDataSource.java
===================================================================
--- trunk/client-jdbc/src/main/java/org/teiid/jdbc/BaseDataSource.java 2010-03-19 01:45:14 UTC (rev 1976)
+++ trunk/client-jdbc/src/main/java/org/teiid/jdbc/BaseDataSource.java 2010-03-19 16:17:09 UTC (rev 1977)
@@ -32,8 +32,8 @@
import javax.sql.XAConnection;
import javax.sql.XADataSource;
-import org.teiid.plan.api.ExecutionProperties;
+
import com.metamatrix.common.api.MMURL;
import com.metamatrix.dqp.message.RequestMessage;
Modified: trunk/client-jdbc/src/main/java/org/teiid/jdbc/BatchResults.java
===================================================================
--- trunk/client-jdbc/src/main/java/org/teiid/jdbc/BatchResults.java 2010-03-19 01:45:14 UTC (rev 1976)
+++ trunk/client-jdbc/src/main/java/org/teiid/jdbc/BatchResults.java 2010-03-19 16:17:09 UTC (rev 1977)
@@ -32,6 +32,10 @@
* @since 4.3
*/
public class BatchResults {
+
+ public interface BatchFetcher {
+ Batch requestBatch(int beginRow) throws SQLException;
+ }
static class Batch{
private List[] batch;
Modified: trunk/client-jdbc/src/main/java/org/teiid/jdbc/ConnectionImpl.java
===================================================================
--- trunk/client-jdbc/src/main/java/org/teiid/jdbc/ConnectionImpl.java 2010-03-19 01:45:14 UTC (rev 1976)
+++ trunk/client-jdbc/src/main/java/org/teiid/jdbc/ConnectionImpl.java 2010-03-19 16:17:09 UTC (rev 1977)
@@ -57,8 +57,8 @@
import javax.transaction.xa.Xid;
-import org.teiid.plan.api.ExecutionProperties;
+
import com.metamatrix.common.api.MMURL;
import com.metamatrix.common.comm.api.ServerConnection;
import com.metamatrix.common.comm.exception.CommunicationException;
Added: trunk/client-jdbc/src/main/java/org/teiid/jdbc/ExecutionProperties.java
===================================================================
--- trunk/client-jdbc/src/main/java/org/teiid/jdbc/ExecutionProperties.java (rev 0)
+++ trunk/client-jdbc/src/main/java/org/teiid/jdbc/ExecutionProperties.java 2010-03-19 16:17:09 UTC (rev 1977)
@@ -0,0 +1,102 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.jdbc;
+
+import com.metamatrix.dqp.message.RequestMessage;
+
+/**
+ * MetaMatrix-specific execution properties. These execution properties can
+ * be set via the {@link com.metamatrix.jdbc.api.Statement#setExecutionProperty(String, String)}
+ * method. They affect the subsequent execution of all commands on that Statement
+ * instance.
+ */
+public interface ExecutionProperties {
+
+ /** Execution property name for XML format */
+ public static final String PROP_XML_FORMAT = "XMLFormat"; //$NON-NLS-1$
+
+ /** Execution property name for XML validation */
+ public static final String PROP_XML_VALIDATION = "XMLValidation"; //$NON-NLS-1$
+
+ /** Execution property name for transaction auto wrap mode */
+ public static final String PROP_TXN_AUTO_WRAP = "autoCommitTxn"; //$NON-NLS-1$
+
+ /** Execution property name for partial results mode */
+ public static final String PROP_PARTIAL_RESULTS_MODE = "partialResultsMode"; //$NON-NLS-1$
+
+ /** XML results format: XML results displayed as a formatted tree */
+ public static final String XML_TREE_FORMAT = "Tree"; //$NON-NLS-1$
+
+ /** XML results format: XML results displayed in compact form */
+ public static final String XML_COMPACT_FORMAT = "Compact"; //$NON-NLS-1$
+
+ /** Transaction auto wrap constant - never wrap a command execution in a transaction */
+ public static final String TXN_WRAP_OFF = RequestMessage.TXN_WRAP_OFF;
+
+ /** Transaction auto wrap constant - always wrap commands in a transaction. */
+ public static final String TXN_WRAP_ON = RequestMessage.TXN_WRAP_ON;
+
+ /**
+ * Transaction auto wrap constant - checks if a command
+ * requires a transaction and will be automatically wrap it.
+ */
+ public static final String TXN_WRAP_DETECT = RequestMessage.TXN_WRAP_DETECT;
+
+ /**
+ * Whether to use result set cache if it is available
+ * @since 4.2
+ */
+ public static final String RESULT_SET_CACHE_MODE = "resultSetCacheMode"; //$NON-NLS-1$
+
+ /**
+ * Default fetch size to use on Statements if the fetch size is not explicitly set.
+ * The default is 500.
+ * @since 4.2
+ */
+ public static final String PROP_FETCH_SIZE = "fetchSize"; //$NON-NLS-1$
+
+ /**
+ * If true, will ignore autocommit for local transactions.
+ * @since 5.5.2
+ */
+ public static final String DISABLE_LOCAL_TRANSACTIONS = "disableLocalTxn"; //$NON-NLS-1$
+
+ /**
+ * Overrides the handling of double quoted identifiers to allow them to be strings.
+ * @since 4.3
+ */
+ public static final String ANSI_QUOTED_IDENTIFIERS = "ansiQuotedIdentifiers"; //$NON-NLS-1$
+
+ /**
+ * Additional options/hints for executing the command
+ * @since 4.3
+ */
+ public static final String PROP_SQL_OPTIONS = "sqlOptions"; //$NON-NLS-1$
+
+ /**
+ * Passed as an option to PROP_SQL_OPTIONS
+ */
+ public static final String SQL_OPTION_SHOWPLAN = "SHOWPLAN"; //$NON-NLS-1$
+
+}
+
\ No newline at end of file
Modified: trunk/client-jdbc/src/main/java/org/teiid/jdbc/JDBCURL.java
===================================================================
--- trunk/client-jdbc/src/main/java/org/teiid/jdbc/JDBCURL.java 2010-03-19 01:45:14 UTC (rev 1976)
+++ trunk/client-jdbc/src/main/java/org/teiid/jdbc/JDBCURL.java 2010-03-19 16:17:09 UTC (rev 1977)
@@ -29,9 +29,9 @@
import java.util.Map;
import java.util.Properties;
-import org.teiid.plan.api.ExecutionProperties;
+
import com.metamatrix.common.api.MMURL;
Modified: trunk/client-jdbc/src/main/java/org/teiid/jdbc/PreparedStatementImpl.java
===================================================================
--- trunk/client-jdbc/src/main/java/org/teiid/jdbc/PreparedStatementImpl.java 2010-03-19 01:45:14 UTC (rev 1976)
+++ trunk/client-jdbc/src/main/java/org/teiid/jdbc/PreparedStatementImpl.java 2010-03-19 16:17:09 UTC (rev 1977)
@@ -51,8 +51,8 @@
import javax.sql.rowset.serial.SerialBlob;
import javax.sql.rowset.serial.SerialClob;
-import org.teiid.plan.api.ExecutionProperties;
+
import com.metamatrix.api.exception.MetaMatrixComponentException;
import com.metamatrix.api.exception.MetaMatrixProcessingException;
import com.metamatrix.common.types.MMJDBCSQLTypeInfo;
Modified: trunk/client-jdbc/src/main/java/org/teiid/jdbc/ResultSetImpl.java
===================================================================
--- trunk/client-jdbc/src/main/java/org/teiid/jdbc/ResultSetImpl.java 2010-03-19 01:45:14 UTC (rev 1976)
+++ trunk/client-jdbc/src/main/java/org/teiid/jdbc/ResultSetImpl.java 2010-03-19 16:17:09 UTC (rev 1977)
@@ -52,6 +52,7 @@
import java.util.logging.Logger;
import org.teiid.jdbc.BatchResults.Batch;
+import org.teiid.jdbc.BatchResults.BatchFetcher;
import com.metamatrix.api.exception.MetaMatrixComponentException;
import com.metamatrix.api.exception.MetaMatrixProcessingException;
Modified: trunk/client-jdbc/src/main/java/org/teiid/jdbc/StatementImpl.java
===================================================================
--- trunk/client-jdbc/src/main/java/org/teiid/jdbc/StatementImpl.java 2010-03-19 01:45:14 UTC (rev 1976)
+++ trunk/client-jdbc/src/main/java/org/teiid/jdbc/StatementImpl.java 2010-03-19 16:17:09 UTC (rev 1977)
@@ -47,10 +47,10 @@
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-import org.teiid.jdbc.api.Statement;
-import org.teiid.plan.api.Annotation;
-import org.teiid.plan.api.ExecutionProperties;
-import org.teiid.plan.api.PlanNode;
+import org.teiid.jdbc.plan.Annotation;
+import org.teiid.jdbc.plan.Annotation;
+import org.teiid.jdbc.plan.PlanNode;
+import org.teiid.jdbc.plan.PlanNode;
import com.metamatrix.api.exception.MetaMatrixComponentException;
import com.metamatrix.api.exception.MetaMatrixException;
@@ -63,7 +63,7 @@
import com.metamatrix.dqp.message.ResultsMessage;
import com.metamatrix.dqp.message.RequestMessage.ResultsMode;
-public class StatementImpl extends WrapperImpl implements Statement {
+public class StatementImpl extends WrapperImpl implements TeiidStatement {
private static Logger logger = Logger.getLogger("org.teiid.jdbc"); //$NON-NLS-1$
// State constants
@@ -114,7 +114,7 @@
private String debugLog;
// the last query annotations
- private List annotations;
+ private List<Annotation> annotations;
// resultSet object produced by execute methods on the statement.
protected ResultSetImpl resultSet;
@@ -889,7 +889,7 @@
this.debugLog = debugLog;
}
- void setAnnotations(List annotations) {
+ void setAnnotations(List<Annotation> annotations) {
this.annotations = annotations;
}
@@ -909,9 +909,9 @@
}
if(planDescription != null) {
this.currentPlanDescription = planDescription;
- return PlanNodeImpl.constructFromMap(this.currentPlanDescription);
+ return PlanNode.constructFromMap(this.currentPlanDescription);
}else if(this.currentPlanDescription != null) {
- return PlanNodeImpl.constructFromMap(this.currentPlanDescription);
+ return PlanNode.constructFromMap(this.currentPlanDescription);
}
return null;
}
@@ -928,7 +928,7 @@
* Get annotations
* @return Query planner annotations - Collection of Annotation
*/
- public Collection getAnnotations() {
+ public Collection<Annotation> getAnnotations() {
return this.annotations;
}
@@ -958,11 +958,11 @@
this.currentPlanDescription = resultsMsg.getPlanDescription();
Collection serverAnnotations = resultsMsg.getAnnotations();
if(serverAnnotations != null) {
- List annotations = new ArrayList(serverAnnotations.size());
+ List<Annotation> annotations = new ArrayList<Annotation>(serverAnnotations.size());
Iterator annIter = serverAnnotations.iterator();
while(annIter.hasNext()) {
String[] serverAnnotation = (String[]) annIter.next();
- Annotation annotation = new AnnotationImpl(serverAnnotation);
+ Annotation annotation = new Annotation(serverAnnotation);
annotations.add(annotation);
}
this.annotations = annotations;
Copied: trunk/client-jdbc/src/main/java/org/teiid/jdbc/TeiidStatement.java (from rev 1973, trunk/client-jdbc/src/main/java/org/teiid/jdbc/api/Statement.java)
===================================================================
--- trunk/client-jdbc/src/main/java/org/teiid/jdbc/TeiidStatement.java (rev 0)
+++ trunk/client-jdbc/src/main/java/org/teiid/jdbc/TeiidStatement.java 2010-03-19 16:17:09 UTC (rev 1977)
@@ -0,0 +1,115 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.jdbc;
+
+import java.io.IOException;
+import java.io.Reader;
+import java.io.Serializable;
+import java.util.Collection;
+
+import org.teiid.jdbc.plan.Annotation;
+import org.teiid.jdbc.plan.PlanNode;
+
+
+
+/**
+ * This interface provides methods in
+ * addition to the standard JDBC methods.
+ */
+public interface TeiidStatement extends java.sql.Statement {
+
+ /**
+ * Get the execution property value.
+ * @param name Execution property name
+ * @return Execution property value or null if not set
+ */
+ String getExecutionProperty(String name);
+
+ /**
+ * Set the execution property value.
+ * @param name Execution property name
+ * @param value Execution property value
+ */
+ void setExecutionProperty(String name, String value);
+
+ /**
+ * Obtain the query plan object representation from the last
+ * command executed on this Statement, if a query plan was
+ * requested in the command. If no plan was requested, this
+ * method will return null.
+ * @return PlanNode representing the root of the query plan
+ */
+ PlanNode getPlanDescription();
+
+ /**
+ * Obtain the query planner debug log from the last command
+ * executed on this Statement, if it was requested with
+ * OPTION DEBUG. If no debug output was requested, this
+ * method will return null.
+ * @return Debug log or null if no log exists
+ */
+ String getDebugLog();
+
+ /**
+ * Get collection of annotations from the query planner from
+ * the last command executed on the Statement
+ * @return Collection of {@link Annotation}s, may return null
+ */
+ Collection<Annotation> getAnnotations();
+
+ /**
+ * Attach a stylesheet to be applied on the server for XML queries
+ * executed with this Statement.
+ * @param reader Reader for reading a stylesheet in XML
+ * @throws IOException If an error occurs reading the stylesheet
+ * @deprecated
+ */
+ void attachStylesheet(Reader reader) throws IOException;
+
+ /**
+ * Clear any previously attached stylesheet for this Statement object.
+ * @deprecated
+ */
+ void clearStylesheet();
+
+ /**
+ * Get ID for last execution which can be used for matching up executions
+ * on the client side with executions in the server logs.
+ * @return String identifier for the last execution
+ */
+ String getRequestIdentifier();
+
+ /**
+ * Set the per-statement security payload. This optional payload will
+ * accompany each request to the data source(s) so that the connector
+ * will have access to it.
+ *
+ * <p>To remove an existing payload from a statement, call this method
+ * with a <code>null</code> argument.</p>
+ *
+ * @param payload The payload that is to accompany requests executed
+ * from this statement.
+ * @since 4.2
+ */
+ void setPayload(Serializable payload);
+}
Property changes on: trunk/client-jdbc/src/main/java/org/teiid/jdbc/TeiidStatement.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: trunk/client-jdbc/src/main/java/org/teiid/jdbc/plan (from rev 1973, trunk/client/src/main/java/org/teiid/plan/api)
Modified: trunk/client-jdbc/src/main/java/org/teiid/jdbc/plan/Annotation.java
===================================================================
--- trunk/client/src/main/java/org/teiid/plan/api/Annotation.java 2010-03-18 16:18:20 UTC (rev 1973)
+++ trunk/client-jdbc/src/main/java/org/teiid/jdbc/plan/Annotation.java 2010-03-19 16:17:09 UTC (rev 1977)
@@ -20,41 +20,44 @@
* 02110-1301 USA.
*/
-package org.teiid.plan.api;
+package org.teiid.jdbc.plan;
+
/**
- * Annotation from query engine, collected during execution.
*/
-public interface Annotation {
+public class Annotation {
- public static final int LOW = 1;
- public static final int MEDIUM = 2;
- public static final int HIGH = 3;
+ private String category;
+ private String description;
+ private String resolution;
+ private int severity;
- /**
- * Get category of this annotation.
- * @return Category
- */
- public String getCategory();
+ public Annotation(String[] serverAnnotation) {
+ category = serverAnnotation[0];
+ description = serverAnnotation[1];
+ resolution = serverAnnotation[2];
+
+ severity = Integer.parseInt(serverAnnotation[3]);
+ }
+
+ public String getCategory() {
+ return category;
+ }
+
+ public String getAnnotation() {
+ return description;
+ }
+
+ public String getResolution() {
+ return resolution;
+ }
+
+ public int getSeverity() {
+ return severity;
+ }
- /**
- * Get annotation description.
- * @return Annotation description
- */
- public String getAnnotation();
-
- /**
- * Get resolution for annotation. May be null if no resolution is suggested.
- * @return Resolution, or null
- */
- public String getResolution();
-
- /**
- * Get severity of this annotation
- * @return Severity level
- * @see #LOW
- * @see #MEDIUM
- * @see #HIGH
- */
- public int getSeverity();
+ public String toString() {
+ return description;
+ }
+
}
Modified: trunk/client-jdbc/src/main/java/org/teiid/jdbc/plan/DefaultDisplayHelper.java
===================================================================
--- trunk/client/src/main/java/org/teiid/plan/api/DefaultDisplayHelper.java 2010-03-18 16:18:20 UTC (rev 1973)
+++ trunk/client-jdbc/src/main/java/org/teiid/jdbc/plan/DefaultDisplayHelper.java 2010-03-19 16:17:09 UTC (rev 1977)
@@ -20,7 +20,7 @@
* 02110-1301 USA.
*/
-package org.teiid.plan.api;
+package org.teiid.jdbc.plan;
import java.util.ArrayList;
import java.util.List;
@@ -31,47 +31,28 @@
*/
public class DefaultDisplayHelper implements DisplayHelper {
- private static final String OUTPUT_COLS = "outputCols"; //$NON-NLS-1$
- private static final String TYPE = "type"; //$NON-NLS-1$
-
-
- /*
- * @see com.metamatrix.jdbc.api.DisplayHelper#getName(com.metamatrix.jdbc.api.PlanNode)
- */
public String getName(PlanNode node) {
- return (String) node.getProperties().get(TYPE);
+ return (String)node.getProperties().get(PlanNode.TYPE);
}
- /*
- * @see com.metamatrix.jdbc.api.DisplayHelper#getDescription(com.metamatrix.jdbc.api.PlanNode)
- */
public String getDescription(PlanNode node) {
return ""; //$NON-NLS-1$
}
- /*
- * @see com.metamatrix.jdbc.api.DisplayHelper#getOrderedProperties(com.metamatrix.jdbc.api.PlanNode)
- */
- public List getOrderedProperties(PlanNode node) {
- List props = new ArrayList(node.getProperties().keySet());
- props.remove(TYPE);
- if(props.contains(OUTPUT_COLS)) {
- props.remove(OUTPUT_COLS);
- props.add(0, OUTPUT_COLS);
+ public List<String> getOrderedProperties(PlanNode node) {
+ List<String> props = new ArrayList<String>(node.getProperties().keySet());
+ props.remove(PlanNode.TYPE);
+ if(props.contains(PlanNode.OUTPUT_COLS)) {
+ props.remove(PlanNode.OUTPUT_COLS);
+ props.add(0, PlanNode.OUTPUT_COLS);
}
return props;
}
- /*
- * @see com.metamatrix.jdbc.api.DisplayHelper#getPropertyName(java.lang.String)
- */
public String getPropertyName(String property) {
return property;
}
- /*
- * @see com.metamatrix.jdbc.api.DisplayHelper#setMaxDescriptionLength(int)
- */
public void setMaxDescriptionLength(int length) {
}
Modified: trunk/client-jdbc/src/main/java/org/teiid/jdbc/plan/DisplayHelper.java
===================================================================
--- trunk/client/src/main/java/org/teiid/plan/api/DisplayHelper.java 2010-03-18 16:18:20 UTC (rev 1973)
+++ trunk/client-jdbc/src/main/java/org/teiid/jdbc/plan/DisplayHelper.java 2010-03-19 16:17:09 UTC (rev 1977)
@@ -20,7 +20,7 @@
* 02110-1301 USA.
*/
-package org.teiid.plan.api;
+package org.teiid.jdbc.plan;
import java.util.List;
@@ -56,7 +56,7 @@
* @param node The node
* @return List of property names
*/
- List getOrderedProperties(PlanNode node);
+ List<String> getOrderedProperties(PlanNode node);
/**
* Get display name for a particular property name.
Deleted: trunk/client-jdbc/src/main/java/org/teiid/jdbc/plan/ExecutionProperties.java
===================================================================
--- trunk/client/src/main/java/org/teiid/plan/api/ExecutionProperties.java 2010-03-18 16:18:20 UTC (rev 1973)
+++ trunk/client-jdbc/src/main/java/org/teiid/jdbc/plan/ExecutionProperties.java 2010-03-19 16:17:09 UTC (rev 1977)
@@ -1,100 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership. Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package org.teiid.plan.api;
-
-/**
- * MetaMatrix-specific execution properties. These execution properties can
- * be set via the {@link com.metamatrix.jdbc.api.Statement#setExecutionProperty(String, String)}
- * method. They affect the subsequent execution of all commands on that Statement
- * instance.
- */
-public interface ExecutionProperties {
-
- /** Execution property name for XML format */
- public static final String PROP_XML_FORMAT = "XMLFormat"; //$NON-NLS-1$
-
- /** Execution property name for XML validation */
- public static final String PROP_XML_VALIDATION = "XMLValidation"; //$NON-NLS-1$
-
- /** Execution property name for transaction auto wrap mode */
- public static final String PROP_TXN_AUTO_WRAP = "autoCommitTxn"; //$NON-NLS-1$
-
- /** Execution property name for partial results mode */
- public static final String PROP_PARTIAL_RESULTS_MODE = "partialResultsMode"; //$NON-NLS-1$
-
- /** XML results format: XML results displayed as a formatted tree */
- public static final String XML_TREE_FORMAT = "Tree"; //$NON-NLS-1$
-
- /** XML results format: XML results displayed in compact form */
- public static final String XML_COMPACT_FORMAT = "Compact"; //$NON-NLS-1$
-
- /** Transaction auto wrap constant - never wrap a command execution in a transaction */
- public static final String TXN_WRAP_OFF = "OFF"; //$NON-NLS-1$
-
- /** Transaction auto wrap constant - always wrap commands in a transaction. */
- public static final String TXN_WRAP_ON = "ON"; //$NON-NLS-1$
-
- /**
- * Transaction auto wrap constant - checks if a command
- * requires a transaction and will be automatically wrap it.
- */
- public static final String TXN_WRAP_DETECT = "DETECT"; //$NON-NLS-1$
-
- /**
- * Whether to use result set cache if it is available
- * @since 4.2
- */
- public static final String RESULT_SET_CACHE_MODE = "resultSetCacheMode"; //$NON-NLS-1$
-
- /**
- * Default fetch size to use on Statements if the fetch size is not explicitly set.
- * The default is 500.
- * @since 4.2
- */
- public static final String PROP_FETCH_SIZE = "fetchSize"; //$NON-NLS-1$
-
- /**
- * If true, will ignore autocommit for local transactions.
- * @since 5.5.2
- */
- public static final String DISABLE_LOCAL_TRANSACTIONS = "disableLocalTxn"; //$NON-NLS-1$
-
- /**
- * Overrides the handling of double quoted identifiers to allow them to be strings.
- * @since 4.3
- */
- public static final String ANSI_QUOTED_IDENTIFIERS = "ansiQuotedIdentifiers"; //$NON-NLS-1$
-
- /**
- * Additional options/hints for executing the command
- * @since 4.3
- */
- public static final String PROP_SQL_OPTIONS = "sqlOptions"; //$NON-NLS-1$
-
- /**
- * Passed as an option to PROP_SQL_OPTIONS
- */
- public static final String SQL_OPTION_SHOWPLAN = "SHOWPLAN"; //$NON-NLS-1$
-
-}
-
\ No newline at end of file
Modified: trunk/client-jdbc/src/main/java/org/teiid/jdbc/plan/PlanNode.java
===================================================================
--- trunk/client/src/main/java/org/teiid/plan/api/PlanNode.java 2010-03-18 16:18:20 UTC (rev 1973)
+++ trunk/client-jdbc/src/main/java/org/teiid/jdbc/plan/PlanNode.java 2010-03-19 16:17:09 UTC (rev 1977)
@@ -20,37 +20,75 @@
* 02110-1301 USA.
*/
-package org.teiid.plan.api;
+package org.teiid.jdbc.plan;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
-/**
- * Represents one node in a query plan tree. Every node has a list of child nodes
- * and a Map of property name to property value. Property names are always strings
- * and property values should always be Java primitive types such as String, Integer,
- * Boolean, and Lists of those types. In some cases, a property value may itself also be
- * a PlanNode.
- */
-public interface PlanNode {
+public class PlanNode {
- /**
- * Get the parent node for this node.
- * @return Parent node or null if this node is the root
- */
- PlanNode getParent();
+ //TODO: consolidate these constants with Describable
+ public static final String OUTPUT_COLS = "outputCols"; //$NON-NLS-1$
+ public static final String TYPE = "type"; //$NON-NLS-1$
+ static final String PROP_CHILDREN = "children"; //$NON-NLS-1$
+
+ private Map<String, Object> props;
+ private PlanNode parent;
+ private List<PlanNode> children = new ArrayList<PlanNode>();
+
+ PlanNode(Map<String, Object> props) {
+ this.props = props;
+ }
- /**
- * Get the children of this component, which are always of type PlanNode.
- * @return List of PlanNode
- */
- List getChildren();
+ void setParent(PlanNode parent) {
+ this.parent = parent;
+ }
+
+ public PlanNode getParent() {
+ return this.parent;
+ }
+
+ void addChild(PlanNode child) {
+ children.add(child);
+ }
+
+ public List<PlanNode> getChildren() {
+ return this.children;
+ }
+
+ public Map<String, Object> getProperties() {
+ return this.props;
+ }
- /**
- * Get the properties for this component. Property names are always String.
- * Property values are typically String, Integer, Boolean, a List of one of
- * those primitive types, or another PlanNode in rare cases.
- */
- Map getProperties();
-
+ public static PlanNode constructFromMap(Map properties) {
+ // Construct node without child property
+ Map copy = new HashMap(properties);
+ List childMaps = (List) copy.remove(PROP_CHILDREN);
+
+ // Convert any subplans to PlanNodes as well
+ Iterator keyIter = copy.keySet().iterator();
+ while(keyIter.hasNext()) {
+ Object key = keyIter.next();
+ Object value = copy.get(key);
+ if(value instanceof Map) {
+ copy.put(key, constructFromMap((Map)value));
+ }
+ }
+
+ // Construct this node
+ PlanNode node = new PlanNode(copy);
+
+ // Then construct children and connect
+ if(childMaps != null) {
+ for(int i=0; i<childMaps.size(); i++) {
+ Map childMap = (Map) childMaps.get(i);
+ PlanNode child = constructFromMap(childMap);
+ child.setParent(node);
+ node.addChild(child);
+ }
+ }
+
+ // And return
+ return node;
+ }
+
}
Modified: trunk/client-jdbc/src/main/java/org/teiid/jdbc/plan/PlanVisitor.java
===================================================================
--- trunk/client/src/main/java/org/teiid/plan/api/PlanVisitor.java 2010-03-18 16:18:20 UTC (rev 1973)
+++ trunk/client-jdbc/src/main/java/org/teiid/jdbc/plan/PlanVisitor.java 2010-03-19 16:17:09 UTC (rev 1977)
@@ -20,7 +20,7 @@
* 02110-1301 USA.
*/
-package org.teiid.plan.api;
+package org.teiid.jdbc.plan;
import java.util.Collection;
import java.util.LinkedList;
@@ -50,12 +50,12 @@
* @param rootNode The rootNode of the tree
*/
public void visit(PlanNode rootNode) {
- LinkedList nodeStack = new LinkedList();
+ LinkedList<PlanNode> nodeStack = new LinkedList<PlanNode>();
nodeStack.add(rootNode);
while(! nodeStack.isEmpty()) {
// Obtain next node
- PlanNode node = (PlanNode) nodeStack.removeFirst();
+ PlanNode node = nodeStack.removeFirst();
// Visit node
visitNode(node);
Deleted: trunk/client-jdbc/src/main/java/org/teiid/jdbc/plan/QueryPlanDisplayHelper.java
===================================================================
--- trunk/client/src/main/java/org/teiid/plan/api/QueryPlanDisplayHelper.java 2010-03-18 16:18:20 UTC (rev 1973)
+++ trunk/client-jdbc/src/main/java/org/teiid/jdbc/plan/QueryPlanDisplayHelper.java 2010-03-19 16:17:09 UTC (rev 1977)
@@ -1,517 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership. Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package org.teiid.plan.api;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.TreeMap;
-
-
-
-/**
- *
- */
-public class QueryPlanDisplayHelper implements DisplayHelper {
-
- //Maps containing display values by type
- private Map nodeNameMap = new TreeMap();
- private Map childTypeMap = new TreeMap();
- private Map descriptionMap = new TreeMap();
- private Map propertyOrderMap = new TreeMap();
- private Map propertyNameMap = new TreeMap();
-
- /**
- * Default constructor
- */
- public QueryPlanDisplayHelper() {
- init();
- }
-
- /**
- *
- */
- private void init() {
- /*
- * Node Name Mappings - to change node name for display
- */
- nodeNameMap.put("Child Relational Plan", "Relational Plan"); //$NON-NLS-1$ //$NON-NLS-2$
- nodeNameMap.put("Child XML Plan", "XML Plan"); //$NON-NLS-1$ //$NON-NLS-2$
- nodeNameMap.put("COMMENT", "ADD COMMENT"); //$NON-NLS-1$ //$NON-NLS-2$
-
- childTypeMap.put("Relational Plan", "Child Relational Plan"); //$NON-NLS-1$ //$NON-NLS-2$
- childTypeMap.put("XML Plan", "Child XML Plan"); //$NON-NLS-1$ //$NON-NLS-2$
-
- /*
- * Description Mapping logic
- */
- descriptionMap.put("Join", "${joinType} ON ${joinCriteria}"); //$NON-NLS-1$ //$NON-NLS-2$
- descriptionMap.put("Project", "${selectCols}"); //$NON-NLS-1$ //$NON-NLS-2$
- descriptionMap.put("Select", "${criteria}"); //$NON-NLS-1$ //$NON-NLS-2$
- descriptionMap.put("Access", "${sql}"); //$NON-NLS-1$ //$NON-NLS-2$
- descriptionMap.put("EXECUTE SQL", "${sql}"); //$NON-NLS-1$ //$NON-NLS-2$
- descriptionMap.put("LOOP", "${joinType} ON ${joinCriteria}"); //$NON-NLS-1$ //$NON-NLS-2$
- descriptionMap.put("Join", "${joinType} ON ${joinCriteria}"); //$NON-NLS-1$ //$NON-NLS-2$
- descriptionMap.put("Limit", "${rowLimit}"); //$NON-NLS-1$ //$NON-NLS-2$
- descriptionMap.put("Offset", "${rowOffset}"); //$NON-NLS-1$ //$NON-NLS-2$
-
- /*
- * Property Order logic
- */
-
- putPropertySortOrder("default", new String[] { "outputCols"}); //$NON-NLS-1$ //$NON-NLS-2$
- putPropertySortOrder("Access", new String[] { "outputCols", "sql", "modelName"}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- putPropertySortOrder("Group", new String[] { "outputCols", "groupCols"}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- putPropertySortOrder("Join", new String[] { "outputCols", "joinType", "joinCriteria"}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- putPropertySortOrder("Merge Join", new String[] { "outputCols", "joinType", "joinCriteria"}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- putPropertySortOrder("Plan Execution", new String[] { "outputCols", "execPlan"}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- putPropertySortOrder("Project Into", new String[] { "outputCols", "intoGrp", "selectCols"}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- putPropertySortOrder("Project", new String[] { "outputCols", "selectCols"}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- putPropertySortOrder("Dependent Project", new String[] { "outputCols", "selectCols"}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- putPropertySortOrder("Select", new String[] { "outputCols", "criteria"}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- putPropertySortOrder("Dependent Select", new String[] { "outputCols", "criteria"}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- putPropertySortOrder("Sort", new String[] { "outputCols", "sortCols", "removeDups"}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- putPropertySortOrder("Limit", new String[] { "outputCols", "rowLimit"}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- putPropertySortOrder("Offset", new String[] { "outputCols", "rowOffset"}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-
- putPropertySortOrder("ABORT", new String[] { "message" }); //$NON-NLS-1$ //$NON-NLS-2$
- putPropertySortOrder("ADD COMMENT", new String[] { "message" }); //$NON-NLS-1$ //$NON-NLS-2$
- putPropertySortOrder("ADD ELEMENT", new String[] { "tag", "optional", "dataCol", "namespace", "namespaceDeclarations", "default" }); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$
- putPropertySortOrder("ADD ATTRIBUTE", new String[] { "tag", "dataCol", "namespace", "default" }); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
- putPropertySortOrder("CACHE", new String[] { }); //$NON-NLS-1$
- putPropertySortOrder("UNCACHE", new String[] { }); //$NON-NLS-1$
- putPropertySortOrder("CLOSE RESULTSET", new String[] { "resultSet" }); //$NON-NLS-1$ //$NON-NLS-2$
- putPropertySortOrder("END DOCUMENT", new String[] { }); //$NON-NLS-1$
- putPropertySortOrder("EXECUTE SQL", new String[] { "resultSet", "sql", "isStaging", "inMemory", "group", "program" }); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$
- putPropertySortOrder("CHOICE", new String[] { "conditions", "programs", "defaultProgram" }); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- putPropertySortOrder("START DOCUMENT", new String[] { "encoding", "formatted" }); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- putPropertySortOrder("NEXT ROW", new String[] { "resultSet" }); //$NON-NLS-1$ //$NON-NLS-2$
- putPropertySortOrder("DOCUMENT UP", new String[] { }); //$NON-NLS-1$
- putPropertySortOrder("DOCUMENT DOWN", new String[] { }); //$NON-NLS-1$
- putPropertySortOrder("NO OP", new String[] { }); //$NON-NLS-1$
- putPropertySortOrder("ASSIGN REFERENCE", new String[] { "expression" }); //$NON-NLS-1$ //$NON-NLS-2$
- putPropertySortOrder("LOOP", new String[] { "resultSet", "program" }); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-
- putPropertySortOrder("ASSIGNMENT", new String[] { "variable", "expression", "program" }); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- putPropertySortOrder("BREAK", new String[] { }); //$NON-NLS-1$
- putPropertySortOrder("CONTINUE", new String[] { }); //$NON-NLS-1$
- putPropertySortOrder("CREATE CURSOR", new String[] { "resultSet", "sql" }); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- putPropertySortOrder("DECLARE VARIABLE", new String[] { "variable"}); //$NON-NLS-1$ //$NON-NLS-2$
- putPropertySortOrder("IF", new String[] { "criteria", "then", "else" }); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- putPropertySortOrder("RAISE ERROR", new String[] { "message" }); //$NON-NLS-1$ //$NON-NLS-2$
- putPropertySortOrder("WHILE", new String[] { "criteria", "program" }); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-
- /*
- * Property Name logic
- */
- propertyNameMap.put("outputCols", "Output Columns"); //$NON-NLS-1$ //$NON-NLS-2$
- propertyNameMap.put("criteria", "Criteria"); //$NON-NLS-1$ //$NON-NLS-2$
- propertyNameMap.put("selectCols", "Select Columns"); //$NON-NLS-1$ //$NON-NLS-2$
- propertyNameMap.put("groupCols", "Grouping Columns"); //$NON-NLS-1$ //$NON-NLS-2$
- propertyNameMap.put("sql", "Source Query"); //$NON-NLS-1$ //$NON-NLS-2$
- propertyNameMap.put("modelName", "Model Name"); //$NON-NLS-1$ //$NON-NLS-2$
- propertyNameMap.put("joinType", "Join Type"); //$NON-NLS-1$ //$NON-NLS-2$
- propertyNameMap.put("joinCriteria", "Join Criteria"); //$NON-NLS-1$ //$NON-NLS-2$
- propertyNameMap.put("joinStrategy", "Join Strategy"); //$NON-NLS-1$ //$NON-NLS-2$
- propertyNameMap.put("execPlan", "Execution Plan"); //$NON-NLS-1$ //$NON-NLS-2$
- propertyNameMap.put("intoGrp", "Select Into Group"); //$NON-NLS-1$ //$NON-NLS-2$
- propertyNameMap.put("sortCols", "Sort Columns"); //$NON-NLS-1$ //$NON-NLS-2$
- propertyNameMap.put("removeDups", "Remove Duplicates"); //$NON-NLS-1$ //$NON-NLS-2$
- propertyNameMap.put("message", "Message"); //$NON-NLS-1$ //$NON-NLS-2$
- propertyNameMap.put("tag", "XML Node Name"); //$NON-NLS-1$ //$NON-NLS-2$
- propertyNameMap.put("namespace", "Namespace"); //$NON-NLS-1$ //$NON-NLS-2$
- propertyNameMap.put("dataCol", "Data Column"); //$NON-NLS-1$ //$NON-NLS-2$
- propertyNameMap.put("namespaceDeclarations", "Namespace Declarations"); //$NON-NLS-1$ //$NON-NLS-2$
- propertyNameMap.put("optional", "Optional Flag"); //$NON-NLS-1$ //$NON-NLS-2$
- propertyNameMap.put("default", "Default Value"); //$NON-NLS-1$ //$NON-NLS-2$
- propertyNameMap.put("program", "Sub Program"); //$NON-NLS-1$ //$NON-NLS-2$
- propertyNameMap.put("recurseDir", "Recursion Direction"); //$NON-NLS-1$ //$NON-NLS-2$
- propertyNameMap.put("resultSet", "Result Set"); //$NON-NLS-1$ //$NON-NLS-2$
- propertyNameMap.put("bindings", "Bindings"); //$NON-NLS-1$ //$NON-NLS-2$
- propertyNameMap.put("isStaging", "Is Staging Flag"); //$NON-NLS-1$ //$NON-NLS-2$
- propertyNameMap.put("inMemory", "Source In Memory Flag"); //$NON-NLS-1$ //$NON-NLS-2$
- propertyNameMap.put("conditions", "Conditions"); //$NON-NLS-1$ //$NON-NLS-2$
- propertyNameMap.put("programs", "Sub Programs"); //$NON-NLS-1$ //$NON-NLS-2$
- propertyNameMap.put("defaultProgram", "Default Programs"); //$NON-NLS-1$ //$NON-NLS-2$
- propertyNameMap.put("encoding", "Encoding"); //$NON-NLS-1$ //$NON-NLS-2$
- propertyNameMap.put("formatted", "Formatting Flag"); //$NON-NLS-1$ //$NON-NLS-2$
- propertyNameMap.put("expression", "Expression"); //$NON-NLS-1$ //$NON-NLS-2$
- propertyNameMap.put("variable", "Variable"); //$NON-NLS-1$ //$NON-NLS-2$
- propertyNameMap.put("group", "Group"); //$NON-NLS-1$ //$NON-NLS-2$
- propertyNameMap.put("then", "Then"); //$NON-NLS-1$ //$NON-NLS-2$
- propertyNameMap.put("else", "Else"); //$NON-NLS-1$ //$NON-NLS-2$
- propertyNameMap.put("nodeStatistics", "Statistics"); //$NON-NLS-1$ //$NON-NLS-2$
- propertyNameMap.put("nodeCostEstimates", "Cost Estimates"); //$NON-NLS-1$ //$NON-NLS-2$
- propertyNameMap.put("rowLimit", "Row Limit"); //$NON-NLS-1$ //$NON-NLS-2$
- propertyNameMap.put("rowOffset", "Row Offset"); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * Put property sort order for a particular type in the workOrderMap
- * @param type The node type
- * @param propOrder Sorted list of property names
- * @since 5.0
- */
- private void putPropertySortOrder(String type, String[] propOrder) {
- NodeProperty[] nodeProps = new NodeProperty[propOrder.length];
- for(int i=0; i<propOrder.length; i++) {
- nodeProps[i] = new NodeProperty(new Integer(i), type, propOrder[i]);
- }
- propertyOrderMap.put(type, nodeProps);
- }
-
- /**
- *
- */
- public String getName(PlanNode node)
- {
- String name = (String) node.getProperties().get("type"); //$NON-NLS-1$
-
- /*
- * here we check to see if the type was null. If it was null, no need to look for a null key in the tree map.
- */
- if (name != null) {
- if(nodeNameMap.containsKey(name)) {
- name = (String)nodeNameMap.get(name);
- }
- } else {
- name = "Node"; //$NON-NLS-1$
- }
-
- name+=getDescription(node);
-
- return name;
- }
-
- /**
- *
- */
- public String getDescription(PlanNode node)
- {
- Map nodeProps = node.getProperties();
- String description = ""; //$NON-NLS-1$
-
- // String nodeName="";
- String type = (String)nodeProps.get("type"); //$NON-NLS-1$
- if (type != null) {
- description = (String)nodeProps.get("desc"); //$NON-NLS-1$
-
- if (description == null || description.equals("")) //$NON-NLS-1$
- {
- description = (String)descriptionMap.get(type);
- }
- }
-
- if (description == null || description.trim().length() == 0) {
- description = ""; //$NON-NLS-1$
- } else {
- description = replaceProperties(description.trim(), nodeProps).trim();
- if (description.length() > 0 ) {
- description = " [" + description + "]"; //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- return description;
- }
-
- private String replaceProperties(String descriptionExpression, Map nodeProps) {
- int startIndex = descriptionExpression.indexOf('$');
- if (startIndex < 0) {
- return descriptionExpression;
- }
- int endIndex = descriptionExpression.indexOf('}');
- if (endIndex < 0) {
- return descriptionExpression;
- }
- String propertyName = descriptionExpression.substring(startIndex+2, endIndex).trim();
- Object descriptionObject = nodeProps.get(propertyName);
- String replacement = ""; //$NON-NLS-1$
- if (descriptionObject != null) {
- if (descriptionObject instanceof Collection) {
- replacement = stringifyCollection((Collection)descriptionObject);
- } else {
- replacement = descriptionObject.toString();
- }
- }
- descriptionExpression = descriptionExpression.substring(0, startIndex)
- + replacement
- + ((endIndex < descriptionExpression.length() - 1)
- ? descriptionExpression.substring(endIndex + 1)
- : ""); //$NON-NLS-1$
- return replaceProperties(descriptionExpression, nodeProps);
- }
-
- private String stringifyCollection(Collection collection) {
- Iterator iterator = collection.iterator();
- if (iterator.hasNext()) {
- StringBuffer buffer = new StringBuffer(iterator.next().toString());
- while(iterator.hasNext()) {
- buffer.append(", ").append(iterator.next().toString()); //$NON-NLS-1$
- }
- return buffer.toString();
- }
- return ""; //$NON-NLS-1$
- }
-
- /**
- *
- */
- public String getType(PlanNode node)
- {
- Map nodeProps = node.getProperties();
- String type = (String) nodeProps.get("type"); //$NON-NLS-1$
- if (type==null)
- {
- type=""; //$NON-NLS-1$
- }
- if (node.getParent() != null) {
- if (childTypeMap.get(type) != null) {
- return (String)childTypeMap.get(type);
- }
- }
- return type;
- }
-
- /**
- *
- */
- public Map getOrderedPropertiesMap(PlanNode node)
- {
- /* This methods returns a Map of Maps that represents the passed node's
- * properties in sorted order. The key for the main map is an Integer
- * value representing the sequence no. It's value is a Map that uses property
- * name/type for its key and the properties description for its value.
- */
-
- //Create key array for this node's properties
- Object[] nodeTypeKeySetArray=node.getProperties().keySet().toArray();
-
- //Set the map variable for this nope's properties.
- Map nodeProperties = node.getProperties();
-
- //Set the type variable for this node
- String nodeType=(String)node.getProperties().get("type"); //$NON-NLS-1$
-
- //Create key array for the master properties ordered map
- Object[] orderedPropArray = propertyOrderMap.keySet().toArray();
-
- //Create an iterator for the master map
- Iterator orderedPropIterator = propertyOrderMap.values().iterator();
-
- Map propertiesOrdered=new TreeMap();
- //Map propertiesMap=new HashMap();
- NodeProperty[] nodeProps=null;
-
- int count = 0;
-
- if (nodeType != null) {
- // Loop through master map, find the current nodes ordered set, and add
- // to our Map of Maps.
- for (int i = 0; i < orderedPropArray.length; i++) {
- String orderedPropKey = (String)orderedPropArray[i];
- nodeProps = (NodeProperty[])orderedPropIterator.next();
- if (!(nodeType.equalsIgnoreCase(orderedPropKey))) {
- continue;
- }// Else we found our nodes ordered set
-
- for (int j = 0; j < nodeProps.length; j++) {
- String nodeProp = nodeProps[j].getValue();
-
- if (nodeProperties.get(nodeProp) == null) {
- // We don't have an instance of this property for
- // this node so just go to the next one.
- } else {
- Map prop = new HashMap();
- prop.put(nodeProp, nodeProperties.get(nodeProp));
- propertiesOrdered.put(new Integer(j), prop);
- count = j;
-
- }
- }
- }
-
- if (propertiesOrdered.size() < node.getProperties().size()) {
- // We need to append missing properties to the ordered properties map.
- // This would happen when the node has properties that aren't listed
- // in the master ordered properties map.
- ArrayList addKeys = new ArrayList();
- for (int i = 0; i < node.getProperties().size(); i++) {
- Iterator propIter = null;
- propIter = propertiesOrdered.values().iterator();
- boolean containsKey = false;
- for (int k = 0; k < propertiesOrdered.size(); k++) {
- Map propEntry = (Map)propIter.next();
- if (propEntry.containsKey(nodeTypeKeySetArray[i])) {
- //The property has already been added
- containsKey = true;
- break;
- }
- }
- if (!containsKey) {
- addKeys.add(nodeTypeKeySetArray[i]);
- }
- }
-
- for (int i = 0; i < addKeys.size(); i++) {
- count++;
- Map prop = new HashMap();
- prop.put(addKeys.get(i), node.getProperties().get(addKeys.get(i)));
- propertiesOrdered.put(new Integer(count), prop);
- }
- }
- }
-
- return propertiesOrdered;
- }
-
- /**
- * This methods returns a List of sorted property names.
- */
- public List getOrderedProperties(PlanNode node)
- {
- Map orderPropMap = getOrderedPropertiesMap(node);
- Iterator mapIter = orderPropMap.keySet().iterator();
- List orderPropList=new ArrayList();
-
- while (mapIter.hasNext())
- {
- Object key = mapIter.next();
- Map valueMap = (Map) orderPropMap.get(key);
- String propName = (String) valueMap.keySet().iterator().next();
- if(!propName.equals("type") && !propName.equals("desc")) { //$NON-NLS-1$ //$NON-NLS-2$
- orderPropList.add(propName);
- }
- }
-
- return orderPropList;
- }
-
- /**
- *
- */
- public void setMaxDescriptionLength(int maxLength)
- {
- //does nothing
- }
-
- /**
- *
- */
- public String getProperty(String property)
- {
- String propertyDisplay=(String)propertyNameMap.get(property);
-
- if (propertyDisplay==null)
- {
- propertyDisplay=property;
- }
- return propertyDisplay;
- }
-
- /**
- *
- */
- public String getPropertyName(String property)
- {
- String propertyDisplay=(String)propertyNameMap.get(property);
-
- if (propertyDisplay==null)
- {
- propertyDisplay=property;
- }
- return propertyDisplay;
- }
-
-
- /* Node property inner class used for storing properties
- * to sort for the PropertyOrderMap
- */
- private class NodeProperty
- {
- Integer seqNo = null;
- String name = ""; //$NON-NLS-1$
- String value = ""; //$NON-NLS-1$
-
- public NodeProperty(Integer seqNo,
- String name,
- String value)
- {
- this.seqNo = seqNo;
- this.name = name;
- this.value = value;
- }
- /**
- * @return
- */
- public String getName()
- {
- return name;
- }
-
- /**
- * @return
- */
- public Integer getSeqNo()
- {
- return seqNo;
- }
-
- /**
- * @return
- */
- public String getValue()
- {
- return value;
- }
-
- /**
- * @param string
- */
- public void setName(String string)
- {
- name = string;
- }
-
- /**
- * @param integer
- */
- public void setSeqNo(Integer integer)
- {
- seqNo = integer;
- }
-
- /**
- * @param string
- */
- public void setValue(String string)
- {
- value = string;
- }
-
- }
-
- /* End of Node property inner class */
-}
Modified: trunk/client-jdbc/src/main/java/org/teiid/jdbc/plan/TextOutputVisitor.java
===================================================================
--- trunk/client/src/main/java/org/teiid/plan/api/TextOutputVisitor.java 2010-03-18 16:18:20 UTC (rev 1973)
+++ trunk/client-jdbc/src/main/java/org/teiid/jdbc/plan/TextOutputVisitor.java 2010-03-19 16:17:09 UTC (rev 1977)
@@ -20,7 +20,7 @@
* 02110-1301 USA.
*/
-package org.teiid.plan.api;
+package org.teiid.jdbc.plan;
import java.util.Collection;
import java.util.HashMap;
Modified: trunk/client-jdbc/src/main/java/org/teiid/jdbc/plan/XMLOutputVisitor.java
===================================================================
--- trunk/client/src/main/java/org/teiid/plan/api/XMLOutputVisitor.java 2010-03-18 16:18:20 UTC (rev 1973)
+++ trunk/client-jdbc/src/main/java/org/teiid/jdbc/plan/XMLOutputVisitor.java 2010-03-19 16:17:09 UTC (rev 1977)
@@ -20,7 +20,7 @@
* 02110-1301 USA.
*/
-package org.teiid.plan.api;
+package org.teiid.jdbc.plan;
import java.util.Collection;
import java.util.HashMap;
Modified: trunk/client-jdbc/src/test/java/org/teiid/jdbc/TestBatchResults.java
===================================================================
--- trunk/client-jdbc/src/test/java/org/teiid/jdbc/TestBatchResults.java 2010-03-19 01:45:14 UTC (rev 1976)
+++ trunk/client-jdbc/src/test/java/org/teiid/jdbc/TestBatchResults.java 2010-03-19 16:17:09 UTC (rev 1977)
@@ -29,9 +29,8 @@
import java.util.List;
import org.junit.Test;
-import org.teiid.jdbc.BatchFetcher;
-import org.teiid.jdbc.BatchResults;
import org.teiid.jdbc.BatchResults.Batch;
+import org.teiid.jdbc.BatchResults.BatchFetcher;
/**
Modified: trunk/client-jdbc/src/test/java/org/teiid/jdbc/TestEmbeddedProfile.java
===================================================================
--- trunk/client-jdbc/src/test/java/org/teiid/jdbc/TestEmbeddedProfile.java 2010-03-19 01:45:14 UTC (rev 1976)
+++ trunk/client-jdbc/src/test/java/org/teiid/jdbc/TestEmbeddedProfile.java 2010-03-19 16:17:09 UTC (rev 1977)
@@ -28,7 +28,6 @@
import java.util.Properties;
import org.junit.Test;
-import org.teiid.plan.api.ExecutionProperties;
Modified: trunk/client-jdbc/src/test/java/org/teiid/jdbc/TestMMDriver.java
===================================================================
--- trunk/client-jdbc/src/test/java/org/teiid/jdbc/TestMMDriver.java 2010-03-19 01:45:14 UTC (rev 1976)
+++ trunk/client-jdbc/src/test/java/org/teiid/jdbc/TestMMDriver.java 2010-03-19 16:17:09 UTC (rev 1977)
@@ -25,8 +25,8 @@
import java.sql.DriverPropertyInfo;
import java.util.Properties;
-import org.teiid.plan.api.ExecutionProperties;
+
import junit.framework.TestCase;
import com.metamatrix.common.api.MMURL;
Copied: trunk/client-jdbc/src/test/java/org/teiid/jdbc/TestMMJDBCURL.java (from rev 1976, trunk/client-jdbc/src/test/java/org/teiid/jdbc/util/TestMMJDBCURL.java)
===================================================================
--- trunk/client-jdbc/src/test/java/org/teiid/jdbc/TestMMJDBCURL.java (rev 0)
+++ trunk/client-jdbc/src/test/java/org/teiid/jdbc/TestMMJDBCURL.java 2010-03-19 16:17:09 UTC (rev 1977)
@@ -0,0 +1,342 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.jdbc;
+
+import java.net.URLEncoder;
+import java.util.Properties;
+
+import org.teiid.jdbc.BaseDataSource;
+import org.teiid.jdbc.ExecutionProperties;
+import org.teiid.jdbc.JDBCURL;
+
+import junit.framework.TestCase;
+
+import com.metamatrix.common.api.MMURL;
+
+
+/**
+ * @since 4.3
+ */
+public class TestMMJDBCURL extends TestCase {
+
+ // Need to allow embedded spaces and ='s within optional properties
+ public final void testCredentials() throws Exception {
+ String credentials = URLEncoder.encode("defaultToLogon,(system=BQT1 SQL Server 2000 Simple Cap,user=xyz,password=xyz)", "UTF-8"); //$NON-NLS-1$ //$NON-NLS-2$
+ JDBCURL url = new JDBCURL("jdbc:metamatrix:QT_sqls2kds at mm://slwxp136:43100;credentials="+credentials); //$NON-NLS-1$
+ Properties p = url.getProperties();
+ assertEquals("defaultToLogon,(system=BQT1 SQL Server 2000 Simple Cap,user=xyz,password=xyz)", p.getProperty("credentials")); //$NON-NLS-1$//$NON-NLS-2$
+ }
+
+ public void testJDBCURLWithProperties() {
+ String URL = "jdbc:metamatrix:bqt at mm://localhost:12345;version=1;user=xyz;password=***;logLevel=1;configFile=testdata/bqt/dqp_stmt_e2e.xmi;disableLocalTxn=true;autoFailover=false"; //$NON-NLS-1$
+
+ Properties expectedProperties = new Properties();
+ expectedProperties.setProperty("version", "1"); //$NON-NLS-1$ //$NON-NLS-2$
+ expectedProperties.setProperty("user", "xyz"); //$NON-NLS-1$ //$NON-NLS-2$
+ expectedProperties.setProperty("password", "***"); //$NON-NLS-1$ //$NON-NLS-2$
+ expectedProperties.setProperty("logLevel", "1"); //$NON-NLS-1$ //$NON-NLS-2$
+ expectedProperties.setProperty("configFile", "testdata/bqt/dqp_stmt_e2e.xmi"); //$NON-NLS-1$ //$NON-NLS-2$
+ expectedProperties.setProperty(ExecutionProperties.DISABLE_LOCAL_TRANSACTIONS, "true"); //$NON-NLS-1$
+ expectedProperties.setProperty(MMURL.CONNECTION.AUTO_FAILOVER, "false"); //$NON-NLS-1$
+ JDBCURL url = new JDBCURL(URL);
+ assertEquals("bqt", url.getVDBName()); //$NON-NLS-1$
+ assertEquals("mm://localhost:12345", url.getConnectionURL()); //$NON-NLS-1$
+ assertEquals(expectedProperties, url.getProperties());
+ }
+
+ public void testJDBCURLWithoutProperties() {
+ String URL = "jdbc:metamatrix:bqt at mm://localhost:12345"; //$NON-NLS-1$
+
+ JDBCURL url = new JDBCURL(URL);
+ assertEquals("bqt", url.getVDBName()); //$NON-NLS-1$
+ assertEquals("mm://localhost:12345", url.getConnectionURL()); //$NON-NLS-1$
+ assertEquals(new Properties(), url.getProperties());
+ }
+
+ public void testCaseConversion() {
+ // Different case ------------------------------------HERE -v ----------------and HERE -v
+ String URL = "jdbc:metamatrix:bqt at mm://localhost:12345;VERSION=1;user=xyz;password=***;configFile=testdata/bqt/dqp_stmt_e2e.xmi"; //$NON-NLS-1$
+
+ Properties expectedProperties = new Properties();
+ expectedProperties.setProperty("version", "1"); //$NON-NLS-1$ //$NON-NLS-2$
+ expectedProperties.setProperty("user", "xyz"); //$NON-NLS-1$ //$NON-NLS-2$
+ expectedProperties.setProperty("password", "***"); //$NON-NLS-1$ //$NON-NLS-2$
+ expectedProperties.setProperty("configFile", "testdata/bqt/dqp_stmt_e2e.xmi"); //$NON-NLS-1$ //$NON-NLS-2$
+ JDBCURL url = new JDBCURL(URL);
+ assertEquals("bqt", url.getVDBName()); //$NON-NLS-1$
+ assertEquals("mm://localhost:12345", url.getConnectionURL()); //$NON-NLS-1$
+ assertEquals(expectedProperties, url.getProperties());
+ }
+
+ public void testWithExtraSemicolons() {
+ String URL = "jdbc:metamatrix:bqt at mm://localhost:12345;version=1;user=xyz;password=***;logLevel=1;;;configFile=testdata/bqt/dqp_stmt_e2e.xmi;;"; //$NON-NLS-1$
+
+ Properties expectedProperties = new Properties();
+ expectedProperties.setProperty("version", "1"); //$NON-NLS-1$ //$NON-NLS-2$
+ expectedProperties.setProperty("user", "xyz"); //$NON-NLS-1$ //$NON-NLS-2$
+ expectedProperties.setProperty("password", "***"); //$NON-NLS-1$ //$NON-NLS-2$
+ expectedProperties.setProperty("logLevel", "1"); //$NON-NLS-1$ //$NON-NLS-2$
+ expectedProperties.setProperty("configFile", "testdata/bqt/dqp_stmt_e2e.xmi"); //$NON-NLS-1$ //$NON-NLS-2$
+ JDBCURL url = new JDBCURL(URL);
+ assertEquals("bqt", url.getVDBName()); //$NON-NLS-1$
+ assertEquals("mm://localhost:12345", url.getConnectionURL()); //$NON-NLS-1$
+ assertEquals(expectedProperties, url.getProperties());
+ }
+
+ public void testWithWhitespace() {
+ String URL = "jdbc:metamatrix:bqt at mm://localhost:12345; version =1;user= xyz ;password=***; logLevel = 1 ; configFile=testdata/bqt/dqp_stmt_e2e.xmi ;"; //$NON-NLS-1$
+
+ Properties expectedProperties = new Properties();
+ expectedProperties.setProperty("version", "1"); //$NON-NLS-1$ //$NON-NLS-2$
+ expectedProperties.setProperty("user", "xyz"); //$NON-NLS-1$ //$NON-NLS-2$
+ expectedProperties.setProperty("password", "***"); //$NON-NLS-1$ //$NON-NLS-2$
+ expectedProperties.setProperty("logLevel", "1"); //$NON-NLS-1$ //$NON-NLS-2$
+ expectedProperties.setProperty("configFile", "testdata/bqt/dqp_stmt_e2e.xmi"); //$NON-NLS-1$ //$NON-NLS-2$
+ JDBCURL url = new JDBCURL(URL);
+ assertEquals("bqt", url.getVDBName()); //$NON-NLS-1$
+ assertEquals("mm://localhost:12345", url.getConnectionURL()); //$NON-NLS-1$
+ assertEquals(expectedProperties, url.getProperties());
+ }
+
+ public void testNoPropertyValue() {
+ String URL = "jdbc:metamatrix:bqt at mm://localhost:12345;version=1;user=xyz;password=***;logLevel=;configFile="; //$NON-NLS-1$
+
+ Properties expectedProperties = new Properties();
+ expectedProperties.setProperty("version", "1"); //$NON-NLS-1$ //$NON-NLS-2$
+ expectedProperties.setProperty("user", "xyz"); //$NON-NLS-1$ //$NON-NLS-2$
+ expectedProperties.setProperty("password", "***"); //$NON-NLS-1$ //$NON-NLS-2$
+ expectedProperties.setProperty("logLevel", ""); //$NON-NLS-1$ //$NON-NLS-2$
+ expectedProperties.setProperty("configFile", ""); //$NON-NLS-1$ //$NON-NLS-2$
+ JDBCURL url = new JDBCURL(URL);
+ assertEquals("bqt", url.getVDBName()); //$NON-NLS-1$
+ assertEquals("mm://localhost:12345", url.getConnectionURL()); //$NON-NLS-1$
+ assertEquals(expectedProperties, url.getProperties());
+ }
+
+ public void testInvalidProtocol() {
+ String URL = "jdbc:monkeymatrix:bqt at mm://localhost:12345;version=1;user=xyz;password=***;logLevel=1"; //$NON-NLS-1$
+ try {
+ new JDBCURL(URL);
+ fail("Illegal argument should have failed."); //$NON-NLS-1$
+ } catch (IllegalArgumentException e) {
+ // expected
+ }
+ }
+
+ public void testNoVDBName() {
+ String URL = "jdbc:metamatrix:@mm://localhost:12345;version=1;user=xyz;password=***;logLevel=1"; //$NON-NLS-1$
+ try {
+ new JDBCURL(URL);
+ fail("Illegal argument should have failed."); //$NON-NLS-1$
+ } catch (IllegalArgumentException e) {
+ // expected
+ }
+ }
+
+ public void testNoAtSignInURL() {
+ String URL = "jdbc:metamatrix:bqt!mm://localhost:12345;version=1;user=xyz;password=***;logLevel=1"; //$NON-NLS-1$
+ try {
+ new JDBCURL(URL);
+ // No @ sign is llowed as part of embedded driver now,
+ // but this form of URL rejected in the acceptURL
+ //fail("Illegal argument should have failed.");
+ } catch (IllegalArgumentException e) {
+ // expected
+ }
+ }
+
+ public void testMoreThanOneAtSign() {
+ String URL = "jdbc:metamatrix:bqt at mm://localhost:12345;version=1;user=xy@;password=***;logLevel=1"; //$NON-NLS-1$
+ try {
+ // this allowed as customer properties can have @ in their properties
+ new JDBCURL(URL);
+ } catch (IllegalArgumentException e) {
+ // expected
+ }
+ }
+
+ public void testNoEqualsInProperty() {
+ String URL = "jdbc:metamatrix:bqt at mm://localhost:12345;version=1;user=xyz;password***;logLevel=1"; //$NON-NLS-1$
+ try {
+ new JDBCURL(URL);
+ fail("Illegal argument should have failed."); //$NON-NLS-1$
+ } catch (IllegalArgumentException e) {
+ // expected
+ }
+ }
+
+ public void testMoreThanOneEqualsInProperty() {
+ String URL = "jdbc:metamatrix:bqt at mm://localhost:12345;version=1;user=xyz;password==***;logLevel=1"; //$NON-NLS-1$
+ try {
+ new JDBCURL(URL);
+ fail("Illegal argument should have failed."); //$NON-NLS-1$
+ } catch (IllegalArgumentException e) {
+ // expected
+ }
+ URL = "jdbc:metamatrix:bqt at mm://localhost:12345;version=1;user=xyz;password=***=;logLevel=1"; //$NON-NLS-1$
+ try {
+ new JDBCURL(URL);
+ fail("Illegal argument should have failed."); //$NON-NLS-1$
+ } catch (IllegalArgumentException e) {
+ // expected
+ }
+ URL = "jdbc:metamatrix:bqt at mm://localhost:12345;version=1;user=xyz;=password=***;logLevel=1"; //$NON-NLS-1$
+ try {
+ new JDBCURL(URL);
+ fail("Illegal argument should have failed."); //$NON-NLS-1$
+ } catch (IllegalArgumentException e) {
+ // expected
+ }
+ }
+
+ public void testNoKeyInProperty() {
+ String URL = "jdbc:metamatrix:bqt at mm://localhost:12345;version=1;user=xyz;=***;logLevel=1"; //$NON-NLS-1$
+ try {
+ new JDBCURL(URL);
+ fail("Illegal argument should have failed."); //$NON-NLS-1$
+ } catch (IllegalArgumentException e) {
+ // expected
+ }
+ }
+
+ public void testConstructor() {
+ JDBCURL url = new JDBCURL("myVDB", "mm://myhost:12345",null); //$NON-NLS-1$ //$NON-NLS-2$
+ assertEquals("jdbc:teiid:myVDB at mm://myhost:12345", url.getJDBCURL()); //$NON-NLS-1$
+
+ Properties props = new Properties();
+ props.setProperty(BaseDataSource.USER_NAME, "myuser"); //$NON-NLS-1$
+ props.setProperty(BaseDataSource.PASSWORD, "mypassword"); //$NON-NLS-1$
+ props.put("ClieNTtOKeN", new Integer(1)); //$NON-NLS-1$
+ url = new JDBCURL("myVDB", "mm://myhost:12345", props); //$NON-NLS-1$ //$NON-NLS-2$
+ assertEquals("jdbc:teiid:myVDB at mm://myhost:12345;user=myuser;password=mypassword", url.getJDBCURL()); //$NON-NLS-1$
+ }
+
+ public void testConstructor_Exception() {
+ try {
+ new JDBCURL(null, "myhost", null); //$NON-NLS-1$
+ fail("Should have failed."); //$NON-NLS-1$
+ } catch (Exception e) {
+
+ }
+ try {
+ new JDBCURL(" ", "myhost", null); //$NON-NLS-1$ //$NON-NLS-2$
+ fail("Should have failed."); //$NON-NLS-1$
+ } catch (Exception e) {
+
+ }
+
+ try {
+ // in embedded situation there is no connection url
+ new JDBCURL("myVDB", " ", null); //$NON-NLS-1$ //$NON-NLS-2$
+ } catch (Exception e) {
+
+ }
+ }
+
+ public void testNormalize() {
+ Properties props = new Properties();
+ props.setProperty("UsEr", "myuser"); //$NON-NLS-1$ //$NON-NLS-2$
+ props.setProperty("pAssWOrD", "mypassword"); //$NON-NLS-1$ //$NON-NLS-2$
+ props.put("ClieNTtOKeN", new Integer(1)); //$NON-NLS-1$
+ JDBCURL.normalizeProperties(props);
+ assertEquals("myuser", props.getProperty(BaseDataSource.USER_NAME)); //$NON-NLS-1$
+ assertEquals("mypassword", props.getProperty(BaseDataSource.PASSWORD)); //$NON-NLS-1$
+ }
+
+ public final void testEncodedPropertyProperties() throws Exception {
+ String password = "=@#^&*()+!%$^%@#_-)_~{}||\\`':;,./<>?password has = & %"; //$NON-NLS-1$
+ Properties props = new Properties();
+ props.setProperty("UsEr", "foo"); //$NON-NLS-1$ //$NON-NLS-2$
+ props.setProperty("PASswoRd", password); //$NON-NLS-1$
+ JDBCURL.normalizeProperties(props);
+
+ assertEquals(password, props.getProperty("password")); //$NON-NLS-1$
+ assertEquals("foo", props.getProperty("user")); //$NON-NLS-1$//$NON-NLS-2$
+ }
+
+ public final void testEncodedPropertyInURL() throws Exception {
+ String password = "=@#^&*()+!%$^%@#_-)_~{}||\\`':;,./<>?password has = & %"; //$NON-NLS-1$
+ String encPassword = URLEncoder.encode(password, "UTF-8"); //$NON-NLS-1$
+ JDBCURL url = new JDBCURL("jdbc:metamatrix:QT_sqls2kds at mm://slwxp136:43100;PASswoRd="+encPassword); //$NON-NLS-1$
+ Properties p = url.getProperties();
+ assertEquals(password, p.getProperty("password")); //$NON-NLS-1$
+ }
+
+
+ public void testGetServerURL_NoProperties() {
+ String result = new JDBCURL("jdbc:metamatrix:designtimecatalog at mm://slwxp172:44401;user=ddifranco;password=mm").getConnectionURL(); //$NON-NLS-1$
+ assertEquals("mm://slwxp172:44401", result); //$NON-NLS-1$
+ }
+
+ public void testGetServerURL_Properties() {
+ String result = new JDBCURL("jdbc:metamatrix:designtimecatalog at mm://slwxp172:44401;user=ddifranco;password=mm").getConnectionURL(); //$NON-NLS-1$
+ assertEquals("mm://slwxp172:44401", result); //$NON-NLS-1$
+ }
+
+ /**
+ * Test getServerURL with a valid URL and password that contains at least
+ * one ASCII character in the range of 32 to 126 excluding the ; and = sign.
+ *
+ * @since 5.0.2
+ */
+ public void testGetServerURL_PasswordProperties() throws Exception {
+ String result = null;
+ String srcURL = "jdbc:metamatrix:designtimecatalog at mm://slwxp172:44401;user=ddifranco;password="; //$NON-NLS-1$
+ String password = null;
+ String tgtURL = "mm://slwxp172:44401"; //$NON-NLS-1$
+
+
+ for ( char ch = 32; ch <= 126; ch++ ) {
+ //exclude URL reserved characters
+ if ( ch != ';' && ch != '=' && ch != '%') {
+ password = ch+"mm"; //$NON-NLS-1$
+ result = new JDBCURL(srcURL+URLEncoder.encode(password, "UTF-8")).getConnectionURL(); //$NON-NLS-1$
+ assertEquals("Failed to obtain correct ServerURL when using password "+password,tgtURL, result); //$NON-NLS-1$
+ }
+ }
+
+ }
+
+ public void testGetServerURL_2Servers() {
+ String result = new JDBCURL("jdbc:metamatrix:designtimecatalog at mm://slwxp172:44401,slabc123:12345;user=ddifranco;password=mm").getConnectionURL(); //$NON-NLS-1$
+ assertEquals("mm://slwxp172:44401,slabc123:12345", result); //$NON-NLS-1$
+ }
+
+ public void testBuildEmbeedURL() {
+ JDBCURL url = new JDBCURL("vdb", "/home/foo/deploy.properties", new Properties()); //$NON-NLS-1$ //$NON-NLS-2$
+ assertEquals("jdbc:teiid:vdb@/home/foo/deploy.properties", url.getJDBCURL()); //$NON-NLS-1$
+
+ Properties p = new Properties();
+ p.setProperty("user", "test"); //$NON-NLS-1$ //$NON-NLS-2$
+ p.setProperty("password", "pass"); //$NON-NLS-1$ //$NON-NLS-2$
+ p.setProperty("autoFailover", "true"); //$NON-NLS-1$ //$NON-NLS-2$
+ p.setProperty("any", "thing"); //$NON-NLS-1$ //$NON-NLS-2$
+
+ url = new JDBCURL("vdb", "/home/foo/deploy.properties", p); //$NON-NLS-1$ //$NON-NLS-2$
+ assertTrue(url.getJDBCURL().startsWith("jdbc:teiid:vdb@/home/foo/deploy.properties;user=test;")); //$NON-NLS-1$
+ assertTrue(url.getJDBCURL().indexOf("any=thing")!=-1); //$NON-NLS-1$
+ assertTrue(url.getJDBCURL().indexOf("password=pass")!=-1); //$NON-NLS-1$
+ assertTrue(url.getJDBCURL().indexOf("autoFailover=true")!=-1); //$NON-NLS-1$
+
+ }
+}
Modified: trunk/client-jdbc/src/test/java/org/teiid/jdbc/TestSocketProfile.java
===================================================================
--- trunk/client-jdbc/src/test/java/org/teiid/jdbc/TestSocketProfile.java 2010-03-19 01:45:14 UTC (rev 1976)
+++ trunk/client-jdbc/src/test/java/org/teiid/jdbc/TestSocketProfile.java 2010-03-19 16:17:09 UTC (rev 1977)
@@ -29,7 +29,6 @@
import java.util.Properties;
import org.junit.Test;
-import org.teiid.plan.api.ExecutionProperties;
import com.metamatrix.common.api.MMURL;
Modified: trunk/client-jdbc/src/test/java/org/teiid/jdbc/TestTeiidDataSource.java
===================================================================
--- trunk/client-jdbc/src/test/java/org/teiid/jdbc/TestTeiidDataSource.java 2010-03-19 01:45:14 UTC (rev 1976)
+++ trunk/client-jdbc/src/test/java/org/teiid/jdbc/TestTeiidDataSource.java 2010-03-19 16:17:09 UTC (rev 1977)
@@ -29,7 +29,6 @@
import org.teiid.jdbc.BaseDataSource;
import org.teiid.jdbc.TeiidDataSource;
-import org.teiid.plan.api.ExecutionProperties;
import junit.framework.TestCase;
Deleted: trunk/client-jdbc/src/test/java/org/teiid/jdbc/api/FakeDisplayHelper.java
===================================================================
--- trunk/client-jdbc/src/test/java/org/teiid/jdbc/api/FakeDisplayHelper.java 2010-03-19 01:45:14 UTC (rev 1976)
+++ trunk/client-jdbc/src/test/java/org/teiid/jdbc/api/FakeDisplayHelper.java 2010-03-19 16:17:09 UTC (rev 1977)
@@ -1,88 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership. Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package org.teiid.jdbc.api;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.teiid.plan.api.DisplayHelper;
-import org.teiid.plan.api.PlanNode;
-
-
-/**
- */
-public class FakeDisplayHelper implements DisplayHelper {
-
- /**
- *
- */
- public FakeDisplayHelper() {
- super();
- }
-
- /*
- * @see com.metamatrix.jdbc.plan.DisplayHelper#getName(com.metamatrix.jdbc.plan.PlanNode)
- */
- public String getName(PlanNode node) {
- return (String) node.getProperties().get(FakePlanNode.PROP_TYPE);
- }
-
- /*
- * @see com.metamatrix.jdbc.plan.DisplayHelper#getDescription(com.metamatrix.jdbc.plan.PlanNode)
- */
- public String getDescription(PlanNode node) {
- return (String) node.getProperties().get(FakePlanNode.PROP_DESCRIPTION);
- }
-
- /*
- * @see com.metamatrix.jdbc.plan.DisplayHelper#getOrderedProperties(com.metamatrix.jdbc.plan.PlanNode)
- */
- public List getOrderedProperties(PlanNode node) {
- List props = new ArrayList(node.getProperties().keySet());
- props.remove(FakePlanNode.PROP_TYPE);
- props.remove(FakePlanNode.PROP_DESCRIPTION);
- if(props.contains(FakePlanNode.PROP_OUTPUT_COLS)) {
- props.remove(FakePlanNode.PROP_OUTPUT_COLS);
- props.add(0, FakePlanNode.PROP_OUTPUT_COLS);
- }
- return props;
- }
-
- /*
- * @see com.metamatrix.jdbc.plan.DisplayHelper#getPropertyName(java.lang.String)
- */
- public String getPropertyName(String property) {
- if(property.equals(FakePlanNode.PROP_OUTPUT_COLS)) {
- return "Output columns"; //$NON-NLS-1$
- }
- return property;
- }
-
- /*
- * @see com.metamatrix.jdbc.plan.DisplayHelper#setMaxDescriptionLength(int)
- */
- public void setMaxDescriptionLength(int length) {
- // ignore
- }
-
-}
Deleted: trunk/client-jdbc/src/test/java/org/teiid/jdbc/api/FakePlanNode.java
===================================================================
--- trunk/client-jdbc/src/test/java/org/teiid/jdbc/api/FakePlanNode.java 2010-03-19 01:45:14 UTC (rev 1976)
+++ trunk/client-jdbc/src/test/java/org/teiid/jdbc/api/FakePlanNode.java 2010-03-19 16:17:09 UTC (rev 1977)
@@ -1,87 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership. Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package org.teiid.jdbc.api;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.teiid.plan.api.PlanNode;
-
-
-/**
- */
-public class FakePlanNode implements PlanNode {
-
- public static final String PROP_TYPE = "type"; //$NON-NLS-1$
- public static final String PROP_DESCRIPTION = "desc"; //$NON-NLS-1$
- public static final String PROP_OUTPUT_COLS = "outputCols"; //$NON-NLS-1$
-
- private PlanNode parent;
- private Map props = new HashMap();
- private List children = new ArrayList();
-
- /**
- *
- */
- public FakePlanNode(String type, String description) {
- super();
- this.props.put(PROP_TYPE, type);
- this.props.put(PROP_DESCRIPTION, description);
- }
-
- public void setParent(PlanNode parent) {
- this.parent = parent;
- }
-
- /*
- * @see com.metamatrix.jdbc.plan.PlanNode#getParent()
- */
- public PlanNode getParent() {
- return this.parent;
- }
-
- public void addChild(PlanNode child) {
- this.children.add(child);
- }
-
- /*
- * @see com.metamatrix.jdbc.plan.PlanNode#getChildren()
- */
- public List getChildren() {
- return this.children;
- }
-
- public void setProperty(String prop, Object value) {
- this.props.put(prop, value);
- }
-
- /*
- * @see com.metamatrix.jdbc.plan.PlanNode#getProperties()
- */
- public Map getProperties() {
- return this.props;
- }
-
-}
Deleted: trunk/client-jdbc/src/test/java/org/teiid/jdbc/api/TestQueryPlanDisplayHelper.java
===================================================================
--- trunk/client-jdbc/src/test/java/org/teiid/jdbc/api/TestQueryPlanDisplayHelper.java 2010-03-19 01:45:14 UTC (rev 1976)
+++ trunk/client-jdbc/src/test/java/org/teiid/jdbc/api/TestQueryPlanDisplayHelper.java 2010-03-19 16:17:09 UTC (rev 1977)
@@ -1,105 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership. Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package org.teiid.jdbc.api;
-
-import java.util.Arrays;
-import java.util.Map;
-
-import org.teiid.plan.api.QueryPlanDisplayHelper;
-
-import junit.framework.TestCase;
-
-
-/**
- */
-public class TestQueryPlanDisplayHelper extends TestCase {
-
- public TestQueryPlanDisplayHelper(String name) {
- super(name);
- }
-
- private QueryPlanDisplayHelper loadHelper() throws Exception {
- QueryPlanDisplayHelper helper = new QueryPlanDisplayHelper();
-
- return helper;
- }
-
- public void testGetNameWNullType() throws Exception{
-
- FakePlanNode plan = (FakePlanNode)TestTextOutputVisitor.example2();
-
- Map nodeProps = plan.getProperties();
- /*
- * test with a null plan type. This is a test to combat defect # 18009
- */
- nodeProps.put("type",null); //$NON-NLS-1$
-
- QueryPlanDisplayHelper helper = loadHelper();
-
- String name = helper.getName(plan);
- assertEquals("Node", name); //$NON-NLS-1$
- }
-
-
- public void testGetDescriptionWNullType() throws Exception{
-
- FakePlanNode plan = (FakePlanNode)TestTextOutputVisitor.example2();
-
- Map nodeProps = plan.getProperties();
- /*
- * test with a null plan type. This is a test to combat defect # 18009
- */
- nodeProps.put("type",null); //$NON-NLS-1$
-
- QueryPlanDisplayHelper helper = loadHelper();
-
- String desc = helper.getDescription(plan);
- assertEquals("", desc); //$NON-NLS-1$
- }
-
- public void testGetNameNullDescription() throws Exception {
- QueryPlanDisplayHelper helper = loadHelper();
-
- FakePlanNode node = new FakePlanNode("Access", null); //$NON-NLS-1$
- node.setProperty("sql", "SELECT A, B, C FROM MYTABLE"); //$NON-NLS-1$ //$NON-NLS-2$
- assertEquals("Access [SELECT A, B, C FROM MYTABLE]", helper.getName(node)); //$NON-NLS-1$
-
- node = new FakePlanNode("Join", null); //$NON-NLS-1$
- node.setProperty("joinType", "LEFT OUTER JOIN"); //$NON-NLS-1$ //$NON-NLS-2$
- node.setProperty("joinCriteria", Arrays.asList(new String[] {"A.B = B.B"})); //$NON-NLS-1$ //$NON-NLS-2$
- assertEquals("Join [LEFT OUTER JOIN ON A.B = B.B]", helper.getName(node)); //$NON-NLS-1$
-
- node = new FakePlanNode("Project", null); //$NON-NLS-1$
- node.setProperty("selectCols", Arrays.asList(new String[] {"a", "b", "c"})); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- assertEquals("Project [a, b, c]", helper.getName(node)); //$NON-NLS-1$
- }
-
- public void testGetName() throws Exception {
- QueryPlanDisplayHelper helper = loadHelper();
-
- FakePlanNode node = new FakePlanNode("Access", "Access Node Description"); //$NON-NLS-1$ //$NON-NLS-2$
- node.setProperty("sql", "SELECT A, B, C FROM MYTABLE"); //$NON-NLS-1$ //$NON-NLS-2$
- assertEquals("Access [Access Node Description]", helper.getName(node)); //$NON-NLS-1$
- }
-
-}
Deleted: trunk/client-jdbc/src/test/java/org/teiid/jdbc/api/TestTextOutputVisitor.java
===================================================================
--- trunk/client-jdbc/src/test/java/org/teiid/jdbc/api/TestTextOutputVisitor.java 2010-03-19 01:45:14 UTC (rev 1976)
+++ trunk/client-jdbc/src/test/java/org/teiid/jdbc/api/TestTextOutputVisitor.java 2010-03-19 16:17:09 UTC (rev 1977)
@@ -1,141 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership. Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package org.teiid.jdbc.api;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.teiid.plan.api.PlanNode;
-import org.teiid.plan.api.QueryPlanDisplayHelper;
-import org.teiid.plan.api.TextOutputVisitor;
-
-import junit.framework.TestCase;
-
-
-/**
- */
-public class TestTextOutputVisitor extends TestCase {
-
- /**
- * Constructor for TestTextOutputVisitor.
- * @param name
- */
- public TestTextOutputVisitor(String name) {
- super(name);
- }
-
- public static PlanNode example1() {
- FakePlanNode n1 = new FakePlanNode("Relational Plan", ""); //$NON-NLS-1$ //$NON-NLS-2$
- List outputCols = new ArrayList();
- outputCols.add("Name (string)"); //$NON-NLS-1$
- outputCols.add("Year (integer)"); //$NON-NLS-1$
- outputCols.add("Age (integer)"); //$NON-NLS-1$
- n1.setProperty(FakePlanNode.PROP_OUTPUT_COLS, outputCols);
-
- FakePlanNode n2 = new FakePlanNode("Project", "Name, Year, YEAR(CURDATE()) - year AS Age"); //$NON-NLS-1$ //$NON-NLS-2$
- outputCols = new ArrayList();
- outputCols.add("Name (string)"); //$NON-NLS-1$
- outputCols.add("Year (integer)"); //$NON-NLS-1$
- n2.setProperty(FakePlanNode.PROP_OUTPUT_COLS, outputCols);
-
- FakePlanNode n3 = new FakePlanNode("Join", "Item JOIN History"); //$NON-NLS-1$ //$NON-NLS-2$
- outputCols = new ArrayList();
- outputCols.add("Name (string)"); //$NON-NLS-1$
- outputCols.add("Year (integer)"); //$NON-NLS-1$
- n3.setProperty(FakePlanNode.PROP_OUTPUT_COLS, outputCols);
- n3.setProperty("Join Type", "INNER JOIN"); //$NON-NLS-1$ //$NON-NLS-2$
- List crits = new ArrayList();
- crits.add("Item.ID = History.ID"); //$NON-NLS-1$
- n3.setProperty("Criteria", crits); //$NON-NLS-1$
-
- connectNodes(n1,n2);
- connectNodes(n2,n3);
-
- return n1;
- }
-
- public static PlanNode example2() {
- FakePlanNode n = new FakePlanNode("test", ""); //$NON-NLS-1$ //$NON-NLS-2$
- n.setProperty("string", "string"); //$NON-NLS-1$ //$NON-NLS-2$
- n.setProperty("integer", new Integer(0)); //$NON-NLS-1$
- n.setProperty("boolean", Boolean.TRUE); //$NON-NLS-1$
- List list1 = new ArrayList();
- list1.add("item1"); //$NON-NLS-1$
- list1.add("item2"); //$NON-NLS-1$
- list1.add("item3"); //$NON-NLS-1$
- n.setProperty("list<string>", list1); //$NON-NLS-1$
-
- return n;
- }
-
- public static void connectNodes(FakePlanNode parent, FakePlanNode child) {
- parent.addChild(child);
- child.setParent(parent);
- }
-
- public void testTypicalExample() {
- PlanNode plan = example1();
- TextOutputVisitor v = new TextOutputVisitor(new FakeDisplayHelper(), 0);
- v.visit(plan);
- }
-
- public void testCommonTypes() {
- PlanNode plan = example2();
- TextOutputVisitor v = new TextOutputVisitor(new FakeDisplayHelper(), 0);
- v.visit(plan);
- }
-
- public void testNestedNode() {
- PlanNode plan = example2();
- plan.getProperties().put("nested", example1()); //$NON-NLS-1$
- TextOutputVisitor v = new TextOutputVisitor(new FakeDisplayHelper(), 0);
- v.visit(plan);
- }
-
- public void testLimitNode() {
- FakePlanNode node = new FakePlanNode("Limit", ""); //$NON-NLS-1$ //$NON-NLS-2$
- List outputCols = new ArrayList();
- outputCols.add("Name (string)"); //$NON-NLS-1$
- outputCols.add("Year (integer)"); //$NON-NLS-1$
- outputCols.add("Age (integer)"); //$NON-NLS-1$
- node.setProperty(FakePlanNode.PROP_OUTPUT_COLS, outputCols);
- node.setProperty("rowLimit", "100"); //$NON-NLS-1$ //$NON-NLS-2$
- TextOutputVisitor v = new TextOutputVisitor(new QueryPlanDisplayHelper(), 0);
- v.visit(node);
- assertEquals("Limit [100]\n + Output Columns:\n 1: Name (string)\n 2: Year (integer)\n 3: Age (integer)\n + Row Limit: 100\n", v.getText()); //$NON-NLS-1$
- }
-
- public void testOffsetNode() {
- FakePlanNode node = new FakePlanNode("Offset", ""); //$NON-NLS-1$ //$NON-NLS-2$
- List outputCols = new ArrayList();
- outputCols.add("Name (string)"); //$NON-NLS-1$
- outputCols.add("Year (integer)"); //$NON-NLS-1$
- outputCols.add("Age (integer)"); //$NON-NLS-1$
- node.setProperty(FakePlanNode.PROP_OUTPUT_COLS, outputCols);
- node.setProperty("rowOffset", "100"); //$NON-NLS-1$ //$NON-NLS-2$
- TextOutputVisitor v = new TextOutputVisitor(new QueryPlanDisplayHelper(), 0);
- v.visit(node);
- assertEquals("Offset [100]\n + Output Columns:\n 1: Name (string)\n 2: Year (integer)\n 3: Age (integer)\n + Row Offset: 100\n", v.getText()); //$NON-NLS-1$
- }
-
-}
Deleted: trunk/client-jdbc/src/test/java/org/teiid/jdbc/api/TestXMLOutputVisitor.java
===================================================================
--- trunk/client-jdbc/src/test/java/org/teiid/jdbc/api/TestXMLOutputVisitor.java 2010-03-19 01:45:14 UTC (rev 1976)
+++ trunk/client-jdbc/src/test/java/org/teiid/jdbc/api/TestXMLOutputVisitor.java 2010-03-19 16:17:09 UTC (rev 1977)
@@ -1,90 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership. Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package org.teiid.jdbc.api;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.teiid.plan.api.PlanNode;
-import org.teiid.plan.api.QueryPlanDisplayHelper;
-import org.teiid.plan.api.XMLOutputVisitor;
-
-import junit.framework.TestCase;
-
-
-/**
- */
-public class TestXMLOutputVisitor extends TestCase {
-
- /**
- * Constructor for TestXMLOutputVisitor.
- * @param name
- */
- public TestXMLOutputVisitor(String name) {
- super(name);
- }
-
- public void testTypicalExample() {
- PlanNode plan = TestTextOutputVisitor.example1();
- XMLOutputVisitor v = new XMLOutputVisitor(new FakeDisplayHelper());
- v.visit(plan);
- }
-
- public void testCommonTypes() {
- PlanNode plan = TestTextOutputVisitor.example2();
- XMLOutputVisitor v = new XMLOutputVisitor(new FakeDisplayHelper());
- v.visit(plan);
- }
-
- public void testNestedNode() {
- PlanNode plan = TestTextOutputVisitor.example2();
- plan.getProperties().put("nested", TestTextOutputVisitor.example1()); //$NON-NLS-1$
- XMLOutputVisitor v = new XMLOutputVisitor(new FakeDisplayHelper());
- v.visit(plan);
- }
-
- public void testLimitNode() {
- FakePlanNode node = new FakePlanNode("Limit", ""); //$NON-NLS-1$ //$NON-NLS-2$
- List outputCols = new ArrayList();
- outputCols.add("Name (string)"); //$NON-NLS-1$
- outputCols.add("Year (integer)"); //$NON-NLS-1$
- outputCols.add("Age (integer)"); //$NON-NLS-1$
- node.setProperty(FakePlanNode.PROP_OUTPUT_COLS, outputCols);
- node.setProperty("rowLimit", "100"); //$NON-NLS-1$ //$NON-NLS-2$
- XMLOutputVisitor v = new XMLOutputVisitor(new QueryPlanDisplayHelper());
- v.visit(node);
- assertEquals("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<node name=\"Limit [100]\">\n <properties>\n <property name=\"Output Columns\">\n <collection>\n <value>Name (string)</value>\n <value>Year (integer)</value>\n <value>Age (integer)</value>\n </collection>\n </property>\n <property name=\"Row Limit\" value=\"100\"/>\n </properties>\n</node>\n", v.getText()); //$NON-NLS-1$
- }
- public void testOffsetNode() {
- FakePlanNode node = new FakePlanNode("Offset", ""); //$NON-NLS-1$ //$NON-NLS-2$
- List outputCols = new ArrayList();
- outputCols.add("Name (string)"); //$NON-NLS-1$
- outputCols.add("Year (integer)"); //$NON-NLS-1$
- outputCols.add("Age (integer)"); //$NON-NLS-1$
- node.setProperty(FakePlanNode.PROP_OUTPUT_COLS, outputCols);
- node.setProperty("rowOffset", "100"); //$NON-NLS-1$ //$NON-NLS-2$
- XMLOutputVisitor v = new XMLOutputVisitor(new QueryPlanDisplayHelper());
- v.visit(node);
- assertEquals("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<node name=\"Offset [100]\">\n <properties>\n <property name=\"Output Columns\">\n <collection>\n <value>Name (string)</value>\n <value>Year (integer)</value>\n <value>Age (integer)</value>\n </collection>\n </property>\n <property name=\"Row Offset\" value=\"100\"/>\n </properties>\n</node>\n", v.getText()); //$NON-NLS-1$
- }
-}
Copied: trunk/client-jdbc/src/test/java/org/teiid/jdbc/plan/TestTextOutputVisitor.java (from rev 1973, trunk/client-jdbc/src/test/java/org/teiid/jdbc/api/TestTextOutputVisitor.java)
===================================================================
--- trunk/client-jdbc/src/test/java/org/teiid/jdbc/plan/TestTextOutputVisitor.java (rev 0)
+++ trunk/client-jdbc/src/test/java/org/teiid/jdbc/plan/TestTextOutputVisitor.java 2010-03-19 16:17:09 UTC (rev 1977)
@@ -0,0 +1,80 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.jdbc.plan;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+
+import junit.framework.TestCase;
+
+
+/**
+ */
+public class TestTextOutputVisitor extends TestCase {
+
+ /**
+ * Constructor for TestTextOutputVisitor.
+ * @param name
+ */
+ public TestTextOutputVisitor(String name) {
+ super(name);
+ }
+
+ public static PlanNode example1() {
+ HashMap<String, Object> map = new HashMap<String, Object>();
+ map.put(PlanNode.TYPE, "x"); //$NON-NLS-1$
+ map.put("test", ""); //$NON-NLS-1$ //$NON-NLS-2$
+ map.put("string", "string"); //$NON-NLS-1$ //$NON-NLS-2$
+ map.put("integer", new Integer(0)); //$NON-NLS-1$
+ map.put("boolean", Boolean.TRUE); //$NON-NLS-1$
+ List list1 = new ArrayList();
+ list1.add("item1"); //$NON-NLS-1$
+ list1.add("item2"); //$NON-NLS-1$
+ list1.add("item3"); //$NON-NLS-1$
+ map.put("list<string>", list1); //$NON-NLS-1$
+
+ HashMap<String, Object> child = new HashMap<String, Object>();
+ child.put(PlanNode.TYPE, "y"); //$NON-NLS-1$
+ List<String> outputCols = new ArrayList<String>();
+ outputCols.add("Name (string)"); //$NON-NLS-1$
+ outputCols.add("Year (integer)"); //$NON-NLS-1$
+ child.put(PlanNode.OUTPUT_COLS, outputCols);
+ child.put("Join Type", "INNER JOIN"); //$NON-NLS-1$ //$NON-NLS-2$
+ List<String> crits = new ArrayList<String>();
+ crits.add("Item.ID = History.ID"); //$NON-NLS-1$
+ child.put("Criteria", crits); //$NON-NLS-1$
+
+ map.put(PlanNode.PROP_CHILDREN, Arrays.asList(child));
+
+ return PlanNode.constructFromMap(map);
+ }
+
+ public void testWithDefaultDisplayHelper() {
+ TextOutputVisitor v = new TextOutputVisitor(new DefaultDisplayHelper(), 0);
+ v.visit(example1());
+ assertEquals("x\n + test: \n + integer: 0\n + string: string\n + list<string>:\n 1: item1\n 2: item2\n 3: item3\n + boolean: true\n y\n + outputCols:\n 1: Name (string)\n 2: Year (integer)\n + Join Type: INNER JOIN\n + Criteria:\n 1: Item.ID = History.ID\n", v.getText()); //$NON-NLS-1$
+ }
+
+}
Copied: trunk/client-jdbc/src/test/java/org/teiid/jdbc/plan/TestXMLOutputVisitor.java (from rev 1973, trunk/client-jdbc/src/test/java/org/teiid/jdbc/api/TestXMLOutputVisitor.java)
===================================================================
--- trunk/client-jdbc/src/test/java/org/teiid/jdbc/plan/TestXMLOutputVisitor.java (rev 0)
+++ trunk/client-jdbc/src/test/java/org/teiid/jdbc/plan/TestXMLOutputVisitor.java 2010-03-19 16:17:09 UTC (rev 1977)
@@ -0,0 +1,42 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.jdbc.plan;
+
+import junit.framework.TestCase;
+
+
+/**
+ */
+public class TestXMLOutputVisitor extends TestCase {
+
+ public TestXMLOutputVisitor(String name) {
+ super(name);
+ }
+
+ public void testWithDefaultDisplayHelper() {
+ XMLOutputVisitor v = new XMLOutputVisitor(new DefaultDisplayHelper());
+ v.visit(TestTextOutputVisitor.example1());
+ assertEquals("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<node name=\"x\">\n <properties>\n <property name=\"test\" value=\"\"/>\n <property name=\"integer\" value=\"0\"/>\n <property name=\"string\" value=\"string\"/>\n <property name=\"list<string>\">\n <collection>\n <value>item1</value>\n <value>item2</value>\n <value>item3</value>\n </collection>\n </property>\n <property name=\"boolean\" value=\"true\"/>\n </properties>\n <node name=\"y\">\n <properties>\n <property name=\"outputCols\">\n <collection>\n <value>Name (string)</value>\n <value>Year (integer)</value>\n </collection>\n </property>\n <property name=\"Join Type\" value=\"INNER JOIN\"/>\n <property name=\"Criteria\">\n <collection>\n <value>Item.ID = History.ID</value>\n </collection>\n </property>\n </properties>\n </node>\n</node>\n", v.getText()); //$NON-!
NLS-1$
+ }
+
+}
Deleted: trunk/client-jdbc/src/test/java/org/teiid/jdbc/util/TestMMJDBCURL.java
===================================================================
--- trunk/client-jdbc/src/test/java/org/teiid/jdbc/util/TestMMJDBCURL.java 2010-03-19 01:45:14 UTC (rev 1976)
+++ trunk/client-jdbc/src/test/java/org/teiid/jdbc/util/TestMMJDBCURL.java 2010-03-19 16:17:09 UTC (rev 1977)
@@ -1,342 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership. Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package org.teiid.jdbc.util;
-
-import java.net.URLEncoder;
-import java.util.Properties;
-
-import org.teiid.jdbc.BaseDataSource;
-import org.teiid.jdbc.JDBCURL;
-import org.teiid.plan.api.ExecutionProperties;
-
-import junit.framework.TestCase;
-
-import com.metamatrix.common.api.MMURL;
-
-
-/**
- * @since 4.3
- */
-public class TestMMJDBCURL extends TestCase {
-
- // Need to allow embedded spaces and ='s within optional properties
- public final void testCredentials() throws Exception {
- String credentials = URLEncoder.encode("defaultToLogon,(system=BQT1 SQL Server 2000 Simple Cap,user=xyz,password=xyz)", "UTF-8"); //$NON-NLS-1$ //$NON-NLS-2$
- JDBCURL url = new JDBCURL("jdbc:metamatrix:QT_sqls2kds at mm://slwxp136:43100;credentials="+credentials); //$NON-NLS-1$
- Properties p = url.getProperties();
- assertEquals("defaultToLogon,(system=BQT1 SQL Server 2000 Simple Cap,user=xyz,password=xyz)", p.getProperty("credentials")); //$NON-NLS-1$//$NON-NLS-2$
- }
-
- public void testJDBCURLWithProperties() {
- String URL = "jdbc:metamatrix:bqt at mm://localhost:12345;version=1;user=xyz;password=***;logLevel=1;configFile=testdata/bqt/dqp_stmt_e2e.xmi;disableLocalTxn=true;autoFailover=false"; //$NON-NLS-1$
-
- Properties expectedProperties = new Properties();
- expectedProperties.setProperty("version", "1"); //$NON-NLS-1$ //$NON-NLS-2$
- expectedProperties.setProperty("user", "xyz"); //$NON-NLS-1$ //$NON-NLS-2$
- expectedProperties.setProperty("password", "***"); //$NON-NLS-1$ //$NON-NLS-2$
- expectedProperties.setProperty("logLevel", "1"); //$NON-NLS-1$ //$NON-NLS-2$
- expectedProperties.setProperty("configFile", "testdata/bqt/dqp_stmt_e2e.xmi"); //$NON-NLS-1$ //$NON-NLS-2$
- expectedProperties.setProperty(ExecutionProperties.DISABLE_LOCAL_TRANSACTIONS, "true"); //$NON-NLS-1$
- expectedProperties.setProperty(MMURL.CONNECTION.AUTO_FAILOVER, "false"); //$NON-NLS-1$
- JDBCURL url = new JDBCURL(URL);
- assertEquals("bqt", url.getVDBName()); //$NON-NLS-1$
- assertEquals("mm://localhost:12345", url.getConnectionURL()); //$NON-NLS-1$
- assertEquals(expectedProperties, url.getProperties());
- }
-
- public void testJDBCURLWithoutProperties() {
- String URL = "jdbc:metamatrix:bqt at mm://localhost:12345"; //$NON-NLS-1$
-
- JDBCURL url = new JDBCURL(URL);
- assertEquals("bqt", url.getVDBName()); //$NON-NLS-1$
- assertEquals("mm://localhost:12345", url.getConnectionURL()); //$NON-NLS-1$
- assertEquals(new Properties(), url.getProperties());
- }
-
- public void testCaseConversion() {
- // Different case ------------------------------------HERE -v ----------------and HERE -v
- String URL = "jdbc:metamatrix:bqt at mm://localhost:12345;VERSION=1;user=xyz;password=***;configFile=testdata/bqt/dqp_stmt_e2e.xmi"; //$NON-NLS-1$
-
- Properties expectedProperties = new Properties();
- expectedProperties.setProperty("version", "1"); //$NON-NLS-1$ //$NON-NLS-2$
- expectedProperties.setProperty("user", "xyz"); //$NON-NLS-1$ //$NON-NLS-2$
- expectedProperties.setProperty("password", "***"); //$NON-NLS-1$ //$NON-NLS-2$
- expectedProperties.setProperty("configFile", "testdata/bqt/dqp_stmt_e2e.xmi"); //$NON-NLS-1$ //$NON-NLS-2$
- JDBCURL url = new JDBCURL(URL);
- assertEquals("bqt", url.getVDBName()); //$NON-NLS-1$
- assertEquals("mm://localhost:12345", url.getConnectionURL()); //$NON-NLS-1$
- assertEquals(expectedProperties, url.getProperties());
- }
-
- public void testWithExtraSemicolons() {
- String URL = "jdbc:metamatrix:bqt at mm://localhost:12345;version=1;user=xyz;password=***;logLevel=1;;;configFile=testdata/bqt/dqp_stmt_e2e.xmi;;"; //$NON-NLS-1$
-
- Properties expectedProperties = new Properties();
- expectedProperties.setProperty("version", "1"); //$NON-NLS-1$ //$NON-NLS-2$
- expectedProperties.setProperty("user", "xyz"); //$NON-NLS-1$ //$NON-NLS-2$
- expectedProperties.setProperty("password", "***"); //$NON-NLS-1$ //$NON-NLS-2$
- expectedProperties.setProperty("logLevel", "1"); //$NON-NLS-1$ //$NON-NLS-2$
- expectedProperties.setProperty("configFile", "testdata/bqt/dqp_stmt_e2e.xmi"); //$NON-NLS-1$ //$NON-NLS-2$
- JDBCURL url = new JDBCURL(URL);
- assertEquals("bqt", url.getVDBName()); //$NON-NLS-1$
- assertEquals("mm://localhost:12345", url.getConnectionURL()); //$NON-NLS-1$
- assertEquals(expectedProperties, url.getProperties());
- }
-
- public void testWithWhitespace() {
- String URL = "jdbc:metamatrix:bqt at mm://localhost:12345; version =1;user= xyz ;password=***; logLevel = 1 ; configFile=testdata/bqt/dqp_stmt_e2e.xmi ;"; //$NON-NLS-1$
-
- Properties expectedProperties = new Properties();
- expectedProperties.setProperty("version", "1"); //$NON-NLS-1$ //$NON-NLS-2$
- expectedProperties.setProperty("user", "xyz"); //$NON-NLS-1$ //$NON-NLS-2$
- expectedProperties.setProperty("password", "***"); //$NON-NLS-1$ //$NON-NLS-2$
- expectedProperties.setProperty("logLevel", "1"); //$NON-NLS-1$ //$NON-NLS-2$
- expectedProperties.setProperty("configFile", "testdata/bqt/dqp_stmt_e2e.xmi"); //$NON-NLS-1$ //$NON-NLS-2$
- JDBCURL url = new JDBCURL(URL);
- assertEquals("bqt", url.getVDBName()); //$NON-NLS-1$
- assertEquals("mm://localhost:12345", url.getConnectionURL()); //$NON-NLS-1$
- assertEquals(expectedProperties, url.getProperties());
- }
-
- public void testNoPropertyValue() {
- String URL = "jdbc:metamatrix:bqt at mm://localhost:12345;version=1;user=xyz;password=***;logLevel=;configFile="; //$NON-NLS-1$
-
- Properties expectedProperties = new Properties();
- expectedProperties.setProperty("version", "1"); //$NON-NLS-1$ //$NON-NLS-2$
- expectedProperties.setProperty("user", "xyz"); //$NON-NLS-1$ //$NON-NLS-2$
- expectedProperties.setProperty("password", "***"); //$NON-NLS-1$ //$NON-NLS-2$
- expectedProperties.setProperty("logLevel", ""); //$NON-NLS-1$ //$NON-NLS-2$
- expectedProperties.setProperty("configFile", ""); //$NON-NLS-1$ //$NON-NLS-2$
- JDBCURL url = new JDBCURL(URL);
- assertEquals("bqt", url.getVDBName()); //$NON-NLS-1$
- assertEquals("mm://localhost:12345", url.getConnectionURL()); //$NON-NLS-1$
- assertEquals(expectedProperties, url.getProperties());
- }
-
- public void testInvalidProtocol() {
- String URL = "jdbc:monkeymatrix:bqt at mm://localhost:12345;version=1;user=xyz;password=***;logLevel=1"; //$NON-NLS-1$
- try {
- new JDBCURL(URL);
- fail("Illegal argument should have failed."); //$NON-NLS-1$
- } catch (IllegalArgumentException e) {
- // expected
- }
- }
-
- public void testNoVDBName() {
- String URL = "jdbc:metamatrix:@mm://localhost:12345;version=1;user=xyz;password=***;logLevel=1"; //$NON-NLS-1$
- try {
- new JDBCURL(URL);
- fail("Illegal argument should have failed."); //$NON-NLS-1$
- } catch (IllegalArgumentException e) {
- // expected
- }
- }
-
- public void testNoAtSignInURL() {
- String URL = "jdbc:metamatrix:bqt!mm://localhost:12345;version=1;user=xyz;password=***;logLevel=1"; //$NON-NLS-1$
- try {
- new JDBCURL(URL);
- // No @ sign is llowed as part of embedded driver now,
- // but this form of URL rejected in the acceptURL
- //fail("Illegal argument should have failed.");
- } catch (IllegalArgumentException e) {
- // expected
- }
- }
-
- public void testMoreThanOneAtSign() {
- String URL = "jdbc:metamatrix:bqt at mm://localhost:12345;version=1;user=xy@;password=***;logLevel=1"; //$NON-NLS-1$
- try {
- // this allowed as customer properties can have @ in their properties
- new JDBCURL(URL);
- } catch (IllegalArgumentException e) {
- // expected
- }
- }
-
- public void testNoEqualsInProperty() {
- String URL = "jdbc:metamatrix:bqt at mm://localhost:12345;version=1;user=xyz;password***;logLevel=1"; //$NON-NLS-1$
- try {
- new JDBCURL(URL);
- fail("Illegal argument should have failed."); //$NON-NLS-1$
- } catch (IllegalArgumentException e) {
- // expected
- }
- }
-
- public void testMoreThanOneEqualsInProperty() {
- String URL = "jdbc:metamatrix:bqt at mm://localhost:12345;version=1;user=xyz;password==***;logLevel=1"; //$NON-NLS-1$
- try {
- new JDBCURL(URL);
- fail("Illegal argument should have failed."); //$NON-NLS-1$
- } catch (IllegalArgumentException e) {
- // expected
- }
- URL = "jdbc:metamatrix:bqt at mm://localhost:12345;version=1;user=xyz;password=***=;logLevel=1"; //$NON-NLS-1$
- try {
- new JDBCURL(URL);
- fail("Illegal argument should have failed."); //$NON-NLS-1$
- } catch (IllegalArgumentException e) {
- // expected
- }
- URL = "jdbc:metamatrix:bqt at mm://localhost:12345;version=1;user=xyz;=password=***;logLevel=1"; //$NON-NLS-1$
- try {
- new JDBCURL(URL);
- fail("Illegal argument should have failed."); //$NON-NLS-1$
- } catch (IllegalArgumentException e) {
- // expected
- }
- }
-
- public void testNoKeyInProperty() {
- String URL = "jdbc:metamatrix:bqt at mm://localhost:12345;version=1;user=xyz;=***;logLevel=1"; //$NON-NLS-1$
- try {
- new JDBCURL(URL);
- fail("Illegal argument should have failed."); //$NON-NLS-1$
- } catch (IllegalArgumentException e) {
- // expected
- }
- }
-
- public void testConstructor() {
- JDBCURL url = new JDBCURL("myVDB", "mm://myhost:12345",null); //$NON-NLS-1$ //$NON-NLS-2$
- assertEquals("jdbc:teiid:myVDB at mm://myhost:12345", url.getJDBCURL()); //$NON-NLS-1$
-
- Properties props = new Properties();
- props.setProperty(BaseDataSource.USER_NAME, "myuser"); //$NON-NLS-1$
- props.setProperty(BaseDataSource.PASSWORD, "mypassword"); //$NON-NLS-1$
- props.put("ClieNTtOKeN", new Integer(1)); //$NON-NLS-1$
- url = new JDBCURL("myVDB", "mm://myhost:12345", props); //$NON-NLS-1$ //$NON-NLS-2$
- assertEquals("jdbc:teiid:myVDB at mm://myhost:12345;user=myuser;password=mypassword", url.getJDBCURL()); //$NON-NLS-1$
- }
-
- public void testConstructor_Exception() {
- try {
- new JDBCURL(null, "myhost", null); //$NON-NLS-1$
- fail("Should have failed."); //$NON-NLS-1$
- } catch (Exception e) {
-
- }
- try {
- new JDBCURL(" ", "myhost", null); //$NON-NLS-1$ //$NON-NLS-2$
- fail("Should have failed."); //$NON-NLS-1$
- } catch (Exception e) {
-
- }
-
- try {
- // in embedded situation there is no connection url
- new JDBCURL("myVDB", " ", null); //$NON-NLS-1$ //$NON-NLS-2$
- } catch (Exception e) {
-
- }
- }
-
- public void testNormalize() {
- Properties props = new Properties();
- props.setProperty("UsEr", "myuser"); //$NON-NLS-1$ //$NON-NLS-2$
- props.setProperty("pAssWOrD", "mypassword"); //$NON-NLS-1$ //$NON-NLS-2$
- props.put("ClieNTtOKeN", new Integer(1)); //$NON-NLS-1$
- JDBCURL.normalizeProperties(props);
- assertEquals("myuser", props.getProperty(BaseDataSource.USER_NAME)); //$NON-NLS-1$
- assertEquals("mypassword", props.getProperty(BaseDataSource.PASSWORD)); //$NON-NLS-1$
- }
-
- public final void testEncodedPropertyProperties() throws Exception {
- String password = "=@#^&*()+!%$^%@#_-)_~{}||\\`':;,./<>?password has = & %"; //$NON-NLS-1$
- Properties props = new Properties();
- props.setProperty("UsEr", "foo"); //$NON-NLS-1$ //$NON-NLS-2$
- props.setProperty("PASswoRd", password); //$NON-NLS-1$
- JDBCURL.normalizeProperties(props);
-
- assertEquals(password, props.getProperty("password")); //$NON-NLS-1$
- assertEquals("foo", props.getProperty("user")); //$NON-NLS-1$//$NON-NLS-2$
- }
-
- public final void testEncodedPropertyInURL() throws Exception {
- String password = "=@#^&*()+!%$^%@#_-)_~{}||\\`':;,./<>?password has = & %"; //$NON-NLS-1$
- String encPassword = URLEncoder.encode(password, "UTF-8"); //$NON-NLS-1$
- JDBCURL url = new JDBCURL("jdbc:metamatrix:QT_sqls2kds at mm://slwxp136:43100;PASswoRd="+encPassword); //$NON-NLS-1$
- Properties p = url.getProperties();
- assertEquals(password, p.getProperty("password")); //$NON-NLS-1$
- }
-
-
- public void testGetServerURL_NoProperties() {
- String result = new JDBCURL("jdbc:metamatrix:designtimecatalog at mm://slwxp172:44401;user=ddifranco;password=mm").getConnectionURL(); //$NON-NLS-1$
- assertEquals("mm://slwxp172:44401", result); //$NON-NLS-1$
- }
-
- public void testGetServerURL_Properties() {
- String result = new JDBCURL("jdbc:metamatrix:designtimecatalog at mm://slwxp172:44401;user=ddifranco;password=mm").getConnectionURL(); //$NON-NLS-1$
- assertEquals("mm://slwxp172:44401", result); //$NON-NLS-1$
- }
-
- /**
- * Test getServerURL with a valid URL and password that contains at least
- * one ASCII character in the range of 32 to 126 excluding the ; and = sign.
- *
- * @since 5.0.2
- */
- public void testGetServerURL_PasswordProperties() throws Exception {
- String result = null;
- String srcURL = "jdbc:metamatrix:designtimecatalog at mm://slwxp172:44401;user=ddifranco;password="; //$NON-NLS-1$
- String password = null;
- String tgtURL = "mm://slwxp172:44401"; //$NON-NLS-1$
-
-
- for ( char ch = 32; ch <= 126; ch++ ) {
- //exclude URL reserved characters
- if ( ch != ';' && ch != '=' && ch != '%') {
- password = ch+"mm"; //$NON-NLS-1$
- result = new JDBCURL(srcURL+URLEncoder.encode(password, "UTF-8")).getConnectionURL(); //$NON-NLS-1$
- assertEquals("Failed to obtain correct ServerURL when using password "+password,tgtURL, result); //$NON-NLS-1$
- }
- }
-
- }
-
- public void testGetServerURL_2Servers() {
- String result = new JDBCURL("jdbc:metamatrix:designtimecatalog at mm://slwxp172:44401,slabc123:12345;user=ddifranco;password=mm").getConnectionURL(); //$NON-NLS-1$
- assertEquals("mm://slwxp172:44401,slabc123:12345", result); //$NON-NLS-1$
- }
-
- public void testBuildEmbeedURL() {
- JDBCURL url = new JDBCURL("vdb", "/home/foo/deploy.properties", new Properties()); //$NON-NLS-1$ //$NON-NLS-2$
- assertEquals("jdbc:teiid:vdb@/home/foo/deploy.properties", url.getJDBCURL()); //$NON-NLS-1$
-
- Properties p = new Properties();
- p.setProperty("user", "test"); //$NON-NLS-1$ //$NON-NLS-2$
- p.setProperty("password", "pass"); //$NON-NLS-1$ //$NON-NLS-2$
- p.setProperty("autoFailover", "true"); //$NON-NLS-1$ //$NON-NLS-2$
- p.setProperty("any", "thing"); //$NON-NLS-1$ //$NON-NLS-2$
-
- url = new JDBCURL("vdb", "/home/foo/deploy.properties", p); //$NON-NLS-1$ //$NON-NLS-2$
- assertTrue(url.getJDBCURL().startsWith("jdbc:teiid:vdb@/home/foo/deploy.properties;user=test;")); //$NON-NLS-1$
- assertTrue(url.getJDBCURL().indexOf("any=thing")!=-1); //$NON-NLS-1$
- assertTrue(url.getJDBCURL().indexOf("password=pass")!=-1); //$NON-NLS-1$
- assertTrue(url.getJDBCURL().indexOf("autoFailover=true")!=-1); //$NON-NLS-1$
-
- }
-}
Modified: trunk/common-core/src/main/java/com/metamatrix/common/types/SQLXMLImpl.java
===================================================================
--- trunk/common-core/src/main/java/com/metamatrix/common/types/SQLXMLImpl.java 2010-03-19 01:45:14 UTC (rev 1976)
+++ trunk/common-core/src/main/java/com/metamatrix/common/types/SQLXMLImpl.java 2010-03-19 16:17:09 UTC (rev 1977)
@@ -49,6 +49,10 @@
private InputStreamFactory streamFactory;
+ /**
+ * Constructs a SQLXML from bytes that are already encoded in {@link Streamable#ENCODING}
+ * @param bytes
+ */
public SQLXMLImpl(final byte[] bytes) {
setStreamFactory(bytes);
}
@@ -74,16 +78,17 @@
this.streamFactory = factory;
}
- public <T extends Source> T getSource(Class<T> sourceClass) throws SQLException {
+ @SuppressWarnings("unchecked")
+ public <T extends Source> T getSource(Class<T> sourceClass) throws SQLException {
if (sourceClass == null || sourceClass == StreamSource.class) {
return (T)new StreamSource(getBinaryStream());
}
- throw new SQLException("Unsupported source type " + sourceClass);
+ throw new SQLException("Unsupported source type " + sourceClass); //$NON-NLS-1$
}
public Reader getCharacterStream() throws SQLException {
if (this.streamFactory == null) {
- throw new SQLException("SQLXML already freed");
+ throw new SQLException("SQLXML already freed"); //$NON-NLS-1$
}
try {
return new InputStreamReader(this.streamFactory.getInputStream(), this.streamFactory.getEncoding());
@@ -96,7 +101,7 @@
public InputStream getBinaryStream() throws SQLException {
if (this.streamFactory == null) {
- throw new SQLException("SQLXML already freed");
+ throw new SQLException("SQLXML already freed"); //$NON-NLS-1$
}
try {
return this.streamFactory.getInputStream();
@@ -109,7 +114,7 @@
public String getString() throws SQLException {
try {
- return new String(ObjectConverterUtil.convertToByteArray(getBinaryStream()), Streamable.ENCODING);
+ return new String(ObjectConverterUtil.convertToByteArray(getBinaryStream()), this.streamFactory.getEncoding());
} catch (IOException e) {
SQLException ex = new SQLException(e.getMessage());
ex.initCause(e);
Modified: trunk/documentation/connector-developer-guide/src/main/docbook/en-US/connector_developer_guide.xml
===================================================================
--- trunk/documentation/connector-developer-guide/src/main/docbook/en-US/connector_developer_guide.xml 2010-03-19 01:45:14 UTC (rev 1976)
+++ trunk/documentation/connector-developer-guide/src/main/docbook/en-US/connector_developer_guide.xml 2010-03-19 16:17:09 UTC (rev 1977)
@@ -48,7 +48,6 @@
<xi:include href="content/introduction.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="content/connector-api.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="content/command-language.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="content/connector-development-kit.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="content/connector-deployment.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="content/connection-pooling.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="content/lob-support.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
Deleted: trunk/documentation/connector-developer-guide/src/main/docbook/en-US/content/connector-development-kit.xml
===================================================================
--- trunk/documentation/connector-developer-guide/src/main/docbook/en-US/content/connector-development-kit.xml 2010-03-19 01:45:14 UTC (rev 1976)
+++ trunk/documentation/connector-developer-guide/src/main/docbook/en-US/content/connector-development-kit.xml 2010-03-19 16:17:09 UTC (rev 1977)
@@ -1,871 +0,0 @@
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-<!ENTITY % CustomDTD SYSTEM "../../../../../../docbook/custom.dtd">
-%CustomDTD;
-]>
-<chapter id="connector_development_kit">
- <title>Using the Connector Development Kit</title>
- <sect1>
- <title>Overview</title>
- <para>The Connector Developer Kit (CDK) is a set of programmatic and
- command line utilities
- for testing connectors. The programmatic components of the CDK are
- useful for unit testing
- your connector and the command line utilities is useful for integration
- testing and regression
- testing (due to scripting abilities).</para>
- <para>This chapter covers usage of both aspects of the CDK. For more
- detailed information
- about the CDK programmatic utilities also consult the <ulink url="&javaDocUrl;">Teiid JavaDocs</ulink>.</para>
- </sect1>
- <sect1>
- <title>Programmatic Utilities</title>
- <para>All components provided by the CDK are in the package
- com.metamatrix.cdk.api. </para>
- <sect2>
- <title>Language Translation</title>
- <para>
- Commands are sent to the Connector API in terms of the language
- interfaces
- discussed in the
- <link linkend="command_language">Command Language</link>
- chapter. Typically, a connector must write logic to read and
- sometimes manipulate these objects. The CDK language translation
- utilities can be used to
- write unit tests for translation code or command execution.
- </para>
- <para>The utilities are provided in the class TranslationUtility.
- This class has the
- following methods:</para>
-
- <table frame='all'>
- <title>Language Translation</title>
- <tgroup cols='2' align='left' colsep='1' rowsep='1'>
- <colspec colname='c1' colwidth="1*" />
- <colspec colname='c2' colwidth="2*" />
- <thead>
- <row>
- <entry>
- <para>Method Name</para>
- </entry>
- <entry>
- <para>Description</para>
- </entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>
- <para>TranslationUtility(String vdbFile)</para>
- </entry>
- <entry>
- <para>Constructor – takes the path to a file which is a valid
- metadata
- archive created by the Teiid Designer. These files have the suffix
- “.vdb”.
- </para>
- </entry>
- </row>
- <row>
- <entry>
- <para>createRuntimeMetadata()</para>
- </entry>
- <entry>
- <para>Creates an instance of RuntimeMetadata that can be used to
- test code
- that uses runtime metadata when translating or executing commands.
- </para>
- </entry>
- </row>
- <row>
- <entry>
- <para>parseCommand(String sql)</para>
- </entry>
- <entry>
- <para>Take a single-source command and return an ICommand that
- can be used to
- test translation or execution of commands.</para>
- </entry>
- </row>
- </tbody>
- </tgroup>
- </table>
- </sect2>
-
- <sect2>
- <title>Command Execution</title>
- <para>The primary purpose of a Connector is to execute commands
- against an information
- source. The query execution utilities allow you to test the execution of
- commands
- programmatically. This utility does not run the Teiid query engine or the connector
- manager although does simulate what happens when those components
- use a Connector to execute
- a command.</para>
- <para>The command execution utilities are provided in the class
- ConnectorHost. This class
- has the following methods:</para>
-
- <table frame='all'>
- <title>Command Execution</title>
- <tgroup cols='2' align='left' colsep='1' rowsep='1'>
- <colspec colname='c1' colwidth="1*" />
- <colspec colname='c2' colwidth="1.25*" />
- <thead>
- <row>
- <entry>
- <para>Method Name</para>
- </entry>
- <entry>
- <para>Description</para>
- </entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>
- <para>ConnectorHost</para>
- </entry>
- <entry>
- <para>Constructor – takes a Connector instance, a set of
- connector
- property values, and the path to a VDB archive file</para>
- </entry>
- </row>
- <row>
- <entry>
- <para>setBatchSize</para>
- </entry>
- <entry>
- <para>Sets the batch size to use when executing commands.</para>
- </entry>
- </row>
- <row>
- <entry>
- <para>setExecutionContext</para>
- </entry>
- <entry>
- <para>Sets the security context values currently being used to
- execute commands.
- This method may be called multiple times during the use of a single
- instance of
- ConnectorHost to change the current context.</para>
- </entry>
- </row>
- <row>
- <entry>
- <para>getConnectorEnvironmentProperties</para>
- </entry>
- <entry>
- <para>Helper method to retrieve the properties passed to the
- ConnectorHost
- constructor.</para>
- </entry>
- </row>
- <row>
- <entry>
- <para>executeCommand</para>
- </entry>
- <entry>
- <para>Execute a command and return the results using this
- connector.</para>
- </entry>
- </row>
- <row>
- <entry>
- <para>executeBatchedUpdates</para>
- </entry>
- <entry>
- <para>Execute a set of commands as a batched update.</para>
- </entry>
- </row>
- <row>
- <entry>
- <para>getCommand</para>
- </entry>
- <entry>
- <para>Use the host metadata to get the ICommand for a SQL
- string.</para>
- </entry>
- </row>
- </tbody>
- </tgroup>
- </table>
- <para />
- <para>Here is some example code showing how to use ConnectorHost to
- test a connector:
- </para>
- <programlisting><![CDATA[
-// Prepare state for testing
-MyConnector connector = new MyConnector();
-Properties props = new Properties();
-props.setProperty(“user”, “myuser”);
-props.setProperty(“password”, “mypassword”);
-String vdbFile = “c:/mymetadata.vdb”;
-
-// Create host
-ConnectorHost host = new ConnectorHost(connector, props, vdbFile);
-
-// Execute query
-List results = host.executeCommand(“SELECT col FROM group WHERE col = 5”);
-
-// Compare actual results to expected results
-// . . .
- ]]></programlisting>
- <para>The executeCommand() method will return results as a List of
- rows. Each row is
- itself a List of objects in column order. So, each row should have the
- same number of items
- corresponding to the columns in the SELECT clause of the query. In the case of
- an INSERT,
- UPDATE, or DELETE, a single “row” will be returned with a single column
- that contains the
- update count.</para>
- </sect2>
-
- </sect1>
-
- <sect1>
- <title>Connector Environment</title>
- <para>Many parts of the Connector API require use of the Connector
- Environment. The
- EnvironmentUtility can be used to obtain and control a Connector Environment instance.
- </para>
-
- <table frame='all'>
- <title>Command Execution</title>
- <tgroup cols='2' align='left' colsep='1' rowsep='1'>
- <colspec colname='c1' colwidth="1*" />
- <colspec colname='c2' colwidth="2*" />
- <thead>
- <row>
- <entry>
- <para>Method Name</para>
- </entry>
- <entry>
- <para>Description</para>
- </entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>
- <para>createExecutionContext</para>
- </entry>
- <entry>
- <para>Creates a ExecutionContext instance.</para>
- </entry>
- </row>
- <row>
- <entry>
- <para>createStdoutLogger</para>
- </entry>
- <entry>
- <para>Creates an instance of ConnectorLogger that prints log
- messages to
- system.out( )</para>
- </entry>
- </row>
- <row>
- <entry>
- <para>createEnvironment</para>
- </entry>
- <entry>
- <para>Creates an instance of connectorEnvironment for use in your
- testing
- environment.</para>
- </entry>
- </row>
- <row>
- <entry>
- <para>createExecutionContext</para>
- </entry>
- <entry>
- <para>Creates an ExecutionContext instance.</para>
- </entry>
- </row>
- </tbody>
- </tgroup>
- </table>
- <para />
- <para>In addition, some implementations of ConnectorLogger are
- provided which can be used as
- needed to build a custom logger for testing. BaseLogger is a base logger
- class that can be
- extended to create your own ConnectorLogger implementation. SysLogger is a
- utility
- implementation that logs to System.out.</para>
- </sect1>
-
- <sect1>
- <title>Command Line Tester</title>
- <sect2>
- <title>Using the Command Line Tester</title>
- <para>The command line tester is available in the mmtools kit along
- with the other
- Teiid products in the tools directory. The tester can be executed in
- interactive mode by running </para>
-
- <programlisting><![CDATA[
- <unzipped folder>S\cdk\cdk.bat
- ]]></programlisting>
- <para>Typing “help” in the command line tester provides a list of all
- available options. These options are listed here with some
- additional detail:</para>
-
- <table frame='all'>
- <title>Connector Lifecycle</title>
- <tgroup cols='3' align='left' colsep='1' rowsep='1'>
- <colspec colname='c1' colwidth="1*" />
- <colspec colname='c2' colwidth="1*" />
- <colspec colname='c3' colwidth="2*" />
-
- <thead>
- <row>
- <entry>
- <para>Option</para>
- </entry>
- <entry>
- <para>Arguments</para>
- </entry>
- <entry>
- <para>Description</para>
- </entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>
- <para>Load Archive</para>
- </entry>
- <entry>
- <para>ArchiveFileName</para>
- </entry>
- <entry>
- <para>Load the Connector archive file, which loads the Connector
- type definition
- file and all the extension modules into the CDK shell.</para>
- </entry>
- </row>
- <row>
- <entry>
- <para>Load</para>
- </entry>
- <entry>
- <para>ConnectorClass vdbFile</para>
- </entry>
- <entry>
- <para>Load a connector by specifying the connector class name
- and the VDB metadata archive file</para>
- </entry>
- </row>
- <row>
- <entry>
- <para>LoadFromScript</para>
- </entry>
- <entry>
- <para>ScriptFile</para>
- </entry>
- <entry>
- <para>Load a connector from a script</para>
- </entry>
- </row>
- <row>
- <entry>
- <para>LoadProperties</para>
- </entry>
- <entry>
- <para>PropertyFile</para>
- </entry>
- <entry>
- <para>Load a set of properties for your connector from a file
- </para>
- </entry>
- </row>
- <row>
- <entry>
- <para>SetProperty</para>
- </entry>
- <entry>
- <para>PropertyName PropertyValue</para>
- </entry>
- <entry>
- <para>Set the value of a property</para>
- </entry>
- </row>
- <row>
- <entry>
- <para>GetProperties</para>
- </entry>
- <entry>
- <para />
- </entry>
- <entry>
- <para>List all properties currently set on the connector</para>
- </entry>
- </row>
- <row>
- <entry>
- <para>Start</para>
- </entry>
- <entry>
- <para />
- </entry>
- <entry>
- <para>Start the connector</para>
- </entry>
- </row>
- <row>
- <entry>
- <para>Stop</para>
- </entry>
- <entry>
- <para />
- </entry>
- <entry>
- <para>Stop the connector</para>
- </entry>
- </row>
- </tbody>
- </tgroup>
- </table>
-
- <table frame='all'>
- <title>Command Execution</title>
- <tgroup cols='3' align='left' colsep='1' rowsep='1'>
- <colspec colname='c1' colwidth="1*" />
- <colspec colname='c2' colwidth="1*" />
- <colspec colname='c3' colwidth="2*" />
-
- <thead>
- <row>
- <entry>
- <para>Option</para>
- </entry>
- <entry>
- <para>Arguments</para>
- </entry>
- <entry>
- <para>Description</para>
- </entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>
- <para>Select</para>
- </entry>
- <entry>
- <para>Sql</para>
- </entry>
- <entry>
- <para>Run a SELECT statement. This option takes multi-line
- input terminated with “;”</para>
- </entry>
- </row>
- <row>
- <entry>
- <para>Insert</para>
- </entry>
- <entry>
- <para>Sql</para>
- </entry>
- <entry>
- <para>Execute an INSERT statement. This option takes multi-line
- input terminated with a “;”.</para>
- </entry>
- </row>
- <row>
- <entry>
- <para>Update</para>
- </entry>
- <entry>
- <para>Sql</para>
- </entry>
- <entry>
- <para>Execute an UPDATE statement. This option takes multi-line
- input terminated with “;”</para>
- </entry>
- </row>
- <row>
- <entry>
- <para>Delete</para>
- </entry>
- <entry>
- <para>Sql</para>
- </entry>
- <entry>
- <para>Execute a DELETE statement. This option takes multi-line
- input terminated with a “;”.</para>
- </entry>
- </row>
- <row>
- <entry>
- <para>SetBatchSize</para>
- </entry>
- <entry>
- <para>BatchSize</para>
- </entry>
- <entry>
- <para>Set the batch size used when retrieving results</para>
- </entry>
- </row>
- <row>
- <entry>
- <para>SetExecutionContext</para>
- </entry>
- <entry>
- <para>VDBName VDBVersion UserName</para>
- </entry>
- <entry>
- <para>Set the properties of the current security context</para>
- </entry>
- </row>
- <row>
- <entry>
- <para>SetPrintStackOnError</para>
- </entry>
- <entry>
- <para>PrintStackOnError</para>
- </entry>
- <entry>
- <para>Set whether to print the stack trace when an error is
- received</para>
- </entry>
- </row>
- </tbody>
- </tgroup>
- </table>
-
- <table frame='all'>
- <title>Scripting</title>
- <tgroup cols='3' align='left' colsep='1' rowsep='1'>
- <colspec colname='c1' colwidth="1*" />
- <colspec colname='c2' colwidth="1*" />
- <colspec colname='c3' colwidth="2*" />
-
- <thead>
- <row>
- <entry>
- <para>Option</para>
- </entry>
- <entry>
- <para>Arguments</para>
- </entry>
- <entry>
- <para>Description</para>
- </entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>
- <para>SetScriptFile</para>
- </entry>
- <entry>
- <para>ScriptFile</para>
- </entry>
- <entry>
- <para>Set the script file to use</para>
- </entry>
- </row>
- <row>
- <entry>
- <para>Run</para>
- </entry>
- <entry>
- <para>ScriptName</para>
- </entry>
- <entry>
- <para>Run a script with the file name</para>
- </entry>
- </row>
- <row>
- <entry>
- <para>Runall</para>
- </entry>
- <entry>
- <para />
- </entry>
- <entry>
- <para>Run all scripts loaded by loadFromScript</para>
- </entry>
- </row>
- <row>
- <entry>
- <para>RunScript</para>
- </entry>
- <entry>
- <para>ScriptFile</para>
- <para>ScriptNameWithinFile</para>
- </entry>
- <entry>
- <para>Run a particular script in a script file</para>
- </entry>
- </row>
- <row>
- <entry>
- <para>SetFailOnError</para>
- </entry>
- <entry>
- <para>FailOnError</para>
- </entry>
- <entry>
- <para>Set whether to fail a script when an error is encountered
- or continue on</para>
- </entry>
- </row>
- <row>
- <entry>
- <para>Result</para>
- </entry>
- <entry>
- <para>ExpectedResults</para>
- </entry>
- <entry>
- <para>Compares actual results from the previous command with the
- expected
- results. This command is only available when using the command line
- tester in script
- mode.</para>
- </entry>
- </row>
- </tbody>
- </tgroup>
- </table>
-
- <table frame='all'>
- <title>Miscellaneous</title>
- <tgroup cols='3' align='left' colsep='1' rowsep='1'>
- <colspec colname='c1' colwidth="1*" />
- <colspec colname='c2' colwidth="1*" />
- <colspec colname='c3' colwidth="2*" />
-
- <thead>
- <row>
- <entry>
- <para>Option</para>
- </entry>
- <entry>
- <para>Arguments</para>
- </entry>
- <entry>
- <para>Description</para>
- </entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>
- <para>CreateArchive</para>
- </entry>
- <entry>
- <para>ArchiveFileName</para>
- <para>CDKFileName</para>
- <para>ExtensionModuleDir</para>
- </entry>
- <entry>
- <para>Creates a connector archive file based on the properties
- supplied.</para>
- </entry>
- </row>
- <row>
- <entry>
- <para>CreateTemplate</para>
- </entry>
- <entry>
- <para>TemplateFile</para>
- </entry>
- <entry>
- <para>Create a template connector type file at the given file
- name.</para>
- </entry>
- </row>
- <row>
- <entry>
- <para>Help</para>
- </entry>
- <entry>
- <para />
- </entry>
- <entry>
- <para>List all options</para>
- </entry>
- </row>
- <row>
- <entry>
- <para>Quit</para>
- </entry>
- <entry>
- <para />
- </entry>
- <entry>
- <para>Quit the command line tester</para>
- </entry>
- </row>
- </tbody>
- </tgroup>
- </table>
- </sect2>
-
- <sect2>
- <title>Loading Your Connector</title>
- <para>Preparing your connector to execute commands consists of the
- following steps:</para>
- <orderedlist>
- <listitem>
- <para>Add your connector code to the CDK classpath. The cdk.bat
- script looks for this code
- in the CONNECTORPATH environment variable. This variable can be set
- with the DOS shell
- command “SET CONNECTORPATH=c:\path\to\connector.jar”. Alternately, you
- can modify the value
- of the CONNECTORPATH environment variable in the cdk.bat file.
- </para>
- </listitem>
- <listitem>
- <para>Start the command line tester. You can start the tester by
- executing the cdk.bat
- file in the cdk directory of the Teiid Tools installation. </para>
- </listitem>
- <listitem>
- <para>Load your connector class and the associated runtime
- metadata. You can load your
- connector by using the “load” command and specifying the fully-qualified
- class name of your
- Connector implementation and the path to a VDB file. The VDB runtime
- metadata archive
- should contain the metadata you want to use while testing.</para>
- </listitem>
- <listitem>
- <para>Set any properties required by your connector. This can be
- accomplished with the
- setProperty command for individual properties or the loadProperties command
- to load a set of
- properties from either a properties file or a connector binding file. You
- can use the
- “getProperties” command to view the current property settings.</para>
- </listitem>
- <listitem>
- <para>Start the connector. Use the “start” command in the
- command-line tester to start your connector. </para>
- </listitem>
- </orderedlist>
-
- <para>Following is an example transcript of how this process might
- look in a DOS command window. User input is in bold.</para>
-
- <programlisting><![CDATA[
-D:\teiid\cdk> set CONNECTORPATH=D:\myconn\myconn.jar
-D:\teiid\cdk> cdk.bat
-========================== ENV SETTINGS ==========================
-TEIID_ROOT = D:\teiid
-CONNECTORPATH = D:\myconn\myconn.jar
-CLASSPATH = ;D:\teiid\cdk\metamatrix-cdk.jar;D:\myconn\myconn.jar;
-==================================================================
-
-java -Xmx256m com.metamatrix.cdk.ConnectorShell
-Starting
-Started
->load com.metamatrix.myconn.MyConnector d:\myconn\myconn.vdb
->setproperty user joe
->start
->
- ]]></programlisting>
-
- </sect2>
-
- <sect2>
- <title>Executing Commands</title>
- <para>Commands can be executed against your connector using the
- SELECT, INSERT, UPDATE, and DELETE commands. Procedure execution is
- not currently supported via the command line tester. Commands may
- span multiple lines and should be terminated with a “;”. </para>
- <para>When a command is executed, the results are printed to the
- console. Following is an example session executing a SELECT command
- with the command line tester. User input is in bold.</para>
- <programlisting><![CDATA[
->SELECT Name, Value FROM MyModel.MyGroup WHERE Name = ‘xyz’;
-String Integer
-xyz 5
-xyz 10
->
- ]]></programlisting>
-
- <para />
- </sect2>
-
- <sect2>
- <title>Scripting</title>
- <para>One of the most useful capabilities of the command-line tester
- is the ability to capture
- a sequence of commands in a script and automate the execution of the
- script. This allows for
- the rapid creation of regression and acceptance tests. </para>
- <para>A script file may contain multiple scripts, where each script
- is grouped together with { }
- and a name. Following is an example of a script file. This script
- file also uses the special
- script-only command RESULTS that will compare the results of the last execution
- with the
- specified expected results.</para>
- <programlisting><![CDATA[
-test {
- load com.metamatrix.myconn.MyConnector d:\myconn\myconn.vdb
- setproperty user joe
- start
-
- SELECT Name, Value FROM MyModel.MyGroup WHERE Name = ‘xyz’;
- results [
- String Integer
- xyz 5
- xyz 10
- ]
-}
- ]]></programlisting>
-
- <para />
- <para>To execute this file, run the command line tester in scripting
- mode and specify the script
- file and the script within the file:</para>
-
- <programlisting><![CDATA[
-D:\teiid\cdk>cdk runscript d:\myconn\my.script test
-========================== ENV SETTINGS ==========================
-TEIID_ROOT = D:\teiid
-CONNECTORPATH = D:\myconn\myconn.jar
-CLASSPATH = ;D:\teiid\cdk\metamatrix-cdk.jar;D:\myconn\myconn.jar;
-==================================================================
-
-java -Xmx256m -Dmetamatrix.config.none -Dmetamatrix.log=4 com.metamatrix.cdk.ConnectorShell runscript my.script
-Starting
-Started
->Executing: load com.metamatrix.myconn.MyConnector d:\myconn\myconn.vdb
->Executing: setproperty user joe
->Executing: start
->Executing: select Name, Value from MyModel.MyGroup where Name = ‘xyz’;
-String Integer
-xyz 5
-xyz 15
-
->Test /teiid/cdk/yahoo.script.test failed. CompareResults Error: Value mismatch at row 2 and column 2: expected = 10, actual = 15
-
->Finished
-D:\teiid\cdk>
- ]]></programlisting>
-
- <para />
- <para>The script run above illustrates the output when the test
- result fails due to differences
- between expected and actual results. In this case the value was expected
- to be 10 in the script
- but was actually 15. The setFailOnError command can be used to fail
- the execution of the entire
- script if an error occurs. </para>
- <para>Scripts can also be run in interactive mode by using the
- setScriptFile and run
- commands. This can be useful to record portions of your interactive testing
- to avoid re-typing
- later.</para>
- </sect2>
- </sect1>
-</chapter>
\ No newline at end of file
Modified: trunk/documentation/reference/src/main/docbook/en-US/content/federated_planning.xml
===================================================================
--- trunk/documentation/reference/src/main/docbook/en-US/content/federated_planning.xml 2010-03-19 01:45:14 UTC (rev 1976)
+++ trunk/documentation/reference/src/main/docbook/en-US/content/federated_planning.xml 2010-03-19 16:17:09 UTC (rev 1977)
@@ -304,15 +304,14 @@
results mode may be overridden on a per-query basis by setting
the execution property on the Statement. To set this property,
cast to the Teiid Statement JDBC API extension interface
- <classname>com.metamatrix.jdbc.api.Statement
+ <classname>org.teiid.jdbc.TeiidStatement
</classname>
</para>
<example>
<title>Example - Setting Partial Results Mode</title>
<programlisting>Statement statement = ...obtain statement from Connection...
-com.metamatrix.jdbc.api.Statement mmStatement =
- (com.metamatrix.jdbc.api.Statement) statement;
+TeiidStatement mmStatement = statement.unWrap(TeiidStatement.class);
mmStatement.setExecutionProperty(
ExecutionProperties.PROP_PARTIAL_RESULTS_MODE, "true");</programlisting>
@@ -348,7 +347,7 @@
warnings can be obtained from the Statement.getWarnings()
method. This method returns a SQLWarning object but in the
case of "partial results" warnings, this will be an object of
- type com.metamatrix.jdbc.api.PartialResultsWarning. This class
+ type org.teiid.jdbc.PartialResultsWarning. This class
can be used to obtain a list of all the failed connectors by
name and to obtain the specific exception thrown by each
connector.</para>
@@ -399,13 +398,13 @@
<para>
With the above options, the query plan is available from the
Statement object by casting to the
- <classname>com.metamatrix.jdbc.api.Statement
+ <classname>org.teiid.jdbc.TeiidStatement
</classname>
interface.
</para>
<example>
<title>Retrieving a Query Plan</title>
- <programlisting>com.metamatrix.jdbc.api.Statement mmstatement = (com.metamatrix.jdbc.api.Statement)statement;
+ <programlisting>TeiidStatement mmstatement = statement.unWrap(TeiidStatement.class);
String sql = "select ...";
mmstatement.setExecutionProperty(ExecutionProperties.PROP_SQL_OPTIONS, ExecutionProperties.SQL_OPTION_SHOWPLAN);
Modified: trunk/documentation/reference/src/main/docbook/en-US/content/grammar.xml
===================================================================
--- trunk/documentation/reference/src/main/docbook/en-US/content/grammar.xml 2010-03-19 01:45:14 UTC (rev 1976)
+++ trunk/documentation/reference/src/main/docbook/en-US/content/grammar.xml 2010-03-19 16:17:09 UTC (rev 1977)
@@ -2,772 +2,742 @@
<!DOCTYPE appendix PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<appendix id="grammar">
<title>BNF for SQL Grammar</title>
- <sect1 remap="h2">
- <title>TOKENS</title>
- <informaltable frame="none">
- <tgroup cols="1">
- <colspec colname="c1" colwidth="100*"/>
- <!-- Token -->
- <tbody>
- <row>
- <entry><para>
+<sect1>
+<title>TOKENS</title>
+<informaltable frame="none">
+<tgroup cols="1">
+<colspec colname="c1" colwidth="100*"/>
+<tbody>
+<row><entry><para>
<DEFAULT> SKIP : {
-" "
-| "\t"
-| "\n"
-| "\r"
+" "
+| "\t"
+| "\n"
+| "\r"
}
- </para></entry>
- </row>
- <!-- Token -->
- <row>
- <entry><para>
+</para></entry></row>
+<row><entry><para>
<DEFAULT> MORE : {
-"/*" : IN_MULTI_LINE_COMMENT
+"/*" : IN_MULTI_LINE_COMMENT
}
- </para></entry>
- </row>
- <!-- Token -->
- <row>
- <entry><para>
+</para></entry></row>
+<row><entry><para>
<IN_MULTI_LINE_COMMENT> SPECIAL : {
-<MULTI_LINE_COMMENT: "*/"> : DEFAULT
+<MULTI_LINE_COMMENT: "*/"> : DEFAULT
}
- </para></entry>
- </row>
- <!-- Token -->
- <row>
- <entry><para>
+</para></entry></row>
+<row><entry><para>
<IN_MULTI_LINE_COMMENT> MORE : {
<~[]>
}
- </para></entry>
- </row>
- <!-- Token -->
- <row>
- <entry><para>
+</para></entry></row>
+<row><entry><para>
<DEFAULT> TOKEN : {
-<STRING: "string">
-| <BOOLEAN: "boolean">
-| <BYTE: "byte">
-| <SHORT: "short">
-| <CHAR: "char">
-| <INTEGER: "integer">
-| <LONG: "long">
-| <BIGINTEGER: "biginteger">
-| <FLOAT: "float">
-| <DOUBLE: "double">
-| <BIGDECIMAL: "bigdecimal">
-| <DATE: "date">
-| <TIME: "time">
-| <TIMESTAMP: "timestamp">
-| <OBJECT: "object">
-| <BLOB: "blob">
-| <CLOB: "clob">
-| <XML: "xml">
+<STRING: "string">
+| <VARCHAR: "varchar">
+| <BOOLEAN: "boolean">
+| <BYTE: "byte">
+| <TINYINT: "tinyint">
+| <SHORT: "short">
+| <SMALLINT: "smallint">
+| <CHAR: "char">
+| <INTEGER: "integer">
+| <LONG: "long">
+| <BIGINT: "bigint">
+| <BIGINTEGER: "biginteger">
+| <FLOAT: "float">
+| <REAL: "real">
+| <DOUBLE: "double">
+| <BIGDECIMAL: "bigdecimal">
+| <DECIMAL: "decimal">
+| <DATE: "date">
+| <TIME: "time">
+| <TIMESTAMP: "timestamp">
+| <OBJECT: "object">
+| <BLOB: "blob">
+| <CLOB: "clob">
+| <XML: "xml">
}
- </para></entry>
- </row>
- <!-- Token -->
- <row>
- <entry><para>
+</para></entry></row>
+<row><entry><para>
<DEFAULT> TOKEN : {
-<CAST: "cast">
-| <CONVERT: "convert">
-| <TIMESTAMPADD: "timestampadd">
-| <TIMESTAMPDIFF: "timestampdiff">
-| <COUNT: "count">
-| <SUM: "sum">
-| <AVG: "avg">
-| <MIN: "min">
-| <MAX: "max">
+<CAST: "cast">
+| <CONVERT: "convert">
+| <TIMESTAMPADD: "timestampadd">
+| <TIMESTAMPDIFF: "timestampdiff">
+| <COUNT: "count">
+| <SUM: "sum">
+| <AVG: "avg">
+| <MIN: "min">
+| <MAX: "max">
}
- </para></entry>
- </row>
- <!-- Token -->
- <row>
- <entry><para>
+</para></entry></row>
+<row><entry><para>
<DEFAULT> TOKEN : {
-<ALL: "all">
-| <AND: "and">
-| <ANY: "any">
-| <AS: "as">
-| <ASC: "asc">
-| <BEGIN: "begin">
-| <BETWEEN: "between">
-| <BREAK: "break">
-| <BY: "by">
-| <CASE: "case">
-| <CONTINUE: "continue">
-| <CREATE: "create">
-| <CRITERIA: "criteria">
-| <CROSS: "cross">
-| <DEBUG: "debug">
-| <DECLARE: "declare">
-| <DELETE: "delete">
-| <DESC: "desc">
-| <DISTINCT: "distinct">
-| <DROP: "drop">
-| <ELSE: "else">
-| <END: "end">
-| <ERROR: "error">
-| <ESCAPE: "escape">
-| <EXCEPT: "except">
-| <EXEC: "exec">
-| <EXECUTE: "execute">
-| <EXISTS: "exists">
-| <FALSE: "false">
-| <FN: "fn">
-| <FOR: "for">
-| <FROM: "from">
-| <FULL: "full">
-| <GROUP: "group">
-| <HAS: "has">
-| <HAVING: "having">
-| <IF: "if">
-| <IN: "in">
-| <INNER: "inner">
-| <INSERT: "insert">
-| <INTERSECT: "intersect">
-| <INTO: "into">
-| <IS: "is">
-| <JOIN: "join">
-| <LEFT: "left">
-| <LIKE: "like">
-| <LIMIT: "limit">
-| <LOCAL: "local">
-| <LOOP: "loop">
-| <MAKEDEP: "makedep">
-| <MAKENOTDEP: "makenotdep">
-| <NOCACHE: "nocache">
-| <NOT: "not">
-| <NULL: "null">
-| <ON: "on">
-| <OJ: "oj">
-| <OPTION: "option">
-| <OR: "or">
-| <ORDER: "order">
-| <OUTER: "outer">
-| <PLANONLY: "planonly">
-| <PROCEDURE: "procedure">
-| <RIGHT: "right">
-| <SELECT: "select">
-| <SET: "set">
-| <SHOWPLAN: "showplan">
-| <SOME: "some">
-| <TABLE: "table">
-| <TEMPORARY: "temporary">
-| <THEN: "then">
-| <TRANSLATE: "translate">
-| <TRUE: "true">
-| <UNION: "union">
-| <UNKNOWN: "unknown">
-| <UPDATE: "update">
-| <USING: "using">
-| <VALUES: "values">
-| <VIRTUAL: "virtual">
-| <WHEN: "when">
-| <WHERE: "where">
-| <WITH: "with">
-| <WHILE: "while">
+<ADD: "add">
+| <ALL: "all">
+| <ALTER: "alter">
+| <AND: "and">
+| <ANY: "any">
+| <ARRAY: "array">
+| <AS: "as">
+| <ASC: "asc">
+| <ATOMIC: "atomic">
+| <AUTORIZATION: "authorization">
+| <BEGIN: "begin">
+| <BETWEEN: "between">
+| <BINARY: "binary">
+| <BOTH: "both">
+| <BREAK: "break">
+| <BY: "by">
+| <CALL: "call">
+| <CALLED: "called">
+| <CASCADED: "cascaded">
+| <CASE: "case">
+| <CHARACTER: "character">
+| <CHECK: "check">
+| <CLOSE: "close">
+| <COLLATE: "collate">
+| <COLUMN: "column">
+| <COMMIT: "commit">
+| <CONNECT: "connect">
+| <CONSTRAINT: "constraint">
+| <CONTINUE: "continue">
+| <CORRESPONDING: "corresponding">
+| <CURRENT_DATE: "current_date">
+| <CURRENT_TIME: "current_time">
+| <CURRENT_TIMESTAMP: "current_timestamp">
+| <CURRENT_USER: "current_user">
+| <CREATE: "create">
+| <CRITERIA: "criteria">
+| <CROSS: "cross">
+| <CURSOR: "cursor">
+| <DAY: "day">
+| <DEALLOCATE: "deallocate">
+| <DEFAULT_KEYWORD: "default">
+| <DEBUG: "debug">
+| <DECLARE: "declare">
+| <DELETE: "delete">
+| <DESC: "desc">
+| <DESCRIBE: "describe">
+| <DETERMINISTIC: "deterministic">
+| <DISCONNECT: "disconnect">
+| <DISTINCT: "distinct">
+| <DROP: "drop">
+| <ELSE: "else">
+| <END: "end">
+| <ERROR: "error">
+| <ESCAPE: "escape">
+| <EXCEPT: "except">
+| <EXEC: "exec">
+| <EXECUTE: "execute">
+| <EXTERNAL: "external">
+| <EXISTS: "exists">
+| <FALSE: "false">
+| <FETCH: "fetch">
+| <FILTER: "filter">
+| <FN: "fn">
+| <FOR: "for">
+| <FORIEGN: "foriegn">
+| <FROM: "from">
+| <FULL: "full">
+| <FUNCTION: "function">
+| <GET: "get">
+| <GLOBAL: "global">
+| <GRANT: "grant">
+| <GROUP: "group">
+| <HAS: "has">
+| <HAVING: "having">
+| <HOLD: "hold">
+| <HOUR: "hour">
+| <IF: "if">
+| <IDENTITY: "identity">
+| <IMMEDIATE: "immediate">
+| <IN: "in">
+| <INDICATOR: "indicator">
+| <INNER: "inner">
+| <INPUT: "input">
+| <INOUT: "inout">
+| <INSENSITIVE: "insensitive">
+| <INSERT: "insert">
+| <INTERSECT: "intersect">
+| <INTERVAL: "interval">
+| <INTO: "into">
+| <IS: "is">
+| <ISOLATION: "isolation">
+| <JOIN: "join">
+| <LEFT: "left">
+| <LANGUAGE: "language">
+| <LARGE: "large">
+| <LEADING: "leading">
+| <LIKE: "like">
+| <LIMIT: "limit">
+| <LOCAL: "local">
+| <LOOP: "loop">
+| <MAKEDEP: "makedep">
+| <MAKENOTDEP: "makenotdep">
+| <MATCH: "match">
+| <MERGE: "merge">
+| <METHOD: "method">
+| <MINUTE: "minute">
+| <MODIFIES: "modifies">
+| <MODULE: "module">
+| <MONTH: "month">
+| <NATURAL: "natural">
+| <NEW: "new">
+| <NOCACHE: "nocache">
+| <NO: "no">
+| <NONE: "none">
+| <NOT: "not">
+| <NULL: "null">
+| <OF: "of">
+| <OLD: "old">
+| <ON: "on">
+| <ONLY: "only">
+| <OJ: "oj">
+| <OPEN: "open">
+| <OPTION: "option">
+| <OR: "or">
+| <ORDER: "order">
+| <OUTER: "outer">
+| <OUTPUT: "output">
+| <OVER: "over">
+| <OVERLAPS: "OVERLAPS">
+| <PARAMETER: "parameter">
+| <PARTITION: "partition">
+| <PLANONLY: "planonly">
+| <PRECISION: "precision">
+| <PREPARE: "prepare">
+| <PRIMARY: "primary">
+| <PROCEDURE: "procedure">
+| <RANGE: "range">
+| <READS: "reads">
+| <RECURSIVE: "recursive">
+| <REFERENCES: "REFERENCES">
+| <REFERENCING: "REFERENCING">
+| <RETURN: "return">
+| <RETURNS: "returns">
+| <REVOKE: "REVOKE">
+| <RIGHT: "right">
+| <ROLLBACK: "ROLLBACK">
+| <ROLLUP: "ROLLUP">
+| <ROW: "row">
+| <ROWS: "rows">
+| <SAVEPOINT: "savepoint">
+| <SCROLL: "scroll">
+| <SEARCH: "search">
+| <SECOND: "second">
+| <SELECT: "select">
+| <SENSITIVE: "sensitive">
+| <SESSION_USER: "session_user">
+| <SET: "set">
+| <SHOWPLAN: "showplan">
+| <SIMILAR: "similar">
+| <SPECIFIC: "specific">
+| <SOME: "some">
+| <SQL: "sql">
+| <SQLEXCEPTION: "sqlexception">
+| <SQLSTATE: "sqlstate">
+| <SQLWARNING: "sqlwarning">
+| <START: "start">
+| <STATIC: "static">
+| <SYSTEM: "system">
+| <SYSTEM_USER: "system_user">
+| <TABLE: "table">
+| <TEMPORARY: "temporary">
+| <THEN: "then">
+| <TIMEZONE_HOUR: "timezone_hour">
+| <TIMEZONE_MINUTE: "timezone_minute">
+| <TO: "to">
+| <TRAILING: "trailing">
+| <TRANSLATE: "translate">
+| <TRIGGER: "trigger">
+| <TRUE: "true">
+| <UNION: "union">
+| <UNIQUE: "unique">
+| <UNKNOWN: "unknown">
+| <USER: "user">
+| <UPDATE: "update">
+| <USING: "using">
+| <VALUE: "value">
+| <VALUES: "values">
+| <VIRTUAL: "virtual">
+| <WHEN: "when">
+| <WHENEVER: "whenever">
+| <WHERE: "where">
+| <WITH: "with">
+| <WHILE: "while">
+| <WINDOW: "window">
+| <WITHIN: "within">
+| <WITHOUT: "without">
+| <YEAR: "year">
}
- </para></entry>
- </row>
- <!-- Token -->
- <row>
- <entry><para>
+</para></entry></row>
+<row><entry><para>
<DEFAULT> TOKEN : {
-<SQL_TSI_FRAC_SECOND: "SQL_TSI_FRAC_SECOND">
-| <SQL_TSI_SECOND: "SQL_TSI_SECOND">
-| <SQL_TSI_MINUTE: "SQL_TSI_MINUTE">
-| <SQL_TSI_HOUR: "SQL_TSI_HOUR">
-| <SQL_TSI_DAY: "SQL_TSI_DAY">
-| <SQL_TSI_WEEK: "SQL_TSI_WEEK">
-| <SQL_TSI_MONTH: "SQL_TSI_MONTH">
-| <SQL_TSI_QUARTER: "SQL_TSI_QUARTER">
-| <SQL_TSI_YEAR: "SQL_TSI_YEAR">
+<XMLAGG: "xmlagg">
+| <XMLATTRIBUTES: "xmlattributes">
+| <XMLBINARY: "xmlbinary">
+| <XMLCONCAT: "xmlconcat">
+| <XMLCOMMENT: "xmlcomment">
+| <XMLELEMENT: "xmlelement">
+| <XMLFOREST: "xmlforest">
+| <XMLNAMESPACES: "xmlnamespaces">
+| <XMLPARSE: "xmlparse">
+| <XMLPI: "xmlpi">
+| <XMLROOT: "xmlroot">
+| <XMLSERIALIZE: "xmlserialize">
}
- </para></entry>
- </row>
- <!-- Token -->
- <row>
- <entry><para>
+</para></entry></row>
+<row><entry><para>
<DEFAULT> TOKEN : {
+<DATALINK: "datalink">
+| <DLNEWCOPY: "dlnewcopy">
+| <DLPREVIOUSCOPY: "dlpreviouscopy">
+| <DLURLCOMPLETE: "dlurlcomplete">
+| <DLURLCOMPLETEWRITE: "dlurlcompletewrite">
+| <DLURLCOMPLETEONLY: "dlurlcompleteonly">
+| <DLURLPATH: "dlurlpath">
+| <DLURLPATHWRITE: "dlurlpathwrite">
+| <DLURLPATHONLY: "dlurlpathonly">
+| <DLURLSCHEME: "dlurlscheme">
+| <DLURLSERVER: "dlurlserver">
+| <DLVALUE: "dlvalue">
+| <IMPORT: "import">
+}
+
+</para></entry></row>
+<row><entry><para>
+<DEFAULT> TOKEN : {
+<SQL_TSI_FRAC_SECOND: "SQL_TSI_FRAC_SECOND">
+| <SQL_TSI_SECOND: "SQL_TSI_SECOND">
+| <SQL_TSI_MINUTE: "SQL_TSI_MINUTE">
+| <SQL_TSI_HOUR: "SQL_TSI_HOUR">
+| <SQL_TSI_DAY: "SQL_TSI_DAY">
+| <SQL_TSI_WEEK: "SQL_TSI_WEEK">
+| <SQL_TSI_MONTH: "SQL_TSI_MONTH">
+| <SQL_TSI_QUARTER: "SQL_TSI_QUARTER">
+| <SQL_TSI_YEAR: "SQL_TSI_YEAR">
+}
+
+</para></entry></row>
+<row><entry><para>
+<DEFAULT> TOKEN : {
<ALL_IN_GROUP: <ID> <PERIOD> <STAR>>
| <ID: <QUOTED_ID> (<PERIOD> <QUOTED_ID>)*>
-| <#QUOTED_ID: <ID_PART> | "\"" ("\"\"" | ~["\""])+ "\"">
-| <#ID_PART: ("@" | "#" | <LETTER>) (<LETTER> | "_" | <DIGIT>)*>
-| <DATETYPE: "{" "d">
-| <TIMETYPE: "{" "t">
-| <TIMESTAMPTYPE: "{" "ts">
-| <BOOLEANTYPE: "{" "b">
+| <#QUOTED_ID: <ID_PART> | "\"" ("\"\"" | ~["\""])+ "\"">
+| <#ID_PART: ("@" | "#" | <LETTER>) (<LETTER> | "_" | <DIGIT>)*>
+| <DATETYPE: "{" "d">
+| <TIMETYPE: "{" "t">
+| <TIMESTAMPTYPE: "{" "ts">
+| <BOOLEANTYPE: "{" "b">
| <INTEGERVAL: (<MINUS>)? (<DIGIT>)+>
-| <FLOATVAL: (<MINUS>)? (<DIGIT>)* <PERIOD> (<DIGIT>)+ (["e","E"] (["+","-"])? (<DIGIT>)+)?>
-| <STRINGVAL: ("N")? "\'" ("\'\'" | ~["\'"])* "\'">
-| <#LETTER: ["a"-"z","A"-"Z"] | ["\u0153"-"\ufffd"]>
-| <#DIGIT: ["0"-"9"]>
+| <FLOATVAL: (<MINUS>)? (<DIGIT>)* <PERIOD> (<DIGIT>)+ (["e","E"] (["+","-"])? (<DIGIT>)+)?>
+| <STRINGVAL: ("N")? "\'" ("\'\'" | ~["\'"])* "\'">
+| <#LETTER: ["a"-"z","A"-"Z"] | ["\u0153"-"\ufffd"]>
+| <#DIGIT: ["0"-"9"]>
}
- </para></entry>
- </row>
- <!-- Token -->
- <row>
- <entry><para>
+</para></entry></row>
+<row><entry><para>
<DEFAULT> TOKEN : {
-<COMMA: ",">
-| <PERIOD: ".">
-| <LPAREN: "(">
-| <RPAREN: ")">
-| <LBRACE: "{">
-| <RBRACE: "}">
-| <EQ: "=">
-| <NE: "<>">
-| <NE2: "!=">
-| <LT: "<">
-| <LE: "<=">
-| <GT: ">">
-| <GE: ">=">
-| <STAR: "*">
-| <SLASH: "/">
-| <PLUS: "+">
-| <MINUS: "-">
-| <QMARK: "?">
-| <DOLLAR: "$">
-| <SEMICOLON: ";">
-| <CONCAT_OP: "||">
+<COMMA: ",">
+| <PERIOD: ".">
+| <LPAREN: "(">
+| <RPAREN: ")">
+| <LBRACE: "{">
+| <RBRACE: "}">
+| <EQ: "=">
+| <NE: "<>">
+| <NE2: "!=">
+| <LT: "<">
+| <LE: "<=">
+| <GT: ">">
+| <GE: ">=">
+| <STAR: "*">
+| <SLASH: "/">
+| <PLUS: "+">
+| <MINUS: "-">
+| <QMARK: "?">
+| <DOLLAR: "$">
+| <SEMICOLON: ";">
+| <CONCAT_OP: "||">
}
- </para></entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- </sect1>
- <sect1 remap="h2">
- <title>NON-TERMINALS</title>
- <informaltable frame="none">
- <tgroup cols="3">
- <colspec colname="c1" colwidth="33*"/>
- <colspec colname="c2" colwidth="5*"/>
- <colspec colname="c3" colwidth="62*"/>
- <tbody>
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod1" xreflabel="stringVal"/>stringVal</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para>( <STRINGVAL> )</para></entry>
- </row>
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod2" xreflabel="id"/>id</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para>( <ID> )</para></entry>
- </row>
-
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod3" xreflabel="command"/>command</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para>( ( <link linkend="SQLParser.html-prod4">createUpdateProcedure</link> ) | <link linkend="SQLParser.html-prod5">userCommand</link> | <link linkend="SQLParser.html-prod6">callableStatement</link> ) ( <SEMICOLON> )? <EOF></para></entry>
- </row>
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod5" xreflabel="userCommand"/>userCommand</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para>( <link linkend="SQLParser.html-prod7">queryExpression</link> | <link linkend="SQLParser.html-prod8">storedProcedure</link> | <link linkend="SQLParser.html-prod9">insert</link> | <link linkend="SQLParser.html-prod10">update</link> | <link linkend="SQLParser.html-prod11">delete</link> | <link linkend="SQLParser.html-prod12">dropTable</link> | <link linkend="SQLParser.html-prod13">createTempTable</link> )</para></entry>
- </row>
-
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod12" xreflabel="dropTable"/>dropTable</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para><DROP> <TABLE> <link linkend="SQLParser.html-prod2">id</link></para></entry>
- </row>
-
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod13" xreflabel="createTempTable"/>createTempTable</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para><CREATE> <LOCAL> <TEMPORARY> <TABLE> <link linkend="SQLParser.html-prod2">id</link> <LPAREN> <link linkend="SQLParser.html-prod14">createElementsWithTypes</link> <RPAREN></para></entry>
- </row>
-
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod15" xreflabel="errorStatement"/>errorStatement</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para><ERROR> <link linkend="SQLParser.html-prod16">expression</link></para></entry>
- </row>
-
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod17" xreflabel="statement"/>statement</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para>( <link linkend="SQLParser.html-prod18">ifStatement</link> | <link linkend="SQLParser.html-prod19">loopStatement</link> | <link linkend="SQLParser.html-prod20">whileStatement</link> | <link linkend="SQLParser.html-prod21">delimitedStatement</link> )</para></entry>
- </row>
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod21" xreflabel="delimitedStatement"/>delimitedStatement</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para>( <link linkend="SQLParser.html-prod22">sqlStatement</link> | <link linkend="SQLParser.html-prod15">errorStatement</link> | <link linkend="SQLParser.html-prod23">assignStatement</link> | <link linkend="SQLParser.html-prod24">declareStatement</link> | <link linkend="SQLParser.html-prod25">continueStatement</link> | <link linkend="SQLParser.html-prod26">breakStatement</link> ) <SEMICOLON></para></entry>
- </row>
-
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod27" xreflabel="block"/>block</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para>( <link linkend="SQLParser.html-prod17">statement</link> | ( <BEGIN> ( <link linkend="SQLParser.html-prod17">statement</link> )* <END> ) )</para></entry>
- </row>
-
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod26" xreflabel="breakStatement"/>breakStatement</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para><BREAK></para></entry>
- </row>
-
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod25" xreflabel="continueStatement"/>continueStatement</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para><CONTINUE></para></entry>
- </row>
-
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod20" xreflabel="whileStatement"/>whileStatement</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para><WHILE> <LPAREN> <link linkend="SQLParser.html-prod28">criteria</link> <RPAREN> <link linkend="SQLParser.html-prod27">block</link></para></entry>
- </row>
-
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod19" xreflabel="loopStatement"/>loopStatement</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para><LOOP> <ON> <LPAREN> <link linkend="SQLParser.html-prod7">queryExpression</link> <RPAREN> <AS> <link linkend="SQLParser.html-prod2">id</link><link linkend="SQLParser.html-prod27">block</link></para></entry>
- </row>
-
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod18" xreflabel="ifStatement"/>ifStatement</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para><IF> <LPAREN> <link linkend="SQLParser.html-prod28">criteria</link> <RPAREN> <link linkend="SQLParser.html-prod27">block</link> ( <ELSE> <link linkend="SQLParser.html-prod27">block</link> )?</para></entry>
- </row>
-
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod29" xreflabel="criteriaSelector"/>criteriaSelector</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para>( ( <EQ> | <NE> | <NE2> | <LE> | <GE> | <LT> | <GT> | <IN> | <LIKE> | ( <IS> <NULL> ) | <BETWEEN> ) )? <CRITERIA> ( <ON> <LPAREN> <link linkend="SQLParser.html-prod2">id</link> ( <COMMA> <link linkend="SQLParser.html-prod2">id</link> )* <RPAREN> )?</para></entry>
- </row>
-
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod30" xreflabel="hasCriteria"/>hasCriteria</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para><HAS> <link linkend="SQLParser.html-prod29">criteriaSelector</link></para></entry>
- </row>
-
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod24" xreflabel="declareStatement"/>declareStatement</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para><DECLARE> <link linkend="SQLParser.html-prod31">dataType</link><link linkend="SQLParser.html-prod2">id</link> ( <EQ> <link linkend="SQLParser.html-prod32">assignStatementOperand</link> )?</para></entry>
- </row>
-
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod23" xreflabel="assignStatement"/>assignStatement</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para><link linkend="SQLParser.html-prod2">id</link> <EQ> <link linkend="SQLParser.html-prod32">assignStatementOperand</link></para></entry>
- </row>
-
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod32" xreflabel="assignStatementOperand"/>assignStatementOperand</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para>( ( <link linkend="SQLParser.html-prod9">insert</link> ) | <link linkend="SQLParser.html-prod10">update</link> | <link linkend="SQLParser.html-prod11">delete</link> | <link linkend="SQLParser.html-prod8">storedProcedure</link> | ( <link linkend="SQLParser.html-prod16">expression</link> ) | <link linkend="SQLParser.html-prod7">queryExpression</link> )</para></entry>
- </row>
-
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod22" xreflabel="sqlStatement"/>sqlStatement</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para>( ( <link linkend="SQLParser.html-prod33">dynamicCommand</link> ) | <link linkend="SQLParser.html-prod5">userCommand</link> )</para></entry>
- </row>
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod34" xreflabel="translateCriteria"/>translateCriteria</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para><TRANSLATE> <link linkend="SQLParser.html-prod29">criteriaSelector</link> ( <WITH> <LPAREN> <link linkend="SQLParser.html-prod2">id</link> <EQ> <link linkend="SQLParser.html-prod16">expression</link> ( <COMMA> <link linkend="SQLParser.html-prod2">id</link> <EQ> <link linkend="SQLParser.html-prod16">expression</link> )* <RPAREN> )?</para></entry>
- </row>
-
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod4" xreflabel="createUpdateProcedure"/>createUpdateProcedure</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para><CREATE> ( <VIRTUAL> )? ( <UPDATE> )? <PROCEDURE> <link linkend="SQLParser.html-prod27">block</link></para></entry>
- </row>
-
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod33" xreflabel="dynamicCommand"/>dynamicCommand</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para>( <EXECUTE> | <EXEC> ) <STRING> <link linkend="SQLParser.html-prod16">expression</link> ( <AS> <link linkend="SQLParser.html-prod14">createElementsWithTypes</link> ( <INTO> <link linkend="SQLParser.html-prod2">id</link> )? )? ( <USING> <link linkend="SQLParser.html-prod35">setClauseList</link> )? ( <UPDATE> ( ( <INTEGERVAL> ) | ( <STAR> ) ) )?</para></entry>
- </row>
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod35" xreflabel="setClauseList"/>setClauseList</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para><link linkend="SQLParser.html-prod2">id</link> <EQ> ( <COMMA> <link linkend="SQLParser.html-prod2">id</link> <EQ> )*</para></entry>
- </row>
-
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod14" xreflabel="createElementsWithTypes"/>createElementsWithTypes</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para><link linkend="SQLParser.html-prod2">id</link><link linkend="SQLParser.html-prod31">dataType</link> ( <COMMA> <link linkend="SQLParser.html-prod2">id</link><link linkend="SQLParser.html-prod31">dataType</link> )*</para></entry>
- </row>
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod6" xreflabel="callableStatement"/>callableStatement</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para><LBRACE> ( <QMARK> <EQ> )? <ID> <link linkend="SQLParser.html-prod2">id</link> ( <LPAREN> ( <link linkend="SQLParser.html-prod36">executeUnnamedParams</link> ) <RPAREN> )? <RBRACE> ( <link linkend="SQLParser.html-prod37">option</link> )?</para></entry>
- </row>
-
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod8" xreflabel="storedProcedure"/>storedProcedure</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para>( ( <EXEC> | <EXECUTE> ) <link linkend="SQLParser.html-prod2">id</link> <LPAREN> ( <link linkend="SQLParser.html-prod38">executeNamedParams</link> | <link linkend="SQLParser.html-prod36">executeUnnamedParams</link> ) <RPAREN> ) ( <link linkend="SQLParser.html-prod37">option</link> )?</para></entry>
- </row>
-
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod36" xreflabel="executeUnnamedParams"/>executeUnnamedParams</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para>( <link linkend="SQLParser.html-prod16">expression</link> ( <COMMA> <link linkend="SQLParser.html-prod16">expression</link> )* )?</para></entry>
- </row>
-
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod38" xreflabel="executeNamedParams"/>executeNamedParams</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para>( <link linkend="SQLParser.html-prod2">id</link> <EQ> <link linkend="SQLParser.html-prod16">expression</link> ( <COMMA> <link linkend="SQLParser.html-prod2">id</link> <EQ> <link linkend="SQLParser.html-prod16">expression</link> )* )</para></entry>
- </row>
-
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod9" xreflabel="insert"/>insert</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para><INSERT> <INTO> <link linkend="SQLParser.html-prod2">id</link> ( <LPAREN> <link linkend="SQLParser.html-prod2">id</link> ( <COMMA> <link linkend="SQLParser.html-prod2">id</link> )* <RPAREN> )? ( ( <VALUES> <link linkend="SQLParser.html-prod39">rowValues</link> ) | ( <link linkend="SQLParser.html-prod7">queryExpression</link> ) ) ( <link linkend="SQLParser.html-prod37">option</link> )?</para></entry>
- </row>
-
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod39" xreflabel="rowValues"/>rowValues</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para><LPAREN> <link linkend="SQLParser.html-prod16">expression</link> ( <COMMA> <link linkend="SQLParser.html-prod16">expression</link> )* <RPAREN></para></entry>
- </row>
-
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod10" xreflabel="update"/>update</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para><UPDATE> <link linkend="SQLParser.html-prod2">id</link> <SET> <link linkend="SQLParser.html-prod35">setClauseList</link> ( <link linkend="SQLParser.html-prod40">where</link> )? ( <link linkend="SQLParser.html-prod37">option</link> )?</para></entry>
- </row>
-
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod11" xreflabel="delete"/>delete</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para><DELETE> <FROM> <link linkend="SQLParser.html-prod2">id</link> ( <link linkend="SQLParser.html-prod40">where</link> )? ( <link linkend="SQLParser.html-prod37">option</link> )?</para></entry>
- </row>
-
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod7" xreflabel="queryExpression"/>queryExpression</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para><link linkend="SQLParser.html-prod41">queryExpressionBody</link></para></entry>
- </row>
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod41" xreflabel="queryExpressionBody"/>queryExpressionBody</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para><link linkend="SQLParser.html-prod42">queryTerm</link> ( ( <UNION> | <EXCEPT> ) ( <ALL> | <DISTINCT> )? <link linkend="SQLParser.html-prod42">queryTerm</link> )* ( <link linkend="SQLParser.html-prod43">orderby</link> )? ( <link linkend="SQLParser.html-prod44">limit</link> )? ( <link linkend="SQLParser.html-prod37">option</link> )?</para></entry>
- </row>
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod42" xreflabel="queryTerm"/>queryTerm</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para><link linkend="SQLParser.html-prod45">queryPrimary</link> ( <INTERSECT> ( <ALL> | <DISTINCT> )? <link linkend="SQLParser.html-prod45">queryPrimary</link> )*</para></entry>
- </row>
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod45" xreflabel="queryPrimary"/>queryPrimary</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para>( <link linkend="SQLParser.html-prod46">query</link> | ( <LPAREN> <link linkend="SQLParser.html-prod41">queryExpressionBody</link> <RPAREN> ) )</para></entry>
- </row>
-
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod46" xreflabel="query"/>query</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para><link linkend="SQLParser.html-prod47">select</link> ( <link linkend="SQLParser.html-prod48">into</link> )? ( <link linkend="SQLParser.html-prod49">from</link> ( <link linkend="SQLParser.html-prod40">where</link> )? ( <link linkend="SQLParser.html-prod50">groupBy</link> )? ( <link linkend="SQLParser.html-prod51">having</link> )? )?</para></entry>
- </row>
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod48" xreflabel="into"/>into</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para><INTO> ( <link linkend="SQLParser.html-prod2">id</link> )</para></entry>
- </row>
-
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod47" xreflabel="select"/>select</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para><SELECT> ( <ALL> | ( <DISTINCT> ) )? ( <STAR> | ( <link linkend="SQLParser.html-prod52">selectSymbol</link> ( <COMMA> <link linkend="SQLParser.html-prod52">selectSymbol</link> )* ) )</para></entry>
- </row>
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod52" xreflabel="selectSymbol"/>selectSymbol</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para>( ( <ALL_IN_GROUP> ) | ( <link linkend="SQLParser.html-prod16">expression</link> ) ( ( <AS> )? ( <link linkend="SQLParser.html-prod2">id</link> ) )? )</para></entry>
- </row>
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod53" xreflabel="aggregateSymbol"/>aggregateSymbol</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para>( ( <COUNT> <LPAREN> <STAR> <RPAREN> ) | ( ( <COUNT> | <SUM> | <AVG> | <MIN> | <MAX> ) <LPAREN> ( <DISTINCT> )? <link linkend="SQLParser.html-prod16">expression</link> <RPAREN> ) )</para></entry>
- </row>
-
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod49" xreflabel="from"/>from</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para><FROM> ( <link linkend="SQLParser.html-prod54">tableReference</link> ( <COMMA> <link linkend="SQLParser.html-prod54">tableReference</link> )* )</para></entry>
- </row>
-
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod54" xreflabel="tableReference"/>tableReference</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para>( ( <LBRACE> <OJ> <link linkend="SQLParser.html-prod55">tableReferenceUnescaped</link> <RBRACE> ) | <link linkend="SQLParser.html-prod55">tableReferenceUnescaped</link> )</para></entry>
- </row>
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod55" xreflabel="tableReferenceUnescaped"/>tableReferenceUnescaped</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para>( <link linkend="SQLParser.html-prod56">joinedTable</link> | <link linkend="SQLParser.html-prod57">tablePrimary</link> )</para></entry>
- </row>
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod56" xreflabel="joinedTable"/>joinedTable</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para><link linkend="SQLParser.html-prod57">tablePrimary</link> ( ( <link linkend="SQLParser.html-prod58">crossJoin</link> | <link linkend="SQLParser.html-prod59">qualifiedJoin</link> ) )+</para></entry>
- </row>
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod58" xreflabel="crossJoin"/>crossJoin</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para>( ( <CROSS> | <UNION> ) <JOIN> <link linkend="SQLParser.html-prod57">tablePrimary</link> )</para></entry>
- </row>
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod59" xreflabel="qualifiedJoin"/>qualifiedJoin</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para>( ( ( <RIGHT> ( <OUTER> )? ) | ( <LEFT> ( <OUTER> )? ) | ( <FULL> ( <OUTER> )? ) | <INNER> )? <JOIN> <link linkend="SQLParser.html-prod54">tableReference</link> <ON> <link linkend="SQLParser.html-prod28">criteria</link> )</para></entry>
- </row>
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod57" xreflabel="tablePrimary"/>tablePrimary</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para>( <link linkend="SQLParser.html-prod60">unaryFromClause</link> | <link linkend="SQLParser.html-prod61">subqueryFromClause</link> | ( <LPAREN> <link linkend="SQLParser.html-prod56">joinedTable</link> <RPAREN> ) ) ( ( <MAKEDEP> ) | ( <MAKENOTDEP> ) )?</para></entry>
- </row>
-
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod61" xreflabel="subqueryFromClause"/>subqueryFromClause</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para><LPAREN> ( <link linkend="SQLParser.html-prod7">queryExpression</link> | <link linkend="SQLParser.html-prod8">storedProcedure</link> ) <RPAREN> ( <AS> )? <link linkend="SQLParser.html-prod2">id</link></para></entry>
- </row>
-
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod60" xreflabel="unaryFromClause"/>unaryFromClause</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para>( <ID> ( ( <AS> )? <link linkend="SQLParser.html-prod2">id</link> )? )</para></entry>
- </row>
-
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod40" xreflabel="where"/>where</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para><WHERE> <link linkend="SQLParser.html-prod28">criteria</link></para></entry>
- </row>
-
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod28" xreflabel="criteria"/>criteria</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para><link linkend="SQLParser.html-prod62">compoundCritOr</link></para></entry>
- </row>
-
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod62" xreflabel="compoundCritOr"/>compoundCritOr</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para><link linkend="SQLParser.html-prod63">compoundCritAnd</link> ( <OR> <link linkend="SQLParser.html-prod63">compoundCritAnd</link> )*</para></entry>
- </row>
-
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod63" xreflabel="compoundCritAnd"/>compoundCritAnd</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para><link linkend="SQLParser.html-prod64">notCrit</link> ( <AND> <link linkend="SQLParser.html-prod64">notCrit</link> )*</para></entry>
- </row>
-
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod64" xreflabel="notCrit"/>notCrit</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para>( <NOT> )? <link linkend="SQLParser.html-prod65">primary</link></para></entry>
- </row>
-
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod65" xreflabel="primary"/>primary</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para>( <link linkend="SQLParser.html-prod66">predicate</link> | ( <LPAREN> <link linkend="SQLParser.html-prod28">criteria</link> <RPAREN> ) )</para></entry>
- </row>
-
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod66" xreflabel="predicate"/>predicate</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para>( <link linkend="SQLParser.html-prod67">subqueryCompareCriteria</link> | <link linkend="SQLParser.html-prod68">compareCrit</link> | <link linkend="SQLParser.html-prod69">matchCrit</link> | <link linkend="SQLParser.html-prod70">betweenCrit</link> | <link linkend="SQLParser.html-prod71">setCrit</link> | <link linkend="SQLParser.html-prod72">existsCriteria</link> | <link linkend="SQLParser.html-prod30">hasCriteria</link> | <link linkend="SQLParser.html-prod34">translateCriteria</link> | <link linkend="SQLParser.html-prod73">isNullCrit</link> )</para></entry>
- </row>
-
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod68" xreflabel="compareCrit"/>compareCrit</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para><link linkend="SQLParser.html-prod16">expression</link> ( <EQ> | <NE> | <NE2> | <LT> | <LE> | <GT> | <GE> ) <link linkend="SQLParser.html-prod16">expression</link></para></entry>
- </row>
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod74" xreflabel="subquery"/>subquery</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para><LPAREN> ( <link linkend="SQLParser.html-prod7">queryExpression</link> | <link linkend="SQLParser.html-prod8">storedProcedure</link> ) <RPAREN></para></entry>
- </row>
-
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod67" xreflabel="subqueryCompareCriteria"/>subqueryCompareCriteria</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para><link linkend="SQLParser.html-prod16">expression</link> ( <EQ> | <NE> | <NE2> | <LT> | <LE> | <GT> | <GE> ) ( <ANY> | <SOME> | <ALL> ) <link linkend="SQLParser.html-prod74">subquery</link></para></entry>
- </row>
-
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod69" xreflabel="matchCrit"/>matchCrit</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para>( <link linkend="SQLParser.html-prod16">expression</link> ( <NOT> )? <LIKE> <link linkend="SQLParser.html-prod16">expression</link> ( <link linkend="SQLParser.html-prod75">escapeChar</link> | ( <LBRACE> <link linkend="SQLParser.html-prod75">escapeChar</link> <RBRACE> ) )? )</para></entry>
- </row>
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod75" xreflabel="escapeChar"/>escapeChar</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para><ESCAPE> <link linkend="SQLParser.html-prod1">stringVal</link></para></entry>
- </row>
-
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod70" xreflabel="betweenCrit"/>betweenCrit</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para><link linkend="SQLParser.html-prod16">expression</link> ( <NOT> )? <BETWEEN> <link linkend="SQLParser.html-prod16">expression</link> <AND> <link linkend="SQLParser.html-prod16">expression</link></para></entry>
- </row>
-
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod73" xreflabel="isNullCrit"/>isNullCrit</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para><link linkend="SQLParser.html-prod16">expression</link> <IS> ( <NOT> )? <NULL></para></entry>
- </row>
-
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod71" xreflabel="setCrit"/>setCrit</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para><link linkend="SQLParser.html-prod16">expression</link> ( <NOT> )? <IN> ( ( <link linkend="SQLParser.html-prod74">subquery</link> ) | ( <LPAREN> <link linkend="SQLParser.html-prod16">expression</link> ( <COMMA> <link linkend="SQLParser.html-prod16">expression</link> )* <RPAREN> ) )</para></entry>
- </row>
-
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod72" xreflabel="existsCriteria"/>existsCriteria</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para><EXISTS> <link linkend="SQLParser.html-prod74">subquery</link></para></entry>
- </row>
-
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod50" xreflabel="groupBy"/>groupBy</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para><GROUP> <BY> ( <link linkend="SQLParser.html-prod76">groupByItem</link> ( <COMMA> <link linkend="SQLParser.html-prod76">groupByItem</link> )* )</para></entry>
- </row>
-
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod76" xreflabel="groupByItem"/>groupByItem</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para><link linkend="SQLParser.html-prod16">expression</link></para></entry>
- </row>
-
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod51" xreflabel="having"/>having</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para><HAVING> <link linkend="SQLParser.html-prod28">criteria</link></para></entry>
- </row>
-
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod43" xreflabel="orderby"/>orderby</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para><ORDER> <BY> <link linkend="SQLParser.html-prod77">sortKey</link> ( <ASC> | <DESC> )? ( <COMMA> <link linkend="SQLParser.html-prod77">sortKey</link> ( <ASC> | <DESC> )? )*</para></entry>
- </row>
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod77" xreflabel="sortKey"/>sortKey</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para><link linkend="SQLParser.html-prod16">expression</link></para></entry>
- </row>
-
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod44" xreflabel="limit"/>limit</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para><LIMIT> ( <INTEGERVAL> | <QMARK> ) ( <COMMA> ( <INTEGERVAL> | <QMARK> ) )?</para></entry>
- </row>
-
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod37" xreflabel="option"/>option</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para><OPTION> ( <SHOWPLAN> | <PLANONLY> | <DEBUG> | <MAKEDEP> <link linkend="SQLParser.html-prod2">id</link> ( <COMMA> <link linkend="SQLParser.html-prod2">id</link> )* | <MAKENOTDEP> <link linkend="SQLParser.html-prod2">id</link> ( <COMMA> <link linkend="SQLParser.html-prod2">id</link> )* | <NOCACHE> ( <link linkend="SQLParser.html-prod2">id</link> ( <COMMA> <link linkend="SQLParser.html-prod2">id</link> )* )? )*</para></entry>
- </row>
-
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod16" xreflabel="expression"/>expression</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para><link linkend="SQLParser.html-prod78">concatExpression</link></para></entry>
- </row>
-
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod78" xreflabel="concatExpression"/>concatExpression</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para>( <link linkend="SQLParser.html-prod79">plusExpression</link> ( <CONCAT_OP> <link linkend="SQLParser.html-prod79">plusExpression</link> )* )</para></entry>
- </row>
-
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod79" xreflabel="plusExpression"/>plusExpression</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para>( <link linkend="SQLParser.html-prod80">timesExpression</link> ( <link linkend="SQLParser.html-prod81">plusOperator</link><link linkend="SQLParser.html-prod80">timesExpression</link> )* )</para></entry>
- </row>
-
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod81" xreflabel="plusOperator"/>plusOperator</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para>( <PLUS> | <MINUS> )</para></entry>
- </row>
-
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod80" xreflabel="timesExpression"/>timesExpression</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para>( <link linkend="SQLParser.html-prod82">basicExpression</link> ( <link linkend="SQLParser.html-prod83">timesOperator</link><link linkend="SQLParser.html-prod82">basicExpression</link> )* )</para></entry>
- </row>
-
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod83" xreflabel="timesOperator"/>timesOperator</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para>( <STAR> | <SLASH> )</para></entry>
- </row>
-
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod82" xreflabel="basicExpression"/>basicExpression</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para>( <QMARK> | <link linkend="SQLParser.html-prod84">literal</link> | ( <LBRACE> <FN> <link linkend="SQLParser.html-prod85">function</link> <RBRACE> ) | ( <link linkend="SQLParser.html-prod53">aggregateSymbol</link> ) | ( <link linkend="SQLParser.html-prod85">function</link> ) | ( <ID> ) | ( <LPAREN> <link linkend="SQLParser.html-prod16">expression</link> <RPAREN> ) | <link linkend="SQLParser.html-prod74">subquery</link> | <link linkend="SQLParser.html-prod86">caseExpression</link> | <link linkend="SQLParser.html-prod87">searchedCaseExpression</link> )</para></entry>
- </row>
-
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod86" xreflabel="caseExpression"/>caseExpression</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para><CASE> <link linkend="SQLParser.html-prod16">expression</link> ( <WHEN> <link linkend="SQLParser.html-prod16">expression</link> <THEN> <link linkend="SQLParser.html-prod16">expression</link> )+ ( <ELSE> <link linkend="SQLParser.html-prod16">expression</link> )? <END></para></entry>
- </row>
-
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod87" xreflabel="searchedCaseExpression"/>searchedCaseExpression</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para><CASE> ( <WHEN> <link linkend="SQLParser.html-prod28">criteria</link> <THEN> <link linkend="SQLParser.html-prod16">expression</link> )+ ( <ELSE> <link linkend="SQLParser.html-prod16">expression</link> )? <END></para></entry>
- </row>
-
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod85" xreflabel="function"/>function</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para>( ( <CONVERT> <LPAREN> <link linkend="SQLParser.html-prod16">expression</link> <COMMA> <link linkend="SQLParser.html-prod31">dataType</link> <RPAREN> ) | ( <CAST> <LPAREN> <link linkend="SQLParser.html-prod16">expression</link> <AS> <link linkend="SQLParser.html-prod31">dataType</link> <RPAREN> ) | ( ( <TIMESTAMPADD> | <TIMESTAMPDIFF> ) <LPAREN> <link linkend="SQLParser.html-prod88">intervalType</link> <COMMA> <link linkend="SQLParser.html-prod16">expression</link> <COMMA> <link linkend="SQLParser.html-prod16">expression</link> <RPAREN> ) | ( ( <LEFT> | <RIGHT> | <CHAR> ) <LPAREN> ( <link linkend="SQLParser.html-prod16">expression</link> ( <COMMA> <link linkend="SQLParser.html-prod16">expression</link> )* )? <RPAREN> ) | ( ( <INSERT> ) <LPAREN> ( <link linkend="SQLParser.html-prod16">expression!
</link> ( <COMMA> <link linkend="SQLParser.html-prod16">expression</link> )* )? <RPAREN> ) | ( ( <TRANSLATE> ) <LPAREN> ( <link linkend="SQLParser.html-prod16">expression</link> ( <COMMA> <link linkend="SQLParser.html-prod16">expression</link> )* )? <RPAREN> ) | ( <link linkend="SQLParser.html-prod2">id</link> <LPAREN> ( <link linkend="SQLParser.html-prod16">expression</link> ( <COMMA> <link linkend="SQLParser.html-prod16">expression</link> )* )? <RPAREN> ) )</para></entry>
- </row>
-
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod31" xreflabel="dataType"/>dataType</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para>( <STRING> | <BOOLEAN> | <BYTE> | <SHORT> | <CHAR> | <INTEGER> | <LONG> | <BIGINTEGER> | <FLOAT> | <DOUBLE> | <BIGDECIMAL> | <DATE> | <TIME> | <TIMESTAMP> | <OBJECT> | <BLOB> | <CLOB> | <XML> )</para></entry>
- </row>
-
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod88" xreflabel="intervalType"/>intervalType</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para>( <SQL_TSI_FRAC_SECOND> | <SQL_TSI_SECOND> | <SQL_TSI_MINUTE> | <SQL_TSI_HOUR> | <SQL_TSI_DAY> | <SQL_TSI_WEEK> | <SQL_TSI_MONTH> | <SQL_TSI_QUARTER> | <SQL_TSI_YEAR> )</para></entry>
- </row>
-
- <row>
- <entry align="right" valign="top"><para><anchor id="SQLParser.html-prod84" xreflabel="literal"/>literal</para></entry>
- <entry align="center" valign="top"><para>::=</para></entry>
- <entry align="left" valign="top"><para>( <link linkend="SQLParser.html-prod1">stringVal</link> | <INTEGERVAL> | <FLOATVAL> | <FALSE> | <TRUE> | <UNKNOWN> | <NULL> | ( ( <BOOLEANTYPE> | <TIMESTAMPTYPE> | <DATETYPE> | <TIMETYPE> ) <link linkend="SQLParser.html-prod1">stringVal</link> <RBRACE> ) )</para></entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- </sect1>
+</para></entry></row>
+</tbody>
+</tgroup>
+</informaltable>
+</sect1>
+<sect1>
+<title>NON-TERMINALS</title>
+<informaltable frame="none">
+<tgroup cols="2">
+<colspec colname="c1" colwidth=".33*"/>
+<colspec colname="c2" colwidth="*"/>
+<tbody>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod1" xreflabel="stringVal"/>stringVal</para></entry>
+<entry align="left" valign="top"><para>::=
+( <STRINGVAL> )</para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod2" xreflabel="id"/>id</para></entry>
+<entry align="left" valign="top"><para>::=
+( <ID> )</para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod3" xreflabel="command"/>command</para></entry>
+<entry align="left" valign="top"><para>::=
+( ( <link linkend="prod4">createUpdateProcedure</link> ) | <link linkend="prod5">userCommand</link> | <link linkend="prod6">callableStatement</link> ) ( <SEMICOLON> )? <EOF></para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod5" xreflabel="userCommand"/>userCommand</para></entry>
+<entry align="left" valign="top"><para>::=
+( <link linkend="prod7">queryExpression</link> | <link linkend="prod8">storedProcedure</link> | <link linkend="prod9">insert</link> | <link linkend="prod10">update</link> | <link linkend="prod11">delete</link> | <link linkend="prod12">dropTable</link> | <link linkend="prod13">createTempTable</link> )</para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod12" xreflabel="dropTable"/>dropTable</para></entry>
+<entry align="left" valign="top"><para>::=
+<DROP> <TABLE> <link linkend="prod2">id</link></para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod13" xreflabel="createTempTable"/>createTempTable</para></entry>
+<entry align="left" valign="top"><para>::=
+<CREATE> <LOCAL> <TEMPORARY> <TABLE> <link linkend="prod2">id</link> <LPAREN> <link linkend="prod14">createElementsWithTypes</link> <RPAREN></para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod15" xreflabel="errorStatement"/>errorStatement</para></entry>
+<entry align="left" valign="top"><para>::=
+<ERROR> <link linkend="prod16">expression</link></para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod17" xreflabel="statement"/>statement</para></entry>
+<entry align="left" valign="top"><para>::=
+( <link linkend="prod18">ifStatement</link> | <link linkend="prod19">loopStatement</link> | <link linkend="prod20">whileStatement</link> | <link linkend="prod21">delimitedStatement</link> )</para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod21" xreflabel="delimitedStatement"/>delimitedStatement</para></entry>
+<entry align="left" valign="top"><para>::=
+( <link linkend="prod22">sqlStatement</link> | <link linkend="prod15">errorStatement</link> | <link linkend="prod23">assignStatement</link> | <link linkend="prod24">declareStatement</link> | <link linkend="prod25">continueStatement</link> | <link linkend="prod26">breakStatement</link> ) <SEMICOLON></para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod27" xreflabel="block"/>block</para></entry>
+<entry align="left" valign="top"><para>::=
+( <link linkend="prod17">statement</link> | ( <BEGIN> ( <link linkend="prod17">statement</link> )* <END> ) )</para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod26" xreflabel="breakStatement"/>breakStatement</para></entry>
+<entry align="left" valign="top"><para>::=
+<BREAK></para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod25" xreflabel="continueStatement"/>continueStatement</para></entry>
+<entry align="left" valign="top"><para>::=
+<CONTINUE></para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod20" xreflabel="whileStatement"/>whileStatement</para></entry>
+<entry align="left" valign="top"><para>::=
+<WHILE> <LPAREN> <link linkend="prod28">criteria</link> <RPAREN> <link linkend="prod27">block</link></para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod19" xreflabel="loopStatement"/>loopStatement</para></entry>
+<entry align="left" valign="top"><para>::=
+<LOOP> <ON> <LPAREN> <link linkend="prod7">queryExpression</link> <RPAREN> <AS> <link linkend="prod2">id</link> <link linkend="prod27">block</link></para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod18" xreflabel="ifStatement"/>ifStatement</para></entry>
+<entry align="left" valign="top"><para>::=
+<IF> <LPAREN> <link linkend="prod28">criteria</link> <RPAREN> <link linkend="prod27">block</link> ( <ELSE> <link linkend="prod27">block</link> )?</para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod29" xreflabel="criteriaSelector"/>criteriaSelector</para></entry>
+<entry align="left" valign="top"><para>::=
+( ( <EQ> | <NE> | <NE2> | <LE> | <GE> | <LT> | <GT> | <IN> | <LIKE> | ( <IS> <NULL> ) | <BETWEEN> ) )? <CRITERIA> ( <ON> <LPAREN> <link linkend="prod2">id</link> ( <COMMA> <link linkend="prod2">id</link> )* <RPAREN> )?</para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod30" xreflabel="hasCriteria"/>hasCriteria</para></entry>
+<entry align="left" valign="top"><para>::=
+<HAS> <link linkend="prod29">criteriaSelector</link></para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod24" xreflabel="declareStatement"/>declareStatement</para></entry>
+<entry align="left" valign="top"><para>::=
+<DECLARE> <link linkend="prod31">dataType</link> <link linkend="prod2">id</link> ( <EQ> <link linkend="prod32">assignStatementOperand</link> )?</para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod23" xreflabel="assignStatement"/>assignStatement</para></entry>
+<entry align="left" valign="top"><para>::=
+<link linkend="prod2">id</link> <EQ> <link linkend="prod32">assignStatementOperand</link></para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod32" xreflabel="assignStatementOperand"/>assignStatementOperand</para></entry>
+<entry align="left" valign="top"><para>::=
+( ( <link linkend="prod9">insert</link> ) | <link linkend="prod10">update</link> | <link linkend="prod11">delete</link> | <link linkend="prod8">storedProcedure</link> | ( <link linkend="prod16">expression</link> ) | <link linkend="prod7">queryExpression</link> )</para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod22" xreflabel="sqlStatement"/>sqlStatement</para></entry>
+<entry align="left" valign="top"><para>::=
+( ( <link linkend="prod33">dynamicCommand</link> ) | <link linkend="prod5">userCommand</link> )</para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod34" xreflabel="translateCriteria"/>translateCriteria</para></entry>
+<entry align="left" valign="top"><para>::=
+<TRANSLATE> <link linkend="prod29">criteriaSelector</link> ( <WITH> <LPAREN> <link linkend="prod2">id</link> <EQ> <link linkend="prod16">expression</link> ( <COMMA> <link linkend="prod2">id</link> <EQ> <link linkend="prod16">expression</link> )* <RPAREN> )?</para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod4" xreflabel="createUpdateProcedure"/>createUpdateProcedure</para></entry>
+<entry align="left" valign="top"><para>::=
+<CREATE> ( <VIRTUAL> )? ( <UPDATE> )? <PROCEDURE> <link linkend="prod27">block</link></para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod33" xreflabel="dynamicCommand"/>dynamicCommand</para></entry>
+<entry align="left" valign="top"><para>::=
+( <EXECUTE> | <EXEC> ) <STRING> <link linkend="prod16">expression</link> ( <AS> <link linkend="prod14">createElementsWithTypes</link> ( <INTO> <link linkend="prod2">id</link> )? )? ( <USING> <link linkend="prod35">setClauseList</link> )? ( <UPDATE> ( ( <INTEGERVAL> ) | ( <STAR> ) ) )?</para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod35" xreflabel="setClauseList"/>setClauseList</para></entry>
+<entry align="left" valign="top"><para>::=
+<link linkend="prod2">id</link> <EQ> ( <COMMA> <link linkend="prod2">id</link> <EQ> )*</para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod14" xreflabel="createElementsWithTypes"/>createElementsWithTypes</para></entry>
+<entry align="left" valign="top"><para>::=
+<link linkend="prod2">id</link> <link linkend="prod31">dataType</link> ( <COMMA> <link linkend="prod2">id</link> <link linkend="prod31">dataType</link> )*</para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod6" xreflabel="callableStatement"/>callableStatement</para></entry>
+<entry align="left" valign="top"><para>::=
+<LBRACE> ( <QMARK> <EQ> )? <CALL> <link linkend="prod2">id</link> ( <LPAREN> ( <link linkend="prod36">executeUnnamedParams</link> ) <RPAREN> )? <RBRACE> ( <link linkend="prod37">option</link> )?</para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod8" xreflabel="storedProcedure"/>storedProcedure</para></entry>
+<entry align="left" valign="top"><para>::=
+( ( ( <EXEC> ) | ( <EXECUTE> ) | ( <CALL> ) ) <link linkend="prod2">id</link> <LPAREN> ( <link linkend="prod38">executeNamedParams</link> | <link linkend="prod36">executeUnnamedParams</link> ) <RPAREN> ) ( <link linkend="prod37">option</link> )?</para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod36" xreflabel="executeUnnamedParams"/>executeUnnamedParams</para></entry>
+<entry align="left" valign="top"><para>::=
+( <link linkend="prod16">expression</link> ( <COMMA> <link linkend="prod16">expression</link> )* )?</para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod38" xreflabel="executeNamedParams"/>executeNamedParams</para></entry>
+<entry align="left" valign="top"><para>::=
+( <link linkend="prod2">id</link> <EQ> <link linkend="prod16">expression</link> ( <COMMA> <link linkend="prod2">id</link> <EQ> <link linkend="prod16">expression</link> )* )</para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod9" xreflabel="insert"/>insert</para></entry>
+<entry align="left" valign="top"><para>::=
+<INSERT> <INTO> <link linkend="prod2">id</link> ( <LPAREN> <link linkend="prod2">id</link> ( <COMMA> <link linkend="prod2">id</link> )* <RPAREN> )? ( ( <VALUES> <link linkend="prod39">rowValues</link> ) | ( <link linkend="prod7">queryExpression</link> ) ) ( <link linkend="prod37">option</link> )?</para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod39" xreflabel="rowValues"/>rowValues</para></entry>
+<entry align="left" valign="top"><para>::=
+<LPAREN> <link linkend="prod16">expression</link> ( <COMMA> <link linkend="prod16">expression</link> )* <RPAREN></para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod10" xreflabel="update"/>update</para></entry>
+<entry align="left" valign="top"><para>::=
+<UPDATE> <link linkend="prod2">id</link> <SET> <link linkend="prod35">setClauseList</link> ( <link linkend="prod40">where</link> )? ( <link linkend="prod37">option</link> )?</para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod11" xreflabel="delete"/>delete</para></entry>
+<entry align="left" valign="top"><para>::=
+<DELETE> <FROM> <link linkend="prod2">id</link> ( <link linkend="prod40">where</link> )? ( <link linkend="prod37">option</link> )?</para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod7" xreflabel="queryExpression"/>queryExpression</para></entry>
+<entry align="left" valign="top"><para>::=
+<link linkend="prod41">queryExpressionBody</link></para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod41" xreflabel="queryExpressionBody"/>queryExpressionBody</para></entry>
+<entry align="left" valign="top"><para>::=
+<link linkend="prod42">queryTerm</link> ( ( <UNION> | <EXCEPT> ) ( <ALL> | <DISTINCT> )? <link linkend="prod42">queryTerm</link> )* ( <link linkend="prod43">orderby</link> )? ( <link linkend="prod44">limit</link> )? ( <link linkend="prod37">option</link> )?</para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod42" xreflabel="queryTerm"/>queryTerm</para></entry>
+<entry align="left" valign="top"><para>::=
+<link linkend="prod45">queryPrimary</link> ( <INTERSECT> ( <ALL> | <DISTINCT> )? <link linkend="prod45">queryPrimary</link> )*</para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod45" xreflabel="queryPrimary"/>queryPrimary</para></entry>
+<entry align="left" valign="top"><para>::=
+( <link linkend="prod46">query</link> | ( <LPAREN> <link linkend="prod41">queryExpressionBody</link> <RPAREN> ) )</para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod46" xreflabel="query"/>query</para></entry>
+<entry align="left" valign="top"><para>::=
+<link linkend="prod47">select</link> ( <link linkend="prod48">into</link> )? ( <link linkend="prod49">from</link> ( <link linkend="prod40">where</link> )? ( <link linkend="prod50">groupBy</link> )? ( <link linkend="prod51">having</link> )? )?</para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod48" xreflabel="into"/>into</para></entry>
+<entry align="left" valign="top"><para>::=
+<INTO> ( <link linkend="prod2">id</link> )</para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod47" xreflabel="select"/>select</para></entry>
+<entry align="left" valign="top"><para>::=
+<SELECT> ( <ALL> | ( <DISTINCT> ) )? ( <STAR> | ( <link linkend="prod52">selectSymbol</link> ( <COMMA> <link linkend="prod52">selectSymbol</link> )* ) )</para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod52" xreflabel="selectSymbol"/>selectSymbol</para></entry>
+<entry align="left" valign="top"><para>::=
+( ( <ALL_IN_GROUP> ) | ( <link linkend="prod16">expression</link> ) ( ( <AS> )? ( <link linkend="prod2">id</link> ) )? )</para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod53" xreflabel="aggregateSymbol"/>aggregateSymbol</para></entry>
+<entry align="left" valign="top"><para>::=
+( ( <COUNT> <LPAREN> <STAR> <RPAREN> ) | ( ( <COUNT> | <SUM> | <AVG> | <MIN> | <MAX> ) <LPAREN> ( <DISTINCT> )? <link linkend="prod16">expression</link> <RPAREN> ) )</para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod49" xreflabel="from"/>from</para></entry>
+<entry align="left" valign="top"><para>::=
+<FROM> ( <link linkend="prod54">tableReference</link> ( <COMMA> <link linkend="prod54">tableReference</link> )* )</para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod54" xreflabel="tableReference"/>tableReference</para></entry>
+<entry align="left" valign="top"><para>::=
+( ( <LBRACE> <OJ> <link linkend="prod55">tableReferenceUnescaped</link> <RBRACE> ) | <link linkend="prod55">tableReferenceUnescaped</link> )</para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod55" xreflabel="tableReferenceUnescaped"/>tableReferenceUnescaped</para></entry>
+<entry align="left" valign="top"><para>::=
+( <link linkend="prod56">joinedTable</link> | <link linkend="prod57">tablePrimary</link> )</para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod56" xreflabel="joinedTable"/>joinedTable</para></entry>
+<entry align="left" valign="top"><para>::=
+<link linkend="prod57">tablePrimary</link> ( ( <link linkend="prod58">crossJoin</link> | <link linkend="prod59">qualifiedJoin</link> ) )+</para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod58" xreflabel="crossJoin"/>crossJoin</para></entry>
+<entry align="left" valign="top"><para>::=
+( ( <CROSS> | <UNION> ) <JOIN> <link linkend="prod57">tablePrimary</link> )</para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod59" xreflabel="qualifiedJoin"/>qualifiedJoin</para></entry>
+<entry align="left" valign="top"><para>::=
+( ( ( <RIGHT> ( <OUTER> )? ) | ( <LEFT> ( <OUTER> )? ) | ( <FULL> ( <OUTER> )? ) | <INNER> )? <JOIN> <link linkend="prod54">tableReference</link> <ON> <link linkend="prod28">criteria</link> )</para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod57" xreflabel="tablePrimary"/>tablePrimary</para></entry>
+<entry align="left" valign="top"><para>::=
+( <link linkend="prod60">unaryFromClause</link> | <link linkend="prod61">subqueryFromClause</link> | ( <LPAREN> <link linkend="prod56">joinedTable</link> <RPAREN> ) ) ( ( <MAKEDEP> ) | ( <MAKENOTDEP> ) )?</para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod61" xreflabel="subqueryFromClause"/>subqueryFromClause</para></entry>
+<entry align="left" valign="top"><para>::=
+<LPAREN> ( <link linkend="prod7">queryExpression</link> | <link linkend="prod8">storedProcedure</link> ) <RPAREN> ( <AS> )? <link linkend="prod2">id</link></para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod60" xreflabel="unaryFromClause"/>unaryFromClause</para></entry>
+<entry align="left" valign="top"><para>::=
+( <ID> ( ( <AS> )? <link linkend="prod2">id</link> )? )</para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod40" xreflabel="where"/>where</para></entry>
+<entry align="left" valign="top"><para>::=
+<WHERE> <link linkend="prod28">criteria</link></para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod28" xreflabel="criteria"/>criteria</para></entry>
+<entry align="left" valign="top"><para>::=
+<link linkend="prod62">compoundCritOr</link></para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod62" xreflabel="compoundCritOr"/>compoundCritOr</para></entry>
+<entry align="left" valign="top"><para>::=
+<link linkend="prod63">compoundCritAnd</link> ( <OR> <link linkend="prod63">compoundCritAnd</link> )*</para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod63" xreflabel="compoundCritAnd"/>compoundCritAnd</para></entry>
+<entry align="left" valign="top"><para>::=
+<link linkend="prod64">notCrit</link> ( <AND> <link linkend="prod64">notCrit</link> )*</para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod64" xreflabel="notCrit"/>notCrit</para></entry>
+<entry align="left" valign="top"><para>::=
+( <NOT> )? <link linkend="prod65">primary</link></para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod65" xreflabel="primary"/>primary</para></entry>
+<entry align="left" valign="top"><para>::=
+( <link linkend="prod66">predicate</link> | ( <LPAREN> <link linkend="prod28">criteria</link> <RPAREN> ) )</para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod66" xreflabel="predicate"/>predicate</para></entry>
+<entry align="left" valign="top"><para>::=
+( <link linkend="prod67">subqueryCompareCriteria</link> | <link linkend="prod68">compareCrit</link> | <link linkend="prod69">matchCrit</link> | <link linkend="prod70">betweenCrit</link> | <link linkend="prod71">setCrit</link> | <link linkend="prod72">existsCriteria</link> | <link linkend="prod30">hasCriteria</link> | <link linkend="prod34">translateCriteria</link> | <link linkend="prod73">isNullCrit</link> )</para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod68" xreflabel="compareCrit"/>compareCrit</para></entry>
+<entry align="left" valign="top"><para>::=
+<link linkend="prod16">expression</link> ( <EQ> | <NE> | <NE2> | <LT> | <LE> | <GT> | <GE> ) <link linkend="prod16">expression</link></para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod74" xreflabel="subquery"/>subquery</para></entry>
+<entry align="left" valign="top"><para>::=
+<LPAREN> ( <link linkend="prod7">queryExpression</link> | <link linkend="prod8">storedProcedure</link> ) <RPAREN></para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod67" xreflabel="subqueryCompareCriteria"/>subqueryCompareCriteria</para></entry>
+<entry align="left" valign="top"><para>::=
+<link linkend="prod16">expression</link> ( <EQ> | <NE> | <NE2> | <LT> | <LE> | <GT> | <GE> ) ( <ANY> | <SOME> | <ALL> ) <link linkend="prod74">subquery</link></para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod69" xreflabel="matchCrit"/>matchCrit</para></entry>
+<entry align="left" valign="top"><para>::=
+( <link linkend="prod16">expression</link> ( <NOT> )? <LIKE> <link linkend="prod16">expression</link> ( <link linkend="prod75">escapeChar</link> | ( <LBRACE> <link linkend="prod75">escapeChar</link> <RBRACE> ) )? )</para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod75" xreflabel="escapeChar"/>escapeChar</para></entry>
+<entry align="left" valign="top"><para>::=
+<ESCAPE> <link linkend="prod1">stringVal</link></para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod70" xreflabel="betweenCrit"/>betweenCrit</para></entry>
+<entry align="left" valign="top"><para>::=
+<link linkend="prod16">expression</link> ( <NOT> )? <BETWEEN> <link linkend="prod16">expression</link> <AND> <link linkend="prod16">expression</link></para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod73" xreflabel="isNullCrit"/>isNullCrit</para></entry>
+<entry align="left" valign="top"><para>::=
+<link linkend="prod16">expression</link> <IS> ( <NOT> )? <NULL></para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod71" xreflabel="setCrit"/>setCrit</para></entry>
+<entry align="left" valign="top"><para>::=
+<link linkend="prod16">expression</link> ( <NOT> )? <IN> ( ( <link linkend="prod74">subquery</link> ) | ( <LPAREN> <link linkend="prod16">expression</link> ( <COMMA> <link linkend="prod16">expression</link> )* <RPAREN> ) )</para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod72" xreflabel="existsCriteria"/>existsCriteria</para></entry>
+<entry align="left" valign="top"><para>::=
+<EXISTS> <link linkend="prod74">subquery</link></para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod50" xreflabel="groupBy"/>groupBy</para></entry>
+<entry align="left" valign="top"><para>::=
+<GROUP> <BY> ( <link linkend="prod76">groupByItem</link> ( <COMMA> <link linkend="prod76">groupByItem</link> )* )</para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod76" xreflabel="groupByItem"/>groupByItem</para></entry>
+<entry align="left" valign="top"><para>::=
+<link linkend="prod16">expression</link></para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod51" xreflabel="having"/>having</para></entry>
+<entry align="left" valign="top"><para>::=
+<HAVING> <link linkend="prod28">criteria</link></para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod43" xreflabel="orderby"/>orderby</para></entry>
+<entry align="left" valign="top"><para>::=
+<ORDER> <BY> <link linkend="prod77">sortKey</link> ( <ASC> | <DESC> )? ( <COMMA> <link linkend="prod77">sortKey</link> ( <ASC> | <DESC> )? )*</para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod77" xreflabel="sortKey"/>sortKey</para></entry>
+<entry align="left" valign="top"><para>::=
+<link linkend="prod16">expression</link></para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod44" xreflabel="limit"/>limit</para></entry>
+<entry align="left" valign="top"><para>::=
+<LIMIT> ( <INTEGERVAL> | <QMARK> ) ( <COMMA> ( <INTEGERVAL> | <QMARK> ) )?</para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod37" xreflabel="option"/>option</para></entry>
+<entry align="left" valign="top"><para>::=
+<OPTION> ( <SHOWPLAN> | <PLANONLY> | <DEBUG> | <MAKEDEP> <link linkend="prod2">id</link> ( <COMMA> <link linkend="prod2">id</link> )* | <MAKENOTDEP> <link linkend="prod2">id</link> ( <COMMA> <link linkend="prod2">id</link> )* | <NOCACHE> ( <link linkend="prod2">id</link> ( <COMMA> <link linkend="prod2">id</link> )* )? )*</para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod16" xreflabel="expression"/>expression</para></entry>
+<entry align="left" valign="top"><para>::=
+<link linkend="prod78">concatExpression</link></para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod78" xreflabel="concatExpression"/>concatExpression</para></entry>
+<entry align="left" valign="top"><para>::=
+( <link linkend="prod79">plusExpression</link> ( <CONCAT_OP> <link linkend="prod79">plusExpression</link> )* )</para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod79" xreflabel="plusExpression"/>plusExpression</para></entry>
+<entry align="left" valign="top"><para>::=
+( <link linkend="prod80">timesExpression</link> ( <link linkend="prod81">plusOperator</link> <link linkend="prod80">timesExpression</link> )* )</para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod81" xreflabel="plusOperator"/>plusOperator</para></entry>
+<entry align="left" valign="top"><para>::=
+( <PLUS> | <MINUS> )</para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod80" xreflabel="timesExpression"/>timesExpression</para></entry>
+<entry align="left" valign="top"><para>::=
+( <link linkend="prod82">basicExpression</link> ( <link linkend="prod83">timesOperator</link> <link linkend="prod82">basicExpression</link> )* )</para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod83" xreflabel="timesOperator"/>timesOperator</para></entry>
+<entry align="left" valign="top"><para>::=
+( <STAR> | <SLASH> )</para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod82" xreflabel="basicExpression"/>basicExpression</para></entry>
+<entry align="left" valign="top"><para>::=
+( <QMARK> | <link linkend="prod84">literal</link> | ( <LBRACE> <FN> <link linkend="prod85">function</link> <RBRACE> ) | ( <link linkend="prod53">aggregateSymbol</link> ) | ( <link linkend="prod85">function</link> ) | ( <ID> ) | ( <LPAREN> <link linkend="prod16">expression</link> <RPAREN> ) | <link linkend="prod74">subquery</link> | <link linkend="prod86">caseExpression</link> | <link linkend="prod87">searchedCaseExpression</link> )</para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod86" xreflabel="caseExpression"/>caseExpression</para></entry>
+<entry align="left" valign="top"><para>::=
+<CASE> <link linkend="prod16">expression</link> ( <WHEN> <link linkend="prod16">expression</link> <THEN> <link linkend="prod16">expression</link> )+ ( <ELSE> <link linkend="prod16">expression</link> )? <END></para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod87" xreflabel="searchedCaseExpression"/>searchedCaseExpression</para></entry>
+<entry align="left" valign="top"><para>::=
+<CASE> ( <WHEN> <link linkend="prod28">criteria</link> <THEN> <link linkend="prod16">expression</link> )+ ( <ELSE> <link linkend="prod16">expression</link> )? <END></para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod85" xreflabel="function"/>function</para></entry>
+<entry align="left" valign="top"><para>::=
+( ( <CONVERT> <LPAREN> <link linkend="prod16">expression</link> <COMMA> <link linkend="prod31">dataType</link> <RPAREN> ) | ( <CAST> <LPAREN> <link linkend="prod16">expression</link> <AS> <link linkend="prod31">dataType</link> <RPAREN> ) | ( ( <TIMESTAMPADD> | <TIMESTAMPDIFF> ) <LPAREN> <link linkend="prod88">intervalType</link> <COMMA> <link linkend="prod16">expression</link> <COMMA> <link linkend="prod16">expression</link> <RPAREN> ) | ( ( <LEFT> | <RIGHT> | <CHAR> | <USER> | <YEAR> | <MONTH> | <HOUR> | <MINUTE> | <SECOND> ) <LPAREN> ( <link linkend="prod16">expression</link> ( <COMMA> <link linkend="prod16">expression</link> )* )? <RPAREN> ) | ( ( <INSERT> ) <LPAREN> ( <link linkend="prod16">expression</link> ( <COMMA> <link linkend="prod16">expression</link> )* )? <RPAREN> ) | ( ( <TRANSLAT!
E> ) <LPAREN> ( <link linkend="prod16">expression</link> ( <COMMA> <link linkend="prod16">expression</link> )* )? <RPAREN> ) | ( <link linkend="prod2">id</link> <LPAREN> ( <link linkend="prod16">expression</link> ( <COMMA> <link linkend="prod16">expression</link> )* )? <RPAREN> ) )</para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod31" xreflabel="dataType"/>dataType</para></entry>
+<entry align="left" valign="top"><para>::=
+( <STRING> | <VARCHAR> | <BOOLEAN> | <BYTE> | <TINYINT> | <SHORT> | <SMALLINT> | <CHAR> | <INTEGER> | <LONG> | <BIGINT> | <BIGINTEGER> | <FLOAT> | <REAL> | <DOUBLE> | <BIGDECIMAL> | <DECIMAL> | <DATE> | <TIME> | <TIMESTAMP> | <OBJECT> | <BLOB> | <CLOB> | <XML> )</para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod88" xreflabel="intervalType"/>intervalType</para></entry>
+<entry align="left" valign="top"><para>::=
+( <SQL_TSI_FRAC_SECOND> | <SQL_TSI_SECOND> | <SQL_TSI_MINUTE> | <SQL_TSI_HOUR> | <SQL_TSI_DAY> | <SQL_TSI_WEEK> | <SQL_TSI_MONTH> | <SQL_TSI_QUARTER> | <SQL_TSI_YEAR> )</para></entry></row>
+<row>
+<entry align="right" valign="top"><para><anchor id="prod84" xreflabel="literal"/>literal</para></entry>
+<entry align="left" valign="top"><para>::=
+( <link linkend="prod1">stringVal</link> | <INTEGERVAL> | <FLOATVAL> | <FALSE> | <TRUE> | <UNKNOWN> | <NULL> | ( ( <BOOLEANTYPE> | <TIMESTAMPTYPE> | <DATETYPE> | <TIMETYPE> ) <link linkend="prod1">stringVal</link> <RBRACE> ) )</para></entry></row>
+</tbody>
+</tgroup>
+</informaltable>
+</sect1>
</appendix>
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/process/AbstractWorkItem.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/process/AbstractWorkItem.java 2010-03-19 01:45:14 UTC (rev 1976)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/AbstractWorkItem.java 2010-03-19 16:17:09 UTC (rev 1977)
@@ -43,12 +43,8 @@
private volatile boolean release;
public void run() {
- try {
- startProcessing();
- process();
- } finally {
- endProcessing();
- }
+ startProcessing();
+ process();
}
synchronized ThreadState getThreadState() {
@@ -146,6 +142,7 @@
@Override
public void workCompleted(WorkEvent arg0) {
+ endProcessing();
}
@Override
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/process/Request.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/process/Request.java 2010-03-19 01:45:14 UTC (rev 1976)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/Request.java 2010-03-19 16:17:09 UTC (rev 1977)
@@ -33,7 +33,6 @@
import org.teiid.dqp.internal.process.multisource.MultiSourceMetadataWrapper;
import org.teiid.dqp.internal.process.multisource.MultiSourcePlanToProcessConverter;
import org.teiid.dqp.internal.process.validator.AuthorizationValidationVisitor;
-import org.teiid.plan.api.ExecutionProperties;
import com.metamatrix.api.exception.MetaMatrixComponentException;
import com.metamatrix.api.exception.MetaMatrixProcessingException;
@@ -351,9 +350,9 @@
boolean startAutoWrapTxn = false;
- if(ExecutionProperties.TXN_WRAP_ON.equals(requestMsg.getTxnAutoWrapMode())){
+ if(RequestMessage.TXN_WRAP_ON.equals(requestMsg.getTxnAutoWrapMode())){
startAutoWrapTxn = true;
- } else if (ExecutionProperties.TXN_WRAP_DETECT.equals(requestMsg.getTxnAutoWrapMode())){
+ } else if (RequestMessage.TXN_WRAP_DETECT.equals(requestMsg.getTxnAutoWrapMode())){
boolean transactionalRead = requestMsg.getTransactionIsolation() == Connection.TRANSACTION_REPEATABLE_READ
|| requestMsg.getTransactionIsolation() == Connection.TRANSACTION_SERIALIZABLE;
if (!transactionalRead && userCommand instanceof StoredProcedure && ((StoredProcedure)userCommand).getUpdateCount() == 0) {
@@ -467,11 +466,6 @@
LogManager.logInfo(LogConstants.CTX_DQP, debugLog);
}
}
-
- if (analysisRecord.recordQueryPlan()) {
- analysisRecord.setQueryPlan(processPlan.getDescriptionProperties());
- }
-
LogManager.logDetail(LogConstants.CTX_DQP, new Object[] { DQPPlugin.Util.getString("BasicInterceptor.ProcessTree_for__4"), requestId, processPlan }); //$NON-NLS-1$
} catch (QueryMetadataException e) {
Object[] params = new Object[] { requestId};
Modified: trunk/engine/src/main/java/org/teiid/metadata/TransformationMetadata.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/metadata/TransformationMetadata.java 2010-03-19 01:45:14 UTC (rev 1976)
+++ trunk/engine/src/main/java/org/teiid/metadata/TransformationMetadata.java 2010-03-19 16:17:09 UTC (rev 1977)
@@ -86,6 +86,16 @@
* index files for various metadata properties.
*/
public class TransformationMetadata extends BasicQueryMetadata implements Serializable {
+
+ public static class Resource {
+ public Resource(VirtualFile file, boolean visible) {
+ this.file = file;
+ this.visible = visible;
+ }
+ VirtualFile file;
+ boolean visible;
+ }
+
private static final long serialVersionUID = 1058627332954475287L;
/** Delimiter character used when specifying fully qualified entity names */
@@ -98,7 +108,7 @@
private static UnmodifiableProperties EMPTY_PROPS = new UnmodifiableProperties(new Properties());
private final CompositeMetadataStore store;
- private Map<VirtualFile, Boolean> vdbEntries;
+ private Map<String, Resource> vdbEntries;
private FunctionLibrary functionLibrary;
private VDBMetaData vdbMetaData;
@@ -113,14 +123,15 @@
* TransformationMetadata constructor
* @param context Object containing the info needed to lookup metadta.
*/
- public TransformationMetadata(VDBMetaData vdbMetadata, final CompositeMetadataStore store, Map<VirtualFile, Boolean> vdbEntries, Collection <FunctionMethod> udfMethods) {
+ public TransformationMetadata(VDBMetaData vdbMetadata, final CompositeMetadataStore store, Map<String, Resource> vdbEntries, Collection <FunctionMethod> udfMethods) {
ArgCheck.isNotNull(store);
this.vdbMetaData = vdbMetadata;
this.store = store;
if (vdbEntries == null) {
- vdbEntries = Collections.emptyMap();
+ this.vdbEntries = Collections.emptyMap();
+ } else {
+ this.vdbEntries = vdbEntries;
}
- this.vdbEntries = vdbEntries;
if (udfMethods == null) {
udfMethods = Collections.emptyList();
}
@@ -1037,14 +1048,9 @@
if (resourcePath == null) {
return null;
}
- for (final VirtualFile f:this.vdbEntries.keySet()) {
- if (f.getPathName().equals(resourcePath)) {
- Boolean v = this.vdbEntries.get(f);
- if (v.booleanValue()) {
- return f;
- }
- break;
- }
+ Resource r = this.vdbEntries.get(resourcePath);
+ if (r != null && r.visible) {
+ return r.file;
}
return null;
}
@@ -1074,14 +1080,8 @@
* @since 4.3
*/
public String[] getVDBResourcePaths() throws MetaMatrixComponentException, QueryMetadataException {
- ArrayList<String> paths = new ArrayList<String>();
- for (VirtualFile f:this.vdbEntries.keySet()) {
- Boolean v = this.vdbEntries.get(f);
- if (v.booleanValue()) {
- paths.add(f.getPathName());
- }
- }
- return paths.toArray(new String[paths.size()]);
+ ArrayList<String> paths = new ArrayList<String>(this.vdbEntries.keySet());
+ return paths.toArray(new String[paths.size()]);
}
/**
Modified: trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestDQPCore.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestDQPCore.java 2010-03-19 01:45:14 UTC (rev 1976)
+++ trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestDQPCore.java 2010-03-19 16:17:09 UTC (rev 1977)
@@ -35,7 +35,6 @@
import org.mockito.Mockito;
import org.teiid.dqp.internal.datamgr.impl.ConnectorManagerRepository;
import org.teiid.dqp.internal.datamgr.impl.FakeTransactionService;
-import org.teiid.plan.api.ExecutionProperties;
import com.metamatrix.api.exception.query.QueryResolverException;
import com.metamatrix.common.queue.FakeWorkManager;
@@ -43,7 +42,6 @@
import com.metamatrix.dqp.message.ResultsMessage;
import com.metamatrix.dqp.service.AutoGenDataService;
import com.metamatrix.dqp.service.FakeBufferService;
-import com.metamatrix.platform.security.api.SessionToken;
import com.metamatrix.query.unittest.FakeMetadataFactory;
public class TestDQPCore {
@@ -189,7 +187,7 @@
public void helpTestVisibilityFails(String sql) throws Exception {
RequestMessage reqMsg = exampleRequestMessage(sql);
- reqMsg.setTxnAutoWrapMode(ExecutionProperties.TXN_WRAP_OFF);
+ reqMsg.setTxnAutoWrapMode(RequestMessage.TXN_WRAP_OFF);
Future<ResultsMessage> message = core.executeRequest(reqMsg.getExecutionId(), reqMsg);
ResultsMessage results = message.get(5000, TimeUnit.MILLISECONDS);
assertEquals("[QueryValidatorException]Group does not exist: BQT3.SmallA", results.getException().toString()); //$NON-NLS-1$
@@ -216,7 +214,7 @@
DQPWorkContext.getWorkContext().getSession().setSessionId(sessionid);
DQPWorkContext.getWorkContext().getSession().setUserName(userName);
if (txnAutoWrap) {
- reqMsg.setTxnAutoWrapMode(ExecutionProperties.TXN_WRAP_ON);
+ reqMsg.setTxnAutoWrapMode(RequestMessage.TXN_WRAP_ON);
}
Future<ResultsMessage> message = core.executeRequest(reqMsg.getExecutionId(), reqMsg);
Modified: trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestWorkItemState.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestWorkItemState.java 2010-03-19 01:45:14 UTC (rev 1976)
+++ trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestWorkItemState.java 2010-03-19 16:17:09 UTC (rev 1977)
@@ -44,6 +44,12 @@
}
@Override
+ public void run() {
+ super.run();
+ workCompleted(null);
+ }
+
+ @Override
protected boolean isDoneProcessing() {
return isDone;
}
Modified: trunk/metadata/src/main/java/org/teiid/metadata/index/IndexMetadataFactory.java
===================================================================
--- trunk/metadata/src/main/java/org/teiid/metadata/index/IndexMetadataFactory.java 2010-03-19 01:45:14 UTC (rev 1976)
+++ trunk/metadata/src/main/java/org/teiid/metadata/index/IndexMetadataFactory.java 2010-03-19 16:17:09 UTC (rev 1977)
@@ -29,10 +29,13 @@
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
+import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import org.jboss.virtual.VirtualFile;
+import org.teiid.adminapi.impl.ModelMetaData;
+import org.teiid.adminapi.impl.VDBMetaData;
import org.teiid.connector.metadata.runtime.AbstractMetadataRecord;
import org.teiid.connector.metadata.runtime.Column;
import org.teiid.connector.metadata.runtime.ColumnSet;
@@ -47,13 +50,16 @@
import org.teiid.core.index.IEntryResult;
import org.teiid.internal.core.index.Index;
import org.teiid.metadata.TransformationMetadata;
+import org.teiid.metadata.TransformationMetadata.Resource;
import com.metamatrix.api.exception.query.QueryMetadataException;
+import com.metamatrix.core.CoreConstants;
import com.metamatrix.core.MetaMatrixCoreException;
import com.metamatrix.core.MetaMatrixRuntimeException;
import com.metamatrix.core.id.UUID;
import com.metamatrix.core.util.ArgCheck;
import com.metamatrix.core.util.StringUtil;
+import com.metamatrix.core.vdb.VdbConstants;
/**
* Loads MetadataRecords from index files.
@@ -66,7 +72,7 @@
private Map<String, Table> tableCache = new HashMap<String, Table>();
private MetadataStore store;
private HashSet<VirtualFile> indexFiles = new HashSet<VirtualFile>();
- private Map<VirtualFile, Boolean> vdbEntries;
+ private LinkedHashMap<String, Resource> vdbEntries;
public MetadataStore getMetadataStore() throws IOException {
if (this.store == null) {
@@ -94,11 +100,50 @@
this.indexFiles.add(f);
}
- public void addEntriesPlusVisibilities(Map<VirtualFile, Boolean> entries) {
- this.vdbEntries = entries;
+ public void addEntriesPlusVisibilities(VirtualFile root, VDBMetaData vdb) throws IOException {
+ LinkedHashMap<String, Resource> visibilityMap = new LinkedHashMap<String, Resource>();
+ for(VirtualFile f: root.getChildrenRecursively()) {
+ visibilityMap.put("/" + f.getPathName(), new Resource(f, isFileVisible(f.getPathName(), vdb))); //$NON-NLS-1$
+ }
+ this.vdbEntries = visibilityMap;
}
- public Map<VirtualFile, Boolean> getEntriesPlusVisibilities(){
+ private final static boolean isSystemModelWithSystemTableType(String modelName) {
+ return CoreConstants.SYSTEM_MODEL.equalsIgnoreCase(modelName);
+ }
+
+ private boolean isFileVisible(String pathInVDB, VDBMetaData vdb) {
+
+ String modelName = StringUtil.getFirstToken(StringUtil.getLastToken(pathInVDB, "/"), "."); //$NON-NLS-1$ //$NON-NLS-2$
+
+ // If this is any of the Public System Models, like JDBC,ODBC system
+ // models
+ if (isSystemModelWithSystemTableType(modelName)) {
+ return true;
+ }
+
+ ModelMetaData model = vdb.getModel(modelName);
+ if (model != null) {
+ return model.isVisible();
+ }
+
+ String entry = StringUtil.getLastToken(pathInVDB, "/"); //$NON-NLS-1$
+
+ // index files should not be visible
+ if( entry.endsWith(VdbConstants.INDEX_EXT) || entry.endsWith(VdbConstants.SEARCH_INDEX_EXT)) {
+ return false;
+ }
+
+ // deployment file should not be visible
+ if(entry.equalsIgnoreCase(VdbConstants.DEPLOYMENT_FILE)) {
+ return false;
+ }
+
+ // any other file should be visible
+ return true;
+ }
+
+ public LinkedHashMap<String, Resource> getEntriesPlusVisibilities(){
return this.vdbEntries;
}
Modified: trunk/metadata/src/test/java/org/teiid/metadata/index/VDBMetadataFactory.java
===================================================================
--- trunk/metadata/src/test/java/org/teiid/metadata/index/VDBMetadataFactory.java 2010-03-19 01:45:14 UTC (rev 1976)
+++ trunk/metadata/src/test/java/org/teiid/metadata/index/VDBMetadataFactory.java 2010-03-19 16:17:09 UTC (rev 1977)
@@ -28,14 +28,13 @@
import java.net.URL;
import java.util.Arrays;
import java.util.Collection;
-import java.util.HashMap;
import java.util.List;
-import java.util.Map;
import org.jboss.virtual.VFS;
import org.jboss.virtual.VirtualFile;
import org.jboss.virtual.VirtualFileFilter;
import org.jboss.virtual.plugins.context.zip.ZipEntryContext;
+import org.teiid.adminapi.impl.VDBMetaData;
import org.teiid.connector.metadata.runtime.MetadataStore;
import org.teiid.metadata.CompositeMetadataStore;
import org.teiid.metadata.TransformationMetadata;
@@ -66,26 +65,15 @@
try {
VirtualFile vdbFile = getVirtualFile(vdbURL);
- MetadataStore store = getMetadataStore(vdbFile);
+ IndexMetadataFactory imf = getMetadataStore(vdbFile);
+ imf.addEntriesPlusVisibilities(vdbFile, new VDBMetaData());
- List<VirtualFile> files = vdbFile.getChildrenRecursively(new VirtualFileFilter() {
- @Override
- public boolean accepts(VirtualFile file) {
- return !file.getName().endsWith(IndexConstants.NAME_DELIM_CHAR+IndexConstants.INDEX_EXT);
- }
- });
-
- Map<VirtualFile, Boolean> vdbFiles = new HashMap<VirtualFile, Boolean>();
- for (VirtualFile virtualFile : files) {
- vdbFiles.put(virtualFile, Boolean.TRUE);
- }
-
Collection <FunctionMethod> methods = null;
if (udfFile != null) {
methods = FunctionMetadataReader.loadFunctionMethods(udfFile.openStream());
}
- MetadataStore system = getMetadataStore(getVirtualFile(VDBMetadataFactory.class.getResource("/System.vdb"))); //$NON-NLS-1$
- vdbmetadata = new TransformationMetadata(null, new CompositeMetadataStore(Arrays.asList(system, store)), vdbFiles, methods);
+ MetadataStore system = getMetadataStore(getVirtualFile(VDBMetadataFactory.class.getResource("/System.vdb"))).getMetadataStore(); //$NON-NLS-1$
+ vdbmetadata = new TransformationMetadata(null, new CompositeMetadataStore(Arrays.asList(system, imf.getMetadataStore())), imf.getEntriesPlusVisibilities(), methods);
VDB_CACHE.put(vdbURL, vdbmetadata);
return vdbmetadata;
} catch (URISyntaxException e) {
@@ -101,7 +89,7 @@
return vdbFile;
}
- private static MetadataStore getMetadataStore(VirtualFile vdbFile)
+ private static IndexMetadataFactory getMetadataStore(VirtualFile vdbFile)
throws IOException {
List<VirtualFile> children = vdbFile.getChildrenRecursively(new VirtualFileFilter() {
@Override
@@ -115,8 +103,7 @@
imf.addIndexFile(f);
}
- MetadataStore store = imf.getMetadataStore();
- return store;
+ return imf;
}
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-03-19 01:45:14 UTC (rev 1976)
+++ trunk/pom.xml 2010-03-19 16:17:09 UTC (rev 1977)
@@ -470,7 +470,6 @@
</dependencies>
</dependencyManagement>
<modules>
- <module>test-integration</module>
<module>common-core</module>
<module>connector-api</module>
<module>client</module>
@@ -484,7 +483,7 @@
<module>cache-jbosscache</module>
<module>hibernate-dialect</module>
<module>jboss-integration</module>
-
+ <module>test-integration</module>
</modules>
<distributionManagement>
<repository>
Modified: trunk/runtime/src/main/java/org/teiid/deployers/VDBDeployer.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/deployers/VDBDeployer.java 2010-03-19 01:45:14 UTC (rev 1976)
+++ trunk/runtime/src/main/java/org/teiid/deployers/VDBDeployer.java 2010-03-19 16:17:09 UTC (rev 1977)
@@ -25,8 +25,8 @@
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collection;
+import java.util.LinkedHashMap;
import java.util.List;
-import java.util.Map;
import javax.naming.InitialContext;
import javax.naming.NamingException;
@@ -35,7 +35,6 @@
import org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer;
import org.jboss.deployers.structure.spi.DeploymentUnit;
import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
-import org.jboss.virtual.VirtualFile;
import org.teiid.adminapi.Model;
import org.teiid.adminapi.VDB;
import org.teiid.adminapi.impl.ModelMetaData;
@@ -48,6 +47,7 @@
import org.teiid.dqp.internal.datamgr.impl.ConnectorManagerRepository;
import org.teiid.metadata.CompositeMetadataStore;
import org.teiid.metadata.TransformationMetadata;
+import org.teiid.metadata.TransformationMetadata.Resource;
import org.teiid.metadata.index.IndexMetadataFactory;
import org.teiid.runtime.RuntimePlugin;
@@ -107,7 +107,7 @@
IndexMetadataFactory indexFactory = unit.getAttachment(IndexMetadataFactory.class);
UDFMetaData udf = unit.getAttachment(UDFMetaData.class);
if (indexFactory != null) {
- Map<VirtualFile, Boolean> visibilityMap = indexFactory.getEntriesPlusVisibilities();
+ LinkedHashMap<String, Resource> visibilityMap = indexFactory.getEntriesPlusVisibilities();
metadata = buildTransformationMetaData(deployment, visibilityMap, store, udf);
}
else {
@@ -166,7 +166,7 @@
// does this need to be synchronized?
- private TransformationMetadata buildTransformationMetaData(VDBMetaData vdb, Map<VirtualFile, Boolean> visibilityMap, CompositeMetadataStore store, UDFMetaData udf) throws DeploymentException {
+ private TransformationMetadata buildTransformationMetaData(VDBMetaData vdb, LinkedHashMap<String, Resource> visibilityMap, CompositeMetadataStore store, UDFMetaData udf) throws DeploymentException {
// get the system VDB metadata store
MetadataStore systemStore = this.vdbRepository.getMetadataStore(CoreConstants.SYSTEM_VDB, 1);
Modified: trunk/runtime/src/main/java/org/teiid/deployers/VDBParserDeployer.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/deployers/VDBParserDeployer.java 2010-03-19 01:45:14 UTC (rev 1976)
+++ trunk/runtime/src/main/java/org/teiid/deployers/VDBParserDeployer.java 2010-03-19 16:17:09 UTC (rev 1977)
@@ -23,7 +23,6 @@
import java.io.File;
import java.util.HashMap;
-import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -54,7 +53,6 @@
import com.metamatrix.common.log.LogConstants;
import com.metamatrix.common.log.LogManager;
import com.metamatrix.core.CoreConstants;
-import com.metamatrix.core.util.StringUtil;
import com.metamatrix.core.vdb.VdbConstants;
/**
@@ -134,20 +132,12 @@
vdb.setUrl(unit.getRoot().toURL().toExternalForm());
- // add the entries and determine their visibility
- VirtualFile root = unit.getRoot();
- List<VirtualFile> children = root.getChildrenRecursively();
- Map<VirtualFile, Boolean> visibilityMap = new LinkedHashMap<VirtualFile, Boolean>();
- for(VirtualFile f: children) {
- visibilityMap.put(f, isFileVisible(f.getPathName(), vdb));
- }
-
// build the metadata store
List<Object> indexFiles = metadata.get(IndexMetadataFactory.class);
if (indexFiles != null && !indexFiles.isEmpty()) {
IndexMetadataFactory imf = (IndexMetadataFactory)indexFiles.get(0);
if (imf != null) {
- imf.addEntriesPlusVisibilities(visibilityMap);
+ imf.addEntriesPlusVisibilities(unit.getRoot(), vdb);
unit.addAttachment(IndexMetadataFactory.class, imf);
// add the cached store.
@@ -190,41 +180,6 @@
LogManager.logTrace(LogConstants.CTX_RUNTIME, "VDB "+unit.getRoot().getName()+" has been parsed."); //$NON-NLS-1$ //$NON-NLS-2$
return vdb;
- }
-
- private final static boolean isSystemModelWithSystemTableType(String modelName) {
- return CoreConstants.SYSTEM_MODEL.equalsIgnoreCase(modelName);
- }
-
- private boolean isFileVisible(String pathInVDB, VDBMetaData vdb) {
-
- String modelName = StringUtil.getFirstToken(StringUtil.getLastToken(pathInVDB, "/"), "."); //$NON-NLS-1$ //$NON-NLS-2$
-
- // If this is any of the Public System Models, like JDBC,ODBC system
- // models
- if (isSystemModelWithSystemTableType(modelName)) {
- return true;
- }
-
- ModelMetaData model = vdb.getModel(modelName);
- if (model != null) {
- return model.isVisible();
- }
-
- String entry = StringUtil.getLastToken(pathInVDB, "/"); //$NON-NLS-1$
-
- // index files should not be visible
- if( entry.endsWith(VdbConstants.INDEX_EXT) || entry.endsWith(VdbConstants.SEARCH_INDEX_EXT)) {
- return false;
- }
-
- // deployment file should not be visible
- if(entry.equalsIgnoreCase(VdbConstants.DEPLOYMENT_FILE)) {
- return false;
- }
-
- // any other file should be visible
- return true;
}
public void setObjectSerializer(ObjectSerializer serializer) {
Modified: trunk/test-integration/common/src/test/java/org/teiid/dqp/internal/process/TestXMLTypeTranslations.java
===================================================================
--- trunk/test-integration/common/src/test/java/org/teiid/dqp/internal/process/TestXMLTypeTranslations.java 2010-03-19 01:45:14 UTC (rev 1976)
+++ trunk/test-integration/common/src/test/java/org/teiid/dqp/internal/process/TestXMLTypeTranslations.java 2010-03-19 16:17:09 UTC (rev 1977)
@@ -22,6 +22,7 @@
package org.teiid.dqp.internal.process;
+import java.io.FileInputStream;
import java.math.BigInteger;
import java.util.Arrays;
import java.util.HashSet;
@@ -35,6 +36,7 @@
import org.teiid.metadata.CompositeMetadataStore;
import org.teiid.metadata.TransformationMetadata;
+import com.metamatrix.core.util.ObjectConverterUtil;
import com.metamatrix.core.util.UnitTestUtil;
import com.metamatrix.dqp.message.RequestID;
import com.metamatrix.query.metadata.QueryMetadataInterface;
@@ -108,7 +110,7 @@
DataTierManagerImpl dataMgr = new DataTierManagerImpl(core, null, null, 0, 0, 0);
doProcess(metadata,
sql,
- finder, dataMgr , new List[0], DEBUG);
+ finder, dataMgr , new List[] {Arrays.asList(new String(ObjectConverterUtil.convertToByteArray(new FileInputStream(UnitTestUtil.getTestDataFile("test-schema.xsd")))))}, DEBUG); //$NON-NLS-1$
}
Added: trunk/test-integration/common/src/test/resources/test-schema.xsd
===================================================================
--- trunk/test-integration/common/src/test/resources/test-schema.xsd (rev 0)
+++ trunk/test-integration/common/src/test/resources/test-schema.xsd 2010-03-19 16:17:09 UTC (rev 1977)
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsd:schema targetNamespace="http://www.metamatrix.com/XMLSchema/DataSets/XSDTypes" xmlns:XSDTypesNS="http://www.metamatrix.com/XMLSchema/DataSets/XSDTypes" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+ <xsd:annotation>
+ <xsd:documentation xml:lang="en">
+ MetaMatrix Data Set Library Version 1.1.
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:complexType name="testelements">
+ <xsd:sequence maxOccurs="unbounded" minOccurs="0">
+ <xsd:element name="book" type="XSDTypesNS:testelement"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="testelement">
+ <xsd:annotation>
+ <xsd:documentation>
+ Flat representation of a book, consisting of full title, set of authors, publisher,
+ publication date, and edition. ISBN and book type are represented as attributes.
+ Book type is optional. Edition defaults to blank. There can be more than one
+ authors tag.
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="datetime" type="xsd:dateTime"/>
+ <xsd:element name="double" type="xsd:double"/>
+ <xsd:element name="float" type="xsd:float"/>
+ <xsd:element name="gday" type="xsd:gDay"/>
+ <xsd:element name="gmonth" type="xsd:gMonth"/>
+ <xsd:element name="gmonthday" type="xsd:gMonthDay"/>
+ <xsd:element name="gyear" type="xsd:gYear"/>
+ <xsd:element name="gyearmonth" type="xsd:gYearMonth"/>
+ <xsd:element name="string" type="xsd:string"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:element name="test" type="XSDTypesNS:testelements"/>
+</xsd:schema>
Property changes on: trunk/test-integration/common/src/test/resources/test-schema.xsd
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/test-integration/db/src/main/java/org/teiid/test/framework/ConfigPropertyNames.java
===================================================================
--- trunk/test-integration/db/src/main/java/org/teiid/test/framework/ConfigPropertyNames.java 2010-03-19 01:45:14 UTC (rev 1976)
+++ trunk/test-integration/db/src/main/java/org/teiid/test/framework/ConfigPropertyNames.java 2010-03-19 16:17:09 UTC (rev 1977)
@@ -1,6 +1,6 @@
package org.teiid.test.framework;
-import org.teiid.plan.api.ExecutionProperties;
+import org.teiid.jdbc.ExecutionProperties;
import org.teiid.test.client.TestClientTransaction;
import org.teiid.test.framework.connection.ConnectionStrategy;
import org.teiid.test.framework.datasource.DataSource;
Modified: trunk/test-integration/db/src/main/java/org/teiid/test/framework/query/AbstractQueryTransactionTest.java
===================================================================
--- trunk/test-integration/db/src/main/java/org/teiid/test/framework/query/AbstractQueryTransactionTest.java 2010-03-19 01:45:14 UTC (rev 1976)
+++ trunk/test-integration/db/src/main/java/org/teiid/test/framework/query/AbstractQueryTransactionTest.java 2010-03-19 16:17:09 UTC (rev 1977)
@@ -95,8 +95,8 @@
@Override
protected void assignExecutionProperties(Statement stmt) {
- if (stmt instanceof org.teiid.jdbc.api.Statement) {
- org.teiid.jdbc.api.Statement statement = (org.teiid.jdbc.api.Statement) stmt;
+ if (stmt instanceof org.teiid.jdbc.TeiidStatement) {
+ org.teiid.jdbc.TeiidStatement statement = (org.teiid.jdbc.TeiidStatement) stmt;
Properties executionProperties = this.connStrategy.getEnvironment();
if (executionProperties != null) {
More information about the teiid-commits
mailing list