Skip to content

Commit

Permalink
Merge pull request #42 from kalaiyarasiganeshalingam/query
Browse files Browse the repository at this point in the history
Update the conversion error message
  • Loading branch information
daneshk committed Sep 6, 2023
2 parents 2ae8448 + ba4c64b commit 95eca2d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 0 additions & 4 deletions ballerina/Dependencies.toml
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,6 @@ dependencies = [
{org = "ballerina", name = "jballerina.java"},
{org = "ballerina", name = "lang.value"}
]
modules = [
{org = "ballerina", packageName = "io", moduleName = "io"}
]

[[package]]
org = "ballerina"
Expand Down Expand Up @@ -439,7 +436,6 @@ org = "ballerinax"
name = "persist.sql"
version = "1.2.0"
dependencies = [
{org = "ballerina", name = "io"},
{org = "ballerina", name = "jballerina.java"},
{org = "ballerina", name = "log"},
{org = "ballerina", name = "persist"},
Expand Down
8 changes: 6 additions & 2 deletions ballerina/stream_types.bal
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,12 @@ public class PersistSQLStream {
_ = value.remove(keyField);
}
}

record {|record {} value;|} nextRecord = {value: checkpanic value.cloneWithType(self.targetType)};
record {}|error result = value.cloneWithType(self.targetType);
if result is error {
return error persist:Error("Error occurred while converting to the record: " +
result.detail().toString());
}
record {|record {} value;|} nextRecord = {value: result};
return nextRecord;
}
} else {
Expand Down

0 comments on commit 95eca2d

Please sign in to comment.