Skip to content

Commit feff84f

Browse files
committed
:octocat: rename Query::sql() to getSQL()
1 parent 8385cfa commit feff84f

17 files changed

+39
-39
lines changed

src/Query/AlterDatabase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public function name(string $dbname):static{
2323
return $this->setName($dbname);
2424
}
2525

26-
protected function getSQL():array{
26+
protected function sql():array{
2727
return []; // @todo
2828
}
2929

src/Query/AlterTable.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function name(string $tablename):static{
2424
return $this->setName($tablename);
2525
}
2626

27-
protected function getSQL():array{
27+
protected function sql():array{
2828
return []; // @todo
2929
}
3030

src/Query/CreateDatabase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function ifNotExists():static{
3232
}
3333

3434
/** @inheritdoc */
35-
protected function getSQL():array{
35+
protected function sql():array{
3636
return $this->dialect->createDatabase($this->name, $this->ifNotExists, $this->charset);
3737
}
3838

src/Query/CreateTable.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function ifNotExists():static{
4242
return $this->setIfNotExists();
4343
}
4444

45-
protected function getSQL():array{
45+
protected function sql():array{
4646
return $this->dialect->createTable($this->name, $this->cols, $this->primaryKey, $this->ifNotExists, $this->temp, $this->dir);
4747
}
4848

src/Query/Delete.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function offset(int $offset):static{
4444
return $this->setOffset($offset);
4545
}
4646

47-
protected function getSQL():array{
47+
protected function sql():array{
4848
return $this->dialect->delete($this->name, $this->getWhere());
4949
}
5050

src/Query/DropDatabase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public function ifExists():static{
2828
}
2929

3030
/** @inheritdoc */
31-
protected function getSQL():array{
31+
protected function sql():array{
3232
return $this->dialect->dropDatabase($this->name, $this->ifExists);
3333
}
3434

src/Query/DropTable.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public function ifExists():static{
2929
}
3030

3131
/** @inheritdoc */
32-
protected function getSQL():array{
32+
protected function sql():array{
3333
return $this->dialect->dropTable($this->name, $this->ifExists);
3434
}
3535

src/Query/Insert.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function values(iterable $values):static{
4242
return $this;
4343
}
4444

45-
protected function getSQL():array{
45+
protected function sql():array{
4646

4747
if(empty($this->bindValues)){
4848
throw new QueryException('no values given');

src/Query/Query.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
interface Query{
1515

16-
public function sql(bool|null $multi = null):string;
16+
public function getSQL(bool|null $multi = null):string;
1717

1818
/**
1919
* @throws \chillerlan\Database\Query\QueryException

src/Query/Select.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public function cached(int|null $ttl = null):static{
5353
return $this->setCached($ttl);
5454
}
5555

56-
protected function getSQL():array{
56+
protected function sql():array{
5757

5858
if(empty($this->from)){
5959
throw new QueryException('no FROM expression specified');

0 commit comments

Comments
 (0)