bee.context

class HoneyContext:

Context for Bee framework.

dbname = None
@staticmethod
def get_connection():

get connection.

@staticmethod
def get_placeholder():

get placeholder for current database.

@staticmethod
def is_active_conn(conn):

check the connection whether is active.

Parameters
  • conn: connection
Returns

if connection is active return True, else return False.

@staticmethod
def get_data(local_type: bee.bee_enum.LocalType, key=None):

Retrieve thread local data

Parameters
  • local_type: DataType enum.
  • key: the key of data.
Returns

storage data or None

@staticmethod
def isMySql():
@staticmethod
def isSQLite():
@staticmethod
def isOracle():
@staticmethod
def get_dbname():

get database name.