bee.osql.condition_impl

class Expression:
Expression( field_name: str = None, Op: bee.bee_enum.Op = None, op_type=None, value: Any = None, op_num: int = None, value2: Any = None)
field_name
op_type
op
value
op_num
value2
class PreparedValue:
PreparedValue(typeStr: str, value: Any)
typeStr
value
class ConditionStruct:
ConditionStruct( where: str, pv: List[PreparedValue], values: List, suidType: bee.bee_enum.SuidType, whereFields: Set, selectFields: str, start: int, size: int, has_for_update: bool)
where
pv
values
suidType
whereFields
selectFields
start
size
has_for_update
class ConditionUpdateSetStruct:
ConditionUpdateSetStruct( updateSet: str, pv: List[PreparedValue], values: List, suidType: bee.bee_enum.SuidType, updateSetFields: Set)
updateSet
pv
values
suidType
updateSetFields
class ConditionImpl(bee.condition.Condition):

Condition: used to construct complex WHERE, UPDATE statements and so on.

expressions
where_fields
update_set_exp
update_set_fields
def op( self, field: str, op: bee.bee_enum.Op, value: Any) -> ConditionImpl:
def and_(self) -> ConditionImpl:
def or_(self) -> ConditionImpl:
def not_(self) -> ConditionImpl:
def l_parentheses(self) -> ConditionImpl:
def r_parentheses(self) -> ConditionImpl:
def between( self, field: str, low: Any, high: Any) -> ConditionImpl:
def opWithField( self, field: str, op: bee.bee_enum.Op, field2: str) -> ConditionImpl:
def groupBy(self, field: str) -> ConditionImpl:
def having( self, functionType: bee.bee_enum.FunctionType, field: str, op: bee.bee_enum.Op, value: Any) -> ConditionImpl:

e.g. having(FunctionType.MIN, "field", Op.ge, 60)-->having min(field)>=60

def orderBy(self, field: str) -> ConditionImpl:
def orderBy2( self, field: str, orderType: bee.bee_enum.OrderType) -> ConditionImpl:
def orderBy3( self, functionType: bee.bee_enum.FunctionType, field: str, orderType: bee.bee_enum.OrderType) -> ConditionImpl:

eg: orderBy3(FunctionType.MAX, "total", OrderType.DESC)-->order by max(total) desc

def selectField(self, *fields: str) -> ConditionImpl:
def start(self, start: int) -> ConditionImpl:
def size(self, size: int) -> ConditionImpl:
def forUpdate(self) -> ConditionImpl:
def suidType( self, suidType: bee.bee_enum.SuidType) -> ConditionImpl:
def getSuidType(self) -> bee.bee_enum.SuidType:
def setAdd(self, field: str, value: int) -> ConditionImpl:
def setMultiply(self, field: str, value: int) -> ConditionImpl:
def setAdd2(self, field1: str, field2: str) -> ConditionImpl:
def setMultiply2(self, field1: str, field2: str) -> ConditionImpl:
def set(self, field: str, value: Any) -> ConditionImpl:
def setWithField(self, field1: str, field2: str) -> ConditionImpl:
def setNull(self, field: str) -> ConditionImpl:
def parseCondition(self) -> ConditionStruct:
def parseConditionUpdateSet(self) -> ConditionUpdateSetStruct:
class ParseCondition:
@staticmethod
def parseUpdateSet( expressions, condition: bee.condition.Condition) -> ConditionUpdateSetStruct:
@staticmethod
def parse( expressions, condition: bee.condition.Condition) -> ConditionStruct: