protected function normalizeTerms(StatementContainer $stmt, $terms)
    {
        if ($terms instanceof Models) {
            $terms = $terms->key();
        }

        if (is_callable($terms)) {
            $terms($stmt);
        } elseif (is_numeric($terms) && !is_float($terms)) {
            $stmt->where($this->primary, '=', (int) $terms);
        } elseif (is_array($terms)) {
            foreach ($terms as $key => $value) {
                $sign = '=';
                if (strpos($key, ' ') !== false) {
                    list($key, $sign) = explode(' ', $key);
                }

                if (is_array($value)) {
                    $stmt->whereIn($key, $value);
                } elseif (null === $value) {
                    $stmt->whereNull($key);
                } else {
                    $stmt->where($key, $sign, $value);
                }
            }
        }
    }