-
Notifications
You must be signed in to change notification settings - Fork 4
Importsql v2 #41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Nefarious46
wants to merge
8
commits into
teragrep:main
Choose a base branch
from
Nefarious46:importsqlV2
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Importsql v2 #41
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
5466a1e
importSQL, SQL files and SQL Media files.
Nefarious46 4f2dc08
Changes required by checkstyle
Nefarious46 4668230
Importsql objects can now be faked for tests.
Nefarious46 82e1201
Minor renames and unit tests on Media and SQL objects.
Nefarious46 7ee80a2
Checkstyle fixes
Nefarious46 8c28179
Pull Request #41 fixes.
Nefarious46 e32714b
Prototype StatementMedia
Nefarious46 090853c
Removed Stringwriter altogether and other miscellanious changes reque…
Nefarious46 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,2 +1,3 @@ | ||
| /target/ | ||
| /.idea/ | ||
| import.sql |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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
59 changes: 59 additions & 0 deletions
59
src/main/java/com/teragrep/cfe_41/captureGroup/CaptureGroup.java
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| /* | ||
| * Integration Command-line tool for Teragrep | ||
| * Copyright (C) 2025 Suomen Kanuuna Oy | ||
| * | ||
| * This program is free software: you can redistribute it and/or modify | ||
| * it under the terms of the GNU Affero General Public License as published by | ||
| * the Free Software Foundation, either version 3 of the License, or | ||
| * (at your option) any later version. | ||
| * | ||
| * This program is distributed in the hope that it will be useful, | ||
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| * GNU Affero General Public License for more details. | ||
| * | ||
| * You should have received a copy of the GNU Affero General Public License | ||
| * along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>. | ||
| * | ||
| * | ||
| * Additional permission under GNU Affero General Public License version 3 | ||
| * section 7 | ||
| * | ||
| * If you modify this Program, or any covered work, by linking or combining it | ||
| * with other code, such other code is not for that reason alone subject to any | ||
| * of the requirements of the GNU Affero GPL version 3 as long as this Program | ||
| * is the same Program as licensed from Suomen Kanuuna Oy without any additional | ||
| * modifications. | ||
| * | ||
| * Supplemented terms under GNU Affero General Public License version 3 | ||
| * section 7 | ||
| * | ||
| * Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified | ||
| * versions must be marked as "Modified version of" The Program. | ||
| * | ||
| * Names of the licensors and authors may not be used for publicity purposes. | ||
| * | ||
| * No rights are granted for use of trade names, trademarks, or service marks | ||
| * which are in The Program if any. | ||
| * | ||
| * Licensee must indemnify licensors and authors for any liability that these | ||
| * contractual assumptions impose on licensors and authors. | ||
| * | ||
| * To the extent this program is licensed as part of the Commercial versions of | ||
| * Teragrep, the applicable Commercial License may apply to this file if you as | ||
| * a licensee so wish it. | ||
| */ | ||
| package com.teragrep.cfe_41.captureGroup; | ||
|
|
||
| import com.teragrep.cfe_41.Stored; | ||
|
|
||
| public interface CaptureGroup extends Stored { | ||
|
|
||
| public abstract String groupName(); | ||
|
|
||
| public abstract int captureDefinitionId(); | ||
|
|
||
| public abstract String captureGroupType(); | ||
|
|
||
| public abstract int id(); | ||
| } | ||
53 changes: 53 additions & 0 deletions
53
src/main/java/com/teragrep/cfe_41/captureGroup/CaptureGroupAllRequest.java
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| /* | ||
| * Integration Command-line tool for Teragrep | ||
| * Copyright (C) 2025 Suomen Kanuuna Oy | ||
| * | ||
| * This program is free software: you can redistribute it and/or modify | ||
| * it under the terms of the GNU Affero General Public License as published by | ||
| * the Free Software Foundation, either version 3 of the License, or | ||
| * (at your option) any later version. | ||
| * | ||
| * This program is distributed in the hope that it will be useful, | ||
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| * GNU Affero General Public License for more details. | ||
| * | ||
| * You should have received a copy of the GNU Affero General Public License | ||
| * along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>. | ||
| * | ||
| * | ||
| * Additional permission under GNU Affero General Public License version 3 | ||
| * section 7 | ||
| * | ||
| * If you modify this Program, or any covered work, by linking or combining it | ||
| * with other code, such other code is not for that reason alone subject to any | ||
| * of the requirements of the GNU Affero GPL version 3 as long as this Program | ||
| * is the same Program as licensed from Suomen Kanuuna Oy without any additional | ||
| * modifications. | ||
| * | ||
| * Supplemented terms under GNU Affero General Public License version 3 | ||
| * section 7 | ||
| * | ||
| * Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified | ||
| * versions must be marked as "Modified version of" The Program. | ||
| * | ||
| * Names of the licensors and authors may not be used for publicity purposes. | ||
| * | ||
| * No rights are granted for use of trade names, trademarks, or service marks | ||
| * which are in The Program if any. | ||
| * | ||
| * Licensee must indemnify licensors and authors for any liability that these | ||
| * contractual assumptions impose on licensors and authors. | ||
| * | ||
| * To the extent this program is licensed as part of the Commercial versions of | ||
| * Teragrep, the applicable Commercial License may apply to this file if you as | ||
| * a licensee so wish it. | ||
| */ | ||
| package com.teragrep.cfe_41.captureGroup; | ||
|
|
||
| import java.io.IOException; | ||
|
|
||
| public interface CaptureGroupAllRequest { | ||
|
|
||
| public abstract CaptureGroupResponse captureGroupResponse() throws IOException; | ||
| } |
83 changes: 83 additions & 0 deletions
83
src/main/java/com/teragrep/cfe_41/captureGroup/CaptureGroupAllRequestImpl.java
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,83 @@ | ||
| /* | ||
| * Integration Command-line tool for Teragrep | ||
| * Copyright (C) 2025 Suomen Kanuuna Oy | ||
| * | ||
| * This program is free software: you can redistribute it and/or modify | ||
| * it under the terms of the GNU Affero General Public License as published by | ||
| * the Free Software Foundation, either version 3 of the License, or | ||
| * (at your option) any later version. | ||
| * | ||
| * This program is distributed in the hope that it will be useful, | ||
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| * GNU Affero General Public License for more details. | ||
| * | ||
| * You should have received a copy of the GNU Affero General Public License | ||
| * along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>. | ||
| * | ||
| * | ||
| * Additional permission under GNU Affero General Public License version 3 | ||
| * section 7 | ||
| * | ||
| * If you modify this Program, or any covered work, by linking or combining it | ||
| * with other code, such other code is not for that reason alone subject to any | ||
| * of the requirements of the GNU Affero GPL version 3 as long as this Program | ||
| * is the same Program as licensed from Suomen Kanuuna Oy without any additional | ||
| * modifications. | ||
| * | ||
| * Supplemented terms under GNU Affero General Public License version 3 | ||
| * section 7 | ||
| * | ||
| * Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified | ||
| * versions must be marked as "Modified version of" The Program. | ||
| * | ||
| * Names of the licensors and authors may not be used for publicity purposes. | ||
| * | ||
| * No rights are granted for use of trade names, trademarks, or service marks | ||
| * which are in The Program if any. | ||
| * | ||
| * Licensee must indemnify licensors and authors for any liability that these | ||
| * contractual assumptions impose on licensors and authors. | ||
| * | ||
| * To the extent this program is licensed as part of the Commercial versions of | ||
| * Teragrep, the applicable Commercial License may apply to this file if you as | ||
| * a licensee so wish it. | ||
| */ | ||
| package com.teragrep.cfe_41.captureGroup; | ||
|
|
||
| import com.teragrep.cfe_41.ApiConfig; | ||
| import com.teragrep.cfe_41.RequestData; | ||
| import com.teragrep.cfe_41.Response; | ||
| import jakarta.json.JsonArray; | ||
|
|
||
| import java.io.IOException; | ||
| import java.util.Objects; | ||
|
|
||
| public class CaptureGroupAllRequestImpl implements CaptureGroupAllRequest { | ||
|
|
||
| private final ApiConfig apiConfig; | ||
|
|
||
| public CaptureGroupAllRequestImpl(final ApiConfig apiConfig) { | ||
| this.apiConfig = apiConfig; | ||
| } | ||
|
|
||
| @Override | ||
| public CaptureGroupResponse captureGroupResponse() throws IOException { | ||
| final JsonArray a = new Response(new RequestData("/capture/group", apiConfig).doRequest()).asJsonArray(); | ||
| return new CaptureGroupResponse(a); | ||
| } | ||
|
|
||
| @Override | ||
| public boolean equals(final Object o) { | ||
| if (o == null || getClass() != o.getClass()) { | ||
| return false; | ||
| } | ||
| final CaptureGroupAllRequestImpl that = (CaptureGroupAllRequestImpl) o; | ||
| return Objects.equals(apiConfig, that.apiConfig); | ||
| } | ||
|
|
||
| @Override | ||
| public int hashCode() { | ||
| return Objects.hashCode(apiConfig); | ||
| } | ||
| } |
This file contains hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -60,12 +60,12 @@ public CaptureGroupResponse(final JsonArray jsonArray) { | |
| this.jsonArray = jsonArray; | ||
| } | ||
|
|
||
| public List<PartialCaptureResponse> partialCaptureResponses() { | ||
| final List<PartialCaptureResponse> partialCaptureResponses = new ArrayList<>(); | ||
| public List<PartialCaptureGroupResponse> partialCaptureResponses() { | ||
| final List<PartialCaptureGroupResponse> partialCaptureGroupResponse = new ArrayList<>(); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. response -> responses |
||
| for (JsonValue key : jsonArray) { | ||
| partialCaptureResponses.add(new PartialCaptureResponse(key.asJsonObject())); | ||
| partialCaptureGroupResponse.add(new PartialCaptureGroupResponse(key.asJsonObject())); | ||
| } | ||
| return partialCaptureResponses; | ||
| return partialCaptureGroupResponse; | ||
| } | ||
|
|
||
| @Override | ||
|
|
||
This file contains hidden or 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 hidden or 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 |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| /* | ||
| * Integration Command-line tool for Teragrep | ||
| * Copyright (C) 2025 Suomen Kanuuna Oy | ||
| * | ||
| * This program is free software: you can redistribute it and/or modify | ||
| * it under the terms of the GNU Affero General Public License as published by | ||
| * the Free Software Foundation, either version 3 of the License, or | ||
| * (at your option) any later version. | ||
| * | ||
| * This program is distributed in the hope that it will be useful, | ||
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| * GNU Affero General Public License for more details. | ||
| * | ||
| * You should have received a copy of the GNU Affero General Public License | ||
| * along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>. | ||
| * | ||
| * | ||
| * Additional permission under GNU Affero General Public License version 3 | ||
| * section 7 | ||
| * | ||
| * If you modify this Program, or any covered work, by linking or combining it | ||
| * with other code, such other code is not for that reason alone subject to any | ||
| * of the requirements of the GNU Affero GPL version 3 as long as this Program | ||
| * is the same Program as licensed from Suomen Kanuuna Oy without any additional | ||
| * modifications. | ||
| * | ||
| * Supplemented terms under GNU Affero General Public License version 3 | ||
| * section 7 | ||
| * | ||
| * Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified | ||
| * versions must be marked as "Modified version of" The Program. | ||
| * | ||
| * Names of the licensors and authors may not be used for publicity purposes. | ||
| * | ||
| * No rights are granted for use of trade names, trademarks, or service marks | ||
| * which are in The Program if any. | ||
| * | ||
| * Licensee must indemnify licensors and authors for any liability that these | ||
| * contractual assumptions impose on licensors and authors. | ||
| * | ||
| * To the extent this program is licensed as part of the Commercial versions of | ||
| * Teragrep, the applicable Commercial License may apply to this file if you as | ||
| * a licensee so wish it. | ||
| */ | ||
| package com.teragrep.cfe_41.host; | ||
|
|
||
| public interface Host { | ||
|
|
||
| public abstract String md5(); | ||
|
|
||
| public abstract String fqHost(); | ||
| } |
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps the method names here could be simplified: