Overview
Basics
Operations
- Datatypes / Operations
- Azure Data Tables
- Azure SQL
- Azure Cosmos DB
- Microsoft SQL Server
- MongoDB
- MySQL
- Oracle
- PostgreSQL
- SQL Lite
Providers
Basics
Query Building
Before we begin creating queries, there are a few defaults used in the platform. By default:
-
All queries are paged. A query has the following defaults:
-
PageNumber = 1
PageNumber determines the start page of records to return. Zero or less values will not return any records. -
PageSize = 1000
PageSize determines the number of records in a page. Zero or less values will not return any records. -
IncludeCount = false
IncludeCount determines if a Count() of the records should also be returned with the query.
-
PageNumber = 1
Create a New Builder
Creating queries is done by using a builder object that utilizes fluent-style syntax to help create queries.
If you are calling Service Query from a front end with javascript/JQuery, download the servicequery.js file. This javascript file contains a ServiceQueryRequestBuilder class that uses the same syntax as the .NET Framework code!
This can be done by:
Option 1 Standard new object syntaxChanging Paging Values
Changes values with your ServiceQuery is done by calling the Paging() method. The parameters correspond to the pagenumber, pagesize and includecount properties for the query.
Alternatively, you can set includecount = true by calling the following method IncludeCount()
Build the Query into a Request
Once adding filters is complete, build the request by calling the Build() method. This returns a ServiceQueryRequest object with your compiled filters.