This is the asynchronous counterpart of Cli_DBGet.
483274
def as_db_get(self, db_number):
        
        logger.debug("db_get db_number: %s" % db_number)
        _buffer = buffer_type()
        result = self.library.Cli_AsDBGet(self.pointer, db_number,
                                          byref(_buffer),
                                          byref(c_int(buffer_size)))
        check_error(result, context="client")
        return bytearray(_buffer)
234197
def hgetall(key, host=None, port=None, db=None, password=None):
    '''
    
    '''
    server = _connect(host, port, db, password)
    return server.hgetall(key)
628341
def build_db_cmd(self, fname):
        """"""
        return self.funcs.db_func(fname, self.outdir, self.exes.format_exe)[0]
676526
def transactional_async(func, args, kwds, **options):
  """"""
  options.setdefault('propagation', datastore_rpc.TransactionOptions.ALLOWED)
  if args or kwds:
    return transaction_async(lambda: func(*args, **kwds), **options)
  return transaction_async(func, **options)
680723
async def wait_for_read_result(self):
        
        while not self.callback_data:
            await asyncio.sleep(.001)
        rval = self.callback_data
        self.callback_data = []
        return rval
450473
def cli(ctx, path, renku_home, use_external_storage):
    """"""
    ctx.obj = LocalClient(
        path=path,
        renku_home=renku_home,
        use_external_storage=use_external_storage,
    )
880554
protected void executeGetAsync(HttpCallback callback, String url, Object tag, StrParam... strParams) {
        Request.Builder builder = mBuilder.builderGet(url, strParams);
        async(builder, tag, callback);
    }
697557
async def system_bus_async(loop = None, **kwargs) :
    ""
    return \
        Connection \
          (
            await dbus.Connection.bus_get_async(DBUS.BUS_SYSTEM, private = False, loop = loop)
          ) \
        .register_additional_standard(**kwargs)
365751
function(asyncFunc, callback) {
  asyncFunc(function(err, buffer) {
    if(callback) {
      callback(err, buffer.toHex().toString());
    }
  });
}
1111783
def _process_results():
    """"""
    async = get_current_async()
    callbacks = async.get_callbacks()

    if not isinstance(async.result.payload, AsyncException):
        callback = callbacks.get('success')
    else:
        callback = callbacks.get('error')

        if not callback:
            raise async.result.payload.exception, None, \
                async.result.payload.traceback[2]

    return _execute_callback(async, callback)
490808
function get_db (ent, done) {
    var folder = internals.makefolderpath(opts.folder, ent)
    var db = dbmap[folder]
    if (db) {
      return done(null, db)
    }
    internals.ensurefolder(folder, internals.error(done, function () {
      db = dbmap[folder]
      if (db) {
        return done(null, db)
      }
      try {
        db = dbmap[folder] = LevelQuery(Levelup(folder, opts))
        db.query.use(JsonqueryEngine())
      }
      catch (e) {
        db = dbmap[folder]
        if (db) {
          return done(null, db)
        }
        return done(e)
      }
      return done(null, db)
    }))
  }
1312168
def on_pause_request(self, py_db, request):
        '''
        
        '''
        arguments = request.arguments  # : :type arguments: PauseArguments
        thread_id = arguments.threadId

        self.api.request_suspend_thread(py_db, thread_id=thread_id)

        response = pydevd_base_schema.build_response(request)
        return NetCommand(CMD_RETURN, 0, response, is_json=True)
893019
function() {
        var context = root.serialize;
        var template = root.template;

        // Create a deferred specifically for fetching.
        def = root.deferred();

        // If data is a function, immediately call it.
        if (_.isFunction(context)) {
          context = context.call(root);
        }

        // Set the internal callback to trigger once the asynchronous or
        // synchronous behavior has completed.
        manager.callback = function(contents) {
          // Clean up asynchronous manager properties.
          delete manager.isAsync;
          delete manager.callback;

          done(context, contents);
        };

        // Set the url to the prefix + the view's template property.
        if (typeof template === "string") {
          url = root.prefix + template;
        }

        // Check if contents are already cached and if they are, simply process
        // the template with the correct data.
        if (contents = LayoutManager.cache(url)) {
          done(context, contents, url);

          return def;
        }

        // Fetch layout and template contents.
        if (typeof template === "string") {
          contents = root.fetchTemplate.call(root, root.prefix +
            template);
        // If the template is already a function, simply call it.
        } else if (typeof template === "function") {
          contents = template;
        // If its not a string and not undefined, pass the value to `fetch`.
        } else if (template != null) {
          contents = root.fetchTemplate.call(root, template);
        }

        // If the function was synchronous, continue execution.
        if (!manager.isAsync) {
          done(context, contents);
        }

        return def;
      }
319550
def _fetch_page_async(self, page_size, **q_options):
    """"""
    q_options.setdefault('batch_size', page_size)
    q_options.setdefault('produce_cursors', True)
    it = self.iter(limit=page_size + 1, **q_options)
    results = []
    while (yield it.has_next_async()):
      results.append(it.next())
      if len(results) >= page_size:
        break
    try:
      cursor = it.cursor_after()
    except datastore_errors.BadArgumentError:
      cursor = None
    raise tasklets.Return(results, cursor, it.probably_has_next())
1149218
def _get_by_id_async(cls, id, parent=None, app=None, namespace=None,
                       **ctx_options):
    
    key = Key(cls._get_kind(), id, parent=parent, app=app, namespace=namespace)
    return key.get_async(**ctx_options)
1202873
async function (rid, varName, query, val) {
      const ops = await putPVar(ldb, ['appvars', rid, varName], query, val)
      await ldb.batch(ops)
    }
515068
def execute_read_only(*args, **kwargs):
        # TODO: consolidate with execute
        

        # Inspect the call stack for the originating call
        args = CoyoteDb.__add_query_comment(args[0])

        # Execute the query
        db = CoyoteDb.__get_db_read_instance()
        cursor = db.cursor()
        try:
            cursor.execute(*args, **kwargs)
        except OperationalError, e:
            raise OperationalError('{} when executing: {}'.format(e.args, args[0]))
        return db, cursor