{"id":13536844,"url":"https://github.com/tvandinther/libsql-client-dotnet","last_synced_at":"2026-01-12T10:28:13.660Z","repository":{"id":196821138,"uuid":"697206659","full_name":"tvandinther/libsql-client-dotnet","owner":"tvandinther","description":"A .NET client for libsql","archived":false,"fork":false,"pushed_at":"2025-09-21T09:58:21.000Z","size":474,"stargazers_count":101,"open_issues_count":9,"forks_count":10,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-09-21T11:41:28.073Z","etag":null,"topics":["database-client","dotnet","dotnet-standard","library","libsql","turso"],"latest_commit_sha":null,"homepage":"https://www.nuget.org/packages/Libsql.Client","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tvandinther.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-09-27T09:12:37.000Z","updated_at":"2025-09-08T03:23:53.000Z","dependencies_parsed_at":"2023-09-27T19:54:18.426Z","dependency_job_id":"3dc6758d-a84d-4d12-990b-8f41b41431f4","html_url":"https://github.com/tvandinther/libsql-client-dotnet","commit_stats":null,"previous_names":["tvandinther/libsql-client-dotnet"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/tvandinther/libsql-client-dotnet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tvandinther%2Flibsql-client-dotnet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tvandinther%2Flibsql-client-dotnet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tvandinther%2Flibsql-client-dotnet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tvandinther%2Flibsql-client-dotnet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tvandinther","download_url":"https://codeload.github.com/tvandinther/libsql-client-dotnet/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tvandinther%2Flibsql-client-dotnet/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28338298,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T06:09:07.588Z","status":"ssl_error","status_checked_at":"2026-01-12T06:05:18.301Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["database-client","dotnet","dotnet-standard","library","libsql","turso"],"created_at":"2024-08-01T09:00:50.427Z","updated_at":"2026-01-12T10:28:13.654Z","avatar_url":"https://github.com/tvandinther.png","language":"C#","funding_links":[],"categories":["Tools"],"sub_categories":["Community"],"readme":"﻿![tests](https://github.com/tvandinther/libsql-client-dotnet/actions/workflows/test.yaml/badge.svg)\n\n# Libsql.Client\n\nA .NET client library for libsql.\n\n**This project is still in early development and not ready for production use.**\n\n### Currently Supported Features\n\n- Creating a database:\n  - In memory.\n  - From file.\n  - From connection string.\n- Executing SQL statements:\n  - Non-parameterised.\n\n### Planned Features\n\n- Positional and named arguments.\n- Embedded replicas.\n- Prepared statements.\n- Batched statements.\n- Transactions.\n\n## Usage\n\nFor an example, see the Demo project in the repository.\n\n### Creating a Database\n\nYou can open a database in different locations:\n\n1. In-Memory Database\n```csharp\n// Create an in-memory database.\nvar dbClient = await DatabaseClient.Create(opts =\u003e {\n    opts.Url = \":memory:\";\n});\n```\n\n2. From a File\n```csharp\n// Creates or opens a database stored in a local file.\nvar dbClient = await DatabaseClient.Create(opts =\u003e {\n    opts.Url = \"file:./mydb.sqlite\";\n});\n```\n\n3. From a Connection String\n```csharp\n// Opens a database using a full connection string.\nvar dbClient = await DatabaseClient.Create(opts =\u003e {\n    opts.Url = \"https://my-remote-db.example.com\";\n});\n```\n\n#### Provide Additional Connection Options\n#### Remote Databases\nFor remote libSQL databases, use client options for authentication and secure connections:\n\n```csharp\n// Connect to a remote database with authentication and HTTPS enabled\nvar dbClient = await DatabaseClient.Create(opts =\u003e\n{\n    opts.Url = \"https://my-remote-db.example.com\";\n    opts.AuthToken = \"MY_TOKEN\";\n    opts.UseHttps = true;\n});\n```\n\n#### Local File Databases\nFor local files, you can pass standard query parameters via the file URI:\n\n```csharp\n// Open a local database with query parameters\nvar dbClient = await DatabaseClient.Create(opts =\u003e\n{\n    opts.Url = \"file:mydb.sqlite?mode=rwc\u0026cache=shared\";\n});\n```\n\n### Executing SQL Statements\n\nUsing direct queries\n```csharp\nawait dbClient.Execute(\"CREATE TABLE users (id INTEGER PRIMARY KEY, name TEXT, height REAL)\");\n```\n\nUsing positional arguments\n```csharp\nawait dbClient.Execute(\"SELECT name FROM users WHERE id = ?\", userId);\n```\n\n### Querying the Database\n\n```csharp\nUser ToUser(IEnumerable\u003cValue\u003e row)\n{\n    var rowArray = row.ToArray();\n\n    if (\n        rowArray[0] is Integer { Value: var id } \u0026\u0026 \n        rowArray[1] is Text { Value: var name } \u0026\u0026 \n        rowArray[2] is Real { Value: var height }\n    {\n        return new User(id, name, height);   \n    }\n\n    throw new ArgumentException();\n}\n\nvar result = await dbClient.Execute(\"SELECT * FROM users\");\n\nvar users = result.Rows.Select(ToUser);\n```\n\n### Closing the Database\n\n```csharp\ndbClient.Dispose();\n```\n\nor with a `using` statement:\n\n```csharp\nusing (var dbClient = await DatabaseClient.Create(opts =\u003e {\n    opts.Url = \":memory:\";\n}))\n{\n    // ...\n}\n```\n\n## Disclaimer\n\nThis project is still in early development and not ready for production use. The API is subject to include breaking changes on minor versions until version 1.0.\n\nThe full test suite is run only on a Linux x64 platform. Most of the test suite is run on Linux, Windows, and macOS x64 platforms. The test suite runs on .NET 7.\n\n## Progress\n- A database can be created:\n  - [x] In memory.\n  - [x] From file.\n  - [x] From connection string.\n- [x] A database can be destroyed/closed/deallocated.\n- [ ] An embedded replica can be created.\n  - [ ] An embeded replica can be synced.\n- The database can execute SQL statements:\n  - [x] Non-parameterised.\n  - [x] Parameterised with positional arguments.\n  - [ ] Parameterised with named arguments.\n- [ ] Prepared statements.\n- [ ] Batched statements.\n- [ ] Transactions.\n- [x] A result set is returned from an execution.\n  - [x] With the column names.\n  - [x] With an enumerable of enumerable (rows) of typed boxed values.\n  - [x] With the number of affected rows.\n  - [x] With the last inserted row id.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftvandinther%2Flibsql-client-dotnet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftvandinther%2Flibsql-client-dotnet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftvandinther%2Flibsql-client-dotnet/lists"}