-
Notifications
You must be signed in to change notification settings - Fork 602
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #779 from scottsut/master
feat: 1.0.0-beta.1 release
- Loading branch information
Showing
577 changed files
with
16,531 additions
and
11,003 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
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
25 changes: 25 additions & 0 deletions
25
core/src/main/java/datart/core/base/consts/PlatformSettings.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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* | ||
* Datart | ||
* <p> | ||
* Copyright 2021 | ||
* <p> | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* <p> | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* <p> | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package datart.core.base.consts; | ||
|
||
public enum PlatformSettings { | ||
|
||
// download record limit | ||
DOWNLOAD_RECORD_LIMIT | ||
|
||
} |
42 changes: 42 additions & 0 deletions
42
core/src/main/java/datart/core/base/exception/SqlParseError.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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/* | ||
* Datart | ||
* <p> | ||
* Copyright 2021 | ||
* <p> | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* <p> | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* <p> | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package datart.core.base.exception; | ||
|
||
import lombok.Data; | ||
import lombok.EqualsAndHashCode; | ||
|
||
@EqualsAndHashCode(callSuper = true) | ||
@Data | ||
public class SqlParseError extends BaseException { | ||
|
||
public SqlParseError(Throwable e) { | ||
super(e); | ||
} | ||
|
||
private String sql; | ||
|
||
private String dbType; | ||
|
||
public String toString() { | ||
return "SQL:" + sql + " \r\n" + | ||
"DB: " + dbType + " \r\n" + | ||
"EXCEPTION:" + getMessage(); | ||
} | ||
|
||
} |
4 changes: 4 additions & 0 deletions
4
core/src/main/java/datart/core/base/processor/ExtendProcessor.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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package datart.core.base.processor; | ||
|
||
public interface ExtendProcessor { | ||
} |
27 changes: 27 additions & 0 deletions
27
core/src/main/java/datart/core/base/processor/ProcessorResponse.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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package datart.core.base.processor; | ||
|
||
import lombok.Builder; | ||
import lombok.Data; | ||
|
||
@Builder | ||
@Data | ||
public class ProcessorResponse { | ||
|
||
private boolean success; | ||
private int errCode; | ||
private String message; | ||
|
||
public static ProcessorResponse success() { | ||
return ProcessorResponse.builder() | ||
.success(true) | ||
.build(); | ||
} | ||
|
||
public static ProcessorResponse failure(int errCode,String message) { | ||
return ProcessorResponse.builder() | ||
.success(false) | ||
.errCode(errCode) | ||
.message(message) | ||
.build(); | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/* | ||
* Datart | ||
* <p> | ||
* Copyright 2021 | ||
* <p> | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* <p> | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* <p> | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package datart.core.common; | ||
|
||
import java.util.Map; | ||
import java.util.concurrent.ConcurrentHashMap; | ||
|
||
public class RequestContext { | ||
|
||
private static final InheritableThreadLocal<Map<String, Exception>> exceptions = new InheritableThreadLocal<>(); | ||
|
||
public static void putWarning(String name, Exception exception) { | ||
Map<String, Exception> exceptionMap = exceptions.get(); | ||
if (exceptionMap == null) { | ||
exceptionMap = new ConcurrentHashMap<>(); | ||
exceptions.set(exceptionMap); | ||
} | ||
exceptionMap.put(name, exception); | ||
} | ||
|
||
public static Map<String, Exception> getWarnings() { | ||
return exceptions.get(); | ||
} | ||
|
||
public static void clean() { | ||
exceptions.remove(); | ||
} | ||
|
||
} |
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
12 changes: 12 additions & 0 deletions
12
core/src/main/java/datart/core/data/provider/processor/DataProviderPostProcessor.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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package datart.core.data.provider.processor; | ||
|
||
import datart.core.base.processor.ExtendProcessor; | ||
import datart.core.base.processor.ProcessorResponse; | ||
import datart.core.data.provider.DataProviderSource; | ||
import datart.core.data.provider.Dataframe; | ||
import datart.core.data.provider.ExecuteParam; | ||
import datart.core.data.provider.QueryScript; | ||
|
||
public interface DataProviderPostProcessor extends ExtendProcessor { | ||
ProcessorResponse postRun(Dataframe frame, DataProviderSource config, QueryScript script, ExecuteParam executeParam); | ||
} |
11 changes: 11 additions & 0 deletions
11
core/src/main/java/datart/core/data/provider/processor/DataProviderPreProcessor.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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package datart.core.data.provider.processor; | ||
|
||
import datart.core.base.processor.ExtendProcessor; | ||
import datart.core.base.processor.ProcessorResponse; | ||
import datart.core.data.provider.DataProviderSource; | ||
import datart.core.data.provider.ExecuteParam; | ||
import datart.core.data.provider.QueryScript; | ||
|
||
public interface DataProviderPreProcessor extends ExtendProcessor { | ||
ProcessorResponse preRun(DataProviderSource config, QueryScript script, ExecuteParam executeParam); | ||
} |
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
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
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
Oops, something went wrong.