Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentlauvlwj committed Jul 3, 2023
1 parent 214aed8 commit 88fb1f2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
* limitations under the License.
*/

@file:OptIn(KspExperimental::class)

package org.ktorm.ksp.compiler.util

import com.google.devtools.ksp.KspExperimental
Expand Down Expand Up @@ -43,7 +45,6 @@ internal val KSAnnotation._annotationType: KSType get() = annotationType.resolve
/**
* Check if this type is an inline class.
*/
@OptIn(KspExperimental::class)
internal fun KSType.isInline(): Boolean {
val declaration = declaration as KSClassDeclaration
return declaration.isAnnotationPresent(JvmInline::class) && declaration.modifiers.contains(Modifier.VALUE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
* limitations under the License.
*/

@file:OptIn(KotlinPoetKspPreview::class)

package org.ktorm.ksp.compiler.util

import com.google.devtools.ksp.getClassDeclarationByName
Expand Down Expand Up @@ -63,7 +65,6 @@ internal fun KSPropertyDeclaration.getSqlType(resolver: Resolver): KSType? {
return sqlType?.qualifiedName?.let { resolver.getClassDeclarationByName(it)?.asType(emptyList()) }
}

@OptIn(KotlinPoetKspPreview::class)
internal fun ColumnMetadata.getRegisteringCodeBlock(): CodeBlock {
val sqlTypeName = sqlType.declaration.qualifiedName?.asString()
val registerFun = when (sqlTypeName) {
Expand Down Expand Up @@ -112,7 +113,6 @@ internal fun ColumnMetadata.getRegisteringCodeBlock(): CodeBlock {
}
}

@OptIn(KotlinPoetKspPreview::class)
internal fun ColumnMetadata.getKotlinType(): TypeName {
if (isReference) {
return referenceTable!!.columns.single { it.isPrimaryKey }.getKotlinType()
Expand Down

0 comments on commit 88fb1f2

Please sign in to comment.