Adamite
  • Initial page
  • Server
    • Introduction
    • Database
      • Configuration
      • Using different adapters
        • Memory Adapter
      • Securing your data
        • Securing read operations
    • Functions
      • Invokable Functions
      • Runtime Functions
      • Scheduled Functions
  • SDK
    • Introduction
    • Database
      • Introduction
      • Read a document
      • Read multiple documents
      • Subscribe to changes
      • Create a new document
      • Update an existing document
      • Delete a document
    • Authentication
      • Create a user
      • Log in and log out
      • Get the logged in user
    • Functions
      • Invoke a function
Powered by GitBook
On this page
  • Reference a database
  • Reference a collection
  • Reference a document

Was this helpful?

  1. SDK
  2. Database

Introduction

You can interact with data in the database by creating references to that data. You can reference an entire database, a collection within the database, or an individual document

Reference a database

const ref = adamite().database();
const ref = adamite().database("custom");

Reference a collection

const ref = adamite().database().collection("collection");

Reference a document

const ref = adamite().database().collection("collection").doc("documentId");
PreviousDatabaseNextRead a document

Last updated 5 years ago

Was this helpful?