Skip to content

Add _all_docs_view_query endpoint#1147

Closed
iilyak wants to merge 1 commit intoapache:masterfrom
cloudant:820-add-queries-for-all-docs
Closed

Add _all_docs_view_query endpoint#1147
iilyak wants to merge 1 commit intoapache:masterfrom
cloudant:820-add-queries-for-all-docs

Conversation

@iilyak
Copy link
Copy Markdown
Contributor

@iilyak iilyak commented Feb 6, 2018

Overview

Add new feature for executing specified built-in view queries of all
documents in the database. This enables user to request multiple queries
in a single request, in place of multiple POST /{db}/_all_docs requests.

Rationale for new endpoint rather than modifying _all_docs:

New endpoint is added to make sure we are not mutating response
depending on the object we receive in POST

Notes:

Testing recommendations

make check skip_deps+=couch_epi apps=chttpd tests=all_test_

==> chttpd (eunit)
    Running test function(s):
      chttpd_db_doc_size_tests:all_test_/0
      chttpd_db_test:all_test_/0
      chttpd_security_tests:all_test_/0
======================== EUnit ========================
chttpd security tests
Application crypto was left running!
  chttpd_security_tests:120: should_allow_admin_db_compaction...[0.002 s] ok
  chttpd_security_tests:137: should_allow_valid_password_to_create_user...ok
  chttpd_security_tests:147: should_disallow_invalid_password_to_create_user...ok
  chttpd_security_tests:155: should_disallow_anonymous_db_compaction...ok
  chttpd_security_tests:163: should_disallow_db_member_db_compaction...ok
  chttpd_security_tests:166: should_allow_db_admin_db_compaction...[0.002 s] ok
  chttpd_security_tests:176: should_allow_admin_view_compaction...[0.008 s] ok
  chttpd_security_tests:191: should_disallow_anonymous_view_compaction...ok
  chttpd_security_tests:194: should_allow_admin_db_view_cleanup...[0.001 s] ok
  chttpd_security_tests:209: should_disallow_anonymous_db_view_cleanup...ok
  [done in 2.701 s]
chttpd db tests
  chttpd_db_test:84: should_return_ok_true_on_bulk_update...[0.022 s] ok
  chttpd_db_test:111: should_accept_live_as_an_alias_for_continuous...[0.036 s] ok
  chttpd_db_test:126: should_return_404_for_delete_att_on_notadoc...[0.004 s] ok
  chttpd_db_test:148: should_return_409_for_del_att_without_rev...[0.026 s] ok
  chttpd_db_test:166: should_return_200_for_del_att_with_rev...[0.034 s] ok
  chttpd_db_test:187: should_return_409_for_put_att_nonexistent_rev...[0.011 s] ok
  chttpd_db_test:202: should_return_update_seq_when_set_on_all_docs...[0.054 s] ok
  chttpd_db_test:216: should_not_return_update_seq_when_unset_on_all_docs...[0.036 s] ok
  chttpd_db_test:229: should_succeed_on_all_docs_with_queries_keys...[0.132 s] ok
  chttpd_db_test:243: should_succeed_on_all_docs_with_queries_limit_skip...[0.116 s] ok
  chttpd_db_test:258: should_succeed_on_all_docs_with_multiple_queries...[0.116 s] ok
  chttpd_db_test:276: should_return_correct_id_on_doc_copy...[0.047 s] ok
  [done in 1.539 s]
chttpd db max_document_size tests
  chttpd_db_doc_size_tests:84: post_single_doc...ok
  chttpd_db_doc_size_tests:92: put_single_doc...ok
  chttpd_db_doc_size_tests:101: bulk_doc...ok
  chttpd_db_doc_size_tests:127: put_post_doc_attach_inline...ok
  chttpd_db_doc_size_tests:128: put_post_doc_attach_inline...ok
  chttpd_db_doc_size_tests:129: put_post_doc_attach_inline...ok
  chttpd_db_doc_size_tests:130: put_post_doc_attach_inline...ok
  chttpd_db_doc_size_tests:152: put_multi_part_related...ok
  chttpd_db_doc_size_tests:153: put_multi_part_related...ok
  chttpd_db_doc_size_tests:177: post_multi_part_form...ok
  chttpd_db_doc_size_tests:178: post_multi_part_form...ok
  [done in 0.546 s]
=======================================================
  All 33 tests passed.

Related Issues or Pull Requests

Checklist

  • Code is written and works correctly;
  • Changes are covered by tests;
  • Documentation reflects the changes;

Add new feature for executing specified built-in view queries of all
documents in the database. This enables user to request multiple queries
in a single request, in place of multiple `POST /{db}/_all_docs` requests.

Rationale for new endpoint rather than modifying _all_docs:

    New endpoint is added to make sure we are not mutating response
    depending on the object we receive in POST
@eiri
Copy link
Copy Markdown
Member

eiri commented Mar 22, 2018

@iilyak This got superseded by #1222 I guess?

@iilyak
Copy link
Copy Markdown
Contributor Author

iilyak commented Mar 23, 2018

@iilyak This got superseded by #1222 I guess?

correct

@iilyak iilyak closed this Mar 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants