Returns a mapping of SQLite column names to Converter objects.
425608
def _GetSqliteSchema(self, proto_struct_class, prefix=""):
    """"""
    schema = collections.OrderedDict()
    for type_info in proto_struct_class.type_infos:
      if type_info.__class__ is rdf_structs.ProtoEmbedded:
        schema.update(
            self._GetSqliteSchema(
                type_info.type, prefix="%s%s." % (prefix, type_info.name)))
      else:
        field_name = utils.SmartStr(prefix + type_info.name)
        schema[field_name] = Rdf2SqliteAdapter.GetConverter(type_info)
    return schema
362655
private Map<String, ColumnDefinition> makeColumnMap(ColumnDefinition[] columns)
   {
      Map<String, ColumnDefinition> map = new HashMap<String, ColumnDefinition>();
      for (ColumnDefinition def : columns)
      {
         map.put(def.getName(), def);
      }
      return map;
   }
689181
public static MappingColumn[] getIdMappingColumns(final Class<?> entityType) {
		return Arrays.stream(MappingUtils.getMappingColumns(entityType)).filter(c -> c.isId())
				.toArray(MappingColumn[]::new);
	}
738879
def _fieldnames_to_colnames(model_cls, fieldnames):
        """"""
        get_field = model_cls._meta.get_field
        fields = map(get_field, fieldnames)
        return {f.column for f in fields}
800057
private Map<Integer, Integer> getColumnPosSqlTypes() {
    try {
      final Map<Integer, Integer> columnPosSqlTypes = Maps.newHashMap();
      ParameterMetaData pMetaData = this.insertPstmtForFixedBatch.getParameterMetaData();
      for (int i = 1; i <= pMetaData.getParameterCount(); i++) {
        columnPosSqlTypes.put(i, pMetaData.getParameterType(i));
      }
      return columnPosSqlTypes;
    } catch (SQLException e) {
      throw new RuntimeException("Cannot retrieve columns types for batch insert", e);
    }
  }
1100286
def _getcols(cur, table):
        
        query = ' '.join(("SELECT * FROM", table, "LIMIT 0"))  # for testing

        cur.execute(query)
        colnames = [desc[0] for desc in cur.description]
        LOG.info("COLS (%s): %s", table, colnames)

        return
977770
def tables(self):
        
        select = ("SELECT name FROM sqlite_master",)
        query = self.execute(*select)
        result = query.fetchall()

        # Filter first column from rows.
        return [row[0] for row in result]
843103
@Override
    public String[] columnNames() {
        return getInputSchema().getColumnNames().toArray(new String[getInputSchema().getColumnNames().size()]);
    }
745784
def table_names(self):
        """"""
        query = "SELECT name FROM sqlite_master WHERE type='table'"
        cursor = self.connection.execute(query)
        results = cursor.fetchall()
        return [result_tuple[0] for result_tuple in results]
1006643
def _columns_for_table(table_name):
    
    return {cname: col
            for (tname, cname), col in _COLUMNS.items()
            if tname == table_name}
1361046
@Override
    public Map<String, String> mapToColumns(Tuple tuple) {
        Fields fields = tuple.getFields();
        Map<String, String> columns = new HashMap<String, String>();
        for (int i = 0; i < fields.size(); i++) {
            String name = fields.get(i);
            Boolean isRowField = Arrays.asList(this.rowKeyFields).contains(name);
            if (!isRowField) {
                Object value = tuple.getValueByField(name);
                columns.put(name, (value != null ? value.toString() : ""));
            }
        }
        return columns;
    }
766480
protected String[] getKeysFromResultSet()
            throws SQLException {

        String[] keys = super.getKeysFromResultSet();

        // check schemaProperty mapping names for more accurate column->field mapping
        SchemaProperty[] props = _schemaType.getElementProperties();
        for (int i = 0; i < props.length; i++) {

            int col = -1;
            try {
                col = _resultSet.findColumn(props[i].getName().getLocalPart());
            } catch (SQLException x) {
            }

            if (col > 0) {
                keys[col] = props[i].getJavaPropertyName().toUpperCase();
            }
        }
        return keys;
    }
1308140
def columns(self):
        
        c = self._connection.cursor()
        c.execute("describe `%s`.`%s`" % (self._db, self._name))
        self._cols = []
        for col in c.fetchall():
            self._cols.append(Column.build(col, table=self, con=self._connection))
        return self._cols
720915
private function getColumnTypes(): void
  {
    $rows = DataLayer::getAllTableColumns();
    foreach ($rows as $row)
    {
      $key = '@'.$row['table_name'].'.'.$row['column_name'].'%type@';
      $key = strtoupper($key);

      $value = $row['column_type'];
      if (isset($row['character_set_name'])) $value .= ' character set '.$row['character_set_name'];

      $this->replacePairs[$key] = $value;
    }

    $this->io->text(sprintf('Selected %d column types for substitution', sizeof($rows)));
  }
1232043
def get_database_columns(self, tables=None, database=None):
        """"""
        # Get table data and columns from source database
        source = database if database else self.database
        tables = tables if tables else self.tables
        return {tbl: self.get_columns(tbl) for tbl in tqdm(tables, total=len(tables),
                                                           desc='Getting {0} columns'.format(source))}
16241
def schema(self):
        
        c = self.conn.cursor()
        c.execute(
            '''
            SELECT sql FROM sqlite_master
            ''')
        results = []
        for i, in c:
            if i is not None:
                results.append(i)
        return '\n'.join(results)
1281934
public static List<String> getFieldNames(ResultSetMetaData  resultSetMetaData) throws SQLException {
        List<String> columnNames = new ArrayList<>();
        int cols = resultSetMetaData.getColumnCount();
        for (int i = 1; i <= cols; i++) {
            columnNames.add(resultSetMetaData.getColumnName(i));
        }
        return columnNames;
    }