#111 - Package and type renames.
Package renames: - `….domain` -> `….mapping` - `….function.connectionfactory` -> `connectionfactory` - `….function.convert` -> `convert` - `….function.query` -> `query` - `….function` -> `….core` Type moves: - `….dialect.R2dbcSimpleTypeHolder` -> `….mapping.R2dbcSimpleTypeHolder` - `….mapping.BindTarget` -> `….dialect.BindTarget` - `….mapping.PreparedOperation` -> `….core.PreparedOperation` - `….mapping.QueryOperation` -> `….core.QueryOperation` - `….mapping.BindOperation` -> `….core.BindOperation` - `….connectionfactory.ConnectionFactoryTransactionManager` -> `….connectionfactory.R2dbcTransactionManager` That makes us end up with: - `connectionfactory` - `core` -> `connectionfactory`, `convert`, `dialect`, `mapping`, `query` - `query` -> `convert`, `dialect`, `mapping` - `convert` -> `dialect`, `mapping` - `dialect` -> `mapping` - `mapping` -> Spring Data Commons mapping Reflect type renames in reference documentation.
This commit is contained in:
@@ -140,31 +140,31 @@ public class R2dbcApp {
|
||||
DatabaseClient client = DatabaseClient.create(connectionFactory);
|
||||
|
||||
client.execute()
|
||||
.sql("CREATE TABLE person" +
|
||||
"(id VARCHAR(255) PRIMARY KEY," +
|
||||
"name VARCHAR(255)," +
|
||||
"age INT)")
|
||||
.fetch()
|
||||
.rowsUpdated()
|
||||
.as(StepVerifier::create)
|
||||
.expectNextCount(1)
|
||||
.verifyComplete();
|
||||
.sql("CREATE TABLE person" +
|
||||
"(id VARCHAR(255) PRIMARY KEY," +
|
||||
"name VARCHAR(255)," +
|
||||
"age INT)")
|
||||
.fetch()
|
||||
.rowsUpdated()
|
||||
.as(StepVerifier::create)
|
||||
.expectNextCount(1)
|
||||
.verifyComplete();
|
||||
|
||||
client.insert()
|
||||
.into(Person.class)
|
||||
.using(new Person("joe", "Joe", 34))
|
||||
.then()
|
||||
.as(StepVerifier::create)
|
||||
.verifyComplete();
|
||||
.into(Person.class)
|
||||
.using(new Person("joe", "Joe", 34))
|
||||
.then()
|
||||
.as(StepVerifier::create)
|
||||
.verifyComplete();
|
||||
|
||||
client.select()
|
||||
.from(Person.class)
|
||||
.fetch()
|
||||
.first()
|
||||
.doOnNext(it -> log.info(it))
|
||||
.as(StepVerifier::create)
|
||||
.expectNextCount(1)
|
||||
.verifyComplete();
|
||||
.from(Person.class)
|
||||
.fetch()
|
||||
.first()
|
||||
.doOnNext(it -> log.info(it))
|
||||
.as(StepVerifier::create)
|
||||
.expectNextCount(1)
|
||||
.verifyComplete();
|
||||
}
|
||||
}
|
||||
----
|
||||
|
||||
@@ -34,10 +34,10 @@ Once built, a `DatabaseClient` instance is immutable. However, you can clone it
|
||||
[source,java]
|
||||
----
|
||||
DatabaseClient client1 = DatabaseClient.builder()
|
||||
.exceptionTranslator(exceptionTranslatorA).build();
|
||||
.exceptionTranslator(exceptionTranslatorA).build();
|
||||
|
||||
DatabaseClient client2 = client1.mutate()
|
||||
.exceptionTranslator(exceptionTranslatorB).build();
|
||||
.exceptionTranslator(exceptionTranslatorB).build();
|
||||
----
|
||||
|
||||
== Controlling Database Connections
|
||||
@@ -98,12 +98,14 @@ You can extend `SqlErrorCodeR2dbcExceptionTranslator`, as the following example
|
||||
----
|
||||
public class CustomSqlErrorCodeR2dbcExceptionTranslator extends SqlErrorCodeR2dbcExceptionTranslator {
|
||||
|
||||
protected DataAccessException customTranslate(String task, String sql, R2dbcException r2dbcex) {
|
||||
if (sqlex.getErrorCode() == -12345) {
|
||||
return new DeadlockLoserDataAccessException(task, r2dbcex);
|
||||
}
|
||||
return null;
|
||||
protected DataAccessException customTranslate(String task, String sql, R2dbcException r2dbcex) {
|
||||
|
||||
if (sqlex.getErrorCode() == -12345) {
|
||||
return new DeadlockLoserDataAccessException(task, r2dbcex);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
----
|
||||
|
||||
@@ -115,10 +117,11 @@ The following example shows how you can use this custom translator:
|
||||
----
|
||||
ConnectionFactory connectionFactory = …;
|
||||
|
||||
CustomSqlErrorCodeR2dbcExceptionTranslator exceptionTranslator = new CustomSqlErrorCodeR2dbcExceptionTranslator();
|
||||
CustomSqlErrorCodeR2dbcExceptionTranslator exceptionTranslator =
|
||||
new CustomSqlErrorCodeR2dbcExceptionTranslator();
|
||||
|
||||
DatabaseClient client = DatabaseClient.builder()
|
||||
.connectionFactory(connectionFactory)
|
||||
.exceptionTranslator(exceptionTranslator)
|
||||
.build();
|
||||
.connectionFactory(connectionFactory)
|
||||
.exceptionTranslator(exceptionTranslator)
|
||||
.build();
|
||||
----
|
||||
|
||||
@@ -12,9 +12,9 @@ Let's take a look at a simple query:
|
||||
[source,java]
|
||||
----
|
||||
Flux<Person> people = databaseClient.select()
|
||||
.from(Person.class) <1>
|
||||
.fetch()
|
||||
.all(); <2>
|
||||
.from(Person.class) <1>
|
||||
.fetch()
|
||||
.all(); <2>
|
||||
----
|
||||
<1> Using `Person` with the `from(…)` method sets the `FROM` table based on mapping metadata. It also maps tabular results on `Person` result objects.
|
||||
<2> Fetching `all()` rows returns a `Flux<Person>` without limiting results.
|
||||
@@ -26,13 +26,13 @@ The following example declares a more complex query that specifies the table nam
|
||||
[source,java]
|
||||
----
|
||||
Mono<Person> first = databaseClient.select()
|
||||
.from("legoset") <1>
|
||||
.matching(where("firstname").is("John") <2>
|
||||
.and("lastname").in("Doe", "White"))
|
||||
.orderBy(desc("id")) <3>
|
||||
.as(Person.class)
|
||||
.fetch()
|
||||
.one(); <4>
|
||||
.from("legoset") <1>
|
||||
.matching(where("firstname").is("John") <2>
|
||||
.and("lastname").in("Doe", "White"))
|
||||
.orderBy(desc("id")) <3>
|
||||
.as(Person.class)
|
||||
.fetch()
|
||||
.one(); <4>
|
||||
----
|
||||
<1> Selecting from a table by name returns row results as `Map<String, Object>` with case-insensitive column name matching.
|
||||
<2> The issued query declares a `WHERE` condition on `firstname` and `lastname` columns to filter results.
|
||||
@@ -166,9 +166,9 @@ Take a look at a simple typed update operation:
|
||||
Person modified = …
|
||||
|
||||
Mono<Void> update = databaseClient.update()
|
||||
.table(Person.class) <1>
|
||||
.using(modified) <2>
|
||||
.then(); <3>
|
||||
.table(Person.class) <1>
|
||||
.using(modified) <2>
|
||||
.then(); <3>
|
||||
----
|
||||
<1> Using `Person` with the `table(…)` method sets the table to update based on mapping metadata.
|
||||
<2> Provide a scalar `Person` object value. `using(…)` accepts the modified object and derives primary keys and updates all column values.
|
||||
@@ -181,10 +181,10 @@ Update also support untyped operations:
|
||||
[source,java]
|
||||
----
|
||||
Mono<Void> update = databaseClient.update()
|
||||
.table("person") <1>
|
||||
.using(Update.update("firstname", "Jane")) <2>
|
||||
.matching(where("firstname").is("John")) <3>
|
||||
.then(); <4>
|
||||
.table("person") <1>
|
||||
.using(Update.update("firstname", "Jane")) <2>
|
||||
.matching(where("firstname").is("John")) <3>
|
||||
.then(); <4>
|
||||
----
|
||||
<1> Update table `person`.
|
||||
<2> Provide a `Update` definition, which columns to update.
|
||||
@@ -217,10 +217,10 @@ Take a look at a simple insert operation:
|
||||
[source,java]
|
||||
----
|
||||
Mono<Void> delete = databaseClient.delete()
|
||||
.from(Person.class) <1>
|
||||
.matching(where("firstname").is("John") <2>
|
||||
.and("lastname").in("Doe", "White"))
|
||||
.then(); <3>
|
||||
.from(Person.class) <1>
|
||||
.matching(where("firstname").is("John") <2>
|
||||
.and("lastname").in("Doe", "White"))
|
||||
.then(); <3>
|
||||
----
|
||||
<1> Using `Person` with the `from(…)` method sets the `FROM` table based on mapping metadata.
|
||||
<2> The issued query declares a `WHERE` condition on `firstname` and `lastname` columns to filter rows to delete.
|
||||
|
||||
@@ -74,16 +74,16 @@ Consequently, you can retrieve all `Person` objects would resemble the following
|
||||
@ContextConfiguration
|
||||
public class PersonRepositoryTests {
|
||||
|
||||
@Autowired PersonRepository repository;
|
||||
@Autowired PersonRepository repository;
|
||||
|
||||
@Test
|
||||
public void readsAllEntitiesCorrectly() {
|
||||
@Test
|
||||
public void readsAllEntitiesCorrectly() {
|
||||
|
||||
repository.findAll()
|
||||
.as(StepVerifier::create)
|
||||
.expectNextCount(1)
|
||||
.verifyComplete();
|
||||
}
|
||||
repository.findAll()
|
||||
.as(StepVerifier::create)
|
||||
.expectNextCount(1)
|
||||
.verifyComplete();
|
||||
}
|
||||
}
|
||||
----
|
||||
====
|
||||
@@ -104,11 +104,11 @@ Defining such a query is a matter of declaring a method on the repository interf
|
||||
----
|
||||
public interface PersonRepository extends ReactiveCrudRepository<Person, Long> {
|
||||
|
||||
@Query("SELECT * FROM person WHERE lastname = :lastname")
|
||||
Flux<Person> findByLastname(String lastname); <1>
|
||||
@Query("SELECT * FROM person WHERE lastname = :lastname")
|
||||
Flux<Person> findByLastname(String lastname); <1>
|
||||
|
||||
@Query("SELECT firstname, lastname FROM person WHERE lastname = $1")
|
||||
Mono<Person> findFirstByLastname(String lastname) <2>
|
||||
@Query("SELECT firstname, lastname FROM person WHERE lastname = $1")
|
||||
Mono<Person> findFirstByLastname(String lastname) <2>
|
||||
|
||||
}
|
||||
----
|
||||
|
||||
@@ -6,14 +6,14 @@ Relational databases typically associate a transaction with a single transport c
|
||||
Using different connections hence results in utilizing different transactions.
|
||||
Spring Data R2DBC includes transaction-awareness in `DatabaseClient` that allows you to group multiple statements within
|
||||
the same transaction using https://docs.spring.io/spring/docs/current/spring-framework-reference/data-access.html#transaction[Spring's Transaction Management].
|
||||
Spring Data R2DBC provides a implementation for `ReactiveTransactionManager` with `ConnectionFactoryTransactionManager`.
|
||||
See <<r2dbc.connections.ConnectionFactoryTransactionManager>> for further details.
|
||||
Spring Data R2DBC provides a implementation for `ReactiveTransactionManager` with `R2dbcTransactionManager`.
|
||||
See <<r2dbc.connections.R2dbcTransactionManager>> for further details.
|
||||
|
||||
.Programmatic Transaction Management
|
||||
====
|
||||
[source,java]
|
||||
----
|
||||
ReactiveTransactionManager tm = new ConnectionFactoryTransactionManager(connectionFactory);
|
||||
ReactiveTransactionManager tm = new R2dbcTransactionManager(connectionFactory);
|
||||
TransactionalOperator operator = TransactionalOperator.create(tm); <1>
|
||||
|
||||
DatabaseClient client = DatabaseClient.create(connectionFactory);
|
||||
@@ -43,7 +43,7 @@ is a less invasive, annotation-based approach to transaction demarcation.
|
||||
[source,java]
|
||||
----
|
||||
@Configuration
|
||||
@EnableTransactionManagement <1>
|
||||
@EnableTransactionManagement <1>
|
||||
class Config extends AbstractR2dbcConfiguration {
|
||||
|
||||
@Override
|
||||
@@ -52,8 +52,8 @@ class Config extends AbstractR2dbcConfiguration {
|
||||
}
|
||||
|
||||
@Bean
|
||||
ReactiveTransactionManager txMgr(ConnectionFactory connectionFactory) { <2>
|
||||
return new ConnectionFactoryTransactionManager(connectionFactory);
|
||||
ReactiveTransactionManager transactionManager(ConnectionFactory connectionFactory) { <2>
|
||||
return new R2dbcTransactionManager(connectionFactory);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,5 +83,5 @@ class MyService {
|
||||
}
|
||||
----
|
||||
<1> Enable declarative transaction management.
|
||||
<2> Provide a `ReactiveTransactionManager` implementation to back reactive tansaction features.
|
||||
<2> Provide a `ReactiveTransactionManager` implementation to back reactive transaction features.
|
||||
====
|
||||
|
||||
@@ -24,7 +24,7 @@ import org.springframework.lang.Nullable;
|
||||
* Exception thrown when a {@link io.r2dbc.spi.Result} has been accessed in an invalid fashion. Such exceptions always
|
||||
* have a {@link io.r2dbc.spi.R2dbcException} root cause.
|
||||
* <p>
|
||||
* This typically happens when an invalid {@link org.springframework.data.r2dbc.function.FetchSpec} column index or name
|
||||
* This typically happens when an invalid {@link org.springframework.data.r2dbc.core.FetchSpec} column index or name
|
||||
* has been specified.
|
||||
*
|
||||
* @author Mark Paluch
|
||||
|
||||
@@ -28,13 +28,13 @@ import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.core.convert.converter.Converter;
|
||||
import org.springframework.data.convert.CustomConversions;
|
||||
import org.springframework.data.convert.CustomConversions.StoreConversions;
|
||||
import org.springframework.data.r2dbc.convert.MappingR2dbcConverter;
|
||||
import org.springframework.data.r2dbc.convert.R2dbcCustomConversions;
|
||||
import org.springframework.data.r2dbc.core.DatabaseClient;
|
||||
import org.springframework.data.r2dbc.core.DefaultReactiveDataAccessStrategy;
|
||||
import org.springframework.data.r2dbc.core.ReactiveDataAccessStrategy;
|
||||
import org.springframework.data.r2dbc.dialect.Database;
|
||||
import org.springframework.data.r2dbc.dialect.Dialect;
|
||||
import org.springframework.data.r2dbc.function.DatabaseClient;
|
||||
import org.springframework.data.r2dbc.function.DefaultReactiveDataAccessStrategy;
|
||||
import org.springframework.data.r2dbc.function.ReactiveDataAccessStrategy;
|
||||
import org.springframework.data.r2dbc.function.convert.MappingR2dbcConverter;
|
||||
import org.springframework.data.r2dbc.function.convert.R2dbcCustomConversions;
|
||||
import org.springframework.data.r2dbc.support.R2dbcExceptionSubclassTranslator;
|
||||
import org.springframework.data.r2dbc.support.R2dbcExceptionTranslator;
|
||||
import org.springframework.data.r2dbc.support.SqlStateR2dbcExceptionTranslator;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.r2dbc.function.connectionfactory;
|
||||
package org.springframework.data.r2dbc.connectionfactory;
|
||||
|
||||
import io.r2dbc.spi.Connection;
|
||||
import io.r2dbc.spi.ConnectionFactory;
|
||||
@@ -35,7 +35,7 @@ import reactor.util.function.Tuples;
|
||||
* Helper class that provides static methods for obtaining R2DBC Connections from a
|
||||
* {@link io.r2dbc.spi.ConnectionFactory}.
|
||||
* <p>
|
||||
* Used internally by Spring's {@link org.springframework.data.r2dbc.function.DatabaseClient}, Spring's R2DBC operation
|
||||
* Used internally by Spring's {@link org.springframework.data.r2dbc.core.DatabaseClient}, Spring's R2DBC operation
|
||||
* objects. Can also be used directly in application code.
|
||||
*
|
||||
* @author Mark Paluch
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.r2dbc.function.connectionfactory;
|
||||
package org.springframework.data.r2dbc.connectionfactory;
|
||||
|
||||
import io.r2dbc.spi.Connection;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.r2dbc.function.connectionfactory;
|
||||
package org.springframework.data.r2dbc.connectionfactory;
|
||||
|
||||
import io.r2dbc.spi.Connection;
|
||||
import io.r2dbc.spi.ConnectionFactory;
|
||||
@@ -22,7 +22,7 @@ import org.springframework.transaction.support.ResourceHolderSupport;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
* Resource holder wrapping a R2DBC {@link Connection}. {@link ConnectionFactoryTransactionManager} binds instances of
|
||||
* Resource holder wrapping a R2DBC {@link Connection}. {@link R2dbcTransactionManager} binds instances of
|
||||
* this class to the thread, for a specific {@link ConnectionFactory}.
|
||||
* <p>
|
||||
* Inherits rollback-only support for nested R2DBC transactions and reference count functionality from the base class.
|
||||
@@ -31,7 +31,7 @@ import org.springframework.util.Assert;
|
||||
*
|
||||
* @author Mark Paluch
|
||||
* @author Christoph Strobl
|
||||
* @see ConnectionFactoryTransactionManager
|
||||
* @see R2dbcTransactionManager
|
||||
* @see ConnectionFactoryUtils
|
||||
*/
|
||||
public class ConnectionHolder extends ResourceHolderSupport {
|
||||
@@ -86,7 +86,7 @@ public class ConnectionHolder extends ResourceHolderSupport {
|
||||
/**
|
||||
* Set whether this holder represents an active, R2DBC-managed transaction.
|
||||
*
|
||||
* @see ConnectionFactoryTransactionManager
|
||||
* @see R2dbcTransactionManager
|
||||
*/
|
||||
protected void setTransactionActive(boolean transactionActive) {
|
||||
this.transactionActive = transactionActive;
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.r2dbc.function.connectionfactory;
|
||||
package org.springframework.data.r2dbc.connectionfactory;
|
||||
|
||||
import io.r2dbc.spi.Connection;
|
||||
import io.r2dbc.spi.Wrapped;
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.r2dbc.function.connectionfactory;
|
||||
package org.springframework.data.r2dbc.connectionfactory;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.r2dbc.function.connectionfactory;
|
||||
package org.springframework.data.r2dbc.connectionfactory;
|
||||
|
||||
import io.r2dbc.spi.Connection;
|
||||
import io.r2dbc.spi.ConnectionFactory;
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.r2dbc.function.connectionfactory;
|
||||
package org.springframework.data.r2dbc.connectionfactory;
|
||||
|
||||
import io.r2dbc.spi.Connection;
|
||||
import io.r2dbc.spi.ConnectionFactory;
|
||||
@@ -24,7 +24,7 @@ import reactor.core.publisher.Mono;
|
||||
import java.time.Duration;
|
||||
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.data.r2dbc.function.DatabaseClient;
|
||||
import org.springframework.data.r2dbc.core.DatabaseClient;
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.transaction.CannotCreateTransactionException;
|
||||
import org.springframework.transaction.TransactionDefinition;
|
||||
@@ -70,7 +70,7 @@ import org.springframework.util.Assert;
|
||||
* @see TransactionAwareConnectionFactoryProxy
|
||||
* @see DatabaseClient
|
||||
*/
|
||||
public class ConnectionFactoryTransactionManager extends AbstractReactiveTransactionManager
|
||||
public class R2dbcTransactionManager extends AbstractReactiveTransactionManager
|
||||
implements InitializingBean {
|
||||
|
||||
private ConnectionFactory connectionFactory;
|
||||
@@ -83,14 +83,14 @@ public class ConnectionFactoryTransactionManager extends AbstractReactiveTransac
|
||||
*
|
||||
* @see #setConnectionFactory
|
||||
*/
|
||||
public ConnectionFactoryTransactionManager() {}
|
||||
public R2dbcTransactionManager() {}
|
||||
|
||||
/**
|
||||
* Create a new {@link ConnectionFactoryTransactionManager} instance.
|
||||
* Create a new {@link R2dbcTransactionManager} instance.
|
||||
*
|
||||
* @param connectionFactory the R2DBC ConnectionFactory to manage transactions for
|
||||
*/
|
||||
public ConnectionFactoryTransactionManager(ConnectionFactory connectionFactory) {
|
||||
public R2dbcTransactionManager(ConnectionFactory connectionFactory) {
|
||||
this();
|
||||
setConnectionFactory(connectionFactory);
|
||||
afterPropertiesSet();
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.r2dbc.function.connectionfactory;
|
||||
package org.springframework.data.r2dbc.connectionfactory;
|
||||
|
||||
import io.r2dbc.spi.IsolationLevel;
|
||||
import org.springframework.lang.Nullable;
|
||||
@@ -24,7 +24,7 @@ import org.springframework.util.Assert;
|
||||
* {@link io.r2dbc.spi.Connection}.
|
||||
*
|
||||
* @author Mark Paluch
|
||||
* @see ConnectionFactoryTransactionManager
|
||||
* @see R2dbcTransactionManager
|
||||
*/
|
||||
public abstract class R2dbcTransactionObjectSupport {
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.r2dbc.function.connectionfactory;
|
||||
package org.springframework.data.r2dbc.connectionfactory;
|
||||
|
||||
import java.util.Stack;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.r2dbc.function.connectionfactory;
|
||||
package org.springframework.data.r2dbc.connectionfactory;
|
||||
|
||||
import io.r2dbc.spi.Connection;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.r2dbc.function.connectionfactory;
|
||||
package org.springframework.data.r2dbc.connectionfactory;
|
||||
|
||||
import io.r2dbc.spi.Connection;
|
||||
import io.r2dbc.spi.ConnectionFactoryMetadata;
|
||||
@@ -25,7 +25,7 @@ import org.reactivestreams.Publisher;
|
||||
|
||||
/**
|
||||
* Connection holder, wrapping a R2DBC Connection.
|
||||
* {@link org.springframework.data.r2dbc.function.TransactionalDatabaseClient} binds instances of this class to the
|
||||
* {@link org.springframework.data.r2dbc.core.TransactionalDatabaseClient} binds instances of this class to the
|
||||
* {@link TransactionResources} for a specific subscription.
|
||||
*
|
||||
* @author Mark Paluch
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.r2dbc.function.connectionfactory;
|
||||
package org.springframework.data.r2dbc.connectionfactory;
|
||||
|
||||
import io.r2dbc.spi.Connection;
|
||||
import io.r2dbc.spi.ConnectionFactory;
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.r2dbc.function.connectionfactory;
|
||||
package org.springframework.data.r2dbc.connectionfactory;
|
||||
|
||||
import static org.springframework.util.ReflectionUtils.*;
|
||||
|
||||
@@ -25,7 +25,8 @@ import java.lang.reflect.Proxy;
|
||||
import io.r2dbc.spi.Connection;
|
||||
import io.r2dbc.spi.ConnectionFactory;
|
||||
import io.r2dbc.spi.Wrapped;
|
||||
import org.springframework.data.r2dbc.function.DatabaseClient;
|
||||
|
||||
import org.springframework.data.r2dbc.core.DatabaseClient;
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.util.ReflectionUtils;
|
||||
import reactor.core.publisher.Mono;
|
||||
@@ -36,7 +37,7 @@ import reactor.util.function.Tuple2;
|
||||
* <p>
|
||||
* Data access code that should remain unaware of Spring's data access support can work with this proxy to seamlessly
|
||||
* participate in Spring-managed transactions. Note that the transaction manager, for example
|
||||
* {@link ConnectionFactoryTransactionManager}, still needs to work with the underlying {@link ConnectionFactory},
|
||||
* {@link R2dbcTransactionManager}, still needs to work with the underlying {@link ConnectionFactory},
|
||||
* <i>not</i> with this proxy.
|
||||
* <p>
|
||||
* <b>Make sure that {@link TransactionAwareConnectionFactoryProxy} is the outermost {@link ConnectionFactory} of a
|
||||
@@ -44,7 +45,7 @@ import reactor.util.function.Tuple2;
|
||||
* either directly to the target connection pool or to some intermediary proxy/adapter.
|
||||
* <p>
|
||||
* Delegates to {@link ConnectionFactoryUtils} for automatically participating in thread-bound transactions, for example
|
||||
* managed by {@link ConnectionFactoryTransactionManager}. {@link #create()} calls and {@code close} calls on returned
|
||||
* managed by {@link R2dbcTransactionManager}. {@link #create()} calls and {@code close} calls on returned
|
||||
* {@link Connection} will behave properly within a transaction, i.e. always operate on the transactional Connection. If
|
||||
* not within a transaction, normal {@link ConnectionFactory} behavior applies.
|
||||
* <p>
|
||||
@@ -13,11 +13,11 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.r2dbc.function.connectionfactory;
|
||||
package org.springframework.data.r2dbc.connectionfactory;
|
||||
|
||||
import reactor.core.publisher.Mono;
|
||||
|
||||
import org.springframework.data.r2dbc.function.TransactionalDatabaseClient;
|
||||
import org.springframework.data.r2dbc.core.TransactionalDatabaseClient;
|
||||
|
||||
/**
|
||||
* Transaction context for an ongoing transaction synchronization allowing to register transactional resources.
|
||||
@@ -3,4 +3,4 @@
|
||||
*/
|
||||
@org.springframework.lang.NonNullApi
|
||||
@org.springframework.lang.NonNullFields
|
||||
package org.springframework.data.r2dbc.function.connectionfactory;
|
||||
package org.springframework.data.r2dbc.connectionfactory;
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.r2dbc.function.convert;
|
||||
package org.springframework.data.r2dbc.convert;
|
||||
|
||||
import io.r2dbc.spi.ColumnMetadata;
|
||||
import io.r2dbc.spi.Row;
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.r2dbc.function.convert;
|
||||
package org.springframework.data.r2dbc.convert;
|
||||
|
||||
import io.r2dbc.spi.Row;
|
||||
import io.r2dbc.spi.RowMetadata;
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.r2dbc.function.convert;
|
||||
package org.springframework.data.r2dbc.convert;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.r2dbc.function.convert;
|
||||
package org.springframework.data.r2dbc.convert;
|
||||
|
||||
import io.r2dbc.spi.ColumnMetadata;
|
||||
import io.r2dbc.spi.Row;
|
||||
@@ -39,8 +39,8 @@ import org.springframework.data.mapping.context.MappingContext;
|
||||
import org.springframework.data.mapping.model.ConvertingPropertyAccessor;
|
||||
import org.springframework.data.mapping.model.ParameterValueProvider;
|
||||
import org.springframework.data.r2dbc.dialect.ArrayColumns;
|
||||
import org.springframework.data.r2dbc.domain.OutboundRow;
|
||||
import org.springframework.data.r2dbc.domain.SettableValue;
|
||||
import org.springframework.data.r2dbc.mapping.OutboundRow;
|
||||
import org.springframework.data.r2dbc.mapping.SettableValue;
|
||||
import org.springframework.data.relational.core.conversion.BasicRelationalConverter;
|
||||
import org.springframework.data.relational.core.conversion.RelationalConverter;
|
||||
import org.springframework.data.relational.core.mapping.RelationalPersistentEntity;
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.r2dbc.function.convert;
|
||||
package org.springframework.data.r2dbc.convert;
|
||||
|
||||
import io.r2dbc.spi.Row;
|
||||
import io.r2dbc.spi.RowMetadata;
|
||||
@@ -25,7 +25,7 @@ import org.springframework.data.convert.EntityReader;
|
||||
import org.springframework.data.convert.EntityWriter;
|
||||
import org.springframework.data.mapping.context.MappingContext;
|
||||
import org.springframework.data.r2dbc.dialect.ArrayColumns;
|
||||
import org.springframework.data.r2dbc.domain.OutboundRow;
|
||||
import org.springframework.data.r2dbc.mapping.OutboundRow;
|
||||
import org.springframework.data.relational.core.conversion.RelationalConverter;
|
||||
import org.springframework.data.relational.core.mapping.RelationalPersistentEntity;
|
||||
import org.springframework.data.relational.core.mapping.RelationalPersistentProperty;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.data.r2dbc.function.convert;
|
||||
package org.springframework.data.r2dbc.convert;
|
||||
|
||||
import io.r2dbc.spi.Row;
|
||||
|
||||
@@ -33,13 +33,13 @@ import org.springframework.core.convert.converter.ConverterFactory;
|
||||
import org.springframework.data.convert.CustomConversions;
|
||||
import org.springframework.data.convert.Jsr310Converters;
|
||||
import org.springframework.data.convert.WritingConverter;
|
||||
import org.springframework.data.r2dbc.function.convert.R2dbcConverters.RowToNumberConverterFactory.LocalDateConverterOverride;
|
||||
import org.springframework.data.r2dbc.function.convert.R2dbcConverters.RowToNumberConverterFactory.LocalDateTimeConverterOverride;
|
||||
import org.springframework.data.r2dbc.function.convert.R2dbcConverters.RowToNumberConverterFactory.LocalTimeConverterOverride;
|
||||
import org.springframework.data.r2dbc.function.convert.R2dbcConverters.RowToNumberConverterFactory.RowToOffsetDateTimeConverter;
|
||||
import org.springframework.data.r2dbc.function.convert.R2dbcConverters.RowToNumberConverterFactory.RowToStringConverter;
|
||||
import org.springframework.data.r2dbc.function.convert.R2dbcConverters.RowToNumberConverterFactory.RowToUuidConverter;
|
||||
import org.springframework.data.r2dbc.function.convert.R2dbcConverters.RowToNumberConverterFactory.RowToZonedDateTimeConverter;
|
||||
import org.springframework.data.r2dbc.convert.R2dbcConverters.RowToNumberConverterFactory.LocalDateConverterOverride;
|
||||
import org.springframework.data.r2dbc.convert.R2dbcConverters.RowToNumberConverterFactory.LocalDateTimeConverterOverride;
|
||||
import org.springframework.data.r2dbc.convert.R2dbcConverters.RowToNumberConverterFactory.LocalTimeConverterOverride;
|
||||
import org.springframework.data.r2dbc.convert.R2dbcConverters.RowToNumberConverterFactory.RowToOffsetDateTimeConverter;
|
||||
import org.springframework.data.r2dbc.convert.R2dbcConverters.RowToNumberConverterFactory.RowToStringConverter;
|
||||
import org.springframework.data.r2dbc.convert.R2dbcConverters.RowToNumberConverterFactory.RowToUuidConverter;
|
||||
import org.springframework.data.r2dbc.convert.R2dbcConverters.RowToNumberConverterFactory.RowToZonedDateTimeConverter;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.NumberUtils;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.springframework.data.r2dbc.function.convert;
|
||||
package org.springframework.data.r2dbc.convert;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
@@ -7,7 +7,7 @@ import java.util.List;
|
||||
|
||||
import org.springframework.data.convert.CustomConversions;
|
||||
import org.springframework.data.convert.JodaTimeConverters;
|
||||
import org.springframework.data.r2dbc.dialect.R2dbcSimpleTypeHolder;
|
||||
import org.springframework.data.r2dbc.mapping.R2dbcSimpleTypeHolder;
|
||||
|
||||
/**
|
||||
* Value object to capture custom conversion. {@link R2dbcCustomConversions} also act as factory for
|
||||
@@ -3,4 +3,4 @@
|
||||
*/
|
||||
@org.springframework.lang.NonNullApi
|
||||
@org.springframework.lang.NonNullFields
|
||||
package org.springframework.data.r2dbc.function.convert;
|
||||
package org.springframework.data.r2dbc.convert;
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.r2dbc.function;
|
||||
package org.springframework.data.r2dbc.core;
|
||||
|
||||
import org.springframework.lang.Nullable;
|
||||
|
||||
@@ -13,14 +13,12 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.r2dbc.domain;
|
||||
package org.springframework.data.r2dbc.core;
|
||||
|
||||
import io.r2dbc.spi.Statement;
|
||||
|
||||
import org.springframework.data.r2dbc.domain.BindTarget;
|
||||
import org.springframework.data.r2dbc.domain.PreparedOperation;
|
||||
import org.springframework.data.r2dbc.domain.QueryOperation;
|
||||
import org.springframework.data.r2dbc.domain.SettableValue;
|
||||
import org.springframework.data.r2dbc.dialect.BindTarget;
|
||||
import org.springframework.data.r2dbc.mapping.SettableValue;
|
||||
|
||||
/**
|
||||
* Extension to {@link QueryOperation} for operations that allow parameter substitution by binding parameter values.
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.r2dbc.function;
|
||||
package org.springframework.data.r2dbc.core;
|
||||
|
||||
import io.r2dbc.spi.Connection;
|
||||
import reactor.core.publisher.Flux;
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.r2dbc.function;
|
||||
package org.springframework.data.r2dbc.core;
|
||||
|
||||
import io.r2dbc.spi.ConnectionFactory;
|
||||
import io.r2dbc.spi.Row;
|
||||
@@ -29,10 +29,9 @@ import org.reactivestreams.Publisher;
|
||||
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.data.r2dbc.domain.PreparedOperation;
|
||||
import org.springframework.data.r2dbc.domain.SettableValue;
|
||||
import org.springframework.data.r2dbc.function.query.Criteria;
|
||||
import org.springframework.data.r2dbc.function.query.Update;
|
||||
import org.springframework.data.r2dbc.mapping.SettableValue;
|
||||
import org.springframework.data.r2dbc.query.Criteria;
|
||||
import org.springframework.data.r2dbc.query.Update;
|
||||
import org.springframework.data.r2dbc.support.R2dbcExceptionTranslator;
|
||||
|
||||
/**
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.r2dbc.function;
|
||||
package org.springframework.data.r2dbc.core;
|
||||
|
||||
import io.r2dbc.spi.Connection;
|
||||
import io.r2dbc.spi.ConnectionFactory;
|
||||
@@ -51,16 +51,14 @@ import org.springframework.dao.InvalidDataAccessApiUsageException;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.data.r2dbc.UncategorizedR2dbcException;
|
||||
import org.springframework.data.r2dbc.domain.BindTarget;
|
||||
import org.springframework.data.r2dbc.domain.BindableOperation;
|
||||
import org.springframework.data.r2dbc.domain.OutboundRow;
|
||||
import org.springframework.data.r2dbc.domain.PreparedOperation;
|
||||
import org.springframework.data.r2dbc.domain.SettableValue;
|
||||
import org.springframework.data.r2dbc.function.connectionfactory.ConnectionFactoryUtils;
|
||||
import org.springframework.data.r2dbc.function.connectionfactory.ConnectionProxy;
|
||||
import org.springframework.data.r2dbc.function.convert.ColumnMapRowMapper;
|
||||
import org.springframework.data.r2dbc.function.query.Criteria;
|
||||
import org.springframework.data.r2dbc.function.query.Update;
|
||||
import org.springframework.data.r2dbc.connectionfactory.ConnectionFactoryUtils;
|
||||
import org.springframework.data.r2dbc.connectionfactory.ConnectionProxy;
|
||||
import org.springframework.data.r2dbc.convert.ColumnMapRowMapper;
|
||||
import org.springframework.data.r2dbc.dialect.BindTarget;
|
||||
import org.springframework.data.r2dbc.mapping.OutboundRow;
|
||||
import org.springframework.data.r2dbc.mapping.SettableValue;
|
||||
import org.springframework.data.r2dbc.query.Criteria;
|
||||
import org.springframework.data.r2dbc.query.Update;
|
||||
import org.springframework.data.r2dbc.support.R2dbcExceptionTranslator;
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.util.Assert;
|
||||
@@ -14,15 +14,15 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.data.r2dbc.function;
|
||||
package org.springframework.data.r2dbc.core;
|
||||
|
||||
import io.r2dbc.spi.ConnectionFactory;
|
||||
|
||||
import java.util.function.Consumer;
|
||||
|
||||
import org.springframework.data.r2dbc.core.DatabaseClient.Builder;
|
||||
import org.springframework.data.r2dbc.dialect.Database;
|
||||
import org.springframework.data.r2dbc.dialect.Dialect;
|
||||
import org.springframework.data.r2dbc.function.DatabaseClient.Builder;
|
||||
import org.springframework.data.r2dbc.support.R2dbcExceptionSubclassTranslator;
|
||||
import org.springframework.data.r2dbc.support.R2dbcExceptionTranslator;
|
||||
import org.springframework.lang.Nullable;
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.r2dbc.function;
|
||||
package org.springframework.data.r2dbc.core;
|
||||
|
||||
import io.r2dbc.spi.Connection;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.r2dbc.function;
|
||||
package org.springframework.data.r2dbc.core;
|
||||
|
||||
import io.r2dbc.spi.Row;
|
||||
import io.r2dbc.spi.RowMetadata;
|
||||
@@ -27,16 +27,16 @@ import java.util.function.Function;
|
||||
import org.springframework.dao.InvalidDataAccessResourceUsageException;
|
||||
import org.springframework.data.convert.CustomConversions.StoreConversions;
|
||||
import org.springframework.data.mapping.context.MappingContext;
|
||||
import org.springframework.data.r2dbc.convert.EntityRowMapper;
|
||||
import org.springframework.data.r2dbc.convert.MappingR2dbcConverter;
|
||||
import org.springframework.data.r2dbc.convert.R2dbcConverter;
|
||||
import org.springframework.data.r2dbc.convert.R2dbcCustomConversions;
|
||||
import org.springframework.data.r2dbc.dialect.ArrayColumns;
|
||||
import org.springframework.data.r2dbc.dialect.BindMarkersFactory;
|
||||
import org.springframework.data.r2dbc.dialect.Dialect;
|
||||
import org.springframework.data.r2dbc.domain.OutboundRow;
|
||||
import org.springframework.data.r2dbc.domain.SettableValue;
|
||||
import org.springframework.data.r2dbc.function.convert.EntityRowMapper;
|
||||
import org.springframework.data.r2dbc.function.convert.MappingR2dbcConverter;
|
||||
import org.springframework.data.r2dbc.function.convert.R2dbcConverter;
|
||||
import org.springframework.data.r2dbc.function.convert.R2dbcCustomConversions;
|
||||
import org.springframework.data.r2dbc.function.query.UpdateMapper;
|
||||
import org.springframework.data.r2dbc.mapping.OutboundRow;
|
||||
import org.springframework.data.r2dbc.mapping.SettableValue;
|
||||
import org.springframework.data.r2dbc.query.UpdateMapper;
|
||||
import org.springframework.data.relational.core.mapping.RelationalMappingContext;
|
||||
import org.springframework.data.relational.core.mapping.RelationalPersistentEntity;
|
||||
import org.springframework.data.relational.core.mapping.RelationalPersistentProperty;
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.r2dbc.function;
|
||||
package org.springframework.data.r2dbc.core;
|
||||
|
||||
import io.r2dbc.spi.Connection;
|
||||
import io.r2dbc.spi.Result;
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.r2dbc.function;
|
||||
package org.springframework.data.r2dbc.core;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
@@ -26,13 +26,12 @@ import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.data.mapping.context.MappingContext;
|
||||
import org.springframework.data.r2dbc.dialect.BindMarkers;
|
||||
import org.springframework.data.r2dbc.dialect.BindTarget;
|
||||
import org.springframework.data.r2dbc.dialect.Bindings;
|
||||
import org.springframework.data.r2dbc.dialect.Dialect;
|
||||
import org.springframework.data.r2dbc.domain.BindTarget;
|
||||
import org.springframework.data.r2dbc.domain.PreparedOperation;
|
||||
import org.springframework.data.r2dbc.function.query.BoundAssignments;
|
||||
import org.springframework.data.r2dbc.function.query.BoundCondition;
|
||||
import org.springframework.data.r2dbc.function.query.UpdateMapper;
|
||||
import org.springframework.data.r2dbc.query.BoundAssignments;
|
||||
import org.springframework.data.r2dbc.query.BoundCondition;
|
||||
import org.springframework.data.r2dbc.query.UpdateMapper;
|
||||
import org.springframework.data.r2dbc.support.StatementRenderUtil;
|
||||
import org.springframework.data.relational.core.mapping.RelationalPersistentEntity;
|
||||
import org.springframework.data.relational.core.mapping.RelationalPersistentProperty;
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.r2dbc.function;
|
||||
package org.springframework.data.r2dbc.core;
|
||||
|
||||
import io.r2dbc.spi.Connection;
|
||||
import io.r2dbc.spi.ConnectionFactory;
|
||||
@@ -25,10 +25,9 @@ import reactor.util.function.Tuple2;
|
||||
import java.util.function.Function;
|
||||
|
||||
import org.reactivestreams.Publisher;
|
||||
|
||||
import org.springframework.data.r2dbc.function.connectionfactory.ConnectionFactoryUtils;
|
||||
import org.springframework.data.r2dbc.function.connectionfactory.ReactiveTransactionSynchronization;
|
||||
import org.springframework.data.r2dbc.function.connectionfactory.TransactionResources;
|
||||
import org.springframework.data.r2dbc.connectionfactory.ConnectionFactoryUtils;
|
||||
import org.springframework.data.r2dbc.connectionfactory.ReactiveTransactionSynchronization;
|
||||
import org.springframework.data.r2dbc.connectionfactory.TransactionResources;
|
||||
import org.springframework.data.r2dbc.support.R2dbcExceptionTranslator;
|
||||
import org.springframework.transaction.NoTransactionException;
|
||||
|
||||
@@ -13,13 +13,13 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.r2dbc.function;
|
||||
package org.springframework.data.r2dbc.core;
|
||||
|
||||
import io.r2dbc.spi.ConnectionFactory;
|
||||
|
||||
import java.util.function.Consumer;
|
||||
|
||||
import org.springframework.data.r2dbc.function.DatabaseClient.Builder;
|
||||
import org.springframework.data.r2dbc.core.DatabaseClient.Builder;
|
||||
import org.springframework.data.r2dbc.support.R2dbcExceptionTranslator;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.r2dbc.function;
|
||||
package org.springframework.data.r2dbc.core;
|
||||
|
||||
/**
|
||||
* Contract for fetching results.
|
||||
@@ -13,12 +13,12 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.r2dbc.function;
|
||||
package org.springframework.data.r2dbc.core;
|
||||
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.data.r2dbc.domain.SettableValue;
|
||||
import org.springframework.data.r2dbc.mapping.SettableValue;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.r2dbc.function;
|
||||
package org.springframework.data.r2dbc.core;
|
||||
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
@@ -22,8 +22,7 @@ import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
import org.springframework.data.r2dbc.dialect.BindMarkersFactory;
|
||||
import org.springframework.data.r2dbc.domain.BindTarget;
|
||||
import org.springframework.data.r2dbc.domain.BindableOperation;
|
||||
import org.springframework.data.r2dbc.dialect.BindTarget;
|
||||
|
||||
/**
|
||||
* SQL translation support allowing the use of named parameters rather than native placeholders.
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.r2dbc.function;
|
||||
package org.springframework.data.r2dbc.core;
|
||||
|
||||
import lombok.Value;
|
||||
|
||||
@@ -30,8 +30,7 @@ import org.springframework.dao.InvalidDataAccessApiUsageException;
|
||||
import org.springframework.data.r2dbc.dialect.BindMarker;
|
||||
import org.springframework.data.r2dbc.dialect.BindMarkers;
|
||||
import org.springframework.data.r2dbc.dialect.BindMarkersFactory;
|
||||
import org.springframework.data.r2dbc.domain.BindTarget;
|
||||
import org.springframework.data.r2dbc.domain.BindableOperation;
|
||||
import org.springframework.data.r2dbc.dialect.BindTarget;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.r2dbc.function;
|
||||
package org.springframework.data.r2dbc.core;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -13,21 +13,23 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.r2dbc.domain;
|
||||
package org.springframework.data.r2dbc.core;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
import org.springframework.data.r2dbc.dialect.BindTarget;
|
||||
|
||||
/**
|
||||
* Extension to {@link QueryOperation} for a prepared SQL query {@link Supplier} with bound parameters. Contains
|
||||
* parameter bindings that can be {@link #bindTo bound} bound to a {@link BindTarget}.
|
||||
* <p>
|
||||
* Can be executed with {@link org.springframework.data.r2dbc.function.DatabaseClient}.
|
||||
* Can be executed with {@link org.springframework.data.r2dbc.core.DatabaseClient}.
|
||||
* </p>
|
||||
*
|
||||
* @param <T> underlying operation source.
|
||||
* @author Mark Paluch
|
||||
* @see org.springframework.data.r2dbc.function.DatabaseClient
|
||||
* @see org.springframework.data.r2dbc.function.DatabaseClient.SqlSpec#sql(Supplier)
|
||||
* @see org.springframework.data.r2dbc.core.DatabaseClient
|
||||
* @see org.springframework.data.r2dbc.core.DatabaseClient.SqlSpec#sql(Supplier)
|
||||
*/
|
||||
public interface PreparedOperation<T> extends QueryOperation {
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.r2dbc.domain;
|
||||
package org.springframework.data.r2dbc.core;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.r2dbc.function;
|
||||
package org.springframework.data.r2dbc.core;
|
||||
|
||||
import io.r2dbc.spi.Row;
|
||||
import io.r2dbc.spi.RowMetadata;
|
||||
@@ -21,12 +21,11 @@ import io.r2dbc.spi.RowMetadata;
|
||||
import java.util.List;
|
||||
import java.util.function.BiFunction;
|
||||
|
||||
import org.springframework.data.r2dbc.convert.R2dbcConverter;
|
||||
import org.springframework.data.r2dbc.dialect.BindMarkersFactory;
|
||||
import org.springframework.data.r2dbc.dialect.Dialect;
|
||||
import org.springframework.data.r2dbc.domain.BindableOperation;
|
||||
import org.springframework.data.r2dbc.domain.OutboundRow;
|
||||
import org.springframework.data.r2dbc.domain.SettableValue;
|
||||
import org.springframework.data.r2dbc.function.convert.R2dbcConverter;
|
||||
import org.springframework.data.r2dbc.mapping.OutboundRow;
|
||||
import org.springframework.data.r2dbc.mapping.SettableValue;
|
||||
|
||||
/**
|
||||
* Data access strategy that generalizes convenience operations using mapped entities. Typically used internally by
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.r2dbc.function;
|
||||
package org.springframework.data.r2dbc.core;
|
||||
|
||||
import reactor.core.publisher.Flux;
|
||||
import reactor.core.publisher.Mono;
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.r2dbc.function;
|
||||
package org.springframework.data.r2dbc.core;
|
||||
|
||||
import org.springframework.lang.Nullable;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.r2dbc.function;
|
||||
package org.springframework.data.r2dbc.core;
|
||||
|
||||
import io.r2dbc.spi.Row;
|
||||
import io.r2dbc.spi.RowMetadata;
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.r2dbc.function;
|
||||
package org.springframework.data.r2dbc.core;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
@@ -26,10 +26,9 @@ import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.data.r2dbc.dialect.BindMarkers;
|
||||
import org.springframework.data.r2dbc.dialect.Dialect;
|
||||
import org.springframework.data.r2dbc.domain.PreparedOperation;
|
||||
import org.springframework.data.r2dbc.domain.SettableValue;
|
||||
import org.springframework.data.r2dbc.function.query.Criteria;
|
||||
import org.springframework.data.r2dbc.function.query.Update;
|
||||
import org.springframework.data.r2dbc.mapping.SettableValue;
|
||||
import org.springframework.data.r2dbc.query.Criteria;
|
||||
import org.springframework.data.r2dbc.query.Update;
|
||||
import org.springframework.lang.Nullable;
|
||||
|
||||
/**
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.r2dbc.function;
|
||||
package org.springframework.data.r2dbc.core;
|
||||
|
||||
import io.r2dbc.spi.ConnectionFactory;
|
||||
import reactor.core.publisher.Flux;
|
||||
@@ -23,8 +23,7 @@ import java.util.function.Consumer;
|
||||
import java.util.function.Function;
|
||||
|
||||
import org.reactivestreams.Publisher;
|
||||
|
||||
import org.springframework.data.r2dbc.function.connectionfactory.TransactionResources;
|
||||
import org.springframework.data.r2dbc.connectionfactory.TransactionResources;
|
||||
import org.springframework.data.r2dbc.support.R2dbcExceptionTranslator;
|
||||
import org.springframework.transaction.reactive.TransactionalOperator;
|
||||
import org.springframework.util.Assert;
|
||||
@@ -76,9 +75,9 @@ import org.springframework.util.Assert;
|
||||
* @see #beginTransaction()
|
||||
* @see #commitTransaction()
|
||||
* @see #rollbackTransaction()
|
||||
* @see org.springframework.data.r2dbc.function.connectionfactory.ReactiveTransactionSynchronization
|
||||
* @see org.springframework.data.r2dbc.connectionfactory.ReactiveTransactionSynchronization
|
||||
* @see TransactionResources
|
||||
* @see org.springframework.data.r2dbc.function.connectionfactory.ConnectionFactoryUtils
|
||||
* @see org.springframework.data.r2dbc.connectionfactory.ConnectionFactoryUtils
|
||||
* @deprecated Use {@link DatabaseClient} in combination with {@link TransactionalOperator}.
|
||||
*/
|
||||
@Deprecated
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.r2dbc.function;
|
||||
package org.springframework.data.r2dbc.core;
|
||||
|
||||
import reactor.core.publisher.Mono;
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
*/
|
||||
@org.springframework.lang.NonNullApi
|
||||
@org.springframework.lang.NonNullFields
|
||||
package org.springframework.data.r2dbc.function;
|
||||
package org.springframework.data.r2dbc.core;
|
||||
@@ -2,8 +2,6 @@ package org.springframework.data.r2dbc.dialect;
|
||||
|
||||
import io.r2dbc.spi.Statement;
|
||||
|
||||
import org.springframework.data.r2dbc.domain.BindTarget;
|
||||
|
||||
/**
|
||||
* A bind marker represents a single bindable parameter within a query. Bind markers are dialect-specific and provide a
|
||||
* {@link #getPlaceholder() placeholder} that is used in the actual query.
|
||||
|
||||
@@ -13,7 +13,9 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.r2dbc.domain;
|
||||
package org.springframework.data.r2dbc.dialect;
|
||||
|
||||
import org.springframework.data.r2dbc.core.PreparedOperation;
|
||||
|
||||
/**
|
||||
* Target to apply bindings to.
|
||||
@@ -27,7 +27,6 @@ import java.util.Map;
|
||||
import java.util.Spliterator;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
import org.springframework.data.r2dbc.domain.BindTarget;
|
||||
import org.springframework.data.util.Streamable;
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
@@ -7,6 +7,7 @@ import java.util.Set;
|
||||
|
||||
import org.springframework.data.mapping.model.SimpleTypeHolder;
|
||||
import org.springframework.data.r2dbc.dialect.ArrayColumns.Unsupported;
|
||||
import org.springframework.data.r2dbc.mapping.R2dbcSimpleTypeHolder;
|
||||
|
||||
/**
|
||||
* Represents a dialect that is implemented by a particular database.
|
||||
|
||||
@@ -15,8 +15,6 @@
|
||||
*/
|
||||
package org.springframework.data.r2dbc.dialect;
|
||||
|
||||
import org.springframework.data.r2dbc.domain.BindTarget;
|
||||
|
||||
/**
|
||||
* A single indexed bind marker.
|
||||
*/
|
||||
|
||||
@@ -3,7 +3,6 @@ package org.springframework.data.r2dbc.dialect;
|
||||
import java.util.concurrent.atomic.AtomicIntegerFieldUpdater;
|
||||
import java.util.function.Function;
|
||||
|
||||
import org.springframework.data.r2dbc.domain.BindTarget;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.r2dbc.domain;
|
||||
package org.springframework.data.r2dbc.mapping;
|
||||
|
||||
import io.r2dbc.spi.Row;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.r2dbc.dialect;
|
||||
package org.springframework.data.r2dbc.mapping;
|
||||
|
||||
import io.r2dbc.spi.Row;
|
||||
|
||||
@@ -25,7 +25,6 @@ import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import org.springframework.data.mapping.model.SimpleTypeHolder;
|
||||
import org.springframework.data.r2dbc.domain.OutboundRow;
|
||||
|
||||
/**
|
||||
* Simple constant holder for a {@link SimpleTypeHolder} enriched with R2DBC specific simple types.
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.r2dbc.domain;
|
||||
package org.springframework.data.r2dbc.mapping;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
@@ -2,6 +2,6 @@
|
||||
* Domain objects for R2DBC.
|
||||
*/
|
||||
@NonNullApi
|
||||
package org.springframework.data.r2dbc.domain;
|
||||
package org.springframework.data.r2dbc.mapping;
|
||||
|
||||
import org.springframework.lang.NonNullApi;
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.r2dbc.function.query;
|
||||
package org.springframework.data.r2dbc.query;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.r2dbc.function.query;
|
||||
package org.springframework.data.r2dbc.query;
|
||||
|
||||
import org.springframework.data.r2dbc.dialect.Bindings;
|
||||
import org.springframework.data.relational.core.sql.Condition;
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.r2dbc.function.query;
|
||||
package org.springframework.data.r2dbc.query;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.r2dbc.function.query;
|
||||
package org.springframework.data.r2dbc.query;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
@@ -27,14 +27,14 @@ import org.springframework.data.mapping.PropertyPath;
|
||||
import org.springframework.data.mapping.PropertyReferenceException;
|
||||
import org.springframework.data.mapping.context.InvalidPersistentPropertyPath;
|
||||
import org.springframework.data.mapping.context.MappingContext;
|
||||
import org.springframework.data.r2dbc.convert.R2dbcConverter;
|
||||
import org.springframework.data.r2dbc.dialect.BindMarker;
|
||||
import org.springframework.data.r2dbc.dialect.BindMarkers;
|
||||
import org.springframework.data.r2dbc.dialect.Bindings;
|
||||
import org.springframework.data.r2dbc.dialect.MutableBindings;
|
||||
import org.springframework.data.r2dbc.domain.SettableValue;
|
||||
import org.springframework.data.r2dbc.function.convert.R2dbcConverter;
|
||||
import org.springframework.data.r2dbc.function.query.Criteria.Combinator;
|
||||
import org.springframework.data.r2dbc.function.query.Criteria.Comparator;
|
||||
import org.springframework.data.r2dbc.mapping.SettableValue;
|
||||
import org.springframework.data.r2dbc.query.Criteria.Combinator;
|
||||
import org.springframework.data.r2dbc.query.Criteria.Comparator;
|
||||
import org.springframework.data.relational.core.mapping.RelationalPersistentEntity;
|
||||
import org.springframework.data.relational.core.mapping.RelationalPersistentProperty;
|
||||
import org.springframework.data.relational.core.sql.Column;
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.r2dbc.function.query;
|
||||
package org.springframework.data.r2dbc.query;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.LinkedHashMap;
|
||||
@@ -13,18 +13,18 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.r2dbc.function.query;
|
||||
package org.springframework.data.r2dbc.query;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.data.r2dbc.convert.R2dbcConverter;
|
||||
import org.springframework.data.r2dbc.dialect.BindMarker;
|
||||
import org.springframework.data.r2dbc.dialect.BindMarkers;
|
||||
import org.springframework.data.r2dbc.dialect.Bindings;
|
||||
import org.springframework.data.r2dbc.dialect.MutableBindings;
|
||||
import org.springframework.data.r2dbc.domain.SettableValue;
|
||||
import org.springframework.data.r2dbc.function.convert.R2dbcConverter;
|
||||
import org.springframework.data.r2dbc.mapping.SettableValue;
|
||||
import org.springframework.data.relational.core.mapping.RelationalPersistentEntity;
|
||||
import org.springframework.data.relational.core.sql.AssignValue;
|
||||
import org.springframework.data.relational.core.sql.Assignment;
|
||||
@@ -3,4 +3,4 @@
|
||||
*/
|
||||
@org.springframework.lang.NonNullApi
|
||||
@org.springframework.lang.NonNullFields
|
||||
package org.springframework.data.r2dbc.function.query;
|
||||
package org.springframework.data.r2dbc.query;
|
||||
@@ -117,7 +117,7 @@ public @interface EnableR2dbcRepositories {
|
||||
Class<?> repositoryBaseClass() default DefaultRepositoryBaseClass.class;
|
||||
|
||||
/**
|
||||
* Configures the name of the {@link org.springframework.data.r2dbc.function.DatabaseClient} bean to be used with the
|
||||
* Configures the name of the {@link org.springframework.data.r2dbc.core.DatabaseClient} bean to be used with the
|
||||
* repositories detected.
|
||||
*
|
||||
* @return
|
||||
|
||||
@@ -22,10 +22,10 @@ import org.reactivestreams.Publisher;
|
||||
|
||||
import org.springframework.core.convert.converter.Converter;
|
||||
import org.springframework.data.convert.EntityInstantiators;
|
||||
import org.springframework.data.r2dbc.function.DatabaseClient;
|
||||
import org.springframework.data.r2dbc.function.DatabaseClient.GenericExecuteSpec;
|
||||
import org.springframework.data.r2dbc.function.FetchSpec;
|
||||
import org.springframework.data.r2dbc.function.convert.R2dbcConverter;
|
||||
import org.springframework.data.r2dbc.convert.R2dbcConverter;
|
||||
import org.springframework.data.r2dbc.core.DatabaseClient;
|
||||
import org.springframework.data.r2dbc.core.FetchSpec;
|
||||
import org.springframework.data.r2dbc.core.DatabaseClient.GenericExecuteSpec;
|
||||
import org.springframework.data.r2dbc.repository.query.R2dbcQueryExecution.ResultProcessingConverter;
|
||||
import org.springframework.data.r2dbc.repository.query.R2dbcQueryExecution.ResultProcessingExecution;
|
||||
import org.springframework.data.relational.repository.query.RelationalParameterAccessor;
|
||||
|
||||
@@ -17,7 +17,7 @@ package org.springframework.data.r2dbc.repository.query;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
import org.springframework.data.r2dbc.function.DatabaseClient.BindSpec;
|
||||
import org.springframework.data.r2dbc.core.DatabaseClient.BindSpec;
|
||||
|
||||
/**
|
||||
* Interface declaring a query that supplies SQL and can bind parameters to a {@link BindSpec}.
|
||||
|
||||
@@ -21,7 +21,7 @@ import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.core.convert.converter.Converter;
|
||||
import org.springframework.data.convert.EntityInstantiators;
|
||||
import org.springframework.data.mapping.context.MappingContext;
|
||||
import org.springframework.data.r2dbc.function.FetchSpec;
|
||||
import org.springframework.data.r2dbc.core.FetchSpec;
|
||||
import org.springframework.data.relational.core.mapping.RelationalPersistentEntity;
|
||||
import org.springframework.data.relational.core.mapping.RelationalPersistentProperty;
|
||||
import org.springframework.data.relational.repository.query.DtoInstantiatingConverter;
|
||||
|
||||
@@ -15,9 +15,9 @@
|
||||
*/
|
||||
package org.springframework.data.r2dbc.repository.query;
|
||||
|
||||
import org.springframework.data.r2dbc.function.DatabaseClient;
|
||||
import org.springframework.data.r2dbc.function.DatabaseClient.BindSpec;
|
||||
import org.springframework.data.r2dbc.function.convert.R2dbcConverter;
|
||||
import org.springframework.data.r2dbc.convert.R2dbcConverter;
|
||||
import org.springframework.data.r2dbc.core.DatabaseClient;
|
||||
import org.springframework.data.r2dbc.core.DatabaseClient.BindSpec;
|
||||
import org.springframework.data.relational.repository.query.RelationalParameterAccessor;
|
||||
import org.springframework.data.repository.query.Parameter;
|
||||
import org.springframework.data.repository.query.Parameters;
|
||||
|
||||
@@ -4,7 +4,7 @@ import io.r2dbc.spi.Result;
|
||||
import io.r2dbc.spi.Statement;
|
||||
|
||||
import org.reactivestreams.Publisher;
|
||||
import org.springframework.data.r2dbc.function.DatabaseClient.BindSpec;
|
||||
import org.springframework.data.r2dbc.core.DatabaseClient.BindSpec;
|
||||
|
||||
/**
|
||||
* Adapter for {@link BindSpec} to be used with {@link org.springframework.data.r2dbc.dialect.BindMarker} binding.
|
||||
|
||||
@@ -23,9 +23,9 @@ import java.util.Optional;
|
||||
|
||||
import org.springframework.data.mapping.context.MappingContext;
|
||||
import org.springframework.data.projection.ProjectionFactory;
|
||||
import org.springframework.data.r2dbc.function.DatabaseClient;
|
||||
import org.springframework.data.r2dbc.function.ReactiveDataAccessStrategy;
|
||||
import org.springframework.data.r2dbc.function.convert.R2dbcConverter;
|
||||
import org.springframework.data.r2dbc.convert.R2dbcConverter;
|
||||
import org.springframework.data.r2dbc.core.DatabaseClient;
|
||||
import org.springframework.data.r2dbc.core.ReactiveDataAccessStrategy;
|
||||
import org.springframework.data.r2dbc.repository.R2dbcRepository;
|
||||
import org.springframework.data.r2dbc.repository.query.R2dbcQueryMethod;
|
||||
import org.springframework.data.r2dbc.repository.query.StringBasedR2dbcQuery;
|
||||
|
||||
@@ -18,8 +18,8 @@ package org.springframework.data.r2dbc.repository.support;
|
||||
import java.io.Serializable;
|
||||
|
||||
import org.springframework.data.mapping.context.MappingContext;
|
||||
import org.springframework.data.r2dbc.function.DatabaseClient;
|
||||
import org.springframework.data.r2dbc.function.ReactiveDataAccessStrategy;
|
||||
import org.springframework.data.r2dbc.core.DatabaseClient;
|
||||
import org.springframework.data.r2dbc.core.ReactiveDataAccessStrategy;
|
||||
import org.springframework.data.repository.Repository;
|
||||
import org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport;
|
||||
import org.springframework.data.repository.core.support.RepositoryFactorySupport;
|
||||
|
||||
@@ -24,13 +24,12 @@ import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import org.reactivestreams.Publisher;
|
||||
|
||||
import org.springframework.data.r2dbc.domain.PreparedOperation;
|
||||
import org.springframework.data.r2dbc.function.DatabaseClient;
|
||||
import org.springframework.data.r2dbc.function.ReactiveDataAccessStrategy;
|
||||
import org.springframework.data.r2dbc.function.StatementMapper;
|
||||
import org.springframework.data.r2dbc.function.convert.R2dbcConverter;
|
||||
import org.springframework.data.r2dbc.function.query.Criteria;
|
||||
import org.springframework.data.r2dbc.convert.R2dbcConverter;
|
||||
import org.springframework.data.r2dbc.core.DatabaseClient;
|
||||
import org.springframework.data.r2dbc.core.PreparedOperation;
|
||||
import org.springframework.data.r2dbc.core.ReactiveDataAccessStrategy;
|
||||
import org.springframework.data.r2dbc.core.StatementMapper;
|
||||
import org.springframework.data.r2dbc.query.Criteria;
|
||||
import org.springframework.data.relational.core.sql.Functions;
|
||||
import org.springframework.data.relational.core.sql.Select;
|
||||
import org.springframework.data.relational.core.sql.StatementBuilder;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.r2dbc.function
|
||||
package org.springframework.data.r2dbc.core
|
||||
|
||||
import kotlinx.coroutines.reactive.awaitFirstOrNull
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.r2dbc.function
|
||||
package org.springframework.data.r2dbc.core
|
||||
|
||||
import kotlinx.coroutines.FlowPreview
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
@@ -27,7 +27,7 @@ import org.junit.Test;
|
||||
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.data.r2dbc.function.DatabaseClient;
|
||||
import org.springframework.data.r2dbc.core.DatabaseClient;
|
||||
|
||||
/**
|
||||
* Tests for {@link AbstractR2dbcConfiguration}.
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.r2dbc.function.connectionfactory;
|
||||
package org.springframework.data.r2dbc.connectionfactory;
|
||||
|
||||
import static org.mockito.Mockito.*;
|
||||
|
||||
@@ -22,6 +22,9 @@ import io.r2dbc.spi.ConnectionFactory;
|
||||
import org.assertj.core.api.Assertions;
|
||||
import org.junit.Test;
|
||||
import org.reactivestreams.Publisher;
|
||||
import org.springframework.data.r2dbc.connectionfactory.ConnectionFactoryUtils;
|
||||
import org.springframework.data.r2dbc.connectionfactory.ReactiveTransactionSynchronization;
|
||||
import org.springframework.data.r2dbc.connectionfactory.TransactionResources;
|
||||
import org.springframework.transaction.NoTransactionException;
|
||||
import reactor.core.publisher.Mono;
|
||||
import reactor.test.StepVerifier;
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.r2dbc.function.connectionfactory;
|
||||
package org.springframework.data.r2dbc.connectionfactory;
|
||||
|
||||
import static org.assertj.core.api.Assertions.*;
|
||||
import static org.mockito.Mockito.*;
|
||||
@@ -23,6 +23,7 @@ import io.r2dbc.spi.ConnectionFactory;
|
||||
import reactor.core.publisher.Mono;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.springframework.data.r2dbc.connectionfactory.DelegatingConnectionFactory;
|
||||
|
||||
/**
|
||||
* Unit tests for {@link DelegatingConnectionFactory}.
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.r2dbc.function.connectionfactory;
|
||||
package org.springframework.data.r2dbc.connectionfactory;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.junit.Assert.*;
|
||||
@@ -32,7 +32,8 @@ import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import org.springframework.data.r2dbc.connectionfactory.R2dbcTransactionManager;
|
||||
import org.springframework.data.r2dbc.connectionfactory.ConnectionFactoryUtils;
|
||||
import org.springframework.transaction.IllegalTransactionStateException;
|
||||
import org.springframework.transaction.TransactionDefinition;
|
||||
import org.springframework.transaction.reactive.TransactionSynchronization;
|
||||
@@ -41,16 +42,16 @@ import org.springframework.transaction.reactive.TransactionalOperator;
|
||||
import org.springframework.transaction.support.DefaultTransactionDefinition;
|
||||
|
||||
/**
|
||||
* Unit tests for {@link ConnectionFactoryTransactionManager}.
|
||||
* Unit tests for {@link R2dbcTransactionManager}.
|
||||
*
|
||||
* @author Mark Paluch
|
||||
*/
|
||||
public class ConnectionFactoryTransactionManagerUnitTests {
|
||||
public class R2dbcTransactionManagerUnitTests {
|
||||
|
||||
ConnectionFactory connectionFactoryMock = mock(ConnectionFactory.class);
|
||||
Connection connectionMock = mock(Connection.class);
|
||||
|
||||
private ConnectionFactoryTransactionManager tm;
|
||||
private R2dbcTransactionManager tm;
|
||||
|
||||
@Before
|
||||
public void before() {
|
||||
@@ -58,7 +59,7 @@ public class ConnectionFactoryTransactionManagerUnitTests {
|
||||
when(connectionFactoryMock.create()).thenReturn((Mono) Mono.just(connectionMock));
|
||||
when(connectionMock.beginTransaction()).thenReturn(Mono.empty());
|
||||
when(connectionMock.close()).thenReturn(Mono.empty());
|
||||
tm = new ConnectionFactoryTransactionManager(connectionFactoryMock);
|
||||
tm = new R2dbcTransactionManager(connectionFactoryMock);
|
||||
}
|
||||
|
||||
@Test // gh-107
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.r2dbc.function.connectionfactory;
|
||||
package org.springframework.data.r2dbc.connectionfactory;
|
||||
|
||||
import static org.assertj.core.api.Assertions.*;
|
||||
import static org.mockito.Mockito.*;
|
||||
@@ -24,6 +24,10 @@ import io.r2dbc.spi.Connection;
|
||||
import io.r2dbc.spi.ConnectionFactory;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.springframework.data.r2dbc.connectionfactory.R2dbcTransactionManager;
|
||||
import org.springframework.data.r2dbc.connectionfactory.ConnectionFactoryUtils;
|
||||
import org.springframework.data.r2dbc.connectionfactory.ConnectionProxy;
|
||||
import org.springframework.data.r2dbc.connectionfactory.TransactionAwareConnectionFactoryProxy;
|
||||
import org.springframework.transaction.reactive.TransactionalOperator;
|
||||
import reactor.core.publisher.Mono;
|
||||
import reactor.test.StepVerifier;
|
||||
@@ -42,14 +46,14 @@ public class TransactionAwareConnectionFactoryProxyUnitTests {
|
||||
Connection connectionMock2 = mock(Connection.class);
|
||||
Connection connectionMock3 = mock(Connection.class);
|
||||
|
||||
private ConnectionFactoryTransactionManager tm;
|
||||
private R2dbcTransactionManager tm;
|
||||
|
||||
@Before
|
||||
public void before() {
|
||||
|
||||
when(connectionFactoryMock.create()).thenReturn((Mono) Mono.just(connectionMock1),
|
||||
(Mono) Mono.just(connectionMock2), (Mono) Mono.just(connectionMock3));
|
||||
tm = new ConnectionFactoryTransactionManager(connectionFactoryMock);
|
||||
tm = new R2dbcTransactionManager(connectionFactoryMock);
|
||||
}
|
||||
|
||||
@Test // gh-107
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.springframework.data.r2dbc.function.convert;
|
||||
package org.springframework.data.r2dbc.convert;
|
||||
|
||||
import static org.assertj.core.api.Assertions.*;
|
||||
import static org.mockito.Mockito.*;
|
||||
@@ -13,9 +13,9 @@ import java.util.Set;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.junit.MockitoJUnitRunner;
|
||||
|
||||
import org.springframework.data.r2dbc.convert.EntityRowMapper;
|
||||
import org.springframework.data.r2dbc.core.DefaultReactiveDataAccessStrategy;
|
||||
import org.springframework.data.r2dbc.dialect.PostgresDialect;
|
||||
import org.springframework.data.r2dbc.function.DefaultReactiveDataAccessStrategy;
|
||||
|
||||
/**
|
||||
* Unit tests for {@link EntityRowMapper}.
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.r2dbc.function.convert;
|
||||
package org.springframework.data.r2dbc.convert;
|
||||
|
||||
import static org.assertj.core.api.Assertions.*;
|
||||
import static org.mockito.Mockito.*;
|
||||
@@ -33,8 +33,10 @@ import org.springframework.dao.InvalidDataAccessApiUsageException;
|
||||
import org.springframework.data.annotation.Id;
|
||||
import org.springframework.data.convert.ReadingConverter;
|
||||
import org.springframework.data.convert.WritingConverter;
|
||||
import org.springframework.data.r2dbc.domain.OutboundRow;
|
||||
import org.springframework.data.r2dbc.domain.SettableValue;
|
||||
import org.springframework.data.r2dbc.convert.MappingR2dbcConverter;
|
||||
import org.springframework.data.r2dbc.convert.R2dbcCustomConversions;
|
||||
import org.springframework.data.r2dbc.mapping.OutboundRow;
|
||||
import org.springframework.data.r2dbc.mapping.SettableValue;
|
||||
import org.springframework.data.relational.core.mapping.RelationalMappingContext;
|
||||
|
||||
/**
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.r2dbc.function.convert;
|
||||
package org.springframework.data.r2dbc.convert;
|
||||
|
||||
import static org.assertj.core.api.Assertions.*;
|
||||
import static org.mockito.Mockito.*;
|
||||
@@ -30,15 +30,16 @@ import java.util.UUID;
|
||||
import org.junit.Test;
|
||||
|
||||
import org.springframework.core.convert.converter.Converter;
|
||||
import org.springframework.data.r2dbc.function.convert.R2dbcConverters.RowToBooleanConverter;
|
||||
import org.springframework.data.r2dbc.function.convert.R2dbcConverters.RowToLocalDateConverter;
|
||||
import org.springframework.data.r2dbc.function.convert.R2dbcConverters.RowToLocalDateTimeConverter;
|
||||
import org.springframework.data.r2dbc.function.convert.R2dbcConverters.RowToLocalTimeConverter;
|
||||
import org.springframework.data.r2dbc.function.convert.R2dbcConverters.RowToNumberConverterFactory;
|
||||
import org.springframework.data.r2dbc.function.convert.R2dbcConverters.RowToNumberConverterFactory.RowToOffsetDateTimeConverter;
|
||||
import org.springframework.data.r2dbc.function.convert.R2dbcConverters.RowToNumberConverterFactory.RowToStringConverter;
|
||||
import org.springframework.data.r2dbc.function.convert.R2dbcConverters.RowToNumberConverterFactory.RowToUuidConverter;
|
||||
import org.springframework.data.r2dbc.function.convert.R2dbcConverters.RowToNumberConverterFactory.RowToZonedDateTimeConverter;
|
||||
import org.springframework.data.r2dbc.convert.R2dbcConverters;
|
||||
import org.springframework.data.r2dbc.convert.R2dbcConverters.RowToBooleanConverter;
|
||||
import org.springframework.data.r2dbc.convert.R2dbcConverters.RowToLocalDateConverter;
|
||||
import org.springframework.data.r2dbc.convert.R2dbcConverters.RowToLocalDateTimeConverter;
|
||||
import org.springframework.data.r2dbc.convert.R2dbcConverters.RowToLocalTimeConverter;
|
||||
import org.springframework.data.r2dbc.convert.R2dbcConverters.RowToNumberConverterFactory;
|
||||
import org.springframework.data.r2dbc.convert.R2dbcConverters.RowToNumberConverterFactory.RowToOffsetDateTimeConverter;
|
||||
import org.springframework.data.r2dbc.convert.R2dbcConverters.RowToNumberConverterFactory.RowToStringConverter;
|
||||
import org.springframework.data.r2dbc.convert.R2dbcConverters.RowToNumberConverterFactory.RowToUuidConverter;
|
||||
import org.springframework.data.r2dbc.convert.R2dbcConverters.RowToNumberConverterFactory.RowToZonedDateTimeConverter;
|
||||
|
||||
/**
|
||||
* Unit tests for {@link R2dbcConverters}.
|
||||
@@ -13,11 +13,11 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.r2dbc.function;
|
||||
package org.springframework.data.r2dbc.core;
|
||||
|
||||
import static org.assertj.core.api.Assertions.*;
|
||||
import static org.springframework.data.domain.Sort.Order.*;
|
||||
import static org.springframework.data.r2dbc.function.query.Criteria.*;
|
||||
import static org.springframework.data.r2dbc.query.Criteria.*;
|
||||
|
||||
import io.r2dbc.spi.ConnectionFactory;
|
||||
import lombok.Data;
|
||||
@@ -33,8 +33,9 @@ import org.springframework.dao.DataIntegrityViolationException;
|
||||
import org.springframework.data.annotation.Id;
|
||||
import org.springframework.data.domain.PageRequest;
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.data.r2dbc.function.query.Criteria;
|
||||
import org.springframework.data.r2dbc.function.query.Update;
|
||||
import org.springframework.data.r2dbc.core.DatabaseClient;
|
||||
import org.springframework.data.r2dbc.query.Criteria;
|
||||
import org.springframework.data.r2dbc.query.Update;
|
||||
import org.springframework.data.r2dbc.testing.R2dbcIntegrationTestSupport;
|
||||
import org.springframework.data.relational.core.mapping.Table;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.r2dbc.function;
|
||||
package org.springframework.data.r2dbc.core;
|
||||
|
||||
import static org.assertj.core.api.Assertions.*;
|
||||
|
||||
@@ -34,7 +34,9 @@ import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.support.GenericApplicationContext;
|
||||
import org.springframework.dao.DataAccessException;
|
||||
import org.springframework.data.r2dbc.config.AbstractR2dbcConfiguration;
|
||||
import org.springframework.data.r2dbc.function.connectionfactory.ConnectionFactoryTransactionManager;
|
||||
import org.springframework.data.r2dbc.connectionfactory.R2dbcTransactionManager;
|
||||
import org.springframework.data.r2dbc.core.DatabaseClient;
|
||||
import org.springframework.data.r2dbc.core.TransactionalDatabaseClient;
|
||||
import org.springframework.data.r2dbc.testing.R2dbcIntegrationTestSupport;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.transaction.NoTransactionException;
|
||||
@@ -244,7 +246,7 @@ public abstract class AbstractTransactionalDatabaseClientIntegrationTests extend
|
||||
DatabaseClient databaseClient = DatabaseClient.create(connectionFactory);
|
||||
|
||||
TransactionalOperator transactionalOperator = TransactionalOperator
|
||||
.create(new ConnectionFactoryTransactionManager(connectionFactory), new DefaultTransactionDefinition());
|
||||
.create(new R2dbcTransactionManager(connectionFactory), new DefaultTransactionDefinition());
|
||||
|
||||
Flux<Object> txId = databaseClient.execute() //
|
||||
.sql(getCurrentTransactionIdStatement()) //
|
||||
@@ -269,7 +271,7 @@ public abstract class AbstractTransactionalDatabaseClientIntegrationTests extend
|
||||
DatabaseClient databaseClient = DatabaseClient.create(connectionFactory);
|
||||
|
||||
TransactionalOperator transactionalOperator = TransactionalOperator
|
||||
.create(new ConnectionFactoryTransactionManager(connectionFactory), new DefaultTransactionDefinition());
|
||||
.create(new R2dbcTransactionManager(connectionFactory), new DefaultTransactionDefinition());
|
||||
|
||||
Flux<Integer> integerFlux = databaseClient.execute() //
|
||||
.sql(getInsertIntoLegosetStatement()) //
|
||||
@@ -331,7 +333,7 @@ public abstract class AbstractTransactionalDatabaseClientIntegrationTests extend
|
||||
|
||||
@Bean
|
||||
ReactiveTransactionManager txMgr(ConnectionFactory connectionFactory) {
|
||||
return new ConnectionFactoryTransactionManager(connectionFactory);
|
||||
return new R2dbcTransactionManager(connectionFactory);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.r2dbc.function;
|
||||
package org.springframework.data.r2dbc.core;
|
||||
|
||||
import static org.mockito.Mockito.*;
|
||||
|
||||
@@ -30,7 +30,9 @@ import org.mockito.Mock;
|
||||
import org.mockito.junit.MockitoJUnitRunner;
|
||||
import org.reactivestreams.Publisher;
|
||||
import org.reactivestreams.Subscription;
|
||||
|
||||
import org.springframework.data.r2dbc.core.DatabaseClient;
|
||||
import org.springframework.data.r2dbc.core.DefaultDatabaseClient;
|
||||
import org.springframework.data.r2dbc.core.ReactiveDataAccessStrategy;
|
||||
import org.springframework.data.r2dbc.support.R2dbcExceptionTranslator;
|
||||
|
||||
/**
|
||||
@@ -13,14 +13,14 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.r2dbc.function;
|
||||
package org.springframework.data.r2dbc.core;
|
||||
|
||||
import io.r2dbc.spi.ConnectionFactory;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
import org.junit.Ignore;
|
||||
|
||||
import org.springframework.data.r2dbc.core.DatabaseClient;
|
||||
import org.springframework.data.r2dbc.testing.H2TestSupport;
|
||||
|
||||
/**
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.r2dbc.function;
|
||||
package org.springframework.data.r2dbc.core;
|
||||
|
||||
import io.r2dbc.spi.ConnectionFactory;
|
||||
|
||||
@@ -22,7 +22,7 @@ import javax.sql.DataSource;
|
||||
import org.junit.ClassRule;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
import org.springframework.data.r2dbc.core.DatabaseClient;
|
||||
import org.springframework.data.r2dbc.testing.ExternalDatabase;
|
||||
import org.springframework.data.r2dbc.testing.MySqlTestSupport;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.r2dbc.function;
|
||||
package org.springframework.data.r2dbc.core;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
import java.time.Duration;
|
||||
@@ -22,6 +22,8 @@ import io.r2dbc.spi.ConnectionFactory;
|
||||
import org.junit.ClassRule;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.springframework.data.r2dbc.core.DatabaseClient;
|
||||
import org.springframework.data.r2dbc.core.TransactionalDatabaseClient;
|
||||
import org.springframework.data.r2dbc.testing.ExternalDatabase;
|
||||
import org.springframework.data.r2dbc.testing.MySqlTestSupport;
|
||||
import reactor.core.publisher.Mono;
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.r2dbc.function;
|
||||
package org.springframework.data.r2dbc.core;
|
||||
|
||||
import static org.assertj.core.api.Assertions.*;
|
||||
import static org.mockito.Mockito.*;
|
||||
@@ -22,12 +22,14 @@ import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import org.springframework.data.r2dbc.core.BindableOperation;
|
||||
import org.springframework.data.r2dbc.core.MapBindParameterSource;
|
||||
import org.springframework.data.r2dbc.core.NamedParameterUtils;
|
||||
import org.springframework.data.r2dbc.core.ParsedSql;
|
||||
import org.springframework.data.r2dbc.dialect.BindMarkersFactory;
|
||||
import org.springframework.data.r2dbc.dialect.BindTarget;
|
||||
import org.springframework.data.r2dbc.dialect.PostgresDialect;
|
||||
import org.springframework.data.r2dbc.dialect.SqlServerDialect;
|
||||
import org.springframework.data.r2dbc.domain.BindTarget;
|
||||
import org.springframework.data.r2dbc.domain.BindableOperation;
|
||||
|
||||
/**
|
||||
* Unit tests for {@link NamedParameterUtils}.
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user