FieldsPair & Criteria
ใช้ FieldsPair, Condition, การจัดกลุ่มเชิงตรรกะ, id alias และ Driver-native filter เพื่อสร้างเงื่อนไข MongoDB แบบไดนามิก.
FieldsPair และ Condition
• eq, notEq, between, gt/gte, lt/lte
• in, notIn, like, regex, exists
• isNull, isNotNull, all, near, nearSphere, elemMatch
เงื่อนไขแบบไดนามิกและ autoRangePair
จาก + ถึง
between
จากเท่านั้น
gte
ถึงเท่านั้น
lte
ไม่มีทั้งคู่
คืนค่า null จึงสามารถถูกละเว้นได้อย่างเป็นธรรมชาติในเงื่อนไขแบบไดนามิก.
AND / OR / NOT การจัดกลุ่ม
FieldBuilder รองรับ and, or, not, notAny, notAll และสามารถกำหนด root logical operator ได้โดยตรง.
กฎชื่อฟิลด์และ id
ทำให้ path segment ของ id ถูกต้องเฉพาะ _id เท่านั้น หากส่ง 24 ตัวอักษร hex ที่ถูกต้องไปยัง id alias จะสามารถแปลงเป็น ObjectId ได้ แต่จะไม่แปลง String ที่กำหนด _id โดยตรง เส้นทางฟิลด์ String จะอิงตามชื่อฟิลด์ MongoDB ทางกายภาพ.
Driver-native filter
driverFilter(Bson) ใช้การกำหนดของ Driver โดยไม่ต้องตีความ raw BSON ใหม่หรือทำการแมพฟิลด์.