Geen cache-versie.


Caching uitgeschakeld. Standaardinstelling voor deze pagina:ingeschakeld (code LNG204)
Als het scherm te langzaam is, kunt u de gebruikersmodus uitschakelen om de cacheversie te bekijken.

Rechercher une fonction PHP

The MongoCollection class

(PECL mongo >=0.9.0)

Introduction

Represents a MongoDB collection.

Collection names can use any character in the ASCII set. Some valid collection names are "", "...", "my collection", and "*&#@".

User-defined collection names cannot contain the $ symbol. There are certain system collections which use a $ in their names (e.g., local.oplog.$main), but it is a reserved character. If you attempt to create and use a collection with a $ in the name, MongoDB will assert.

Eerste pagina van Manuel PHP  Inhoudsopgave Haut

Class synopsis

MongoCollection {
/* Constants */
const int ASCENDING = 1 ;
const int DESCENDING = -1 ;
/* Fields */
public MongoDB $db = NULL ;
public integer $w ;
public integer $wtimeout ;
/* Methods */
public aggregate ( array $pipeline [, array $options ] ) : array
public aggregateCursor ( array $command [, array $options ] ) : MongoCommandCursor
public batchInsert ( array $a [, array $options = array() ] ) : mixed
public __construct ( MongoDB $db , string $name )
public count ([ array $query = array() [, array $options = array() ]] ) : int
public createDBRef ( mixed $document_or_id ) : array
public createIndex ( array $keys [, array $options = array() ] ) : bool
public deleteIndex ( string|array $keys ) : array
public deleteIndexes ( void ) : array
public distinct ( string $key [, array $query ] ) : array
public drop ( void ) : array
public ensureIndex ( string|array $key|keys [, array $options = array() ] ) : bool
public find ([ array $query = array() [, array $fields = array() ]] ) : MongoCursor
public findAndModify ( array $query [, array $update [, array $fields [, array $options ]]] ) : array
public findOne ([ array $query = array() [, array $fields = array() [, array $options = array() ]]] ) : array
public __get ( string $name ) : MongoCollection
public getDBRef ( array $ref ) : array
public getIndexInfo ( void ) : array
public getName ( void ) : string
public getReadPreference ( void ) : array
public getSlaveOkay ( void ) : bool
public getWriteConcern ( void ) : array
public group ( mixed $keys , array $initial , MongoCode $reduce [, array $options = array() ] ) : array
public insert ( array|object $document [, array $options = array() ] ) : bool|array
public parallelCollectionScan ( int $num_cursors ) : array[MongoCommandCursor]
public remove ([ array $criteria = array() [, array $options = array() ]] ) : bool|array
public save ( array|object $document [, array $options = array() ] ) : mixed
public setReadPreference ( string $read_preference [, array $tags ] ) : bool
public setSlaveOkay ([ bool $ok = TRUE ] ) : bool
public setWriteConcern ( mixed $w [, int $wtimeout ] ) : bool
static protected toIndexString ( mixed $keys ) : string
public __toString ( void ) : string
public update ( array $criteria , array $new_object [, array $options = array() ] ) : bool|array
public validate ([ bool $scan_data = FALSE ] ) : array
}

Eerste pagina van Manuel PHP  Inhoudsopgave Haut

Predefined Constants

MongoCollection::ASCENDING
Ascending direction for sorts and index creation.
MongoCollection::DESCENDING
Descending direction for sorts and index creation.

Eerste pagina van Manuel PHP  Inhoudsopgave Haut

Fields

db

The "parent" database for this collection.

w

The number of servers to replicate a change to before returning success. Value is inherited from the parent database. The MongoDB class has a more detailed description of how w works.

wtimeout

The number of milliseconds to wait for $this->w replications to take place. Value is inherited from the parent database. The MongoDB class has a more detailed description of how wtimeout works.

Eerste pagina van Manuel PHP  Inhoudsopgave Haut

Table of Contents

Zoek een PHP-functie

Vertaling niet beschikbaar

De PHP-handleiding is nog niet in het Nederlands vertaald, dus het scherm is in het Engels. Als u wilt, kunt u het ook in het Frans of in het Duits raadplegen.

Als je de moed voelt, kun je je vertaling aanbieden ;-)

Nederlandse vertaling

U hebt gevraagd om deze site in het Nederlands te bezoeken. Voor nu wordt alleen de interface vertaald, maar nog niet alle inhoud.

Als je me wilt helpen met vertalingen, is je bijdrage welkom. Het enige dat u hoeft te doen, is u op de site registreren en mij een bericht sturen waarin u wordt gevraagd om u toe te voegen aan de groep vertalers, zodat u de gewenste pagina's kunt vertalen. Een link onderaan elke vertaalde pagina geeft aan dat u de vertaler bent en heeft een link naar uw profiel.

Bij voorbaat dank.

Document heeft de 30/01/2003 gemaakt, de laatste keer de 26/10/2018 gewijzigd
Bron van het afgedrukte document:https://www.gaudry.be/nl/php-rf-class.mongocollection.html

De infobrol is een persoonlijke site waarvan de inhoud uitsluitend mijn verantwoordelijkheid is. De tekst is beschikbaar onder CreativeCommons-licentie (BY-NC-SA). Meer info op de gebruiksvoorwaarden en de auteur.

Referenties

  1. Bekijk - html-document Taal van het document:fr Manuel PHP : http://php.net

Deze verwijzingen en links verwijzen naar documenten die geraadpleegd zijn tijdens het schrijven van deze pagina, of die aanvullende informatie kunnen geven, maar de auteurs van deze bronnen kunnen niet verantwoordelijk worden gehouden voor de inhoud van deze pagina.
De auteur Deze site is als enige verantwoordelijk voor de manier waarop de verschillende concepten, en de vrijheden die met de referentiewerken worden genomen, hier worden gepresenteerd. Vergeet niet dat u meerdere broninformatie moet doorgeven om het risico op fouten te verkleinen.

Inhoudsopgave Haut