Use typeorm for accounts fetching#164
Conversation
|
Now this PR also addresses #157 |
8e7ef33 to
70b7934
Compare
Codecov Report
@@ Coverage Diff @@
## master #164 +/- ##
==========================================
+ Coverage 47.8% 48.32% +0.52%
==========================================
Files 121 120 -1
Lines 1910 1916 +6
Branches 231 230 -1
==========================================
+ Hits 913 926 +13
+ Misses 997 990 -7
Continue to review full report at Codecov.
|
3c4def2 to
bc4b513
Compare
nebolsin
left a comment
There was a problem hiding this comment.
Reviewed 35 of 35 files at r1.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @charlie-wasp)
tsconfig.json, line 21 at r1 (raw file):
"strictNullChecks": true, "strictFunctionTypes": true, "strictPropertyInitialization": false,
I think you can selectively opt-out from property initialization check:
"strict": true,
"strictPropertyInitialization": false
Btw, why do we want to skip this check?
charlie-wasp
left a comment
There was a problem hiding this comment.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @nebolsin)
tsconfig.json, line 21 at r1 (raw file):
Previously, nebolsin (Sergey Nebolsin) wrote…
I think you can selectively opt-out from property initialization check:
"strict": true, "strictPropertyInitialization": falseBtw, why do we want to skip this check?
We want it because typeorm entities declaration uses properties without initialization, so project can't be compiled with this option enabled
nebolsin
left a comment
There was a problem hiding this comment.
Reviewed 1 of 1 files at r2.
Reviewable status:complete! all files reviewed, all discussions resolved
tsconfig.json, line 21 at r1 (raw file):
Previously, charlie-wasp (Timur Ramazanov) wrote…
We want it because typeorm entities declaration uses properties without initialization, so project can't be compiled with this option enabled
Ok, although I think it could also be mitigated by defining TypeORM properties as <type> | undefined, which might be a better option. I’m fine with disabling the check for now, so it’s up to you.
68decc0 to
a33f247
Compare
a33f247 to
e3b7769
Compare
Big time! This PR makes use of the typeorm to simplify database related stuff. As a POC I used it only for accounts for now.
So far it seems that it can help us to reduce number of types (we won't need separate interface for table rows) and to retire
fromDbmethod from factories. Also we won't needsquealpackage for building queriesThis change is