Support qualified names for tables #19

Closed
szeiger opened this Issue Jul 19, 2011 · 10 comments

Comments

Projects
None yet
3 participants
@lalloni

This comment has been minimized.

Show comment Hide comment
@lalloni

lalloni Jul 20, 2011

Contributor

I need this, so I'm trying to make it hapen, but after an hour going up & down scalaquery sources still haven't found the obvious place to touch... in fact, I can't even identify where the name-String is obtained/calculated from an AbstractTable to be used in the final SQL from clause...

Contributor

lalloni commented Jul 20, 2011

I need this, so I'm trying to make it hapen, but after an hour going up & down scalaquery sources still haven't found the obvious place to touch... in fact, I can't even identify where the name-String is obtained/calculated from an AbstractTable to be used in the final SQL from clause...

@lalloni

This comment has been minimized.

Show comment Hide comment
@lalloni

lalloni Jul 20, 2011

Contributor

Ok... it's in BasicSQLUtils.quoteIdentifier(...) used from BasicQueryBuilder.table(...)

Contributor

lalloni commented Jul 20, 2011

Ok... it's in BasicSQLUtils.quoteIdentifier(...) used from BasicQueryBuilder.table(...)

@szeiger

This comment has been minimized.

Show comment Hide comment
@szeiger

szeiger Jul 20, 2011

Member

Yes. For a quick patch to get it working: Change the quoting to e.g. replace "." by "'.'" and use dots in your table names. To do it properly: Change table names from String to a new TableName class.

Member

szeiger commented Jul 20, 2011

Yes. For a quick patch to get it working: Change the quoting to e.g. replace "." by "'.'" and use dots in your table names. To do it properly: Change table names from String to a new TableName class.

@lalloni

This comment has been minimized.

Show comment Hide comment
@lalloni

lalloni Jul 20, 2011

Contributor

Just done (almost) that...

Check lalloni/scala-query@854cef3

I just added a schemaName besides tableName to tables and used it in SQL builder.

It's working here against an Oracle 11.

Contributor

lalloni commented Jul 20, 2011

Just done (almost) that...

Check lalloni/scala-query@854cef3

I just added a schemaName besides tableName to tables and used it in SQL builder.

It's working here against an Oracle 11.

@lalloni

This comment has been minimized.

Show comment Hide comment
@lalloni

lalloni Jul 20, 2011

Contributor

No description provided.

Contributor

lalloni commented Jul 20, 2011

No description provided.

@JustAHappyKid

This comment has been minimized.

Show comment Hide comment
@JustAHappyKid

JustAHappyKid Nov 9, 2011

Any hope of getting this merged into the main branch soon?

Any hope of getting this merged into the main branch soon?

@lalloni

This comment has been minimized.

Show comment Hide comment
@lalloni

lalloni Nov 10, 2011

Contributor

If you are in a hurry, it's available in my fork at https://github.com/plalloni/scala-query

Contributor

lalloni commented Nov 10, 2011

If you are in a hurry, it's available in my fork at https://github.com/plalloni/scala-query

@szeiger

This comment has been minimized.

Show comment Hide comment
@szeiger

szeiger Nov 10, 2011

Member

This was merged into master in dfd6597 on 2011-09-10

Member

szeiger commented Nov 10, 2011

This was merged into master in dfd6597 on 2011-09-10

@szeiger szeiger closed this Nov 10, 2011

@JustAHappyKid

This comment has been minimized.

Show comment Hide comment
@JustAHappyKid

JustAHappyKid Nov 10, 2011

So it should be in the next release, I guess... Any ETA on that? Thanks!

So it should be in the next release, I guess... Any ETA on that? Thanks!

@szeiger

This comment has been minimized.

Show comment Hide comment
@szeiger

szeiger Apr 9, 2013

Member

This was broken by the new code generator in Slick. Reopening.

Member

szeiger commented Apr 9, 2013

This was broken by the new code generator in Slick. Reopening.

@szeiger szeiger reopened this Apr 9, 2013

szeiger added a commit that referenced this issue Apr 10, 2013

Support schema names for tables in all statements except INSERTs.
The InsertBuilder API needs to change in a binary-incompatible way so we
cannot do this last bit in 1.0.x. The new quoteTableName method belongs
into BasicSQLUtilsComponent next to quoteIdentifier. It is placed as a
private method into BasicStatementBuilderComponent to ensure binary
compatibility with Slick 1.0.0. There should be a TableNode.schemaName
method but we cannot add that, either, without breaking binary
compatibility, so we pattern-match in quoteTableName instead. This needs
to be cleaned up after merging 1.0 back into master.

Test case in SchemaSupportTest. Ideally, all TestKit tests would use
schema names, but that will require some major work on TestKit.

Fixes issue #19.

@szeiger szeiger closed this Apr 11, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment