Parameters:
     - db_name
     - tbl_name
     - part_name
188169
def get_partition_by_name(self, db_name, tbl_name, part_name):
    
    self.send_get_partition_by_name(db_name, tbl_name, part_name)
    return self.recv_get_partition_by_name()
47902
@Override
    public Optional<List<String>> getPartitionNamesByParts(String databaseName, String tableName, List<String> parts)
    {
        Table table = getTableOrElseThrow(databaseName, tableName);
        String expression = buildGlueExpression(table.getPartitionColumns(), parts);
        List<Partition> partitions = getPartitions(databaseName, tableName, expression);
        return Optional.of(buildPartitionNames(table.getPartitionColumns(), partitions));
    }
1099418
def parse_db_url(db_url):
    
    u = urlparse(db_url)
    db = {}
    db["database"] = u.path[1:]
    db["user"] = u.username
    db["password"] = u.password
    db["host"] = u.hostname
    db["port"] = u.port
    return db
462409
function Part(name, priority, urlTemplate) {
    this.name = name;
    this.isActive = true;
    this.tables = {};
    this.priority = priority || 0;
    this.langPromises = {};
    this.urlTemplate = urlTemplate;
  }
1125733
def alter_table(self, dbname, tbl_name, new_tbl):
    
    self.send_alter_table(dbname, tbl_name, new_tbl)
    self.recv_alter_table()
982710
def get_table_objects_by_name(self, dbname, tbl_names):
    
    self.send_get_table_objects_by_name(dbname, tbl_names)
    return self.recv_get_table_objects_by_name()
262001
def get_num_partitions_by_filter(self, db_name, tbl_name, filter):
    
    self.send_get_num_partitions_by_filter(db_name, tbl_name, filter)
    return self.recv_get_num_partitions_by_filter()
160901
def database_path(self):
        
        filename = self.database_filename
        db_path = ":memory:" if filename == ":memory:" else (
            path.abspath(path.join(__file__, "../..", "..", "data", filename)))
        return db_path
568949
def get_partitions_ps_with_auth(self, db_name, tbl_name, part_vals, max_parts, user_name, group_names):
    
    self.send_get_partitions_ps_with_auth(db_name, tbl_name, part_vals, max_parts, user_name, group_names)
    return self.recv_get_partitions_ps_with_auth()
1325818
def validate_instance_dbname(self, dbname):
        '''  '''
        # 1-64 alphanumeric characters, cannot be a reserved MySQL word
        if re.match('[\w-]+$', dbname) is not None:
            if len(dbname) <= 41 and len(dbname) >= 1:
                if dbname.lower() not in MYSQL_RESERVED_WORDS:
                    return True
        return '*** Error: Database names must be 1-64 alphanumeric characters,\
            cannot be a reserved MySQL word.'
630994
def alter_partition_with_environment_context(self, db_name, tbl_name, new_part, environment_context):
    
    self.send_alter_partition_with_environment_context(db_name, tbl_name, new_part, environment_context)
    self.recv_alter_partition_with_environment_context()
895255
def get_partitions_with_auth(self, db_name, tbl_name, max_parts, user_name, group_names):
    
    self.send_get_partitions_with_auth(db_name, tbl_name, max_parts, user_name, group_names)
    return self.recv_get_partitions_with_auth()
