Skip to content

Commit

Permalink
Merge pull request #68 from heli-os/fix/typo-and-text-style
Browse files Browse the repository at this point in the history
Correct typo and Unify code style
  • Loading branch information
huisam authored Jul 6, 2022
2 parents 13e0e61 + 665e9aa commit d6d24e5
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 18 deletions.
18 changes: 9 additions & 9 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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**

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ interface ExpressionDsl {
fun <T, R> col(entity: EntitySpec<T>, property: KProperty1<T, R>) = column(entity, property)
fun <T, R> column(entity: EntitySpec<T>, property: KProperty1<T, R>) = ColumnSpec<R>(entity, property.name)

fun <N : Number?> max(expresssion: ExpressionSpec<N>) = MaxSpec(expresssion)
fun <N : Number?> max(expression: ExpressionSpec<N>) = MaxSpec(expression)
fun <N : Number?> min(expression: ExpressionSpec<N>) = MinSpec(expression)
fun <N : Number?> avg(expression: ExpressionSpec<N>) = AvgSpec(expression)
fun <N : Number?> sum(expression: ExpressionSpec<N>) = SumSpec(expression)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ abstract class AbstractCriteriaQueryDslSelectIntegrationTest<S> : CriteriaQueryD
}

@Test
fun `function - substring function, mutliple parameters`() = runBlocking {
fun `function - substring function, multiple parameters`() = runBlocking {
val result = withFactory { queryFactory ->
queryFactory.singleQuery<String> {
select(function("substring", col(OrderItem::productName), literal(1), literal(2)))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ abstract class AbstractCriteriaDeleteIntegrationTest : AbstractCriteriaQueryDslI
val query = queryFactory.selectQuery<OrderAddress> {
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))
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<String> {
select(function("substring", col(OrderItem::productName), literal(1), literal(2)))
from(entity(OrderItem::class))
Expand Down

0 comments on commit d6d24e5

Please sign in to comment.