Index: src/main/java/org/modeshape/jdbc/JcrMetaData.java =================================================================== --- src/main/java/org/modeshape/jdbc/JcrMetaData.java (revision 2225) +++ src/main/java/org/modeshape/jdbc/JcrMetaData.java (working copy) @@ -32,6 +32,7 @@ import java.util.Arrays; import java.util.Collections; import java.util.Comparator; +import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; @@ -552,7 +553,7 @@ throw new SQLException("Program Error: missing propertydefintions for " + type.getName()); } - List defns = filterPropertyDefnitions(columnNamePattern, type.getPropertyDefinitions()); + List defns = filterPropertyDefnitions(columnNamePattern, type); int ordinal = 0; Iterator defnsIt = defns.iterator(); @@ -2384,7 +2385,8 @@ return iface.cast(this); } - private List filterNodeTypes( String tableNamePattern ) throws RepositoryException { + @SuppressWarnings("null") + private List filterNodeTypes( String tableNamePattern ) throws RepositoryException { List nodetypes = null; if (tableNamePattern.trim().equals(WILDCARD)) { @@ -2449,13 +2451,19 @@ return nodetypes; } - private List filterPropertyDefnitions( String columnNamePattern, - PropertyDefinition[] defns ) { - List resultDefns = new ArrayList(defns.length); + private List filterPropertyDefnitions( String columnNamePattern, NodeType nodeType) { + + Map mapDefns = new HashMap(); + + addPropertyDefinitions(mapDefns, nodeType); + addSuperPropertyDefinitions(mapDefns, nodeType); + + List resultDefns = null; if (columnNamePattern.trim().equals(WILDCARD)) { - resultDefns = Arrays.asList(defns); + resultDefns = new ArrayList(mapDefns.values()); } else if (columnNamePattern.contains(WILDCARD)) { + resultDefns = new ArrayList(); String partName = null; boolean isLeading = false; boolean isTrailing = false; @@ -2470,9 +2478,9 @@ isTrailing = true; } - for (int i = 0; i < defns.length; i++) { - - PropertyDefinition defn = defns[i]; + Iterator defnIt = mapDefns.keySet().iterator(); + while (defnIt.hasNext()) { + PropertyDefinition defn = mapDefns.get(defnIt.next()); if (isLeading) { if (isTrailing) { @@ -2491,8 +2499,11 @@ } } else { - for (int i = 0; i < defns.length; i++) { - PropertyDefinition defn = defns[i]; + resultDefns = new ArrayList(); + + Iterator defnIt = mapDefns.keySet().iterator(); + while (defnIt.hasNext()) { + PropertyDefinition defn = mapDefns.get(defnIt.next()); if (defn.getName().equals(columnNamePattern)) { resultDefns.add(defn); } @@ -2512,5 +2523,35 @@ return resultDefns; } + + private void addSuperPropertyDefinitions(Map allDefns, NodeType nodetype) { + NodeType[] superTypes = nodetype.getSupertypes(); + if (superTypes != null && superTypes.length > 0) { + for (int i = 0; i mapDefns, NodeType nodetype) { + PropertyDefinition[] defns = nodetype.getPropertyDefinitions(); + if (defns != null && defns.length > 0) { + for (int i=0; isuperTypes = restnodetype.getSuperNodeTypes(); + javax.jcr.nodetype.NodeType[] nodetypes = new javax.jcr.nodetype.NodeType[superTypes.size()]; + int i = 0; + for (Iterator it=superTypes.iterator(); it.hasNext();) { + org.modeshape.web.jcr.rest.client.domain.NodeType nt = it.next(); + HttpNodeType localnodetype = new HttpNodeType(nt); + nodetypes[i] = localnodetype; + + } + + return nodetypes; } /** @@ -515,8 +526,6 @@ */ @Override public String[] getDeclaredSupertypeNames() { -// String value = restnodetype.getProperty("jcr:supertypes"); -- array -// return new String[] {value}; return null; } Index: src/test/java/org/modeshape/jdbc/JcrDriverIntegrationTest.java =================================================================== --- src/test/java/org/modeshape/jdbc/JcrDriverIntegrationTest.java (revision 2225) +++ src/test/java/org/modeshape/jdbc/JcrDriverIntegrationTest.java (working copy) @@ -542,23 +542,21 @@ String[] expected = { "TABLE_CAT[String] TABLE_SCHEM[String] TABLE_NAME[String] COLUMN_NAME[String] DATA_TYPE[Long] TYPE_NAME[String] COLUMN_SIZE[Long] BUFFER_LENGTH[Long] DECIMAL_DIGITS[Long] NUM_PREC_RADIX[Long] NULLABLE[Long] REMARKS[String] COLUMN_DEF[String] SQL_DATA_TYPE[Long] SQL_DATETIME_SUB[Long] CHAR_OCTET_LENGTH[Long] ORDINAL_POSITION[Long] IS_NULLABLE[String] SCOPE_CATLOG[String] SCOPE_SCHEMA[String] SCOPE_TABLE[String] SOURCE_DATA_TYPE[Long]", - "cars NULL car:Car * 12 undefined 50 NULL 0 0 2 NULL 0 0 0 1 YES NULL NULL NULL 0", - "cars NULL car:Car * 12 undefined 50 NULL 0 0 2 NULL 0 0 0 2 YES NULL NULL NULL 0", - "cars NULL car:Car car:engine 12 String 50 NULL 0 0 2 NULL 0 0 0 3 YES NULL NULL NULL 0", - "cars NULL car:Car car:lengthInInches 6 Double 20 NULL 0 0 2 NULL 0 0 0 4 YES NULL NULL NULL 0", - "cars NULL car:Car car:maker 12 String 50 NULL 0 0 2 NULL 0 0 0 5 YES NULL NULL NULL 0", - "cars NULL car:Car car:model 12 String 50 NULL 0 0 2 NULL 0 0 0 6 YES NULL NULL NULL 0", - "cars NULL car:Car car:mpgCity -5 Long 20 NULL 0 0 2 NULL 0 0 0 7 YES NULL NULL NULL 0", - "cars NULL car:Car car:mpgHighway -5 Long 20 NULL 0 0 2 NULL 0 0 0 8 YES NULL NULL NULL 0", - "cars NULL car:Car car:msrp 12 String 50 NULL 0 0 2 NULL 0 0 0 9 YES NULL NULL NULL 0", - "cars NULL car:Car car:userRating -5 Long 20 NULL 0 0 2 NULL 0 0 0 10 YES NULL NULL NULL 0", - "cars NULL car:Car car:valueRating -5 Long 20 NULL 0 0 2 NULL 0 0 0 11 YES NULL NULL NULL 0", - "cars NULL car:Car car:wheelbaseInInches 6 Double 20 NULL 0 0 2 NULL 0 0 0 12 YES NULL NULL NULL 0", - "cars NULL car:Car car:year 12 String 50 NULL 0 0 2 NULL 0 0 0 13 YES NULL NULL NULL 0", - "cars NULL car:Car jcr:mixinTypes 12 Name 20 NULL 0 0 2 NULL 0 0 0 14 YES NULL NULL NULL 0", - "cars NULL car:Car jcr:primaryType 12 Name 20 NULL 0 0 1 NULL 0 0 0 15 NO NULL NULL NULL 0", - "cars NULL car:Car modeint:multiValuedProperties 12 String 50 NULL 0 0 2 NULL 0 0 0 16 YES NULL NULL NULL 0", - "cars NULL car:Car modeint:nodeDefinition 12 String 50 NULL 0 0 2 NULL 0 0 0 17 YES NULL NULL NULL 0"}; + "cars NULL car:Car car:engine 12 String 50 NULL 0 0 2 NULL 0 0 0 1 YES NULL NULL NULL 0", + "cars NULL car:Car car:lengthInInches 6 Double 20 NULL 0 0 2 NULL 0 0 0 2 YES NULL NULL NULL 0", + "cars NULL car:Car car:maker 12 String 50 NULL 0 0 2 NULL 0 0 0 3 YES NULL NULL NULL 0", + "cars NULL car:Car car:model 12 String 50 NULL 0 0 2 NULL 0 0 0 4 YES NULL NULL NULL 0", + "cars NULL car:Car car:mpgCity -5 Long 20 NULL 0 0 2 NULL 0 0 0 5 YES NULL NULL NULL 0", + "cars NULL car:Car car:mpgHighway -5 Long 20 NULL 0 0 2 NULL 0 0 0 6 YES NULL NULL NULL 0", + "cars NULL car:Car car:msrp 12 String 50 NULL 0 0 2 NULL 0 0 0 7 YES NULL NULL NULL 0", + "cars NULL car:Car car:userRating -5 Long 20 NULL 0 0 2 NULL 0 0 0 8 YES NULL NULL NULL 0", + "cars NULL car:Car car:valueRating -5 Long 20 NULL 0 0 2 NULL 0 0 0 9 YES NULL NULL NULL 0", + "cars NULL car:Car car:wheelbaseInInches 6 Double 20 NULL 0 0 2 NULL 0 0 0 10 YES NULL NULL NULL 0", + "cars NULL car:Car car:year 12 String 50 NULL 0 0 2 NULL 0 0 0 11 YES NULL NULL NULL 0", + "cars NULL car:Car jcr:mixinTypes 12 Name 20 NULL 0 0 2 NULL 0 0 0 12 YES NULL NULL NULL 0", + "cars NULL car:Car jcr:primaryType 12 Name 20 NULL 0 0 1 NULL 0 0 0 13 NO NULL NULL NULL 0", + "cars NULL car:Car modeint:multiValuedProperties 12 String 50 NULL 0 0 2 NULL 0 0 0 14 YES NULL NULL NULL 0", + "cars NULL car:Car modeint:nodeDefinition 12 String 50 NULL 0 0 2 NULL 0 0 0 15 YES NULL NULL NULL 0"}; ResultSet rs = dbmd.getColumns("%", "%", "car:Car", "%"); assertResultsSetEquals(rs, expected); @@ -572,23 +570,21 @@ String[] expected = { "TABLE_CAT[String] TABLE_SCHEM[String] TABLE_NAME[String] COLUMN_NAME[String] DATA_TYPE[Long] TYPE_NAME[String] COLUMN_SIZE[Long] BUFFER_LENGTH[Long] DECIMAL_DIGITS[Long] NUM_PREC_RADIX[Long] NULLABLE[Long] REMARKS[String] COLUMN_DEF[String] SQL_DATA_TYPE[Long] SQL_DATETIME_SUB[Long] CHAR_OCTET_LENGTH[Long] ORDINAL_POSITION[Long] IS_NULLABLE[String] SCOPE_CATLOG[String] SCOPE_SCHEMA[String] SCOPE_TABLE[String] SOURCE_DATA_TYPE[Long]", - "cars NULL car:Car * 12 undefined 50 NULL 0 0 2 NULL 0 0 0 1 YES NULL NULL NULL 0", - "cars NULL car:Car * 12 undefined 50 NULL 0 0 2 NULL 0 0 0 2 YES NULL NULL NULL 0", - "cars NULL car:Car car:engine 12 String 50 NULL 0 0 2 NULL 0 0 0 3 YES NULL NULL NULL 0", - "cars NULL car:Car car:lengthInInches 6 Double 20 NULL 0 0 2 NULL 0 0 0 4 YES NULL NULL NULL 0", - "cars NULL car:Car car:maker 12 String 50 NULL 0 0 2 NULL 0 0 0 5 YES NULL NULL NULL 0", - "cars NULL car:Car car:model 12 String 50 NULL 0 0 2 NULL 0 0 0 6 YES NULL NULL NULL 0", - "cars NULL car:Car car:mpgCity -5 Long 20 NULL 0 0 2 NULL 0 0 0 7 YES NULL NULL NULL 0", - "cars NULL car:Car car:mpgHighway -5 Long 20 NULL 0 0 2 NULL 0 0 0 8 YES NULL NULL NULL 0", - "cars NULL car:Car car:msrp 12 String 50 NULL 0 0 2 NULL 0 0 0 9 YES NULL NULL NULL 0", - "cars NULL car:Car car:userRating -5 Long 20 NULL 0 0 2 NULL 0 0 0 10 YES NULL NULL NULL 0", - "cars NULL car:Car car:valueRating -5 Long 20 NULL 0 0 2 NULL 0 0 0 11 YES NULL NULL NULL 0", - "cars NULL car:Car car:wheelbaseInInches 6 Double 20 NULL 0 0 2 NULL 0 0 0 12 YES NULL NULL NULL 0", - "cars NULL car:Car car:year 12 String 50 NULL 0 0 2 NULL 0 0 0 13 YES NULL NULL NULL 0", - "cars NULL car:Car jcr:mixinTypes 12 Name 20 NULL 0 0 2 NULL 0 0 0 14 YES NULL NULL NULL 0", - "cars NULL car:Car jcr:primaryType 12 Name 20 NULL 0 0 1 NULL 0 0 0 15 NO NULL NULL NULL 0", - "cars NULL car:Car modeint:multiValuedProperties 12 String 50 NULL 0 0 2 NULL 0 0 0 16 YES NULL NULL NULL 0", - "cars NULL car:Car modeint:nodeDefinition 12 String 50 NULL 0 0 2 NULL 0 0 0 17 YES NULL NULL NULL 0"}; + "cars NULL car:Car car:engine 12 String 50 NULL 0 0 2 NULL 0 0 0 1 YES NULL NULL NULL 0", + "cars NULL car:Car car:lengthInInches 6 Double 20 NULL 0 0 2 NULL 0 0 0 2 YES NULL NULL NULL 0", + "cars NULL car:Car car:maker 12 String 50 NULL 0 0 2 NULL 0 0 0 3 YES NULL NULL NULL 0", + "cars NULL car:Car car:model 12 String 50 NULL 0 0 2 NULL 0 0 0 4 YES NULL NULL NULL 0", + "cars NULL car:Car car:mpgCity -5 Long 20 NULL 0 0 2 NULL 0 0 0 5 YES NULL NULL NULL 0", + "cars NULL car:Car car:mpgHighway -5 Long 20 NULL 0 0 2 NULL 0 0 0 6 YES NULL NULL NULL 0", + "cars NULL car:Car car:msrp 12 String 50 NULL 0 0 2 NULL 0 0 0 7 YES NULL NULL NULL 0", + "cars NULL car:Car car:userRating -5 Long 20 NULL 0 0 2 NULL 0 0 0 8 YES NULL NULL NULL 0", + "cars NULL car:Car car:valueRating -5 Long 20 NULL 0 0 2 NULL 0 0 0 9 YES NULL NULL NULL 0", + "cars NULL car:Car car:wheelbaseInInches 6 Double 20 NULL 0 0 2 NULL 0 0 0 10 YES NULL NULL NULL 0", + "cars NULL car:Car car:year 12 String 50 NULL 0 0 2 NULL 0 0 0 11 YES NULL NULL NULL 0", + "cars NULL car:Car jcr:mixinTypes 12 Name 20 NULL 0 0 2 NULL 0 0 0 12 YES NULL NULL NULL 0", + "cars NULL car:Car jcr:primaryType 12 Name 20 NULL 0 0 1 NULL 0 0 0 13 NO NULL NULL NULL 0", + "cars NULL car:Car modeint:multiValuedProperties 12 String 50 NULL 0 0 2 NULL 0 0 0 14 YES NULL NULL NULL 0", + "cars NULL car:Car modeint:nodeDefinition 12 String 50 NULL 0 0 2 NULL 0 0 0 15 YES NULL NULL NULL 0"}; ResultSet rs = dbmd.getColumns("%", "%", "car%", "%"); assertResultsSetEquals(rs, expected); Index: src/test/java/org/modeshape/jdbc/JcrDriverHttpIntegrationTest.java =================================================================== --- src/test/java/org/modeshape/jdbc/JcrDriverHttpIntegrationTest.java (revision 0) +++ src/test/java/org/modeshape/jdbc/JcrDriverHttpIntegrationTest.java (revision 0) @@ -0,0 +1,235 @@ +/* + * ModeShape (http://www.modeshape.org) + * See the COPYRIGHT.txt file distributed with this work for information + * regarding copyright ownership. Some portions may be licensed + * to Red Hat, Inc. under one or more contributor license agreements. + * See the AUTHORS.txt file in the distribution for a full listing of + * individual contributors. + * + * ModeShape is free software. Unless otherwise indicated, all code in ModeShape + * is licensed to you under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * ModeShape is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this software; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ +package org.modeshape.jdbc; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; + +import java.sql.DatabaseMetaData; +import java.sql.DriverManager; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.Properties; + +import org.junit.After; +import org.junit.Before; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * This is a test suite that operates against a complete JcrRepository instance created and managed using the JcrEngine. + * Essentially this is an integration test, but it does test lower-level functionality of the implementation of the JCR interfaces + * related to querying. (It is simply more difficult to unit test these implementations because of the difficulty in mocking the + * many other components to replicate the same functionality.) + *

+ * Also, because queries are read-only, the engine is set up once and used for the entire set of test methods. + *

+ *

+ * The following are the SQL semantics that the tests will be covering: + *

  • variations of simple SELECT * FROM
  • + *
  • JOIN + *

    + *

    + * To create the expected results to be used to run a test, use the test and print method: example: + * DriverTestUtil.executeTestAndPrint(this.connection, "SELECT * FROM [nt:base]"); This will print the expected results like this: + * String[] expected = { "jcr:primaryType[STRING]", "mode:root", "car:Car", "car:Car", "nt:unstructured" } Now copy the expected + * results to the test method. Then change the test to run the executeTest method passing in the expected results: + * example: DriverTestUtil.executeTest(this.connection, "SELECT * FROM [nt:base]", expected); + *

    + */ + +public class JcrDriverHttpIntegrationTest extends ConnectionResultsComparator { + + + public JcrDriverHttpIntegrationTest() { + super(); + } + + private JcrDriver driver; + private String serverName= "localhost:8080"; + private String repositoryName= "repository"; + private String workspaceName= "default"; + private String url = JcrDriver.HTTP_URL_PREFIX + serverName + "/modeshape-rest/" + repositoryName + "/" + workspaceName + "?user=admin&password=admin"; + + private Properties properties; + + private JcrConnection connection; + private DatabaseMetaData dbmd; + + @Before + public void beforeEach() throws Exception { + + properties = new Properties(); + + driver = new JcrDriver(); + connection = (JcrConnection)driver.connect(url, properties); + + dbmd = this.connection.getMetaData(); + + // only test were comparing metadata is not available at this time + this.compareColumns = true; + + } + + @After + public void afterEach() throws Exception { + DriverManager.deregisterDriver(driver); + + if (connection != null) { + try { + connection.close(); + } finally { + connection = null; + } + } + driver = null; + dbmd = null; + } + + + // ---------------------------------------------------------------------------------------------------------------- + // JCR-SQL2 Queries + // ---------------------------------------------------------------------------------------------------------------- + + @Test + public void shouldBeAbleToExecuteSqlSelectAllNodes() throws SQLException { + String[] expected = {"jcr:primaryType[STRING]", "mode:root", "car:Car", "car:Car", "nt:unstructured", "nt:unstructured", + "car:Car", "nt:unstructured", "car:Car", "car:Car", "car:Car", "car:Car", "nt:unstructured", "car:Car", + "nt:unstructured", "car:Car", "car:Car", "car:Car", "car:Car", "nt:unstructured", "nt:unstructured", + "nt:unstructured", "nt:unstructured", "nt:unstructured"}; + + executeTest(this.connection, "SELECT * FROM [nt:base]", expected, 23); + } + + + @Test + public void shouldGetCatalogs() throws SQLException { + this.compareColumns = false; + String[] expected = { + "TABLE_CAT[String]", + "mode:repository" + }; + + ResultSet rs = dbmd.getCatalogs(); + assertResultsSetEquals(rs, expected); + assertRowCount(1); + } + + @Test + public void shouldGetSchemas() throws SQLException { + ResultSet rs = dbmd.getSchemas(); + assertNotNull(rs); + assertEquals(rs.next(), Boolean.FALSE.booleanValue()); + + } + + @Test + public void shouldGetTableTypes() throws SQLException { + this.compareColumns = false; + String[] expected = { + "TABLE_TYPE[String]", + "VIEW" + }; + + ResultSet rs = dbmd.getTableTypes(); + assertResultsSetEquals(rs, expected); + assertRowCount(1); + } + + @Test + public void shouldGetAllTables() throws SQLException { + this.compareColumns = false; + + String[] expected = { + "TABLE_CAT[String] TABLE_SCHEM[String] TABLE_NAME[String] TABLE_TYPE[String] REMARKS[String] TYPE_CAT[String] TYPE_SCHEM[String] TYPE_NAME[String] SELF_REFERENCING_COL_NAME[String] REF_GENERATION[String]", + "cars NULL car:Car VIEW Is Mixin: false NULL NULL NULL null DERIVED", + "cars NULL mix:created VIEW Is Mixin: true NULL NULL NULL null DERIVED", + }; + + ResultSet rs = dbmd.getTables("%", "%", "ddl:creatable", new String[] {}); + + printResults(rs, false); +// assertResultsSetEquals(rs, expected); +// assertRowCount(44); + } + + @Test + public void findTablesWithNoColumns() throws SQLException { + this.compareColumns = false; + + ResultSet rs = dbmd.getTables("%", "%", "%", new String[] {}); + + while (rs.next()) { + String tableName = rs.getString("TABLE_NAME"); + + try { + ResultSet colrs = dbmd.getColumns("%", "%", tableName, "%"); + if (!colrs.next()) { + System.out.println("No Columns for Table: " + tableName); + } + } catch (Throwable t) { + t.printStackTrace(); + } + + } + } + + + @Test + public void shouldGetAllColumnsFor1Table() throws SQLException { + this.compareColumns = false; + + String[] expected = { + "TABLE_CAT[String] TABLE_SCHEM[String] TABLE_NAME[String] COLUMN_NAME[String] DATA_TYPE[Long] TYPE_NAME[String] COLUMN_SIZE[Long] BUFFER_LENGTH[Long] DECIMAL_DIGITS[Long] NUM_PREC_RADIX[Long] NULLABLE[Long] REMARKS[String] COLUMN_DEF[String] SQL_DATA_TYPE[Long] SQL_DATETIME_SUB[Long] CHAR_OCTET_LENGTH[Long] ORDINAL_POSITION[Long] IS_NULLABLE[String] SCOPE_CATLOG[String] SCOPE_SCHEMA[String] SCOPE_TABLE[String] SOURCE_DATA_TYPE[Long]", + "cars NULL car:Car * 12 undefined 50 NULL 0 0 2 NULL 0 0 0 1 YES NULL NULL NULL 0", + "cars NULL car:Car * 12 undefined 50 NULL 0 0 2 NULL 0 0 0 2 YES NULL NULL NULL 0", + "cars NULL car:Car car:engine 12 String 50 NULL 0 0 2 NULL 0 0 0 3 YES NULL NULL NULL 0", + "cars NULL car:Car car:lengthInInches 6 Double 20 NULL 0 0 2 NULL 0 0 0 4 YES NULL NULL NULL 0", + "cars NULL car:Car car:maker 12 String 50 NULL 0 0 2 NULL 0 0 0 5 YES NULL NULL NULL 0", + "cars NULL car:Car car:model 12 String 50 NULL 0 0 2 NULL 0 0 0 6 YES NULL NULL NULL 0", + "cars NULL car:Car car:mpgCity -5 Long 20 NULL 0 0 2 NULL 0 0 0 7 YES NULL NULL NULL 0", + "cars NULL car:Car car:mpgHighway -5 Long 20 NULL 0 0 2 NULL 0 0 0 8 YES NULL NULL NULL 0", + "cars NULL car:Car car:msrp 12 String 50 NULL 0 0 2 NULL 0 0 0 9 YES NULL NULL NULL 0", + "cars NULL car:Car car:userRating -5 Long 20 NULL 0 0 2 NULL 0 0 0 10 YES NULL NULL NULL 0", + "cars NULL car:Car car:valueRating -5 Long 20 NULL 0 0 2 NULL 0 0 0 11 YES NULL NULL NULL 0", + "cars NULL car:Car car:wheelbaseInInches 6 Double 20 NULL 0 0 2 NULL 0 0 0 12 YES NULL NULL NULL 0", + "cars NULL car:Car car:year 12 String 50 NULL 0 0 2 NULL 0 0 0 13 YES NULL NULL NULL 0", + "cars NULL car:Car jcr:mixinTypes 12 Name 20 NULL 0 0 2 NULL 0 0 0 14 YES NULL NULL NULL 0", + "cars NULL car:Car jcr:primaryType 12 Name 20 NULL 0 0 1 NULL 0 0 0 15 NO NULL NULL NULL 0", + "cars NULL car:Car modeint:multiValuedProperties 12 String 50 NULL 0 0 2 NULL 0 0 0 16 YES NULL NULL NULL 0", + "cars NULL car:Car modeint:nodeDefinition 12 String 50 NULL 0 0 2 NULL 0 0 0 17 YES NULL NULL NULL 0" + }; + +//"ddl:statement" + ResultSet rs = dbmd.getColumns("%", "%", "ddl:creatable", "%"); + printResults(rs, false); +// assertResultsSetEquals(rs, expected); +// assertRowCount(17); + + } + + + +}