tursodatabase / tursodatabase/libsql

[C bindings] Have a single API function for opening all sorts of databases

Open
#1,480 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
17.2k
Forks
531
Avg merge
1h 12m
Merged PRs (30d)
1

Description

It would be nice to have an API that can open any type of connection (like you would for instace do in javascript using libsql-js) with a given URL / database location.

Futhermore, the C API seems to be no where documented. After some testing, I have found the following

  1. libsql_open_ext works with

":memory:"
"file:prueba.db"

  1. but for a remote http connection like

"http://127.0.0.1:8080"
"libsql://yourdb-username.turso.io"

you need to use libsql_open_remote. But this function does not understand the

":memory:"
"file:prueba.db"

schemas.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing the mentioned libsql_open_ext and libsql_open_remote functions and their accepted database locations. The completed work should provide one C API entry point for local and remote URLs and document the existing C opening functions and supported schemas.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
api, databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.