Lint
This commit is contained in:
@@ -9,8 +9,8 @@ import com.github.jasync.sql.db.postgresql.PostgreSQLConnectionBuilder
|
||||
import com.github.jasync.sql.db.util.length
|
||||
import fr.postgresjson.serializer.Serializer
|
||||
import fr.postgresjson.utils.LoggerDelegate
|
||||
import kotlin.jvm.Throws
|
||||
import org.slf4j.Logger
|
||||
import kotlin.jvm.Throws
|
||||
import kotlin.random.Random
|
||||
import kotlin.reflect.full.hasAnnotation
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package fr.postgresjson.connexion
|
||||
|
||||
class DataNotFoundException(val queryExecuted: String): Exception() {
|
||||
class DataNotFoundException(val queryExecuted: String) : Exception() {
|
||||
override val message: String
|
||||
get() = "No data return for the query"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
package fr.postgresjson.connexion
|
||||
|
||||
sealed interface Executable
|
||||
sealed interface Executable
|
||||
|
||||
@@ -31,14 +31,14 @@ class Function(
|
||||
.findAll(functionParameters)
|
||||
.mapIndexed { index, paramsMatch ->
|
||||
Parameter(
|
||||
paramsMatch.groups["pname"]?.value?.trim() ?: """arg${index+1}""",
|
||||
paramsMatch.groups["pname"]?.value?.trim() ?: """arg${index + 1}""",
|
||||
paramsMatch.groups["type"]?.value?.trim() ?: throw ArgumentNotFound(),
|
||||
paramsMatch.groups["direction"]?.value?.trim(),
|
||||
paramsMatch.groups["default"]?.value?.trim(),
|
||||
paramsMatch.groups["precision"]?.value?.trim()?.toInt(),
|
||||
paramsMatch.groups["scale"]?.value?.trim()?.toInt()
|
||||
)
|
||||
}.toList()
|
||||
}.toList()
|
||||
} else {
|
||||
listOf()
|
||||
}
|
||||
|
||||
@@ -7,13 +7,13 @@ import fr.postgresjson.definition.Parameter.Direction.INOUT
|
||||
import fr.postgresjson.definition.Parameter.Direction.OUT
|
||||
import fr.postgresjson.utils.searchSqlFiles
|
||||
import fr.postgresjson.utils.toCamelCase
|
||||
import java.io.File
|
||||
import java.net.URI
|
||||
import org.slf4j.Logger
|
||||
import org.slf4j.LoggerFactory
|
||||
import java.io.File
|
||||
import java.net.URI
|
||||
|
||||
class FunctionGenerator(private val functionsDirectories: List<URI>) {
|
||||
constructor(functionsDirectories: URI): this(listOf(functionsDirectories))
|
||||
constructor(functionsDirectories: URI) : this(listOf(functionsDirectories))
|
||||
|
||||
private val logger: Logger = LoggerFactory.getLogger("sqlFilesSearch")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user