Skip to content

Commit

Permalink
Merge pull request #326 from daneshk/main
Browse files Browse the repository at this point in the history
Fix failing testcases due to language issue
  • Loading branch information
daneshk authored Feb 12, 2024
2 parents d226983 + 03448a0 commit 2d55dd9
Show file tree
Hide file tree
Showing 51 changed files with 533 additions and 538 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ mySqlDriverVersion=8.0.29
mssqlDriverVersion=11.2.3.jre17
postgresqlDriverVersion=42.6.0

ballerinaLangVersion=2201.8.3
ballerinaLangVersion=2201.9.0-20240208-103300-0823dc95

# Level 01
stdlibIoVersion=1.6.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public isolated client class Client {
private final map<psql:SQLClient> persistClients;

private final record {|psql:SQLMetadata...;|} & readonly metadata = {
[EMPLOYEE] : {
[EMPLOYEE]: {
entityName: "Employee",
tableName: "Employee",
fieldMetadata: {
Expand All @@ -45,7 +45,7 @@ public isolated client class Client {
workspace: {entity: Workspace, fieldName: "workspace", refTable: "Workspace", refColumns: ["workspaceEmpNo"], joinColumns: ["empNo"], 'type: psql:ONE_TO_ONE}
}
},
[WORKSPACE] : {
[WORKSPACE]: {
entityName: "Workspace",
tableName: "Workspace",
fieldMetadata: {
Expand All @@ -72,7 +72,7 @@ public isolated client class Client {
employee: {entity: Employee, fieldName: "employee", refTable: "Employee", refColumns: ["empNo"], joinColumns: ["workspaceEmpNo"], 'type: psql:ONE_TO_ONE}
}
},
[BUILDING] : {
[BUILDING]: {
entityName: "Building",
tableName: "Building",
fieldMetadata: {
Expand All @@ -89,7 +89,7 @@ public isolated client class Client {
keyFields: ["buildingCode"],
joinMetadata: {workspaces: {entity: Workspace, fieldName: "workspaces", refTable: "Workspace", refColumns: ["locationBuildingCode"], joinColumns: ["buildingCode"], 'type: psql:MANY_TO_ONE}}
},
[DEPARTMENT] : {
[DEPARTMENT]: {
entityName: "Department",
tableName: "Department",
fieldMetadata: {
Expand All @@ -115,10 +115,10 @@ public isolated client class Client {
}
self.dbClient = dbClient;
self.persistClients = {
[EMPLOYEE] : check new (dbClient, self.metadata.get(EMPLOYEE), psql:MYSQL_SPECIFICS),
[WORKSPACE] : check new (dbClient, self.metadata.get(WORKSPACE), psql:MYSQL_SPECIFICS),
[BUILDING] : check new (dbClient, self.metadata.get(BUILDING), psql:MYSQL_SPECIFICS),
[DEPARTMENT] : check new (dbClient, self.metadata.get(DEPARTMENT), psql:MYSQL_SPECIFICS)
[EMPLOYEE]: check new (dbClient, self.metadata.get(EMPLOYEE), psql:MYSQL_SPECIFICS),
[WORKSPACE]: check new (dbClient, self.metadata.get(WORKSPACE), psql:MYSQL_SPECIFICS),
[BUILDING]: check new (dbClient, self.metadata.get(BUILDING), psql:MYSQL_SPECIFICS),
[DEPARTMENT]: check new (dbClient, self.metadata.get(DEPARTMENT), psql:MYSQL_SPECIFICS)
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public isolated client class Client {
private final map<psql:SQLClient> persistClients;

private final record {|psql:SQLMetadata...;|} & readonly metadata = {
[MEDICAL_NEED] : {
[MEDICAL_NEED]: {
entityName: "MedicalNeed",
tableName: "MedicalNeed",
fieldMetadata: {
Expand All @@ -39,7 +39,7 @@ public isolated client class Client {
return <persist:Error>error(dbClient.message());
}
self.dbClient = dbClient;
self.persistClients = {[MEDICAL_NEED] : check new (dbClient, self.metadata.get(MEDICAL_NEED), psql:MYSQL_SPECIFICS)};
self.persistClients = {[MEDICAL_NEED]: check new (dbClient, self.metadata.get(MEDICAL_NEED), psql:MYSQL_SPECIFICS)};
}

isolated resource function get medicalneeds(MedicalNeedTargetType targetType = <>, sql:ParameterizedQuery whereClause = ``, sql:ParameterizedQuery orderByClause = ``, sql:ParameterizedQuery limitClause = ``, sql:ParameterizedQuery groupByClause = ``) returns stream<targetType, persist:Error?> = @java:Method {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public isolated client class Client {
private final map<psql:SQLClient> persistClients;

private final record {|psql:SQLMetadata...;|} & readonly metadata = {
[PROFILE] : {
[PROFILE]: {
entityName: "Profile",
tableName: "Profile",
fieldMetadata: {
Expand All @@ -40,7 +40,7 @@ public isolated client class Client {
multipleAssociations: {entity: MultipleAssociations, fieldName: "multipleAssociations", refTable: "MultipleAssociations", refColumns: ["id"], joinColumns: ["multipleassociationsId"], 'type: psql:ONE_TO_ONE}
}
},
[USER] : {
[USER]: {
entityName: "User",
tableName: "User",
fieldMetadata: {
Expand All @@ -60,7 +60,7 @@ public isolated client class Client {
multipleAssociations: {entity: MultipleAssociations, fieldName: "multipleAssociations", refTable: "MultipleAssociations", refColumns: ["id"], joinColumns: ["multipleassociationsId"], 'type: psql:ONE_TO_ONE}
}
},
[MULTIPLE_ASSOCIATIONS] : {
[MULTIPLE_ASSOCIATIONS]: {
entityName: "MultipleAssociations",
tableName: "MultipleAssociations",
fieldMetadata: {
Expand Down Expand Up @@ -89,9 +89,9 @@ public isolated client class Client {
}
self.dbClient = dbClient;
self.persistClients = {
[PROFILE] : check new (dbClient, self.metadata.get(PROFILE), psql:MYSQL_SPECIFICS),
[USER] : check new (dbClient, self.metadata.get(USER), psql:MYSQL_SPECIFICS),
[MULTIPLE_ASSOCIATIONS] : check new (dbClient, self.metadata.get(MULTIPLE_ASSOCIATIONS), psql:MYSQL_SPECIFICS)
[PROFILE]: check new (dbClient, self.metadata.get(PROFILE), psql:MYSQL_SPECIFICS),
[USER]: check new (dbClient, self.metadata.get(USER), psql:MYSQL_SPECIFICS),
[MULTIPLE_ASSOCIATIONS]: check new (dbClient, self.metadata.get(MULTIPLE_ASSOCIATIONS), psql:MYSQL_SPECIFICS)
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public isolated client class Client {
private final map<psql:SQLClient> persistClients;

private final record {|psql:SQLMetadata...;|} & readonly metadata = {
[COMPANY] : {
[COMPANY]: {
entityName: "Company",
tableName: "Company",
fieldMetadata: {
Expand All @@ -32,7 +32,7 @@ public isolated client class Client {
keyFields: ["id"],
joinMetadata: {employees: {entity: Employee, fieldName: "employees", refTable: "Employee", refColumns: ["companyId"], joinColumns: ["id"], 'type: psql:MANY_TO_ONE}}
},
[EMPLOYEE] : {
[EMPLOYEE]: {
entityName: "Employee",
tableName: "Employee",
fieldMetadata: {
Expand All @@ -54,8 +54,8 @@ public isolated client class Client {
}
self.dbClient = dbClient;
self.persistClients = {
[COMPANY] : check new (dbClient, self.metadata.get(COMPANY), psql:MYSQL_SPECIFICS),
[EMPLOYEE] : check new (dbClient, self.metadata.get(EMPLOYEE), psql:MYSQL_SPECIFICS)
[COMPANY]: check new (dbClient, self.metadata.get(COMPANY), psql:MYSQL_SPECIFICS),
[EMPLOYEE]: check new (dbClient, self.metadata.get(EMPLOYEE), psql:MYSQL_SPECIFICS)
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public isolated client class Client {
private final map<psql:SQLClient> persistClients;

private final record {|psql:SQLMetadata...;|} & readonly metadata = {
[COMPANY] : {
[COMPANY]: {
entityName: "Company",
tableName: "Company",
fieldMetadata: {
Expand All @@ -33,7 +33,7 @@ public isolated client class Client {
keyFields: ["id"],
joinMetadata: {employee: {entity: Employee, fieldName: "employee", refTable: "Employee", refColumns: ["companyId"], joinColumns: ["id"], 'type: psql:MANY_TO_ONE}}
},
[EMPLOYEE] : {
[EMPLOYEE]: {
entityName: "Employee",
tableName: "Employee",
fieldMetadata: {
Expand All @@ -52,7 +52,7 @@ public isolated client class Client {
vehicles: {entity: Vehicle, fieldName: "vehicles", refTable: "Vehicle", refColumns: ["employeeId"], joinColumns: ["id"], 'type: psql:MANY_TO_ONE}
}
},
[VEHICLE] : {
[VEHICLE]: {
entityName: "Vehicle",
tableName: "Vehicle",
fieldMetadata: {
Expand All @@ -75,9 +75,9 @@ public isolated client class Client {
}
self.dbClient = dbClient;
self.persistClients = {
[COMPANY] : check new (dbClient, self.metadata.get(COMPANY), psql:MYSQL_SPECIFICS),
[EMPLOYEE] : check new (dbClient, self.metadata.get(EMPLOYEE), psql:MYSQL_SPECIFICS),
[VEHICLE] : check new (dbClient, self.metadata.get(VEHICLE), psql:MYSQL_SPECIFICS)
[COMPANY]: check new (dbClient, self.metadata.get(COMPANY), psql:MYSQL_SPECIFICS),
[EMPLOYEE]: check new (dbClient, self.metadata.get(EMPLOYEE), psql:MYSQL_SPECIFICS),
[VEHICLE]: check new (dbClient, self.metadata.get(VEHICLE), psql:MYSQL_SPECIFICS)
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public isolated client class Client {
private final map<psql:SQLClient> persistClients;

private final record {|psql:SQLMetadata...;|} & readonly metadata = {
[MEDICAL_NEED] : {
[MEDICAL_NEED]: {
entityName: "MedicalNeed",
tableName: "MedicalNeed",
fieldMetadata: {
Expand All @@ -32,7 +32,7 @@ public isolated client class Client {
},
keyFields: ["needId"]
},
[MEDICAL_ITEM] : {
[MEDICAL_ITEM]: {
entityName: "MedicalItem",
tableName: "MedicalItem",
fieldMetadata: {
Expand All @@ -52,8 +52,8 @@ public isolated client class Client {
}
self.dbClient = dbClient;
self.persistClients = {
[MEDICAL_NEED] : check new (dbClient, self.metadata.get(MEDICAL_NEED), psql:MYSQL_SPECIFICS),
[MEDICAL_ITEM] : check new (dbClient, self.metadata.get(MEDICAL_ITEM), psql:MYSQL_SPECIFICS)
[MEDICAL_NEED]: check new (dbClient, self.metadata.get(MEDICAL_NEED), psql:MYSQL_SPECIFICS),
[MEDICAL_ITEM]: check new (dbClient, self.metadata.get(MEDICAL_ITEM), psql:MYSQL_SPECIFICS)
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public isolated client class Client {
private final map<psql:SQLClient> persistClients;

private final record {|psql:SQLMetadata...;|} & readonly metadata = {
[MEDICAL_NEED] : {
[MEDICAL_NEED]: {
entityName: "MedicalNeed",
tableName: "MedicalNeed",
fieldMetadata: {
Expand All @@ -37,7 +37,7 @@ public isolated client class Client {
keyFields: ["record"],
joinMetadata: {item: {entity: MedicalItem, fieldName: "item", refTable: "MedicalItem", refColumns: ["itemId"], joinColumns: ["itemItemId"], 'type: psql:ONE_TO_ONE}}
},
[MEDICAL_ITEM] : {
[MEDICAL_ITEM]: {
entityName: "MedicalItem",
tableName: "MedicalItem",
fieldMetadata: {
Expand All @@ -64,8 +64,8 @@ public isolated client class Client {
}
self.dbClient = dbClient;
self.persistClients = {
[MEDICAL_NEED] : check new (dbClient, self.metadata.get(MEDICAL_NEED), psql:MYSQL_SPECIFICS),
[MEDICAL_ITEM] : check new (dbClient, self.metadata.get(MEDICAL_ITEM), psql:MYSQL_SPECIFICS)
[MEDICAL_NEED]: check new (dbClient, self.metadata.get(MEDICAL_NEED), psql:MYSQL_SPECIFICS),
[MEDICAL_ITEM]: check new (dbClient, self.metadata.get(MEDICAL_ITEM), psql:MYSQL_SPECIFICS)
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public isolated client class Client {
private final map<psql:SQLClient> persistClients;

private final record {|psql:SQLMetadata...;|} & readonly metadata = {
[BYTE_TEST] : {
[BYTE_TEST]: {
entityName: "ByteTest",
tableName: "ByteTest",
fieldMetadata: {
Expand All @@ -36,7 +36,7 @@ public isolated client class Client {
return <persist:Error>error(dbClient.message());
}
self.dbClient = dbClient;
self.persistClients = {[BYTE_TEST] : check new (dbClient, self.metadata.get(BYTE_TEST), psql:MYSQL_SPECIFICS)};
self.persistClients = {[BYTE_TEST]: check new (dbClient, self.metadata.get(BYTE_TEST), psql:MYSQL_SPECIFICS)};
}

isolated resource function get bytetests(ByteTestTargetType targetType = <>, sql:ParameterizedQuery whereClause = ``, sql:ParameterizedQuery orderByClause = ``, sql:ParameterizedQuery limitClause = ``, sql:ParameterizedQuery groupByClause = ``) returns stream<targetType, persist:Error?> = @java:Method {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public isolated client class Client {
private final map<psql:SQLClient> persistClients;

private final record {|psql:SQLMetadata...;|} & readonly metadata = {
[COMPANY] : {
[COMPANY]: {
entityName: "Company",
tableName: "Company",
fieldMetadata: {
Expand All @@ -33,7 +33,7 @@ public isolated client class Client {
keyFields: ["id"],
joinMetadata: {employee: {entity: Employee, fieldName: "employee", refTable: "Employee", refColumns: ["companyId"], joinColumns: ["id"], 'type: psql:MANY_TO_ONE}}
},
[EMPLOYEE] : {
[EMPLOYEE]: {
entityName: "Employee",
tableName: "Employee",
fieldMetadata: {
Expand All @@ -52,7 +52,7 @@ public isolated client class Client {
vehicles: {entity: Vehicle, fieldName: "vehicles", refTable: "Vehicle", refColumns: ["employeeId"], joinColumns: ["id"], 'type: psql:MANY_TO_ONE}
}
},
[VEHICLE] : {
[VEHICLE]: {
entityName: "Vehicle",
tableName: "Vehicle",
fieldMetadata: {
Expand All @@ -75,9 +75,9 @@ public isolated client class Client {
}
self.dbClient = dbClient;
self.persistClients = {
[COMPANY] : check new (dbClient, self.metadata.get(COMPANY), psql:MYSQL_SPECIFICS),
[EMPLOYEE] : check new (dbClient, self.metadata.get(EMPLOYEE), psql:MYSQL_SPECIFICS),
[VEHICLE] : check new (dbClient, self.metadata.get(VEHICLE), psql:MYSQL_SPECIFICS)
[COMPANY]: check new (dbClient, self.metadata.get(COMPANY), psql:MYSQL_SPECIFICS),
[EMPLOYEE]: check new (dbClient, self.metadata.get(EMPLOYEE), psql:MYSQL_SPECIFICS),
[VEHICLE]: check new (dbClient, self.metadata.get(VEHICLE), psql:MYSQL_SPECIFICS)
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public isolated client class Client {
private final map<psql:SQLClient> persistClients;

private final record {|psql:SQLMetadata...;|} & readonly metadata = {
[PROFILE] : {
[PROFILE]: {
entityName: "Profile",
tableName: "Profile",
fieldMetadata: {
Expand All @@ -40,7 +40,7 @@ public isolated client class Client {
multipleAssociations: {entity: MultipleAssociations, fieldName: "multipleAssociations", refTable: "MultipleAssociations", refColumns: ["id"], joinColumns: ["multipleassociationsId"], 'type: psql:ONE_TO_ONE}
}
},
[USER] : {
[USER]: {
entityName: "User",
tableName: "User",
fieldMetadata: {
Expand All @@ -60,7 +60,7 @@ public isolated client class Client {
multipleAssociations: {entity: MultipleAssociations, fieldName: "multipleAssociations", refTable: "MultipleAssociations", refColumns: ["id"], joinColumns: ["multipleassociationsId"], 'type: psql:ONE_TO_ONE}
}
},
[MULTIPLE_ASSOCIATIONS] : {
[MULTIPLE_ASSOCIATIONS]: {
entityName: "MultipleAssociations",
tableName: "MultipleAssociations",
fieldMetadata: {
Expand Down Expand Up @@ -89,9 +89,9 @@ public isolated client class Client {
}
self.dbClient = dbClient;
self.persistClients = {
[PROFILE] : check new (dbClient, self.metadata.get(PROFILE), psql:MYSQL_SPECIFICS),
[USER] : check new (dbClient, self.metadata.get(USER), psql:MYSQL_SPECIFICS),
[MULTIPLE_ASSOCIATIONS] : check new (dbClient, self.metadata.get(MULTIPLE_ASSOCIATIONS), psql:MYSQL_SPECIFICS)
[PROFILE]: check new (dbClient, self.metadata.get(PROFILE), psql:MYSQL_SPECIFICS),
[USER]: check new (dbClient, self.metadata.get(USER), psql:MYSQL_SPECIFICS),
[MULTIPLE_ASSOCIATIONS]: check new (dbClient, self.metadata.get(MULTIPLE_ASSOCIATIONS), psql:MYSQL_SPECIFICS)
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public isolated client class Client {
private final map<psql:SQLClient> persistClients;

private final record {|psql:SQLMetadata...;|} & readonly metadata = {
[COMPANY] : {
[COMPANY]: {
entityName: "Company",
tableName: "Company",
fieldMetadata: {
Expand All @@ -32,7 +32,7 @@ public isolated client class Client {
keyFields: ["id"],
joinMetadata: {employees: {entity: Employee, fieldName: "employees", refTable: "Employee", refColumns: ["companyId"], joinColumns: ["id"], 'type: psql:MANY_TO_ONE}}
},
[EMPLOYEE] : {
[EMPLOYEE]: {
entityName: "Employee",
tableName: "Employee",
fieldMetadata: {
Expand All @@ -54,8 +54,8 @@ public isolated client class Client {
}
self.dbClient = dbClient;
self.persistClients = {
[COMPANY] : check new (dbClient, self.metadata.get(COMPANY), psql:MYSQL_SPECIFICS),
[EMPLOYEE] : check new (dbClient, self.metadata.get(EMPLOYEE), psql:MYSQL_SPECIFICS)
[COMPANY]: check new (dbClient, self.metadata.get(COMPANY), psql:MYSQL_SPECIFICS),
[EMPLOYEE]: check new (dbClient, self.metadata.get(EMPLOYEE), psql:MYSQL_SPECIFICS)
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public isolated client class Client {
private final map<psql:SQLClient> persistClients;

private final record {|psql:SQLMetadata...;|} & readonly metadata = {
[MEDICAL_NEED] : {
[MEDICAL_NEED]: {
entityName: "MedicalNeed",
tableName: "MedicalNeed",
fieldMetadata: {
Expand All @@ -39,7 +39,7 @@ public isolated client class Client {
return <persist:Error>error(dbClient.message());
}
self.dbClient = dbClient;
self.persistClients = {[MEDICAL_NEED] : check new (dbClient, self.metadata.get(MEDICAL_NEED), psql:MYSQL_SPECIFICS)};
self.persistClients = {[MEDICAL_NEED]: check new (dbClient, self.metadata.get(MEDICAL_NEED), psql:MYSQL_SPECIFICS)};
}

isolated resource function get medicalneeds(MedicalNeedTargetType targetType = <>, sql:ParameterizedQuery whereClause = ``, sql:ParameterizedQuery orderByClause = ``, sql:ParameterizedQuery limitClause = ``, sql:ParameterizedQuery groupByClause = ``) returns stream<targetType, persist:Error?> = @java:Method {
Expand Down
Loading

0 comments on commit 2d55dd9

Please sign in to comment.