Return defined collaction name for mysql.
975977
public static String getCollation(final int id) {
        Entry entry = getEntry(id);

        if (entry != null) {
            return entry.mysqlCollation;
        } else {
            logger.warn("Unexpect mysql charset: " + id);
            return null;
        }
    }
1006643
def _columns_for_table(table_name):
    
    return {cname: col
            for (tname, cname), col in _COLUMNS.items()
            if tname == table_name}
812043
def get_mysql_cfg():
    
    environment = get_project_configuration()['environment']
    cfg = get_database_configuration()
    if environment == 'production':
        mysql = cfg['mysql_online']
    else:
        mysql = cfg['mysql_dev']
    return mysql
1332577
def sql(self, dialect=None, inserts=False, creates=True,
            drops=True, metadata_source=None):
        
        result = [self.ddl(dialect, creates=creates, drops=drops)]
        if inserts:
            for row in self.inserts(dialect):
                result.append(row)
        return '\n'.join(result)
94773
def find_col(rec, sym)
      rec.class.columns.detect{|c| c.name == sym.to_s}
    end
582800
def columns(self):
        """"""
        result = self.query.result()
        return [field.name for field in result.schema]
454989
def resolve_column(self, ref):
    ""
    if isinstance(ref, sqparse2.AttrX):
      if ref.parent.name not in self:
        raise ScopeUnkError('unk table or table alias', ref.parent.name)
      return ref.parent.name, ref.attr.name
    elif isinstance(ref, sqparse2.NameX):
      matches = set()
      for name, target in self.names.items():
        if isinstance(target, SyntheticTable):
          if ref.name in target.columns(self):
            matches.add(name)
        elif isinstance(target, table.Table):
          try: target.get_column(ref.name)
          except KeyError: pass
          else: matches.add(name)
        else:
          raise TypeError('expected SyntheticTable', type(target), target)
      if not matches: raise ScopeUnkError(ref)
      elif len(matches) > 1: raise ScopeCollisionError(matches, ref)
      else: return list(matches)[0], ref.name
    else:
      raise TypeError('unexpected', type(ref), ref)
21385
def get_sql(self, with_default_expression=True):
        '''
        
        '''
        if with_default_expression:
            if self.alias:
                return '%s ALIAS %s' % (self.db_type, self.alias)
            elif self.materialized:
                return '%s MATERIALIZED %s' % (self.db_type, self.materialized)
            else:
                default = self.to_db_string(self.default)
                return '%s DEFAULT %s' % (self.db_type, default)
        else:
            return self.db_type
644132
def col_name2cat(column):
    
    column_string = ''.join(s for s in column.replace(' ', '_') if s.isalnum() or '_' == s)
    return column_string
779248
def get_dialect_name(mixed: Union[SQLCompiler, Engine, Dialect]) -> str:
    
    dialect = get_dialect(mixed)
    # noinspection PyUnresolvedReferences
    return dialect.name
525777
def fetch_column_names(cls,
                           db: DATABASE_SUPPORTER_FWD_REF,
                           table: str) -> List[str]:
        """"""
        raise RuntimeError(_MSG_NO_FLAVOUR)
1326511
def get_name(self):
        """"""
        if len(self.taxid2asscs) == 1:
            return '{BASE}_{TAXID}'.format(
                BASE=self.name, TAXID=next(iter(self.taxid2asscs.keys())))
        return '{BASE}_various'.format(BASE=self.name)
778321
public function col_id($col, $table=false){
    
    if ( substr_count($col, ".") === 2 ){
      return $col;
    }
    else if ( substr_count($col, ".") === 1 ){
      if ( $table ){
        return $this->table_id($table).'.'.$this->simple_name($col);
      }
      else{
        return $this->simple_name($this->client_db).'.'.$col;
      }
    }
    else if ( $table ){
      return $this->table_id($table).'.'.$col;
    }
  }
393010
def _getParameters(self):
        """"""
        param = self.query._getParameters() 
        outputNames = []
        for outputCol in self.__columns:
            outputNames.append(outputCol)            
        param.update({'colModel' : '"'+', '.join(outputNames)+'"'})        
        return param
465337
def get_shape(cursor, name):
    """"""
    cursor.execute('select * from [%s]' % name)
    inds = cursor.description[-1][0][1:].split('_')
    return tuple([int(i) for i in inds])
929838
def get_db_name(self, fname):
        """"""
        return self.funcs.db_func(fname, self.outdir, self.exes.format_exe)[1]
928995
def get_column_def(self):
        
        static = "static" if self.static else ""
        return '{0} {1} {2}'.format(self.cql, self.db_type, static)