All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.jn.sqlhelper.dialect.internal.BesMagicDataDialect Maven / Gradle / Ivy

package com.jn.sqlhelper.dialect.internal;

import com.jn.langx.annotation.Name;
import com.jn.sqlhelper.common.ddl.SQLSyntaxCompatTable;
import com.jn.sqlhelper.dialect.DialectNames;
import com.jn.sqlhelper.dialect.SqlCompatibilityType;
import com.jn.sqlhelper.dialect.annotation.Driver;
import com.jn.sqlhelper.dialect.annotation.SyntaxCompat;
import com.jn.sqlhelper.dialect.internal.limit.LimitOffsetLimitHandler;
import com.jn.sqlhelper.dialect.likeescaper.BackslashStyleEscaper;
import com.jn.sqlhelper.dialect.scriptfile.PostgreSQLScriptParser;

/**
 * 基于OpenGauss改造
 *
 *
 * 
 *     select 语法:
 *
 *     [ WITH [ RECURSIVE ] with_query [, ...] ]
 * SELECT [/*+ plan_hint *\/][ALL|DISTINCT[ON(expression[,...])]]
        *{*|{expression[[AS]output_name]}[,...]}
        *[FROM from_item[,...]]
        *[WHERE condition]
        *[GROUP BY grouping_element[,...]]
        *[HAVING condition[,...]]
        *[WINDOW{window_name AS(window_definition)}[,...]]
        *[{UNION|INTERSECT|EXCEPT|MINUS}[ALL|DISTINCT]select]
        *[ORDER BY{expression[[ASC|DESC|USING operator]|nlssort_expression_clause][NULLS{FIRST|LAST}]}[,...]]
        *[LIMIT{[offset,]count|ALL}]
        *[OFFSET start[ROW|ROWS]]
        *[FETCH{FIRST|NEXT}[count]{ROW|ROWS}ONLY]
        *[{FOR{UPDATE|SHARE}[OF table_name[,...]][NOWAIT]}[...]];
 * 
*/ @Name(DialectNames.MAGICDATA) @SyntaxCompat(SQLSyntaxCompatTable.POSTGRESQL) @Driver("com.bes.magicdata.Driver") public class BesMagicDataDialect extends AbstractDialect { public BesMagicDataDialect() { super(); setLimitHandler(new LimitOffsetLimitHandler()); setLikeEscaper(BackslashStyleEscaper.NON_DEFAULT_INSTANCE); setSqlCompatibilityTypes(SqlCompatibilityType.ORACLE, SqlCompatibilityType.MYSQL, SqlCompatibilityType.POSTGRESQL, SqlCompatibilityType.TERADATA); } @Override public IdentifierCase unquotedIdentifierCase() { return IdentifierCase.LOWER_CASE; } @Override public boolean isSupportsLimit() { return true; } @Override public boolean isSupportsLimitOffset() { return true; } @Override public boolean isBindLimitParametersInReverseOrder() { return true; } @Override public SqlCompatibilityType getDefaultSqlCompatibilityType() { return SqlCompatibilityType.POSTGRESQL; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy