DocsReference
Star us on Github
Back to reference
  • Getting Started

    • Overview & Installation
  • APIs

    • api()
    • api.get()
    • api.post()
    • api.put()
    • api.delete()
    • api.patch()
    • api.route()
    • api.route.all()
    • api.route.get()
    • api.route.post()
    • api.route.put()
    • api.route.delete()
    • api.route.patch()
  • Collections

    • collection()
    • collection.collection()
    • collection.query()
    • collection.query.where()
    • collection.query.limit()
    • collection.query.pagingFrom()
    • collection.query.fetch()
    • collection.query.stream()
    • collection.doc()
    • collection.doc.get()
    • collection.doc.set()
    • collection.doc.delete()
    • collection.doc.collection()
  • Topics

    • topic()
    • topic.publish()
    • topic.subscribe()
  • Queues

    • queue()
    • queue.send()
    • queue.receive()
  • Secrets

    • secret()
    • secret.put()
    • secret.version()
    • secret.latest()
    • secret.version.access()
  • Storage

    • bucket()
    • bucket.file()
    • bucket.files()
    • file.read()
    • file.write()
    • file.delete()
    • file.getDownloadUrl()
    • file.getUploadUrl()
  • Schedules

    • schedule()
    • schedule.every()

Collections

Node.js - collection.doc.delete()

Delete a document from a collection.

import { collection } from '@nitric/sdk';

const profiles = collection('profiles').for('deleting');

const drakesProfile = profiles.doc('Drake Mallard');

await drakesProfile.delete();

See also

  • doc().set()
  • doc().get()
Previous
collection.doc.set()
Next
collection.doc.collection()

On this page

  1. See also

  • Company

  • Blog
  • Open Source
  • About Us
  • Use Cases
  • Framework

  • APIs
  • Collections
  • Messaging
  • Secrets
  • Storage
  • Developers

  • Docs
  • Languages
  • Reference
  • Downloads
  • Build with us

  • Support
  • Community
  • Roadmap

Get our newsletter

© 2023 Nitric Inc.

Contact SalesTerms & Privacy