Aestate
Public Member Functions | Public Attributes | Private Attributes | List of all members
aestate.work.Manage.Pojo Class Reference
Inheritance diagram for aestate.work.Manage.Pojo:
Inheritance graph
Collaboration diagram for aestate.work.Manage.Pojo:
Collaboration graph

Public Member Functions

def __init__ (self, config_obj=None, log_conf=None, close_log=False, serializer=QuerySet, **kwargs)
 
def init_fields (self)
 
def to_json (self, bf=False)
 
def to_dict (self)
 
dict getFields (self)
 
def add_field (self, key, default_value=None)
 
def remove_field (self, key)
 
def orm (self)
 
def format (self, key, name)
 
def get_tb_name (self)
 
def get_database (self)
 
def __new__ (cls, *args, **kwargs)
 
- Public Member Functions inherited from aestate.work.repository.Repository
def __init__ (self, config_obj=None, instance=None, log_conf=None, close_log=False, serializer=QuerySet, **kwargs)
 
def conversion (self)
 
def first (self)
 
def last (self)
 
QuerySet find_all (self, **kwargs)
 
QuerySet find_field (self, *args, **kwargs)
 
def find_one (self, sql, **kwargs)
 
QuerySet find_many (self, sql, **kwargs)
 
QuerySet find_sql (self, sql, **kwargs)
 
def update (self, key=None)
 
def remove (self, key=None)
 
def save (self, *args, **kwargs)
 
def create (self, pojo, **kwargs)
 
def copy (self, **kwargs)
 
def execute_sql (self, sql, params=None, mode=EX_MODEL.SELECT, **kwargs)
 
def foreign_key (self, cls, key_name, field_name=None, data=None, operation=None)
 

Public Attributes

 serializer
 
- Public Attributes inherited from aestate.work.repository.Repository
 ParseUtil
 
 db_util
 
 result
 
 datas
 

Private Attributes

 __table_name__
 
 __table_msg__
 
 _fields
 
 __ignore_field__
 
 __append_field__
 

Detailed Description

Definition at line 14 of file Manage.py.

Constructor & Destructor Documentation

◆ __init__()

def aestate.work.Manage.Pojo.__init__ (   self,
  config_obj = None,
  log_conf = None,
  close_log = False,
  serializer = QuerySet,
**  kwargs 
)
初始化ORM框架
:param config_obj:配置类
:param log_conf:日志配置类
:param close_log:是否关闭日志显示功能
:param serializer:自定义序列化器,默认使用aestate.work.Serialize.QuerySet

Definition at line 15 of file Manage.py.

Member Function Documentation

◆ __new__()

def aestate.work.Manage.Pojo.__new__ (   cls,
args,
**  kwargs 
)

Definition at line 153 of file Manage.py.

◆ add_field()

def aestate.work.Manage.Pojo.add_field (   self,
  key,
  default_value = None 
)
添加一个不会被解析忽略的字段

Definition at line 105 of file Manage.py.

◆ format()

def aestate.work.Manage.Pojo.format (   self,
  key,
  name 
)
为指定字段的值设置别名

Definition at line 125 of file Manage.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_database()

def aestate.work.Manage.Pojo.get_database (   self)
获取当前pojo的数据库连接对象

Definition at line 143 of file Manage.py.

◆ get_tb_name()

def aestate.work.Manage.Pojo.get_tb_name (   self)
获取当前pojo的表名

Definition at line 137 of file Manage.py.

◆ getFields()

dict aestate.work.Manage.Pojo.getFields (   self)
获取当前类所需要序列化的字段

Definition at line 99 of file Manage.py.

Here is the caller graph for this function:

◆ init_fields()

def aestate.work.Manage.Pojo.init_fields (   self)
初始化字段
最后生成的字段名`_fields`

Definition at line 49 of file Manage.py.

◆ orm()

def aestate.work.Manage.Pojo.orm (   self)
转ORM框架

Definition at line 119 of file Manage.py.

◆ remove_field()

def aestate.work.Manage.Pojo.remove_field (   self,
  key 
)
添加一个会被解析忽略的字段

Definition at line 112 of file Manage.py.

◆ to_dict()

def aestate.work.Manage.Pojo.to_dict (   self)
将数据集转字典格式

Definition at line 93 of file Manage.py.

Here is the call graph for this function:

◆ to_json()

def aestate.work.Manage.Pojo.to_json (   self,
  bf = False 
)
将此叶子节点转json处理

Definition at line 70 of file Manage.py.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ __append_field__

aestate.work.Manage.Pojo.__append_field__
private

Definition at line 37 of file Manage.py.

◆ __ignore_field__

aestate.work.Manage.Pojo.__ignore_field__
private

Definition at line 35 of file Manage.py.

◆ __table_msg__

aestate.work.Manage.Pojo.__table_msg__
private

Definition at line 29 of file Manage.py.

◆ __table_name__

aestate.work.Manage.Pojo.__table_name__
private

Definition at line 27 of file Manage.py.

◆ _fields

aestate.work.Manage.Pojo._fields
private

Definition at line 31 of file Manage.py.

◆ serializer

aestate.work.Manage.Pojo.serializer

Definition at line 33 of file Manage.py.


The documentation for this class was generated from the following file: