Simple postgresql query building for node.