Skip to content

Commit 4d4316e

Browse files
committed
get_*_info -> find_*
1 parent 2039d72 commit 4d4316e

16 files changed

+75
-74
lines changed

build/autotools/versions.ldscript

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -219,10 +219,14 @@ LIBMONGOC_1.0 {
219219

220220
LIBMONGOC_1.1 {
221221
global:
222-
mongoc_client_get_database_info;
222+
mongoc_client_find_databases;
223+
mongoc_client_kill_cursor;
223224
mongoc_collection_count_with_opts;
224-
mongoc_collection_get_index_info;
225-
mongoc_database_get_collection_info;
225+
mongoc_collection_find_indexes;
226+
mongoc_cursor_get_batch_size;
227+
mongoc_cursor_get_id;
228+
mongoc_cursor_set_batch_size;
229+
mongoc_database_find_collections;
226230
mongoc_index_opt_geo_get_default;
227231
mongoc_index_opt_geo_init;
228232
mongoc_rand_add;
@@ -231,11 +235,3 @@ LIBMONGOC_1.1 {
231235
mongoc_uri_get_credentials;
232236
mongoc_uri_get_mechanism_properties;
233237
} LIBMONGOC_1.0;
234-
235-
LIBMONGOC_1.2 {
236-
global:
237-
mongoc_client_kill_cursor;
238-
mongoc_cursor_get_batch_size;
239-
mongoc_cursor_get_id;
240-
mongoc_cursor_set_batch_size;
241-
} LIBMONGOC_1.1;

build/cmake/libmongoc-ssl.def

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ mongoc_cleanup
1919
mongoc_client_command
2020
mongoc_client_command_simple
2121
mongoc_client_destroy
22+
mongoc_client_find_databases
2223
mongoc_client_get_collection
2324
mongoc_client_get_database
24-
mongoc_client_get_database_info
2525
mongoc_client_get_database_names
2626
mongoc_client_get_gridfs
2727
mongoc_client_get_max_bson_size
@@ -57,7 +57,7 @@ mongoc_collection_drop_index
5757
mongoc_collection_ensure_index
5858
mongoc_collection_find
5959
mongoc_collection_find_and_modify
60-
mongoc_collection_get_index_info
60+
mongoc_collection_find_indexes
6161
mongoc_collection_get_last_error
6262
mongoc_collection_get_name
6363
mongoc_collection_get_read_prefs
@@ -91,8 +91,8 @@ mongoc_database_command_simple
9191
mongoc_database_create_collection
9292
mongoc_database_destroy
9393
mongoc_database_drop
94+
mongoc_database_find_collections
9495
mongoc_database_get_collection
95-
mongoc_database_get_collection_info
9696
mongoc_database_get_collection_names
9797
mongoc_database_get_name
9898
mongoc_database_get_read_prefs

build/cmake/libmongoc.def

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ mongoc_cleanup
1919
mongoc_client_command
2020
mongoc_client_command_simple
2121
mongoc_client_destroy
22+
mongoc_client_find_databases
2223
mongoc_client_get_collection
2324
mongoc_client_get_database
24-
mongoc_client_get_database_info
2525
mongoc_client_get_database_names
2626
mongoc_client_get_gridfs
2727
mongoc_client_get_max_bson_size
@@ -55,7 +55,7 @@ mongoc_collection_drop_index
5555
mongoc_collection_ensure_index
5656
mongoc_collection_find
5757
mongoc_collection_find_and_modify
58-
mongoc_collection_get_index_info
58+
mongoc_collection_find_indexes
5959
mongoc_collection_get_last_error
6060
mongoc_collection_get_name
6161
mongoc_collection_get_read_prefs
@@ -89,8 +89,8 @@ mongoc_database_command_simple
8989
mongoc_database_create_collection
9090
mongoc_database_destroy
9191
mongoc_database_drop
92+
mongoc_database_find_collections
9293
mongoc_database_get_collection
93-
mongoc_database_get_collection_info
9494
mongoc_database_get_collection_names
9595
mongoc_database_get_name
9696
mongoc_database_get_read_prefs

doc/mongoc_collection_get_index_info.page renamed to doc/mongoc_collection_find_indexes.page

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,21 @@
55
style="function"
66
xmlns:api="http://projectmallard.org/experimental/api/"
77
xmlns:ui="http://projectmallard.org/experimental/ui/"
8-
id="mongoc_collection_get_index_info">
8+
id="mongoc_collection_find_indexes">
99

1010

1111
<info>
1212
<link type="guide" xref="mongoc_collection_t" group="function"/>
1313
</info>
14-
<title>mongoc_collection_get_index_info()</title>
14+
<title>mongoc_collection_find_indexes()</title>
1515

1616
<section id="synopsis">
1717
<title>Synopsis</title>
18-
<synopsis><code mime="text/x-csrc"><![CDATA[bson_t *
19-
mongoc_database_get_collection_info (mongoc_collection_t *collection,
20-
bson_error_t *error);
18+
<synopsis><code mime="text/x-csrc"><![CDATA[mongoc_cursor_t *
19+
mongoc_database_find_collections (mongoc_collection_t *collection,
20+
bson_error_t *error);
2121
]]></code></synopsis>
22-
<p>Fetches a document containing an array of documents, each corresponding to an index on this collection.</p>
22+
<p>Fetches a cursor containing documents, each corresponding to an index on this collection.</p>
2323
</section>
2424

2525
<section id="parameters">
@@ -37,9 +37,9 @@ mongoc_database_get_collection_info (mongoc_collection_t *collection,
3737

3838
<section id="return">
3939
<title>Returns</title>
40-
<p>On success, a bson document containing a field "indexes", the value of which will be an array of subdocuments, each corresponding to the
41-
server's representation of an index on this collection. If the collection does not exist on the server, the array will be empty. A value of
42-
<code>NULL</code> will be returned in the case of a network error.</p>
40+
<p>A cursor where each result corresponds to the server's representation of
41+
an index on this collection. If the collection does not exist on the
42+
server, the cursor will be empty.</p>
4343
</section>
4444

4545
</page>

doc/mongoc_database_get_collection_info.page renamed to doc/mongoc_database_find_collections.page

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,22 @@
55
style="function"
66
xmlns:api="http://projectmallard.org/experimental/api/"
77
xmlns:ui="http://projectmallard.org/experimental/ui/"
8-
id="mongoc_database_get_collection_info">
8+
id="mongoc_database_find_collections">
99

1010

1111
<info>
1212
<link type="guide" xref="mongoc_database_t" group="function"/>
1313
</info>
14-
<title>mongoc_database_get_collection_info()</title>
14+
<title>mongoc_database_find_collections()</title>
1515

1616
<section id="synopsis">
1717
<title>Synopsis</title>
18-
<synopsis><code mime="text/x-csrc"><![CDATA[bson_t *
19-
mongoc_database_get_collection_info (mongoc_database_t *database,
20-
const bson_t *filter,
21-
bson_error_t *error);
18+
<synopsis><code mime="text/x-csrc"><![CDATA[mongoc_cursor_t *
19+
mongoc_database_find_collections (mongoc_database_t * database,
20+
const bson_t * filter,
21+
bson_error_t * error);
2222
]]></code></synopsis>
23-
<p>Fetches a document containing an array of documents, each corresponding to a collection on this database.</p>
23+
<p>Fetches a cursor containing documents, each corresponding to a collection on this database.</p>
2424
</section>
2525

2626
<section id="parameters">
@@ -39,8 +39,8 @@ mongoc_database_get_collection_info (mongoc_database_t *database,
3939

4040
<section id="return">
4141
<title>Returns</title>
42-
<p>On success, a bson document containing a field "collections", the value of which will be an array of subdocuments, each corresponding to the
43-
server's representation of a collection in this database. A value of <code>NULL</code> will be returned on a network error.</p>
42+
<p>A cursor where each result corresponds to the server's representation of
43+
a collection in this database.</p>
4444
</section>
4545

4646
</page>

src/libmongoc.symbols

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ mongoc_cleanup
1818
mongoc_client_command
1919
mongoc_client_command_simple
2020
mongoc_client_destroy
21+
mongoc_client_find_databases
2122
mongoc_client_get_collection
2223
mongoc_client_get_database
23-
mongoc_client_get_database_info
2424
mongoc_client_get_database_names
2525
mongoc_client_get_gridfs
2626
mongoc_client_get_max_bson_size
@@ -56,7 +56,7 @@ mongoc_collection_drop_index
5656
mongoc_collection_ensure_index
5757
mongoc_collection_find
5858
mongoc_collection_find_and_modify
59-
mongoc_collection_get_index_info
59+
mongoc_collection_find_indexes
6060
mongoc_collection_get_last_error
6161
mongoc_collection_get_name
6262
mongoc_collection_get_read_prefs
@@ -90,8 +90,8 @@ mongoc_database_command_simple
9090
mongoc_database_create_collection
9191
mongoc_database_destroy
9292
mongoc_database_drop
93+
mongoc_database_find_collections
9394
mongoc_database_get_collection
94-
mongoc_database_get_collection_info
9595
mongoc_database_get_collection_names
9696
mongoc_database_get_name
9797
mongoc_database_get_read_prefs
@@ -146,10 +146,10 @@ mongoc_log_level_str
146146
mongoc_log_set_handler
147147
mongoc_matcher_destroy
148148
mongoc_matcher_match
149-
mongoc_rand_seed
149+
mongoc_matcher_new
150150
mongoc_rand_add
151+
mongoc_rand_seed
151152
mongoc_rand_status
152-
mongoc_matcher_new
153153
mongoc_read_prefs_add_tag
154154
mongoc_read_prefs_copy
155155
mongoc_read_prefs_destroy

src/mongoc/mongoc-client.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1297,7 +1297,7 @@ mongoc_client_get_database_names (mongoc_client_t *client,
12971297

12981298
BSON_ASSERT (client);
12991299

1300-
cursor = mongoc_client_get_database_info (client, error);
1300+
cursor = mongoc_client_find_databases (client, error);
13011301

13021302
while (mongoc_cursor_next (cursor, &doc)) {
13031303
if (bson_iter_init (&iter, doc) &&
@@ -1322,8 +1322,8 @@ mongoc_client_get_database_names (mongoc_client_t *client,
13221322

13231323

13241324
mongoc_cursor_t *
1325-
mongoc_client_get_database_info (mongoc_client_t *client,
1326-
bson_error_t *error)
1325+
mongoc_client_find_databases (mongoc_client_t *client,
1326+
bson_error_t *error)
13271327
{
13281328
bson_t cmd = BSON_INITIALIZER;
13291329
mongoc_cursor_t *cursor;

src/mongoc/mongoc-client.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ mongoc_collection_t *mongoc_client_get_collection (mongoc_client
112112
const char *collection);
113113
char **mongoc_client_get_database_names (mongoc_client_t *client,
114114
bson_error_t *error);
115-
mongoc_cursor_t *mongoc_client_get_database_info (mongoc_client_t *client,
115+
mongoc_cursor_t *mongoc_client_find_databases (mongoc_client_t *client,
116116
bson_error_t *error);
117117
bool mongoc_client_get_server_status (mongoc_client_t *client,
118118
mongoc_read_prefs_t *read_prefs,

src/mongoc/mongoc-collection-private.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ mongoc_collection_t *_mongoc_collection_new (mongoc_client_t
5050
const char *collection,
5151
const mongoc_read_prefs_t *read_prefs,
5252
const mongoc_write_concern_t *write_concern);
53-
mongoc_cursor_t *_mongoc_collection_get_index_info_legacy (mongoc_collection_t *collection,
53+
mongoc_cursor_t *_mongoc_collection_find_indexes_legacy (mongoc_collection_t *collection,
5454
bson_error_t *error);
5555

5656

src/mongoc/mongoc-collection.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -899,8 +899,8 @@ mongoc_collection_ensure_index (mongoc_collection_t *collection,
899899
}
900900

901901
mongoc_cursor_t *
902-
_mongoc_collection_get_index_info_legacy (mongoc_collection_t *collection,
903-
bson_error_t *error)
902+
_mongoc_collection_find_indexes_legacy (mongoc_collection_t *collection,
903+
bson_error_t *error)
904904
{
905905
mongoc_database_t *db;
906906
mongoc_collection_t *idx_collection;
@@ -931,8 +931,8 @@ _mongoc_collection_get_index_info_legacy (mongoc_collection_t *collection,
931931
}
932932

933933
mongoc_cursor_t *
934-
mongoc_collection_get_index_info (mongoc_collection_t *collection,
935-
bson_error_t *error)
934+
mongoc_collection_find_indexes (mongoc_collection_t *collection,
935+
bson_error_t *error)
936936
{
937937
mongoc_cursor_t *cursor;
938938
mongoc_read_prefs_t *read_prefs;
@@ -972,7 +972,7 @@ mongoc_collection_get_index_info (mongoc_collection_t *collection,
972972
error->code = 0;
973973
error->domain = 0;
974974
mongoc_cursor_destroy (cursor);
975-
cursor = _mongoc_collection_get_index_info_legacy (collection, error);
975+
cursor = _mongoc_collection_find_indexes_legacy (collection, error);
976976
}
977977
} else {
978978
/* TODO: remove this branch for general release. Only relevant for RC */

0 commit comments

Comments
 (0)