mirror of
https://gitlab.com/comunic/comunicapiv2
synced 2024-11-26 07:19:23 +00:00
Add ORDER support
This commit is contained in:
parent
49ec5a7edd
commit
517e75215b
@ -11,6 +11,7 @@ export interface QueryInformation {
|
|||||||
table: string,
|
table: string,
|
||||||
fields ?: Array<String>,
|
fields ?: Array<String>,
|
||||||
where ?: Object,
|
where ?: Object,
|
||||||
|
order ?: string,
|
||||||
limit ?: number,
|
limit ?: number,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -87,6 +88,10 @@ export class DatabaseHelper {
|
|||||||
request = request.substr(0, request.length - 4)
|
request = request.substr(0, request.length - 4)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Order (if any)
|
||||||
|
if(info.order)
|
||||||
|
request += " ORDER BY " + info.order + " ";
|
||||||
|
|
||||||
// Limit (if any)
|
// Limit (if any)
|
||||||
if(info.limit)
|
if(info.limit)
|
||||||
request += " LIMIT " + info.limit;
|
request += " LIMIT " + info.limit;
|
||||||
|
Loading…
Reference in New Issue
Block a user