Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Nuvindu Nirmana <[email protected]>
  • Loading branch information
daneshk and Nuvindu authored Oct 28, 2024
1 parent 63bd5ae commit 2cfaa58
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions ballerina/sql_client.bal
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ public isolated client class SQLClient {
// check if the fields are empty in the associated record.
map<anydata> nonEmptyAssocEntity = associatedEntity.filter(value => value != ());
// If the associated entity has non-empty fields, then the association is already verified.
if (nonEmptyAssocEntity.length() > 0) {
if nonEmptyAssocEntity.length() > 0 {
continue;
}

Expand All @@ -261,7 +261,7 @@ public isolated client class SQLClient {
break;
}
}
if (hasKeys) {
if hasKeys {
'object[joinMetadata.fieldName] = ();
continue;
}
Expand All @@ -275,7 +275,7 @@ public isolated client class SQLClient {
);
// execute the query and check the count of the associated entries
int count = check self.dbClient->queryRow(query);
if (count == 0) {
if count == 0 {
'object[joinMetadata.fieldName] = ();
}
}
Expand Down
2 changes: 1 addition & 1 deletion ballerina/tests/mssql_api_subscription_client.bal
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public isolated client class MsSqlApimClient {
public isolated function init() returns persist:Error? {
mssql:Client|error dbClient = new (host = mssql.host, user = mssql.user, password = mssql.password, database = mssql.database, port = mssql.port);
if dbClient is error {
return <persist:Error>error(dbClient.message());
return error persist:Error(dbClient.message());
}
self.dbClient = dbClient;
self.persistClients = {
Expand Down
2 changes: 1 addition & 1 deletion ballerina/tests/mysql_api_subscription_client.bal
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public isolated client class MySqlApimClient {
public isolated function init() returns persist:Error? {
mysql:Client|error dbClient = new (host = mysql.host, user = mysql.user, password = mysql.password, database = mysql.database, port = mysql.port);
if dbClient is error {
return <persist:Error>error(dbClient.message());
return error persist:Error(dbClient.message());
}
self.dbClient = dbClient;
self.persistClients = {
Expand Down

0 comments on commit 2cfaa58

Please sign in to comment.