OpenST / facilitator

Apache License 2.0
14 stars 12 forks source link

Implement stake requests model class #53

Closed deepesh-kn closed 5 years ago

deepesh-kn commented 5 years ago

Implement stake requests model class

Abstract the database interaction layer. (StakeRequestRepository, Query… etc remember the discussion)

pgev commented 5 years ago

In a draft PR (#66) DatabaseWrapper and StakeRequestRepository main classes are created.

DatabaseWrapper gives a promisified interface to sqlite3.Database object to ease usage of database operations. StakeRequestRepository enables to create a stake_requests table in the database, to create a new entry (stake request) and retrieve stake request by stake request' hash.

StakeRequestRepository class is covered by unit tests. DatabaseWrapper class does not have unit tests, however, functions are mostly tested through StakeRequestRepository unit test. We should think what kind of tests do we want for DatabaseWrapper class.

DatabaseWrapper is documented. StakeRequestRepository class is missing documentation.