com presentations: Added missing file: slides/mongodb/document-validation.xml

[email protected] (Derick Rethans) Fri, 08 Apr 2016 11:43:23 +0000
Newsgroups php.pres
Message-ID <[email protected]>
Commit:    4e0b0e2d117baf793574d7c138f010fc26ffae4d
Author:    Derick Rethans <[email protected]>         Fri, 8 Apr 2016 12:43:23 +0100
Parents:   d550592358fc3dc2e9625c7b3aee9510b17c57ae
Branches:  master

Link:       http://git.php.net/?p=presentations.git;a=commitdiff;h=4e0b0e2d117baf793574d7c138f010fc26ffae4d

Log:
Added missing file

Changed paths:
  A  slides/mongodb/document-validation.xml


Diff:
diff --git a/slides/mongodb/document-validation.xml b/slides/mongodb/document-validation.xml
new file mode 100644
index 0000000..f4d9b98
--- /dev/null
+++ b/slides/mongodb/document-validation.xml
@@ -0,0 +1,21 @@
+<slide>
+<title>Enforcing Schema</title>
+
+<list>
+	<bullet>New in MongoDB 3.2</bullet>
+	<bullet>Allows you to set a *validator*, a query that every new or updated document must match</bullet>
+</list>
+<break lines="1"/>
+<blurb>Example:</blurb>
+<example inline="1">
+db.runCommand( {
+	*collMod:* "whisky",
+	*validator:* {
+		name: { $type: "string" },
+		age: { *$type:* "integer" },
+	},
+	validationLevel: *"moderate"*, // off, strict
+	validationAction: *"warn"*, // error, 
+} )
+</example>
+</slide>