#NEWLINE# def where( self , column , operator = Null ( ) , value = None , boolean = 'and' ) : #NEWLINE# #INDENT# '\n        Add a where clause to the query\n\n        :param column: The column of the where clause, can also be a QueryBuilder instance for sub where\n        :type column: str or QueryBuilder\n\n        :param operator: The operator of the where clause\n        :type operator: str\n\n        :param value: The value of the where clause\n        :type value: mixed\n\n        :param boolean: The boolean of the where clause\n        :type boolean: str\n\n        :return: The current QueryBuilder instance\n        :rtype: QueryBuilder\n        ' #NEWLINE# if isinstance ( column , dict ) : #NEWLINE# #INDENT# nested = self . new_query ( ) #NEWLINE# for ( key , value ) in column . items ( ) : #NEWLINE# #INDENT# nested . where ( key , '=' , value ) #NEWLINE# #UNINDENT# return self . where_nested ( nested , boolean ) #NEWLINE# #UNINDENT# if isinstance ( column , QueryBuilder ) : #NEWLINE# #INDENT# return self . where_nested ( column , boolean ) #NEWLINE# #UNINDENT# if ( value is None ) : #NEWLINE# #INDENT# if ( not isinstance ( operator , Null ) ) : #NEWLINE# #INDENT# value = operator #NEWLINE# operator = '=' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise ArgumentError ( 'Value must be provided' ) #NEWLINE# #UNINDENT# #UNINDENT# if ( operator not in self . _operators ) : #NEWLINE# #INDENT# value = operator #NEWLINE# operator = '=' #NEWLINE# #UNINDENT# if isinstance ( value , QueryBuilder ) : #NEWLINE# #INDENT# return self . _where_sub ( column , operator , value , boolean ) #NEWLINE# #UNINDENT# if ( value is None ) : #NEWLINE# #INDENT# return self . where_null ( column , boolean , ( operator != '=' ) ) #NEWLINE# #UNINDENT# type = 'basic' #NEWLINE# self . wheres . append ( { #NEWLINE# #INDENT# 'type' : type , #NEWLINE# 'column' : column , #NEWLINE# 'operator' : operator , #NEWLINE# 'value' : value , #NEWLINE# 'boolean' : boolean , #NEWLINE# #UNINDENT# } ) #NEWLINE# if ( not isinstance ( value , QueryExpression ) ) : #NEWLINE# #INDENT# self . add_binding ( value , 'where' ) #NEWLINE# #UNINDENT# return self