examples/CQL/Blog.cql in activefacts-0.7.3 vs examples/CQL/Blog.cql in activefacts-0.8.5
- old
+ new
@@ -1,18 +1,18 @@
vocabulary Blog;
/*
* Value Types
*/
-AuthorId is written as AutoCounter();
-CommentId is written as AutoCounter();
+AuthorId is written as AutoCounter;
+CommentId is written as AutoCounter;
Name is written as VariableLengthText(64);
Ordinal is written as UnsignedInteger(32);
-PostId is written as AutoCounter();
+PostId is written as AutoCounter;
Style is written as VariableLengthText(20);
-Text is written as LargeLengthText();
-TopicId is written as AutoCounter();
+Text is written as LargeLengthText;
+TopicId is written as AutoCounter;
/*
* Entity Types
*/
Author is identified by its Id;
@@ -30,25 +30,24 @@
Content provides text of Comment,
Comment consists of one text-Content;
Post is identified by its Id;
Post was written by one Author;
-Paragraph is where
- Post includes Ordinal paragraph;
-Content is of Paragraph,
- Paragraph contains one Content;
-Paragraph has Comment,
- Comment is on one Paragraph;
Topic is identified by its Id;
Post belongs to one Topic,
Topic contains Post;
Topic belongs to at most one parent-Topic [acyclic];
Topic is called one topic-Name,
Name is of at most one Topic;
+Paragraph is where
+ Post includes Ordinal paragraph;
+Content is of Paragraph,
+ Paragraph contains one Content;
+Paragraph has Comment,
+ Comment is on one Paragraph;
+
/*
* Constraints:
*/
-for each Content exactly one of these holds:
- Content provides text of Comment,
- Content is of Paragraph;
+either Content provides text of Comment or Content is of Paragraph but not both;