Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implemented get_table_by_scope #10

Merged
merged 4 commits into from
May 3, 2021
Merged

Implemented get_table_by_scope #10

merged 4 commits into from
May 3, 2021

Conversation

aaroncox
Copy link
Member

No description provided.

@@ -370,3 +370,28 @@ export interface GetTableRowsResponse<Index = TableIndexType, Row = any> {
ram_payers?: Name[]
next_key?: Index
}

export interface GetTableByScopeParams<Index = TableIndexType | string> {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no index type or payer:

struct get_table_by_scope_params {
      name        code; // mandatory
      name        table; // optional, act as filter
      string      lower_bound; // lower bound of scope, optional
      string      upper_bound; // upper bound of scope, optional
      uint32_t    limit = 10;
      optional<bool>  reverse;
   };

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Struct.type('get_table_by_scope_response')
export class GetTableByScopeResponse extends Struct {
@Struct.field(GetTableByScopeResponseRow, {array: true}) rows!: GetTableByScopeResponseRow[]
@Struct.field('name') more!: Name
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

more is a string

   struct get_table_by_scope_result {
      vector<get_table_by_scope_result_row> rows;
      string      more; ///< fill lower_bound with this value to fetch more rows
   };

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is returning a name value, as in an account. Shouldn't we type that as a name?

@jdheeter
Copy link

jdheeter commented May 1, 2021

Any reason not to merge this?

@aaroncox aaroncox requested a review from jnordberg May 1, 2021 16:04
@aaroncox
Copy link
Member Author

aaroncox commented May 1, 2021

I had the changes Johan requested, but they weren't pushed up until now.

Copy link
Collaborator

@jnordberg jnordberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@jnordberg jnordberg merged commit 0472171 into master May 3, 2021
@jnordberg jnordberg deleted the get_table_by_scope branch May 3, 2021 22:56
@jnordberg
Copy link
Collaborator

Published as 0.4.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants