formatting, indexes optimized
This commit is contained in:
parent
510357a13c
commit
9ee924f0d8
11 changed files with 90 additions and 94 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