formatting, indexes optimized
This commit is contained in:
parent
77ee7d15b7
commit
7220cff5ac
12 changed files with 124 additions and 126 deletions
4
model.py
4
model.py
|
@ -15,6 +15,8 @@ from sql import With
|
|||
from sql.functions import Function
|
||||
from sql.conditionals import Coalesce
|
||||
import copy
|
||||
from .const import DEF_NONE
|
||||
|
||||
|
||||
if config.get('cashbook', 'memcache', default='yes').lower() \
|
||||
in ['yes', '1', 'true']:
|
||||
|
@ -269,7 +271,7 @@ def order_name_hierarchical(model_name, tables):
|
|||
lines = With('id', 'name', 'name_path', recursive=True)
|
||||
lines.query = tab_mod.select(
|
||||
tab_mod.id, tab_mod.name, Array(tab_mod.name),
|
||||
where=tab_mod.parent == None,
|
||||
where=tab_mod.parent == DEF_NONE,
|
||||
)
|
||||
lines.query |= tab_mod2.join(
|
||||
lines,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue