get all the fields from a specific table
507781
def _getFieldsInDB(self, tablename):
		""""""
		SQL = 'SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.Columns where TABLE_NAME="%s"' % tablename
	
		array_data = self.execQuery(SQL)
		
		return [x[0] for x in array_data]
775210
protected function getTableFields()
    {   
        $connection = Connection::connect();

        $driver = getenv('P_DRIVER');

        if ($driver == 'pgsql') {
            $describe = '\d ';
        }
        $describe = 'describe ';
        
        $q = $connection->prepare($describe.$this->getTableName($this->className));
        $q->execute();
        
        return $q->fetchAll(PDO::FETCH_COLUMN);        
    }
648281
def fetch_all_objects_from_db(self,
                                  cls: Type[T],
                                  table: str,
                                  fieldlist: Sequence[str],
                                  construct_with_pk: bool,
                                  *args) -> List[T]:
        """"""
        return self.fetch_all_objects_from_db_where(
            cls, table, fieldlist, construct_with_pk, None, *args)
772948
def find_all(self, table, limit=10):
        '''
        
        '''
        sql = "select * from {} limit 0,{}".format(table, limit)
        res = self.query(sql)
        return res
1137711
def get_fields(self, db_name, table_name):
    
    self.send_get_fields(db_name, table_name)
    return self.recv_get_fields()
1120553
def get_fields(self):
        
        if self.__cache_all_fields is None:
            self.__cache_all_fields = []
            for i in self.get_classes():
                for j in i.get_fields():
                    self.__cache_all_fields.append(j)
        return self.__cache_all_fields
1211436
function GetFields($table)
    {
        $fields = array();
        $sql = new Sql\Builder($this);
        $tbl = $sql->Table('information_schema.columns', array('TABLE_SCHEMA', 'TABLE_NAME', 'COLUMN_NAME'));
        $cond = $sql->Equals($tbl->Field('TABLE_SCHEMA'), $sql->Value($this->dbName))
                ->And_($sql->Equals($tbl->Field('TABLE_NAME'), $sql->Value($table)));
        $what = $sql->SelectList($tbl->Field('COLUMN_NAME'));
        $select = $sql->Select(true, $what, $tbl, $cond);
        $reader = $this->ExecuteQuery((string) $select);
        while ($reader->Read())
        {
            $fields[] = $reader->ByIndex(0);
        }
        return $fields;
    }
1103334
private function getAllField($params){
		$result = array();
		$requete = "
				SELECT *
				FROM ".$params['table']."
						";
		$res = $this->connexionBdd->requete($requete);
		while ($fetch = mysql_fetch_assoc($res)) {
			if($params['table'] !='personne'){
				$temp = array('value'=>$fetch[$params['value']] , 'title' =>$fetch[$params['title']]);
				$result[]=$temp;
			}
			else{
				$result[]=array('value'=>$fetch[$params['value']] , 'title' =>$fetch['nom'] . " ". $fetch['prenom']);
			}
		}
		return $result;
	}
416144
def getFields(cls) :
		""""""
		s = set(cls.columns.keys())
		s.remove('json')
		s.remove('raba_id')
		return s
393649
def get_fields(desc2nts):
        """"""
        if 'flat' in desc2nts:
            nts_flat = desc2nts.get('flat')
            if nts_flat:
                return nts_flat[0]._fields
        if 'sections' in desc2nts:
            nts_sections = desc2nts.get('sections')
            if nts_sections:
                return nts_sections[0][1][0]._fields
25890
public function getMultilangFields($table)
    {
        $fields = $this->getFields($table);
        $multiLangFields = [];

        foreach ($fields as $field) {
            if (preg_match("/({$table}\.)?(?<field>.+)_1$/", $field, $matches)) {
                $multiLangFields[] = $matches['field'];
            }
        }

        return $multiLangFields;
    }
394860
protected function getTableFields() {
        $data = array_keys($this->rules());
        if (!empty($this->primaryKey)) {
            $data[] = $this->primaryKey;
        }
        return $data;
    }
353528
def get_fields(self):
        
        result = [key for key in self.__original_data__.keys()
                  if key not in self.__deleted_fields__]
        result.extend([key for key in self.__modified_data__.keys()
                       if key not in result and key not in self.__deleted_fields__])

        return result
474471
public function getFieldById($table, $field, $id, $id_col = 'id')
    {
        $options = array('W' => '`' . $id_col . "`='" . $this->escape($id) . "'");

        try {
            return $this->getField($table, $field, $options);
        } catch (\Exception $e) {
            Throw $e;
        }
    }
266927
def select(self, fields=['rowid', '*'], offset=None, limit=None):
        ''' 
        '''
        # base SQL
        SQL = 'SELECT %s FROM %s' % (','.join(fields), self._table)
        
        # selectors
        if self._selectors:
            SQL = ' '.join([SQL, 'WHERE', self._selectors]).strip()
        
        # modifiers
        if self._modifiers:
            SQL = ' '.join([SQL, self._modifiers])

        # limit
        if limit is not None and isinstance(limit, int):
            SQL = ' '.join((SQL, 'LIMIT %s' % limit))

        # offset
        if (limit is not None) and (offset is not None) and isinstance(offset, int):
            SQL = ' '.join((SQL, 'OFFSET %s' % offset))

        return ''.join((SQL, ';'))
387908
def get_all_fields(self):
        """"""
        return {
            name: {
                'name': name,
                'label': field['label'],
            }
            for name, field in self.get_model_config().get_list_fields().items()
        }
969433
public function field_data($table)
	{
		$sql = 'SELECT "colname" AS "name", "typename" AS "type", "default" AS "default", "length" AS "max_length",
				CASE "keyseq" WHEN NULL THEN 0 ELSE 1 END AS "primary_key"
			FROM "syscat"."columns"
			WHERE LOWER("tabschema") = '.$this->escape(strtolower($this->database)).'
				AND LOWER("tabname") = '.$this->escape(strtolower($table)).'
			ORDER BY "colno"';

		return (($query = $this->query($sql)) !== FALSE)
			? $query->result_object()
			: FALSE;
	}