item method
defines the request for a specific item by the item's _id
either in top level collection or in nested collection
Implementation
BagelDBRequest item(String _id) {
if (_item != null) {
if (nestedCollectionsIDs.length % 2 == 0) {
throw ("a nested item can only be placed after a nested collection");
}
nestedCollectionsIDs.add(_id);
} else {
_item = _id;
}
return this;
}