Skip to content

Commit

Permalink
rename packages
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentlauvlwj committed Sep 26, 2020
1 parent 702187a commit be83952
Show file tree
Hide file tree
Showing 107 changed files with 460 additions and 457 deletions.
12 changes: 6 additions & 6 deletions ktorm-core/generate-tuples.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ def generateGroupingAggregateColumns(Writer writer, int tupleNumber) {

task generateTuples {
doLast {
def outputFile = file("$generatedSourceDir/me/liuwj/ktorm/entity/Tuples.kt")
def outputFile = file("$generatedSourceDir/org/ktorm/entity/Tuples.kt")
outputFile.parentFile.mkdirs()

outputFile.withWriter { writer ->
Expand All @@ -378,12 +378,12 @@ task generateTuples {
writer.write("""
// This file is auto-generated by generate-tuples.gradle, DO NOT EDIT!
package me.liuwj.ktorm.entity
package org.ktorm.entity
import me.liuwj.ktorm.dsl.Query
import me.liuwj.ktorm.dsl.mapTo
import me.liuwj.ktorm.schema.ColumnDeclaring
import me.liuwj.ktorm.schema.BaseTable
import org.ktorm.dsl.Query
import org.ktorm.dsl.mapTo
import org.ktorm.schema.ColumnDeclaring
import org.ktorm.schema.BaseTable
import java.io.Serializable
import kotlin.experimental.ExperimentalTypeInference
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package me.liuwj.ktorm.database
package org.ktorm.database

import java.io.InputStream
import java.io.Reader
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package me.liuwj.ktorm.database
package org.ktorm.database

import java.sql.ResultSetMetaData
import java.sql.ResultSetMetaData.columnNullableUnknown
Expand Down
17 changes: 8 additions & 9 deletions ktorm-core/src/main/kotlin/org/ktorm/database/Database.kt
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,14 @@
* limitations under the License.
*/

package me.liuwj.ktorm.database

import me.liuwj.ktorm.database.Database.Companion.connect
import me.liuwj.ktorm.dsl.Query
import me.liuwj.ktorm.entity.EntitySequence
import me.liuwj.ktorm.expression.ArgumentExpression
import me.liuwj.ktorm.expression.SqlExpression
import me.liuwj.ktorm.logging.Logger
import me.liuwj.ktorm.logging.detectLoggerImplementation
package org.ktorm.database

import org.ktorm.dsl.Query
import org.ktorm.entity.EntitySequence
import org.ktorm.expression.ArgumentExpression
import org.ktorm.expression.SqlExpression
import org.ktorm.logging.Logger
import org.ktorm.logging.detectLoggerImplementation
import org.springframework.dao.DataAccessException
import org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator
import org.springframework.transaction.annotation.Transactional
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
* limitations under the License.
*/

package me.liuwj.ktorm.database
package org.ktorm.database

import me.liuwj.ktorm.expression.ArgumentExpression
import me.liuwj.ktorm.schema.SqlType
import org.ktorm.expression.ArgumentExpression
import org.ktorm.schema.SqlType
import java.sql.PreparedStatement
import java.sql.ResultSet
import kotlin.contracts.ExperimentalContracts
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package me.liuwj.ktorm.database
package org.ktorm.database

import java.sql.Connection
import java.sql.DriverManager
Expand Down
2 changes: 1 addition & 1 deletion ktorm-core/src/main/kotlin/org/ktorm/database/Keywords.kt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package me.liuwj.ktorm.database
package org.ktorm.database

/**
* Keywords in SQL:2003 standard, all in uppercase.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package me.liuwj.ktorm.database
package org.ktorm.database

import org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy
import org.springframework.transaction.annotation.Transactional
Expand Down
8 changes: 4 additions & 4 deletions ktorm-core/src/main/kotlin/org/ktorm/database/SqlDialect.kt
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
* limitations under the License.
*/

package me.liuwj.ktorm.database
package org.ktorm.database

import me.liuwj.ktorm.expression.ArgumentExpression
import me.liuwj.ktorm.expression.QueryExpression
import me.liuwj.ktorm.expression.SqlFormatter
import org.ktorm.expression.ArgumentExpression
import org.ktorm.expression.QueryExpression
import org.ktorm.expression.SqlFormatter
import java.sql.Statement
import java.util.ServiceLoader

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package me.liuwj.ktorm.database
package org.ktorm.database

import org.springframework.transaction.annotation.Transactional
import java.io.Closeable
Expand Down
8 changes: 4 additions & 4 deletions ktorm-core/src/main/kotlin/org/ktorm/dsl/Aggregation.kt
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
* limitations under the License.
*/

package me.liuwj.ktorm.dsl
package org.ktorm.dsl

import me.liuwj.ktorm.expression.AggregateExpression
import me.liuwj.ktorm.expression.AggregateType
import me.liuwj.ktorm.schema.*
import org.ktorm.expression.AggregateExpression
import org.ktorm.expression.AggregateType
import org.ktorm.schema.*

/**
* The min function, translated to `min(column)` in SQL.
Expand Down
4 changes: 2 additions & 2 deletions ktorm-core/src/main/kotlin/org/ktorm/dsl/CountExpression.kt
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
* limitations under the License.
*/

package me.liuwj.ktorm.dsl
package org.ktorm.dsl

import me.liuwj.ktorm.expression.*
import org.ktorm.expression.*

internal fun QueryExpression.toCountExpression(): SelectExpression {
val expression = OrderByRemover.visit(this) as QueryExpression
Expand Down
16 changes: 8 additions & 8 deletions ktorm-core/src/main/kotlin/org/ktorm/dsl/Dml.kt
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
* limitations under the License.
*/

package me.liuwj.ktorm.dsl

import me.liuwj.ktorm.database.Database
import me.liuwj.ktorm.expression.*
import me.liuwj.ktorm.schema.BaseTable
import me.liuwj.ktorm.schema.Column
import me.liuwj.ktorm.schema.ColumnDeclaring
import me.liuwj.ktorm.schema.defaultValue
package org.ktorm.dsl

import org.ktorm.database.Database
import org.ktorm.expression.*
import org.ktorm.schema.BaseTable
import org.ktorm.schema.Column
import org.ktorm.schema.ColumnDeclaring
import org.ktorm.schema.defaultValue
import java.lang.reflect.InvocationHandler
import java.lang.reflect.Proxy
import java.sql.PreparedStatement
Expand Down
6 changes: 3 additions & 3 deletions ktorm-core/src/main/kotlin/org/ktorm/dsl/Operators.kt
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
* limitations under the License.
*/

package me.liuwj.ktorm.dsl
package org.ktorm.dsl

import me.liuwj.ktorm.expression.*
import me.liuwj.ktorm.schema.*
import org.ktorm.expression.*
import org.ktorm.schema.*

// ---- Unary operators... ----

Expand Down
16 changes: 8 additions & 8 deletions ktorm-core/src/main/kotlin/org/ktorm/dsl/Query.kt
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
* limitations under the License.
*/

package me.liuwj.ktorm.dsl

import me.liuwj.ktorm.database.Database
import me.liuwj.ktorm.database.iterator
import me.liuwj.ktorm.expression.*
import me.liuwj.ktorm.schema.BooleanSqlType
import me.liuwj.ktorm.schema.Column
import me.liuwj.ktorm.schema.ColumnDeclaring
package org.ktorm.dsl

import org.ktorm.database.Database
import org.ktorm.database.iterator
import org.ktorm.expression.*
import org.ktorm.schema.BooleanSqlType
import org.ktorm.schema.Column
import org.ktorm.schema.ColumnDeclaring
import java.lang.Appendable
import java.sql.ResultSet

Expand Down
8 changes: 4 additions & 4 deletions ktorm-core/src/main/kotlin/org/ktorm/dsl/QueryRowSet.kt
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
* limitations under the License.
*/

package me.liuwj.ktorm.dsl
package org.ktorm.dsl

import me.liuwj.ktorm.database.CachedRowSet
import me.liuwj.ktorm.expression.ColumnDeclaringExpression
import me.liuwj.ktorm.schema.Column
import org.ktorm.database.CachedRowSet
import org.ktorm.expression.ColumnDeclaringExpression
import org.ktorm.schema.Column
import java.sql.ResultSet

/**
Expand Down
16 changes: 8 additions & 8 deletions ktorm-core/src/main/kotlin/org/ktorm/dsl/QuerySource.kt
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
* limitations under the License.
*/

package me.liuwj.ktorm.dsl

import me.liuwj.ktorm.database.Database
import me.liuwj.ktorm.expression.*
import me.liuwj.ktorm.schema.BaseTable
import me.liuwj.ktorm.schema.BooleanSqlType
import me.liuwj.ktorm.schema.ColumnDeclaring
import me.liuwj.ktorm.schema.ReferenceBinding
package org.ktorm.dsl

import org.ktorm.database.Database
import org.ktorm.expression.*
import org.ktorm.schema.BaseTable
import org.ktorm.schema.BooleanSqlType
import org.ktorm.schema.ColumnDeclaring
import org.ktorm.schema.ReferenceBinding

/**
* Represents a query source, used in the `from` clause of a query.
Expand Down
8 changes: 4 additions & 4 deletions ktorm-core/src/main/kotlin/org/ktorm/entity/Entity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
* limitations under the License.
*/

package me.liuwj.ktorm.entity
package org.ktorm.entity

import me.liuwj.ktorm.database.Database
import me.liuwj.ktorm.schema.TypeReference
import me.liuwj.ktorm.schema.Table
import org.ktorm.database.Database
import org.ktorm.schema.TypeReference
import org.ktorm.schema.Table
import java.io.ObjectInputStream
import java.io.ObjectOutputStream
import java.io.Serializable
Expand Down
10 changes: 5 additions & 5 deletions ktorm-core/src/main/kotlin/org/ktorm/entity/EntityDml.kt
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
* limitations under the License.
*/

package me.liuwj.ktorm.entity
package org.ktorm.entity

import me.liuwj.ktorm.dsl.*
import me.liuwj.ktorm.dsl.AliasRemover
import me.liuwj.ktorm.expression.*
import me.liuwj.ktorm.schema.*
import org.ktorm.dsl.*
import org.ktorm.dsl.AliasRemover
import org.ktorm.expression.*
import org.ktorm.schema.*

/**
* Insert the given entity into this sequence and return the affected record number. Only non-null properties
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
* limitations under the License.
*/

package me.liuwj.ktorm.entity
package org.ktorm.entity

import me.liuwj.ktorm.schema.*
import org.ktorm.schema.*
import java.util.*
import kotlin.reflect.jvm.jvmErasure

Expand Down
8 changes: 4 additions & 4 deletions ktorm-core/src/main/kotlin/org/ktorm/entity/EntityGrouping.kt
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
* limitations under the License.
*/

package me.liuwj.ktorm.entity
package org.ktorm.entity

import me.liuwj.ktorm.dsl.*
import me.liuwj.ktorm.schema.BaseTable
import me.liuwj.ktorm.schema.ColumnDeclaring
import org.ktorm.dsl.*
import org.ktorm.schema.BaseTable
import org.ktorm.schema.ColumnDeclaring
import java.util.*
import kotlin.collections.ArrayList
import kotlin.collections.LinkedHashMap
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
* limitations under the License.
*/

package me.liuwj.ktorm.entity
package org.ktorm.entity

import me.liuwj.ktorm.database.Database
import me.liuwj.ktorm.schema.Table
import me.liuwj.ktorm.schema.defaultValue
import me.liuwj.ktorm.schema.kotlinProperty
import org.ktorm.database.Database
import org.ktorm.schema.Table
import org.ktorm.schema.defaultValue
import org.ktorm.schema.kotlinProperty
import java.io.*
import java.lang.reflect.InvocationHandler
import java.lang.reflect.InvocationTargetException
Expand Down
22 changes: 11 additions & 11 deletions ktorm-core/src/main/kotlin/org/ktorm/entity/EntitySequence.kt
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@
* limitations under the License.
*/

package me.liuwj.ktorm.entity

import me.liuwj.ktorm.database.Database
import me.liuwj.ktorm.database.DialectFeatureNotSupportedException
import me.liuwj.ktorm.dsl.*
import me.liuwj.ktorm.expression.OrderByExpression
import me.liuwj.ktorm.expression.SelectExpression
import me.liuwj.ktorm.schema.BaseTable
import me.liuwj.ktorm.schema.Column
import me.liuwj.ktorm.schema.ColumnDeclaring
package org.ktorm.entity

import org.ktorm.database.Database
import org.ktorm.database.DialectFeatureNotSupportedException
import org.ktorm.dsl.*
import org.ktorm.expression.OrderByExpression
import org.ktorm.expression.SelectExpression
import org.ktorm.schema.BaseTable
import org.ktorm.schema.Column
import org.ktorm.schema.ColumnDeclaring
import java.sql.ResultSet
import java.util.*
import kotlin.NoSuchElementException
Expand Down Expand Up @@ -705,7 +705,7 @@ public inline fun <E : Any, T : BaseTable<E>, C : Any> EntitySequence<E, T>.aggr
* The operation is terminal.
*/
public fun <E : Any, T : BaseTable<E>> EntitySequence<E, T>.count(): Int {
val count = aggregateColumns { me.liuwj.ktorm.dsl.count() }
val count = aggregateColumns { org.ktorm.dsl.count() }
return count ?: error("Count expression returns null, which should never happens.")
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package me.liuwj.ktorm.expression
package org.ktorm.expression

/**
* Base class designed to visit or modify SQL expression trees using visitor pattern.
Expand Down
Loading

0 comments on commit be83952

Please sign in to comment.