forked from shardus/relayer-collector
-
Notifications
You must be signed in to change notification settings - Fork 1
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
SHARD-1104 - Postgres DB support #17
Open
yaseen-oakrev
wants to merge
71
commits into
dev
Choose a base branch
from
pg-collector
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
71 commits
Select commit
Hold shift + click to select a range
e979002
added the pg package
yaseen-oakrev 995904f
added PG-related env variables to config
yaseen-oakrev 9323b59
created pgStorage file for abstracting PG db operations
yaseen-oakrev 7fcac00
pg package update restricted
yaseen-oakrev b95bdea
pg db usage is disabled by default
yaseen-oakrev 42ac829
corrected DB config options for PG
yaseen-oakrev be08d9e
changed to follow js convention
yaseen-oakrev a98a952
modified db initialisation for PG
yaseen-oakrev 49ed72c
changes for different query types
yaseen-oakrev 8990155
changes for different query types
yaseen-oakrev f203a42
changed db.run for account, accountEntry, accountHistoryState, block,…
shobhitic b577d57
converted db.run for originalTxData and receipt
shobhitic 2e90b01
changed db.run to use pg
yaseen-oakrev 03ebd52
letting pg automatically determine presence of conflict from the prei…
yaseen-oakrev 2be9d1e
db.get modifications for account.ts
yaseen-oakrev 813b5be
db.get method changes
yaseen-oakrev 3c81cf0
db.all pg-specific changes
yaseen-oakrev 12c82af
using the default db for any db namespace
yaseen-oakrev e38a826
added key to check if sqlite db is to be used
yaseen-oakrev 6338ce9
reverted sqlite check change
yaseen-oakrev cae8ffd
changes for the queries that were missed
yaseen-oakrev 984b7f7
mentioned the columns used as the primary key in conflict resolution
yaseen-oakrev d3f631c
converting postgres' bigint to js number using the pg library
yaseen-oakrev 0f33ddf
getting json data as string from pg to maintain parity with sqlite
yaseen-oakrev 265e93a
creating case-sensitive column names
yaseen-oakrev 722d6e2
using qoutes for postgresql case sensitive column names
shobhitic 706ab6b
using Number as the typeParser for BigInt since sqlite returns Number…
yaseen-oakrev fafc935
added transformation for the transaction model for analytics
yaseen-oakrev 224d298
fixed on conflict for analytics
shobhitic c402e71
added transform for cycle
shobhitic 71be9c9
added support for version and added analyticsCycle table creation sql…
yaseen-oakrev fd8d489
added more columns to add double-quotes to
yaseen-oakrev effc172
set version in correct table
shobhitic 508bd2c
changed table name
yaseen-oakrev 5058b1c
added transformations for account and transaction table
shobhitic ca2882a
completed analyticsCycle insertion
shobhitic 696d1ac
Merge remote-tracking branch 'origin/pg-collector' into pg-collector …
yaseen-oakrev 6f5d42c
added 4 way primary key for analyticsCycle table
shobhitic e6e63fc
using new primary key for analyticsCycle
shobhitic f5de027
changed analyticsCycle to be simple
shobhitic fa7dcd2
made the changes for transform transaction
shobhitic ebfbb44
changing endCycle and startCycle to activeStartCycle and activeEndCycle
shobhitic 0f3d470
fixed the transformation for edge cases
shobhitic 8b848da
using metadata to sequentially processing analytics cycle
shobhitic bceb6c3
added more checks to analytics data
shobhitic bcbc43f
adding index on timestamp on the transactions table
yaseen-oakrev 3be4751
Merge remote-tracking branch 'origin/pg-collector' into pg-collector
yaseen-oakrev d1476f5
using TIMESTAMPTZ for the timestamp column in the transactions table
yaseen-oakrev ac436f1
using TIMESTAMPTZ instead of bigint for timestamp for the accounts table
yaseen-oakrev c3c096b
changed updateAccount method to use timestamptz too
yaseen-oakrev 2779531
timestamptz changes to analycticsCycle table corrections elsewhere
yaseen-oakrev 6eecc04
Merge remote-tracking branch 'origin/dev' into pg-collector
yaseen-oakrev ed105dc
added new columns to fix casing
yaseen-oakrev e1b1de0
trying to fix github reviewer issue #1
shobhitic bc2f87a
trying to fix github reviewer issue #2
shobhitic b60069f
trying to fix github reviewer issue #3
shobhitic a630996
trying to fix github reviewer issue #4
shobhitic 6f6bafb
trying to fix github reviewer issue #5
shobhitic 0090f89
installed pg-format
shobhitic 5f5d8b2
github reviewer fix #1
shobhitic 38922e9
github reviewer fix #2
shobhitic 606a5e8
github reviewer fix #3
shobhitic 3b3b726
github reviewer fix #4
shobhitic 63337f0
github reviewer fix #5
shobhitic a8987b7
github reviewer fix #6
shobhitic 36ccd2d
testing whether numbers are fine for github reviewer
shobhitic 2643275
abstracted away db methods through the dbStorage.ts
yaseen-oakrev 434cdc2
default value for optional field
yaseen-oakrev 73d3dd4
Merge remote-tracking branch 'origin/pg-collector' into pg-collector
yaseen-oakrev 136e99e
Add nodeVersion to analyticsCycle table
tanuj-shardeum 21d1921
fix analyticscycle insert query (#23)
tanuj-shardeum File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 | ||||
---|---|---|---|---|---|---|
|
@@ -55,6 +55,8 @@ | |||||
"morgan": "1.9.1", | ||||||
"node-cron": "3.0.2", | ||||||
"nodemon": "^2.0.20", | ||||||
"pg": "8.12.0", | ||||||
"pg-format": "^1.0.4", | ||||||
"point-of-view": "4.6.0", | ||||||
"qs": "6.11.0", | ||||||
"socket.io": "4.7.1", | ||||||
|
@@ -76,6 +78,7 @@ | |||||
"@typescript-eslint/eslint-plugin": "5.60.1", | ||||||
"@typescript-eslint/parser": "5.60.1", | ||||||
"@typescript-eslint/typescript-estree": "5.61.0", | ||||||
"@types/pg-format": "^1.0.5", | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
"eslint": "8.44.0", | ||||||
"eslint-config-prettier": "8.8.0", | ||||||
"eslint-config-standard": "17.1.0", | ||||||
|
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please also commit necessary changes in package-lock.json