harness-drone/store/datastore
Niall Sheridan 4949047575 Don't return extra columns in result set
Since commit 360708e93d the feed-latest-build query has returned extra columns in the results, causing log messages like the following:

```
meddler.Targets: column [build_repo_id] not found in struct
meddler.Targets: column [build_id] not found in struct
meddler.WriteTargets: column [build_repo_id] not found in struct
meddler.WriteTargets: column [build_id] not found in struct
```

This is a result of the optimised Postgres query including the `build_repo_id` and `build_id` terms, where previously they were not inclued.
This PR rewrites the query slightly to produce the expected result set (i.e. without the `build_repo_id` and `build_id` columns). As a side-effect it also looks similar to the original query.

Signed-off-by: Niall Sheridan <nsheridan@squarespace.com>
2018-11-14 11:22:28 +00:00
..
ddl Merge pull request #2313 from Valeran86/bugix/postgres-semicolon-in-scripts [ci skip] 2018-04-01 11:38:00 -07:00
sql Don't return extra columns in result set 2018-11-14 11:22:28 +00:00
builds.go Just fixed format with go fmt ./... 2018-03-21 14:02:17 +01:00
builds_test.go fix failing build count test 2018-05-02 09:59:05 -07:00
config.go Just fixed format with go fmt ./... 2018-03-21 14:02:17 +01:00
config_test.go Just fixed format with go fmt ./... 2018-03-21 14:02:17 +01:00
files.go Just fixed format with go fmt ./... 2018-03-21 14:02:17 +01:00
files_test.go Just fixed format with go fmt ./... 2018-03-21 14:02:17 +01:00
init.go Just fixed format with go fmt ./... 2018-03-21 14:02:17 +01:00
init_cgo.go Just fixed format with go fmt ./... 2018-03-21 14:02:17 +01:00
logs.go Just fixed format with go fmt ./... 2018-03-21 14:02:17 +01:00
logs_test.go Just fixed format with go fmt ./... 2018-03-21 14:02:17 +01:00
perms.go Just fixed format with go fmt ./... 2018-03-21 14:02:17 +01:00
perms_test.go Just fixed format with go fmt ./... 2018-03-21 14:02:17 +01:00
procs.go Just fixed format with go fmt ./... 2018-03-21 14:02:17 +01:00
procs_test.go Just fixed format with go fmt ./... 2018-03-21 14:02:17 +01:00
registry.go Just fixed format with go fmt ./... 2018-03-21 14:02:17 +01:00
registry_test.go Just fixed format with go fmt ./... 2018-03-21 14:02:17 +01:00
repos.go Just fixed format with go fmt ./... 2018-03-21 14:02:17 +01:00
repos_test.go Just fixed format with go fmt ./... 2018-03-21 14:02:17 +01:00
secret.go Just fixed format with go fmt ./... 2018-03-21 14:02:17 +01:00
secret_test.go Just fixed format with go fmt ./... 2018-03-21 14:02:17 +01:00
sender.go Just fixed format with go fmt ./... 2018-03-21 14:02:17 +01:00
sender_test.go Just fixed format with go fmt ./... 2018-03-21 14:02:17 +01:00
store.go Just fixed format with go fmt ./... 2018-03-21 14:02:17 +01:00
task.go Just fixed format with go fmt ./... 2018-03-21 14:02:17 +01:00
task_test.go Just fixed format with go fmt ./... 2018-03-21 14:02:17 +01:00
users.go Just fixed format with go fmt ./... 2018-03-21 14:02:17 +01:00
users_test.go Just fixed format with go fmt ./... 2018-03-21 14:02:17 +01:00
utils.go Just fixed format with go fmt ./... 2018-03-21 14:02:17 +01:00