Author: blafond
Date: 2010-01-05 08:33:29 -0500 (Tue, 05 Jan 2010)
New Revision: 1528
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/standard_test_statements.ddl
Removed:
trunk/dna-integration-tests/src/test/resources/org/jboss/dna/test/integration/sequencer/ddl/PostgresDdl.cnd
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/DerbyDdl.cnd
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/postgres_test_statements.ddl
Log:
DNA-49 integration test changes for additional parsing. Includes parsing for Grant
statements in Standard, Derby & Postgres
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 2010-01-05
13:31:47 UTC (rev 1527)
+++
trunk/dna-integration-tests/src/test/java/org/jboss/dna/test/integration/sequencer/ddl/DdlSequencerIntegrationTest.java 2010-01-05
13:33:29 UTC (rev 1528)
@@ -23,6 +23,7 @@
*/
package org.jboss.dna.test.integration.sequencer.ddl;
+import static org.junit.Assert.assertNotNull;
import static org.hamcrest.core.Is.is;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertThat;
@@ -199,6 +200,53 @@
}
@Test
+ public void shouldSequenceStandardDdlFile() throws Exception {
+ System.out.println("STARTED:
shouldSequenceStandardDdlFile(standard_test_statements.ddl)");
+ URL url = getUrl(cndDdlFolder + "standard_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();
+
+ //printNodeProperties(ddlNode);
+
+ long numStatements =
ddlNode.getNodes().nextNode().getNodes().getSize();
+ assertEquals(numStatements, 11);
+
+ //GRANT SELECT ON TABLE purchaseOrders TO maria,harry;
+ Node grantNode = findNode(ddlNode, "purchaseOrders",
"ddl:grantOnTableStatement");
+ assertNotNull(grantNode);
+ Node granteeNode = findNode(grantNode, "maria",
"ddl:grantee");
+ assertNotNull(granteeNode);
+ Node privNode = findNode(grantNode, "privilege",
"ddl:grantPrivilege");
+ assertNotNull(privNode);
+ verifySingleValueProperty(privNode, "ddl:type",
"SELECT");
+
+ //GRANT UPDATE, USAGE ON TABLE purchaseOrders TO anita,zhi;
+ grantNode = findNode(ddlNode, "billedOrders",
"ddl:grantOnTableStatement");
+ assertNotNull(grantNode);
+ privNode = findNode(grantNode, "privilege",
"ddl:grantPrivilege");
+ assertNotNull(privNode);
+ verifySingleValueProperty(privNode, "ddl:type",
"UPDATE");
+ granteeNode = findNode(grantNode, "anita",
"ddl:grantee");
+ assertNotNull(granteeNode);
+ }
+ }
+ }
+
+ System.out.println("FINISHED:
shouldSequenceStandardDdlFile(create_schema.ddl)");
+ }
+
+ @Test
public void shouldSequenceDerbyDdlFile() throws Exception {
System.out.println("STARTED:
shouldSequenceDerbyDdlFile(derby_test_statements.ddl)");
URL url = getUrl(cndDdlFolder + "derby_test_statements.ddl");
@@ -225,6 +273,89 @@
verifyNode(ddlNode, "SAMP.DEPARTMENT",
"ddl:expression");
verifyNode(ddlNode, "HOTEL_ID",
"ddl:datatypeName");
verifyNode(ddlNode, "CITIES",
"ddl:startLineNumber");
+
+ // Create Function
+ verifyNode(ddlNode, "PROPERTY_FILE_READER",
"ddl:startLineNumber", 71);
+ verifyNodeTypes(ddlNode, "PROPERTY_FILE_READER",
+ "derbyddl:createFunctionStatement",
+ "ddl:creatable",
+ "derbyddl:functionOperand");
+ verifyNode(ddlNode, "KEY_COL",
"ddl:datatypeName", "VARCHAR");
+
+ Node functionNode = findNode(ddlNode, "TO_DEGREES");
+ assertNotNull(functionNode);
+ verifyChildNode(functionNode, "parameterStyle",
"ddl:value", "PARAMETER STYLE JAVA");
+
+ // Create Index
+ // CREATE INDEX IXSALE ON SAMP.SALES (SALES);
+ Node indexNode = findNode(ddlNode, "IXSALE",
"derbyddl:createIndexStatement");
+ assertNotNull(indexNode);
+ verifySimpleStringProperty(indexNode, "derbyddl:tableName",
"SAMP.SALES");
+ Node colRefNode = findNode(indexNode, "SALES");
+ assertNotNull(colRefNode);
+ colRefNode = findNode(ddlNode, "SALES",
"derbyddl:indexColumnReference");
+ assertNotNull(colRefNode);
+ verifyNodeTypes(colRefNode, "SALES",
+ "derbyddl:indexColumnReference",
+ "ddl:columnReference",
+ "ddl:referenceOperand");
+
+ // declare global temporary table SESSION.t1(c11 int) not logged;
+ Node ttNode = findNode(ddlNode, "SESSION.t1",
"derbyddl:declareGlobalTemporaryTableStatement");
+ assertNotNull(ttNode);
+ Node colNode = findNode(ttNode, "c11");
+ assertNotNull(colNode);
+ verifySimpleStringProperty(colNode, "ddl:datatypeName",
"int");
+
+ // LOCK TABLE FlightAvailability IN EXCLUSIVE MODE;
+ Node lockNode = findNode(ddlNode, "FlightAvailability",
"derbyddl:lockTableStatement");
+ assertNotNull(lockNode);
+ Node optionNode = findNode(lockNode, "lockMode");
+ assertNotNull(optionNode);
+ verifySimpleStringProperty(optionNode, "ddl:value",
"EXCLUSIVE");
+
+ // RENAME TABLE SAMP.EMP_ACT TO EMPLOYEE_ACT
+ Node renameTableNode = findNode(ddlNode, "SAMP.EMP_ACT",
"derbyddl:renameTableStatement");
+ assertNotNull(renameTableNode);
+ verifySimpleStringProperty(renameTableNode, "ddl:newName",
"EMPLOYEE_ACT");
+
+ // CREATE SYNONYM SAMP.T1 FOR SAMP.TABLEWITHLONGNAME;
+ Node synonymNode = findNode(ddlNode, "SAMP.T1",
"derbyddl:createSynonymStatement");
+ assertNotNull(synonymNode);
+ verifySimpleStringProperty(synonymNode,
"derbyddl:tableName", "SAMP.TABLEWITHLONGNAME");
+
+ //CREATE TRIGGER FLIGHTSDELETE3
+ // AFTER DELETE ON FLIGHTS
+ // REFERENCING OLD AS OLD
+ // FOR EACH ROW
+ // DELETE FROM FLIGHTAVAILABILITY WHERE FLIGHT_ID = OLD.FLIGHT_ID;
+ Node triggerNode = findNode(ddlNode, "FLIGHTSDELETE3",
"derbyddl:createTriggerStatement");
+ assertNotNull(triggerNode);
+ verifySimpleStringProperty(triggerNode,
"derbyddl:tableName", "FLIGHTS");
+
+ //CREATE TRIGGER t1 NO CASCADE BEFORE UPDATE ON x
+ // FOR EACH ROW MODE DB2SQL
+ // values app.notifyEmail('Jerry', 'Table x is about to
be updated');
+ triggerNode = findNode(ddlNode, "t1",
"derbyddl:createTriggerStatement");
+ assertNotNull(triggerNode);
+ verifySimpleStringProperty(triggerNode,
"derbyddl:tableName", "x");
+ optionNode = findNode(triggerNode, "forEach");
+ assertNotNull(optionNode);
+ verifySimpleStringProperty(optionNode, "ddl:value",
"FOR EACH ROW");
+ optionNode = findNode(triggerNode, "eventType");
+ assertNotNull(optionNode);
+ verifySimpleStringProperty(optionNode, "ddl:value",
"UPDATE");
+
+ //GRANT EXECUTE ON PROCEDURE p TO george;
+ Node grantNode = findNode(ddlNode, "p",
"derbyddl:grantOnProcedureStatement");
+ assertNotNull(grantNode);
+
+ //GRANT purchases_reader_role TO george,maria;
+ grantNode = findNode(ddlNode, "grantRoles",
"derbyddl:grantRolesStatement");
+ assertNotNull(grantNode);
+ Node roleNode = findNode(grantNode, "george",
"ddl:grantee");
+ assertNotNull(roleNode);
+
}
}
}
@@ -288,7 +419,7 @@
Node ddlNode = iter.nextNode();
long numStatements =
ddlNode.getNodes().nextNode().getNodes().getSize();
- assertEquals(numStatements, 101);
+ assertEquals(numStatements, 106);
//printNodeProperties(ddlNode);
@@ -307,6 +438,20 @@
verifyNode(ddlNode, "my_function",
"ddl:startLineNumber", 44);
verifyNode(ddlNode, "my_function",
"ddl:startCharIndex", 1573);
verifyNode(ddlNode, "my_function",
"postgresddl:comment", "'Returns Roman Numeral'");
+
+ //ALTER TABLE foreign_companies RENAME COLUMN address TO city;
+ Node alterTableNode = findNode(ddlNode,
"foreign_companies", "postgresddl:alterTableStatement");
+ assertNotNull(alterTableNode);
+ Node renameColNode = findNode(alterTableNode,
"address","postgresddl:renamedColumn");
+ assertNotNull(renameColNode);
+ verifySingleValueProperty(renameColNode, "ddl:newName",
"city");
+
+ //GRANT EXECUTE ON FUNCTION divideByTwo(numerator int, IN demoninator
int) TO george;
+ Node grantNode = findNode(ddlNode, "divideByTwo",
"postgresddl:grantOnFunctionStatement");
+ assertNotNull(grantNode);
+ Node parameter_1 = findNode(grantNode,
"numerator","postgresddl:functionParameter");
+ assertNotNull(parameter_1);
+ verifySingleValueProperty(parameter_1, "ddl:datatypeName",
"int");
}
}
}
@@ -345,12 +490,33 @@
public void printNodeProperties(Node node) throws Exception {
printProperties(node);
+
for (NodeIterator iter = node.getNodes(); iter.hasNext();) {
printNodeProperties(iter.nextNode());
}
}
+ private void verifyChildNode(Node parentNode, String childNodeName, String propName,
String expectedValue) throws Exception {
+ // Find child node
+ Node childNode = null;
+ for (NodeIterator iter = parentNode.getNodes(); iter.hasNext();) {
+ Node nextNode = iter.nextNode();
+ if( nextNode.getName().equals(childNodeName)) {
+ childNode = nextNode;
+ break;
+ }
+ }
+ if( childNode != null ) {
+ assertThat( childNode.hasProperty(propName), is(true));
+ verifySingleValueProperty(childNode, propName, expectedValue);
+
+ } else {
+ fail("NODE: " + childNodeName + " not found");
+ }
+
+ }
+
private void verifyNode(Node topNode, String name, String propName) throws Exception
{
Node node = findNode(topNode, name);
@@ -362,6 +528,11 @@
}
+ private void verifySimpleStringProperty(Node node, String propName, String
expectedValue) throws Exception {
+ assertThat( node.hasProperty(propName), is(true));
+ verifySingleValueProperty(node, propName, expectedValue);
+ }
+
private void verifyNode(Node topNode, String name, String propName, String
expectedValue) throws Exception {
Node node = findNode(topNode, name);
@@ -433,15 +604,19 @@
}
}
- private void verifyMixin(Node node, String nodeType) throws Exception {
- boolean foundMixin = false;
+ private boolean hasMixin(Node node, String nodeType) throws Exception {
for( NodeType mixin : node.getMixinNodeTypes() ) {
String mixinName = mixin.getName();
if( mixinName.equals(nodeType) ) {
- foundMixin = true;
- break;
+ return true;
}
}
+ return false;
+ }
+
+ private void verifyMixin(Node node, String nodeType) throws Exception {
+ boolean foundMixin = hasMixin(node, nodeType);
+
assertThat(foundMixin, is(true));
}
@@ -457,6 +632,20 @@
}
+ private void verifyNodeTypes(Node topNode, String nodeName, String nodeTypeName,
String...moreNodeTypeNames) throws Exception {
+ Node node = findNode(topNode, nodeName);
+
+ if( node != null ) {
+ assertThat(node.isNodeType(nodeTypeName), is(true));
+ for( String nextTypeName : moreNodeTypeNames ) {
+ assertThat(node.isNodeType(nextTypeName), is(true));
+ }
+ } else {
+ fail("NODE: " + nodeName + " not found");
+ }
+
+ }
+
private Node findNode(Node node, String name) throws Exception {
if( node.getName().equals(name)) {
return node;
@@ -475,6 +664,24 @@
return null;
}
+ private Node findNode(Node node, String name, String type) throws Exception {
+ if( node.getName().equals(name) && node.isNodeType(type)) {
//(hasMixin(node, type) || node.isNodeType(type))) {
+ return node;
+ }
+ for (NodeIterator iter = node.getNodes(); iter.hasNext();) {
+ Node nextNode = iter.nextNode();
+ if( nextNode.getName().equals(name) && node.isNodeType(type)) {
//(hasMixin(node, type) || node.isNodeType(type))) {
+ return nextNode;
+ }
+ Node someNode = findNode(nextNode, name, type);
+ if( someNode != null ) {
+ return someNode;
+ }
+ }
+
+ return null;
+ }
+
private void printProperties( Node node ) throws RepositoryException,
PathNotFoundException, ValueFormatException {
System.out.println("\n >>> NODE PATH: " + node.getPath() );
Modified:
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 2010-01-05
13:31:47 UTC (rev 1527)
+++
trunk/dna-integration-tests/src/test/resources/org/jboss/dna/test/integration/sequencer/ddl/DerbyDdl.cnd 2010-01-05
13:33:29 UTC (rev 1528)
@@ -41,26 +41,44 @@
[derbyddl:synonymOperand] > ddl:operand abstract
[derbyddl:triggerOperand] > ddl:operand abstract
+[derbyddl:roleName] > derbyddl:roleOperand mixin
+
// =============================================================================
// COLUMN
// =============================================================================
[derbyddl:columnDefinition] > ddl:columnDefinition mixin
- derbyddl:dropDefault (boolean)
+[derbyddl:functionParameter] > ddl:columnDefinition mixin
+
+[derbyddl:indexColumnReference] > ddl:columnReference mixin
+ - derbyddl:order (STRING)
+
// =============================================================================
// CREATE STATEMENTS
// =============================================================================
[derbyddl:createFunctionStatement] > ddl:creatable, ddl:statement,
derbyddl:functionOperand mixin
-[derbyddl:createIndex] > ddl:statement, ddl:creatable,
derbyddl:indexOperand mixin
+ - ddl:datatypeName (STRING) mandatory
+ - ddl:datatypeLength (LONG)
+ - ddl:datatypePrecision (LONG)
+ - ddl:datatypeScale (LONG)
+ - ddl:isTableType (boolean)
+ + * (derbyddl:functionParameter) = derbyddl:functionParameter multiple
+ + * (ddl:statementOption) = ddl:statementOption multiple
+[derbyddl:createIndexStatement] > ddl:statement, ddl:creatable,
derbyddl:indexOperand mixin
- derbyddl:tableName (string) mandatory
- derbyddl:unique (boolean)
- + * (ddl:columnReference) = ddl:columnReference multiple
+ + * (derbyddl:indexColumnReference) = derbyddl:indexColumnReference 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:tableName (string) mandatory
[derbyddl:createTriggerStatement] > ddl:creatable, ddl:statement,
derbyddl:triggerOperand mixin
+ - derbyddl:tableName (string) mandatory
+ - ddl:sql (string) mandatory
+ + * (ddl:columnReference) = ddl:columnreference multiple
+[derbyddl:declareGlobalTemporaryTableStatement] > ddl:createTableStatement mixin
-
// =============================================================================
// DROP STATEMENTS
// =============================================================================
@@ -70,3 +88,15 @@
[derbyddl:dropRoleStatement] > ddl:droppable, derbyddl:roleOperand mixin
[derbyddl:dropSynonymStatement] > ddl:droppable, derbyddl:synonymOperand mixin
[derbyddl:dropTriggerStatement] > ddl:droppable, derbyddl:triggerOperand mixin
+
+// =============================================================================
+// MISC STATEMENTS
+// =============================================================================
+[derbyddl:lockTableStatement] > ddl:statement, ddl:tableOperand mixin
+[derbyddl:renameTableStatement] > ddl:statement, ddl:renamable, ddl:tableOperand
mixin
+
+[derbyddl:grantOnFunctionStatement] > ddl:grantStatement, derbyddl:functionOperand
mixin
+[derbyddl:grantOnProcedureStatement] > ddl:grantStatement,
derbyddl:procedureOperand mixin
+
+[derbyddl:grantRolesStatement] > ddl:grantStatement mixin
+ + ddl:name (derbyddl:roleName) = derbyddl:roleName multiple
\ No newline at end of file
Deleted:
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 2010-01-05
13:31:47 UTC (rev 1527)
+++
trunk/dna-integration-tests/src/test/resources/org/jboss/dna/test/integration/sequencer/ddl/PostgresDdl.cnd 2010-01-05
13:33:29 UTC (rev 1528)
@@ -1,178 +0,0 @@
-/*
- * 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
-
-
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 2010-01-05
13:33:29 UTC (rev 1528)
@@ -0,0 +1,205 @@
+/*
+ * 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
+[postgresddl:parameterOperand] > ddl:operand abstract
+
+[postgresddl:functionParameter] > postgresddl:parameterOperand mixin
+ - ddl:datatypeName (STRING) mandatory
+ - ddl:datatypeLength (LONG)
+ - ddl:datatypePrecision (LONG)
+ - ddl:datatypeScale (LONG)
+ - ddl:nullable (STRING)
+ - ddl:defaultOption (STRING)
+ - postgresddl:mode (STRING)
+
+[postgresddl:role] > postgresddl:roleOperand mixin
+
+[postgresddl:renamedColumn] > ddl:renamable mixin
+
+// =============================================================================
+// 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 (postgresddl:renamedColumn) = postgresddl:renamedColumn
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
+
+// =============================================================================
+// GRANT STATEMENTS
+// =============================================================================
+[postgresddl:grantOnTableStatement] > ddl:grantStatement, ddl:tableOperand
mixin
+[postgresddl:grantOnSequenceStatement] > ddl:grantStatement,
postgresddl:sequenceOperand mixin
+[postgresddl:grantOnDatabaseStatement] > ddl:grantStatement,
postgresddl:databaseOperand mixin
+[postgresddl:grantOnForeignDataWrapperStatement] > ddl:grantStatement,
postgresddl:foreignDataOperand mixin
+[postgresddl:grantOnForeignServerStatement] > ddl:grantStatement,
postgresddl:serverOperand mixin
+[postgresddl:grantOnFunctionStatement] > ddl:grantStatement,
postgresddl:functionOperand mixin
+ + postgresddl:parameter (postgresddl:functionParameter) = postgresddl:functionParameter
multiple
+[postgresddl:grantOnLanguageStatement] > ddl:grantStatement,
postgresddl:languageOperand mixin
+[postgresddl:grantOnSchemaStatement] > ddl:grantStatement, ddl:schemaOperand
mixin
+[postgresddl:grantOnTablespaceStatement] > ddl:grantStatement,
postgresddl:tablespaceOperand mixin
+[postgresddl:grantRolesStatement] > ddl:grantStatement mixin
+ + postgresddl:grantRole (postgresddl:role) = postgresddl:role multiple
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 2010-01-05
13:31:47 UTC (rev 1527)
+++
trunk/dna-integration-tests/src/test/resources/org/jboss/dna/test/integration/sequencer/ddl/StandardDdl.cnd 2010-01-05
13:33:29 UTC (rev 1528)
@@ -63,7 +63,7 @@
[ddl:settable] > ddl:operation abstract
[ddl:grantable] > ddl:operation abstract
[ddl:revokable] > ddl:operation abstract
-[ddl:renamable] > ddl:operation, ddl:operand abstract
+[ddl:renamable] > ddl:operation abstract
- ddl:newName (STRING)
// =============================================================================
@@ -119,6 +119,7 @@
[ddl:columnReference] > ddl:referenceOperand mixin
[ddl:tableReference] > ddl:referenceOperand mixin
[ddl:fkColumnReference] > ddl:referenceOperand mixin
+[ddl:grantee] > ddl:referenceOperand mixin
// =============================================================================
// SIMPLE STRING PROPERTY
@@ -258,9 +259,22 @@
[ddl:insertStatement] > ddl:statement, ddl:insertable mixin
// TODO: THIS IS COMPLEX, NEED TO BREAK DOWN
-
-[ddl:grantStatement] > ddl:statement, ddl:grantable mixin
- // TODO: THIS IS COMPLEX, NEED TO BREAK DOWN
+// =============================================================================
+// GRANT STATEMENTS
+// =============================================================================
+[ddl:grantPrivilege] mixin
+ - ddl:type (STRING) mandatory
+ + * (ddl:columnReference) = ddl:columnReference multiple
+[ddl:grantStatement] > ddl:statement, ddl:grantable mixin
+ - ddl:allPrivileges (boolean)
+ + * (ddl:grantPrivilege) = ddl:grantPrivilege multiple
+ + * (ddl:grantee) = ddl:grantee multiple
+
+[ddl:grantOnTableStatement] > ddl:grantStatement, ddl:tableOperand mixin
+[ddl:grantOnDomainStatement] > ddl:grantStatement, ddl:domainOperand mixin
+[ddl:grantOnCollationStatement] > ddl:grantStatement, ddl:collationOperand mixin
+[ddl:grantOnCharacterSetStatement] > ddl:grantStatement, ddl:characterSetOperand
mixin
+[ddl:grantOnTranslationStatement] > ddl:grantStatement, ddl:translationOperand
mixin
Modified:
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 2010-01-05
13:31:47 UTC (rev 1527)
+++
trunk/dna-integration-tests/src/test/resources/org/jboss/dna/test/integration/sequencer/ddl/postgres_test_statements.ddl 2010-01-05
13:33:29 UTC (rev 1528)
@@ -595,4 +595,15 @@
CREATE TRIGGER trigger_name BEFORE dawn
ON table
EXECUTE PROCEDURE funcname ( 'arg1', 'arg2' );
--- 101 STATEMENTS *******************************************************
\ No newline at end of file
+
+ALTER TABLE foreign_companies RENAME COLUMN address TO city;
+
+ALTER TABLE us_companies RENAME TO suppliers;
+
+ALTER TABLE old_addresses ALTER COLUMN street SET NOT NULL;
+
+ALTER TABLE new_addresses ALTER COLUMN street DROP NOT NULL;
+
+GRANT EXECUTE ON FUNCTION divideByTwo(numerator int, IN demoninator int) TO george;
+
+-- 106 STATEMENTS *******************************************************
Added:
trunk/dna-integration-tests/src/test/resources/org/jboss/dna/test/integration/sequencer/ddl/standard_test_statements.ddl
===================================================================
---
trunk/dna-integration-tests/src/test/resources/org/jboss/dna/test/integration/sequencer/ddl/standard_test_statements.ddl
(rev 0)
+++
trunk/dna-integration-tests/src/test/resources/org/jboss/dna/test/integration/sequencer/ddl/standard_test_statements.ddl 2010-01-05
13:33:29 UTC (rev 1528)
@@ -0,0 +1,49 @@
+CREATE TABLE MORE_ACTIVITIES (CITY_ID INT NOT NULL,
+ SEASON VARCHAR(20), ACTIVITY VARCHAR(32) NOT NULL);
+
+CREATE SCHEMA AUTHORIZATION oe
+ CREATE TABLE new_product
+ (color VARCHAR(10) PRIMARY KEY, quantity NUMERIC)
+ CREATE VIEW new_product_view
+ AS SELECT color, quantity FROM new_product WHERE color = 'RED'
+ GRANT select ON new_product_view TO hr;
+
+CREATE TABLE PEOPLE
+ (PERSON_ID INT NOT NULL CONSTRAINT PEOPLE_PK PRIMARY KEY, PERSON VARCHAR(26));
+
+CREATE SCHEMA schema_name_1
+ CREATE TABLE table_name_15 (
+ column_name_1 VARCHAR(255)
+ REFERENCES ref_table_name (ref_column_name_1)
+ ON UPDATE NO ACTION )
+ CREATE VIEW SAMP.V1 (COL_SUM, COL_DIFF)
+ AS SELECT COMM + BONUS, COMM - BONUS
+ FROM SAMP.EMPLOYEE
+ CREATE TABLE table_name26 (
+ column_name_1 VARCHAR(255),
+ UNIQUE (ref_column_name_1));
+
+CREATE TABLE table_name29 (
+ column_name_1 VARCHAR(255),
+ CONSTRAINT fk_name FOREIGN KEY (ref_column_name_1, ref_column_name_2)
+ REFERENCES ref_table_name (ref_column_name_1)
+ ON DELETE CASCADE ON UPDATE SET NULL
+ MATCH FULL);
+
+CREATE TABLE ACTIVITIES (CITY_ID INT NOT NULL,
+ SEASON VARCHAR(20), ACTIVITY VARCHAR(32) NOT NULL)
+
+CREATE TABLE HOTELAVAILABILITY
+ (HOTEL_ID INT NOT NULL, BOOKING_DATE DATE NOT NULL,
+ ROOMS_TAKEN INT DEFAULT 0, PRIMARY KEY (HOTEL_ID, BOOKING_DATE));
+
+GRANT SELECT ON TABLE purchaseOrders TO maria,harry;
+
+GRANT UPDATE, USAGE ON TABLE billedOrders TO anita,zhi;
+
+GRANT SELECT ON TABLE orders.bills to PUBLIC;
+
+GRANT INSERT(a, b, c) ON TABLE purchaseOrders TO purchases_reader_role;
+
+
+
Property changes on:
trunk/dna-integration-tests/src/test/resources/org/jboss/dna/test/integration/sequencer/ddl/standard_test_statements.ddl
___________________________________________________________________
Name: svn:executable
+ *