Change optional parameters of window() into an array
Signed-off-by: davidarendsen <davidarendsen@hey.com>
This commit is contained in:
parent
5951c9b8b1
commit
156d771b24
3 changed files with 24 additions and 68 deletions
|
|
@ -20,7 +20,15 @@ final class WindowFunctionTest extends TestCase
|
|||
|
||||
public function testAllParameters()
|
||||
{
|
||||
$expression = new Window('20s', 'every', '0s', 'location', '_time', '_start', '_stop', true);
|
||||
$expression = new Window('20s', [
|
||||
'period' => 'every',
|
||||
'offset' => '0s',
|
||||
'location' => 'location',
|
||||
'timeColumn' => '_time',
|
||||
'startColumn' => '_start',
|
||||
'stopColumn' => '_stop',
|
||||
'createEmpty' => true
|
||||
]);
|
||||
|
||||
$query = '|> window(every: 20s, period: every, offset: 0s, location: "location", ' .
|
||||
'timeColumn: "_time", startColumn: "_start", stopColumn: "_stop", createEmpty: true) ';
|
||||
|
|
|
|||
Loading…
Add table
editor.link_modal.header
Reference in a new issue