- More work done on Update, Insert and Delete clause
- Added TOP property to select and delete to fit MSSQL limit's term. - Added a new interface allowing object's manipulation on save() and load() queries
This commit is contained in:
1 parent
3dc82b1f0d
commit
2f43fb4559
13 files changed
+169
-58
No files matched your search
@@ -10,9 +10,9 @@ class Select extends Fragment {
|
||||
|
||||
public bool $union = false;
|
||||
|
||||
public bool $top = false;
|
||||
public ? int $top = null;
|
||||
|
||||
protected $fields = [];
|
||||
protected array $fields = [];
|
||||
|
||||
public function set($fields) : self
|
||||
{
|
||||
@@ -37,7 +37,7 @@ class Select extends Fragment {
|
||||
return $this->renderSegments([
|
||||
( $this->union ? 'UNION' : false ),
|
||||
'SELECT',
|
||||
( $this->top ? 'TOP' : false ),
|
||||
( $this->top ? sprintf('TOP (%s)', $this->top) : false ),
|
||||
implode(', ', $this->fields)
|
||||
]);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user