SHARE
TWEET

Mongo - query

furas Jul 16th, 2018 (edited) 76 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     [
  2.         { "$match":
  3.             {
  4.                 "$gt": { "timeStamp": self.starting_time },
  5.                 "$lt": { "timeStamp": self.finishing_time }
  6.             }
  7.         },
  8.         { "$out": destination_collection_name }
  9.     ]
  10.  
  11. # similar to
  12.    
  13.     [
  14.         { $match:
  15.             {
  16.                 date: "20120105"
  17.             }
  18.         },
  19.        
  20.         { $out: "subset" }
  21.     ]
  22.  
  23. # but you have
  24.  
  25.     {
  26.          "$match":
  27.             {
  28.                 "$gt": { "timeStamp": self.starting_time },
  29.                 "$lt": { "timeStamp": self.finishing_time }
  30.             },
  31.             { "$out": destination_collection_name }
  32.     }
  33.  
  34. # which is incorrect Python dictionary and incorrect JSON
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top