[#4458] Add support for Oracle DB links via Table.at(Link), Table.at(Name), Table.at(String)

This commit is contained in:
lukaseder 2015-08-06 13:12:28 +02:00
parent 1ee981b432
commit e8b3e0953e
7 changed files with 346 additions and 5 deletions

View File

@ -0,0 +1,62 @@
/**
* Copyright (c) 2009-2015, Data Geekery GmbH (http://www.datageekery.com)
* All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Other licenses:
* -----------------------------------------------------------------------------
* Commercial licenses for this work are available. These replace the above
* ASL 2.0 and offer limited warranties, support, maintenance, and commercial
* database integrations.
*
* For more information, please visit: http://www.jooq.org/licenses
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package org.jooq;
/* [pro] xx
xxx
x x xxxxxxxx xxxx xxxxxxxxxx
x
x xxxxxxx xxxxx xxxx
xx
xxxxxx xxxxxxxxx xxxx xxxxxxx xxxxxxxxx x
xxx
x xxx xxxxx xxxxxxx
xx
xxxxxx xxxxxxxxx
xxx
x xxx xxxxxxxx xxxx xxxxx
xx
xxxxxx xxxxxxx
x
xx [/pro] */

View File

@ -232,6 +232,35 @@ public interface Table<R extends Record> extends TableLike<R> {
*/
<O extends Record> List<ForeignKey<R, O>> getReferencesTo(Table<O> other);
/* [pro] xx
xx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xx xxxx xxxxxxxx xxxxx
xx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxx
x x xxxxx xxxxxxxxx xx xxxx xxxxx xx x xxxxx xxxxxx xxxxxx
x
x xxxx xxxxxxxxxxxxxxxx
xx
xxxxxxxxxxxxxxxx
xxxxxxxx xxxxxxxxx xxxxxx
xxx
x x xxxxx xxxxxxxxx xx xxxx xxxxx xx x xxxxx xxxxxx xxxxxx
x
x xxxx xxxxxxxxxxxxxx
xx
xxxxxxxxxxxxxxxx
xxxxxxxx xxxxxxx xxxxxx
xxx
x x xxxxx xxxxxxxxx xx xxxx xxxxx xx x xxxxx xxxxxx xxxxxx
xx
xxxxxxxxxxxxxxxx
xxxxxxxx xxxxxxx xxxxxx
xx [/pro] */
// -------------------------------------------------------------------------
// XXX: Aliasing clauses
// -------------------------------------------------------------------------

View File

@ -93,11 +93,13 @@ abstract class AbstractParam<T> extends AbstractField<T> implements Param<T> {
return paramName != null
? paramName
// [#3707] Protect value.toString call for certain jOOQ types.
: value instanceof UDTRecord
? ((UDTRecord<?>) value).getUDT().getName()
: value instanceof ArrayRecord
? ((ArrayRecord<?>) value).getName()
/* [pro] xx
xx xxxxxxx xxxxxxx xxxxxxxxxxxxxx xxxx xxx xxxxxxx xxxx xxxxxx
x xxxxx xxxxxxxxxx xxxxxxxxx
x xxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxx
x xxxxx xxxxxxxxxx xxxxxxxxxxx
x xxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxx
xx [/pro] */
: String.valueOf(value);
}

View File

@ -52,6 +52,7 @@ import static org.jooq.JoinType.NATURAL_RIGHT_OUTER_JOIN;
import static org.jooq.JoinType.OUTER_APPLY;
import static org.jooq.JoinType.RIGHT_OUTER_JOIN;
import static org.jooq.JoinType.STRAIGHT_JOIN;
// ...
import static org.jooq.impl.DSL.table;
import static org.jooq.impl.DSL.val;
@ -71,6 +72,7 @@ import org.jooq.Field;
import org.jooq.ForeignKey;
import org.jooq.Identity;
import org.jooq.JoinType;
// ...
import org.jooq.Name;
import org.jooq.PivotForStep;
import org.jooq.QueryPart;
@ -544,6 +546,21 @@ abstract class AbstractTable<R extends Record> extends AbstractQueryPart impleme
xxxxxx xxx xxxxxxxxxxxxxxxxxx xxxxxx
x
xxxxxxxxx
xxxxxx xxxxx xxxxxxxx xxxxxxxxx xxxxx x
xxxxxx xxxxxxxxxxxxxxx
x
xxxxxxxxx
xxxxxx xxxxx xxxxxxxx xxxxxxx xxxxx x
xxxxxx xxxxxxxxxxxxxxx
x
xxxxxxxxx
xxxxxx xxxxx xxxxxxxx xxxxxxx xxxxx x
xxxxxx xxx xxxxxxxxxxxxxxxxxxxx xxxxxx
x
xx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xx xxxx xxxxx xxx
xx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

View File

@ -145,6 +145,7 @@ import org.jooq.InsertValuesStep8;
import org.jooq.InsertValuesStep9;
import org.jooq.InsertValuesStepN;
import org.jooq.Keyword;
// ...
import org.jooq.Merge;
import org.jooq.MergeKeyStep1;
import org.jooq.MergeKeyStep10;
@ -5862,6 +5863,36 @@ public class DSL {
return new QualifiedField<T>(name, type);
}
/* [pro] xx
xx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xx xxxx xxxxxxxx xxxxx
xx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxx
x xxxxxx x xxxxxxxx xxxx xxxxxxxxxx
xx
xxxxxxxxxxxxxxxx
xxxxxx xxxxxx xxxx xxxxxxxxxxx xxxxx x
xxxxxx xxxxxxxxxx xxxxxx
x
xxx
x xxxxxx x xxxxxxxx xxxx xxxxxxxxxx
xx
xxxxxxxxxxxxxxxx
xxxxxx xxxxxx xxxx xxxxxxxxxxx xxxxx xxxxxx xxxxxxx x
xxxxxx xxx xxxxxxxxxxxxxx xxxxxxxx
x
xxx
x xxxxxx x xxxxxxxx xxxx xxxxxxxxxx
xx
xxxxxxxxxxxxxxxx
xxxxxx xxxxxx xxxx xxxxxxxxx xxxxx x
xxxxxx xxx xxxxxxxxxxxxxxx
x
xx [/pro] */
// -------------------------------------------------------------------------
// XXX Plain SQL object factory
// -------------------------------------------------------------------------

View File

@ -0,0 +1,99 @@
/**
* Copyright (c) 2009-2015, Data Geekery GmbH (http://www.datageekery.com)
* All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Other licenses:
* -----------------------------------------------------------------------------
* Commercial licenses for this work are available. These replace the above
* ASL 2.0 and offer limited warranties, support, maintenance, and commercial
* database integrations.
*
* For more information, please visit: http://www.jooq.org/licenses
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package org.jooq.impl;
/* [pro] xx
xxxxxx xxxxxxxxxxxxxxxx
xxxxxx xxxxxxxxxxxxxxxxx
xxxxxx xxxxxxxxxxxxxx
xxxxxx xxxxxxxxxxxxxx
xxxxxx xxxxxxxxxxxxxxxx
xxx
x xxxxxxx xxxxx xxxx
xx
xxxxx xxxxxxxx xxxxxxx xxxxxxxxxxxxxxxxx xxxxxxxxxx xxxx x
xxx
x xxxxxxxxx xxx
xx
xxxxxxx xxxxxx xxxxx xxxx xxxxxxxxxxxxxxxx x xxxxxxxxxxxxxxxxxxxxx
xxxxxxx xxxxx xxxxxx xxxxxxx
xxxxxxx xxxxx xxxxxx xxxxx
xxxxxxxxxxxxxxx xxxxx xxxxxx xxxxxxx x
xxxxxxxxx x xxxxx
xxxxxxxxxxx x xxxxxxx
x
xxxxxxxxxxxxx xxxxx x
xxxxx xxx xxxxxxxxxxxxxxxxxxx
x
xxxxxxxxx
xxxxxx xxxxx xxxx xxxxxxxxxxxxxxxxx xxxx x
xxxxxx xxxxxxxxxxxx x xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxx
xx xxxxxxxxxxxxx xx xxxxx x
xxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxx
x
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
x
xxxxxxxxx
xxxxxx xxxxx xxxxxxxx xxxxxxxxxxxxxxxxxx xxxx x
xxxxxx xxxxx
x
xxxxxxxxx
xxxxxx xxxxx xxxxxx xxxxxxxx x
xxxxxx xxxxxxx
x
xxxxxxxxx
xxxxxx xxxxx xxxxxx xxxxxx x
xxxxxx xxxxx
x
x
xx [/pro] */

View File

@ -0,0 +1,101 @@
/**
* Copyright (c) 2009-2015, Data Geekery GmbH (http://www.datageekery.com)
* All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Other licenses:
* -----------------------------------------------------------------------------
* Commercial licenses for this work are available. These replace the above
* ASL 2.0 and offer limited warranties, support, maintenance, and commercial
* database integrations.
*
* For more information, please visit: http://www.jooq.org/licenses
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package org.jooq.impl;
/* [pro] xx
xxxxxx xxxxxxxxxxxxxxxxx
xxxxxx xxxxxxxxxxxxxx
xxxxxx xxxxxxxxxxxxxxxx
xxxxxx xxxxxxxxxxxxxxx
xxx
x xxxxxxx xxxxx xxxx
xx
xxxxx xxxxxxxxxxxxx xxxxxxx xxxxxxx xxxxxxx xx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