pub enum AtomPosition {
Interior,
TopLevel,
}Expand description
Which of upstream’s two atom transforms applies at a given position.
The two recognize different tag lists, and which one applies is a property of the field, not
of the value (MongoTransform.js:655-662). That is why this is an argument to
recognize_atom at lowering time rather than a choice made by the parser: the parser does not
have the schema, and guessing is wrong in both directions. Guessing top-level makes a GeoPoint
compared against an Array field match a row upstream does not return, because the extra key
upstream would have compared is discarded; guessing interior makes a GeoPoint compared against a
GeoPoint field fail to match a row upstream does return, for the mirror reason.
Variants§
Interior
transformInteriorAtom (MongoTransform.js:566-584): Pointer, Date and Bytes only.
GeoPoint, File, Polygon and Relation are deliberately absent. Upstream leaves them as plain
objects here, so they are compared whole, extra keys included. Its fourth arm is $regex,
which is not a __type and is handled by the lowering.
TopLevel
transformTopLevelAtom (MongoTransform.js:594-652): Pointer, Date, Bytes, GeoPoint,
Polygon and File.
Six, not seven. Relation has no arm and no coder, so at the top level it is not an atom at
all and the caller refuses it. “Every Parse type” is the summary that reads right and is
wrong by one, and the one it is wrong by is reachable: {"field": {"__type": "Relation"}}
answers 107 upstream.
Trait Implementations§
Source§impl Clone for AtomPosition
impl Clone for AtomPosition
Source§fn clone(&self) -> AtomPosition
fn clone(&self) -> AtomPosition
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for AtomPosition
Source§impl Debug for AtomPosition
impl Debug for AtomPosition
impl Eq for AtomPosition
Source§impl PartialEq for AtomPosition
impl PartialEq for AtomPosition
impl StructuralPartialEq for AtomPosition
Auto Trait Implementations§
impl Freeze for AtomPosition
impl RefUnwindSafe for AtomPosition
impl Send for AtomPosition
impl Sync for AtomPosition
impl Unpin for AtomPosition
impl UnsafeUnpin for AtomPosition
impl UnwindSafe for AtomPosition
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.