-
Notifications
You must be signed in to change notification settings - Fork 376
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Terminology change from Driver to Adapter
Updated terminology, where third-party database adapters are now called Adapters instead of Drivers.
- Loading branch information
1 parent
44ea464
commit 33a09e9
Showing
5 changed files
with
48 additions
and
50 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
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
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,21 @@ | ||
var aliases = require('./Drivers/aliases'); | ||
|
||
module.exports.add = addAdapter; | ||
module.exports.get = getAdapter; | ||
|
||
|
||
var adapters = {}; | ||
|
||
function addAdapter(name, constructor) { | ||
adapters[name] = constructor; | ||
} | ||
|
||
function getAdapter(name) { | ||
if (name in aliases) { | ||
return getAdapter(aliases[name]); | ||
} else if (!(name in adapters)) { | ||
adapters[name] = require("./Drivers/DML/" + name).Driver; | ||
} | ||
|
||
return adapters[name]; | ||
} |
This file was deleted.
Oops, something went wrong.
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