How to use go-sqlite for android/iOS
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 9.2k
- Forks
- 1.2k
- Avg merge
- 19m
- Merged PRs (30d)
- 4
Description
I am creating a GO module which will be exported as library for Android/iOS apps (example: .aar for Android). I want to added database operation to this go module and using it in android and ios apps as both supports sqlite. I tried with examples provided. When i use "$go run [filename]" it creates db and runs without any issue. But when I add sqlite example code to my module and export it as '.aar' file (using gomobile bind) and include it in my android project and try to run. i get following error log
I/GoLog: "unable to open database file: no such file or directory":
create table foo (id integer not null primary key, name text);
delete from foo;
The issue was reported earlier ass well
https://github.com/golang/go/issues/18194#issue-193398369
but no proper solution posted and no information available. please let me know how to use go-sqlite in android devices
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the sqlite example that works under go run, then compare its database setup with the module exported through gomobile bind and the Android project. Review the linked golang/go issue and the reported unable to open database file log. Done would be a documented, reproducible way to use the driver in Android and iOS apps, or a clear explanation of the limitation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, sqlite
- Domain
- databases, mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100