1
0
Fork 0
mirror of synced 2024-09-26 06:11:49 +12:00
budibase/packages/shared-core/src/helpers/integrations.ts

19 lines
442 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,
]
return SQL.indexOf(datasource.source) !== -1
}