Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mongo-php-library
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sinan
mongo-php-library
Commits
a033aca8
Commit
a033aca8
authored
Nov 01, 2015
by
Jeremy Mikola
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MongoDB\Driver\BulkWrite now takes an options array
See: PHPC-444, HHVM-117
parent
81cd77be
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
7 additions
and
7 deletions
+7
-7
BulkWrite.php
src/Operation/BulkWrite.php
+1
-1
CreateIndexes.php
src/Operation/CreateIndexes.php
+1
-1
InsertMany.php
src/Operation/InsertMany.php
+1
-1
BulkWriteFunctionalTest.php
tests/Collection/BulkWriteFunctionalTest.php
+1
-1
CollectionFunctionalTest.php
tests/Collection/CollectionFunctionalTest.php
+1
-1
FunctionalTestCase.php
tests/Collection/CrudSpec/FunctionalTestCase.php
+1
-1
FindOneFunctionalTest.php
tests/Operation/FindOneFunctionalTest.php
+1
-1
No files found.
src/Operation/BulkWrite.php
View file @
a033aca8
...
@@ -207,7 +207,7 @@ class BulkWrite implements Executable
...
@@ -207,7 +207,7 @@ class BulkWrite implements Executable
*/
*/
public
function
execute
(
Server
$server
)
public
function
execute
(
Server
$server
)
{
{
$bulk
=
new
Bulk
(
$this
->
options
[
'ordered'
]);
$bulk
=
new
Bulk
(
[
'ordered'
=>
$this
->
options
[
'ordered'
]
]);
$insertedIds
=
array
();
$insertedIds
=
array
();
foreach
(
$this
->
operations
as
$i
=>
$operation
)
{
foreach
(
$this
->
operations
as
$i
=>
$operation
)
{
...
...
src/Operation/CreateIndexes.php
View file @
a033aca8
...
@@ -107,7 +107,7 @@ class CreateIndexes implements Executable
...
@@ -107,7 +107,7 @@ class CreateIndexes implements Executable
*/
*/
private
function
executeLegacy
(
Server
$server
)
private
function
executeLegacy
(
Server
$server
)
{
{
$bulk
=
new
Bulk
(
true
);
$bulk
=
new
Bulk
(
[
'ordered'
=>
true
]
);
foreach
(
$this
->
indexes
as
$index
)
{
foreach
(
$this
->
indexes
as
$index
)
{
$bulk
->
insert
(
$index
);
$bulk
->
insert
(
$index
);
...
...
src/Operation/InsertMany.php
View file @
a033aca8
...
@@ -87,7 +87,7 @@ class InsertMany implements Executable
...
@@ -87,7 +87,7 @@ class InsertMany implements Executable
*/
*/
public
function
execute
(
Server
$server
)
public
function
execute
(
Server
$server
)
{
{
$bulk
=
new
Bulk
(
$this
->
options
[
'ordered'
]);
$bulk
=
new
Bulk
(
[
'ordered'
=>
$this
->
options
[
'ordered'
]
]);
$insertedIds
=
array
();
$insertedIds
=
array
();
foreach
(
$this
->
documents
as
$i
=>
$document
)
{
foreach
(
$this
->
documents
as
$i
=>
$document
)
{
...
...
tests/Collection/BulkWriteFunctionalTest.php
View file @
a033aca8
...
@@ -202,7 +202,7 @@ class BulkWriteFunctionalTest extends FunctionalTestCase
...
@@ -202,7 +202,7 @@ class BulkWriteFunctionalTest extends FunctionalTestCase
*/
*/
private
function
createFixtures
(
$n
)
private
function
createFixtures
(
$n
)
{
{
$bulkWrite
=
new
BulkWrite
(
true
);
$bulkWrite
=
new
BulkWrite
(
[
'ordered'
=>
true
]
);
for
(
$i
=
1
;
$i
<=
$n
;
$i
++
)
{
for
(
$i
=
1
;
$i
<=
$n
;
$i
++
)
{
$bulkWrite
->
insert
(
array
(
$bulkWrite
->
insert
(
array
(
...
...
tests/Collection/CollectionFunctionalTest.php
View file @
a033aca8
...
@@ -83,7 +83,7 @@ class CollectionFunctionalTest extends FunctionalTestCase
...
@@ -83,7 +83,7 @@ class CollectionFunctionalTest extends FunctionalTestCase
*/
*/
private
function
createFixtures
(
$n
)
private
function
createFixtures
(
$n
)
{
{
$bulkWrite
=
new
BulkWrite
(
true
);
$bulkWrite
=
new
BulkWrite
(
[
'ordered'
=>
true
]
);
for
(
$i
=
1
;
$i
<=
$n
;
$i
++
)
{
for
(
$i
=
1
;
$i
<=
$n
;
$i
++
)
{
$bulkWrite
->
insert
(
array
(
$bulkWrite
->
insert
(
array
(
...
...
tests/Collection/CrudSpec/FunctionalTestCase.php
View file @
a033aca8
...
@@ -17,7 +17,7 @@ abstract class FunctionalTestCase extends BaseFunctionalTestCase
...
@@ -17,7 +17,7 @@ abstract class FunctionalTestCase extends BaseFunctionalTestCase
*/
*/
protected
function
createFixtures
(
$n
)
protected
function
createFixtures
(
$n
)
{
{
$bulkWrite
=
new
BulkWrite
(
true
);
$bulkWrite
=
new
BulkWrite
(
[
'ordered'
=>
true
]
);
for
(
$i
=
1
;
$i
<=
$n
;
$i
++
)
{
for
(
$i
=
1
;
$i
<=
$n
;
$i
++
)
{
$bulkWrite
->
insert
(
array
(
$bulkWrite
->
insert
(
array
(
...
...
tests/Operation/FindOneFunctionalTest.php
View file @
a033aca8
...
@@ -45,7 +45,7 @@ class FindOneFunctionalTest extends FunctionalTestCase
...
@@ -45,7 +45,7 @@ class FindOneFunctionalTest extends FunctionalTestCase
*/
*/
private
function
createFixtures
(
$n
)
private
function
createFixtures
(
$n
)
{
{
$bulkWrite
=
new
BulkWrite
(
true
);
$bulkWrite
=
new
BulkWrite
(
[
'ordered'
=>
true
]
);
for
(
$i
=
1
;
$i
<=
$n
;
$i
++
)
{
for
(
$i
=
1
;
$i
<=
$n
;
$i
++
)
{
$bulkWrite
->
insert
([
$bulkWrite
->
insert
([
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment