Skip to content

Commit

Permalink
update geom api
Browse files Browse the repository at this point in the history
  • Loading branch information
tjwebb committed Sep 27, 2015
1 parent c024286 commit 174b93b
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,12 @@ const Util = {
* jsonb can be used by passing true as the second argument.
*/
case 'json':
return table.json(name)
if (attrDefinition.geometry) {
return table.specificType(name, SpatialUtil.getSpatialType(attrDefinition))
}
else {
return table.json(name)
}

case 'jsonb':
return table.json(name, true)
Expand Down Expand Up @@ -266,12 +271,6 @@ const Util = {
case 'sqlType':
return table.specificType(name, type)

case 'geometry':
case 'geography':
case 'box2d':
case 'box3d':
return table.specificType(name, SpatialUtil.getSpatialType(attrDefinition))

default:
console.error('Unregistered type given for attribute. name=', name, '; type=', type)
return table.text(name)
Expand Down

0 comments on commit 174b93b

Please sign in to comment.