Skip to content

Commit ea379ce

Browse files
author
alexander
committed
Fixed metrics-postgres-query.rb to have proper default return value, updated change log to reflect changes.
1 parent 497fb55 commit ea379ce

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
44
This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachangelog.com/)
55

66
## [Unreleased]
7+
### Fixed
8+
- metrics-postgres-query.rb: Restored default value to only return first value in query. (@Micasou)
79

810
## [1.1.0] - 2017-04-20
911
### Added

bin/metrics-postgres-query.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,11 @@ def run
107107
value = if config[:count_tuples]
108108
res.ntuples
109109
else
110-
res.values
110+
res.first.values.first
111111
end
112112

113113
if config[:multirow] && !config[:count_tuples]
114-
value.each do |row|
114+
res.values.each do |row|
115115
output "#{config[:scheme]}.#{row[0]}", row[1]
116116
end
117117
else

0 commit comments

Comments
 (0)