Skip to content

Commit

Permalink
add any for constructor argument to prevent mismatch type of differen…
Browse files Browse the repository at this point in the history
…t driver version
  • Loading branch information
invisal committed Oct 22, 2024
1 parent 620169e commit 3bc7373
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/connections/bigquery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export class BigQueryConnection extends SqlConnection {
* @param keyFileName - Path to a .json, .pem, or .p12 key file.
* @param region - Region for your dataset
*/
constructor(bigQuery: BigQuery) {
constructor(bigQuery: any) {
super();
this.bigQuery = bigQuery;
}
Expand Down
2 changes: 1 addition & 1 deletion src/connections/mongodb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export class MongoDBConnection implements Connection {
client: MongoClient;
defaultDatabase: string;

constructor(client: MongoClient, defaultDatabase: string) {
constructor(client: any, defaultDatabase: string) {
this.client = client;
this.defaultDatabase = defaultDatabase;
}
Expand Down
2 changes: 1 addition & 1 deletion src/connections/motherduck.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export class DuckDBConnection extends PostgreBaseConnection {
client: duckDB.Database;
connection: duckDB.Connection;

constructor(client: duckDB.Database) {
constructor(client: any) {
super();
this.client = client;
this.connection = client.connect();
Expand Down
2 changes: 1 addition & 1 deletion src/connections/mysql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ export class MySQLConnection extends SqlConnection {
public dialect = new MySQLDialect();
queryType = QueryType.positional;

constructor(conn: Connection) {
constructor(conn: any) {
super();
this.conn = conn;
}
Expand Down
2 changes: 1 addition & 1 deletion src/connections/postgre/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export abstract class PostgreBaseConnection extends SqlConnection {
table_schema: string;
constraint_type: string;
}>({
query: `SELECT * FROM information_schema.table_constraints WHERE constraint_schema NOT IN ('information_schema', 'pg_catalog', 'pg_toast');`,
query: `SELECT * FROM information_schema.table_constraints WHERE constraint_schema NOT IN ('information_schema', 'pg_catalog', 'pg_toast') AND constraint_type IN ('FOREIGN KEY', 'PRIMARY KEY', 'UNIQUE');`,
});

// Get the list of foreign key relation
Expand Down
2 changes: 1 addition & 1 deletion src/connections/postgre/postgresql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export class PostgreSQLConnection extends PostgreBaseConnection {
dialect: AbstractDialect = new PostgresDialect();
queryType: QueryType = QueryType.positional;

constructor(pgClient: Client) {
constructor(pgClient: any) {
super();
this.client = pgClient;
}
Expand Down
2 changes: 1 addition & 1 deletion src/connections/sql-base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ export abstract class SqlConnection extends Connection {
async testConnection(): Promise<{ error?: string }> {
try {
await this.connect();
const { error, data } = await this.raw('SELECT 1;');
const { error } = await this.raw('SELECT 1;');
await this.disconnect();
return { error: error ? error.message : undefined };
} catch (error) {
Expand Down
2 changes: 1 addition & 1 deletion src/connections/sqlite/turso.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export class TursoConnection extends SqliteBaseConnection {
client: Client;
dialect: AbstractDialect = new PostgresDialect();

constructor(client: Client) {
constructor(client: any) {
super();
this.client = client;
}
Expand Down

0 comments on commit 3bc7373

Please sign in to comment.