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