Skip to content

Commit

Permalink
alpha release
Browse files Browse the repository at this point in the history
  • Loading branch information
pvranik committed Sep 26, 2022
1 parent 62e5f38 commit 441292a
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 2 deletions.
38 changes: 38 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
plugins {
id 'java-library'
id 'io.freefair.lombok' version '6.5.1'
id 'maven-publish'
}
dependencies {
api 'org.slf4j:slf4j-api:2.0.1'
Expand All @@ -12,9 +13,46 @@ dependencies {
testImplementation 'org.mockito:mockito-core:4.8.0'
}

repositories {
jcenter()
}
java {
withJavadocJar()
withSourcesJar()
}

jar {
from {
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
}
duplicatesStrategy DuplicatesStrategy.EXCLUDE
}

project.publishing {
publications {
maven(MavenPublication) {
from(project.components.java)
}
project.publishing.publications.withType(MavenPublication) {
pom {
organization {
name = 'SuTeren'
url = 'https://github.com/konikvranik'
}
ciManagement {
system = 'GitHub'
url = 'https://github.com/konikvranik/jdbc-influxdb/actions'
}
issueManagement {
system = 'GitHub'
url = 'https://github.com/konikvranik/jdbc-influxdb/issues'
}
scm {
connection = 'scm:git:https://github.com/konikvranik/jdbc-influxdb.git'
developerConnection = 'scm:git:ssh:[email protected]:konikvranik/jdbc-influxdb.git'
url = 'https://github.com/konikvranik/jdbc-influxdb/'
}
}
}
}
}
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
version=0.1.0-alpha
group=net.suteren.jdbc.influxdb
1 change: 1 addition & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rootProject.name = 'influxdb-jdbc'
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public InfluxDbStatement(InfluxDbConnection influxDbConnection, InfluxDB client)
try {
return resultSet = new InfluxDbResultSet(this, executeCommand(sql).getResults());
} catch (Exception e) {
throw new SQLException(e);
throw new SQLException(String.format("Execution of query '%s' failed: %s", sql, e.getMessage()), e);
}
}

Expand All @@ -36,8 +36,10 @@ private QueryResult executeCommand(String sql) {
@Override public int executeUpdate(String sql) throws SQLException {
try (InfluxDbResultSet r = executeQuery(sql)) {
return r.getCurrentRows().size();
} catch (SQLException e) {
throw e;
} catch (Exception e) {
throw new SQLException(String.format("Execution of query '%s' failed", sql), e);
throw new SQLException(String.format("Execution of query '%s' failed: %s", sql, e.getMessage()), e);
}
}

Expand Down

0 comments on commit 441292a

Please sign in to comment.