1124619
public String getDatabaseName(boolean bPhysicalName)
    {
        String strDbName = m_strDbName;
        if (bPhysicalName)
        {
            if ((this.getDatabaseType() & DBConstants.SYSTEM_DATABASE) != DBConstants.SYSTEM_DATABASE)
            {
                if ((this.getProperty(strDbName + DBSHARED_PARAM_SUFFIX) != null)
                    && (!m_strDbName.equalsIgnoreCase(this.getProperty(SQLParams.INTERNAL_DB_NAME)))
                    && ((this.getDatabaseType() & DBConstants.TABLE_DATA_TYPE_MASK) == DBConstants.SHARED_DATA))
                        strDbName = this.getProperty(strDbName + DBSHARED_PARAM_SUFFIX);	// Special processing - db name supplied
                else if ((this.getProperty(strDbName + DBUSER_PARAM_SUFFIX) != null)
                    && (!m_strDbName.equalsIgnoreCase(this.getProperty(SQLParams.INTERNAL_DB_NAME)))
                    && ((this.getDatabaseType() & DBConstants.TABLE_DATA_TYPE_MASK) == DBConstants.USER_DATA))
                        strDbName = this.getProperty(strDbName + DBUSER_PARAM_SUFFIX);	// Special processing - db name supplied
                else
                {
	                if (this.getProperty(DBConstants.DB_USER_PREFIX) != null)
	                    if (!m_strDbName.equalsIgnoreCase(this.getProperty(SQLParams.INTERNAL_DB_NAME)))
	                        if ((this.getDatabaseType() & DBConstants.TABLE_DATA_TYPE_MASK) == DBConstants.USER_DATA)
	                    		strDbName = Utility.addToPath(this.getProperty(DBConstants.DB_USER_PREFIX), strDbName, DB_NAME_SEPARATOR);    // User prefix - Only for user data
	                if (Utility.getSystemSuffix(this.getProperty(DBConstants.SYSTEM_NAME), this.getProperty(DBConstants.DEFAULT_SYSTEM_NAME)) != null)
	                    if (!m_strDbName.equalsIgnoreCase(this.getProperty(SQLParams.INTERNAL_DB_NAME)))
	                    {
	                        if ((this.getDatabaseType() & DBConstants.TABLE_DATA_TYPE_MASK) == DBConstants.USER_DATA)
	                        	strDbName = Utility.addToPath(strDbName, Utility.getSystemSuffix(this.getProperty(DBConstants.SYSTEM_NAME), this.getProperty(DBConstants.DEFAULT_SYSTEM_NAME)), DB_NAME_SEPARATOR);	 // System suffix
	                        else if ((this.getDatabaseType() & DBConstants.TABLE_DATA_TYPE_MASK) == DBConstants.SHARED_DATA)
	                        {  // The shared database name is never changed, EXCEPT if the mode is set. Then there are a few exceptions
	                            if ((this.getProperty(DBConstants.MODE) == null) || (this.getProperty(DBConstants.MODE).length() == 0) || (this.getProperty(DBConstants.MODE).equalsIgnoreCase(RUN_MODE)))
                                {  // Default = Regular (run) mode
                                    if ((DEV_DATABASE.equalsIgnoreCase(m_strDbName)) || (MAIN_DATABASE.equalsIgnoreCase(m_strDbName)))
                                        strDbName = Utility.addToPath(strDbName, Utility.getSystemSuffix(this.getProperty(DBConstants.SYSTEM_NAME), this.getProperty(DBConstants.DEFAULT_SYSTEM_NAME)), DB_NAME_SEPARATOR);  // Add System suffix
                                }
                                else
                                {   // Development mode
                                    if (this.getProperty(DBConstants.MODE).length() >= 3)
	                                    if (this.getProperty(DBConstants.MODE).substring(0, 3).equalsIgnoreCase(DEVELOPMENT_MODE))
	                                {
	                                    if (DEV_DATABASE.equalsIgnoreCase(m_strDbName))
                                            strDbName = Utility.addToPath(strDbName, Utility.getSystemSuffix(this.getProperty(DBConstants.SYSTEM_NAME), this.getProperty(DBConstants.DEFAULT_SYSTEM_NAME)), DB_NAME_SEPARATOR);  // System suffix	                                        
	                                    if (MAIN_DATABASE.equalsIgnoreCase(m_strDbName))
	                                        strDbName = Utility.addToPath(strDbName, DEV_MAIN_SUFFIX, DB_NAME_SEPARATOR);  // Development menus
	                                }
                                }
	                        }
	                    }
                }
//x                if (this.getLocale() != null) //**THIS IS DONE IN makeDBLocale**
//x                	if ((this.getDatabaseType() & DBConstants.TABLE_DATA_TYPE_MASK) == DBConstants.SHARED_DATA)
//x                		if (this.getLocale() != this.getProperty(DBConstants.SYSTEM_NAME))
//x                			strDbName = strDbName + '_' + this.getLocale();
                if ((this.getDatabaseType() & DBConstants.TABLE_DATA_TYPE_MASK) == DBConstants.USER_DATA)
                    strDbName = Utility.addToPath(strDbName, USER_SUFFIX, DB_NAME_SEPARATOR);
                else if ((this.getDatabaseType() & DBConstants.TABLE_DATA_TYPE_MASK) == DBConstants.SHARED_DATA)
                    strDbName = Utility.addToPath(strDbName, SHARED_SUFFIX, DB_NAME_SEPARATOR);
            }
        }
        return strDbName;
    }
13654
def _match_dbname(self, dbname):
        
        for config in self._clusters:
            if re.match(config['pattern'], dbname):
                return config
        raise Exception('No such database %s.' % dbname)
1185204
def get_partition_with_auth(self, db_name, tbl_name, part_vals, user_name, group_names):
    
    self.send_get_partition_with_auth(db_name, tbl_name, part_vals, user_name, group_names)
    return self.recv_get_partition_with_auth()
1367426
def get_table_names_by_filter(self, dbname, filter, max_tables):
    
    self.send_get_table_names_by_filter(dbname, filter, max_tables)
    return self.recv_get_table_names_by_filter()
1049692
def delete_partition_column_statistics(self, db_name, tbl_name, part_name, col_name):
    
    self.send_delete_partition_column_statistics(db_name, tbl_name, part_name, col_name)
    return self.recv_delete_partition_column_statistics()