From 05a55f64340f4eaa71e79e5e4d13b7beee733251 Mon Sep 17 00:00:00 2001 From: Joe Tretter Date: Wed, 10 Jun 2020 14:29:15 -0500 Subject: [PATCH] remove symbol friendlyname translation; implemented on DB. --- client/js/masterFilter.js | 12 ++++++------ server/quoteDBs/fillBigDB_initial.sh | 2 +- server/quoteDBs/fillBigDB_update.sh | 3 ++- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/client/js/masterFilter.js b/client/js/masterFilter.js index 2a36f4a..ee222a1 100644 --- a/client/js/masterFilter.js +++ b/client/js/masterFilter.js @@ -197,19 +197,19 @@ let createMasterFilterFrame=()=>{ }); } - me.toFriendlyName=(symbol)=>{ + me.toFriendlyName=(symbol)=>{ // not really required anymore because I replace the name on DB now. let symbolDisplayName=symbol; - if (symbolDisplayName==="$XSP.X") { + /* if (symbolDisplayName==="$XSP.X") { symbolDisplayName="XSP"; - } + } */ return(symbolDisplayName); } - me.toBrokerName=(symbol)=>{ + me.toBrokerName=(symbol)=>{ // not really required anymore because I replace the name on DB now. let symbolBrokerName=symbol; - if (symbolBrokerName==="XSP") { + /*if (symbolBrokerName==="XSP") { symbolBrokerName="$XSP.X"; - } + } */ return(symbolBrokerName); } diff --git a/server/quoteDBs/fillBigDB_initial.sh b/server/quoteDBs/fillBigDB_initial.sh index 422e26c..a4ef00c 100644 --- a/server/quoteDBs/fillBigDB_initial.sh +++ b/server/quoteDBs/fillBigDB_initial.sh @@ -9,7 +9,7 @@ ls quoteStore_202*.sqlite3.gz | while read db; do echo unpacking $db gzip -dc $db >/tmp/xx.sqlite3 echo processing... - sqlite3 /tmp/xx.sqlite3 'create table tmp as select timestamp,symbol,data from OptionQuotes;' + sqlite3 /tmp/xx.sqlite3 "create table tmp as select timestamp,replace(replace(symbol,'$',''),'.X','') symbol,data from OptionQuotes;" sqlite3 /tmp/xx.sqlite3 'drop table OptionQuotes;' sqlite3 /tmp/xx.sqlite3 'alter table tmp rename to OptionQuotes;' sqlite3 /tmp/xx.sqlite3 '.dump OptionQuotes' | sqlite3 consolidated.sqlite3 diff --git a/server/quoteDBs/fillBigDB_update.sh b/server/quoteDBs/fillBigDB_update.sh index 84e596e..9a29512 100644 --- a/server/quoteDBs/fillBigDB_update.sh +++ b/server/quoteDBs/fillBigDB_update.sh @@ -13,7 +13,8 @@ find . -maxdepth 1 -name 'quoteStore_202*.sqlite3.gz' | while read db; do echo unpacking $db gzip -dc $db >/tmp/xx.sqlite3 echo processing... - sqlite3 /tmp/xx.sqlite3 'create table tmp as select timestamp,symbol,data from OptionQuotes;' + sqlite3 /tmp/xx.sqlite3 "create table tmp as select timestamp,replace(replace(symbol,'$',''),'.X','') symbol,data from OptionQuotes;" + sqlite3 /tmp/xx.sqlite3 'drop table OptionQuotes;' sqlite3 /tmp/xx.sqlite3 'alter table tmp rename to OptionQuotes;' sqlite3 /tmp/xx.sqlite3 '.dump OptionQuotes' | sqlite3 consolidated.sqlite3