Skip to content

Feature Request: Adding Meta Data to Results #18

@JensRavens

Description

@JensRavens

I really like the work you've been doing on this project, as this seems to be the easiest to use Postgres library for Swift so far that also works beautifully on my iOS app.
Now to my request: I'm currently trying to build a new app that would allow the user to type in SQL queries himself on a custom database (so I don't know the schema upfront). The user can use that feature to generate custom reports, charts, ..., and there needs to be a way of naming things and do some introspection of query results.

I do agree with your FAQ saying that one shouldn't use name based indices to retrieve values, but would it be possible to somehow retrieve the name of a column and it's type?

Think about a query like this (that the user will input into a text field of the running app):

SELECT count(*) AS population, born_at
FROM people
GROUP BY born_at

I would like to display the label population in the graph, effectively giving the user the possibility to steer everything about the graph/report with SQL (also finding out that born_at is a date, and therefore correctly displaying it in the UI).

Any hints or directions on this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions