Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

120
Vistas
Eventstore sort by partical stream

Im currently unable to create a new stream with a prefix, based on the other one.

one example stream can be:

person.admin

it seems like according to docs, https://developers.eventstore.com/server/v5/projections.html#user-defined-projections-api

fromStreamsMatching cant be done on a projections that "one-time".

I could not find any documentation with working code (TS/JS), that would allow me to use this projection to go from person.admin to user.admin

What do I need to do to allow my Continuous projection to work?

current behaviour:

0@$projections-user-result

want:

0@user-{USERNAME OR ID}-result

Projections:

options({
    resultStreamName: "user-",
    $includeLinks: true,
    reorderEvents: false,
    processingLag: 500
})

fromStreamsMatching('person.')
    .when({
        $init: function() {
            return {
                logins: 0,
            }
        },
        login: function(state, event) {
            state.logins += 1;
        },

    })
    .outputState()
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

When I read the docs following the link in your question, I see this:

enter image description here

It says that the argument for the forStreamMatching function is a function that should return true of false given the stream name, like stream => stream.startsWith("person."). I am not sure where the docs say that it would work with a string prefix.

A warning: the ES6 syntax is only supported in ESDB >= 21.10

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda