Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Row abstraction hides useful information #59

Open
ratamaa opened this issue Dec 11, 2017 · 0 comments
Open

Row abstraction hides useful information #59

ratamaa opened this issue Dec 11, 2017 · 0 comments

Comments

@ratamaa
Copy link

ratamaa commented Dec 11, 2017

Row interface does not currently provide

  • Number of columns in the row (so you could iterate over them when e.g. selecting *)
  • Names of columns (this information could be easily made available, preferably in the index order)
  • Types of columns (now you have to know them beforehand, which narrows the applicable use cases of this generic driver) E.g. the Postgres type integer could be fine but also the Oid could work (if the id field had getter). If you don't want to expose the Postgres-specific types, also the standard java.sql.Types integer (see https://github.com/pgjdbc/pgjdbc/blob/master/pgjdbc/src/main/java/org/postgresql/jdbc/TypeInfoCache.java#L68-L94 ) could work.

It is also currently quite impossible to get this information even if you cast Row into PgRow since PgColumn is package private. Could it be public?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant