neon-http-batch.ts — drizzle-orm Source File
Architecture documentation for neon-http-batch.ts, a typescript file in the drizzle-orm codebase. 7 imports, 1 dependents.
Entity Profile
Dependency Diagram
graph LR c7bc55e0_0d9e_c4da_8367_225284280736["neon-http-batch.ts"] e9c5db23_dc8f_4a33_356a_8f8fbacc4a0e["dockerode"] c7bc55e0_0d9e_c4da_8367_225284280736 --> e9c5db23_dc8f_4a33_356a_8f8fbacc4a0e 690f7dfc_0aea_9ee8_d6e7_26bbb3689031["drizzle-orm"] c7bc55e0_0d9e_c4da_8367_225284280736 --> 690f7dfc_0aea_9ee8_d6e7_26bbb3689031 7a947e11_4b82_a72e_a266_e039a8bd3ff1["neon-http"] c7bc55e0_0d9e_c4da_8367_225284280736 --> 7a947e11_4b82_a72e_a266_e039a8bd3ff1 53497908_16e7_977d_e97d_7414884a88a6["pg-core"] c7bc55e0_0d9e_c4da_8367_225284280736 --> 53497908_16e7_977d_e97d_7414884a88a6 249e672a_a0ca_539d_aeb8_1505bb753d14["get-port"] c7bc55e0_0d9e_c4da_8367_225284280736 --> 249e672a_a0ca_539d_aeb8_1505bb753d14 de47b2dd_7ed5_08f6_5b8a_f44c9896ce49["uuid"] c7bc55e0_0d9e_c4da_8367_225284280736 --> de47b2dd_7ed5_08f6_5b8a_f44c9896ce49 8d35eaf2_a542_cfd4_fa1a_fafca0f02686["vitest"] c7bc55e0_0d9e_c4da_8367_225284280736 --> 8d35eaf2_a542_cfd4_fa1a_fafca0f02686 6e2e482d_9a2a_072f_6dfa_c6293c2f4648["neon-http-batch.test.ts"] 6e2e482d_9a2a_072f_6dfa_c6293c2f4648 --> c7bc55e0_0d9e_c4da_8367_225284280736 style c7bc55e0_0d9e_c4da_8367_225284280736 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import Docker from 'dockerode';
import type { InferSelectModel } from 'drizzle-orm';
import { eq, relations, sql } from 'drizzle-orm';
import type { NeonHttpQueryResult } from 'drizzle-orm/neon-http';
import { integer, pgTable, primaryKey, serial, text, timestamp } from 'drizzle-orm/pg-core';
import type { AnyPgColumn } from 'drizzle-orm/pg-core';
import getPort from 'get-port';
import { v4 as uuidV4 } from 'uuid';
import { afterAll, beforeEach, describe, expect, expectTypeOf, test } from 'vitest';
export const usersTable = pgTable('users', {
id: serial('id').primaryKey(),
name: text('name').notNull(),
verified: integer('verified').notNull().default(0),
invitedBy: integer('invited_by').references((): AnyPgColumn => usersTable.id),
});
export const usersConfig = relations(usersTable, ({ one, many }) => ({
invitee: one(usersTable, {
fields: [usersTable.invitedBy],
references: [usersTable.id],
}),
usersToGroups: many(usersToGroupsTable),
posts: many(postsTable),
}));
export const groupsTable = pgTable('groups', {
id: serial('id').primaryKey(),
name: text('name').notNull(),
description: text('description'),
});
export const groupsConfig = relations(groupsTable, ({ many }) => ({
usersToGroups: many(usersToGroupsTable),
}));
export const usersToGroupsTable = pgTable(
'users_to_groups',
{
id: serial('id'),
userId: integer('user_id').notNull().references(() => usersTable.id),
groupId: integer('group_id').notNull().references(() => groupsTable.id),
},
(t) => ({
pk: primaryKey({ columns: [t.userId, t.groupId] }),
}),
);
export const usersToGroupsConfig = relations(usersToGroupsTable, ({ one }) => ({
group: one(groupsTable, {
fields: [usersToGroupsTable.groupId],
references: [groupsTable.id],
}),
user: one(usersTable, {
fields: [usersToGroupsTable.userId],
references: [usersTable.id],
}),
}));
export const postsTable = pgTable('posts', {
id: serial('id').primaryKey(),
content: text('content').notNull(),
ownerId: integer('owner_id').references(() => usersTable.id),
// ... (497 more lines)
Domain
Subdomains
Functions
Dependencies
- dockerode
- drizzle-orm
- get-port
- neon-http
- pg-core
- uuid
- vitest
Source
Frequently Asked Questions
What does neon-http-batch.ts do?
neon-http-batch.ts is a source file in the drizzle-orm codebase, written in typescript. It belongs to the DrizzleORM domain, DatabaseDrivers subdomain.
What functions are defined in neon-http-batch.ts?
neon-http-batch.ts defines 9 function(s): commentLikesConfig, commentsConfig, createDockerDB, groupsConfig, postsConfig, tests, usersConfig, usersToGroupsConfig, usersToGroupsTable.
What does neon-http-batch.ts depend on?
neon-http-batch.ts imports 7 module(s): dockerode, drizzle-orm, get-port, neon-http, pg-core, uuid, vitest.
What files import neon-http-batch.ts?
neon-http-batch.ts is imported by 1 file(s): neon-http-batch.test.ts.
Where is neon-http-batch.ts in the architecture?
neon-http-batch.ts is located at integration-tests/tests/pg/neon-http-batch.ts (domain: DrizzleORM, subdomain: DatabaseDrivers, directory: integration-tests/tests/pg).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free