Skip to content

Commit 807dfa6

Browse files
committed
feat: add prefix option to 'toTableQuery' method
1 parent a8c4153 commit 807dfa6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • src/main/kotlin/co/statu/rule/database

src/main/kotlin/co/statu/rule/database/Dao.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ abstract class Dao<T : DBEntity>(private val entityClass: KClass<T>) {
3232
.map { it.name!! }
3333
}
3434

35-
fun List<String>.toTableQuery() = this.joinToString(", ") { "`$it`" }
35+
fun List<String>.toTableQuery(prefix: String = "") = this.joinToString(", ") { "$prefix`$it`" }
3636

3737
abstract suspend fun init(jdbcPool: JDBCPool, plugin: ParsekPlugin)
3838

0 commit comments

Comments
 (0)