Typings
This commit is contained in:
parent
640911f1dd
commit
239a51a2c0
|
@ -18,7 +18,7 @@ import Sql from "./base/sql"
|
|||
import { PostgresColumn } from "./base/types"
|
||||
import { escapeDangerousCharacters } from "../utilities"
|
||||
|
||||
const { Client, types } = require("pg")
|
||||
import { Client, types } from "pg"
|
||||
|
||||
// Return "date" and "timestamp" types as plain strings.
|
||||
// This lets us reference the original stored timezone.
|
||||
|
@ -114,7 +114,7 @@ const SCHEMA: Integration = {
|
|||
}
|
||||
|
||||
class PostgresIntegration extends Sql implements DatasourcePlus {
|
||||
private readonly client: any
|
||||
private readonly client: Client
|
||||
private readonly config: PostgresConfig
|
||||
private index: number = 1
|
||||
private open: boolean
|
||||
|
@ -163,7 +163,7 @@ class PostgresIntegration extends Sql implements DatasourcePlus {
|
|||
if (!this.config.schema) {
|
||||
this.config.schema = "public"
|
||||
}
|
||||
this.client.query(`SET search_path TO ${this.config.schema}`)
|
||||
await this.client.query(`SET search_path TO ${this.config.schema}`)
|
||||
this.COLUMNS_SQL = `select * from information_schema.columns where table_schema = '${this.config.schema}'`
|
||||
this.open = true
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ export const backfill = async (appDb: any, timestamp: string | number) => {
|
|||
datasource = {
|
||||
type: "unknown",
|
||||
_id: query.datasourceId,
|
||||
source: SourceName.UNKNOWN,
|
||||
source: "unknown" as SourceName,
|
||||
}
|
||||
} else {
|
||||
throw e
|
||||
|
|
|
@ -55,7 +55,6 @@ export enum SourceName {
|
|||
FIRESTORE = "FIRESTORE",
|
||||
REDIS = "REDIS",
|
||||
SNOWFLAKE = "SNOWFLAKE",
|
||||
UNKNOWN = "unknown",
|
||||
}
|
||||
|
||||
export enum IncludeRelationship {
|
||||
|
|
Loading…
Reference in New Issue