-
Notifications
You must be signed in to change notification settings - Fork 2.2k
[Part 2|*] Implement First Part for SQL Backend functions #10287
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
[Part 2|*] Implement First Part for SQL Backend functions #10287
Conversation
fe51267 to
63aa866
Compare
938443e to
b0361a2
Compare
b0361a2 to
ed283fa
Compare
ed283fa to
aa560da
Compare
08464ea to
da3603e
Compare
da3603e to
069f7c6
Compare
1f7d395 to
ef6ef5c
Compare
|
/gemini review |
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.
Code Review
This pull request implements the QueryPayments and FetchPayment functions for the new SQL backend of the payments database. The changes include new SQL queries, Go functions to execute them, and converters to transform database results into application-level types.
The implementation is well-structured, making good use of batching for efficient data fetching. I have a few suggestions to improve code clarity and adhere to best practices:
- Simplify time value handling in
sql_converters.goby using direct type assertions where the type is guaranteed. - Consider updating the
DBinterface to accept acontext.ContextinFetchPaymentto avoid usingcontext.TODO(). - I also found a minor typo in a comment.
Overall, this is a solid contribution towards the SQL backend migration.
ef6ef5c to
0849296
Compare
Yes they will only pass with: #10292 |
bf9d3f2 to
3604e96
Compare
|
/gemini review |
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.
Code Review
This pull request implements the QueryPayments and FetchPayment functions for the SQL payments database backend. The changes are extensive and well-structured, introducing several helper functions for data conversion and batch loading to ensure efficiency. I've identified a few areas for improvement, primarily concerning adherence to the repository's style guide for comments and a high-severity issue regarding context propagation in FetchPayment. Overall, this is a solid contribution towards migrating the payments database to SQL.
74493d8 to
d786e3b
Compare
|
This new version now supports Batch Loading for all payments as proposed by elle. |
742caa8 to
6488a57
Compare
9300d69 to
0288df7
Compare
ellemouton
left a comment
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.
nice one adding the batch fetching ⚡
|
Looks like it's missing a rebase 👀 |
yyforyongyu
left a comment
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.
Can be merged once the rebase conflict is fixed 🙏
0288df7 to
e991cd0
Compare
6488a57 to
09f8a54
Compare
e991cd0 to
6860702
Compare
09f8a54 to
93f3a38
Compare
bbb73ff
into
lightningnetwork:elle-payment-sql-series-new
Depends on #9147
This PR implements the QueryPayments and FetchPayment SQL Payments DB backend functions.
It does not yet add testing for these functions which will be added in followup PRs once we have the ability to add payments and attempts to the database which we then can fetch.