tursodatabase / tursodatabase/libsql
PRAGMA settings nowhere to be found
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 17.2k
- Forks
- 531
- Avg merge
- 1h 12m
- Merged PRs (30d)
- 1
Description
I have an existing init.sql file that I use locally when running with the go SDK.
I start the program by running pragma commands:
func (db *db) Bootstrap() error {
// Keeping this as a private function to avoid fuck ups
if err := db.runMigrations(); err != nil {
return fmt.Errorf("database.New: %q\n", err)
}
// Set default pragma settings
_, err := db.Exec(
`
PRAGMA busy_timeout = 10000;
PRAGMA journal_mode = WAL;
PRAGMA journal_size_limit = 200000000;
PRAGMA synchronous = NORMAL;
PRAGMA foreign_keys = ON;
PRAGMA temp_store = MEMORY;
PRAGMA cache_size = -16000;`,
)
if err != nil {
return fmt.Errorf("db.Exec: %v", err)
}
return nil
}
In development, when running with the Mattn driver and my local sqlite3 .db file everything works fine.
But when I try to use the libsql driver in production I get errors that say unsupported statement.
If PRAGMA settings are not the same for sqlite3 and libsql, where can I find this information?
Are there some PRAGMA settings that are available in libsql and some that are not?
If so, I would like to know which are available and which are not.
Contributor guide
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 PRAGMA statements shown in the init.sql example and the Go SDK Bootstrap function, then compare each setting with the libSQL driver's documented support. Document which settings are supported or rejected and explain the expected behavior for unsupported statements.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, sqlite
- Domain
- databases
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100