Class: CouchCloner::ByCloneIdAndStartTime
- Inherits:
-
Object
- Object
- CouchCloner::ByCloneIdAndStartTime
- Includes:
- CouchView::Map
- Defined in:
- lib/couch_cloner/maps/by_clone_id_and_start_time.rb
Instance Method Summary collapse
Instance Method Details
#map ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/couch_cloner/maps/by_clone_id_and_start_time.rb', line 5 def map " function(doc){ if (#{conditions} && (doc.start == null || doc.start == '')) { emit([doc.clone_id, {'created_at': doc.created_at}], null) } else if (#{conditions} && doc.start != null && doc.start != ''){ emit([doc.clone_id, doc.start], null) } } " end |