io.army.criteria.impl.Postgres Maven / Gradle / Ivy
package io.army.criteria.impl;
import io.army.criteria.*;
import io.army.criteria.dialect.ReturningDelete;
import io.army.criteria.dialect.ReturningUpdate;
import io.army.criteria.postgre.*;
import io.army.mapping.*;
import java.util.function.BiFunction;
import java.util.function.Consumer;
/**
*
* This class is Postgre SQL syntax utils.
*
* @since 1.0
*/
public abstract class Postgres extends PostgreSyntax {
/**
* private constructor
*/
private Postgres() {
}
public static final Modifier ALL = PostgreWords.SelectModifier.ALL;
public static final WordDistinct DISTINCT = PostgreWords.KeyWordDistinct.DISTINCT;
public static final WordMaterialized MATERIALIZED = PostgreWords.KeyWordMaterialized.MATERIALIZED;
public static final WordMaterialized NOT_MATERIALIZED = PostgreWords.KeyWordMaterialized.NOT_MATERIALIZED;
public static final SQLs.BooleanTestWord FROM_NORMALIZED = PostgreWords.FromNormalizedWord.FROM_NORMALIZED;
public static final SQLs.BooleanTestWord NORMALIZED = PostgreWords.FromNormalizedWord.NORMALIZED;
public static final WordName NAME = PostgreWords.KeyWordName.NAME;
public static final WordVersion VERSION = PostgreWords.KeyWordVersion.VERSION;
public static final WordStandalone STANDALONE = PostgreWords.KeyWordStandalone.STANDALONE;
public static final StandaloneOption YES = PostgreWords.KeyWordStandaloneOption.YES;
public static final StandaloneOption NO = PostgreWords.KeyWordStandaloneOption.NO;
public static final WordsNoValue NO_VALUE = PostgreWords.KeyWordsNoValue.NO_VALUE;
public static final SQLs.WordDocument DOCUMENT = SqlWords.KeyWordDocument.DOCUMENT;
public static final SQLs.WordContent CONTENT = SqlWords.KeyWordContent.CONTENT;
public static final WordPassing PASSING = PostgreWords.KeyWordPassing.PASSING;
public static final PassingOption BY_REF = PostgreWords.WordPassingOption.BY_REF;
public static final PassingOption BY_VALUE = PostgreWords.WordPassingOption.BY_VALUE;
public static final SQLs.NullOption NOT_NULL = SqlWords.KeyWordNotNull.NOT_NULL;
public static final SQLs.WordPath PATH = SqlWords.KeyWordPath.PATH;
public static final SQLs.WordsForOrdinality FOR_ORDINALITY = SqlWords.KeyWordsForOrdinality.FOR_ORDINALITY;
public static final NullTreatMode RAISE_EXCEPTION = PostgreWords.NullTreatModeExpression.RAISE_EXCEPTION;
public static final NullTreatMode USE_JSON_NULL = PostgreWords.NullTreatModeExpression.USE_JSON_NULL;
public static final NullTreatMode DELETE_KEY = PostgreWords.NullTreatModeExpression.DELETE_KEY;
public static final NullTreatMode RETURN_TARGET = PostgreWords.NullTreatModeExpression.RETURN_TARGET;
public static final DoubleColon DOUBLE_COLON = PostgreWords.SymbolDoubleColon.DOUBLE_COLON;
public static final ExtractTimeField CENTURY = PostgreWords.WordExtractTimeField.CENTURY;
public static final ExtractTimeField DAY = PostgreWords.WordExtractTimeField.DAY;
public static final ExtractTimeField DECADE = PostgreWords.WordExtractTimeField.DECADE;
public static final ExtractTimeField DOW = PostgreWords.WordExtractTimeField.DOW;
public static final ExtractTimeField DOY = PostgreWords.WordExtractTimeField.DOY;
public static final ExtractTimeField EPOCH = PostgreWords.WordExtractTimeField.EPOCH;
public static final ExtractTimeField HOUR = PostgreWords.WordExtractTimeField.HOUR;
public static final ExtractTimeField ISODOW = PostgreWords.WordExtractTimeField.ISODOW;
public static final ExtractTimeField ISOYEAR = PostgreWords.WordExtractTimeField.ISOYEAR;
public static final ExtractTimeField JULIAN = PostgreWords.WordExtractTimeField.JULIAN;
public static final ExtractTimeField MICROSECONDS = PostgreWords.WordExtractTimeField.MICROSECONDS;
public static final ExtractTimeField MILLENNIUM = PostgreWords.WordExtractTimeField.MILLENNIUM;
public static final ExtractTimeField MILLISECONDS = PostgreWords.WordExtractTimeField.MILLISECONDS;
public static final ExtractTimeField MINUTE = PostgreWords.WordExtractTimeField.MINUTE;
public static final ExtractTimeField MONTH = PostgreWords.WordExtractTimeField.MONTH;
public static final ExtractTimeField QUARTER = PostgreWords.WordExtractTimeField.QUARTER;
public static final ExtractTimeField SECOND = PostgreWords.WordExtractTimeField.SECOND;
public static final ExtractTimeField TIMEZONE = PostgreWords.WordExtractTimeField.TIMEZONE;
public static final ExtractTimeField TIMEZONE_HOUR = PostgreWords.WordExtractTimeField.TIMEZONE_HOUR;
public static final ExtractTimeField TIMEZONE_MINUTE = PostgreWords.WordExtractTimeField.TIMEZONE_MINUTE;
public static final ExtractTimeField WEEK = PostgreWords.WordExtractTimeField.WEEK;
public static final ExtractTimeField YEAR = PostgreWords.WordExtractTimeField.YEAR;
/**
*
* The {@link MappingType} of function return type: {@link LocalDateType}
*
*
* @see current_date → date
*/
public static final SimpleExpression CURRENT_DATE = FunctionUtils.noParensFunc("current_date", LocalDateType.INSTANCE);
/**
*
* The {@link MappingType} of function return type: {@link OffsetTimeType}
*
*
* @see current_time
*/
public static final SimpleExpression CURRENT_TIME = FunctionUtils.noParensFunc("current_time", OffsetTimeType.INSTANCE);
/**
*
* The {@link MappingType} of function return type: {@link OffsetDateTimeType}
*
*
* @see current_timestamp → timestamp with time zone
*/
public static final SimpleExpression CURRENT_TIMESTAMP = FunctionUtils.noParensFunc("current_timestamp", OffsetDateTimeType.INSTANCE);
/**
*
* The {@link MappingType} of function return type: {@link LocalTimeType}
*
*
* @see localtime → time
*/
public static final SimpleExpression LOCALTIME = FunctionUtils.noParensFunc("localtime", LocalTimeType.INSTANCE);
/**
*
* The {@link MappingType} of function return type: {@link LocalDateTimeType}
*
*
* @see localtimestamp → timestamp
*/
public static final SimpleExpression LOCALTIMESTAMP = FunctionUtils.noParensFunc("localtimestamp", LocalDateTimeType.INSTANCE);
/**
*
* The {@link MappingType} of function return type: {@link TextType}
*
*
* @see current_catalog → name
*/
public static final SimpleExpression CURRENT_CATALOG = FunctionUtils.noParensFunc("current_catalog", TextType.INSTANCE);
/**
*
* The {@link MappingType} of function return type: {@link TextType}
*
*
* @see current_user → name
*/
public static final SimpleExpression CURRENT_USER = FunctionUtils.noParensFunc("current_user", TextType.INSTANCE);
/**
*
* The {@link MappingType} of function return type: {@link TextType}
*
*
* @see session_user → name
*/
public static final SimpleExpression SESSION_USER = FunctionUtils.noParensFunc("session_user", TextType.INSTANCE);
/**
*
* The {@link MappingType} of function return type: {@link TextType}
*
*
* @see user → name
*/
public static final SimpleExpression USER = FunctionUtils.noParensFunc("user", TextType.INSTANCE);
/**
*
* create single-table INSERT statement that is primary statement.
*
*/
public static PostgreInsert._PrimaryOptionSpec singleInsert() {
return PostgreInserts.singleInsert();
}
/**
*
* create simple(non-batch) SELECT statement that is primary statement.
*
*/
public static PostgreQuery._WithSpec