ART Framework API Docs
    Preparing search index...

    Class SupabaseStorageAdapter

    A Supabase-backed StorageAdapter implementation.

    Expectations/assumptions:

    • Each collection maps to a table with a primary key column named 'id' (text/uuid).
    • We store JSON columns for flexible data where needed. However, repositories store fully shaped rows; this adapter just persists and retrieves whole objects.
    • For query(), we implement basic equality filters per FilterOptions.filter keys, plus limit/skip and a single-key sort.

    Implements

    Index

    Constructors

    Methods

    • Deletes an item from a collection by its ID.

      Parameters

      • collection: string

        The name of the collection.

      • id: string

        The ID of the item to delete.

      Returns Promise<void>

      A promise that resolves when the item is deleted.

    • Retrieves a single item from a collection by its ID.

      Type Parameters

      • T

      Parameters

      • collection: string

        The name of the collection.

      • id: string

        The ID of the item to retrieve.

      Returns Promise<null | T>

      A promise that resolves with the item, or null if not found.

    • Saves (upserts) an item in a collection.

      Type Parameters

      • T

      Parameters

      • collection: string

        The name of the collection.

      • id: string

        The ID of the item to save.

      • data: T

        The data to save.

      Returns Promise<void>

      A promise that resolves when the item is saved.