export { A as AlterTableOperation, a as AlterTableOptions, b as ColumnDefinition, C as CreateTableOptions, D as DropTableOptions, I as IndexDefinition, c as TableConstraint, T as TableDefinition } from '../schema-BDn8WfSL.cjs'; export { a as SqlParam } from '../core-CVO7WYDj.cjs'; /** * Schema utilities for @nextly/adapter-drizzle * * @remarks * This module re-exports schema-related types from the `/types` subpath * * ## Current Exports * * - **Schema Type Definitions:** {@link TableDefinition}, {@link ColumnDefinition}, {@link IndexDefinition}, {@link TableConstraint} * - **Schema Operation Types:** {@link CreateTableOptions}, {@link DropTableOptions}, {@link AlterTableOptions}, {@link AlterTableOperation} * - **Core Types:** {@link SqlParam} * * ## Coming in Phase 4 * * - Schema builder utilities * - Schema generator functions * - Dialect-specific schema mapping * - Unified schema definitions * * ## Usage Examples * * ### Defining a Table Schema * * ```typescript * import type { TableDefinition } from "@nextly/adapter-drizzle/schema"; * * const usersTable: TableDefinition = { * name: "users", * columns: [ * { name: "id", type: "uuid", primaryKey: true }, * { name: "email", type: "varchar(255)", unique: true }, * { name: "name", type: "varchar(255)", nullable: true }, * { * name: "created_at", * type: "timestamp", * default: { sql: "CURRENT_TIMESTAMP" }, * }, * ], * indexes: [ * { name: "users_email_idx", columns: ["email"], unique: true }, * ], * }; * ``` * * ### Creating a Table with Adapter * * ```typescript * import type { DrizzleAdapter } from "@nextly/adapter-drizzle"; * import type { TableDefinition } from "@nextly/adapter-drizzle/schema"; * * async function createUsersTable(adapter: DrizzleAdapter) { * const tableDefinition: TableDefinition = { * // ... table definition * }; * * await adapter.createTable(tableDefinition, { ifNotExists: true }); * } * ``` * * ### Altering a Table * * ```typescript * import type { * AlterTableOperation, * ColumnDefinition, * } from "@nextly/adapter-drizzle/schema"; * * const operations: AlterTableOperation[] = [ * { * kind: "add_column", * column: { name: "age", type: "int", nullable: true }, * }, * { * kind: "rename_column", * from: "name", * to: "full_name", * }, * ]; * * await adapter.alterTable("users", operations); * ``` * * @packageDocumentation */ /** * Column definition for schema operations. * * @remarks * Defines the structure of a database column in a database-agnostic way. * Adapters translate these definitions to dialect-specific DDL. * * @example * ```typescript * const idColumn: ColumnDefinition = { * name: "id", * type: "uuid", * primaryKey: true, * }; * * const emailColumn: ColumnDefinition = { * name: "email", * type: "varchar(255)", * unique: true, * }; * ``` * * @public */ /** * Schema utilities version. * * @remarks * This version tracks the schema utilities module independently * from the main adapter package version. * * @internal */ declare const SCHEMA_VERSION: "0.1.0"; /** * Indicates whether schema builder utilities are available. * * @remarks * Currently `false` - schema builder utilities will be implemented * * @internal */ declare const SCHEMA_BUILDER_AVAILABLE: false; export { SCHEMA_BUILDER_AVAILABLE, SCHEMA_VERSION };