Annotation: assert.is_not_null

CREATE OR REPLACE FUNCTION assert.is_not_null(anyelement, OUT message text, OUT result boolean)
RETURNS record

Information: assert.is_not_null

Schema assert
Function Name is_not_null
Arguments anyelement, OUT message text, OUT result boolean
Owner postgres
Result Type record
Description

Implementation: assert.is_not_null

CREATE OR REPLACE FUNCTION assert.is_not_null(anyelement, OUT message text, OUT result boolean)
 RETURNS record
 LANGUAGE plpgsql
 IMMUTABLE STRICT
AS $function$
BEGIN
    IF($1 IS NOT NULL) THEN
        message := 'Assert is not NULL.';
        PERFORM assert.ok(message);
        result := true;
        RETURN;
    END IF;
    
    message := E'ASSERT IS_NOT_NULL FAILED. The value is NULL.\n\n\n';  
    PERFORM assert.fail(message);
    result := false;
    RETURN;
END
$function$