diff --git a/jOOQ-meta-extensions/src/main/java/org/jooq/meta/extensions/ddl/DDLDatabase.java b/jOOQ-meta-extensions/src/main/java/org/jooq/meta/extensions/ddl/DDLDatabase.java index 29ca002e9c..cf93d4012b 100644 --- a/jOOQ-meta-extensions/src/main/java/org/jooq/meta/extensions/ddl/DDLDatabase.java +++ b/jOOQ-meta-extensions/src/main/java/org/jooq/meta/extensions/ddl/DDLDatabase.java @@ -126,11 +126,14 @@ public class DDLDatabase extends AbstractInterpretingDatabase { ctx.configuration().set(new DefaultVisitListener() { @Override public void visitStart(VisitContext vc) { - if (vc.queryPart() instanceof Name) { - Name[] parts = ((Name) vc.queryPart()).parts(); + if (vc.queryPart() instanceof Name) { Name n = (Name) vc.queryPart(); + Name[] parts = n.parts(); boolean changed = false; for (int i = 0; i < parts.length; i++) { + + // [#9931] [#12752] This explicitly excludes the new Quoted.SYSTEM + // flag for DSL.systemName() names if (parts[i].quoted() == Quoted.UNQUOTED) { parts[i] = DSL.quotedName( "UPPER".equals(defaultNameCase) diff --git a/jOOQ/src/main/java/org/jooq/Name.java b/jOOQ/src/main/java/org/jooq/Name.java index 03d9e5b60d..4741fbca3b 100644 --- a/jOOQ/src/main/java/org/jooq/Name.java +++ b/jOOQ/src/main/java/org/jooq/Name.java @@ -121,6 +121,11 @@ public interface Name extends QueryPart, Comparable { */ UNQUOTED, + /** + * The name is a system name, and thus it is never quoted. + */ + SYSTEM, + /** * The name is not quoted explicitly. *

diff --git a/jOOQ/src/main/java/org/jooq/impl/Concat.java b/jOOQ/src/main/java/org/jooq/impl/Concat.java index ab14cf4014..41a6e64e5f 100644 --- a/jOOQ/src/main/java/org/jooq/impl/Concat.java +++ b/jOOQ/src/main/java/org/jooq/impl/Concat.java @@ -39,6 +39,7 @@ package org.jooq.impl; import static org.jooq.impl.DSL.function; import static org.jooq.impl.DSL.inline; +import static org.jooq.impl.DSL.systemName; import static org.jooq.impl.ExpressionOperator.ADD; import static org.jooq.impl.ExpressionOperator.CONCAT; import static org.jooq.impl.Names.N_CONCAT; @@ -89,7 +90,7 @@ final class Concat extends AbstractField implements QOM.Concat { case MARIADB: case MYSQL: - ctx.visit(function("concat", SQLDataType.VARCHAR, cast)); + ctx.visit(function(systemName("concat"), SQLDataType.VARCHAR, cast)); return; diff --git a/jOOQ/src/main/java/org/jooq/impl/DSL.java b/jOOQ/src/main/java/org/jooq/impl/DSL.java index ae5662a5c6..1f71e6c042 100644 --- a/jOOQ/src/main/java/org/jooq/impl/DSL.java +++ b/jOOQ/src/main/java/org/jooq/impl/DSL.java @@ -414,6 +414,7 @@ import org.jooq.XMLFormat; import org.jooq.XMLQueryPassingStep; import org.jooq.XMLTablePassingStep; import org.jooq.conf.NestedCollectionEmulation; +import org.jooq.conf.RenderQuotedNames; import org.jooq.conf.Settings; import org.jooq.exception.SQLDialectNotSupportedException; import org.jooq.impl.QOM.DocumentOrContent; @@ -11760,6 +11761,60 @@ public class DSL { return unquotedName(qualifiedName.toArray(Tools.EMPTY_STRING)); } + /** + * Create a new SQL identifier using an unqualified, quoted name. + *

+ * This works like {@link #name(String...)}, except that generated + * identifiers will be guaranteed to be unquoted, even when the relevant + * {@link Settings#getRenderQuotedNames()} flag is set to + * {@link RenderQuotedNames#ALWAYS}. + * + * @param unqualifiedName The SQL identifier's unqualified name + * @return A {@link QueryPart} that will render the SQL identifier + */ + @NotNull + @Support + public static Name systemName(String unqualifiedName) { + return new UnqualifiedName(unqualifiedName, Quoted.SYSTEM); + } + + /** + * Create a new SQL identifier using a qualified, quoted name. + *

+ * This works like {@link #name(String...)}, except that generated + * identifiers will be guaranteed to be unquoted, even when the relevant + * {@link Settings#getRenderQuotedNames()} flag is set to + * {@link RenderQuotedNames#ALWAYS}. + * + * @param qualifiedName The SQL identifier's qualified name parts + * @return A {@link QueryPart} that will render the SQL identifier + */ + @NotNull + @Support + public static Name systemName(String... qualifiedName) { + if (qualifiedName == null || qualifiedName.length != 1) + return new QualifiedName(qualifiedName, Quoted.SYSTEM); + else + return new UnqualifiedName(qualifiedName[0], Quoted.SYSTEM); + } + + /** + * Create a new SQL identifier using a qualified, system name. + *

+ * This works like {@link #name(Collection)}, except that generated + * identifiers will be guaranteed to be unquoted, even when the relevant + * {@link Settings#getRenderQuotedNames()} flag is set to + * {@link RenderQuotedNames#ALWAYS}. + * + * @param qualifiedName The SQL identifier's qualified name parts + * @return A {@link QueryPart} that will render the SQL identifier + */ + @NotNull + @Support + public static Name systemName(Collection qualifiedName) { + return systemName(qualifiedName.toArray(Tools.EMPTY_STRING)); + } + // ------------------------------------------------------------------------- // XXX QueryPart composition // ------------------------------------------------------------------------- diff --git a/jOOQ/src/main/java/org/jooq/impl/DefaultDataType.java b/jOOQ/src/main/java/org/jooq/impl/DefaultDataType.java index 23fbabf099..ee3295a80b 100644 --- a/jOOQ/src/main/java/org/jooq/impl/DefaultDataType.java +++ b/jOOQ/src/main/java/org/jooq/impl/DefaultDataType.java @@ -50,7 +50,7 @@ import static org.jooq.SQLDialect.POSTGRES; import static org.jooq.SQLDialect.SQLITE; import static org.jooq.SQLDialect.YUGABYTE; import static org.jooq.impl.CommentImpl.NO_COMMENT; -import static org.jooq.impl.DSL.unquotedName; +import static org.jooq.impl.DSL.systemName; import static org.jooq.impl.DefaultBinding.binding; import static org.jooq.impl.SQLDataType.BIGINT; import static org.jooq.impl.SQLDataType.BINARY; @@ -304,11 +304,11 @@ public class DefaultDataType extends AbstractDataTypeX { } public DefaultDataType(SQLDialect dialect, Class type, String typeName) { - this(dialect, null, type, unquotedName(typeName), typeName, null, null, null, null, Nullability.DEFAULT, null); + this(dialect, null, type, systemName(typeName), typeName, null, null, null, null, Nullability.DEFAULT, null); } public DefaultDataType(SQLDialect dialect, Class type, String typeName, String castTypeName) { - this(dialect, null, type, unquotedName(typeName), typeName, castTypeName, null, null, null, Nullability.DEFAULT, null); + this(dialect, null, type, systemName(typeName), typeName, castTypeName, null, null, null, Nullability.DEFAULT, null); } DefaultDataType(SQLDialect dialect, Class type, Name qualifiedTypeName) { diff --git a/jOOQ/src/main/java/org/jooq/impl/Extract.java b/jOOQ/src/main/java/org/jooq/impl/Extract.java index a31fbff490..e8ff41391c 100644 --- a/jOOQ/src/main/java/org/jooq/impl/Extract.java +++ b/jOOQ/src/main/java/org/jooq/impl/Extract.java @@ -43,6 +43,7 @@ import static org.jooq.impl.DSL.inline; import static org.jooq.impl.DSL.isoDayOfWeek; import static org.jooq.impl.DSL.keyword; import static org.jooq.impl.DSL.one; +import static org.jooq.impl.DSL.systemName; import static org.jooq.impl.Internal.iadd; import static org.jooq.impl.Internal.idiv; import static org.jooq.impl.Internal.imul; @@ -127,7 +128,7 @@ final class Extract extends AbstractField implements QOM.Extract { ctx.visit(function(N_STRFTIME, VARCHAR, inline("%s"), field).cast(INTEGER)); return; case ISO_DAY_OF_WEEK: - ctx.visit(dowSun0ToISO(function("strftime", INTEGER, inline("%w"), field).cast(INTEGER))); + ctx.visit(dowSun0ToISO(function(systemName("strftime"), INTEGER, inline("%w"), field).cast(INTEGER))); return; case DAY_OF_WEEK: ctx.visit(function(N_STRFTIME, VARCHAR, inline("%w"), field).cast(INTEGER).plus(one())); diff --git a/jOOQ/src/main/java/org/jooq/impl/Names.java b/jOOQ/src/main/java/org/jooq/impl/Names.java index a651d9c6f6..3bbadb6d6c 100644 --- a/jOOQ/src/main/java/org/jooq/impl/Names.java +++ b/jOOQ/src/main/java/org/jooq/impl/Names.java @@ -38,7 +38,7 @@ package org.jooq.impl; import static org.jooq.impl.DSL.name; -import static org.jooq.impl.DSL.unquotedName; +import static org.jooq.impl.DSL.systemName; import org.jooq.Name; // ... @@ -53,444 +53,444 @@ final class Names { static final Name N_ARRAY_TABLE = name("array_table"); static final Name N_COLUMN_VALUE = name("COLUMN_VALUE"); - static final Name N_ADD = unquotedName("add"); - static final Name N_ADD_DAYS = unquotedName("add_days"); - static final Name N_ADD_HOURS = unquotedName("add_hours"); - static final Name N_ADD_MINUTES = unquotedName("add_minutes"); - static final Name N_ADD_MONTHS = unquotedName("add_months"); - static final Name N_ADD_SECONDS = unquotedName("add_seconds"); - static final Name N_ADD_YEARS = unquotedName("add_years"); - static final Name N_ANY = unquotedName("any"); - static final Name N_ARRAY = unquotedName("array"); - static final Name N_ARRAY_AGG = unquotedName("array_agg"); - static final Name N_ARRAY_LENGTH = unquotedName("array_length"); - static final Name N_ASC = unquotedName("asc"); - static final Name N_ASCII_CHAR = unquotedName("ascii_char"); - static final Name N_ASCII_VAL = unquotedName("ascii_val"); - static final Name N_ATN = unquotedName("atn"); - static final Name N_ATN2 = unquotedName("atn2"); - static final Name N_BIN_AND = unquotedName("bin_and"); - static final Name N_BIN_NOT = unquotedName("bin_not"); - static final Name N_BIN_OR = unquotedName("bin_or"); - static final Name N_BIN_SHL = unquotedName("bin_shl"); - static final Name N_BIN_SHR = unquotedName("bin_shr"); - static final Name N_BIN_XOR = unquotedName("bin_xor"); - static final Name N_BITAND = unquotedName("bitand"); - static final Name N_BITCOUNT = unquotedName("bitcount"); - static final Name N_BITNOT = unquotedName("bitnot"); - static final Name N_BITOR = unquotedName("bitor"); - static final Name N_BITSHIFTLEFT = unquotedName("bitshiftleft"); - static final Name N_BITSHIFTRIGHT = unquotedName("bitshiftright"); - static final Name N_BITXOR = unquotedName("bitxor"); - static final Name N_BIT_AND = unquotedName("bit_and"); - static final Name N_BIT_NAND = unquotedName("bit_nand"); - static final Name N_BIT_NOR = unquotedName("bit_nor"); - static final Name N_BIT_NOT = unquotedName("bit_not"); - static final Name N_BIT_OR = unquotedName("bit_or"); - static final Name N_BIT_XOR = unquotedName("bit_xor"); - static final Name N_BIT_X_NOR = unquotedName("bit_xnor"); - static final Name N_BOOLAND_AGG = unquotedName("booland_agg"); - static final Name N_BOOLOR_AGG = unquotedName("boolor_agg"); - static final Name N_BYTE_LENGTH = unquotedName("byte_length"); - static final Name N_CASE = unquotedName("case"); - static final Name N_CAST = unquotedName("cast"); - static final Name N_CEILING = unquotedName("ceiling"); - static final Name N_CHAR = unquotedName("char"); - static final Name N_CHARINDEX = unquotedName("charindex"); - static final Name N_CHOOSE = unquotedName("choose"); - static final Name N_COALESCE = unquotedName("coalesce"); - static final Name N_COLLECT = unquotedName("collect"); - static final Name N_CONCAT = unquotedName("concat"); - static final Name N_CONVERT = unquotedName("convert"); - static final Name N_COUNTIF = unquotedName("countif"); - static final Name N_COUNTSET = unquotedName("countset"); - static final Name N_COUNT_IF = unquotedName("count_if"); - static final Name N_CUBE = unquotedName("cube"); - static final Name N_CUME_DIST = unquotedName("cume_dist"); - static final Name N_CURRENTUSER = unquotedName("currentuser"); - static final Name N_CURRENT_BIGDATETIME = unquotedName("current_bigdatetime"); - static final Name N_CURRENT_DATABASE = unquotedName("current_database"); - static final Name N_CURRENT_DATE = unquotedName("current_date"); - static final Name N_CURRENT_TIME = unquotedName("current_time"); - static final Name N_CURRENT_TIMESTAMP = unquotedName("current_timestamp"); - static final Name N_CURRVAL = unquotedName("currval"); - static final Name N_DATALENGTH = unquotedName("datalength"); - static final Name N_DATEADD = unquotedName("dateadd"); - static final Name N_DATEDIFF = unquotedName("datediff"); - static final Name N_DATEPART = unquotedName("datepart"); - static final Name N_DATETIME_TRUNC = unquotedName("datetime_trunc"); - static final Name N_DATE_DIFF = unquotedName("date_diff"); - static final Name N_DATE_TRUNC = unquotedName("date_trunc"); - static final Name N_DAYOFWEEK = unquotedName("dayofweek"); - static final Name N_DAYOFYEAR = unquotedName("dayofyear"); - static final Name N_DAYS = unquotedName("days"); - static final Name N_DAYS_BETWEEN = unquotedName("days_between"); - static final Name N_DB_NAME = unquotedName("db_name"); - static final Name N_DECODE = unquotedName("decode"); - static final Name N_DEFAULT = unquotedName("default"); - static final Name N_DENSE_RANK = unquotedName("dense_rank"); - static final Name N_DIV = unquotedName("div"); - static final Name N_DUAL = unquotedName("dual"); - static final Name N_EVERY = unquotedName("every"); - static final Name N_EXTRACT = unquotedName("extract"); - static final Name N_FIRST_VALUE = unquotedName("first_value"); - static final Name N_FLASHBACK = unquotedName("flashback"); - static final Name N_FORMAT = unquotedName("format"); - static final Name N_FUNCTION = unquotedName("function"); - static final Name N_GENERATE_ARRAY = unquotedName("generate_array"); - static final Name N_GENERATE_SERIES = unquotedName("generate_series"); - static final Name N_GENERATE_UNIQUE = unquotedName("generate_unique"); - static final Name N_GENERATE_UUID = unquotedName("generate_uuid"); - static final Name N_GENERATOR = unquotedName("generator"); - static final Name N_GENGUID = unquotedName("genguid"); - static final Name N_GEN_ID = unquotedName("gen_id"); - static final Name N_GEN_RANDOM_UUID = unquotedName("gen_random_uuid"); - static final Name N_GEN_UUID = unquotedName("gen_uuid"); - static final Name N_GETDATE = unquotedName("getdate"); - static final Name N_GREATEST = unquotedName("greatest"); - static final Name N_GROUPING_SETS = unquotedName("grouping sets"); - static final Name N_GROUP_CONCAT = unquotedName("group_concat"); - static final Name N_HASHBYTES = unquotedName("hashbytes"); - static final Name N_HASH_MD5 = unquotedName("hash_md5"); - static final Name N_HEX = unquotedName("hex"); - static final Name N_IF = unquotedName("if"); - static final Name N_IFNULL = unquotedName("ifnull"); - static final Name N_IIF = unquotedName("iif"); - static final Name N_INSERT = unquotedName("insert"); - static final Name N_INSTR = unquotedName("instr"); - static final Name N_ISJSON = unquotedName("isjson"); - static final Name N_JOIN = unquotedName("join"); - static final Name N_JSON = unquotedName("json"); - static final Name N_JSONB_AGG = unquotedName("jsonb_agg"); - static final Name N_JSONB_BUILD_ARRAY = unquotedName("jsonb_build_array"); - static final Name N_JSONB_OBJECT_AGG = unquotedName("jsonb_object_agg"); - static final Name N_JSONB_PATH_EXISTS = unquotedName("jsonb_path_exists"); - static final Name N_JSONB_PATH_QUERY_FIRST = unquotedName("jsonb_path_query_first"); - static final Name N_JSON_AGG = unquotedName("json_agg"); - static final Name N_JSON_ARRAYAGG = unquotedName("json_arrayagg"); - static final Name N_JSON_BUILD_ARRAY = unquotedName("json_build_array"); - static final Name N_JSON_CONTAINS_PATH = unquotedName("json_contains_path"); - static final Name N_JSON_EXTRACT = unquotedName("json_extract"); - static final Name N_JSON_GROUP_ARRAY = unquotedName("json_group_array"); - static final Name N_JSON_GROUP_OBJECT = unquotedName("json_group_object"); - static final Name N_JSON_MERGE = unquotedName("json_merge"); - static final Name N_JSON_MERGE_PRESERVE = unquotedName("json_merge_preserve"); - static final Name N_JSON_OBJECTAGG = unquotedName("json_objectagg"); - static final Name N_JSON_OBJECT_AGG = unquotedName("json_object_agg"); - static final Name N_JSON_QUERY = unquotedName("json_query"); - static final Name N_JSON_QUOTE = unquotedName("json_quote"); - static final Name N_JSON_TABLE = unquotedName("json_table"); - static final Name N_JSON_TYPE = unquotedName("json_type"); - static final Name N_JSON_VALID = unquotedName("json_valid"); - static final Name N_JSON_VALUE = unquotedName("json_value"); - static final Name N_LAG = unquotedName("lag"); - static final Name N_LAST_VALUE = unquotedName("last_value"); - static final Name N_LCASE = unquotedName("lcase"); - static final Name N_LEAD = unquotedName("lead"); - static final Name N_LEAST = unquotedName("least"); - static final Name N_LEN = unquotedName("len"); - static final Name N_LENGTH = unquotedName("length"); - static final Name N_LENGTHB = unquotedName("lengthb"); - static final Name N_LIST = unquotedName("list"); - static final Name N_LISTAGG = unquotedName("listagg"); - static final Name N_LOCATE = unquotedName("locate"); - static final Name N_LOCK_TIMEOUT = unquotedName("lock_timeout"); - static final Name N_LOGICAL_AND = unquotedName("logical_and"); - static final Name N_LOGICAL_OR = unquotedName("logical_or"); - static final Name N_LOGN = unquotedName("logn"); - static final Name N_LSHIFT = unquotedName("lshift"); - static final Name N_MAP = unquotedName("map"); - static final Name N_MAXVALUE = unquotedName("maxvalue"); - static final Name N_MID = unquotedName("mid"); - static final Name N_MINVALUE = unquotedName("minvalue"); - static final Name N_MOD = unquotedName("mod"); - static final Name N_MODE = unquotedName("mode"); - static final Name N_MUL = unquotedName("mul"); - static final Name N_MULTISET = unquotedName("multiset"); - static final Name N_MULTISET_AGG = unquotedName("multiset_agg"); - static final Name N_NANO100_BETWEEN = unquotedName("nano100_between"); - static final Name N_NEG = unquotedName("neg"); - static final Name N_NEWID = unquotedName("newid"); - static final Name N_NEXTVAL = unquotedName("nextval"); - static final Name N_NOT = unquotedName("not"); - static final Name N_NOW = unquotedName("now"); - static final Name N_NTH_VALUE = unquotedName("nth_value"); - static final Name N_NTILE = unquotedName("ntile"); - static final Name N_NVL2 = unquotedName("nvl2"); - static final Name N_OPENJSON = unquotedName("openjson"); - static final Name N_OPENXML = unquotedName("openxml"); - static final Name N_OREPLACE = unquotedName("oreplace"); - static final Name N_OTRANSLATE = unquotedName("otranslate"); - static final Name N_PERCENTILE_CONT = unquotedName("percentile_cont"); - static final Name N_PERCENTILE_DISC = unquotedName("percentile_disc"); - static final Name N_PERCENT_RANK = unquotedName("percent_rank"); - static final Name N_PIVOT = unquotedName("pivot"); - static final Name N_PLPGSQL = unquotedName("plpgsql"); - static final Name N_PLUS = unquotedName("plus"); - static final Name N_POWER = unquotedName("power"); - static final Name N_PRINTF = unquotedName("printf"); - static final Name N_RANDOM = unquotedName("random"); - static final Name N_RANDOMBLOB = unquotedName("randomblob"); - static final Name N_RANDOM_UUID = unquotedName("random_uuid"); - static final Name N_RANK = unquotedName("rank"); - static final Name N_RATIO_TO_REPORT = unquotedName("ratio_to_report"); - static final Name N_RAWTOHEX = unquotedName("rawtohex"); - static final Name N_RECORD = unquotedName("record"); - static final Name N_REGEXP_REPLACE = unquotedName("regexp_replace"); - static final Name N_REGEX_REPLACE = unquotedName("regex_replace"); - static final Name N_REPLACE_REGEXPR = unquotedName("replace_regexpr"); - static final Name N_REPLICATE = unquotedName("replicate"); - static final Name N_RESULT = unquotedName("result"); - static final Name N_RND = unquotedName("rnd"); - static final Name N_ROLLUP = unquotedName("rollup"); - static final Name N_ROUND_DOWN = unquotedName("round_down"); - static final Name N_ROW = unquotedName("row"); - static final Name N_ROWID = unquotedName("rowid"); - static final Name N_ROWSFROM = unquotedName("rowsfrom"); - static final Name N_ROW_NUMBER = unquotedName("row_number"); - static final Name N_RSHIFT = unquotedName("rshift"); - static final Name N_SCHEMA_NAME = unquotedName("schema_name"); - static final Name N_SECONDS_BETWEEN = unquotedName("seconds_between"); - static final Name N_SELECT = unquotedName("select"); - static final Name N_SEQ4 = unquotedName("seq4"); - static final Name N_SEQ8 = unquotedName("seq8"); - static final Name N_SGN = unquotedName("sgn"); - static final Name N_SHIFTLEFT = unquotedName("shiftleft"); - static final Name N_SHIFTRIGHT = unquotedName("shiftright"); - static final Name N_SHL = unquotedName("shl"); - static final Name N_SHR = unquotedName("shr"); - static final Name N_SPLIT = unquotedName("split"); - static final Name N_SQL_TSI_DAY = unquotedName("sql_tsi_day"); - static final Name N_SQL_TSI_FRAC_SECOND = unquotedName("sql_tsi_frac_second"); - static final Name N_SQL_TSI_HOUR = unquotedName("sql_tsi_hour"); - static final Name N_SQL_TSI_MILLI_SECOND = unquotedName("sql_tsi_milli_second"); - static final Name N_SQL_TSI_MINUTE = unquotedName("sql_tsi_minute"); - static final Name N_SQL_TSI_MONTH = unquotedName("sql_tsi_month"); - static final Name N_SQL_TSI_QUARTER = unquotedName("sql_tsi_quarter"); - static final Name N_SQL_TSI_SECOND = unquotedName("sql_tsi_second"); - static final Name N_SQL_TSI_WEEK = unquotedName("sql_tsi_week"); - static final Name N_SQL_TSI_YEAR = unquotedName("sql_tsi_year"); - static final Name N_SQR = unquotedName("sqr"); - static final Name N_STANDARD_HASH = unquotedName("standard_hash"); - static final Name N_STATS_MODE = unquotedName("stats_mode"); - static final Name N_STDDEV = unquotedName("stddev"); - static final Name N_STDEV = unquotedName("stdev"); - static final Name N_STDEVP = unquotedName("stdevp"); - static final Name N_STDEV_SAMP = unquotedName("stdev_samp"); - static final Name N_STRFTIME = unquotedName("strftime"); - static final Name N_STRING_AGG = unquotedName("string_agg"); - static final Name N_STRREVERSE = unquotedName("strreverse"); - static final Name N_STR_REPLACE = unquotedName("str_replace"); - static final Name N_ST_NUMINTERIORRINGS = unquotedName("st_numinteriorrings"); - static final Name N_SUB = unquotedName("sub"); - static final Name N_SUBSTR = unquotedName("substr"); - static final Name N_SYSTEM_RANGE = unquotedName("system_range"); - static final Name N_SYSTEM_TIME = unquotedName("system_time"); - static final Name N_SYSUUID = unquotedName("sysuuid"); - static final Name N_SYS_GUID = unquotedName("sys_guid"); - static final Name N_T = unquotedName("t"); - static final Name N_TIMESTAMPADD = unquotedName("timestampadd"); - static final Name N_TIMESTAMPDIFF = unquotedName("timestampdiff"); - static final Name N_TIMESTAMPSUB = unquotedName("timestampsub"); - static final Name N_TIMESTAMP_DIFF = unquotedName("timestamp_diff"); - static final Name N_TIMESTAMP_SUB = unquotedName("timestamp_sub"); - static final Name N_TO_CLOB = unquotedName("to_clob"); - static final Name N_TO_NUMBER = unquotedName("to_number"); - static final Name N_TRUNCATE = unquotedName("truncate"); - static final Name N_TRUNCNUM = unquotedName("truncnum"); - static final Name N_UCASE = unquotedName("ucase"); - static final Name N_UNNEST = unquotedName("unnest"); - static final Name N_USER = unquotedName("user"); - static final Name N_UUID_GENERATE = unquotedName("uuid_generate"); - static final Name N_UUID_STRING = unquotedName("uuid_string"); - static final Name N_UUID_TO_CHAR = unquotedName("uuid_to_char"); - static final Name N_VALUE = unquotedName("value"); - static final Name N_VALUES = unquotedName("values"); - static final Name N_VAR = unquotedName("var"); - static final Name N_VARIANCE = unquotedName("variance"); - static final Name N_VARIANCE_SAMP = unquotedName("variance_samp"); - static final Name N_VARP = unquotedName("varp"); - static final Name N_WEEKDAY = unquotedName("weekday"); - static final Name N_XMLAGG = unquotedName("xmlagg"); - static final Name N_XMLATTRIBUTES = unquotedName("xmlattributes"); - static final Name N_XMLELEMENT = unquotedName("xmlelement"); - static final Name N_XMLPARSE = unquotedName("xmlparse"); - static final Name N_XMLQUERY = unquotedName("xmlquery"); - static final Name N_XMLROOT = unquotedName("xmlroot"); - static final Name N_XMLTABLE = unquotedName("xmltable"); - static final Name N_XMLTEXT = unquotedName("xmltext"); - static final Name N_XPATH = unquotedName("xpath"); - static final Name N_ZEROBLOB = unquotedName("zeroblob"); + static final Name N_ADD = systemName("add"); + static final Name N_ADD_DAYS = systemName("add_days"); + static final Name N_ADD_HOURS = systemName("add_hours"); + static final Name N_ADD_MINUTES = systemName("add_minutes"); + static final Name N_ADD_MONTHS = systemName("add_months"); + static final Name N_ADD_SECONDS = systemName("add_seconds"); + static final Name N_ADD_YEARS = systemName("add_years"); + static final Name N_ANY = systemName("any"); + static final Name N_ARRAY = systemName("array"); + static final Name N_ARRAY_AGG = systemName("array_agg"); + static final Name N_ARRAY_LENGTH = systemName("array_length"); + static final Name N_ASC = systemName("asc"); + static final Name N_ASCII_CHAR = systemName("ascii_char"); + static final Name N_ASCII_VAL = systemName("ascii_val"); + static final Name N_ATN = systemName("atn"); + static final Name N_ATN2 = systemName("atn2"); + static final Name N_BIN_AND = systemName("bin_and"); + static final Name N_BIN_NOT = systemName("bin_not"); + static final Name N_BIN_OR = systemName("bin_or"); + static final Name N_BIN_SHL = systemName("bin_shl"); + static final Name N_BIN_SHR = systemName("bin_shr"); + static final Name N_BIN_XOR = systemName("bin_xor"); + static final Name N_BITAND = systemName("bitand"); + static final Name N_BITCOUNT = systemName("bitcount"); + static final Name N_BITNOT = systemName("bitnot"); + static final Name N_BITOR = systemName("bitor"); + static final Name N_BITSHIFTLEFT = systemName("bitshiftleft"); + static final Name N_BITSHIFTRIGHT = systemName("bitshiftright"); + static final Name N_BITXOR = systemName("bitxor"); + static final Name N_BIT_AND = systemName("bit_and"); + static final Name N_BIT_NAND = systemName("bit_nand"); + static final Name N_BIT_NOR = systemName("bit_nor"); + static final Name N_BIT_NOT = systemName("bit_not"); + static final Name N_BIT_OR = systemName("bit_or"); + static final Name N_BIT_XOR = systemName("bit_xor"); + static final Name N_BIT_X_NOR = systemName("bit_xnor"); + static final Name N_BOOLAND_AGG = systemName("booland_agg"); + static final Name N_BOOLOR_AGG = systemName("boolor_agg"); + static final Name N_BYTE_LENGTH = systemName("byte_length"); + static final Name N_CASE = systemName("case"); + static final Name N_CAST = systemName("cast"); + static final Name N_CEILING = systemName("ceiling"); + static final Name N_CHAR = systemName("char"); + static final Name N_CHARINDEX = systemName("charindex"); + static final Name N_CHOOSE = systemName("choose"); + static final Name N_COALESCE = systemName("coalesce"); + static final Name N_COLLECT = systemName("collect"); + static final Name N_CONCAT = systemName("concat"); + static final Name N_CONVERT = systemName("convert"); + static final Name N_COUNTIF = systemName("countif"); + static final Name N_COUNTSET = systemName("countset"); + static final Name N_COUNT_IF = systemName("count_if"); + static final Name N_CUBE = systemName("cube"); + static final Name N_CUME_DIST = systemName("cume_dist"); + static final Name N_CURRENTUSER = systemName("currentuser"); + static final Name N_CURRENT_BIGDATETIME = systemName("current_bigdatetime"); + static final Name N_CURRENT_DATABASE = systemName("current_database"); + static final Name N_CURRENT_DATE = systemName("current_date"); + static final Name N_CURRENT_TIME = systemName("current_time"); + static final Name N_CURRENT_TIMESTAMP = systemName("current_timestamp"); + static final Name N_CURRVAL = systemName("currval"); + static final Name N_DATALENGTH = systemName("datalength"); + static final Name N_DATEADD = systemName("dateadd"); + static final Name N_DATEDIFF = systemName("datediff"); + static final Name N_DATEPART = systemName("datepart"); + static final Name N_DATETIME_TRUNC = systemName("datetime_trunc"); + static final Name N_DATE_DIFF = systemName("date_diff"); + static final Name N_DATE_TRUNC = systemName("date_trunc"); + static final Name N_DAYOFWEEK = systemName("dayofweek"); + static final Name N_DAYOFYEAR = systemName("dayofyear"); + static final Name N_DAYS = systemName("days"); + static final Name N_DAYS_BETWEEN = systemName("days_between"); + static final Name N_DB_NAME = systemName("db_name"); + static final Name N_DECODE = systemName("decode"); + static final Name N_DEFAULT = systemName("default"); + static final Name N_DENSE_RANK = systemName("dense_rank"); + static final Name N_DIV = systemName("div"); + static final Name N_DUAL = systemName("dual"); + static final Name N_EVERY = systemName("every"); + static final Name N_EXTRACT = systemName("extract"); + static final Name N_FIRST_VALUE = systemName("first_value"); + static final Name N_FLASHBACK = systemName("flashback"); + static final Name N_FORMAT = systemName("format"); + static final Name N_FUNCTION = systemName("function"); + static final Name N_GENERATE_ARRAY = systemName("generate_array"); + static final Name N_GENERATE_SERIES = systemName("generate_series"); + static final Name N_GENERATE_UNIQUE = systemName("generate_unique"); + static final Name N_GENERATE_UUID = systemName("generate_uuid"); + static final Name N_GENERATOR = systemName("generator"); + static final Name N_GENGUID = systemName("genguid"); + static final Name N_GEN_ID = systemName("gen_id"); + static final Name N_GEN_RANDOM_UUID = systemName("gen_random_uuid"); + static final Name N_GEN_UUID = systemName("gen_uuid"); + static final Name N_GETDATE = systemName("getdate"); + static final Name N_GREATEST = systemName("greatest"); + static final Name N_GROUPING_SETS = systemName("grouping sets"); + static final Name N_GROUP_CONCAT = systemName("group_concat"); + static final Name N_HASHBYTES = systemName("hashbytes"); + static final Name N_HASH_MD5 = systemName("hash_md5"); + static final Name N_HEX = systemName("hex"); + static final Name N_IF = systemName("if"); + static final Name N_IFNULL = systemName("ifnull"); + static final Name N_IIF = systemName("iif"); + static final Name N_INSERT = systemName("insert"); + static final Name N_INSTR = systemName("instr"); + static final Name N_ISJSON = systemName("isjson"); + static final Name N_JOIN = systemName("join"); + static final Name N_JSON = systemName("json"); + static final Name N_JSONB_AGG = systemName("jsonb_agg"); + static final Name N_JSONB_BUILD_ARRAY = systemName("jsonb_build_array"); + static final Name N_JSONB_OBJECT_AGG = systemName("jsonb_object_agg"); + static final Name N_JSONB_PATH_EXISTS = systemName("jsonb_path_exists"); + static final Name N_JSONB_PATH_QUERY_FIRST = systemName("jsonb_path_query_first"); + static final Name N_JSON_AGG = systemName("json_agg"); + static final Name N_JSON_ARRAYAGG = systemName("json_arrayagg"); + static final Name N_JSON_BUILD_ARRAY = systemName("json_build_array"); + static final Name N_JSON_CONTAINS_PATH = systemName("json_contains_path"); + static final Name N_JSON_EXTRACT = systemName("json_extract"); + static final Name N_JSON_GROUP_ARRAY = systemName("json_group_array"); + static final Name N_JSON_GROUP_OBJECT = systemName("json_group_object"); + static final Name N_JSON_MERGE = systemName("json_merge"); + static final Name N_JSON_MERGE_PRESERVE = systemName("json_merge_preserve"); + static final Name N_JSON_OBJECTAGG = systemName("json_objectagg"); + static final Name N_JSON_OBJECT_AGG = systemName("json_object_agg"); + static final Name N_JSON_QUERY = systemName("json_query"); + static final Name N_JSON_QUOTE = systemName("json_quote"); + static final Name N_JSON_TABLE = systemName("json_table"); + static final Name N_JSON_TYPE = systemName("json_type"); + static final Name N_JSON_VALID = systemName("json_valid"); + static final Name N_JSON_VALUE = systemName("json_value"); + static final Name N_LAG = systemName("lag"); + static final Name N_LAST_VALUE = systemName("last_value"); + static final Name N_LCASE = systemName("lcase"); + static final Name N_LEAD = systemName("lead"); + static final Name N_LEAST = systemName("least"); + static final Name N_LEN = systemName("len"); + static final Name N_LENGTH = systemName("length"); + static final Name N_LENGTHB = systemName("lengthb"); + static final Name N_LIST = systemName("list"); + static final Name N_LISTAGG = systemName("listagg"); + static final Name N_LOCATE = systemName("locate"); + static final Name N_LOCK_TIMEOUT = systemName("lock_timeout"); + static final Name N_LOGICAL_AND = systemName("logical_and"); + static final Name N_LOGICAL_OR = systemName("logical_or"); + static final Name N_LOGN = systemName("logn"); + static final Name N_LSHIFT = systemName("lshift"); + static final Name N_MAP = systemName("map"); + static final Name N_MAXVALUE = systemName("maxvalue"); + static final Name N_MID = systemName("mid"); + static final Name N_MINVALUE = systemName("minvalue"); + static final Name N_MOD = systemName("mod"); + static final Name N_MODE = systemName("mode"); + static final Name N_MUL = systemName("mul"); + static final Name N_MULTISET = systemName("multiset"); + static final Name N_MULTISET_AGG = systemName("multiset_agg"); + static final Name N_NANO100_BETWEEN = systemName("nano100_between"); + static final Name N_NEG = systemName("neg"); + static final Name N_NEWID = systemName("newid"); + static final Name N_NEXTVAL = systemName("nextval"); + static final Name N_NOT = systemName("not"); + static final Name N_NOW = systemName("now"); + static final Name N_NTH_VALUE = systemName("nth_value"); + static final Name N_NTILE = systemName("ntile"); + static final Name N_NVL2 = systemName("nvl2"); + static final Name N_OPENJSON = systemName("openjson"); + static final Name N_OPENXML = systemName("openxml"); + static final Name N_OREPLACE = systemName("oreplace"); + static final Name N_OTRANSLATE = systemName("otranslate"); + static final Name N_PERCENTILE_CONT = systemName("percentile_cont"); + static final Name N_PERCENTILE_DISC = systemName("percentile_disc"); + static final Name N_PERCENT_RANK = systemName("percent_rank"); + static final Name N_PIVOT = systemName("pivot"); + static final Name N_PLPGSQL = systemName("plpgsql"); + static final Name N_PLUS = systemName("plus"); + static final Name N_POWER = systemName("power"); + static final Name N_PRINTF = systemName("printf"); + static final Name N_RANDOM = systemName("random"); + static final Name N_RANDOMBLOB = systemName("randomblob"); + static final Name N_RANDOM_UUID = systemName("random_uuid"); + static final Name N_RANK = systemName("rank"); + static final Name N_RATIO_TO_REPORT = systemName("ratio_to_report"); + static final Name N_RAWTOHEX = systemName("rawtohex"); + static final Name N_RECORD = systemName("record"); + static final Name N_REGEXP_REPLACE = systemName("regexp_replace"); + static final Name N_REGEX_REPLACE = systemName("regex_replace"); + static final Name N_REPLACE_REGEXPR = systemName("replace_regexpr"); + static final Name N_REPLICATE = systemName("replicate"); + static final Name N_RESULT = systemName("result"); + static final Name N_RND = systemName("rnd"); + static final Name N_ROLLUP = systemName("rollup"); + static final Name N_ROUND_DOWN = systemName("round_down"); + static final Name N_ROW = systemName("row"); + static final Name N_ROWID = systemName("rowid"); + static final Name N_ROWSFROM = systemName("rowsfrom"); + static final Name N_ROW_NUMBER = systemName("row_number"); + static final Name N_RSHIFT = systemName("rshift"); + static final Name N_SCHEMA_NAME = systemName("schema_name"); + static final Name N_SECONDS_BETWEEN = systemName("seconds_between"); + static final Name N_SELECT = systemName("select"); + static final Name N_SEQ4 = systemName("seq4"); + static final Name N_SEQ8 = systemName("seq8"); + static final Name N_SGN = systemName("sgn"); + static final Name N_SHIFTLEFT = systemName("shiftleft"); + static final Name N_SHIFTRIGHT = systemName("shiftright"); + static final Name N_SHL = systemName("shl"); + static final Name N_SHR = systemName("shr"); + static final Name N_SPLIT = systemName("split"); + static final Name N_SQL_TSI_DAY = systemName("sql_tsi_day"); + static final Name N_SQL_TSI_FRAC_SECOND = systemName("sql_tsi_frac_second"); + static final Name N_SQL_TSI_HOUR = systemName("sql_tsi_hour"); + static final Name N_SQL_TSI_MILLI_SECOND = systemName("sql_tsi_milli_second"); + static final Name N_SQL_TSI_MINUTE = systemName("sql_tsi_minute"); + static final Name N_SQL_TSI_MONTH = systemName("sql_tsi_month"); + static final Name N_SQL_TSI_QUARTER = systemName("sql_tsi_quarter"); + static final Name N_SQL_TSI_SECOND = systemName("sql_tsi_second"); + static final Name N_SQL_TSI_WEEK = systemName("sql_tsi_week"); + static final Name N_SQL_TSI_YEAR = systemName("sql_tsi_year"); + static final Name N_SQR = systemName("sqr"); + static final Name N_STANDARD_HASH = systemName("standard_hash"); + static final Name N_STATS_MODE = systemName("stats_mode"); + static final Name N_STDDEV = systemName("stddev"); + static final Name N_STDEV = systemName("stdev"); + static final Name N_STDEVP = systemName("stdevp"); + static final Name N_STDEV_SAMP = systemName("stdev_samp"); + static final Name N_STRFTIME = systemName("strftime"); + static final Name N_STRING_AGG = systemName("string_agg"); + static final Name N_STRREVERSE = systemName("strreverse"); + static final Name N_STR_REPLACE = systemName("str_replace"); + static final Name N_ST_NUMINTERIORRINGS = systemName("st_numinteriorrings"); + static final Name N_SUB = systemName("sub"); + static final Name N_SUBSTR = systemName("substr"); + static final Name N_SYSTEM_RANGE = systemName("system_range"); + static final Name N_SYSTEM_TIME = systemName("system_time"); + static final Name N_SYSUUID = systemName("sysuuid"); + static final Name N_SYS_GUID = systemName("sys_guid"); + static final Name N_T = systemName("t"); + static final Name N_TIMESTAMPADD = systemName("timestampadd"); + static final Name N_TIMESTAMPDIFF = systemName("timestampdiff"); + static final Name N_TIMESTAMPSUB = systemName("timestampsub"); + static final Name N_TIMESTAMP_DIFF = systemName("timestamp_diff"); + static final Name N_TIMESTAMP_SUB = systemName("timestamp_sub"); + static final Name N_TO_CLOB = systemName("to_clob"); + static final Name N_TO_NUMBER = systemName("to_number"); + static final Name N_TRUNCATE = systemName("truncate"); + static final Name N_TRUNCNUM = systemName("truncnum"); + static final Name N_UCASE = systemName("ucase"); + static final Name N_UNNEST = systemName("unnest"); + static final Name N_USER = systemName("user"); + static final Name N_UUID_GENERATE = systemName("uuid_generate"); + static final Name N_UUID_STRING = systemName("uuid_string"); + static final Name N_UUID_TO_CHAR = systemName("uuid_to_char"); + static final Name N_VALUE = systemName("value"); + static final Name N_VALUES = systemName("values"); + static final Name N_VAR = systemName("var"); + static final Name N_VARIANCE = systemName("variance"); + static final Name N_VARIANCE_SAMP = systemName("variance_samp"); + static final Name N_VARP = systemName("varp"); + static final Name N_WEEKDAY = systemName("weekday"); + static final Name N_XMLAGG = systemName("xmlagg"); + static final Name N_XMLATTRIBUTES = systemName("xmlattributes"); + static final Name N_XMLELEMENT = systemName("xmlelement"); + static final Name N_XMLPARSE = systemName("xmlparse"); + static final Name N_XMLQUERY = systemName("xmlquery"); + static final Name N_XMLROOT = systemName("xmlroot"); + static final Name N_XMLTABLE = systemName("xmltable"); + static final Name N_XMLTEXT = systemName("xmltext"); + static final Name N_XPATH = systemName("xpath"); + static final Name N_ZEROBLOB = systemName("zeroblob"); - static final Name N_ABS = unquotedName("abs"); - static final Name N_ACOS = unquotedName("acos"); - static final Name N_ANY_VALUE = unquotedName("any_value"); - static final Name N_ARRAY_GET = unquotedName("array_get"); - static final Name N_ASCII = unquotedName("ascii"); - static final Name N_ASIN = unquotedName("asin"); - static final Name N_ATAN = unquotedName("atan"); - static final Name N_ATAN2 = unquotedName("atan2"); - static final Name N_AVG = unquotedName("avg"); - static final Name N_BIT_AND_AGG = unquotedName("bit_and_agg"); - static final Name N_BIT_COUNT = unquotedName("bit_count"); - static final Name N_BIT_LENGTH = unquotedName("bit_length"); - static final Name N_BIT_OR_AGG = unquotedName("bit_or_agg"); - static final Name N_BIT_XOR_AGG = unquotedName("bit_xor_agg"); - static final Name N_BOOL_AND = unquotedName("bool_and"); - static final Name N_BOOL_OR = unquotedName("bool_or"); - static final Name N_CARDINALITY = unquotedName("cardinality"); - static final Name N_CEIL = unquotedName("ceil"); - static final Name N_CHAR_LENGTH = unquotedName("char_length"); - static final Name N_CHR = unquotedName("chr"); - static final Name N_CONDITION = unquotedName("condition"); - static final Name N_CONNECT_BY_ISCYCLE = unquotedName("connect_by_iscycle"); - static final Name N_CONNECT_BY_ISLEAF = unquotedName("connect_by_isleaf"); - static final Name N_CONNECT_BY_ROOT = unquotedName("connect_by_root"); - static final Name N_CORR = unquotedName("corr"); - static final Name N_COS = unquotedName("cos"); - static final Name N_COSH = unquotedName("cosh"); - static final Name N_COT = unquotedName("cot"); - static final Name N_COTH = unquotedName("coth"); - static final Name N_COUNT = unquotedName("count"); - static final Name N_COVAR_POP = unquotedName("covar_pop"); - static final Name N_COVAR_SAMP = unquotedName("covar_samp"); - static final Name N_CURRENT_CATALOG = unquotedName("current_catalog"); - static final Name N_CURRENT_SCHEMA = unquotedName("current_schema"); - static final Name N_CURRENT_USER = unquotedName("current_user"); - static final Name N_DATE_ADD = unquotedName("date_add"); - static final Name N_DEGREES = unquotedName("degrees"); - static final Name N_DELETING = unquotedName("deleting"); - static final Name N_DIGITS = unquotedName("digits"); - static final Name N_E = unquotedName("e"); - static final Name N_EXECUTE = unquotedName("execute"); - static final Name N_EXISTS = unquotedName("exists"); - static final Name N_EXP = unquotedName("exp"); - static final Name N_FIELD = unquotedName("field"); - static final Name N_FLOOR = unquotedName("floor"); - static final Name N_GOTO = unquotedName("goto"); - static final Name N_INSERTING = unquotedName("inserting"); - static final Name N_JSONB_ARRAY = unquotedName("jsonb_array"); - static final Name N_JSONB_OBJECT = unquotedName("jsonb_object"); - static final Name N_JSON_ARRAY = unquotedName("json_array"); - static final Name N_JSON_OBJECT = unquotedName("json_object"); - static final Name N_LEFT = unquotedName("left"); - static final Name N_LEVEL = unquotedName("level"); - static final Name N_LN = unquotedName("ln"); - static final Name N_LOCAL_DATE_ADD = unquotedName("local_date_add"); - static final Name N_LOCAL_DATE_TIME_ADD = unquotedName("local_date_time_add"); - static final Name N_LOG = unquotedName("log"); - static final Name N_LOG10 = unquotedName("log10"); - static final Name N_LOWER = unquotedName("lower"); - static final Name N_LPAD = unquotedName("lpad"); - static final Name N_LTRIM = unquotedName("ltrim"); - static final Name N_MAX = unquotedName("max"); - static final Name N_MD5 = unquotedName("md5"); - static final Name N_MEDIAN = unquotedName("median"); - static final Name N_MIN = unquotedName("min"); - static final Name N_NULLIF = unquotedName("nullif"); - static final Name N_NVL = unquotedName("nvl"); - static final Name N_OCTET_LENGTH = unquotedName("octet_length"); - static final Name N_OVERLAY = unquotedName("overlay"); - static final Name N_PI = unquotedName("pi"); - static final Name N_POSITION = unquotedName("position"); - static final Name N_PRIOR = unquotedName("prior"); - static final Name N_PRODUCT = unquotedName("product"); - static final Name N_RADIANS = unquotedName("radians"); - static final Name N_RAND = unquotedName("rand"); - static final Name N_REGR_AVGX = unquotedName("regr_avgx"); - static final Name N_REGR_AVGY = unquotedName("regr_avgy"); - static final Name N_REGR_COUNT = unquotedName("regr_count"); - static final Name N_REGR_INTERCEPT = unquotedName("regr_intercept"); - static final Name N_REGR_R2 = unquotedName("regr_r2"); - static final Name N_REGR_SLOPE = unquotedName("regr_slope"); - static final Name N_REGR_SXX = unquotedName("regr_sxx"); - static final Name N_REGR_SXY = unquotedName("regr_sxy"); - static final Name N_REGR_SYY = unquotedName("regr_syy"); - static final Name N_REPEAT = unquotedName("repeat"); - static final Name N_REPLACE = unquotedName("replace"); - static final Name N_RETURN_ = unquotedName("return_"); - static final Name N_REVERSE = unquotedName("reverse"); - static final Name N_RIGHT = unquotedName("right"); - static final Name N_ROUND = unquotedName("round"); - static final Name N_ROWNUM = unquotedName("rownum"); - static final Name N_RPAD = unquotedName("rpad"); - static final Name N_RTRIM = unquotedName("rtrim"); - static final Name N_SIGN = unquotedName("sign"); - static final Name N_SIGNAL_SQL_STATE = unquotedName("signal_sql_state"); - static final Name N_SIN = unquotedName("sin"); - static final Name N_SINH = unquotedName("sinh"); - static final Name N_SPACE = unquotedName("space"); - static final Name N_SPLIT_PART = unquotedName("split_part"); - static final Name N_SQRT = unquotedName("sqrt"); - static final Name N_SQUARE = unquotedName("square"); - static final Name N_STDDEV_POP = unquotedName("stddev_pop"); - static final Name N_STDDEV_SAMP = unquotedName("stddev_samp"); - static final Name N_ST_AREA = unquotedName("st_area"); - static final Name N_ST_ASBINARY = unquotedName("st_asbinary"); - static final Name N_ST_ASTEXT = unquotedName("st_astext"); - static final Name N_ST_CENTROID = unquotedName("st_centroid"); - static final Name N_ST_CONTAINS = unquotedName("st_contains"); - static final Name N_ST_CROSSES = unquotedName("st_crosses"); - static final Name N_ST_DIFFERENCE = unquotedName("st_difference"); - static final Name N_ST_DISJOINT = unquotedName("st_disjoint"); - static final Name N_ST_DISTANCE = unquotedName("st_distance"); - static final Name N_ST_ENDPOINT = unquotedName("st_endpoint"); - static final Name N_ST_EQUALS = unquotedName("st_equals"); - static final Name N_ST_EXTERIORRING = unquotedName("st_exteriorring"); - static final Name N_ST_GEOMETRYN = unquotedName("st_geometryn"); - static final Name N_ST_GEOMETRYTYPE = unquotedName("st_geometrytype"); - static final Name N_ST_GEOMFROMTEXT = unquotedName("st_geomfromtext"); - static final Name N_ST_GEOMFROMWKB = unquotedName("st_geomfromwkb"); - static final Name N_ST_INTERIORRINGN = unquotedName("st_interiorringn"); - static final Name N_ST_INTERSECTION = unquotedName("st_intersection"); - static final Name N_ST_INTERSECTS = unquotedName("st_intersects"); - static final Name N_ST_ISCLOSED = unquotedName("st_isclosed"); - static final Name N_ST_ISEMPTY = unquotedName("st_isempty"); - static final Name N_ST_LENGTH = unquotedName("st_length"); - static final Name N_ST_NUMGEOMETRIES = unquotedName("st_numgeometries"); - static final Name N_ST_NUMINTERIORRING = unquotedName("st_numinteriorring"); - static final Name N_ST_NUMPOINTS = unquotedName("st_numpoints"); - static final Name N_ST_OVERLAPS = unquotedName("st_overlaps"); - static final Name N_ST_POINTN = unquotedName("st_pointn"); - static final Name N_ST_SRID = unquotedName("st_srid"); - static final Name N_ST_STARTPOINT = unquotedName("st_startpoint"); - static final Name N_ST_TOUCHES = unquotedName("st_touches"); - static final Name N_ST_UNION = unquotedName("st_union"); - static final Name N_ST_WITHIN = unquotedName("st_within"); - static final Name N_ST_X = unquotedName("st_x"); - static final Name N_ST_Y = unquotedName("st_y"); - static final Name N_ST_Z = unquotedName("st_z"); - static final Name N_SUBSTRING = unquotedName("substring"); - static final Name N_SUBSTRING_INDEX = unquotedName("substring_index"); - static final Name N_SUM = unquotedName("sum"); - static final Name N_SYS_CONNECT_BY_PATH = unquotedName("sys_connect_by_path"); - static final Name N_TAN = unquotedName("tan"); - static final Name N_TANH = unquotedName("tanh"); - static final Name N_TAU = unquotedName("tau"); - static final Name N_TIMESTAMP_ADD = unquotedName("timestamp_add"); - static final Name N_TO_CHAR = unquotedName("to_char"); - static final Name N_TO_DATE = unquotedName("to_date"); - static final Name N_TO_HEX = unquotedName("to_hex"); - static final Name N_TO_TIMESTAMP = unquotedName("to_timestamp"); - static final Name N_TRANSLATE = unquotedName("translate"); - static final Name N_TRIM = unquotedName("trim"); - static final Name N_TRUNC = unquotedName("trunc"); - static final Name N_UNIQUE = unquotedName("unique"); - static final Name N_UPDATING = unquotedName("updating"); - static final Name N_UPPER = unquotedName("upper"); - static final Name N_UUID = unquotedName("uuid"); - static final Name N_VAR_POP = unquotedName("var_pop"); - static final Name N_VAR_SAMP = unquotedName("var_samp"); - static final Name N_WIDTH_BUCKET = unquotedName("width_bucket"); - static final Name N_XMLCOMMENT = unquotedName("xmlcomment"); - static final Name N_XMLCONCAT = unquotedName("xmlconcat"); - static final Name N_XMLDOCUMENT = unquotedName("xmldocument"); - static final Name N_XMLFOREST = unquotedName("xmlforest"); - static final Name N_XMLPI = unquotedName("xmlpi"); - static final Name N_XMLSERIALIZE = unquotedName("xmlserialize"); - static final Name N_XMLSERIALIZE_CONTENT = unquotedName("xmlserialize_content"); + static final Name N_ABS = systemName("abs"); + static final Name N_ACOS = systemName("acos"); + static final Name N_ANY_VALUE = systemName("any_value"); + static final Name N_ARRAY_GET = systemName("array_get"); + static final Name N_ASCII = systemName("ascii"); + static final Name N_ASIN = systemName("asin"); + static final Name N_ATAN = systemName("atan"); + static final Name N_ATAN2 = systemName("atan2"); + static final Name N_AVG = systemName("avg"); + static final Name N_BIT_AND_AGG = systemName("bit_and_agg"); + static final Name N_BIT_COUNT = systemName("bit_count"); + static final Name N_BIT_LENGTH = systemName("bit_length"); + static final Name N_BIT_OR_AGG = systemName("bit_or_agg"); + static final Name N_BIT_XOR_AGG = systemName("bit_xor_agg"); + static final Name N_BOOL_AND = systemName("bool_and"); + static final Name N_BOOL_OR = systemName("bool_or"); + static final Name N_CARDINALITY = systemName("cardinality"); + static final Name N_CEIL = systemName("ceil"); + static final Name N_CHAR_LENGTH = systemName("char_length"); + static final Name N_CHR = systemName("chr"); + static final Name N_CONDITION = systemName("condition"); + static final Name N_CONNECT_BY_ISCYCLE = systemName("connect_by_iscycle"); + static final Name N_CONNECT_BY_ISLEAF = systemName("connect_by_isleaf"); + static final Name N_CONNECT_BY_ROOT = systemName("connect_by_root"); + static final Name N_CORR = systemName("corr"); + static final Name N_COS = systemName("cos"); + static final Name N_COSH = systemName("cosh"); + static final Name N_COT = systemName("cot"); + static final Name N_COTH = systemName("coth"); + static final Name N_COUNT = systemName("count"); + static final Name N_COVAR_POP = systemName("covar_pop"); + static final Name N_COVAR_SAMP = systemName("covar_samp"); + static final Name N_CURRENT_CATALOG = systemName("current_catalog"); + static final Name N_CURRENT_SCHEMA = systemName("current_schema"); + static final Name N_CURRENT_USER = systemName("current_user"); + static final Name N_DATE_ADD = systemName("date_add"); + static final Name N_DEGREES = systemName("degrees"); + static final Name N_DELETING = systemName("deleting"); + static final Name N_DIGITS = systemName("digits"); + static final Name N_E = systemName("e"); + static final Name N_EXECUTE = systemName("execute"); + static final Name N_EXISTS = systemName("exists"); + static final Name N_EXP = systemName("exp"); + static final Name N_FIELD = systemName("field"); + static final Name N_FLOOR = systemName("floor"); + static final Name N_GOTO = systemName("goto"); + static final Name N_INSERTING = systemName("inserting"); + static final Name N_JSONB_ARRAY = systemName("jsonb_array"); + static final Name N_JSONB_OBJECT = systemName("jsonb_object"); + static final Name N_JSON_ARRAY = systemName("json_array"); + static final Name N_JSON_OBJECT = systemName("json_object"); + static final Name N_LEFT = systemName("left"); + static final Name N_LEVEL = systemName("level"); + static final Name N_LN = systemName("ln"); + static final Name N_LOCAL_DATE_ADD = systemName("local_date_add"); + static final Name N_LOCAL_DATE_TIME_ADD = systemName("local_date_time_add"); + static final Name N_LOG = systemName("log"); + static final Name N_LOG10 = systemName("log10"); + static final Name N_LOWER = systemName("lower"); + static final Name N_LPAD = systemName("lpad"); + static final Name N_LTRIM = systemName("ltrim"); + static final Name N_MAX = systemName("max"); + static final Name N_MD5 = systemName("md5"); + static final Name N_MEDIAN = systemName("median"); + static final Name N_MIN = systemName("min"); + static final Name N_NULLIF = systemName("nullif"); + static final Name N_NVL = systemName("nvl"); + static final Name N_OCTET_LENGTH = systemName("octet_length"); + static final Name N_OVERLAY = systemName("overlay"); + static final Name N_PI = systemName("pi"); + static final Name N_POSITION = systemName("position"); + static final Name N_PRIOR = systemName("prior"); + static final Name N_PRODUCT = systemName("product"); + static final Name N_RADIANS = systemName("radians"); + static final Name N_RAND = systemName("rand"); + static final Name N_REGR_AVGX = systemName("regr_avgx"); + static final Name N_REGR_AVGY = systemName("regr_avgy"); + static final Name N_REGR_COUNT = systemName("regr_count"); + static final Name N_REGR_INTERCEPT = systemName("regr_intercept"); + static final Name N_REGR_R2 = systemName("regr_r2"); + static final Name N_REGR_SLOPE = systemName("regr_slope"); + static final Name N_REGR_SXX = systemName("regr_sxx"); + static final Name N_REGR_SXY = systemName("regr_sxy"); + static final Name N_REGR_SYY = systemName("regr_syy"); + static final Name N_REPEAT = systemName("repeat"); + static final Name N_REPLACE = systemName("replace"); + static final Name N_RETURN_ = systemName("return_"); + static final Name N_REVERSE = systemName("reverse"); + static final Name N_RIGHT = systemName("right"); + static final Name N_ROUND = systemName("round"); + static final Name N_ROWNUM = systemName("rownum"); + static final Name N_RPAD = systemName("rpad"); + static final Name N_RTRIM = systemName("rtrim"); + static final Name N_SIGN = systemName("sign"); + static final Name N_SIGNAL_SQL_STATE = systemName("signal_sql_state"); + static final Name N_SIN = systemName("sin"); + static final Name N_SINH = systemName("sinh"); + static final Name N_SPACE = systemName("space"); + static final Name N_SPLIT_PART = systemName("split_part"); + static final Name N_SQRT = systemName("sqrt"); + static final Name N_SQUARE = systemName("square"); + static final Name N_STDDEV_POP = systemName("stddev_pop"); + static final Name N_STDDEV_SAMP = systemName("stddev_samp"); + static final Name N_ST_AREA = systemName("st_area"); + static final Name N_ST_ASBINARY = systemName("st_asbinary"); + static final Name N_ST_ASTEXT = systemName("st_astext"); + static final Name N_ST_CENTROID = systemName("st_centroid"); + static final Name N_ST_CONTAINS = systemName("st_contains"); + static final Name N_ST_CROSSES = systemName("st_crosses"); + static final Name N_ST_DIFFERENCE = systemName("st_difference"); + static final Name N_ST_DISJOINT = systemName("st_disjoint"); + static final Name N_ST_DISTANCE = systemName("st_distance"); + static final Name N_ST_ENDPOINT = systemName("st_endpoint"); + static final Name N_ST_EQUALS = systemName("st_equals"); + static final Name N_ST_EXTERIORRING = systemName("st_exteriorring"); + static final Name N_ST_GEOMETRYN = systemName("st_geometryn"); + static final Name N_ST_GEOMETRYTYPE = systemName("st_geometrytype"); + static final Name N_ST_GEOMFROMTEXT = systemName("st_geomfromtext"); + static final Name N_ST_GEOMFROMWKB = systemName("st_geomfromwkb"); + static final Name N_ST_INTERIORRINGN = systemName("st_interiorringn"); + static final Name N_ST_INTERSECTION = systemName("st_intersection"); + static final Name N_ST_INTERSECTS = systemName("st_intersects"); + static final Name N_ST_ISCLOSED = systemName("st_isclosed"); + static final Name N_ST_ISEMPTY = systemName("st_isempty"); + static final Name N_ST_LENGTH = systemName("st_length"); + static final Name N_ST_NUMGEOMETRIES = systemName("st_numgeometries"); + static final Name N_ST_NUMINTERIORRING = systemName("st_numinteriorring"); + static final Name N_ST_NUMPOINTS = systemName("st_numpoints"); + static final Name N_ST_OVERLAPS = systemName("st_overlaps"); + static final Name N_ST_POINTN = systemName("st_pointn"); + static final Name N_ST_SRID = systemName("st_srid"); + static final Name N_ST_STARTPOINT = systemName("st_startpoint"); + static final Name N_ST_TOUCHES = systemName("st_touches"); + static final Name N_ST_UNION = systemName("st_union"); + static final Name N_ST_WITHIN = systemName("st_within"); + static final Name N_ST_X = systemName("st_x"); + static final Name N_ST_Y = systemName("st_y"); + static final Name N_ST_Z = systemName("st_z"); + static final Name N_SUBSTRING = systemName("substring"); + static final Name N_SUBSTRING_INDEX = systemName("substring_index"); + static final Name N_SUM = systemName("sum"); + static final Name N_SYS_CONNECT_BY_PATH = systemName("sys_connect_by_path"); + static final Name N_TAN = systemName("tan"); + static final Name N_TANH = systemName("tanh"); + static final Name N_TAU = systemName("tau"); + static final Name N_TIMESTAMP_ADD = systemName("timestamp_add"); + static final Name N_TO_CHAR = systemName("to_char"); + static final Name N_TO_DATE = systemName("to_date"); + static final Name N_TO_HEX = systemName("to_hex"); + static final Name N_TO_TIMESTAMP = systemName("to_timestamp"); + static final Name N_TRANSLATE = systemName("translate"); + static final Name N_TRIM = systemName("trim"); + static final Name N_TRUNC = systemName("trunc"); + static final Name N_UNIQUE = systemName("unique"); + static final Name N_UPDATING = systemName("updating"); + static final Name N_UPPER = systemName("upper"); + static final Name N_UUID = systemName("uuid"); + static final Name N_VAR_POP = systemName("var_pop"); + static final Name N_VAR_SAMP = systemName("var_samp"); + static final Name N_WIDTH_BUCKET = systemName("width_bucket"); + static final Name N_XMLCOMMENT = systemName("xmlcomment"); + static final Name N_XMLCONCAT = systemName("xmlconcat"); + static final Name N_XMLDOCUMENT = systemName("xmldocument"); + static final Name N_XMLFOREST = systemName("xmlforest"); + static final Name N_XMLPI = systemName("xmlpi"); + static final Name N_XMLSERIALIZE = systemName("xmlserialize"); + static final Name N_XMLSERIALIZE_CONTENT = systemName("xmlserialize_content"); diff --git a/jOOQ/src/main/java/org/jooq/impl/ParserImpl.java b/jOOQ/src/main/java/org/jooq/impl/ParserImpl.java index 0e60bf3402..76bbe4fee6 100644 --- a/jOOQ/src/main/java/org/jooq/impl/ParserImpl.java +++ b/jOOQ/src/main/java/org/jooq/impl/ParserImpl.java @@ -339,6 +339,7 @@ import static org.jooq.impl.DSL.stddevSamp; import static org.jooq.impl.DSL.sum; import static org.jooq.impl.DSL.sumDistinct; // ... +import static org.jooq.impl.DSL.systemName; import static org.jooq.impl.DSL.table; import static org.jooq.impl.DSL.tan; import static org.jooq.impl.DSL.tanh; @@ -9080,7 +9081,7 @@ final class DefaultParseContext extends AbstractScope implements ParseContext { parseKeywordIf("NAME"); if (parseIf(')')) - return xmlelement(unquotedName("NAME")); + return xmlelement(systemName("NAME")); Name name = parseIdentifier(); XMLAttributes attr = null; diff --git a/jOOQ/src/main/java/org/jooq/impl/QualifiedRowid.java b/jOOQ/src/main/java/org/jooq/impl/QualifiedRowid.java index faa92ba7e7..6c0a7f6fa4 100644 --- a/jOOQ/src/main/java/org/jooq/impl/QualifiedRowid.java +++ b/jOOQ/src/main/java/org/jooq/impl/QualifiedRowid.java @@ -99,11 +99,11 @@ implements case H2: - ctx.visit(table.getQualifiedName().append(unquotedName("_rowid_"))); + ctx.visit(table.getQualifiedName().append(systemName("_rowid_"))); break; case POSTGRES: - ctx.visit(table.getQualifiedName().append(unquotedName("ctid"))); + ctx.visit(table.getQualifiedName().append(systemName("ctid"))); break; @@ -113,7 +113,7 @@ implements default: - ctx.visit(table.getQualifiedName().append(unquotedName("rowid"))); + ctx.visit(table.getQualifiedName().append(systemName("rowid"))); break; } } diff --git a/jOOQ/src/main/java/org/jooq/impl/TimestampDiff.java b/jOOQ/src/main/java/org/jooq/impl/TimestampDiff.java index 3cbec10a58..758094466b 100644 --- a/jOOQ/src/main/java/org/jooq/impl/TimestampDiff.java +++ b/jOOQ/src/main/java/org/jooq/impl/TimestampDiff.java @@ -39,6 +39,7 @@ package org.jooq.impl; import static org.jooq.impl.DSL.function; import static org.jooq.impl.DSL.keyword; +import static org.jooq.impl.DSL.systemName; import static org.jooq.impl.Keywords.K_MILLISECOND; import static org.jooq.impl.Names.N_DATEDIFF; import static org.jooq.impl.Names.N_DAYS; diff --git a/jOOQ/src/main/java/org/jooq/impl/Trunc.java b/jOOQ/src/main/java/org/jooq/impl/Trunc.java index 8df90f526b..b18277c12b 100644 --- a/jOOQ/src/main/java/org/jooq/impl/Trunc.java +++ b/jOOQ/src/main/java/org/jooq/impl/Trunc.java @@ -131,7 +131,7 @@ implements case POSTGRES: case YUGABYTE: ctx.visit(castIfNeeded( - DSL.function("trunc", NUMERIC, + DSL.function(N_TRUNC, NUMERIC, castIfNeeded(value, NUMERIC), decimals ), diff --git a/jOOQ/src/main/java/org/jooq/impl/UnqualifiedName.java b/jOOQ/src/main/java/org/jooq/impl/UnqualifiedName.java index c05f0dc986..ac1cfa5764 100644 --- a/jOOQ/src/main/java/org/jooq/impl/UnqualifiedName.java +++ b/jOOQ/src/main/java/org/jooq/impl/UnqualifiedName.java @@ -39,6 +39,7 @@ package org.jooq.impl; import static org.jooq.Name.Quoted.DEFAULT; import static org.jooq.Name.Quoted.QUOTED; +import static org.jooq.Name.Quoted.SYSTEM; import static org.jooq.Name.Quoted.UNQUOTED; // ... import static org.jooq.impl.Tools.stringLiteral; @@ -84,13 +85,16 @@ final class UnqualifiedName extends AbstractName { + + RenderQuotedNames q = SettingsTools.getRenderQuotedNames(ctx.settings()); boolean previous = ctx.quote(); - boolean current = + boolean current = quoted != SYSTEM && ( q == RenderQuotedNames.ALWAYS || q == RenderQuotedNames.EXPLICIT_DEFAULT_QUOTED && (quoted == DEFAULT || quoted == QUOTED) - || q == RenderQuotedNames.EXPLICIT_DEFAULT_UNQUOTED && quoted == QUOTED; + || q == RenderQuotedNames.EXPLICIT_DEFAULT_UNQUOTED && quoted == QUOTED + ); ctx.quote(current); ctx.literal(name);