22 lines
580 B
Python
22 lines
580 B
Python
import sys
|
|
import os
|
|
sys.path.append(os.path.dirname(os.path.abspath(__file__)) + '/..')
|
|
from database import TradeDB
|
|
|
|
db = TradeDB()
|
|
try:
|
|
tables = [
|
|
"ls_ws_ticks", "ls_ws_orderbook", "ws_orderbooks",
|
|
"target_candidates", "target_candidates_ls"
|
|
]
|
|
|
|
for tbl in tables:
|
|
try:
|
|
cols = [dict(r)["Field"] for r in db.conn.execute(f"SHOW COLUMNS FROM {tbl}").fetchall()]
|
|
print(f"{tbl} cols: {cols}")
|
|
except Exception as e:
|
|
print(f"Error getting cols for {tbl}: {e}")
|
|
|
|
finally:
|
|
db.close()
|