Example usage for com.mongodb.client.model Updates popFirst

List of usage examples for com.mongodb.client.model Updates popFirst

Introduction

In this page you can find the example usage for com.mongodb.client.model Updates popFirst.

Prototype

public static Bson popFirst(final String fieldName) 

Source Link

Document

Creates an update that pops the first element of an array that is the value of the field with the given name.

Usage

From source file:com.exorath.exodata.impl.IExoDocument.java

License:Apache License

@Override
public Observable<UpdateResult> pop(String key, boolean first) {
    return first ? update(Updates.popFirst(key), false) : update(Updates.popLast(key), false);
}