-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from esquerbatua/main
Make it work again
- Loading branch information
Showing
12 changed files
with
32 additions
and
23 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,38 @@ | ||
module mongo | ||
|
||
[inline] | ||
@[inline] | ||
pub fn (database &C.mongoc_database_t) write_command_with_opts(command &C.bson_t, opts &C.bson_t, result &C.bson_t) bool { | ||
return C.mongoc_database_write_command_with_opts(database, command, opts, result, | ||
0) | ||
} | ||
|
||
[inline] | ||
@[inline] | ||
pub fn (database &C.mongoc_database_t) create_collection(collection string) &C.mongoc_collection_t { | ||
return C.mongoc_database_create_collection(database, collection.str, 0, 0) | ||
} | ||
|
||
[inline] | ||
@[inline] | ||
pub fn (database &C.mongoc_database_t) get_collections() &C.mongoc_cursor_t { | ||
return C.mongoc_database_find_collections_with_opts(database, 0) | ||
} | ||
|
||
[inline] | ||
@[inline] | ||
pub fn (database &C.mongoc_database_t) add_user(user string, pass string, roles &C.bson_t) bool { | ||
return C.mongoc_database_add_user(database, user.str, pass.str, 0, 0, 0) | ||
} | ||
|
||
[inline] | ||
@[inline] | ||
pub fn (database &C.mongoc_database_t) add_user_opts(user string, pass string, roles &C.bson_t, custom_data &C.bson_t) bool { | ||
return C.mongoc_database_add_user(database, user.str, pass.str, roles, custom_data, | ||
0) | ||
} | ||
|
||
[inline] | ||
@[inline] | ||
pub fn (database &C.mongoc_database_t) drop() bool { | ||
return C.mongoc_database_drop(database, 0) | ||
} | ||
|
||
[inline] | ||
@[inline] | ||
pub fn (database &C.mongoc_database_t) destroy() { | ||
C.mongoc_database_destroy(database) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters