Skip to content

Conversation

@norberttech
Copy link
Member

Change Log

Added

  • When expression

Fixed

Changed

Removed

Deprecated

Security


Description

<?php

(new Flow())
    ->read(From::rows(new Rows(
        Row::with(Entry::int('id', 1), Entry::int('value', 1)),
        Row::with(Entry::int('id', 2), Entry::int('value', 1)),
        Row::with(Entry::int('id', 3), Entry::null('value')),
        Row::with(Entry::int('id', 4), Entry::int('value', 1)),
        Row::with(Entry::int('id', 5), Entry::null('value')),
    )))
    ->withEntry(
        'value',
        when(ref('value')->isNull(), then: lit(0))
    )
    ->write(To::output(false))
    ->run();

@github-actions github-actions bot added size: M and removed size: S labels Mar 25, 2023
@norberttech norberttech merged commit 55b179a into flow-php:1.x Mar 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant