Add sqlite3_db_readonly support to sqlite3.go
Open
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 9.2k
- Forks
- 1.2k
- Avg merge
- 19m
- Merged PRs (30d)
- 4
Description
Add support for sqlite3_db_readonly().
// Readonly determines if a database is read-only.
// (See http://sqlite.org/c3ref/db_readonly.html)
func (c *Conn) Readonly(dbName string) (bool, error) {
cname := C.CString(dbName)
rv := C.sqlite3_db_readonly(c.db, cname)
C.free(unsafe.Pointer(cname))
if rv == -1 {
return false, c.lastError()
}
return rv == 1, nil
}
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 sqlite3.go and the sqlite3_db_readonly API referenced in the issue. Done means the driver exposes Conn.Readonly(dbName string) with the documented boolean result and error behavior, including the API's error return case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, sqlite
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100