DEPRECATED - use execute_all instead
194918
async def batch_call_api(container, apis, timeout = 120.0):
    
    apiHandles = [(object(), api) for api in apis]
    apiEvents = [ModuleAPICall(handle, targetname, name, params = params)
                 for handle, (targetname, name, params) in apiHandles]
    apiMatchers = tuple(ModuleAPIReply.createMatcher(handle) for handle, _ in apiHandles)
    async def process():
        for e in apiEvents:
            await container.wait_for_send(e)
    container.subroutine(process(), False)
    eventdict = {}
    async def process2():
        ms = len(apiMatchers)
        matchers = Diff_(apiMatchers)
        while ms:
            ev, m = await matchers
            matchers = Diff_(matchers, remove=(m,))
            eventdict[ev.handle] = ev
    await container.execute_with_timeout(timeout, process2())
    for e in apiEvents:
        if e.handle not in eventdict:
            e.canignore = True
            container.scheduler.ignore(ModuleAPICall.createMatcher(e.handle))
    return [eventdict.get(handle, None) for handle, _ in apiHandles]
1157474
def fetch_all(self, sql, *args, **kwargs):
        
        with self.locked() as conn:
            return conn.query(sql, *args, **kwargs).fetch_all()
776875
def execute(self, conn, app, release_version, pset_hash, output_label, global_tag, transaction = False):
        
        binds = {}
        binds["app_name"]=app
        binds["release_version"]=release_version
        binds["pset_hash"]=pset_hash
        binds["output_module_label"]=output_label
        binds["global_tag"]=global_tag

        result = self.dbi.processData(self.sql, binds, conn, transaction)

        plist = self.formatDict(result)

	if len(plist) < 1: return -1
        return plist[0]["output_mod_config_id"]
90320
def _execute_sql(sql, is_batch, args)
    result = []
    if sql
      #puts "RhomDbAdapter: Executing query - #{sql}; #{args}"
      begin
        result = @database.execute( sql, is_batch, args )
        #puts "result : #{result}"
      rescue Exception => e
        puts "exception when running query: #{e}"
        puts "query: #{sql}"
        raise
      end
    end
    result
  end
644255
def execute(args = [], **options)
      execute_internal(args, options)
      Executor::ExitCode.code(:success)
    rescue Cliqr::Error::CliqrError => e
      puts e.message
      Executor::ExitCode.code(e)
    end
995557
function closeAll() {
        DeprecationWarning.deprecationWarning("Use CommandManager.execute(Commands.FILE_CLOSE_ALL,{PaneId: MainViewManager.ALL_PANES}) instead of DocumentManager.closeAll()", true);
        CommandManager.execute(Commands.FILE_CLOSE_ALL, {PaneId: MainViewManager.ALL_PANES});
    }
1193135
def _execute(self, *args):
        
        cursor = self.db.cursor()
        cursor.execute(*args)
        return cursor
379011
def _Execute(statements, context, callback, trace):
    
    # Every time we call _Execute, increase this depth
    if trace:
        trace.exec_depth += 1
    for i, statement in enumerate(statements):
        if isinstance(statement, six.string_types):
            callback(statement)
        else:
            # In the case of a substitution, args is a pair (name, formatters).
            # In the case of a section, it's a _Section instance.
            try:
                func, args = statement
                func(args, context, callback, trace)
            except UndefinedVariable as e:
                # Show context for statements
                start = max(0, i - 3)
                end = i + 3
                e.near = statements[start:end]
                e.trace = trace  # Attach caller's trace (could be None)
                raise
1022411
def sync_all(name, **kwargs):
    '''
    
    '''
    ret = {'name': name, 'changes': {}, 'result': True, 'comment': ''}

    if __opts__['test']:
        ret['result'] = None
        ret['comment'] = "saltutil.sync_all would have been run"
        return ret

    try:
        sync_status = __salt__['saltutil.sync_all'](**kwargs)
        for key, value in sync_status.items():
            if value:
                ret['changes'][key] = value
                ret['comment'] = "Sync performed"
    except Exception as e:
        log.error("Failed to run saltutil.sync_all: %s", e)
        ret['result'] = False
        ret['comment'] = "Failed to run sync_all: {0}".format(e)
        return ret

    if not ret['changes']:
        ret['comment'] = "No updates to sync"

    return ret
972407
def execute_sql(self, *args, **kwargs):
        
        assert self._allow_sync, (
            "Error, sync query is not allowed! Call the `.set_allow_sync()` "
            "or use the `.allow_sync()` context manager.")
        if self._allow_sync in (logging.ERROR, logging.WARNING):
            logging.log(self._allow_sync,
                        "Error, sync query is not allowed: %s %s" %
                        (str(args), str(kwargs)))
        return super().execute_sql(*args, **kwargs)
791485
def _executing(self, sql, params=[]):
        
        with self.connection() as connection:
            for row in connection.execute(sql, params):
                yield row
                if not self._db:
                    return
41181
def execute(self, args):
    
    all_args = list(args)
    try:
      return self._cmd(all_args)
    except OSError as e:
      if errno.E2BIG == e.errno:
        args1, args2 = self._split_args(all_args)
        result = self.execute(args1)
        if result != 0:
          return result
        return self.execute(args2)
      else:
        raise e
820171
def execute(*args, **kwargs):
        

        # Inspect the call stack for the originating call
        args = CoyoteDb.__add_query_comment(args[0])
        db = CoyoteDb.__get_db_write_instance(target_database=kwargs.pop('target_database', None))
        filtered_kwargs = {k: v for k, v in kwargs.iteritems() if k != 'target_database'}

        # Execute the query
        cursor = db.cursor()
        try:
            cursor.execute(*args, **filtered_kwargs)
        except OperationalError, e:
            raise OperationalError('{} when executing: {}'.format(e.args, args[0]))
        return db, cursor
688657
def reflect(self, bind='__all__', app=None):
        
        self._execute_for_all_tables(app, bind, 'reflect', skip_tables=True)
62005
def all(options={}, cmd_options={})
      cmd = command_with_limit(["log --style ?", style], options[:limit])

      hg_to_array(cmd, {:separator => changeset_separator}, cmd_options) do |line|
        build(line)
      end
    end
1330980
def system_find_executions(input_params={}, always_retry=True, **kwargs):
    
    return DXHTTPRequest('/system/findExecutions', input_params, always_retry=always_retry, **kwargs)
1076229
def exec_insert(sql, name = nil, binds = [], pk = nil, sequence_name = nil)
      exec_query(sql, name, binds)
    end