db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject svn commit: r1478984 [3/3] - in /db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql: conf/ outlets/ templates/ddl/ templates/ddl/derby/ templates/ddl/hsqldb/ templates/ddl/mssql/ templates/ddl/mysql/ templates/d...
Date Fri, 03 May 2013 21:26:06 GMT
Added: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/dropTable.groovy
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/dropTable.groovy?rev=1478984&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/dropTable.groovy
(added)
+++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/dropTable.groovy
Fri May  3 21:25:27 2013
@@ -0,0 +1,32 @@
+// 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. 
+import org.apache.torque.generator.template.groovy.TorqueGenGroovy
+import org.apache.torque.templates.model.Table
+
+TorqueGenGroovy torqueGenGroovy = (TorqueGenGroovy) torqueGen
+Table table = torqueGenGroovy.model
+
+String dropSequence = ""
+if (table.idMethod == "native")
+{
+dropSequence = """DROP SEQUENCE $table.sequenceName;
+"""
+}
+
+return """\
+DROP TABLE $table.name CASCADE;
+${dropSequence}"""
\ No newline at end of file

Added: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/dropView.groovy
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/dropView.groovy?rev=1478984&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/dropView.groovy
(added)
+++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/dropView.groovy
Fri May  3 21:25:27 2013
@@ -0,0 +1,18 @@
+// 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. 
+//
+// Drop view not necessary in Postgresql

Added: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/foreignKey.groovy
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/foreignKey.groovy?rev=1478984&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/foreignKey.groovy
(added)
+++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/foreignKey.groovy
Fri May  3 21:25:27 2013
@@ -0,0 +1,53 @@
+// 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. 
+import org.apache.torque.generator.template.groovy.TorqueGenGroovy
+import org.apache.torque.templates.model.ForeignKey
+
+TorqueGenGroovy torqueGenGroovy = (TorqueGenGroovy) torqueGen
+ForeignKey foreignKey = torqueGenGroovy.model
+
+def result = """\
+ALTER TABLE $foreignKey.parent.name
+    ADD CONSTRAINT $foreignKey.name
+    FOREIGN KEY ($foreignKey.localColumnNames)
+    REFERENCES $foreignKey.foreignTable ($foreignKey.foreignColumnNames)"""
+if (foreignKey.onUpdate == "setnull") 
+{ 
+    result += """
+    ON UPDATE SET NULL"""
+} 
+else if (foreignKey.onUpdate) 
+{ 
+    result += """
+    ON UPDATE ${foreignKey.onUpdate.toUpperCase()}"""
+}
+if (foreignKey.onDelete == "setnull") 
+{ 
+    result += """
+
+    ON DELETE SET NULL"""
+} 
+else if (foreignKey.onDelete) 
+{ 
+    result += """
+
+    ON DELETE ${foreignKey.onDelete.toUpperCase()}"""
+}
+result += """;
+
+"""
+return result
\ No newline at end of file

Added: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/index.groovy
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/index.groovy?rev=1478984&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/index.groovy
(added)
+++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/index.groovy
Fri May  3 21:25:27 2013
@@ -0,0 +1,38 @@
+// 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. 
+import org.apache.torque.generator.template.groovy.TorqueGenGroovy
+import org.apache.torque.templates.model.Index
+import org.apache.commons.lang.StringUtils
+
+TorqueGenGroovy torqueGenGroovy = (TorqueGenGroovy) torqueGen
+Index index = torqueGenGroovy.model
+if (index.indexColumnNames != "") 
+{
+    String indexName = index.name
+    if (StringUtils.isBlank(indexName))
+    {
+        indexName = ""
+    }
+    else
+    {
+        indexName = " " + indexName
+    }
+    return """\
+CREATE  INDEX${indexName} ON $index.parent.name ($index.indexColumnNames);
+"""
+}
+

Added: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/primaryKey.groovy
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/primaryKey.groovy?rev=1478984&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/primaryKey.groovy
(added)
+++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/primaryKey.groovy
Fri May  3 21:25:27 2013
@@ -0,0 +1,28 @@
+// 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. 
+import org.apache.torque.generator.template.groovy.TorqueGenGroovy
+import org.apache.torque.templates.model.Table
+
+TorqueGenGroovy torqueGenGroovy = torqueGen
+Table table = torqueGenGroovy.model
+if (table.primaryKeyColumnNames != "") 
+{
+    return """\
+    PRIMARY KEY($table.primaryKeyColumnNames),
+"""
+}
+

Added: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/sequence.groovy
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/sequence.groovy?rev=1478984&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/sequence.groovy
(added)
+++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/sequence.groovy
Fri May  3 21:25:27 2013
@@ -0,0 +1,28 @@
+// 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. 
+//
+import org.apache.torque.generator.template.groovy.TorqueGenGroovy
+import org.apache.torque.templates.model.Table
+
+TorqueGenGroovy torqueGenGroovy = torqueGen
+Table table = torqueGenGroovy.model
+
+if (table.idMethod == "native")
+{
+    return """CREATE SEQUENCE $table.sequenceName INCREMENT BY 1 START WITH 1 NO MAXVALUE
NO CYCLE;
+"""
+}

