Socket
Socket
Sign inDemoInstall

@maxzpr/kysely-libsql-client

Package Overview
Dependencies
30
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @maxzpr/kysely-libsql-client

Kysely dialect for libSQL


Version published
Weekly downloads
16
decreased by-40.74%
Maintainers
1
Install size
27.7 MB
Created
Weekly downloads
 

Readme

Source

kysely-libsql

Forked from Libsql/kysely-libsql

A Kysely using the @libsql/client from Turso official sdk.

Installation

npm install @maxzpr/kysely-libsql-client

Usage

Pass a LibsqlDialect instance as the dialect when creating the Kysely object:

import { Kysely } from "kysely";
import { LibsqlDialect } from "@maxzpr/kysely-libsql-client";

interface Database {
    ...
}

const db = new Kysely<Database>({
    dialect: new LibsqlDialect({
        url: "libsql://localhost:8080?tls=0",
        authToken: "<token>", // optional
    }),
});

// or
const db = new Kysely<Database>({
    dialect: new LibsqlDialect({
        url: "libsql://localhost:8080?authToken=<token>"
    }),
});

Supported URLs

The library accepts the same URL schemas as @libsql/client except file::

  • http:// and https:// connect to a libsql server over HTTP,
  • ws:// and wss:// connect to the server over WebSockets,
  • libsql:// connects to the server using the default protocol (which is now HTTP). libsql:// URLs use TLS by default, but you can use ?tls=0 to disable TLS (e.g. when you run your own instance of the server locally).

Connecting to a local SQLite file using file: URL is not supported; we suggest that you use the native Kysely dialect for SQLite.

License

This project is licensed under the MIT license.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in @maxzpr/kysely-libsql-client by you, shall be licensed as MIT, without any additional terms or conditions.

Keywords

FAQs

Last updated on 01 Apr 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc