Checks if a given UDAF exists within a specified database

        Parameters
        ----------
        name : string, UDAF name
        database : string, database name

        Returns
        -------
        if_exists : boolean
487614
def exists_uda(self, name, database=None):
        
        return len(self.list_udas(database=database, like=name)) > 0
273695
def _get_database(self, database_name):
        
        try:
            return self._client[database_name]
        except InvalidName as ex:
            raise DataSourceError("Cannot connect to database %s!"
                                  % self._database) from ex
392742
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 request kwargs
        list_kwargs = {
            'spaces': self.drive_space,
            'fields': 'files(id)'
        }
    
    # retrieve file id
        file_id, parent_id = self._get_id(record_key)
        if file_id:
            return True
        return False
1013484
def field_exists(app_name, model_name, field_name):
    
    model = apps.get_model(app_name, model_name)
    table_name = model._meta.db_table
    cursor = connection.cursor()
    field_info = connection.introspection.get_table_description(cursor, table_name)
    field_names = [f.name for f in field_info]
    return field_name in field_names
1034047
def exists(self):
        
        self_object = self.query.filter_by(id=self.id).first()
        if self_object is None:
            return False
        return True
62970
public boolean tableExists (Connection conn, String name) throws SQLException
    {
        ResultSet rs = conn.getMetaData().getTables(null, null, name, null);
        while (rs.next()) {
            String tname = rs.getString("TABLE_NAME");
            if (name.equals(tname)) {
                return true;
            }
        }
        return false;
    }
722388
def table_exists(self, tablename: str) -> bool:
        """"""
        # information_schema is ANSI standard
        sql = """
            SELECT COUNT(*)
            FROM information_schema.tables
            WHERE table_name=?
            AND table_schema={}
        """.format(self.get_current_schema_expr())
        row = self.fetchone(sql, tablename)
        return True if row[0] >= 1 else False
39827
def user_exists(self, name):
        """"""
        users = self.data['users']
        for user in users:
            if user['name'] == name:
                return True
        return False
1327966
def db_exists(name, **client_args):
    '''
    
    '''
    if name in [db['name'] for db in list_dbs(**client_args)]:
        return True

    return False
1242295
def exists_orm(session: Session,
               ormclass: DeclarativeMeta,
               *criteria: Any) -> bool:
    
    # http://docs.sqlalchemy.org/en/latest/orm/query.html
    q = session.query(ormclass)
    for criterion in criteria:
        q = q.filter(criterion)
    exists_clause = q.exists()
    return bool_from_exists_clause(session=session,
                                   exists_clause=exists_clause)
350608
@SafeVarargs
    public final boolean exists(String sql, Object... parameters) {
        final Cursor cursor = rawQuery(sql, parameters);

        try {
            return cursor.moveToNext();
        } finally {
            cursor.close();
        }
    }
959410
def _name_exists(self, name):
        
        for i in range(self.count()):
            if self.tabText(i) == name:
                return True
        return False
488098
def exists(fname):
    
    fname = stypes.stringToCharP(fname)
    return bool(libspice.exists_c(fname))
35527
public function exists($name = null)
    {
        if ($name === null) {
            $name = $this->mainname;
        }
        return isset($this->dbs[$name]);
    }
335295
def container_exists(self, id=None, name=None):
        
        exists = False
        if id and self.container_by_id(id):
            exists = True
        elif name and self.container_by_name(name):
            exists = True

        return exists
455385
def db_exists(cls, impl, working_dir):
        
        path = config.get_snapshots_filename(impl, working_dir)
        return os.path.exists(path)
817060
def exists_table(self, name, database=None):
        
        return bool(self.list_tables(like=name, database=database))