@ereo/db 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/pool.d.ts ADDED
@@ -0,0 +1,139 @@
1
+ /**
2
+ * @ereo/db - Connection Pool Primitives
3
+ *
4
+ * Abstract connection pooling utilities that adapters can extend.
5
+ * Provides retry logic, health monitoring, and edge-optimized configurations.
6
+ */
7
+ import type { PoolConfig, HealthCheckResult } from './types';
8
+ /**
9
+ * Default pool configuration for server environments.
10
+ */
11
+ export declare const DEFAULT_POOL_CONFIG: Required<PoolConfig>;
12
+ /**
13
+ * Create pool configuration optimized for edge environments.
14
+ * Edge runtimes have limited connection lifetime, so we use aggressive settings.
15
+ */
16
+ export declare function createEdgePoolConfig(overrides?: Partial<PoolConfig>): PoolConfig;
17
+ /**
18
+ * Create pool configuration for serverless environments.
19
+ * Optimized for environments like AWS Lambda, Vercel Functions.
20
+ */
21
+ export declare function createServerlessPoolConfig(overrides?: Partial<PoolConfig>): PoolConfig;
22
+ /**
23
+ * Pool statistics for monitoring.
24
+ */
25
+ export interface PoolStats {
26
+ /** Number of connections currently in use */
27
+ active: number;
28
+ /** Number of idle connections available */
29
+ idle: number;
30
+ /** Total connections (active + idle) */
31
+ total: number;
32
+ /** Number of requests waiting for a connection */
33
+ waiting: number;
34
+ /** Total connections created over pool lifetime */
35
+ totalCreated: number;
36
+ /** Total connections closed over pool lifetime */
37
+ totalClosed: number;
38
+ }
39
+ /**
40
+ * Abstract connection pool that adapters can extend.
41
+ * Provides common pooling functionality.
42
+ *
43
+ * @template T - The connection type
44
+ */
45
+ export declare abstract class ConnectionPool<T> {
46
+ protected config: Required<PoolConfig>;
47
+ protected connections: T[];
48
+ protected activeConnections: Set<T>;
49
+ protected waitQueue: Array<{
50
+ resolve: (conn: T) => void;
51
+ reject: (err: Error) => void;
52
+ timeout: ReturnType<typeof setTimeout>;
53
+ }>;
54
+ protected closed: boolean;
55
+ protected stats: {
56
+ totalCreated: number;
57
+ totalClosed: number;
58
+ };
59
+ constructor(config?: PoolConfig);
60
+ /**
61
+ * Create a new connection.
62
+ * Implement this in subclasses.
63
+ */
64
+ protected abstract createConnection(): Promise<T>;
65
+ /**
66
+ * Close a connection.
67
+ * Implement this in subclasses.
68
+ */
69
+ protected abstract closeConnection(connection: T): Promise<void>;
70
+ /**
71
+ * Validate that a connection is still healthy.
72
+ * Implement this in subclasses.
73
+ */
74
+ protected abstract validateConnection(connection: T): Promise<boolean>;
75
+ /**
76
+ * Acquire a connection from the pool.
77
+ */
78
+ acquire(): Promise<T>;
79
+ /**
80
+ * Release a connection back to the pool.
81
+ */
82
+ release(connection: T): Promise<void>;
83
+ /**
84
+ * Close the pool and all connections.
85
+ */
86
+ close(): Promise<void>;
87
+ /**
88
+ * Get pool statistics.
89
+ */
90
+ getStats(): PoolStats;
91
+ /**
92
+ * Check if the pool is healthy.
93
+ */
94
+ healthCheck(): Promise<HealthCheckResult>;
95
+ /**
96
+ * Create a new connection and acquire it.
97
+ */
98
+ private createAndAcquire;
99
+ /**
100
+ * Wait for a connection to become available.
101
+ */
102
+ private waitForConnection;
103
+ /**
104
+ * Schedule idle timeout for a connection.
105
+ */
106
+ private scheduleIdleTimeout;
107
+ /**
108
+ * Utility delay function.
109
+ */
110
+ private delay;
111
+ }
112
+ /**
113
+ * Retry configuration for database operations.
114
+ */
115
+ export interface RetryConfig {
116
+ /** Maximum number of retry attempts */
117
+ maxAttempts: number;
118
+ /** Base delay between retries in milliseconds */
119
+ baseDelayMs: number;
120
+ /** Maximum delay between retries in milliseconds */
121
+ maxDelayMs: number;
122
+ /** Whether to use exponential backoff */
123
+ exponential: boolean;
124
+ /** Function to determine if an error is retryable */
125
+ isRetryable?: (error: Error) => boolean;
126
+ }
127
+ /**
128
+ * Default retry configuration.
129
+ */
130
+ export declare const DEFAULT_RETRY_CONFIG: RetryConfig;
131
+ /**
132
+ * Execute an operation with retry logic.
133
+ */
134
+ export declare function withRetry<T>(operation: () => Promise<T>, config?: Partial<RetryConfig>): Promise<T>;
135
+ /**
136
+ * Common retryable error patterns for databases.
137
+ */
138
+ export declare function isCommonRetryableError(error: Error): boolean;
139
+ //# sourceMappingURL=pool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pool.d.ts","sourceRoot":"","sources":["../src/pool.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAO7D;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,UAAU,CAMpD,CAAC;AAEF;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,GAAG,UAAU,CAWhF;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,GAAG,UAAU,CAStF;AAMD;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,6CAA6C;IAC7C,MAAM,EAAE,MAAM,CAAC;IACf,2CAA2C;IAC3C,IAAI,EAAE,MAAM,CAAC;IACb,wCAAwC;IACxC,KAAK,EAAE,MAAM,CAAC;IACd,kDAAkD;IAClD,OAAO,EAAE,MAAM,CAAC;IAChB,mDAAmD;IACnD,YAAY,EAAE,MAAM,CAAC;IACrB,kDAAkD;IAClD,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;;;GAKG;AACH,8BAAsB,cAAc,CAAC,CAAC;IACpC,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC,UAAU,CAAC,CAAC;IACvC,SAAS,CAAC,WAAW,EAAE,CAAC,EAAE,CAAM;IAChC,SAAS,CAAC,iBAAiB,SAAgB;IAC3C,SAAS,CAAC,SAAS,EAAE,KAAK,CAAC;QACzB,OAAO,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,CAAC;QAC3B,MAAM,EAAE,CAAC,GAAG,EAAE,KAAK,K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;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,WAKlC,CAAC;AAEF;;GAEG;AACH,wBAAsB,SAAS,CAAC,CAAC,EAC/B,SAAS,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EAC3B,MAAM,GAAE,OAAO,CAAC,WAAW,CAAM,GAChC,OAAO,CAAC,CAAC,CAAC,CAkCZ;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CA6B5D"}
@@ -0,0 +1,168 @@
1
+ /**
2
+ * @ereo/db - Type definitions
3
+ *
4
+ * Core type utilities for database adapters with end-to-end type safety.
5
+ */
6
+ /** Result of a SELECT query */
7
+ export interface QueryResult<T = unknown> {
8
+ rows: T[];
9
+ rowCount: number;
10
+ }
11
+ /** Result of an INSERT/UPDATE/DELETE mutation */
12
+ export interface MutationResult {
13
+ rowsAffected: number;
14
+ lastInsertId?: number | bigint;
15
+ }
16
+ /** Result wrapper that includes deduplication metadata */
17
+ export interface DedupResult<T> {
18
+ result: T;
19
+ /** Whether this result was served from the request-scoped cache */
20
+ fromCache: boolean;
21
+ /** Cache key used for deduplication */
22
+ cacheKey: string;
23
+ }
24
+ /** Connection pool configuration */
25
+ export interface PoolConfig {
26
+ /** Minimum number of connections to maintain */
27
+ min?: number;
28
+ /** Maximum number of connections allowed */
29
+ max?: number;
30
+ /** How long a connection can be idle before being closed (ms) */
31
+ idleTimeoutMs?: number;
32
+ /** How long to wait for a connection from the pool (ms) */
33
+ acquireTimeoutMs?: number;
34
+ /** Maximum number of times to retry acquiring a connection */
35
+ acquireRetries?: number;
36
+ }
37
+ /** Transaction isolation levels */
38
+ export type IsolationLevel = 'read uncommitted' | 'read committed' | 'repeatable read' | 'serializable';
39
+ /** Transaction configuration options */
40
+ export interface TransactionOptions {
41
+ /** Isolation level for the transaction */
42
+ isolationLevel?: IsolationLevel;
43
+ /** Whether the transaction is read-only */
44
+ readOnly?: boolean;
45
+ /** Timeout for the transaction in milliseconds */
46
+ timeout?: number;
47
+ }
48
+ /** Base adapter configuration */
49
+ export interface AdapterConfig {
50
+ /** Database connection URL */
51
+ url: string;
52
+ /** Enable debug logging */
53
+ debug?: boolean;
54
+ /** Connection pool configuration */
55
+ pool?: PoolConfig;
56
+ /** Whether this adapter is edge-compatible */
57
+ edgeCompatible?: boolean;
58
+ }
59
+ /**
60
+ * Infer the select type from a Drizzle table.
61
+ * This maps to `typeof table.$inferSelect` in Drizzle.
62
+ */
63
+ export type InferSelect<T extends {
64
+ $inferSelect: unknown;
65
+ }> = T['$inferSelect'];
66
+ /**
67
+ * Infer the insert type from a Drizzle table.
68
+ * This maps to `typeof table.$inferInsert` in Drizzle.
69
+ */
70
+ export type InferInsert<T extends {
71
+ $inferInsert: unknown;
72
+ }> = T['$inferInsert'];
73
+ /**
74
+ * Module augmentation target for typed database tables.
75
+ * Users can augment this interface to get type-safe table access.
76
+ *
77
+ * @example
78
+ * declare module '@ereo/db' {
79
+ * interface DatabaseTables {
80
+ * users: typeof import('./schema').users;
81
+ * posts: typeof import('./schema').posts;
82
+ * }
83
+ * }
84
+ */
85
+ export interface DatabaseTables {
86
+ }
87
+ /** Get typed table names from the registry */
88
+ export type TableNames = keyof DatabaseTables extends never ? string : keyof DatabaseTables;
89
+ /** Get table type by name from the registry */
90
+ export type TableType<T extends TableNames> = T extends keyof DatabaseTables ? DatabaseTables[T] : unknown;
91
+ /** Typed WHERE clause conditions */
92
+ export type TypedWhere<T> = {
93
+ [K in keyof T]?: T[K] | WhereOperator<T[K]>;
94
+ } & {
95
+ AND?: TypedWhere<T>[];
96
+ OR?: TypedWhere<T>[];
97
+ NOT?: TypedWhere<T>;
98
+ };
99
+ /** WHERE clause operators */
100
+ export interface WhereOperator<T> {
101
+ eq?: T;
102
+ ne?: T;
103
+ gt?: T;
104
+ gte?: T;
105
+ lt?: T;
106
+ lte?: T;
107
+ in?: T[];
108
+ notIn?: T[];
109
+ like?: string;
110
+ ilike?: string;
111
+ isNull?: boolean;
112
+ isNotNull?: boolean;
113
+ between?: [T, T];
114
+ }
115
+ /** Typed ORDER BY clause */
116
+ export type TypedOrderBy<T> = {
117
+ [K in keyof T]?: 'asc' | 'desc';
118
+ };
119
+ /** Typed SELECT fields */
120
+ export type TypedSelect<T> = (keyof T)[] | '*';
121
+ /** Statistics about query deduplication for a request */
122
+ export interface DedupStats {
123
+ /** Total number of queries attempted */
124
+ total: number;
125
+ /** Number of queries served from cache */
126
+ deduplicated: number;
127
+ /** Number of unique queries executed */
128
+ unique: number;
129
+ /** Cache hit rate (0-1) */
130
+ hitRate: number;
131
+ }
132
+ /** Result of a database health check */
133
+ export interface HealthCheckResult {
134
+ /** Whether the database is healthy */
135
+ healthy: boolean;
136
+ /** Time taken for the health check in milliseconds */
137
+ latencyMs: number;
138
+ /** Error message if unhealthy */
139
+ error?: string;
140
+ /** Additional metadata */
141
+ metadata?: Record<string, unknown>;
142
+ }
143
+ /** Base database error */
144
+ export declare class DatabaseError extends Error {
145
+ readonly code?: string | undefined;
146
+ readonly cause?: Error | undefined;
147
+ constructor(message: string, code?: string | undefined, cause?: Error | undefined);
148
+ }
149
+ /** Connection-related errors */
150
+ export declare class ConnectionError extends DatabaseError {
151
+ constructor(message: string, cause?: Error);
152
+ }
153
+ /** Query execution errors */
154
+ export declare class QueryError extends DatabaseError {
155
+ readonly query?: string | undefined;
156
+ readonly params?: unknown[] | undefined;
157
+ constructor(message: string, query?: string | undefined, params?: unknown[] | undefined, cause?: Error);
158
+ }
159
+ /** Transaction errors */
160
+ export declare class TransactionError extends DatabaseError {
161
+ constructor(message: string, cause?: Error);
162
+ }
163
+ /** Timeout errors */
164
+ export declare class TimeoutError extends DatabaseError {
165
+ readonly timeoutMs: number;
166
+ constructor(message: string, timeoutMs: number);
167
+ }
168
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,+B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,YAAA;CAKhC;AAED,gCAAgC;AAChC,qBAAa,eAAgB,SAAQ,aAAa;gBACpC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK;CAI3C;AAED,6BAA6B;AAC7B,qBAAa,UAAW,SAAQ,aAAa;aAGzB,KAAK,CAAC,EAAE,MAAM;aACd,MAAM,CAAC,EAAE,OAAO,EAAE;gBAFlC,OAAO,EAAE,MAAM,EACC,KAAK,CAAC,EAAE,MAAM,YAAA,EACd,MAAM,CAAC,EAAE,OAAO,EAAE,YAAA,EAClC,KAAK,CAAC,EAAE,KAAK;CAKhB;AAED,yBAAyB;AACzB,qBAAa,gBAAiB,SAAQ,aAAa;gBACrC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK;CAI3C;AAED,qBAAqB;AACrB,qBAAa,YAAa,SAAQ,aAAa;aACA,SAAS,EAAE,MAAM;gBAAlD,OAAO,EAAE,MAAM,EAAkB,SAAS,EAAE,MAAM;CAI/D"}
package/package.json ADDED
@@ -0,0 +1,42 @@
1
+ {
2
+ "name": "@ereo/db",
3
+ "version": "0.1.6",
4
+ "license": "MIT",
5
+ "author": "Ereo Team",
6
+ "homepage": "https://ereo.dev",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/ereojs/ereo.git",
10
+ "directory": "packages/db"
11
+ },
12
+ "bugs": {
13
+ "url": "https://github.com/ereojs/ereo/issues"
14
+ },
15
+ "description": "Database adapter abstractions for EreoJS framework",
16
+ "type": "module",
17
+ "main": "./dist/index.js",
18
+ "types": "./dist/index.d.ts",
19
+ "exports": {
20
+ ".": {
21
+ "types": "./dist/index.d.ts",
22
+ "import": "./dist/index.js"
23
+ }
24
+ },
25
+ "files": [
26
+ "dist"
27
+ ],
28
+ "scripts": {
29
+ "build": "bun build ./src/index.ts --outdir ./dist --target bun --external @ereo/core && bun run build:types",
30
+ "build:types": "tsc --emitDeclarationOnly --outDir dist",
31
+ "dev": "bun build ./src/index.ts --outdir ./dist --target bun --watch",
32
+ "test": "bun test",
33
+ "typecheck": "tsc --noEmit"
34
+ },
35
+ "dependencies": {
36
+ "@ereo/core": "workspace:*"
37
+ },
38
+ "devDependencies": {
39
+ "@types/bun": "^1.1.0",
40
+ "typescript": "^5.4.0"
41
+ }
42
+ }