-
Notifications
You must be signed in to change notification settings - Fork 592
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 #1244 from scottsut/master
feat: 1.0.0-beta.3 release
- Loading branch information
Showing
709 changed files
with
30,569 additions
and
11,248 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,4 +1,7 @@ | ||
|
||
# IDE | ||
.idea | ||
.DS_Store | ||
|
||
/static | ||
|
||
|
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
9 changes: 0 additions & 9 deletions
9
core/src/main/java/datart/core/base/consts/SharePermission.java
This file was deleted.
Oops, something went wrong.
10 changes: 10 additions & 0 deletions
10
core/src/main/java/datart/core/base/consts/ShareRowPermissionBy.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,10 @@ | ||
package datart.core.base.consts; | ||
|
||
public enum ShareRowPermissionBy { | ||
|
||
// use share creator's permission | ||
CREATOR, | ||
// use visitor's permission | ||
VISITOR | ||
|
||
} |
9 changes: 9 additions & 0 deletions
9
core/src/main/java/datart/core/base/consts/TenantManagementMode.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,9 @@ | ||
package datart.core.base.consts; | ||
|
||
public enum TenantManagementMode { | ||
/** 团队模式 */ | ||
TEAM, | ||
/** 平台模式 */ | ||
PLATFORM; | ||
|
||
} |
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
66 changes: 66 additions & 0 deletions
66
core/src/main/java/datart/core/common/ClassTransformer.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,66 @@ | ||
/* | ||
* 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 org.apache.ibatis.javassist.ClassPool; | ||
import org.apache.ibatis.javassist.CtClass; | ||
import org.apache.ibatis.javassist.CtMethod; | ||
|
||
public class ClassTransformer { | ||
|
||
public static void transform() { | ||
transformSqlWriter(); | ||
transformFlyway(); | ||
} | ||
|
||
private static void transformSqlWriter() { | ||
try { | ||
ClassPool classPool = ClassPool.getDefault(); | ||
CtClass ctClass = classPool.get("org.apache.calcite.sql.pretty.SqlPrettyWriter"); | ||
CtMethod keyword = ctClass.getDeclaredMethod("keyword"); | ||
keyword.setBody("{ maybeWhitespace($1);" + | ||
" buf.append($1);" + | ||
" if (!$1.equals(\"\")) {" + | ||
" setNeedWhitespace(needWhitespaceAfter($1));" + | ||
" } " + | ||
"return;} "); | ||
ctClass.toClass(); | ||
} catch (Exception e) { | ||
e.printStackTrace(); | ||
} | ||
} | ||
|
||
private static void transformFlyway() { | ||
try { | ||
ClassPool classPool = ClassPool.getDefault(); | ||
CtClass ctClass = classPool.get("org.flywaydb.core.internal.database.mysql.MySQLConnection"); | ||
CtMethod getIntVariableValue = ctClass.getDeclaredMethod("getIntVariableValue"); | ||
getIntVariableValue.setBody("return 0;"); | ||
|
||
CtMethod doRestoreOriginalState = ctClass.getDeclaredMethod("doRestoreOriginalState"); | ||
doRestoreOriginalState.setBody("return;"); | ||
|
||
CtMethod hasUserVariableResetCapability = ctClass.getDeclaredMethod("hasUserVariableResetCapability"); | ||
hasUserVariableResetCapability.setBody("{return false;}"); | ||
ctClass.toClass(); | ||
} catch (Exception e) { | ||
e.printStackTrace(); | ||
} | ||
} | ||
} |
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.