From 459c48c788144aba7fc765dc53bab43a52e0f0bd Mon Sep 17 00:00:00 2001 From: Heli Date: Tue, 5 Jul 2022 04:24:09 +0900 Subject: [PATCH 1/4] docs: correct typo in some files --- .github/PULL_REQUEST_TEMPLATE.md | 18 +++++++++--------- .../querydsl/expression/ExpressionDsl.kt | 2 +- ...actCriteriaQueryDslSelectIntegrationTest.kt | 2 +- ...actCriteriaQueryDslSelectIntegrationTest.kt | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 656e3bd78..10d98e6ed 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -11,15 +11,15 @@ * Please commit your modification based by [conventional commit](https://www.conventionalcommits.org/en/v1.0.0/) * This commit convention is referred from [angular convention](https://github.com/angular/angular/blob/22b96b9/CONTRIBUTING.md#-commit-message-guidelines) -| Commit type | Description | -|-------------|---------------------------| -| feat | New Feature | -| fix | Fix bug | -| docs | Documenation only changed | -| ci |Change CI configuration| -| refactor |Not a bug fix or add feature, just refactoring code| -| test |Add Test case or fix wrong test case| -| style |Only change the code style(ex. white-space, formatting)| +| Commit type | Description | +|-------------|---------------------------------------------------------| +| feat | New Feature | +| fix | Fix bug | +| docs | Documentation only changed | +| ci | Change CI configuration | +| refactor | Not a bug fix or add feature, just refactoring code | +| test | Add Test case or fix wrong test case | +| style | Only change the code style(ex. white-space, formatting) | * If you want to add some more `commit type` please describe it on the **Pull Request** diff --git a/query/src/main/kotlin/com/linecorp/kotlinjdsl/querydsl/expression/ExpressionDsl.kt b/query/src/main/kotlin/com/linecorp/kotlinjdsl/querydsl/expression/ExpressionDsl.kt index e44bbb70f..b7453ad23 100644 --- a/query/src/main/kotlin/com/linecorp/kotlinjdsl/querydsl/expression/ExpressionDsl.kt +++ b/query/src/main/kotlin/com/linecorp/kotlinjdsl/querydsl/expression/ExpressionDsl.kt @@ -16,7 +16,7 @@ interface ExpressionDsl { fun col(entity: EntitySpec, property: KProperty1) = column(entity, property) fun column(entity: EntitySpec, property: KProperty1) = ColumnSpec(entity, property.name) - fun max(expresssion: ExpressionSpec) = MaxSpec(expresssion) + fun max(expression: ExpressionSpec) = MaxSpec(expression) fun min(expression: ExpressionSpec) = MinSpec(expression) fun avg(expression: ExpressionSpec) = AvgSpec(expression) fun sum(expression: ExpressionSpec) = SumSpec(expression) diff --git a/test-fixture/integration-reactive/src/main/kotlin/com/linecorp/kotlinjdsl/test/reactive/querydsl/select/AbstractCriteriaQueryDslSelectIntegrationTest.kt b/test-fixture/integration-reactive/src/main/kotlin/com/linecorp/kotlinjdsl/test/reactive/querydsl/select/AbstractCriteriaQueryDslSelectIntegrationTest.kt index 72b5547b3..0d2e08ee6 100644 --- a/test-fixture/integration-reactive/src/main/kotlin/com/linecorp/kotlinjdsl/test/reactive/querydsl/select/AbstractCriteriaQueryDslSelectIntegrationTest.kt +++ b/test-fixture/integration-reactive/src/main/kotlin/com/linecorp/kotlinjdsl/test/reactive/querydsl/select/AbstractCriteriaQueryDslSelectIntegrationTest.kt @@ -145,7 +145,7 @@ abstract class AbstractCriteriaQueryDslSelectIntegrationTest : CriteriaQueryD } @Test - fun `function - substring function, mutliple parameters`() = runBlocking { + fun `function - substring function, mulltiple parameters`() = runBlocking { val result = withFactory { queryFactory -> queryFactory.singleQuery { select(function("substring", col(OrderItem::productName), literal(1), literal(2))) diff --git a/test-fixture/integration/src/main/kotlin/com/linecorp/kotlinjdsl/test/integration/querydsl/select/AbstractCriteriaQueryDslSelectIntegrationTest.kt b/test-fixture/integration/src/main/kotlin/com/linecorp/kotlinjdsl/test/integration/querydsl/select/AbstractCriteriaQueryDslSelectIntegrationTest.kt index 51240459d..1d172d524 100644 --- a/test-fixture/integration/src/main/kotlin/com/linecorp/kotlinjdsl/test/integration/querydsl/select/AbstractCriteriaQueryDslSelectIntegrationTest.kt +++ b/test-fixture/integration/src/main/kotlin/com/linecorp/kotlinjdsl/test/integration/querydsl/select/AbstractCriteriaQueryDslSelectIntegrationTest.kt @@ -132,7 +132,7 @@ abstract class AbstractCriteriaQueryDslSelectIntegrationTest : AbstractCriteriaQ } @Test - fun `function - substring function, mutliple parameters`() { + fun `function - substring function, multiple parameters`() { val result = queryFactory.singleQuery { select(function("substring", col(OrderItem::productName), literal(1), literal(2))) from(entity(OrderItem::class)) From 8afa2b28b8819928e387e2e2d43464bd61b67859 Mon Sep 17 00:00:00 2001 From: Heli Date: Tue, 5 Jul 2022 04:25:48 +0900 Subject: [PATCH 2/4] style: modifications to unify code style --- .../kotlinjdsl/query/creator/JpaCriteriaQueryBuilderTest.kt | 2 +- .../criteriaquery/AbstractCriteriaDeleteIntegrationTest.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/query/src/test/kotlin/com/linecorp/kotlinjdsl/query/creator/JpaCriteriaQueryBuilderTest.kt b/query/src/test/kotlin/com/linecorp/kotlinjdsl/query/creator/JpaCriteriaQueryBuilderTest.kt index 42e939792..2515c2f7f 100644 --- a/query/src/test/kotlin/com/linecorp/kotlinjdsl/query/creator/JpaCriteriaQueryBuilderTest.kt +++ b/query/src/test/kotlin/com/linecorp/kotlinjdsl/query/creator/JpaCriteriaQueryBuilderTest.kt @@ -29,7 +29,7 @@ import javax.persistence.criteria.* @ExtendWith(MockKExtension::class) internal class JpaCriteriaQueryBuilderTest : WithKotlinJdslAssertions { - val sut = JpaCriteriaQueryBuilder + private val sut = JpaCriteriaQueryBuilder @MockK private lateinit var em: EntityManager diff --git a/test-fixture/integration/src/main/kotlin/com/linecorp/kotlinjdsl/test/integration/criteriaquery/AbstractCriteriaDeleteIntegrationTest.kt b/test-fixture/integration/src/main/kotlin/com/linecorp/kotlinjdsl/test/integration/criteriaquery/AbstractCriteriaDeleteIntegrationTest.kt index 8fd4cfd3e..7c5d4a9ca 100644 --- a/test-fixture/integration/src/main/kotlin/com/linecorp/kotlinjdsl/test/integration/criteriaquery/AbstractCriteriaDeleteIntegrationTest.kt +++ b/test-fixture/integration/src/main/kotlin/com/linecorp/kotlinjdsl/test/integration/criteriaquery/AbstractCriteriaDeleteIntegrationTest.kt @@ -27,7 +27,7 @@ abstract class AbstractCriteriaDeleteIntegrationTest : AbstractCriteriaQueryDslI val query = queryFactory.selectQuery { select(entity(OrderAddress::class)) from(entity(OrderAddress::class)) - where(col(OrderAddress::id).equal(address1.id),) + where(col(OrderAddress::id).equal(address1.id)) associate(OrderAddress::class, Address::class, on(OrderAddress::address)) } From 3be47731d91ed646fda655c0f0c7449d3ef855e8 Mon Sep 17 00:00:00 2001 From: Heli Date: Tue, 5 Jul 2022 04:28:11 +0900 Subject: [PATCH 3/4] fix: change example code to use platform type --- .../spring/data/example/QueryFactoryConfiguration.kt | 4 ++-- .../spring/data/example/QueryFactoryConfiguration.kt | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/spring-boot-hibernate-reactive-2.6/src/main/kotlin/com/linecorp/kotlinjdsl/spring/data/example/QueryFactoryConfiguration.kt b/examples/spring-boot-hibernate-reactive-2.6/src/main/kotlin/com/linecorp/kotlinjdsl/spring/data/example/QueryFactoryConfiguration.kt index 5d1299e17..d43344edf 100644 --- a/examples/spring-boot-hibernate-reactive-2.6/src/main/kotlin/com/linecorp/kotlinjdsl/spring/data/example/QueryFactoryConfiguration.kt +++ b/examples/spring-boot-hibernate-reactive-2.6/src/main/kotlin/com/linecorp/kotlinjdsl/spring/data/example/QueryFactoryConfiguration.kt @@ -11,10 +11,10 @@ import javax.persistence.Persistence @Configuration class QueryFactoryConfiguration { @Bean - fun entityManagerFactory() = Persistence.createEntityManagerFactory("book") + fun entityManagerFactory(): EntityManagerFactory = Persistence.createEntityManagerFactory("book") @Bean - fun mutinySessionFactory(entityManagerFactory: EntityManagerFactory) = + fun mutinySessionFactory(entityManagerFactory: EntityManagerFactory): SessionFactory = entityManagerFactory.unwrap(SessionFactory::class.java) .apply { withSession { diff --git a/examples/spring-boot-hibernate-reactive-2.7/src/main/kotlin/com/linecorp/kotlinjdsl/spring/data/example/QueryFactoryConfiguration.kt b/examples/spring-boot-hibernate-reactive-2.7/src/main/kotlin/com/linecorp/kotlinjdsl/spring/data/example/QueryFactoryConfiguration.kt index 5d1299e17..d43344edf 100644 --- a/examples/spring-boot-hibernate-reactive-2.7/src/main/kotlin/com/linecorp/kotlinjdsl/spring/data/example/QueryFactoryConfiguration.kt +++ b/examples/spring-boot-hibernate-reactive-2.7/src/main/kotlin/com/linecorp/kotlinjdsl/spring/data/example/QueryFactoryConfiguration.kt @@ -11,10 +11,10 @@ import javax.persistence.Persistence @Configuration class QueryFactoryConfiguration { @Bean - fun entityManagerFactory() = Persistence.createEntityManagerFactory("book") + fun entityManagerFactory(): EntityManagerFactory = Persistence.createEntityManagerFactory("book") @Bean - fun mutinySessionFactory(entityManagerFactory: EntityManagerFactory) = + fun mutinySessionFactory(entityManagerFactory: EntityManagerFactory): SessionFactory = entityManagerFactory.unwrap(SessionFactory::class.java) .apply { withSession { From 665e9aa378a0b74d38610854f295099134c36805 Mon Sep 17 00:00:00 2001 From: Heli Date: Tue, 5 Jul 2022 04:57:43 +0900 Subject: [PATCH 4/4] style: correct typo --- .../select/AbstractCriteriaQueryDslSelectIntegrationTest.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test-fixture/integration-reactive/src/main/kotlin/com/linecorp/kotlinjdsl/test/reactive/querydsl/select/AbstractCriteriaQueryDslSelectIntegrationTest.kt b/test-fixture/integration-reactive/src/main/kotlin/com/linecorp/kotlinjdsl/test/reactive/querydsl/select/AbstractCriteriaQueryDslSelectIntegrationTest.kt index 0d2e08ee6..d3ea40428 100644 --- a/test-fixture/integration-reactive/src/main/kotlin/com/linecorp/kotlinjdsl/test/reactive/querydsl/select/AbstractCriteriaQueryDslSelectIntegrationTest.kt +++ b/test-fixture/integration-reactive/src/main/kotlin/com/linecorp/kotlinjdsl/test/reactive/querydsl/select/AbstractCriteriaQueryDslSelectIntegrationTest.kt @@ -145,7 +145,7 @@ abstract class AbstractCriteriaQueryDslSelectIntegrationTest : CriteriaQueryD } @Test - fun `function - substring function, mulltiple parameters`() = runBlocking { + fun `function - substring function, multiple parameters`() = runBlocking { val result = withFactory { queryFactory -> queryFactory.singleQuery { select(function("substring", col(OrderItem::productName), literal(1), literal(2)))