Statement on glibc/iconv Vulnerability

CollectionRemove::__construct

(No version information available, might only be in Git)

CollectionRemove::__constructDer Konstruktor der Klasse CollectionRemove

Beschreibung

private mysql_xdevapi\CollectionRemove::__construct()

Entfernt Dokumente aus einer Sammlung und wird durch die Methode mysql_xdevapi\Collection::remove() instanziiert.

Parameter-Liste

Diese Funktion besitzt keine Parameter.

Beispiele

Beispiel #1 mysql_xdevapi\Collection::remove()-Beispiel

<?php
$session
= mysql_xdevapi\getSession("mysqlx://user:password@localhost");

$session->sql("DROP DATABASE IF EXISTS addressbook")->execute();
$session->sql("CREATE DATABASE addressbook")->execute();

$schema = $session->getSchema("addressbook");
$collection = $schema->createCollection("people");

$collection->add('{"name": "Alfred", "age": 18, "job": "Butler"}')->execute();
$collection->add('{"name": "Bob", "age": 19, "job": "Painter"}')->execute();

// Entfernen aller Painter
$collection
->remove("job in ('Painter')")
->
execute();

// Entfernen des ältesten Butlers
$collection
->remove("job in ('Butler')")
->
sort('age desc')
->
limit(1)
->
execute();

// Entfernen des Datensatzes mit dem niedrigsten age
$collection
->remove('true')
->
sort('age desc')
->
limit(1)
->
execute();
?>
add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top