forked from dataease/dataease
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
1,047 additions
and
8 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
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
44 changes: 44 additions & 0 deletions
44
backend/src/main/java/io/dataease/provider/mongodb/MongoConstants.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,44 @@ | ||
package io.dataease.provider.mongodb; | ||
|
||
import io.dataease.provider.SQLConstants; | ||
|
||
import static io.dataease.datasource.constants.DatasourceTypes.mongo; | ||
import static io.dataease.datasource.constants.DatasourceTypes.oracle; | ||
|
||
/** | ||
* @Author gin | ||
* @Date 2021/7/8 7:22 下午 | ||
*/ | ||
public class MongoConstants extends SQLConstants { | ||
public static final String KEYWORD_TABLE = "%s"; | ||
|
||
public static final String KEYWORD_FIX = "%s." + mongo.getKeywordPrefix() + "%s" + mongo.getKeywordSuffix(); | ||
|
||
public static final String ALIAS_FIX = mongo.getAliasPrefix() + "%s" + oracle.getAliasSuffix(); | ||
|
||
public static final String toInt32 = "toInt32(%s)"; | ||
|
||
public static final String toDateTime = "toDateTime(%s)"; | ||
|
||
public static final String toInt64 = "toInt64(%s)"; | ||
|
||
public static final String toFloat64 = "toFloat64(%s)"; | ||
|
||
public static final String formatDateTime = "formatDateTime(%s,'%s')"; | ||
|
||
public static final String toDecimal = "toDecimal64(%s,2)"; | ||
|
||
public static final String DEFAULT_DATE_FORMAT = "%Y-%m-%d %H:%M:%S"; | ||
|
||
public static final String WHERE_VALUE_NULL = "(NULL,'')"; | ||
|
||
public static final String WHERE_VALUE_VALUE = "'%s'"; | ||
|
||
public static final String AGG_COUNT = "COUNT(*)"; | ||
|
||
public static final String AGG_FIELD = "%s(%s)"; | ||
|
||
public static final String WHERE_BETWEEN = "'%s' AND '%s'"; | ||
|
||
public static final String BRACKETS = "(%s)"; | ||
} |
Oops, something went wrong.