https://kotlinlang.org logo
#exposed
Title
# exposed
m

mathiasbn

07/14/2016, 9:14 AM
I have created:``` class BuiltInFunction<T>(val name: String, override val columnType: ColumnType, vararg val args: Expression<*>) : Function<T>() { init { validate(name) } override fun toSQL(queryBuilder: QueryBuilder): String { val mergedArgs = args.map { it.toSQL(queryBuilder) }.joinToString(",") return "$name($mergedArgs)" } } internal fun validate(functionName: String) { if (functionName.contains("[^a-zA-Z_0-9]".toRegex())) throw IllegalArgumentException("Illegal built in function name: $functionName") } ```