2023-06-28 12:59:53 +02:00
|
|
|
import { Datasource, SourceName } from "@budibase/types"
|
2023-03-29 20:58:24 +02:00
|
|
|
|
|
|
|
export function isGoogleSheets(type: SourceName) {
|
|
|
|
return type === SourceName.GOOGLE_SHEETS
|
|
|
|
}
|
2023-06-28 12:59:53 +02:00
|
|
|
|
|
|
|
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
|
|
|
|
}
|