libsql-batch.test.ts — drizzle-orm Source File
Architecture documentation for libsql-batch.test.ts, a typescript file in the drizzle-orm codebase. 6 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR cddbfccd_6dad_87a9_dbc4_c051b29bc7ef["libsql-batch.test.ts"] 33707adf_3867_206c_1f47_142479def47f["client"] cddbfccd_6dad_87a9_dbc4_c051b29bc7ef --> 33707adf_3867_206c_1f47_142479def47f cad5819d_2851_9c06_9778_62eb6e1b2dab["async-retry"] cddbfccd_6dad_87a9_dbc4_c051b29bc7ef --> cad5819d_2851_9c06_9778_62eb6e1b2dab 690f7dfc_0aea_9ee8_d6e7_26bbb3689031["drizzle-orm"] cddbfccd_6dad_87a9_dbc4_c051b29bc7ef --> 690f7dfc_0aea_9ee8_d6e7_26bbb3689031 28ab9394_054d_e176_bc32_0ec8b0808e2a["libsql"] cddbfccd_6dad_87a9_dbc4_c051b29bc7ef --> 28ab9394_054d_e176_bc32_0ec8b0808e2a 25248a9d_ba06_2b33_4421_8575da2f9c34["sqlite-core"] cddbfccd_6dad_87a9_dbc4_c051b29bc7ef --> 25248a9d_ba06_2b33_4421_8575da2f9c34 8d35eaf2_a542_cfd4_fa1a_fafca0f02686["vitest"] cddbfccd_6dad_87a9_dbc4_c051b29bc7ef --> 8d35eaf2_a542_cfd4_fa1a_fafca0f02686 style cddbfccd_6dad_87a9_dbc4_c051b29bc7ef fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import { createClient } from '@libsql/client';
import type { Client, ResultSet } from '@libsql/client';
import retry from 'async-retry';
import { eq, relations, sql } from 'drizzle-orm';
import { drizzle, type LibSQLDatabase } from 'drizzle-orm/libsql';
import type { AnySQLiteColumn } from 'drizzle-orm/sqlite-core';
import { integer, primaryKey, sqliteTable, text } from 'drizzle-orm/sqlite-core';
import { afterAll, beforeAll, beforeEach, expect, expectTypeOf, test } from 'vitest';
const ENABLE_LOGGING = false;
export const usersTable = sqliteTable('users', {
id: integer('id').primaryKey({ autoIncrement: true }),
name: text('name').notNull(),
verified: integer('verified').notNull().default(0),
invitedBy: integer('invited_by').references((): AnySQLiteColumn => 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 = sqliteTable('groups', {
id: integer('id').primaryKey({ autoIncrement: true }),
name: text('name').notNull(),
description: text('description'),
});
export const groupsConfig = relations(groupsTable, ({ many }) => ({
usersToGroups: many(usersToGroupsTable),
}));
export const usersToGroupsTable = sqliteTable(
'users_to_groups',
{
id: integer('id').primaryKey({ autoIncrement: true }),
userId: integer('user_id', { mode: 'number' }).notNull().references(
() => usersTable.id,
),
groupId: integer('group_id', { mode: 'number' }).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],
}),
}));
// ... (504 more lines)
Domain
Subdomains
Functions
Dependencies
- async-retry
- client
- drizzle-orm
- libsql
- sqlite-core
- vitest
Source
Frequently Asked Questions
What does libsql-batch.test.ts do?
libsql-batch.test.ts is a source file in the drizzle-orm codebase, written in typescript. It belongs to the DrizzleORM domain, SQLDialects subdomain.
What functions are defined in libsql-batch.test.ts?
libsql-batch.test.ts defines 7 function(s): commentLikesConfig, commentsConfig, groupsConfig, postsConfig, usersConfig, usersToGroupsConfig, usersToGroupsTable.
What does libsql-batch.test.ts depend on?
libsql-batch.test.ts imports 6 module(s): async-retry, client, drizzle-orm, libsql, sqlite-core, vitest.
Where is libsql-batch.test.ts in the architecture?
libsql-batch.test.ts is located at integration-tests/tests/sqlite/libsql-batch.test.ts (domain: DrizzleORM, subdomain: SQLDialects, directory: integration-tests/tests/sqlite).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free