Exposes the algebra used by Comunica.
This module is part of the Comunica framework, and should only be used by developers that want to build their own query engine.
Click here if you just want to query with Comunica.
$ yarn add @comunica/utils-data-factory
Algebra: Collection of algebra related types and transformers.AlgebraFactory: A factory to create the algebra operations.algebraUtils: a collection of utility functions for the algebraThe algebra is derived from the algebra exposed by Traqula, to contain the same operations but using interface instead of type unions. The usage of interfaces creates an environment where it is easy for third parties to extend Comunica to run on algebra operations that are unknown to base Comunica.
Base Comunica function on an open interface Operation/BaseOperation that just describes an object with a string type. Whenever a type matches with a known types, the actors may conclude that the object will at least match the properties described by this algebra package.
To help in this feat, the algebra exposes 3 type guards: isKnownOperation, isKnownOperationSub, and isKnownSub that will help you validate what Operations your actor receives.
Actors should always be implemented in a way that matches this philosophy of open algebra types.
Additionally, allowing Comunica to declare for itself what it views as 'valid algebra' allows for more independent evolution of comunica in relation to the (algebra) parser it uses.