kanel
TypeScript icon, indicating that this package has built-in type declarations

3.9.1 • Public • Published

Kanel Logo

Generate Typescript types from a live Postgres database.

This is for people who don't like ORM's but who do like intellisense and type checking for their database access code.

See the documentation here

Introduction to the idea is outlined here.

Usage

Install with:

$ npm i -D kanel

To run, make sure you are in a folder that has a .kanelrc.js configuration file and that your database is running, and type:

$ npx kanel

Programmatical usage

Example of running generation from code:

import { processDatabase } from "kanel";
import config from "./kanelrc";

async function run() {
  await processDatabase(config);
}

run();

Example

To see an example of the result, check out the /example folder. It uses the Sample Database from www.postgresqltutorial.com.



Contributors

Made with contrib.rocks.

Package Sidebar

Install

npm i kanel

Weekly Downloads

20,478

Version

3.9.1

License

MIT

Unpacked Size

96 kB

Total Files

81

Last publish

Collaborators

  • kristiandupont