Sha256: 81d3cf8710bf1b611e98a61ff4fac71781e7f79b1b6fb2d0a2f6087dcaa4c520

Contents?: true

Size: 263 Bytes

Versions: 12

Compression:

Stored size: 263 Bytes

Contents

CREATE OR REPLACE FUNCTION stream_version(
  _stream_name varchar
)
RETURNS int
AS $$
DECLARE
  stream_version int;
BEGIN
  select max(position) into stream_version from events where stream_name = _stream_name;

  return stream_version;
END;
$$ LANGUAGE plpgsql;

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
evt-message_store-postgres-0.1.0.0 database/functions/stream-version.sql
evt-event_source-postgres-0.19.0.3 database/functions/stream-version.sql
evt-event_source-postgres-0.19.0.2 database/functions/stream-version.sql
evt-event_source-postgres-0.19.0.1 database/functions/stream-version.sql
evt-event_source-postgres-0.19.0.0 database/functions/stream-version.sql
evt-event_source-postgres-0.18.0.1 database/functions/stream-version.sql
evt-event_source-postgres-0.18.0.0 database/functions/stream-version.sql
evt-event_source-postgres-0.17.2.0 database/functions/stream-version.sql
evt-event_source-postgres-0.17.1.0 database/functions/stream-version.sql
evt-event_source-postgres-0.17.0.2 database/functions/stream-version.sql
evt-event_source-postgres-0.17.0.0 database/functions/stream-version.sql
evt-event_source-postgres-0.16.1.0 database/functions/stream-version.sql