GoLang MongoDB::getDBRef

request it (422)
GoLang replacement for PHP's MongoDB::getDBRef [edit | history]



Do you know a GoLang replacement for PHP's MongoDB::getDBRef? Write it!

PHP MongoDB::getDBRef

PHP original manual for MongoDB::getDBRef [ show | php.net ]

MongoDB::getDBRef

(PECL mongo >=0.9.0)

MongoDB::getDBRefFetches the document pointed to by a database reference

Description

public array MongoDB::getDBRef ( array $ref )

Parameters

ref

A database reference.

Return Values

Returns the document pointed to by the reference.

Examples

Example #1 MongoDB::getDBRef() example

Example demonstrating how to get a database reference and what the expected input is.

<?php

 $ref 
= array(
   
'$ref' => 'profiles',
   
'$id' => new MongoId('47cc67093475061e3d9536d2')
 );
 
 
$profile $db->getDBRef($ref);
 
?>

See MongoDB::createDBRef() for more information about how to programatically create DB references.