Skip to content

Commit d23e71f

Browse files
committed
Revert "CDRIVER-1886 add mongoc_cursor_sent"
This reverts commit 5947642.
1 parent 72351e9 commit d23e71f

File tree

5 files changed

+0
-71
lines changed

5 files changed

+0
-71
lines changed

NEWS

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ New features and bug fixes:
3838
* mongoc_gridfs_find_one_with_opts
3939
* New helper function to include read concern in one of the above function's
4040
options parameter: mongoc_read_concern_append.
41-
* New function mongoc_cursor_sent returns true after the first call to
42-
mongoc_cursor_next.
4341
* mongoc_client_command no longer applies the client's read preference and
4442
read concern by default. Same change for mongoc_database_command and
4543
mongoc_collection_command.

doc/mongoc_cursor_sent.page

Lines changed: 0 additions & 33 deletions
This file was deleted.

src/mongoc/mongoc-cursor.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1970,15 +1970,6 @@ mongoc_cursor_is_alive (const mongoc_cursor_t *cursor) /* IN */
19701970
}
19711971

19721972

1973-
bool
1974-
mongoc_cursor_sent (const mongoc_cursor_t *cursor) /* IN */
1975-
{
1976-
BSON_ASSERT (cursor);
1977-
1978-
return cursor->sent != 0;
1979-
}
1980-
1981-
19821973
const bson_t *
19831974
mongoc_cursor_current (const mongoc_cursor_t *cursor) /* IN */
19841975
{

src/mongoc/mongoc-cursor.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,6 @@ void mongoc_cursor_get_host (mongoc_cursor_t *
5353
BSON_API
5454
bool mongoc_cursor_is_alive (const mongoc_cursor_t *cursor);
5555
BSON_API
56-
bool mongoc_cursor_sent (const mongoc_cursor_t *cursor);
57-
BSON_API
5856
const bson_t *mongoc_cursor_current (const mongoc_cursor_t *cursor);
5957
BSON_API
6058
void mongoc_cursor_set_batch_size (mongoc_cursor_t *cursor,

tests/test-mongoc-cursor.c

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1471,30 +1471,6 @@ test_n_return_find_cmd_with_opts (void)
14711471
}
14721472

14731473

1474-
static void
1475-
test_cursor_sent (void)
1476-
{
1477-
mongoc_client_t *client;
1478-
mongoc_collection_t *collection;
1479-
mongoc_cursor_t *cursor;
1480-
const bson_t *doc;
1481-
bson_error_t error;
1482-
1483-
client = test_framework_client_new ();
1484-
collection = get_test_collection (client, "test_cursor_sent");
1485-
cursor = mongoc_collection_find_with_opts (collection, tmp_bson (NULL),
1486-
NULL, NULL);
1487-
ASSERT (!mongoc_cursor_sent (cursor));
1488-
mongoc_cursor_next (cursor, &doc);
1489-
ASSERT_OR_PRINT (!mongoc_cursor_error (cursor, &error), error);
1490-
ASSERT (mongoc_cursor_sent (cursor));
1491-
1492-
mongoc_cursor_destroy (cursor);
1493-
mongoc_collection_destroy (collection);
1494-
mongoc_client_destroy (client);
1495-
}
1496-
1497-
14981474
void
14991475
test_cursor_install (TestSuite *suite)
15001476
{
@@ -1560,5 +1536,4 @@ test_cursor_install (TestSuite *suite)
15601536
test_n_return_find_cmd);
15611537
TestSuite_Add (suite, "/Cursor/n_return/find_cmd/with_opts",
15621538
test_n_return_find_cmd_with_opts);
1563-
TestSuite_AddLive (suite, "/Cursor/sent", test_cursor_sent);
15641539
}

0 commit comments

Comments
 (0)