Skip to content

Commit

Permalink
Fixing when getting distinct rows
Browse files Browse the repository at this point in the history
  • Loading branch information
josueneo committed Jun 13, 2017
1 parent 2d75599 commit e4b8dac
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/SQLAnywhereConnection.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ protected function getDefaultQueryGrammar() {
protected function getDefaultSchemaGrammar() {
return $this->withTablePrefix(new SQLAnywhereSchemaGrammar);
}
}
}
2 changes: 1 addition & 1 deletion src/SQLAnywhereConnector.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ public function connect(array $config) {
return $connection;
}

}
}
4 changes: 2 additions & 2 deletions src/SQLAnywhereQueryGrammar.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ protected function compileAggregate(Builder $query, $aggregate) {
}
protected function compileColumns(Builder $query, $columns) {
if ( ! is_null($query->aggregate)) return;
$select = $query->distinct ? 'distinct' : '';
$select = $query->distinct ? 'distinct ' : '';
return $select.$this->columnize($columns);
}
protected function compileLimit(Builder $query, $limit) {
Expand All @@ -44,4 +44,4 @@ protected function compileLimit(Builder $query, $limit) {
protected function compileOffset(Builder $query, $offset) {
return 'start at '.((int) $offset + 1);
}
}
}

0 comments on commit e4b8dac

Please sign in to comment.