You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
442 B
Python

# -*- coding: utf-8 -*-
import logging
from website.db import get_session
from sqlalchemy import text
class EnterpriseEntityDB(object):
def __init__(self):
pass
def select_entity_suid(self, entity_id: int) -> str:
with get_session() as session:
res = session.execute(text("select suid from enterprise where id=:id"),
{"id": entity_id})
return res.fetchone()["suid"]