0.0.5 • Published 5 months ago

nuxt-kysely v0.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

Nuxt Kysely

npm version npm downloads License Nuxt

Introduction

Nuxt Kysely is a Nuxt module that integrates Kysely, a type-safe SQL query builder for TypeScript, into your Nuxt application. This module simplifies database interactions by providing a fluent and type-safe API for constructing SQL queries.

Installation

To install the Nuxt Kysely module, run the following command:

npm install nuxt-kysely

Or if you prefer using yarn:

yarn add nuxt-kysely

Configuration

Add nuxt-kysely to the modules section of your nuxt.config.js:

export default {
  modules: [
    'nuxt-kysely',
  ],
  kysely: {
    // Kysely configuration options
  }
}

Usage

Once the module is installed and configured, you can use Kysely in your Nuxt application as follows:

const { db } = useDatabase()
db.selectFrom('person')
  .where('id', 'is', 1)
  .selectAll()
  .executeTakeFirst()

Contribution

# Install dependencies
npm install

# Generate type stubs
npm run dev:prepare

# Develop with the playground
npm run dev

# Build the playground
npm run dev:build

# Run ESLint
npm run lint

# Run Vitest
npm run test
npm run test:watch

# Release new version
npm run release
0.0.5

5 months ago

0.0.4

5 months ago

0.0.3

5 months ago

0.0.2

5 months ago

0.0.1

5 months ago