# CollectionModify class

(PECL mysql-xdevapi >= 8.0.11)

## Introduction

## Class synopsis

mysql_xdevapi\CollectionModify implements mysql_xdevapi\Executable , mysql_xdevapi\CrudOperationBindable , mysql_xdevapi\CrudOperationLimitable , mysql_xdevapi\CrudOperationSkippable , mysql_xdevapi\CrudOperationSortable {
/* Methods */
public arrayAppend ( string `$collection_field` , string `$expression_or_literal` ) : mysql_xdevapi\CollectionModify
public arrayInsert ( string `$collection_field` , string `$expression_or_literal` ) : mysql_xdevapi\CollectionModify
public bind ( array `$placeholder_values` ) : mysql_xdevapi\CollectionModify
public execute ( ) : mysql_xdevapi\Result
public limit ( int `$rows` ) : mysql_xdevapi\CollectionModify
public patch ( string `$document` ) : mysql_xdevapi\CollectionModify
public replace ( string `$collection_field` , string `$expression_or_literal` ) : mysql_xdevapi\CollectionModify
public set ( string `$collection_field` , string `$expression_or_literal` ) : mysql_xdevapi\CollectionModify
public skip ( int `$position` ) : mysql_xdevapi\CollectionModify
public sort ( string `$sort_expr` ) : mysql_xdevapi\CollectionModify
public unset ( array `$fields` ) : mysql_xdevapi\CollectionModify
}

## Table of Contents

- CollectionModify::arrayAppend — Append element to an array field
- CollectionModify::arrayInsert — Insert element into an array field
- CollectionModify::bind — Bind value to query placeholder
- CollectionModify::__construct — CollectionModify constructor
- CollectionModify::execute — Execute modify operation
- CollectionModify::limit — Limit number of modified documents
- CollectionModify::patch — Patch document
- CollectionModify::replace — Replace document field
- CollectionModify::set — Set document attribute
- CollectionModify::skip — Skip elements
- CollectionModify::sort — Set the sorting criteria
- CollectionModify::unset — Unset the value of document fields