Skip to content

Instantly share code, notes, and snippets.

@krisrice
Last active March 8, 2016 16:42
Show Gist options
  • Save krisrice/b60f3f88bd5609bd8e71 to your computer and use it in GitHub Desktop.
Save krisrice/b60f3f88bd5609bd8e71 to your computer and use it in GitHub Desktop.
set define ^
set sqlformat ansiconsole
//script longops.js klrice klrice
script
var dbUser="NOONE";
var ps1="";
if ( conn ) {
dbUser = util.executeReturnOneCol('select user from dual');
}
if ( conn && dbUser == 'KLRICE' ) {
ps1 = 'set sqlprompt "@|red _USER|@@@|green _CONNECT_IDENTIFIER|@@|blue 🍻🍺 >|@"';
} else if ( dbUser == 'JEFF') {
ps1 = 'set sqlprompt "@|RED _USER|@@@|green _CONNECT_IDENTIFIER|@@|blue 💩 >|@"';
} else if ( dbUser == 'DOM') {
ps1 = 'set sqlprompt "@|RED _USER|@@@|green _CONNECT_IDENTIFIER|@@|blue 🍷 >|@"';
} else if ( dbUser == 'PENNY') {
ps1 = 'set sqlprompt "@|RED _USER|@@@|green _CONNECT_IDENTIFIER|@@|blue 🚲 >|@"';
} else if ( dbUser == 'BARRY') {
ps1 = 'set sqlprompt "@|RED _USER|@@@|green _CONNECT_IDENTIFIER|@@|blue 🍀>|@"';
} else if ( conn ) {
ps1 = 'set sqlprompt "@|blue _USER|@@@|green _CONNECT_IDENTIFIER|@@|blue 🍼 >|@"';
} else {
ps1 = 'set sqlprompt "@|RED,NEGATIVE_ON Connect Already!!!!|@>"';
}
sqlcl.setStmt(ps1);
sqlcl.run();
/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment