Navigation Menu

Skip to content

Commit

Permalink
Fix data response format of vector columns
Browse files Browse the repository at this point in the history
  • Loading branch information
darashi committed Aug 14, 2012
1 parent 3cb8bb1 commit cf84d6c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/api/2011-02-01/search.js
Expand Up @@ -40,7 +40,13 @@ function formatSelectResults(data) {
var results = records.map(function(record) {
var object = {};
columnNames.forEach(function(columnName, index) {
object[columnName] = [record[index]];
if (Array.isArray(record[index])) {
// vector column
object[columnName] = record[index];
} else {
// scalar column
object[columnName] = [record[index]];
}
});
return {
id: object._key[0],
Expand Down

0 comments on commit cf84d6c

Please sign in to comment.