Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
def q = api.queryApi()

def t1 = q.tables().product()

return q.source(t1, q.exprs().and(
                t1.sku().equal("MB-0001"),
        ))
        .streamCloseablestream { it.collect { it } }

It that takes reads a single table row with sku “MB-00001” from the Product table. Streaming is used in QueryAPI as the only option and it is up to you what you will do with the individual rows. In this case, earch are collected to a List.

...