Compare commits
No commits in common. "e4b47e230bd2cc9711c64f6219a4f30e03573ab3" and "cfd516e24f2b5134309a59903d368336d05668ae" have entirely different histories.
e4b47e230b
...
cfd516e24f
@ -435,18 +435,15 @@ function wrap(db, dir, dbsMap) {
|
|||||||
params.orderBy = params.orderByDesc;
|
params.orderBy = params.orderByDesc;
|
||||||
params.orderByDesc = true;
|
params.orderByDesc = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// IMPORTANT: " is not the same to sqlite as '.
|
|
||||||
// // " is exact and necessary
|
|
||||||
if (params.orderBy) {
|
if (params.orderBy) {
|
||||||
sql += " ORDER BY \"" + db.escape(snakeCase(params.orderBy)) + "\" ";
|
sql += " ORDER BY '" + db.escape(snakeCase(params.orderBy)) + "' ";
|
||||||
if (params.orderByDesc) {
|
if (params.orderByDesc) {
|
||||||
sql += "DESC ";
|
sql += "DESC ";
|
||||||
}
|
}
|
||||||
} else if (DB._indicesMap.updated_at) {
|
} else if (DB._indicesMap.updated_at) {
|
||||||
sql += " ORDER BY \"updated_at\" DESC ";
|
sql += " ORDER BY 'updated_at' DESC ";
|
||||||
} else if (DB._indicesMap.created_at) {
|
} else if (DB._indicesMap.created_at) {
|
||||||
sql += " ORDER BY \"created_at\" DESC ";
|
sql += " ORDER BY 'created_at' DESC ";
|
||||||
}
|
}
|
||||||
if (isFinite(params.limit)) {
|
if (isFinite(params.limit)) {
|
||||||
sql += " LIMIT " + parseInt(params.limit, 10);
|
sql += " LIMIT " + parseInt(params.limit, 10);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "masterquest-sqlite3",
|
"name": "masterquest-sqlite3",
|
||||||
"version": "1.2.1",
|
"version": "1.2.0",
|
||||||
"description": "A NoSQL / SQLite3 Hybrid. All your indices are belong to us. Master Quest.",
|
"description": "A NoSQL / SQLite3 Hybrid. All your indices are belong to us. Master Quest.",
|
||||||
"main": "lib/dbwrap",
|
"main": "lib/dbwrap",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user