-
Notifications
You must be signed in to change notification settings - Fork 161
feat: Adding sqlite to mobile agent #3306
base: main
Are you sure you want to change the base?
feat: Adding sqlite to mobile agent #3306
Conversation
Codecov Report
@@ Coverage Diff @@
## main #3306 +/- ##
==========================================
+ Coverage 87.57% 88.05% +0.48%
==========================================
Files 343 318 -25
Lines 46809 43156 -3653
==========================================
- Hits 40994 38002 -2992
+ Misses 4318 3799 -519
+ Partials 1497 1355 -142
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
4d5c3f3
to
ca7c46d
Compare
Hi @afrancoc2000! Thanks again for the contribution. I think this new storage provider implementation should be in https://github.com/hyperledger/aries-framework-go-ext/tree/main/component/storage alongside the other SQL storage provider implementations, as I think it could be useful to non-mobile applications as well. Let me know what you think. |
Hi again @afrancoc2000, after I wrote that comment, I realized that your storage provider implementation here returns the interface types defined in https://github.com/hyperledger/aries-framework-go/blob/main/cmd/aries-agent-mobile/pkg/api/storage.go rather than the ones in https://github.com/hyperledger/aries-framework-go/blob/main/spi/storage/storage.go, which is why I'm assuming you didn't put your implementation in aries-framework-go-ext. I think what you can do to allow your storage provider implementation to be usable with both mobile and non-mobile bindings is this:
Now your new SQLite Aries storage implementation is usable across non-mobile and mobile (using the wrapper) implementations. Let me know what you think or if you have any questions! |
Hi, @DRK3 great idea! I agree, I will do the change, I have a question, what do you think about adding a getter with the wrapper that imports the https://github.com/hyperledger/aries-framework-go-ext/tree/main/component/storage classes for the mobile agent? this, because when I tried importing 2 different aar files generated using go mobile, they conflicted with each other as both have one library that is the same for both inside, and gradle doesn't know how to solve this conflict. What do you think? Thanks! |
Hi @afrancoc2000! For your getter idea, what would that look like? One thing we would want to avoid is importing Also, what is conflicting when you try to generate the Go mobile bindings? Is it a naming conflict? |
Hi @DRK3, The issue is that if I create an aar using go mobile for 2 different projects they will both generate an aar project with this folder structure:
And the |
Hi @afrancoc2000, unfortunately my knowledge of how the mobile bindings work is somewhat limited, but is the issue basically that you don't have a way to create the mobile bindings with a storage provider from a different project/module (like |
I can also ask around and see if someone else who knows the mobile binding might be able to help... |
Hi @afrancoc2000, just wanted to check in on this. My apologies - I meant to send an update earlier, but unfortunately I couldn't find someone who knows how the mobile bindings work. Are you still stuck on this? If so, I think perhaps our best option is to just merge the sqlite implementation you have in as-is where you've originally put it and not worry about adding it to aries-framework-go-ext for now, since I realize that this might be blocking your progress. |
Hi @DRK3, sorry for the late response, I also was a little busy. For my project I generated the aar file and used it as it was, and also I created the sqlite component to the aries-framework-go-ext here it would be great, if you can give it a look. |
402bdce
to
595840f
Compare
Hi @afrancoc2000, I think what we can do is is merge this PR in as-is, and I'll create a follow-up issue for someone to investigate if it's possible to use the |
43dce59
to
923f222
Compare
923f222
to
4398fcb
Compare
@afrancoc2000 I'm also seeing errors in Ursa/CL unit tests in my open PR, which doesn't make any changes to related code, so I suspect there's an unrelated issue going on... @sudeshrshetty @rolsonquadras Can we merge this PR? |
4398fcb
to
29caf31
Compare
@sudeshrshetty @rolsonquadras @fqutishat If you're ok with this PR, can we merge? |
4d6c8b6
to
67e5f8f
Compare
Signed-off-by: Ana Maria Franco <[email protected]>
67e5f8f
to
e3021a9
Compare
Title:
Adding sqlite to mobile agent
Description:
I created a component in the mobile agent that allows a user to use a storage provider that connects with SQLite.
Summary:
Using https://github.com/hyperledger/aries-framework-go-ext/blob/main/component/storage/mysql/store.go as reference I created a store provider that connects with SQLite.
Also, I implemented the TotalItems() method inside the storage wrapper.
@DRK3, @sudeshrshetty, What do you think?