Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@libsql/knex-libsql

Package Overview
Dependencies
Maintainers
3
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@libsql/knex-libsql

Knex dialect for libSQL

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
3
Created
Source

knex-libsql

A Knex dialect for libSQL/sqld, using the @libsql/sqlite3 package that emulates sqlite3.

Installation

npm install @libsql/knex-libsql

Usage

const Client_Libsql = require('@libsql/knex-libsql');
const Knex = require("knex");

const knex = Knex({
    client: Client_Libsql,
    connection: {
        filename: "libsql://localhost:8080?tls=0",
    },
});

URL

The library accepts the same URLs as [@libsql/sqlite3][libsql-node-sqlite3-url]:

  • 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).

To use a JWT for authentication, you can use the authToken query parameter (for example, ws://localhost?authToken=<token>).

You can also pass a file: URL to use a local file, like file:test.db or file:/tmp/test.db.

License

This project is licensed under the MIT license.

Contribution

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

Keywords

FAQs

Package last updated on 15 Jun 2023

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc