Comparing version 0.0.7 to 0.0.8
@@ -94,3 +94,3 @@ var Where = require("./Where"); | ||
sql.order.push({ | ||
c : column, | ||
c : Array.isArray(column) ? [ get_table_alias(column[0]), column[1] ] : column, | ||
d : (dir == "Z" ? "DESC" : "ASC") | ||
@@ -197,3 +197,7 @@ }); | ||
for (i = 0; i < sql.order.length; i++) { | ||
tmp.push(Dialect.escapeId(sql.order[i].c) + " " + sql.order[i].d); | ||
if (Array.isArray(sql.order[i].c)) { | ||
tmp.push(Dialect.escapeId.apply(Dialect, sql.order[i].c) + " " + sql.order[i].d); | ||
} else { | ||
tmp.push(Dialect.escapeId(sql.order[i].c) + " " + sql.order[i].d); | ||
} | ||
} | ||
@@ -200,0 +204,0 @@ |
@@ -9,3 +9,3 @@ { | ||
], | ||
"version": "0.0.7", | ||
"version": "0.0.8", | ||
"license": "MIT", | ||
@@ -12,0 +12,0 @@ "repository": { |
@@ -16,1 +16,7 @@ ## NodeJS SQL query builder | ||
- SQLite | ||
## About | ||
This module is used by [ORM](http://dresende.github.com/node-orm2) to build SQL queries in the different supported | ||
dialects. Sorry there is no API documentation but there are a couple of tests you can read and find out how to use | ||
it if you want. |
27071
962
22