Page History
MongoSQL queries are written using a subset of the SQL-92 standard. This document details Aqua Data Studio's MongoSQL syntax and functions. See the SQL Mapping page for how Aqua Data Studio's syntax maps to MongoDB Query syntax (http://docs.mongodb.org/manual/core/read-operations/#queries-in-mongodb).
Contents
|
Keywords are not case-sensitive. In this document, keywords such as SELECT are capitalized for illustration purposes.
...
The Date and Timestamp formats below are also acceptable.
Date() | MMM dd, yyyy yyyy-MM-dd yyyy-MM-dd HH:mm:ss yyyy-MM-dd HH:mm:ss.SSS |
ISODate() | yyyy-MM-dd'T'HH:mm:ss±HH:mm yyyy-MM-dd'T'HH:mm:ss.SSS±HH:mm yyyy-MM-dd'T'HH:mm:ss.SSS'Z' yyyy-MM-dd'T'HH:mm:ss yyyy-MM-dd'T'HH:mm:ss'Z' yyyy-MM-dd |
BSONTimestamp(<timestamp string>, <inc value>) | where the <timestamp string> is a string that respects the or yyyy-MM-dd HH:mm:ss.SSS |
BSONTimestamp(<seconds_since_Unix_epoch>, <inc value>) | both arguments are integer numbers or valid strings that can be parsed to integer values |
Examples
INSERT INTO testDateTime VALUES( { _id : 1, timestampField : Date('2011-02-10 09:30:00') } ) GO
...
In the <flags> parameter of the PATTERN(regExpr,flags) the following number constants (and their combinations using an OR operation) can be used:
Java Flag | Number Constant |
---|---|
CASE_INSENSITIVE | 2 |
COMMENTS | 4 |
MULTILINE | 8 |
DOTALL | 32 |
For details on creating a pattern with flags, see the Java tutorial "Methods of the Pattern Class: Creating a Pattern with Flags" (http://docs.oracle.com/javase/tutorial/essential/regex/pattern.html).
...