budibase/packages/shared-core/src/helpers/integrations.ts

19 lines
471 B
TypeScript
Raw Normal View History

import { Datasource, SourceName } from "@budibase/types"
export function isGoogleSheets(type: SourceName) {
return type === SourceName.GOOGLE_SHEETS
}
export function isSQL(datasource: Datasource): boolean {
if (!datasource || !datasource.source) {
return false
}
const SQL = [
SourceName.POSTGRES,
SourceName.SQL_SERVER,
SourceName.MYSQL,
SourceName.ORACLE,
]
2023-09-27 03:26:40 +02:00
return SQL.indexOf(datasource.source) !== -1 || datasource.isSQL === true
}