()
| 81 | * @returns {object} Knex's PostgreSQL client |
| 82 | */ |
| 83 | const connect = async () => { |
| 84 | if (!credConfig) credConfig = getCredConfig(); |
| 85 | if (process.env.DB_HOST) { |
| 86 | return connectWithTcp(credConfig); |
| 87 | } else { |
| 88 | return connectWithUnixSockets(credConfig); |
| 89 | } |
| 90 | }; |
| 91 | |
| 92 | /** |
| 93 | * Insert a vote record into the database. |
no test coverage detected