lightning icon indicating copy to clipboard operation
lightning copied to clipboard

SQL RPC method for grpc

Open Jhoyola opened this issue 2 years ago • 1 comments

This https://docs.corelightning.org/reference/lightning-sql is very nice. Could we have this also on the grpc api.

Jhoyola avatar Sep 28 '23 11:09 Jhoyola

I would love to see that supported as well. Here is my solution for now: https://github.com/ffaex/lightning/tree/feature/add_sql_rpc . But I have not tested it yet tbh. The SQL query should return a Vector of string, aka ROWs whose content is a string. One should serialize that string on his own, depending on the query.

Another thing to keep in mind is that autogenerating is not working perfectly with that, i had to modify cln-grpc/src/convert.rs manually see: "impl Fromresponses::SqlResponse for pb::SqlResponse {"

ffaex avatar Jan 19 '24 15:01 ffaex