Skip to content

Consistency between metadata and select #66

@wernerdaehn

Description

@wernerdaehn

When calling the connection.getMetadata().getTables() with a schema or catalog, these two fields are ignored. It returns the table that has the same name. Which is quite convenient. I want to use csvjdbc for JUnit tests of database libraries. This way I can get the metadata of schema1.table1. It is the metadata of the file table1.

The problem is that the select statement does not behave the same way. A
select * from schema1.table1;
should also return all rows from the table1 file. The metadata query tells that such table exists in all schemas hence the parser should ignore the schema qualifier when reading a file.

Would that be doable?

The alternative would be to use a fixed schema. Metadata returns a row where schema is always CSVJDBC. The connection has the default schema CSVJDBC (see connection.getSchema()) and in the select statement the schema is optional.

select * from CSVJDBC.table1;
select * from table1;
both return the same data.

(similar with catalog but I do not need that)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions