change fn name from selectT to select
This commit is contained in:
@@ -64,7 +64,7 @@ app conf reqBody req =
|
||||
else do
|
||||
let qt = qualify table
|
||||
from = fromMaybe 0 $ rangeOffset <$> range
|
||||
select = B.Stmt "select " V.empty True <>
|
||||
query = B.Stmt "select " V.empty True <>
|
||||
parentheticT (
|
||||
whereT qt qq $ countRows qt
|
||||
) <> commaq <> (
|
||||
@@ -72,9 +72,9 @@ app conf reqBody req =
|
||||
. limitT range
|
||||
. orderT (orderParse qq)
|
||||
. whereT qt qq
|
||||
$ selectT qt qq
|
||||
$ select qt qq
|
||||
)
|
||||
row <- H.maybeEx select
|
||||
row <- H.maybeEx query
|
||||
let (tableTotal, queryTotal, body) =
|
||||
fromMaybe (0, 0, Just "" :: Maybe Text) row
|
||||
to = from+queryTotal-1
|
||||
|
||||
@@ -129,8 +129,8 @@ asJsonRow s = s { B.stmtTemplate = "row_to_json(t) from (" <> B.stmtTemplate s <
|
||||
selectStar :: QualifiedIdentifier -> PStmt
|
||||
selectStar t = B.Stmt ("select * from " <> fromQi t) empty True
|
||||
|
||||
selectT :: QualifiedIdentifier -> Net.Query -> PStmt
|
||||
selectT table params =
|
||||
select :: QualifiedIdentifier -> Net.Query -> PStmt
|
||||
select table params =
|
||||
if L.null cols
|
||||
then selectStar table
|
||||
else B.Stmt "select " empty True <> conjunction <> B.Stmt (" from " <> fromQi table ) empty True
|
||||
|
||||
Reference in New Issue
Block a user