com presentations: Added missing file: slides/mongodb/document-validation.xml
| From: | Derick Rethans | Date: | Fri, 08 Apr 2016 11:43:23 +0000 |
| Subject: | com presentations: Added missing file: slides/mongodb/document-validation.xml | ||
| Groups: | php.pres | ||
| Request: | Send a blank email to pres+get-2162@lists.php.net to get a copy of this message | ||
Commit: 4e0b0e2d117baf793574d7c138f010fc26ffae4d
Author: Derick Rethans <github@derickrethans.nl> 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>