-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change return type of query and handling of promises for json object
- Loading branch information
Showing
7 changed files
with
71 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
src/main/java/com/surrealdb/refactor/types/QueryBlockResult.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package com.surrealdb.refactor.types; | ||
|
||
import lombok.Getter; | ||
import lombok.ToString; | ||
|
||
import java.util.List; | ||
|
||
@ToString | ||
public class QueryBlockResult { | ||
private final List<QueryResult> result; | ||
|
||
public QueryBlockResult(List<QueryResult> result) { | ||
this.result = result; | ||
} | ||
|
||
/** | ||
* Get all the query results from the query | ||
* @return the result of each individual statement in a query block | ||
*/ | ||
public List<QueryResult> getResult() { | ||
return result; | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
src/main/java/com/surrealdb/refactor/types/QueryResult.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package com.surrealdb.refactor.types; | ||
|
||
import com.surrealdb.refactor.types.surrealdb.Value; | ||
import lombok.Getter; | ||
import lombok.ToString; | ||
|
||
import java.util.List; | ||
|
||
@Getter | ||
@ToString | ||
public class QueryResult { | ||
private final List<Value> result; | ||
private final String status; | ||
private final String time; | ||
|
||
public QueryResult(List<Value> result, String status, String time) { | ||
this.result = result; | ||
this.status = status; | ||
this.time = time; | ||
} | ||
} |