Lint
This commit is contained in:
12
.idea/runConfigurations/Publish_To_MavenLocal.xml
generated
12
.idea/runConfigurations/Publish_To_MavenLocal.xml
generated
@@ -1,5 +1,5 @@
|
|||||||
<component name="ProjectRunConfigurationManager">
|
<component name="ProjectRunConfigurationManager">
|
||||||
<configuration default="false" name="Publish To MavenLocal" type="GradleRunConfiguration" factoryName="Gradle" singleton="false">
|
<configuration default="false" name="Publish To MavenLocal" type="GradleRunConfiguration" factoryName="Gradle" singleton="true">
|
||||||
<ExternalSystemSettings>
|
<ExternalSystemSettings>
|
||||||
<option name="executionName" />
|
<option name="executionName" />
|
||||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||||
@@ -15,6 +15,16 @@
|
|||||||
</option>
|
</option>
|
||||||
<option name="vmOptions" value="" />
|
<option name="vmOptions" value="" />
|
||||||
</ExternalSystemSettings>
|
</ExternalSystemSettings>
|
||||||
|
<extension name="net.ashald.envfile">
|
||||||
|
<option name="IS_ENABLED" value="false" />
|
||||||
|
<option name="IS_SUBST" value="false" />
|
||||||
|
<option name="IS_PATH_MACRO_SUPPORTED" value="false" />
|
||||||
|
<option name="IS_IGNORE_MISSING_FILES" value="false" />
|
||||||
|
<option name="IS_ENABLE_EXPERIMENTAL_INTEGRATIONS" value="false" />
|
||||||
|
<ENTRIES>
|
||||||
|
<ENTRY IS_ENABLED="true" PARSER="runconfig" />
|
||||||
|
</ENTRIES>
|
||||||
|
</extension>
|
||||||
<GradleScriptDebugEnabled>true</GradleScriptDebugEnabled>
|
<GradleScriptDebugEnabled>true</GradleScriptDebugEnabled>
|
||||||
<method v="2" />
|
<method v="2" />
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<component name="ProjectRunConfigurationManager">
|
<component name="ProjectRunConfigurationManager">
|
||||||
<configuration default="false" name="Test and Publish To MavenLocal" type="GradleRunConfiguration" factoryName="Gradle" singleton="false">
|
<configuration default="false" name="Test and Publish To MavenLocal" type="GradleRunConfiguration" factoryName="Gradle" singleton="true">
|
||||||
<ExternalSystemSettings>
|
<ExternalSystemSettings>
|
||||||
<option name="executionName" />
|
<option name="executionName" />
|
||||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||||
@@ -15,8 +15,19 @@
|
|||||||
</option>
|
</option>
|
||||||
<option name="vmOptions" value="" />
|
<option name="vmOptions" value="" />
|
||||||
</ExternalSystemSettings>
|
</ExternalSystemSettings>
|
||||||
|
<extension name="net.ashald.envfile">
|
||||||
|
<option name="IS_ENABLED" value="false" />
|
||||||
|
<option name="IS_SUBST" value="false" />
|
||||||
|
<option name="IS_PATH_MACRO_SUPPORTED" value="false" />
|
||||||
|
<option name="IS_IGNORE_MISSING_FILES" value="false" />
|
||||||
|
<option name="IS_ENABLE_EXPERIMENTAL_INTEGRATIONS" value="false" />
|
||||||
|
<ENTRIES>
|
||||||
|
<ENTRY IS_ENABLED="true" PARSER="runconfig" />
|
||||||
|
</ENTRIES>
|
||||||
|
</extension>
|
||||||
<GradleScriptDebugEnabled>true</GradleScriptDebugEnabled>
|
<GradleScriptDebugEnabled>true</GradleScriptDebugEnabled>
|
||||||
<method v="2">
|
<method v="2">
|
||||||
|
<option name="RunConfigurationTask" enabled="true" run_configuration_name="ktlint" run_configuration_type="GradleRunConfiguration" />
|
||||||
<option name="RunConfigurationTask" enabled="true" run_configuration_name="tests" run_configuration_type="JUnit" />
|
<option name="RunConfigurationTask" enabled="true" run_configuration_name="tests" run_configuration_type="JUnit" />
|
||||||
</method>
|
</method>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|||||||
@@ -1,13 +1,16 @@
|
|||||||
plugins {
|
|
||||||
id("maven-publish")
|
|
||||||
id("org.jetbrains.kotlin.jvm") version "1.3.31"
|
|
||||||
}
|
|
||||||
|
|
||||||
apply(plugin = "kotlin")
|
|
||||||
|
|
||||||
group = "fr.postgresjson"
|
group = "fr.postgresjson"
|
||||||
version = "0.1"
|
version = "0.1"
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
jacoco
|
||||||
|
|
||||||
|
id("maven-publish")
|
||||||
|
id("org.jetbrains.kotlin.jvm") version "1.3.50"
|
||||||
|
|
||||||
|
id("org.jlleitschuh.gradle.ktlint") version "8.2.0"
|
||||||
|
id("org.owasp.dependencycheck") version "5.1.0"
|
||||||
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
jcenter()
|
jcenter()
|
||||||
|
|||||||
3
gradle/wrapper/gradle-wrapper.properties
vendored
3
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,6 +1,5 @@
|
|||||||
#Wed May 29 17:08:27 CEST 2019
|
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
|
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-bin.zip
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-all.zip
|
|
||||||
|
|||||||
@@ -256,6 +256,5 @@ class Connection(
|
|||||||
logger?.info("Query Error: $sqlForLog, $values", e)
|
logger?.info("Query Error: $sqlForLog, $values", e)
|
||||||
throw e
|
throw e
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import com.fasterxml.jackson.core.type.TypeReference
|
|||||||
import com.github.jasync.sql.db.QueryResult
|
import com.github.jasync.sql.db.QueryResult
|
||||||
import fr.postgresjson.entity.EntityI
|
import fr.postgresjson.entity.EntityI
|
||||||
|
|
||||||
|
|
||||||
class Query(override val name: String, private val sql: String, override val connection: Connection) : EmbedExecutable {
|
class Query(override val name: String, private val sql: String, override val connection: Connection) : EmbedExecutable {
|
||||||
override fun toString(): String {
|
override fun toString(): String {
|
||||||
return sql
|
return sql
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ package fr.postgresjson.definition
|
|||||||
|
|
||||||
import java.io.File
|
import java.io.File
|
||||||
|
|
||||||
|
|
||||||
open class Function(
|
open class Function(
|
||||||
override val script: String
|
override val script: String
|
||||||
) : Resource, ParametersInterface {
|
) : Resource, ParametersInterface {
|
||||||
@@ -56,7 +55,6 @@ open class Function(
|
|||||||
.joinToString(", ") { "${it.name} ${it.type}" }.let {
|
.joinToString(", ") { "${it.name} ${it.type}" }.let {
|
||||||
"$name ($it)"
|
"$name ($it)"
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getParametersIndexedByName(): Map<String, Parameter> {
|
fun getParametersIndexedByName(): Map<String, Parameter> {
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ class Serializer(val mapper: ObjectMapper = jacksonObjectMapper()) {
|
|||||||
|
|
||||||
mapper.registerModule(JodaModule())
|
mapper.registerModule(JodaModule())
|
||||||
mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS)
|
mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS)
|
||||||
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
|
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun serialize(source: EntityI, pretty: Boolean = false): String {
|
fun serialize(source: EntityI, pretty: Boolean = false): String {
|
||||||
|
|||||||
@@ -123,7 +123,6 @@ class MigrationTest(): TestAbstract() {
|
|||||||
Assertions.assertEquals(objTest!!.id, 3)
|
Assertions.assertEquals(objTest!!.id, 3)
|
||||||
Assertions.assertEquals(objTest.name, "test")
|
Assertions.assertEquals(objTest.name, "test")
|
||||||
|
|
||||||
|
|
||||||
val resources2 = File(this::class.java.getResource("/sql/function/Test2").toURI())
|
val resources2 = File(this::class.java.getResource("/sql/function/Test2").toURI())
|
||||||
Migrations(resources2, connection).apply {
|
Migrations(resources2, connection).apply {
|
||||||
run().size `should be equal to` 1
|
run().size `should be equal to` 1
|
||||||
|
|||||||
Reference in New Issue
Block a user