Class SorciPostgres

Namespace

Hierarchy

  • SorciPostgres

Implements

Constructors

Properties

_sql: any
_streamName: string

Accessors

Methods

  • Will append an event. It will make sure there is no concurrency issue if query & eventIdentifier is provided

    Returns

    The event id

    Parameters

    Returns Promise<any>

  • Parameters

    • streamName: string

    Returns Promise<any>

  • Parameters

    • tableName: string

    Returns Promise<void>

  • Will destroy every stream prefixed by 'test-' Usefull to cleanup all test stream

    Parameters

    • Optional payload: {
          excludeCurrentStream: boolean;
      }
      • excludeCurrentStream: boolean

    Returns Promise<void>

  • Will retrieve one event by it's id

    Parameters

    • id: string

    Returns Promise<undefined | {
        data: any;
        id: any;
        identifier: any;
        timestamp: any;
        type: any;
    }>

  • Parameters

    • streamName: string

    Returns string

  • Parameters

    • streamName: string

    Returns string

  • Parameters

    • streamName: string

    Returns string

  • Parameters

    • streamName: string

    Returns string

  • Parameters

    • sql: Sql<{}>
    • query: Query

    Returns PendingQuery<Row[]>

  • Will insert events in the stream without any concurrency check Usefull to setup a test stream with a lot of events

    Returns

    An array of event id

    Parameters

    Returns Promise<string[]>

  • Will create a stream with random name prefixed by 'test-' Usefull to setup a test stream

    Remarks

    You can give a name to the stream if you want to

    Parameters

    • Optional streamName: string

    Returns Promise<void>

Generated using TypeDoc