Skip to content

Commit

Permalink
Reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
rainbowdashlabs committed Jan 25, 2024
1 parent f892745 commit 79b39e5
Show file tree
Hide file tree
Showing 12 changed files with 48 additions and 16 deletions.
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ subprojects {

indra {
javaVersions {
target(15)
testWith(15)
target(17)
testWith(17)
}

github("rainbowdashlabs", "sadu") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class TokenizedQuery {

public TokenizedQuery(String sql, Map<Integer, Integer> indexToken, Map<String, List<Integer>> namedToken) {
this.sql = sql;
this.tokenizedSql = PARAM_TOKEN.matcher(sql).replaceAll("?");
tokenizedSql = PARAM_TOKEN.matcher(sql).replaceAll("?");
this.indexToken = indexToken;
this.namedToken = namedToken;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ public BatchCall(Call call) {
this();
calls.add(call);
}

public BatchCall() {
this.calls = new ArrayList<>();
calls = new ArrayList<>();
}

public BatchCall(List<Call> calls) {
Expand All @@ -32,7 +33,7 @@ public BatchCall add(Call call) {
return this;
}

public BatchCall combine(BatchCall call){
public BatchCall combine(BatchCall call) {
calls.addAll(call.calls());
return this;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/*
* SPDX-License-Identifier: LGPL-3.0-or-later
*
* Copyright (C) RainbowDashLabs and Contributor
*/

package de.chojo.sadu.queries.calls;

import de.chojo.sadu.mapper.util.Results;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/*
* SPDX-License-Identifier: LGPL-3.0-or-later
*
* Copyright (C) RainbowDashLabs and Contributor
*/

package de.chojo.sadu.queries.stages;

import de.chojo.sadu.queries.TokenizedQuery;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
public class Query implements DataSourceProvider, ConnectionProvider, QueryProvider {

private final DataSource dataSource;
private Connection connection;
private final ResultStorage storage = new ResultStorage();
private Connection connection;

private Query(DataSource dataSource) {
this.dataSource = dataSource;
Expand Down Expand Up @@ -52,11 +52,11 @@ public Connection connection() throws SQLException {
}

@Override
public Query query(){
public Query query() {
return this;
}

public ResultStorage storage(){
public ResultStorage storage() {
return storage;
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/*
* SPDX-License-Identifier: LGPL-3.0-or-later
*
* Copyright (C) RainbowDashLabs and Contributor
*/

package de.chojo.sadu.queries.stages.base;

import de.chojo.sadu.base.DataSourceProvider;
Expand All @@ -11,12 +17,12 @@ public interface QueryProvider extends ConnectionProvider, DataSourceProvider {
Query query();

@Override
default DataSource source(){
default DataSource source() {
return query().source();
}

@Override
default Connection connection() throws SQLException{
default Connection connection() throws SQLException {
return query().connection();
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/*
* SPDX-License-Identifier: LGPL-3.0-or-later
*
* Copyright (C) RainbowDashLabs and Contributor
*/

package de.chojo.sadu.queries.stages.calls;

import de.chojo.sadu.queries.calls.Calls;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public ManipulationBatchQuery update() {
// TODO: logging
}
}
return new ManipulationBatchQuery(this,changed);
return new ManipulationBatchQuery(this, changed);
}

public ManipulationBatchQuery delete() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,11 @@
import de.chojo.sadu.queries.calls.SingletonCall;
import de.chojo.sadu.queries.stages.ParsedQuery;
import de.chojo.sadu.queries.stages.Query;
import de.chojo.sadu.queries.stages.base.ConnectionProvider;
import de.chojo.sadu.queries.stages.base.QueryProvider;
import de.chojo.sadu.queries.stages.mapped.ManipulationQuery;
import de.chojo.sadu.queries.stages.mapped.MappedQuery;
import de.chojo.sadu.wrapper.util.Row;

import javax.sql.DataSource;
import java.sql.Connection;
import java.sql.SQLException;

public class CalledSingletonQuery implements QueryProvider {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
package de.chojo.sadu.queries.stages.results;
/*
* SPDX-License-Identifier: LGPL-3.0-or-later
*
* Copyright (C) RainbowDashLabs and Contributor
*/

import de.chojo.sadu.queries.stages.base.QueryProvider;
package de.chojo.sadu.queries.stages.results;

public interface Result<T> {
T result();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/*
* SPDX-License-Identifier: LGPL-3.0-or-later
*
* Copyright (C) RainbowDashLabs and Contributor
*/

package de.chojo.sadu.queries.storage;

import de.chojo.sadu.queries.stages.results.Result;
Expand Down

0 comments on commit 79b39e5

Please sign in to comment.