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

@xata.io/kysely

Package Overview
Dependencies
Maintainers
0
Versions
1351
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@xata.io/kysely

A [Kysely](https://github.com/kysely-org/kysely) dialect for [Xata](https://xata.io), using the [Xata serverless driver for TypeScript](https://github.com/xataio/client-ts).

  • 0.0.0-alpha.v706ed659a39cdb17795e42b8e4681551bbe7b1a6
  • npm
  • Socket score

Version published
Weekly downloads
505
decreased by-82.5%
Maintainers
0
Weekly downloads
 
Created
Source

@xata.io/kysely

A Kysely dialect for Xata, using the Xata serverless driver for TypeScript.

Installation

You should install both kysely and @xata.io/kysely with @xata.io/client. You can install them with your favorite package manager:

# with bun
bun install kysely @xata.io/kysely @xata.io/client

# with pnpm
pnpm add kysely @xata.io/kysely @xata.io/client

# with yarn
yarn add kysely @xata.io/kysely @xata.io/client

# with npm
npm install kysely @xata.io/kysely @xata.io/client

Usage

You can pass a new instance of XataDialect as the dialect option when creating a new Kysely instance:

import { Kysely } from 'kysely';
import { XataDialect, Model } from '@xata.io/kysely';
import { DatabaseSchema, getXataClient } from './xata.ts';

const xata = getXataClient();

const db = new Kysely<Model<DatabaseSchema>>({
  dialect: new XataDialect({ xata })
});

const drivers = await db.selectFrom('users').select(['name', 'email']).execute();

XataDialect accepts your Xata client instance as its only option. You can find more information about creating a Xata client instance in our getting started guide.

FAQs

Package last updated on 19 Sep 2024

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