PHP 클래스 Phalcon\Db\Adapter\MongoDB\Functions

파일 보기 프로젝트 열기: phalcon/incubator 1 사용 예제들

공개 메소드들

메소드 설명
extractIdFromInsertedDocument ( array | object $document ) : mixed Extracts an ID from an inserted document.
generateIndexName ( array | object $document ) : string Generate an index name from a key specification.
isFirstKeyOperator ( array | object $document ) : boolean Return whether the first key in the document starts with a "$" character.
isLastPipelineOperatorOut ( array $pipeline ) : boolean Return whether the aggregation pipeline ends with an $out operator.
isStringArray ( $input ) : boolean
readConcernAsDocument ( MongoDB\Driver\ReadConcern $readConcern ) : stdClass Converts a ReadConcern instance to a stdClass for use in a BSON document.
serverSupportsFeature ( MongoDB\Driver\Server $server, integer $feature ) : boolean Return whether the server supports a particular feature.

메소드 상세

extractIdFromInsertedDocument() 공개 정적인 메소드

This function is used when BulkWrite::insert() does not return a generated ID, which means that the ID should be fetched from an array offset, public property, or in the data returned by bsonSerialize().
또한 보기: https://jira.mongodb.org/browse/PHPC-382
public static extractIdFromInsertedDocument ( array | object $document ) : mixed
$document array | object Inserted document
리턴 mixed

generateIndexName() 공개 정적인 메소드

Generate an index name from a key specification.
public static generateIndexName ( array | object $document ) : string
$document array | object Document containing fields mapped to values, which denote order or an index type
리턴 string

isFirstKeyOperator() 공개 정적인 메소드

This is used for differentiating update and replacement documents.
public static isFirstKeyOperator ( array | object $document ) : boolean
$document array | object Update or replacement document
리턴 boolean

isLastPipelineOperatorOut() 공개 정적인 메소드

This is used for determining whether the aggregation pipeline msut be executed against a primary server.
public static isLastPipelineOperatorOut ( array $pipeline ) : boolean
$pipeline array List of pipeline operations
리턴 boolean

isStringArray() 공개 정적인 메소드

public static isStringArray ( $input ) : boolean
$input
리턴 boolean

readConcernAsDocument() 공개 정적인 메소드

Converts a ReadConcern instance to a stdClass for use in a BSON document.
또한 보기: https://jira.mongodb.org/browse/PHPC-498
public static readConcernAsDocument ( MongoDB\Driver\ReadConcern $readConcern ) : stdClass
$readConcern MongoDB\Driver\ReadConcern Read concern
리턴 stdClass

serverSupportsFeature() 공개 정적인 메소드

Return whether the server supports a particular feature.
public static serverSupportsFeature ( MongoDB\Driver\Server $server, integer $feature ) : boolean
$server MongoDB\Driver\Server Server to check
$feature integer Feature constant (i.e. wire protocol version)
리턴 boolean