bugfix
This commit is contained in:
parent
3b93287c3e
commit
e09112460f
@ -72,7 +72,8 @@ class MySqlor(SQLor):
|
|||||||
return tuple(d)
|
return tuple(d)
|
||||||
|
|
||||||
def pagingSQLmodel(self):
|
def pagingSQLmodel(self):
|
||||||
return u"""select * from (%s) A order by $[sort]$
|
return """select * row_number() over(order by $[sort]$) as row_num_ from (%s) A limit $[from_line]$, $[rows]$"""
|
||||||
|
return """select * from (%s) A order by $[sort]$
|
||||||
limit $[from_line]$,$[rows]$"""
|
limit $[from_line]$,$[rows]$"""
|
||||||
|
|
||||||
def tablesSQL(self):
|
def tablesSQL(self):
|
||||||
|
@ -144,7 +144,7 @@ class SQLor(object):
|
|||||||
return name=='sqlor'
|
return name=='sqlor'
|
||||||
|
|
||||||
def pagingSQLmodel(self):
|
def pagingSQLmodel(self):
|
||||||
return u""
|
return ""
|
||||||
|
|
||||||
def placeHolder(self,varname,pos=None):
|
def placeHolder(self,varname,pos=None):
|
||||||
if varname=='__mainsql__' :
|
if varname=='__mainsql__' :
|
||||||
@ -194,8 +194,7 @@ class SQLor(object):
|
|||||||
'from_line':from_line,
|
'from_line':from_line,
|
||||||
'end_line':end_line,
|
'end_line':end_line,
|
||||||
'rows':rows,
|
'rows':rows,
|
||||||
'sort':sort,
|
'sort':sort
|
||||||
'order':'',
|
|
||||||
}
|
}
|
||||||
ac = ArgsConvert('$[',']$')
|
ac = ArgsConvert('$[',']$')
|
||||||
psql = ac.convert(psql,ns)
|
psql = ac.convert(psql,ns)
|
||||||
@ -415,8 +414,7 @@ class SQLor(object):
|
|||||||
"paging":{
|
"paging":{
|
||||||
"rowsname":"rows",
|
"rowsname":"rows",
|
||||||
"pagename":"page",
|
"pagename":"page",
|
||||||
"sortname":"sort",
|
"sortname":"sort"
|
||||||
"ordername":"order"
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
if desc.get('sortfield',False):
|
if desc.get('sortfield',False):
|
||||||
|
Loading…
Reference in New Issue
Block a user