Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learning Azure DocumentDB

You're reading from   Learning Azure DocumentDB Create outstanding enterprise solutions around DocumentDB using the latest technologies and programming tools with Azure

Arrow left icon
Product type Paperback
Published in Nov 2015
Publisher
ISBN-13 9781783552467
Length 152 pages
Edition 1st Edition
Concepts
Arrow right icon
Author (1):
Arrow left icon
Riccardo Becker Riccardo Becker
Author Profile Icon Riccardo Becker
Riccardo Becker
Arrow right icon
View More author details
Toc

Using the WHERE clause

Filtering can be done by using the WHERE clause. The conditions we add in the clause will cause DocumentDB to filter the collection, and any document must evaluate the specified conditions to be true, otherwise they will not be part of the result set. To demonstrate several operators in the WHERE clause, our current PersonInformation document will be expanded with several properties. The support C# solution from Chapter 3, Basic Querying, will be upgraded with this new requirement:

  • Every document will contain an indicator on how many devices this specific person has at home to support home automation
  • An additional subtree containing the actual home automation devices including the price of the device will be added

This section will demonstrate multiple operators for the WHERE clause:

  • Binary operators
  • The BETWEEN keyword
  • Logical operators
  • The IN keyword
  • Conditional expressions

Binary operators

Currently, DocumentDB supports the following binary operators:

Arithmetic

+, -,...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image