diff options
author | drebs <drebs@leap.se> | 2016-07-22 20:33:06 +0200 |
---|---|---|
committer | drebs <drebs@leap.se> | 2016-08-01 21:08:56 -0300 |
commit | c3e0f52080041e2a01cfa483efe73f8503a10f31 (patch) | |
tree | 08de4119fedaee6fa2e78f5357db805a16bea025 /common/src/leap/soledad/common/ddocs/syncs/views/changes_to_return/map.js | |
parent | 2a57f749672580591b07065adde334029ddfb460 (diff) |
[feat] remove usage of design documents in couch
Design documents are slow and we already have alternatives to all uses
we used to make of them, so this commit completelly removes all usage of
design documents.
Diffstat (limited to 'common/src/leap/soledad/common/ddocs/syncs/views/changes_to_return/map.js')
-rw-r--r-- | common/src/leap/soledad/common/ddocs/syncs/views/changes_to_return/map.js | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/common/src/leap/soledad/common/ddocs/syncs/views/changes_to_return/map.js b/common/src/leap/soledad/common/ddocs/syncs/views/changes_to_return/map.js deleted file mode 100644 index 94b7e767..00000000 --- a/common/src/leap/soledad/common/ddocs/syncs/views/changes_to_return/map.js +++ /dev/null @@ -1,20 +0,0 @@ -function(doc) { - if (doc['_id'] == 'u1db_sync_state' && doc['ongoing_syncs'] != null) - for (var source_replica_uid in doc['ongoing_syncs']) { - var changes = doc['ongoing_syncs'][source_replica_uid]['changes_to_return']; - var sync_id = doc['ongoing_syncs'][source_replica_uid]['sync_id']; - if (changes == null) - emit([source_replica_uid, sync_id, 0], null); - else if (changes.length == 0) - emit([source_replica_uid, sync_id, 0], []); - else - for (var i = 0; i < changes['changes_to_return'].length; i++) - emit( - [source_replica_uid, sync_id, i], - { - 'gen': changes['gen'], - 'trans_id': changes['trans_id'], - 'next_change_to_return': changes['changes_to_return'][i], - }); - } -} |