Added: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/table.groovy
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/table.groovy?rev=1478984&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/table.groovy
(added)
+++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/table.groovy
Fri May  3 21:25:27 2013
@@ -0,0 +1,43 @@
+// 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. 
+import org.apache.torque.generator.template.groovy.TorqueGenGroovy
+import org.apache.torque.templates.model.Table
+
+TorqueGenGroovy torqueGenGroovy = torqueGen
+Table table = torqueGenGroovy.model
+String cols = torqueGenGroovy.mergepoint("columns")
+String pk = torqueGenGroovy.mergepoint("primaryKey")
+String unique = torqueGenGroovy.mergepoint("unique")
+String createTableSql = "${cols}${pk}${unique}"
+int lastCommaPos = createTableSql.lastIndexOf(",")
+if (lastCommaPos != -1) 
+{
+    createTableSql = createTableSql.substring(0, lastCommaPos)
+}
+ 
+def result = """
+-- -----------------------------------------------------------------------
+-- $table.name
+-- -----------------------------------------------------------------------
+CREATE TABLE $table.name
+(
+${createTableSql}
+);
+
+${torqueGenGroovy.mergepoint("index")}
+${torqueGenGroovy.mergepoint("sequence")}"""
+

Added: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/tableComment.groovy
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/tableComment.groovy?rev=1478984&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/tableComment.groovy
(added)
+++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/tableComment.groovy
Fri May  3 21:25:27 2013
@@ -0,0 +1,33 @@
+// 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.
+//
+// no Comments on columns in mysql
+import org.apache.torque.generator.template.groovy.TorqueGenGroovy
+import org.apache.torque.templates.model.Table
+import org.apache.commons.lang.StringUtils
+
+TorqueGenGroovy torqueGenGroovy = torqueGen
+Table table = torqueGenGroovy.model
+if (StringUtils.isNotBlank(table.description))
+{
+    String columnComment = torqueGenGroovy.mergepoint("columnComment")
+
+    return """COMMENT ON TABLE ${table.name} IS '${table.description}';
+
+$columnComment
+"""
+}

Added: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/tableCreateOptions.groovy
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/tableCreateOptions.groovy?rev=1478984&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/tableCreateOptions.groovy
(added)
+++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/tableCreateOptions.groovy
Fri May  3 21:25:27 2013
@@ -0,0 +1,23 @@
+// 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. 
+//
+//////////
+//
+// version $Id: tableCreateOptions.vm 1437184 2013-01-22 21:25:57Z tfischer $
+//
+// No table create options are implemented.
+//

Added: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/unique.groovy
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/unique.groovy?rev=1478984&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/unique.groovy
(added)
+++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/unique.groovy
Fri May  3 21:25:27 2013
@@ -0,0 +1,25 @@
+// 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. 
+import org.apache.torque.generator.template.groovy.TorqueGenGroovy
+import org.apache.torque.templates.model.Unique
+
+TorqueGenGroovy torqueGenGroovy = (TorqueGenGroovy) torqueGen
+Unique unique = torqueGenGroovy.model
+if (unique.uniqueColumnNames != "") 
+{
+    return "    CONSTRAINT ${unique.name} UNIQUE ($unique.uniqueColumnNames),"
+} 

Added: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/view.groovy
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/view.groovy?rev=1478984&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/view.groovy
(added)
+++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/view.groovy
Fri May  3 21:25:27 2013
@@ -0,0 +1,46 @@
+// 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. 
+import org.apache.torque.generator.template.groovy.TorqueGenGroovy
+import org.apache.torque.templates.model.View
+
+TorqueGenGroovy torqueGenGroovy = (TorqueGenGroovy) torqueGen
+View view = torqueGenGroovy.model
+if (!view.skipSql.equals("true"))
+{
+    if (view.createSql != null)
+    { 
+        return view.createSql + """
+
+"""
+    }
+    else 
+    { 
+        String cols = torqueGenGroovy.mergepoint("columns")
+        int lastCommaPos = cols.lastIndexOf(",")
+        if (lastCommaPos != -1) 
+        { 
+            cols = cols.substring(0, lastCommaPos) 
+        }
+        
+        return """CREATE OR REPLACE VIEW ${view.name} AS
+    SELECT
+${cols}
+    ${view.sqlSuffix};
+
+"""
+    }
+}

Added: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/tableSkipDecider.groovy
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/tableSkipDecider.groovy?rev=1478984&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/tableSkipDecider.groovy
(added)
+++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/tableSkipDecider.groovy
Fri May  3 21:25:27 2013
@@ -0,0 +1,25 @@
+// 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.
+import org.apache.torque.generator.template.groovy.TorqueGenGroovy
+import org.apache.torque.templates.model.Table
+
+TorqueGenGroovy torqueGenGroovy = (TorqueGenGroovy) torqueGen
+Table table = torqueGenGroovy.model
+if (!table.skipSql.equals("true")) 
+{
+    return torqueGenGroovy.mergepoint("table")
+} 
\ No newline at end of file

Added: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/viewColumn.groovy
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/viewColumn.groovy?rev=1478984&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/viewColumn.groovy
(added)
+++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/viewColumn.groovy
Fri May  3 21:25:27 2013
@@ -0,0 +1,23 @@
+// 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.
+import org.apache.torque.generator.template.groovy.TorqueGenGroovy
+import org.apache.torque.templates.model.ViewColumn
+
+TorqueGenGroovy torqueGenGroovy = (TorqueGenGroovy) torqueGen
+ViewColumn viewColumn = torqueGenGroovy.model 
+return """    ${viewColumn.select} AS ${viewColumn.name},
+"""



---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Mime
View raw message