Sindbad~EG File Manager
from sqlalchemy import create_engine, MetaData, Table, insert, select,update,delete,text
from sqlalchemy.sql import and_, or_
from core import app
import json
engine = create_engine(app.config['DATABASE_URI'],pool_size=5000,pool_recycle=3600)
class ConfDashboardModel():
def __init__(self):
try:
self.meta = MetaData()
self.conference = Table("conference", self.meta, autoload_with=engine)
except Exception as e :
print("Table not found",e)
def get_conf_dashboard_data(self,conf_id):
with engine.connect() as conn:
stmt = text("select * from conference_active where conf_id = "+str(conf_id)+";")
result = conn.execute(stmt).all()
return [dict(r._mapping) for r in result] if result else None
def GetConf(self,conf_id,conf_key):
with engine.connect() as conn:
stmt = text("select * from conference c inner join society_applications s on s.conf_id = c.conf_id and app_type_id = 2 inner join mail_setting m on s.mail_setting_id = m.mail_setting_id where c.conf_id = "+str(conf_id)+" and c.conf_key = '"+conf_key+"' limit 1;")
result = conn.execute(stmt)
result = result.one_or_none()
return dict(result._mapping) if result else None
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists