Skip to content

Commit 5f1262a

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 ad2fc54 commit 5f1262a

15 files changed

+765
-8
lines changed

config.m4

+2
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ if test "$PHP_MONGODB" != "no"; then
169169
src/BSON/functions.c \
170170
src/MongoDB/BulkWrite.c \
171171
src/MongoDB/BulkWriteCommand.c \
172+
src/MongoDB/BulkWriteCommandResult.c \
172173
src/MongoDB/ClientEncryption.c \
173174
src/MongoDB/Command.c \
174175
src/MongoDB/Cursor.c \
@@ -189,6 +190,7 @@ if test "$PHP_MONGODB" != "no"; then
189190
src/MongoDB/WriteResult.c \
190191
src/MongoDB/Exception/AuthenticationException.c \
191192
src/MongoDB/Exception/BulkWriteException.c \
193+
src/MongoDB/Exception/BulkWriteCommandException.c \
192194
src/MongoDB/Exception/CommandException.c \
193195
src/MongoDB/Exception/ConnectionException.c \
194196
src/MongoDB/Exception/ConnectionTimeoutException.c \

config.w32

+2-2
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 functions.c");
119-
MONGODB_ADD_SOURCES("/src/MongoDB", "BulkWrite.c BulkWriteCommand.c ClientEncryption.c Command.c Cursor.c CursorId.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 SSLConnectionException.c UnexpectedValueException.c WriteException.c");
119+
MONGODB_ADD_SOURCES("/src/MongoDB", "BulkWrite.c BulkWriteCommand.c BulkWriteCommandResult.c ClientEncryption.c Command.c Cursor.c CursorId.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 SSLConnectionException.c UnexpectedValueException.c WriteException.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

+2
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);
@@ -280,6 +281,7 @@ PHP_MINIT_FUNCTION(mongodb) /* {{{ */
280281

281282
php_phongo_authenticationexception_init_ce(INIT_FUNC_ARGS_PASSTHRU);
282283
php_phongo_bulkwriteexception_init_ce(INIT_FUNC_ARGS_PASSTHRU);
284+
php_phongo_bulkwritecommandexception_init_ce(INIT_FUNC_ARGS_PASSTHRU);
283285
php_phongo_commandexception_init_ce(INIT_FUNC_ARGS_PASSTHRU);
284286
php_phongo_connectiontimeoutexception_init_ce(INIT_FUNC_ARGS_PASSTHRU);
285287
php_phongo_encryptionexception_init_ce(INIT_FUNC_ARGS_PASSTHRU);

0 commit comments

Comments
 (0)