teiid SVN: r4243 - in trunk: build/kits/jboss-as7/docs/teiid and 22 other directories.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2012-07-18 22:57:49 -0400 (Wed, 18 Jul 2012)
New Revision: 4243
Added:
trunk/engine/src/main/resources/org/teiid/metadata/
trunk/engine/src/main/resources/org/teiid/metadata/SYS.sql
trunk/engine/src/main/resources/org/teiid/metadata/SYSADMIN.sql
Removed:
trunk/engine/src/main/resources/org/teiid/datatypes/
Modified:
trunk/api/src/main/java/org/teiid/metadata/BaseColumn.java
trunk/api/src/main/java/org/teiid/metadata/Column.java
trunk/api/src/main/java/org/teiid/metadata/Datatype.java
trunk/api/src/main/java/org/teiid/metadata/MetadataFactory.java
trunk/api/src/main/java/org/teiid/metadata/Table.java
trunk/build/kits/jboss-as7/docs/teiid/teiid-releasenotes.html
trunk/engine/src/main/java/org/teiid/datatypes/SystemDataTypes.java
trunk/engine/src/main/java/org/teiid/dqp/internal/process/DataTierManagerImpl.java
trunk/engine/src/main/java/org/teiid/query/mapping/xml/MappingBaseNode.java
trunk/engine/src/main/java/org/teiid/query/mapping/xml/MappingElement.java
trunk/engine/src/main/java/org/teiid/query/mapping/xml/MappingNode.java
trunk/engine/src/main/java/org/teiid/query/metadata/DDLConstants.java
trunk/engine/src/main/java/org/teiid/query/metadata/DDLStringVisitor.java
trunk/engine/src/main/java/org/teiid/query/metadata/MetadataValidator.java
trunk/engine/src/main/java/org/teiid/query/parser/QueryParser.java
trunk/engine/src/main/java/org/teiid/query/parser/SQLParserUtil.java
trunk/engine/src/main/java/org/teiid/query/processor/relational/ListNestedSortComparator.java
trunk/engine/src/main/javacc/org/teiid/query/parser/SQLParser.jj
trunk/engine/src/main/resources/org/teiid/metadata/types.dat
trunk/engine/src/test/java/org/teiid/query/metadata/TestDDLStringVisitor.java
trunk/engine/src/test/java/org/teiid/query/parser/TestDDLParser.java
trunk/metadata/src/main/java/org/teiid/metadata/index/IndexMetadataStore.java
trunk/metadata/src/main/java/org/teiid/metadata/index/RecordFactory.java
trunk/runtime/src/main/java/org/teiid/deployers/PgCatalogMetadataStore.java
trunk/runtime/src/main/java/org/teiid/deployers/VDBRepository.java
trunk/runtime/src/main/java/org/teiid/runtime/EmbeddedServer.java
trunk/test-integration/common/src/test/java/org/teiid/dqp/internal/process/BaseQueryTest.java
trunk/test-integration/common/src/test/resources/TestJDBCSocketTransport/testSelect.expected
trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetColumns.expected
trunk/test-integration/common/src/test/resources/TestODBCSchema/test_PG_AM.expected
trunk/test-integration/common/src/test/resources/TestODBCSchema/test_PG_ATTRDEF.expected
trunk/test-integration/common/src/test/resources/TestODBCSchema/test_PG_ATTRIBUTE.expected
trunk/test-integration/common/src/test/resources/TestODBCSchema/test_PG_CLASS.expected
trunk/test-integration/common/src/test/resources/TestODBCSchema/test_PG_DATABASE.expected
trunk/test-integration/common/src/test/resources/TestODBCSchema/test_PG_INDEX.expected
trunk/test-integration/common/src/test/resources/TestODBCSchema/test_PG_NAMESPACE.expected
trunk/test-integration/common/src/test/resources/TestODBCSchema/test_PG_TRIGGER.expected
trunk/test-integration/common/src/test/resources/TestODBCSchema/test_PG_TYPE.expected
trunk/test-integration/common/src/test/resources/TestODBCSchema/test_PG_USER.expected
trunk/test-integration/common/src/test/resources/TestODBCSocketTransport/testSelect.expected
trunk/test-integration/common/src/test/resources/TestPartsDatabaseMetadata/testColumns.expected
trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testColumns.expected
trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testDataTypes.expected
trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testKeyColumns.expected
trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testKeys.expected
trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testProperties.expected
trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testSchemas.expected
trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testTables.expected
trunk/test-integration/common/src/test/resources/TestVirtualDocWithVirtualProc/testDefect15241b.expected
Log:
TEIID-2103 numerous metadata corrections to teiid types and the initial creation of system vdb ddl
Modified: trunk/api/src/main/java/org/teiid/metadata/BaseColumn.java
===================================================================
--- trunk/api/src/main/java/org/teiid/metadata/BaseColumn.java 2012-07-17 01:00:58 UTC (rev 4242)
+++ trunk/api/src/main/java/org/teiid/metadata/BaseColumn.java 2012-07-19 02:57:49 UTC (rev 4243)
@@ -139,10 +139,21 @@
}
public void setDatatype(Datatype datatype) {
+ setDatatype(datatype, false);
+ }
+
+ public void setDatatype(Datatype datatype, boolean copyAttributes) {
this.datatype = datatype;
if (datatype != null) {
this.datatypeUUID = this.datatype.getUUID();
this.runtimeType = this.datatype.getRuntimeTypeName();
+ if (copyAttributes) {
+ this.radix = this.datatype.getRadix();
+ this.length = this.datatype.getLength();
+ this.precision = this.datatype.getPrecision();
+ this.scale = this.datatype.getScale();
+ this.nullType = this.datatype.getNullType();
+ }
}
}
Modified: trunk/api/src/main/java/org/teiid/metadata/Column.java
===================================================================
--- trunk/api/src/main/java/org/teiid/metadata/Column.java 2012-07-17 01:00:58 UTC (rev 4242)
+++ trunk/api/src/main/java/org/teiid/metadata/Column.java 2012-07-19 02:57:49 UTC (rev 4243)
@@ -65,12 +65,28 @@
private int nullValues = -1;
private ColumnSet<?> parent;
+
+ @Override
+ public void setDatatype(Datatype datatype, boolean copyAttributes) {
+ super.setDatatype(datatype, copyAttributes);
+ if (datatype != null && copyAttributes) {
+ //if (DefaultDataTypes.STRING.equals(datatype.getRuntimeTypeName())) {
+ //TODO - this is not quite valid since we are dealing with length representing chars in UTF-16, then there should be twice the bytes
+ //this.charOctetLength = datatype.getLength();
+ //}
+ this.signed = datatype.isSigned();
+ this.autoIncremented = datatype.isAutoIncrement();
+ this.caseSensitive = datatype.isCaseSensitive();
+ this.signed = datatype.isSigned();
+ }
+ }
+
public void setParent(ColumnSet<?> parent) {
this.parent = parent;
}
@Override
- public AbstractMetadataRecord getParent() {
+ public ColumnSet<?> getParent() {
return parent;
}
Modified: trunk/api/src/main/java/org/teiid/metadata/Datatype.java
===================================================================
--- trunk/api/src/main/java/org/teiid/metadata/Datatype.java 2012-07-17 01:00:58 UTC (rev 4242)
+++ trunk/api/src/main/java/org/teiid/metadata/Datatype.java 2012-07-19 02:57:49 UTC (rev 4243)
@@ -53,20 +53,35 @@
private boolean isCaseSensitive;
private Type type;
private SearchType searchType;
- private NullType nullType;
+ private NullType nullType = NullType.Nullable;
private String javaClassName = DEFAULT_JAVA_CLASS_NAME;
private String runtimeTypeName;
private String basetypeName;
private Variety varietyType;
+ /**
+ * Get the length of the type.
+ *
+ * For string (binary or character) types, it is the number of characters.
+ * For all other types it is the byte storage size.
+ * @return
+ */
public int getLength() {
return this.length;
}
-
+
+ /**
+ * @deprecated
+ * @see #getPrecision()
+ */
public int getPrecisionLength() {
return this.precisionLength;
}
+ public int getPrecision() {
+ return this.precisionLength;
+ }
+
public int getScale() {
return this.scale;
}
@@ -172,6 +187,14 @@
/**
* @param i
*/
+ public void setPrecision(int i) {
+ precisionLength = i;
+ }
+
+ /**
+ * @deprecated
+ * @see #setPrecision(int)
+ */
public void setPrecisionLength(int i) {
precisionLength = i;
}
Modified: trunk/api/src/main/java/org/teiid/metadata/MetadataFactory.java
===================================================================
--- trunk/api/src/main/java/org/teiid/metadata/MetadataFactory.java 2012-07-17 01:00:58 UTC (rev 4242)
+++ trunk/api/src/main/java/org/teiid/metadata/MetadataFactory.java 2012-07-19 02:57:49 UTC (rev 4243)
@@ -30,7 +30,6 @@
import java.util.Map;
import java.util.Properties;
import java.util.TreeMap;
-import java.util.UUID;
import org.teiid.connector.DataPlugin;
import org.teiid.translator.TranslatorException;
@@ -54,16 +53,37 @@
private String rawMetadata;
private Properties importProperties;
private Schema schema = new Schema();
+ private String idPrefix;
+ private int count;
public MetadataFactory(String vdbName, int vdbVersion, String schemaName, Map<String, Datatype> dataTypes, Properties importProperties, String rawMetadata) {
this.vdbName = vdbName;
this.vdbVersion = vdbVersion;
this.dataTypes = dataTypes;
schema.setName(schemaName);
+ long msb = longHash(vdbName, 0);
+ msb = 31*msb + vdbVersion;
+ msb = longHash(schemaName, msb);
+ idPrefix = "tid:" + hex(msb, 12); //$NON-NLS-1$
setUUID(schema);
this.importProperties = importProperties;
this.rawMetadata = rawMetadata;
}
+
+ private long longHash(String s, long h) {
+ if (s == null) {
+ return h;
+ }
+ for (int i = 0; i < s.length(); i++) {
+ h = 31*h + s.charAt(i);
+ }
+ return h;
+ }
+
+ private static String hex(long val, int hexLength) {
+ long hi = 1L << (hexLength * 4);
+ return Long.toHexString(hi | (val & (hi - 1))).substring(1);
+ }
public Properties getImportProperties() {
return importProperties;
@@ -72,9 +92,15 @@
public String getRawMetadata() {
return this.rawMetadata;
}
-
+
protected void setUUID(AbstractMetadataRecord record) {
- record.setUUID("mmuuid:" +UUID.randomUUID()); //$NON-NLS-1$
+ int lsb = 0;
+ if (record.getParent() != null) {
+ lsb = record.getParent().getUUID().hashCode();
+ }
+ lsb = 31*lsb + record.getName().hashCode();
+ String uuid = idPrefix+"-"+hex(lsb, 8) + "-" + hex(count++, 8); //$NON-NLS-1$ //$NON-NLS-2$
+ record.setUUID(uuid);
}
public String getName() {
@@ -122,10 +148,7 @@
column.setName(name);
table.addColumn(column);
column.setPosition(table.getColumns().size()); //1 based indexing
- Datatype datatype = setColumnType(type, column);
- column.setCaseSensitive(datatype.isCaseSensitive());
- column.setAutoIncremented(datatype.isAutoIncrement());
- column.setSigned(datatype.isSigned());
+ setColumnType(type, column);
setUUID(column);
return column;
}
@@ -136,12 +159,7 @@
if (datatype == null) {
throw new TranslatorException(DataPlugin.Event.TEIID60009, DataPlugin.Util.gs(DataPlugin.Event.TEIID60009, type));
}
- column.setDatatype(datatype);
- column.setDatatypeUUID(datatype.getUUID());
- column.setLength(datatype.getLength());
- column.setPrecision(datatype.getPrecisionLength());
- column.setRadix(datatype.getRadix());
- column.setRuntimeType(datatype.getRuntimeTypeName());
+ column.setDatatype(datatype, true);
return datatype;
}
Modified: trunk/api/src/main/java/org/teiid/metadata/Table.java
===================================================================
--- trunk/api/src/main/java/org/teiid/metadata/Table.java 2012-07-17 01:00:58 UTC (rev 4242)
+++ trunk/api/src/main/java/org/teiid/metadata/Table.java 2012-07-19 02:57:49 UTC (rev 4243)
@@ -382,10 +382,30 @@
if (this.attachments == null) {
return null;
}
- Object result = this.attachments.get(type.getName());
+ Object result = this.attachments.get(type);
if (result == null)
return null;
return type.cast(result);
}
+ /**
+ * remove attachment
+ *
+ * @param <T> the expected type
+ * @param type the type
+ * @return the attachment or null if not present
+ * @throws IllegalArgumentException for a null name or type
+ */
+ synchronized public <T> T removeAttachment(Class<T> type) {
+ if (type == null)
+ throw new IllegalArgumentException("Null type"); //$NON-NLS-1$
+ if (this.attachments == null) {
+ return null;
+ }
+ Object result = this.attachments.remove(type);
+ if (result == null)
+ return null;
+ return type.cast(result);
+ }
+
}
\ No newline at end of file
Modified: trunk/build/kits/jboss-as7/docs/teiid/teiid-releasenotes.html
===================================================================
--- trunk/build/kits/jboss-as7/docs/teiid/teiid-releasenotes.html 2012-07-17 01:00:58 UTC (rev 4242)
+++ trunk/build/kits/jboss-as7/docs/teiid/teiid-releasenotes.html 2012-07-19 02:57:49 UTC (rev 4243)
@@ -48,9 +48,11 @@
<li>VDB.getUrl has been removed.
<li>VDB.Status now has three states - LOADING, ACTIVE, REMOVED. To check for validity use the isValid method, rather than checking for the VALID state.
<li>The standalone and cli configuration files specify a setting for the teiid subsystem policy-decider-module. If a module is not specified, then data roles will not be checked.
- <li>local connections specifying a VDB version will wait for their VDB to finish loading before allowing a connection.
+ <li>local connections specifying a VDB version will wait for their VDB to finish loading before allowing a connection, see the waitForLoad connection property for more.
<li>jsonToXml document elements will contain xsi:type attribute values of decimal and boolean respectively for number and boolean json values to allow for differentiation from string values.
<li>Result set cache entries can now have updatable set to false to indicate that updates should not purge the entry.
+ <li>Datatype default values have been corrected for Teiid built-in types. All datatypes are now nullable by default, only character string types are case sensitive, numeric types have radix 10, and length/precision/scale have been set appropriately.
+ <li>pg catalog and dynamic vdb created metadata will use a generated Teiid id rather than a random UUID.
<ul>
<h4>from 7.x</h4>
Modified: trunk/engine/src/main/java/org/teiid/datatypes/SystemDataTypes.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/datatypes/SystemDataTypes.java 2012-07-17 01:00:58 UTC (rev 4242)
+++ trunk/engine/src/main/java/org/teiid/datatypes/SystemDataTypes.java 2012-07-19 02:57:49 UTC (rev 4243)
@@ -26,15 +26,32 @@
import java.io.InputStream;
import java.io.InputStreamReader;
import java.nio.charset.Charset;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
import java.util.Properties;
+import org.teiid.core.TeiidRuntimeException;
+import org.teiid.core.types.DataTypeManager;
+import org.teiid.core.types.DataTypeManager.DefaultDataTypes;
+import org.teiid.core.util.Assertion;
import org.teiid.core.util.PropertiesUtils;
import org.teiid.metadata.Datatype;
-import org.teiid.metadata.MetadataStore;
public class SystemDataTypes {
- public static void loadSystemDatatypes(MetadataStore ms) throws IOException {
- InputStream is = SystemDataTypes.class.getClassLoader().getResourceAsStream("org/teiid/datatypes/types.dat"); //$NON-NLS-1$
+
+ private static SystemDataTypes INSTANCE = new SystemDataTypes();
+
+ public static SystemDataTypes getInstance() {
+ return INSTANCE;
+ }
+
+ private List<Datatype> dataTypes = new ArrayList<Datatype>();
+ private Map<String, Datatype> typeMap = new HashMap<String, Datatype>();
+
+ public SystemDataTypes() {
+ InputStream is = SystemDataTypes.class.getClassLoader().getResourceAsStream("org/teiid/metadata/types.dat"); //$NON-NLS-1$
try {
InputStreamReader isr = new InputStreamReader(is, Charset.forName("UTF-8")); //$NON-NLS-1$
BufferedReader br = new BufferedReader(isr);
@@ -50,10 +67,46 @@
}
}
PropertiesUtils.setBeanProperties(dt, p, null);
- ms.addDatatype(dt);
+ dataTypes.add(dt);
+ if (dt.isBuiltin()) {
+ typeMap.put(dt.getRuntimeTypeName(), dt);
+ }
}
+ } catch (IOException e) {
+ throw new TeiidRuntimeException(e);
} finally {
- is.close();
+ try {
+ is.close();
+ } catch (IOException e) {
+ throw new TeiidRuntimeException(e);
+ }
}
+ addAliasType(DataTypeManager.DataTypeAliases.BIGINT);
+ addAliasType(DataTypeManager.DataTypeAliases.DECIMAL);
+ addAliasType(DataTypeManager.DataTypeAliases.REAL);
+ addAliasType(DataTypeManager.DataTypeAliases.SMALLINT);
+ addAliasType(DataTypeManager.DataTypeAliases.TINYINT);
+ addAliasType(DataTypeManager.DataTypeAliases.VARCHAR);
+ for (String name : DataTypeManager.getAllDataTypeNames()) {
+ if (!name.equals(DefaultDataTypes.NULL)) {
+ Assertion.isNotNull(typeMap.get(name), name);
+ }
+ }
}
+
+ private void addAliasType(String alias) {
+ Class<?> typeClass = DataTypeManager.getDataTypeClass(alias);
+ String primaryType = DataTypeManager.getDataTypeName(typeClass);
+ Datatype dt = typeMap.get(primaryType);
+ Assertion.isNotNull(dt, alias);
+ typeMap.put(alias, dt);
+ }
+
+ public List<Datatype> getDataTypes() {
+ return dataTypes;
+ }
+
+ public Map<String, Datatype> getBuiltinTypeMap() {
+ return typeMap;
+ }
}
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/process/DataTierManagerImpl.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/process/DataTierManagerImpl.java 2012-07-17 01:00:58 UTC (rev 4242)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/DataTierManagerImpl.java 2012-07-19 02:57:49 UTC (rev 4243)
@@ -310,7 +310,7 @@
case DATATYPES:
for (Datatype datatype : metadata.getDatatypes().values()) {
rows.add(Arrays.asList(datatype.getName(), datatype.isBuiltin(), datatype.isBuiltin(), datatype.getName(), datatype.getJavaClassName(), datatype.getScale(),
- datatype.getLength(), datatype.getNullType().toString(), datatype.isSigned(), datatype.isAutoIncrement(), datatype.isCaseSensitive(), datatype.getPrecisionLength(),
+ datatype.getLength(), datatype.getNullType().toString(), datatype.isSigned(), datatype.isAutoIncrement(), datatype.isCaseSensitive(), datatype.getPrecision(),
datatype.getRadix(), datatype.getSearchType().toString(), datatype.getUUID(), datatype.getRuntimeTypeName(), datatype.getBasetypeName(), datatype.getAnnotation(), oid++));
}
break;
Modified: trunk/engine/src/main/java/org/teiid/query/mapping/xml/MappingBaseNode.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/mapping/xml/MappingBaseNode.java 2012-07-17 01:00:58 UTC (rev 4242)
+++ trunk/engine/src/main/java/org/teiid/query/mapping/xml/MappingBaseNode.java 2012-07-19 02:57:49 UTC (rev 4243)
@@ -223,6 +223,16 @@
}
tables.add(tablename);
setProperty(MappingNodeConstants.Properties.TEMP_GROUP_NAMES, tables);
- }
+ }
+ @Override
+ public MappingNode clone() {
+ MappingBaseNode clone = (MappingBaseNode) super.clone();
+ List<String> staging = getStagingTables();
+ if (getStagingTables() != null && staging != MappingNodeConstants.Defaults.DEFAULT_VALUES.get(MappingNodeConstants.Properties.TEMP_GROUP_NAMES)) {
+ clone.setStagingTables(new ArrayList<String>(staging));
+ }
+ return clone;
+ }
+
}
Modified: trunk/engine/src/main/java/org/teiid/query/mapping/xml/MappingElement.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/mapping/xml/MappingElement.java 2012-07-17 01:00:58 UTC (rev 4242)
+++ trunk/engine/src/main/java/org/teiid/query/mapping/xml/MappingElement.java 2012-07-19 02:57:49 UTC (rev 4243)
@@ -333,6 +333,19 @@
}
return super.getSourceNode();
}
+
+ @Override
+ public MappingNode clone() {
+ MappingElement node = (MappingElement)super.clone();
+ if (namespace != null) {
+ node.namespace = new Namespace(namespace.getPrefix(), namespace.getUri());
+ }
+ Properties p = (Properties)getProperty(MappingNodeConstants.Properties.NAMESPACE_DECLARATIONS);
+ if (p != null) {
+ node.setProperty(MappingNodeConstants.Properties.NAMESPACE_DECLARATIONS, p.clone());
+ }
+ return node;
+ }
}
Modified: trunk/engine/src/main/java/org/teiid/query/mapping/xml/MappingNode.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/mapping/xml/MappingNode.java 2012-07-17 01:00:58 UTC (rev 4242)
+++ trunk/engine/src/main/java/org/teiid/query/mapping/xml/MappingNode.java 2012-07-19 02:57:49 UTC (rev 4243)
@@ -25,6 +25,7 @@
import java.io.PrintStream;
import java.io.Serializable;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.LinkedList;
@@ -482,9 +483,13 @@
MappingNode clone = (MappingNode) super.clone();
clone.children = new ArrayList<MappingNode>(children);
for (int i = 0; i < clone.children.size(); i++) {
- clone.children.set(i, clone.children.get(i).clone());
- clone.children.get(i).setParent(clone);
+ MappingNode childClone = clone.children.get(i).clone();
+ childClone.setParent(clone);
+ clone.children.set(i, childClone);
}
+ if (this.nodeProperties != null) {
+ this.nodeProperties = new HashMap<MappingNodeConstants.Properties, Object>(this.nodeProperties);
+ }
return clone;
} catch (CloneNotSupportedException e) {
throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30463, e);
Modified: trunk/engine/src/main/java/org/teiid/query/metadata/DDLConstants.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/metadata/DDLConstants.java 2012-07-17 01:00:58 UTC (rev 4242)
+++ trunk/engine/src/main/java/org/teiid/query/metadata/DDLConstants.java 2012-07-19 02:57:49 UTC (rev 4243)
@@ -56,4 +56,5 @@
public static final String INSTEAD_OF = "INSTEAD OF";//$NON-NLS-1$
public static final String CREATE_TRIGGER_ON = "CREATE TRIGGER ON";//$NON-NLS-1$
public static final String FOREIGN_TABLE = "FOREIGN TABLE";//$NON-NLS-1$
+ public static final String UDT = "UDT";//$NON-NLS-1$
}
Modified: trunk/engine/src/main/java/org/teiid/query/metadata/DDLStringVisitor.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/metadata/DDLStringVisitor.java 2012-07-17 01:00:58 UTC (rev 4242)
+++ trunk/engine/src/main/java/org/teiid/query/metadata/DDLStringVisitor.java 2012-07-19 02:57:49 UTC (rev 4243)
@@ -26,21 +26,40 @@
import static org.teiid.language.SQLConstants.Tokens.*;
import static org.teiid.query.metadata.DDLConstants.*;
+import java.util.Arrays;
import java.util.EnumSet;
+import java.util.HashSet;
import java.util.List;
import java.util.regex.Pattern;
import org.teiid.adminapi.Admin.SchemaObjectType;
+import org.teiid.core.types.DataTypeManager;
+import org.teiid.core.util.StringUtil;
import org.teiid.language.SQLConstants;
import org.teiid.language.SQLConstants.NonReserved;
import org.teiid.metadata.*;
import org.teiid.metadata.BaseColumn.NullType;
import org.teiid.metadata.FunctionMethod.Determinism;
import org.teiid.metadata.ProcedureParameter.Type;
+import org.teiid.query.sql.visitor.SQLStringVisitor;
public class DDLStringVisitor {
private static final String TAB = "\t"; //$NON-NLS-1$
private static final String NEWLINE = "\n";//$NON-NLS-1$
+
+ private static final HashSet<String> LENGTH_DATATYPES = new HashSet<String>(
+ Arrays.asList(
+ DataTypeManager.DefaultDataTypes.CHAR,
+ DataTypeManager.DefaultDataTypes.CLOB,
+ DataTypeManager.DefaultDataTypes.BLOB,
+ DataTypeManager.DefaultDataTypes.OBJECT,
+ DataTypeManager.DefaultDataTypes.XML,
+ DataTypeManager.DefaultDataTypes.STRING,
+ DataTypeManager.DefaultDataTypes.VARBINARY,
+ DataTypeManager.DefaultDataTypes.BIG_INTEGER));
+
+ private static final HashSet<String> PRECISION_DATATYPES = new HashSet<String>(
+ Arrays.asList(DataTypeManager.DefaultDataTypes.BIG_DECIMAL));
protected StringBuilder buffer = new StringBuilder();
private boolean includeTables = true;
@@ -206,7 +225,7 @@
}
private void addCommonOptions(StringBuilder sb, AbstractMetadataRecord record) {
- if (record.getUUID() != null && !record.getUUID().startsWith("mmuuid:")) { //$NON-NLS-1$
+ if (record.getUUID() != null && !record.getUUID().startsWith("tid:")) { //$NON-NLS-1$
addOption(sb, UUID, record.getUUID());
}
if (record.getAnnotation() != null) {
@@ -361,7 +380,7 @@
}
if (column.getDefaultValue() != null) {
- buffer.append(SPACE).append(DEFAULT).append(SPACE).append(TICK).append(column.getDefaultValue()).append(TICK);
+ buffer.append(SPACE).append(DEFAULT).append(SPACE).append(TICK).append(StringUtil.replaceAll(column.getDefaultValue(), TICK, TICK + TICK)).append(TICK);
}
// options
@@ -373,11 +392,17 @@
builder.append(column.getName());
}
if (includeType) {
- builder.append(SPACE).append(column.getDatatype().getName());
- if (column.getLength() != 0) {
- builder.append(LPAREN).append(column.getLength()).append(RPAREN);
+ String runtimeTypeName = column.getDatatype().getRuntimeTypeName();
+ if (includeName) {
+ builder.append(SPACE);
}
- else if (column.getPrecision() != 0){
+ builder.append(runtimeTypeName);
+ if (LENGTH_DATATYPES.contains(runtimeTypeName)) {
+ if (column.getLength() != 0 && column.getLength() != column.getDatatype().getLength()) {
+ builder.append(LPAREN).append(column.getLength()).append(RPAREN);
+ }
+ } else if (PRECISION_DATATYPES.contains(runtimeTypeName)
+ && (column.getPrecision() != column.getDatatype().getPrecision() || column.getScale() != column.getDatatype().getScale())) {
builder.append(LPAREN).append(column.getPrecision());
if (column.getScale() != 0) {
builder.append(COMMA).append(column.getScale());
@@ -394,8 +419,11 @@
StringBuilder options = new StringBuilder();
addCommonOptions(options, column);
- // 10 is default assumed
- if (column.getRadix() != column.getDatatype().getRadix()) {
+ if (!column.getDatatype().isBuiltin()) {
+ addOption(options, UDT, column.getDatatype().getName() + "("+column.getLength()+ ", " +column.getPrecision()+", " + column.getScale()+ ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ }
+
+ if (column.getDatatype().getRadix() != 0 && column.getRadix() != column.getDatatype().getRadix()) {
addOption(options, RADIX, column.getRadix());
}
@@ -423,17 +451,18 @@
}
// only record if not default
- if (column.isCaseSensitive() && !column.getDatatype().isCaseSensitive()) {
- addOption(options, CASE_SENSITIVE, String.valueOf(column.isCaseSensitive()));
+ if (!column.isCaseSensitive() && column.getDatatype().isCaseSensitive()) {
+ addOption(options, CASE_SENSITIVE, column.isCaseSensitive());
}
- if (column.isSigned() && !column.getDatatype().isSigned()) {
- addOption(options, SIGNED, String.valueOf(column.isSigned()));
+ if (!column.isSigned() && column.getDatatype().isSigned()) {
+ addOption(options, SIGNED, column.isSigned());
}
if (column.isFixedLength()) {
- addOption(options, FIXED_LENGTH, String.valueOf(column.isFixedLength()));
+ addOption(options, FIXED_LENGTH, column.isFixedLength());
}
// length and octet length should be same. so this should be never be true.
+ //TODO - this is not quite valid since we are dealing with length representing chars in UTF-16, then there should be twice the bytes
if (column.getCharOctetLength() != 0 && column.getLength() != column.getCharOctetLength()) {
addOption(options, CHAR_OCTET_LENGTH, column.getCharOctetLength());
}
@@ -474,16 +503,12 @@
if (sb.length() != 0) {
sb.append(COMMA).append(SPACE);
}
- sb.append(key).append(SPACE).append(TICK).append(value).append(TICK);
+ if (value instanceof String) {
+ value = TICK + StringUtil.replaceAll((String)value, TICK, TICK + TICK) + TICK;
+ }
+ sb.append(SQLStringVisitor.escapeSinglePart(key)).append(SPACE).append(value);
}
- private void addOption(StringBuilder sb, String key, int value) {
- if (sb.length() != 0) {
- sb.append(COMMA).append(SPACE);
- }
- sb.append(key).append(SPACE).append(value);
- }
-
private void visit(Procedure procedure) {
if (this.filter != null && !filter.matcher(procedure.getName()).matches()) {
return;
@@ -501,16 +526,13 @@
boolean first = true;
for (ProcedureParameter pp:procedure.getParameters()) {
- Type type = pp.getType();
- if (type == Type.In || type == Type.InOut || type == Type.Out) {
- if (first) {
- first = false;
- }
- else {
- buffer.append(COMMA).append(SPACE);
- }
- visit(pp);
+ if (first) {
+ first = false;
}
+ else {
+ buffer.append(COMMA).append(SPACE);
+ }
+ visit(pp);
}
buffer.append(RPAREN);
@@ -518,13 +540,14 @@
buffer.append(SPACE).append(RETURNS).append(SPACE).append(TABLE).append(SPACE);
addColumns(buffer, procedure.getResultSet().getColumns(), true);
}
- for (ProcedureParameter pp: procedure.getParameters()) {
+ /* The parser treats the RETURN clause as optional for a procedure if using the RESULT param
+ for (ProcedureParameter pp: procedure.getParameters()) {
if (pp.getType().equals(Type.ReturnValue)) {
buffer.append(SPACE).append(RETURNS).append(SPACE);
appendColumn(buffer, pp, false, true);
break;
}
- }
+ }*/
//options
String options = buildProcedureOptions(procedure);
@@ -538,7 +561,6 @@
buffer.append(plan);
}
}
-
private String buildProcedureOptions(Procedure procedure) {
StringBuilder options = new StringBuilder();
Modified: trunk/engine/src/main/java/org/teiid/query/metadata/MetadataValidator.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/metadata/MetadataValidator.java 2012-07-17 01:00:58 UTC (rev 4242)
+++ trunk/engine/src/main/java/org/teiid/query/metadata/MetadataValidator.java 2012-07-19 02:57:49 UTC (rev 4243)
@@ -21,15 +21,14 @@
*/
package org.teiid.query.metadata;
-import java.util.Collection;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
-import java.util.UUID;
import org.teiid.adminapi.impl.ModelMetaData;
import org.teiid.adminapi.impl.VDBMetaData;
import org.teiid.core.TeiidException;
+import org.teiid.core.types.DataTypeManager;
import org.teiid.language.SQLConstants;
import org.teiid.logging.LogConstants;
import org.teiid.logging.LogManager;
@@ -170,7 +169,7 @@
metadataValidator.log(report, model, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31079, t.getName(), model.getName()));
}
else {
- metadataValidator.validate(vdb, model, t, store, report);
+ metadataValidator.validate(vdb, model, t, report);
}
}
}
@@ -181,7 +180,7 @@
metadataValidator.log(report, model, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31081, p.getName(), model.getName()));
}
else {
- metadataValidator.validate(vdb, model, p, store, report);
+ metadataValidator.validate(vdb, model, p, report);
}
}
}
@@ -195,7 +194,7 @@
report.handleValidationError(msg);
}
- private void validate(VDBMetaData vdb, ModelMetaData model, AbstractMetadataRecord record, MetadataStore store, ValidatorReport report) {
+ private void validate(VDBMetaData vdb, ModelMetaData model, AbstractMetadataRecord record, ValidatorReport report) {
QueryMetadataInterface metadata = vdb.getAttachment(QueryMetadataInterface.class);
metadata = new TempMetadataAdapter(metadata, new TempMetadataStore()); //TODO: optimize this
ValidatorReport resolverReport = null;
@@ -214,9 +213,10 @@
resolverReport = Validator.validate(command, metadata);
if(!resolverReport.hasItems()) {
List<Expression> symbols = command.getProjectedSymbols();
+ MetadataFactory mf = t.removeAttachment(MetadataFactory.class);
for (Expression column:symbols) {
try {
- addColumn(Symbol.getShortName(column), getDataType(store.getDatatypes().values(), column.getType()), t);
+ addColumn(Symbol.getShortName(column), column.getType(), t, mf);
} catch (TranslatorException e) {
log(report, model, e.getMessage());
}
@@ -242,37 +242,12 @@
}
}
- private Datatype getDataType(Collection<Datatype> dataTypes, Class<?> clazz) {
- for (Datatype type:dataTypes) {
- if (type.getJavaClassName().equals(clazz.getName())) {
- return type;
- }
- }
- return null;
- }
-
- private Column addColumn(String name, Datatype type, Table table) throws TranslatorException {
- Column column = new Column();
- column.setName(name);
- if (table.getColumnByName(name) != null) {
- throw new TranslatorException(QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31087, name, table.getFullName()));
- }
- column.setUpdatable(table.supportsUpdate());
- table.addColumn(column);
- column.setPosition(table.getColumns().size()); //1 based indexing
+ private Column addColumn(String name, Class<?> type, Table table, MetadataFactory mf) throws TranslatorException {
if (type == null) {
throw new TranslatorException(QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31086, name, table.getFullName()));
}
- column.setDatatype(type);
- column.setDatatypeUUID(type.getUUID());
- column.setLength(type.getLength());
- column.setPrecision(type.getPrecisionLength());
- column.setRadix(type.getRadix());
- column.setRuntimeType(type.getRuntimeTypeName());
- column.setCaseSensitive(type.isCaseSensitive());
- column.setAutoIncremented(type.isAutoIncrement());
- column.setSigned(type.isSigned());
- column.setUUID("mmuuid:" +UUID.randomUUID()); //$NON-NLS-1$
+ Column column = mf.addColumn(name, DataTypeManager.getDataTypeName(type), table);
+ column.setUpdatable(table.supportsUpdate());
return column;
}
Modified: trunk/engine/src/main/java/org/teiid/query/parser/QueryParser.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/parser/QueryParser.java 2012-07-17 01:00:58 UTC (rev 4242)
+++ trunk/engine/src/main/java/org/teiid/query/parser/QueryParser.java 2012-07-19 02:57:49 UTC (rev 4243)
@@ -22,6 +22,7 @@
package org.teiid.query.parser;
+import java.io.Reader;
import java.io.StringReader;
import java.util.ArrayList;
import java.util.Arrays;
@@ -77,14 +78,17 @@
}
/**
- * Helper method to get a SQLParser instace for given sql string.
+ * Helper method to get a SQLParser instance for given sql string.
*/
private SQLParser getSqlParser(String sql) {
- sql = sql != null ? sql : ""; //$NON-NLS-1$
+ return getSqlParser(new StringReader(sql));
+ }
+
+ private SQLParser getSqlParser(Reader sql) {
if(parser == null) {
- parser = new SQLParser(new StringReader(sql));
+ parser = new SQLParser(sql);
} else {
- parser.ReInit(new StringReader(sql));
+ parser.ReInit(sql);
}
return parser;
}
@@ -352,6 +356,10 @@
}
public void parseDDL(MetadataFactory factory, String ddl) throws ParseException {
+ parseDDL(factory, new StringReader(ddl));
+ }
+
+ public void parseDDL(MetadataFactory factory, Reader ddl) throws ParseException {
getSqlParser(ddl).parseMetadata(factory);
HashSet<FunctionMethod> functions = new HashSet<FunctionMethod>();
for (FunctionMethod functionMethod : factory.getSchema().getFunctions().values()) {
Modified: trunk/engine/src/main/java/org/teiid/query/parser/SQLParserUtil.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/parser/SQLParserUtil.java 2012-07-17 01:00:58 UTC (rev 4242)
+++ trunk/engine/src/main/java/org/teiid/query/parser/SQLParserUtil.java 2012-07-19 02:57:49 UTC (rev 4243)
@@ -494,7 +494,7 @@
throw new ParseException(QueryPlugin.Util.getString("SQLParser.function_in", proc.getName())); //$NON-NLS-1$
}
- FunctionParameter fp = new FunctionParameter(pp.getName(), pp.getDatatype().getName(), pp.getAnnotation());
+ FunctionParameter fp = new FunctionParameter(pp.getName(), pp.getRuntimeType(), pp.getAnnotation());
if (pp.getType() == ProcedureParameter.Type.In) {
fp.setVarArg(pp.isVarArg());
ins.add(fp);
Modified: trunk/engine/src/main/java/org/teiid/query/processor/relational/ListNestedSortComparator.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/processor/relational/ListNestedSortComparator.java 2012-07-17 01:00:58 UTC (rev 4242)
+++ trunk/engine/src/main/java/org/teiid/query/processor/relational/ListNestedSortComparator.java 2012-07-19 02:57:49 UTC (rev 4243)
@@ -156,10 +156,10 @@
// param1 = null, so is less than a non-null
compare = -1;
NullOrdering no = getNullOrdering(k);
- if (no != null) {
- if (nullOrdering.get(k) == NullOrdering.FIRST) {
- return -1;
- }
+ if (no == NullOrdering.FIRST) {
+ return -1;
+ }
+ if (no == NullOrdering.LAST) {
return 1;
}
}
@@ -167,10 +167,10 @@
// param1 != null, param2 == null
compare = 1;
NullOrdering no = getNullOrdering(k);
- if (no != null) {
- if (nullOrdering.get(k) == NullOrdering.FIRST) {
- return 1;
- }
+ if (no == NullOrdering.FIRST) {
+ return 1;
+ }
+ if (no == NullOrdering.LAST) {
return -1;
}
} else {
Modified: trunk/engine/src/main/javacc/org/teiid/query/parser/SQLParser.jj
===================================================================
--- trunk/engine/src/main/javacc/org/teiid/query/parser/SQLParser.jj 2012-07-17 01:00:58 UTC (rev 4242)
+++ trunk/engine/src/main/javacc/org/teiid/query/parser/SQLParser.jj 2012-07-19 02:57:49 UTC (rev 4243)
@@ -3920,18 +3920,18 @@
(typeToken = <STRING> ([<LPAREN>lengthToken=<INTEGERVAL><RPAREN>]) {precision = false;} ) |
(typeToken = <VARCHAR> ([<LPAREN>lengthToken=<INTEGERVAL><RPAREN>]) {precision = false;} ) |
typeToken = <BOOLEAN> |
- (typeToken = <BYTE> ([<LPAREN>lengthToken=<INTEGERVAL><RPAREN>]) {precision = false;} ) |
- (typeToken = <TINYINT> [<LPAREN>lengthToken=<INTEGERVAL><RPAREN>] ) |
- (typeToken = <SHORT> [<LPAREN>lengthToken=<INTEGERVAL><RPAREN>] ) |
- (typeToken = <SMALLINT> [<LPAREN>lengthToken=<INTEGERVAL><RPAREN>] ) |
+ typeToken = <BYTE> |
+ typeToken = <TINYINT> |
+ typeToken = <SHORT> |
+ typeToken = <SMALLINT> |
(typeToken = <CHAR> ([<LPAREN>lengthToken=<INTEGERVAL><RPAREN>]) {precision = false;} ) |
- (typeToken = <INTEGER> [<LPAREN>lengthToken=<INTEGERVAL><RPAREN>] ) |
- (typeToken = <LONG> [<LPAREN>lengthToken=<INTEGERVAL><RPAREN>] ) |
- (typeToken = <BIGINT> [<LPAREN>lengthToken=<INTEGERVAL><RPAREN>]) |
+ typeToken = <INTEGER> |
+ typeToken = <LONG> |
+ typeToken = <BIGINT> |
(typeToken = <BIGINTEGER> [<LPAREN>lengthToken=<INTEGERVAL><RPAREN>]) |
- (typeToken = <FLOAT> [<LPAREN>lengthToken=<INTEGERVAL>[<COMMA>scaleToken=<INTEGERVAL>]<RPAREN>]) |
- (typeToken = <REAL> [<LPAREN>lengthToken=<INTEGERVAL>[<COMMA>scaleToken=<INTEGERVAL>]<RPAREN>])|
- (typeToken = <DOUBLE> [<LPAREN>lengthToken=<INTEGERVAL>[<COMMA>scaleToken=<INTEGERVAL>]<RPAREN>])|
+ typeToken = <FLOAT> |
+ typeToken = <REAL> |
+ typeToken = <DOUBLE> |
(typeToken = <BIGDECIMAL> [<LPAREN>lengthToken=<INTEGERVAL>[<COMMA>scaleToken=<INTEGERVAL>]<RPAREN>])|
(typeToken = <DECIMAL> [<LPAREN>lengthToken=<INTEGERVAL>[<COMMA>scaleToken=<INTEGERVAL>]<RPAREN>])|
typeToken = <DATE> |
@@ -4280,7 +4280,9 @@
}
table.setSelectTransformation((comment != null?comment.image+" ":"") + query.toString());
}
- if (!table.supportsUpdate() && table.getColumns() != null) {
+ if (table.getColumns() == null) {
+ table.addAttchment(MetadataFactory.class, factory);
+ } else if (!table.supportsUpdate()) {
for (Column c : table.getColumns()) {
c.setUpdatable(false);
}
Added: trunk/engine/src/main/resources/org/teiid/metadata/SYS.sql
===================================================================
--- trunk/engine/src/main/resources/org/teiid/metadata/SYS.sql (rev 0)
+++ trunk/engine/src/main/resources/org/teiid/metadata/SYS.sql 2012-07-19 02:57:49 UTC (rev 4243)
@@ -0,0 +1,171 @@
+CREATE FOREIGN TABLE Columns (
+ VDBName string(255) NOT NULL,
+ SchemaName string(255),
+ TableName string(255) NOT NULL,
+ Name string(255) NOT NULL,
+ Position integer NOT NULL,
+ NameInSource string(255),
+ DataType string(100) NOT NULL,
+ Scale integer NOT NULL,
+ Length integer NOT NULL,
+ IsLengthFixed boolean NOT NULL,
+ SupportsSelect boolean NOT NULL,
+ SupportsUpdates boolean NOT NULL,
+ IsCaseSensitive boolean NOT NULL,
+ IsSigned boolean NOT NULL,
+ IsCurrency boolean NOT NULL,
+ IsAutoIncremented boolean NOT NULL,
+ NullType string(20) NOT NULL,
+ MinRange string(50),
+ MaxRange string(50),
+ DistinctCount integer,
+ NullCount integer,
+ SearchType string(20) NOT NULL,
+ Format string(255),
+ DefaultValue string(255),
+ JavaClass string(500) NOT NULL,
+ Precision integer NOT NULL,
+ CharOctetLength integer,
+ Radix integer NOT NULL,
+ UID string(50) NOT NULL,
+ Description string(255),
+ OID integer NOT NULL
+);
+
+CREATE FOREIGN TABLE DataTypes (
+ Name string(100) NOT NULL,
+ IsStandard boolean,
+ IsPhysical boolean,
+ TypeName string(100) NOT NULL,
+ JavaClass string(500) NOT NULL,
+ Scale integer,
+ TypeLength integer NOT NULL,
+ NullType string(20) NOT NULL,
+ IsSigned boolean NOT NULL,
+ IsAutoIncremented boolean NOT NULL,
+ IsCaseSensitive boolean NOT NULL,
+ Precision integer NOT NULL,
+ Radix integer,
+ SearchType string(20) NOT NULL,
+ UID string(50) NOT NULL,
+ RuntimeType string(64),
+ BaseType string(64),
+ Description string(255),
+ OID integer NOT NULL
+);
+
+CREATE FOREIGN TABLE KeyColumns (
+ VDBName string(255) NOT NULL,
+ SchemaName string(255),
+ TableName string(2048) NOT NULL,
+ Name string(255) NOT NULL,
+ KeyName string(255),
+ KeyType string(20) NOT NULL,
+ RefKeyUID string(50),
+ UID string(50) NOT NULL,
+ Position integer,
+ OID integer NOT NULL
+);
+
+CREATE FOREIGN TABLE Keys (
+ VDBName string(255) NOT NULL,
+ SchemaName string(255),
+ TableName string(2048) NOT NULL,
+ Name string(255) NOT NULL,
+ Description string(255),
+ NameInSource string(255),
+ Type string(20) NOT NULL,
+ IsIndexed boolean NOT NULL,
+ RefKeyUID string(50),
+ UID string(50) NOT NULL,
+ OID integer NOT NULL
+);
+
+CREATE FOREIGN TABLE ProcedureParams (
+ VDBName string(255) NOT NULL,
+ SchemaName string(255),
+ ProcedureName string(255) NOT NULL,
+ Name string(255) NOT NULL,
+ DataType string(25) NOT NULL,
+ Position integer NOT NULL,
+ Type string(100) NOT NULL,
+ Optional boolean NOT NULL,
+ Precision integer NOT NULL,
+ TypeLength integer NOT NULL,
+ Scale integer NOT NULL,
+ Radix integer NOT NULL,
+ NullType string(10) NOT NULL,
+ UID string(50),
+ Description string(255),
+ OID integer NOT NULL
+);
+
+CREATE FOREIGN TABLE Procedures (
+ VDBName string(255) NOT NULL,
+ SchemaName string(255),
+ Name string(255) NOT NULL,
+ NameInSource string(255),
+ ReturnsResults boolean NOT NULL,
+ UID string(50) NOT NULL,
+ Description string(255),
+ OID integer NOT NULL
+);
+
+CREATE FOREIGN TABLE Properties (
+ Name string(255) NOT NULL,
+ Value string(255) NOT NULL,
+ UID string(50) NOT NULL,
+ OID integer NOT NULL,
+ ClobValue clob(2097152)
+);
+
+CREATE FOREIGN TABLE ReferenceKeyColumns (
+ PKTABLE_CAT string(255),
+ PKTABLE_SCHEM string(255),
+ PKTABLE_NAME string(255),
+ PKCOLUMN_NAME string(255),
+ FKTABLE_CAT string(255),
+ FKTABLE_SCHEM string(255),
+ FKTABLE_NAME string(255),
+ FKCOLUMN_NAME string(255),
+ KEY_SEQ short,
+ UPDATE_RULE integer,
+ DELETE_RULE integer,
+ FK_NAME string(255),
+ PK_NAME string(255),
+ DEFERRABILITY integer
+);
+
+CREATE FOREIGN TABLE Schemas (
+ VDBName string(255),
+ Name string(255),
+ IsPhysical boolean NOT NULL,
+ UID string(50) NOT NULL,
+ Description string(255),
+ PrimaryMetamodelURI string(255) NOT NULL,
+ OID integer NOT NULL
+);
+
+CREATE FOREIGN TABLE Tables (
+ VDBName string(255),
+ SchemaName string(255),
+ Name string(255) NOT NULL,
+ Type string(20) NOT NULL,
+ NameInSource string(255),
+ IsPhysical boolean NOT NULL,
+ SupportsUpdates boolean NOT NULL,
+ UID string(50) NOT NULL,
+ Cardinality integer NOT NULL,
+ Description string(255),
+ IsSystem boolean,
+ IsMaterialized boolean NOT NULL,
+ OID integer NOT NULL
+);
+
+CREATE FOREIGN TABLE VirtualDatabases (
+ Name string(255) NOT NULL,
+ Version string(50) NOT NULL
+);
+
+CREATE FOREIGN PROCEDURE getXMLSchemas(IN document string NOT NULL) RETURNS TABLE (schema xml)
+OPTIONS (UPDATECOUNT 0)
Added: trunk/engine/src/main/resources/org/teiid/metadata/SYSADMIN.sql
===================================================================
--- trunk/engine/src/main/resources/org/teiid/metadata/SYSADMIN.sql (rev 0)
+++ trunk/engine/src/main/resources/org/teiid/metadata/SYSADMIN.sql 2012-07-19 02:57:49 UTC (rev 4243)
@@ -0,0 +1,37 @@
+CREATE FOREIGN TABLE MatViews (
+ VDBName string(255) NOT NULL,
+ SchemaName string(255) NOT NULL,
+ Name string(255) NOT NULL,
+ TargetSchemaName string(255),
+ TargetName string,
+ Valid boolean,
+ LoadState string(255),
+ Updated timestamp,
+ Cardinality integer
+);
+
+CREATE FOREIGN TABLE VDBResources (
+ resourcePath string(255),
+ contents blob
+);
+
+CREATE FOREIGN PROCEDURE isLoggable(OUT loggable boolean NOT NULL RESULT, IN level string NOT NULL, IN context string NOT NULL)
+OPTIONS (UPDATECOUNT 0)
+
+CREATE FOREIGN PROCEDURE logMsg(OUT logged boolean NOT NULL RESULT, IN level string NOT NULL, IN context string NOT NULL, IN msg object NOT NULL)
+OPTIONS (UPDATECOUNT 0)
+
+CREATE FOREIGN PROCEDURE refreshMatView(IN ViewName string NOT NULL, IN Invalidate boolean NOT NULL, OUT RowsUpdated integer NOT NULL RESULT)
+OPTIONS (UPDATECOUNT 0)
+
+CREATE FOREIGN PROCEDURE refreshMatViewRow(IN ViewName string NOT NULL, IN Key object NOT NULL, OUT RowsUpdated integer NOT NULL RESULT)
+OPTIONS (UPDATECOUNT 0)
+
+CREATE FOREIGN PROCEDURE setColumnStats(IN tableName string NOT NULL, IN columnName string NOT NULL, IN distinctCount integer, IN nullCount integer, IN max string, IN min string)
+OPTIONS (UPDATECOUNT 0)
+
+CREATE FOREIGN PROCEDURE setProperty(OUT OldValue clob(2097152) NOT NULL RESULT, IN UID string(50) NOT NULL, IN Name string NOT NULL, IN Value clob(2097152))
+OPTIONS (UPDATECOUNT 0)
+
+CREATE FOREIGN PROCEDURE setTableStats(IN tableName string NOT NULL, IN cardinality integer NOT NULL)
+OPTIONS (UPDATECOUNT 0)
Modified: trunk/engine/src/main/resources/org/teiid/metadata/types.dat
===================================================================
--- trunk/engine/src/main/resources/org/teiid/datatypes/types.dat 2012-07-13 13:14:44 UTC (rev 4237)
+++ trunk/engine/src/main/resources/org/teiid/metadata/types.dat 2012-07-19 02:57:49 UTC (rev 4243)
@@ -1,54 +1,54 @@
-UUID|annotation|autoIncrement|basetypeName|caseSensitive|javaClassName|length|name|nameInSource|nullType|precisionLength|radix|runtimeTypeName|scale|searchType|signed|type|varietyType
-mmuuid:43f5274e-55e1-1f87-ba1c-eea49143eb32||false|string|false|org.teiid.core.types.XMLType|0|XMLLiteral|XMLLiteral|No_Nulls|0|0|xml|0|Searchable|false|UserDefined|Atomic
-mmuuid:f2249740-a078-1e26-9b08-d6079ebe1f0d||false|decimal|false|java.math.BigDecimal|0|bigdecimal|bigdecimal|No_Nulls|0|0|bigdecimal|0|Searchable|false|UserDefined|Atomic
-mmuuid:822b9a40-a066-1e26-9b08-d6079ebe1f0d||false|decimal|false|java.math.BigInteger|0|biginteger|biginteger|No_Nulls|0|0|biginteger|0|Searchable|false|UserDefined|Atomic
-mmuuid:5a793100-1836-1ed0-ba0f-f2334f5fbf95||false|base64Binary|false|org.teiid.core.types.BlobType|0|blob|blob|No_Nulls|0|0|blob|0|Searchable|false|UserDefined|Atomic
-mmuuid:62472700-a064-1e26-9b08-d6079ebe1f0d||false|string|false|java.lang.Character|0|char|char|No_Nulls|0|0|char|0|Searchable|false|UserDefined|Atomic
-mmuuid:559646c0-4941-1ece-b22b-f49159d22ad3||false|string|false|org.teiid.core.types.ClobType|0|clob|clob|No_Nulls|0|0|clob|0|Searchable|false|UserDefined|Atomic
-mmuuid:051a0640-b4e8-1e26-9f33-b76fd9d5fa79||false|base64Binary|false|java.lang.Object|0|object|object|No_Nulls|0|0|object|0|Searchable|false|UserDefined|Atomic
-mmuuid:6d9809c0-a07e-1e26-9b08-d6079ebe1f0d||false|string|false|java.sql.Timestamp|0|timestamp|timestamp|No_Nulls|0|0|timestamp|0|Searchable|false|UserDefined|Atomic
-mmuuid:20360100-e742-1e20-8c26-a038c6ed7576||false|ENTITY|false|java.lang.String|0|ENTITIES|ENTITIES|No_Nulls|0|0|string|0|Searchable|false|UserDefined|List
-mmuuid:9fece300-e71a-1e20-8c26-a038c6ed7576||false|NCName|false|java.lang.String|0|ENTITY|ENTITY|No_Nulls|0|0|string|0|Searchable|false|UserDefined|Atomic
-mmuuid:3c99f780-e72d-1e20-8c26-a038c6ed7576||false|IDREF|false|java.lang.String|0|IDREFS|IDREFS|No_Nulls|0|0|string|0|Searchable|false|UserDefined|List
-mmuuid:dd33ff40-e6df-1e20-8c26-a038c6ed7576||false|NCName|false|java.lang.String|0|IDREF|IDREF|No_Nulls|0|0|string|0|Searchable|false|UserDefined|Atomic
-mmuuid:88b13dc0-e702-1e20-8c26-a038c6ed7576||false|NCName|false|java.lang.String|0|ID|ID|No_Nulls|0|0|string|0|Searchable|false|UserDefined|Atomic
-mmuuid:ac00e000-e676-1e20-8c26-a038c6ed7576||false|Name|false|java.lang.String|0|NCName|NCName|No_Nulls|0|0|string|0|Searchable|false|UserDefined|Atomic
-mmuuid:4b0f8500-e6a6-1e20-8c26-a038c6ed7576||false|NMTOKEN|false|java.lang.String|0|NMTOKENS|NMTOKENS|No_Nulls|0|0|string|0|Searchable|false|UserDefined|List
-mmuuid:4ca2ae00-3a95-1e20-921b-eeee28353879||false|token|false|java.lang.String|0|NMTOKEN|NMTOKEN|No_Nulls|0|0|string|0|Searchable|false|UserDefined|Atomic
-mmuuid:3dcaf900-e8dc-1e2a-b433-fb67ea35c07e||false|anySimpleType|false|java.lang.String|0|NOTATION|NOTATION|No_Nulls|0|0|string|0|Searchable|false|UserDefined|Atomic
-mmuuid:e66c4600-e65b-1e20-8c26-a038c6ed7576||false|token|false|java.lang.String|0|Name|Name|No_Nulls|0|0|string|0|Searchable|false|UserDefined|Atomic
-mmuuid:eeb5d780-e8c3-1e2a-b433-fb67ea35c07e||false|anySimpleType|false|java.lang.String|0|QName|QName|No_Nulls|0|0|string|0|Searchable|false|UserDefined|Atomic
-mmuuid:6247ec80-e8a4-1e2a-b433-fb67ea35c07e||false|anySimpleType|false|java.lang.String|0|anyURI|anyURI|No_Nulls|0|0|string|0|Searchable|false|UserDefined|Atomic
-mmuuid:b4c99380-ebc6-1e2a-9319-8eaa9b2276c7||false|anySimpleType|false|java.lang.String|0|base64Binary|base64Binary|No_Nulls|0|0|string|0|Searchable|false|UserDefined|Atomic
-mmuuid:dc476100-c483-1e24-9b01-c8207cd53eb7||false|anySimpleType|false|java.lang.Boolean|0|boolean|boolean|No_Nulls|0|0|boolean|0|Searchable|false|UserDefined|Atomic
-mmuuid:26dc1cc0-b9c8-1e21-b812-969c8fc8b016||false|short|false|java.lang.Byte|0|byte|byte|No_Nulls|0|0|byte|0|Searchable|false|UserDefined|Atomic
-mmuuid:5c69dec0-b3ea-1e2a-9a03-beb8638ffd21||false|anySimpleType|false|java.sql.Timestamp|0|dateTime|dateTime|No_Nulls|0|0|timestamp|0|Searchable|false|UserDefined|Atomic
-mmuuid:65dcde00-c4ab-1e24-9b01-c8207cd53eb7||false|anySimpleType|false|java.sql.Date|0|date|date|No_Nulls|0|0|date|0|Searchable|false|UserDefined|Atomic
-mmuuid:569dfa00-c456-1e24-9b01-c8207cd53eb7||false|anySimpleType|false|java.math.BigDecimal|0|decimal|decimal|No_Nulls|0|0|bigdecimal|0|Searchable|false|UserDefined|Atomic
-mmuuid:1f18b140-c4a3-1e24-9b01-c8207cd53eb7||false|anySimpleType|false|java.lang.Double|0|double|double|No_Nulls|0|0|double|0|Searchable|false|UserDefined|Atomic
-mmuuid:28d98540-b3e7-1e2a-9a03-beb8638ffd21||false|anySimpleType|false|java.lang.String|0|duration|duration|No_Nulls|0|0|string|0|Searchable|false|UserDefined|Atomic
-mmuuid:d86b0d00-c48a-1e24-9b01-c8207cd53eb7||false|anySimpleType|false|java.lang.Float|0|float|float|No_Nulls|0|0|float|0|Searchable|false|UserDefined|Atomic
-mmuuid:860b7dc0-b3f8-1e2a-9a03-beb8638ffd21||false|anySimpleType|false|java.math.BigInteger|0|gDay|gDay|No_Nulls|0|0|biginteger|0|Searchable|false|UserDefined|Atomic
-mmuuid:6e604140-b3f5-1e2a-9a03-beb8638ffd21||false|anySimpleType|false|java.sql.Timestamp|0|gMonthDay|gMonthDay|No_Nulls|0|0|timestamp|0|Searchable|false|UserDefined|Atomic
-mmuuid:187f5580-b3fb-1e2a-9a03-beb8638ffd21||false|anySimpleType|false|java.math.BigInteger|0|gMonth|gMonth|No_Nulls|0|0|biginteger|0|Searchable|false|UserDefined|Atomic
-mmuuid:17d08040-b3ed-1e2a-9a03-beb8638ffd21||false|anySimpleType|false|java.sql.Timestamp|0|gYearMonth|gYearMonth|No_Nulls|0|0|timestamp|0|Searchable|false|UserDefined|Atomic
-mmuuid:b02c7600-b3f2-1e2a-9a03-beb8638ffd21||false|anySimpleType|false|java.math.BigInteger|0|gYear|gYear|No_Nulls|0|0|biginteger|0|Searchable|false|UserDefined|Atomic
-mmuuid:d9998500-ebba-1e2a-9319-8eaa9b2276c7||false|anySimpleType|false|java.lang.String|0|hexBinary|hexBinary|No_Nulls|0|0|string|0|Searchable|false|UserDefined|Atomic
-mmuuid:45da3500-e78f-1e20-8c26-a038c6ed7576||false|decimal|false|java.math.BigInteger|0|integer|integer|No_Nulls|0|0|biginteger|0|Searchable|false|UserDefined|Atomic
-mmuuid:33add3c0-b98d-1e21-b812-969c8fc8b016||false|long|false|java.lang.Integer|0|int|int|No_Nulls|0|0|integer|0|Searchable|false|UserDefined|Atomic
-mmuuid:d4d980c0-e623-1e20-8c26-a038c6ed7576||false|token|false|java.lang.String|0|language|language|No_Nulls|0|0|string|0|Searchable|false|UserDefined|Atomic
-mmuuid:8cdee840-b900-1e21-b812-969c8fc8b016||false|integer|false|java.lang.Long|0|long|long|No_Nulls|0|0|long|0|Searchable|false|UserDefined|Atomic
-mmuuid:86d29280-b8d3-1e21-b812-969c8fc8b016||false|nonPositiveInteger|false|java.math.BigInteger|0|negativeInteger|negativeInteger|No_Nulls|0|0|biginteger|0|Searchable|false|UserDefined|Atomic
-mmuuid:0e081200-b8a4-1e21-b812-969c8fc8b016||false|integer|false|java.math.BigInteger|0|nonNegativeInteger|nonNegativeInteger|No_Nulls|0|0|biginteger|0|Searchable|false|UserDefined|Atomic
-mmuuid:cbdd6e40-b9d2-1e21-8c26-a038c6ed7576||false|integer|false|java.math.BigInteger|0|nonPositiveInteger|nonPositiveInteger|No_Nulls|0|0|biginteger|0|Searchable|false|UserDefined|Atomic
-mmuuid:4df43700-3b13-1e20-921b-eeee28353879||false|string|false|java.lang.String|0|normalizedString|normalizedString|No_Nulls|0|0|string|0|Searchable|false|UserDefined|Atomic
-mmuuid:1cbbd380-b9ea-1e21-b812-969c8fc8b016||false|nonNegativeInteger|false|java.math.BigInteger|0|positiveInteger|positiveInteger|No_Nulls|0|0|biginteger|0|Searchable|false|UserDefined|Atomic
-mmuuid:5bbcf140-b9ae-1e21-b812-969c8fc8b016||false|int|false|java.lang.Short|0|short|short|No_Nulls|0|0|short|0|Searchable|false|UserDefined|Atomic
-mmuuid:bf6c34c0-c442-1e24-9b01-c8207cd53eb7||false|anySimpleType|false|java.lang.String|0|string|string|No_Nulls|0|0|string|0|Searchable|false|UserDefined|Atomic
-mmuuid:3b892180-c4a7-1e24-9b01-c8207cd53eb7||false|anySimpleType|false|java.sql.Time|0|time|time|No_Nulls|0|0|time|0|Searchable|false|UserDefined|Atomic
-mmuuid:3425cb80-d844-1e20-9027-be6d2c3b8b3a||false|normalizedString|false|java.lang.String|0|token|token|No_Nulls|0|0|string|0|Searchable|false|UserDefined|Atomic
-mmuuid:cff745c0-baa2-1e21-b812-969c8fc8b016||false|unsignedShort|false|java.lang.Short|0|unsignedByte|unsignedByte|No_Nulls|0|0|short|0|Searchable|false|UserDefined|Atomic
-mmuuid:badcbd80-ba63-1e21-b812-969c8fc8b016||false|unsignedLong|false|java.lang.Long|0|unsignedInt|unsignedInt|No_Nulls|0|0|long|0|Searchable|false|UserDefined|Atomic
-mmuuid:54b98780-ba14-1e21-b812-969c8fc8b016||false|nonNegativeInteger|false|java.math.BigInteger|0|unsignedLong|unsignedLong|No_Nulls|0|0|biginteger|0|Searchable|false|UserDefined|Atomic
-mmuuid:327093c0-ba88-1e21-b812-969c8fc8b016||false|unsignedInt|false|java.lang.Integer|0|unsignedShort|unsignedShort|No_Nulls|0|0|integer|0|Searchable|false|UserDefined|Atomic
-mmuuid:182fd511-1a3e-447a-a6ea-72569d6a22ec||false|base64Binary|false|org.teiid.core.types.BinaryType|0|varbinary|varbinary|No_Nulls|0|0|varbinary|0|Searchable|false|UserDefined|Atomic
\ No newline at end of file
+UUID|annotation|autoIncrement|basetypeName|caseSensitive|javaClassName|length|name|nameInSource|nullType|precision|radix|runtimeTypeName|scale|searchType|signed|type|varietyType
+mmuuid:43f5274e-55e1-1f87-ba1c-eea49143eb32|||string|true|org.teiid.core.types.XMLType|2147483647|XMLLiteral|XMLLiteral||0||xml|0|Searchable||Basic|Atomic
+mmuuid:569dfa00-c456-1e24-9b01-c8207cd53eb7|||anySimpleType|false|java.math.BigDecimal|2147483647|decimal|decimal||2147483647|10|bigdecimal|2147483647|Searchable|true|Basic|Atomic
+mmuuid:f2249740-a078-1e26-9b08-d6079ebe1f0d|||decimal|false|java.math.BigDecimal|2147483647|bigdecimal|bigdecimal||2147483647|10|bigdecimal|2147483647|Searchable|true|Basic|Atomic
+mmuuid:822b9a40-a066-1e26-9b08-d6079ebe1f0d|||decimal|false|java.math.BigInteger|2147483647|biginteger|biginteger||2147483647|10|biginteger|0|Searchable|true|Basic|Atomic
+mmuuid:5a793100-1836-1ed0-ba0f-f2334f5fbf95|||base64Binary|false|org.teiid.core.types.BlobType|2147483647|blob|blob||0||blob|0|Unsearchable||Basic|Atomic
+mmuuid:62472700-a064-1e26-9b08-d6079ebe1f0d|||string|true|java.lang.Character|1|char|char||0||char|0|Searchable||Basic|Atomic
+mmuuid:559646c0-4941-1ece-b22b-f49159d22ad3|||string|true|org.teiid.core.types.ClobType|2147483647|clob|clob||0||clob|0|Like_Only||Basic|Atomic
+mmuuid:051a0640-b4e8-1e26-9f33-b76fd9d5fa79|||base64Binary|false|java.lang.Object|2147483647|object|object||0||object|0|Unsearchable||Basic|Atomic
+mmuuid:6d9809c0-a07e-1e26-9b08-d6079ebe1f0d|||string|true|java.sql.Timestamp|12|timestamp|timestamp||0||timestamp|0|Searchable||Basic|Atomic
+mmuuid:20360100-e742-1e20-8c26-a038c6ed7576|||ENTITY|true|java.lang.String|4000|ENTITIES|ENTITIES||0||string|0|Searchable||UserDefined|List
+mmuuid:9fece300-e71a-1e20-8c26-a038c6ed7576|||NCName|true|java.lang.String|4000|ENTITY|ENTITY||0||string|0|Searchable||UserDefined|Atomic
+mmuuid:3c99f780-e72d-1e20-8c26-a038c6ed7576|||IDREF|true|java.lang.String|4000|IDREFS|IDREFS||0||string|0|Searchable||UserDefined|List
+mmuuid:dd33ff40-e6df-1e20-8c26-a038c6ed7576|||NCName|true|java.lang.String|4000|IDREF|IDREF||0||string|0|Searchable||UserDefined|Atomic
+mmuuid:88b13dc0-e702-1e20-8c26-a038c6ed7576|||NCName|true|java.lang.String|4000|ID|ID||0||string|0|Searchable||UserDefined|Atomic
+mmuuid:ac00e000-e676-1e20-8c26-a038c6ed7576|||Name|true|java.lang.String|4000|NCName|NCName||0||string|0|Searchable||UserDefined|Atomic
+mmuuid:4b0f8500-e6a6-1e20-8c26-a038c6ed7576|||NMTOKEN|true|java.lang.String|4000|NMTOKENS|NMTOKENS||0||string|0|Searchable||UserDefined|List
+mmuuid:4ca2ae00-3a95-1e20-921b-eeee28353879|||token|true|java.lang.String|4000|NMTOKEN|NMTOKEN||0||string|0|Searchable||UserDefined|Atomic
+mmuuid:3dcaf900-e8dc-1e2a-b433-fb67ea35c07e|||anySimpleType|true|java.lang.String|4000|NOTATION|NOTATION||0||string|0|Searchable||UserDefined|Atomic
+mmuuid:e66c4600-e65b-1e20-8c26-a038c6ed7576|||token|true|java.lang.String|4000|Name|Name||0||string|0|Searchable||UserDefined|Atomic
+mmuuid:eeb5d780-e8c3-1e2a-b433-fb67ea35c07e|||anySimpleType|true|java.lang.String|4000|QName|QName||0||string|0|Searchable||UserDefined|Atomic
+mmuuid:6247ec80-e8a4-1e2a-b433-fb67ea35c07e|||anySimpleType|true|java.lang.String|4000|anyURI|anyURI||0||string|0|Searchable||UserDefined|Atomic
+mmuuid:b4c99380-ebc6-1e2a-9319-8eaa9b2276c7|||anySimpleType|true|java.lang.String|4000|base64Binary|base64Binary||0||string|0|Searchable||UserDefined|Atomic
+mmuuid:dc476100-c483-1e24-9b01-c8207cd53eb7|||anySimpleType|false|java.lang.Boolean|1|boolean|boolean||1|10|boolean|0|Searchable||Basic|Atomic
+mmuuid:26dc1cc0-b9c8-1e21-b812-969c8fc8b016|||short|false|java.lang.Byte|1|byte|byte||3|10|byte|0|Searchable|true|Basic|Atomic
+mmuuid:5c69dec0-b3ea-1e2a-9a03-beb8638ffd21|||anySimpleType|false|java.sql.Timestamp|12|dateTime|dateTime||0||timestamp|0|Searchable||Basic|Atomic
+mmuuid:65dcde00-c4ab-1e24-9b01-c8207cd53eb7|||anySimpleType|false|java.sql.Date|4|date|date||0||date|0|Searchable||Basic|Atomic
+mmuuid:1f18b140-c4a3-1e24-9b01-c8207cd53eb7|||anySimpleType|false|java.lang.Double|8|double|double||17|10|double|4|Searchable|true|Basic|Atomic
+mmuuid:28d98540-b3e7-1e2a-9a03-beb8638ffd21|||anySimpleType|true|java.lang.String|4000|duration|duration||0||string|0|Searchable||UserDefined|Atomic
+mmuuid:d86b0d00-c48a-1e24-9b01-c8207cd53eb7|||anySimpleType|false|java.lang.Float|4|float|float||7|10|float|3|Searchable|true|Basic|Atomic
+mmuuid:860b7dc0-b3f8-1e2a-9a03-beb8638ffd21|||anySimpleType|false|java.math.BigInteger|2147483647|gDay|gDay||0|10|biginteger|0|Searchable|false|UserDefined|Atomic
+mmuuid:6e604140-b3f5-1e2a-9a03-beb8638ffd21|||anySimpleType|false|java.sql.Timestamp|12|gMonthDay|gMonthDay||0||timestamp|0|Searchable||UserDefined|Atomic
+mmuuid:187f5580-b3fb-1e2a-9a03-beb8638ffd21|||anySimpleType|false|java.math.BigInteger|2147483647|gMonth|gMonth||0|10|biginteger|0|Searchable|false|UserDefined|Atomic
+mmuuid:17d08040-b3ed-1e2a-9a03-beb8638ffd21|||anySimpleType|false|java.sql.Timestamp|12|gYearMonth|gYearMonth||0||timestamp|0|Searchable||UserDefined|Atomic
+mmuuid:b02c7600-b3f2-1e2a-9a03-beb8638ffd21|||anySimpleType|false|java.math.BigInteger|2147483647|gYear|gYear||2147483647|10|biginteger|0|Searchable|true|UserDefined|Atomic
+mmuuid:d9998500-ebba-1e2a-9319-8eaa9b2276c7|||anySimpleType|true|java.lang.String|4000|hexBinary|hexBinary||0||string|0|Searchable||UserDefined|Atomic
+mmuuid:45da3500-e78f-1e20-8c26-a038c6ed7576|||decimal|false|java.math.BigInteger|2147483647|integer|integer||2147483647|10|biginteger|0|Searchable|true|UserDefined|Atomic
+mmuuid:33add3c0-b98d-1e21-b812-969c8fc8b016|||long|false|java.lang.Integer|4|int|int||10|10|integer|0|Searchable|true|Basic|Atomic
+mmuuid:d4d980c0-e623-1e20-8c26-a038c6ed7576|||token|true|java.lang.String|4000|language|language||0||string|0|Searchable||UserDefined|Atomic
+mmuuid:8cdee840-b900-1e21-b812-969c8fc8b016|||integer|false|java.lang.Long|8|long|long||19|10|long|0|Searchable|true|Basic|Atomic
+mmuuid:86d29280-b8d3-1e21-b812-969c8fc8b016|||nonPositiveInteger|false|java.math.BigInteger|2147483647|negativeInteger|negativeInteger||2147483647|10|biginteger|0|Searchable|true|UserDefined|Atomic
+mmuuid:0e081200-b8a4-1e21-b812-969c8fc8b016|||integer|false|java.math.BigInteger|2147483647|nonNegativeInteger|nonNegativeInteger||2147483647|10|biginteger|0|Searchable|false|UserDefined|Atomic
+mmuuid:cbdd6e40-b9d2-1e21-8c26-a038c6ed7576|||integer|false|java.math.BigInteger|2147483647|nonPositiveInteger|nonPositiveInteger||2147483647|10|biginteger|0|Searchable|true|UserDefined|Atomic
+mmuuid:4df43700-3b13-1e20-921b-eeee28353879|||string|true|java.lang.String|4000|normalizedString|normalizedString||0||string|0|Searchable||UserDefined|Atomic
+mmuuid:1cbbd380-b9ea-1e21-b812-969c8fc8b016|||nonNegativeInteger|false|java.math.BigInteger|2147483647|positiveInteger|positiveInteger||2147483647|10|biginteger|0|Searchable|false|UserDefined|Atomic
+mmuuid:5bbcf140-b9ae-1e21-b812-969c8fc8b016|||int|false|java.lang.Short|2|short|short||5|10|short|0|Searchable|true|Basic|Atomic
+mmuuid:bf6c34c0-c442-1e24-9b01-c8207cd53eb7|||anySimpleType|true|java.lang.String|4000|string|string||0||string|0|Searchable||Basic|Atomic
+mmuuid:3b892180-c4a7-1e24-9b01-c8207cd53eb7|||anySimpleType|false|java.sql.Time|4|time|time||0||time|0|Searchable||Basic|Atomic
+mmuuid:3425cb80-d844-1e20-9027-be6d2c3b8b3a|||normalizedString|true|java.lang.String|4000|token|token||0||string|0|Searchable||UserDefined|Atomic
+mmuuid:cff745c0-baa2-1e21-b812-969c8fc8b016|||unsignedShort|false|java.lang.Short|2|unsignedByte|unsignedByte||5|10|short|0|Searchable|false|UserDefined|Atomic
+mmuuid:badcbd80-ba63-1e21-b812-969c8fc8b016|||unsignedLong|false|java.lang.Long|8|unsignedInt|unsignedInt||19|10|long|0|Searchable|false|UserDefined|Atomic
+mmuuid:54b98780-ba14-1e21-b812-969c8fc8b016|||nonNegativeInteger|false|java.math.BigInteger|2147483647|unsignedLong|unsignedLong||2147483647|10|biginteger|0|Searchable|false|UserDefined|Atomic
+mmuuid:327093c0-ba88-1e21-b812-969c8fc8b016|||unsignedInt|false|java.lang.Integer|4|unsignedShort|unsignedShort||10|10|integer|0|Searchable|false|UserDefined|Atomic
+mmuuid:182fd511-1a3e-447a-a6ea-72569d6a22ec|||base64Binary|false|org.teiid.core.types.BinaryType|8196|varbinary|varbinary||0||varbinary|0|Searchable||Basic|Atomic
\ No newline at end of file
Modified: trunk/engine/src/test/java/org/teiid/query/metadata/TestDDLStringVisitor.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/query/metadata/TestDDLStringVisitor.java 2012-07-17 01:00:58 UTC (rev 4242)
+++ trunk/engine/src/test/java/org/teiid/query/metadata/TestDDLStringVisitor.java 2012-07-19 02:57:49 UTC (rev 4243)
@@ -48,7 +48,7 @@
" e2 string(10) UNIQUE,\n" +
" e3 date NOT NULL UNIQUE,\n" +
" e4 bigdecimal(12,3),\n" +
- " e5 integer AUTO_INCREMENT INDEX OPTIONS (UUID 'uuid', NAMEINSOURCE 'nis', SELECTABLE 'false'),\n" +
+ " e5 integer AUTO_INCREMENT INDEX OPTIONS (UUID 'uuid', NAMEINSOURCE 'nis', SELECTABLE false),\n" +
" e6 string INDEX DEFAULT 'hello'\n" +
") OPTIONS (ANNOTATION 'Test Table', CARDINALITY '12', FOO 'BAR', UPDATABLE 'true', UUID 'uuid2');";
Modified: trunk/engine/src/test/java/org/teiid/query/parser/TestDDLParser.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/query/parser/TestDDLParser.java 2012-07-17 01:00:58 UTC (rev 4242)
+++ trunk/engine/src/test/java/org/teiid/query/parser/TestDDLParser.java 2012-07-19 02:57:49 UTC (rev 4243)
@@ -24,7 +24,6 @@
import java.io.File;
import java.io.IOException;
-import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Properties;
@@ -32,8 +31,8 @@
import org.junit.Test;
import org.teiid.adminapi.impl.ModelMetaData;
import org.teiid.adminapi.impl.VDBMetaData;
-import org.teiid.core.types.DataTypeManager;
import org.teiid.core.util.ObjectConverterUtil;
+import org.teiid.datatypes.SystemDataTypes;
import org.teiid.metadata.*;
import org.teiid.metadata.BaseColumn.NullType;
import org.teiid.query.metadata.MetadataValidator;
@@ -85,7 +84,7 @@
Column e6 = columns.get(5);
assertEquals("e1", e1.getName());
- assertEquals("integer", e1.getDatatype().getName());
+ assertEquals("int", e1.getDatatype().getName());
assertEquals("primary key not same", e1, table.getPrimaryKey().getColumns().get(0));
assertEquals("e2", e2.getName());
@@ -107,7 +106,7 @@
assertEquals(3, e4.getScale());
assertEquals("e5", e5.getName());
- assertEquals("integer", e5.getDatatype().getName());
+ assertEquals("int", e5.getDatatype().getName());
assertEquals(true, e5.isAutoIncremented());
assertEquals("uuid", e5.getUUID());
assertEquals("nis", e5.getNameInSource());
@@ -630,20 +629,8 @@
return mf;
}
- //TODO: could elevate type logic out of metadata
public static Map<String, Datatype> getDataTypes() {
- Map<String, Datatype> datatypes = new HashMap<String, Datatype>();
- for (String name:DataTypeManager.getAllDataTypeNames()) {
- Datatype dt = new Datatype();
- dt.setName(name);
- Class<?> dataTypeClass = DataTypeManager.getDataTypeClass(name);
- dt.setJavaClassName(dataTypeClass.getName());
- dt.setRuntimeTypeName(DataTypeManager.getDataTypeName(dataTypeClass));
- datatypes.put(name, dt);
- }
- datatypes.put("varchar", datatypes.get(DataTypeManager.DefaultDataTypes.STRING));
- datatypes.put("decimal", datatypes.get(DataTypeManager.DefaultDataTypes.BIG_DECIMAL));
- return datatypes;
+ return SystemDataTypes.getInstance().getBuiltinTypeMap();
}
@Test public void testKeyResolve() {
Modified: trunk/metadata/src/main/java/org/teiid/metadata/index/IndexMetadataStore.java
===================================================================
--- trunk/metadata/src/main/java/org/teiid/metadata/index/IndexMetadataStore.java 2012-07-17 01:00:58 UTC (rev 4242)
+++ trunk/metadata/src/main/java/org/teiid/metadata/index/IndexMetadataStore.java 2012-07-19 02:57:49 UTC (rev 4243)
@@ -24,7 +24,14 @@
import java.io.IOException;
import java.net.URISyntaxException;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
import org.jboss.vfs.VirtualFile;
import org.jboss.vfs.VirtualFileFilter;
@@ -213,9 +220,7 @@
// optimized for multi-thread loading this locking to sync will work
synchronized (this) {
if (!this.loaded) {
- if (systemDatatypes == null) {
- SystemDataTypes.loadSystemDatatypes(this);
- }
+
ArrayList<Index> tmp = new ArrayList<Index>();
for (VirtualFile f : indexFiles) {
Index index = new Index(f, true);
@@ -234,7 +239,7 @@
uuidToRecord.put(datatype.getUUID(), datatype);
}
} else {
- for (Datatype datatype : getDatatypes().values()) {
+ for (Datatype datatype : SystemDataTypes.getInstance().getDataTypes()) {
uuidToRecord.put(datatype.getUUID(), datatype);
}
}
Modified: trunk/metadata/src/main/java/org/teiid/metadata/index/RecordFactory.java
===================================================================
--- trunk/metadata/src/main/java/org/teiid/metadata/index/RecordFactory.java 2012-07-17 01:00:58 UTC (rev 4242)
+++ trunk/metadata/src/main/java/org/teiid/metadata/index/RecordFactory.java 2012-07-19 02:57:49 UTC (rev 4243)
@@ -672,7 +672,7 @@
dt.setLength( Integer.parseInt(tokens.get(tokenIndex++)) );
// Append the precision length
- dt.setPrecisionLength( Integer.parseInt(tokens.get(tokenIndex++)) );
+ dt.setPrecision( Integer.parseInt(tokens.get(tokenIndex++)) );
// Append the scale
dt.setScale( Integer.parseInt(tokens.get(tokenIndex++)) );
Modified: trunk/runtime/src/main/java/org/teiid/deployers/PgCatalogMetadataStore.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/deployers/PgCatalogMetadataStore.java 2012-07-17 01:00:58 UTC (rev 4242)
+++ trunk/runtime/src/main/java/org/teiid/deployers/PgCatalogMetadataStore.java 2012-07-19 02:57:49 UTC (rev 4243)
@@ -22,15 +22,11 @@
package org.teiid.deployers;
import java.lang.reflect.Method;
-import java.math.BigInteger;
import java.util.Arrays;
import java.util.Map;
import java.util.Properties;
-import java.util.Random;
-import java.util.UUID;
import org.teiid.core.types.DataTypeManager;
-import org.teiid.metadata.AbstractMetadataRecord;
import org.teiid.metadata.Column;
import org.teiid.metadata.Datatype;
import org.teiid.metadata.FunctionMethod;
@@ -48,11 +44,8 @@
public static final int PG_TYPE_CHARARRAY = 1002;
public static final int PG_TYPE_TEXTARRAY = 1009;
- private Random random;
-
public PgCatalogMetadataStore(String modelName, Map<String, Datatype> dataTypes) throws TranslatorException {
super(modelName, 1, modelName, dataTypes, new Properties(), null);
-
add_pg_namespace();
add_pg_class();
add_pg_attribute();
@@ -71,23 +64,6 @@
addFunction("getExpr3", "pg_get_expr"); //$NON-NLS-1$ //$NON-NLS-2$
}
- @Override
- protected void setUUID(AbstractMetadataRecord record) {
- byte[] randomBytes = new byte[8];
- if (random == null) {
- random = new Random(2010);
- }
- random.nextBytes(randomBytes);
- randomBytes[6] &= 0x0f; /* clear version */
- randomBytes[6] |= 0x40; /* set to version 4 */
- long msb = new BigInteger(randomBytes).longValue();
- random.nextBytes(randomBytes);
- randomBytes[0] &= 0x3f; /* clear variant */
- randomBytes[0] |= 0x80; /* set to IETF variant */
- long lsb = new BigInteger(randomBytes).longValue();
- record.setUUID("mmuid:"+new UUID(msb, lsb)); //$NON-NLS-1$
- }
-
private Table createView(String name) throws TranslatorException {
Table t = addTable(name);
t.setSystem(true);
Modified: trunk/runtime/src/main/java/org/teiid/deployers/VDBRepository.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/deployers/VDBRepository.java 2012-07-17 01:00:58 UTC (rev 4242)
+++ trunk/runtime/src/main/java/org/teiid/deployers/VDBRepository.java 2012-07-19 02:57:49 UTC (rev 4243)
@@ -23,8 +23,6 @@
import java.io.Serializable;
import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
@@ -40,8 +38,8 @@
import org.teiid.adminapi.impl.SourceMappingMetadata;
import org.teiid.adminapi.impl.VDBMetaData;
import org.teiid.core.CoreConstants;
-import org.teiid.core.types.DataTypeManager;
import org.teiid.core.util.PropertiesUtils;
+import org.teiid.datatypes.SystemDataTypes;
import org.teiid.dqp.internal.datamgr.ConnectorManager;
import org.teiid.dqp.internal.datamgr.ConnectorManagerRepository;
import org.teiid.logging.LogConstants;
@@ -71,7 +69,7 @@
private boolean odbcEnabled = false;
private List<VDBLifeCycleListener> listeners = new CopyOnWriteArrayList<VDBLifeCycleListener>();
private SystemFunctionManager systemFunctionManager;
- private Map<String, Datatype> datatypeMap = new HashMap<String, Datatype>();
+ private Map<String, Datatype> datatypeMap = SystemDataTypes.getInstance().getBuiltinTypeMap();
private ReentrantLock lock = new ReentrantLock();
private Condition vdbAdded = lock.newCondition();
@@ -209,55 +207,14 @@
public void setSystemStore(MetadataStore store) {
this.systemStore = store;
- Collection<Datatype> datatypes = this.systemStore.getDatatypes().values();
-
- for (String typeName : DataTypeManager.getAllDataTypeNames()) {
-
- boolean found = false;
- for (Datatype datatypeRecordImpl : datatypes) {
- if (datatypeRecordImpl.getRuntimeTypeName().equalsIgnoreCase(typeName)) {
- datatypeMap.put(typeName, datatypeRecordImpl);
- found = true;
- break;
- }
- }
-
- if (!found) {
- for (Datatype datatypeRecordImpl : datatypes) {
- if (datatypeRecordImpl.getJavaClassName().equals(DataTypeManager.getDataTypeClass(typeName))) {
- datatypeMap.put(typeName, datatypeRecordImpl);
- break;
- }
- }
- }
- }
-
- // add alias types
- addAliasType(datatypes, DataTypeManager.DataTypeAliases.BIGINT);
- addAliasType(datatypes, DataTypeManager.DataTypeAliases.DECIMAL);
- addAliasType(datatypes, DataTypeManager.DataTypeAliases.REAL);
- addAliasType(datatypes, DataTypeManager.DataTypeAliases.SMALLINT);
- addAliasType(datatypes, DataTypeManager.DataTypeAliases.TINYINT);
- addAliasType(datatypes, DataTypeManager.DataTypeAliases.VARCHAR);
-
}
- private void addAliasType(Collection<Datatype> datatypes, String alias) {
- Class<?> typeClass = DataTypeManager.getDataTypeClass(alias);
- for (Datatype datatypeRecordImpl : datatypes) {
- if (datatypeRecordImpl.getJavaClassName().equals(typeClass.getName())) {
- datatypeMap.put(alias, datatypeRecordImpl);
- break;
- }
- }
- }
-
private MetadataStore getODBCMetadataStore() {
try {
PgCatalogMetadataStore pg = new PgCatalogMetadataStore(CoreConstants.ODBC_MODEL, getBuiltinDatatypes());
return pg.asMetadataStore();
} catch (TranslatorException e) {
- LogManager.logError(LogConstants.CTX_DQP, RuntimePlugin.Util.gs(RuntimePlugin.Event.TEIID40002));
+ LogManager.logError(LogConstants.CTX_DQP, e, RuntimePlugin.Util.gs(RuntimePlugin.Event.TEIID40002));
}
return null;
}
Modified: trunk/runtime/src/main/java/org/teiid/runtime/EmbeddedServer.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/runtime/EmbeddedServer.java 2012-07-17 01:00:58 UTC (rev 4242)
+++ trunk/runtime/src/main/java/org/teiid/runtime/EmbeddedServer.java 2012-07-19 02:57:49 UTC (rev 4243)
@@ -22,15 +22,23 @@
package org.teiid.runtime;
-import java.io.IOException;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.atomic.AtomicInteger;
-import javax.transaction.*;
+import javax.transaction.RollbackException;
+import javax.transaction.Synchronization;
+import javax.transaction.SystemException;
+import javax.transaction.Transaction;
+import javax.transaction.TransactionManager;
import org.teiid.Replicated;
import org.teiid.Replicated.ReplicationMode;
@@ -38,21 +46,29 @@
import org.teiid.adminapi.impl.VDBMetaData;
import org.teiid.cache.Cache;
import org.teiid.cache.CacheConfiguration;
+import org.teiid.cache.DefaultCacheFactory;
import org.teiid.cache.CacheConfiguration.Policy;
-import org.teiid.cache.DefaultCacheFactory;
import org.teiid.client.DQP;
import org.teiid.client.security.ILogon;
import org.teiid.common.buffer.BufferManager;
import org.teiid.common.buffer.TupleBufferCache;
+import org.teiid.core.TeiidRuntimeException;
import org.teiid.core.BundleUtil.Event;
-import org.teiid.core.TeiidRuntimeException;
import org.teiid.datatypes.SystemDataTypes;
-import org.teiid.deployers.*;
+import org.teiid.deployers.CompositeVDB;
+import org.teiid.deployers.UDFMetaData;
+import org.teiid.deployers.VDBLifeCycleListener;
+import org.teiid.deployers.VDBRepository;
+import org.teiid.deployers.VirtualDatabaseException;
import org.teiid.dqp.internal.datamgr.ConnectorManager;
import org.teiid.dqp.internal.datamgr.ConnectorManagerRepository;
import org.teiid.dqp.internal.datamgr.ConnectorManagerRepository.ConnectorManagerException;
import org.teiid.dqp.internal.datamgr.ConnectorManagerRepository.ExecutionFactoryProvider;
-import org.teiid.dqp.internal.process.*;
+import org.teiid.dqp.internal.process.CachedResults;
+import org.teiid.dqp.internal.process.DQPCore;
+import org.teiid.dqp.internal.process.PreparedPlan;
+import org.teiid.dqp.internal.process.SessionAwareCache;
+import org.teiid.dqp.internal.process.TransactionServerImpl;
import org.teiid.dqp.service.BufferService;
import org.teiid.dqp.service.TransactionContext;
import org.teiid.dqp.service.TransactionContext.Scope;
@@ -291,11 +307,7 @@
this.replicator = dqpConfiguration.getObjectReplicator();
if (dqpConfiguration.getSystemStore() == null) {
MetadataStore ms = new MetadataStore();
- try {
- SystemDataTypes.loadSystemDatatypes(ms);
- } catch (IOException e) {
- throw new TeiidRuntimeException(e);
- }
+ ms.addDataTypes(SystemDataTypes.getInstance().getDataTypes());
this.repo.setSystemStore(ms);
} else {
this.repo.setSystemStore(dqpConfiguration.getSystemStore());
Modified: trunk/test-integration/common/src/test/java/org/teiid/dqp/internal/process/BaseQueryTest.java
===================================================================
--- trunk/test-integration/common/src/test/java/org/teiid/dqp/internal/process/BaseQueryTest.java 2012-07-17 01:00:58 UTC (rev 4242)
+++ trunk/test-integration/common/src/test/java/org/teiid/dqp/internal/process/BaseQueryTest.java 2012-07-19 02:57:49 UTC (rev 4243)
@@ -56,14 +56,16 @@
protected void doProcess(QueryMetadataInterface metadata, String sql, CapabilitiesFinder capFinder, ProcessorDataManager dataManager, List[] expectedResults, boolean debug) throws Exception {
CommandContext context = createCommandContext();
- context.setMetadata(metadata);
+ if (context.getMetadata() == null) {
+ context.setMetadata(metadata);
+ }
Command command = TestOptimizer.helpGetCommand(sql, metadata, null);
// plan
AnalysisRecord analysisRecord = new AnalysisRecord(false, debug);
ProcessorPlan plan = null;
try {
- plan = QueryOptimizer.optimizePlan(command, metadata, null, capFinder, analysisRecord, createCommandContext());
+ plan = QueryOptimizer.optimizePlan(command, metadata, null, capFinder, analysisRecord, context);
} finally {
if(debug) {
System.out.println(analysisRecord.getDebugLog());
Modified: trunk/test-integration/common/src/test/resources/TestJDBCSocketTransport/testSelect.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/TestJDBCSocketTransport/testSelect.expected 2012-07-17 01:00:58 UTC (rev 4242)
+++ trunk/test-integration/common/src/test/resources/TestJDBCSocketTransport/testSelect.expected 2012-07-19 02:57:49 UTC (rev 4243)
@@ -18,19 +18,19 @@
parts SYS Tables Table <null> true false mmuuid:8551b3bd-11cc-4049-9bcf-fe91a0eb7ba7 -1 <null> true false 17
parts SYSADMIN VDBResources Table <null> true false mmuuid:1785804d-beaf-4831-9531-e59164fedd49 -1 <null> true false 7
parts SYS VirtualDatabases Table <null> true false mmuuid:47297c72-d621-4f4e-af4e-74060ac5f489 -1 <null> true false 18
-parts pg_catalog matpg_datatype Table <null> false false mmuid:0f312b3c-98ca-4a09-81fa-f1ff83f0a6c1 -1 <null> true true 19
-parts pg_catalog matpg_relatt Table <null> false false mmuid:0b0894ba-e1ea-4eaf-bcd2-ea9ebd05e47d -1 <null> true true 20
-parts pg_catalog pg_am Table <null> false false mmuid:da4b747e-7d87-403a-8309-2cdf1399031b -1 <null> true false 21
-parts pg_catalog pg_attrdef Table <null> false false mmuid:e9b278d4-49af-442f-9a5a-b699fe3b102b -1 <null> true false 22
-parts pg_catalog pg_attribute Table <null> false false mmuid:fa463d98-365f-489a-a707-025193cb51eb -1 <null> true true 23
-parts pg_catalog pg_class Table <null> false false mmuid:7e21f2e6-06e3-4bca-9b01-72ea47821560 -1 <null> true true 24
-parts pg_catalog pg_database Table <null> false false mmuid:1aedd02c-5801-41e7-accd-da1f257c26e8 -1 <null> true false 25
-parts pg_catalog pg_index Table <null> false false mmuid:8709e084-48df-417d-b3f8-f4e9b7d8802b -1 <null> true true 26
-parts pg_catalog pg_namespace Table <null> false false mmuid:6609866a-3d7b-4f4b-95fe-ebfac769d699 -1 <null> true false 27
-parts pg_catalog pg_proc Table <null> false false mmuid:b288b3aa-37f2-4a8e-8b1b-e932a2ce3e25 -1 <null> true true 28
-parts pg_catalog pg_trigger Table <null> false false mmuid:64977f3e-f2a0-466e-a5d1-80bb058cbe08 -1 <null> true false 29
-parts pg_catalog pg_type Table <null> false false mmuid:9462e3f8-cd3c-414f-a570-f6f33c40e36a -1 <null> true false 30
-parts pg_catalog pg_user Table <null> false false mmuid:236445e1-408c-40a1-a61c-40e96fb5dc9f -1 <null> true false 31
+parts pg_catalog matpg_datatype Table <null> false false tid:7ff2755e9621-e544c1cc-00000068 -1 <null> true true 19
+parts pg_catalog matpg_relatt Table <null> false false tid:7ff2755e9621-75d65150-0000005e -1 <null> true true 20
+parts pg_catalog pg_am Table <null> false false tid:7ff2755e9621-065a8b74-00000031 -1 <null> true false 21
+parts pg_catalog pg_attrdef Table <null> false false tid:7ff2755e9621-ec00662c-0000004a -1 <null> true false 22
+parts pg_catalog pg_attribute Table <null> false false tid:7ff2755e9621-edc4ea54-0000000f -1 <null> true true 23
+parts pg_catalog pg_class Table <null> false false tid:7ff2755e9621-62e78530-00000004 -1 <null> true true 24
+parts pg_catalog pg_database Table <null> false false tid:7ff2755e9621-dda8fac3-0000004f -1 <null> true false 25
+parts pg_catalog pg_index Table <null> false false tid:7ff2755e9621-633d048a-00000027 -1 <null> true true 26
+parts pg_catalog pg_namespace Table <null> false false tid:7ff2755e9621-37a09513-00000001 -1 <null> true false 27
+parts pg_catalog pg_proc Table <null> false false tid:7ff2755e9621-d9ec709e-00000034 -1 <null> true true 28
+parts pg_catalog pg_trigger Table <null> false false tid:7ff2755e9621-d50d2370-00000040 -1 <null> true false 29
+parts pg_catalog pg_type Table <null> false false tid:7ff2755e9621-d9ee5c82-0000001b -1 <null> true false 30
+parts pg_catalog pg_user Table <null> false false tid:7ff2755e9621-d9eeb913-00000059 -1 <null> true false 31
Row Count : 31
getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
VDBName 12 parts java.lang.String VDBName string SYS Tables 255 255 0 false true false true 1 false true true true
Modified: trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetColumns.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetColumns.expected 2012-07-17 01:00:58 UTC (rev 4242)
+++ trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetColumns.expected 2012-07-19 02:57:49 UTC (rev 4243)
@@ -760,18 +760,18 @@
QT_Ora9DS XQTRecursiveDoc groupDocument.MappingClasses.supervisor ID 2 biginteger 19 <null> 0 0 1 <null> <null> <null> <null> 0 1 YES <null> <null> <null> !
<null> NO
QT_Ora9DS XQTRecursiveDoc groupDocument.MappingClasses.supervisor code 2 biginteger 19 <null> 0 0 1 <null> <null> <null> <null> 0 2 YES <null> <null> <null> !
<null> NO
QT_Ora9DS XQTRecursiveDoc groupDocument.MappingClasses.supervisor groupID 2 biginteger 19 <null> 0 0 1 <null> <null> <null> <null> 0 3 YES <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog matpg_datatype oid 4 integer 10 <null> 0 0 2 <null> <null> <null> <null> 0 1 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog matpg_datatype typname 12 string 4000 <null> 0 0 2 <null> <null> <null> <null> 0 2 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog matpg_datatype name 12 string 4000 <null> 0 0 2 <null> <null> <null> <null> 0 3 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog matpg_datatype uid 12 string 4000 <null> 0 0 2 <null> <null> <null> <null> 0 4 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog matpg_datatype typlen 5 short 5 <null> 0 0 2 <null> <null> <null> <null> 0 5 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog matpg_relatt attrelid 4 integer 10 <null> 0 0 2 <null> <null> <null> <null> 0 1 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog matpg_relatt attnum 5 short 5 <null> 0 0 2 <null> <null> <null> <null> 0 2 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog matpg_relatt attname 12 string 4000 <null> 0 0 2 <null> <null> <null> <null> 0 3 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog matpg_relatt relname 12 string 4000 <null> 0 0 2 <null> <null> <null> <null> 0 4 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog matpg_relatt nspname 12 string 4000 <null> 0 0 2 <null> <null> <null> <null> 0 5 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog matpg_relatt autoinc -7 boolean 1 <null> 0 0 2 <null> <null> <null> <null> 0 6 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog matpg_relatt typoid 4 integer 10 <null> 0 0 2 <null> <null> <null> <null> 0 7 <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog matpg_datatype oid 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 0 1 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog matpg_datatype typname 12 string 4000 <null> 0 0 1 <null> <null> <null> <null> 0 2 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog matpg_datatype name 12 string 4000 <null> 0 0 1 <null> <null> <null> <null> 0 3 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog matpg_datatype uid 12 string 4000 <null> 0 0 1 <null> <null> <null> <null> 0 4 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog matpg_datatype typlen 5 short 5 <null> 0 10 1 <null> <null> <null> <null> 0 5 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog matpg_relatt attrelid 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 0 1 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog matpg_relatt attnum 5 short 5 <null> 0 10 1 <null> <null> <null> <null> 0 2 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog matpg_relatt attname 12 string 4000 <null> 0 0 1 <null> <null> <null> <null> 0 3 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog matpg_relatt relname 12 string 4000 <null> 0 0 1 <null> <null> <null> <null> 0 4 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog matpg_relatt nspname 12 string 4000 <null> 0 0 1 <null> <null> <null> <null> 0 5 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog matpg_relatt autoinc -7 boolean 1 <null> 0 10 1 <null> <null> <null> <null> 0 6 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog matpg_relatt typoid 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 0 7 YES <null> <null> <null> !
<null> NO
QT_Ora9DS XQTDoc mixedContentTestDocument mixedContentTest.wrapper3.key3.data3 12 string 4000 <null> 0 0 1 <null> <null> <null> <null> 0 0 YES <null> <null> <null> !
<null> NO
QT_Ora9DS XQTDoc mixedContentTestDocument mixedContentTest.wrapper3.key3 12 string 4000 <null> 0 0 1 <null> <null> <null> <null> 0 0 YES <null> <null> <null> !
<null> NO
QT_Ora9DS XQTDoc mixedContentTestDocument mixedContentTest.wrapper3 12 string 4000 <null> 0 0 1 <null> <null> <null> <null> 0 0 YES <null> <null> <null> !
<null> NO
@@ -789,84 +789,84 @@
QT_Ora9DS XQTDoc nillableTestDocument nillableTest 12 string 4000 <null> 0 0 1 <null> <null> <null> <null> 0 0 YES <null> <null> <null> !
<null> NO
QT_Ora9DS XQTDoc nillableTestDocument.MappingClasses.wrapper key 2 biginteger 19 <null> 0 0 1 <null> <null> <null> <null> 0 1 YES <null> <null> <null> !
<null> NO
QT_Ora9DS XQTDoc nillableTestDocument.MappingClasses.wrapper nillableField 2 biginteger 19 <null> 0 0 1 <null> <null> <null> <null> 0 2 YES <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog pg_am oid 4 integer 10 <null> 0 0 2 <null> <null> <null> <null> 0 1 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog pg_am amname 12 string 4000 <null> 0 0 2 <null> <null> <null> <null> 0 2 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog pg_attrdef adrelid 4 integer 10 <null> 0 0 2 <null> <null> <null> <null> 0 1 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog pg_attrdef adnum 5 short 5 <null> 0 0 2 <null> <null> <null> <null> 0 2 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog pg_attrdef adbin 12 string 4000 <null> 0 0 2 <null> <null> <null> <null> 0 3 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog pg_attrdef adsrc 12 string 4000 <null> 0 0 2 <null> <null> <null> <null> 0 4 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog pg_attribute oid 4 integer 10 <null> 0 0 2 <null> <null> <null> <null> 0 1 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog pg_attribute attrelid 4 integer 10 <null> 0 0 2 <null> <null> <null> <null> 0 2 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog pg_attribute attname 12 string 4000 <null> 0 0 2 <null> <null> <null> <null> 0 3 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog pg_attribute atttypid 4 integer 10 <null> 0 0 2 <null> <null> <null> <null> 0 4 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog pg_attribute attlen 5 short 5 <null> 0 0 2 <null> <null> <null> <null> 0 5 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog pg_attribute attnum 5 short 5 <null> 0 0 2 <null> <null> <null> <null> 0 6 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog pg_attribute atttypmod 4 integer 10 <null> 0 0 2 <null> <null> <null> <null> 0 7 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog pg_attribute attnotnull -7 boolean 1 <null> 0 0 2 <null> <null> <null> <null> 0 8 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog pg_attribute attisdropped -7 boolean 1 <null> 0 0 2 <null> <null> <null> <null> 0 9 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog pg_attribute atthasdef -7 boolean 1 <null> 0 0 2 <null> <null> <null> <null> 0 10 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog pg_class oid 4 integer 10 <null> 0 0 2 <null> <null> <null> <null> 0 1 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog pg_class relname 12 string 4000 <null> 0 0 2 <null> <null> <null> <null> 0 2 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog pg_class relnamespace 4 integer 10 <null> 0 0 2 <null> <null> <null> <null> 0 3 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog pg_class relkind 1 char 1 <null> 0 0 2 <null> <null> <null> <null> 0 4 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog pg_class relam 4 integer 10 <null> 0 0 2 <null> <null> <null> <null> 0 5 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog pg_class reltuples 7 float 20 <null> 0 0 2 <null> <null> <null> <null> 0 6 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog pg_class relpages 4 integer 10 <null> 0 0 2 <null> <null> <null> <null> 0 7 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog pg_class relhasrules -7 boolean 1 <null> 0 0 2 <null> <null> <null> <null> 0 8 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog pg_class relhasoids -7 boolean 1 <null> 0 0 2 <null> <null> <null> <null> 0 9 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog pg_database oid 4 integer 10 <null> 0 0 2 <null> <null> <null> <null> 0 1 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog pg_database datname 12 string 4000 <null> 0 0 2 <null> <null> <null> <null> 0 2 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog pg_database encoding 4 integer 10 <null> 0 0 2 <null> <null> <null> <null> 0 3 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog pg_database datlastsysoid 4 integer 10 <null> 0 0 2 <null> <null> <null> <null> 0 4 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog pg_database datallowconn 1 char 1 <null> 0 0 2 <null> <null> <null> <null> 0 5 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog pg_database datconfig 2000 object 2147483647 <null> 0 0 2 <null> <null> <null> <null> 0 6 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog pg_database datacl 2000 object 2147483647 <null> 0 0 2 <null> <null> <null> <null> 0 7 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog pg_database datdba 4 integer 10 <null> 0 0 2 <null> <null> <null> <null> 0 8 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog pg_database dattablespace 4 integer 10 <null> 0 0 2 <null> <null> <null> <null> 0 9 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog pg_index oid 4 integer 10 <null> 0 0 2 <null> <null> <null> <null> 0 1 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog pg_index indexrelid 4 integer 10 <null> 0 0 2 <null> <null> <null> <null> 0 2 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog pg_index indrelid 4 integer 10 <null> 0 0 2 <null> <null> <null> <null> 0 3 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog pg_index indisclustered -7 boolean 1 <null> 0 0 2 <null> <null> <null> <null> 0 4 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog pg_index indisunique -7 boolean 1 <null> 0 0 2 <null> <null> <null> <null> 0 5 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog pg_index indisprimary -7 boolean 1 <null> 0 0 2 <null> <null> <null> <null> 0 6 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog pg_index indexprs 12 string 4000 <null> 0 0 2 <null> <null> <null> <null> 0 7 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog pg_index indkey 12 string 4000 <null> 0 0 2 <null> <null> <null> <null> 0 8 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog pg_namespace oid 4 integer 10 <null> 0 0 2 <null> <null> <null> <null> 0 1 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog pg_namespace nspname 12 string 4000 <null> 0 0 2 <null> <null> <null> <null> 0 2 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog pg_proc oid 4 integer 10 <null> 0 0 2 <null> <null> <null> <null> 0 1 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog pg_proc proname 12 string 4000 <null> 0 0 2 <null> <null> <null> <null> 0 2 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog pg_proc proretset -7 boolean 1 <null> 0 0 2 <null> <null> <null> <null> 0 3 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog pg_proc prorettype 4 integer 10 <null> 0 0 2 <null> <null> <null> <null> 0 4 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog pg_proc pronargs 5 short 5 <null> 0 0 2 <null> <null> <null> <null> 0 5 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog pg_proc proargtypes 2000 object 2147483647 <null> 0 0 2 <null> <null> <null> <null> 0 6 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog pg_proc proargnames 2000 object 2147483647 <null> 0 0 2 <null> <null> <null> <null> 0 7 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog pg_proc proargmodes 2000 object 2147483647 <null> 0 0 2 <null> <null> <null> <null> 0 8 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog pg_proc proallargtypes 2000 object 2147483647 <null> 0 0 2 <null> <null> <null> <null> 0 9 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog pg_proc pronamespace 4 integer 10 <null> 0 0 2 <null> <null> <null> <null> 0 10 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog pg_trigger oid 4 integer 10 <null> 0 0 2 <null> <null> <null> <null> 0 1 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog pg_trigger tgconstrrelid 4 integer 10 <null> 0 0 2 <null> <null> <null> <null> 0 2 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog pg_trigger tgfoid 4 integer 10 <null> 0 0 2 <null> <null> <null> <null> 0 3 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog pg_trigger tgargs 4 integer 10 <null> 0 0 2 <null> <null> <null> <null> 0 4 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog pg_trigger tgnargs 4 integer 10 <null> 0 0 2 <null> <null> <null> <null> 0 5 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog pg_trigger tgdeferrable -7 boolean 1 <null> 0 0 2 <null> <null> <null> <null> 0 6 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog pg_trigger tginitdeferred -7 boolean 1 <null> 0 0 2 <null> <null> <null> <null> 0 7 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog pg_trigger tgconstrname 12 string 4000 <null> 0 0 2 <null> <null> <null> <null> 0 8 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog pg_trigger tgrelid 4 integer 10 <null> 0 0 2 <null> <null> <null> <null> 0 9 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog pg_type oid 4 integer 10 <null> 0 0 2 <null> <null> <null> <null> 0 1 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog pg_type typname 12 string 4000 <null> 0 0 2 <null> <null> <null> <null> 0 2 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog pg_type typnamespace 4 integer 10 <null> 0 0 2 <null> <null> <null> <null> 0 3 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog pg_type typlen 5 short 5 <null> 0 0 2 <null> <null> <null> <null> 0 4 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog pg_type typtype 1 char 1 <null> 0 0 2 <null> <null> <null> <null> 0 5 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog pg_type typnotnull -7 boolean 1 <null> 0 0 2 <null> <null> <null> <null> 0 6 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog pg_type typbasetype 4 integer 10 <null> 0 0 2 <null> <null> <null> <null> 0 7 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog pg_type typtypmod 4 integer 10 <null> 0 0 2 <null> <null> <null> <null> 0 8 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog pg_type typdelim 1 char 1 <null> 0 0 2 <null> <null> <null> <null> 0 9 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog pg_type typrelid 4 integer 10 <null> 0 0 2 <null> <null> <null> <null> 0 10 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog pg_type typelem 4 integer 10 <null> 0 0 2 <null> <null> <null> <null> 0 11 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog pg_user oid 4 integer 10 <null> 0 0 2 <null> <null> <null> <null> 0 1 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog pg_user usename 12 string 4000 <null> 0 0 2 <null> <null> <null> <null> 0 2 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog pg_user usecreatedb -7 boolean 1 <null> 0 0 2 <null> <null> <null> <null> 0 3 <null> <null> <null> !
<null> NO
-QT_Ora9DS pg_catalog pg_user usesuper -7 boolean 1 <null> 0 0 2 <null> <null> <null> <null> 0 4 <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog pg_am oid 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 0 1 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog pg_am amname 12 string 4000 <null> 0 0 1 <null> <null> <null> <null> 0 2 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog pg_attrdef adrelid 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 0 1 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog pg_attrdef adnum 5 short 5 <null> 0 10 1 <null> <null> <null> <null> 0 2 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog pg_attrdef adbin 12 string 4000 <null> 0 0 1 <null> <null> <null> <null> 0 3 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog pg_attrdef adsrc 12 string 4000 <null> 0 0 1 <null> <null> <null> <null> 0 4 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog pg_attribute oid 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 0 1 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog pg_attribute attrelid 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 0 2 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog pg_attribute attname 12 string 4000 <null> 0 0 1 <null> <null> <null> <null> 0 3 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog pg_attribute atttypid 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 0 4 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog pg_attribute attlen 5 short 5 <null> 0 10 1 <null> <null> <null> <null> 0 5 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog pg_attribute attnum 5 short 5 <null> 0 10 1 <null> <null> <null> <null> 0 6 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog pg_attribute atttypmod 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 0 7 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog pg_attribute attnotnull -7 boolean 1 <null> 0 10 1 <null> <null> <null> <null> 0 8 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog pg_attribute attisdropped -7 boolean 1 <null> 0 10 1 <null> <null> <null> <null> 0 9 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog pg_attribute atthasdef -7 boolean 1 <null> 0 10 1 <null> <null> <null> <null> 0 10 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog pg_class oid 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 0 1 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog pg_class relname 12 string 4000 <null> 0 0 1 <null> <null> <null> <null> 0 2 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog pg_class relnamespace 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 0 3 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog pg_class relkind 1 char 1 <null> 0 0 1 <null> <null> <null> <null> 0 4 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog pg_class relam 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 0 5 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog pg_class reltuples 7 float 7 <null> 3 10 1 <null> <null> <null> <null> 0 6 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog pg_class relpages 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 0 7 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog pg_class relhasrules -7 boolean 1 <null> 0 10 1 <null> <null> <null> <null> 0 8 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog pg_class relhasoids -7 boolean 1 <null> 0 10 1 <null> <null> <null> <null> 0 9 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog pg_database oid 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 0 1 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog pg_database datname 12 string 4000 <null> 0 0 1 <null> <null> <null> <null> 0 2 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog pg_database encoding 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 0 3 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog pg_database datlastsysoid 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 0 4 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog pg_database datallowconn 1 char 1 <null> 0 0 1 <null> <null> <null> <null> 0 5 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog pg_database datconfig 2000 object 2147483647 <null> 0 0 1 <null> <null> <null> <null> 0 6 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog pg_database datacl 2000 object 2147483647 <null> 0 0 1 <null> <null> <null> <null> 0 7 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog pg_database datdba 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 0 8 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog pg_database dattablespace 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 0 9 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog pg_index oid 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 0 1 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog pg_index indexrelid 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 0 2 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog pg_index indrelid 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 0 3 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog pg_index indisclustered -7 boolean 1 <null> 0 10 1 <null> <null> <null> <null> 0 4 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog pg_index indisunique -7 boolean 1 <null> 0 10 1 <null> <null> <null> <null> 0 5 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog pg_index indisprimary -7 boolean 1 <null> 0 10 1 <null> <null> <null> <null> 0 6 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog pg_index indexprs 12 string 4000 <null> 0 0 1 <null> <null> <null> <null> 0 7 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog pg_index indkey 12 string 4000 <null> 0 0 1 <null> <null> <null> <null> 0 8 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog pg_namespace oid 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 0 1 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog pg_namespace nspname 12 string 4000 <null> 0 0 1 <null> <null> <null> <null> 0 2 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog pg_proc oid 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 0 1 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog pg_proc proname 12 string 4000 <null> 0 0 1 <null> <null> <null> <null> 0 2 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog pg_proc proretset -7 boolean 1 <null> 0 10 1 <null> <null> <null> <null> 0 3 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog pg_proc prorettype 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 0 4 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog pg_proc pronargs 5 short 5 <null> 0 10 1 <null> <null> <null> <null> 0 5 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog pg_proc proargtypes 2000 object 2147483647 <null> 0 0 1 <null> <null> <null> <null> 0 6 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog pg_proc proargnames 2000 object 2147483647 <null> 0 0 1 <null> <null> <null> <null> 0 7 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog pg_proc proargmodes 2000 object 2147483647 <null> 0 0 1 <null> <null> <null> <null> 0 8 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog pg_proc proallargtypes 2000 object 2147483647 <null> 0 0 1 <null> <null> <null> <null> 0 9 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog pg_proc pronamespace 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 0 10 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog pg_trigger oid 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 0 1 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog pg_trigger tgconstrrelid 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 0 2 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog pg_trigger tgfoid 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 0 3 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog pg_trigger tgargs 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 0 4 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog pg_trigger tgnargs 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 0 5 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog pg_trigger tgdeferrable -7 boolean 1 <null> 0 10 1 <null> <null> <null> <null> 0 6 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog pg_trigger tginitdeferred -7 boolean 1 <null> 0 10 1 <null> <null> <null> <null> 0 7 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog pg_trigger tgconstrname 12 string 4000 <null> 0 0 1 <null> <null> <null> <null> 0 8 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog pg_trigger tgrelid 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 0 9 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog pg_type oid 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 0 1 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog pg_type typname 12 string 4000 <null> 0 0 1 <null> <null> <null> <null> 0 2 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog pg_type typnamespace 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 0 3 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog pg_type typlen 5 short 5 <null> 0 10 1 <null> <null> <null> <null> 0 4 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog pg_type typtype 1 char 1 <null> 0 0 1 <null> <null> <null> <null> 0 5 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog pg_type typnotnull -7 boolean 1 <null> 0 10 1 <null> <null> <null> <null> 0 6 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog pg_type typbasetype 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 0 7 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog pg_type typtypmod 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 0 8 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog pg_type typdelim 1 char 1 <null> 0 0 1 <null> <null> <null> <null> 0 9 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog pg_type typrelid 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 0 10 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog pg_type typelem 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 0 11 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog pg_user oid 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 0 1 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog pg_user usename 12 string 4000 <null> 0 0 1 <null> <null> <null> <null> 0 2 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog pg_user usecreatedb -7 boolean 1 <null> 0 10 1 <null> <null> <null> <null> 0 3 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS pg_catalog pg_user usesuper -7 boolean 1 <null> 0 10 1 <null> <null> <null> <null> 0 4 YES <null> <null> <null> !
<null> NO
QT_Ora9DS XQTNestedDoc testBoundTempTable testSimple.recursiveRoot.data 12 string 4000 <null> 0 0 1 <null> <null> <null> <null> 0 0 YES <null> <null> <null> !
<null> NO
QT_Ora9DS XQTNestedDoc testBoundTempTable testSimple.recursiveRoot.key 12 string 4000 <null> 0 0 1 <null> <null> <null> <null> 0 0 YES <null> <null> <null> !
<null> NO
QT_Ora9DS XQTNestedDoc testBoundTempTable testSimple.recursiveRoot.nextKey 12 string 4000 <null> 0 0 1 <null> <null> <null> <null> 0 0 YES <null> <null> <null> !
<null> NO
Modified: trunk/test-integration/common/src/test/resources/TestODBCSchema/test_PG_AM.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/TestODBCSchema/test_PG_AM.expected 2012-07-17 01:00:58 UTC (rev 4242)
+++ trunk/test-integration/common/src/test/resources/TestODBCSchema/test_PG_AM.expected 2012-07-19 02:57:49 UTC (rev 4243)
@@ -3,5 +3,5 @@
0 btree
Row Count : 1
getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
-oid 4 PartsSupplier java.lang.Integer oid integer pg_catalog pg_am 11 10 0 false false false false 2 true true false false
-amname 12 PartsSupplier java.lang.String amname string pg_catalog pg_am 4000 4000 0 false false false false 2 true true false false
+oid 4 PartsSupplier java.lang.Integer oid integer pg_catalog pg_am 11 10 0 false false false false 1 true true true false
+amname 12 PartsSupplier java.lang.String amname string pg_catalog pg_am 4000 4000 0 false true false false 1 true true false false
Modified: trunk/test-integration/common/src/test/resources/TestODBCSchema/test_PG_ATTRDEF.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/TestODBCSchema/test_PG_ATTRDEF.expected 2012-07-17 01:00:58 UTC (rev 4242)
+++ trunk/test-integration/common/src/test/resources/TestODBCSchema/test_PG_ATTRDEF.expected 2012-07-19 02:57:49 UTC (rev 4243)
@@ -256,7 +256,7 @@
31 4 <null> <null>
Row Count : 254
getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
-adrelid 4 PartsSupplier java.lang.Integer adrelid integer pg_catalog pg_attrdef 11 10 0 false false false false 2 true true false false
-adnum 5 PartsSupplier java.lang.Short adnum short pg_catalog pg_attrdef 6 5 0 false false false false 2 true true false false
-adbin 12 PartsSupplier java.lang.String adbin string pg_catalog pg_attrdef 4000 4000 0 false false false false 2 true true false false
-adsrc 12 PartsSupplier java.lang.String adsrc string pg_catalog pg_attrdef 4000 4000 0 false false false false 2 true true false false
+adrelid 4 PartsSupplier java.lang.Integer adrelid integer pg_catalog pg_attrdef 11 10 0 false false false false 1 true true true false
+adnum 5 PartsSupplier java.lang.Short adnum short pg_catalog pg_attrdef 6 5 0 false false false false 1 true true true false
+adbin 12 PartsSupplier java.lang.String adbin string pg_catalog pg_attrdef 4000 4000 0 false true false false 1 true true false false
+adsrc 12 PartsSupplier java.lang.String adsrc string pg_catalog pg_attrdef 4000 4000 0 false true false false 1 true true false false
Modified: trunk/test-integration/common/src/test/resources/TestODBCSchema/test_PG_ATTRIBUTE.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/TestODBCSchema/test_PG_ATTRIBUTE.expected 2012-07-17 01:00:58 UTC (rev 4242)
+++ trunk/test-integration/common/src/test/resources/TestODBCSchema/test_PG_ATTRIBUTE.expected 2012-07-19 02:57:49 UTC (rev 4243)
@@ -164,105 +164,105 @@
162 17 OID 23 4 13 14 true false false
163 18 Name 1043 -1 1 259 true false false
164 18 Version 1043 -1 2 54 true false false
-165 19 oid 23 4 1 4 false false false
-166 19 typname 1043 -1 2 4 false false false
-167 19 name 1043 -1 3 4 false false false
-168 19 uid 1043 -1 4 4 false false false
-169 19 typlen 21 2 5 4 false false false
-170 20 attrelid 23 4 1 4 false false false
-171 20 attnum 21 2 2 4 false false false
-172 20 attname 1043 -1 3 4 false false false
-173 20 relname 1043 -1 4 4 false false false
-174 20 nspname 1043 -1 5 4 false false false
-175 20 autoinc 16 1 6 4 false false false
-176 20 typoid 23 4 7 4 false false false
-177 21 oid 23 4 1 4 false false false
-178 21 amname 1043 -1 2 4 false false false
-179 22 adrelid 23 4 1 4 false false false
-180 22 adnum 21 2 2 4 false false false
-181 22 adbin 1043 -1 3 4 false false false
-182 22 adsrc 1043 -1 4 4 false false false
-183 23 oid 23 4 1 4 false false false
-184 23 attrelid 23 4 2 4 false false false
-185 23 attname 1043 -1 3 4 false false false
-186 23 atttypid 23 4 4 4 false false false
-187 23 attlen 21 2 5 4 false false false
-188 23 attnum 21 2 6 4 false false false
-189 23 atttypmod 23 4 7 4 false false false
-190 23 attnotnull 16 1 8 4 false false false
-191 23 attisdropped 16 1 9 4 false false false
-192 23 atthasdef 16 1 10 4 false false false
-193 24 oid 23 4 1 4 false false false
-194 24 relname 1043 -1 2 4 false false false
-195 24 relnamespace 23 4 3 4 false false false
-196 24 relkind 1042 1 4 4 false false false
-197 24 relam 23 4 5 4 false false false
-198 24 reltuples 700 4 6 4 false false false
-199 24 relpages 23 4 7 4 false false false
-200 24 relhasrules 16 1 8 4 false false false
-201 24 relhasoids 16 1 9 4 false false false
-202 25 oid 23 4 1 4 false false false
-203 25 datname 1043 -1 2 4 false false false
-204 25 encoding 23 4 3 4 false false false
-205 25 datlastsysoid 23 4 4 4 false false false
-206 25 datallowconn 1042 1 5 4 false false false
-207 25 datconfig 705 -2 6 4 false false false
-208 25 datacl 705 -2 7 4 false false false
-209 25 datdba 23 4 8 4 false false false
-210 25 dattablespace 23 4 9 4 false false false
-211 26 oid 23 4 1 4 false false false
-212 26 indexrelid 23 4 2 4 false false false
-213 26 indrelid 23 4 3 4 false false false
-214 26 indisclustered 16 1 4 4 false false false
-215 26 indisunique 16 1 5 4 false false false
-216 26 indisprimary 16 1 6 4 false false false
-217 26 indexprs 1043 -1 7 4 false false false
-218 26 indkey 1043 -1 8 4 false false false
-219 27 oid 23 4 1 4 false false false
-220 27 nspname 1043 -1 2 4 false false false
-221 28 oid 23 4 1 4 false false false
-222 28 proname 1043 -1 2 4 false false false
-223 28 proretset 16 1 3 4 false false false
-224 28 prorettype 23 4 4 4 false false false
-225 28 pronargs 21 2 5 4 false false false
-226 28 proargtypes 705 -2 6 4 false false false
-227 28 proargnames 705 -2 7 4 false false false
-228 28 proargmodes 705 -2 8 4 false false false
-229 28 proallargtypes 705 -2 9 4 false false false
-230 28 pronamespace 23 4 10 4 false false false
-231 29 oid 23 4 1 4 false false false
-232 29 tgconstrrelid 23 4 2 4 false false false
-233 29 tgfoid 23 4 3 4 false false false
-234 29 tgargs 23 4 4 4 false false false
-235 29 tgnargs 23 4 5 4 false false false
-236 29 tgdeferrable 16 1 6 4 false false false
-237 29 tginitdeferred 16 1 7 4 false false false
-238 29 tgconstrname 1043 -1 8 4 false false false
-239 29 tgrelid 23 4 9 4 false false false
-240 30 oid 23 4 1 4 false false false
-241 30 typname 1043 -1 2 4 false false false
-242 30 typnamespace 23 4 3 4 false false false
-243 30 typlen 21 2 4 4 false false false
-244 30 typtype 1042 1 5 4 false false false
-245 30 typnotnull 16 1 6 4 false false false
-246 30 typbasetype 23 4 7 4 false false false
-247 30 typtypmod 23 4 8 4 false false false
-248 30 typdelim 1042 1 9 4 false false false
-249 30 typrelid 23 4 10 4 false false false
-250 30 typelem 23 4 11 4 false false false
-251 31 oid 23 4 1 4 false false false
-252 31 usename 1043 -1 2 4 false false false
-253 31 usecreatedb 16 1 3 4 false false false
-254 31 usesuper 16 1 4 4 false false false
+165 19 oid 23 4 1 8 false false false
+166 19 typname 1043 -1 2 4004 false false false
+167 19 name 1043 -1 3 4004 false false false
+168 19 uid 1043 -1 4 4004 false false false
+169 19 typlen 21 2 5 6 false false false
+170 20 attrelid 23 4 1 8 false false false
+171 20 attnum 21 2 2 6 false false false
+172 20 attname 1043 -1 3 4004 false false false
+173 20 relname 1043 -1 4 4004 false false false
+174 20 nspname 1043 -1 5 4004 false false false
+175 20 autoinc 16 1 6 5 false false false
+176 20 typoid 23 4 7 8 false false false
+177 21 oid 23 4 1 8 false false false
+178 21 amname 1043 -1 2 4004 false false false
+179 22 adrelid 23 4 1 8 false false false
+180 22 adnum 21 2 2 6 false false false
+181 22 adbin 1043 -1 3 4004 false false false
+182 22 adsrc 1043 -1 4 4004 false false false
+183 23 oid 23 4 1 8 false false false
+184 23 attrelid 23 4 2 8 false false false
+185 23 attname 1043 -1 3 4004 false false false
+186 23 atttypid 23 4 4 8 false false false
+187 23 attlen 21 2 5 6 false false false
+188 23 attnum 21 2 6 6 false false false
+189 23 atttypmod 23 4 7 8 false false false
+190 23 attnotnull 16 1 8 5 false false false
+191 23 attisdropped 16 1 9 5 false false false
+192 23 atthasdef 16 1 10 5 false false false
+193 24 oid 23 4 1 8 false false false
+194 24 relname 1043 -1 2 4004 false false false
+195 24 relnamespace 23 4 3 8 false false false
+196 24 relkind 1042 1 4 5 false false false
+197 24 relam 23 4 5 8 false false false
+198 24 reltuples 700 4 6 458759 false false false
+199 24 relpages 23 4 7 8 false false false
+200 24 relhasrules 16 1 8 5 false false false
+201 24 relhasoids 16 1 9 5 false false false
+202 25 oid 23 4 1 8 false false false
+203 25 datname 1043 -1 2 4004 false false false
+204 25 encoding 23 4 3 8 false false false
+205 25 datlastsysoid 23 4 4 8 false false false
+206 25 datallowconn 1042 1 5 5 false false false
+207 25 datconfig 705 -2 6 -2147483645 false false false
+208 25 datacl 705 -2 7 -2147483645 false false false
+209 25 datdba 23 4 8 8 false false false
+210 25 dattablespace 23 4 9 8 false false false
+211 26 oid 23 4 1 8 false false false
+212 26 indexrelid 23 4 2 8 false false false
+213 26 indrelid 23 4 3 8 false false false
+214 26 indisclustered 16 1 4 5 false false false
+215 26 indisunique 16 1 5 5 false false false
+216 26 indisprimary 16 1 6 5 false false false
+217 26 indexprs 1043 -1 7 4004 false false false
+218 26 indkey 1043 -1 8 4004 false false false
+219 27 oid 23 4 1 8 false false false
+220 27 nspname 1043 -1 2 4004 false false false
+221 28 oid 23 4 1 8 false false false
+222 28 proname 1043 -1 2 4004 false false false
+223 28 proretset 16 1 3 5 false false false
+224 28 prorettype 23 4 4 8 false false false
+225 28 pronargs 21 2 5 6 false false false
+226 28 proargtypes 705 -2 6 -2147483645 false false false
+227 28 proargnames 705 -2 7 -2147483645 false false false
+228 28 proargmodes 705 -2 8 -2147483645 false false false
+229 28 proallargtypes 705 -2 9 -2147483645 false false false
+230 28 pronamespace 23 4 10 8 false false false
+231 29 oid 23 4 1 8 false false false
+232 29 tgconstrrelid 23 4 2 8 false false false
+233 29 tgfoid 23 4 3 8 false false false
+234 29 tgargs 23 4 4 8 false false false
+235 29 tgnargs 23 4 5 8 false false false
+236 29 tgdeferrable 16 1 6 5 false false false
+237 29 tginitdeferred 16 1 7 5 false false false
+238 29 tgconstrname 1043 -1 8 4004 false false false
+239 29 tgrelid 23 4 9 8 false false false
+240 30 oid 23 4 1 8 false false false
+241 30 typname 1043 -1 2 4004 false false false
+242 30 typnamespace 23 4 3 8 false false false
+243 30 typlen 21 2 4 6 false false false
+244 30 typtype 1042 1 5 5 false false false
+245 30 typnotnull 16 1 6 5 false false false
+246 30 typbasetype 23 4 7 8 false false false
+247 30 typtypmod 23 4 8 8 false false false
+248 30 typdelim 1042 1 9 5 false false false
+249 30 typrelid 23 4 10 8 false false false
+250 30 typelem 23 4 11 8 false false false
+251 31 oid 23 4 1 8 false false false
+252 31 usename 1043 -1 2 4004 false false false
+253 31 usecreatedb 16 1 3 5 false false false
+254 31 usesuper 16 1 4 5 false false false
Row Count : 254
getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
-oid 4 PartsSupplier java.lang.Integer oid integer pg_catalog pg_attribute 11 10 0 false false false false 2 true true false false
-attrelid 4 PartsSupplier java.lang.Integer attrelid integer pg_catalog pg_attribute 11 10 0 false false false false 2 true true false false
-attname 12 PartsSupplier java.lang.String attname string pg_catalog pg_attribute 4000 4000 0 false false false false 2 true true false false
-atttypid 4 PartsSupplier java.lang.Integer atttypid integer pg_catalog pg_attribute 11 10 0 false false false false 2 true true false false
-attlen 5 PartsSupplier java.lang.Short attlen short pg_catalog pg_attribute 6 5 0 false false false false 2 true true false false
-attnum 5 PartsSupplier java.lang.Short attnum short pg_catalog pg_attribute 6 5 0 false false false false 2 true true false false
-atttypmod 4 PartsSupplier java.lang.Integer atttypmod integer pg_catalog pg_attribute 11 10 0 false false false false 2 true true false false
-attnotnull -7 PartsSupplier java.lang.Boolean attnotnull boolean pg_catalog pg_attribute 5 1 0 false false false false 2 true true false false
-attisdropped -7 PartsSupplier java.lang.Boolean attisdropped boolean pg_catalog pg_attribute 5 1 0 false false false false 2 true true false false
-atthasdef -7 PartsSupplier java.lang.Boolean atthasdef boolean pg_catalog pg_attribute 5 1 0 false false false false 2 true true false false
+oid 4 PartsSupplier java.lang.Integer oid integer pg_catalog pg_attribute 11 10 0 false false false false 1 true true true false
+attrelid 4 PartsSupplier java.lang.Integer attrelid integer pg_catalog pg_attribute 11 10 0 false false false false 1 true true true false
+attname 12 PartsSupplier java.lang.String attname string pg_catalog pg_attribute 4000 4000 0 false true false false 1 true true false false
+atttypid 4 PartsSupplier java.lang.Integer atttypid integer pg_catalog pg_attribute 11 10 0 false false false false 1 true true true false
+attlen 5 PartsSupplier java.lang.Short attlen short pg_catalog pg_attribute 6 5 0 false false false false 1 true true true false
+attnum 5 PartsSupplier java.lang.Short attnum short pg_catalog pg_attribute 6 5 0 false false false false 1 true true true false
+atttypmod 4 PartsSupplier java.lang.Integer atttypmod integer pg_catalog pg_attribute 11 10 0 false false false false 1 true true true false
+attnotnull -7 PartsSupplier java.lang.Boolean attnotnull boolean pg_catalog pg_attribute 5 1 0 false false false false 1 true true false false
+attisdropped -7 PartsSupplier java.lang.Boolean attisdropped boolean pg_catalog pg_attribute 5 1 0 false false false false 1 true true false false
+atthasdef -7 PartsSupplier java.lang.Boolean atthasdef boolean pg_catalog pg_attribute 5 1 0 false false false false 1 true true false false
Modified: trunk/test-integration/common/src/test/resources/TestODBCSchema/test_PG_CLASS.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/TestODBCSchema/test_PG_CLASS.expected 2012-07-17 01:00:58 UTC (rev 4242)
+++ trunk/test-integration/common/src/test/resources/TestODBCSchema/test_PG_CLASS.expected 2012-07-19 02:57:49 UTC (rev 4243)
@@ -1,44 +1,44 @@
-integer string integer char integer float integer boolean boolean
-oid relname relnamespace relkind relam reltuples relpages relhasrules relhasoids
-1 PARTSSUPPLIER.PARTS 1 r 0 0.0 0 false false
-2 PARTSSUPPLIER.SHIP_VIA 1 r 0 0.0 0 false false
-3 PARTSSUPPLIER.STATUS 1 r 0 0.0 0 false false
-4 PARTSSUPPLIER.SUPPLIER 1 r 0 0.0 0 false false
-5 PARTSSUPPLIER.SUPPLIER_PARTS 1 r 0 0.0 0 false false
-6 MatViews 2 r 0 0.0 0 false false
-7 VDBResources 2 r 0 0.0 0 false false
-8 Columns 3 r 0 0.0 0 false false
-9 DataTypes 3 r 0 0.0 0 false false
-10 KeyColumns 3 r 0 0.0 0 false false
-11 Keys 3 r 0 0.0 0 false false
-12 ProcedureParams 3 r 0 0.0 0 false false
-13 Procedures 3 r 0 0.0 0 false false
-14 Properties 3 r 0 0.0 0 false false
-15 ReferenceKeyColumns 3 r 0 0.0 0 false false
-16 Schemas 3 r 0 0.0 0 false false
-17 Tables 3 r 0 0.0 0 false false
-18 VirtualDatabases 3 r 0 0.0 0 false false
-19 matpg_datatype 4 v 0 0.0 0 false false
-20 matpg_relatt 4 v 0 0.0 0 false false
-21 pg_am 4 v 0 0.0 0 false false
-22 pg_attrdef 4 v 0 0.0 0 false false
-23 pg_attribute 4 v 0 0.0 0 false false
-24 pg_class 4 v 0 0.0 0 false false
-25 pg_database 4 v 0 0.0 0 false false
-26 pg_index 4 v 0 0.0 0 false false
-27 pg_namespace 4 v 0 0.0 0 false false
-28 pg_proc 4 v 0 0.0 0 false false
-29 pg_trigger 4 v 0 0.0 0 false false
-30 pg_type 4 v 0 0.0 0 false false
-31 pg_user 4 v 0 0.0 0 false false
+integer string integer char integer float integer boolean boolean
+oid relname relnamespace relkind relam reltuples relpages relhasrules relhasoids
+1 PARTSSUPPLIER.PARTS 1 r 0 0.0 0 false false
+2 PARTSSUPPLIER.SHIP_VIA 1 r 0 0.0 0 false false
+3 PARTSSUPPLIER.STATUS 1 r 0 0.0 0 false false
+4 PARTSSUPPLIER.SUPPLIER 1 r 0 0.0 0 false false
+5 PARTSSUPPLIER.SUPPLIER_PARTS 1 r 0 0.0 0 false false
+6 MatViews 2 r 0 0.0 0 false false
+7 VDBResources 2 r 0 0.0 0 false false
+8 Columns 3 r 0 0.0 0 false false
+9 DataTypes 3 r 0 0.0 0 false false
+10 KeyColumns 3 r 0 0.0 0 false false
+11 Keys 3 r 0 0.0 0 false false
+12 ProcedureParams 3 r 0 0.0 0 false false
+13 Procedures 3 r 0 0.0 0 false false
+14 Properties 3 r 0 0.0 0 false false
+15 ReferenceKeyColumns 3 r 0 0.0 0 false false
+16 Schemas 3 r 0 0.0 0 false false
+17 Tables 3 r 0 0.0 0 false false
+18 VirtualDatabases 3 r 0 0.0 0 false false
+19 matpg_datatype 4 v 0 0.0 0 false false
+20 matpg_relatt 4 v 0 0.0 0 false false
+21 pg_am 4 v 0 0.0 0 false false
+22 pg_attrdef 4 v 0 0.0 0 false false
+23 pg_attribute 4 v 0 0.0 0 false false
+24 pg_class 4 v 0 0.0 0 false false
+25 pg_database 4 v 0 0.0 0 false false
+26 pg_index 4 v 0 0.0 0 false false
+27 pg_namespace 4 v 0 0.0 0 false false
+28 pg_proc 4 v 0 0.0 0 false false
+29 pg_trigger 4 v 0 0.0 0 false false
+30 pg_type 4 v 0 0.0 0 false false
+31 pg_user 4 v 0 0.0 0 false false
Row Count : 31
getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
-oid 4 PartsSupplier java.lang.Integer oid integer pg_catalog pg_class 11 10 0 false false false false 2 true true false false
-relname 12 PartsSupplier java.lang.String relname string pg_catalog pg_class 4000 4000 0 false false false false 2 true true false false
-relnamespace 4 PartsSupplier java.lang.Integer relnamespace integer pg_catalog pg_class 11 10 0 false false false false 2 true true false false
-relkind 1 PartsSupplier java.lang.String relkind char pg_catalog pg_class 1 1 0 false false false false 2 true true false false
-relam 4 PartsSupplier java.lang.Integer relam integer pg_catalog pg_class 11 10 0 false false false false 2 true true false false
-reltuples 7 PartsSupplier java.lang.Float reltuples float pg_catalog pg_class 22 20 0 false false false false 2 true true false false
-relpages 4 PartsSupplier java.lang.Integer relpages integer pg_catalog pg_class 11 10 0 false false false false 2 true true false false
-relhasrules -7 PartsSupplier java.lang.Boolean relhasrules boolean pg_catalog pg_class 5 1 0 false false false false 2 true true false false
-relhasoids -7 PartsSupplier java.lang.Boolean relhasoids boolean pg_catalog pg_class 5 1 0 false false false false 2 true true false false
+oid 4 PartsSupplier java.lang.Integer oid integer pg_catalog pg_class 11 10 0 false false false false 1 true true true false
+relname 12 PartsSupplier java.lang.String relname string pg_catalog pg_class 4000 4000 0 false true false false 1 true true false false
+relnamespace 4 PartsSupplier java.lang.Integer relnamespace integer pg_catalog pg_class 11 10 0 false false false false 1 true true true false
+relkind 1 PartsSupplier java.lang.String relkind char pg_catalog pg_class 1 1 0 false true false false 1 true true false false
+relam 4 PartsSupplier java.lang.Integer relam integer pg_catalog pg_class 11 10 0 false false false false 1 true true true false
+reltuples 7 PartsSupplier java.lang.Float reltuples float pg_catalog pg_class 9 7 3 false false false false 1 true true true false
+relpages 4 PartsSupplier java.lang.Integer relpages integer pg_catalog pg_class 11 10 0 false false false false 1 true true true false
+relhasrules -7 PartsSupplier java.lang.Boolean relhasrules boolean pg_catalog pg_class 5 1 0 false false false false 1 true true false false
+relhasoids -7 PartsSupplier java.lang.Boolean relhasoids boolean pg_catalog pg_class 5 1 0 false false false false 1 true true false false
Modified: trunk/test-integration/common/src/test/resources/TestODBCSchema/test_PG_DATABASE.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/TestODBCSchema/test_PG_DATABASE.expected 2012-07-17 01:00:58 UTC (rev 4242)
+++ trunk/test-integration/common/src/test/resources/TestODBCSchema/test_PG_DATABASE.expected 2012-07-19 02:57:49 UTC (rev 4243)
@@ -3,12 +3,12 @@
0 teiid 6 100000 t <null> <null> 0 0
Row Count : 1
getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
-oid 4 PartsSupplier java.lang.Integer oid integer pg_catalog pg_database 11 10 0 false false false false 2 true true false false
-datname 12 PartsSupplier java.lang.String datname string pg_catalog pg_database 4000 4000 0 false false false false 2 true true false false
-encoding 4 PartsSupplier java.lang.Integer encoding integer pg_catalog pg_database 11 10 0 false false false false 2 true true false false
-datlastsysoid 4 PartsSupplier java.lang.Integer datlastsysoid integer pg_catalog pg_database 11 10 0 false false false false 2 true true false false
-datallowconn 1 PartsSupplier java.lang.String datallowconn char pg_catalog pg_database 1 1 0 false false false false 2 true true false false
-datconfig 2000 PartsSupplier java.lang.Object datconfig object pg_catalog pg_database 2147483647 2147483647 0 false false false false 2 true true false false
-datacl 2000 PartsSupplier java.lang.Object datacl object pg_catalog pg_database 2147483647 2147483647 0 false false false false 2 true true false false
-datdba 4 PartsSupplier java.lang.Integer datdba integer pg_catalog pg_database 11 10 0 false false false false 2 true true false false
-dattablespace 4 PartsSupplier java.lang.Integer dattablespace integer pg_catalog pg_database 11 10 0 false false false false 2 true true false false
+oid 4 PartsSupplier java.lang.Integer oid integer pg_catalog pg_database 11 10 0 false false false false 1 true true true false
+datname 12 PartsSupplier java.lang.String datname string pg_catalog pg_database 4000 4000 0 false true false false 1 true true false false
+encoding 4 PartsSupplier java.lang.Integer encoding integer pg_catalog pg_database 11 10 0 false false false false 1 true true true false
+datlastsysoid 4 PartsSupplier java.lang.Integer datlastsysoid integer pg_catalog pg_database 11 10 0 false false false false 1 true true true false
+datallowconn 1 PartsSupplier java.lang.String datallowconn char pg_catalog pg_database 1 1 0 false true false false 1 true true false false
+datconfig 2000 PartsSupplier java.lang.Object datconfig object pg_catalog pg_database 2147483647 2147483647 0 false false false false 1 true false false false
+datacl 2000 PartsSupplier java.lang.Object datacl object pg_catalog pg_database 2147483647 2147483647 0 false false false false 1 true false false false
+datdba 4 PartsSupplier java.lang.Integer datdba integer pg_catalog pg_database 11 10 0 false false false false 1 true true true false
+dattablespace 4 PartsSupplier java.lang.Integer dattablespace integer pg_catalog pg_database 11 10 0 false false false false 1 true true true false
Modified: trunk/test-integration/common/src/test/resources/TestODBCSchema/test_PG_INDEX.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/TestODBCSchema/test_PG_INDEX.expected 2012-07-17 01:00:58 UTC (rev 4242)
+++ trunk/test-integration/common/src/test/resources/TestODBCSchema/test_PG_INDEX.expected 2012-07-19 02:57:49 UTC (rev 4243)
@@ -24,11 +24,11 @@
22 22 28 false false true 0
Row Count : 22
getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
-oid 4 PartsSupplier java.lang.Integer oid integer pg_catalog pg_index 11 10 0 false false false false 2 true true false false
-indexrelid 4 PartsSupplier java.lang.Integer indexrelid integer pg_catalog pg_index 11 10 0 false false false false 2 true true false false
-indrelid 4 PartsSupplier java.lang.Integer indrelid integer pg_catalog pg_index 11 10 0 false false false false 2 true true false false
-indisclustered -7 PartsSupplier java.lang.Boolean indisclustered boolean pg_catalog pg_index 5 1 0 false false false false 2 true true false false
-indisunique -7 PartsSupplier java.lang.Boolean indisunique boolean pg_catalog pg_index 5 1 0 false false false false 2 true true false false
-indisprimary -7 PartsSupplier java.lang.Boolean indisprimary boolean pg_catalog pg_index 5 1 0 false false false false 2 true true false false
-indexprs 12 PartsSupplier java.lang.String indexprs string pg_catalog pg_index 4000 4000 0 false false false false 2 true true false false
-indkey 12 PartsSupplier java.lang.String indkey string pg_catalog pg_index 4000 4000 0 false false false false 2 true true false false
+oid 4 PartsSupplier java.lang.Integer oid integer pg_catalog pg_index 11 10 0 false false false false 1 true true true false
+indexrelid 4 PartsSupplier java.lang.Integer indexrelid integer pg_catalog pg_index 11 10 0 false false false false 1 true true true false
+indrelid 4 PartsSupplier java.lang.Integer indrelid integer pg_catalog pg_index 11 10 0 false false false false 1 true true true false
+indisclustered -7 PartsSupplier java.lang.Boolean indisclustered boolean pg_catalog pg_index 5 1 0 false false false false 1 true true false false
+indisunique -7 PartsSupplier java.lang.Boolean indisunique boolean pg_catalog pg_index 5 1 0 false false false false 1 true true false false
+indisprimary -7 PartsSupplier java.lang.Boolean indisprimary boolean pg_catalog pg_index 5 1 0 false false false false 1 true true false false
+indexprs 12 PartsSupplier java.lang.String indexprs string pg_catalog pg_index 4000 4000 0 false true false false 1 true true false false
+indkey 12 PartsSupplier java.lang.String indkey string pg_catalog pg_index 4000 4000 0 false true false false 1 true true false false
Modified: trunk/test-integration/common/src/test/resources/TestODBCSchema/test_PG_NAMESPACE.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/TestODBCSchema/test_PG_NAMESPACE.expected 2012-07-17 01:00:58 UTC (rev 4242)
+++ trunk/test-integration/common/src/test/resources/TestODBCSchema/test_PG_NAMESPACE.expected 2012-07-19 02:57:49 UTC (rev 4243)
@@ -6,5 +6,5 @@
4 pg_catalog
Row Count : 4
getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
-oid 4 PartsSupplier java.lang.Integer oid integer pg_catalog pg_namespace 11 10 0 false false false false 2 true true false false
-nspname 12 PartsSupplier java.lang.String nspname string pg_catalog pg_namespace 4000 4000 0 false false false false 2 true true false false
+oid 4 PartsSupplier java.lang.Integer oid integer pg_catalog pg_namespace 11 10 0 false false false false 1 true true true false
+nspname 12 PartsSupplier java.lang.String nspname string pg_catalog pg_namespace 4000 4000 0 false true false false 1 true true false false
Modified: trunk/test-integration/common/src/test/resources/TestODBCSchema/test_PG_TRIGGER.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/TestODBCSchema/test_PG_TRIGGER.expected 2012-07-17 01:00:58 UTC (rev 4242)
+++ trunk/test-integration/common/src/test/resources/TestODBCSchema/test_PG_TRIGGER.expected 2012-07-19 02:57:49 UTC (rev 4243)
@@ -2,12 +2,12 @@
oid tgconstrrelid tgfoid tgargs tgnargs tgdeferrable tginitdeferred tgconstrname tgrelid
Row Count : 0
getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
-oid 4 PartsSupplier java.lang.Integer oid integer pg_catalog pg_trigger 11 10 0 false false false false 2 true true false false
-tgconstrrelid 4 PartsSupplier java.lang.Integer tgconstrrelid integer pg_catalog pg_trigger 11 10 0 false false false false 2 true true false false
-tgfoid 4 PartsSupplier java.lang.Integer tgfoid integer pg_catalog pg_trigger 11 10 0 false false false false 2 true true false false
-tgargs 4 PartsSupplier java.lang.Integer tgargs integer pg_catalog pg_trigger 11 10 0 false false false false 2 true true false false
-tgnargs 4 PartsSupplier java.lang.Integer tgnargs integer pg_catalog pg_trigger 11 10 0 false false false false 2 true true false false
-tgdeferrable -7 PartsSupplier java.lang.Boolean tgdeferrable boolean pg_catalog pg_trigger 5 1 0 false false false false 2 true true false false
-tginitdeferred -7 PartsSupplier java.lang.Boolean tginitdeferred boolean pg_catalog pg_trigger 5 1 0 false false false false 2 true true false false
-tgconstrname 12 PartsSupplier java.lang.String tgconstrname string pg_catalog pg_trigger 4000 4000 0 false false false false 2 true true false false
-tgrelid 4 PartsSupplier java.lang.Integer tgrelid integer pg_catalog pg_trigger 11 10 0 false false false false 2 true true false false
+oid 4 PartsSupplier java.lang.Integer oid integer pg_catalog pg_trigger 11 10 0 false false false false 1 true true true false
+tgconstrrelid 4 PartsSupplier java.lang.Integer tgconstrrelid integer pg_catalog pg_trigger 11 10 0 false false false false 1 true true true false
+tgfoid 4 PartsSupplier java.lang.Integer tgfoid integer pg_catalog pg_trigger 11 10 0 false false false false 1 true true true false
+tgargs 4 PartsSupplier java.lang.Integer tgargs integer pg_catalog pg_trigger 11 10 0 false false false false 1 true true true false
+tgnargs 4 PartsSupplier java.lang.Integer tgnargs integer pg_catalog pg_trigger 11 10 0 false false false false 1 true true true false
+tgdeferrable -7 PartsSupplier java.lang.Boolean tgdeferrable boolean pg_catalog pg_trigger 5 1 0 false false false false 1 true true false false
+tginitdeferred -7 PartsSupplier java.lang.Boolean tginitdeferred boolean pg_catalog pg_trigger 5 1 0 false false false false 1 true true false false
+tgconstrname 12 PartsSupplier java.lang.String tgconstrname string pg_catalog pg_trigger 4000 4000 0 false true false false 1 true true false false
+tgrelid 4 PartsSupplier java.lang.Integer tgrelid integer pg_catalog pg_trigger 11 10 0 false false false false 1 true true true false
Modified: trunk/test-integration/common/src/test/resources/TestODBCSchema/test_PG_TYPE.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/TestODBCSchema/test_PG_TYPE.expected 2012-07-17 01:00:58 UTC (rev 4242)
+++ trunk/test-integration/common/src/test/resources/TestODBCSchema/test_PG_TYPE.expected 2012-07-19 02:57:49 UTC (rev 4243)
@@ -38,14 +38,14 @@
2283 anyelement 3 4 p false 0 -1 , 0 0
Row Count : 36
getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
-oid 4 PartsSupplier java.lang.Integer oid integer pg_catalog pg_type 11 10 0 false false false false 2 true true false false
-typname 12 PartsSupplier java.lang.String typname string pg_catalog pg_type 4000 4000 0 false false false false 2 true true false false
-typnamespace 4 PartsSupplier java.lang.Integer typnamespace integer pg_catalog pg_type 11 10 0 false false false false 2 true true false false
-typlen 5 PartsSupplier java.lang.Short typlen short pg_catalog pg_type 6 5 0 false false false false 2 true true false false
-typtype 1 PartsSupplier java.lang.String typtype char pg_catalog pg_type 1 1 0 false false false false 2 true true false false
-typnotnull -7 PartsSupplier java.lang.Boolean typnotnull boolean pg_catalog pg_type 5 1 0 false false false false 2 true true false false
-typbasetype 4 PartsSupplier java.lang.Integer typbasetype integer pg_catalog pg_type 11 10 0 false false false false 2 true true false false
-typtypmod 4 PartsSupplier java.lang.Integer typtypmod integer pg_catalog pg_type 11 10 0 false false false false 2 true true false false
-typdelim 1 PartsSupplier java.lang.String typdelim char pg_catalog pg_type 1 1 0 false false false false 2 true true false false
-typrelid 4 PartsSupplier java.lang.Integer typrelid integer pg_catalog pg_type 11 10 0 false false false false 2 true true false false
-typelem 4 PartsSupplier java.lang.Integer typelem integer pg_catalog pg_type 11 10 0 false false false false 2 true true false false
+oid 4 PartsSupplier java.lang.Integer oid integer pg_catalog pg_type 11 10 0 false false false false 1 true true true false
+typname 12 PartsSupplier java.lang.String typname string pg_catalog pg_type 4000 4000 0 false true false false 1 true true false false
+typnamespace 4 PartsSupplier java.lang.Integer typnamespace integer pg_catalog pg_type 11 10 0 false false false false 1 true true true false
+typlen 5 PartsSupplier java.lang.Short typlen short pg_catalog pg_type 6 5 0 false false false false 1 true true true false
+typtype 1 PartsSupplier java.lang.String typtype char pg_catalog pg_type 1 1 0 false true false false 1 true true false false
+typnotnull -7 PartsSupplier java.lang.Boolean typnotnull boolean pg_catalog pg_type 5 1 0 false false false false 1 true true false false
+typbasetype 4 PartsSupplier java.lang.Integer typbasetype integer pg_catalog pg_type 11 10 0 false false false false 1 true true true false
+typtypmod 4 PartsSupplier java.lang.Integer typtypmod integer pg_catalog pg_type 11 10 0 false false false false 1 true true true false
+typdelim 1 PartsSupplier java.lang.String typdelim char pg_catalog pg_type 1 1 0 false true false false 1 true true false false
+typrelid 4 PartsSupplier java.lang.Integer typrelid integer pg_catalog pg_type 11 10 0 false false false false 1 true true true false
+typelem 4 PartsSupplier java.lang.Integer typelem integer pg_catalog pg_type 11 10 0 false false false false 1 true true true false
Modified: trunk/test-integration/common/src/test/resources/TestODBCSchema/test_PG_USER.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/TestODBCSchema/test_PG_USER.expected 2012-07-17 01:00:58 UTC (rev 4242)
+++ trunk/test-integration/common/src/test/resources/TestODBCSchema/test_PG_USER.expected 2012-07-19 02:57:49 UTC (rev 4243)
@@ -3,7 +3,7 @@
0 <null> false false
Row Count : 1
getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
-oid 4 PartsSupplier java.lang.Integer oid integer pg_catalog pg_user 11 10 0 false false false false 2 true true false false
-usename 12 PartsSupplier java.lang.String usename string pg_catalog pg_user 4000 4000 0 false false false false 2 true true false false
-usecreatedb -7 PartsSupplier java.lang.Boolean usecreatedb boolean pg_catalog pg_user 5 1 0 false false false false 2 true true false false
-usesuper -7 PartsSupplier java.lang.Boolean usesuper boolean pg_catalog pg_user 5 1 0 false false false false 2 true true false false
+oid 4 PartsSupplier java.lang.Integer oid integer pg_catalog pg_user 11 10 0 false false false false 1 true true true false
+usename 12 PartsSupplier java.lang.String usename string pg_catalog pg_user 4000 4000 0 false true false false 1 true true false false
+usecreatedb -7 PartsSupplier java.lang.Boolean usecreatedb boolean pg_catalog pg_user 5 1 0 false false false false 1 true true false false
+usesuper -7 PartsSupplier java.lang.Boolean usesuper boolean pg_catalog pg_user 5 1 0 false false false false 1 true true false false
Modified: trunk/test-integration/common/src/test/resources/TestODBCSocketTransport/testSelect.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/TestODBCSocketTransport/testSelect.expected 2012-07-17 01:00:58 UTC (rev 4242)
+++ trunk/test-integration/common/src/test/resources/TestODBCSocketTransport/testSelect.expected 2012-07-19 02:57:49 UTC (rev 4243)
@@ -18,19 +18,19 @@
parts SYS Tables Table <null> true false mmuuid:8551b3bd-11cc-4049-9bcf-fe91a0eb7ba7 -1 <null> true false 17
parts SYSADMIN VDBResources Table <null> true false mmuuid:1785804d-beaf-4831-9531-e59164fedd49 -1 <null> true false 7
parts SYS VirtualDatabases Table <null> true false mmuuid:47297c72-d621-4f4e-af4e-74060ac5f489 -1 <null> true false 18
-parts pg_catalog matpg_datatype Table <null> false false mmuid:0f312b3c-98ca-4a09-81fa-f1ff83f0a6c1 -1 <null> true true 19
-parts pg_catalog matpg_relatt Table <null> false false mmuid:0b0894ba-e1ea-4eaf-bcd2-ea9ebd05e47d -1 <null> true true 20
-parts pg_catalog pg_am Table <null> false false mmuid:da4b747e-7d87-403a-8309-2cdf1399031b -1 <null> true false 21
-parts pg_catalog pg_attrdef Table <null> false false mmuid:e9b278d4-49af-442f-9a5a-b699fe3b102b -1 <null> true false 22
-parts pg_catalog pg_attribute Table <null> false false mmuid:fa463d98-365f-489a-a707-025193cb51eb -1 <null> true true 23
-parts pg_catalog pg_class Table <null> false false mmuid:7e21f2e6-06e3-4bca-9b01-72ea47821560 -1 <null> true true 24
-parts pg_catalog pg_database Table <null> false false mmuid:1aedd02c-5801-41e7-accd-da1f257c26e8 -1 <null> true false 25
-parts pg_catalog pg_index Table <null> false false mmuid:8709e084-48df-417d-b3f8-f4e9b7d8802b -1 <null> true true 26
-parts pg_catalog pg_namespace Table <null> false false mmuid:6609866a-3d7b-4f4b-95fe-ebfac769d699 -1 <null> true false 27
-parts pg_catalog pg_proc Table <null> false false mmuid:b288b3aa-37f2-4a8e-8b1b-e932a2ce3e25 -1 <null> true true 28
-parts pg_catalog pg_trigger Table <null> false false mmuid:64977f3e-f2a0-466e-a5d1-80bb058cbe08 -1 <null> true false 29
-parts pg_catalog pg_type Table <null> false false mmuid:9462e3f8-cd3c-414f-a570-f6f33c40e36a -1 <null> true false 30
-parts pg_catalog pg_user Table <null> false false mmuid:236445e1-408c-40a1-a61c-40e96fb5dc9f -1 <null> true false 31
+parts pg_catalog matpg_datatype Table <null> false false tid:7ff2755e9621-e544c1cc-00000068 -1 <null> true true 19
+parts pg_catalog matpg_relatt Table <null> false false tid:7ff2755e9621-75d65150-0000005e -1 <null> true true 20
+parts pg_catalog pg_am Table <null> false false tid:7ff2755e9621-065a8b74-00000031 -1 <null> true false 21
+parts pg_catalog pg_attrdef Table <null> false false tid:7ff2755e9621-ec00662c-0000004a -1 <null> true false 22
+parts pg_catalog pg_attribute Table <null> false false tid:7ff2755e9621-edc4ea54-0000000f -1 <null> true true 23
+parts pg_catalog pg_class Table <null> false false tid:7ff2755e9621-62e78530-00000004 -1 <null> true true 24
+parts pg_catalog pg_database Table <null> false false tid:7ff2755e9621-dda8fac3-0000004f -1 <null> true false 25
+parts pg_catalog pg_index Table <null> false false tid:7ff2755e9621-633d048a-00000027 -1 <null> true true 26
+parts pg_catalog pg_namespace Table <null> false false tid:7ff2755e9621-37a09513-00000001 -1 <null> true false 27
+parts pg_catalog pg_proc Table <null> false false tid:7ff2755e9621-d9ec709e-00000034 -1 <null> true true 28
+parts pg_catalog pg_trigger Table <null> false false tid:7ff2755e9621-d50d2370-00000040 -1 <null> true false 29
+parts pg_catalog pg_type Table <null> false false tid:7ff2755e9621-d9ee5c82-0000001b -1 <null> true false 30
+parts pg_catalog pg_user Table <null> false false tid:7ff2755e9621-d9eeb913-00000059 -1 <null> true false 31
Row Count : 31
getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
vdbname 12 java.lang.String vdbname varchar 255 255 0 false true false false 1 false true false true
Modified: trunk/test-integration/common/src/test/resources/TestPartsDatabaseMetadata/testColumns.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/TestPartsDatabaseMetadata/testColumns.expected 2012-07-17 01:00:58 UTC (rev 4242)
+++ trunk/test-integration/common/src/test/resources/TestPartsDatabaseMetadata/testColumns.expected 2012-07-19 02:57:49 UTC (rev 4243)
@@ -164,96 +164,96 @@
PartsSupplier SYSADMIN VDBResources contents 2004 blob 2147483647 <null> 0 10 1 <null> <null> <null> <null> 0 2 YES <null> <null> <null> !
<null> NO
PartsSupplier SYS VirtualDatabases Name 12 string 255 <null> 0 10 0 <null> <null> <null> <null> 255 1 NO <null> <null> <null> !
<null> NO
PartsSupplier SYS VirtualDatabases Version 12 string 50 <null> 0 10 0 <null> <null> <null> <null> 50 2 NO <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog matpg_datatype oid 4 integer 10 <null> 0 0 2 <null> <null> <null> <null> 0 1 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog matpg_datatype typname 12 string 4000 <null> 0 0 2 <null> <null> <null> <null> 0 2 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog matpg_datatype name 12 string 4000 <null> 0 0 2 <null> <null> <null> <null> 0 3 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog matpg_datatype uid 12 string 4000 <null> 0 0 2 <null> <null> <null> <null> 0 4 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog matpg_datatype typlen 5 short 5 <null> 0 0 2 <null> <null> <null> <null> 0 5 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog matpg_relatt attrelid 4 integer 10 <null> 0 0 2 <null> <null> <null> <null> 0 1 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog matpg_relatt attnum 5 short 5 <null> 0 0 2 <null> <null> <null> <null> 0 2 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog matpg_relatt attname 12 string 4000 <null> 0 0 2 <null> <null> <null> <null> 0 3 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog matpg_relatt relname 12 string 4000 <null> 0 0 2 <null> <null> <null> <null> 0 4 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog matpg_relatt nspname 12 string 4000 <null> 0 0 2 <null> <null> <null> <null> 0 5 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog matpg_relatt autoinc -7 boolean 1 <null> 0 0 2 <null> <null> <null> <null> 0 6 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog matpg_relatt typoid 4 integer 10 <null> 0 0 2 <null> <null> <null> <null> 0 7 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog pg_am oid 4 integer 10 <null> 0 0 2 <null> <null> <null> <null> 0 1 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog pg_am amname 12 string 4000 <null> 0 0 2 <null> <null> <null> <null> 0 2 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog pg_attrdef adrelid 4 integer 10 <null> 0 0 2 <null> <null> <null> <null> 0 1 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog pg_attrdef adnum 5 short 5 <null> 0 0 2 <null> <null> <null> <null> 0 2 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog pg_attrdef adbin 12 string 4000 <null> 0 0 2 <null> <null> <null> <null> 0 3 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog pg_attrdef adsrc 12 string 4000 <null> 0 0 2 <null> <null> <null> <null> 0 4 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog pg_attribute oid 4 integer 10 <null> 0 0 2 <null> <null> <null> <null> 0 1 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog pg_attribute attrelid 4 integer 10 <null> 0 0 2 <null> <null> <null> <null> 0 2 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog pg_attribute attname 12 string 4000 <null> 0 0 2 <null> <null> <null> <null> 0 3 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog pg_attribute atttypid 4 integer 10 <null> 0 0 2 <null> <null> <null> <null> 0 4 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog pg_attribute attlen 5 short 5 <null> 0 0 2 <null> <null> <null> <null> 0 5 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog pg_attribute attnum 5 short 5 <null> 0 0 2 <null> <null> <null> <null> 0 6 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog pg_attribute atttypmod 4 integer 10 <null> 0 0 2 <null> <null> <null> <null> 0 7 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog pg_attribute attnotnull -7 boolean 1 <null> 0 0 2 <null> <null> <null> <null> 0 8 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog pg_attribute attisdropped -7 boolean 1 <null> 0 0 2 <null> <null> <null> <null> 0 9 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog pg_attribute atthasdef -7 boolean 1 <null> 0 0 2 <null> <null> <null> <null> 0 10 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog pg_class oid 4 integer 10 <null> 0 0 2 <null> <null> <null> <null> 0 1 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog pg_class relname 12 string 4000 <null> 0 0 2 <null> <null> <null> <null> 0 2 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog pg_class relnamespace 4 integer 10 <null> 0 0 2 <null> <null> <null> <null> 0 3 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog pg_class relkind 1 char 1 <null> 0 0 2 <null> <null> <null> <null> 0 4 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog pg_class relam 4 integer 10 <null> 0 0 2 <null> <null> <null> <null> 0 5 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog pg_class reltuples 7 float 20 <null> 0 0 2 <null> <null> <null> <null> 0 6 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog pg_class relpages 4 integer 10 <null> 0 0 2 <null> <null> <null> <null> 0 7 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog pg_class relhasrules -7 boolean 1 <null> 0 0 2 <null> <null> <null> <null> 0 8 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog pg_class relhasoids -7 boolean 1 <null> 0 0 2 <null> <null> <null> <null> 0 9 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog pg_database oid 4 integer 10 <null> 0 0 2 <null> <null> <null> <null> 0 1 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog pg_database datname 12 string 4000 <null> 0 0 2 <null> <null> <null> <null> 0 2 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog pg_database encoding 4 integer 10 <null> 0 0 2 <null> <null> <null> <null> 0 3 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog pg_database datlastsysoid 4 integer 10 <null> 0 0 2 <null> <null> <null> <null> 0 4 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog pg_database datallowconn 1 char 1 <null> 0 0 2 <null> <null> <null> <null> 0 5 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog pg_database datconfig 2000 object 2147483647 <null> 0 0 2 <null> <null> <null> <null> 0 6 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog pg_database datacl 2000 object 2147483647 <null> 0 0 2 <null> <null> <null> <null> 0 7 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog pg_database datdba 4 integer 10 <null> 0 0 2 <null> <null> <null> <null> 0 8 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog pg_database dattablespace 4 integer 10 <null> 0 0 2 <null> <null> <null> <null> 0 9 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog pg_index oid 4 integer 10 <null> 0 0 2 <null> <null> <null> <null> 0 1 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog pg_index indexrelid 4 integer 10 <null> 0 0 2 <null> <null> <null> <null> 0 2 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog pg_index indrelid 4 integer 10 <null> 0 0 2 <null> <null> <null> <null> 0 3 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog pg_index indisclustered -7 boolean 1 <null> 0 0 2 <null> <null> <null> <null> 0 4 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog pg_index indisunique -7 boolean 1 <null> 0 0 2 <null> <null> <null> <null> 0 5 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog pg_index indisprimary -7 boolean 1 <null> 0 0 2 <null> <null> <null> <null> 0 6 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog pg_index indexprs 12 string 4000 <null> 0 0 2 <null> <null> <null> <null> 0 7 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog pg_index indkey 12 string 4000 <null> 0 0 2 <null> <null> <null> <null> 0 8 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog pg_namespace oid 4 integer 10 <null> 0 0 2 <null> <null> <null> <null> 0 1 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog pg_namespace nspname 12 string 4000 <null> 0 0 2 <null> <null> <null> <null> 0 2 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog pg_proc oid 4 integer 10 <null> 0 0 2 <null> <null> <null> <null> 0 1 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog pg_proc proname 12 string 4000 <null> 0 0 2 <null> <null> <null> <null> 0 2 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog pg_proc proretset -7 boolean 1 <null> 0 0 2 <null> <null> <null> <null> 0 3 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog pg_proc prorettype 4 integer 10 <null> 0 0 2 <null> <null> <null> <null> 0 4 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog pg_proc pronargs 5 short 5 <null> 0 0 2 <null> <null> <null> <null> 0 5 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog pg_proc proargtypes 2000 object 2147483647 <null> 0 0 2 <null> <null> <null> <null> 0 6 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog pg_proc proargnames 2000 object 2147483647 <null> 0 0 2 <null> <null> <null> <null> 0 7 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog pg_proc proargmodes 2000 object 2147483647 <null> 0 0 2 <null> <null> <null> <null> 0 8 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog pg_proc proallargtypes 2000 object 2147483647 <null> 0 0 2 <null> <null> <null> <null> 0 9 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog pg_proc pronamespace 4 integer 10 <null> 0 0 2 <null> <null> <null> <null> 0 10 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog pg_trigger oid 4 integer 10 <null> 0 0 2 <null> <null> <null> <null> 0 1 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog pg_trigger tgconstrrelid 4 integer 10 <null> 0 0 2 <null> <null> <null> <null> 0 2 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog pg_trigger tgfoid 4 integer 10 <null> 0 0 2 <null> <null> <null> <null> 0 3 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog pg_trigger tgargs 4 integer 10 <null> 0 0 2 <null> <null> <null> <null> 0 4 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog pg_trigger tgnargs 4 integer 10 <null> 0 0 2 <null> <null> <null> <null> 0 5 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog pg_trigger tgdeferrable -7 boolean 1 <null> 0 0 2 <null> <null> <null> <null> 0 6 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog pg_trigger tginitdeferred -7 boolean 1 <null> 0 0 2 <null> <null> <null> <null> 0 7 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog pg_trigger tgconstrname 12 string 4000 <null> 0 0 2 <null> <null> <null> <null> 0 8 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog pg_trigger tgrelid 4 integer 10 <null> 0 0 2 <null> <null> <null> <null> 0 9 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog pg_type oid 4 integer 10 <null> 0 0 2 <null> <null> <null> <null> 0 1 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog pg_type typname 12 string 4000 <null> 0 0 2 <null> <null> <null> <null> 0 2 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog pg_type typnamespace 4 integer 10 <null> 0 0 2 <null> <null> <null> <null> 0 3 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog pg_type typlen 5 short 5 <null> 0 0 2 <null> <null> <null> <null> 0 4 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog pg_type typtype 1 char 1 <null> 0 0 2 <null> <null> <null> <null> 0 5 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog pg_type typnotnull -7 boolean 1 <null> 0 0 2 <null> <null> <null> <null> 0 6 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog pg_type typbasetype 4 integer 10 <null> 0 0 2 <null> <null> <null> <null> 0 7 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog pg_type typtypmod 4 integer 10 <null> 0 0 2 <null> <null> <null> <null> 0 8 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog pg_type typdelim 1 char 1 <null> 0 0 2 <null> <null> <null> <null> 0 9 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog pg_type typrelid 4 integer 10 <null> 0 0 2 <null> <null> <null> <null> 0 10 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog pg_type typelem 4 integer 10 <null> 0 0 2 <null> <null> <null> <null> 0 11 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog pg_user oid 4 integer 10 <null> 0 0 2 <null> <null> <null> <null> 0 1 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog pg_user usename 12 string 4000 <null> 0 0 2 <null> <null> <null> <null> 0 2 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog pg_user usecreatedb -7 boolean 1 <null> 0 0 2 <null> <null> <null> <null> 0 3 <null> <null> <null> !
<null> NO
-PartsSupplier pg_catalog pg_user usesuper -7 boolean 1 <null> 0 0 2 <null> <null> <null> <null> 0 4 <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog matpg_datatype oid 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 0 1 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog matpg_datatype typname 12 string 4000 <null> 0 0 1 <null> <null> <null> <null> 0 2 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog matpg_datatype name 12 string 4000 <null> 0 0 1 <null> <null> <null> <null> 0 3 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog matpg_datatype uid 12 string 4000 <null> 0 0 1 <null> <null> <null> <null> 0 4 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog matpg_datatype typlen 5 short 5 <null> 0 10 1 <null> <null> <null> <null> 0 5 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog matpg_relatt attrelid 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 0 1 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog matpg_relatt attnum 5 short 5 <null> 0 10 1 <null> <null> <null> <null> 0 2 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog matpg_relatt attname 12 string 4000 <null> 0 0 1 <null> <null> <null> <null> 0 3 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog matpg_relatt relname 12 string 4000 <null> 0 0 1 <null> <null> <null> <null> 0 4 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog matpg_relatt nspname 12 string 4000 <null> 0 0 1 <null> <null> <null> <null> 0 5 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog matpg_relatt autoinc -7 boolean 1 <null> 0 10 1 <null> <null> <null> <null> 0 6 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog matpg_relatt typoid 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 0 7 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog pg_am oid 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 0 1 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog pg_am amname 12 string 4000 <null> 0 0 1 <null> <null> <null> <null> 0 2 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog pg_attrdef adrelid 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 0 1 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog pg_attrdef adnum 5 short 5 <null> 0 10 1 <null> <null> <null> <null> 0 2 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog pg_attrdef adbin 12 string 4000 <null> 0 0 1 <null> <null> <null> <null> 0 3 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog pg_attrdef adsrc 12 string 4000 <null> 0 0 1 <null> <null> <null> <null> 0 4 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog pg_attribute oid 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 0 1 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog pg_attribute attrelid 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 0 2 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog pg_attribute attname 12 string 4000 <null> 0 0 1 <null> <null> <null> <null> 0 3 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog pg_attribute atttypid 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 0 4 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog pg_attribute attlen 5 short 5 <null> 0 10 1 <null> <null> <null> <null> 0 5 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog pg_attribute attnum 5 short 5 <null> 0 10 1 <null> <null> <null> <null> 0 6 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog pg_attribute atttypmod 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 0 7 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog pg_attribute attnotnull -7 boolean 1 <null> 0 10 1 <null> <null> <null> <null> 0 8 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog pg_attribute attisdropped -7 boolean 1 <null> 0 10 1 <null> <null> <null> <null> 0 9 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog pg_attribute atthasdef -7 boolean 1 <null> 0 10 1 <null> <null> <null> <null> 0 10 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog pg_class oid 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 0 1 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog pg_class relname 12 string 4000 <null> 0 0 1 <null> <null> <null> <null> 0 2 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog pg_class relnamespace 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 0 3 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog pg_class relkind 1 char 1 <null> 0 0 1 <null> <null> <null> <null> 0 4 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog pg_class relam 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 0 5 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog pg_class reltuples 7 float 7 <null> 3 10 1 <null> <null> <null> <null> 0 6 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog pg_class relpages 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 0 7 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog pg_class relhasrules -7 boolean 1 <null> 0 10 1 <null> <null> <null> <null> 0 8 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog pg_class relhasoids -7 boolean 1 <null> 0 10 1 <null> <null> <null> <null> 0 9 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog pg_database oid 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 0 1 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog pg_database datname 12 string 4000 <null> 0 0 1 <null> <null> <null> <null> 0 2 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog pg_database encoding 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 0 3 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog pg_database datlastsysoid 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 0 4 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog pg_database datallowconn 1 char 1 <null> 0 0 1 <null> <null> <null> <null> 0 5 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog pg_database datconfig 2000 object 2147483647 <null> 0 0 1 <null> <null> <null> <null> 0 6 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog pg_database datacl 2000 object 2147483647 <null> 0 0 1 <null> <null> <null> <null> 0 7 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog pg_database datdba 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 0 8 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog pg_database dattablespace 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 0 9 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog pg_index oid 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 0 1 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog pg_index indexrelid 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 0 2 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog pg_index indrelid 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 0 3 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog pg_index indisclustered -7 boolean 1 <null> 0 10 1 <null> <null> <null> <null> 0 4 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog pg_index indisunique -7 boolean 1 <null> 0 10 1 <null> <null> <null> <null> 0 5 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog pg_index indisprimary -7 boolean 1 <null> 0 10 1 <null> <null> <null> <null> 0 6 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog pg_index indexprs 12 string 4000 <null> 0 0 1 <null> <null> <null> <null> 0 7 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog pg_index indkey 12 string 4000 <null> 0 0 1 <null> <null> <null> <null> 0 8 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog pg_namespace oid 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 0 1 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog pg_namespace nspname 12 string 4000 <null> 0 0 1 <null> <null> <null> <null> 0 2 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog pg_proc oid 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 0 1 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog pg_proc proname 12 string 4000 <null> 0 0 1 <null> <null> <null> <null> 0 2 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog pg_proc proretset -7 boolean 1 <null> 0 10 1 <null> <null> <null> <null> 0 3 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog pg_proc prorettype 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 0 4 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog pg_proc pronargs 5 short 5 <null> 0 10 1 <null> <null> <null> <null> 0 5 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog pg_proc proargtypes 2000 object 2147483647 <null> 0 0 1 <null> <null> <null> <null> 0 6 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog pg_proc proargnames 2000 object 2147483647 <null> 0 0 1 <null> <null> <null> <null> 0 7 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog pg_proc proargmodes 2000 object 2147483647 <null> 0 0 1 <null> <null> <null> <null> 0 8 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog pg_proc proallargtypes 2000 object 2147483647 <null> 0 0 1 <null> <null> <null> <null> 0 9 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog pg_proc pronamespace 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 0 10 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog pg_trigger oid 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 0 1 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog pg_trigger tgconstrrelid 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 0 2 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog pg_trigger tgfoid 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 0 3 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog pg_trigger tgargs 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 0 4 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog pg_trigger tgnargs 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 0 5 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog pg_trigger tgdeferrable -7 boolean 1 <null> 0 10 1 <null> <null> <null> <null> 0 6 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog pg_trigger tginitdeferred -7 boolean 1 <null> 0 10 1 <null> <null> <null> <null> 0 7 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog pg_trigger tgconstrname 12 string 4000 <null> 0 0 1 <null> <null> <null> <null> 0 8 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog pg_trigger tgrelid 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 0 9 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog pg_type oid 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 0 1 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog pg_type typname 12 string 4000 <null> 0 0 1 <null> <null> <null> <null> 0 2 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog pg_type typnamespace 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 0 3 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog pg_type typlen 5 short 5 <null> 0 10 1 <null> <null> <null> <null> 0 4 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog pg_type typtype 1 char 1 <null> 0 0 1 <null> <null> <null> <null> 0 5 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog pg_type typnotnull -7 boolean 1 <null> 0 10 1 <null> <null> <null> <null> 0 6 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog pg_type typbasetype 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 0 7 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog pg_type typtypmod 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 0 8 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog pg_type typdelim 1 char 1 <null> 0 0 1 <null> <null> <null> <null> 0 9 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog pg_type typrelid 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 0 10 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog pg_type typelem 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 0 11 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog pg_user oid 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 0 1 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog pg_user usename 12 string 4000 <null> 0 0 1 <null> <null> <null> <null> 0 2 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog pg_user usecreatedb -7 boolean 1 <null> 0 10 1 <null> <null> <null> <null> 0 3 YES <null> <null> <null> !
<null> NO
+PartsSupplier pg_catalog pg_user usesuper -7 boolean 1 <null> 0 10 1 <null> <null> <null> <null> 0 4 YES <null> <null> <null> !
<null> NO
Row Count : 254
getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
VDBName 12 PartsSupplier java.lang.String TABLE_CAT string SYS Columns 255 255 0 false false false false 0 true true false false
Modified: trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testColumns.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testColumns.expected 2012-07-17 01:00:58 UTC (rev 4242)
+++ trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testColumns.expected 2012-07-19 02:57:49 UTC (rev 4243)
@@ -162,98 +162,98 @@
PartsSupplier SYSADMIN MatViews Valid 6 <null> boolean 0 0 false true false true true false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.Boolean 0 0 10 mmuuid:13098912-bce2-!
4842-9ea9-b162fcd7383e <null> 23
PartsSupplier SYS Properties Value 2 <null> string 0 255 true true false true true false false No Nulls <null> <null> -1 -1 Searchable <null> <null> java.lang.String 255 255 10 mmuuid:c917257d-06b7-!
41dd-a6cb-44c0ff0f897e <null> 125
PartsSupplier SYS VirtualDatabases Version 2 <null> string 0 50 true true false true false false false No Nulls <null> <null> -1 -1 Searchable <null> <null> java.lang.String 50 50 10 mmuuid:c876d749-a512-!
4810-9910-3034ca524c45 <null> 164
-PartsSupplier pg_catalog pg_attrdef adbin 3 <null> string 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.String 0 0 0 mmuid:382f9fc9-8c96-4!
df7-ab5d-04dfb47ee142 <null> 181
-PartsSupplier pg_catalog pg_attrdef adnum 2 <null> short 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.Short 0 0 0 mmuid:492dd834-907f-4!
29b-aa6e-958ad65204c6 <null> 180
-PartsSupplier pg_catalog pg_attrdef adrelid 1 <null> integer 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:e22c521a-e208-4!
181-9dbd-89f5de7014b9 <null> 179
-PartsSupplier pg_catalog pg_attrdef adsrc 4 <null> string 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.String 0 0 0 mmuid:689cde3b-a631-4!
f25-94b4-ff2ffe022b0f <null> 182
-PartsSupplier pg_catalog pg_am amname 2 <null> string 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.String 0 0 0 mmuid:bdf3ee1e-b5b7-4!
8ab-b43c-4bbb2c8ae1e2 <null> 178
-PartsSupplier pg_catalog pg_attribute atthasdef 10 <null> boolean 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.Boolean 0 0 0 mmuid:5868e549-4bbe-4!
79e-bc7e-632c05cc2329 <null> 192
-PartsSupplier pg_catalog pg_attribute attisdropped 9 <null> boolean 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.Boolean 0 0 0 mmuid:7beb42a9-dfe6-4!
3de-98b6-7e8948b1a666 <null> 191
-PartsSupplier pg_catalog pg_attribute attlen 5 <null> short 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.Short 0 0 0 mmuid:d1214249-95cd-4!
26f-b8f6-4bf68c0504c7 <null> 187
-PartsSupplier pg_catalog matpg_relatt attname 3 <null> string 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.String 0 0 0 mmuid:f1998229-2c1a-4!
7b7-8f46-9dda81446db6 <null> 172
-PartsSupplier pg_catalog pg_attribute attname 3 <null> string 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.String 0 0 0 mmuid:6064d149-4102-4!
c2d-9132-582342f25e90 <null> 185
-PartsSupplier pg_catalog pg_attribute attnotnull 8 <null> boolean 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.Boolean 0 0 0 mmuid:91ce8bde-8570-4!
867-be17-80acfa9275a6 <null> 190
-PartsSupplier pg_catalog matpg_relatt attnum 2 <null> short 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.Short 0 0 0 mmuid:ffbf69c1-2e34-4!
764-a9b3-9a1b61bfd4af <null> 171
-PartsSupplier pg_catalog pg_attribute attnum 6 <null> short 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.Short 0 0 0 mmuid:141fd911-f2dd-4!
edd-8f08-ad8a67ffd0fb <null> 188
-PartsSupplier pg_catalog matpg_relatt attrelid 1 <null> integer 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:5cfb2b62-a912-4!
bfb-bf4f-51e107fe210c <null> 170
-PartsSupplier pg_catalog pg_attribute attrelid 2 <null> integer 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:3be6b5de-2287-4!
279-93f3-4f5064799118 <null> 184
-PartsSupplier pg_catalog pg_attribute atttypid 4 <null> integer 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:99782493-1cce-4!
e14-9c1b-4de7ce50e2c8 <null> 186
-PartsSupplier pg_catalog pg_attribute atttypmod 7 <null> integer 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:2e2bae3c-ab93-4!
9f5-b96c-7a7b9d66782d <null> 189
-PartsSupplier pg_catalog matpg_relatt autoinc 6 <null> boolean 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.Boolean 0 0 0 mmuid:559efade-b320-4!
9bd-8524-1d325ae11c82 <null> 175
+PartsSupplier pg_catalog pg_attrdef adbin 3 <null> string 0 4000 false true false true false false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.String 0 0 0 tid:7ff2755e9621-b094!
89b6-0000004d <null> 181
+PartsSupplier pg_catalog pg_attrdef adnum 2 <null> short 0 2 false true false false true false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.Short 5 0 10 tid:7ff2755e9621-b094!
b835-0000004c <null> 180
+PartsSupplier pg_catalog pg_attrdef adrelid 1 <null> integer 0 4 false true false false true false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.Integer 10 0 10 tid:7ff2755e9621-6765!
c4e3-0000004b <null> 179
+PartsSupplier pg_catalog pg_attrdef adsrc 4 <null> string 0 4000 false true false true false false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.String 0 0 0 tid:7ff2755e9621-b094!
ca93-0000004e <null> 182
+PartsSupplier pg_catalog pg_am amname 2 <null> string 0 4000 false true false true false false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.String 0 0 0 tid:7ff2755e9621-a44d!
26e2-00000033 <null> 178
+PartsSupplier pg_catalog pg_attribute atthasdef 10 <null> boolean 0 1 false true false false false false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.Boolean 1 0 10 tid:7ff2755e9621-8b55!
8751-00000019 <null> 192
+PartsSupplier pg_catalog pg_attribute attisdropped 9 <null> boolean 0 1 false true false false false false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.Boolean 1 0 10 tid:7ff2755e9621-9c40!
981a-00000018 <null> 191
+PartsSupplier pg_catalog pg_attribute attlen 5 <null> short 0 2 false true false false true false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.Short 5 0 10 tid:7ff2755e9621-4826!
ae19-00000014 <null> 187
+PartsSupplier pg_catalog matpg_relatt attname 3 <null> string 0 4000 false true false true false false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.String 0 0 0 tid:7ff2755e9621-81f4!
e333-00000061 <null> 172
+PartsSupplier pg_catalog pg_attribute attname 3 <null> string 0 4000 false true false true false false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.String 0 0 0 tid:7ff2755e9621-73cc!
52f1-00000012 <null> 185
+PartsSupplier pg_catalog pg_attribute attnotnull 8 <null> boolean 0 1 false true false false false false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.Boolean 1 0 10 tid:7ff2755e9621-ebd3!
e35e-00000017 <null> 190
+PartsSupplier pg_catalog matpg_relatt attnum 2 <null> short 0 2 false true false false true false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.Short 5 0 10 tid:7ff2755e9621-564f!
47cc-00000060 <null> 171
+PartsSupplier pg_catalog pg_attribute attnum 6 <null> short 0 2 false true false false true false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.Short 5 0 10 tid:7ff2755e9621-4826!
b78a-00000015 <null> 188
+PartsSupplier pg_catalog matpg_relatt attrelid 1 <null> integer 0 4 false true false false true false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.Integer 10 0 10 tid:7ff2755e9621-cb3d!
2bfa-0000005f <null> 170
+PartsSupplier pg_catalog pg_attribute attrelid 2 <null> integer 0 4 false true false false true false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.Integer 10 0 10 tid:7ff2755e9621-bd14!
9bb8-00000011 <null> 184
+PartsSupplier pg_catalog pg_attribute atttypid 4 <null> integer 0 4 false true false false true false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.Integer 10 0 10 tid:7ff2755e9621-bd39!
f12a-00000013 <null> 186
+PartsSupplier pg_catalog pg_attribute atttypmod 7 <null> integer 0 4 false true false false true false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.Integer 10 0 10 tid:7ff2755e9621-a120!
a8bd-00000016 <null> 189
+PartsSupplier pg_catalog matpg_relatt autoinc 6 <null> boolean 0 1 false true false false false false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.Boolean 1 0 10 tid:7ff2755e9621-83aa!
4e56-00000064 <null> 175
PartsSupplier SYSADMIN VDBResources contents 2 <null> blob 0 0 false true false true true false false Nullable <null> <null> -1 -1 Searchable <null> <null> org.teiid.core.types.BlobType 0 0 10 mmuuid:f9421669-3564-!
451d-9293-96c1e5e72c4f <null> 28
-PartsSupplier pg_catalog pg_database datacl 7 <null> object 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.Object 0 0 0 mmuid:28d034eb-6f39-4!
02f-b642-9c9560e57247 <null> 208
-PartsSupplier pg_catalog pg_database datallowconn 5 <null> char 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.Character 0 0 0 mmuid:8b993c11-de2b-4!
8bc-beb1-3e44c46811b4 <null> 206
-PartsSupplier pg_catalog pg_database datconfig 6 <null> object 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.Object 0 0 0 mmuid:36db343d-e99a-4!
27c-a4e2-763a720ce4a4 <null> 207
-PartsSupplier pg_catalog pg_database datdba 8 <null> integer 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:e63613cb-01ee-4!
b37-8b91-99d1aac4dfcb <null> 209
-PartsSupplier pg_catalog pg_database datlastsysoid 4 <null> integer 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:4b5beb14-03a0-4!
652-9d6f-5f8cc74d470c <null> 205
-PartsSupplier pg_catalog pg_database datname 2 <null> string 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.String 0 0 0 mmuid:c2bdf40c-ec58-4!
39c-a403-7adf604ceadd <null> 203
-PartsSupplier pg_catalog pg_database dattablespace 9 <null> integer 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:bb78401d-d10c-4!
3b1-af84-e4fa6b95db42 <null> 210
-PartsSupplier pg_catalog pg_database encoding 3 <null> integer 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:5c9d54b2-433f-4!
43a-85ce-821f42ed109e <null> 204
-PartsSupplier pg_catalog pg_index indexprs 7 <null> string 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.String 0 0 0 mmuid:1462b28e-0bab-4!
36f-9654-013821506337 <null> 217
-PartsSupplier pg_catalog pg_index indexrelid 2 <null> integer 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:9f873e0f-903d-4!
c9d-8c37-1073b5ec4c67 <null> 212
-PartsSupplier pg_catalog pg_index indisclustered 4 <null> boolean 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.Boolean 0 0 0 mmuid:9ea3b6d2-b27b-4!
bb1-a99d-b703c3308384 <null> 214
-PartsSupplier pg_catalog pg_index indisprimary 6 <null> boolean 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.Boolean 0 0 0 mmuid:347ec08c-6b41-4!
1d0-8475-031ce7d99ac0 <null> 216
-PartsSupplier pg_catalog pg_index indisunique 5 <null> boolean 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.Boolean 0 0 0 mmuid:1e6dbecd-9a2d-4!
aef-afbe-665de7acb9d6 <null> 215
-PartsSupplier pg_catalog pg_index indkey 8 <null> string 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.String 0 0 0 mmuid:f6517a63-8c14-4!
b73-a18d-afaa5dfb35d9 <null> 218
-PartsSupplier pg_catalog pg_index indrelid 3 <null> integer 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:a52c714d-dfe9-4!
06c-906b-fadd53ac4e98 <null> 213
-PartsSupplier pg_catalog matpg_datatype name 3 <null> string 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.String 0 0 0 mmuid:0e9c4439-48d0-4!
115-a343-5baab7a236b6 <null> 167
-PartsSupplier pg_catalog matpg_relatt nspname 5 <null> string 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.String 0 0 0 mmuid:595a823f-cec1-4!
2dc-b8b2-c95c8b4e4e66 <null> 174
-PartsSupplier pg_catalog pg_namespace nspname 2 <null> string 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.String 0 0 0 mmuid:0e513513-b35a-4!
8be-975d-5dbed6ace7e9 <null> 220
-PartsSupplier pg_catalog matpg_datatype oid 1 <null> integer 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:b4e04928-9a59-4!
718-a7f1-3a60bcae7449 <null> 165
-PartsSupplier pg_catalog pg_am oid 1 <null> integer 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:f20c9489-10ca-4!
596-8a37-24218b67f764 <null> 177
-PartsSupplier pg_catalog pg_attribute oid 1 <null> integer 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:f735e545-a81c-4!
ee2-84d0-3ea35d4083a2 <null> 183
-PartsSupplier pg_catalog pg_class oid 1 <null> integer 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:c1e736ac-c9d4-4!
026-8904-23c90e6eb1c0 <null> 193
-PartsSupplier pg_catalog pg_database oid 1 <null> integer 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:3b621b25-171c-4!
05b-8bf9-635cf93f2273 <null> 202
-PartsSupplier pg_catalog pg_index oid 1 <null> integer 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:16998907-e1dd-4!
47e-898d-780994d30619 <null> 211
-PartsSupplier pg_catalog pg_namespace oid 1 <null> integer 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:688e5112-4083-4!
b67-b42c-62d9a614c59a <null> 219
-PartsSupplier pg_catalog pg_proc oid 1 <null> integer 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:e0244e1d-431c-4!
1fa-8194-1e357e2b688b <null> 221
-PartsSupplier pg_catalog pg_trigger oid 1 <null> integer 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:250d7c06-728a-4!
b2a-b557-91f2a69bb184 <null> 231
-PartsSupplier pg_catalog pg_type oid 1 <null> integer 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:b6f64d16-b147-4!
59d-8e84-1bd3048fb900 <null> 240
-PartsSupplier pg_catalog pg_user oid 1 <null> integer 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:6da98878-b46e-4!
ed1-b032-1bc72da595f4 <null> 251
-PartsSupplier pg_catalog pg_proc proallargtypes 9 <null> object 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.Object 0 0 0 mmuid:9569efdb-21b2-4!
b4f-a2db-e7406267b8ed <null> 229
-PartsSupplier pg_catalog pg_proc proargmodes 8 <null> object 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.Object 0 0 0 mmuid:e5715456-245f-4!
846-b90b-01d06d1c3672 <null> 228
-PartsSupplier pg_catalog pg_proc proargnames 7 <null> object 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.Object 0 0 0 mmuid:a385751f-a31a-4!
d5d-9197-3fbd390b0251 <null> 227
-PartsSupplier pg_catalog pg_proc proargtypes 6 <null> object 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.Object 0 0 0 mmuid:bcbed548-176c-4!
116-a5d6-7638cb0206e1 <null> 226
-PartsSupplier pg_catalog pg_proc proname 2 <null> string 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.String 0 0 0 mmuid:9fb5a34a-3a7e-4!
d38-b7cd-239f28a3504e <null> 222
-PartsSupplier pg_catalog pg_proc pronamespace 10 <null> integer 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:2b75f0b1-7475-4!
ed5-9da3-d37a8a25f26a <null> 230
-PartsSupplier pg_catalog pg_proc pronargs 5 <null> short 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.Short 0 0 0 mmuid:d9f36bdc-7b25-4!
af0-b9f5-a96aac6d3094 <null> 225
-PartsSupplier pg_catalog pg_proc proretset 3 <null> boolean 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.Boolean 0 0 0 mmuid:6796c2e7-48a4-4!
f9f-bc98-d47913e2491c <null> 223
-PartsSupplier pg_catalog pg_proc prorettype 4 <null> integer 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:ffa4ac73-b549-4!
70e-931f-dc36330cb8c4 <null> 224
-PartsSupplier pg_catalog pg_class relam 5 <null> integer 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:c2f92b1a-6ba0-4!
486-8936-f5185d926178 <null> 197
-PartsSupplier pg_catalog pg_class relhasoids 9 <null> boolean 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.Boolean 0 0 0 mmuid:3ac5a14a-1f9e-4!
55b-8ea1-cf0878774fd7 <null> 201
-PartsSupplier pg_catalog pg_class relhasrules 8 <null> boolean 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.Boolean 0 0 0 mmuid:6c26fd66-2a4a-4!
ccf-949a-a06a858db7f6 <null> 200
-PartsSupplier pg_catalog pg_class relkind 4 <null> char 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.Character 0 0 0 mmuid:ef4359eb-6d51-4!
249-bfea-40bc0f407d10 <null> 196
-PartsSupplier pg_catalog matpg_relatt relname 4 <null> string 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.String 0 0 0 mmuid:23454408-0347-4!
0d2-a3f9-3faa664fb5e9 <null> 173
-PartsSupplier pg_catalog pg_class relname 2 <null> string 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.String 0 0 0 mmuid:5f9b50fa-8188-4!
048-93c2-3ad1587915df <null> 194
-PartsSupplier pg_catalog pg_class relnamespace 3 <null> integer 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:4591ef08-bff8-4!
f3b-9de7-420f9c7f9d2b <null> 195
-PartsSupplier pg_catalog pg_class relpages 7 <null> integer 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:44dee7d6-b6ae-4!
4c7-85f2-e87364d8d059 <null> 199
-PartsSupplier pg_catalog pg_class reltuples 6 <null> float 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.Float 0 0 0 mmuid:b9ed4b49-5a7b-4!
ba4-863a-37fd95b2a34c <null> 198
+PartsSupplier pg_catalog pg_database datacl 7 <null> object 0 2147483647 false true false false false false false Nullable <null> <null> -1 -1 Unsearchable <null> <null> java.lang.Object 0 0 0 tid:7ff2755e9621-dad6!
37f3-00000056 <null> 208
+PartsSupplier pg_catalog pg_database datallowconn 5 <null> char 0 1 false true false true false false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.Character 0 0 0 tid:7ff2755e9621-5e2b!
9a9e-00000054 <null> 206
+PartsSupplier pg_catalog pg_database datconfig 6 <null> object 0 2147483647 false true false false false false false Nullable <null> <null> -1 -1 Unsearchable <null> <null> java.lang.Object 0 0 0 tid:7ff2755e9621-1944!
37f9-00000055 <null> 207
+PartsSupplier pg_catalog pg_database datdba 8 <null> integer 0 4 false true false false true false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.Integer 10 0 10 tid:7ff2755e9621-dad6!
430c-00000057 <null> 209
+PartsSupplier pg_catalog pg_database datlastsysoid 4 <null> integer 0 4 false true false false true false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.Integer 10 0 10 tid:7ff2755e9621-6243!
db2a-00000053 <null> 205
+PartsSupplier pg_catalog pg_database datname 2 <null> string 0 4000 false true false true false false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.String 0 0 0 tid:7ff2755e9621-80af!
d902-00000051 <null> 203
+PartsSupplier pg_catalog pg_database dattablespace 9 <null> integer 0 4 false true false false true false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.Integer 10 0 10 tid:7ff2755e9621-5f2f!
972f-00000058 <null> 210
+PartsSupplier pg_catalog pg_database encoding 3 <null> integer 0 4 false true false false true false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.Integer 10 0 10 tid:7ff2755e9621-90a3!
abb3-00000052 <null> 204
+PartsSupplier pg_catalog pg_index indexprs 7 <null> string 0 4000 false true false true false false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.String 0 0 0 tid:7ff2755e9621-3c90!
62a5-0000002e <null> 217
+PartsSupplier pg_catalog pg_index indexrelid 2 <null> integer 0 4 false true false false true false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.Integer 10 0 10 tid:7ff2755e9621-6368!
efe8-00000029 <null> 212
+PartsSupplier pg_catalog pg_index indisclustered 4 <null> boolean 0 1 false true false false false false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.Boolean 1 0 10 tid:7ff2755e9621-47ce!
22f6-0000002b <null> 214
+PartsSupplier pg_catalog pg_index indisprimary 6 <null> boolean 0 1 false true false false false false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.Boolean 1 0 10 tid:7ff2755e9621-2c22!
f29f-0000002d <null> 216
+PartsSupplier pg_catalog pg_index indisunique 5 <null> boolean 0 1 false true false false false false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.Boolean 1 0 10 tid:7ff2755e9621-56a1!
3c60-0000002c <null> 215
+PartsSupplier pg_catalog pg_index indkey 8 <null> string 0 4000 false true false true false false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.String 0 0 0 tid:7ff2755e9621-ef45!
6826-0000002f <null> 218
+PartsSupplier pg_catalog pg_index indrelid 3 <null> integer 0 4 false true false false true false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.Integer 10 0 10 tid:7ff2755e9621-3d3e!
e0fb-0000002a <null> 213
+PartsSupplier pg_catalog matpg_datatype name 3 <null> string 0 4000 false true false true false false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.String 0 0 0 tid:7ff2755e9621-9edf!
60b7-0000006b <null> 167
+PartsSupplier pg_catalog matpg_relatt nspname 5 <null> string 0 4000 false true false true false false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.String 0 0 0 tid:7ff2755e9621-2fb8!
aedd-00000063 <null> 174
+PartsSupplier pg_catalog pg_namespace nspname 2 <null> string 0 4000 false true false true false false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.String 0 0 0 tid:7ff2755e9621-e055!
7576-00000003 <null> 220
+PartsSupplier pg_catalog matpg_datatype oid 1 <null> integer 0 4 false true false false true false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.Integer 10 0 10 tid:7ff2755e9621-9ead!
93f6-00000069 <null> 165
+PartsSupplier pg_catalog pg_am oid 1 <null> integer 0 4 false true false false true false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.Integer 10 0 10 tid:7ff2755e9621-f895!
43f5-00000032 <null> 177
+PartsSupplier pg_catalog pg_attribute oid 1 <null> integer 0 4 false true false false true false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.Integer 10 0 10 tid:7ff2755e9621-9c09!
440f-00000010 <null> 183
+PartsSupplier pg_catalog pg_class oid 1 <null> integer 0 4 false true false false true false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.Integer 10 0 10 tid:7ff2755e9621-7f51!
b3be-00000005 <null> 193
+PartsSupplier pg_catalog pg_database oid 1 <null> integer 0 4 false true false false true false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.Integer 10 0 10 tid:7ff2755e9621-2aa6!
2c2a-00000050 <null> 202
+PartsSupplier pg_catalog pg_index oid 1 <null> integer 0 4 false true false false true false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.Integer 10 0 10 tid:7ff2755e9621-35dd!
0fd0-00000028 <null> 211
+PartsSupplier pg_catalog pg_namespace oid 1 <null> integer 0 4 false true false false true false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.Integer 10 0 10 tid:7ff2755e9621-5ace!
9aea-00000002 <null> 219
+PartsSupplier pg_catalog pg_proc oid 1 <null> integer 0 4 false true false false true false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.Integer 10 0 10 tid:7ff2755e9621-eef9!
add1-00000035 <null> 221
+PartsSupplier pg_catalog pg_trigger oid 1 <null> integer 0 4 false true false false true false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.Integer 10 0 10 tid:7ff2755e9621-d272!
8add-00000041 <null> 231
+PartsSupplier pg_catalog pg_type oid 1 <null> integer 0 4 false true false false true false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.Integer 10 0 10 tid:7ff2755e9621-b1cd!
f706-0000001c <null> 240
+PartsSupplier pg_catalog pg_user oid 1 <null> integer 0 4 false true false false true false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.Integer 10 0 10 tid:7ff2755e9621-a354!
8e04-0000005a <null> 251
+PartsSupplier pg_catalog pg_proc proallargtypes 9 <null> object 0 2147483647 false true false false false false false Nullable <null> <null> -1 -1 Unsearchable <null> <null> java.lang.Object 0 0 0 tid:7ff2755e9621-f418!
fbbe-0000003d <null> 229
+PartsSupplier pg_catalog pg_proc proargmodes 8 <null> object 0 2147483647 false true false false false false false Nullable <null> <null> -1 -1 Unsearchable <null> <null> java.lang.Object 0 0 0 tid:7ff2755e9621-c636!
3c4e-0000003c <null> 228
+PartsSupplier pg_catalog pg_proc proargnames 7 <null> object 0 2147483647 false true false false false false false Nullable <null> <null> -1 -1 Unsearchable <null> <null> java.lang.Object 0 0 0 tid:7ff2755e9621-c63e!
1866-0000003b <null> 227
+PartsSupplier pg_catalog pg_proc proargtypes 6 <null> object 0 2147483647 false true false false false false false Nullable <null> <null> -1 -1 Unsearchable <null> <null> java.lang.Object 0 0 0 tid:7ff2755e9621-c69d!
9997-0000003a <null> 226
+PartsSupplier pg_catalog pg_proc proname 2 <null> string 0 4000 false true false true false false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.String 0 0 0 tid:7ff2755e9621-dc8a!
0ebf-00000036 <null> 222
+PartsSupplier pg_catalog pg_proc pronamespace 10 <null> integer 0 4 false true false false true false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.Integer 10 0 10 tid:7ff2755e9621-d103!
5555-0000003e <null> 230
+PartsSupplier pg_catalog pg_proc pronargs 5 <null> short 0 2 false true false false true false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.Short 5 0 10 tid:7ff2755e9621-b3a7!
dbc5-00000039 <null> 225
+PartsSupplier pg_catalog pg_proc proretset 3 <null> boolean 0 1 false true false false false false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.Boolean 1 0 10 tid:7ff2755e9621-c750!
7115-00000037 <null> 223
+PartsSupplier pg_catalog pg_proc prorettype 4 <null> integer 0 4 false true false false true false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.Integer 10 0 10 tid:7ff2755e9621-21ae!
7015-00000038 <null> 224
+PartsSupplier pg_catalog pg_class relam 5 <null> integer 0 4 false true false false true false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.Integer 10 0 10 tid:7ff2755e9621-85c6!
0879-00000009 <null> 197
+PartsSupplier pg_catalog pg_class relhasoids 9 <null> boolean 0 1 false true false false false false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.Boolean 1 0 10 tid:7ff2755e9621-c399!
e0be-0000000d <null> 201
+PartsSupplier pg_catalog pg_class relhasrules 8 <null> boolean 0 1 false true false false false false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.Boolean 1 0 10 tid:7ff2755e9621-c471!
5c2a-0000000c <null> 200
+PartsSupplier pg_catalog pg_class relkind 4 <null> char 0 1 false true false true false false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.Character 0 0 0 tid:7ff2755e9621-c054!
05a1-00000008 <null> 196
+PartsSupplier pg_catalog matpg_relatt relname 4 <null> string 0 4000 false true false true false false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.String 0 0 0 tid:7ff2755e9621-eb35!
652b-00000062 <null> 173
+PartsSupplier pg_catalog pg_class relname 2 <null> string 0 4000 false true false true false false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.String 0 0 0 tid:7ff2755e9621-c055!
4498-00000006 <null> 194
+PartsSupplier pg_catalog pg_class relnamespace 3 <null> integer 0 4 false true false false true false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.Integer 10 0 10 tid:7ff2755e9621-0445!
3ed6-00000007 <null> 195
+PartsSupplier pg_catalog pg_class relpages 7 <null> integer 0 4 false true false false true false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.Integer 10 0 10 tid:7ff2755e9621-5f0e!
b4bf-0000000b <null> 199
+PartsSupplier pg_catalog pg_class reltuples 6 <null> float 3 4 false true false false true false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.Float 7 0 10 tid:7ff2755e9621-9f58!
9978-0000000a <null> 198
PartsSupplier SYSADMIN VDBResources resourcePath 1 <null> string 0 255 false true false true true false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.String 0 255 10 mmuuid:b1bc5150-3dcc-!
452e-9e75-4a506997f612 <null> 27
-PartsSupplier pg_catalog pg_trigger tgargs 4 <null> integer 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:bfbff036-caf2-4!
652-80cf-398af17ed7d1 <null> 234
-PartsSupplier pg_catalog pg_trigger tgconstrname 8 <null> string 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.String 0 0 0 mmuid:76a7dd05-9a7d-4!
243-b561-f3056500dcaf <null> 238
-PartsSupplier pg_catalog pg_trigger tgconstrrelid 2 <null> integer 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:0c20dbe7-5d89-4!
11f-a8ab-3d77b999595b <null> 232
-PartsSupplier pg_catalog pg_trigger tgdeferrable 6 <null> boolean 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.Boolean 0 0 0 mmuid:c010d12f-2074-4!
5db-8e18-979cee2c45da <null> 236
-PartsSupplier pg_catalog pg_trigger tgfoid 3 <null> integer 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:d70f020b-658c-4!
f58-86dc-0fbb12e2d8af <null> 233
-PartsSupplier pg_catalog pg_trigger tginitdeferred 7 <null> boolean 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.Boolean 0 0 0 mmuid:71091853-c65e-4!
6a9-9947-aa024f806e2d <null> 237
-PartsSupplier pg_catalog pg_trigger tgnargs 5 <null> integer 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:da4b59ca-ebff-4!
5a8-ad68-9777bc587813 <null> 235
-PartsSupplier pg_catalog pg_trigger tgrelid 9 <null> integer 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:4589389f-4abd-4!
2a6-818f-ff1f2a085dfb <null> 239
-PartsSupplier pg_catalog pg_type typbasetype 7 <null> integer 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:cee3559d-1ce6-4!
b17-ad57-2ecb79a9e1d2 <null> 246
-PartsSupplier pg_catalog pg_type typdelim 9 <null> char 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.Character 0 0 0 mmuid:22ac431d-e6e6-4!
eef-9d74-b31795424e97 <null> 248
-PartsSupplier pg_catalog pg_type typelem 11 <null> integer 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:83ae2247-7eec-4!
59f-b037-ffd3cdca0627 <null> 250
-PartsSupplier pg_catalog matpg_datatype typlen 5 <null> short 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.Short 0 0 0 mmuid:443a2ab3-8257-4!
c4c-838e-9a47deaf4cf9 <null> 169
-PartsSupplier pg_catalog pg_type typlen 4 <null> short 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.Short 0 0 0 mmuid:931c09e1-937a-4!
37e-aab2-2360f8d90e2b <null> 243
-PartsSupplier pg_catalog matpg_datatype typname 2 <null> string 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.String 0 0 0 mmuid:87826ebc-98a5-4!
f19-a6d8-6b7b96cbed48 <null> 166
-PartsSupplier pg_catalog pg_type typname 2 <null> string 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.String 0 0 0 mmuid:d600d818-2aad-4!
c92-9343-267d044dd97d <null> 241
-PartsSupplier pg_catalog pg_type typnamespace 3 <null> integer 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:e47217d2-2b07-4!
353-bfbd-d7c883a5e7e0 <null> 242
-PartsSupplier pg_catalog pg_type typnotnull 6 <null> boolean 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.Boolean 0 0 0 mmuid:a17d2f61-cd68-4!
c0d-8d25-132f68eb3b67 <null> 245
-PartsSupplier pg_catalog matpg_relatt typoid 7 <null> integer 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:349f0c8c-7c64-4!
e0a-a84a-aee3deaf83af <null> 176
-PartsSupplier pg_catalog pg_type typrelid 10 <null> integer 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:09daed8d-b0b8-4!
552-a261-2b6c775b46b0 <null> 249
-PartsSupplier pg_catalog pg_type typtype 5 <null> char 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.Character 0 0 0 mmuid:83199eba-7af4-4!
4a9-822f-006677b1b895 <null> 244
-PartsSupplier pg_catalog pg_type typtypmod 8 <null> integer 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:bec25882-b292-4!
ed1-a610-cad5d504837d <null> 247
-PartsSupplier pg_catalog matpg_datatype uid 4 <null> string 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.String 0 0 0 mmuid:eda814fb-0a5a-4!
fbf-87bc-b57952292038 <null> 168
-PartsSupplier pg_catalog pg_user usecreatedb 3 <null> boolean 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.Boolean 0 0 0 mmuid:8c0714d6-1c72-4!
0b4-8528-3b2c63059107 <null> 253
-PartsSupplier pg_catalog pg_user usename 2 <null> string 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.String 0 0 0 mmuid:9bfddc66-af75-4!
366-8eac-b9fef3421219 <null> 252
-PartsSupplier pg_catalog pg_user usesuper 4 <null> boolean 0 0 false true false false false false false Unknown <null> <null> -1 -1 Searchable <null> <null> java.lang.Boolean 0 0 0 mmuid:5c7bf056-ecc5-4!
1ea-a122-7a4b1de9908a <null> 254
+PartsSupplier pg_catalog pg_trigger tgargs 4 <null> integer 0 4 false true false false true false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.Integer 10 0 10 tid:7ff2755e9621-9e3c!
4ae3-00000044 <null> 234
+PartsSupplier pg_catalog pg_trigger tgconstrname 8 <null> string 0 4000 false true false true false false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.String 0 0 0 tid:7ff2755e9621-2ba0!
9840-00000048 <null> 238
+PartsSupplier pg_catalog pg_trigger tgconstrrelid 2 <null> integer 0 4 false true false false true false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.Integer 10 0 10 tid:7ff2755e9621-9f72!
b425-00000042 <null> 232
+PartsSupplier pg_catalog pg_trigger tgdeferrable 6 <null> boolean 0 1 false true false false false false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.Boolean 1 0 10 tid:7ff2755e9621-2e2d!
7860-00000046 <null> 236
+PartsSupplier pg_catalog pg_trigger tgfoid 3 <null> integer 0 4 false true false false true false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.Integer 10 0 10 tid:7ff2755e9621-9e3e!
85aa-00000043 <null> 233
+PartsSupplier pg_catalog pg_trigger tginitdeferred 7 <null> boolean 0 1 false true false false false false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.Boolean 1 0 10 tid:7ff2755e9621-cb89!
33f5-00000047 <null> 237
+PartsSupplier pg_catalog pg_trigger tgnargs 5 <null> integer 0 4 false true false false true false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.Integer 10 0 10 tid:7ff2755e9621-80c2!
c8cb-00000045 <null> 235
+PartsSupplier pg_catalog pg_trigger tgrelid 9 <null> integer 0 4 false true false false true false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.Integer 10 0 10 tid:7ff2755e9621-80fc!
e1f4-00000049 <null> 239
+PartsSupplier pg_catalog pg_type typbasetype 7 <null> integer 0 4 false true false false true false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.Integer 10 0 10 tid:7ff2755e9621-1787!
1652-00000022 <null> 246
+PartsSupplier pg_catalog pg_type typdelim 9 <null> char 0 1 false true false true false false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.Character 0 0 0 tid:7ff2755e9621-8976!
2000-00000024 <null> 248
+PartsSupplier pg_catalog pg_type typelem 11 <null> integer 0 4 false true false false true false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.Integer 10 0 10 tid:7ff2755e9621-7ef3!
59d6-00000026 <null> 250
+PartsSupplier pg_catalog matpg_datatype typlen 5 <null> short 0 2 false true false false true false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.Short 5 0 10 tid:7ff2755e9621-6b7b!
b5d6-0000006d <null> 169
+PartsSupplier pg_catalog pg_type typlen 4 <null> short 0 2 false true false false true false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.Short 5 0 10 tid:7ff2755e9621-7e9c!
18e6-0000001f <null> 243
+PartsSupplier pg_catalog matpg_datatype typname 2 <null> string 0 4000 false true false true false false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.String 0 0 0 tid:7ff2755e9621-6bd6!
e5c2-0000006a <null> 166
+PartsSupplier pg_catalog pg_type typname 2 <null> string 0 4000 false true false true false false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.String 0 0 0 tid:7ff2755e9621-7ef7!
48d2-0000001d <null> 241
+PartsSupplier pg_catalog pg_type typnamespace 3 <null> integer 0 4 false true false false true false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.Integer 10 0 10 tid:7ff2755e9621-b928!
886c-0000001e <null> 242
+PartsSupplier pg_catalog pg_type typnotnull 6 <null> boolean 0 1 false true false false false false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.Boolean 1 0 10 tid:7ff2755e9621-68dd!
732b-00000021 <null> 245
+PartsSupplier pg_catalog matpg_relatt typoid 7 <null> integer 0 4 false true false false true false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.Integer 10 0 10 tid:7ff2755e9621-7700!
01e6-00000065 <null> 176
+PartsSupplier pg_catalog pg_type typrelid 10 <null> integer 0 4 false true false false true false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.Integer 10 0 10 tid:7ff2755e9621-8a3b!
6905-00000025 <null> 249
+PartsSupplier pg_catalog pg_type typtype 5 <null> char 0 1 false true false true false false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.Character 0 0 0 tid:7ff2755e9621-7efa!
5d81-00000020 <null> 244
+PartsSupplier pg_catalog pg_type typtypmod 8 <null> integer 0 4 false true false false true false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.Integer 10 0 10 tid:7ff2755e9621-ebc6!
8c1e-00000023 <null> 247
+PartsSupplier pg_catalog matpg_datatype uid 4 <null> string 0 4000 false true false true false false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.String 0 0 0 tid:7ff2755e9621-9ead!
aa7c-0000006c <null> 168
+PartsSupplier pg_catalog pg_user usecreatedb 3 <null> boolean 0 1 false true false false false false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.Boolean 1 0 10 tid:7ff2755e9621-5857!
8d3b-0000005c <null> 253
+PartsSupplier pg_catalog pg_user usename 2 <null> string 0 4000 false true false true false false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.String 0 0 0 tid:7ff2755e9621-9a8c!
04cc-0000005b <null> 252
+PartsSupplier pg_catalog pg_user usesuper 4 <null> boolean 0 1 false true false false false false false Nullable <null> <null> -1 -1 Searchable <null> <null> java.lang.Boolean 1 0 10 tid:7ff2755e9621-938d!
e68e-0000005d <null> 254
Row Count : 254
getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
VDBName 12 PartsSupplier java.lang.String VDBName string SYS Columns 255 255 0 false false false false 0 true true false false
Modified: trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testDataTypes.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testDataTypes.expected 2012-07-17 01:00:58 UTC (rev 4242)
+++ trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testDataTypes.expected 2012-07-19 02:57:49 UTC (rev 4243)
@@ -1,58 +1,58 @@
string boolean boolean string string integer integer string boolean boolean boolean integer integer string string string string string integer
Name IsStandard IsPhysical TypeName JavaClass Scale TypeLength NullType IsSigned IsAutoIncremented IsCaseSensitive Precision Radix SearchType UID RuntimeType BaseType Description OID
-ENTITIES false false ENTITIES java.lang.String 0 0 No Nulls false false false 0 0 Searchable mmuuid:20360100-e742-1e20-8c26-a038c6ed7576 string ENTITY <null> 1
-ENTITY false false ENTITY java.lang.String 0 0 No Nulls false false false 0 0 Searchable mmuuid:9fece300-e71a-1e20-8c26-a038c6ed7576 string NCName <null> 2
-ID false false ID java.lang.String 0 0 No Nulls false false false 0 0 Searchable mmuuid:88b13dc0-e702-1e20-8c26-a038c6ed7576 string NCName <null> 3
-IDREF false false IDREF java.lang.String 0 0 No Nulls false false false 0 0 Searchable mmuuid:dd33ff40-e6df-1e20-8c26-a038c6ed7576 string NCName <null> 4
-IDREFS false false IDREFS java.lang.String 0 0 No Nulls false false false 0 0 Searchable mmuuid:3c99f780-e72d-1e20-8c26-a038c6ed7576 string IDREF <null> 5
-NCName false false NCName java.lang.String 0 0 No Nulls false false false 0 0 Searchable mmuuid:ac00e000-e676-1e20-8c26-a038c6ed7576 string Name <null> 6
-NMTOKEN false false NMTOKEN java.lang.String 0 0 No Nulls false false false 0 0 Searchable mmuuid:4ca2ae00-3a95-1e20-921b-eeee28353879 string token <null> 7
-NMTOKENS false false NMTOKENS java.lang.String 0 0 No Nulls false false false 0 0 Searchable mmuuid:4b0f8500-e6a6-1e20-8c26-a038c6ed7576 string NMTOKEN <null> 8
-NOTATION false false NOTATION java.lang.String 0 0 No Nulls false false false 0 0 Searchable mmuuid:3dcaf900-e8dc-1e2a-b433-fb67ea35c07e string anySimpleType <null> 9
-Name false false Name java.lang.String 0 0 No Nulls false false false 0 0 Searchable mmuuid:e66c4600-e65b-1e20-8c26-a038c6ed7576 string token <null> 10
-QName false false QName java.lang.String 0 0 No Nulls false false false 0 0 Searchable mmuuid:eeb5d780-e8c3-1e2a-b433-fb67ea35c07e string anySimpleType <null> 11
-XMLLiteral false false XMLLiteral org.teiid.core.types.XMLType 0 0 No Nulls false false false 0 0 Searchable mmuuid:43f5274e-55e1-1f87-ba1c-eea49143eb32 xml string <null> 12
-anyURI false false anyURI java.lang.String 0 0 No Nulls false false false 0 0 Searchable mmuuid:6247ec80-e8a4-1e2a-b433-fb67ea35c07e string anySimpleType <null> 13
-base64Binary false false base64Binary java.lang.String 0 0 No Nulls false false false 0 0 Searchable mmuuid:b4c99380-ebc6-1e2a-9319-8eaa9b2276c7 string anySimpleType <null> 14
-bigdecimal false false bigdecimal java.math.BigDecimal 0 0 No Nulls false false false 0 0 Searchable mmuuid:f2249740-a078-1e26-9b08-d6079ebe1f0d bigdecimal decimal <null> 15
-biginteger false false biginteger java.math.BigInteger 0 0 No Nulls false false false 0 0 Searchable mmuuid:822b9a40-a066-1e26-9b08-d6079ebe1f0d biginteger decimal <null> 16
-blob false false blob org.teiid.core.types.BlobType 0 0 No Nulls false false false 0 0 Searchable mmuuid:5a793100-1836-1ed0-ba0f-f2334f5fbf95 blob base64Binary <null> 17
-boolean false false boolean java.lang.Boolean 0 0 No Nulls false false false 0 0 Searchable mmuuid:dc476100-c483-1e24-9b01-c8207cd53eb7 boolean anySimpleType <null> 18
-byte false false byte java.lang.Byte 0 0 No Nulls false false false 0 0 Searchable mmuuid:26dc1cc0-b9c8-1e21-b812-969c8fc8b016 byte short <null> 19
-char false false char java.lang.Character 0 0 No Nulls false false false 0 0 Searchable mmuuid:62472700-a064-1e26-9b08-d6079ebe1f0d char string <null> 20
-clob false false clob org.teiid.core.types.ClobType 0 0 No Nulls false false false 0 0 Searchable mmuuid:559646c0-4941-1ece-b22b-f49159d22ad3 clob string <null> 21
-date false false date java.sql.Date 0 0 No Nulls false false false 0 0 Searchable mmuuid:65dcde00-c4ab-1e24-9b01-c8207cd53eb7 date anySimpleType <null> 22
-dateTime false false dateTime java.sql.Timestamp 0 0 No Nulls false false false 0 0 Searchable mmuuid:5c69dec0-b3ea-1e2a-9a03-beb8638ffd21 timestamp anySimpleType <null> 23
-decimal false false decimal java.math.BigDecimal 0 0 No Nulls false false false 0 0 Searchable mmuuid:569dfa00-c456-1e24-9b01-c8207cd53eb7 bigdecimal anySimpleType <null> 24
-double false false double java.lang.Double 0 0 No Nulls false false false 0 0 Searchable mmuuid:1f18b140-c4a3-1e24-9b01-c8207cd53eb7 double anySimpleType <null> 25
-duration false false duration java.lang.String 0 0 No Nulls false false false 0 0 Searchable mmuuid:28d98540-b3e7-1e2a-9a03-beb8638ffd21 string anySimpleType <null> 26
-float false false float java.lang.Float 0 0 No Nulls false false false 0 0 Searchable mmuuid:d86b0d00-c48a-1e24-9b01-c8207cd53eb7 float anySimpleType <null> 27
-gDay false false gDay java.math.BigInteger 0 0 No Nulls false false false 0 0 Searchable mmuuid:860b7dc0-b3f8-1e2a-9a03-beb8638ffd21 biginteger anySimpleType <null> 28
-gMonth false false gMonth java.math.BigInteger 0 0 No Nulls false false false 0 0 Searchable mmuuid:187f5580-b3fb-1e2a-9a03-beb8638ffd21 biginteger anySimpleType <null> 29
-gMonthDay false false gMonthDay java.sql.Timestamp 0 0 No Nulls false false false 0 0 Searchable mmuuid:6e604140-b3f5-1e2a-9a03-beb8638ffd21 timestamp anySimpleType <null> 30
-gYear false false gYear java.math.BigInteger 0 0 No Nulls false false false 0 0 Searchable mmuuid:b02c7600-b3f2-1e2a-9a03-beb8638ffd21 biginteger anySimpleType <null> 31
-gYearMonth false false gYearMonth java.sql.Timestamp 0 0 No Nulls false false false 0 0 Searchable mmuuid:17d08040-b3ed-1e2a-9a03-beb8638ffd21 timestamp anySimpleType <null> 32
-hexBinary false false hexBinary java.lang.String 0 0 No Nulls false false false 0 0 Searchable mmuuid:d9998500-ebba-1e2a-9319-8eaa9b2276c7 string anySimpleType <null> 33
-int false false int java.lang.Integer 0 0 No Nulls false false false 0 0 Searchable mmuuid:33add3c0-b98d-1e21-b812-969c8fc8b016 integer long <null> 34
-integer false false integer java.math.BigInteger 0 0 No Nulls false false false 0 0 Searchable mmuuid:45da3500-e78f-1e20-8c26-a038c6ed7576 biginteger decimal <null> 35
-language false false language java.lang.String 0 0 No Nulls false false false 0 0 Searchable mmuuid:d4d980c0-e623-1e20-8c26-a038c6ed7576 string token <null> 36
-long false false long java.lang.Long 0 0 No Nulls false false false 0 0 Searchable mmuuid:8cdee840-b900-1e21-b812-969c8fc8b016 long integer <null> 37
-negativeInteger false false negativeInteger java.math.BigInteger 0 0 No Nulls false false false 0 0 Searchable mmuuid:86d29280-b8d3-1e21-b812-969c8fc8b016 biginteger nonPositiveInteger <null> 38
-nonNegativeInteger false false nonNegativeInteger java.math.BigInteger 0 0 No Nulls false false false 0 0 Searchable mmuuid:0e081200-b8a4-1e21-b812-969c8fc8b016 biginteger integer <null> 39
-nonPositiveInteger false false nonPositiveInteger java.math.BigInteger 0 0 No Nulls false false false 0 0 Searchable mmuuid:cbdd6e40-b9d2-1e21-8c26-a038c6ed7576 biginteger integer <null> 40
-normalizedString false false normalizedString java.lang.String 0 0 No Nulls false false false 0 0 Searchable mmuuid:4df43700-3b13-1e20-921b-eeee28353879 string string <null> 41
-object false false object java.lang.Object 0 0 No Nulls false false false 0 0 Searchable mmuuid:051a0640-b4e8-1e26-9f33-b76fd9d5fa79 object base64Binary <null> 42
-positiveInteger false false positiveInteger java.math.BigInteger 0 0 No Nulls false false false 0 0 Searchable mmuuid:1cbbd380-b9ea-1e21-b812-969c8fc8b016 biginteger nonNegativeInteger <null> 43
-short false false short java.lang.Short 0 0 No Nulls false false false 0 0 Searchable mmuuid:5bbcf140-b9ae-1e21-b812-969c8fc8b016 short int <null> 44
-string false false string java.lang.String 0 0 No Nulls false false false 0 0 Searchable mmuuid:bf6c34c0-c442-1e24-9b01-c8207cd53eb7 string anySimpleType <null> 45
-time false false time java.sql.Time 0 0 No Nulls false false false 0 0 Searchable mmuuid:3b892180-c4a7-1e24-9b01-c8207cd53eb7 time anySimpleType <null> 46
-timestamp false false timestamp java.sql.Timestamp 0 0 No Nulls false false false 0 0 Searchable mmuuid:6d9809c0-a07e-1e26-9b08-d6079ebe1f0d timestamp string <null> 47
-token false false token java.lang.String 0 0 No Nulls false false false 0 0 Searchable mmuuid:3425cb80-d844-1e20-9027-be6d2c3b8b3a string normalizedString <null> 48
-unsignedByte false false unsignedByte java.lang.Short 0 0 No Nulls false false false 0 0 Searchable mmuuid:cff745c0-baa2-1e21-b812-969c8fc8b016 short unsignedShort <null> 49
-unsignedInt false false unsignedInt java.lang.Long 0 0 No Nulls false false false 0 0 Searchable mmuuid:badcbd80-ba63-1e21-b812-969c8fc8b016 long unsignedLong <null> 50
-unsignedLong false false unsignedLong java.math.BigInteger 0 0 No Nulls false false false 0 0 Searchable mmuuid:54b98780-ba14-1e21-b812-969c8fc8b016 biginteger nonNegativeInteger <null> 51
-unsignedShort false false unsignedShort java.lang.Integer 0 0 No Nulls false false false 0 0 Searchable mmuuid:327093c0-ba88-1e21-b812-969c8fc8b016 integer unsignedInt <null> 52
-varbinary false false varbinary org.teiid.core.types.BinaryType 0 0 No Nulls false false false 0 0 Searchable mmuuid:182fd511-1a3e-447a-a6ea-72569d6a22ec varbinary base64Binary <null> 53
+ENTITIES false false ENTITIES java.lang.String 0 4000 Nullable false false true 0 0 Searchable mmuuid:20360100-e742-1e20-8c26-a038c6ed7576 string ENTITY <null> 1
+ENTITY false false ENTITY java.lang.String 0 4000 Nullable false false true 0 0 Searchable mmuuid:9fece300-e71a-1e20-8c26-a038c6ed7576 string NCName <null> 2
+ID false false ID java.lang.String 0 4000 Nullable false false true 0 0 Searchable mmuuid:88b13dc0-e702-1e20-8c26-a038c6ed7576 string NCName <null> 3
+IDREF false false IDREF java.lang.String 0 4000 Nullable false false true 0 0 Searchable mmuuid:dd33ff40-e6df-1e20-8c26-a038c6ed7576 string NCName <null> 4
+IDREFS false false IDREFS java.lang.String 0 4000 Nullable false false true 0 0 Searchable mmuuid:3c99f780-e72d-1e20-8c26-a038c6ed7576 string IDREF <null> 5
+NCName false false NCName java.lang.String 0 4000 Nullable false false true 0 0 Searchable mmuuid:ac00e000-e676-1e20-8c26-a038c6ed7576 string Name <null> 6
+NMTOKEN false false NMTOKEN java.lang.String 0 4000 Nullable false false true 0 0 Searchable mmuuid:4ca2ae00-3a95-1e20-921b-eeee28353879 string token <null> 7
+NMTOKENS false false NMTOKENS java.lang.String 0 4000 Nullable false false true 0 0 Searchable mmuuid:4b0f8500-e6a6-1e20-8c26-a038c6ed7576 string NMTOKEN <null> 8
+NOTATION false false NOTATION java.lang.String 0 4000 Nullable false false true 0 0 Searchable mmuuid:3dcaf900-e8dc-1e2a-b433-fb67ea35c07e string anySimpleType <null> 9
+Name false false Name java.lang.String 0 4000 Nullable false false true 0 0 Searchable mmuuid:e66c4600-e65b-1e20-8c26-a038c6ed7576 string token <null> 10
+QName false false QName java.lang.String 0 4000 Nullable false false true 0 0 Searchable mmuuid:eeb5d780-e8c3-1e2a-b433-fb67ea35c07e string anySimpleType <null> 11
+XMLLiteral true true XMLLiteral org.teiid.core.types.XMLType 0 2147483647 Nullable false false true 0 0 Searchable mmuuid:43f5274e-55e1-1f87-ba1c-eea49143eb32 xml string <null> 12
+anyURI false false anyURI java.lang.String 0 4000 Nullable false false true 0 0 Searchable mmuuid:6247ec80-e8a4-1e2a-b433-fb67ea35c07e string anySimpleType <null> 13
+base64Binary false false base64Binary java.lang.String 0 4000 Nullable false false true 0 0 Searchable mmuuid:b4c99380-ebc6-1e2a-9319-8eaa9b2276c7 string anySimpleType <null> 14
+bigdecimal true true bigdecimal java.math.BigDecimal 2147483647 2147483647 Nullable true false false 2147483647 10 Searchable mmuuid:f2249740-a078-1e26-9b08-d6079ebe1f0d bigdecimal decimal <null> 15
+biginteger true true biginteger java.math.BigInteger 0 2147483647 Nullable true false false 2147483647 10 Searchable mmuuid:822b9a40-a066-1e26-9b08-d6079ebe1f0d biginteger decimal <null> 16
+blob true true blob org.teiid.core.types.BlobType 0 2147483647 Nullable false false false 0 0 Unsearchable mmuuid:5a793100-1836-1ed0-ba0f-f2334f5fbf95 blob base64Binary <null> 17
+boolean true true boolean java.lang.Boolean 0 1 Nullable false false false 1 10 Searchable mmuuid:dc476100-c483-1e24-9b01-c8207cd53eb7 boolean anySimpleType <null> 18
+byte true true byte java.lang.Byte 0 1 Nullable true false false 3 10 Searchable mmuuid:26dc1cc0-b9c8-1e21-b812-969c8fc8b016 byte short <null> 19
+char true true char java.lang.Character 0 1 Nullable false false true 0 0 Searchable mmuuid:62472700-a064-1e26-9b08-d6079ebe1f0d char string <null> 20
+clob true true clob org.teiid.core.types.ClobType 0 2147483647 Nullable false false true 0 0 Like Only mmuuid:559646c0-4941-1ece-b22b-f49159d22ad3 clob string <null> 21
+date true true date java.sql.Date 0 4 Nullable false false false 0 0 Searchable mmuuid:65dcde00-c4ab-1e24-9b01-c8207cd53eb7 date anySimpleType <null> 22
+dateTime true true dateTime java.sql.Timestamp 0 12 Nullable false false false 0 0 Searchable mmuuid:5c69dec0-b3ea-1e2a-9a03-beb8638ffd21 timestamp anySimpleType <null> 23
+decimal true true decimal java.math.BigDecimal 2147483647 2147483647 Nullable true false false 2147483647 10 Searchable mmuuid:569dfa00-c456-1e24-9b01-c8207cd53eb7 bigdecimal anySimpleType <null> 24
+double true true double java.lang.Double 4 8 Nullable true false false 17 10 Searchable mmuuid:1f18b140-c4a3-1e24-9b01-c8207cd53eb7 double anySimpleType <null> 25
+duration false false duration java.lang.String 0 4000 Nullable false false true 0 0 Searchable mmuuid:28d98540-b3e7-1e2a-9a03-beb8638ffd21 string anySimpleType <null> 26
+float true true float java.lang.Float 3 4 Nullable true false false 7 10 Searchable mmuuid:d86b0d00-c48a-1e24-9b01-c8207cd53eb7 float anySimpleType <null> 27
+gDay false false gDay java.math.BigInteger 0 2147483647 Nullable false false false 0 10 Searchable mmuuid:860b7dc0-b3f8-1e2a-9a03-beb8638ffd21 biginteger anySimpleType <null> 28
+gMonth false false gMonth java.math.BigInteger 0 2147483647 Nullable false false false 0 10 Searchable mmuuid:187f5580-b3fb-1e2a-9a03-beb8638ffd21 biginteger anySimpleType <null> 29
+gMonthDay false false gMonthDay java.sql.Timestamp 0 12 Nullable false false false 0 0 Searchable mmuuid:6e604140-b3f5-1e2a-9a03-beb8638ffd21 timestamp anySimpleType <null> 30
+gYear false false gYear java.math.BigInteger 0 2147483647 Nullable true false false 2147483647 10 Searchable mmuuid:b02c7600-b3f2-1e2a-9a03-beb8638ffd21 biginteger anySimpleType <null> 31
+gYearMonth false false gYearMonth java.sql.Timestamp 0 12 Nullable false false false 0 0 Searchable mmuuid:17d08040-b3ed-1e2a-9a03-beb8638ffd21 timestamp anySimpleType <null> 32
+hexBinary false false hexBinary java.lang.String 0 4000 Nullable false false true 0 0 Searchable mmuuid:d9998500-ebba-1e2a-9319-8eaa9b2276c7 string anySimpleType <null> 33
+int true true int java.lang.Integer 0 4 Nullable true false false 10 10 Searchable mmuuid:33add3c0-b98d-1e21-b812-969c8fc8b016 integer long <null> 34
+integer false false integer java.math.BigInteger 0 2147483647 Nullable true false false 2147483647 10 Searchable mmuuid:45da3500-e78f-1e20-8c26-a038c6ed7576 biginteger decimal <null> 35
+language false false language java.lang.String 0 4000 Nullable false false true 0 0 Searchable mmuuid:d4d980c0-e623-1e20-8c26-a038c6ed7576 string token <null> 36
+long true true long java.lang.Long 0 8 Nullable true false false 19 10 Searchable mmuuid:8cdee840-b900-1e21-b812-969c8fc8b016 long integer <null> 37
+negativeInteger false false negativeInteger java.math.BigInteger 0 2147483647 Nullable true false false 2147483647 10 Searchable mmuuid:86d29280-b8d3-1e21-b812-969c8fc8b016 biginteger nonPositiveInteger <null> 38
+nonNegativeInteger false false nonNegativeInteger java.math.BigInteger 0 2147483647 Nullable false false false 2147483647 10 Searchable mmuuid:0e081200-b8a4-1e21-b812-969c8fc8b016 biginteger integer <null> 39
+nonPositiveInteger false false nonPositiveInteger java.math.BigInteger 0 2147483647 Nullable true false false 2147483647 10 Searchable mmuuid:cbdd6e40-b9d2-1e21-8c26-a038c6ed7576 biginteger integer <null> 40
+normalizedString false false normalizedString java.lang.String 0 4000 Nullable false false true 0 0 Searchable mmuuid:4df43700-3b13-1e20-921b-eeee28353879 string string <null> 41
+object true true object java.lang.Object 0 2147483647 Nullable false false false 0 0 Unsearchable mmuuid:051a0640-b4e8-1e26-9f33-b76fd9d5fa79 object base64Binary <null> 42
+positiveInteger false false positiveInteger java.math.BigInteger 0 2147483647 Nullable false false false 2147483647 10 Searchable mmuuid:1cbbd380-b9ea-1e21-b812-969c8fc8b016 biginteger nonNegativeInteger <null> 43
+short true true short java.lang.Short 0 2 Nullable true false false 5 10 Searchable mmuuid:5bbcf140-b9ae-1e21-b812-969c8fc8b016 short int <null> 44
+string true true string java.lang.String 0 4000 Nullable false false true 0 0 Searchable mmuuid:bf6c34c0-c442-1e24-9b01-c8207cd53eb7 string anySimpleType <null> 45
+time true true time java.sql.Time 0 4 Nullable false false false 0 0 Searchable mmuuid:3b892180-c4a7-1e24-9b01-c8207cd53eb7 time anySimpleType <null> 46
+timestamp true true timestamp java.sql.Timestamp 0 12 Nullable false false true 0 0 Searchable mmuuid:6d9809c0-a07e-1e26-9b08-d6079ebe1f0d timestamp string <null> 47
+token false false token java.lang.String 0 4000 Nullable false false true 0 0 Searchable mmuuid:3425cb80-d844-1e20-9027-be6d2c3b8b3a string normalizedString <null> 48
+unsignedByte false false unsignedByte java.lang.Short 0 2 Nullable false false false 5 10 Searchable mmuuid:cff745c0-baa2-1e21-b812-969c8fc8b016 short unsignedShort <null> 49
+unsignedInt false false unsignedInt java.lang.Long 0 8 Nullable false false false 19 10 Searchable mmuuid:badcbd80-ba63-1e21-b812-969c8fc8b016 long unsignedLong <null> 50
+unsignedLong false false unsignedLong java.math.BigInteger 0 2147483647 Nullable false false false 2147483647 10 Searchable mmuuid:54b98780-ba14-1e21-b812-969c8fc8b016 biginteger nonNegativeInteger <null> 51
+unsignedShort false false unsignedShort java.lang.Integer 0 4 Nullable false false false 10 10 Searchable mmuuid:327093c0-ba88-1e21-b812-969c8fc8b016 integer unsignedInt <null> 52
+varbinary true true varbinary org.teiid.core.types.BinaryType 0 8196 Nullable false false false 0 0 Searchable mmuuid:182fd511-1a3e-447a-a6ea-72569d6a22ec varbinary base64Binary <null> 53
Row Count : 53
getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
Name 12 PartsSupplier java.lang.String Name string SYS DataTypes 100 100 0 false true false false 0 true true true false
Modified: trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testKeyColumns.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testKeyColumns.expected 2012-07-17 01:00:58 UTC (rev 4242)
+++ trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testKeyColumns.expected 2012-07-19 02:57:49 UTC (rev 4243)
@@ -9,19 +9,19 @@
PartsSupplier PartsSupplier PARTSSUPPLIER.SUPPLIER SUPPLIER_ID PK_SUPPLIER Primary <null> mmuuid:375c8380-73ff-1edc-a81c-ecf397b10590 1 4
PartsSupplier PartsSupplier PARTSSUPPLIER.SUPPLIER_PARTS SUPPLIER_ID PK_SUPPLIER_PARTS Primary <null> mmuuid:455e5440-73ff-1edc-a81c-ecf397b10590 1 6
PartsSupplier PartsSupplier PARTSSUPPLIER.SUPPLIER SUPPLIER_STATUS FK_SPLIER_STATS Foreign mmuuid:25a8a740-73ff-1edc-a81c-ecf397b10590 mmuuid:5ac43c00-73ff-1edc-a81c-ecf397b10590 1 5
-PartsSupplier pg_catalog matpg_relatt attname pk_matpg_relatt_names Primary <null> mmuid:17448311-6679-4dfd-aeb6-4aabbd894729 1 14
-PartsSupplier pg_catalog matpg_relatt attnum idx_matpg_relatt_ids Index <null> mmuid:053375a4-3971-4705-9146-9ecc640022c2 2 18
-PartsSupplier pg_catalog matpg_relatt attrelid idx_matpg_relatt_ids Index <null> mmuid:053375a4-3971-4705-9146-9ecc640022c2 1 17
-PartsSupplier pg_catalog matpg_datatype name matpg_datatype_names Primary <null> mmuid:542872fe-66ec-43b3-9486-ee25088b7248 2 11
-PartsSupplier pg_catalog matpg_relatt nspname pk_matpg_relatt_names Primary <null> mmuid:17448311-6679-4dfd-aeb6-4aabbd894729 3 16
-PartsSupplier pg_catalog matpg_datatype oid matpg_datatype_ids Index <null> mmuid:68ba97de-981f-49ed-873a-60f0e9d76b6f 2 13
-PartsSupplier pg_catalog matpg_datatype oid matpg_datatype_names Primary <null> mmuid:542872fe-66ec-43b3-9486-ee25088b7248 1 10
-PartsSupplier pg_catalog pg_attribute oid pk_pg_attr Primary <null> mmuid:649c1635-60ad-4c28-9b20-035c562bb1be 1 19
-PartsSupplier pg_catalog pg_class oid pk_pg_class Primary <null> mmuid:59f7dc95-95fe-4d90-9813-1a097188e768 1 20
-PartsSupplier pg_catalog pg_index oid pk_pg_index Primary <null> mmuid:3c67619c-7d8f-4378-b7e9-84a0451ea5e5 1 21
-PartsSupplier pg_catalog pg_proc oid pk_pg_proc Primary <null> mmuid:635b6634-632c-43c9-8cc7-bcaa016133e8 1 22
-PartsSupplier pg_catalog matpg_relatt relname pk_matpg_relatt_names Primary <null> mmuid:17448311-6679-4dfd-aeb6-4aabbd894729 2 15
-PartsSupplier pg_catalog matpg_datatype typname matpg_datatype_ids Index <null> mmuid:68ba97de-981f-49ed-873a-60f0e9d76b6f 1 12
+PartsSupplier pg_catalog matpg_relatt attname pk_matpg_relatt_names Primary <null> tid:7ff2755e9621-965abee4-00000066 1 14
+PartsSupplier pg_catalog matpg_relatt attnum idx_matpg_relatt_ids Index <null> tid:7ff2755e9621-2a649312-00000067 2 18
+PartsSupplier pg_catalog matpg_relatt attrelid idx_matpg_relatt_ids Index <null> tid:7ff2755e9621-2a649312-00000067 1 17
+PartsSupplier pg_catalog matpg_datatype name matpg_datatype_names Primary <null> tid:7ff2755e9621-e36b5941-0000006e 2 11
+PartsSupplier pg_catalog matpg_relatt nspname pk_matpg_relatt_names Primary <null> tid:7ff2755e9621-965abee4-00000066 3 16
+PartsSupplier pg_catalog matpg_datatype oid matpg_datatype_ids Index <null> tid:7ff2755e9621-ed0fa7f1-0000006f 2 13
+PartsSupplier pg_catalog matpg_datatype oid matpg_datatype_names Primary <null> tid:7ff2755e9621-e36b5941-0000006e 1 10
+PartsSupplier pg_catalog pg_attribute oid pk_pg_attr Primary <null> tid:7ff2755e9621-db38c73a-0000001a 1 19
+PartsSupplier pg_catalog pg_class oid pk_pg_class Primary <null> tid:7ff2755e9621-265d38e8-0000000e 1 20
+PartsSupplier pg_catalog pg_index oid pk_pg_index Primary <null> tid:7ff2755e9621-dd3e1454-00000030 1 21
+PartsSupplier pg_catalog pg_proc oid pk_pg_proc Primary <null> tid:7ff2755e9621-2e2ffa61-0000003f 1 22
+PartsSupplier pg_catalog matpg_relatt relname pk_matpg_relatt_names Primary <null> tid:7ff2755e9621-965abee4-00000066 2 15
+PartsSupplier pg_catalog matpg_datatype typname matpg_datatype_ids Index <null> tid:7ff2755e9621-ed0fa7f1-0000006f 1 12
Row Count : 22
getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
VDBName 12 PartsSupplier java.lang.String VDBName string SYS KeyColumns 255 255 0 false false false false 0 true true false false
Modified: trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testKeys.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testKeys.expected 2012-07-17 01:00:58 UTC (rev 4242)
+++ trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testKeys.expected 2012-07-19 02:57:49 UTC (rev 4243)
@@ -8,14 +8,14 @@
PartsSupplier PartsSupplier PARTSSUPPLIER.STATUS PK_STATUS <null> <null> Primary false <null> mmuuid:25a8a740-73ff-1edc-a81c-ecf397b10590 3
PartsSupplier PartsSupplier PARTSSUPPLIER.SUPPLIER PK_SUPPLIER <null> <null> Primary false <null> mmuuid:375c8380-73ff-1edc-a81c-ecf397b10590 4
PartsSupplier PartsSupplier PARTSSUPPLIER.SUPPLIER_PARTS PK_SUPPLIER_PARTS <null> <null> Primary false <null> mmuuid:455e5440-73ff-1edc-a81c-ecf397b10590 6
-PartsSupplier pg_catalog matpg_relatt idx_matpg_relatt_ids <null> <null> Index false <null> mmuid:053375a4-3971-4705-9146-9ecc640022c2 12
-PartsSupplier pg_catalog matpg_datatype matpg_datatype_ids <null> <null> Index false <null> mmuid:68ba97de-981f-49ed-873a-60f0e9d76b6f 10
-PartsSupplier pg_catalog matpg_datatype matpg_datatype_names <null> <null> Primary false <null> mmuid:542872fe-66ec-43b3-9486-ee25088b7248 9
-PartsSupplier pg_catalog matpg_relatt pk_matpg_relatt_names <null> <null> Primary false <null> mmuid:17448311-6679-4dfd-aeb6-4aabbd894729 11
-PartsSupplier pg_catalog pg_attribute pk_pg_attr <null> <null> Primary false <null> mmuid:649c1635-60ad-4c28-9b20-035c562bb1be 13
-PartsSupplier pg_catalog pg_class pk_pg_class <null> <null> Primary false <null> mmuid:59f7dc95-95fe-4d90-9813-1a097188e768 14
-PartsSupplier pg_catalog pg_index pk_pg_index <null> <null> Primary false <null> mmuid:3c67619c-7d8f-4378-b7e9-84a0451ea5e5 15
-PartsSupplier pg_catalog pg_proc pk_pg_proc <null> <null> Primary false <null> mmuid:635b6634-632c-43c9-8cc7-bcaa016133e8 16
+PartsSupplier pg_catalog matpg_relatt idx_matpg_relatt_ids <null> <null> Index false <null> tid:7ff2755e9621-2a649312-00000067 12
+PartsSupplier pg_catalog matpg_datatype matpg_datatype_ids <null> <null> Index false <null> tid:7ff2755e9621-ed0fa7f1-0000006f 10
+PartsSupplier pg_catalog matpg_datatype matpg_datatype_names <null> <null> Primary false <null> tid:7ff2755e9621-e36b5941-0000006e 9
+PartsSupplier pg_catalog matpg_relatt pk_matpg_relatt_names <null> <null> Primary false <null> tid:7ff2755e9621-965abee4-00000066 11
+PartsSupplier pg_catalog pg_attribute pk_pg_attr <null> <null> Primary false <null> tid:7ff2755e9621-db38c73a-0000001a 13
+PartsSupplier pg_catalog pg_class pk_pg_class <null> <null> Primary false <null> tid:7ff2755e9621-265d38e8-0000000e 14
+PartsSupplier pg_catalog pg_index pk_pg_index <null> <null> Primary false <null> tid:7ff2755e9621-dd3e1454-00000030 15
+PartsSupplier pg_catalog pg_proc pk_pg_proc <null> <null> Primary false <null> tid:7ff2755e9621-2e2ffa61-0000003f 16
Row Count : 16
getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
VDBName 12 PartsSupplier java.lang.String VDBName string SYS Keys 255 255 0 false false false false 0 true true false false
Modified: trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testProperties.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testProperties.expected 2012-07-17 01:00:58 UTC (rev 4242)
+++ trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testProperties.expected 2012-07-19 02:57:49 UTC (rev 4243)
@@ -1,9 +1,9 @@
string string string integer clob
Name Value UID OID ClobValue
-pg_type:oid 30 mmuid:bcbed548-176c-4116-a5d6-7638cb0206e1 1 Clob[2]
-pg_type:oid 1009 mmuid:a385751f-a31a-4d5d-9197-3fbd390b0251 2 Clob[4]
-pg_type:oid 1002 mmuid:e5715456-245f-4846-b90b-01d06d1c3672 3 Clob[4]
-pg_type:oid 1028 mmuid:9569efdb-21b2-4b4f-a2db-e7406267b8ed 4 Clob[4]
+pg_type:oid 30 tid:7ff2755e9621-c69d9997-0000003a 1 Clob[2]
+pg_type:oid 1009 tid:7ff2755e9621-c63e1866-0000003b 2 Clob[4]
+pg_type:oid 1002 tid:7ff2755e9621-c6363c4e-0000003c 3 Clob[4]
+pg_type:oid 1028 tid:7ff2755e9621-f418fbbe-0000003d 4 Clob[4]
Row Count : 4
getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
Name 12 PartsSupplier java.lang.String Name string SYS Properties 255 255 0 false true false false 0 true true true false
Modified: trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testSchemas.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testSchemas.expected 2012-07-17 01:00:58 UTC (rev 4242)
+++ trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testSchemas.expected 2012-07-19 02:57:49 UTC (rev 4243)
@@ -3,7 +3,7 @@
PartsSupplier PartsSupplier true mmuuid:19c7f380-73d8-1edc-a81c-ecf397b10590 <null> http://www.metamatrix.com/metamodels/Relational 1
PartsSupplier SYS true mmuuid:49b9c0f9-2c4c-42d3-9409-2d847d29a1de System http://www.metamatrix.com/metamodels/Relational 3
PartsSupplier SYSADMIN true mmuuid:82f6153e-31e0-4034-b335-013cb418da34 <null> http://www.metamatrix.com/metamodels/Relational 2
-PartsSupplier pg_catalog true mmuid:5a84789f-c794-4748-803a-09b6b605f6b9 <null> http://www.metamatrix.com/metamodels/Relational 4
+PartsSupplier pg_catalog true tid:7ff2755e9621-35592dd1-00000000 <null> http://www.metamatrix.com/metamodels/Relational 4
Row Count : 4
getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
VDBName 12 PartsSupplier java.lang.String VDBName string SYS Schemas 255 255 0 false true false true 1 false true true true
Modified: trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testTables.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testTables.expected 2012-07-17 01:00:58 UTC (rev 4242)
+++ trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testTables.expected 2012-07-19 02:57:49 UTC (rev 4243)
@@ -18,19 +18,19 @@
PartsSupplier SYS Tables Table <null> true false mmuuid:8551b3bd-11cc-4049-9bcf-fe91a0eb7ba7 -1 <null> true false 17
PartsSupplier SYSADMIN VDBResources Table <null> true false mmuuid:1785804d-beaf-4831-9531-e59164fedd49 -1 <null> true false 7
PartsSupplier SYS VirtualDatabases Table <null> true false mmuuid:47297c72-d621-4f4e-af4e-74060ac5f489 -1 <null> true false 18
-PartsSupplier pg_catalog matpg_datatype Table <null> false false mmuid:0f312b3c-98ca-4a09-81fa-f1ff83f0a6c1 -1 <null> true true 19
-PartsSupplier pg_catalog matpg_relatt Table <null> false false mmuid:0b0894ba-e1ea-4eaf-bcd2-ea9ebd05e47d -1 <null> true true 20
-PartsSupplier pg_catalog pg_am Table <null> false false mmuid:da4b747e-7d87-403a-8309-2cdf1399031b -1 <null> true false 21
-PartsSupplier pg_catalog pg_attrdef Table <null> false false mmuid:e9b278d4-49af-442f-9a5a-b699fe3b102b -1 <null> true false 22
-PartsSupplier pg_catalog pg_attribute Table <null> false false mmuid:fa463d98-365f-489a-a707-025193cb51eb -1 <null> true true 23
-PartsSupplier pg_catalog pg_class Table <null> false false mmuid:7e21f2e6-06e3-4bca-9b01-72ea47821560 -1 <null> true true 24
-PartsSupplier pg_catalog pg_database Table <null> false false mmuid:1aedd02c-5801-41e7-accd-da1f257c26e8 -1 <null> true false 25
-PartsSupplier pg_catalog pg_index Table <null> false false mmuid:8709e084-48df-417d-b3f8-f4e9b7d8802b -1 <null> true true 26
-PartsSupplier pg_catalog pg_namespace Table <null> false false mmuid:6609866a-3d7b-4f4b-95fe-ebfac769d699 -1 <null> true false 27
-PartsSupplier pg_catalog pg_proc Table <null> false false mmuid:b288b3aa-37f2-4a8e-8b1b-e932a2ce3e25 -1 <null> true true 28
-PartsSupplier pg_catalog pg_trigger Table <null> false false mmuid:64977f3e-f2a0-466e-a5d1-80bb058cbe08 -1 <null> true false 29
-PartsSupplier pg_catalog pg_type Table <null> false false mmuid:9462e3f8-cd3c-414f-a570-f6f33c40e36a -1 <null> true false 30
-PartsSupplier pg_catalog pg_user Table <null> false false mmuid:236445e1-408c-40a1-a61c-40e96fb5dc9f -1 <null> true false 31
+PartsSupplier pg_catalog matpg_datatype Table <null> false false tid:7ff2755e9621-e544c1cc-00000068 -1 <null> true true 19
+PartsSupplier pg_catalog matpg_relatt Table <null> false false tid:7ff2755e9621-75d65150-0000005e -1 <null> true true 20
+PartsSupplier pg_catalog pg_am Table <null> false false tid:7ff2755e9621-065a8b74-00000031 -1 <null> true false 21
+PartsSupplier pg_catalog pg_attrdef Table <null> false false tid:7ff2755e9621-ec00662c-0000004a -1 <null> true false 22
+PartsSupplier pg_catalog pg_attribute Table <null> false false tid:7ff2755e9621-edc4ea54-0000000f -1 <null> true true 23
+PartsSupplier pg_catalog pg_class Table <null> false false tid:7ff2755e9621-62e78530-00000004 -1 <null> true true 24
+PartsSupplier pg_catalog pg_database Table <null> false false tid:7ff2755e9621-dda8fac3-0000004f -1 <null> true false 25
+PartsSupplier pg_catalog pg_index Table <null> false false tid:7ff2755e9621-633d048a-00000027 -1 <null> true true 26
+PartsSupplier pg_catalog pg_namespace Table <null> false false tid:7ff2755e9621-37a09513-00000001 -1 <null> true false 27
+PartsSupplier pg_catalog pg_proc Table <null> false false tid:7ff2755e9621-d9ec709e-00000034 -1 <null> true true 28
+PartsSupplier pg_catalog pg_trigger Table <null> false false tid:7ff2755e9621-d50d2370-00000040 -1 <null> true false 29
+PartsSupplier pg_catalog pg_type Table <null> false false tid:7ff2755e9621-d9ee5c82-0000001b -1 <null> true false 30
+PartsSupplier pg_catalog pg_user Table <null> false false tid:7ff2755e9621-d9eeb913-00000059 -1 <null> true false 31
Row Count : 31
getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
VDBName 12 PartsSupplier java.lang.String VDBName string SYS Tables 255 255 0 false true false true 1 false true true true
Modified: trunk/test-integration/common/src/test/resources/TestVirtualDocWithVirtualProc/testDefect15241b.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/TestVirtualDocWithVirtualProc/testDefect15241b.expected 2012-07-17 01:00:58 UTC (rev 4242)
+++ trunk/test-integration/common/src/test/resources/TestVirtualDocWithVirtualProc/testDefect15241b.expected 2012-07-19 02:57:49 UTC (rev 4243)
@@ -2,10 +2,10 @@
Name Value UID
NugentXAttribute Nuuuuuge22222 mmuuid:4789b280-841c-1f15-9526-ebd0cace03e1
NugentYAttribute Nuuuuuge44444 mmuuid:4789b280-841c-1f15-9526-ebd0cace03e1
-pg_type:oid 30 mmuid:bcbed548-176c-4116-a5d6-7638cb0206e1
-pg_type:oid 1009 mmuid:a385751f-a31a-4d5d-9197-3fbd390b0251
-pg_type:oid 1002 mmuid:e5715456-245f-4846-b90b-01d06d1c3672
-pg_type:oid 1028 mmuid:9569efdb-21b2-4b4f-a2db-e7406267b8ed
+pg_type:oid 30 tid:7ff2755e9621-c69d9997-0000003a
+pg_type:oid 1009 tid:7ff2755e9621-c63e1866-0000003b
+pg_type:oid 1002 tid:7ff2755e9621-c6363c4e-0000003c
+pg_type:oid 1028 tid:7ff2755e9621-f418fbbe-0000003d
Row Count : 6
getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
Name 12 xmlvp java.lang.String Name string SYS Properties 255 255 0 false true false false 0 true true true false
13 years, 5 months
teiid SVN: r4242 - in trunk: api/src/main/java/org/teiid/metadata and 18 other directories.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2012-07-16 21:00:58 -0400 (Mon, 16 Jul 2012)
New Revision: 4242
Modified:
trunk/api/src/main/java/org/teiid/language/SQLConstants.java
trunk/api/src/main/java/org/teiid/metadata/ProcedureParameter.java
trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCMetdataProcessor.java
trunk/engine/src/main/java/org/teiid/query/QueryPlugin.java
trunk/engine/src/main/java/org/teiid/query/function/SystemFunctionManager.java
trunk/engine/src/main/java/org/teiid/query/function/metadata/FunctionMetadataValidator.java
trunk/engine/src/main/java/org/teiid/query/function/metadata/InvalidFunctionItem.java
trunk/engine/src/main/java/org/teiid/query/metadata/DDLConstants.java
trunk/engine/src/main/java/org/teiid/query/metadata/DDLStringVisitor.java
trunk/engine/src/main/java/org/teiid/query/metadata/MetadataValidator.java
trunk/engine/src/main/java/org/teiid/query/metadata/NativeMetadataRepository.java
trunk/engine/src/main/java/org/teiid/query/parser/QueryParser.java
trunk/engine/src/main/java/org/teiid/query/parser/SQLParserUtil.java
trunk/engine/src/main/java/org/teiid/query/resolver/ProcedureContainerResolver.java
trunk/engine/src/main/java/org/teiid/query/validator/ValidatorReport.java
trunk/engine/src/main/javacc/org/teiid/query/parser/SQLParser.jj
trunk/engine/src/main/resources/org/teiid/query/i18n.properties
trunk/engine/src/test/java/org/teiid/query/function/metadata/TestSystemSource.java
trunk/engine/src/test/java/org/teiid/query/metadata/TestDDLStringVisitor.java
trunk/engine/src/test/java/org/teiid/query/metadata/TestMetadataValidator.java
trunk/engine/src/test/java/org/teiid/query/parser/TestDDLParser.java
trunk/engine/src/test/java/org/teiid/query/parser/TestParseAlter.java
trunk/engine/src/test/java/org/teiid/query/resolver/TestProcedureResolving.java
trunk/engine/src/test/java/org/teiid/query/rewriter/TestQueryRewriter.java
trunk/engine/src/test/java/org/teiid/query/validator/TestValidator.java
trunk/jboss-integration/src/main/java/org/teiid/jboss/FileUDFMetaData.java
trunk/test-integration/common/src/test/java/org/teiid/systemmodel/TestODBCProceduresSchema.java
Log:
TEIID-2103 various metadata updates and additional validations
Modified: trunk/api/src/main/java/org/teiid/language/SQLConstants.java
===================================================================
--- trunk/api/src/main/java/org/teiid/language/SQLConstants.java 2012-07-16 17:54:25 UTC (rev 4241)
+++ trunk/api/src/main/java/org/teiid/language/SQLConstants.java 2012-07-17 01:00:58 UTC (rev 4242)
@@ -118,6 +118,7 @@
public static final String DISABLED = "DISABLED"; //$NON-NLS-1$
public static final String TRIM = "TRIM"; //$NON-NLS-1$
+ public static final String RESULT = "RESULT"; //$NON-NLS-1$
}
public interface Reserved {
@@ -293,6 +294,7 @@
public static final String OUTER = "OUTER"; //$NON-NLS-1$
public static final String OUTPUT = "OUTPUT"; //$NON-NLS-1$
public static final String OPTION = "OPTION"; //$NON-NLS-1$
+ public static final String OPTIONS = "OPTIONS"; //$NON-NLS-1$
public static final String OVER = "OVER"; //$NON-NLS-1$
public static final String OVERLAPS = "OVERLAPS"; //$NON-NLS-1$
public static final String PARAMETER = "PARAMETER"; //$NON-NLS-1$
Modified: trunk/api/src/main/java/org/teiid/metadata/ProcedureParameter.java
===================================================================
--- trunk/api/src/main/java/org/teiid/metadata/ProcedureParameter.java 2012-07-16 17:54:25 UTC (rev 4241)
+++ trunk/api/src/main/java/org/teiid/metadata/ProcedureParameter.java 2012-07-17 01:00:58 UTC (rev 4242)
@@ -23,17 +23,15 @@
package org.teiid.metadata;
/**
- * ProcedureParameterRecordImpl
+ * Represents a procedure parameter
*/
public class ProcedureParameter extends BaseColumn {
private static final long serialVersionUID = 3484281155208939073L;
public enum Type {
- Unknown,
In,
InOut,
- Result,
Out,
ReturnValue
}
Modified: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCMetdataProcessor.java
===================================================================
--- trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCMetdataProcessor.java 2012-07-16 17:54:25 UTC (rev 4241)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCMetdataProcessor.java 2012-07-17 01:00:58 UTC (rev 4242)
@@ -43,15 +43,15 @@
import org.teiid.logging.LogManager;
import org.teiid.metadata.AbstractMetadataRecord;
import org.teiid.metadata.BaseColumn;
-import org.teiid.metadata.BaseColumn.NullType;
import org.teiid.metadata.Column;
import org.teiid.metadata.DuplicateRecordException;
import org.teiid.metadata.ForeignKey;
import org.teiid.metadata.KeyRecord;
import org.teiid.metadata.MetadataFactory;
import org.teiid.metadata.Procedure;
+import org.teiid.metadata.Table;
+import org.teiid.metadata.BaseColumn.NullType;
import org.teiid.metadata.ProcedureParameter.Type;
-import org.teiid.metadata.Table;
import org.teiid.translator.TranslatorException;
import org.teiid.translator.TypeFacility;
@@ -175,12 +175,26 @@
BaseColumn record = null;
int precision = columns.getInt(8);
String runtimeType = getRuntimeType(sqlType, typeName, precision);
- if (columnType == DatabaseMetaData.procedureColumnResult) {
+ switch (columnType) {
+ case DatabaseMetaData.procedureColumnResult:
Column column = metadataFactory.addProcedureResultSetColumn(columnName, runtimeType, procedure);
record = column;
column.setNativeType(typeName);
- } else {
- record = metadataFactory.addProcedureParameter(columnName, runtimeType, Type.values()[columnType], procedure);
+ break;
+ case DatabaseMetaData.procedureColumnIn:
+ record = metadataFactory.addProcedureParameter(columnName, runtimeType, Type.In, procedure);
+ break;
+ case DatabaseMetaData.procedureColumnInOut:
+ record = metadataFactory.addProcedureParameter(columnName, runtimeType, Type.InOut, procedure);
+ break;
+ case DatabaseMetaData.procedureColumnOut:
+ record = metadataFactory.addProcedureParameter(columnName, runtimeType, Type.Out, procedure);
+ break;
+ case DatabaseMetaData.procedureColumnReturn:
+ record = metadataFactory.addProcedureParameter(columnName, runtimeType, Type.ReturnValue, procedure);
+ break;
+ default:
+ continue; //shouldn't happen
}
record.setPrecision(columns.getInt(8));
record.setLength(columns.getInt(9));
Modified: trunk/engine/src/main/java/org/teiid/query/QueryPlugin.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/QueryPlugin.java 2012-07-16 17:54:25 UTC (rev 4241)
+++ trunk/engine/src/main/java/org/teiid/query/QueryPlugin.java 2012-07-17 01:00:58 UTC (rev 4242)
@@ -526,5 +526,7 @@
TEIID31103,
TEIID31104, //recursion limit hit
TEIID31105, //warning
+ TEIID31106, //duplicate param name
+ TEIID31107, //too many result params
}
}
Modified: trunk/engine/src/main/java/org/teiid/query/function/SystemFunctionManager.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/function/SystemFunctionManager.java 2012-07-16 17:54:25 UTC (rev 4241)
+++ trunk/engine/src/main/java/org/teiid/query/function/SystemFunctionManager.java 2012-07-17 01:00:58 UTC (rev 4242)
@@ -27,7 +27,7 @@
import org.teiid.query.QueryPlugin;
import org.teiid.query.function.metadata.FunctionMetadataValidator;
import org.teiid.query.function.source.SystemSource;
-import org.teiid.query.report.ActivityReport;
+import org.teiid.query.validator.ValidatorReport;
public class SystemFunctionManager {
@@ -42,7 +42,7 @@
SystemSource systemSource = new SystemSource(this.allowEnvFunction);
// Validate the system source - should never fail
- ActivityReport report = new ActivityReport("Function Validation"); //$NON-NLS-1$
+ ValidatorReport report = new ValidatorReport("Function Validation"); //$NON-NLS-1$
Collection functionMethods = systemSource.getFunctionMethods();
FunctionMetadataValidator.validateFunctionMethods(functionMethods,report);
if(report.hasItems()) {
Modified: trunk/engine/src/main/java/org/teiid/query/function/metadata/FunctionMetadataValidator.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/function/metadata/FunctionMetadataValidator.java 2012-07-16 17:54:25 UTC (rev 4241)
+++ trunk/engine/src/main/java/org/teiid/query/function/metadata/FunctionMetadataValidator.java 2012-07-17 01:00:58 UTC (rev 4242)
@@ -31,7 +31,7 @@
import org.teiid.metadata.FunctionParameter;
import org.teiid.metadata.FunctionMethod.PushDown;
import org.teiid.query.QueryPlugin;
-import org.teiid.query.report.ActivityReport;
+import org.teiid.query.validator.ValidatorReport;
/**
@@ -56,7 +56,7 @@
* @param methods Collection of {@link FunctionMethod} objects
* @param report Report to store validation errors
*/
- public static final void validateFunctionMethods(Collection<FunctionMethod> methods, ActivityReport report) {
+ public static final void validateFunctionMethods(Collection<FunctionMethod> methods, ValidatorReport report) {
if(methods != null) {
for (FunctionMethod method : methods) {
validateFunctionMethod(method, report);
@@ -77,7 +77,7 @@
* @param method The method to validate
* @param report The report to update during validation
*/
- public static final void validateFunctionMethod(FunctionMethod method, ActivityReport report) {
+ public static final void validateFunctionMethod(FunctionMethod method, ValidatorReport report) {
if(method == null) {
updateReport(report, method, QueryPlugin.Util.getString("ERR.015.001.0052", "FunctionMethod")); //$NON-NLS-1$ //$NON-NLS-2$
return; // can't validate
@@ -111,7 +111,7 @@
* @param method The function method
* @param message The message about the validation failure
*/
- private static final void updateReport(ActivityReport report, FunctionMethod method, String message) {
+ private static final void updateReport(ValidatorReport report, FunctionMethod method, String message) {
report.addItem(new InvalidFunctionItem(method, message));
}
Modified: trunk/engine/src/main/java/org/teiid/query/function/metadata/InvalidFunctionItem.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/function/metadata/InvalidFunctionItem.java 2012-07-16 17:54:25 UTC (rev 4241)
+++ trunk/engine/src/main/java/org/teiid/query/function/metadata/InvalidFunctionItem.java 2012-07-17 01:00:58 UTC (rev 4242)
@@ -23,14 +23,16 @@
package org.teiid.query.function.metadata;
import org.teiid.metadata.FunctionMethod;
-import org.teiid.query.report.ReportItem;
+import org.teiid.query.validator.ValidatorFailure;
/**
* This is a specialized report item for reporting invalid function methods during
* function metadata validation. It is overrides ReportItem and adds an additional
* attribute with the method reference for the invalid method.
*/
-public class InvalidFunctionItem extends ReportItem {
+public class InvalidFunctionItem extends ValidatorFailure {
+
+ private static final long serialVersionUID = 5679334286895174700L;
/**
* Report item type
Modified: trunk/engine/src/main/java/org/teiid/query/metadata/DDLConstants.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/metadata/DDLConstants.java 2012-07-16 17:54:25 UTC (rev 4241)
+++ trunk/engine/src/main/java/org/teiid/query/metadata/DDLConstants.java 2012-07-17 01:00:58 UTC (rev 4242)
@@ -26,15 +26,7 @@
public static final String JAVA_CLASS = "JAVA_CLASS";//$NON-NLS-1$
public static final String DETERMINISM = "DETERMINISM";//$NON-NLS-1$
public static final String CATEGORY = "CATEGORY";//$NON-NLS-1$
- public static final String FUNCTION2 = "FUNCTION";//$NON-NLS-1$
- public static final String OUT = "OUT";//$NON-NLS-1$
- public static final String INOUT = "INOUT";//$NON-NLS-1$
- public static final String IN = "IN";//$NON-NLS-1$
public static final String UPDATECOUNT = "UPDATECOUNT";//$NON-NLS-1$
- public static final String RETURNS = "RETURNS";//$NON-NLS-1$
- public static final String PROCEDURE2 = "PROCEDURE";//$NON-NLS-1$
- public static final String FOREIGN = "FOREIGN";//$NON-NLS-1$
- public static final String VIRTUAL = "VIRTUAL";//$NON-NLS-1$
public static final String DISTINCT_VALUES = "DISTINCT_VALUES";//$NON-NLS-1$
public static final String NULL_VALUE_COUNT = "NULL_VALUE_COUNT";//$NON-NLS-1$
public static final String RADIX = "RADIX";//$NON-NLS-1$
@@ -48,13 +40,10 @@
public static final String SIGNED = "SIGNED";//$NON-NLS-1$
public static final String SELECTABLE = "SELECTABLE";//$NON-NLS-1$
public static final String CASE_SENSITIVE = "CASE_SENSITIVE";//$NON-NLS-1$
- public static final String DEFAULT = "DEFAULT";//$NON-NLS-1$
public static final String AUTO_INCREMENT = "AUTO_INCREMENT";//$NON-NLS-1$
public static final String NOT_NULL = "NOT NULL";//$NON-NLS-1$
- public static final String REFERENCES = "REFERENCES";//$NON-NLS-1$
public static final String FOREIGN_KEY = "FOREIGN KEY";//$NON-NLS-1$
public static final String INDEX = "INDEX";//$NON-NLS-1$
- public static final String UNIQUE = "UNIQUE";//$NON-NLS-1$
public static final String PRIMARY_KEY = "PRIMARY KEY";//$NON-NLS-1$
public static final String ACCESSPATTERN = "ACCESSPATTERN";//$NON-NLS-1$
public static final String NAMEINSOURCE = "NAMEINSOURCE";//$NON-NLS-1$
@@ -66,12 +55,5 @@
public static final String MATERIALIZED = "MATERIALIZED";//$NON-NLS-1$
public static final String INSTEAD_OF = "INSTEAD OF";//$NON-NLS-1$
public static final String CREATE_TRIGGER_ON = "CREATE TRIGGER ON";//$NON-NLS-1$
- public static final String DELETE = "DELETE";//$NON-NLS-1$
- public static final String UPDATE = "UPDATE";//$NON-NLS-1$
- public static final String INSERT = "INSERT";//$NON-NLS-1$
- public static final String OPTIONS2 = "OPTIONS";//$NON-NLS-1$
- public static final String CONSTRAINT = "CONSTRAINT";//$NON-NLS-1$
- public static final String VIEW = "VIEW";//$NON-NLS-1$
public static final String FOREIGN_TABLE = "FOREIGN TABLE";//$NON-NLS-1$
- public static final String CREATE = "CREATE";//$NON-NLS-1$
}
Modified: trunk/engine/src/main/java/org/teiid/query/metadata/DDLStringVisitor.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/metadata/DDLStringVisitor.java 2012-07-16 17:54:25 UTC (rev 4241)
+++ trunk/engine/src/main/java/org/teiid/query/metadata/DDLStringVisitor.java 2012-07-17 01:00:58 UTC (rev 4242)
@@ -21,32 +21,22 @@
*/
package org.teiid.query.metadata;
-import static org.teiid.language.SQLConstants.Tokens.COMMA;
-import static org.teiid.language.SQLConstants.Tokens.LPAREN;
-import static org.teiid.language.SQLConstants.Tokens.RPAREN;
-import static org.teiid.language.SQLConstants.Tokens.SPACE;
-import static org.teiid.language.SQLConstants.Tokens.TICK;
+import static org.teiid.language.SQLConstants.NonReserved.*;
+import static org.teiid.language.SQLConstants.Reserved.*;
+import static org.teiid.language.SQLConstants.Tokens.*;
import static org.teiid.query.metadata.DDLConstants.*;
import java.util.EnumSet;
import java.util.List;
+import java.util.regex.Pattern;
import org.teiid.adminapi.Admin.SchemaObjectType;
import org.teiid.language.SQLConstants;
-import org.teiid.metadata.AbstractMetadataRecord;
+import org.teiid.language.SQLConstants.NonReserved;
+import org.teiid.metadata.*;
import org.teiid.metadata.BaseColumn.NullType;
-import org.teiid.metadata.Column;
-import org.teiid.metadata.ColumnSet;
-import org.teiid.metadata.ForeignKey;
-import org.teiid.metadata.FunctionMethod;
import org.teiid.metadata.FunctionMethod.Determinism;
-import org.teiid.metadata.FunctionParameter;
-import org.teiid.metadata.KeyRecord;
-import org.teiid.metadata.Procedure;
-import org.teiid.metadata.ProcedureParameter;
import org.teiid.metadata.ProcedureParameter.Type;
-import org.teiid.metadata.Schema;
-import org.teiid.metadata.Table;
public class DDLStringVisitor {
private static final String TAB = "\t"; //$NON-NLS-1$
@@ -56,7 +46,7 @@
private boolean includeTables = true;
private boolean includeProcedures = true;
private boolean includeFunctions = true;
- private String filter;
+ private Pattern filter;
public static String getDDLString(Schema schema, EnumSet<SchemaObjectType> types, String regexPattern) {
DDLStringVisitor visitor = new DDLStringVisitor(types, regexPattern);
@@ -70,7 +60,9 @@
this.includeProcedures = types.contains(SchemaObjectType.PROCEDURES);
this.includeFunctions = types.contains(SchemaObjectType.FUNCTIONS);
}
- this.filter = regexPattern;
+ if (regexPattern != null) {
+ this.filter = Pattern.compile(regexPattern);
+ }
}
private void visit(Schema schema) {
@@ -117,7 +109,7 @@
}
private void visit(Table table) {
- if (this.filter != null && !table.getName().matches(this.filter)) {
+ if (this.filter != null && !filter.matcher(table.getName()).matches()) {
return;
}
@@ -159,7 +151,7 @@
// options
String options = buildTableOptions(table);
if (!options.isEmpty()) {
- buffer.append(SPACE).append(OPTIONS2).append(SPACE).append(LPAREN).append(options).append(RPAREN);
+ buffer.append(SPACE).append(OPTIONS).append(SPACE).append(LPAREN).append(options).append(RPAREN);
}
if (table.isVirtual()) {
@@ -194,13 +186,13 @@
addCommonOptions(options, table);
if (table.isMaterialized()) {
- addOption(options, MATERIALIZED, String.valueOf(table.isMaterialized()));
+ addOption(options, MATERIALIZED, table.isMaterialized());
if (table.getMaterializedTable() != null) {
addOption(options, MATERIALIZED_TABLE, table.getMaterializedTable().getName());
}
}
if (table.supportsUpdate()) {
- addOption(options, UPDATABLE, String.valueOf(table.supportsUpdate()));
+ addOption(options, UPDATABLE, table.supportsUpdate());
}
if (table.getCardinality() != -1) {
addOption(options, CARDINALITY, table.getCardinality());
@@ -299,58 +291,44 @@
return options.toString();
}
- private void addColumns(StringBuilder options, List<Column> columns, boolean includeType) {
- options.append(LPAREN);
+ private void addColumns(StringBuilder builder, List<Column> columns, boolean includeType) {
+ builder.append(LPAREN);
boolean first = true;
for (Column c:columns) {
if (first) {
first = false;
}
else {
- options.append(COMMA).append(SPACE);
+ builder.append(COMMA).append(SPACE);
}
- options.append(c.getName());
+ appendColumn(builder, c, true, includeType);
if (includeType) {
- options.append(SPACE).append(c.getDatatype().getName());
+ appendColumnOptions(builder, c);
}
}
- options.append(RPAREN);
+ builder.append(RPAREN);
}
-
- private void addNames(StringBuilder options, List<String> columns) {
+
+ private void addNames(StringBuilder builder, List<String> columns) {
if (columns != null) {
- options.append(LPAREN);
+ builder.append(LPAREN);
boolean first = true;
for (String c:columns) {
if (first) {
first = false;
}
else {
- options.append(COMMA).append(SPACE);
+ builder.append(COMMA).append(SPACE);
}
- options.append(c);
+ builder.append(c);
}
- options.append(RPAREN);
+ builder.append(RPAREN);
}
}
private void visit(Column column, Table table) {
- buffer.append(NEWLINE).append(TAB).append(column.getName()).append(SPACE).append(column.getDatatype().getName());
- if (column.getLength() != 0) {
- buffer.append(LPAREN).append(column.getLength()).append(RPAREN);
- }
- else if (column.getPrecision() != 0){
- buffer.append(LPAREN).append(column.getPrecision());
- if (column.getScale() != 0) {
- buffer.append(COMMA).append(column.getScale());
- }
- buffer.append(RPAREN);
- }
- if (column.getNullType() != null) {
- if (column.getNullType() == NullType.No_Nulls) {
- buffer.append(SPACE).append(NOT_NULL);
- }
- }
+ buffer.append(NEWLINE).append(TAB);
+ appendColumn(buffer, column, true, true);
if (column.isAutoIncremented()) {
buffer.append(SPACE).append(AUTO_INCREMENT);
@@ -387,32 +365,63 @@
}
// options
- String options = buildColumnOptions(column, table);
- if (!options.isEmpty()) {
- buffer.append(SPACE).append(OPTIONS2).append(SPACE).append(LPAREN).append(options).append(RPAREN);
+ appendColumnOptions(buffer, column);
+ }
+
+ private void appendColumn(StringBuilder builder, BaseColumn column, boolean includeName, boolean includeType) {
+ if (includeName) {
+ builder.append(column.getName());
}
+ if (includeType) {
+ builder.append(SPACE).append(column.getDatatype().getName());
+ if (column.getLength() != 0) {
+ builder.append(LPAREN).append(column.getLength()).append(RPAREN);
+ }
+ else if (column.getPrecision() != 0){
+ builder.append(LPAREN).append(column.getPrecision());
+ if (column.getScale() != 0) {
+ builder.append(COMMA).append(column.getScale());
+ }
+ builder.append(RPAREN);
+ }
+ if (column.getNullType() == NullType.No_Nulls) {
+ builder.append(SPACE).append(NOT_NULL);
+ }
+ }
}
- private String buildColumnOptions(Column column, Table table) {
+ private void appendColumnOptions(StringBuilder builder, BaseColumn column) {
StringBuilder options = new StringBuilder();
addCommonOptions(options, column);
+ // 10 is default assumed
+ if (column.getRadix() != column.getDatatype().getRadix()) {
+ addOption(options, RADIX, column.getRadix());
+ }
+
+ if (column instanceof Column) {
+ buildColumnOptions((Column)column, options);
+ }
+ if (options.length() != 0) {
+ builder.append(SPACE).append(OPTIONS).append(SPACE).append(LPAREN).append(options).append(RPAREN);
+ }
+ }
+
+ private void buildColumnOptions(Column column,
+ StringBuilder options) {
if (!column.isSelectable()) {
- addOption(options, SELECTABLE, String.valueOf(column.isSelectable()));
+ addOption(options, SELECTABLE, column.isSelectable());
}
// if table is already updatable, then columns are implicitly updatable.
- if (table.supportsUpdate() && !column.isUpdatable()) {
- addOption(options, UPDATABLE, String.valueOf(column.isUpdatable()));
+ if (!column.isUpdatable() && column.getParent() instanceof Table && ((Table)column.getParent()).supportsUpdate()) {
+ addOption(options, UPDATABLE, column.isUpdatable());
}
-
-
if (column.isCurrency()) {
- addOption(options, CURRENCY, String.valueOf(column.isCurrency()));
+ addOption(options, CURRENCY, column.isCurrency());
}
- /* - designer uses this on all non-numeric just verbose, commenting for now
// only record if not default
if (column.isCaseSensitive() && !column.getDatatype().isCaseSensitive()) {
addOption(options, CASE_SENSITIVE, String.valueOf(column.isCaseSensitive()));
@@ -420,7 +429,7 @@
if (column.isSigned() && !column.getDatatype().isSigned()) {
addOption(options, SIGNED, String.valueOf(column.isSigned()));
- } *
+ }
if (column.isFixedLength()) {
addOption(options, FIXED_LENGTH, String.valueOf(column.isFixedLength()));
}
@@ -428,11 +437,6 @@
if (column.getCharOctetLength() != 0 && column.getLength() != column.getCharOctetLength()) {
addOption(options, CHAR_OCTET_LENGTH, column.getCharOctetLength());
}
- // 10 is default assumed
- if (column.getRadix() != 0 && column.getRadix() != 10) {
- addOption(options, RADIX, column.getRadix());
- }
- */
// by default the search type is default data type search, so avoid it.
if (column.getSearchType() != null && !column.getSearchType().equals(column.getDatatype().getSearchType())) {
@@ -447,8 +451,7 @@
addOption(options, MAX_VALUE, column.getMaximumValue());
}
- // only set native type on the foreign tables, on view the data type is type
- if (table.isPhysical() && column.getNativeType() != null) {
+ if (column.getNativeType() != null) {
addOption(options, NATIVE_TYPE, column.getNativeType());
}
@@ -465,10 +468,9 @@
addOption(options, key, column.getProperty(key, false));
}
}
- return options.toString();
}
- private void addOption(StringBuilder sb, String key, String value) {
+ private void addOption(StringBuilder sb, String key, Object value) {
if (sb.length() != 0) {
sb.append(COMMA).append(SPACE);
}
@@ -483,7 +485,7 @@
}
private void visit(Procedure procedure) {
- if (this.filter != null && !procedure.getName().matches(this.filter)) {
+ if (this.filter != null && !filter.matcher(procedure.getName()).matches()) {
return;
}
@@ -494,7 +496,7 @@
else {
buffer.append(FOREIGN);
}
- buffer.append(SPACE).append(PROCEDURE2).append(SPACE).append(procedure.getName());
+ buffer.append(SPACE).append(PROCEDURE).append(SPACE).append(procedure.getName());
buffer.append(LPAREN);
boolean first = true;
@@ -512,19 +514,28 @@
}
buffer.append(RPAREN);
- buffer.append(SPACE).append(RETURNS).append(SPACE);
- buildProcedureReturn(procedure.getResultSet(), procedure.getParameters());
+ if (procedure.getResultSet() != null) {
+ buffer.append(SPACE).append(RETURNS).append(SPACE).append(TABLE).append(SPACE);
+ addColumns(buffer, procedure.getResultSet().getColumns(), true);
+ }
+ for (ProcedureParameter pp: procedure.getParameters()) {
+ if (pp.getType().equals(Type.ReturnValue)) {
+ buffer.append(SPACE).append(RETURNS).append(SPACE);
+ appendColumn(buffer, pp, false, true);
+ break;
+ }
+ }
//options
String options = buildProcedureOptions(procedure);
if (!options.isEmpty()) {
- buffer.append(NEWLINE).append(OPTIONS2).append(SPACE).append(LPAREN).append(options).append(RPAREN);
+ buffer.append(NEWLINE).append(OPTIONS).append(SPACE).append(LPAREN).append(options).append(RPAREN);
}
//block
if (procedure.isVirtual()) {
buffer.append(NEWLINE).append(SQLConstants.Reserved.AS).append(NEWLINE);
String plan = procedure.getQueryPlan();
- buffer.append(plan.substring("CREATE VIRTUAL PROCEDURE BEGIN ".length(), plan.length()-"END".length())); //$NON-NLS-1$ //$NON-NLS-2$
+ buffer.append(plan);
}
}
@@ -546,35 +557,22 @@
return options.toString();
}
- private void buildProcedureReturn(ColumnSet<Procedure> resultSet, List<ProcedureParameter> parameters) {
- if (resultSet != null) {
- addColumns(buffer, resultSet.getColumns(), true);
- }
- else {
- if (parameters != null) {
- for (ProcedureParameter pp: parameters) {
- if (pp.getType().equals(Type.ReturnValue)) {
- buffer.append(pp.getDatatype().getName());
- }
- }
- }
- }
-
- }
-
private void visit(ProcedureParameter param) {
Type type = param.getType();
- if (type == Type.In || type == Type.InOut || type == Type.Out) {
- String typeStr = null;
- if (type == Type.In) typeStr = IN;
- if (type == Type.InOut) typeStr = INOUT;
- if (type == Type.Out) typeStr = OUT;
- buffer.append(typeStr).append(SPACE).append(param.getName()).append(SPACE).append(param.getDatatype().getName());
+ String typeStr = type.name().toUpperCase();
+ if (type == Type.ReturnValue) {
+ typeStr = Type.Out.name().toUpperCase();
}
+ buffer.append(typeStr).append(SPACE);
+ appendColumn(buffer, param, true, true);
+ if (type == Type.ReturnValue) {
+ buffer.append(SPACE).append(NonReserved.RESULT);
+ }
+ appendColumnOptions(buffer, param);
}
private void visit(FunctionMethod function) {
- if (this.filter != null && !function.getName().matches(this.filter)) {
+ if (this.filter != null && !filter.matcher(function.getName()).matches()) {
return;
}
buffer.append(CREATE).append(SPACE);
@@ -584,7 +582,7 @@
else {
buffer.append(VIRTUAL);
}
- buffer.append(SPACE).append(FUNCTION2).append(SPACE).append(function.getName());
+ buffer.append(SPACE).append(FUNCTION).append(SPACE).append(function.getName());
buffer.append(LPAREN);
boolean first = true;
@@ -605,7 +603,7 @@
//options
String options = buildFunctionOptions(function);
if (!options.isEmpty()) {
- buffer.append(NEWLINE).append(OPTIONS2).append(SPACE).append(LPAREN).append(options).append(RPAREN);
+ buffer.append(NEWLINE).append(OPTIONS).append(SPACE).append(LPAREN).append(options).append(RPAREN);
}
buffer.append(SQLConstants.Tokens.SEMICOLON);
}
Modified: trunk/engine/src/main/java/org/teiid/query/metadata/MetadataValidator.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/metadata/MetadataValidator.java 2012-07-16 17:54:25 UTC (rev 4241)
+++ trunk/engine/src/main/java/org/teiid/query/metadata/MetadataValidator.java 2012-07-17 01:00:58 UTC (rev 4242)
@@ -22,7 +22,9 @@
package org.teiid.query.metadata;
import java.util.Collection;
+import java.util.HashSet;
import java.util.List;
+import java.util.Set;
import java.util.UUID;
import org.teiid.adminapi.impl.ModelMetaData;
@@ -115,7 +117,21 @@
}
}
+ Set<String> names = new HashSet<String>();
for (Procedure p:schema.getProcedures().values()) {
+ boolean hasReturn = false;
+ names.clear();
+ for (ProcedureParameter param : p.getParameters()) {
+ if (param.getType() == ProcedureParameter.Type.ReturnValue) {
+ if (hasReturn) {
+ metadataValidator.log(report, model, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31107, p.getFullName()));
+ }
+ hasReturn = true;
+ }
+ if (!names.add(param.getName())) {
+ metadataValidator.log(report, model, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31106, p.getFullName(), param.getName()));
+ }
+ }
if (p.isVirtual() && model.isSource()) {
metadataValidator.log(report, model, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31076, p.getName(), model.getName()));
}
@@ -186,7 +202,7 @@
try {
if (record instanceof Procedure) {
Procedure p = (Procedure)record;
- Command command = QueryParser.getQueryParser().parseCommand(p.getQueryPlan());
+ Command command = QueryParser.getQueryParser().parseProcedure(p.getQueryPlan(), false);
QueryResolver.resolveCommand(command, new GroupSymbol(p.getFullName()), Command.TYPE_STORED_PROCEDURE, metadata);
resolverReport = Validator.validate(command, metadata);
} else if (record instanceof Table) {
Modified: trunk/engine/src/main/java/org/teiid/query/metadata/NativeMetadataRepository.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/metadata/NativeMetadataRepository.java 2012-07-16 17:54:25 UTC (rev 4241)
+++ trunk/engine/src/main/java/org/teiid/query/metadata/NativeMetadataRepository.java 2012-07-17 01:00:58 UTC (rev 4242)
@@ -28,8 +28,7 @@
import org.teiid.metadata.Table;
import org.teiid.query.QueryPlugin;
import org.teiid.query.function.metadata.FunctionMetadataValidator;
-import org.teiid.query.report.ActivityReport;
-import org.teiid.query.report.ReportItem;
+import org.teiid.query.validator.ValidatorReport;
import org.teiid.resource.spi.WrappedConnection;
import org.teiid.translator.ExecutionFactory;
import org.teiid.translator.TranslatorException;
@@ -74,7 +73,7 @@
throw new TranslatorException(QueryPlugin.Event.TEIID30580, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30580, t.getFullName()));
}
}
- ActivityReport<ReportItem> report = new ActivityReport<ReportItem>("Translator metadata load " + schema.getName()); //$NON-NLS-1$
+ ValidatorReport report = new ValidatorReport("Translator metadata load " + schema.getName()); //$NON-NLS-1$
FunctionMetadataValidator.validateFunctionMethods(schema.getFunctions().values(),report);
if(report.hasItems()) {
throw new TranslatorException(QueryPlugin.Util.getString("ERR.015.001.0005", report)); //$NON-NLS-1$
Modified: trunk/engine/src/main/java/org/teiid/query/parser/QueryParser.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/parser/QueryParser.java 2012-07-16 17:54:25 UTC (rev 4241)
+++ trunk/engine/src/main/java/org/teiid/query/parser/QueryParser.java 2012-07-17 01:00:58 UTC (rev 4242)
@@ -102,9 +102,12 @@
return parseCommand(sql, new ParseInfo());
}
- public Command parseUpdateProcedure(String sql) throws QueryParserException {
+ public Command parseProcedure(String sql, boolean update) throws QueryParserException {
try{
- Command result = getSqlParser(sql).updateProcedure(new ParseInfo());
+ if (update) {
+ return getSqlParser(sql).forEachRowTriggerAction(new ParseInfo());
+ }
+ Command result = getSqlParser(sql).procedureBodyCommand(new ParseInfo());
result.setCacheHint(SQLParserUtil.getQueryCacheOption(sql));
return result;
} catch(ParseException pe) {
Modified: trunk/engine/src/main/java/org/teiid/query/parser/SQLParserUtil.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/parser/SQLParserUtil.java 2012-07-16 17:54:25 UTC (rev 4241)
+++ trunk/engine/src/main/java/org/teiid/query/parser/SQLParserUtil.java 2012-07-17 01:00:58 UTC (rev 4242)
@@ -35,6 +35,7 @@
import org.teiid.core.util.StringUtil;
import org.teiid.language.SQLConstants.Reserved;
import org.teiid.metadata.AbstractMetadataRecord;
+import org.teiid.metadata.BaseColumn;
import org.teiid.metadata.Column;
import org.teiid.metadata.FunctionMethod;
import org.teiid.metadata.FunctionParameter;
@@ -43,8 +44,10 @@
import org.teiid.metadata.ProcedureParameter;
import org.teiid.metadata.Table;
import org.teiid.metadata.Column.SearchType;
+import org.teiid.metadata.ProcedureParameter.Type;
import org.teiid.query.QueryPlugin;
import org.teiid.query.function.FunctionMethods;
+import org.teiid.query.metadata.DDLConstants;
import org.teiid.query.sql.lang.*;
import org.teiid.query.sql.lang.ExistsCriteria.SubqueryHint;
import org.teiid.query.sql.proc.Block;
@@ -354,93 +357,99 @@
return new Block(stmt);
}
- void setColumnOptions(Column c){
+ void setColumnOptions(BaseColumn c){
Map<String, String> props = c.getProperties();
setCommonProperties(c, props);
+
+ String v = props.remove(DDLConstants.RADIX);
+ if (v != null) {
+ c.setRadix(Integer.parseInt(v));
+ }
- String v = props.remove("CASE_SENSITIVE"); //$NON-NLS-1$
+ if (c instanceof Column) {
+ setColumnOptions((Column)c, props);
+ }
+ }
+
+ private void setColumnOptions(Column c, Map<String, String> props) {
+ String v = props.remove(DDLConstants.CASE_SENSITIVE);
if (v != null) {
c.setCaseSensitive(isTrue(v));
}
- v = props.remove("SELECTABLE"); //$NON-NLS-1$
+ v = props.remove(DDLConstants.SELECTABLE);
if (v != null) {
c.setSelectable(isTrue(v));
}
- v = props.remove("UPDATABLE"); //$NON-NLS-1$
+ v = props.remove(DDLConstants.UPDATABLE);
if (v != null) {
c.setUpdatable(isTrue(v));
}
- v = props.remove("SIGNED"); //$NON-NLS-1$
+ v = props.remove(DDLConstants.SIGNED);
if (v != null) {
c.setSigned(isTrue(v));
}
- v = props.remove("CURRENCY"); //$NON-NLS-1$
+ v = props.remove(DDLConstants.CURRENCY);
if (v != null) {
c.setSigned(isTrue(v));
}
- v = props.remove("FIXED_LENGTH"); //$NON-NLS-1$
+ v = props.remove(DDLConstants.FIXED_LENGTH);
if (v != null) {
c.setFixedLength(isTrue(v));
}
- v = props.remove("SEARCHABLE"); //$NON-NLS-1$
+ v = props.remove(DDLConstants.SEARCHABLE);
if (v != null) {
c.setSearchType(SearchType.valueOf(v.toUpperCase()));
}
- v = props.remove("MIN_VALUE"); //$NON-NLS-1$
+ v = props.remove(DDLConstants.MIN_VALUE);
if (v != null) {
c.setMinimumValue(v);
}
- v = props.remove("MAX_VALUE"); //$NON-NLS-1$
+ v = props.remove(DDLConstants.MAX_VALUE);
if (v != null) {
c.setMaximumValue(v);
}
- v = props.remove("CHAR_OCTET_LENGTH"); //$NON-NLS-1$
+ v = props.remove(DDLConstants.CHAR_OCTET_LENGTH);
if (v != null) {
c.setCharOctetLength(Integer.parseInt(v));
}
- v = props.remove("NATIVE_TYPE"); //$NON-NLS-1$
+ v = props.remove(DDLConstants.NATIVE_TYPE);
if (v != null) {
c.setNativeType(v);
}
- v = props.remove("RADIX"); //$NON-NLS-1$
+ v = props.remove(DDLConstants.NULL_VALUE_COUNT);
if (v != null) {
- c.setRadix(Integer.parseInt(v));
- }
-
- v = props.remove("NULL_VALUE_COUNT"); //$NON-NLS-1$
- if (v != null) {
c.setNullValues(Integer.parseInt(v));
}
- v = props.remove("DISTINCT_VALUES"); //$NON-NLS-1$
+ v = props.remove(DDLConstants.DISTINCT_VALUES);
if (v != null) {
c.setDistinctValues(Integer.parseInt(v));
}
}
void setCommonProperties(AbstractMetadataRecord c, Map<String, String> props) {
- String v = props.remove("UUID"); //$NON-NLS-1$
+ String v = props.remove(DDLConstants.UUID);
if (v != null) {
c.setUUID(v);
}
- v = props.remove("ANNOTATION"); //$NON-NLS-1$
+ v = props.remove(DDLConstants.ANNOTATION);
if (v != null) {
c.setAnnotation(v);
}
- v = props.remove("NAMEINSOURCE"); //$NON-NLS-1$
+ v = props.remove(DDLConstants.NAMEINSOURCE);
if (v != null) {
c.setNameInSource(v);
}
@@ -450,24 +459,24 @@
Map<String, String> props = table.getProperties();
setCommonProperties(table, props);
- String value = props.remove("MATERIALIZED"); //$NON-NLS-1$
+ String value = props.remove(DDLConstants.MATERIALIZED);
if (value != null) {
table.setMaterialized(isTrue(value));
}
- value = props.remove("MATERIALIZED_TABLE"); //$NON-NLS-1$
+ value = props.remove(DDLConstants.MATERIALIZED_TABLE);
if (value != null) {
Table mattable = new Table();
mattable.setName(value);
table.setMaterializedTable(mattable);
}
- value = props.remove("UPDATABLE"); //$NON-NLS-1$
+ value = props.remove(DDLConstants.UPDATABLE);
if (value != null) {
table.setSupportsUpdate(isTrue(value));
}
- value = props.remove("CARDINALITY"); //$NON-NLS-1$
+ value = props.remove(DDLConstants.CARDINALITY);
if (value != null) {
table.setCardinality(Integer.parseInt(value));
}
@@ -481,24 +490,22 @@
ArrayList<FunctionParameter> ins = new ArrayList<FunctionParameter>();
for (ProcedureParameter pp:proc.getParameters()) {
- if (pp.getType() != ProcedureParameter.Type.In) {
+ if (pp.getType() == ProcedureParameter.Type.InOut || pp.getType() == ProcedureParameter.Type.Out) {
throw new ParseException(QueryPlugin.Util.getString("SQLParser.function_in", proc.getName())); //$NON-NLS-1$
}
- FunctionParameter fp = new FunctionParameter(pp.getName(), pp.getDatatype().getName());
- fp.setVarArg(pp.isVarArg());
- ins.add(fp);
+ FunctionParameter fp = new FunctionParameter(pp.getName(), pp.getDatatype().getName(), pp.getAnnotation());
+ if (pp.getType() == ProcedureParameter.Type.In) {
+ fp.setVarArg(pp.isVarArg());
+ ins.add(fp);
+ } else {
+ method.setOutputParameter(fp);
+ }
}
method.setInputParameters(ins);
- List<Column> returnCols = proc.getResultSet().getColumns();
- if (returnCols != null && !returnCols.isEmpty()) {
- if (returnCols.size() > 1) {
- throw new ParseException(QueryPlugin.Util.getString("SQLParser.function_return", proc.getName())); //$NON-NLS-1$
- }
- Column c = returnCols.get(0);
- FunctionParameter fp = new FunctionParameter(c.getName(), c.getDatatype().getName());
- method.setOutputParameter(fp);
+ if (proc.getResultSet() != null || method.getOutputParameter() == null) {
+ throw new ParseException(QueryPlugin.Util.getString("SQLParser.function_return", proc.getName())); //$NON-NLS-1$
}
method.setAnnotation(proc.getAnnotation());
@@ -507,18 +514,18 @@
Map<String, String> props = proc.getProperties();
- String value = props.remove("CATEGORY"); //$NON-NLS-1$
+ String value = props.remove(DDLConstants.CATEGORY);
method.setCategory(value);
- value = props.remove("DETERMINISM"); //$NON-NLS-1$
+ value = props.remove(DDLConstants.DETERMINISM);
if (value != null) {
method.setDeterminism(FunctionMethod.Determinism.valueOf(value.toUpperCase()));
}
- value = props.remove("JAVA_CLASS"); //$NON-NLS-1$
+ value = props.remove(DDLConstants.JAVA_CLASS);
method.setInvocationClass(value);
- value = props.remove("JAVA_METHOD"); //$NON-NLS-1$
+ value = props.remove(DDLConstants.JAVA_METHOD);
method.setInvocationMethod(value);
for (String key:props.keySet()) {
@@ -568,21 +575,43 @@
}
}
- void addProcReturnColumn(MetadataFactory factory, Procedure proc, String name, ParsedDataType type) throws ParseException{
+ BaseColumn addProcColumn(MetadataFactory factory, Procedure proc, String name, ParsedDataType type, boolean rs) throws ParseException{
try {
- Column column = factory.addProcedureResultSetColumn(name, type.type, proc);
- if (type.length != null){
- column.setLength(type.length);
+ name = validateElementName(name);
+ BaseColumn column = null;
+ if (rs) {
+ column = factory.addProcedureResultSetColumn(name, type.type, proc);
+ } else {
+ boolean added = false;
+ for (ProcedureParameter pp : proc.getParameters()) {
+ if (pp.getType() == Type.ReturnValue) {
+ added = true;
+ if (pp.getDatatype() != factory.getDataTypes().get(type.type)) {
+ throw new ParseException(QueryPlugin.Util.getString("SQLParser.proc_type_conflict", proc.getName(), pp.getDatatype(), type.type)); //$NON-NLS-1$
+ }
+ }
+ }
+ if (!added) {
+ column = factory.addProcedureParameter(name, type.type, ProcedureParameter.Type.ReturnValue, proc);
+ }
}
- if (type.scale != null){
- column.setScale(type.scale);
- }
- if (type.precision != null){
- column.setPrecision(type.precision);
- }
+ setTypeInfo(type, column);
+ return column;
} catch (TranslatorException e){
throw new ParseException(e.getMessage());
}
+ }
+
+ void setTypeInfo(ParsedDataType type, BaseColumn column) {
+ if (type.length != null){
+ column.setLength(type.length);
+ }
+ if (type.scale != null){
+ column.setScale(type.scale);
+ }
+ if (type.precision != null){
+ column.setPrecision(type.precision);
+ }
}
static String resolvePropertyKey(MetadataFactory factory, String key) {
Modified: trunk/engine/src/main/java/org/teiid/query/resolver/ProcedureContainerResolver.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/resolver/ProcedureContainerResolver.java 2012-07-16 17:54:25 UTC (rev 4241)
+++ trunk/engine/src/main/java/org/teiid/query/resolver/ProcedureContainerResolver.java 2012-07-17 01:00:58 UTC (rev 4242)
@@ -49,6 +49,7 @@
import org.teiid.query.sql.lang.GroupContext;
import org.teiid.query.sql.lang.ProcedureContainer;
import org.teiid.query.sql.lang.SPParameter;
+import org.teiid.query.sql.lang.StoredProcedure;
import org.teiid.query.sql.proc.CreateProcedureCommand;
import org.teiid.query.sql.proc.TriggerAction;
import org.teiid.query.sql.symbol.ElementSymbol;
@@ -93,7 +94,7 @@
QueryParser parser = QueryParser.getQueryParser();
try {
- subCommand = parser.parseUpdateProcedure(plan);
+ subCommand = parser.parseProcedure(plan, !(procCommand instanceof StoredProcedure));
} catch(QueryParserException e) {
throw new QueryResolverException(QueryPlugin.Event.TEIID30060, e, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30060, group, procCommand.getClass().getSimpleName()));
}
Modified: trunk/engine/src/main/java/org/teiid/query/validator/ValidatorReport.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/validator/ValidatorReport.java 2012-07-16 17:54:25 UTC (rev 4241)
+++ trunk/engine/src/main/java/org/teiid/query/validator/ValidatorReport.java 2012-07-17 01:00:58 UTC (rev 4242)
@@ -38,6 +38,10 @@
public ValidatorReport() {
super(VALIDATOR_REPORT);
}
+
+ public ValidatorReport(String name) {
+ super(name);
+ }
public void collectInvalidObjects(Collection<LanguageObject> invalidObjects) {
for (ValidatorFailure failure : getItems()) {
Modified: trunk/engine/src/main/javacc/org/teiid/query/parser/SQLParser.jj
===================================================================
--- trunk/engine/src/main/javacc/org/teiid/query/parser/SQLParser.jj 2012-07-16 17:54:25 UTC (rev 4241)
+++ trunk/engine/src/main/javacc/org/teiid/query/parser/SQLParser.jj 2012-07-17 01:00:58 UTC (rev 4242)
@@ -487,8 +487,9 @@
Command command = null;
}
{
- (LOOKAHEAD(2) command = updateProcedure(info) |
- command = userCommand(info)
+ (LOOKAHEAD (2) command = createProcedure(info) |
+ command = forEachRowTriggerAction(info) |
+ command = userCommand(info)
)
[<SEMICOLON>]
<EOF>
@@ -497,19 +498,6 @@
}
}
-Command updateProcedure(ParseInfo info) :
-{
- Command command = null;
-}
-{
- (command = createProcedure(info) |
- command = forEachRowTriggerAction(info))
- <EOF>
- {
- return command;
- }
-}
-
Command createTrigger(ParseInfo info) :
{
String target = null;
@@ -1079,6 +1067,21 @@
}
}
+CreateProcedureCommand procedureBodyCommand(ParseInfo info) :
+{
+ CreateProcedureCommand procCmd =
+ new CreateProcedureCommand();
+ Statement stmt = null;
+}
+{
+ [LOOKAHEAD(2) <CREATE> [<VIRTUAL>] <PROCEDURE>]
+ stmt = statement(info)
+ {
+ procCmd.setBlock(asBlock(stmt));
+ return procCmd;
+ }
+}
+
/**
* Parse error statement
* @throws ParseException if parsing failed
@@ -4116,7 +4119,8 @@
String procName = null;
CreateProcedureCommand procCmd = new CreateProcedureCommand();
Statement stmt = null;
- ParsedDataType returnDataType = null;
+ ParsedDataType returnDataType = null;
+ Token comment = null;
}
{
<CREATE> [<VIRTUAL> | <FOREIGN> {virtual = false;}] (<PROCEDURE> | <FUNCTION> {function = true;})
@@ -4135,35 +4139,32 @@
(<COMMA> procedureParameter(factory, proc))*
<RPAREN>
- <RETURNS> (procedureReturn(factory, proc) | returnDataType = parseDataType())
-
+ [<RETURNS> (([<TABLE>] <LPAREN>
+ procedureRsColumn(factory, proc)
+ (<COMMA> procedureRsColumn(factory, proc))*
+ <RPAREN>)
+ |
+ returnDataType = parseDataType())
+ ]
[ optionsClause(proc, factory)
{
setProcedureOptions(proc);
}
]
- [<AS>
+ [<AS> { comment = getToken(1).specialToken; }
stmt = statement(info)])
{
proc.setVirtual(virtual);
proc.setFunction(function);
if (stmt != null){
- proc.setQueryPlan("CREATE VIRTUAL PROCEDURE "+asBlock(stmt).toString());
+ if (function || !virtual) {
+ throw new ParseException(QueryPlugin.Util.getString("SQLParser.function_def", procName));
+ }
+ proc.setQueryPlan((comment != null?comment.image+" ":"") + stmt.toString());
}
- if (!function) {
- if (virtual && stmt == null){
- throw new ParseException(QueryPlugin.Util.getString("SQLParser.virtual_proc_def", procName));
- }
- if (!virtual && stmt != null){
- throw new ParseException(QueryPlugin.Util.getString("SQLParser.foreign_proc_def", procName));
- }
- } else if (stmt != null) {
- throw new ParseException(QueryPlugin.Util.getString("SQLParser.function_def", procName));
- }
-
if (returnDataType != null){
- addProcReturnColumn(factory, proc, "return", returnDataType);
+ addProcColumn(factory, proc, "return", returnDataType, false);
}
if (function) {
replaceProcedureWithFunction(factory, proc);
@@ -4185,44 +4186,55 @@
|(<INOUT> {ppType = ProcedureParameter.Type.InOut;}))]
name = id()
type = parseDataType()
+ [nonReserved("RESULT")
+ {
+ if (ppType != ProcedureParameter.Type.Out) {
+ throw new ParseException(QueryPlugin.Util.getString("SQLParser.param_out", proc.getName(), name));
+ }
+ ppType = ProcedureParameter.Type.ReturnValue;
+ }
+ ]
{
try {
- param = factory.addProcedureParameter(name, type.type, ppType, proc);
- if (type.length != null){
- param.setLength(type.length);
- }
- if (type.scale != null){
- param.setScale(type.scale);
- }
- if (type.precision != null){
- param.setPrecision(type.precision);
- }
+ param = factory.addProcedureParameter(validateElementName(name), type.type, ppType, proc);
+ setTypeInfo(type, param);
} catch (TranslatorException e){
throw new ParseException(e.getMessage());
}
- }
+ }
+ [optionsClause(param, factory)
+ {
+ setColumnOptions(param);
+ }
+ ]
}
-void procedureReturn(MetadataFactory factory, Procedure proc) :
+void procedureRsColumn(MetadataFactory factory, Procedure proc) :
{
String name = null;
+}
+{
+ name = id()
+ procedureColumn(factory, proc, name, true)
+}
+
+void procedureColumn(MetadataFactory factory, Procedure proc, String name, boolean rs) :
+{
ParsedDataType type = null;
+ boolean notNull = false;
+ BaseColumn column = null;
}
{
- <LPAREN>
- name = id()
type = parseDataType()
{
- addProcReturnColumn(factory, proc, name, type);
+ column = addProcColumn(factory, proc, name, type, rs);
}
- (<COMMA>
- name = id()
- type = parseDataType()
- {
- addProcReturnColumn(factory, proc, name, type);
- }
- )*
- <RPAREN>
+ [<NOT> <NULL> { notNull = true; }]
+ [optionsClause(column, factory)
+ {
+ setColumnOptions(column);
+ }
+ ]
}
void createTable(MetadataFactory factory) :
@@ -4231,6 +4243,7 @@
String tableName = null;
boolean view = false;
Command query = null;
+ Token comment = null;
}
{
<CREATE> (<FOREIGN> <TABLE> | [<VIRTUAL>] nonReserved("VIEW") {view = true;})
@@ -4259,14 +4272,14 @@
setTableOptions(table);
}
]
- [<AS> query = queryExpression(new ParseInfo())]
+ [<AS> { comment = getToken(1).specialToken; } query = queryExpression(new ParseInfo())]
{
- if (view){
- if (query == null) {
- throw new ParseException(QueryPlugin.Util.getString("SQLParser.view_def", tableName));
+ if (query != null){
+ if (!view) {
+ throw new ParseException(QueryPlugin.Util.getString("SQLParser.view_def", tableName));
}
- table.setSelectTransformation(query.toString());
- }
+ table.setSelectTransformation((comment != null?comment.image+" ":"") + query.toString());
+ }
if (!table.supportsUpdate() && table.getColumns() != null) {
for (Column c : table.getColumns()) {
c.setUpdatable(false);
@@ -4419,15 +4432,7 @@
try{
column = factory.addColumn(validateElementName(element), type.type, table);
column.setUpdatable(true);
- if (type.length != null){
- column.setLength(type.length);
- }
- if (type.scale != null){
- column.setScale(type.scale);
- }
- if (type.precision != null){
- column.setPrecision(type.precision);
- }
+ setTypeInfo(type, column);
columnName.add(element);
}catch(TranslatorException e){
throw new ParseException(e.getMessage());
Modified: trunk/engine/src/main/resources/org/teiid/query/i18n.properties
===================================================================
--- trunk/engine/src/main/resources/org/teiid/query/i18n.properties 2012-07-16 17:54:25 UTC (rev 4241)
+++ trunk/engine/src/main/resources/org/teiid/query/i18n.properties 2012-07-17 01:00:58 UTC (rev 4242)
@@ -257,14 +257,12 @@
SQLParser.Invalid_short_name=Invalid simple identifier format: [{0}]
SQLParser.expected_non_reserved=Expected non-reserved word {0}, but was {1}.
SQLParser.invalid_window=Cannot window a non-aggregate expression {0}.
-SQLParser.virtual_proc_def=Virtual procedure {0} must define the procedure after an ''AS'' keyword.
-SQLParser.foreign_proc_def=Foreign procedure {0} must not define a procedure body.
-SQLParser.function_def=Function {0} must not define a function body.
-SQLParser.view_def=Virtual view {0} must be defined with a query expression.
+SQLParser.function_def=Function or foreign procedure {0} cannot define a body.
+SQLParser.view_def=Foreign table {0} cannot be defined by a query expression.
SQLParser.pk_exists=Primary Key is already defined on {0}
SQLParser.no_column=Column name {0} not found on table {1}
-SQLParser.function_return=Function {0} is not valid. Functions can only return a single parameter.
-SQLParser.function_in=Functions {0} is not valid. Functions can only support 'In' parameters.
+SQLParser.function_return=Function {0} is not valid. Functions can not support result set return parameters, and must have a scalar return parameter.
+SQLParser.function_in=Functions {0} is not valid. Functions can only support 'In/RESULT' parameters.
SystemSource.array_length_desc=Get the length of the given array value
SystemSource.array_param1=Array
SystemSource.array_length_result=The array length
@@ -993,7 +991,7 @@
TEIID31076=Virtual procedure {0} is only allowed to be defined on VIRTUAL model; {1} is defined as PHYSICAL model.
TEIID31077=Source Stored procedure {0} is only allowed to be defined on PHYSICAL model; {1} is defined as VIRTUAL model.
TEIID31078=Pushdown function {0} must be defined on PHYSICAL model; {1} is VIRTUAL model.
-TEIID31079=View {0} did not define transformation after "AS select ..."
+TEIID31079=View {0} is not defined by a query expression.
TEIID31080=View {0} validation error: {1}
TEIID31081=Virtual Procedure {0} did not specify any statements as procedure block in model {0}
TEIID31082={0}.{1} is now "incomplete", because model "{2}" can not retrieve metadata. Please deploy the necessary DataSources.
@@ -1025,4 +1023,9 @@
TEIID31103=There are different sources with the name {0} in {1}.{2}
TEIID31104=Recursion limit of {0} reached.
-TEIID31105=Returing warning to client: {0}
\ No newline at end of file
+TEIID31105=Returing warning to client: {0}
+TEIID31106=Duplicate parameter {1} defined on {0}
+TEIID31107=Procedure {0} can only have 1 RESULT/return value
+
+SQLParser.proc_type_conflict=Result type {1} conflicts with return type {2} for procedure {0}
+SQLParser.param_out=Procedure {0} RESULT param {1} must be of type OUT.
\ No newline at end of file
Modified: trunk/engine/src/test/java/org/teiid/query/function/metadata/TestSystemSource.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/query/function/metadata/TestSystemSource.java 2012-07-16 17:54:25 UTC (rev 4241)
+++ trunk/engine/src/test/java/org/teiid/query/function/metadata/TestSystemSource.java 2012-07-17 01:00:58 UTC (rev 4242)
@@ -22,29 +22,17 @@
package org.teiid.query.function.metadata;
-import org.teiid.query.function.metadata.FunctionMetadataValidator;
-import org.teiid.query.function.source.*;
-import org.teiid.query.report.*;
+import static org.junit.Assert.*;
-import junit.framework.*;
+import org.junit.Test;
+import org.teiid.query.function.source.SystemSource;
+import org.teiid.query.validator.ValidatorReport;
-public class TestSystemSource extends TestCase {
+public class TestSystemSource {
- // ################################## FRAMEWORK ################################
-
- public TestSystemSource(String name) {
- super(name);
- }
-
- // ################################## TEST HELPERS ################################
-
-
-
- // ################################## ACTUAL TESTS ################################
-
- public void testValidate() {
+ @Test public void testValidate() {
SystemSource source = new SystemSource(false);
- ActivityReport report = new ActivityReport("Test Report"); //$NON-NLS-1$
+ ValidatorReport report = new ValidatorReport("Test Report"); //$NON-NLS-1$
FunctionMetadataValidator.validateFunctionMethods(source.getFunctionMethods(), report);
if(report.hasItems()) {
Modified: trunk/engine/src/test/java/org/teiid/query/metadata/TestDDLStringVisitor.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/query/metadata/TestDDLStringVisitor.java 2012-07-16 17:54:25 UTC (rev 4241)
+++ trunk/engine/src/test/java/org/teiid/query/metadata/TestDDLStringVisitor.java 2012-07-17 01:00:58 UTC (rev 4242)
@@ -21,7 +21,7 @@
*/
package org.teiid.query.metadata;
-import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.*;
import java.util.Arrays;
import java.util.HashMap;
@@ -29,11 +29,11 @@
import java.util.Properties;
import org.junit.Test;
-import org.teiid.metadata.BaseColumn.NullType;
import org.teiid.metadata.Column;
import org.teiid.metadata.MetadataFactory;
import org.teiid.metadata.Schema;
import org.teiid.metadata.Table;
+import org.teiid.metadata.BaseColumn.NullType;
import org.teiid.query.parser.ParseException;
import org.teiid.query.parser.TestDDLParser;
@@ -168,9 +168,9 @@
"AS\n" +
"SELECT * FROM PM1.G1;\n" +
"\n" +
- "CREATE VIRTUAL PROCEDURE FOO(IN P1 integer) RETURNS (e1 integer, e2 string)\n" +
+ "CREATE VIRTUAL PROCEDURE FOO(IN P1 integer) RETURNS TABLE (e1 integer, e2 string)\n" +
"AS\n" +
- "SELECT * FROM PM1.G1;\n";
+ "SELECT * FROM PM1.G1;";
helpTest(ddl, expected);
}
@@ -217,7 +217,7 @@
"RETURNS (r1 varchar, r2 decimal)" +
"OPTIONS(RANDOM 'any', UUID 'uuid', NAMEINSOURCE 'nis', ANNOTATION 'desc', UPDATECOUNT '2');";
- String expected = "CREATE FOREIGN PROCEDURE myProc(OUT p1 boolean, IN p2 string, INOUT p3 bigdecimal) RETURNS (r1 string, r2 bigdecimal)\n" +
+ String expected = "CREATE FOREIGN PROCEDURE myProc(OUT p1 boolean, IN p2 string, INOUT p3 bigdecimal) RETURNS TABLE (r1 string, r2 bigdecimal)\n" +
"OPTIONS (UUID 'uuid', ANNOTATION 'desc', NAMEINSOURCE 'nis', UPDATECOUNT 2, RANDOM 'any')";
helpTest(ddl, expected);
}
Modified: trunk/engine/src/test/java/org/teiid/query/metadata/TestMetadataValidator.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/query/metadata/TestMetadataValidator.java 2012-07-16 17:54:25 UTC (rev 4241)
+++ trunk/engine/src/test/java/org/teiid/query/metadata/TestMetadataValidator.java 2012-07-17 01:00:58 UTC (rev 4242)
@@ -56,7 +56,7 @@
this.vdb.addAttchment(TransformationMetadata.class, metadata);
}
- private ModelMetaData buildModel(String modelName, boolean physical, VDBMetaData vdb, MetadataStore store, String ddl) throws Exception {
+ private static ModelMetaData buildModel(String modelName, boolean physical, VDBMetaData vdb, MetadataStore store, String ddl) throws Exception {
ModelMetaData model = new ModelMetaData();
model.setName(modelName);
model.setModelType(physical?Model.Type.PHYSICAL:Model.Type.VIRTUAL);
@@ -130,6 +130,22 @@
assertTrue(printError(report), report.hasItems());
}
+ @Test public void testProcWithMultipleReturn() throws Exception {
+ String ddl = "create foreign procedure x (out param1 string result, out param2 string result); ";
+ buildModel("pm1", true, this.vdb, this.store,ddl);
+ buildTransformationMetadata();
+ ValidatorReport report = new MetadataValidator().validate(vdb, store);
+ assertTrue(printError(report), report.hasItems());
+ }
+
+ @Test public void testProcWithDuplicateParam() throws Exception {
+ String ddl = "create foreign procedure x (out param1 string, out param1 string); ";
+ buildModel("pm1", true, this.vdb, this.store,ddl);
+ buildTransformationMetadata();
+ ValidatorReport report = new MetadataValidator().validate(vdb, store);
+ assertTrue(printError(report), report.hasItems());
+ }
+
@Test public void testProcMetadata() throws Exception {
String ddl = "create virtual procedure proc1(IN e1 varchar) RETURNS (e1 integer, e2 varchar(12)) AS begin create local temporary table x (e1 integer, e2 varchar); select * from x; end;" +
"create virtual procedure proc2(IN e1 varchar) RETURNS (e1 integer, e2 varchar(12)) AS select x.* from (exec proc1('a')) as X; ";
Modified: trunk/engine/src/test/java/org/teiid/query/parser/TestDDLParser.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/query/parser/TestDDLParser.java 2012-07-16 17:54:25 UTC (rev 4241)
+++ trunk/engine/src/test/java/org/teiid/query/parser/TestDDLParser.java 2012-07-17 01:00:58 UTC (rev 4242)
@@ -317,8 +317,8 @@
}
@Test(expected=ParseException.class)
- public void testViewWithoutPlan() throws Exception {
- String ddl = "CREATE View G1( e1 integer, e2 varchar)";
+ public void testTableWithPlan() throws Exception {
+ String ddl = "CREATE foreign table G1 as select 1";
MetadataStore mds = new MetadataStore();
MetadataFactory mf = new MetadataFactory(null, 1, "model", getDataTypes(), new Properties(), null);
parser.parseDDL(mf,ddl);
@@ -347,7 +347,7 @@
Map<String, Procedure> procedureMap = s.getProcedures();
Procedure p = procedureMap.get("FOO");
assertNotNull(p);
- assertEquals("CREATE VIRTUAL PROCEDURE BEGIN\nSELECT * FROM PM1.G1;\nEND", p.getQueryPlan());
+ assertEquals("SELECT * FROM PM1.G1;", p.getQueryPlan());
}
@@ -490,7 +490,7 @@
assertTrue( fm.getInputParameters().get(0).isVarArg());
}
- @Test(expected=ParseException.class) public void testInvalidProcedurenBody() throws Exception {
+ @Test(expected=ParseException.class) public void testInvalidProcedureBody() throws Exception {
String ddl = "CREATE FOREIGN PROCEDURE SourceFunc(flag boolean) RETURNS varchar AS SELECT 'a';";
Schema s = helpParse(ddl, "model").getSchema();
@@ -504,7 +504,7 @@
String ddl = "CREATE VIRTUAL PROCEDURE myProc(OUT p1 boolean, p2 varchar, INOUT p3 decimal) " +
"RETURNS (r1 varchar, r2 decimal) " +
"OPTIONS(RANDOM 'any', UUID 'uuid', NAMEINSOURCE 'nis', ANNOTATION 'desc', UPDATECOUNT '2') " +
- "AS BEGIN select * from foo; END";
+ "AS /*+ cache */ BEGIN select * from foo; END";
Schema s = helpParse(ddl, "model").getSchema();
@@ -541,7 +541,7 @@
assertEquals(2, proc.getUpdateCount());
assertEquals("any", proc.getProperties().get("RANDOM"));
- assertEquals("CREATE VIRTUAL PROCEDURE BEGIN\nSELECT * FROM foo;\nEND", proc.getQueryPlan());
+ assertEquals("/*+ cache */ BEGIN\nSELECT * FROM foo;\nEND", proc.getQueryPlan());
}
Modified: trunk/engine/src/test/java/org/teiid/query/parser/TestParseAlter.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/query/parser/TestParseAlter.java 2012-07-16 17:54:25 UTC (rev 4241)
+++ trunk/engine/src/test/java/org/teiid/query/parser/TestParseAlter.java 2012-07-17 01:00:58 UTC (rev 4242)
@@ -53,7 +53,7 @@
AlterTrigger alterTrigger = new AlterTrigger();
alterTrigger.setTarget(new GroupSymbol("x"));
alterTrigger.setEvent(TriggerEvent.UPDATE);
- alterTrigger.setDefinition((TriggerAction) QueryParser.getQueryParser().parseUpdateProcedure("for each row begin end"));
+ alterTrigger.setDefinition((TriggerAction) QueryParser.getQueryParser().parseProcedure("for each row begin end", true));
helpTest("alter trigger on x instead of update as for each row begin end", "ALTER TRIGGER ON x INSTEAD OF UPDATE AS\nFOR EACH ROW\nBEGIN ATOMIC\nEND", alterTrigger);
}
@@ -70,7 +70,7 @@
alterTrigger.setCreate(true);
alterTrigger.setTarget(new GroupSymbol("x"));
alterTrigger.setEvent(TriggerEvent.UPDATE);
- alterTrigger.setDefinition((TriggerAction) QueryParser.getQueryParser().parseUpdateProcedure("for each row begin end"));
+ alterTrigger.setDefinition((TriggerAction) QueryParser.getQueryParser().parseProcedure("for each row begin end", true));
helpTest("create trigger on x instead of update as for each row begin end", "CREATE TRIGGER ON x INSTEAD OF UPDATE AS\nFOR EACH ROW\nBEGIN ATOMIC\nEND", alterTrigger);
}
Modified: trunk/engine/src/test/java/org/teiid/query/resolver/TestProcedureResolving.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/query/resolver/TestProcedureResolving.java 2012-07-16 17:54:25 UTC (rev 4241)
+++ trunk/engine/src/test/java/org/teiid/query/resolver/TestProcedureResolving.java 2012-07-17 01:00:58 UTC (rev 4242)
@@ -46,6 +46,7 @@
import org.teiid.query.sql.proc.CommandStatement;
import org.teiid.query.sql.proc.CreateProcedureCommand;
import org.teiid.query.sql.proc.LoopStatement;
+import org.teiid.query.sql.proc.TriggerAction;
import org.teiid.query.sql.symbol.ElementSymbol;
import org.teiid.query.sql.symbol.Expression;
import org.teiid.query.sql.visitor.CommandCollectorVisitor;
@@ -75,7 +76,7 @@
}
@Test public void testDefect13029_CorrectlySetUpdateProcedureTempGroupIDs() throws Exception {
- StringBuffer proc = new StringBuffer("CREATE VIRTUAL PROCEDURE") //$NON-NLS-1$
+ StringBuffer proc = new StringBuffer("FOR EACH ROW") //$NON-NLS-1$
.append("\nBEGIN") //$NON-NLS-1$
.append("\nDECLARE string var1;") //$NON-NLS-1$
.append("\nvar1 = '';") //$NON-NLS-1$
@@ -109,19 +110,19 @@
assertNull(tempIDs.get("LOOPCURSOR2")); //$NON-NLS-1$
}
- private CreateProcedureCommand helpResolveUpdateProcedure(String procedure, String userUpdateStr, Table.TriggerEvent procedureType) throws QueryParserException, QueryResolverException, TeiidComponentException {
+ private TriggerAction helpResolveUpdateProcedure(String procedure, String userUpdateStr, Table.TriggerEvent procedureType) throws QueryParserException, QueryResolverException, TeiidComponentException {
QueryMetadataInterface metadata = RealMetadataFactory.exampleUpdateProc(procedureType, procedure);
- return resolveProcedure(userUpdateStr, metadata);
+ return (TriggerAction) resolveProcedure(userUpdateStr, metadata);
}
- private CreateProcedureCommand resolveProcedure(String userUpdateStr,
+ private Command resolveProcedure(String userUpdateStr,
QueryMetadataInterface metadata) throws QueryParserException,
QueryResolverException, TeiidComponentException,
QueryMetadataException {
ProcedureContainer userCommand = (ProcedureContainer)QueryParser.getQueryParser().parseCommand(userUpdateStr);
QueryResolver.resolveCommand(userCommand, metadata);
metadata = new TempMetadataAdapter(metadata, userCommand.getTemporaryMetadata());
- return (CreateProcedureCommand)QueryResolver.expandCommand(userCommand, metadata, null);
+ return QueryResolver.expandCommand(userCommand, metadata, null);
}
private void helpResolveException(String userUpdateStr, QueryMetadataInterface metadata, String msg) throws QueryParserException, TeiidComponentException {
@@ -133,7 +134,7 @@
}
}
- private CreateProcedureCommand helpResolve(String userUpdateStr, QueryMetadataInterface metadata) throws QueryParserException, QueryResolverException, TeiidComponentException {
+ private Command helpResolve(String userUpdateStr, QueryMetadataInterface metadata) throws QueryParserException, QueryResolverException, TeiidComponentException {
return resolveProcedure(userUpdateStr, metadata);
}
@@ -141,7 +142,7 @@
* Constants will now auto resolve if they are consistently representable in the target type
*/
@Test public void testDefect23257() throws Exception{
- CreateProcedureCommand command = helpResolve("EXEC pm6.vsp59()", RealMetadataFactory.example1Cached()); //$NON-NLS-1$
+ CreateProcedureCommand command = (CreateProcedureCommand) helpResolve("EXEC pm6.vsp59()", RealMetadataFactory.example1Cached()); //$NON-NLS-1$
CommandStatement cs = (CommandStatement)command.getBlock().getStatements().get(1);
@@ -151,7 +152,7 @@
}
@Test public void testProcedureScoping() throws Exception {
- StringBuffer proc = new StringBuffer("CREATE PROCEDURE") //$NON-NLS-1$
+ StringBuffer proc = new StringBuffer("FOR EACH ROW") //$NON-NLS-1$
.append("\nBEGIN") //$NON-NLS-1$
//note that this declare takes presedense over the proc INPUTS.e1 and CHANGING.e1 variables
.append("\n declare integer e1 = 1;") //$NON-NLS-1$
@@ -165,7 +166,7 @@
String userUpdateStr = "UPDATE vm1.g1 SET e1='x'"; //$NON-NLS-1$
- CreateProcedureCommand command = helpResolveUpdateProcedure(proc.toString(), userUpdateStr,
+ TriggerAction command = helpResolveUpdateProcedure(proc.toString(), userUpdateStr,
Table.TriggerEvent.UPDATE);
Block block = command.getBlock();
@@ -186,7 +187,7 @@
// variable resolution, variable used in if statement, variable compared against
// different datatype element
@Test public void testCreateUpdateProcedure4() {
- String procedure = "CREATE PROCEDURE "; //$NON-NLS-1$
+ String procedure = "FOR EACH ROW "; //$NON-NLS-1$
procedure = procedure + "BEGIN\n"; //$NON-NLS-1$
procedure = procedure + "DECLARE boolean var1;\n"; //$NON-NLS-1$
procedure = procedure + "if(var1 =1);\n"; //$NON-NLS-1$
@@ -201,7 +202,7 @@
// variable resolution, variable used in if statement, invalid operation on variable
@Test public void testCreateUpdateProcedure5() {
- String procedure = "CREATE PROCEDURE "; //$NON-NLS-1$
+ String procedure = "FOR EACH ROW "; //$NON-NLS-1$
procedure = procedure + "BEGIN\n"; //$NON-NLS-1$
procedure = procedure + "DECLARE boolean var1;\n"; //$NON-NLS-1$
procedure = procedure + "var1 = var1 + var1;\n"; //$NON-NLS-1$
@@ -217,7 +218,7 @@
// variable resolution, variables declared in different blocks local variables
// should not override
@Test public void testCreateUpdateProcedure6() {
- String procedure = "CREATE PROCEDURE "; //$NON-NLS-1$
+ String procedure = "FOR EACH ROW "; //$NON-NLS-1$
procedure = procedure + "BEGIN\n"; //$NON-NLS-1$
procedure = procedure + "DECLARE integer var1;\n"; //$NON-NLS-1$
procedure = procedure + "if(var1 =1)\n"; //$NON-NLS-1$
@@ -236,7 +237,7 @@
// variable resolution, variables declared in different blocks local variables
// inner block using outer block variables
@Test public void testCreateUpdateProcedure7() throws Exception {
- String procedure = "CREATE PROCEDURE "; //$NON-NLS-1$
+ String procedure = "FOR EACH ROW "; //$NON-NLS-1$
procedure = procedure + "BEGIN\n"; //$NON-NLS-1$
procedure = procedure + "DECLARE integer var1;\n"; //$NON-NLS-1$
procedure = procedure + "if(var1 =1)\n"; //$NON-NLS-1$
@@ -255,7 +256,7 @@
// variable resolution, variables declared in different blocks local variables
// outer block cannot use inner block variables
@Test public void testCreateUpdateProcedure8() {
- String procedure = "CREATE PROCEDURE "; //$NON-NLS-1$
+ String procedure = "FOR EACH ROW "; //$NON-NLS-1$
procedure = procedure + "BEGIN\n"; //$NON-NLS-1$
procedure = procedure + "DECLARE integer var1;\n"; //$NON-NLS-1$
procedure = procedure + "if(var1 =1)\n"; //$NON-NLS-1$
@@ -275,7 +276,7 @@
// variable resolution, variables declared in different blocks local variables
// should override, outer block variables still valid afetr inner block is declared
@Test public void testCreateUpdateProcedure9() {
- String procedure = "CREATE PROCEDURE "; //$NON-NLS-1$
+ String procedure = "FOR EACH ROW "; //$NON-NLS-1$
procedure = procedure + "BEGIN\n"; //$NON-NLS-1$
procedure = procedure + "DECLARE integer var1;\n"; //$NON-NLS-1$
procedure = procedure + "if(var1 =1)\n"; //$NON-NLS-1$
@@ -294,7 +295,7 @@
// using declare variable that has parts
@Test public void testCreateUpdateProcedure24() {
- String procedure = "CREATE PROCEDURE "; //$NON-NLS-1$
+ String procedure = "FOR EACH ROW "; //$NON-NLS-1$
procedure = procedure + "BEGIN\n"; //$NON-NLS-1$
procedure = procedure + "DECLARE integer var2.var1;\n"; //$NON-NLS-1$
procedure = procedure + "END\n"; //$NON-NLS-1$
@@ -307,7 +308,7 @@
// using declare variable is qualified
@Test public void testCreateUpdateProcedure26() throws Exception {
- String procedure = "CREATE PROCEDURE "; //$NON-NLS-1$
+ String procedure = "FOR EACH ROW "; //$NON-NLS-1$
procedure = procedure + "BEGIN\n"; //$NON-NLS-1$
procedure = procedure + "DECLARE integer VARIABLES.var1;\n"; //$NON-NLS-1$
procedure = procedure + "END\n"; //$NON-NLS-1$
@@ -320,7 +321,7 @@
// using declare variable is qualified but has more parts
@Test public void testCreateUpdateProcedure27() {
- String procedure = "CREATE PROCEDURE "; //$NON-NLS-1$
+ String procedure = "FOR EACH ROW "; //$NON-NLS-1$
procedure = procedure + "BEGIN\n"; //$NON-NLS-1$
procedure = procedure + "DECLARE integer VARIABLES.var1.var2;\n"; //$NON-NLS-1$
procedure = procedure + "END\n"; //$NON-NLS-1$
@@ -333,7 +334,7 @@
// using a variable that has not been declared in an assignment stmt
@Test public void testCreateUpdateProcedure28() {
- String procedure = "CREATE PROCEDURE "; //$NON-NLS-1$
+ String procedure = "FOR EACH ROW "; //$NON-NLS-1$
procedure = procedure + "BEGIN\n"; //$NON-NLS-1$
procedure = procedure + "var1 = Select pm1.g1.e2 from pm1.g1;\n"; //$NON-NLS-1$
procedure = procedure + "END\n"; //$NON-NLS-1$
@@ -346,7 +347,7 @@
// using a variable that has not been declared in an assignment stmt
@Test public void testCreateUpdateProcedure29() {
- String procedure = "CREATE PROCEDURE "; //$NON-NLS-1$
+ String procedure = "FOR EACH ROW "; //$NON-NLS-1$
procedure = procedure + "BEGIN\n"; //$NON-NLS-1$
procedure = procedure + "var1 = 1;\n"; //$NON-NLS-1$
procedure = procedure + "END\n"; //$NON-NLS-1$
@@ -359,7 +360,7 @@
// using invalid function in assignment expr
@Test public void testCreateUpdateProcedure30() {
- String procedure = "CREATE PROCEDURE "; //$NON-NLS-1$
+ String procedure = "FOR EACH ROW "; //$NON-NLS-1$
procedure = procedure + "BEGIN\n"; //$NON-NLS-1$
procedure = procedure + "Declare integer var1;\n"; //$NON-NLS-1$
procedure = procedure + "var1 = 'x' + ROWS_UPDATED;\n"; //$NON-NLS-1$
@@ -373,7 +374,7 @@
// using invalid function in assignment expr
@Test public void testCreateUpdateProcedure31() {
- String procedure = "CREATE PROCEDURE "; //$NON-NLS-1$
+ String procedure = "FOR EACH ROW "; //$NON-NLS-1$
procedure = procedure + "BEGIN\n"; //$NON-NLS-1$
procedure = procedure + "Declare integer var1;\n"; //$NON-NLS-1$
procedure = procedure + "var1 = 'x' + ROWS_UPDATED;\n"; //$NON-NLS-1$
@@ -387,7 +388,7 @@
// using a variable being used inside a subcomand
@Test public void testCreateUpdateProcedure32() throws Exception {
- String procedure = "CREATE PROCEDURE "; //$NON-NLS-1$
+ String procedure = "FOR EACH ROW "; //$NON-NLS-1$
procedure = procedure + "BEGIN\n"; //$NON-NLS-1$
procedure = procedure + "Declare integer var1;\n"; //$NON-NLS-1$
procedure = procedure + "Select var1 from pm1.g1;\n"; //$NON-NLS-1$
@@ -403,7 +404,7 @@
// should override, outer block variables still valid afetr inner block is declared
// fails as variable being compared against incorrect type
@Test public void testCreateUpdateProcedure33() {
- String procedure = "CREATE PROCEDURE "; //$NON-NLS-1$
+ String procedure = "FOR EACH ROW "; //$NON-NLS-1$
procedure = procedure + "BEGIN\n"; //$NON-NLS-1$
procedure = procedure + "DECLARE integer var1;\n"; //$NON-NLS-1$
procedure = procedure + "if(var1 =1)\n"; //$NON-NLS-1$
@@ -422,7 +423,7 @@
// physical elements used on criteria of the if statement
@Test public void testCreateUpdateProcedure34() {
- String procedure = "CREATE PROCEDURE "; //$NON-NLS-1$
+ String procedure = "FOR EACH ROW "; //$NON-NLS-1$
procedure = procedure + "BEGIN\n"; //$NON-NLS-1$
procedure = procedure + "DECLARE integer var1;\n"; //$NON-NLS-1$
procedure = procedure + "if(pm1.g1.e2 =1 and var1=1)\n"; //$NON-NLS-1$
@@ -439,7 +440,7 @@
// physical elements used on criteria of the if statement
@Test public void testCreateUpdateProcedure36() {
- String procedure = "CREATE PROCEDURE "; //$NON-NLS-1$
+ String procedure = "FOR EACH ROW "; //$NON-NLS-1$
procedure = procedure + "BEGIN\n"; //$NON-NLS-1$
procedure = procedure + "DECLARE integer var1;\n"; //$NON-NLS-1$
procedure = procedure + "if(pm1.g1.e2 =1 and var1=1)\n"; //$NON-NLS-1$
@@ -456,7 +457,7 @@
// physical elements used on criteria of the if statement
@Test public void testCreateUpdateProcedure39() {
- String procedure = "CREATE PROCEDURE "; //$NON-NLS-1$
+ String procedure = "FOR EACH ROW "; //$NON-NLS-1$
procedure = procedure + "BEGIN\n"; //$NON-NLS-1$
procedure = procedure + "DECLARE integer var1;\n"; //$NON-NLS-1$
procedure = procedure + "if(pm1.g1.e2 =1 and var1=1)\n"; //$NON-NLS-1$
@@ -474,7 +475,7 @@
// resolving AssignmentStatement, variable type and assigned type
// do not match and no implicit conversion available
@Test public void testCreateUpdateProcedure53() {
- String procedure = "CREATE PROCEDURE "; //$NON-NLS-1$
+ String procedure = "FOR EACH ROW "; //$NON-NLS-1$
procedure = procedure + "BEGIN\n"; //$NON-NLS-1$
procedure = procedure + "DECLARE integer var1;\n"; //$NON-NLS-1$
procedure = procedure + "var1 = INPUTS.e4;"; //$NON-NLS-1$
@@ -490,7 +491,7 @@
// resolving AssignmentStatement, variable type and assigned type
// do not match, but implicit conversion available
@Test public void testCreateUpdateProcedure54() throws Exception {
- String procedure = "CREATE PROCEDURE "; //$NON-NLS-1$
+ String procedure = "FOR EACH ROW "; //$NON-NLS-1$
procedure = procedure + "BEGIN\n"; //$NON-NLS-1$
procedure = procedure + "DECLARE string var1;\n"; //$NON-NLS-1$
procedure = procedure + "var1 = 1+1;"; //$NON-NLS-1$
@@ -504,7 +505,7 @@
@Test public void testDefect14912_CreateUpdateProcedure57_FunctionWithElementParamInAssignmentStatement() {
// Tests that the function params are resolved before the function for assignment statements
- String procedure = "CREATE PROCEDURE "; //$NON-NLS-1$
+ String procedure = "FOR EACH ROW "; //$NON-NLS-1$
procedure = procedure + "BEGIN\n"; //$NON-NLS-1$
procedure = procedure + "DECLARE string var1;\n"; //$NON-NLS-1$
procedure = procedure + "var1 = badFunction(badElement);"; //$NON-NLS-1$
@@ -519,7 +520,7 @@
// addresses Cases 4624. Before change to UpdateProcedureResolver,
// this case failed with assertion exception.
@Test public void testCase4624() {
- String procedure = "CREATE PROCEDURE "; //$NON-NLS-1$
+ String procedure = "FOR EACH ROW "; //$NON-NLS-1$
procedure = procedure + "BEGIN\n"; //$NON-NLS-1$
procedure = procedure + "DECLARE boolean var1;\n"; //$NON-NLS-1$
procedure = procedure + "var1 = {b'false'};\n"; //$NON-NLS-1$
@@ -581,7 +582,7 @@
//baseline test to ensure that a declare assignment cannot contain the declared variable
@Test public void testDeclareStatement() {
- String procedure = "CREATE PROCEDURE "; //$NON-NLS-1$
+ String procedure = "FOR EACH ROW "; //$NON-NLS-1$
procedure = procedure + "BEGIN\n"; //$NON-NLS-1$
procedure = procedure + "DECLARE integer VARIABLES.var1 = VARIABLES.var1;\n"; //$NON-NLS-1$
procedure = procedure + "ROWS_UPDATED =0;\n"; //$NON-NLS-1$
@@ -595,7 +596,7 @@
@Test public void testDynamicIntoInProc() throws Exception {
String userUpdateStr = "UPDATE vm1.g1 SET e1='x'"; //$NON-NLS-1$
- StringBuffer procedure = new StringBuffer("CREATE PROCEDURE ") //$NON-NLS-1$
+ StringBuffer procedure = new StringBuffer("FOR EACH ROW ") //$NON-NLS-1$
.append("BEGIN\n") //$NON-NLS-1$
.append("execute string 'SELECT e1, e2, e3, e4 FROM pm1.g2' as e1 string, e2 string, e3 string, e4 string INTO #myTempTable;\n") //$NON-NLS-1$
.append("select e1 from #myTempTable;\n") //$NON-NLS-1$
@@ -607,7 +608,7 @@
@Test public void testDynamicStatement() throws Exception {
String userUpdateStr = "UPDATE vm1.g1 SET e1='x'"; //$NON-NLS-1$
- StringBuffer procedure = new StringBuffer("CREATE PROCEDURE ") //$NON-NLS-1$
+ StringBuffer procedure = new StringBuffer("FOR EACH ROW ") //$NON-NLS-1$
.append("BEGIN\n") //$NON-NLS-1$
.append("execute string 'SELECT e1, e2, e3, e4 FROM pm1.g2';\n") //$NON-NLS-1$
.append("END\n"); //$NON-NLS-1$
@@ -618,7 +619,7 @@
@Test public void testDynamicStatementType() {
String userUpdateStr = "UPDATE vm1.g1 SET e1='x'"; //$NON-NLS-1$
- StringBuffer procedure = new StringBuffer("CREATE PROCEDURE ") //$NON-NLS-1$
+ StringBuffer procedure = new StringBuffer("FOR EACH ROW ") //$NON-NLS-1$
.append("BEGIN\n") //$NON-NLS-1$
.append("DECLARE object VARIABLES.X = null;\n") //$NON-NLS-1$
.append("execute string VARIABLES.X;\n") //$NON-NLS-1$
@@ -629,7 +630,7 @@
// variable resolution
@Test public void testCreateUpdateProcedure1() throws Exception {
- String procedure = "CREATE PROCEDURE "; //$NON-NLS-1$
+ String procedure = "FOR EACH ROW "; //$NON-NLS-1$
procedure = procedure + "BEGIN\n"; //$NON-NLS-1$
procedure = procedure + "DECLARE integer var1;\n"; //$NON-NLS-1$
procedure = procedure + "var1 = Select pm1.g1.e2 from pm1.g1;\n"; //$NON-NLS-1$
@@ -644,7 +645,7 @@
// variable resolution, variable used in if statement
@Test public void testCreateUpdateProcedure3() throws Exception {
- String procedure = "CREATE PROCEDURE "; //$NON-NLS-1$
+ String procedure = "FOR EACH ROW "; //$NON-NLS-1$
procedure = procedure + "BEGIN\n"; //$NON-NLS-1$
procedure = procedure + "DECLARE integer var1;\n"; //$NON-NLS-1$
procedure = procedure + "if(var1 =1)\n"; //$NON-NLS-1$
@@ -659,7 +660,7 @@
}
@Test public void testSelectIntoInProc() throws Exception {
- StringBuffer procedure = new StringBuffer("CREATE PROCEDURE ") //$NON-NLS-1$
+ StringBuffer procedure = new StringBuffer("FOR EACH ROW ") //$NON-NLS-1$
.append("BEGIN\n") //$NON-NLS-1$
.append("SELECT e1, e2, e3, e4 INTO pm1.g1 FROM pm1.g2;\n") //$NON-NLS-1$
.append("END\n"); //$NON-NLS-1$
@@ -669,7 +670,7 @@
helpResolveUpdateProcedure(procedure.toString(), userUpdateStr,
Table.TriggerEvent.UPDATE);
- procedure = new StringBuffer("CREATE PROCEDURE ") //$NON-NLS-1$
+ procedure = new StringBuffer("FOR EACH ROW ") //$NON-NLS-1$
.append("BEGIN\n") //$NON-NLS-1$
.append("SELECT e1, e2, e3, e4 INTO #myTempTable FROM pm1.g2;\n") //$NON-NLS-1$
.append("END\n"); //$NON-NLS-1$
@@ -678,7 +679,7 @@
}
@Test public void testSelectIntoInProcNoFrom() throws Exception {
- StringBuffer procedure = new StringBuffer("CREATE PROCEDURE ") //$NON-NLS-1$
+ StringBuffer procedure = new StringBuffer("FOR EACH ROW ") //$NON-NLS-1$
.append("BEGIN\n") //$NON-NLS-1$
.append("SELECT 'a', 19, {b'true'}, 13.999 INTO pm1.g1;\n") //$NON-NLS-1$
.append("END\n"); //$NON-NLS-1$
@@ -688,7 +689,7 @@
helpResolveUpdateProcedure(procedure.toString(), userUpdateStr,
Table.TriggerEvent.UPDATE);
- procedure = new StringBuffer("CREATE PROCEDURE ") //$NON-NLS-1$
+ procedure = new StringBuffer("FOR EACH ROW ") //$NON-NLS-1$
.append("BEGIN\n") //$NON-NLS-1$
.append("SELECT 'a', 19, {b'true'}, 13.999 INTO #myTempTable;\n") //$NON-NLS-1$
.append("END\n"); //$NON-NLS-1$
@@ -698,7 +699,7 @@
// validating INPUT element assigned
@Test public void testAssignInput() {
- String procedure = "CREATE PROCEDURE "; //$NON-NLS-1$
+ String procedure = "FOR EACH ROW "; //$NON-NLS-1$
procedure = procedure + "BEGIN\n"; //$NON-NLS-1$
procedure = procedure + "DECLARE integer var1;\n"; //$NON-NLS-1$
procedure = procedure + "INPUTS.e1 = Select pm1.g1.e1 from pm1.g1;\n"; //$NON-NLS-1$
@@ -713,7 +714,7 @@
// validating CHANGING element assigned
@Test public void testAssignChanging() {
- String procedure = "CREATE PROCEDURE "; //$NON-NLS-1$
+ String procedure = "FOR EACH ROW "; //$NON-NLS-1$
procedure = procedure + "BEGIN\n"; //$NON-NLS-1$
procedure = procedure + "DECLARE integer var1;\n"; //$NON-NLS-1$
procedure = procedure + "CHANGING.e1 = Select pm1.g1.e1 from pm1.g1;\n"; //$NON-NLS-1$
@@ -728,7 +729,7 @@
// variables cannot be used among insert elements
@Test public void testVariableInInsert() {
- String procedure = "CREATE VIRTUAL PROCEDURE "; //$NON-NLS-1$
+ String procedure = "FOR EACH ROW "; //$NON-NLS-1$
procedure = procedure + "BEGIN\n"; //$NON-NLS-1$
procedure = procedure + "DECLARE integer var1;\n"; //$NON-NLS-1$
procedure = procedure + "Insert into pm1.g1 (pm1.g1.e2, var1) values (1, 2);\n"; //$NON-NLS-1$
@@ -743,7 +744,7 @@
// variables cannot be used among insert elements
@Test public void testVariableInInsert2() {
- String procedure = "CREATE VIRTUAL PROCEDURE "; //$NON-NLS-1$
+ String procedure = "FOR EACH ROW "; //$NON-NLS-1$
procedure = procedure + "BEGIN\n"; //$NON-NLS-1$
procedure = procedure + "DECLARE integer var1;\n"; //$NON-NLS-1$
procedure = procedure + "Insert into pm1.g1 (pm1.g1.e2, INPUTS.x) values (1, 2);\n"; //$NON-NLS-1$
@@ -758,7 +759,7 @@
//should resolve first to the table's column
@Test public void testVariableInInsert3() throws Exception {
- String procedure = "CREATE VIRTUAL PROCEDURE "; //$NON-NLS-1$
+ String procedure = "FOR EACH ROW "; //$NON-NLS-1$
procedure = procedure + "BEGIN\n"; //$NON-NLS-1$
procedure = procedure + "DECLARE integer e2;\n"; //$NON-NLS-1$
procedure = procedure + "Insert into pm1.g1 (e2) values (1);\n"; //$NON-NLS-1$
@@ -783,7 +784,7 @@
}
@Test public void testLoopRedefinition() {
- StringBuffer proc = new StringBuffer("CREATE VIRTUAL PROCEDURE") //$NON-NLS-1$
+ StringBuffer proc = new StringBuffer("FOR EACH ROW") //$NON-NLS-1$
.append("\nBEGIN") //$NON-NLS-1$
.append("\n declare string var1;") //$NON-NLS-1$
.append("\n LOOP ON (SELECT pm1.g1.e1 FROM pm1.g1) AS loopCursor") //$NON-NLS-1$
@@ -802,7 +803,7 @@
}
@Test public void testTempGroupElementShouldNotBeResolable() {
- StringBuffer proc = new StringBuffer("CREATE VIRTUAL PROCEDURE") //$NON-NLS-1$
+ StringBuffer proc = new StringBuffer("FOR EACH ROW") //$NON-NLS-1$
.append("\nBEGIN") //$NON-NLS-1$
.append("\n select 1 as a into #temp;") //$NON-NLS-1$
.append("\n select #temp.a from pm1.g1;") //$NON-NLS-1$
@@ -815,7 +816,7 @@
}
@Test public void testTempGroupElementShouldNotBeResolable1() {
- StringBuffer proc = new StringBuffer("CREATE VIRTUAL PROCEDURE") //$NON-NLS-1$
+ StringBuffer proc = new StringBuffer("FOR EACH ROW") //$NON-NLS-1$
.append("\nBEGIN") //$NON-NLS-1$
.append("\n select 1 as a into #temp;") //$NON-NLS-1$
.append("\n insert into #temp (a) values (#temp.a);") //$NON-NLS-1$
@@ -828,7 +829,7 @@
}
@Test public void testProcedureCreate() throws Exception {
- StringBuffer proc = new StringBuffer("CREATE VIRTUAL PROCEDURE") //$NON-NLS-1$
+ StringBuffer proc = new StringBuffer("FOR EACH ROW") //$NON-NLS-1$
.append("\nBEGIN") //$NON-NLS-1$
.append("\n create local temporary table t1 (e1 string);") //$NON-NLS-1$
.append("\n select e1 from t1;") //$NON-NLS-1$
@@ -845,7 +846,7 @@
* it is not ok to redefine the loopCursor
*/
@Test public void testProcedureCreate1() {
- StringBuffer proc = new StringBuffer("CREATE VIRTUAL PROCEDURE") //$NON-NLS-1$
+ StringBuffer proc = new StringBuffer("FOR EACH ROW") //$NON-NLS-1$
.append("\nBEGIN") //$NON-NLS-1$
.append("\n LOOP ON (SELECT pm1.g1.e1 FROM pm1.g1) AS loopCursor") //$NON-NLS-1$
.append("\n BEGIN") //$NON-NLS-1$
@@ -859,7 +860,7 @@
}
@Test public void testProcedureCreateDrop() {
- StringBuffer proc = new StringBuffer("CREATE VIRTUAL PROCEDURE") //$NON-NLS-1$
+ StringBuffer proc = new StringBuffer("FOR EACH ROW") //$NON-NLS-1$
.append("\nBEGIN") //$NON-NLS-1$
.append("\n drop table t1;") //$NON-NLS-1$
.append("\n create local temporary table t1 (e1 string);") //$NON-NLS-1$
@@ -871,7 +872,7 @@
}
@Test public void testProcedureCreateDrop1() throws Exception {
- StringBuffer proc = new StringBuffer("CREATE VIRTUAL PROCEDURE") //$NON-NLS-1$
+ StringBuffer proc = new StringBuffer("FOR EACH ROW") //$NON-NLS-1$
.append("\nBEGIN") //$NON-NLS-1$
.append("\n create local temporary table t1 (e1 string);") //$NON-NLS-1$
.append("\n drop table t1;") //$NON-NLS-1$
@@ -883,7 +884,7 @@
}
@Test public void testCreateAfterImplicitTempTable() throws Exception {
- StringBuffer proc = new StringBuffer("CREATE VIRTUAL PROCEDURE") //$NON-NLS-1$
+ StringBuffer proc = new StringBuffer("FOR EACH ROW") //$NON-NLS-1$
.append("\nBEGIN") //$NON-NLS-1$
.append("\n select e1 into #temp from pm1.g1;") //$NON-NLS-1$
.append("\n create local temporary table #temp (e1 string);") //$NON-NLS-1$
@@ -895,7 +896,7 @@
}
@Test public void testInsertAfterCreate() throws Exception {
- StringBuffer proc = new StringBuffer("CREATE PROCEDURE") //$NON-NLS-1$
+ StringBuffer proc = new StringBuffer("FOR EACH ROW") //$NON-NLS-1$
.append("\nBEGIN") //$NON-NLS-1$
.append("\n create local temporary table #temp (e1 string, e2 string);") //$NON-NLS-1$
.append("\n insert into #temp (e1) values ('a');") //$NON-NLS-1$
@@ -928,7 +929,7 @@
// variable resolution, variable compared against
// different datatype element for which there is no implicit transformation)
@Test public void testCreateUpdateProcedure2() {
- String procedure = "CREATE PROCEDURE "; //$NON-NLS-1$
+ String procedure = "FOR EACH ROW "; //$NON-NLS-1$
procedure += "BEGIN\n"; //$NON-NLS-1$
procedure += "DECLARE boolean var1;\n"; //$NON-NLS-1$
procedure += "ROWS_UPDATED = UPDATE pm1.g1 SET pm1.g1.e4 = convert(var1, string), pm1.g1.e1 = var1;\n"; //$NON-NLS-1$
Modified: trunk/engine/src/test/java/org/teiid/query/rewriter/TestQueryRewriter.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/query/rewriter/TestQueryRewriter.java 2012-07-16 17:54:25 UTC (rev 4241)
+++ trunk/engine/src/test/java/org/teiid/query/rewriter/TestQueryRewriter.java 2012-07-17 01:00:58 UTC (rev 4242)
@@ -1104,7 +1104,7 @@
@Test public void testRewriteWhile() throws Exception {
- String procedure = "CREATE PROCEDURE\n"; //$NON-NLS-1$
+ String procedure = "FOR EACH ROW\n"; //$NON-NLS-1$
procedure = procedure + "BEGIN\n"; //$NON-NLS-1$
procedure = procedure + "while (1 = 1)\n"; //$NON-NLS-1$
procedure = procedure + "BEGIN\n"; //$NON-NLS-1$
@@ -1124,7 +1124,7 @@
@Test public void testRewriteWhile1() throws Exception {
- String procedure = "CREATE PROCEDURE\n"; //$NON-NLS-1$
+ String procedure = "FOR EACH ROW\n"; //$NON-NLS-1$
procedure = procedure + "BEGIN\n"; //$NON-NLS-1$
procedure = procedure + "while (1 = 0)\n"; //$NON-NLS-1$
procedure = procedure + "BEGIN\n"; //$NON-NLS-1$
@@ -1134,8 +1134,8 @@
String userQuery = "Insert into vm1.g1 (e1, e2) values ('String', 1)"; //$NON-NLS-1$
- String rewritProc = "CREATE VIRTUAL PROCEDURE\n"; //$NON-NLS-1$
- rewritProc = rewritProc + "BEGIN\n"; //$NON-NLS-1$
+ String rewritProc = "FOR EACH ROW\n"; //$NON-NLS-1$
+ rewritProc = rewritProc + "BEGIN ATOMIC\n"; //$NON-NLS-1$
rewritProc = rewritProc + "END"; //$NON-NLS-1$
String procReturned = this.getRewritenProcedure(procedure, userQuery,
@@ -1149,15 +1149,15 @@
*/
@Test public void testRewriteProcedureWithCount() throws Exception {
- String procedure = "CREATE PROCEDURE\n"; //$NON-NLS-1$
+ String procedure = "FOR EACH ROW\n"; //$NON-NLS-1$
procedure = procedure + "BEGIN\n"; //$NON-NLS-1$
procedure = procedure + "Select count(*) from pm1.g1;\n"; //$NON-NLS-1$
procedure = procedure + "END\n"; //$NON-NLS-1$
String userQuery = "Insert into vm1.g1 (e1, e2) values ('String', 1)"; //$NON-NLS-1$
- String rewritProc = "CREATE VIRTUAL PROCEDURE\n"; //$NON-NLS-1$
- rewritProc = rewritProc + "BEGIN\n"; //$NON-NLS-1$
+ String rewritProc = "FOR EACH ROW\n"; //$NON-NLS-1$
+ rewritProc = rewritProc + "BEGIN ATOMIC\n"; //$NON-NLS-1$
rewritProc = rewritProc + "SELECT COUNT(*) FROM pm1.g1;\n"; //$NON-NLS-1$
rewritProc = rewritProc + "END"; //$NON-NLS-1$
Modified: trunk/engine/src/test/java/org/teiid/query/validator/TestValidator.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/query/validator/TestValidator.java 2012-07-16 17:54:25 UTC (rev 4241)
+++ trunk/engine/src/test/java/org/teiid/query/validator/TestValidator.java 2012-07-17 01:00:58 UTC (rev 4242)
@@ -910,7 +910,7 @@
// valid variable declared
@Test public void testCreateUpdateProcedure4() {
- String procedure = "CREATE PROCEDURE "; //$NON-NLS-1$
+ String procedure = "FOR EACH ROW "; //$NON-NLS-1$
procedure = procedure + "BEGIN\n"; //$NON-NLS-1$
procedure = procedure + "DECLARE integer var1;\n"; //$NON-NLS-1$
procedure = procedure + "END\n"; //$NON-NLS-1$
@@ -924,7 +924,7 @@
// validating AssignmentStatement, more than one project symbol on the
// command
@Test public void testCreateUpdateProcedure11() {
- String procedure = "CREATE PROCEDURE "; //$NON-NLS-1$
+ String procedure = "FOR EACH ROW "; //$NON-NLS-1$
procedure = procedure + "BEGIN\n"; //$NON-NLS-1$
procedure = procedure + "DECLARE integer var1;\n"; //$NON-NLS-1$
procedure = procedure + "var1 = Select pm1.g1.e2, pm1.g1.e1 from pm1.g1;\n"; //$NON-NLS-1$
@@ -939,7 +939,7 @@
// validating AssignmentStatement, more than one project symbol on the
// command
@Test public void testCreateUpdateProcedure12() {
- String procedure = "CREATE PROCEDURE "; //$NON-NLS-1$
+ String procedure = "FOR EACH ROW "; //$NON-NLS-1$
procedure = procedure + "BEGIN\n"; //$NON-NLS-1$
procedure = procedure + "DECLARE integer var1;\n"; //$NON-NLS-1$
procedure = procedure + "var1 = Select pm1.g1.e2, pm1.g1.e1 from pm1.g1;\n"; //$NON-NLS-1$
@@ -953,7 +953,7 @@
// using aggregate function within a procedure - defect #8394
@Test public void testCreateUpdateProcedure31() {
- String procedure = "CREATE PROCEDURE "; //$NON-NLS-1$
+ String procedure = "FOR EACH ROW "; //$NON-NLS-1$
procedure = procedure + "BEGIN\n"; //$NON-NLS-1$
procedure = procedure + "DECLARE string MaxTran;\n"; //$NON-NLS-1$
procedure = procedure + "MaxTran = SELECT MAX(e1) FROM pm1.g1;\n"; //$NON-NLS-1$
@@ -967,7 +967,7 @@
// assigning null values to known datatype variable
@Test public void testCreateUpdateProcedure32() {
- String procedure = "CREATE PROCEDURE "; //$NON-NLS-1$
+ String procedure = "FOR EACH ROW "; //$NON-NLS-1$
procedure = procedure + "BEGIN\n"; //$NON-NLS-1$
procedure = procedure + "DECLARE string var;\n"; //$NON-NLS-1$
procedure = procedure + "var = null;\n"; //$NON-NLS-1$
@@ -980,7 +980,7 @@
}
@Test public void testDefect13643() {
- String procedure = "CREATE PROCEDURE "; //$NON-NLS-1$
+ String procedure = "FOR EACH ROW "; //$NON-NLS-1$
procedure = procedure + "BEGIN\n"; //$NON-NLS-1$
procedure = procedure + "DECLARE integer var1;\n"; //$NON-NLS-1$
procedure = procedure + "LOOP ON (SELECT * FROM pm1.g1) AS myCursor\n"; //$NON-NLS-1$
@@ -1019,7 +1019,7 @@
}
@Test public void testSelectIntoTempGroup() {
- String procedure = "CREATE VIRTUAL PROCEDURE "; //$NON-NLS-1$
+ String procedure = "FOR EACH ROW "; //$NON-NLS-1$
procedure = procedure + "BEGIN\n"; //$NON-NLS-1$
procedure = procedure + "SELECT e1, e2, e3, e4 INTO #myTempTable FROM pm1.g2;\n"; //$NON-NLS-1$
procedure = procedure + "SELECT COUNT(*) FROM #myTempTable;\n"; //$NON-NLS-1$
@@ -1035,7 +1035,7 @@
* Defect 24346
*/
@Test public void testInvalidSelectIntoTempGroup() {
- String procedure = "CREATE PROCEDURE "; //$NON-NLS-1$
+ String procedure = "FOR EACH ROW "; //$NON-NLS-1$
procedure = procedure + "BEGIN\n"; //$NON-NLS-1$
procedure = procedure + "SELECT e1, e2, e3, e4 INTO #myTempTable FROM pm1.g2;\n"; //$NON-NLS-1$
procedure = procedure + "SELECT e1, e2, e3 INTO #myTempTable FROM pm1.g2;\n"; //$NON-NLS-1$
@@ -1049,7 +1049,7 @@
}
@Test public void testInvalidSelectIntoTempGroup1() {
- String procedure = "CREATE PROCEDURE "; //$NON-NLS-1$
+ String procedure = "FOR EACH ROW "; //$NON-NLS-1$
procedure = procedure + "BEGIN\n"; //$NON-NLS-1$
procedure = procedure + "create local temporary table #myTempTable (e1 integer);\n"; //$NON-NLS-1$
procedure = procedure + "SELECT e1 INTO #myTempTable FROM pm1.g2;\n"; //$NON-NLS-1$
@@ -1066,7 +1066,7 @@
@Test public void testSelectIntoPhysicalGroup() {
helpValidate("SELECT e1, e2, e3, e4 INTO pm1.g1 FROM pm1.g2", new String[] { }, RealMetadataFactory.example1Cached()); //$NON-NLS-1$
- String procedure = "CREATE PROCEDURE "; //$NON-NLS-1$
+ String procedure = "FOR EACH ROW "; //$NON-NLS-1$
procedure = procedure + "BEGIN\n"; //$NON-NLS-1$
procedure = procedure + "SELECT e1, e2, e3, e4 INTO pm1.g1 FROM pm1.g2;\n"; //$NON-NLS-1$
procedure = procedure + "END\n"; //$NON-NLS-1$
@@ -1088,7 +1088,7 @@
@Test public void testInvalidSelectIntoTooManyElements() {
helpValidate("SELECT e1, e2, e3, e4, 'val' INTO pm1.g1 FROM pm1.g2", new String[] {"SELECT e1, e2, e3, e4, 'val' INTO pm1.g1 FROM pm1.g2"}, RealMetadataFactory.example1Cached()); //$NON-NLS-1$ //$NON-NLS-2$
- String procedure = "CREATE PROCEDURE "; //$NON-NLS-1$
+ String procedure = "FOR EACH ROW "; //$NON-NLS-1$
procedure = procedure + "BEGIN\n"; //$NON-NLS-1$
procedure = procedure + "SELECT e1, e2, e3, e4, 'val' INTO pm1.g1 FROM pm1.g2;\n"; //$NON-NLS-1$
procedure = procedure + "END\n"; //$NON-NLS-1$
@@ -1102,7 +1102,7 @@
@Test public void testInvalidSelectIntoTooFewElements() {
helpValidate("SELECT e1, e2, e3 INTO pm1.g1 FROM pm1.g2", new String[] {"SELECT e1, e2, e3 INTO pm1.g1 FROM pm1.g2"}, RealMetadataFactory.example1Cached()); //$NON-NLS-1$ //$NON-NLS-2$
- String procedure = "CREATE PROCEDURE "; //$NON-NLS-1$
+ String procedure = "FOR EACH ROW "; //$NON-NLS-1$
procedure = procedure + "BEGIN\n"; //$NON-NLS-1$
procedure = procedure + "SELECT e1, e2, e3 INTO pm1.g1 FROM pm1.g2;\n"; //$NON-NLS-1$
procedure = procedure + "END\n"; //$NON-NLS-1$
@@ -1116,7 +1116,7 @@
@Test public void testInvalidSelectIntoIncorrectTypes() {
helpValidate("SELECT e1, convert(e2, string), e3, e4 INTO pm1.g1 FROM pm1.g2", new String[] {"SELECT e1, convert(e2, string), e3, e4 INTO pm1.g1 FROM pm1.g2"}, RealMetadataFactory.example1Cached()); //$NON-NLS-1$ //$NON-NLS-2$
- String procedure = "CREATE PROCEDURE "; //$NON-NLS-1$
+ String procedure = "FOR EACH ROW "; //$NON-NLS-1$
procedure = procedure + "BEGIN\n"; //$NON-NLS-1$
procedure = procedure + "SELECT e1, convert(e2, string), e3, e4 INTO pm1.g1 FROM pm1.g2;\n"; //$NON-NLS-1$
procedure = procedure + "END\n"; //$NON-NLS-1$
@@ -1134,7 +1134,7 @@
@Test public void testInvalidSelectIntoWithStar() {
helpValidate("SELECT * INTO pm1.g1 FROM pm1.g2, pm1.g1", new String[] {"SELECT * INTO pm1.g1 FROM pm1.g2, pm1.g1"}, RealMetadataFactory.example1Cached()); //$NON-NLS-1$ //$NON-NLS-2$
- String procedure = "CREATE PROCEDURE "; //$NON-NLS-1$
+ String procedure = "FOR EACH ROW "; //$NON-NLS-1$
procedure = procedure + "BEGIN\n"; //$NON-NLS-1$
procedure = procedure + "SELECT * INTO pm1.g1 FROM pm1.g2, pm1.g1;\n"; //$NON-NLS-1$
procedure = procedure + "END\n"; //$NON-NLS-1$
@@ -1148,7 +1148,7 @@
@Test public void testSelectIntoVirtualGroup() {
helpValidate("SELECT e1, e2, e3, e4 INTO vm1.g1 FROM pm1.g2", new String[] {}, RealMetadataFactory.example1Cached()); //$NON-NLS-1$
- String procedure = "CREATE PROCEDURE "; //$NON-NLS-1$
+ String procedure = "FOR EACH ROW "; //$NON-NLS-1$
procedure = procedure + "BEGIN\n"; //$NON-NLS-1$
procedure = procedure + "SELECT e1, e2, e3, e4 INTO vm1.g1 FROM pm1.g2;\n"; //$NON-NLS-1$
procedure = procedure + "END\n"; //$NON-NLS-1$
Modified: trunk/jboss-integration/src/main/java/org/teiid/jboss/FileUDFMetaData.java
===================================================================
--- trunk/jboss-integration/src/main/java/org/teiid/jboss/FileUDFMetaData.java 2012-07-16 17:54:25 UTC (rev 4241)
+++ trunk/jboss-integration/src/main/java/org/teiid/jboss/FileUDFMetaData.java 2012-07-17 01:00:58 UTC (rev 4242)
@@ -34,8 +34,7 @@
import org.teiid.query.QueryPlugin;
import org.teiid.query.function.metadata.FunctionMetadataReader;
import org.teiid.query.function.metadata.FunctionMetadataValidator;
-import org.teiid.query.report.ActivityReport;
-import org.teiid.query.report.ReportItem;
+import org.teiid.query.validator.ValidatorReport;
import org.teiid.runtime.RuntimePlugin;
public class FileUDFMetaData extends UDFMetaData {
@@ -59,7 +58,7 @@
throw new IOException(RuntimePlugin.Util.gs(RuntimePlugin.Event.TEIID40075, name));
}
List<FunctionMethod> udfMethods = FunctionMetadataReader.loadFunctionMethods(file.openStream());
- ActivityReport<ReportItem> report = new ActivityReport<ReportItem>("UDF load"); //$NON-NLS-1$
+ ValidatorReport report = new ValidatorReport("UDF load"); //$NON-NLS-1$
FunctionMetadataValidator.validateFunctionMethods(udfMethods,report);
if(report.hasItems()) {
throw new IOException(QueryPlugin.Util.getString("ERR.015.001.0005", report)); //$NON-NLS-1$
Modified: trunk/test-integration/common/src/test/java/org/teiid/systemmodel/TestODBCProceduresSchema.java
===================================================================
--- trunk/test-integration/common/src/test/java/org/teiid/systemmodel/TestODBCProceduresSchema.java 2012-07-16 17:54:25 UTC (rev 4241)
+++ trunk/test-integration/common/src/test/java/org/teiid/systemmodel/TestODBCProceduresSchema.java 2012-07-17 01:00:58 UTC (rev 4242)
@@ -57,76 +57,61 @@
@Test public void test_Pg_Proc_alltypes() throws Exception {
execute("select oid, proname, proretset,prorettype, pronargs, proargtypes, proargnames, proargmodes, proallargtypes, pronamespace FROM pg_proc where proname='bigProcedure'"); //$NON-NLS-1$
- if (this.internalResultSet.next()) {
- assertEquals(1, this.internalResultSet.getInt(1)); //oid
- assertEquals("bigProcedure", this.internalResultSet.getString(2)); //proname
- assertEquals(true, this.internalResultSet.getBoolean(3)); //proretset
- assertEquals(2249, this.internalResultSet.getInt(4)); //prorettype
- assertEquals(14, this.internalResultSet.getInt(5)); //pronargs
- assertArrayEquals(new Object[] {1700,1043,700,20,701,21,1082,1083,1114,16,1043,21,1700,1700}, (Object[])this.internalResultSet.getObject(6)); //proargtypes
- assertArrayEquals(new Object[] {"intNum","stringNum","floatNum","longNum","doubleNum","byteNum","dateValue","timeValue","timestampValue","booValue","charValue","shortNum","bigIntNum","bigdecimalNum","col","col2"}, (Object[])this.internalResultSet.getObject(7)); //proargnames
- assertArrayEquals(new Object[] {"i","i","i","i","i","i","i","i","i","i","i","i","i","i","t","t"}, (Object[])this.internalResultSet.getObject(8)); //proargmodes
- assertArrayEquals(new Object[] {1700,1043,700,20,701,21,1082,1083,1114,16,1043,21,1700,1700,1043,1700}, (Object[])this.internalResultSet.getObject(9)); //proallargtypes
- assertEquals(1, this.internalResultSet.getInt(10)); //pronamespace
- }
- else {
- fail("no results");
- }
+ assertTrue(this.internalResultSet.next());
+ assertEquals(1, this.internalResultSet.getInt(1)); //oid
+ assertEquals("bigProcedure", this.internalResultSet.getString(2)); //proname
+ assertEquals(true, this.internalResultSet.getBoolean(3)); //proretset
+ assertEquals(2249, this.internalResultSet.getInt(4)); //prorettype
+ assertEquals(14, this.internalResultSet.getInt(5)); //pronargs
+ assertArrayEquals(new Object[] {1700,1043,700,20,701,21,1082,1083,1114,16,1043,21,1700,1700}, (Object[])this.internalResultSet.getObject(6)); //proargtypes
+ assertArrayEquals(new Object[] {"intNum","stringNum","floatNum","longNum","doubleNum","byteNum","dateValue","timeValue","timestampValue","booValue","charValue","shortNum","bigIntNum","bigdecimalNum","col","col2"}, (Object[])this.internalResultSet.getObject(7)); //proargnames
+ assertArrayEquals(new Object[] {"i","i","i","i","i","i","i","i","i","i","i","i","i","i","t","t"}, (Object[])this.internalResultSet.getObject(8)); //proargmodes
+ assertArrayEquals(new Object[] {1700,1043,700,20,701,21,1082,1083,1114,16,1043,21,1700,1700,1043,1700}, (Object[])this.internalResultSet.getObject(9)); //proallargtypes
+ assertEquals(1, this.internalResultSet.getInt(10)); //pronamespace
}
@Test public void test_Pg_Proc_void() throws Exception {
execute("select oid, proname, proretset,prorettype, pronargs, proargtypes, proargnames, proargmodes, proallargtypes, pronamespace FROM pg_proc where proname='VoidProcedure'"); //$NON-NLS-1$
- if (this.internalResultSet.next()) {
- assertEquals(4, this.internalResultSet.getInt(1)); //oid
- assertEquals("VoidProcedure", this.internalResultSet.getString(2)); //proname
- assertEquals(false, this.internalResultSet.getBoolean(3)); //proretset
- assertEquals(2278, this.internalResultSet.getInt(4)); //prorettype
- assertEquals(2, this.internalResultSet.getInt(5)); //pronargs
- assertArrayEquals(new Object[] {1700,1043}, (Object[])this.internalResultSet.getObject(6)); //proargtypes
- assertArrayEquals(new Object[] {"intNum","stringNum"}, (Object[])this.internalResultSet.getObject(7)); //proargnames
- assertArrayEquals(null, (Object[])this.internalResultSet.getObject(8)); //proargmodes
- assertArrayEquals(new Object[] {1700,1043}, (Object[])this.internalResultSet.getObject(9)); //proallargtypes
- assertEquals(1, this.internalResultSet.getInt(10)); //pronamespace
- }
- else {
- fail("no results");
- }
+ assertTrue(this.internalResultSet.next());
+ assertEquals(4, this.internalResultSet.getInt(1)); //oid
+ assertEquals("VoidProcedure", this.internalResultSet.getString(2)); //proname
+ assertEquals(false, this.internalResultSet.getBoolean(3)); //proretset
+ assertEquals(2278, this.internalResultSet.getInt(4)); //prorettype
+ assertEquals(2, this.internalResultSet.getInt(5)); //pronargs
+ assertArrayEquals(new Object[] {1700,1043}, (Object[])this.internalResultSet.getObject(6)); //proargtypes
+ assertArrayEquals(new Object[] {"intNum","stringNum"}, (Object[])this.internalResultSet.getObject(7)); //proargnames
+ assertArrayEquals(null, (Object[])this.internalResultSet.getObject(8)); //proargmodes
+ assertArrayEquals(new Object[] {1700,1043}, (Object[])this.internalResultSet.getObject(9)); //proallargtypes
+ assertEquals(1, this.internalResultSet.getInt(10)); //pronamespace
}
@Test public void test_Pg_Proc_with_return() throws Exception {
execute("select oid, proname, proretset,prorettype, pronargs, proargtypes, proargnames, proargmodes, proallargtypes, pronamespace FROM pg_proc where proname='ProcedureWithReturn'"); //$NON-NLS-1$
- if (this.internalResultSet.next()) {
- assertEquals(3, this.internalResultSet.getInt(1)); //oid
- assertEquals("ProcedureWithReturn", this.internalResultSet.getString(2)); //proname
- assertEquals(false, this.internalResultSet.getBoolean(3)); //proretset
- assertEquals(20, this.internalResultSet.getInt(4)); //prorettype
- assertEquals(3, this.internalResultSet.getInt(5)); //pronargs
- assertArrayEquals(new Object[] {1700,1043,700}, (Object[])this.internalResultSet.getObject(6)); //proargtypes
- assertArrayEquals(new Object[] {"intNum","stringNum","floatNum"}, (Object[])this.internalResultSet.getObject(7)); //proargnames
- assertArrayEquals(null, (Object[])this.internalResultSet.getObject(8)); //proargmodes
- assertArrayEquals(new Object[] {1700,1043,700}, (Object[])this.internalResultSet.getObject(9)); //proallargtypes
- assertEquals(1, this.internalResultSet.getInt(10)); //pronamespace
- }
- else {
- fail("no results");
- }
+ assertTrue(this.internalResultSet.next());
+ assertEquals(3, this.internalResultSet.getInt(1)); //oid
+ assertEquals("ProcedureWithReturn", this.internalResultSet.getString(2)); //proname
+ assertEquals(false, this.internalResultSet.getBoolean(3)); //proretset
+ assertEquals(20, this.internalResultSet.getInt(4)); //prorettype
+ assertEquals(3, this.internalResultSet.getInt(5)); //pronargs
+ assertArrayEquals(new Object[] {1700,1043,700}, (Object[])this.internalResultSet.getObject(6)); //proargtypes
+ assertArrayEquals(new Object[] {"intNum","stringNum","floatNum"}, (Object[])this.internalResultSet.getObject(7)); //proargnames
+ assertArrayEquals(null, (Object[])this.internalResultSet.getObject(8)); //proargmodes
+ assertArrayEquals(new Object[] {1700,1043,700}, (Object[])this.internalResultSet.getObject(9)); //proallargtypes
+ assertEquals(1, this.internalResultSet.getInt(10)); //pronamespace
}
+
@Test public void test_Pg_Proc_with_return_table() throws Exception {
execute("select oid, proname, proretset,prorettype, pronargs, proargtypes, proargnames, proargmodes, proallargtypes, pronamespace FROM pg_proc where proname='ProcedureReturnTable'"); //$NON-NLS-1$
- if (this.internalResultSet.next()) {
- assertEquals(2, this.internalResultSet.getInt(1)); //oid
- assertEquals("ProcedureReturnTable", this.internalResultSet.getString(2)); //proname
- assertEquals(true, this.internalResultSet.getBoolean(3)); //proretset
- assertEquals(2249, this.internalResultSet.getInt(4)); //prorettype
- assertEquals(2, this.internalResultSet.getInt(5)); //pronargs
- assertArrayEquals(new Object[] {1700,1700}, (Object[])this.internalResultSet.getObject(6)); //proargtypes
- assertArrayEquals(new Object[] {"intNum","bigDecimalNum","col1","col2"}, (Object[])this.internalResultSet.getObject(7)); //proargnames
- assertArrayEquals(new Object[] {"i","i","t","t"}, (Object[])this.internalResultSet.getObject(8)); //proargmodes
- assertArrayEquals(new Object[] {1700,1700,1043,1114}, (Object[])this.internalResultSet.getObject(9)); //proallargtypes
- assertEquals(1, this.internalResultSet.getInt(10)); //pronamespace
- }
- else {
- fail("no results");
- }
+ assertTrue(this.internalResultSet.next());
+ assertEquals(2, this.internalResultSet.getInt(1)); //oid
+ assertEquals("ProcedureReturnTable", this.internalResultSet.getString(2)); //proname
+ assertEquals(true, this.internalResultSet.getBoolean(3)); //proretset
+ assertEquals(2249, this.internalResultSet.getInt(4)); //prorettype
+ assertEquals(2, this.internalResultSet.getInt(5)); //pronargs
+ assertArrayEquals(new Object[] {1700,1700}, (Object[])this.internalResultSet.getObject(6)); //proargtypes
+ assertArrayEquals(new Object[] {"intNum","bigDecimalNum","col1","col2"}, (Object[])this.internalResultSet.getObject(7)); //proargnames
+ assertArrayEquals(new Object[] {"i","i","t","t"}, (Object[])this.internalResultSet.getObject(8)); //proargmodes
+ assertArrayEquals(new Object[] {1700,1700,1043,1114}, (Object[])this.internalResultSet.getObject(9)); //proallargtypes
+ assertEquals(1, this.internalResultSet.getInt(10)); //pronamespace
}
}
13 years, 5 months
teiid SVN: r4241 - tags.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2012-07-16 13:54:25 -0400 (Mon, 16 Jul 2012)
New Revision: 4241
Added:
tags/teiid-7.7.1.GA/
Removed:
tags/Teiid-7.7.1.GA/
Log:
using lowercase
13 years, 5 months
teiid SVN: r4240 - tags.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2012-07-16 13:50:12 -0400 (Mon, 16 Jul 2012)
New Revision: 4240
Added:
tags/Teiid-7.7.1.GA/
Log:
adding GA tag
13 years, 5 months
teiid SVN: r4239 - in trunk: admin/src/test/java/org/teiid/adminapi/impl and 4 other directories.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2012-07-16 13:47:35 -0400 (Mon, 16 Jul 2012)
New Revision: 4239
Modified:
trunk/admin/src/main/java/org/teiid/adminapi/impl/ModelMetaData.java
trunk/admin/src/main/java/org/teiid/adminapi/impl/VDBMetaData.java
trunk/admin/src/main/java/org/teiid/adminapi/impl/VDBMetadataMapper.java
trunk/admin/src/main/java/org/teiid/adminapi/impl/VDBMetadataParser.java
trunk/admin/src/test/java/org/teiid/adminapi/impl/TestModelMetaData.java
trunk/admin/src/test/java/org/teiid/adminapi/impl/TestVDBMetaData.java
trunk/jboss-integration/src/main/java/org/teiid/jboss/VDBService.java
trunk/jboss-integration/src/test/java/org/teiid/adminapi/jboss/TestAdminObjectBuilder.java
trunk/runtime/src/main/java/org/teiid/deployers/VDBStatusChecker.java
trunk/runtime/src/main/java/org/teiid/runtime/AbstractVDBDeployer.java
Log:
TEIID-2104 changing ValidationError to message, since it reflects a more generic purpose
Modified: trunk/admin/src/main/java/org/teiid/adminapi/impl/ModelMetaData.java
===================================================================
--- trunk/admin/src/main/java/org/teiid/adminapi/impl/ModelMetaData.java 2012-07-15 11:25:56 UTC (rev 4238)
+++ trunk/admin/src/main/java/org/teiid/adminapi/impl/ModelMetaData.java 2012-07-16 17:47:35 UTC (rev 4239)
@@ -30,7 +30,7 @@
import java.util.List;
import org.teiid.adminapi.Model;
-import org.teiid.adminapi.impl.ModelMetaData.ValidationError.Severity;
+import org.teiid.adminapi.impl.ModelMetaData.Message.Severity;
public class ModelMetaData extends AdminObjectImpl implements Model {
@@ -44,8 +44,8 @@
protected String description;
protected String path;
protected Boolean visible = true;
- protected List<ValidationError> validationErrors;
- protected transient List<ValidationError> runtimeErrors;
+ protected List<Message> messages;
+ protected transient List<Message> runtimeMessages;
protected String schemaSourceType;
protected String schemaText;
@@ -166,18 +166,15 @@
}
public synchronized boolean hasErrors() {
- if (this.validationErrors == null && this.runtimeErrors == null) {
- return false;
- }
- if (this.validationErrors != null) {
- for (ValidationError error : this.validationErrors) {
+ if (this.messages != null) {
+ for (Message error : this.messages) {
if (error.getSeverity() == Severity.ERROR) {
return true;
}
}
}
- if (this.runtimeErrors != null) {
- for (ValidationError error : this.runtimeErrors) {
+ if (this.runtimeMessages != null) {
+ for (Message error : this.runtimeMessages) {
if (error.getSeverity() == Severity.ERROR) {
return true;
}
@@ -186,65 +183,65 @@
return false;
}
- public synchronized List<ValidationError> getErrors(){
- return getErrors(true);
+ public synchronized List<Message> getMessages(){
+ return getMessages(true);
}
- public synchronized List<ValidationError> getErrors(boolean includeRuntime){
- if (this.validationErrors == null && this.runtimeErrors == null) {
+ public synchronized List<Message> getMessages(boolean includeRuntime){
+ if (this.messages == null && this.runtimeMessages == null) {
return Collections.emptyList();
}
- List<ValidationError> list = new ArrayList<ValidationError>();
- if (this.validationErrors != null) {
- list.addAll(validationErrors);
+ List<Message> list = new ArrayList<Message>();
+ if (this.messages != null) {
+ list.addAll(messages);
}
- if (includeRuntime && this.runtimeErrors != null) {
- list.addAll(runtimeErrors);
+ if (includeRuntime && this.runtimeMessages != null) {
+ list.addAll(runtimeMessages);
}
return list;
}
- public ValidationError addError(String severity, String message) {
- ValidationError ve = new ValidationError(Severity.valueOf(severity), message);
- addError(ve);
+ public Message addMessage(String severity, String message) {
+ Message ve = new Message(Severity.valueOf(severity), message);
+ addMessage(ve);
return ve;
}
- public synchronized boolean hasRuntimeErrors(){
- return this.runtimeErrors != null && !this.runtimeErrors.isEmpty();
+ public synchronized boolean hasRuntimeMessages(){
+ return this.runtimeMessages != null && !this.runtimeMessages.isEmpty();
}
- public synchronized ValidationError addRuntimeError(String message) {
- return addRuntimeError(Severity.ERROR, message);
+ public synchronized Message addRuntimeError(String message) {
+ return addRuntimeMessage(Severity.ERROR, message);
}
- public synchronized ValidationError addRuntimeError(Severity severity, String message) {
- ValidationError ve = new ValidationError(severity, message);
- if (this.runtimeErrors == null) {
- this.runtimeErrors = new LinkedList<ValidationError>();
+ public synchronized Message addRuntimeMessage(Severity severity, String message) {
+ Message ve = new Message(severity, message);
+ if (this.runtimeMessages == null) {
+ this.runtimeMessages = new LinkedList<Message>();
}
- this.runtimeErrors.add(ve);
- if (this.runtimeErrors.size() > DEFAULT_ERROR_HISTORY) {
- this.runtimeErrors.remove(0);
+ this.runtimeMessages.add(ve);
+ if (this.runtimeMessages.size() > DEFAULT_ERROR_HISTORY) {
+ this.runtimeMessages.remove(0);
}
return ve;
}
- public synchronized ValidationError addError(ValidationError ve) {
- if (this.validationErrors == null) {
- this.validationErrors = new LinkedList<ValidationError>();
+ public synchronized Message addMessage(Message ve) {
+ if (this.messages == null) {
+ this.messages = new LinkedList<Message>();
}
- this.validationErrors.add(ve);
+ this.messages.add(ve);
return ve;
}
- public synchronized void clearRuntimeErrors() {
- if (runtimeErrors != null) {
- runtimeErrors = null;
+ public synchronized void clearRuntimeMessages() {
+ if (runtimeMessages != null) {
+ runtimeMessages = null;
}
}
- public static class ValidationError implements Serializable{
+ public static class Message implements Serializable{
private static final long serialVersionUID = 2044197069467559527L;
public enum Severity {ERROR, WARNING, INFO};
@@ -253,9 +250,9 @@
protected Severity severity;
protected String path;
- public ValidationError() {};
+ public Message() {};
- public ValidationError(Severity severity, String msg) {
+ public Message(Severity severity, String msg) {
this.severity = severity;
this.value = msg;
}
@@ -292,7 +289,7 @@
return false;
if (getClass() != obj.getClass())
return false;
- ValidationError other = (ValidationError) obj;
+ Message other = (Message) obj;
if (severity == null) {
if (other.severity != null)
return false;
@@ -326,9 +323,9 @@
@Override
public List<String> getValidityErrors() {
List<String> allErrors = new ArrayList<String>();
- List<ValidationError> errors = getErrors();
+ List<Message> errors = getMessages();
if (errors != null && !errors.isEmpty()) {
- for (ValidationError m:errors) {
+ for (Message m:errors) {
if (m.getSeverity() == Severity.ERROR) {
allErrors.add(m.getValue());
}
Modified: trunk/admin/src/main/java/org/teiid/adminapi/impl/VDBMetaData.java
===================================================================
--- trunk/admin/src/main/java/org/teiid/adminapi/impl/VDBMetaData.java 2012-07-15 11:25:56 UTC (rev 4238)
+++ trunk/admin/src/main/java/org/teiid/adminapi/impl/VDBMetaData.java 2012-07-16 17:47:35 UTC (rev 4239)
@@ -33,8 +33,8 @@
import org.teiid.adminapi.Model;
import org.teiid.adminapi.Translator;
import org.teiid.adminapi.VDB;
-import org.teiid.adminapi.impl.ModelMetaData.ValidationError;
-import org.teiid.adminapi.impl.ModelMetaData.ValidationError.Severity;
+import org.teiid.adminapi.impl.ModelMetaData.Message;
+import org.teiid.adminapi.impl.ModelMetaData.Message.Severity;
public class VDBMetaData extends AdminObjectImpl implements VDB {
@@ -154,9 +154,9 @@
public List<String> getValidityErrors(){
List<String> allErrors = new ArrayList<String>();
for (ModelMetaData model:this.models.values()) {
- List<ValidationError> errors = model.getErrors();
+ List<Message> errors = model.getMessages();
if (errors != null && !errors.isEmpty()) {
- for (ValidationError m:errors) {
+ for (Message m:errors) {
if (m.getSeverity() == Severity.ERROR) {
allErrors.add(m.getValue());
}
Modified: trunk/admin/src/main/java/org/teiid/adminapi/impl/VDBMetadataMapper.java
===================================================================
--- trunk/admin/src/main/java/org/teiid/adminapi/impl/VDBMetadataMapper.java 2012-07-15 11:25:56 UTC (rev 4238)
+++ trunk/admin/src/main/java/org/teiid/adminapi/impl/VDBMetadataMapper.java 2012-07-16 17:47:35 UTC (rev 4239)
@@ -36,8 +36,8 @@
import org.teiid.adminapi.VDB.ConnectionType;
import org.teiid.adminapi.VDB.Status;
import org.teiid.adminapi.impl.DataPolicyMetadata.PermissionMetaData;
-import org.teiid.adminapi.impl.ModelMetaData.ValidationError;
-import org.teiid.adminapi.impl.ModelMetaData.ValidationError.Severity;
+import org.teiid.adminapi.impl.ModelMetaData.Message;
+import org.teiid.adminapi.impl.ModelMetaData.Message.Severity;
public class VDBMetadataMapper implements MetadataMapper<VDBMetaData> {
private static final String VDBNAME = "vdb-name"; //$NON-NLS-1$
@@ -298,10 +298,10 @@
}
}
- List<ValidationError> errors = model.getErrors();
+ List<Message> errors = model.getMessages();
if (errors != null && !errors.isEmpty()) {
ModelNode errorsNode = node.get(VALIDITY_ERRORS);
- for (ValidationError error:errors) {
+ for (Message error:errors) {
errorsNode.add(ValidationErrorMapper.INSTANCE.wrap(error, new ModelNode()));
}
}
@@ -359,9 +359,9 @@
if (node.get(VALIDITY_ERRORS).isDefined()) {
List<ModelNode> errorNodes = node.get(VALIDITY_ERRORS).asList();
for(ModelNode errorNode:errorNodes) {
- ValidationError error = ValidationErrorMapper.INSTANCE.unwrap(errorNode);
+ Message error = ValidationErrorMapper.INSTANCE.unwrap(errorNode);
if (error != null) {
- model.addError(error);
+ model.addMessage(error);
}
}
}
@@ -458,7 +458,7 @@
/**
* validation error mapper
*/
- public static class ValidationErrorMapper implements MetadataMapper<ValidationError>{
+ public static class ValidationErrorMapper implements MetadataMapper<Message>{
private static final String ERROR_PATH = "error-path"; //$NON-NLS-1$
private static final String SEVERITY = "severity"; //$NON-NLS-1$
private static final String MESSAGE = "message"; //$NON-NLS-1$
@@ -466,7 +466,7 @@
public static ValidationErrorMapper INSTANCE = new ValidationErrorMapper();
- public ModelNode wrap(ValidationError error, ModelNode node) {
+ public ModelNode wrap(Message error, ModelNode node) {
if (error == null) {
return null;
}
@@ -480,12 +480,12 @@
return node;
}
- public ValidationError unwrap(ModelNode node) {
+ public Message unwrap(ModelNode node) {
if (node == null) {
return null;
}
- ValidationError error = new ValidationError();
+ Message error = new Message();
if (node.has(ERROR_PATH)) {
error.setPath(node.get(ERROR_PATH).asString());
}
Modified: trunk/admin/src/main/java/org/teiid/adminapi/impl/VDBMetadataParser.java
===================================================================
--- trunk/admin/src/main/java/org/teiid/adminapi/impl/VDBMetadataParser.java 2012-07-15 11:25:56 UTC (rev 4238)
+++ trunk/admin/src/main/java/org/teiid/adminapi/impl/VDBMetadataParser.java 2012-07-16 17:47:35 UTC (rev 4239)
@@ -49,8 +49,8 @@
import org.teiid.adminapi.Translator;
import org.teiid.adminapi.VDBImport;
import org.teiid.adminapi.impl.DataPolicyMetadata.PermissionMetaData;
-import org.teiid.adminapi.impl.ModelMetaData.ValidationError;
-import org.teiid.adminapi.impl.ModelMetaData.ValidationError.Severity;
+import org.teiid.adminapi.impl.ModelMetaData.Message;
+import org.teiid.adminapi.impl.ModelMetaData.Message.Severity;
import org.teiid.core.types.XMLType;
import org.xml.sax.SAXException;
@@ -286,9 +286,9 @@
String msg = reader.getElementText();
String severity = validationProps.getProperty(Element.VALIDATION_SEVERITY_ATTR.getLocalName());
String path = validationProps.getProperty(Element.PATH.getLocalName());
- ValidationError ve = new ValidationError(Severity.valueOf(severity), msg);
+ Message ve = new Message(Severity.valueOf(severity), msg);
ve.setPath(path);
- model.addError(ve);
+ model.addMessage(ve);
break;
case METADATA:
Properties metdataProps = getAttributes(reader);
@@ -521,7 +521,7 @@
}
// model validation errors
- for (ValidationError ve:model.getErrors(false)) {
+ for (Message ve:model.getMessages(false)) {
writer.writeStartElement(Element.VALIDATION_ERROR.getLocalName());
writer.writeAttribute(Element.VALIDATION_SEVERITY_ATTR.getLocalName(), ve.getSeverity().name());
if (ve.getPath() != null) {
Modified: trunk/admin/src/test/java/org/teiid/adminapi/impl/TestModelMetaData.java
===================================================================
--- trunk/admin/src/test/java/org/teiid/adminapi/impl/TestModelMetaData.java 2012-07-15 11:25:56 UTC (rev 4238)
+++ trunk/admin/src/test/java/org/teiid/adminapi/impl/TestModelMetaData.java 2012-07-16 17:47:35 UTC (rev 4239)
@@ -60,10 +60,10 @@
public void testErrors() {
ModelMetaData m = new ModelMetaData();
- m.addError("ERROR", "I am Error");
- m.addError("WARNING", "I am warning");
+ m.addMessage("ERROR", "I am Error");
+ m.addMessage("WARNING", "I am warning");
- assertFalse(m.getErrors().isEmpty());
- assertEquals(1, m.getErrors().size());
+ assertFalse(m.getMessages().isEmpty());
+ assertEquals(1, m.getMessages().size());
}
}
Modified: trunk/admin/src/test/java/org/teiid/adminapi/impl/TestVDBMetaData.java
===================================================================
--- trunk/admin/src/test/java/org/teiid/adminapi/impl/TestVDBMetaData.java 2012-07-15 11:25:56 UTC (rev 4238)
+++ trunk/admin/src/test/java/org/teiid/adminapi/impl/TestVDBMetaData.java 2012-07-16 17:47:35 UTC (rev 4239)
@@ -151,7 +151,7 @@
modelOne.addProperty("model-prop", "model-value"); //$NON-NLS-1$ //$NON-NLS-2$
modelOne.addProperty("model-prop", "model-value-override"); //$NON-NLS-1$ //$NON-NLS-2$
modelOne.setVisible(false);
- modelOne.addError("ERROR", "There is an error in VDB"); //$NON-NLS-1$ //$NON-NLS-2$
+ modelOne.addMessage("ERROR", "There is an error in VDB"); //$NON-NLS-1$ //$NON-NLS-2$
modelOne.setDescription("model description");
vdb.addModel(modelOne);
Modified: trunk/jboss-integration/src/main/java/org/teiid/jboss/VDBService.java
===================================================================
--- trunk/jboss-integration/src/main/java/org/teiid/jboss/VDBService.java 2012-07-15 11:25:56 UTC (rev 4238)
+++ trunk/jboss-integration/src/main/java/org/teiid/jboss/VDBService.java 2012-07-16 17:47:35 UTC (rev 4239)
@@ -55,7 +55,7 @@
import org.teiid.adminapi.impl.VDBMetaData;
import org.teiid.adminapi.impl.VDBMetadataParser;
import org.teiid.adminapi.impl.VDBTranslatorMetaData;
-import org.teiid.adminapi.impl.ModelMetaData.ValidationError.Severity;
+import org.teiid.adminapi.impl.ModelMetaData.Message.Severity;
import org.teiid.common.buffer.BufferManager;
import org.teiid.core.TeiidException;
import org.teiid.deployers.CompositeVDB;
@@ -333,7 +333,7 @@
protected void loadMetadata(final VDBMetaData vdb, final ModelMetaData model, final ConnectorManagerRepository cmr, final MetadataRepository metadataRepo, final MetadataStore vdbMetadataStore, final AtomicInteger loadCount) {
String msg = IntegrationPlugin.Util.gs(IntegrationPlugin.Event.TEIID50029,vdb.getName(), vdb.getVersion(), model.getName(), SimpleDateFormat.getInstance().format(new Date()));
- model.addRuntimeError(Severity.INFO, msg);
+ model.addRuntimeMessage(Severity.INFO, msg);
LogManager.logInfo(LogConstants.CTX_RUNTIME, msg);
Runnable job = new Runnable() {
Modified: trunk/jboss-integration/src/test/java/org/teiid/adminapi/jboss/TestAdminObjectBuilder.java
===================================================================
--- trunk/jboss-integration/src/test/java/org/teiid/adminapi/jboss/TestAdminObjectBuilder.java 2012-07-15 11:25:56 UTC (rev 4238)
+++ trunk/jboss-integration/src/test/java/org/teiid/adminapi/jboss/TestAdminObjectBuilder.java 2012-07-16 17:47:35 UTC (rev 4239)
@@ -55,7 +55,7 @@
modelOne.addProperty("model-prop", "model-value");
modelOne.addProperty("model-prop", "model-value-override");
modelOne.setVisible(false);
- modelOne.addError("ERROR", "There is an error in VDB");
+ modelOne.addMessage("ERROR", "There is an error in VDB");
modelOne.setDescription("model description");
vdb.addModel(modelOne);
Modified: trunk/runtime/src/main/java/org/teiid/deployers/VDBStatusChecker.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/deployers/VDBStatusChecker.java 2012-07-15 11:25:56 UTC (rev 4238)
+++ trunk/runtime/src/main/java/org/teiid/deployers/VDBStatusChecker.java 2012-07-16 17:47:35 UTC (rev 4239)
@@ -31,7 +31,7 @@
import org.teiid.adminapi.impl.SourceMappingMetadata;
import org.teiid.adminapi.impl.VDBMetaData;
import org.teiid.adminapi.impl.VDBTranslatorMetaData;
-import org.teiid.adminapi.impl.ModelMetaData.ValidationError.Severity;
+import org.teiid.adminapi.impl.ModelMetaData.Message.Severity;
import org.teiid.core.TeiidException;
import org.teiid.dqp.internal.datamgr.ConnectorManager;
import org.teiid.dqp.internal.datamgr.ConnectorManagerRepository;
@@ -131,7 +131,7 @@
ConnectorManagerRepository cmr = vdb.getAttachment(ConnectorManagerRepository.class);
boolean usesResourse = false;
for (ModelMetaData model:vdb.getModelMetaDatas().values()) {
- if (!model.hasRuntimeErrors()) {
+ if (!model.hasRuntimeMessages()) {
continue;
}
@@ -174,10 +174,10 @@
String status = cm.getStausMessage();
if (status != null && status.length() > 0) {
Severity severity = vdb.getStatus() == Status.LOADING?Severity.WARNING:Severity.ERROR;
- model.addRuntimeError(severity, status);
+ model.addRuntimeMessage(severity, status);
LogManager.logInfo(LogConstants.CTX_RUNTIME, status);
} else if (vdb.getStatus() != Status.LOADING){
- model.clearRuntimeErrors();
+ model.clearRuntimeMessages();
}
}
}
@@ -195,7 +195,7 @@
if (cm.getExecutionFactory().isSourceRequired()) {
String msg = RuntimePlugin.Util.gs(RuntimePlugin.Event.TEIID40012, vdb.getName(), vdb.getVersion(), resourceName);
Severity severity = vdb.getStatus() == Status.LOADING?Severity.WARNING:Severity.ERROR;
- model.addRuntimeError(severity, msg);
+ model.addRuntimeMessage(severity, msg);
LogManager.logInfo(LogConstants.CTX_RUNTIME, msg);
}
}
Modified: trunk/runtime/src/main/java/org/teiid/runtime/AbstractVDBDeployer.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/runtime/AbstractVDBDeployer.java 2012-07-15 11:25:56 UTC (rev 4238)
+++ trunk/runtime/src/main/java/org/teiid/runtime/AbstractVDBDeployer.java 2012-07-16 17:47:35 UTC (rev 4239)
@@ -157,7 +157,7 @@
factory.mergeInto(vdbMetadataStore);
//TODO: this is not quite correct, the source may be missing
- model.clearRuntimeErrors();
+ model.clearRuntimeMessages();
if (loadCount.decrementAndGet() == 0) {
getVDBRepository().finishDeployment(vdb.getName(), vdb.getVersion());
13 years, 5 months
teiid SVN: r4238 - in trunk: admin/src/main/java/org/teiid/adminapi/impl and 7 other directories.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2012-07-15 07:25:56 -0400 (Sun, 15 Jul 2012)
New Revision: 4238
Modified:
trunk/admin/src/main/java/org/teiid/adminapi/Model.java
trunk/admin/src/main/java/org/teiid/adminapi/impl/ModelMetaData.java
trunk/api/src/main/java/org/teiid/translator/ExecutionFactory.java
trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/ConnectorManager.java
trunk/jboss-integration/src/main/java/org/teiid/jboss/VDBDeployer.java
trunk/jboss-integration/src/main/java/org/teiid/jboss/VDBService.java
trunk/runtime/src/main/java/org/teiid/deployers/VDBRepository.java
trunk/runtime/src/main/java/org/teiid/deployers/VDBStatusChecker.java
trunk/runtime/src/main/java/org/teiid/runtime/RuntimePlugin.java
trunk/runtime/src/main/resources/org/teiid/runtime/i18n.properties
trunk/test-integration/common/src/test/java/org/teiid/arquillian/IntegrationTestDeployment.java
Log:
TEIID-2104 altering the use of runtime errors to make load problems more evident
Modified: trunk/admin/src/main/java/org/teiid/adminapi/Model.java
===================================================================
--- trunk/admin/src/main/java/org/teiid/adminapi/Model.java 2012-07-13 13:14:44 UTC (rev 4237)
+++ trunk/admin/src/main/java/org/teiid/adminapi/Model.java 2012-07-15 11:25:56 UTC (rev 4238)
@@ -88,4 +88,10 @@
* @return
*/
String getSourceTranslatorName(String sourceName);
+
+ /**
+ * Shows any validity errors present in the model
+ * @return
+ */
+ List<String> getValidityErrors();
}
\ No newline at end of file
Modified: trunk/admin/src/main/java/org/teiid/adminapi/impl/ModelMetaData.java
===================================================================
--- trunk/admin/src/main/java/org/teiid/adminapi/impl/ModelMetaData.java 2012-07-13 13:14:44 UTC (rev 4237)
+++ trunk/admin/src/main/java/org/teiid/adminapi/impl/ModelMetaData.java 2012-07-15 11:25:56 UTC (rev 4238)
@@ -119,6 +119,10 @@
return new ArrayList<SourceMappingMetadata>(this.sources.values());
}
+ public LinkedHashMap<String, SourceMappingMetadata> getSources() {
+ return sources;
+ }
+
public SourceMappingMetadata getSourceMapping(String sourceName){
return this.sources.get(sourceName);
}
@@ -211,7 +215,11 @@
}
public synchronized ValidationError addRuntimeError(String message) {
- ValidationError ve = new ValidationError(Severity.ERROR, message);
+ return addRuntimeError(Severity.ERROR, message);
+ }
+
+ public synchronized ValidationError addRuntimeError(Severity severity, String message) {
+ ValidationError ve = new ValidationError(severity, message);
if (this.runtimeErrors == null) {
this.runtimeErrors = new LinkedList<ValidationError>();
}
@@ -220,7 +228,7 @@
this.runtimeErrors.remove(0);
}
return ve;
- }
+ }
public synchronized ValidationError addError(ValidationError ve) {
if (this.validationErrors == null) {
@@ -239,7 +247,7 @@
public static class ValidationError implements Serializable{
private static final long serialVersionUID = 2044197069467559527L;
- public enum Severity {ERROR, WARNING};
+ public enum Severity {ERROR, WARNING, INFO};
protected String value;
protected Severity severity;
@@ -315,4 +323,18 @@
this.schemaText = schemaText;
}
+ @Override
+ public List<String> getValidityErrors() {
+ List<String> allErrors = new ArrayList<String>();
+ List<ValidationError> errors = getErrors();
+ if (errors != null && !errors.isEmpty()) {
+ for (ValidationError m:errors) {
+ if (m.getSeverity() == Severity.ERROR) {
+ allErrors.add(m.getValue());
+ }
+ }
+ }
+ return allErrors;
+ }
+
}
Modified: trunk/api/src/main/java/org/teiid/translator/ExecutionFactory.java
===================================================================
--- trunk/api/src/main/java/org/teiid/translator/ExecutionFactory.java 2012-07-13 13:14:44 UTC (rev 4237)
+++ trunk/api/src/main/java/org/teiid/translator/ExecutionFactory.java 2012-07-15 11:25:56 UTC (rev 4238)
@@ -836,7 +836,7 @@
* Implement to provide metadata to the metadata for use by the engine. This is the
* primary method of creating metadata for dynamic VDBs.
* @param metadataFactory
- * @param conn
+ * @param conn may be null if there was an error obtaining a connection
* @throws TranslatorException
*/
public void getMetadata(MetadataFactory metadataFactory, C conn) throws TranslatorException {
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/ConnectorManager.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/ConnectorManager.java 2012-07-13 13:14:44 UTC (rev 4237)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/ConnectorManager.java 2012-07-15 11:25:56 UTC (rev 4238)
@@ -33,10 +33,10 @@
import org.teiid.dqp.message.AtomicRequestID;
import org.teiid.dqp.message.AtomicRequestMessage;
import org.teiid.logging.CommandLogMessage;
-import org.teiid.logging.CommandLogMessage.Event;
import org.teiid.logging.LogConstants;
import org.teiid.logging.LogManager;
import org.teiid.logging.MessageLevel;
+import org.teiid.logging.CommandLogMessage.Event;
import org.teiid.metadata.FunctionMethod;
import org.teiid.query.QueryPlugin;
import org.teiid.query.optimizer.capabilities.BasicSourceCapabilities;
@@ -72,7 +72,7 @@
}
public String getStausMessage() {
- StringBuilder sb = new StringBuilder();
+ String msg = ""; //$NON-NLS-1$
ExecutionFactory<Object, Object> ef = getExecutionFactory();
if(ef != null) {
@@ -86,14 +86,14 @@
}
if (conn == null) {
- sb.append(QueryPlugin.Util.getString("datasource_not_found", this.connectionName)); //$NON-NLS-1$
+ msg = QueryPlugin.Util.getString("datasource_not_found", this.connectionName); //$NON-NLS-1$
}
}
}
else {
- sb.append(QueryPlugin.Util.getString("translator_not_found", this.translatorName)); //$NON-NLS-1$
+ msg = QueryPlugin.Util.getString("translator_not_found", this.translatorName); //$NON-NLS-1$
}
- return sb.toString();
+ return msg;
}
public List<FunctionMethod> getPushDownFunctions(){
Modified: trunk/jboss-integration/src/main/java/org/teiid/jboss/VDBDeployer.java
===================================================================
--- trunk/jboss-integration/src/main/java/org/teiid/jboss/VDBDeployer.java 2012-07-13 13:14:44 UTC (rev 4237)
+++ trunk/jboss-integration/src/main/java/org/teiid/jboss/VDBDeployer.java 2012-07-15 11:25:56 UTC (rev 4238)
@@ -103,22 +103,22 @@
// make sure the translator defined exists in configuration; otherwise add as error
for (ModelMetaData model:deployment.getModelMetaDatas().values()) {
- if (model.isSource() && !model.getSourceNames().isEmpty()) {
- for (String source:model.getSourceNames()) {
-
- String translatorName = model.getSourceTranslatorName(source);
- if (deployment.isOverideTranslator(translatorName)) {
- VDBTranslatorMetaData parent = deployment.getTranslator(translatorName);
- translatorName = parent.getType();
- }
-
- Translator translator = this.translatorRepository.getTranslatorMetaData(translatorName);
- if ( translator == null) {
- String msg = IntegrationPlugin.Util.gs(IntegrationPlugin.Event.TEIID50077, translatorName, deployment.getName(), deployment.getVersion());
- model.addRuntimeError(msg);
- LogManager.logWarning(LogConstants.CTX_RUNTIME, msg);
- }
+ if (!model.isSource() || model.getSourceNames().isEmpty()) {
+ continue;
+ }
+ for (String source:model.getSourceNames()) {
+
+ String translatorName = model.getSourceTranslatorName(source);
+ if (deployment.isOverideTranslator(translatorName)) {
+ VDBTranslatorMetaData parent = deployment.getTranslator(translatorName);
+ translatorName = parent.getType();
}
+
+ Translator translator = this.translatorRepository.getTranslatorMetaData(translatorName);
+ if ( translator == null) {
+ String msg = IntegrationPlugin.Util.gs(IntegrationPlugin.Event.TEIID50077, translatorName, deployment.getName(), deployment.getVersion());
+ LogManager.logWarning(LogConstants.CTX_RUNTIME, msg);
+ }
}
}
@@ -256,6 +256,9 @@
// Need to make the data source service as dependency; otherwise dynamic vdbs will not work correctly.
String dsName = model.getSourceConnectionJndiName(sourceName);
+ if (dsName == null) {
+ continue;
+ }
final ContextNames.BindInfo bindInfo = ContextNames.bindInfoFor(getJndiName(dsName));
svcListener.dependentService(dsName, bindInfo.getBinderServiceName());
}
Modified: trunk/jboss-integration/src/main/java/org/teiid/jboss/VDBService.java
===================================================================
--- trunk/jboss-integration/src/main/java/org/teiid/jboss/VDBService.java 2012-07-13 13:14:44 UTC (rev 4237)
+++ trunk/jboss-integration/src/main/java/org/teiid/jboss/VDBService.java 2012-07-15 11:25:56 UTC (rev 4238)
@@ -24,7 +24,14 @@
import java.io.File;
import java.io.IOException;
import java.text.SimpleDateFormat;
-import java.util.*;
+import java.util.Date;
+import java.util.HashSet;
+import java.util.IdentityHashMap;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.ServiceLoader;
+import java.util.Set;
import java.util.concurrent.Executor;
import java.util.concurrent.atomic.AtomicInteger;
@@ -34,7 +41,13 @@
import org.jboss.modules.ModuleIdentifier;
import org.jboss.modules.ModuleLoadException;
import org.jboss.modules.ModuleLoader;
-import org.jboss.msc.service.*;
+import org.jboss.msc.service.Service;
+import org.jboss.msc.service.ServiceBuilder;
+import org.jboss.msc.service.ServiceContainer;
+import org.jboss.msc.service.ServiceController;
+import org.jboss.msc.service.StartContext;
+import org.jboss.msc.service.StartException;
+import org.jboss.msc.service.StopContext;
import org.jboss.msc.value.InjectedValue;
import org.teiid.adminapi.AdminProcessingException;
import org.teiid.adminapi.Translator;
@@ -42,13 +55,21 @@
import org.teiid.adminapi.impl.VDBMetaData;
import org.teiid.adminapi.impl.VDBMetadataParser;
import org.teiid.adminapi.impl.VDBTranslatorMetaData;
+import org.teiid.adminapi.impl.ModelMetaData.ValidationError.Severity;
import org.teiid.common.buffer.BufferManager;
import org.teiid.core.TeiidException;
-import org.teiid.deployers.*;
+import org.teiid.deployers.CompositeVDB;
+import org.teiid.deployers.RuntimeVDB;
+import org.teiid.deployers.TranslatorUtil;
+import org.teiid.deployers.UDFMetaData;
+import org.teiid.deployers.VDBLifeCycleListener;
+import org.teiid.deployers.VDBRepository;
+import org.teiid.deployers.VDBStatusChecker;
+import org.teiid.deployers.VirtualDatabaseException;
import org.teiid.dqp.internal.datamgr.ConnectorManager;
import org.teiid.dqp.internal.datamgr.ConnectorManagerRepository;
+import org.teiid.dqp.internal.datamgr.TranslatorRepository;
import org.teiid.dqp.internal.datamgr.ConnectorManagerRepository.ConnectorManagerException;
-import org.teiid.dqp.internal.datamgr.TranslatorRepository;
import org.teiid.logging.LogConstants;
import org.teiid.logging.LogManager;
import org.teiid.metadata.Datatype;
@@ -312,7 +333,7 @@
protected void loadMetadata(final VDBMetaData vdb, final ModelMetaData model, final ConnectorManagerRepository cmr, final MetadataRepository metadataRepo, final MetadataStore vdbMetadataStore, final AtomicInteger loadCount) {
String msg = IntegrationPlugin.Util.gs(IntegrationPlugin.Event.TEIID50029,vdb.getName(), vdb.getVersion(), model.getName(), SimpleDateFormat.getInstance().format(new Date()));
- model.addRuntimeError(msg);
+ model.addRuntimeError(Severity.INFO, msg);
LogManager.logInfo(LogConstants.CTX_RUNTIME, msg);
Runnable job = new Runnable() {
@@ -321,7 +342,7 @@
boolean metadataLoaded = false;
boolean cached = false;
- List<String> errorMessages = new ArrayList<String>();
+ Exception ex = null;
final File cachedFile = getSerializer().buildModelFile(vdb, model.getName());
MetadataFactory factory = getSerializer().loadSafe(cachedFile, MetadataFactory.class);
@@ -357,34 +378,26 @@
metadataRepo.loadMetadata(factory, ef, cf);
metadataLoaded = true;
LogManager.logInfo(LogConstants.CTX_RUNTIME, IntegrationPlugin.Util.gs(IntegrationPlugin.Event.TEIID50030,vdb.getName(), vdb.getVersion(), model.getName(), SimpleDateFormat.getInstance().format(new Date())));
- } catch (TranslatorException e) {
- errorMessages.add(e.getMessage());
- LogManager.logInfo(LogConstants.CTX_RUNTIME, IntegrationPlugin.Util.gs(IntegrationPlugin.Event.TEIID50036,vdb.getName(), vdb.getVersion(), model.getName(), e.getMessage()));
+ } catch (Exception e) {
+ ex = e;
}
}
synchronized (vdb) {
if (metadataLoaded) {
-
if (!cached) {
// cache the schema to disk
cacheMetadataStore(model, factory);
}
metadataLoaded(vdb, model, vdbMetadataStore, loadCount, factory);
- }
- else {
- for (String errorMsg:errorMessages) {
- model.addRuntimeError(errorMsg);
- LogManager.logWarning(LogConstants.CTX_RUNTIME, errorMsg);
- }
+ } else {
+ model.addRuntimeError(ex.getMessage());
+ LogManager.logWarning(LogConstants.CTX_RUNTIME, IntegrationPlugin.Util.gs(IntegrationPlugin.Event.TEIID50036,vdb.getName(), vdb.getVersion(), model.getName(), ex.getMessage()));
+ //defer the load to the status checker if/when a source is available/redeployed
+ model.addAttchment(Runnable.class, this);
}
}
-
- if (!metadataLoaded) {
- //defer the load to the status checker if/when a source is available/redeployed
- model.addAttchment(Runnable.class, this);
- }
}
};
Modified: trunk/runtime/src/main/java/org/teiid/deployers/VDBRepository.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/deployers/VDBRepository.java 2012-07-13 13:14:44 UTC (rev 4237)
+++ trunk/runtime/src/main/java/org/teiid/deployers/VDBRepository.java 2012-07-15 11:25:56 UTC (rev 4238)
@@ -338,8 +338,8 @@
if (cm != null) {
String msg = cm.getStausMessage();
if (msg != null && msg.length() > 0) {
- model.addRuntimeError(cm.getStausMessage());
- LogManager.logInfo(LogConstants.CTX_RUNTIME, cm.getStausMessage());
+ model.addRuntimeError(msg);
+ LogManager.logInfo(LogConstants.CTX_RUNTIME, msg);
}
}
}
Modified: trunk/runtime/src/main/java/org/teiid/deployers/VDBStatusChecker.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/deployers/VDBStatusChecker.java 2012-07-13 13:14:44 UTC (rev 4237)
+++ trunk/runtime/src/main/java/org/teiid/deployers/VDBStatusChecker.java 2012-07-15 11:25:56 UTC (rev 4238)
@@ -26,10 +26,12 @@
import java.util.concurrent.Executor;
import org.teiid.adminapi.AdminProcessingException;
-import org.teiid.adminapi.Model;
+import org.teiid.adminapi.VDB.Status;
import org.teiid.adminapi.impl.ModelMetaData;
+import org.teiid.adminapi.impl.SourceMappingMetadata;
import org.teiid.adminapi.impl.VDBMetaData;
import org.teiid.adminapi.impl.VDBTranslatorMetaData;
+import org.teiid.adminapi.impl.ModelMetaData.ValidationError.Severity;
import org.teiid.core.TeiidException;
import org.teiid.dqp.internal.datamgr.ConnectorManager;
import org.teiid.dqp.internal.datamgr.ConnectorManagerRepository;
@@ -44,26 +46,30 @@
private static final String JAVA_CONTEXT = "java:/"; //$NON-NLS-1$
private TranslatorRepository translatorRepository;
+ /**
+ * @param translatorName
+ */
public void translatorAdded(String translatorName) {
- resourceAdded(translatorName, true);
}
+ /**
+ * @param translatorName
+ */
public void translatorRemoved(String translatorName) {
- resourceRemoved(translatorName, true);
}
public void dataSourceAdded(String dataSourceName) {
if (dataSourceName.startsWith(JAVA_CONTEXT)) {
dataSourceName = dataSourceName.substring(5);
}
- resourceAdded(dataSourceName, false);
+ resourceAdded(dataSourceName);
}
public void dataSourceRemoved(String dataSourceName) {
if (dataSourceName.startsWith(JAVA_CONTEXT)) {
dataSourceName = dataSourceName.substring(5);
}
- resourceRemoved(dataSourceName, false);
+ resourceRemoved(dataSourceName);
}
public void dataSourceReplaced(String vdbName, int vdbVersion,
@@ -82,7 +88,7 @@
ExecutionFactory<Object, Object> ef = cm.getExecutionFactory();
boolean dsReplaced = false;
- if (!cm.getConnectionName().equals(dsName)){
+ if ((dsName != null && !dsName.equals(cm.getConnectionName())) || (dsName == null && cm.getConnectionName() != null)) {
LogManager.logInfo(LogConstants.CTX_RUNTIME, RuntimePlugin.Util.gs(RuntimePlugin.Event.TEIID40076, vdb.getName(), vdb.getVersion(), model.getSourceTranslatorName(sourceName), dsName));
cm = new ConnectorManager(translatorName, dsName);
cm.setExecutionFactory(ef);
@@ -111,97 +117,104 @@
}
if (dsReplaced) {
- resourceAdded(dsName, false);
+ ArrayList<Runnable> runnables = new ArrayList<Runnable>(1);
+ checkStatus(runnables, vdb, model, cm);
+ updateVDB(runnables, vdb);
}
}
}
- public void resourceAdded(String resourceName, boolean translator) {
+ public void resourceAdded(String resourceName) {
List<Runnable> runnables = new ArrayList<Runnable>();
for (VDBMetaData vdb:getVDBRepository().getVDBs()) {
synchronized (vdb) {
ConnectorManagerRepository cmr = vdb.getAttachment(ConnectorManagerRepository.class);
-
+ boolean usesResourse = false;
for (ModelMetaData model:vdb.getModelMetaDatas().values()) {
if (!model.hasRuntimeErrors()) {
continue;
}
- String sourceName = getSourceName(resourceName, model, translator);
+ String sourceName = getSourceName(resourceName, model);
if (sourceName == null) {
continue;
}
+ usesResourse = true;
ConnectorManager cm = cmr.getConnectorManager(sourceName);
- String status = cm.getStausMessage();
- if (status != null && status.length() > 0) {
- model.addRuntimeError(status);
- LogManager.logInfo(LogConstants.CTX_RUNTIME, status);
- } else {
- //get the pending metadata load
- Runnable r = model.removeAttachment(Runnable.class);
- if (r != null) {
- runnables.add(r);
- } else {
- model.clearRuntimeErrors();
- }
- }
+ checkStatus(runnables, vdb, model, cm);
}
- boolean valid = !vdb.hasErrors();
-
- if (!runnables.isEmpty()) {
- //the task themselves will set the status on completion/failure
- for (Runnable runnable : runnables) {
- getExecutor().execute(runnable);
- }
- runnables.clear();
- } else if (valid) {
- LogManager.logInfo(LogConstants.CTX_RUNTIME, RuntimePlugin.Util.gs(RuntimePlugin.Event.TEIID40003,vdb.getName(), vdb.getVersion(), vdb.getStatus()));
+ if (usesResourse) {
+ updateVDB(runnables, vdb);
}
}
}
}
+
+ private void updateVDB(List<Runnable> runnables, VDBMetaData vdb) {
+ if (!runnables.isEmpty()) {
+ //the task themselves will set the status on completion/failure
+ for (Runnable runnable : runnables) {
+ getExecutor().execute(runnable);
+ }
+ runnables.clear();
+ } else if (vdb.hasErrors()) {
+ LogManager.logInfo(LogConstants.CTX_RUNTIME, RuntimePlugin.Util.gs(RuntimePlugin.Event.TEIID40003,vdb.getName(), vdb.getVersion(), vdb.getStatus()));
+ }
+ }
+
+ private void checkStatus(List<Runnable> runnables, VDBMetaData vdb,
+ ModelMetaData model, ConnectorManager cm) {
+ //get the pending metadata load
+ Runnable r = model.removeAttachment(Runnable.class);
+ if (r != null) {
+ runnables.add(r);
+ } else {
+ String status = cm.getStausMessage();
+ if (status != null && status.length() > 0) {
+ Severity severity = vdb.getStatus() == Status.LOADING?Severity.WARNING:Severity.ERROR;
+ model.addRuntimeError(severity, status);
+ LogManager.logInfo(LogConstants.CTX_RUNTIME, status);
+ } else if (vdb.getStatus() != Status.LOADING){
+ model.clearRuntimeErrors();
+ }
+ }
+ }
- public void resourceRemoved(String resourceName, boolean translator) {
+ public void resourceRemoved(String resourceName) {
for (VDBMetaData vdb:getVDBRepository().getVDBs()) {
synchronized (vdb) {
- for (Model m:vdb.getModels()) {
- ModelMetaData model = (ModelMetaData)m;
-
- String sourceName = getSourceName(resourceName, model, translator);
- if (sourceName != null) {
- String msg = null;
- if (translator) {
- msg = RuntimePlugin.Util.gs(RuntimePlugin.Event.TEIID40005, vdb.getName(), vdb.getVersion(), model.getSourceTranslatorName(sourceName));
- }
- else {
- msg = RuntimePlugin.Util.gs(RuntimePlugin.Event.TEIID40012, vdb.getName(), vdb.getVersion(), resourceName);
- }
- model.addRuntimeError(msg);
- LogManager.logInfo(LogConstants.CTX_RUNTIME, msg);
- LogManager.logInfo(LogConstants.CTX_RUNTIME, RuntimePlugin.Util.gs(RuntimePlugin.Event.TEIID40003,vdb.getName(), vdb.getVersion(), vdb.getStatus()));
+ ConnectorManagerRepository cmr = vdb.getAttachment(ConnectorManagerRepository.class);
+ for (ModelMetaData model:vdb.getModelMetaDatas().values()) {
+ String sourceName = getSourceName(resourceName, model);
+ if (sourceName == null) {
+ continue;
}
+ ConnectorManager cm = cmr.getConnectorManager(sourceName);
+ if (cm.getExecutionFactory().isSourceRequired()) {
+ String msg = RuntimePlugin.Util.gs(RuntimePlugin.Event.TEIID40012, vdb.getName(), vdb.getVersion(), resourceName);
+ Severity severity = vdb.getStatus() == Status.LOADING?Severity.WARNING:Severity.ERROR;
+ model.addRuntimeError(severity, msg);
+ LogManager.logInfo(LogConstants.CTX_RUNTIME, msg);
+ }
}
}
}
}
- private String getSourceName(String translatorName, ModelMetaData model, boolean translator) {
- for (String sourceName:model.getSourceNames()) {
- if (translator) {
- if (translatorName.equals(model.getSourceTranslatorName(sourceName))) {
- return sourceName;
- }
- } else {
- String jndiName = model.getSourceConnectionJndiName(sourceName);
- if (jndiName.startsWith(JAVA_CONTEXT)) {
- jndiName = jndiName.substring(5);
- }
- if (translatorName.equals(jndiName)) {
- return sourceName;
- }
+ private String getSourceName(String factoryName, ModelMetaData model) {
+ for (SourceMappingMetadata source:model.getSources().values()) {
+ String jndiName = source.getConnectionJndiName();
+ if (jndiName == null) {
+ continue;
}
+ if (jndiName.startsWith(JAVA_CONTEXT)) {
+ jndiName = jndiName.substring(5);
+ }
+ if (factoryName.equals(jndiName)) {
+ return source.getName();
+ }
}
return null;
}
Modified: trunk/runtime/src/main/java/org/teiid/runtime/RuntimePlugin.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/runtime/RuntimePlugin.java 2012-07-13 13:14:44 UTC (rev 4237)
+++ trunk/runtime/src/main/java/org/teiid/runtime/RuntimePlugin.java 2012-07-15 11:25:56 UTC (rev 4238)
@@ -35,7 +35,6 @@
TEIID40001, // undefined translator properties
TEIID40002, // failed to load ODBC metadata
TEIID40003, // VDB status
- TEIID40005, // datasource or translator not found
TEIID40007, // keep alive failed
TEIID40008, // expired session
TEIID40009, // terminate session
Modified: trunk/runtime/src/main/resources/org/teiid/runtime/i18n.properties
===================================================================
--- trunk/runtime/src/main/resources/org/teiid/runtime/i18n.properties 2012-07-13 13:14:44 UTC (rev 4237)
+++ trunk/runtime/src/main/resources/org/teiid/runtime/i18n.properties 2012-07-15 11:25:56 UTC (rev 4238)
@@ -47,7 +47,6 @@
TEIID40035=VDB with given name and version already exists! {0}.{1}
TEIID40021=System.vdb not found in classpath
-TEIID40005=For {0}.{1} VDB, Translator "{2}" not found.
TEIID40012=For {0}.{1} VDB, Data Source "{2}" not found.
TEIID40076=For {0}.{1} VDB, Data Source "{2}" replaced with "{3}"
TEIID40024={0} invalid type of class specified. Must be of type org.teiid.connector.api.Connector
Modified: trunk/test-integration/common/src/test/java/org/teiid/arquillian/IntegrationTestDeployment.java
===================================================================
--- trunk/test-integration/common/src/test/java/org/teiid/arquillian/IntegrationTestDeployment.java 2012-07-13 13:14:44 UTC (rev 4237)
+++ trunk/test-integration/common/src/test/java/org/teiid/arquillian/IntegrationTestDeployment.java 2012-07-15 11:25:56 UTC (rev 4238)
@@ -79,7 +79,11 @@
AdminUtil.createDataSource(admin, "Oracle11_PushDS", "h2", props);
admin.deploy("fake.jar",new FileInputStream(UnitTestUtil.getTestDataFile("fake.jar")));
- admin.deploy("chained-vdb.xml",new FileInputStream(UnitTestUtil.getTestDataFile("chained-vdb.xml")));
+ try {
+ admin.deploy("chained-vdb.xml",new FileInputStream(UnitTestUtil.getTestDataFile("chained-vdb.xml")));
+ } finally {
+ admin.undeploy("fake.jar");
+ }
}
@Test
13 years, 5 months
teiid SVN: r4237 - trunk/build/kits/jboss-as7/docs/teiid.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2012-07-13 09:14:44 -0400 (Fri, 13 Jul 2012)
New Revision: 4237
Modified:
trunk/build/kits/jboss-as7/docs/teiid/teiid-releasenotes.html
Log:
TEIID-2101 adding a KI
Modified: trunk/build/kits/jboss-as7/docs/teiid/teiid-releasenotes.html
===================================================================
--- trunk/build/kits/jboss-as7/docs/teiid/teiid-releasenotes.html 2012-07-13 13:09:56 UTC (rev 4236)
+++ trunk/build/kits/jboss-as7/docs/teiid/teiid-releasenotes.html 2012-07-13 13:14:44 UTC (rev 4237)
@@ -196,7 +196,8 @@
<li>For compatibility with the 7.0 release if a stored procedure parameter list begins with identifier=, then it will be parsed as a named parameter invocation even if the intent was to use a comparison predicate
as the first parameter value. The workaround is to use nesting parens, e.g. call proc((identifier=value), ...), which clarifies that this is positional value. This workaround will not be needed in later releases.
<li><a url="https://issues.jboss.org/browse/TEIID-1511">TEIID-1511<a/> - When a VDB is deployed and undeployed a socket is left open, which may lead to "too manay open files". Check the defect comments for details.
- <li>TEIID-1648 - Teradata lobs can only be consistently read from an embedded client (with the default option to use the calling thread) and in single threaded mode (transactional or thread-count-for-source-concurrency=1). Usage of Teradata lobs under any other configuration is unlikely to work.
+ <li>TEIID-1648 - Teradata lobs can only be consistently read from an embedded client (with the default option to use the calling thread) and in single threaded mode (transactional or thread-count-for-source-concurrency=1). Usage of Teradata lobs under any other configuration is unlikely to work.
+ <li>TEIID-2101 - Statement.setMaxRows is not used for cached result sets or when getting a result set from a CallableStatement procedure that returns parameters.
</ul>
<h4>from 7.0</h4>
<ul>
13 years, 5 months
teiid SVN: r4236 - in trunk: client/src/main/resources/org/teiid/jdbc and 3 other directories.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2012-07-13 09:09:56 -0400 (Fri, 13 Jul 2012)
New Revision: 4236
Modified:
trunk/client/src/main/java/org/teiid/jdbc/DataTypeTransformer.java
trunk/client/src/main/java/org/teiid/jdbc/ResultSetImpl.java
trunk/client/src/main/resources/org/teiid/jdbc/i18n.properties
trunk/common-core/src/main/java/org/teiid/core/types/ClobType.java
trunk/engine/src/main/java/org/teiid/query/metadata/TempMetadataAdapter.java
trunk/engine/src/main/java/org/teiid/query/metadata/TransformationMetadata.java
trunk/engine/src/main/java/org/teiid/query/resolver/QueryResolver.java
Log:
TEIID-2100 adding getObject support and correcting misc. warnings
Modified: trunk/client/src/main/java/org/teiid/jdbc/DataTypeTransformer.java
===================================================================
--- trunk/client/src/main/java/org/teiid/jdbc/DataTypeTransformer.java 2012-07-13 13:03:44 UTC (rev 4235)
+++ trunk/client/src/main/java/org/teiid/jdbc/DataTypeTransformer.java 2012-07-13 13:09:56 UTC (rev 4236)
@@ -44,7 +44,6 @@
import org.teiid.core.types.BinaryType;
import org.teiid.core.types.DataTypeManager;
import org.teiid.core.types.TransformationException;
-import org.teiid.core.types.DataTypeManager.DefaultDataClasses;
import org.teiid.core.util.ReaderInputStream;
@@ -65,29 +64,69 @@
* @throws SQLException if failed to transform to the desired datatype
*/
static final BigDecimal getBigDecimal(Object value) throws SQLException {
- return transform(value, BigDecimal.class, "BigDecimal"); //$NON-NLS-1$
+ return transform(value, BigDecimal.class);
}
- private static final <T> T transform(Object value, Class<T> type, String typeName) throws SQLException {
- return transform(value, type, type, typeName);
- }
-
- private static final <T> T transform(Object value, Class<T> targetType, Class<?> runtimeType, String typeName) throws SQLException {
+ static final <T> T transform(Object value, Class<T> targetType) throws SQLException {
if (value == null || targetType.isAssignableFrom(value.getClass())) {
return targetType.cast(value);
}
+ if (targetType == byte[].class) {
+ if (value instanceof Blob) {
+ Blob blob = (Blob)value;
+ long length = blob.length();
+ if (length > Integer.MAX_VALUE) {
+ throw new TeiidSQLException(JDBCPlugin.Util.getString("DataTypeTransformer.blob_too_big")); //$NON-NLS-1$
+ }
+ return targetType.cast(blob.getBytes(1, (int)length));
+ } else if (value instanceof String) {
+ return targetType.cast(((String)value).getBytes());
+ } else if (value instanceof BinaryType) {
+ return targetType.cast(((BinaryType)value).getBytesDirect());
+ }
+ } else if (targetType == String.class) {
+ if (value instanceof SQLXML) {
+ return targetType.cast(((SQLXML)value).getString());
+ } else if (value instanceof Clob) {
+ Clob c = (Clob)value;
+ long length = c.length();
+ if (length == 0) {
+ //there is a bug in SerialClob with 0 length
+ return targetType.cast(""); //$NON-NLS-1$
+ }
+ return targetType.cast(c.getSubString(1, length>Integer.MAX_VALUE?Integer.MAX_VALUE:(int)length));
+ }
+ }
try {
- return targetType.cast(DataTypeManager.transformValue(DataTypeManager.convertToRuntimeType(value), runtimeType));
+ return targetType.cast(DataTypeManager.transformValue(DataTypeManager.convertToRuntimeType(value), getRuntimeType(targetType)));
} catch (TransformationException e) {
String valueStr = value.toString();
if (valueStr.length() > 20) {
valueStr = valueStr.substring(0, 20) + "..."; //$NON-NLS-1$
}
- String msg = JDBCPlugin.Util.getString("DataTypeTransformer.Err_converting", valueStr, typeName); //$NON-NLS-1$
+ String msg = JDBCPlugin.Util.getString("DataTypeTransformer.Err_converting", valueStr, targetType.getSimpleName()); //$NON-NLS-1$
throw TeiidSQLException.create(e, msg);
}
}
+ static final <T> Class<?> getRuntimeType(Class<T> type) {
+ Class<?> runtimeType = type;
+ if (!DataTypeManager.getAllDataTypeClasses().contains(type)) {
+ if (type == Clob.class) {
+ runtimeType = DataTypeManager.DefaultDataClasses.CLOB;
+ } else if (type == Blob.class) {
+ runtimeType = DataTypeManager.DefaultDataClasses.BLOB;
+ } else if (type == SQLXML.class) {
+ runtimeType = DataTypeManager.DefaultDataClasses.XML;
+ } else if (type == byte[].class) {
+ runtimeType = DataTypeManager.DefaultDataClasses.VARBINARY;
+ } else {
+ runtimeType = DataTypeManager.DefaultDataClasses.OBJECT;
+ }
+ }
+ return runtimeType;
+ }
+
/**
* Gets an object value and transforms it into a boolean
* @param value, the object to be transformed
@@ -98,7 +137,7 @@
if (value == null) {
return false;
}
- return transform(value, Boolean.class, "Boolean"); //$NON-NLS-1$
+ return transform(value, Boolean.class);
}
/**
@@ -111,31 +150,15 @@
if (value == null) {
return 0;
}
- return transform(value, Byte.class, "Byte"); //$NON-NLS-1$
+ return transform(value, Byte.class);
}
static final byte[] getBytes(Object value) throws SQLException {
- if (value == null) {
- return null;
- } else if (value instanceof byte[]) {
- return (byte[])value;
- } else if (value instanceof Blob) {
- Blob blob = (Blob)value;
- long length = blob.length();
- if (length > Integer.MAX_VALUE) {
- throw new TeiidSQLException(JDBCPlugin.Util.getString("DataTypeTransformer.blob_too_big")); //$NON-NLS-1$
- }
- return blob.getBytes(1, (int)length);
- } else if (value instanceof String) {
- return ((String)value).getBytes();
- } else if (value instanceof BinaryType) {
- return ((BinaryType)value).getBytesDirect();
- }
- throw new TeiidSQLException(JDBCPlugin.Util.getString("DataTypeTransformer.cannot_get_bytes")); //$NON-NLS-1$
+ return transform(value, byte[].class);
}
static final Character getCharacter(Object value) throws SQLException {
- return transform(value, Character.class, "Character"); //$NON-NLS-1$
+ return transform(value, Character.class);
}
/**
@@ -146,7 +169,7 @@
* @throws SQLException if failed to transform to the desired datatype
*/
static final Date getDate(Object value) throws SQLException {
- return transform(value, Date.class, "Date"); //$NON-NLS-1$
+ return transform(value, Date.class);
}
/**
@@ -159,7 +182,7 @@
if (value == null) {
return 0;
}
- return transform(value, Double.class, "Double"); //$NON-NLS-1$
+ return transform(value, Double.class);
}
/**
@@ -172,7 +195,7 @@
if (value == null) {
return 0;
}
- return transform(value, Float.class, "Float"); //$NON-NLS-1$
+ return transform(value, Float.class);
}
/**
@@ -185,7 +208,7 @@
if (value == null) {
return 0;
}
- return transform(value, Integer.class, "Integer"); //$NON-NLS-1$
+ return transform(value, Integer.class);
}
/**
@@ -198,7 +221,7 @@
if (value == null) {
return 0;
}
- return transform(value, Long.class, "Long"); //$NON-NLS-1$
+ return transform(value, Long.class);
}
/**
@@ -211,7 +234,7 @@
if (value == null) {
return 0;
}
- return transform(value, Short.class, "Short"); //$NON-NLS-1$
+ return transform(value, Short.class);
}
/**
@@ -222,7 +245,7 @@
* @throws SQLException if failed to transform to the desired datatype
*/
static final Time getTime(Object value) throws SQLException {
- return transform(value, Time.class, "Time"); //$NON-NLS-1$
+ return transform(value, Time.class);
}
/**
@@ -233,22 +256,11 @@
* @throws SQLException if failed to transform to the desired datatype
*/
static final Timestamp getTimestamp(Object value) throws SQLException {
- return transform(value, Timestamp.class, "Timestamp"); //$NON-NLS-1$
+ return transform(value, Timestamp.class);
}
static final String getString(Object value) throws SQLException {
- if (value instanceof SQLXML) {
- return ((SQLXML)value).getString();
- } else if (value instanceof Clob) {
- Clob c = (Clob)value;
- long length = c.length();
- if (length == 0) {
- //there is a bug in SerialClob with 0 length
- return ""; //$NON-NLS-1$
- }
- return c.getSubString(1, length>Integer.MAX_VALUE?Integer.MAX_VALUE:(int)length);
- }
- return transform(value, String.class, "String"); //$NON-NLS-1$
+ return transform(value, String.class);
}
/**
@@ -259,7 +271,7 @@
* @throws SQLException if failed to transform to the desired datatype
*/
static final Blob getBlob(Object value) throws SQLException {
- return transform(value, Blob.class, DefaultDataClasses.BLOB, "Blob"); //$NON-NLS-1$
+ return transform(value, Blob.class);
}
/**
@@ -270,7 +282,7 @@
* @throws SQLException if failed to transform to the desired datatype
*/
static final Clob getClob(Object value) throws SQLException {
- return transform(value, Clob.class, DefaultDataClasses.CLOB, "Clob"); //$NON-NLS-1$
+ return transform(value, Clob.class);
}
/**
@@ -280,7 +292,7 @@
* @throws SQLException if failed to transform to the desired datatype
*/
static final SQLXML getSQLXML(Object value) throws SQLException {
- return transform(value, SQLXML.class, DefaultDataClasses.XML, "SQLXML"); //$NON-NLS-1$
+ return transform(value, SQLXML.class);
}
static final Reader getCharacterStream(Object value) throws SQLException {
@@ -321,6 +333,9 @@
if (clob == null) {
return null;
}
+ if (clob instanceof NClob) {
+ return (NClob)clob;
+ }
return (NClob) Proxy.newProxyInstance(Thread.currentThread().getContextClassLoader(), new Class[] {NClob.class}, new InvocationHandler() {
@Override
Modified: trunk/client/src/main/java/org/teiid/jdbc/ResultSetImpl.java
===================================================================
--- trunk/client/src/main/java/org/teiid/jdbc/ResultSetImpl.java 2012-07-13 13:03:44 UTC (rev 4235)
+++ trunk/client/src/main/java/org/teiid/jdbc/ResultSetImpl.java 2012-07-13 13:09:56 UTC (rev 4236)
@@ -1667,11 +1667,12 @@
}
public <T> T getObject(int columnIndex, Class<T> type) throws SQLException {
- throw SqlUtil.createFeatureNotSupportedException();
+ return DataTypeTransformer.transform(getObject(columnIndex), type);
}
public <T> T getObject(String columnLabel, Class<T> type)
throws SQLException {
- throw SqlUtil.createFeatureNotSupportedException();
+ return DataTypeTransformer.transform(getObject(columnLabel), type);
}
+
}
Modified: trunk/client/src/main/resources/org/teiid/jdbc/i18n.properties
===================================================================
--- trunk/client/src/main/resources/org/teiid/jdbc/i18n.properties 2012-07-13 13:03:44 UTC (rev 4235)
+++ trunk/client/src/main/resources/org/teiid/jdbc/i18n.properties 2012-07-13 13:09:56 UTC (rev 4236)
@@ -107,7 +107,6 @@
MMStatement.Bad_timeout_value=Invalid timeout value supplied. Valid range is greater than or equal to zero.
WarningUtil.Failures_occurred=Partial results failures occurred
DataTypeTransformer.blob_too_big=The blob value is too large for the max supported length of 2147483647 bytes
-DataTypeTransformer.cannot_get_bytes=Cannot convert this value to a byte array.
WrapperImpl.wrong_class=Wrapped object is not an instance of {0}
MMXAConnection.rolling_back=rolling back transaction.
MMXAConnection.rolling_back_error=Error while rolling back transaction.
Modified: trunk/common-core/src/main/java/org/teiid/core/types/ClobType.java
===================================================================
--- trunk/common-core/src/main/java/org/teiid/core/types/ClobType.java 2012-07-13 13:03:44 UTC (rev 4235)
+++ trunk/common-core/src/main/java/org/teiid/core/types/ClobType.java 2012-07-13 13:09:56 UTC (rev 4236)
@@ -31,6 +31,7 @@
import java.io.StringWriter;
import java.io.Writer;
import java.sql.Clob;
+import java.sql.NClob;
import java.sql.SQLException;
import org.teiid.core.CorePlugin;
@@ -44,7 +45,7 @@
* This is wrapper on top of a "clob" object, which implements the "java.sql.Clob"
* interface. This class also implements the Streamable interface
*/
-public final class ClobType extends Streamable<Clob> implements Clob, Sequencable, Comparable<ClobType> {
+public final class ClobType extends Streamable<Clob> implements Clob, NClob, Sequencable, Comparable<ClobType> {
private static final long serialVersionUID = 2753412502127824104L;
Modified: trunk/engine/src/main/java/org/teiid/query/metadata/TempMetadataAdapter.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/metadata/TempMetadataAdapter.java 2012-07-13 13:03:44 UTC (rev 4235)
+++ trunk/engine/src/main/java/org/teiid/query/metadata/TempMetadataAdapter.java 2012-07-13 13:09:56 UTC (rev 4236)
@@ -289,8 +289,11 @@
public QueryNode getVirtualPlan(Object groupID)
throws TeiidComponentException, QueryMetadataException {
- if (this.queryNodes != null && this.queryNodes.containsKey(groupID)) {
- return this.queryNodes.get(groupID);
+ if (this.queryNodes != null) {
+ QueryNode node = this.queryNodes.get(groupID);
+ if (node != null) {
+ return node;
+ }
}
if(groupID instanceof TempMetadataID && !(actualMetadata instanceof TempMetadataAdapter)) {
Modified: trunk/engine/src/main/java/org/teiid/query/metadata/TransformationMetadata.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/metadata/TransformationMetadata.java 2012-07-13 13:03:44 UTC (rev 4235)
+++ trunk/engine/src/main/java/org/teiid/query/metadata/TransformationMetadata.java 2012-07-13 13:09:56 UTC (rev 4236)
@@ -487,10 +487,10 @@
LiveTableQueryNode queryNode = new LiveTableQueryNode(tableRecord);
// get any bindings and add them onto the query node
- List bindings = tableRecord.getBindings();
+ List<String> bindings = tableRecord.getBindings();
if(bindings != null) {
- for(Iterator bindIter = bindings.iterator();bindIter.hasNext();) {
- queryNode.addBinding((String)bindIter.next());
+ for(Iterator<String> bindIter = bindings.iterator();bindIter.hasNext();) {
+ queryNode.addBinding(bindIter.next());
}
}
@@ -624,16 +624,16 @@
return 0;
}
- public Collection getIndexesInGroup(final Object groupID) throws TeiidComponentException, QueryMetadataException {
+ public Collection<KeyRecord> getIndexesInGroup(final Object groupID) throws TeiidComponentException, QueryMetadataException {
ArgCheck.isInstanceOf(Table.class, groupID);
return ((Table)groupID).getIndexes();
}
- public Collection getUniqueKeysInGroup(final Object groupID)
+ public Collection<KeyRecord> getUniqueKeysInGroup(final Object groupID)
throws TeiidComponentException, QueryMetadataException {
ArgCheck.isInstanceOf(Table.class, groupID);
Table tableRecordImpl = (Table)groupID;
- ArrayList<ColumnSet> result = new ArrayList<ColumnSet>(tableRecordImpl.getUniqueKeys());
+ ArrayList<KeyRecord> result = new ArrayList<KeyRecord>(tableRecordImpl.getUniqueKeys());
if (tableRecordImpl.getPrimaryKey() != null) {
result.add(tableRecordImpl.getPrimaryKey());
}
@@ -645,7 +645,7 @@
return result;
}
- public Collection getForeignKeysInGroup(final Object groupID)
+ public Collection<ForeignKey> getForeignKeysInGroup(final Object groupID)
throws TeiidComponentException, QueryMetadataException {
ArgCheck.isInstanceOf(Table.class, groupID);
return ((Table)groupID).getForeignKeys();
@@ -658,26 +658,26 @@
return fkRecord.getPrimaryKey();
}
- public Collection getAccessPatternsInGroup(final Object groupID)
+ public Collection<KeyRecord> getAccessPatternsInGroup(final Object groupID)
throws TeiidComponentException, QueryMetadataException {
ArgCheck.isInstanceOf(Table.class, groupID);
return ((Table)groupID).getAccessPatterns();
}
- public List getElementIDsInIndex(final Object index) throws TeiidComponentException, QueryMetadataException {
+ public List<Column> getElementIDsInIndex(final Object index) throws TeiidComponentException, QueryMetadataException {
ArgCheck.isInstanceOf(ColumnSet.class, index);
- return ((ColumnSet)index).getColumns();
+ return ((ColumnSet<?>)index).getColumns();
}
- public List getElementIDsInKey(final Object key) throws TeiidComponentException, QueryMetadataException {
+ public List<Column> getElementIDsInKey(final Object key) throws TeiidComponentException, QueryMetadataException {
ArgCheck.isInstanceOf(ColumnSet.class, key);
- return ((ColumnSet)key).getColumns();
+ return ((ColumnSet<?>)key).getColumns();
}
- public List getElementIDsInAccessPattern(final Object accessPattern)
+ public List<Column> getElementIDsInAccessPattern(final Object accessPattern)
throws TeiidComponentException, QueryMetadataException {
ArgCheck.isInstanceOf(ColumnSet.class, accessPattern);
- return ((ColumnSet)accessPattern).getColumns();
+ return ((ColumnSet<?>)accessPattern).getColumns();
}
public boolean isXMLGroup(final Object groupID) throws TeiidComponentException, QueryMetadataException {
Modified: trunk/engine/src/main/java/org/teiid/query/resolver/QueryResolver.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/resolver/QueryResolver.java 2012-07-13 13:03:44 UTC (rev 4235)
+++ trunk/engine/src/main/java/org/teiid/query/resolver/QueryResolver.java 2012-07-13 13:09:56 UTC (rev 4236)
@@ -424,7 +424,7 @@
QueryNode cachedNode = (QueryNode)qmi.getFromMetadataCache(virtualGroup.getMetadataID(), cacheString);
if (cachedNode == null) {
Command result = qnode.getCommand();
- List bindings = null;
+ List<String> bindings = null;
if (result == null) {
try {
result = QueryParser.getQueryParser().parseCommand(qnode.getQuery());
13 years, 5 months
teiid SVN: r4235 - in trunk: test-integration/common/src/test/java/org/teiid/jdbc and 1 other directory.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2012-07-13 09:03:44 -0400 (Fri, 13 Jul 2012)
New Revision: 4235
Modified:
trunk/engine/src/main/java/org/teiid/dqp/internal/process/CachedResults.java
trunk/engine/src/main/java/org/teiid/dqp/internal/process/RequestWorkItem.java
trunk/test-integration/common/src/test/java/org/teiid/jdbc/TestResultsCache.java
Log:
TEIID-2098 ensuring maxrows does not cause invalid results with cache entries
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/process/CachedResults.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/process/CachedResults.java 2012-07-12 18:24:56 UTC (rev 4234)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/CachedResults.java 2012-07-13 13:03:44 UTC (rev 4235)
@@ -53,6 +53,7 @@
private CacheHint hint;
private String uuid;
private boolean hasLobs;
+ private int rowLimit;
private AccessInfo accessInfo = new AccessInfo();
@@ -125,4 +126,12 @@
return accessInfo;
}
+ public int getRowLimit() {
+ return rowLimit;
+ }
+
+ public void setRowLimit(int rowLimit) {
+ this.rowLimit = rowLimit;
+ }
+
}
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/process/RequestWorkItem.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/process/RequestWorkItem.java 2012-07-12 18:24:56 UTC (rev 4234)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/RequestWorkItem.java 2012-07-13 13:03:44 UTC (rev 4235)
@@ -379,14 +379,7 @@
sendResultsIfNeeded(null);
this.resultsBuffer = collector.collectTuples();
if (!doneProducingBatches) {
- doneProducingBatches();
- //TODO: we could perform more tracking to know what source lobs are in use
- if (this.resultsBuffer.getLobCount() == 0) {
- for (DataTierTupleSource connectorRequest : getConnectorRequests()) {
- connectorRequest.fullyCloseSource();
- }
- }
- addToCache();
+ done();
}
}
if (this.transactionState == TransactionState.ACTIVE) {
@@ -516,12 +509,14 @@
cachable = cacheId.setParameters(requestMsg.getParameterValues());
if (cachable) {
CachedResults cr = rsCache.get(cacheId);
- if (cr != null) {
+ //check that there are enough cached results
+ //TODO: possibly ignore max rows for caching
+ if (cr != null && (cr.getRowLimit() == 0 || (requestMsg.getRowLimit() != 0 && requestMsg.getRowLimit() <= cr.getRowLimit()))) {
this.resultsBuffer = cr.getResults();
request.initMetadata();
this.originalCommand = cr.getCommand(requestMsg.getCommandString(), request.metadata, pi);
if (!request.validateAccess(requestMsg.getCommands(), this.originalCommand, CommandType.CACHED)) {
- this.doneProducingBatches();
+ doneProducingBatches();
return;
}
LogManager.logDetail(LogConstants.CTX_DQP, requestID, "Cached result command to be modified, will not use the cached results", cacheId); //$NON-NLS-1$
@@ -551,8 +546,7 @@
super.flushBatchDirect(batch, add);
}
if (batch.getTerminationFlag()) {
- doneProducingBatches();
- addToCache();
+ done();
}
synchronized (lobStreams) {
if (resultsBuffer.isLobs()) {
@@ -618,6 +612,9 @@
CachedResults cr = new CachedResults();
cr.setCommand(originalCommand);
cr.setResults(resultsBuffer, processor.getProcessorPlan());
+ if (requestMsg.getRowLimit() > 0 && resultsBuffer.getRowCount() == requestMsg.getRowLimit()) {
+ cr.setRowLimit(resultsBuffer.getRowCount());
+ }
if (originalCommand.getCacheHint() != null) {
LogManager.logDetail(LogConstants.CTX_DQP, requestID, "Using cache hint", originalCommand.getCacheHint()); //$NON-NLS-1$
resultsBuffer.setPrefersMemory(originalCommand.getCacheHint().isPrefersMemory());
@@ -973,6 +970,17 @@
}
}
+ private void done() {
+ doneProducingBatches();
+ //TODO: we could perform more tracking to know what source lobs are in use
+ if (this.resultsBuffer.getLobCount() == 0) {
+ for (DataTierTupleSource connectorRequest : getConnectorRequests()) {
+ connectorRequest.fullyCloseSource();
+ }
+ }
+ addToCache();
+ }
+
private void doneProducingBatches() {
this.doneProducingBatches = true;
dqpCore.finishProcessing(this);
Modified: trunk/test-integration/common/src/test/java/org/teiid/jdbc/TestResultsCache.java
===================================================================
--- trunk/test-integration/common/src/test/java/org/teiid/jdbc/TestResultsCache.java 2012-07-12 18:24:56 UTC (rev 4234)
+++ trunk/test-integration/common/src/test/java/org/teiid/jdbc/TestResultsCache.java 2012-07-13 13:03:44 UTC (rev 4235)
@@ -26,9 +26,13 @@
import java.sql.Connection;
import java.sql.ResultSet;
+import java.sql.SQLException;
import java.sql.Statement;
+import org.junit.After;
+import org.junit.AfterClass;
import org.junit.Before;
+import org.junit.BeforeClass;
import org.junit.Test;
import org.teiid.core.util.UnitTestUtil;
@@ -37,13 +41,25 @@
public class TestResultsCache {
private Connection conn;
+ private static FakeServer server;
+
+ @BeforeClass public static void oneTimeSetup() throws Exception {
+ server = new FakeServer(true);
+ server.deployVDB("test", UnitTestUtil.getTestDataPath() + "/TestCase3473/test.vdb");
+ }
+ @AfterClass public static void oneTimeTeardown() {
+ server.stop();
+ }
+
@Before public void setUp() throws Exception {
- FakeServer server = new FakeServer(true);
- server.deployVDB("test", UnitTestUtil.getTestDataPath() + "/TestCase3473/test.vdb");
conn = server.createConnection("jdbc:teiid:test"); //$NON-NLS-1$ //$NON-NLS-2$
}
+ @After public void teardown() throws SQLException {
+ conn.close();
+ }
+
@Test public void testCacheHint() throws Exception {
Statement s = conn.createStatement();
s.execute("set showplan on");
@@ -56,6 +72,18 @@
assertFalse(rs.next());
}
+ @Test public void testCacheHintWithMaxRows() throws Exception {
+ Statement s = conn.createStatement();
+ s.setMaxRows(1);
+ ResultSet rs = s.executeQuery("/* cache */ select 1 union all select 2");
+ assertTrue(rs.next());
+ assertFalse(rs.next());
+ s.setMaxRows(2);
+ rs = s.executeQuery("/* cache */ select 1 union all select 2");
+ assertTrue(rs.next());
+ assertTrue(rs.next());
+ }
+
@Test public void testCacheHintTtl() throws Exception {
Statement s = conn.createStatement();
s.execute("set showplan on");
13 years, 5 months
teiid SVN: r4234 - in trunk/engine/src: test/java/org/teiid/dqp/internal/process and 1 other directory.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2012-07-12 14:24:56 -0400 (Thu, 12 Jul 2012)
New Revision: 4234
Modified:
trunk/engine/src/main/java/org/teiid/dqp/internal/process/PreparedStatementRequest.java
trunk/engine/src/main/java/org/teiid/dqp/internal/process/Request.java
trunk/engine/src/main/java/org/teiid/dqp/internal/process/RequestWorkItem.java
trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestDQPCore.java
Log:
TEIID-2098 ensuring maxrows is not misapplied to procedures
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/process/PreparedStatementRequest.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/process/PreparedStatementRequest.java 2012-07-12 17:45:57 UTC (rev 4233)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/PreparedStatementRequest.java 2012-07-12 18:24:56 UTC (rev 4234)
@@ -300,4 +300,20 @@
context.setVariableContext(result);
}
+
+ @Override
+ public boolean isReturingParams() {
+ if (userCommand instanceof StoredProcedure) {
+ StoredProcedure sp = (StoredProcedure)userCommand;
+ if (sp.isCallableStatement() && sp.returnsResultSet()) {
+ for (SPParameter param : sp.getMapOfParameters().values()) {
+ int type = param.getParameterType();
+ if (type == SPParameter.INOUT || type == SPParameter.OUT || type == SPParameter.RETURN_VALUE) {
+ return true;
+ }
+ }
+ }
+ }
+ return false;
+ }
}
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 2012-07-12 17:45:57 UTC (rev 4233)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/Request.java 2012-07-12 18:24:56 UTC (rev 4234)
@@ -474,5 +474,9 @@
public void setExecutor(Executor executor) {
this.executor = executor;
}
+
+ public boolean isReturingParams() {
+ return false;
+ }
}
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/process/RequestWorkItem.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/process/RequestWorkItem.java 2012-07-12 17:45:57 UTC (rev 4233)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/RequestWorkItem.java 2012-07-12 18:24:56 UTC (rev 4234)
@@ -581,7 +581,9 @@
}
}
};
- if (!request.addedLimit && this.requestMsg.getRowLimit() > 0) {
+ if (!request.addedLimit && this.requestMsg.getRowLimit() > 0 && !request.isReturingParams()) {
+ //covers maxrows for commands that already have a limit, are prepared, or are a stored procedure
+ //TODO: allow max rows to have an effect for callablestatements with out params
this.collector.setRowLimit(this.requestMsg.getRowLimit());
}
this.resultsBuffer = collector.getTupleBuffer();
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 2012-07-12 17:45:57 UTC (rev 4233)
+++ trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestDQPCore.java 2012-07-12 18:24:56 UTC (rev 4234)
@@ -614,6 +614,22 @@
assertEquals(2, rm.getResultsList().size());
}
+ /**
+ * Ensure that the row limit is not misapplied.
+ * Note that it still could be applied in this example, but the
+ * resultset only returns a single row
+ */
+ @Test public void testProcedureMaxRows() throws Exception {
+ String sql = "{? = call TEIIDSP9(1, ?)}"; //$NON-NLS-1$
+ RequestMessage request = exampleRequestMessage(sql);
+ request.setRowLimit(1);
+ request.setStatementType(StatementType.CALLABLE);
+ ResultsMessage rm = execute("A", 1, request);
+
+ assertNull(rm.getException());
+ assertEquals(2, rm.getResultsList().size());
+ }
+
public void helpTestVisibilityFails(String sql) throws Exception {
RequestMessage reqMsg = exampleRequestMessage(sql);
reqMsg.setTxnAutoWrapMode(RequestMessage.TXN_WRAP_OFF);
13 years, 5 months