Ejemplo n.º 1
0
 def _reformat_operation(self, operation, parameters):
     if self.paramstyle in ('format', 'pyformat'):  # convert %s to ?
         operation, self._parameter_names = api.changeFormatToQmark(
             operation)
     elif self.paramstyle == 'named' or (self.paramstyle == 'dynamic' and
                                         isinstance(parameters, Mapping)):
         operation, self._parameter_names = api.changeNamedToQmark(
             operation)  # convert :name to ?
     return operation
Ejemplo n.º 2
0
 def _reformat_operation(self, operation, parameters):
     if self.paramstyle in ('format', 'pyformat'): # convert %s to ?
         operation, self._parameter_names = api.changeFormatToQmark(operation)
     elif self.paramstyle == 'named' or (self.paramstyle == 'dynamic' and isinstance(parameters, Mapping)):
         operation, self._parameter_names = api.changeNamedToQmark(operation) # convert :name to ?
     return operation