Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Generate TypeScript definitions (types) from a PostgreSQL database schema.

License

NotificationsYou must be signed in to change notification settings

kriasoft/knex-types

Repository files navigation

NPM VersionNPM DownloadsTypeScriptDonateDiscord

An utility module forKnex.js that generates TypeScriptdefinitions (types) from a PostgreSQL database schema.

$ npm install knex$ npm install knex-types --dev

Usage Example

const{ knex}=require("knex");const{ updateTypes}=require("knex-types");constdb=knex(require("./knexfile"));updateTypes(db,{output:"./types.ts"}).catch((err)=>{console.error(err);process.exit(1);});

Find an example of generated types in./main.test.ts.

Related Projects

How to Contribute

Please create aPR or send me a message onDiscord.

License

Copyright © 2021-present Kriasoft. This source code is licensed under the MIT license found in theLICENSE file.


Made with ♥ by Konstantin Tarkus (@koistya,blog)andcontributors.


[8]ページ先頭

©2009-2025 Movatter.jp