Compare commits

..

2 Commits

2 changed files with 7 additions and 4 deletions

View File

@ -435,15 +435,18 @@ function wrap(db, dir, dbsMap) {
params.orderBy = params.orderByDesc;
params.orderByDesc = true;
}
// IMPORTANT: " is not the same to sqlite as '.
// // " is exact and necessary
if (params.orderBy) {
sql += " ORDER BY '" + db.escape(snakeCase(params.orderBy)) + "' ";
sql += " ORDER BY \"" + db.escape(snakeCase(params.orderBy)) + "\" ";
if (params.orderByDesc) {
sql += "DESC ";
}
} else if (DB._indicesMap.updated_at) {
sql += " ORDER BY 'updated_at' DESC ";
sql += " ORDER BY \"updated_at\" DESC ";
} else if (DB._indicesMap.created_at) {
sql += " ORDER BY 'created_at' DESC ";
sql += " ORDER BY \"created_at\" DESC ";
}
if (isFinite(params.limit)) {
sql += " LIMIT " + parseInt(params.limit, 10);

View File

@ -1,6 +1,6 @@
{
"name": "masterquest-sqlite3",
"version": "1.2.0",
"version": "1.2.1",
"description": "A NoSQL / SQLite3 Hybrid. All your indices are belong to us. Master Quest.",
"main": "lib/dbwrap",
"scripts": {