public function all($db = null)
    {
        if ($this->emulateExecution) {
            return resolve([]);
        }
        return $this->createCommand($db)->thenLazy(
            function(CommandInterface $command) {
                return $command->queryAll();
            }
        )->thenLazy(
            function($results) {
                return $this->populate($results);
            }
        );
    }