Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Way to look up builtin adapter info by name
- Loading branch information
mde
committed
Aug 15, 2012
1 parent
a93a06e
commit 5fa9364
Showing
2 changed files
with
51 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
|
||
var adapters | ||
, path = require('path'); | ||
|
||
adapters = new (function () { | ||
|
||
this.getAdapterInfo = function (adapter) { | ||
var ret; | ||
switch (adapter) { | ||
case 'postgres': | ||
case 'postgresql': | ||
case 'pg': | ||
ret = { | ||
name: 'Adapter' | ||
, filePath: path.join('sql', 'postgres') | ||
}; | ||
break; | ||
default: | ||
ret = null; | ||
} | ||
return ret; | ||
}; | ||
|
||
})(); | ||
|
||
module.exports = adapters; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters