Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private string function $getDBType() {
- local.info = $dbinfo(
- type="version",
- datasource=application.wheels.dataSourceName,
- username=application.wheels.dataSourceUserName,
- password=application.wheels.dataSourcePassword
- );
- if (local.info.driver_name Contains "SQLServer" || local.info.driver_name Contains "Microsoft SQL Server" || local.info.driver_name Contains "MS SQL Server" || local.info.database_productname Contains "Microsoft SQL Server") {
- local.adapterName = "MicrosoftSQLServer";
- } else if (local.info.driver_name Contains "MySQL") {
- local.adapterName = "MySQL";
- } else if (local.info.driver_name Contains "Oracle") {
- local.adapterName = "Oracle";
- } else if (local.info.driver_name Contains "PostgreSQL") {
- local.adapterName = "PostgreSQL";
- } else if (local.info.driver_name Contains "SQLite") {
- local.adapterName = "SQLite";
- // NB: using mySQL adapter for H2 as the cli defaults to this for development
- } else if (local.info.driver_name Contains "H2") {
- local.adapterName = "H2";
- } else {
- local.adapterName = "";
- }
- return local.adapterName;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement