Add property similar to "description" to the DB wrapper

Aberta
#46 6 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
3/5
Tempo estimado
1-2 dias
Facilidade para iniciantes
35/100
Tipo de issue
Funcionalidade
Clareza
Razoavelmente clara
Status de atividade
Estagnada
Stack de tecnologia
postgresql, python
Domínio
databases

Direção de pesquisa

Read the implementation of fieldinfo() in the classic module and the DB-API 2 module's description property, which the issue identifies as a possible model. Trace how the DB wrapper exposes query metadata and how PostgreSQL-specific information is represented. Define the higher-level property or method and add coverage for its returned metadata; done means the DB wrapper provides useful field descriptions.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

In #39 we added a method fieldinfo() to the query in the classic module, which takes an optional field name or number. If nothing is specified, the field info for all fields of the query is returned.

This method is a bit low-level though, the provided information is pretty internal and difficult to interpret. On the DB wrapper class, we may want to add another higher-level method or property similar to the description attribute in the DB-API 2 module. This could be a little bit more informative and PostgreSQL-specific than the DB-API 2 description, but the idea would be the same. We could even reuse much of the code of the description property in the DB-API 2 since it is also based on a lower-level method similar to fieldinfo().

Linguagem predominante
Python
Estrelas
48
Forks
22
Merge médio
12min
PRs com merge (30d)
28

Preparar o ambiente

Abrir no Codespaces

Inicia o contêiner de desenvolvimento do projeto no navegador, com a sua própria conta do GitHub.

  • Sem Dockerfile nem arquivo Docker Compose
  • Sem modelo de pull request
  • Sem guia de contribuição

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de PyGreSQL/PyGreSQL

Todas as issues de PyGreSQL/PyGreSQL

Issues semelhantes

Mais issues de Python

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.