Fixes in documentation for db model
This commit is contained in:
parent
ae3bf3f6c3
commit
3433b3150a
6 changed files with 159 additions and 2 deletions
|
|
@ -11,6 +11,10 @@ import copy
|
|||
import traceback
|
||||
|
||||
class PhangoField:
|
||||
"""Base class for fields used in WebModel classes
|
||||
|
||||
PhangoField is a class with all elements and variables that you can imagine for a
|
||||
"""
|
||||
|
||||
def __init__(self, name, size=255, required=False):
|
||||
|
||||
|
|
@ -1099,6 +1103,14 @@ class WebModel:
|
|||
#Check of all fields in table.
|
||||
|
||||
def check_all_fields(self, dict_values, external_agent, yes_update=False, errors_set="insert"):
|
||||
"""Method for check all fields of a model for insert or update a row in table db.
|
||||
|
||||
Args:
|
||||
dict_values (dict): The dict of values to check
|
||||
external_agent (bool): If True, the query is considered manipulated by external agent and the checks are stricts, if not, checks are not stricts
|
||||
yes_update (bool): If True, the check need be done for update sql sentence, if False, the check is done for insert sql sentence
|
||||
errors_set (str): If insert value, the errors are set for insert sql statement, if update value, then the errors are set for update sql statement.
|
||||
"""
|
||||
|
||||
fields=[]
|
||||
values=[]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue