diff --git a/ballerina/sql_client.bal b/ballerina/sql_client.bal index e7d12ed..57474f4 100644 --- a/ballerina/sql_client.bal +++ b/ballerina/sql_client.bal @@ -249,7 +249,7 @@ public isolated client class SQLClient { // check if the fields are empty in the associated record. map 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; } @@ -261,7 +261,7 @@ public isolated client class SQLClient { break; } } - if (hasKeys) { + if hasKeys { 'object[joinMetadata.fieldName] = (); continue; } @@ -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] = (); } } diff --git a/ballerina/tests/mssql_api_subscription_client.bal b/ballerina/tests/mssql_api_subscription_client.bal index f799693..b16d2ab 100644 --- a/ballerina/tests/mssql_api_subscription_client.bal +++ b/ballerina/tests/mssql_api_subscription_client.bal @@ -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 error(dbClient.message()); + return error persist:Error(dbClient.message()); } self.dbClient = dbClient; self.persistClients = { diff --git a/ballerina/tests/mysql_api_subscription_client.bal b/ballerina/tests/mysql_api_subscription_client.bal index 6cbf5a7..0793ecc 100644 --- a/ballerina/tests/mysql_api_subscription_client.bal +++ b/ballerina/tests/mysql_api_subscription_client.bal @@ -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 error(dbClient.message()); + return error persist:Error(dbClient.message()); } self.dbClient = dbClient; self.persistClients = {