forked from heroku/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(pg-v5): Add pg:settings:track-functions (heroku#1854)
- Loading branch information
Showing
2 changed files
with
23 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
'use strict' | ||
|
||
const cli = require('heroku-cli-util') | ||
const settings = require('../../lib/setter') | ||
|
||
function explain (setting) { | ||
return setting.values[setting.value] | ||
} | ||
|
||
module.exports = { | ||
topic: 'pg', | ||
command: 'settings:track-functions', | ||
description: `track_functions controls tracking of function call counts and time used. Default is none.`, | ||
help: `Valid values for VALUE: | ||
none - No functions are tracked | ||
pl - Only procedural language functions are tracked | ||
all - All functions, including SQL and C language functions, are tracked. Simple SQL-language that are inlined are not tracked`, | ||
needsApp: true, | ||
needsAuth: true, | ||
args: [{ name: 'value', optional: true }, { name: 'database', optional: true }], | ||
run: cli.command({ preauth: true }, settings.generate('track_functions', settings.enum, explain)) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters