-
-
Notifications
You must be signed in to change notification settings - Fork 359
Feature: Add support for postgres #2230
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
Conversation
|
You need to use the migration tool c9s/rockhopper and make sure this PR works well with rockhopper |
|
Also, could you please split the changes like fixes should be in another PR For supporting postgresql, it could be incremental backward compatible changes in multiple PRs, it doesn't have to be in one large PR |
For creating go code from the migrations, I used |
I have reverted the fixes. |
|
Thanks for your pull request, but CI build failed, could you please check? thanks Upgrading Go is acceptable, but you need to split the PRs and each one should focus on its topic for example, this commit 7bdeebb is not related to postgres. since this project is used by many companies on production, we would prefer low impact PR comes first. |
30cfd50 to
af7eb75
Compare
even if uncover position is dust or zero, we might still have covered position to be processed, things like canceling order and returning the pending position for the next round
- Introduced a `dialect` field in service structs (DepositService, OrderService, RewardService, TradeService, WithdrawService) to handle database-specific SQL generation. - Added `ensureDialect` method to initialize the dialect if not set. - Updated SQL queries to use dialect-aware methods for table and column names, ensuring compatibility with MySQL and PostgreSQL. - Refactored insert and upsert logic to utilize dialect-specific UUID handling and SQL generation. - Improved test coverage for PostgreSQL dialect handling in RewardService and TradingVolume queries. - Added a new configuration file for PostgreSQL connection settings.
af7eb75 to
2e4af67
Compare
Add postgres support
dialectfield in service structs (DepositService, OrderService, RewardService, TradeService, WithdrawService) to handle database-specific SQL generation.ensureDialectmethod to initialize the dialect if not set.