New name for Nette\Database\SelectionFactory

6 years ago

David Grudl
Nette Core | 6886
+
0
-

Nette\Database\SelectionFactory is class that creates objects Nette\Database\Table\Selection, but I think is really not good name. (BTW Nette\Database\Table is not good name too).

Lets figure out some better names. Any ideas?

6 years ago

dimkalinux
Member | 24
+
0
-

Why Nette\Database\SelectionFactory is not good? Like PresenterFactory.

6 years ago

Jan Tvrdík
Nette guru | 2563
+
0
-

The first thing which has crossed my mind was Nette\Database\Selector, but I guess that would be even more confusing.

6 years ago

Milo
Nette Core | 1151
+
0
-

Few quick ideas:

# Nette\Database
$database = new Nette\Database($connection, $reflection);

# Database\Selection
$selection = $database->selection('books');

# Database\Table
$database->table('users')->update();
$database->table('users')->insert();
$database->table('users')->delete();