-
Notifications
You must be signed in to change notification settings - Fork 145
Support for expressions #101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 5 commits
f5820dc
c0b5955
b46fd48
e4bc57a
2927397
7336cad
57d01c5
9d22259
41d9979
a46a60c
2d26997
45da49f
7e25e5f
9662a7c
da54872
c08cf6a
751a501
6f2259f
a68e3e0
c7944e4
c4aa709
b3c340f
72b7574
80d4196
11eb84a
4d8b339
7c14c60
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,34 @@ | ||||||
<?php | ||||||
|
||||||
dorantor marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
namespace ClickHouseDB\Query; | ||||||
|
||||||
/** | ||||||
* Query expression | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This would deserve more explanation There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updated docblock with example and param type. |
||||||
* | ||||||
* @package ClickHouseDB | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This comment can be removed There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removed. |
||||||
*/ | ||||||
class Expression | ||||||
{ | ||||||
/** | ||||||
* @var string | ||||||
*/ | ||||||
protected $expression = ''; | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. IMO there should not be a default value and not be protected. Let there only be a constructor as the way to create a valid object.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. Sorry, just now understood that this change could be applied right in github. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Np, new feature introduced yesterday ;) |
||||||
|
||||||
/** | ||||||
* Expression constructor. | ||||||
dorantor marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
* | ||||||
* @param $expression | ||||||
*/ | ||||||
public function __construct($expression) | ||||||
{ | ||||||
$this->expression = $expression; | ||||||
} | ||||||
|
||||||
/** | ||||||
* @return string | ||||||
*/ | ||||||
public function __toString() | ||||||
{ | ||||||
return $this->expression; | ||||||
} | ||||||
} |
Uh oh!
There was an error while loading. Please reload this page.