summaryrefslogtreecommitdiffstats
path: root/das-cpp/trunk/runtime/test/rsc
diff options
context:
space:
mode:
authorjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2009-11-16 06:46:29 +0000
committerjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2009-11-16 06:46:29 +0000
commitc5846d0e19e3b5fd9d818d714fea2df3f3ef90eb (patch)
treedac6ae1624ccc49913032c37610440f2a8b2e855 /das-cpp/trunk/runtime/test/rsc
parent580265475dca3952d6e243b1edeb5243df998c23 (diff)
Cleaning up SVN structure, moving das trunk to das-cpp/trunk.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@880626 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'das-cpp/trunk/runtime/test/rsc')
-rw-r--r--das-cpp/trunk/runtime/test/rsc/testCompositeRelationship.xml35
-rw-r--r--das-cpp/trunk/runtime/test/rsc/testCreateOperation.xml41
-rw-r--r--das-cpp/trunk/runtime/test/rsc/testDeleteOperation.xml41
-rw-r--r--das-cpp/trunk/runtime/test/rsc/testIncompleteCompositeRelationship1.xml35
-rw-r--r--das-cpp/trunk/runtime/test/rsc/testIncompleteCompositeRelationship2.xml34
-rw-r--r--das-cpp/trunk/runtime/test/rsc/testKeyPairColumnTypeNotEqual.xml37
-rw-r--r--das-cpp/trunk/runtime/test/rsc/testManyRelationship1.xml29
-rw-r--r--das-cpp/trunk/runtime/test/rsc/testManyRelationship2.xml29
-rw-r--r--das-cpp/trunk/runtime/test/rsc/testModifyOperation.xml41
-rw-r--r--das-cpp/trunk/runtime/test/rsc/testOCC1.xml43
-rw-r--r--das-cpp/trunk/runtime/test/rsc/testOCC2.xml43
11 files changed, 408 insertions, 0 deletions
diff --git a/das-cpp/trunk/runtime/test/rsc/testCompositeRelationship.xml b/das-cpp/trunk/runtime/test/rsc/testCompositeRelationship.xml
new file mode 100644
index 0000000000..c22799e650
--- /dev/null
+++ b/das-cpp/trunk/runtime/test/rsc/testCompositeRelationship.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ -->
+
+<Config xmlns="http:///org.apache.tuscany.das.rdb/config.xsd" uri="test.composite.relationship">
+
+ <Command name="get composite relationship" SQL="SELECT DEPARTMENT.ID, DEPARTMENT.NAME, EMPLOYEE.ID, EMPLOYEE.DEPARTMENT_ID, EMPLOYEE.DEPARTMENT_NAME FROM DEPARTMENT, EMPLOYEE;"/>
+
+ <Table tableName="department">
+ <Column sqlType="integer" columnName="id" primaryKey="true"/>
+ <Column sqlType="varchar" columnName="name" primaryKey="true"/>
+ </Table>
+
+ <Relationship primaryKeyTable="department" foreignKeyTable="employee" many="true">
+ <KeyPair primaryKeyColumn="id" foreignKeyColumn="department_id"/>
+ <KeyPair primaryKeyColumn="name" foreignKeyColumn="department_name"/>
+ </Relationship>
+
+</Config> \ No newline at end of file
diff --git a/das-cpp/trunk/runtime/test/rsc/testCreateOperation.xml b/das-cpp/trunk/runtime/test/rsc/testCreateOperation.xml
new file mode 100644
index 0000000000..c9e8d8a444
--- /dev/null
+++ b/das-cpp/trunk/runtime/test/rsc/testCreateOperation.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ -->
+
+<Config xmlns="http:///org.apache.tuscany.das.rdb/config.xsd" uri="test.create.operation"> >
+
+ <Command name="get all tables" SQL="SELECT * FROM company, department, employee;"/>
+
+ <Table tableName="Department">
+ <Column columnName="id" sqlType="integer" primaryKey="true"/>
+ <Column columnName="name" sqlType="varchar" primaryKey="true"/>
+ </Table>
+
+ <Relationship primaryKeyTable="company" foreignKeyTable="department">
+ <KeyPair primaryKeyColumn="id" foreignKeyColumn="company_id"/>
+ </Relationship>
+
+ <Relationship primaryKeyTable="department" foreignKeyTable="employee">
+ <KeyPair primaryKeyColumn="id" foreignKeyColumn="department_id"/>
+ <KeyPair primaryKeyColumn="name" foreignKeyColumn="department_name"/>
+ </Relationship>
+
+
+
+</Config> \ No newline at end of file
diff --git a/das-cpp/trunk/runtime/test/rsc/testDeleteOperation.xml b/das-cpp/trunk/runtime/test/rsc/testDeleteOperation.xml
new file mode 100644
index 0000000000..fa619fda76
--- /dev/null
+++ b/das-cpp/trunk/runtime/test/rsc/testDeleteOperation.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ -->
+
+<Config xmlns="http:///org.apache.tuscany.das.rdb/config.xsd" uri="test.delete.operation">
+
+ <Command name="get all tables" SQL="SELECT * FROM company, department, employee;"/>
+
+ <Table tableName="Department">
+ <Column columnName="id" sqlType="integer" primaryKey="true"/>
+ <Column columnName="name" sqlType="varchar" primaryKey="true"/>
+ </Table>
+
+ <Relationship primaryKeyTable="company" foreignKeyTable="department">
+ <KeyPair primaryKeyColumn="id" foreignKeyColumn="company_id"/>
+ </Relationship>
+
+ <Relationship primaryKeyTable="department" foreignKeyTable="employee">
+ <KeyPair primaryKeyColumn="id" foreignKeyColumn="department_id"/>
+ <KeyPair primaryKeyColumn="name" foreignKeyColumn="department_name"/>
+ </Relationship>
+
+
+
+</Config> \ No newline at end of file
diff --git a/das-cpp/trunk/runtime/test/rsc/testIncompleteCompositeRelationship1.xml b/das-cpp/trunk/runtime/test/rsc/testIncompleteCompositeRelationship1.xml
new file mode 100644
index 0000000000..b43453d21d
--- /dev/null
+++ b/das-cpp/trunk/runtime/test/rsc/testIncompleteCompositeRelationship1.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ -->
+
+<Config xmlns="http:///org.apache.tuscany.das.rdb/config.xsd" uri="test.incomplete.composite.relationship.one">
+
+ <Command name="get incomplete relationship" SQL="SELECT department.id, department.name, employee.id, employee.department_id FROM department, employee;"/>
+
+ <Table tableName="department">
+ <Column sqlType="integer" columnName="id" primaryKey="true"/>
+ <Column sqlType="varchar" columnName="name" primaryKey="true"/>
+ </Table>
+
+ <Relationship primaryKeyTable="department" foreignKeyTable="employee" many="true">
+ <KeyPair primaryKeyColumn="id" foreignKeyColumn="department_id"/>
+ <KeyPair primaryKeyColumn="name" foreignKeyColumn="department_name"/>
+ </Relationship>
+
+</Config> \ No newline at end of file
diff --git a/das-cpp/trunk/runtime/test/rsc/testIncompleteCompositeRelationship2.xml b/das-cpp/trunk/runtime/test/rsc/testIncompleteCompositeRelationship2.xml
new file mode 100644
index 0000000000..a3032f2be0
--- /dev/null
+++ b/das-cpp/trunk/runtime/test/rsc/testIncompleteCompositeRelationship2.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ -->
+
+<Config xmlns="http:///org.apache.tuscany.das.rdb/config.xsd" uri="test.incomplete.composite.relationship.two">
+
+ <Command name="get incomplete relationship" SQL="SELECT department.id, department.name, employee.id, employee.department_id, employee.department_name FROM department, employee;"/>
+
+ <Table tableName="department">
+ <Column sqlType="varchar" columnName="name" primaryKey="true"/>
+ </Table>
+
+ <Relationship primaryKeyTable="department" foreignKeyTable="employee" many="true">
+ <KeyPair primaryKeyColumn="id" foreignKeyColumn="department_id"/>
+ <KeyPair primaryKeyColumn="name" foreignKeyColumn="department_name"/>
+ </Relationship>
+
+</Config> \ No newline at end of file
diff --git a/das-cpp/trunk/runtime/test/rsc/testKeyPairColumnTypeNotEqual.xml b/das-cpp/trunk/runtime/test/rsc/testKeyPairColumnTypeNotEqual.xml
new file mode 100644
index 0000000000..3da18378a1
--- /dev/null
+++ b/das-cpp/trunk/runtime/test/rsc/testKeyPairColumnTypeNotEqual.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ -->
+
+<Config xmlns="http:///org.apache.tuscany.das.rdb/config.xsd" uri="test.key.pair.column.type.not.equal">
+
+ <Command name="get all employees and departments" SQL="SELECT * FROM department, employee;"/>
+
+ <Table tableName="department">
+ <Column sqlType="integer" columnName="id" primaryKey="true"/>
+ </Table>
+
+ <Table tableName="employee">
+ <Column sqlType="float" columnName="department_id" primaryKey="true"/>
+ </Table>
+
+ <Relationship primaryKeyTable="department" foreignKeyTable="employee" many="true">
+ <KeyPair primaryKeyColumn="id" foreignKeyColumn="department_id"/>
+ </Relationship>
+
+</Config> \ No newline at end of file
diff --git a/das-cpp/trunk/runtime/test/rsc/testManyRelationship1.xml b/das-cpp/trunk/runtime/test/rsc/testManyRelationship1.xml
new file mode 100644
index 0000000000..30ceadf1c0
--- /dev/null
+++ b/das-cpp/trunk/runtime/test/rsc/testManyRelationship1.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ -->
+
+<Config xmlns="http:///org.apache.tuscany.das.rdb/config.xsd" uri="test.many.relationship.one">
+
+ <Command name="get company 1 and its departments" SQL="SELECT * FROM company, department where company.id = 1;"/>
+
+ <Relationship primaryKeyTable="company" foreignKeyTable="department" many="true">
+ <KeyPair primaryKeyColumn="id" foreignKeyColumn="company_id"/>
+ </Relationship>
+
+</Config> \ No newline at end of file
diff --git a/das-cpp/trunk/runtime/test/rsc/testManyRelationship2.xml b/das-cpp/trunk/runtime/test/rsc/testManyRelationship2.xml
new file mode 100644
index 0000000000..9fa38c8a79
--- /dev/null
+++ b/das-cpp/trunk/runtime/test/rsc/testManyRelationship2.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ -->
+
+<Config xmlns="http:///org.apache.tuscany.das.rdb/config.xsd" uri="test.many.relationship.two">
+
+ <Command name="get company 1 and its departments" SQL="SELECT * FROM company, department where company.id = 1;"/>
+
+ <Relationship primaryKeyTable="company" foreignKeyTable="department" many="false">
+ <KeyPair primaryKeyColumn="id" foreignKeyColumn="company_id"/>
+ </Relationship>
+
+</Config> \ No newline at end of file
diff --git a/das-cpp/trunk/runtime/test/rsc/testModifyOperation.xml b/das-cpp/trunk/runtime/test/rsc/testModifyOperation.xml
new file mode 100644
index 0000000000..59ae0b986a
--- /dev/null
+++ b/das-cpp/trunk/runtime/test/rsc/testModifyOperation.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ -->
+
+<Config xmlns="http:///org.apache.tuscany.das.rdb/config.xsd" uri="test.modify.operation">
+
+ <Command name="get all tables" SQL="SELECT * FROM company, department, employee;"/>
+
+ <Table tableName="Department">
+ <Column columnName="id" sqlType="integer" primaryKey="true"/>
+ <Column columnName="name" sqlType="varchar" primaryKey="true"/>
+ </Table>
+
+ <Relationship primaryKeyTable="company" foreignKeyTable="department">
+ <KeyPair primaryKeyColumn="id" foreignKeyColumn="company_id"/>
+ </Relationship>
+
+ <Relationship primaryKeyTable="department" foreignKeyTable="employee">
+ <KeyPair primaryKeyColumn="id" foreignKeyColumn="department_id"/>
+ <KeyPair primaryKeyColumn="name" foreignKeyColumn="department_name"/>
+ </Relationship>
+
+
+
+</Config> \ No newline at end of file
diff --git a/das-cpp/trunk/runtime/test/rsc/testOCC1.xml b/das-cpp/trunk/runtime/test/rsc/testOCC1.xml
new file mode 100644
index 0000000000..605d1aee83
--- /dev/null
+++ b/das-cpp/trunk/runtime/test/rsc/testOCC1.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ -->
+
+<Config xmlns="http:///org.apache.tuscany.das.rdb/config.xsd" uri="test.occ">
+
+ <Command name="get all companies" SQL="SELECT * FROM company;"/>
+
+ <Table tableName="Department">
+ <Column columnName="id" sqlType="integer" primaryKey="true"/>
+ <Column columnName="name" sqlType="varchar" primaryKey="true"/>
+ </Table>
+
+ <Table tableName="company">
+ <Column columnName="occ" sqlType="integer" collision="true" managed="true"/>
+ </Table>
+
+ <Relationship primaryKeyTable="company" foreignKeyTable="department">
+ <KeyPair primaryKeyColumn="id" foreignKeyColumn="company_id"/>
+ </Relationship>
+
+ <Relationship primaryKeyTable="department" foreignKeyTable="employee">
+ <KeyPair primaryKeyColumn="id" foreignKeyColumn="department_id"/>
+ <KeyPair primaryKeyColumn="name" foreignKeyColumn="department_name"/>
+ </Relationship>
+
+</Config> \ No newline at end of file
diff --git a/das-cpp/trunk/runtime/test/rsc/testOCC2.xml b/das-cpp/trunk/runtime/test/rsc/testOCC2.xml
new file mode 100644
index 0000000000..65fab5927f
--- /dev/null
+++ b/das-cpp/trunk/runtime/test/rsc/testOCC2.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ -->
+
+<Config xmlns="http:///org.apache.tuscany.das.rdb/config.xsd" uri="test.occ">
+
+ <Command name="get all companies" SQL="SELECT * FROM company;"/>
+
+ <Table tableName="Department">
+ <Column columnName="id" sqlType="integer" primaryKey="true"/>
+ <Column columnName="name" sqlType="varchar" primaryKey="true"/>
+ </Table>
+
+ <Table tableName="company">
+ <Column columnName="occ" sqlType="integer" collision="true" managed="false"/>
+ </Table>
+
+ <Relationship primaryKeyTable="company" foreignKeyTable="department">
+ <KeyPair primaryKeyColumn="id" foreignKeyColumn="company_id"/>
+ </Relationship>
+
+ <Relationship primaryKeyTable="department" foreignKeyTable="employee">
+ <KeyPair primaryKeyColumn="id" foreignKeyColumn="department_id"/>
+ <KeyPair primaryKeyColumn="name" foreignKeyColumn="department_name"/>
+ </Relationship>
+
+</Config> \ No newline at end of file