-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Suppression de la configuration de Thread Virtuel, c'est vraiment une…
… mauvaise idée de l'utiliser JavaDoc pour la db
- Loading branch information
Showing
20 changed files
with
264 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,27 @@ | ||
plugins { | ||
id("java") | ||
id("maven-publish") | ||
} | ||
group = "fr.euphyllia.skyllia"; | ||
version = "1.3"; | ||
version = "2.0"; | ||
|
||
java { | ||
sourceCompatibility = JavaVersion.VERSION_21 | ||
targetCompatibility = JavaVersion.VERSION_21 | ||
withJavadocJar() | ||
withSourcesJar() | ||
} | ||
|
||
tasks { | ||
compileJava { | ||
options.encoding = "UTF-8" | ||
} | ||
} | ||
|
||
publishing { | ||
publications { | ||
create<MavenPublication>("gpr") { | ||
from(components["java"]) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 16 additions & 1 deletion
17
database/src/main/java/fr/euphyllia/skyllia/sgbd/model/DBCallback.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,20 @@ | ||
package fr.euphyllia.skyllia.sgbd.model; | ||
|
||
import java.sql.ResultSet; | ||
|
||
/** | ||
* The {@code DBCallback} interface defines a single method to process | ||
* the {@link ResultSet} returned by a SQL query. | ||
* <p> | ||
* Implementations of this interface allow for custom handling of | ||
* the results obtained from executing a SQL query. | ||
*/ | ||
public interface DBCallback { | ||
void run(java.sql.ResultSet resultSet); | ||
|
||
/** | ||
* Processes the provided {@link ResultSet}. | ||
* | ||
* @param resultSet the {@link ResultSet} obtained from a SQL query | ||
*/ | ||
void run(ResultSet resultSet); | ||
} |
12 changes: 12 additions & 0 deletions
12
database/src/main/java/fr/euphyllia/skyllia/sgbd/model/DBCallbackInt.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,17 @@ | ||
package fr.euphyllia.skyllia.sgbd.model; | ||
|
||
/** | ||
* The {@code DBCallbackInt} interface defines a single method | ||
* to process an integer result, typically the number of affected rows | ||
* from a DML operation (INSERT, UPDATE, DELETE). | ||
*/ | ||
public interface DBCallbackInt { | ||
|
||
/** | ||
* Processes the provided integer result. | ||
* | ||
* @param var1 the integer result to be processed, often the number of rows affected | ||
* by an INSERT, UPDATE, or DELETE operation | ||
*/ | ||
void run(int var1); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 18 additions & 3 deletions
21
database/src/main/java/fr/euphyllia/skyllia/sgbd/model/DBInterface.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,23 @@ | ||
package fr.euphyllia.skyllia.sgbd.model; | ||
|
||
import fr.euphyllia.skyllia.sgbd.exceptions.DatabaseException; | ||
import org.jetbrains.annotations.Nullable; | ||
|
||
import java.sql.Connection; | ||
|
||
/** | ||
* The {@code DBInterface} interface defines a method for retrieving | ||
* a {@link Connection} to the database. Implementations should handle | ||
* connection details, such as pooling or direct connections. | ||
*/ | ||
public interface DBInterface { | ||
@org.jetbrains.annotations.Nullable | ||
java.sql.Connection getConnection() throws DatabaseException; | ||
} | ||
|
||
/** | ||
* Retrieves a valid {@link Connection} to the database. | ||
* | ||
* @return a {@link Connection}, or {@code null} if no connection could be established | ||
* @throws DatabaseException if an error occurs while obtaining the connection | ||
*/ | ||
@Nullable | ||
Connection getConnection() throws DatabaseException; | ||
} |
Oops, something went wrong.