|
|
@ -303,17 +303,12 @@ export default class NcConfigFactory { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private static addTypeCastConfig(clientType: string, connection) { |
|
|
|
private static addTypeCastConfig(clientType: string, connection) { |
|
|
|
|
|
|
|
// typeCast only works for mysql
|
|
|
|
if (clientType.startsWith('mysql')) { |
|
|
|
if (clientType.startsWith('mysql')) { |
|
|
|
connection = { |
|
|
|
connection = { |
|
|
|
...connection, |
|
|
|
...connection, |
|
|
|
...this.mysqlConnectionTypeCastConfig, |
|
|
|
...this.mysqlConnectionTypeCastConfig, |
|
|
|
}; |
|
|
|
}; |
|
|
|
} else { |
|
|
|
|
|
|
|
// for postgres - see `setTypeParser` in `CustomKnex.ts`
|
|
|
|
|
|
|
|
connection = { |
|
|
|
|
|
|
|
...connection, |
|
|
|
|
|
|
|
timezone: 'UTC', |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
return connection; |
|
|
|
return connection; |
|
|
|
} |
|
|
|
} |
|
|
|