Skip to content

Commit 2ee726d

Browse files
committed
Support discriminator multitenancy
1 parent bdb553d commit 2ee726d

110 files changed

Lines changed: 3205 additions & 419 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎data-hibernate-reactive/src/main/java/io/micronaut/data/hibernate/reactive/operations/DefaultHibernateReactiveRepositoryOperations.java‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
import io.micronaut.data.model.runtime.UpdateOperation;
4343
import io.micronaut.data.operations.reactive.ReactorCriteriaRepositoryOperations;
4444
import io.micronaut.data.runtime.convert.DataConversionService;
45-
import io.micronaut.data.runtime.operations.internal.query.BindableParametersPreparedQuery;
4645
import io.micronaut.transaction.reactive.ReactorReactiveTransactionOperations;
4746
import jakarta.persistence.EntityGraph;
4847
import jakarta.persistence.FlushModeType;
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package io.micronaut.data.jdbc.h2
2+
3+
import io.micronaut.data.tck.tests.AbstractDiscriminatorMultitenancySpec
4+
5+
class H2DiscriminatorMultitenancySpec extends AbstractDiscriminatorMultitenancySpec implements H2TestPropertyProvider {
6+
7+
@Override
8+
Map<String, String> getExtraProperties() {
9+
return [accountRepositoryClass: H2AccountRepository.name]
10+
}
11+
12+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package io.micronaut.data.jdbc.mariadb
2+
3+
import io.micronaut.data.jdbc.mysql.MySqlAccountRepository
4+
import io.micronaut.data.tck.tests.AbstractDiscriminatorMultitenancySpec
5+
6+
class MariaDiscriminatorMultitenancySpec extends AbstractDiscriminatorMultitenancySpec implements MariaTestPropertyProvider {
7+
8+
@Override
9+
Map<String, String> getExtraProperties() {
10+
return [accountRepositoryClass: MySqlAccountRepository.name]
11+
}
12+
13+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package io.micronaut.data.jdbc.mysql
2+
3+
4+
import io.micronaut.data.tck.tests.AbstractDiscriminatorMultitenancySpec
5+
6+
class MySqlDiscriminatorMultitenancySpec extends AbstractDiscriminatorMultitenancySpec implements MySQLTestPropertyProvider {
7+
8+
@Override
9+
Map<String, String> getExtraProperties() {
10+
return [accountRepositoryClass: MySqlAccountRepository.name]
11+
}
12+
13+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package io.micronaut.data.jdbc.oraclexe
2+
3+
4+
import io.micronaut.data.tck.tests.AbstractDiscriminatorMultitenancySpec
5+
6+
class OracleXEDiscriminatorMultitenancySpec extends AbstractDiscriminatorMultitenancySpec implements OracleTestPropertyProvider {
7+
8+
@Override
9+
Map<String, String> getExtraProperties() {
10+
return [accountRepositoryClass: OracleXEAccountRepository.name]
11+
}
12+
13+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package io.micronaut.data.jdbc.postgres
2+
3+
4+
import io.micronaut.data.tck.tests.AbstractDiscriminatorMultitenancySpec
5+
6+
class PostgresDiscriminatorMultitenancySpec extends AbstractDiscriminatorMultitenancySpec implements PostgresTestPropertyProvider {
7+
8+
@Override
9+
Map<String, String> getExtraProperties() {
10+
return [accountRepositoryClass: PostgresAccountRepository.name]
11+
}
12+
13+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package io.micronaut.data.jdbc.sqlserver
2+
3+
4+
import io.micronaut.data.tck.tests.AbstractDiscriminatorMultitenancySpec
5+
6+
class SqlServerDiscriminatorMultitenancySpec extends AbstractDiscriminatorMultitenancySpec implements MSSQLTestPropertyProvider {
7+
8+
@Override
9+
Map<String, String> getExtraProperties() {
10+
return [accountRepositoryClass: MSAccountRepository.name]
11+
}
12+
13+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/*
2+
* Copyright 2017-2020 original authors
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
package io.micronaut.data.jdbc.h2;
17+
18+
import io.micronaut.data.jdbc.annotation.JdbcRepository;
19+
import io.micronaut.data.model.query.builder.sql.Dialect;
20+
import io.micronaut.data.repository.CrudRepository;
21+
import io.micronaut.data.tck.entities.Account;
22+
import io.micronaut.data.tck.repositories.AccountRepository;
23+
import io.micronaut.data.tck.repositories.ArraysEntityRepository;
24+
25+
@JdbcRepository(dialect = Dialect.H2)
26+
public interface H2AccountRepository extends AccountRepository {
27+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/*
2+
* Copyright 2017-2020 original authors
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
package io.micronaut.data.jdbc.mysql;
17+
18+
import io.micronaut.data.jdbc.annotation.JdbcRepository;
19+
import io.micronaut.data.model.query.builder.sql.Dialect;
20+
import io.micronaut.data.tck.repositories.AccountRepository;
21+
22+
@JdbcRepository(dialect = Dialect.MYSQL)
23+
public interface MySqlAccountRepository extends AccountRepository {
24+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/*
2+
* Copyright 2017-2020 original authors
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
package io.micronaut.data.jdbc.oraclexe;
17+
18+
import io.micronaut.data.jdbc.annotation.JdbcRepository;
19+
import io.micronaut.data.model.query.builder.sql.Dialect;
20+
import io.micronaut.data.tck.repositories.AccountRepository;
21+
22+
@JdbcRepository(dialect = Dialect.ORACLE)
23+
public interface OracleXEAccountRepository extends AccountRepository {
24+
}

0 commit comments

Comments
 (0)