Skip to content

Commit

Permalink
Merge pull request #4 from kaneeldias/main
Browse files Browse the repository at this point in the history
Improve code coverage
  • Loading branch information
kaneeldias committed May 26, 2023
2 parents bdc109c + ebbd76e commit e6ffcb3
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 33 deletions.
19 changes: 0 additions & 19 deletions ballerina/in_memory_client.bal
Original file line number Diff line number Diff line change
Expand Up @@ -64,25 +64,6 @@ public isolated client class InMemoryClient {
}
}

public isolated function getKey(anydata|record {} 'object) returns anydata|record {} {
record {} keyRecord = {};

string[] keyFields = self.keyFields;

if keyFields.length() == 1 && 'object is record {} {
return 'object[keyFields[0]];
}

if 'object is record {} {
foreach string key in keyFields {
keyRecord[key] = 'object[key];
}
} else {
keyRecord[keyFields[0]] = 'object;
}
return keyRecord;
}

public isolated function getKeyFields() returns string[] {
return self.keyFields;
}
Expand Down
12 changes: 0 additions & 12 deletions ballerina/metadata_types.bal
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,3 @@ public type TableMetadata record {|
isolated function (anydata) returns record {}|persist:NotFoundError queryOne;
map<isolated function (record {}, string[]) returns record {}[]> associationsMethods = {};
|};

# Represents the type of the relation used in a `JOIN` operation.
# Only used by the generated persist clients and `persist:SQLClient`.
#
# + ONE_TO_ONE - The association type is a one-to-one association
# + ONE_TO_MANY - The entity is in the 'one' side of a one-to-many association
# + MANY_TO_ONE - The entity is in the 'many' side of a one-to-many association
public enum JoinType {
ONE_TO_ONE,
ONE_TO_MANY,
MANY_TO_ONE
}
1 change: 1 addition & 0 deletions ballerina/stream_types.bal
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
// under the License.

import ballerina/persist;

public class PersistInMemoryStream {

private stream<record {}, error?>? anydataStream;
Expand Down
2 changes: 0 additions & 2 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
ignore:
- "ballerina/googlesheets_client.bal"
coverage:
precision: 2
round: down
Expand Down

0 comments on commit e6ffcb3

Please sign in to comment.