Author: blafond
Date: 2009-12-16 15:46:14 -0500 (Wed, 16 Dec 2009)
New Revision: 1448
Added:
trunk/dna-integration-tests/src/test/resources/org/jboss/dna/test/integration/sequencer/ddl/DerbyDdl.cnd
trunk/dna-integration-tests/src/test/resources/org/jboss/dna/test/integration/sequencer/ddl/OracleDdl.cnd
trunk/dna-integration-tests/src/test/resources/org/jboss/dna/test/integration/sequencer/ddl/PostgresDdl.cnd
trunk/dna-integration-tests/src/test/resources/org/jboss/dna/test/integration/sequencer/ddl/oracle_test_statements.ddl
trunk/dna-integration-tests/src/test/resources/org/jboss/dna/test/integration/sequencer/ddl/postgres_test_statements.ddl
trunk/dna-integration-tests/src/test/resources/org/jboss/dna/test/integration/sequencer/ddl/test_cnd.cnd
trunk/dna-integration-tests/src/test/resources/org/jboss/dna/test/integration/test_cnd.cnd
Removed:
trunk/dna-integration-tests/src/test/resources/org/jboss/dna/test/integration/extensions/sequencer/ddl/
Modified:
trunk/dna-integration-tests/src/test/java/org/jboss/dna/test/integration/sequencer/ddl/DdlSequencerIntegrationTest.java
trunk/dna-integration-tests/src/test/resources/org/jboss/dna/test/integration/sequencer/ddl/StandardDdl.cnd
Log:
DNA-49 Adding to DDL Integration test. Oracle, Derby and Postgres ddl sequencing.
Modified:
trunk/dna-integration-tests/src/test/java/org/jboss/dna/test/integration/sequencer/ddl/DdlSequencerIntegrationTest.java
===================================================================
---
trunk/dna-integration-tests/src/test/java/org/jboss/dna/test/integration/sequencer/ddl/DdlSequencerIntegrationTest.java 2009-12-16
20:44:18 UTC (rev 1447)
+++
trunk/dna-integration-tests/src/test/java/org/jboss/dna/test/integration/sequencer/ddl/DdlSequencerIntegrationTest.java 2009-12-16
20:46:14 UTC (rev 1448)
@@ -23,8 +23,8 @@
*/
package org.jboss.dna.test.integration.sequencer.ddl;
+import static org.hamcrest.core.Is.is;
import static org.junit.Assert.assertEquals;
-import static org.hamcrest.core.Is.is;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.fail;
import java.io.IOException;
@@ -39,6 +39,7 @@
import javax.jcr.Session;
import javax.jcr.Value;
import javax.jcr.ValueFormatException;
+import javax.jcr.nodetype.NodeType;
import org.jboss.dna.graph.SecurityContext;
import org.jboss.dna.graph.connector.inmemory.InMemoryRepositorySource;
import org.jboss.dna.jcr.JcrConfiguration;
@@ -46,6 +47,10 @@
import org.jboss.dna.jcr.JcrTools;
import org.jboss.dna.jcr.SecurityContextCredentials;
import org.jboss.dna.repository.sequencer.SequencingService;
+import org.jboss.dna.sequencer.ddl.StandardDdlLexicon;
+import org.jboss.dna.sequencer.ddl.dialect.derby.DerbyDdlLexicon;
+import org.jboss.dna.sequencer.ddl.dialect.oracle.OracleDdlLexicon;
+import org.jboss.dna.sequencer.ddl.dialect.postgres.PostgresDdlLexicon;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
@@ -56,8 +61,8 @@
public class DdlSequencerIntegrationTest {
private JcrEngine engine;
private Session session;
- private URL cndUrl;
private JcrTools tools;
+ private static final String cndDdlFolder =
"org/jboss/dna/test/integration/sequencer/ddl/";
@Before
public void beforeEach() throws Exception {
@@ -71,8 +76,6 @@
String workspaceName = "default";
String repositorySource = "ddlRepositorySource";
- cndUrl =
this.getClass().getClassLoader().getResource("org/jboss/dna/test/integration/sequencer/ddl/StandardDdl.cnd");
-
JcrConfiguration config = new JcrConfiguration();
// Set up the in-memory source where we'll upload the content and where the
sequenced output will be stored ...
config.repositorySource(repositorySource)
@@ -80,7 +83,16 @@
.setDescription("The repository for our content")
.setProperty("defaultWorkspaceName", workspaceName);
// Set up the JCR repository to use the source ...
-
config.repository(repositoryName).addNodeTypes(cndUrl).setSource(repositorySource);
+ config.repository(repositoryName)
+ .addNodeTypes(getUrl(cndDdlFolder + "StandardDdl.cnd"))
+ .addNodeTypes(getUrl(cndDdlFolder + "DerbyDdl.cnd"))
+ .addNodeTypes(getUrl(cndDdlFolder + "OracleDdl.cnd"))
+ .addNodeTypes(getUrl(cndDdlFolder + "PostgresDdl.cnd"))
+ .registerNamespace(StandardDdlLexicon.Namespace.PREFIX,
StandardDdlLexicon.Namespace.URI)
+ .registerNamespace(DerbyDdlLexicon.Namespace.PREFIX,
DerbyDdlLexicon.Namespace.URI)
+ .registerNamespace(OracleDdlLexicon.Namespace.PREFIX,
OracleDdlLexicon.Namespace.URI)
+ .registerNamespace(PostgresDdlLexicon.Namespace.PREFIX,
PostgresDdlLexicon.Namespace.URI)
+ .setSource(repositorySource);
// Set up the DDL sequencer ...
config.sequencer("DDL Sequencer")
.usingClass("org.jboss.dna.sequencer.ddl.DdlSequencer")
@@ -97,6 +109,10 @@
}
+ private URL getUrl(String urlStr) {
+ return this.getClass().getClassLoader().getResource(urlStr);
+ }
+
@After
public void afterEach() throws Exception {
if (this.session != null) {
@@ -155,7 +171,7 @@
@Test
public void shouldSequenceCreateSchemaDdlFile() throws Exception {
System.out.println("STARTED:
shouldSequenceCreateSchemaDdlFile(create_schema.ddl)");
- URL url =
this.getClass().getClassLoader().getResource("org/jboss/dna/test/integration/sequencer/ddl/create_schema.ddl");
+ URL url = getUrl(cndDdlFolder + "create_schema.ddl");
uploadFile(url);
waitUntilSequencedNodesIs(1);
@@ -166,15 +182,15 @@
if (root.hasNode("ddls") ) {
if (root.hasNode("ddls")) {
Node ddlsNode = root.getNode("ddls");
- System.out.println(" | NAME: " + ddlsNode.getName() + "
PATH: " + ddlsNode.getPath());
+ //System.out.println(" | NAME: " + ddlsNode.getName() +
" PATH: " + ddlsNode.getPath());
for (NodeIterator iter = ddlsNode.getNodes(); iter.hasNext();) {
Node ddlNode = iter.nextNode();
- printNodeProperties(ddlNode);
+ //printNodeProperties(ddlNode);
- verifyNode(ddlNode, "hollywood",
"ns001:startLineNumber");
- verifyNode(ddlNode, "winners",
"ns001:expression");
- verifyNode(ddlNode, "title",
"ns001:datatypeLength");
+ verifyNode(ddlNode, "hollywood",
"ddl:startLineNumber");
+ verifyNode(ddlNode, "winners",
"ddl:expression");
+ verifyNode(ddlNode, "title",
"ddl:datatypeLength");
}
}
}
@@ -185,7 +201,7 @@
@Test
public void shouldSequenceDerbyDdlFile() throws Exception {
System.out.println("STARTED:
shouldSequenceDerbyDdlFile(derby_test_statements.ddl)");
- URL url =
this.getClass().getClassLoader().getResource("org/jboss/dna/test/integration/sequencer/ddl/derby_test_statements.ddl");
+ URL url = getUrl(cndDdlFolder + "derby_test_statements.ddl");
uploadFile(url);
waitUntilSequencedNodesIs(1);
@@ -203,12 +219,12 @@
long numStatements =
ddlNode.getNodes().nextNode().getNodes().getSize();
assertEquals(numStatements, 64);
- printNodeProperties(ddlNode);
+ //printNodeProperties(ddlNode);
- verifyNode(ddlNode, "HOTELAVAILABILITY",
"ns001:startLineNumber");
- verifyNode(ddlNode, "SAMP.DEPARTMENT",
"ns001:expression");
- verifyNode(ddlNode, "HOTEL_ID",
"ns001:datatypeName");
- verifyNode(ddlNode, "CITIES",
"ns001:startLineNumber");
+ verifyNode(ddlNode, "HOTELAVAILABILITY",
"ddl:startLineNumber");
+ verifyNode(ddlNode, "SAMP.DEPARTMENT",
"ddl:expression");
+ verifyNode(ddlNode, "HOTEL_ID",
"ddl:datatypeName");
+ verifyNode(ddlNode, "CITIES",
"ddl:startLineNumber");
}
}
}
@@ -216,6 +232,88 @@
System.out.println("FINISHED:
shouldSequenceDerbyDdlFile(derby_test_statements.ddl)");
}
+ @Test
+ public void shouldSequenceOracleDdlFile() throws Exception {
+ System.out.println("STARTED:
shouldSequenceOracleDdlFile(oracle_test_statements.ddl)");
+ URL url = getUrl(cndDdlFolder + "oracle_test_statements.ddl");
+ uploadFile(url);
+
+ waitUntilSequencedNodesIs(1);
+
+ // Find the node ...
+ Node root = session.getRootNode();
+
+ if (root.hasNode("ddls") ) {
+ if (root.hasNode("ddls")) {
+ Node ddlsNode = root.getNode("ddls");
+ //System.out.println(" | NAME: " + ddlsNode.getName() +
" PATH: " + ddlsNode.getPath());
+ for (NodeIterator iter = ddlsNode.getNodes(); iter.hasNext();) {
+ Node ddlNode = iter.nextNode();
+
+ long numStatements =
ddlNode.getNodes().nextNode().getNodes().getSize();
+ assertEquals(numStatements, 50);
+
+ //printNodeProperties(ddlNode);
+
+ verifyNode(ddlNode, "address",
"ddl:startLineNumber");
+ verifyNode(ddlNode, "cust_orders",
"ddl:expression");
+ verifyMixin(ddlNode, "cust_orders",
"oracleddl:createIndexStatement");
+ verifyNodeType(ddlNode, "cust_orders",
"oracleddl:createIndexStatement");
+ verifyNodeType(ddlNode, "cust_orders",
"ddl:creatable");
+ verifyNode(ddlNode, "cust_orders",
"ddl:startCharIndex", 1698);
+ verifyNode(ddlNode, "customers_dim",
"ddl:startColumnNumber");
+ }
+ }
+ }
+
+ System.out.println("FINISHED:
shouldSequenceOracleDdlFile(oracle_test_statements.ddl)");
+ }
+
+ @Test
+ public void shouldSequencePostgresDdlFile() throws Exception {
+ System.out.println("STARTED:
shouldSequencePostgresDdlFile(postgres_test_statements.ddl)");
+ URL url = getUrl(cndDdlFolder + "postgres_test_statements.ddl");
+ uploadFile(url);
+
+ waitUntilSequencedNodesIs(1);
+
+ // Find the node ...
+ Node root = session.getRootNode();
+
+ if (root.hasNode("ddls") ) {
+ if (root.hasNode("ddls")) {
+ Node ddlsNode = root.getNode("ddls");
+ //System.out.println(" | NAME: " + ddlsNode.getName() +
" PATH: " + ddlsNode.getPath());
+ for (NodeIterator iter = ddlsNode.getNodes(); iter.hasNext();) {
+ Node ddlNode = iter.nextNode();
+
+ long numStatements =
ddlNode.getNodes().nextNode().getNodes().getSize();
+ assertEquals(numStatements, 101);
+
+ //printNodeProperties(ddlNode);
+
+ verifyNodeType(ddlNode, "increment",
"postgresddl:createFunctionStatement");
+ verifyNode(ddlNode, "increment",
"ddl:expression");
+ verifyNodeType(ddlNode, "increment",
"ddl:creatable");
+ verifyNodeType(ddlNode, "increment",
"postgresddl:functionOperand");
+ verifyNode(ddlNode, "increment",
"ddl:startLineNumber", 214);
+ verifyNode(ddlNode, "increment",
"ddl:startCharIndex", 7604);
+
+
+ //COMMENT ON FUNCTION my_function (timestamp) IS ’Returns Roman
Numeral’;
+ verifyNodeType(ddlNode, "my_function",
"postgresddl:commentOnStatement");
+ verifyNode(ddlNode, "my_function",
"ddl:expression");
+ verifyNodeType(ddlNode, "my_function",
"postgresddl:commentOperand");
+ verifyNode(ddlNode, "my_function",
"ddl:startLineNumber", 44);
+ verifyNode(ddlNode, "my_function",
"ddl:startCharIndex", 1573);
+ verifyNode(ddlNode, "my_function",
"postgresddl:comment", "'Returns Roman Numeral'");
+ }
+ }
+ }
+
+ System.out.println("FINISHED:
shouldSequencePostgresDdlFile(postgres_test_statements.ddl)");
+ }
+
protected class MyCustomSecurityContext implements SecurityContext {
/**
* {@inheritDoc}
@@ -245,12 +343,12 @@
}
}
- private void printNodeProperties(Node node) throws Exception {
+ public void printNodeProperties(Node node) throws Exception {
printProperties(node);
for (NodeIterator iter = node.getNodes(); iter.hasNext();) {
printNodeProperties(iter.nextNode());
}
-
+
}
private void verifyNode(Node topNode, String name, String propName) throws Exception
{
@@ -264,6 +362,101 @@
}
+ private void verifyNode(Node topNode, String name, String propName, String
expectedValue) throws Exception {
+ Node node = findNode(topNode, name);
+
+ if( node != null ) {
+ assertThat( node.hasProperty(propName), is(true));
+ verifySingleValueProperty(node, propName, expectedValue);
+
+ } else {
+ fail("NODE: " + name + " not found");
+ }
+
+ }
+
+ private void verifyNode(Node topNode, String name, String propName, int
expectedValue) throws Exception {
+ Node node = findNode(topNode, name);
+
+ if( node != null ) {
+ assertThat( node.hasProperty(propName), is(true));
+ verifySingleValueProperty(node, propName, expectedValue);
+
+ } else {
+ fail("NODE: " + name + " not found");
+ }
+
+ }
+
+ protected Value value( String value ) throws Exception {
+ return session.getValueFactory().createValue(value);
+ }
+
+ private void verifySingleValueProperty(Node node, String propNameStr, String
expectedValue) throws Exception {
+ Value expValue = value(expectedValue);
+ Property prop = node.getProperty(propNameStr);
+ if( prop.getDefinition().isMultiple()) {
+ boolean hasValue = false;
+
+ Object[] values = prop.getValues();
+ for( Object val : values) {
+ if(val.equals(expValue)) {
+ hasValue = true;
+ }
+ }
+
+ assertThat(hasValue, is(true));
+ } else {
+ Object actualValue = prop.getValue();
+ assertThat(expValue, is(actualValue));
+ }
+
+ }
+
+
+ private void verifySingleValueProperty(Node node, String propNameStr, int
expectedValue) throws Exception {
+ Property prop = node.getProperty(propNameStr);
+ Value expValue = session.getValueFactory().createValue(expectedValue);
+ Object actualValue = prop.getValue();
+ assertThat(expValue, is(actualValue));
+
+ }
+
+ private void verifyMixin(Node topNode, String nodeName, String nodeType) throws
Exception {
+ Node node = findNode(topNode, nodeName);
+
+ if( node != null ) {
+ verifyMixin(node, nodeType);
+
+ } else {
+ fail("NODE: " + nodeName + " not found");
+ }
+ }
+
+ private void verifyMixin(Node node, String nodeType) throws Exception {
+ boolean foundMixin = false;
+ for( NodeType mixin : node.getMixinNodeTypes() ) {
+ String mixinName = mixin.getName();
+ if( mixinName.equals(nodeType) ) {
+ foundMixin = true;
+ break;
+ }
+ }
+
+ assertThat(foundMixin, is(true));
+ }
+
+ private void verifyNodeType(Node topNode, String nodeName, String nodeTypeName)
throws Exception {
+ Node node = findNode(topNode, nodeName);
+
+ if( node != null ) {
+ assertThat(node.isNodeType(nodeTypeName), is(true));
+ } else {
+ fail("NODE: " + nodeName + " not found");
+ }
+
+ }
+
private Node findNode(Node node, String name) throws Exception {
if( node.getName().equals(name)) {
return node;
@@ -285,7 +478,7 @@
private void printProperties( Node node ) throws RepositoryException,
PathNotFoundException, ValueFormatException {
System.out.println("\n >>> NODE PATH: " + node.getPath() );
- System.out.println("\n NAME: " + node.getName() );
+ System.out.println(" NAME: " + node.getName() +
"\n" );
// Create a Properties object containing the properties for this node; ignore any
children ...
//Properties props = new Properties();
Added:
trunk/dna-integration-tests/src/test/resources/org/jboss/dna/test/integration/sequencer/ddl/DerbyDdl.cnd
===================================================================
---
trunk/dna-integration-tests/src/test/resources/org/jboss/dna/test/integration/sequencer/ddl/DerbyDdl.cnd
(rev 0)
+++
trunk/dna-integration-tests/src/test/resources/org/jboss/dna/test/integration/sequencer/ddl/DerbyDdl.cnd 2009-12-16
20:46:14 UTC (rev 1448)
@@ -0,0 +1,72 @@
+/*
+ * JBoss DNA (
http://www.jboss.org/dna)
+ * 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.
+ *
+ * JBoss DNA is free software. Unless otherwise indicated, all code in JBoss DNA
+ * 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.
+ *
+ * JBoss DNA 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.
+ */
+
+ //------------------------------------------------------------------------------
+// N A M E S P A C E S
+//------------------------------------------------------------------------------
+<jcr='http://www.jcp.org/jcr/1.0'>
+<nt='http://www.jcp.org/jcr/nt/1.0'>
+<mix='http://www.jcp.org/jcr/mix/1.0'>
+<ddl='http://www.jboss.org/dna/ddl/1.0'>
+<derbyddl='http://www.jboss.org/dna/ddl/derby/1.0'>
+
+// =============================================================================
+// OPERANDS
+// =============================================================================
+[derbyddl:functionOperand] > ddl:operand abstract
+[derbyddl:indexOperand] > ddl:operand abstract
+[derbyddl:procedureOperand] > ddl:operand abstract
+[derbyddl:roleOperand] > ddl:operand abstract
+[derbyddl:synonymOperand] > ddl:operand abstract
+[derbyddl:triggerOperand] > ddl:operand abstract
+
+// =============================================================================
+// COLUMN
+// =============================================================================
+[derbyddl:columnDefinition] > ddl:columnDefinition mixin
+ - derbyddl:dropDefault (boolean)
+
+// =============================================================================
+// CREATE STATEMENTS
+// =============================================================================
+[derbyddl:createFunctionStatement] > ddl:creatable, ddl:statement,
derbyddl:functionOperand mixin
+[derbyddl:createIndex] > ddl:statement, ddl:creatable,
derbyddl:indexOperand mixin
+ - derbyddl:tableName (string) mandatory
+ - derbyddl:unique (boolean)
+ + * (ddl:columnReference) = ddl:columnReference multiple
+[derbyddl:createProcedureStatement] > ddl:creatable, ddl:statement,
derbyddl:procedureOperand mixin
+[derbyddl:createRoleStatement] > ddl:creatable, ddl:statement,
derbyddl:roleOperand mixin
+[derbyddl:createSynonymStatement] > ddl:creatable, ddl:statement,
derbyddl:synonymOperand mixin
+[derbyddl:createTriggerStatement] > ddl:creatable, ddl:statement,
derbyddl:triggerOperand mixin
+
+
+// =============================================================================
+// DROP STATEMENTS
+// =============================================================================
+[derbyddl:dropFunctionStatement] > ddl:droppable, derbyddl:functionOperand mixin
+[derbyddl:dropIndexStatement] > ddl:droppable, derbyddl:indexOperand mixin
+[derbyddl:dropProcedureStatement] > ddl:droppable, derbyddl:procedureOperand mixin
+[derbyddl:dropRoleStatement] > ddl:droppable, derbyddl:roleOperand mixin
+[derbyddl:dropSynonymStatement] > ddl:droppable, derbyddl:synonymOperand mixin
+[derbyddl:dropTriggerStatement] > ddl:droppable, derbyddl:triggerOperand mixin
Property changes on:
trunk/dna-integration-tests/src/test/resources/org/jboss/dna/test/integration/sequencer/ddl/DerbyDdl.cnd
___________________________________________________________________
Name: svn:executable
+ *
Added:
trunk/dna-integration-tests/src/test/resources/org/jboss/dna/test/integration/sequencer/ddl/OracleDdl.cnd
===================================================================
---
trunk/dna-integration-tests/src/test/resources/org/jboss/dna/test/integration/sequencer/ddl/OracleDdl.cnd
(rev 0)
+++
trunk/dna-integration-tests/src/test/resources/org/jboss/dna/test/integration/sequencer/ddl/OracleDdl.cnd 2009-12-16
20:46:14 UTC (rev 1448)
@@ -0,0 +1,202 @@
+/*
+ * JBoss DNA (
http://www.jboss.org/dna)
+ * 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.
+ *
+ * JBoss DNA is free software. Unless otherwise indicated, all code in JBoss DNA
+ * 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.
+ *
+ * JBoss DNA 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.
+ */
+
+ //------------------------------------------------------------------------------
+// N A M E S P A C E S
+//------------------------------------------------------------------------------
+<jcr='http://www.jcp.org/jcr/1.0'>
+<nt='http://www.jcp.org/jcr/nt/1.0'>
+<mix='http://www.jcp.org/jcr/mix/1.0'>
+<ddl='http://www.jboss.org/dna/ddl/1.0'>
+<oracleddl='http://www.jboss.org/dna/ddl/oracle/1.0'>
+
+// =============================================================================
+// OPERANDS
+// =============================================================================
+[oracleddl:clusterOperand] > ddl:operand abstract
+[oracleddl:commentOperand] > ddl:operand abstract
+[oracleddl:contextOperand] > ddl:operand abstract
+[oracleddl:controlfileOperand] > ddl:operand abstract
+[oracleddl:databaseOperand] > ddl:operand abstract
+[oracleddl:dimensionOperand] > ddl:operand abstract
+[oracleddl:directoryOperand] > ddl:operand abstract
+[oracleddl:diskgroupOperand] > ddl:operand abstract
+[oracleddl:functionOperand] > ddl:operand abstract
+[oracleddl:indexOperand] > ddl:operand abstract
+[oracleddl:indextypeOperand] > ddl:operand abstract
+[oracleddl:javaOperand] > ddl:operand abstract
+[oracleddl:libraryOperand] > ddl:operand abstract
+[oracleddl:materializedOperand] > ddl:operand abstract
+[oracleddl:operatorOperand] > ddl:operand abstract
+[oracleddl:outlineOperand] > ddl:operand abstract
+[oracleddl:packageOperand] > ddl:operand abstract
+[oracleddl:pfileOperand] > ddl:operand abstract
+[oracleddl:procedureOperand] > ddl:operand abstract
+[oracleddl:profileOperand] > ddl:operand abstract
+[oracleddl:resourceOperand] > ddl:operand abstract
+[oracleddl:roleOperand] > ddl:operand abstract
+[oracleddl:rollbackOperand] > ddl:operand abstract
+[oracleddl:sequenceOperand] > ddl:operand abstract
+[oracleddl:sessionOperand] > ddl:operand abstract
+[oracleddl:spfileOperand] > ddl:operand abstract
+[oracleddl:systemOperand] > ddl:operand abstract
+[oracleddl:synonymOperand] > ddl:operand abstract
+[oracleddl:tablespaceOperand] > ddl:operand abstract
+[oracleddl:triggerOperand] > ddl:operand abstract
+[oracleddl:typeOperand] > ddl:operand abstract
+[oracleddl:userOperand] > ddl:operand abstract
+
+// =============================================================================
+// COLUMN
+// =============================================================================
+[oracleddl:columnDefinition] > ddl:columnDefinition
+ - oracleddl:dropDefault (boolean)
+
+// =============================================================================
+// ALTER STATEMENTS
+// =============================================================================
+[oracleddl:alterClusterStatement] > ddl:alterable, ddl:statement,
oracleddl:clusterOperand mixin
+[oracleddl:alterDatabaseStatement] > ddl:alterable, ddl:statement,
oracleddl:databaseOperand mixin
+[oracleddl:alterDimensionStatement] > ddl:alterable, ddl:statement,
oracleddl:dimensionOperand mixin
+[oracleddl:alterDiskgroupStatement] > ddl:alterable, ddl:statement,
oracleddl:diskgroupOperand mixin
+[oracleddl:alterFunctionStatement] > ddl:alterable, ddl:statement,
oracleddl:functionOperand mixin
+[oracleddl:alterIndexStatement] > ddl:alterable, ddl:statement,
oracleddl:indexOperand mixin
+[oracleddl:alterIndextypeStatement] > ddl:alterable, ddl:statement,
oracleddl:indextypeOperand mixin
+[oracleddl:alterJavaStatement] > ddl:alterable, ddl:statement,
oracleddl:javaOperand mixin
+[oracleddl:alterMaterializedStatement] > ddl:alterable, ddl:statement,
oracleddl:materializedOperand mixin
+[oracleddl:alterOperatorStatement] > ddl:alterable, ddl:statement,
oracleddl:operatorOperand mixin
+[oracleddl:alterOutlineStatement] > ddl:alterable, ddl:statement,
oracleddl:outlineOperand mixin
+[oracleddl:alterPackageStatement] > ddl:alterable, ddl:statement,
oracleddl:packageOperand mixin
+[oracleddl:alterProcedureStatement] > ddl:alterable, ddl:statement,
oracleddl:procedureOperand mixin
+[oracleddl:alterProfileStatement] > ddl:alterable, ddl:statement,
oracleddl:profileOperand mixin
+[oracleddl:alterResourceStatement] > ddl:alterable, ddl:statement,
oracleddl:resourceOperand mixin
+[oracleddl:alterRoleStatement] > ddl:alterable, ddl:statement,
oracleddl:roleOperand mixin
+[oracleddl:alterRollbackStatement] > ddl:alterable, ddl:statement,
oracleddl:rollbackOperand mixin
+[oracleddl:alterSequenceStatement] > ddl:alterable, ddl:statement,
oracleddl:sequenceOperand mixin
+[oracleddl:alterSessionStatement] > ddl:alterable, ddl:statement,
oracleddl:sessionOperand mixin
+[oracleddl:alterSystemStatement] > ddl:alterable, ddl:statement,
oracleddl:systemOperand mixin
+[oracleddl:alterTablespaceStatement] > ddl:alterable, ddl:statement,
oracleddl:tablespaceOperand mixin
+[oracleddl:alterTriggerStatement] > ddl:alterable, ddl:statement,
oracleddl:triggerOperand mixin
+[oracleddl:alterTypeStatement] > ddl:alterable, ddl:statement,
oracleddl:typeOperand mixin
+[oracleddl:alterUserStatement] > ddl:alterable, ddl:statement,
oracleddl:userOperand mixin
+[oracleddl:alterViewStatement] > ddl:alterable, ddl:statement,
ddl:viewOperand mixin
+
+[oracleddl:alterTableStatement] > ddl:alterTableStatement mixin
+ - oracleddl:newTableName (STRING)
+ + oracleddl:renameColumn (ddl:renamable) = ddl:renamable multiple
+ + oracleddl:renameConstraint (ddl:renamable) = ddl:renamable multiple
+
+// =============================================================================
+// CREATE STATEMENTS
+// =============================================================================
+
+[oracleddl:createClusterStatement] > ddl:creatable, ddl:statement,
oracleddl:clusterOperand mixin
+[oracleddl:createContextStatement] > ddl:creatable, ddl:statement,
oracleddl:contextOperand mixin
+[oracleddl:createControlfileStatement] > ddl:creatable, ddl:statement,
oracleddl:controlfileOperand mixin
+[oracleddl:createDatabaseStatement] > ddl:creatable, ddl:statement,
oracleddl:databaseOperand mixin
+[oracleddl:createDimensionStatement] > ddl:creatable, ddl:statement,
oracleddl:dimensionOperand mixin
+[oracleddl:createDirectoryStatement] > ddl:creatable, ddl:statement,
oracleddl:directoryOperand mixin
+[oracleddl:createDiskgroupStatement] > ddl:creatable, ddl:statement,
oracleddl:diskgroupOperand mixin
+[oracleddl:createFunctionStatement] > ddl:creatable, ddl:statement,
oracleddl:functionOperand mixin
+[oracleddl:createIndexStatement] > ddl:creatable, ddl:statement,
oracleddl:indexOperand mixin
+ - oracleddl:tableName (string) mandatory
+ - oracleddl:unique (boolean)
+ - oracleddl:bitmap (boolean)
+ + * (ddl:columnReference) = ddl:columnReference multiple
+[oracleddl:createIndexTypeStatement] > ddl:creatable, ddl:statement,
oracleddl:indextypeOperand mixin
+[oracleddl:createJavaStatement] > ddl:creatable, ddl:statement,
oracleddl:javaOperand mixin
+[oracleddl:createLibraryStatement] > ddl:creatable, ddl:statement,
oracleddl:libraryOperand mixin
+[oracleddl:createMaterializedStatement] > ddl:creatable, ddl:statement,
oracleddl:materializedOperand mixin
+[oracleddl:createOperatorStatement] > ddl:creatable, ddl:statement,
oracleddl:operatorOperand mixin
+[oracleddl:createOutlineStatement] > ddl:creatable, ddl:statement,
oracleddl:outlineOperand mixin
+[oracleddl:createPackageStatement] > ddl:creatable, ddl:statement,
oracleddl:packageOperand mixin
+[oracleddl:createPfileStatement] > ddl:creatable, ddl:statement,
oracleddl:pfileOperand mixin
+[oracleddl:createProcedureStatement] > ddl:creatable, ddl:statement,
oracleddl:procedureOperand mixin
+[oracleddl:createRoleStatement] > ddl:creatable, ddl:statement,
oracleddl:roleOperand mixin
+[oracleddl:createRollbackStatement] > ddl:creatable, ddl:statement,
oracleddl:rollbackOperand mixin
+[oracleddl:createSequenceStatement] > ddl:creatable, ddl:statement,
oracleddl:sequenceOperand mixin
+[oracleddl:createSpfileStatement] > ddl:creatable, ddl:statement,
oracleddl:spfileOperand mixin
+[oracleddl:createSynonymStatement] > ddl:creatable, ddl:statement,
oracleddl:synonymOperand mixin
+[oracleddl:createTablespaceStatement] > ddl:creatable, ddl:statement,
oracleddl:tablespaceOperand mixin
+[oracleddl:createTriggerStatement] > ddl:creatable, ddl:statement,
oracleddl:triggerOperand mixin
+[oracleddl:createTypeStatement] > ddl:creatable, ddl:statement,
oracleddl:typeOperand mixin
+[oracleddl:createUserStatement] > ddl:creatable, ddl:statement,
oracleddl:userOperand mixin
+
+// =============================================================================
+// DROP STATEMENTS
+// =============================================================================
+
+[oracleddl:dropClusterStatement] > ddl:droppable, ddl:statement,
oracleddl:clusterOperand mixin
+[oracleddl:dropContextStatement] > ddl:droppable, ddl:statement,
oracleddl:contextOperand mixin
+[oracleddl:dropDatabaseStatement] > ddl:droppable, ddl:statement,
oracleddl:databaseOperand mixin
+[oracleddl:dropDimensionStatement] > ddl:droppable, ddl:statement,
oracleddl:dimensionOperand mixin
+[oracleddl:dropDirectoryStatement] > ddl:droppable, ddl:statement,
oracleddl:directoryOperand mixin
+[oracleddl:dropDiskgroupStatement] > ddl:droppable, ddl:statement,
oracleddl:diskgroupOperand mixin
+[oracleddl:dropFunctionStatement] > ddl:droppable, ddl:statement,
oracleddl:functionOperand mixin
+[oracleddl:dropIndexStatement] > ddl:droppable, ddl:statement,
oracleddl:indexOperand mixin
+[oracleddl:dropIndextypeStatement] > ddl:droppable, ddl:statement,
oracleddl:indextypeOperand mixin
+[oracleddl:dropJavaStatement] > ddl:droppable, ddl:statement,
oracleddl:javaOperand mixin
+[oracleddl:dropLibraryStatement] > ddl:droppable, ddl:statement,
oracleddl:libraryOperand mixin
+[oracleddl:dropMaterializedStatement] > ddl:droppable, ddl:statement,
oracleddl:materializedOperand mixin
+[oracleddl:dropOperatorStatement] > ddl:droppable, ddl:statement,
oracleddl:operatorOperand mixin
+[oracleddl:dropOutlineStatement] > ddl:droppable, ddl:statement,
oracleddl:outlineOperand mixin
+[oracleddl:dropPackageStatement] > ddl:droppable, ddl:statement,
oracleddl:packageOperand mixin
+[oracleddl:dropProcedureStatement] > ddl:droppable, ddl:statement,
oracleddl:procedureOperand mixin
+[oracleddl:dropProfileStatement] > ddl:droppable, ddl:statement,
oracleddl:profileOperand mixin
+[oracleddl:dropRoleStatement] > ddl:droppable, ddl:statement,
oracleddl:roleOperand mixin
+[oracleddl:dropRollbackStatement] > ddl:droppable, ddl:statement,
oracleddl:rollbackOperand mixin
+[oracleddl:dropSequenceStatement] > ddl:droppable, ddl:statement,
oracleddl:sequenceOperand mixin
+[oracleddl:dropSynonymStatement] > ddl:droppable, ddl:statement,
oracleddl:synonymOperand mixin
+[oracleddl:dropTablespaceStatement] > ddl:droppable, ddl:statement,
oracleddl:tablespaceOperand mixin
+[oracleddl:dropTriggerStatement] > ddl:droppable, ddl:statement,
oracleddl:triggerOperand mixin
+[oracleddl:dropTypeStatement] > ddl:droppable, ddl:statement,
oracleddl:typeOperand mixin
+[oracleddl:dropUserStatement] > ddl:droppable, ddl:statement,
oracleddl:userOperand mixin
+
+// =============================================================================
+// MISC STATEMENTS
+// =============================================================================
+
+[oracleddl:analyzeStatement] > ddl:statement mixin
+[oracleddl:associateStatisticsStatement] > ddl:statement mixin
+[oracleddl:auditStatement] > ddl:statement mixin
+[oracleddl:commitStatement] > ddl:statement mixin
+[oracleddl:commentOnStatement] > ddl:statement, oracleddl:commentOperand mixin
+ - oracleddl:targetObjectType (STRING) mandatory
+ - oracleddl:targetObjectName (STRING)
+ - oracleddl:comment (STRING) mandatory
+[oracleddl:disassociateStatisticsStatement] > ddl:statement mixin
+[oracleddl:explainPlanStatement] > ddl:statement mixin
+[oracleddl:flashbackStatement] > ddl:statement mixin
+[oracleddl:lockTableStatement] > ddl:statement mixin
+[oracleddl:mergeStatement] > ddl:statement mixin
+[oracleddl:nestedTableStatement] > ddl:statement mixin
+[oracleddl:noauditStatement] > ddl:statement mixin
+[oracleddl:purgeStatement] > ddl:statement mixin
+[oracleddl:renameStatement] > ddl:statement mixin
+[oracleddl:revokeStatement] > ddl:statement mixin
+[oracleddl:rollbackStatement] > ddl:statement mixin
+[oracleddl:setConstraintsStatement] > ddl:statement, ddl:settable mixin
+[oracleddl:setRoleStatement] > ddl:statement, ddl:settable mixin
+[oracleddl:setTransactionStatement] > ddl:statement, ddl:settable mixin
+[oracleddl:truncateStatement] > ddl:statement mixin
Property changes on:
trunk/dna-integration-tests/src/test/resources/org/jboss/dna/test/integration/sequencer/ddl/OracleDdl.cnd
___________________________________________________________________
Name: svn:executable
+ *
Added:
trunk/dna-integration-tests/src/test/resources/org/jboss/dna/test/integration/sequencer/ddl/PostgresDdl.cnd
===================================================================
---
trunk/dna-integration-tests/src/test/resources/org/jboss/dna/test/integration/sequencer/ddl/PostgresDdl.cnd
(rev 0)
+++
trunk/dna-integration-tests/src/test/resources/org/jboss/dna/test/integration/sequencer/ddl/PostgresDdl.cnd 2009-12-16
20:46:14 UTC (rev 1448)
@@ -0,0 +1,178 @@
+/*
+ * JBoss DNA (
http://www.jboss.org/dna)
+ * 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.
+ *
+ * JBoss DNA is free software. Unless otherwise indicated, all code in JBoss DNA
+ * 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.
+ *
+ * JBoss DNA 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.
+ */
+
+ //------------------------------------------------------------------------------
+// N A M E S P A C E S
+//------------------------------------------------------------------------------
+<jcr='http://www.jcp.org/jcr/1.0'>
+<nt='http://www.jcp.org/jcr/nt/1.0'>
+<mix='http://www.jcp.org/jcr/mix/1.0'>
+<ddl='http://www.jboss.org/dna/ddl/1.0'>
+<postgresddl='http://www.jboss.org/dna/ddl/postgres/1.0'>
+
+// =============================================================================
+// OPERANDS
+// =============================================================================
+[postgresddl:aggregateOperand] > ddl:operand abstract
+[postgresddl:castOperand] > ddl:operand abstract
+[postgresddl:commentOperand] > ddl:operand abstract
+[postgresddl:constraintTriggerOperand] > ddl:operand abstract
+[postgresddl:conversionOperand] > ddl:operand abstract
+[postgresddl:databaseOperand] > ddl:operand abstract
+[postgresddl:foreignDataOperand] > ddl:operand abstract
+[postgresddl:groupOperand] > ddl:operand abstract
+[postgresddl:functionOperand] > ddl:operand abstract
+[postgresddl:indexOperand] > ddl:operand abstract
+[postgresddl:languageOperand] > ddl:operand abstract
+[postgresddl:operatorOperand] > ddl:operand abstract
+[postgresddl:ownedByOperand] > ddl:operand abstract
+[postgresddl:roleOperand] > ddl:operand abstract
+[postgresddl:ruleOperand] > ddl:operand abstract
+[postgresddl:sequenceOperand] > ddl:operand abstract
+[postgresddl:serverOperand] > ddl:operand abstract
+[postgresddl:tablespaceOperand] > ddl:operand abstract
+[postgresddl:textSearchOperand] > ddl:operand abstract
+[postgresddl:triggerOperand] > ddl:operand abstract
+[postgresddl:typeOperand] > ddl:operand abstract
+[postgresddl:userOperand] > ddl:operand abstract
+[postgresddl:userMappingOperand] > ddl:operand abstract
+
+
+// =============================================================================
+// ALTER STATEMENTS
+// =============================================================================
+[postgresddl:alterAggregateStatement] > ddl:alterable, ddl:statement,
postgresddl:aggregateOperand mixin
+[postgresddl:alterConversionStatement] > ddl:alterable, ddl:statement,
postgresddl:conversionOperand mixin
+[postgresddl:alterDatabaseStatement] > ddl:alterable, ddl:statement,
postgresddl:databaseOperand mixin
+[postgresddl:alterForeignDataWrapperStatement] > ddl:alterable, ddl:statement,
postgresddl:foreignDataOperand mixin
+[postgresddl:alterFunctionStatement] > ddl:alterable, ddl:statement,
postgresddl:functionOperand mixin
+[postgresddl:alterGroupStatement] > ddl:alterable, ddl:statement,
postgresddl:groupOperand mixin
+[postgresddl:alterIndexStatement] > ddl:alterable, ddl:statement,
postgresddl:indexOperand mixin
+[postgresddl:alterLanguageStatement] > ddl:alterable, ddl:statement,
postgresddl:languageOperand mixin
+[postgresddl:alterOperatorStatement] > ddl:alterable, ddl:statement,
postgresddl:operatorOperand mixin
+[postgresddl:alterRoleStatement] > ddl:alterable, ddl:statement,
postgresddl:roleOperand mixin
+[postgresddl:alterSchemaStatement] > ddl:alterable, ddl:statement,
ddl:schemaOperand mixin
+[postgresddl:alterSequenceStatement] > ddl:alterable, ddl:statement,
postgresddl:sequenceOperand mixin
+[postgresddl:alterServerStatement] > ddl:alterable, ddl:statement,
postgresddl:serverOperand mixin
+[postgresddl:alterTablespaceStatement] > ddl:alterable, ddl:statement,
postgresddl:tablespaceOperand mixin
+[postgresddl:alterTextSearchStatement] > ddl:alterable, ddl:statement,
postgresddl:textSearchOperand mixin
+[postgresddl:alterTriggerStatement] > ddl:alterable, ddl:statement,
postgresddl:triggerOperand mixin
+[postgresddl:alterTypeStatement] > ddl:alterable, ddl:statement,
postgresddl:typeOperand mixin
+[postgresddl:alterUserStatement] > ddl:alterable, ddl:statement,
postgresddl:userOperand mixin
+[postgresddl:alterUserMappingStatement] > ddl:alterable, ddl:statement,
postgresddl:userMappingOperand mixin
+[postgresddl:alterViewStatement] > ddl:alterable, ddl:statement,
ddl:viewOperand mixin
+
+[postgresddl:alterTableStatement] > ddl:alterTableStatement mixin
+ - postgresddl:newTableName (STRING)
+ - postgresddl:schemaName (STRING)
+ + postgresddl:renameColumn (ddl:renamable) = ddl:renamable multiple
+
+
+// =============================================================================
+// CREATE STATEMENTS
+// =============================================================================
+
+[postgresddl:createAggregateStatement] > ddl:creatable, ddl:statement,
postgresddl:aggregateOperand mixin
+[postgresddl:createCastStatement] > ddl:creatable, ddl:statement,
postgresddl:castOperand mixin
+[postgresddl:createConstraintTriggerStatement] > ddl:creatable, ddl:statement,
postgresddl:constraintTriggerOperand mixin
+[postgresddl:createConversionStatement] > ddl:creatable, ddl:statement,
postgresddl:conversionOperand mixin
+[postgresddl:createDatabaseStatement] > ddl:creatable, ddl:statement,
postgresddl:databaseOperand mixin
+[postgresddl:createForeignDataWrapperStatement] > ddl:creatable, ddl:statement,
postgresddl:foreignDataOperand mixin
+[postgresddl:createFunctionStatement] > ddl:creatable, ddl:statement,
postgresddl:functionOperand mixin
+[postgresddl:createGroupStatement] > ddl:creatable, ddl:statement,
postgresddl:groupOperand mixin
+[postgresddl:createIndexStatement] > ddl:creatable, ddl:statement,
postgresddl:indexOperand mixin
+[postgresddl:createLanguageStatement] > ddl:creatable, ddl:statement,
postgresddl:languageOperand mixin
+[postgresddl:createOperatorStatement] > ddl:creatable, ddl:statement,
postgresddl:operatorOperand mixin
+[postgresddl:createRoleStatement] > ddl:creatable, ddl:statement,
postgresddl:roleOperand mixin
+[postgresddl:createRuleStatement] > ddl:creatable, ddl:statement,
postgresddl:ruleOperand mixin
+[postgresddl:createSequenceStatement] > ddl:creatable, ddl:statement,
postgresddl:sequenceOperand mixin
+[postgresddl:createServerStatement] > ddl:creatable, ddl:statement,
postgresddl:serverOperand mixin
+[postgresddl:createTablespaceStatement] > ddl:creatable, ddl:statement,
postgresddl:tablespaceOperand mixin
+[postgresddl:createTextSearchStatement] > ddl:creatable, ddl:statement,
postgresddl:textSearchOperand mixin
+[postgresddl:createTriggerStatement] > ddl:creatable, ddl:statement,
postgresddl:triggerOperand mixin
+[postgresddl:createTypeStatement] > ddl:creatable, ddl:statement,
postgresddl:typeOperand mixin
+[postgresddl:createUserStatement] > ddl:creatable, ddl:statement,
postgresddl:userOperand mixin
+[postgresddl:createUserMappingStatement] > ddl:creatable, ddl:statement,
postgresddl:userMappingOperand mixin
+
+// =============================================================================
+// DROP STATEMENTS
+// =============================================================================
+
+[postgresddl:dropAggregateStatement] > ddl:droppable, ddl:statement,
postgresddl:aggregateOperand mixin
+[postgresddl:dropCastStatement] > ddl:droppable, ddl:statement,
postgresddl:castOperand mixin
+[postgresddl:dropConstraintTriggerStatement] > ddl:droppable, ddl:statement,
postgresddl:constraintTriggerOperand mixin
+[postgresddl:dropConversionStatement] > ddl:droppable, ddl:statement,
postgresddl:conversionOperand mixin
+[postgresddl:dropDatabaseStatement] > ddl:droppable, ddl:statement,
postgresddl:databaseOperand mixin
+[postgresddl:dropForeignDataWrapperStatement] > ddl:droppable, ddl:statement,
postgresddl:foreignDataOperand mixin
+[postgresddl:dropFunctionStatement] > ddl:droppable, ddl:statement,
postgresddl:functionOperand mixin
+[postgresddl:dropGroupStatement] > ddl:droppable, ddl:statement,
postgresddl:groupOperand mixin
+[postgresddl:dropIndexStatement] > ddl:droppable, ddl:statement,
postgresddl:indexOperand mixin
+[postgresddl:dropLanguageStatement] > ddl:droppable, ddl:statement,
postgresddl:languageOperand mixin
+[postgresddl:dropOperatorStatement] > ddl:droppable, ddl:statement,
postgresddl:operatorOperand mixin
+[postgresddl:dropOwnedByStatement] > ddl:droppable, ddl:statement,
postgresddl:ownedByOperand mixin
+[postgresddl:dropRoleStatement] > ddl:droppable, ddl:statement,
postgresddl:roleOperand mixin
+[postgresddl:dropRuleStatement] > ddl:droppable, ddl:statement,
postgresddl:ruleOperand mixin
+[postgresddl:dropSequenceStatement] > ddl:droppable, ddl:statement,
postgresddl:sequenceOperand mixin
+[postgresddl:dropServerStatement] > ddl:droppable, ddl:statement,
postgresddl:serverOperand mixin
+[postgresddl:dropTablespaceStatement] > ddl:droppable, ddl:statement,
postgresddl:tablespaceOperand mixin
+[postgresddl:dropTextSearchStatement] > ddl:droppable, ddl:statement,
postgresddl:textSearchOperand mixin
+[postgresddl:dropTriggerStatement] > ddl:droppable, ddl:statement,
postgresddl:triggerOperand mixin
+[postgresddl:dropTypeStatement] > ddl:droppable, ddl:statement,
postgresddl:typeOperand mixin
+[postgresddl:dropUserStatement] > ddl:droppable, ddl:statement,
postgresddl:userOperand mixin
+[postgresddl:dropUserMappingStatement] > ddl:droppable, ddl:statement,
postgresddl:userMappingOperand mixin
+
+// =============================================================================
+// MISC STATEMENTS
+// =============================================================================
+
+[postgresddl:abortStatement] > ddl:statement mixin
+[postgresddl:analyzeStatement] > ddl:statement mixin
+[postgresddl:clusterStatement] > ddl:statement mixin
+[postgresddl:commentOnStatement] > ddl:statement, postgresddl:commentOperand
mixin
+ - postgresddl:targetObjectType (STRING) mandatory
+ - postgresddl:targetObjectName (STRING)
+ - postgresddl:comment (STRING) mandatory
+[postgresddl:copyStatement] > ddl:statement mixin
+[postgresddl:deallocateStatement] > ddl:statement mixin
+[postgresddl:declareStatement] > ddl:statement mixin
+[postgresddl:discardStatement] > ddl:statement mixin
+[postgresddl:explainStatement] > ddl:statement mixin
+[postgresddl:fetchStatement] > ddl:statement mixin
+[postgresddl:listenStatement] > ddl:statement mixin
+[postgresddl:loadStatement] > ddl:statement mixin
+[postgresddl:lockTableStatement] > ddl:statement mixin
+[postgresddl:moveStatement] > ddl:statement mixin
+[postgresddl:notifyStatement] > ddl:statement mixin
+[postgresddl:prepareStatement] > ddl:statement mixin
+[postgresddl:reassignOwnedStatement] > ddl:statement mixin
+[postgresddl:reindexStatement] > ddl:statement mixin
+[postgresddl:releaseSavepointStatement] > ddl:statement mixin
+[postgresddl:rollbackStatement] > ddl:statement mixin
+[postgresddl:selectIntoStatement] > ddl:statement mixin
+[postgresddl:showStatement] > ddl:statement mixin
+[postgresddl:truncateStatement] > ddl:statement mixin
+[postgresddl:unlistenStatement] > ddl:statement mixin
+[postgresddl:vacuumStatement] > ddl:statement mixin
+
+
Property changes on:
trunk/dna-integration-tests/src/test/resources/org/jboss/dna/test/integration/sequencer/ddl/PostgresDdl.cnd
___________________________________________________________________
Name: svn:executable
+ *
Modified:
trunk/dna-integration-tests/src/test/resources/org/jboss/dna/test/integration/sequencer/ddl/StandardDdl.cnd
===================================================================
---
trunk/dna-integration-tests/src/test/resources/org/jboss/dna/test/integration/sequencer/ddl/StandardDdl.cnd 2009-12-16
20:44:18 UTC (rev 1447)
+++
trunk/dna-integration-tests/src/test/resources/org/jboss/dna/test/integration/sequencer/ddl/StandardDdl.cnd 2009-12-16
20:46:14 UTC (rev 1448)
@@ -28,7 +28,7 @@
<
jcr='http://www.jcp.org/jcr/1.0'>
<
nt='http://www.jcp.org/jcr/nt/1.0'>
<
mix='http://www.jcp.org/jcr/mix/1.0'>
-<ddl='http://jboss.org/dna/ddl/1.0'>
+<ddl='http://www.jboss.org/dna/ddl/1.0'>
//------------------------------------------------------------------------------
@@ -43,52 +43,108 @@
// STATEMENT
// =============================================================================
[ddl:statement] mixin abstract
- - ddl:expression (STRING) mandatory // The string fragment
encompassing the statement expression.
- - ddl:originalExpression (STRING) mandatory // The string fragment
encompassing the original statement expression.
- - ddl:startLineNumber (LONG) < '(0,]' mandatory // The starting
line number for the statement
- - ddl:startColumnNumber (LONG) < '(0,]' mandatory // The starting
column number for the statement
- - ddl:startCharIndex (LONG) < '(0,]' mandatory // The starting
content character index for the statement
- - ddl:length (LONG) < '(0,]' mandatory // The string
length
+ - ddl:expression (string) mandatory // The string fragment
encompassing the statement expression.
+ - ddl:originalExpression (string) mandatory // The string fragment
encompassing the original statement expression.
+ - ddl:startLineNumber (long) mandatory // The starting line number
for the statement
+ - ddl:startColumnNumber (long) mandatory // The starting column number
for the statement
+ - ddl:startCharIndex (long) mandatory // The starting content
character index for the statement
+ - ddl:length (long) mandatory // The string length
+ ddl:problem (ddl:ddlProblem) = ddl:ddlProblem multiple // Problems encountered
during parsing.
// =============================================================================
// CREATE, ALTER, DROP, INSERT, SET, GRANT, REVOKE
// =============================================================================
-[ddl:creatable] < ddl:operation abstract
-[ddl:alterable] < ddl:operation abstract
-[ddl:droppable] < ddl:operation abstract
+[ddl:creatable] > ddl:operation abstract
+[ddl:alterable] > ddl:operation abstract
+[ddl:droppable] > ddl:operation abstract
- ddl:dropBehavior (STRING)
- + * (ddl:statementOption) = ddl:statementOption multiple
-[ddl:insertable] < ddl:operation abstract
-[ddl:settable] < ddl:operation abstract
-[ddl:grantable] < ddl:operation abstract
-[ddl:revokable] < ddl:operation abstract
-[ddl:renamable] < ddl:operation, ddl:operand abstract
+ + ddl:dropOption (ddl:statementOption) = ddl:statementOption multiple
+[ddl:insertable] > ddl:operation abstract
+[ddl:settable] > ddl:operation abstract
+[ddl:grantable] > ddl:operation abstract
+[ddl:revokable] > ddl:operation abstract
+[ddl:renamable] > ddl:operation, ddl:operand abstract
- ddl:newName (STRING)
+// =============================================================================
+// OPERANDS: SCHEMA, TABLE, DOMAIN, VIEW, ASSERTION, CHARACTER SET, COLLATION,
TRANSLATION
+// =============================================================================
+[ddl:schemaOperand] > ddl:operand abstract
+[ddl:tableOperand] > ddl:operand abstract
+[ddl:domainOperand] > ddl:operand abstract
+[ddl:viewOperand] > ddl:operand abstract
+[ddl:assertionOperand] > ddl:operand abstract
+[ddl:characterSetOperand] > ddl:operand abstract
+[ddl:collationOperand] > ddl:operand abstract
+[ddl:translationOperand] > ddl:operand abstract
+[ddl:columnOperand] > ddl:operand abstract
+[ddl:tableConstraintOperand] > ddl:operand abstract
+[ddl:referenceOperand] > ddl:operand abstract
+// =============================================================================
+// COLUMN
+// =============================================================================
+[ddl:columnDefinition] > ddl:creatable, ddl:columnOperand mixin
+ - ddl:datatypeName (STRING) mandatory
+ - ddl:datatypeLength (LONG)
+ - ddl:datatypePrecision (LONG)
+ - ddl:datatypeScale (LONG)
+ - ddl:nullable (STRING)
+ - ddl:defaultOption (STRING)
+ < 'LITERAL', 'DATETIME', 'USER', 'CURRENT_USER',
'SESSION_USER', 'SYSTEM_USER', 'NULL'
+ - ddl:defaultValue (STRING)
+ - ddl:defaultPrecision (LONG)
+ - ddl:collationName (STRING)
+ + ddl:dropBehavior (ddl:simpleProperty) = ddl:simpleProperty
+ + ddl:columnAttribute (ddl:simpleProperty) = ddl:simpleProperty multiple
// =============================================================================
-// OPERANDS: SCHEMA, TABLE, DOMAIN, VIEW, ASSERTION, CHARACTER SET, COLLATION,
TRANSLATION
+// TABLE CONSTRAINT
// =============================================================================
-[ddl:schemaOperand] < ddl:operand abstract
-[ddl:tableOperand] < ddl:operand abstract
-[ddl:domainOperand] < ddl:operand abstract
-[ddl:viewOperand] < ddl:operand abstract
-[ddl:assertionOperand] < ddl:operand abstract
-[ddl:characterSetOperand] < ddl:operand abstract
-[ddl:collationOperand] < ddl:operand abstract
-[ddl:translationOperand] < ddl:operand abstract
-[ddl:columnOperand] < ddl:operand abstract
-[ddl:tableConstraintOperand] < ddl:operand abstract
-[ddl:referenceOperand] < ddl:operand abstract
+[ddl:tableConstraintDefinition] > ddl:creatable, ddl:tableConstraintOperand mixin
+ - ddl:constraintType (STRING) mandatory
+ < 'UNIQUE', 'PRIMARY KEY', 'FOREIGN KEY',
'CHECK'
+ - ddl:deferrable (STRING)
+ < 'DEFERRABLE', 'NOT DEFERRABLE'
+ - ddl:checkSearchCondition (STRING)
+ < 'INITIALLY DEFERRED', 'INITIALLY IMMEDIATE'
+ + * (ddl:columnReference) = ddl:columnReference multiple
+ + * (ddl:tableReference) = ddl:tableReference
+ + * (ddl:fkColumnReference) = ddl:fkColumnReference multiple
+ + ddl:constraintAttribute (ddl:simpleProperty) = ddl:simpleProperty multiple
+
+// =============================================================================
+// REFERENCE
+// =============================================================================
+[ddl:columnReference] > ddl:referenceOperand mixin
+[ddl:tableReference] > ddl:referenceOperand mixin
+[ddl:fkColumnReference] > ddl:referenceOperand mixin
// =============================================================================
+// SIMPLE STRING PROPERTY
+// =============================================================================
+[ddl:simpleProperty] mixin
+ - ddl:propValue (STRING) mandatory
+
+// =============================================================================
+// STATEMENT OPTION
+// =============================================================================
+[ddl:statementOption] mixin
+ - ddl:value (STRING) mandatory
+
+// =============================================================================
+// DDL PROBLEM
+// =============================================================================
+[ddl:ddlProblem] mixin
+ - ddl:problemLevel (LONG) mandatory
+ - ddl:message (STRING) mandatory
+
+// =============================================================================
// CREATE SCHEMA
// =============================================================================
-[ddl:schemaDefinition] > ddl:statement, ddl:creatable, ddl:schemaStatement mixin
+[ddl:schemaDefinition] > ddl:statement, ddl:creatable, ddl:schemaOperand mixin
- ddl:defaultCharacterSetName (STRING)
- + * (ddl:ddlStatement) = ddl:ddlStatement (multiple)
+ + * (ddl:statement) = ddl:statement multiple
// =============================================================================
// CREATE TABLE
@@ -162,7 +218,7 @@
// =============================================================================
// ALTER TABLE
// =============================================================================
-[ddl:alterTableStatement] > ddl:statement, ddl:alterStatement, ddl:tableOperand mixin
+[ddl:alterTableStatement] > ddl:statement, ddl:alterable, ddl:tableOperand mixin
+ * (ddl:addColumnDefinition) = ddl:addColumnDefinition multiple
+ * (ddl:dropColumnDefinition) = ddl:dropColumnDefinition multiple
+ * (ddl:alterColumnDefinition) = ddl:alterColumnDefinition multiple
@@ -173,26 +229,26 @@
// =============================================================================
// ALTER DOMAIN
// =============================================================================
-[ddl:alterDomainStatement] > ddl:statement, ddl:alterStatement, ddl:domainOperand
mixin
+[ddl:alterDomainStatement] > ddl:statement, ddl:alterable, ddl:domainOperand mixin
- ddl:alterDomainAction (STRING) // TODO: THIS IS COMPLEX, NEED TO
BREAK DOWN
// =============================================================================
// DROP STATEMENTS
// =============================================================================
-[ddl:dropSchemaStatement] > ddl:droppable, ddl:schemaOperand mixin
-[ddl:dropTableStatement] > ddl:droppable, ddl:tableOperand mixin
-[ddl:dropViewStatement] > ddl:droppable, ddl:viewOperand mixin
-[ddl:dropDomainStatement] > ddl:droppable, ddl:domainOperand mixin
-[ddl:dropCharacterSetStatement] > ddl:droppable, ddl:characterSetOperand mixin
-[ddl:dropCollationStatement] > ddl:droppable, ddl:collationOperand mixin
-[ddl:dropTranslationStatement] > ddl:droppable, ddl:translationOperand mixin
-[ddl:dropAssertionStatement] > ddl:droppable, ddl:assertionOperand mixin
+[ddl:dropSchemaStatement] > ddl:statement, ddl:droppable, ddl:schemaOperand
mixin
+[ddl:dropTableStatement] > ddl:statement, ddl:droppable, ddl:tableOperand
mixin
+[ddl:dropViewStatement] > ddl:statement, ddl:droppable, ddl:viewOperand
mixin
+[ddl:dropDomainStatement] > ddl:statement, ddl:droppable, ddl:domainOperand
mixin
+[ddl:dropCharacterSetStatement] > ddl:statement, ddl:droppable,
ddl:characterSetOperand mixin
+[ddl:dropCollationStatement] > ddl:statement, ddl:droppable,
ddl:collationOperand mixin
+[ddl:dropTranslationStatement] > ddl:statement, ddl:droppable,
ddl:translationOperand mixin
+[ddl:dropAssertionStatement] > ddl:statement, ddl:droppable,
ddl:assertionOperand mixin
-[ddl:alterColumnDefinition] > ddl:columnDefinition, ddl:alterable, mixin
-[ddl:addColumnDefinition] > ddl:columnDefinition, ddl:creatable, mixin
-[ddl:dropColumnDefinition] > ddl:columnDefinition, ddl:droppable, mixin
-[ddl:addTableConstraintDefinition] > ddl:tableConstraintDefinition, ddl:creatable,
mixin
-[ddl:dropTableConstraintDefinition] > ddl:tableConstraintDefinition, ddl:droppable,
mixin
+[ddl:alterColumnDefinition] > ddl:columnDefinition, ddl:alterable mixin
+[ddl:addColumnDefinition] > ddl:columnDefinition, ddl:creatable mixin
+[ddl:dropColumnDefinition] > ddl:columnDefinition, ddl:droppable mixin
+[ddl:addTableConstraintDefinition] > ddl:tableConstraintDefinition, ddl:creatable
mixin
+[ddl:dropTableConstraintDefinition] > ddl:tableConstraintDefinition, ddl:droppable
mixin
// =============================================================================
// MISC STATEMENTS
@@ -206,61 +262,5 @@
[ddl:grantStatement] > ddl:statement, ddl:grantable mixin
// TODO: THIS IS COMPLEX, NEED TO BREAK DOWN
-// =============================================================================
-// COLUMN
-// =============================================================================
-[ddl:columnDefinition] > ddl:creatable ddl:columnOperand mixin
- - ddl:datatypeName (STRING) mandatory
- - ddl:datatypeLength (LONG)
- - ddl:datatypePrecision (LONG)
- - ddl:datatypeScale (LONG)
- - ddl:nullable (STRING)
- - ddl:defaultOption (STRING)
- < 'LITERAL', 'DATETIME', 'USER', 'CURRENT_USER',
'SESSION_USER', 'SYSTEM_USER', 'NULL'
- - ddl:defaultValue (STRING)
- - ddl:defaultPrecision (LONG)
- - ddl:collationName (STRING)
- - ddl:dropBehavior (ddl:simpleProperty) = ddl:simpleProperty multiple
- + ddl:columnAttribute (ddl:simpleProperty) = ddl:simpleProperty multiple
-// =============================================================================
-// TABLE CONSTRAINT
-// =============================================================================
-[ddl:tableConstraintDefinition] > ddl:creatable ddl:tableConstraintOperand mixin
- - ddl:constraintType (STRING) mandatory
- < 'UNIQUE', 'PRIMARY KEY', 'FOREIGN KEY',
'CHECK'
- - ddl:deferrable (STRING)
- < 'DEFERRABLE', 'NOT DEFERRABLE'
- - ddl:checkSearchCondition (STRING)
- < 'INITIALLY DEFERRED', 'INITIALLY IMMEDIATE'
- + * (ddl:columnReference) = ddl:columnReference multiple
- - (ddl:tableReference) = ddl:tableReference
- + * (ddl:fkColumnReference) = ddl:fkColumnReference multiple
- + ddl:constraintAttribute (ddl:simpleProperty) = ddl:simpleProperty multiple
-
-// =============================================================================
-// REFERENCE
-// =============================================================================
-[ddl:columnReference] > ddl:referenceOperand mixin
-[ddl:tableReference] > ddl:referenceOperand mixin
-[ddl:fkColumnReference] > ddl:referenceOperand mixin
-// =============================================================================
-// SIMPLE STRING PROPERTY
-// =============================================================================
-[ddl:simpleProperty] mixin
- - ddl:propValue (STRING) mandatory
-
-// =============================================================================
-// DDL PROBLEM
-// =============================================================================
-[ddl:ddlProblem] mixin
- - ddl:problemLevel (LONG) mandatory
- - ddl:message (STRING) mandatory
-
-// =============================================================================
-// STATEMENT OPTION
-// =============================================================================
-[ddl:statementOption] mixin
- - ddl:value (STRING) mandatory
-
Added:
trunk/dna-integration-tests/src/test/resources/org/jboss/dna/test/integration/sequencer/ddl/oracle_test_statements.ddl
===================================================================
---
trunk/dna-integration-tests/src/test/resources/org/jboss/dna/test/integration/sequencer/ddl/oracle_test_statements.ddl
(rev 0)
+++
trunk/dna-integration-tests/src/test/resources/org/jboss/dna/test/integration/sequencer/ddl/oracle_test_statements.ddl 2009-12-16
20:46:14 UTC (rev 1448)
@@ -0,0 +1,234 @@
+--
+-- SAMPLE ORACLE STATEMENTS
+--
+
+ALTER TABLE employees
+ PCTFREE 30
+ PCTUSED 60;
+
+ALTER TABLE countries
+ ADD (duty_pct NUMBER(2,2) CHECK (duty_pct < 10.5),
+ visa_needed VARCHAR2(3));
+
+ALTER TABLESPACE tbs_01
+ BEGIN BACKUP;
+
+ALTER TABLESPACE omf_ts1 ADD DATAFILE;
+
+ALTER TABLESPACE undots1
+ RETENTION NOGUARANTEE;
+
+ALTER TRIGGER update_job_history DISABLE;
+
+ALTER TYPE data_typ
+ ADD MEMBER FUNCTION qtr(der_qtr DATE)
+ RETURN CHAR CASCADE;
+
+ALTER TYPE cust_address_typ
+ ADD ATTRIBUTE (phone phone_list_typ) CASCADE;
+
+ALTER TYPE phone_list_typ
+ MODIFY ELEMENT TYPE VARCHAR(64) CASCADE;
+
+ALTER USER app_user1
+ GRANT CONNECT THROUGH sh
+ WITH ROLE warehouse_user;
+
+-- 10 Statements
+
+ALTER USER app_user1 IDENTIFIED GLOBALLY AS 'CN=tom,O=oracle,C=US';
+
+ALTER USER sidney
+ IDENTIFIED BY second_2nd_pwd
+ DEFAULT TABLESPACE example;
+
+ALTER VIEW customer_ro
+ COMPILE;
+
+ANALYZE TABLE customers VALIDATE STRUCTURE ONLINE;
+
+ANALYZE TABLE employees VALIDATE STRUCTURE CASCADE;
+
+ANALYZE TABLE orders DELETE STATISTICS;
+
+ASSOCIATE STATISTICS WITH PACKAGES emp_mgmt DEFAULT SELECTIVITY 10;
+
+AUDIT SELECT
+ ON hr.employees
+ WHENEVER SUCCESSFUL;
+
+AUDIT INSERT, UPDATE
+ ON oe.customers;
+
+AUDIT DELETE ANY TABLE;
+
+-- 20 Statements
+
+AUDIT ROLE
+ WHENEVER SUCCESSFUL;
+
+COMMENT ON COLUMN employees.job_id
+ IS 'abbreviated job title';
+
+COMMIT WORK;
+
+COMMIT COMMENT 'In-doubt transaction Code 36, Call (415) 555-2637';
+
+CREATE CLUSTER personnel
+ (department NUMBER(4))
+SIZE 512
+STORAGE (initial 100K next 50K);
+
+CREATE CLUSTER address
+ (postal_code NUMBER, country_id CHAR(2))
+ HASHKEYS 20
+ HASH IS MOD(postal_code + country_id, 101);
+
+CREATE CLUSTER cust_orders (customer_id NUMBER(6))
+ SIZE 512 SINGLE TABLE HASHKEYS 100;
+
+CREATE CONTEXT hr_context USING emp_mgmt;
+
+CREATE CONTROLFILE REUSE DATABASE "demo" NORESETLOGS NOARCHIVELOG
+ MAXLOGFILES 32
+ MAXLOGMEMBERS 2
+ MAXDATAFILES 32
+ MAXINSTANCES 1
+ MAXLOGHISTORY 449
+ LOGFILE
+ GROUP 1 '/path/oracle/dbs/t_log1.f' SIZE 500K,
+ GROUP 2 '/path/oracle/dbs/t_log2.f' SIZE 500K
+ # STANDBY LOGFILE
+ DATAFILE
+ '/path/oracle/dbs/t_db1.f',
+ '/path/oracle/dbs/dbu19i.dbf',
+ '/path/oracle/dbs/tbs_11.f',
+ '/path/oracle/dbs/smundo.dbf',
+ '/path/oracle/dbs/demo.dbf'
+ CHARACTER SET WE8DEC
+ ;
+
+CREATE DATABASE sample
+ CONTROLFILE REUSE
+ LOGFILE
+ GROUP 1 ('diskx:log1.log', 'disky:log1.log') SIZE 50K,
+ GROUP 2 ('diskx:log2.log', 'disky:log2.log') SIZE 50K
+ MAXLOGFILES 5
+ MAXLOGHISTORY 100
+ MAXDATAFILES 10
+ MAXINSTANCES 2
+ ARCHIVELOG
+ CHARACTER SET AL32UTF8
+ NATIONAL CHARACTER SET AL16UTF16
+ DATAFILE
+ 'disk1:df1.dbf' AUTOEXTEND ON,
+ 'disk2:df2.dbf' AUTOEXTEND ON NEXT 10M MAXSIZE UNLIMITED
+ DEFAULT TEMPORARY TABLESPACE temp_ts
+ UNDO TABLESPACE undo_ts
+ SET TIME_ZONE = '+02:00';
+
+-- 30 Statements
+
+CREATE PUBLIC DATABASE LINK remote
+ USING 'remote';
+
+CREATE DATABASE LINK local
+ CONNECT TO hr IDENTIFIED BY hr
+ USING 'local';
+
+CREATE DIMENSION customers_dim
+ LEVEL customer IS (customers.cust_id)
+ LEVEL city IS (customers.cust_city)
+ LEVEL state IS (customers.cust_state_province)
+ LEVEL country IS (countries.country_id)
+ LEVEL subregion IS (countries.country_subregion)
+ LEVEL region IS (countries.country_region)
+ HIERARCHY geog_rollup (
+ customer CHILD OF
+ city CHILD OF
+ state CHILD OF
+ country CHILD OF
+ subregion CHILD OF
+ region
+ JOIN KEY (customers.country_id) REFERENCES country
+ )
+ ATTRIBUTE customer DETERMINES
+ (cust_first_name, cust_last_name, cust_gender,
+ cust_marital_status, cust_year_of_birth,
+ cust_income_level, cust_credit_limit)
+ ATTRIBUTE country DETERMINES (countries.country_name)
+;
+
+CREATE DIRECTORY admin AS 'oracle/admin';
+
+CREATE OR REPLACE DIRECTORY bfile_dir AS '/private1/LOB/files';
+
+CREATE DISKGROUP dgroup_01
+ EXTERNAL REDUNDANCY
+ DISK '$ORACLE_HOME/disks/c*';
+
+CREATE FUNCTION SecondMax (input NUMBER) RETURN NUMBER
+ PARALLEL_ENABLE AGGREGATE USING SecondMaxImpl;
+
+CREATE OR REPLACE FUNCTION text_length(a CLOB)
+ RETURN NUMBER DETERMINISTIC IS
+ BEGIN
+ RETURN DBMS_LOB.GETLENGTH(a);
+ END;
+/
+
+CREATE INDEXTYPE position_indextype
+ FOR position_between(NUMBER, NUMBER, NUMBER)
+ USING position_im;
+
+CREATE JAVA SOURCE NAMED "Hello" AS
+ public class Hello {
+ public static String hello() {
+ return \"Hello World\"; } };
+
+-- 40 Statements
+
+CREATE JAVA RESOURCE NAMED "appText"
+ USING BFILE (bfile_dir, 'textBundle.dat');
+
+CREATE LIBRARY ext_lib AS '/OR/lib/ext_lib.so';
+/
+
+CREATE OR REPLACE LIBRARY ext_lib IS '/OR/newlib/ext_lib.so';
+/
+
+CREATE LIBRARY app_lib as '${ORACLE_HOME}/lib/app_lib.so'
+ AGENT 'sales.hq.acme.com';
+/
+
+CREATE MATERIALIZED VIEW LOG ON employees
+ WITH PRIMARY KEY
+ INCLUDING NEW VALUES;
+
+CREATE MATERIALIZED VIEW all_customers
+ PCTFREE 5 PCTUSED 60
+ TABLESPACE example
+ STORAGE (INITIAL 50K NEXT 50K)
+ USING INDEX STORAGE (INITIAL 25K NEXT 25K)
+ REFRESH START WITH ROUND(SYSDATE + 1) + 11/24
+ NEXT NEXT_DAY(TRUNC(SYSDATE), 'MONDAY') + 15/24
+ AS SELECT * FROM sh.customers@remote
+ UNION
+ SELECT * FROM sh.customers@local;
+
+CREATE MATERIALIZED VIEW LOG ON product_information
+ WITH ROWID, SEQUENCE (list_price, min_price, category_id)
+ INCLUDING NEW VALUES;
+
+CREATE OPERATOR eq_op
+ BINDING (VARCHAR2, VARCHAR2)
+ RETURN NUMBER
+ USING eq_f;
+
+CREATE OUTLINE salaries FOR CATEGORY special
+ ON SELECT last_name, salary FROM employees;
+
+CREATE OR REPLACE OUTLINE public_salaries
+ FROM PRIVATE my_salaries;
+
+-- 50 Statements so far
Property changes on:
trunk/dna-integration-tests/src/test/resources/org/jboss/dna/test/integration/sequencer/ddl/oracle_test_statements.ddl
___________________________________________________________________
Name: svn:executable
+ *
Added:
trunk/dna-integration-tests/src/test/resources/org/jboss/dna/test/integration/sequencer/ddl/postgres_test_statements.ddl
===================================================================
---
trunk/dna-integration-tests/src/test/resources/org/jboss/dna/test/integration/sequencer/ddl/postgres_test_statements.ddl
(rev 0)
+++
trunk/dna-integration-tests/src/test/resources/org/jboss/dna/test/integration/sequencer/ddl/postgres_test_statements.ddl 2009-12-16
20:46:14 UTC (rev 1448)
@@ -0,0 +1,598 @@
+-- Postgres SQL Statements from postgressql-8.4.1-US.pdf
+--
+-- Extracted 10/5/2009
+
+--COMMENT ON
+--{
+-- TABLE object_name |
+-- COLUMN table_name.column_name |
+-- AGGREGATE agg_name (agg_type [, ...] ) |
+-- CAST (sourcetype AS targettype) |
+-- CONSTRAINT constraint_name ON table_name |
+-- CONVERSION object_name |
+-- DATABASE object_name |
+-- DOMAIN object_name |
+-- FUNCTION func_name ( [ [ argmode ] [ argname ] argtype [, ...] ] ) |
+-- INDEX object_name |
+-- LARGE OBJECT large_object_oid |
+-- OPERATOR op (leftoperand_type, rightoperand_type) |
+-- OPERATOR CLASS object_name USING index_method |
+-- OPERATOR FAMILY object_name USING index_method |
+-- [ PROCEDURAL ] LANGUAGE object_name |
+-- ROLE object_name |
+-- RULE rule_name ON table_name |
+-- SCHEMA object_name |
+-- SEQUENCE object_name |
+-- TABLESPACE object_name |
+-- TEXT SEARCH CONFIGURATION object_name |
+-- TEXT SEARCH DICTIONARY object_name |
+-- TEXT SEARCH PARSER object_name |
+-- TEXT SEARCH TEMPLATE object_name |
+-- TRIGGER trigger_name ON table_name |
+-- TYPE object_name |
+-- VIEW object_name
+--} IS 'text'
+
+COMMENT ON TABLE mytable IS 'This is my table.';
+COMMENT ON TABLE mytable IS NULL;
+COMMENT ON AGGREGATE my_aggregate (double precision) IS 'Computes sample
variance';
+COMMENT ON CAST (text AS int4) IS 'Allow casts from text to int4';
+COMMENT ON COLUMN my_table.my_column IS 'Employee ID number';
+COMMENT ON CONVERSION my_conv IS 'Conversion to UTF8';
+COMMENT ON DATABASE my_database IS 'Development Database';
+COMMENT ON DOMAIN my_domain IS 'Email Address Domain';
+COMMENT ON FUNCTION my_function (timestamp) IS 'Returns Roman Numeral';
+COMMENT ON INDEX my_index IS 'Enforces uniqueness on employee ID';
+-- 10 STATEMENTS *******************************************************
+COMMENT ON LANGUAGE plpython IS 'Python support for stored procedures';
+COMMENT ON LARGE OBJECT 346344 IS 'Planning document';
+COMMENT ON OPERATOR ^ (text, text) IS 'Performs intersection of two texts';
+COMMENT ON OPERATOR - (NONE, text) IS 'This is a prefix operator on text';
+COMMENT ON OPERATOR CLASS int4ops USING btree IS '4 byte integer operators for
btrees';
+COMMENT ON OPERATOR FAMILY integer_ops USING btree IS 'all integer operators for
btrees';
+COMMENT ON ROLE my_role IS 'Administration group for finance tables';
+COMMENT ON RULE my_rule ON my_table IS 'Logs updates of employee records';
+COMMENT ON SCHEMA my_schema IS 'Departmental data';
+COMMENT ON SEQUENCE my_sequence IS 'Used to generate primary keys';
+-- 20 STATEMENTS *******************************************************
+COMMENT ON TABLE my_schema.my_table IS 'Employee Information';
+COMMENT ON TABLESPACE my_tablespace IS 'Tablespace for indexes';
+COMMENT ON TEXT SEARCH CONFIGURATION my_config IS 'Special word filtering';
+COMMENT ON TEXT SEARCH DICTIONARY swedish IS 'Snowball stemmer for swedish
language';
+COMMENT ON TEXT SEARCH PARSER my_parser IS 'Splits text into words';
+COMMENT ON TEXT SEARCH TEMPLATE snowball IS 'Snowball stemmer';
+COMMENT ON TRIGGER my_trigger ON my_table IS 'Used for RI';
+COMMENT ON TYPE complex IS 'Complex number data type';
+COMMENT ON VIEW my_view IS 'View of departmental costs';
+--COMMIT [ WORK | TRANSACTION ]
+
+COMMIT WORK;
+-- 30 STATEMENTS *******************************************************
+COMMIT TRANSACTION;
+
+COMMIT;
+
+--COMMIT PREPARED transaction_id;
+
+COMMIT PREPARED 'foobar';
+
+--COPY tablename [ ( column [, ...] ) ]
+-- FROM { 'filename' | STDIN }
+-- [ [ WITH ]
+-- [ BINARY ]
+-- [ OIDS ]
+-- [ DELIMITER [ AS ] 'delimiter ' ]
+-- [ NULL [ AS ] 'null string ' ]
+-- [ CSV [ HEADER ]
+-- [ QUOTE [ AS ] 'quote' ]
+-- [ ESCAPE [ AS ] 'escape' ]
+-- [ FORCE NOT NULL column [, ...] ]
+--COPY { tablename [ ( column [, ...] ) ] | ( query ) }
+-- TO { 'filename' | STDOUT }
+-- [ [ WITH ]
+-- [ BINARY ]
+-- [ OIDS ]
+-- [ DELIMITER [ AS ] 'delimiter ' ]
+-- [ NULL [ AS ] 'null string ' ]
+-- [ CSV [ HEADER ]
+-- [ QUOTE [ AS ] 'quote' ]
+-- [ ESCAPE [ AS ] 'escape' ]
+-- [ FORCE QUOTE column [, ...] ]
+
+COPY country TO STDOUT WITH DELIMITER '|';
+
+COPY country FROM '/usr1/proj/bray/sql/country_data';
+
+COPY (SELECT * FROM country WHERE country_name LIKE 'A%') TO
'/usr1/proj/bray/sql/a_list_co';
+
+--CREATE AGGREGATE name ( input_data_type [ , ... ] ) (
+-- SFUNC = sfunc,
+-- STYPE = state_data_type
+-- [ , FINALFUNC = ffunc ]
+-- [ , INITCOND = initial_condition ]
+-- [ , SORTOP = sort_operator ]
+--)
+--or the old syntax
+--CREATE AGGREGATE name (
+-- BASETYPE = base_type,
+-- SFUNC = sfunc,
+-- STYPE = state_data_type
+-- [ , FINALFUNC = ffunc ]
+-- [ , INITCOND = initial_condition ]
+-- [ , SORTOP = sort_operator ]
+--)
+
+
+--CREATE CAST (sourcetype AS targettype)
+-- WITH FUNCTION funcname (argtypes)
+-- [ AS ASSIGNMENT | AS IMPLICIT ]
+--CREATE CAST (sourcetype AS targettype)
+-- WITHOUT FUNCTION
+-- [ AS ASSIGNMENT | AS IMPLICIT ]
+--CREATE CAST (sourcetype AS targettype)
+-- WITH INOUT
+-- [ AS ASSIGNMENT | AS IMPLICIT ]
+
+CREATE CAST (bigint AS int4) WITH FUNCTION int4(bigint) AS ASSIGNMENT;
+
+--CREATE CONSTRAINT TRIGGER name
+-- AFTER event [ OR ... ]
+-- ON table_name
+-- [ FROM referenced_table_name ]
+-- { NOT DEFERRABLE | [ DEFERRABLE ] { INITIALLY IMMEDIATE | INITIALLY DEFERRED } }
+-- FOR EACH ROW
+-- EXECUTE PROCEDURE funcname ( arguments )
+
+--CREATE [ DEFAULT ] CONVERSION name
+-- FOR source_encoding TO dest_encoding FROM funcname
+
+CREATE CONVERSION myconv FOR 'UTF8' TO 'LATIN1' FROM myfunc;
+
+--CREATE DATABASE name
+-- [ [ WITH ] [ OWNER [=] dbowner ]
+-- [ TEMPLATE [=] template ]
+-- [ ENCODING [=] encoding ]
+-- [ LC_COLLATE [=] lc_collate ]
+-- [ LC_CTYPE [=] lc_ctype ]
+-- [ TABLESPACE [=] tablespace ]
+-- [ CONNECTION LIMIT [=] connlimit ] ]
+
+CREATE DATABASE lusiadas;
+
+CREATE DATABASE sales OWNER salesapp TABLESPACE salesspace;
+-- 40 STATEMENTS *******************************************************
+CREATE DATABASE music ENCODING 'LATIN1' TEMPLATE template0;
+
+
+--CREATE DOMAIN name [ AS ] data_type
+-- [ DEFAULT expression ]
+-- [ constraint [ ... ] ]
+--where constraint is:
+--[ CONSTRAINT constraint_name ]
+--{ NOT NULL | NULL | CHECK (expression) }
+
+CREATE DOMAIN us_postal_code AS TEXT
+ CHECK(
+ VALUE ~ '^\\d{5}$'
+ OR VALUE ~ '^\\d{5}-\\d{4}$'
+ );
+
+--CREATE FOREIGN DATA WRAPPER name
+-- [ VALIDATOR valfunction | NO VALIDATOR ]
+-- [ OPTIONS ( option 'value' [, ... ] ) ]
+
+CREATE FOREIGN DATA WRAPPER dummy;
+
+CREATE FOREIGN DATA WRAPPER postgresql VALIDATOR postgresql_fdw_validator;
+
+CREATE FOREIGN DATA WRAPPER mywrapper
+ OPTIONS (debug 'true');
+
+--CREATE [ OR REPLACE ] FUNCTION
+-- name ( [ [ argmode ] [ argname ] argtype [ { DEFAULT | = } defexpr ] [, ...] ] )
+-- [ RETURNS rettype
+-- | RETURNS TABLE ( colname coltype [, ...] ) ]
+-- { LANGUAGE langname
+-- | WINDOW
+-- | IMMUTABLE | STABLE | VOLATILE
+-- | CALLED ON NULL INPUT | RETURNS NULL ON NULL INPUT | STRICT
+-- | [ EXTERNAL ] SECURITY INVOKER | [ EXTERNAL ] SECURITY DEFINER
+-- | COST execution_cost
+-- | ROWS result_rows
+-- | SET configuration_parameter { TO value | = value | FROM CURRENT }
+-- | AS 'definition'
+-- | AS 'obj_file', 'link_symbol'
+-- } ...
+-- [ WITH ( attribute [, ...] ) ]
+
+CREATE FUNCTION add(integer, integer) RETURNS integer
+ AS 'select $1 + $2;'
+ LANGUAGE SQL
+ IMMUTABLE
+ RETURNS NULL ON NULL INPUT;
+
+CREATE OR REPLACE FUNCTION increment(i integer) RETURNS integer AS $$
+ BEGIN
+ RETURN i + 1;
+ END;
+
+CREATE FUNCTION dup(in int, out f1 int, out f2 text)
+ AS $$ SELECT $1, CAST($1 AS text) || ' is text' $$
+ LANGUAGE SQL;
+
+CREATE FUNCTION dup(int) RETURNS dup_result
+ AS $$ SELECT $1, CAST($1 AS text) || ' is text' $$
+ LANGUAGE SQL;
+
+CREATE FUNCTION dup(int) RETURNS TABLE(f1 int, f2 text)
+ AS $$ SELECT $1, CAST($1 AS text) || ' is text' $$
+ LANGUAGE SQL;
+-- 50 STATEMENTS *******************************************************
+--CREATE GROUP name [ [ WITH ] option [ ... ] ]
+--where option can be:
+-- SUPERUSER | NOSUPERUSER
+-- | CREATEDB | NOCREATEDB
+-- | CREATEROLE | NOCREATEROLE
+-- | CREATEUSER | NOCREATEUSER
+-- | INHERIT | NOINHERIT
+-- | LOGIN | NOLOGIN
+-- | [ ENCRYPTED | UNENCRYPTED ] PASSWORD 'password '
+-- | VALID UNTIL 'timestamp'
+-- | IN ROLE rolename [, ...]
+-- | IN GROUP rolename [, ...]
+-- | ROLE rolename [, ...]
+-- | ADMIN rolename [, ...]
+-- | USER rolename [, ...]
+-- | SYSID uid
+
+--CREATE [ UNIQUE ] INDEX [ CONCURRENTLY ] name ON table [ USING method ]
+-- ( { column | ( expression ) } [ opclass ] [ ASC | DESC ] [ NULLS { FIRST | LAST } ]
[, ..
+-- [ WITH ( storage_parameter = value [, ... ] ) ]
+-- [ TABLESPACE tablespace ]
+-- [ WHERE predicate ]
+
+CREATE UNIQUE INDEX title_idx ON films (title);
+
+CREATE INDEX lower_title_idx ON films ((lower(title)));
+
+CREATE INDEX title_idx_nulls_low ON films (title NULLS FIRST);
+
+CREATE UNIQUE INDEX title_idx ON films (title) WITH (fillfactor = 70);
+
+CREATE INDEX gin_idx ON documents_table (locations) WITH (fastupdate = off);
+
+CREATE INDEX code_idx ON films(code) TABLESPACE indexspace;
+
+CREATE INDEX CONCURRENTLY sales_quantity_index ON sales_table (quantity);
+
+--CREATE [ PROCEDURAL ] LANGUAGE name
+--CREATE [ TRUSTED ] [ PROCEDURAL ] LANGUAGE name
+-- HANDLER call_handler [ VALIDATOR valfunction ]
+
+CREATE LANGUAGE plpgsql;
+
+CREATE PROCEDURAL LANGUAGE plpgsql;
+
+CREATE TRUSTED PROCEDURAL LANGUAGE plpgsql;
+-- 60 STATEMENTS *******************************************************
+CREATE LANGUAGE plsample
+ HANDLER plsample_call_handler;
+
+--CREATE OPERATOR name (
+-- PROCEDURE = funcname
+-- [, LEFTARG = lefttype ] [, RIGHTARG = righttype ]
+-- [, COMMUTATOR = com_op ] [, NEGATOR = neg_op ]
+-- [, RESTRICT = res_proc ] [, JOIN = join_proc ]
+-- [, HASHES ] [, MERGES ]
+--)
+
+CREATE OPERATOR === (
+ LEFTARG = box,
+ RIGHTARG = box,
+ PROCEDURE = area_equal_procedure,
+ COMMUTATOR = ===,
+ NEGATOR = !==,
+ RESTRICT = area_restriction_procedure,
+ JOIN = area_join_procedure,
+ HASHES, MERGES
+);
+
+--CREATE OPERATOR CLASS name [ DEFAULT ] FOR TYPE data_type
+-- USING index_method [ FAMILY family_name ] AS
+-- { OPERATOR strategy_number operator_name [ ( op_type, op_type ) ]
+-- | FUNCTION support_number [ ( op_type [ , op_type ] ) ] funcname ( argument_type [,
...] )
+-- | STORAGE storage_type
+-- } [, ... ]
+
+CREATE OPERATOR CLASS gist__int_ops
+ DEFAULT FOR TYPE _int4 USING gist AS
+ OPERATOR 3 &&,
+ OPERATOR 6 = (anyarray, anyarray),
+ OPERATOR 7 @>,
+ <@,
+ OPERATOR 8
+ OPERATOR 20 @@ (_int4, query_int),
+ FUNCTION 1 g_int_consistent (internal, _int4, int, oid, internal),
+ FUNCTION 2 g_int_union (internal, internal),
+ FUNCTION 3 g_int_compress (internal),
+ FUNCTION 4 g_int_decompress (internal),
+ FUNCTION 5 g_int_penalty (internal, internal, internal),
+ FUNCTION 6 g_int_picksplit (internal, internal),
+ FUNCTION 7 g_int_same (_int4, _int4, internal);
+
+--CREATE OPERATOR FAMILY name USING index_method
+
+CREATE OPERATOR FAMILY name USING index_method;
+
+--CREATE ROLE name [ [ WITH ] option [ ... ] ]
+--where option can be:
+-- SUPERUSER | NOSUPERUSER
+-- | CREATEDB | NOCREATEDB
+-- | CREATEROLE | NOCREATEROLE
+-- | CREATEUSER | NOCREATEUSER
+-- | INHERIT | NOINHERIT
+-- | LOGIN | NOLOGIN
+-- | CONNECTION LIMIT connlimit
+-- | [ ENCRYPTED | UNENCRYPTED ] PASSWORD 'password '
+-- | VALID UNTIL 'timestamp'
+-- | IN ROLE rolename [, ...]
+-- | IN GROUP rolename [, ...]
+-- | ROLE rolename [, ...]
+-- | ADMIN rolename [, ...]
+-- | USER rolename [, ...]
+-- | SYSID uid
+
+CREATE ROLE jonathan LOGIN;
+
+CREATE USER davide WITH PASSWORD 'jw8s0F4';
+
+CREATE ROLE miriam WITH LOGIN PASSWORD 'jw8s0F4' VALID UNTIL
'2005-01-01';
+
+CREATE ROLE admin WITH CREATEDB CREATEROLE;
+
+--CREATE [ OR REPLACE ] RULE name AS ON event
+-- TO table [ WHERE condition ]
+-- DO [ ALSO | INSTEAD ] { NOTHING | command | ( command ; command ... ) }
+
+CREATE RULE "_RETURN" AS
+ ON SELECT TO t1
+ DO INSTEAD
+ SELECT * FROM t2;
+
+CREATE RULE "_RETURN" AS
+ ON SELECT TO t2
+ DO INSTEAD
+ SELECT * FROM t1;
+-- 70 STATEMENTS *******************************************************
+CREATE RULE notify_me AS ON UPDATE TO mytable DO ALSO NOTIFY mytable;
+
+--CREATE SCHEMA schemaname [ AUTHORIZATION username ] [ schema_element [ ... ] ]
+--CREATE SCHEMA AUTHORIZATION username [ schema_element [ ... ] ]
+
+CREATE SCHEMA myschema;
+
+CREATE SCHEMA AUTHORIZATION joe;
+
+CREATE SCHEMA hollywood
+ CREATE TABLE films (title text, release date, awards text[])
+ CREATE VIEW winners AS
+ SELECT title, release FROM films WHERE awards IS NOT NULL;
+
+--CREATE [ TEMPORARY | TEMP ] SEQUENCE name [ INCREMENT [ BY ] increment ]
+-- [ MINVALUE minvalue | NO MINVALUE ] [ MAXVALUE maxvalue | NO MAXVALUE ]
+-- [ START [ WITH ] start ] [ CACHE cache ] [ [ NO ] CYCLE ]
+-- [ OWNED BY { table.column | NONE } ]
+
+CREATE SEQUENCE serial START 101;
+
+--CREATE SERVER servername [ TYPE 'servertype' ] [ VERSION
'serverversion' ]
+-- FOREIGN DATA WRAPPER fdwname
+-- [ OPTIONS ( option 'value' [, ... ] ) ]
+
+CREATE SERVER foo FOREIGN DATA WRAPPER "default";
+
+CREATE SERVER myserver FOREIGN DATA WRAPPER pgsql OPTIONS (host 'foo', dbname
'foodb', port);
+
+--CREATE [ [ GLOBAL | LOCAL ] { TEMPORARY | TEMP } ] TABLE table_name
+-- ( [
+-- { column_name data_type [ DEFAULT default_expr ] [ column_constraint [ ... ] ]
+-- | table_constraint
+-- | LIKE parent_table [ { INCLUDING | EXCLUDING } { DEFAULTS | CONSTRAINTS |
INDEXES } ] .
+-- [, ... ]
+-- ] )
+--[ INHERITS ( parent_table [, ... ] ) ]
+--[ WITH ( storage_parameter [= value] [, ... ] ) | WITH OIDS | WITHOUT OIDS ]
+--[ ON COMMIT { PRESERVE ROWS | DELETE ROWS | DROP } ]
+--[ TABLESPACE tablespace ]
+--where column_constraint is:
+--[ CONSTRAINT constraint_name ]
+--{ NOT NULL |
+-- NULL |
+-- UNIQUE index_parameters |
+-- PRIMARY KEY index_parameters |
+-- CHECK ( expression ) |
+-- REFERENCES reftable [ ( refcolumn ) ] [ MATCH FULL | MATCH PARTIAL | MATCH SIMPLE ]
+-- [ ON DELETE action ] [ ON UPDATE action ] }
+--[ DEFERRABLE | NOT DEFERRABLE ] [ INITIALLY DEFERRED | INITIALLY IMMEDIATE ]
+--and table_constraint is:
+--[ CONSTRAINT constraint_name ]
+--{ UNIQUE ( column_name [, ... ] ) index_parameters |
+-- PRIMARY KEY ( column_name [, ... ] ) index_parameters |
+-- CHECK ( expression ) |
+-- FOREIGN KEY ( column_name [, ... ] ) REFERENCES reftable [ ( refcolumn [, ... ] ) ]
+-- [ MATCH FULL | MATCH PARTIAL | MATCH SIMPLE ] [ ON DELETE action ] [ ON UPDATE
action ]
+--[ DEFERRABLE | NOT DEFERRABLE ] [ INITIALLY DEFERRED | INITIALLY IMMEDIATE ]
+--index_parameters in UNIQUE and PRIMARY KEY constraints are:
+--[ WITH ( storage_parameter [= value] [, ... ] ) ]
+--[ USING INDEX TABLESPACE tablespace ]
+
+CREATE TABLE films (
+ code char(5) CONSTRAINT firstkey PRIMARY KEY,
+ title varchar(40) NOT NULL,
+ did integer NOT NULL,
+ date_prod date,
+ kind varchar(10),
+ len interval hour to minute
+);
+
+CREATE TABLE distributors (
+ did integer PRIMARY KEY DEFAULT nextval('serial'),
+ name varchar(40) NOT NULL CHECK (name <> ”)
+
+);
+
+CREATE TABLE array_int (
+ vector int[][]
+);
+-- 80 STATEMENTS *******************************************************
+CREATE TABLE films (
+ code char(5),
+ title varchar(40),
+ did integer,
+ date_prod date,
+ kind varchar(10),
+ len interval hour to minute,
+ CONSTRAINT production UNIQUE(date_prod)
+);
+
+CREATE TABLE distributors (
+ did integer CHECK (did > 100),
+ name varchar(40)
+);
+
+CREATE TABLE distributors (
+ did integer,
+ name varchar(40)
+ CONSTRAINT con1 CHECK (did > 100 AND name <> ”)
+);
+
+CREATE TABLE films (
+ code char(5),
+ title varchar(40),
+ did integer,
+ date_prod date,
+ kind varchar(10),
+ len interval hour to minute,
+ CONSTRAINT code_title PRIMARY KEY(code,title)
+);
+
+CREATE TABLE films (
+ code char(5),
+ title varchar(40),
+ did integer,
+ date_prod date,
+ kind varchar(10),
+ len interval hour to minute,
+ CONSTRAINT code_title PRIMARY KEY(code,title)
+);
+
+CREATE TABLE distributors (
+ name varchar(40) DEFAULT 'Luso Films',
+ did integer DEFAULT nextval('distributors_serial'),
+ modtime timestamp DEFAULT current_timestamp
+);
+
+CREATE TABLE distributors (
+ did integer CONSTRAINT no_null NOT NULL,
+ name varchar(40) NOT NULL
+);
+
+CREATE TABLE distributors (
+ did integer,
+ name varchar(40) UNIQUE
+);
+
+CREATE TABLE distributors (
+ did integer,
+ name varchar(40),
+ UNIQUE(name)
+);
+
+CREATE TABLE distributors (
+ did integer,
+ name varchar(40),
+ UNIQUE(name) WITH (fillfactor=70)
+)
+WITH (fillfactor=70);
+-- 90 STATEMENTS *******************************************************
+CREATE TABLE cinemas (
+ id serial,
+ name text,
+ location text
+) TABLESPACE diskvol1;
+
+--CREATE [ [ GLOBAL | LOCAL ] { TEMPORARY | TEMP } ] TABLE table_name
+-- [ (column_name [, ...] ) ]
+-- [ WITH ( storage_parameter [= value] [, ... ] ) | WITH OIDS | WITHOUT OIDS ]
+-- [ ON COMMIT { PRESERVE ROWS | DELETE ROWS | DROP } ]
+-- [ TABLESPACE tablespace ]
+-- AS query
+-- [ WITH [ NO ] DATA ]
+
+CREATE TABLE films_recent AS
+ SELECT * FROM films WHERE date_prod >= '2002-01-01';
+
+CREATE TABLE films2 AS
+ TABLE films;
+
+CREATE TEMP TABLE films_recent WITH (OIDS) ON COMMIT DROP AS
+ EXECUTE recentfilms('2002-01-01');
+
+--CREATE TABLESPACE tablespacename [ OWNER username ] LOCATION 'directory '
+
+CREATE TABLESPACE dbspace LOCATION '/data/dbs';
+
+CREATE TABLESPACE indexspace OWNER genevieve LOCATION '/data/indexes';
+
+--CREATE TEXT SEARCH CONFIGURATION name (
+-- PARSER = parser_name |
+-- COPY = source_config
+--)
+
+CREATE TEXT SEARCH CONFIGURATION my_search_config (
+ PARSER = my_parser
+);
+
+--CREATE TEXT SEARCH DICTIONARY name (
+-- TEMPLATE = template
+-- [, option = value [, ... ]]
+--)
+
+CREATE TEXT SEARCH DICTIONARY my_russian (
+ template = snowball,
+ language = russian,
+ stopwords = myrussian
+);
+
+--CREATE TEXT SEARCH PARSER name (
+-- START = start_function ,
+-- GETTOKEN = gettoken_function ,
+-- END = end_function ,
+-- LEXTYPES = lextypes_function
+-- [, HEADLINE = headline_function ]
+--)
+
+CREATE TEXT SEARCH PARSER my_search_parser (
+ START = startNow(),
+ GETTOKEN = getToken(),
+ END = end(),
+ LEXTYPES = getLexTypes()
+);
+
+--CREATE TEXT SEARCH TEMPLATE name (
+-- [ INIT = init_function , ]
+-- LEXIZE = lexize_function
+--)
+
+CREATE TEXT SEARCH TEMPLATE my_search_template (
+ LEXIZE = lexizeNow()
+);
+
+--CREATE TRIGGER name { BEFORE | AFTER } { event [ OR ... ] }
+-- ON table [ FOR [ EACH ] { ROW | STATEMENT } ]
+-- EXECUTE PROCEDURE funcname ( arguments )
+-- 100 STATEMENTS *******************************************************
+CREATE TRIGGER trigger_name BEFORE dawn
+ ON table
+ EXECUTE PROCEDURE funcname ( 'arg1', 'arg2' );
+-- 101 STATEMENTS *******************************************************
\ No newline at end of file
Property changes on:
trunk/dna-integration-tests/src/test/resources/org/jboss/dna/test/integration/sequencer/ddl/postgres_test_statements.ddl
___________________________________________________________________
Name: svn:executable
+ *
Added:
trunk/dna-integration-tests/src/test/resources/org/jboss/dna/test/integration/sequencer/ddl/test_cnd.cnd
===================================================================
---
trunk/dna-integration-tests/src/test/resources/org/jboss/dna/test/integration/sequencer/ddl/test_cnd.cnd
(rev 0)
+++
trunk/dna-integration-tests/src/test/resources/org/jboss/dna/test/integration/sequencer/ddl/test_cnd.cnd 2009-12-16
20:46:14 UTC (rev 1448)
@@ -0,0 +1,36 @@
+//------------------------------------------------------------------------------
+// N A M E S P A C E S
+//------------------------------------------------------------------------------
+<jcr='http://www.jcp.org/jcr/1.0'>
+<nt='http://www.jcp.org/jcr/nt/1.0'>
+<mix='http://www.jcp.org/jcr/mix/1.0'>
+<ddl='http://www.jboss.org/dna/ddl/1.0'>
+
+//------------------------------------------------------------------------------
+// N O D E T Y P E S
+//------------------------------------------------------------------------------
+
+// =============================================================================
+// STATEMENT
+// =============================================================================
+[ddl:statement] mixin abstract
+ - ddl:expression (string) mandatory
+ + * (ddl:ddlProblem) = ddl:ddlProblem multiple
+
+[ddl:other_statement] mixin abstract
+ - ddl:expression (string) mandatory
+ + * (ddl:ddlProblem) = ddl:ddlProblem multiple
+
+// =============================================================================
+// CREATE SCHEMA
+// =============================================================================
+[ddl:schemaDefinition] > ddl:statement mixin
+ - ddl:defaultCharacterSetName (STRING)
+ + * (ddl:other_statement) = ddl:other_statement multiple
+
+// =============================================================================
+// DDL PROBLEM
+// =============================================================================
+[ddl:ddlProblem] mixin
+ - ddl:problemLevel (LONG) mandatory
+ - ddl:message (STRING) mandatory
\ No newline at end of file
Added:
trunk/dna-integration-tests/src/test/resources/org/jboss/dna/test/integration/test_cnd.cnd
===================================================================
---
trunk/dna-integration-tests/src/test/resources/org/jboss/dna/test/integration/test_cnd.cnd
(rev 0)
+++
trunk/dna-integration-tests/src/test/resources/org/jboss/dna/test/integration/test_cnd.cnd 2009-12-16
20:46:14 UTC (rev 1448)
@@ -0,0 +1,32 @@
+//------------------------------------------------------------------------------
+// N A M E S P A C E S
+//------------------------------------------------------------------------------
+<jcr='http://www.jcp.org/jcr/1.0'>
+<nt='http://www.jcp.org/jcr/nt/1.0'>
+<mix='http://www.jcp.org/jcr/mix/1.0'>
+<ddl='http://www.jboss.org/dna/ddl/1.0'>
+
+//------------------------------------------------------------------------------
+// N O D E T Y P E S
+//------------------------------------------------------------------------------
+
+// =============================================================================
+// STATEMENT
+// =============================================================================
+[ddl:statement] mixin abstract
+ - ddl:expression (string) mandatory
+ + * (ddl:ddlProblem) = ddl:ddlProblem multiple
+
+// =============================================================================
+// CREATE SCHEMA
+// =============================================================================
+[ddl:schemaDefinition] > ddl:statement mixin
+ - ddl:defaultCharacterSetName (STRING)
+ + * (ddl:statement) = ddl:statement multiple
+
+// =============================================================================
+// DDL PROBLEM
+// =============================================================================
+[ddl:ddlProblem] mixin
+ - ddl:problemLevel (LONG) mandatory
+ - ddl:message (STRING) mandatory
\ No newline at end of file