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

Database_api code refactory #1891

Merged
merged 6 commits into from Aug 15, 2019

Conversation

@abitmore
Copy link
Member

commented Aug 9, 2019

Changes:

  • Rename full_account.hpp to api_objects.hpp
  • Move API-relate objects from database_api.* into api_objects.*
  • Move a util functions price_to_string() from database_api.* to util.*
  • Create database_api_imp.hxx and move definition of database_api_impl class into it
  • Move code around
  • Wrap long lines

Putting this in 3.3 release so far, please feel free to move out if it's not appropriate.

@abitmore abitmore added this to the 3.3.0 - Feature Release milestone Aug 9, 2019

@abitmore abitmore added this to In development in Feature Release (3.3.0) via automation Aug 9, 2019

@oxarbitrage

This comment has been minimized.

Copy link
Member

commented Aug 9, 2019

Nice stuff, in the right direction.

For continuation in new lines of functions with arguments i personally prefer to use double indentation(6 spaces in our codebase) as sometimes the namespace, type, name, etc can be so long that you will have little space to place the arguments if you place them one below the other aligned. I see you applied some of that in some cases(where you didn't had another option) with more than 6 spaces. 6 spaces will kind of work always, if more then 2 lines are needed i do something like:

vector<operation_history_object> elasticsearch_plugin::get_account_history(
const account_id_type account_id,
operation_history_id_type stop = operation_history_id_type(),
unsigned limit = 100,
operation_history_id_type start = operation_history_id_type())

@abitmore abitmore referenced this pull request Aug 9, 2019
1 of 17 tasks complete

@abitmore abitmore changed the base branch from pr-1819-subscription to develop Aug 14, 2019

@abitmore abitmore force-pushed the pr-database-api-code-refactory branch from c7d657a to fa42e70 Aug 14, 2019

@abitmore

This comment has been minimized.

Copy link
Member Author

commented Aug 14, 2019

Rebased to latest develop branch.

@oxarbitrage oxarbitrage self-requested a review Aug 14, 2019

libraries/app/api_objects.cpp Outdated Show resolved Hide resolved
libraries/app/database_api.cpp Outdated Show resolved Hide resolved
libraries/app/database_api.cpp Show resolved Hide resolved
libraries/app/database_api.cpp Outdated Show resolved Hide resolved
libraries/app/database_api_impl.hxx Outdated Show resolved Hide resolved

@abitmore abitmore force-pushed the pr-database-api-code-refactory branch from 98de678 to d51305c Aug 15, 2019

@abitmore

This comment has been minimized.

Copy link
Member Author

commented Aug 15, 2019

Updated text about copyright and force-pushed to avoid having confusing copyright changes in history.

Updated includes, built fine with GCC5.4 in Ubuntu 16.04, not sure whether there would be issue on other platforms.

@abitmore abitmore force-pushed the pr-database-api-code-refactory branch from d51305c to 62fc622 Aug 15, 2019

Feature Release (3.3.0) automation moved this from In development to In testing Aug 15, 2019

@oxarbitrage oxarbitrage merged commit 34509f8 into develop Aug 15, 2019

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

Feature Release (3.3.0) automation moved this from In testing to Done Aug 15, 2019

@abitmore abitmore referenced this pull request Aug 15, 2019

@abitmore abitmore deleted the pr-database-api-code-refactory branch Aug 15, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
3 participants
You can’t perform that action at this time.