0.0.5 • Published 5 months ago
nuxt-kysely v0.0.5
Nuxt Kysely
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