Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHPC-2478: Implement API for bulkWrite command #1790

Open
wants to merge 20 commits into
base: v2.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
60a54dd
PHPC-2495, PHPC-2490, PHPC-2491, PHPC-2492: BulkWriteCommand ctor and…
jmikola Dec 10, 2024
d197dda
PHPC-2494: BulkWriteCommandResult and BulkWriteCommandException
jmikola Jan 2, 2025
d0af8f9
Include missing header in WriteResult.h
jmikola Jan 2, 2025
61ffb2d
PHPC-2493: Manager and Server::executeBulkWriteCommand()
jmikola Jan 2, 2025
965118c
PHPC-2494: Handle null error fields in BulkWriteCommandResult
jmikola Jan 16, 2025
d3276c1
PHPC-2494: Return writeErrors as an associative array
jmikola Jan 16, 2025
9b50625
PHPC-2493: Revise error handling for mongoc_bulkwrite_execute
jmikola Jan 16, 2025
1af9111
Consistent WriteError and WriteConcernError parsing for bulk write re…
jmikola Jan 17, 2025
d8716e8
BulkWriteCommand tests
jmikola Jan 14, 2025
5c78086
clang-format
jmikola Feb 5, 2025
6da1938
Remove BulkWriteCommandResult::getServer()
jmikola Feb 10, 2025
6dd6f5a
Check for _id extraction before appending insert
jmikola Feb 18, 2025
dce281d
Regenerate BulkWriteCommandException arginfo
jmikola Feb 18, 2025
560a179
PHPC-2493: Relocate writeConcern option to executeBulkWriteCommand()
jmikola Feb 28, 2025
aa92cc5
Parse sort option for replaceOne and updateOne
jmikola Mar 3, 2025
82defbf
BulkWriteCommand::replaceOne() need not accept root-level arrays
jmikola Mar 4, 2025
0b922bc
Preserve empty documents for verbose results and error reply
jmikola Mar 7, 2025
3928264
PHPC-2494: Relocate error fields to BulkWriteCommandException
jmikola Mar 11, 2025
dc7135f
Throw BulkWriteCommandException directly for server errors
jmikola Mar 14, 2025
6dd4fff
Check for empty error_reply instead of NULL
jmikola Apr 2, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,8 @@ if test "$PHP_MONGODB" != "no"; then
src/BSON/UTCDateTime.c \
src/BSON/UTCDateTimeInterface.c \
src/MongoDB/BulkWrite.c \
src/MongoDB/BulkWriteCommand.c \
src/MongoDB/BulkWriteCommandResult.c \
src/MongoDB/ClientEncryption.c \
src/MongoDB/Command.c \
src/MongoDB/Cursor.c \
Expand All @@ -186,6 +188,7 @@ if test "$PHP_MONGODB" != "no"; then
src/MongoDB/WriteResult.c \
src/MongoDB/Exception/AuthenticationException.c \
src/MongoDB/Exception/BulkWriteException.c \
src/MongoDB/Exception/BulkWriteCommandException.c \
src/MongoDB/Exception/CommandException.c \
src/MongoDB/Exception/ConnectionException.c \
src/MongoDB/Exception/ConnectionTimeoutException.c \
Expand Down
4 changes: 2 additions & 2 deletions config.w32
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ if (PHP_MONGODB != "no") {
EXTENSION("mongodb", "php_phongo.c", null, PHP_MONGODB_CFLAGS);
MONGODB_ADD_SOURCES("/src", "phongo_apm.c phongo_atomic.c phongo_bson.c phongo_bson_encode.c phongo_client.c phongo_compat.c phongo_error.c phongo_execute.c phongo_ini.c phongo_log.c phongo_util.c");
MONGODB_ADD_SOURCES("/src/BSON", "Binary.c BinaryInterface.c Document.c Iterator.c DBPointer.c Decimal128.c Decimal128Interface.c Int64.c Javascript.c JavascriptInterface.c MaxKey.c MaxKeyInterface.c MinKey.c MinKeyInterface.c ObjectId.c ObjectIdInterface.c PackedArray.c Persistable.c Regex.c RegexInterface.c Serializable.c Symbol.c Timestamp.c TimestampInterface.c Type.c Undefined.c Unserializable.c UTCDateTime.c UTCDateTimeInterface.c");
MONGODB_ADD_SOURCES("/src/MongoDB", "BulkWrite.c ClientEncryption.c Command.c Cursor.c CursorInterface.c Manager.c Query.c ReadConcern.c ReadPreference.c Server.c ServerApi.c ServerDescription.c Session.c TopologyDescription.c WriteConcern.c WriteConcernError.c WriteError.c WriteResult.c");
MONGODB_ADD_SOURCES("/src/MongoDB/Exception", "AuthenticationException.c BulkWriteException.c CommandException.c ConnectionException.c ConnectionTimeoutException.c EncryptionException.c Exception.c ExecutionTimeoutException.c InvalidArgumentException.c LogicException.c RuntimeException.c ServerException.c UnexpectedValueException.c");
MONGODB_ADD_SOURCES("/src/MongoDB", "BulkWrite.c BulkWriteCommand.c BulkWriteCommandResult.c ClientEncryption.c Command.c Cursor.c CursorInterface.c Manager.c Query.c ReadConcern.c ReadPreference.c Server.c ServerApi.c ServerDescription.c Session.c TopologyDescription.c WriteConcern.c WriteConcernError.c WriteError.c WriteResult.c");
MONGODB_ADD_SOURCES("/src/MongoDB/Exception", "AuthenticationException.c BulkWriteException.c BulkWriteCommandException.c CommandException.c ConnectionException.c ConnectionTimeoutException.c EncryptionException.c Exception.c ExecutionTimeoutException.c InvalidArgumentException.c LogicException.c RuntimeException.c ServerException.c UnexpectedValueException.c");
MONGODB_ADD_SOURCES("/src/MongoDB/Monitoring", "CommandFailedEvent.c CommandStartedEvent.c CommandSubscriber.c CommandSucceededEvent.c LogSubscriber.c SDAMSubscriber.c Subscriber.c ServerChangedEvent.c ServerClosedEvent.c ServerHeartbeatFailedEvent.c ServerHeartbeatStartedEvent.c ServerHeartbeatSucceededEvent.c ServerOpeningEvent.c TopologyChangedEvent.c TopologyClosedEvent.c TopologyOpeningEvent.c functions.c");
MONGODB_ADD_SOURCES("/src/libmongoc/src/common/src", PHP_MONGODB_COMMON_SOURCES);
MONGODB_ADD_SOURCES("/src/libmongoc/src/libbson/src/bson", PHP_MONGODB_BSON_SOURCES);
Expand Down
3 changes: 3 additions & 0 deletions php_phongo.c
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,8 @@ PHP_MINIT_FUNCTION(mongodb) /* {{{ */
php_phongo_cursor_interface_init_ce(INIT_FUNC_ARGS_PASSTHRU);

php_phongo_bulkwrite_init_ce(INIT_FUNC_ARGS_PASSTHRU);
php_phongo_bulkwritecommand_init_ce(INIT_FUNC_ARGS_PASSTHRU);
php_phongo_bulkwritecommandresult_init_ce(INIT_FUNC_ARGS_PASSTHRU);
php_phongo_clientencryption_init_ce(INIT_FUNC_ARGS_PASSTHRU);
php_phongo_command_init_ce(INIT_FUNC_ARGS_PASSTHRU);
php_phongo_cursor_init_ce(INIT_FUNC_ARGS_PASSTHRU);
Expand All @@ -277,6 +279,7 @@ PHP_MINIT_FUNCTION(mongodb) /* {{{ */

php_phongo_authenticationexception_init_ce(INIT_FUNC_ARGS_PASSTHRU);
php_phongo_bulkwriteexception_init_ce(INIT_FUNC_ARGS_PASSTHRU);
php_phongo_bulkwritecommandexception_init_ce(INIT_FUNC_ARGS_PASSTHRU);
php_phongo_commandexception_init_ce(INIT_FUNC_ARGS_PASSTHRU);
php_phongo_connectiontimeoutexception_init_ce(INIT_FUNC_ARGS_PASSTHRU);
php_phongo_encryptionexception_init_ce(INIT_FUNC_ARGS_PASSTHRU);
Expand Down
Loading
Loading