Check whether a key exists in the event store.

        Returns True if it does, False otherwise.
482944
def key_exists(self, key):
        
        assert isinstance(key, str)
        cursor = self.conn.cursor()
        with contextlib.closing(cursor):
            cursor.execute('SELECT COUNT(*) FROM events WHERE uuid=?', (key,))
            res = cursor.fetchone()
            count = res[0]
        if count == 0:
            return False
        else:
            assert count in (0, 1), \
                "Duplicate event ids detected: {0}".format(count)
            return True
1276946
def key_exists(self, namespace, key):
        

        return namespace in self.__data and key in self.__data[namespace]
10298
def has_key(cls, *args):
        
        key = args if len(args) > 1 else args[0]
        return key in cls._instances
910898
protected boolean isItemAccepted(byte[] key) {
        boolean entryAccepted = false;
        if (!fetchOrphaned) {
            if (isKeyNeeded(key)) {
                entryAccepted = true;
            }
        } else {
            if (!StoreRoutingPlan.checkKeyBelongsToNode(key, nodeId, initialCluster, storeDef)) {
                entryAccepted = true;
            }
        }
        return entryAccepted;
    }
600000
public boolean exists(String key) {
        Path dir = getKeyDir(key);
        boolean res = false;
        try {
            _fs = dir.getFileSystem(_hadoopConf);
            res = _fs.exists(dir);
        } catch (IOException e) {
            LOG.warn("Exception checking for exists on: " + key);
        }
        return res;
    }
1099847
def exists(self, session_key):
        

        response = self.table.get_item(
            Key={'session_key': session_key},
            ConsistentRead=ALWAYS_CONSISTENT)
        if 'Item' in response:
            return True
        else:
            return False
635248
public boolean containsKey(Object key) {
	int k = checkKey(key);
	int index = Arrays.binarySearch(keyIndices, k);
	return index >= 0;
    }
906746
def exists?(key, _locale = nil, locale: _locale)
      locale ||= config.locale
      raise Disabled.new('exists?') if locale == false
      raise I18n::ArgumentError if key.is_a?(String) && key.empty?
      config.backend.exists?(locale, key)
    end
758277
function has(key) {
        var state = getInternalState(this);
        if (!isObject(key)) return false;
        var data = getWeakData(key);
        if (data === true) return uncaughtFrozenStore(state).has(key);
        return data && $has(data, state.id);
      }
875757
@Override
  public boolean containsKeyFailure(K key, StoreAccessException e) {
    cleanup(key, e);
    return false;
  }
893087
def exists(self, record_key):
        
        ''' 
            
        '''
        
        title = '%s.exists' % self.__class__.__name__
    
    # validate inputs
        input_fields = {
            'record_key': record_key
        }
        for key, value in input_fields.items():
            object_title = '%s(%s=%s)' % (title, key, str(value))
            self.fields.validate(value, '.%s' % key, object_title)
    
    # construct path to file
        from os import path
        file_path = path.join(self.collection_folder, record_key)

    # validate existence of file
        if not path.exists(file_path):
            return False
        return True
954766
def has_key(self, key):
        """"""
        try:
            if type(self.attrs) == dict:
                return key in self.attrs
            else:
                raise AttributeError    # if attrs is not a dict
        except AttributeError:          # if attrs doesnt exist
            raise NotImplementedError
570153
@Override
    public boolean containsKey(T key) {
        try {
            if (emulateIsAbsent)
                lock.readLock().lock();

            return compressedEntries.containsKey(key);
        } finally {
            if (emulateIsAbsent)
                lock.readLock().unlock();
        }
    }
605485
def exists?(key, parameters = {})
      begin
        @memcached.get(normalize(key, parameters)) && true
      rescue  Memcached::Stored
        true
      rescue Memcached::NotFound
        nil
      end
    end
1061026
function checkKeyCodes (
  eventKeyCode,
  key,
  builtInAlias
) {
  var keyCodes = config.keyCodes[key] || builtInAlias;
  if (Array.isArray(keyCodes)) {
    return keyCodes.indexOf(eventKeyCode) === -1
  } else {
    return keyCodes !== eventKeyCode
  }
}
75795
public boolean checkExists(TriggerKey triggerKey, T jedis){
        return jedis.exists(redisSchema.triggerHashKey(triggerKey));
    }
718642
def contains(self, key):
    '''
    '''
    return self.cache_datastore.contains(key) \
        or self.child_datastore.contains(key)