mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-03 22:37:03 +00:00
Merge pull request #23907 from shreyjain1994/master
Add additional typings for config options for `Knex`
This commit is contained in:
Vendored
+3
@@ -5,6 +5,7 @@
|
||||
// Pablo Rodríguez <https://github.com/MeLlamoPablo>
|
||||
// Matt R. Wilson <https://github.com/mastermatt>
|
||||
// Satana Charuwichitratana <https://github.com/micksatana>
|
||||
// Shrey Jain <https://github.com/shreyjain1994>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
@@ -524,6 +525,8 @@ declare namespace Knex {
|
||||
MySqlConnectionConfig | MsSqlConnectionConfig | Sqlite3ConnectionConfig | SocketConnectionConfig;
|
||||
pool?: PoolConfig;
|
||||
migrations?: MigratorConfig;
|
||||
postProcessResponse?: (result: any, queryContext: any) => any;
|
||||
wrapIdentifier?: (value: string, origImpl: (value: string) => string, queryContext: any) => string;
|
||||
seeds?: SeedsConfig;
|
||||
acquireConnectionTimeout?: number;
|
||||
useNullAsDefault?: boolean;
|
||||
|
||||
@@ -126,6 +126,22 @@ var knex = Knex({
|
||||
searchPath: ['public', 'private'],
|
||||
});
|
||||
|
||||
// postProcessResponse
|
||||
var knex = Knex({
|
||||
client: 'pg',
|
||||
postProcessResponse: function(result, queryContext){
|
||||
return result;
|
||||
}
|
||||
});
|
||||
|
||||
// wrapIdentifier
|
||||
var knex = Knex({
|
||||
client: 'pg',
|
||||
wrapIdentifier: function(value, origImpl, queryContext){
|
||||
return origImpl(value + 'foo');
|
||||
}
|
||||
});
|
||||
|
||||
// useNullAsDefault
|
||||
var knex = Knex({
|
||||
client: 'sqlite',
|
||||
|
||||
Reference in New Issue
Block a user