All Downloads are FREE. Search and download functionalities are using the official Maven repository.

platform_functions_relation.relation.functions.concatenate.pure Maven / Gradle / Ivy

// Copyright 2023 Goldman Sachs
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

import meta::pure::test::pct::*;
import meta::pure::metamodel::relation::*;

native function <> meta::pure::functions::relation::concatenate(rel1:Relation[1], rel2:Relation[1]):Relation[1];

function <> meta::pure::functions::relation::tests::concatenate::testSimpleConcatenateShared(f:Function<{Function<{->T[m]}>[1]->T[m]}>[1]):Boolean[1]
{
    let expr = {
               | #TDS
                  val, str
                  1, a
                  3, ewe
                  4, qw
                #
                ->concatenate
                (
                  #TDS
                    val, str
                    5, qwea
                    6, eeewe
                    7, qqwew
                  #);
              };

    let res =  $f->eval($expr);

    assertEquals( '#TDS\n'+
                  '   val,str\n'+
                  '   1,a\n'+
                  '   3,ewe\n'+
                  '   4,qw\n'+
                  '   5,qwea\n'+
                  '   6,eeewe\n'+
                  '   7,qqwew\n'+
                  '#', $res->toString());
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy