Diagram
  • Introduction
  • Get Started
    • Hello World
    • Connecting to a DB
    • From a template
  • Concepts
    • Endpoints
    • Algorithm
  • Nodes
    • Bcrypt
    • Code
    • Constant
    • Database
    • EasyDB
    • Firestore
    • If / Then
    • Request
    • Response
    • JWT
    • Mapper
    • MongoDB
    • Stripe
    • Webhook
  • Templates
    • Login
    • Register
    • Get User
  • Resources
    • Dashboard
    • Contact
    • FAQs
Powered by GitBook
On this page
  1. Nodes

Database

PreviousConstantNextEasyDB

Last updated 3 years ago

Was this helpful?

CtrlK
  • General
  • Input
  • Output
  • Use Cases

Was this helpful?

General

The Database node allows to create, read, update and delete objects on our managed instance of Firestore.

Input

CASE: Collection / Add

  • Document data: Receives an Object with the data to add to the collection. Learn more on firestore.collection.add.

CASE: Collection / Get

  • This operation has no parameters. Learn more on firestore.collection.add.

CASE: Document / Get

  • Document id: Receives an `Object` with the document id to retrieve. Learn more on firestore.document.get.

CASE: Document / Update

  • Document id: Receives an Object with the document id to update. Learn more on firestore.document.update.

  • Document data: Receives an Object with the data to update to the document. Learn more on firestore.collection.add.

CASE: Document / Set

  • Document id: Receives an Object with the document id to set. Learn more on firestore.document.set.

  • Document data: Receives an Object with the data to set to the document. Learn more on firestore.document.set.

CASE: Document / Delete

  • Document id: Receives an Object with the document id to delete. Learn more on firestore.document.delete.

Environment variables:

  • firestore: Requires Project Id, Client Email and Private Key to be set.

Output

CASE: Collection / Add

  • Out: Returns an Object with the added data. Learn more on firestore.collection.add.

CASE: Collection / Get

  • Out: Returns an Object with the retrieved data. Learn more on firestore.collection.add.

CASE: Document / Get

  • Out: Returns an Object with the retrieved data. Learn more on firestore.document.get.

CASE: Document / Update

  • Out: Returns an Object with the update write result. Learn more on firestore.writeResult.

CASE: Document / Set

  • Out: Returns an Object with the set write result. Learn more on firestore.writeResult.

CASE: Document / Delete

  • Out: Returns an Object with the delete write result. Learn more on firestore.writeResult.

Use Cases

Retrieve a document from the database.

  • Request (Get) ➡ Database (Get) ➡ Response (200)

Update a document from the database.

  • Request (Post) ➡ Database (Post) ➡ Response (200)