Skip to content

フォーマッター&コード

JSONからDrizzle ORMスキーマへ

Drizzle pgTable definition with $inferSelect / $inferInsert.

Runs in your browser

編集者注

Understanding · A schema that's also a value.

この詳細な解説章は現在、英語版のみで提供されています。上の変換ツールはあなたの言語で動作しますが、長文の解説記事はまだ翻訳されていません。

よくある質問

Quick answers.

How are column types determined?

The generator maps JSON primitives to PostgreSQL types. Strings are mapped to `text`, numbers to `integer` or `numeric`, and booleans to `boolean`.

Does it support nested objects?

JSON columns are defined using the `jsonb` type. For relational structures, you should define separate tables and establish foreign keys manually.

Is the output compatible with TypeScript?

Yes. The generated code includes `InferSelectModel` and `InferInsertModel` types to provide full type-safety for your database queries.

Are my data structures shared with a server?

No. The transformation happens entirely within your browser's memory, so your private schema designs are never transmitted or stored.

他の人はこちらも検索しています

関連ツール

More in this room.

すべて表示 フォーマッター&コード