A
A
Antalex712021-10-07 00:11:31
PostgreSQL
Antalex71, 2021-10-07 00:11:31

How to convert JSON to CREATE TABLE command?

The task is this: there is a JSON with a table structure, for example {"name":"tab1", "col":[{"name": "id", "type": "serial"},{"name": ... , "type": ...}]}. There are related tables (parent.id -> child.parent_id).
You need to convert this to a CREATE TABLE SQL command.
PostgreSQL is planned as a database.
Is there a ready made library for Node.js?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question