jvmMain.io.github.jan.supabase.postgrest.getColumnName.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of postgrest-kt-jvm Show documentation
Show all versions of postgrest-kt-jvm Show documentation
Extends supabase-kt with a Postgrest Client
The newest version!
package io.github.jan.supabase.postgrest
import io.github.jan.supabase.annotations.SupabaseInternal
import kotlinx.serialization.SerialName
import kotlin.reflect.KProperty1
import kotlin.reflect.full.findAnnotation
@SupabaseInternal
actual fun getSerialName(property: KProperty1): String {
val serialName = property.findAnnotation()
return serialName?.value ?: property.name
}