summaryrefslogtreecommitdiff
path: root/common/src/leap/soledad/common/ddocs/transactions
diff options
context:
space:
mode:
Diffstat (limited to 'common/src/leap/soledad/common/ddocs/transactions')
-rw-r--r--common/src/leap/soledad/common/ddocs/transactions/lists/generation.js20
-rw-r--r--common/src/leap/soledad/common/ddocs/transactions/lists/trans_id_for_gen.js19
-rw-r--r--common/src/leap/soledad/common/ddocs/transactions/lists/whats_changed.js22
-rw-r--r--common/src/leap/soledad/common/ddocs/transactions/views/log/map.js7
4 files changed, 0 insertions, 68 deletions
diff --git a/common/src/leap/soledad/common/ddocs/transactions/lists/generation.js b/common/src/leap/soledad/common/ddocs/transactions/lists/generation.js
deleted file mode 100644
index dbdfff0d..00000000
--- a/common/src/leap/soledad/common/ddocs/transactions/lists/generation.js
+++ /dev/null
@@ -1,20 +0,0 @@
-function(head, req) {
- var row;
- var rows=[];
- // fetch all rows
- while(row = getRow()) {
- rows.push(row);
- }
- if (rows.length > 0)
- send(JSON.stringify({
- "generation": rows.length,
- "doc_id": rows[rows.length-1]['id'],
- "transaction_id": rows[rows.length-1]['value']
- }));
- else
- send(JSON.stringify({
- "generation": 0,
- "doc_id": "",
- "transaction_id": "",
- }));
-}
diff --git a/common/src/leap/soledad/common/ddocs/transactions/lists/trans_id_for_gen.js b/common/src/leap/soledad/common/ddocs/transactions/lists/trans_id_for_gen.js
deleted file mode 100644
index 2ec91794..00000000
--- a/common/src/leap/soledad/common/ddocs/transactions/lists/trans_id_for_gen.js
+++ /dev/null
@@ -1,19 +0,0 @@
-function(head, req) {
- var row;
- var rows=[];
- var i = 1;
- var gen = 1;
- if (req.query.gen)
- gen = parseInt(req.query['gen']);
- // fetch all rows
- while(row = getRow())
- rows.push(row);
- if (gen <= rows.length)
- send(JSON.stringify({
- "generation": gen,
- "doc_id": rows[gen-1]['id'],
- "transaction_id": rows[gen-1]['value'],
- }));
- else
- send('{}');
-}
diff --git a/common/src/leap/soledad/common/ddocs/transactions/lists/whats_changed.js b/common/src/leap/soledad/common/ddocs/transactions/lists/whats_changed.js
deleted file mode 100644
index b35cdf51..00000000
--- a/common/src/leap/soledad/common/ddocs/transactions/lists/whats_changed.js
+++ /dev/null
@@ -1,22 +0,0 @@
-function(head, req) {
- var row;
- var gen = 1;
- var old_gen = 0;
- if (req.query.old_gen)
- old_gen = parseInt(req.query['old_gen']);
- send('{"transactions":[\n');
- // fetch all rows
- while(row = getRow()) {
- if (gen > old_gen) {
- if (gen > old_gen+1)
- send(',\n');
- send(JSON.stringify({
- "generation": gen,
- "doc_id": row["id"],
- "transaction_id": row["value"]
- }));
- }
- gen++;
- }
- send('\n]}');
-}
diff --git a/common/src/leap/soledad/common/ddocs/transactions/views/log/map.js b/common/src/leap/soledad/common/ddocs/transactions/views/log/map.js
deleted file mode 100644
index 94ef63ca..00000000
--- a/common/src/leap/soledad/common/ddocs/transactions/views/log/map.js
+++ /dev/null
@@ -1,7 +0,0 @@
-function(doc) {
- if (doc.u1db_transactions)
- doc.u1db_transactions.forEach(function(t) {
- emit(t[0], // use timestamp as key so the results are ordered
- t[1]); // value is the transaction_id
- });
-}