Code Monkey home page Code Monkey logo

Comments (9)

mp911de avatar mp911de commented on May 31, 2024 1

Thank you for your contribution. That's merged now. I updated the other samples to use System.out.println(…) via method reference to align the samples.

from r2dbc.github.io.

mp911de avatar mp911de commented on May 31, 2024

Thanks for raising an issue. The code on the site does not have a compiled variant as it is a pure Jekyll site. How about submitting a pull request to align the sample with how Mutiny is intended to be used?

from r2dbc.github.io.

jponge avatar jponge commented on May 31, 2024

Do you have Mutiny bindings or examples somewhere in the code base so I could check out, test and propose something idiomatic?

from r2dbc.github.io.

mp911de avatar mp911de commented on May 31, 2024

While R2DBC isn't tied to a particular implementation of Reactive Streams, we have a bit of TCK code at TestKit that requires a concrete Reactive Streams implementation. The MySQL and Postgres drivers allow a quick-start by requiring Docker and Testcontainers. With either one you should be able to give it a spin with Mutiny.

The samples on the website are examples to give users an idea of how the SPI is used in combination with a composition library. The motivation for Uni.createFrom().publisher(…).multi(…) was to illustrate that ConnectionFactory emits a single item that then creates a stream of multiple items (Results).

from r2dbc.github.io.

jponge avatar jponge commented on May 31, 2024

Noted thanks, I will have a look and get back to you.

from r2dbc.github.io.

jponge avatar jponge commented on May 31, 2024

@mp911de I see that index.md uses embedded HTML, do you have a quick CLI command to generate the pile of HTML div/span?

The Mutiny snippet should be:

Uni.createFrom().publisher(connectionFactory.create())
  .onItem().transformToMulti(connection -> connection
    .createStatement("SELECT firstname FROM PERSON WHERE age > $1").bind("$1", 42).execute())
  .onItem().transform(result -> result.map((row, rowMetadata) -> row.get("firstname", String.class)))
  .subscribe().with(System.out::println);

from r2dbc.github.io.

mp911de avatar mp911de commented on May 31, 2024

Thanks. Formatting the code with http://rouge.jneen.net/v3.25.0/java/ should do the trick.

from r2dbc.github.io.

jponge avatar jponge commented on May 31, 2024

A quick Ruby script did the job, see #26.

from r2dbc.github.io.

mp911de avatar mp911de commented on May 31, 2024

Fixed via #26.

from r2dbc.github.io.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.