{"repo":"lorefnon/ts-sql-codegen","free":true,"listed":false,"github":"https://github.com/lorefnon/ts-sql-codegen","clone":"git clone https://github.com/lorefnon/ts-sql-codegen.git","description":"Database driven code generation for ts-sql-query","language":"TypeScript","stars":52,"topics":["orm","query-builder","sql","typescript"],"license":null,"category":"databases-storage","readme_excerpt":"ts-sql-codegen This utility generates table mapper classes for ts-sql-query by inspecting a database through tbls. While it is possible to use ts-sql-query without any code-generation, we have to manually keep the table-mappings in sync with the database which is burdensome. With this utility, this mapping can be derived from the database itself as part of build process, eliminating the manual effort, reducing room for erroneous mapping and enabling true end-to-end type-safety. The code-generation process is highly customizable and almost all the defaults (which are sensible for most databases) can be configured if needed. Features 1. Generate clean typescript table/view mappers from database schema 1. Ability to include/exclude tables/fields 1. Ability to customize field types and type adapters 1. Idiomatic pascal-cased/camel-cased table/field name mapping by default and ability to customize names if desired. 1. Auto-detection & mapping of computed fields, primary key columns. 1. Automatic documentation propagation from SQL comments Installation: Step 1: Install tbls and ensure it is available in path Refer: https://github.com/k1LoW/tbls#install Step 2: Install ts-sql-codegen npm i --dev ts-sql-codegen Note: - Global installation ( npm i -g ts-sql-codegen ) can be convenient, but is preferrable to have ts-sql-codegen as a project dependency to avoid versioning issues. Usage (CLI): After every database schema change: Step 1: Generate yaml schema file from database using tbls ","default_branch":null,"files":null,"tree":[],"storefront":"/r/lorefnon","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/lorefnon/ts-sql-codegen/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}