Parameters:
     - dbname
     - tbl_name
342018
def get_table(self, dbname, tbl_name):
    
    self.send_get_table(dbname, tbl_name)
    return self.recv_get_table()
1314830
def _get_collections(self, db_names=None):
        
        if db_names:
            db_list = db_names
        else:
            db_list = self.client.list_database_names()

        for db_name in db_list:
            db = self.client.get_database(db_name)
            for col_name in db.list_collection_names():
                size = db[col_name].g
                yield f"{db_name}.{col_name}"
279240
def get_db_filename(impl, working_dir):
    
    db_filename = impl.get_virtual_chain_name() + ".db"
    return os.path.join(working_dir, db_filename)
288029
private String fixDatabaseName(String databaseName, Record record, Map<String,String> oldProperties)
    {
        if (databaseName.endsWith(BaseDatabase.SHARED_SUFFIX))
            databaseName = databaseName.substring(0, databaseName.length() - BaseDatabase.SHARED_SUFFIX.length());
        else if (databaseName.endsWith(BaseDatabase.USER_SUFFIX))
            databaseName = databaseName.substring(0, databaseName.length() - BaseDatabase.USER_SUFFIX.length());
        String recordDBName = record.getDatabaseName();
        if (record instanceof DatabaseInfo)
            recordDBName = DatabaseInfo.DATABASE_INFO_FILE;
        if (!databaseName.startsWith(recordDBName))
        { // Typically user name
            this.getTask().setProperty(DBConstants.DB_USER_PREFIX, databaseName.substring(0, databaseName.indexOf('_')));
            databaseName = databaseName.substring(databaseName.indexOf('_') + 1);
        }
        if (!databaseName.endsWith(recordDBName))
        {
            String suffix = databaseName.substring(databaseName.lastIndexOf('_') + 1);
            if (suffix.length() == 2)
            { // Typically language
                this.getTask().setProperty(DBParams.LANGUAGE, suffix);
                databaseName = databaseName.substring(0, databaseName.lastIndexOf('_'));
                suffix = databaseName.substring(databaseName.lastIndexOf('_') + 1);             
            }
            if (!databaseName.endsWith(recordDBName))
            {
                databaseName = databaseName.substring(0, databaseName.lastIndexOf('_'));
                if ((record.getDatabaseType() & DBConstants.USER_DATA) != 0)
                    this.getTask().setProperty(record.getDatabaseName() + BaseDatabase.DBUSER_PARAM_SUFFIX, suffix);
                else
                    this.getTask().setProperty(record.getDatabaseName() + BaseDatabase.DBSHARED_PARAM_SUFFIX, suffix);
                suffix = databaseName.substring(databaseName.lastIndexOf('_') + 1); //?         
            }
            if (!databaseName.endsWith(recordDBName))
            {
                this.getTask().setProperty(DBConstants.SYSTEM_NAME, suffix);
                databaseName = databaseName.substring(0, databaseName.lastIndexOf('_'));
            }
        }
        return databaseName;
    }
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
269484
def DbRenameServer(self, argin):
        
        self._log.debug("In DbRenameServer()")

        if len(argin) < 2:
            self.warn_stream("DataBase::DbRenameServer(): insufficient number of arguments ")
            th_exc(DB_IncorrectArguments,
                   "insufficient number of arguments (two required: old name and new name",
                   "DataBase::DbRenameServer")

        old_name = argin[0]
        new_name = argin[1]

        if ('/' not in argin[0]) or ('/' not in argin[1]):
            self.warn_stream("DataBase::DbRenameServer(): wrong syntax in command args ")
            th_exc(DB_IncorrectArguments,
                   "Wrong syntax in command args (ds_exec_name/inst_name)",
                   "DataBase::DbRenameServer")

        self.db.rename_server(old_name, new_name)
655399
def _get_column_by_db_name(cls, name):
        
        return cls._columns.get(cls._db_map.get(name, name))
923567
def drop_index_by_name(self, db_name, tbl_name, index_name, deleteData):
    
    self.send_drop_index_by_name(db_name, tbl_name, index_name, deleteData)
    return self.recv_drop_index_by_name()
474407
function validateDatabaseName(databaseName) {
  if (typeof databaseName !== 'string')
    throw MongoError.create({ message: 'database name must be a string', driver: true });
  if (databaseName.length === 0)
    throw MongoError.create({ message: 'database name cannot be the empty string', driver: true });
  if (databaseName === '$external') return;

  const invalidChars = [' ', '.', '$', '/', '\\'];
  for (let i = 0; i < invalidChars.length; i++) {
    if (databaseName.indexOf(invalidChars[i]) !== -1)
      throw MongoError.create({
        message: "database names cannot contain the character '" + invalidChars[i] + "'",
        driver: true
      });
  }
}
789302
def get_partition(self, db_name, tbl_name, part_vals):
    
    self.send_get_partition(db_name, tbl_name, part_vals)
    return self.recv_get_partition()
811754
def available(self):
        '''  '''
        return self.db_name in map(
            lambda x: x['name'], self._db.get_database_list()
        )
720928
def dbname(self, value):
        
        self._dbname = value
        self._connectionXML.set('dbname', value)
174916
def get_partition_names_ps(self, db_name, tbl_name, part_vals, max_parts):
    
    self.send_get_partition_names_ps(db_name, tbl_name, part_vals, max_parts)
    return self.recv_get_partition_names_ps()
707430
def get_index_names(self, db_name, tbl_name, max_indexes):
    
    self.send_get_index_names(db_name, tbl_name, max_indexes)
    return self.recv_get_index_names()
829002
def alter_table_with_environment_context(self, dbname, tbl_name, new_tbl, environment_context):
    
    self.send_alter_table_with_environment_context(dbname, tbl_name, new_tbl, environment_context)
    self.recv_alter_table_with_environment_context()
119210
def getDbNames(self):
		""""""

		request = []
		request.append(uu({'-dbnames': '' }))

		result = self._doRequest(request)
		result = FMResultset.FMResultset(result)

		dbNames = []
		for dbName in result.resultset:
			dbNames.append(string.lower(dbName['DATABASE_NAME']))

		return dbNames
628341
def build_db_cmd(self, fname):
        """"""
        return self.funcs.db_func(fname, self.outdir, self.exes.format_exe)[0]