diff options
author | Anton Adamansky <adamansky@gmail.com> | 2015-04-23 23:44:03 +0600 |
---|---|---|
committer | Anton Adamansky <adamansky@gmail.com> | 2015-04-23 23:44:03 +0600 |
commit | bbd11d6d745fd558a2745a61b0a2e7add79052c9 (patch) | |
tree | 12c769a4dec4a11d8733b5c10c50cd17c04ab9c2 | |
parent | 26f2da7cbd573126453b5e4df6d9f159a44e2c2c (diff) | |
download | ejdb-bbd11d6d745fd558a2745a61b0a2e7add79052c9.tar.gz ejdb-bbd11d6d745fd558a2745a61b0a2e7add79052c9.tar.bz2 ejdb-bbd11d6d745fd558a2745a61b0a2e7add79052c9.zip |
v1.2.7
-rw-r--r-- | Changelog | 4 | ||||
-rw-r--r-- | src/ejdb/ejdb.h | 108 |
2 files changed, 6 insertions, 106 deletions
@@ -1,11 +1,11 @@ -ejdb (1.2.7) UNRELEASED; urgency=low +ejdb (1.2.7) testing; urgency=low * EJDB nodejs modules now published as precompiled binaries for Windows * Project build improvements #131 * Fix of Nodejs module windows build fail #12 * Added support of querying BSON symbols #129 - -- Anton Adamansky <adamansky@gmail.com> Thu, 16 Apr 2015 12:20:34 +0600 + -- Anton Adamansky <adamansky@gmail.com> Thu, 23 Apr 2015 12:20:34 +0600 ejdb (1.2.6) testing; urgency=low diff --git a/src/ejdb/ejdb.h b/src/ejdb/ejdb.h index d2a6c4e..448a7bf 100644 --- a/src/ejdb/ejdb.h +++ b/src/ejdb/ejdb.h @@ -260,111 +260,11 @@ EJDB_EXPORT bool ejdbrmbson(EJCOLL *coll, bson_oid_t *oid); EJDB_EXPORT bson* ejdbloadbson(EJCOLL *coll, const bson_oid_t *oid); /** - * Create query object. + * Create the query object. + * * Sucessfully created queries must be destroyed with ejdbquerydel(). - * - * EJDB queries inspired by MongoDB (mongodb.org) and follows same philosophy. - * - * - Supported queries: - * - Simple matching of String OR Number OR Array value: - * - {'fpath' : 'val', ...} - * - $not Negate operation. - * - {'fpath' : {'$not' : val}} //Field not equal to val - * - {'fpath' : {'$not' : {'$begin' : prefix}}} //Field not begins with val - * - $begin String starts with prefix - * - {'fpath' : {'$begin' : prefix}} - * - $gt, $gte (>, >=) and $lt, $lte for number types: - * - {'fpath' : {'$gt' : number}, ...} - * - $bt Between for number types: - * - {'fpath' : {'$bt' : [num1, num2]}} - * - $in String OR Number OR Array val matches to value in specified array: - * - {'fpath' : {'$in' : [val1, val2, val3]}} - * - $nin - Not IN - * - $strand String tokens OR String array val matches all tokens in specified array: - * - {'fpath' : {'$strand' : [val1, val2, val3]}} - * - $stror String tokens OR String array val matches any token in specified array: - * - {'fpath' : {'$stror' : [val1, val2, val3]}} - * - $exists Field existence matching: - * - {'fpath' : {'$exists' : true|false}} - * - $icase Case insensitive string matching: - * - {'fpath' : {'$icase' : 'val1'}} //icase matching - * Ignore case matching with '$in' operation: - * - {'name' : {'$icase' : {'$in' : ['théâtre - театр', 'hello world']}}} - * For case insensitive matching you can create special index of type: `JBIDXISTR` - * - $elemMatch The $elemMatch operator matches more than one component within an array element. - * - { array: { $elemMatch: { value1 : 1, value2 : { $gt: 1 } } } } - * Restriction: only one $elemMatch allowed in context of one array field. - * - $and, $or joining: - * - {..., $and : [subq1, subq2, ...] } - * - {..., $or : [subq1, subq2, ...] } - * Example: {z : 33, $and : [ {$or : [{a : 1}, {b : 2}]}, {$or : [{c : 5}, {d : 7}]} ] } - * - * - Mongodb $(projection) operator supported. (http://docs.mongodb.org/manual/reference/projection/positional/#proj._S_) - * - Mongodb positional $ update operator supported. (http://docs.mongodb.org/manual/reference/operator/positional/) - * - * - Queries can be used to update records: - * - * $set Field set operation. - * - {.., '$set' : {'fpath1' : val1, 'fpathN' : valN}} - * $upsert Atomic upsert. If matching records are found it will be '$set' operation, - * otherwise new record will be inserted - * with fields specified by argment object. - * - {.., '$upsert' : {'fpath1' : val1, 'fpathN' : valN}} - * $inc Increment operation. Only number types are supported. - * - {.., '$inc' : {'fpath1' : number, ..., 'fpath2' : number} - * $dropall In-place record removal operation. - * - {.., '$dropall' : true} - * $addToSet Atomically adds value to the array only if its not in the array already. - * If containing array is missing it will be created. - * - {.., '$addToSet' : {'fpath' : val1, 'fpathN' : valN, ...}} - * $addToSetAll Batch version if $addToSet - * - {.., '$addToSetAll' : {'fpath' : [array of values to add], ...}} - * $pull Atomically removes all occurrences of value from field, if field is an array. - * - {.., '$pull' : {'fpath' : val1, 'fpathN' : valN, ...}} - * $pullAll Batch version of $pull - * - {.., '$pullAll' : {'fpath' : [array of values to remove], ...}} - * $rename Rename field operation - * - {.., '$rename' : {'oldfname1' : 'newfname1', 'oldfnameN' : 'newfnameN'}} - * $unset Unset the specified fields - * - { $unset: { 'fpath1' : "", ... } } - * $slice Array field slice operator (like a mongodb $slice) implemented - * within $do operation. - * - ${..., $do : {'fpath1' : {$slice : <limit>}} - * - ${..., $do : {'fpath1' : {$slice : [<offset>, <limit>]}} - * - * - * - Collection joins supported in the following form: - * {..., $do : {fpath : {$join : 'collectionname'}} } - * Where 'fpath' value points to object's OIDs from 'collectionname'. Its value - * can be OID, string representation of OID or array of this pointers. - * - * NOTE: It is better to execute update queries with `JBQRYCOUNT` - * control flag to avoid unnecessarily data fetching. - * - * NOTE: Negate operations: $not and $nin not using indexes - * so they can be slow in comparison to other matching operations. - * - * NOTE: Only one index can be used in search query operation. - * - * QUERY HINTS (specified by `hints` argument): - * - $max Maximum number in the result set - * - $skip Number of skipped results in the result set - * - $orderby Sorting order of query fields. - * - $fields Set subset of fetched fields - * If a field presented in $orderby clause it will be forced to include in resulting records. - * Example: - * hints: { - * "$orderby" : { //ORDER BY field1 ASC, field2 DESC - * "field1" : 1, - * "field2" : -1 - * }, - * "$fields" : { //SELECT ONLY {_id, field1, field2} - * "field1" : 1, - * "field2" : 1 - * } - * } - * - * Many query examples can be found in `testejdb/t2.c` test case. + * See the complete query language specification: http://ejdb.org/doc/ql/ql.html + * Many query examples can be found in `src/ejdb/test/ejdbtest2.c` test case. * * @param jb EJDB database handle. * @param qobj Main BSON query object. |