cap-nodejs

CAP Node.js API


CAP Node.js API / cap-storage-knex/src / KnexPublishStorage

Class: KnexPublishStorage

Defined in: cap-storage-knex/src/knex-publish-storage.ts:49

Implements

Constructors

Constructor

new KnexPublishStorage(knex, options?): KnexPublishStorage

Defined in: cap-storage-knex/src/knex-publish-storage.ts:54

Parameters

knex

Knex

options?

KnexStorageTableOptions = {}

Returns

KnexPublishStorage

Methods

claimUnpublished()

claimUnpublished(options): Promise<CapPublishEvent<JsonValue>[]>

Defined in: cap-storage-knex/src/knex-publish-storage.ts:89

Parameters

options

ClaimUnpublishedOptions

Returns

Promise<CapPublishEvent<JsonValue>[]>

Implementation of

PublishStoragePort.claimUnpublished


findPublishById()

findPublishById(id): Promise<CapPublishEvent<JsonValue> | undefined>

Defined in: cap-storage-knex/src/knex-publish-storage.ts:207

Parameters

id

string

Returns

Promise<CapPublishEvent<JsonValue> | undefined>

Implementation of

PublishStoragePort.findPublishById


getCapabilities()

getCapabilities(): CapStorageCapabilities

Defined in: cap-storage-knex/src/knex-publish-storage.ts:85

Returns

CapStorageCapabilities

Implementation of

CapabilityAwareStoragePort.getCapabilities


initialize()

initialize(options?): Promise<void>

Defined in: cap-storage-knex/src/knex-publish-storage.ts:61

Parameters

options?

InitOptions

Returns

Promise<void>

Implementation of

PublishStoragePort.initialize


listPublish()

listPublish(options?): Promise<DashboardListResult<CapPublishEvent<JsonValue>>>

Defined in: cap-storage-knex/src/knex-publish-storage.ts:216

Parameters

options?

DashboardListOptions = {}

Returns

Promise<DashboardListResult<CapPublishEvent<JsonValue>>>

Implementation of

PublishStoragePort.listPublish


markPublished()

markPublished(id, publishedAt?, ownership?): Promise<boolean>

Defined in: cap-storage-knex/src/knex-publish-storage.ts:130

Parameters

id

string

publishedAt?

Date = ...

ownership?

PublishClaimOwnership = {}

Returns

Promise<boolean>

Implementation of

PublishStoragePort.markPublished


markPublishFailed()

markPublishFailed(id, error, options): Promise<boolean>

Defined in: cap-storage-knex/src/knex-publish-storage.ts:149

Parameters

id

string

error

unknown

options

MarkPublishFailedOptions

Returns

Promise<boolean>

Implementation of

PublishStoragePort.markPublishFailed


releaseExpiredClaims()

releaseExpiredClaims(now): Promise<void>

Defined in: cap-storage-knex/src/knex-publish-storage.ts:195

Parameters

now

Date

Returns

Promise<void>

Implementation of

PublishStoragePort.releaseExpiredClaims


renewPublishClaim()

renewPublishClaim(options): Promise<boolean>

Defined in: cap-storage-knex/src/knex-publish-storage.ts:180

Parameters

options

RenewPublishClaimOptions

Returns

Promise<boolean>

Implementation of

PublishStoragePort.renewPublishClaim


savePublish()

savePublish<T>(event, ctx?): Promise<string>

Defined in: cap-storage-knex/src/knex-publish-storage.ts:66

Type Parameters

T

T extends JsonValue = JsonValue

Parameters

event

CapPublishEvent<T>

ctx?

CapOperationContext<Transaction<any, any[]>>

Returns

Promise<string>

Implementation of

PublishStoragePort.savePublish


savePublishWithTx()

savePublishWithTx<T>(event, tx): Promise<string>

Defined in: cap-storage-knex/src/knex-publish-storage.ts:78

Type Parameters

T

T extends JsonValue = JsonValue

Parameters

event

CapPublishEvent<T>

tx

Transaction

Returns

Promise<string>

Deprecated

Use savePublish(event, { tx }) instead.