Skip to content

Commit

Permalink
Clean the code
Browse files Browse the repository at this point in the history
  • Loading branch information
sahanHe committed May 25, 2023
1 parent 80f99ff commit a7db3fb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 86 deletions.
3 changes: 2 additions & 1 deletion ballerina/metadata_types.bal
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ import ballerina/persist;

# Represents the metadata of an entity.
#
# + keyFields - Array of strings containing key field names
# + query - Function pointer to query records as a stream
# + queryOne - Function pointer for query by key
# + associationMethods - Map of associated query function pointers
# + associationsMethods - Map of associated query function pointers
public type TableMetadata record {|
string[] keyFields;
isolated function (string[]) returns stream<record {}, persist:Error?> query;
Expand Down
83 changes: 0 additions & 83 deletions ballerina/tests/init-tests.bal
Original file line number Diff line number Diff line change
Expand Up @@ -220,48 +220,6 @@ public type AllTypesDependent record {|
time:Civil? civilTypeOptional;
|};

OrderItemExtended orderItemExtended1 = {
orderId: "order-1",
itemId: "item-1",
CustomerId: 1,
paid: false,
ammountPaid: 10.5f,
ammountPaidDecimal: 10.5,
arivalTimeCivil: {"utcOffset":{"hours":5,"minutes":30},"timeAbbrev":"Asia/Colombo","dayOfWeek":1,"year":2021,"month":4,"day":12,"hour":23,"minute":20,"second":50.52},
arivalTimeUtc: [1684493685, 0.998012000],
arivalTimeDate: {year: 2021, month: 4, day: 12},
arivalTimeTimeOfDay: {hour: 17, minute: 50, second: 50.52},
orderType: INSTORE
};

OrderItemExtended orderItemExtendedRetrieved = {
orderId: "order-1",
itemId: "item-1",
CustomerId: 1,
paid: false,
ammountPaid: 10.5f,
ammountPaidDecimal: 10.5,
arivalTimeCivil: {"timeAbbrev":"Z","dayOfWeek":1 ,"year":2021,"month":4,"day":12,"hour":17,"minute":50,"second":50.52},
arivalTimeUtc: [1684493685, 0.998012000],
arivalTimeDate: {year: 2021, month: 4, day: 12},
arivalTimeTimeOfDay: {hour: 17, minute: 50, second: 50.52},
orderType: INSTORE
};

OrderItemExtended orderItemExtended2 = {
orderId: "order-2",
itemId: "item-2",
CustomerId: 1,
paid: false,
ammountPaid: 10.5f,
ammountPaidDecimal: 10.5,
arivalTimeCivil: {"utcOffset":{"hours":5,"minutes":30},"timeAbbrev":"Asia/Colombo","dayOfWeek":1 ,"year":2024,"month":4,"day":12,"hour":17,"minute":50,"second":50.52},
arivalTimeUtc: [1684493685, 0.998012000],
arivalTimeDate: {year: 2021, month: 4, day: 12},
arivalTimeTimeOfDay: {hour: 17, minute: 50, second: 50.52},
orderType: ONLINE
};

public type EmployeeInfo record {|
string firstName;
string lastName;
Expand All @@ -271,47 +229,6 @@ public type EmployeeInfo record {|
Workspace workspace;
|};

OrderItemExtended orderItemExtended2Retrieved = {
orderId: "order-2",
itemId: "item-2",
CustomerId: 1,
paid: false,
ammountPaid: 10.5f,
ammountPaidDecimal: 10.5,
arivalTimeCivil: {"timeAbbrev":"Z","dayOfWeek":5 ,"year":2024,"month":4,"day":12,"hour":12,"minute":20,"second":50.52},
arivalTimeUtc: [1684493685, 0.998012000],
arivalTimeDate: {year: 2021, month: 4, day: 12},
arivalTimeTimeOfDay: {hour: 17, minute: 50, second: 50.52},
orderType: ONLINE
};

OrderItemExtended orderItemExtended3 = {
orderId: "order-3",
itemId: "item-3",
CustomerId: 4,
paid: true,
ammountPaid: 20.5f,
ammountPaidDecimal: 20.5,
arivalTimeCivil: {"utcOffset":{"hours":5,"minutes":30},"timeAbbrev":"Asia/Colombo","dayOfWeek":1,"year":2021,"month":4,"day":12,"hour":23,"minute":20,"second":50.52},
arivalTimeUtc: [1684493685, 0.998012000],
arivalTimeDate: {year: 2021, month: 4, day: 12},
arivalTimeTimeOfDay: {hour: 17, minute: 50, second: 50.52},
orderType: INSTORE
};

OrderItemExtended orderItemExtended3Retrieved = {
orderId: "order-2",
itemId: "item-2",
CustomerId: 1,
paid: true,
ammountPaid: 10.5f,
ammountPaidDecimal: 10.5,
arivalTimeCivil: {"timeAbbrev":"Z","dayOfWeek":1 ,"year":2021,"month":4,"day":12,"hour":17,"minute":50,"second":50.52},
arivalTimeUtc: [1684493685, 0.998012000],
arivalTimeDate: {year: 2021, month: 4, day: 12},
arivalTimeTimeOfDay: {hour: 17, minute: 50, second: 50.52},
orderType: ONLINE
};

public type DepartmentInfo record {|
string deptNo;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* Copyright (c) 2023, WSO2 LLC. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. licenses this file to you under the Apache License,
* WSO2 LLC. licenses this file to you 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
Expand Down

0 comments on commit a7db3fb

Please sign in to comment.