forked from sqlpad/sqlpad
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
39 lines (35 loc) · 1.1 KB
/
index.js
File metadata and controls
39 lines (35 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
const appLog = require('../lib/app-log');
const validate = require('./validate');
const drivers = {
athena: require('./athena'),
bigquery: require('./bigquery'),
cassandra: require('./cassandra'),
clickhouse: require('./clickhouse'),
crate: require('./crate'),
drill: require('./drill'),
hdb: require('./hdb'),
mysql: require('./mysql'),
mysql2: require('./mysql2'),
pinot: require('./pinot'),
postgres: require('./postgres'),
presto: require('./presto'),
redshift: require('./redshift'),
snowflake: require('./snowflake'),
sqlite: require('./sqlite'),
sqlserver: require('./sqlserver'),
trino: require('./trino'),
vertica: require('./vertica'),
};
// unixodbc is an optional dependency due to it needing to be compiled
// (and lacks prebuilt binaries like sqlite provides)
try {
drivers.unixodbc = require('./unixodbc');
} catch (error) {
appLog.info('ODBC driver not available');
}
// Validate each driver implementation to ensure it matches expectations
Object.keys(drivers).forEach((id) => {
const driver = drivers[id];
validate(id, driver);
});
module.exports = drivers;