(self, ticket, search_type, data, metadata=[], parent_key=None, use_id=False, triggers=True)
return results
Insert for several sobjects in one function call.  The
        data structure contains all the infon needed to update and is
        formated as follows:

        data = [
            { column1: value1, column2: value2,  column3: value3 },
            { column1: value1, column2: value2,  column3: value3 }
        ]

        metadata =  [
            { color: blue, height: 180 },
            { color: orange, height: 170 }
        ]


        @params:
        ticket - authentication ticket
        data - a dictionary of name/value pairs which will be used to update
            the sobject defined by the search_key
            Note: this can also be an array.  Each data dictionary element in
            the array will be applied to the corresponding search key

        @keyparam:

        triggers - boolean to fire trigger on insert
        use_id - boolean to control if id is used in the search_key in returning sobject dict

        @return:
        a list of all the update sobjects
Insert for several sobjects in one function call.  The
        data structure contains all the infon needed to update and is
        formated as follows:
Insert for several sobjects in one function call . The data structure contains all the infon needed to update and is formated as follows :
def insert_multiple(self, ticket, search_type, data, metadata=[], parent_key=None, use_id=False, triggers=True):
        '''Insert for several sobjects in one function call.  The
        data structure contains all the infon needed to update and is
        formated as follows:

        data = [
            { column1: value1, column2: value2,  column3: value3 },
            { column1: value1, column2: value2,  column3: value3 }
        ]

        metadata =  [
            { color: blue, height: 180 },
            { color: orange, height: 170 }
        ]


        @params:
        ticket - authentication ticket
        data - a dictionary of name/value pairs which will be used to update
            the sobject defined by the search_key
            Note: this can also be an array.  Each data dictionary element in
            the array will be applied to the corresponding search key

        @keyparam:

        triggers - boolean to fire trigger on insert
        use_id - boolean to control if id is used in the search_key in returning sobject dict

        @return:
        a list of all the update sobjects

        '''

        if isinstance(data, basestring):
            data = jsonloads(data)



        if isinstance(metadata, basestring):
            metadata = jsonloads(metadata)

        if not isinstance(data, list):
            raise TacticException('data must be a list')

        if metadata:
            if len(metadata) != len(data):
                raise TacticException('If specified, metadata length has to match data length [%s]'%len(data))
            if not isinstance(metadata, list):
                raise TacticException('metadata must be a list')

        results = []
        metadata_item = {}


        # they all share the same parent_key if exists
        for idx,  data_item in enumerate(data):
            if metadata:
                metadata_item = metadata[idx]

            result = self._insert(search_type, data_item, metadata=metadata_item, parent_key=parent_key, use_id=use_id, triggers=triggers)
            results.append(result)

        return results
def insert_multiple ( self , ticket , search_type , data , metadata = [ ] , parent_key = None , use_id = False , triggers = True ) : if isinstance ( data , basestring ) : data = jsonloads ( data ) if isinstance ( metadata , basestring ) : metadata = jsonloads ( metadata ) if not isinstance ( data , list ) : raise TacticException ( 'data must be a list' ) if metadata : if len ( metadata ) != len ( data ) : raise TacticException ( 'If specified, metadata length has to match data length [%s]' % len ( data ) ) if not isinstance ( metadata , list ) : raise TacticException ( 'metadata must be a list' ) results = [ ] metadata_item = { } # they all share the same parent_key if exists for idx , data_item in enumerate ( data ) : if metadata : metadata_item = metadata [ idx ] result = self . _insert ( search_type , data_item , metadata = metadata_item , parent_key = parent_key , use_id = use_id , triggers = triggers ) results . append ( result ) return results