Skip to content

Commit ca2252c

Browse files
committed
fix tests
1 parent 4d49755 commit ca2252c

File tree

4 files changed

+19
-20
lines changed

4 files changed

+19
-20
lines changed

showcases/data/Essential/Functions/Date/Basic/code.pure

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@ Mapping examples::stringToDate::StringToDateMapping
1818
targetValue: if(
1919
$src.sourceValue->isEmpty(),
2020
|[],
21-
|$src.sourceValue->toOne()->parseDate()->cast(
22-
@StrictDate
23-
)
21+
|$src.sourceValue->toOne()->parseDate()->cast(@StrictDate)
2422
)
2523
}
2624

@@ -48,4 +46,4 @@ Mapping examples::stringToDate::StringToDateMapping
4846
assert: '{"targetValue":"2022-02-17"}';
4947
)
5048
]
51-
)
49+
)

showcases/data/Model/Build a data model/code.pure

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ Mapping _03_modelToModelMapping::simpleModelToModelMapping
352352
*_01_basic::Product: Pure
353353
{
354354
~src _03_modelToModelMapping::S_Product
355-
~filter !($src.classification.type == 'type2')
355+
~filter $src.classification.type != 'type2'
356356
name: $src.name,
357357
synonyms[_01_basic_Synonym]: $src.synonym,
358358
classification[_01_basic_ProductClassification]: $src.classification
@@ -461,7 +461,7 @@ Mapping _03_modelToModelMapping::unionMapping
461461
_01_basic::Product[p1]: Pure
462462
{
463463
~src _03_modelToModelMapping::S_Product
464-
~filter !($src.classification.type == 'type2')
464+
~filter $src.classification.type != 'type2'
465465
name: $src.name,
466466
classification[_01_basic_ProductClassification]: $src.classification,
467467
synonyms[_01_basic_Synonym]: $src.synonym

showcases/data/Store/Relational Store/Database Specification/Tabular Function/code.pure

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Database demo::udtf::DemoDb
88
firmId INTEGER,
99
legalname VARCHAR(200)
1010
)
11+
1112
TabularFunction Person
1213
(
1314
firstname VARCHAR(200),
@@ -34,8 +35,7 @@ Database demo::udtf::DemoDb
3435

3536
Join firm_person(Org.Firm.firmId = Org.Person.associatedFirmId)
3637
Join firm_person2(Org.Firm.firmId = Org.Person2.associatedFirmId)
37-
Join relationship(Org.ParentAndChildren.parentId = {target}.id)
38-
38+
Join relationship(Org.ParentAndChildren.parentId = {target}.id)
3939
)
4040

4141

@@ -69,8 +69,7 @@ Association demo::udtf::firm_person
6969

7070
function demo::udtf::Org::FirmToPerson(): meta::pure::tds::TabularDataSet[1]
7171
{
72-
demo::udtf::Org::Firm.all()
73-
->project(
72+
demo::udtf::Org::Firm.all()->project(
7473
[
7574
x|$x.firmId,
7675
x|$x.associatedPerson.age
@@ -127,7 +126,6 @@ function demo::udtf::Org::FirmToPersonWithFilterOnPersonUsingUnion(): meta::pure
127126
)
128127
}
129128

130-
131129
function demo::udtf::Org::FetchChildrenViaSelfJoin(): meta::pure::tds::TabularDataSet[1]
132130
{
133131
demo::udtf::Org::Person.all()->project(
@@ -168,7 +166,6 @@ Mapping demo::udtf::DemoMapping
168166
}
169167
*demo::udtf::Org::Person[p]: Relational
170168
{
171-
172169
~mainTable [demo::udtf::DemoDb]Org.Person
173170
firstname: [demo::udtf::DemoDb]Org.Person.firstname,
174171
lastname: [demo::udtf::DemoDb]Org.Person.lastname,
@@ -185,6 +182,7 @@ Mapping demo::udtf::DemoMapping
185182
}
186183
)
187184

185+
188186
###Mapping
189187
Mapping demo::udtf::DemoMappingUnion
190188
(
@@ -230,12 +228,13 @@ Mapping demo::udtf::DemoMappingUnion
230228
}
231229
)
232230

231+
233232
###Mapping
234233
Mapping demo::udtf::DemoMappingSelfJoin
235234
(
236235
*demo::udtf::Org::Person[p1]: Relational
237236
{
238-
~primaryKey
237+
~primaryKey
239238
(
240239
[demo::udtf::DemoDb]Org.ParentAndChildren.firstname
241240
)
@@ -256,6 +255,7 @@ Mapping demo::udtf::DemoMappingSelfJoin
256255
}
257256
)
258257

258+
259259
###Connection
260260
RelationalDatabaseConnection demo::udtf::DemoSnowflakeConnection
261261
{
@@ -293,6 +293,7 @@ Runtime demo::runtimes::DemoRuntime
293293
];
294294
}
295295

296+
296297
###Snowflake
297298
SnowflakeApp demo::udtf::snowflakeApp::App1
298299
{
@@ -301,4 +302,4 @@ SnowflakeApp demo::udtf::snowflakeApp::App1
301302
ownership : Deployment { identifier: '441143'};
302303
description : 'test App';
303304
activationConfiguration : demo::udtf::DemoSnowflakeConnection;
304-
}
305+
}

showcases/data/Store/Relational Store/Query/code.pure

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,7 @@ function showcase::northwind::store::functions::NorthwindExtendd(): Any[*]
607607
function showcase::simple::functions::simpleFunctionSort(): Any[*]
608608
{
609609
#>{showcase::simple::store::TestDatabase.TEST0}#->filter(
610-
c|!($c.FIRSTNAME == 'Doe')
610+
c|$c.FIRSTNAME != 'Doe'
611611
)->from(
612612
showcase::simple::connection::TestRuntime
613613
)->sort(
@@ -620,8 +620,8 @@ function showcase::simple::functions::simpleFunctionSort(): Any[*]
620620
function showcase::simple::functions::simpleTableFunctionFilter(): Any[*]
621621
{
622622
#>{showcase::simple::store::TestDatabase.TEST0}#->filter(
623-
c|!($c.FIRSTNAME == 'Doe') &&
624-
!($c.LASTNAME == 'Doe')
623+
c|($c.FIRSTNAME != 'Doe') &&
624+
($c.LASTNAME != 'Doe')
625625
)->from(
626626
showcase::simple::connection::TestRuntime
627627
)->sort(
@@ -634,7 +634,7 @@ function showcase::simple::functions::simpleTableFunctionFilter(): Any[*]
634634
function showcase::simple::functions::simpleTableFunctionGroup(): Any[*]
635635
{
636636
#>{showcase::simple::store::TestDatabase.TEST0}#->filter(
637-
c|!($c.FIRSTNAME == 'Doe')
637+
c|$c.FIRSTNAME != 'Doe'
638638
)->from(
639639
showcase::simple::connection::TestRuntime
640640
)->groupBy(
@@ -650,8 +650,8 @@ function showcase::simple::functions::simpleTableFunctionGroup(): Any[*]
650650
function showcase::simple::functions::simpleTableFunctionSlice(): Any[*]
651651
{
652652
#>{showcase::simple::store::TestDatabase.TEST0}#->filter(
653-
c|!($c.FIRSTNAME == 'Doe') &&
654-
!($c.LASTNAME == 'Doe')
653+
c|($c.FIRSTNAME != 'Doe') &&
654+
($c.LASTNAME != 'Doe')
655655
)->from(
656656
showcase::simple::connection::TestRuntime
657657
)

0 commit comments

Comments
 (0)