Links the job to the user who created it.
OptionalcreatedLinks the job to the user ID who created it.
OptionalerrorCaptures any error message associated with the job.
A unique hash of the job, serving as an additional identifier based on job params
A unique identifier for the job, ensuring that each task can be accurately tracked and managed.
Stores metadata associated with the job, such as parameters or configuration settings, in a flexible JSONB format.
Organization where the job was created
OptionalorganizationAssociates the job with a specific organization.
Indicates the job's urgency, guiding the order in which jobs are selected for processing.
OptionalprocessedTimestamp marking when the job was completed
OptionalprocessedIdentifies the worker that processed the job, offering insights into task distribution and worker activity.
Timestamp marking when the job started processing
Represents how much of the job has been completed, expressed as a percentage. This metric is useful for tracking long-running tasks.
OptionalrawContains any raw log output generated by the job, useful for debugging or auditing purposes.
Serves as a reference link to another entity or task, providing context or dependencies related to the job.
OptionalrequestOptionally links the job to the unique identifier of the request that created it, enabling traceability back to the originating action.
OptionalrestartDetermines whether the job should be automatically restarted upon failure, aiding in resilience and error recovery.
Counts the number of times the job has been retried.
OptionalstartedTimestamp marking when the job was started to procesessing
Indicates the current state of the job, such as queued, processing, or completed. This status helps in monitoring and controlling the job's lifecycle.
Specifies the type of worker that should process the job, facilitating targeted task assignment based on worker capabilities.
JSON representation of the metadata associated with the job
Reflects the specific type of job, determined by the job's functionality or purpose.
StatictargetReturns object that is managed by this repository. If this repository manages entity from schema, then it returns a name of that schema instead.
Checks if entity has an id. If entity composite compose ids, it will check them all.
Reloads entity data from the database.
Removes current entity from the database.
Optionaloptions: RemoveOptionsSaves current entity in the database. If entity does not exist in the database then inserts, otherwise updates.
Optionaloptions: SaveOptionsRecords the delete date of current entity.
Optionaloptions: SaveOptionsStaticaverageStaticclearClears all the data from the given table/collection (truncates/drops it).
StaticcountStaticcountStaticcreateStaticcreateStaticdeleteDeletes entities by a given criteria. Unlike remove method executes a primitive operation without cascades, relations and other operations included. Executes fast and efficient DELETE query. Does not check if entity exist in the database.
StaticexistsStaticexistsStaticfindStaticfindFinds entities that match given find options. Also counts all entities that match given conditions, but ignores pagination settings (from and take options).
StaticfindStaticfindStaticfindStaticfindStaticfindStaticfindStaticfindStaticfindStaticgetStaticgetStatichasChecks entity has an id. If entity composite compose ids, it will check them all.
StaticinsertInserts a given entity into the database. Unlike save method executes a primitive operation without cascades, relations and other operations included. Executes fast and efficient INSERT query. Does not check if entity exist in the database, so query will fail if duplicate entity is being inserted.
StaticmaximumStaticmergeStaticminimumStaticpreloadCreates a new entity from the given plain javascript object. If entity already exist in the database, then it loads it (and everything related to it), replaces all values with the new ones from the given object and returns this new entity. This new entity is actually a loaded from the db entity with all properties replaced from the new object.
Note that given entity-like object must have an entity id / primary key to find entity by. Returns undefined if entity with given id was not found.
StaticqueryExecutes a raw SQL query and returns a raw database results. Raw query execution is supported only by relational databases (MongoDB is not supported).
Optionalparameters: any[]StaticremoveStaticsaveStaticsoftStaticsumStaticupdateUpdates entity partially. Entity can be found by a given conditions. Unlike save method executes a primitive operation without cascades, relations and other operations included. Executes fast and efficient UPDATE query. Does not check if entity exist in the database.
StaticupsertInserts a given entity into the database, unless a unique constraint conflicts then updates the entity Unlike save method executes a primitive operation without cascades, relations and other operations included. Executes fast and efficient INSERT ... ON CONFLICT DO UPDATE/ON DUPLICATE KEY UPDATE query.
StaticuseSets DataSource to be used by entity.
Timestamp marking when the job was created