Skip to content

Commit 606e54e

Browse files
committed
PHP-1305: Collection::insertOne()
1 parent b90aaf8 commit 606e54e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Collection.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,13 @@ protected function _writeSingle($filter, $type, array $options = array(), $newob
195195
function getWriteOptions() { /* {{{ */
196196
return array(
197197
"ordered" => false,
198+
"upsert" => false,
199+
"limit" => 1,
198200
);
199201
} /* }}} */
202+
203+
function insertOne(array $filter) { /* {{{ */
204+
return $this->_writeSingle($filter, self::INSERT);
205+
} /* }}} */
200206
}
201207

0 commit comments

Comments
 (0)