JVM - collection.doc.delete()
Delete a document from a collection.
import io.nitric.Nitric;import io.nitric.resources.CollectionPermission;class User {String name;int age;public User(String name, int age) {this.name = name;this.age = age;}}public class Application {public static void main(String[] args) {var profiles = Nitric.INSTANCE.collection("profiles", User.class).with(CollectionPermission.Delete);var drakesProfile = profiles.doc("Drake Mallard").delete();Nitric.INSTANCE.run();}}
See also
Last updated on Oct 11, 2024