driftsql 1.0.14 → 1.0.16
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/index.d.mts +13 -2
- package/dist/index.d.ts +13 -2
- package/dist/index.mjs +4 -8
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -22,6 +22,17 @@ interface PreparedStatement {
|
|
|
22
22
|
execute<T = any>(params?: any[]): Promise<QueryResult<T>>;
|
|
23
23
|
finalize(): Promise<void>;
|
|
24
24
|
}
|
|
25
|
+
declare class DatabaseError extends Error {
|
|
26
|
+
readonly driverType: string;
|
|
27
|
+
readonly originalError?: Error | undefined;
|
|
28
|
+
constructor(message: string, driverType: string, originalError?: Error | undefined);
|
|
29
|
+
}
|
|
30
|
+
declare class QueryError extends DatabaseError {
|
|
31
|
+
constructor(driverType: string, sql: string, originalError?: Error);
|
|
32
|
+
}
|
|
33
|
+
declare class ConnectionError extends DatabaseError {
|
|
34
|
+
constructor(driverType: string, originalError?: Error);
|
|
35
|
+
}
|
|
25
36
|
|
|
26
37
|
interface PostgresConfig {
|
|
27
38
|
connectionString?: string;
|
|
@@ -156,5 +167,5 @@ declare function createSqliteClient<DT = any>(config: {
|
|
|
156
167
|
}): SQLClient<DT>;
|
|
157
168
|
declare const DriftSQLClient: typeof SQLClient;
|
|
158
169
|
|
|
159
|
-
export { DriftSQLClient, LibSQLDriver, MySQLDriver, PostgresDriver, SQLClient, SqliteDriver, createLibSQLClient, createMySQLClient, createPostgresClient, createSqliteClient, inspectDB, inspectLibSQL, inspectMySQL, inspectPostgres, inspectSQLite };
|
|
160
|
-
export type { ClientOptions, DatabaseDriver, QueryResult };
|
|
170
|
+
export { ConnectionError, DriftSQLClient, LibSQLDriver, MySQLDriver, PostgresDriver, QueryError, SQLClient, SqliteDriver, createLibSQLClient, createMySQLClient, createPostgresClient, createSqliteClient, inspectDB, inspectLibSQL, inspectMySQL, inspectPostgres, inspectSQLite };
|
|
171
|
+
export type { ClientOptions, DatabaseDriver, QueryField, QueryResult };
|
package/dist/index.d.ts
CHANGED
|
@@ -22,6 +22,17 @@ interface PreparedStatement {
|
|
|
22
22
|
execute<T = any>(params?: any[]): Promise<QueryResult<T>>;
|
|
23
23
|
finalize(): Promise<void>;
|
|
24
24
|
}
|
|
25
|
+
declare class DatabaseError extends Error {
|
|
26
|
+
readonly driverType: string;
|
|
27
|
+
readonly originalError?: Error | undefined;
|
|
28
|
+
constructor(message: string, driverType: string, originalError?: Error | undefined);
|
|
29
|
+
}
|
|
30
|
+
declare class QueryError extends DatabaseError {
|
|
31
|
+
constructor(driverType: string, sql: string, originalError?: Error);
|
|
32
|
+
}
|
|
33
|
+
declare class ConnectionError extends DatabaseError {
|
|
34
|
+
constructor(driverType: string, originalError?: Error);
|
|
35
|
+
}
|
|
25
36
|
|
|
26
37
|
interface PostgresConfig {
|
|
27
38
|
connectionString?: string;
|
|
@@ -156,5 +167,5 @@ declare function createSqliteClient<DT = any>(config: {
|
|
|
156
167
|
}): SQLClient<DT>;
|
|
157
168
|
declare const DriftSQLClient: typeof SQLClient;
|
|
158
169
|
|
|
159
|
-
export { DriftSQLClient, LibSQLDriver, MySQLDriver, PostgresDriver, SQLClient, SqliteDriver, createLibSQLClient, createMySQLClient, createPostgresClient, createSqliteClient, inspectDB, inspectLibSQL, inspectMySQL, inspectPostgres, inspectSQLite };
|
|
160
|
-
export type { ClientOptions, DatabaseDriver, QueryResult };
|
|
170
|
+
export { ConnectionError, DriftSQLClient, LibSQLDriver, MySQLDriver, PostgresDriver, QueryError, SQLClient, SqliteDriver, createLibSQLClient, createMySQLClient, createPostgresClient, createSqliteClient, inspectDB, inspectLibSQL, inspectMySQL, inspectPostgres, inspectSQLite };
|
|
171
|
+
export type { ClientOptions, DatabaseDriver, QueryField, QueryResult };
|
package/dist/index.mjs
CHANGED
|
@@ -715,20 +715,16 @@ class SQLClient {
|
|
|
715
715
|
}
|
|
716
716
|
}
|
|
717
717
|
function createPostgresClient(config) {
|
|
718
|
-
|
|
719
|
-
return new SQLClient({ driver: new PostgresDriver2(config) });
|
|
718
|
+
return new SQLClient({ driver: new PostgresDriver(config) });
|
|
720
719
|
}
|
|
721
720
|
function createLibSQLClient(config) {
|
|
722
|
-
|
|
723
|
-
return new SQLClient({ driver: new LibSQLDriver2(config) });
|
|
721
|
+
return new SQLClient({ driver: new LibSQLDriver(config) });
|
|
724
722
|
}
|
|
725
723
|
function createMySQLClient(config) {
|
|
726
|
-
|
|
727
|
-
return new SQLClient({ driver: new MySQLDriver2(config) });
|
|
724
|
+
return new SQLClient({ driver: new MySQLDriver(config) });
|
|
728
725
|
}
|
|
729
726
|
function createSqliteClient(config) {
|
|
730
|
-
|
|
731
|
-
return new SQLClient({ driver: new SqliteDriver2(config) });
|
|
727
|
+
return new SQLClient({ driver: new SqliteDriver(config) });
|
|
732
728
|
}
|
|
733
729
|
const DriftSQLClient = SQLClient;
|
|
734
730
|
|