public function where( $column, $param1 = null, $param2 = null, $type = 'and' ) {

		// Check if the where type is valid.
		if ( ! in_array( $type, array( 'and', 'or', 'where' ) ) ) {
			throw new \Exception( 'Invalid where type "' . $type . '"' );
		}

		$sub_type = is_null( $param1 ) ? $type : $param1;
		if ( empty( $this->statements['wheres'] ) ) {
			$type = 'where';
		}

		// When column is an array we assume to make a bulk and where.
		if ( is_array( $column ) ) {
			$subquery = array();
			foreach ( $column as $value ) {
				if ( ! isset( $value[2] ) ) {
					$value[2] = $value[1];
					$value[1] = '=';
				}
				$subquery[] = $this->generateWhere( $value[0], $value[1], $value[2], empty( $subquery ) ? '' : $sub_type );
			}

			$this->statements['wheres'][] = $type . ' ( ' . trim( join( ' ', $subquery ) ) . ' )';

			return $this;
		}

		$this->statements['wheres'][] = $this->generateWhere( $column, $param1, $param2, $type );

		return $this;
	}