+ View.toString
authorEric Prud'hommeaux <eric@w3.org>
Sun, 28 Feb 2010 11:37:28 -0500
changeset 182 3a1ba6a4de3c
parent 181 4e52dade27c1
child 183 e733cd719f99
+ View.toString
src/main/scala/SQL.scala
--- a/src/main/scala/SQL.scala	Sun Feb 28 09:09:00 2010 -0500
+++ b/src/main/scala/SQL.scala	Sun Feb 28 11:37:28 2010 -0500
@@ -169,7 +169,9 @@
 sealed abstract class KeyDeclaration extends FieldDescOrKeyDeclaration
 case class PrimaryKeyDeclaration(attr:Attribute) extends KeyDeclaration
 case class ForeignKeyDeclaration(fk:Attribute, rel:Relation, pk:Attribute) extends KeyDeclaration
-case class View(rel:Relation, defn:SelectORUnion) // sibling of RelationDesc
+case class View(rel:Relation, defn:SelectORUnion) { // sibling of RelationDesc
+  override def toString = "CREATE VIEW " + rel + " AS\n" + defn
+}
 
 case class Sql() extends JavaTokenParsers {