{"repo":"VasilVelikov00/json-schema-to-sql","free":true,"listed":false,"github":"https://github.com/VasilVelikov00/json-schema-to-sql","clone":"git clone https://github.com/VasilVelikov00/json-schema-to-sql.git","description":"Convert a JSON schema into SQL DDL (create table) statements.","language":"TypeScript","stars":21,"topics":["ajv","generator","json-schema","knex","parser","sql","sql-ddl","typescript","zod","converter"],"license":"MIT","category":"databases-storage","readme_excerpt":"json-schema-to-sql Convert a JSON schema into SQL DDL (create table) statements. Table of Contents - Installation - Usage - Features - JSON Schema Compatible - JSON Schema Extensions - Unmapped Features - Fully Typed - Supported Dialects - Nested Structures - Objects - Arrays of Objects - Arrays of Literals - Validation - Caveats - Inferred Primary Keys - Limitations - Composite Primary Keys - Arrays in Arrays - Contributing Installation Usage Features JSON Schema Compatible The library aims to map features of the JSON Schema spec as closely as possible to their logical counterpart in relational databases. A few examples: JSON Schema Feature Database Feature --------------------- ------------------------------------------ type + format Type of the column required Non nullable columns enum CHECK constraint for the possible values default Default value of the column description Column comment JSON Schema Extensions Where a logical mapping is not possible, the library extends the JSON Schema spec using the x- syntax For example: JSON Schema Feature Database Feature --------------------- -------------------------------- x-primaryKey Sets primary keys in the table In the future, things like x-onDelete and x-onUpdate will be added to support cascades. Unmapped Features JSON Schema features, which are not yet implemented or will never be implemented are just ignored by the converter. Fully Typed All the internals use TypeScript. Supported Dialects Currently, it supports PostgreSQL a","default_branch":null,"files":null,"tree":[],"storefront":"/r/VasilVelikov00","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/VasilVelikov00/json-schema-to-sql/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."}