Home / File/ types.ts — drizzle-orm Source File

types.ts — drizzle-orm Source File

Architecture documentation for types.ts, a typescript file in the drizzle-orm codebase. 4 imports, 0 dependents.

File typescript 4 imports

Entity Profile

Dependency Diagram

graph LR
  71b2fd54_0bdd_6865_6140_82d41b75b5c0["types.ts"]
  d657f321_9211_4fa3_857c_c268f6e03ad7["attest"]
  71b2fd54_0bdd_6865_6140_82d41b75b5c0 --> d657f321_9211_4fa3_857c_c268f6e03ad7
  4859a2e0_4bd3_506a_e7e6_bf4316983bb5["arktype"]
  71b2fd54_0bdd_6865_6140_82d41b75b5c0 --> 4859a2e0_4bd3_506a_e7e6_bf4316983bb5
  53497908_16e7_977d_e97d_7414884a88a6["pg-core"]
  71b2fd54_0bdd_6865_6140_82d41b75b5c0 --> 53497908_16e7_977d_e97d_7414884a88a6
  6edbc86d_00ec_e1a9_d845_ab84f4882062["index.ts"]
  71b2fd54_0bdd_6865_6140_82d41b75b5c0 --> 6edbc86d_00ec_e1a9_d845_ab84f4882062
  style 71b2fd54_0bdd_6865_6140_82d41b75b5c0 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import { bench, setup } from '@ark/attest';
import { type } from 'arktype';
import { boolean, integer, pgTable, text } from 'drizzle-orm/pg-core';
import { createSelectSchema } from '~/index.ts';

const users = pgTable('users', {
	id: integer().primaryKey(),
	firstName: text().notNull(),
	middleName: text(),
	lastName: text().notNull(),
	age: integer().notNull(),
	admin: boolean().notNull().default(false),
});

const teardown = setup();

bench('select schema', () => {
	return createSelectSchema(users);
}).types([13129, 'instantiations']);

bench('select schema with refinements', () => {
	return createSelectSchema(users, {
		firstName: (t) => t.atMostLength(100),
		middleName: (t) => t.atMostLength(100),
		lastName: (t) => t.atMostLength(100),
		age: type.number.atLeast(1),
	});
}).types([21631, 'instantiations']);

teardown();

Dependencies

  • arktype
  • attest
  • index.ts
  • pg-core

Frequently Asked Questions

What does types.ts do?
types.ts is a source file in the drizzle-orm codebase, written in typescript.
What does types.ts depend on?
types.ts imports 4 module(s): arktype, attest, index.ts, pg-core.
Where is types.ts in the architecture?
types.ts is located at drizzle-arktype/benchmarks/types.ts (directory: drizzle-arktype/benchmarks).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free