Documentation
    Preparing search index...

    Class SpecificationRepository

    Repository for Specification subcollection items

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    _model: typeof PersistedBaseObject
    backendAdapter: BackendInterface

    The specific backend adapter designated for this repository's requests.

    COLLECTION_NAME: "specifications" = 'specifications'
    useDateFormat: boolean = true

    Toggle indicating whether to automatically parse formats natively as Date.

    Accessors

    • get currentUser(): User | undefined

      Returns User | undefined

    • set currentUser(user: User | undefined): void

      Parameters

      • user: User | undefined

      Returns void

    Methods

    • Creates a new persistent record for the provided base object instance.

      Type Parameters

      Parameters

      • obj: B

        The new model instance.

      • Optionaluid: string

        Optional explicit identifier.

      Returns Promise<any>

      A promise resolving to the saved and repopulated model instance.

    • delete object in its backend

      Parameters

      • uid: string

        string

      • hardDelete: boolean = false

      Returns Promise<DataObjectClass<any>>

    • Internal utility transforming a string key or path into a ready-to-use DataObject.

      Parameters

      • key: string

        The short UID or full database path.

      Returns Promise<DataObjectClass<any>>

      A promise resolving to the newly initialized DataObjectClass.

      If key is empty or malformed.

    • Executes an advanced Query using the current repository's backend adapter.

      Parameters

      • query: Query<any>

        The configured Query builder instance.

      Returns Promise<QueryResultType<any>>

      A promise resolving to an array of model instances matching the query.

    • Retrieve object from its backend

      Parameters

      • param: string | ObjectUri | ReferenceType

        string | ReferenceType

      Returns Promise<any>

    • Updates an existing database record using the mutated object instance.

      Type Parameters

      Parameters

      • obj: B

        The modified object instance.

      Returns Promise<any>

      A promise resolving to the updated object footprint.