Skip to content

Commit 27942b1

Browse files
committed
PHPC-2494: BulkWriteCommandResult and BulkWriteCommandException
It was possible to reuse WriteConcernError and WriteError with slight changes to their init functions.
1 parent 8523619 commit 27942b1

15 files changed

+748
-8
lines changed

config.m4

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ if test "$PHP_MONGODB" != "no"; then
168168
src/BSON/UTCDateTimeInterface.c \
169169
src/MongoDB/BulkWrite.c \
170170
src/MongoDB/BulkWriteCommand.c \
171+
src/MongoDB/BulkWriteCommandResult.c \
171172
src/MongoDB/ClientEncryption.c \
172173
src/MongoDB/Command.c \
173174
src/MongoDB/Cursor.c \
@@ -187,6 +188,7 @@ if test "$PHP_MONGODB" != "no"; then
187188
src/MongoDB/WriteResult.c \
188189
src/MongoDB/Exception/AuthenticationException.c \
189190
src/MongoDB/Exception/BulkWriteException.c \
191+
src/MongoDB/Exception/BulkWriteCommandException.c \
190192
src/MongoDB/Exception/CommandException.c \
191193
src/MongoDB/Exception/ConnectionException.c \
192194
src/MongoDB/Exception/ConnectionTimeoutException.c \

config.w32

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@ if (PHP_MONGODB != "no") {
116116
EXTENSION("mongodb", "php_phongo.c", null, PHP_MONGODB_CFLAGS);
117117
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");
118118
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");
119-
MONGODB_ADD_SOURCES("/src/MongoDB", "BulkWrite.c BulkWriteCommand.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");
120-
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");
119+
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");
120+
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");
121121
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");
122122
MONGODB_ADD_SOURCES("/src/libmongoc/src/common/src", PHP_MONGODB_COMMON_SOURCES);
123123
MONGODB_ADD_SOURCES("/src/libmongoc/src/libbson/src/bson", PHP_MONGODB_BSON_SOURCES);

php_phongo.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,7 @@ PHP_MINIT_FUNCTION(mongodb) /* {{{ */
253253

254254
php_phongo_bulkwrite_init_ce(INIT_FUNC_ARGS_PASSTHRU);
255255
php_phongo_bulkwritecommand_init_ce(INIT_FUNC_ARGS_PASSTHRU);
256+
php_phongo_bulkwritecommandresult_init_ce(INIT_FUNC_ARGS_PASSTHRU);
256257
php_phongo_clientencryption_init_ce(INIT_FUNC_ARGS_PASSTHRU);
257258
php_phongo_command_init_ce(INIT_FUNC_ARGS_PASSTHRU);
258259
php_phongo_cursor_init_ce(INIT_FUNC_ARGS_PASSTHRU);
@@ -278,6 +279,7 @@ PHP_MINIT_FUNCTION(mongodb) /* {{{ */
278279

279280
php_phongo_authenticationexception_init_ce(INIT_FUNC_ARGS_PASSTHRU);
280281
php_phongo_bulkwriteexception_init_ce(INIT_FUNC_ARGS_PASSTHRU);
282+
php_phongo_bulkwritecommandexception_init_ce(INIT_FUNC_ARGS_PASSTHRU);
281283
php_phongo_commandexception_init_ce(INIT_FUNC_ARGS_PASSTHRU);
282284
php_phongo_connectiontimeoutexception_init_ce(INIT_FUNC_ARGS_PASSTHRU);
283285
php_phongo_encryptionexception_init_ce(INIT_FUNC_ARGS_PASSTHRU);

0 commit comments

Comments
 (0)