File tree Expand file tree Collapse file tree
syncanysql/calculaters/mysql_funcs Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99
1010@typing_filter (float )
1111def mysql_add (x , y ):
12- if x is None or y is None :
13- return None
1412 if x .__class__ is int or x .__class__ is float :
1513 if y .__class__ is int or y .__class__ is float :
1614 return x + y
15+ if x is None or y is None :
16+ return None
1717 return ensure_number (x ) + ensure_number (y )
1818
1919@typing_filter (float )
2020def mysql_sub (x , y ):
21- if x is None or y is None :
22- return None
2321 if x .__class__ is int or x .__class__ is float :
2422 if y .__class__ is int or y .__class__ is float :
2523 return x - y
24+ if x is None or y is None :
25+ return None
2626 return ensure_number (x ) - ensure_number (y )
2727
2828@typing_filter (float )
2929def mysql_mul (x , y ):
30- if x is None or y is None :
31- return None
3230 if x .__class__ is int or x .__class__ is float :
3331 if y .__class__ is int or y .__class__ is float :
3432 return x * y
33+ if x is None or y is None :
34+ return None
3535 return ensure_number (x ) * ensure_number (y )
3636
3737@typing_filter (float )
3838def mysql_div (x , y ):
39- if x is None or y is None :
40- return None
4139 if x .__class__ is int or x .__class__ is float :
4240 if y .__class__ is int or y .__class__ is float :
4341 return x / y
42+ if x is None or y is None :
43+ return None
4444 return ensure_number (x ) / ensure_number (y )
4545
4646@typing_filter (float )
4747def mysql_mod (x , y ):
48- if x is None or y is None :
49- return None
5048 if x .__class__ is int or x .__class__ is float :
5149 if y .__class__ is int or y .__class__ is float :
5250 return x % y
51+ if x is None or y is None :
52+ return None
5353 return ensure_number (x ) % ensure_number (y )
5454
5555@typing_filter (int )
You can’t perform that action at this time.
0 commit comments