protected function formatBindings($bindings)
    {
        foreach ($bindings as $key => $binding) {
            if ($binding instanceof DateTime) {
                $bindings[$key] = $binding->format('Y-m-d H:i:s');
            } elseif (is_string($binding)) {
                $bindings[$key] = str_replace("'", "\\'", $binding);
            }
        }

        return $bindings;
    }