Skip to content

Commit

Permalink
Merge pull request #8 from RelationalAI/hnr-results-format
Browse files Browse the repository at this point in the history
v2 predefined results formats
  • Loading branch information
NRHelmi authored Apr 27, 2022
2 parents f175c5f + 676bcd3 commit e8d9bd0
Show file tree
Hide file tree
Showing 21 changed files with 649 additions and 187 deletions.
14 changes: 10 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@

## main
* Added v2 predefined results formats:

- `getTransactions` returns `TransactionsAsyncMultipleResponses`.
- `getTransaction` returns `TransactionAsyncSingleResponse`.
- `getTransactionResults` returns `List<ArrowRelation>`.
- `getTransactionMetadata` returns `List<TransactionAsyncMetadataResponse>`.
- `getTransactionProblems` returns `List<ClientProblem|IntegrityConstraintViolation>`.
- `executeAsync` returns `TransactionAsyncResult`.

## v0.1.0-alpha
* Added support to the asynchronous protocol including:
- `executeAsync`: runs an asynchronous request.
- `executeAsyncWait`: runs an asynchronous request and wait of its completion.
Expand All @@ -9,6 +18,3 @@
- `getTransactionMetadata`: gets transaction metadata.
- `getTransactionProblems`: gets transaction execution problems.
* Added `ExecuteAsyncTest` test class

## v0.0.1
* initial release
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ In order to use the `rai-sdk-java`, you need add this dependency to your project
<dependency>
<groupId>com.relationalai</groupId>
<artifactId>rai-sdk</artifactId>
<version>0.1.0-alpha</version>
<version>0.2.0-alpha</version>
</dependency>

You need also to point maven to the SDK GitHub packages repository in the project's POM:
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<description>The RelationalAI Software Development Kit (SDK) for Java</description>
<groupId>com.relationalai</groupId>
<artifactId>rai-sdk-pom</artifactId>
<version>0.1.0-alpha</version>
<version>0.2.0-alpha</version>
<packaging>pom</packaging>
<url></url>

Expand Down
2 changes: 1 addition & 1 deletion rai-sdk-examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<groupId>com.relationalai</groupId>
<artifactId>rai-sdk-pom</artifactId>
<version>0.1.0-alpha</version>
<version>0.2.0-alpha</version>
</parent>

<name>RelationalAI SDK for Java Examples</name>
Expand Down
2 changes: 1 addition & 1 deletion rai-sdk/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<groupId>com.relationalai</groupId>
<artifactId>rai-sdk-pom</artifactId>
<version>0.1.0-alpha</version>
<version>0.2.0-alpha</version>
</parent>

<name>RelationalAI SDK for Java Package</name>
Expand Down
27 changes: 27 additions & 0 deletions rai-sdk/src/main/java/com/relationalai/ArrowRelation.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package com.relationalai;

import java.util.List;

public class ArrowRelation extends Entity {
String relationId;
List<Object> table;

public ArrowRelation(String relationId, List<Object> table) {
this.relationId = relationId;
this.table = table;
}

@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}

if (!(o instanceof ArrowRelation)) {
return false;
}
var that = (ArrowRelation) o;

return this.relationId.equals(that.relationId) && this.table.equals(that.table);
}
}
Loading

0 comments on commit e8d9bd0

Please sign in to comment.