From b3635e2662fecb707eefd10a181d94c3085f37ea Mon Sep 17 00:00:00 2001 From: lukaseder Date: Mon, 15 Jun 2015 09:30:20 +0200 Subject: [PATCH] [#4385] Missing @Support annotation in MySQLDSL --- .../java/org/jooq/util/mysql/MySQLDSL.java | 45 +++++++++++++++++++ .../org/jooq/util/postgres/PostgresDSL.java | 1 + 2 files changed, 46 insertions(+) diff --git a/jOOQ/src/main/java/org/jooq/util/mysql/MySQLDSL.java b/jOOQ/src/main/java/org/jooq/util/mysql/MySQLDSL.java index 68b8f2a96a..550af3c492 100644 --- a/jOOQ/src/main/java/org/jooq/util/mysql/MySQLDSL.java +++ b/jOOQ/src/main/java/org/jooq/util/mysql/MySQLDSL.java @@ -40,9 +40,12 @@ */ package org.jooq.util.mysql; +import static org.jooq.SQLDialect.MYSQL; + import org.jooq.EnumType; import org.jooq.Field; import org.jooq.SQLDialect; +import org.jooq.Support; import org.jooq.impl.DSL; /** @@ -67,6 +70,7 @@ public class MySQLDSL extends DSL { *

* Don't mix this up with the various {@link DSL#decode()} methods! */ + @Support({ MYSQL }) public static Field decode(String cryptString, String keyString) { return decode(val(cryptString), val(keyString)); } @@ -76,6 +80,7 @@ public class MySQLDSL extends DSL { *

* Don't mix this up with the various {@link DSL#decode()} methods! */ + @Support({ MYSQL }) public static Field decode(byte[] cryptString, byte[] keyString) { return decode(val(cryptString), val(keyString)); } @@ -85,6 +90,7 @@ public class MySQLDSL extends DSL { *

* Don't mix this up with the various {@link DSL#decode()} methods! */ + @Support({ MYSQL }) public static Field decode(Field cryptString, Field keyString) { return function("decode", cryptString.getType(), cryptString, keyString); } @@ -92,6 +98,7 @@ public class MySQLDSL extends DSL { /** * Get the MySQL-specific ENCODE() function. */ + @Support({ MYSQL }) public static Field encode(String string, String keyString) { return encode(val(string), val(keyString)); } @@ -99,6 +106,7 @@ public class MySQLDSL extends DSL { /** * Get the MySQL-specific ENCODE() function. */ + @Support({ MYSQL }) public static Field encode(byte[] string, byte[] keyString) { return encode(val(string), val(keyString)); } @@ -106,6 +114,7 @@ public class MySQLDSL extends DSL { /** * Get the MySQL-specific ENCODE() function. */ + @Support({ MYSQL }) public static Field encode(Field string, Field keyString) { return function("encode", string.getType(), string, keyString); } @@ -113,6 +122,7 @@ public class MySQLDSL extends DSL { /** * Get the MySQL-specific AES_DECRYPT() function. */ + @Support({ MYSQL }) public static Field aesDecrypt(String cryptString, String keyString) { return aesDecrypt(val(cryptString), val(keyString)); } @@ -120,6 +130,7 @@ public class MySQLDSL extends DSL { /** * Get the MySQL-specific AES_DECRYPT() function. */ + @Support({ MYSQL }) public static Field aesDecrypt(byte[] cryptString, byte[] keyString) { return aesDecrypt(val(cryptString), val(keyString)); } @@ -127,6 +138,7 @@ public class MySQLDSL extends DSL { /** * Get the MySQL-specific AES_DECRYPT() function. */ + @Support({ MYSQL }) public static Field aesDecrypt(Field cryptString, Field keyString) { return function("aes_decrypt", cryptString.getType(), cryptString, keyString); } @@ -134,6 +146,7 @@ public class MySQLDSL extends DSL { /** * Get the MySQL-specific AES_ENCRYPT() function. */ + @Support({ MYSQL }) public static Field aesEncrypt(String string, String keyString) { return aesEncrypt(val(string), val(keyString)); } @@ -141,6 +154,7 @@ public class MySQLDSL extends DSL { /** * Get the MySQL-specific AES_ENCRYPT() function. */ + @Support({ MYSQL }) public static Field aesEncrypt(byte[] string, byte[] keyString) { return aesEncrypt(val(string), val(keyString)); } @@ -148,6 +162,7 @@ public class MySQLDSL extends DSL { /** * Get the MySQL-specific AES_ENCRYPT() function. */ + @Support({ MYSQL }) public static Field aesEncrypt(Field string, Field keyString) { return function("aes_encrypt", string.getType(), string, keyString); } @@ -155,6 +170,7 @@ public class MySQLDSL extends DSL { /** * Get the MySQL-specific DES_DECRYPT() function. */ + @Support({ MYSQL }) public static Field desDecrypt(String cryptString) { return desDecrypt(val(cryptString)); } @@ -162,6 +178,7 @@ public class MySQLDSL extends DSL { /** * Get the MySQL-specific DES_DECRYPT() function. */ + @Support({ MYSQL }) public static Field desDecrypt(byte[] cryptString) { return desDecrypt(val(cryptString)); } @@ -169,6 +186,7 @@ public class MySQLDSL extends DSL { /** * Get the MySQL-specific DES_DECRYPT() function. */ + @Support({ MYSQL }) public static Field desDecrypt(Field cryptString) { return function("des_decrypt", cryptString.getType(), cryptString); } @@ -176,6 +194,7 @@ public class MySQLDSL extends DSL { /** * Get the MySQL-specific DES_DECRYPT() function. */ + @Support({ MYSQL }) public static Field desDecrypt(String cryptString, String keyString) { return desDecrypt(val(cryptString), val(keyString)); } @@ -183,6 +202,7 @@ public class MySQLDSL extends DSL { /** * Get the MySQL-specific DES_DECRYPT() function. */ + @Support({ MYSQL }) public static Field desDecrypt(byte[] cryptString, byte[] keyString) { return desDecrypt(val(cryptString), val(keyString)); } @@ -190,6 +210,7 @@ public class MySQLDSL extends DSL { /** * Get the MySQL-specific DES_DECRYPT() function. */ + @Support({ MYSQL }) public static Field desDecrypt(Field cryptString, Field keyString) { return function("des_decrypt", cryptString.getType(), cryptString, keyString); } @@ -197,6 +218,7 @@ public class MySQLDSL extends DSL { /** * Get the MySQL-specific DES_ENCRYPT() function. */ + @Support({ MYSQL }) public static Field desEncrypt(String string) { return desEncrypt(val(string)); } @@ -204,6 +226,7 @@ public class MySQLDSL extends DSL { /** * Get the MySQL-specific DES_ENCRYPT() function. */ + @Support({ MYSQL }) public static Field desEncrypt(byte[] string) { return desEncrypt(val(string)); } @@ -211,6 +234,7 @@ public class MySQLDSL extends DSL { /** * Get the MySQL-specific DES_ENCRYPT() function. */ + @Support({ MYSQL }) public static Field desEncrypt(Field string) { return function("des_encrypt", string.getType(), string); } @@ -218,6 +242,7 @@ public class MySQLDSL extends DSL { /** * Get the MySQL-specific DES_ENCRYPT() function. */ + @Support({ MYSQL }) public static Field desEncrypt(String string, String keyString) { return desEncrypt(val(string), val(keyString)); } @@ -225,6 +250,7 @@ public class MySQLDSL extends DSL { /** * Get the MySQL-specific DES_ENCRYPT() function. */ + @Support({ MYSQL }) public static Field desEncrypt(byte[] string, byte[] keyString) { return desEncrypt(val(string), val(keyString)); } @@ -232,6 +258,7 @@ public class MySQLDSL extends DSL { /** * Get the MySQL-specific DES_ENCRYPT() function. */ + @Support({ MYSQL }) public static Field desEncrypt(Field string, Field keyString) { return function("des_encrypt", string.getType(), string, keyString); } @@ -239,6 +266,7 @@ public class MySQLDSL extends DSL { /** * Get the MySQL-specific COMPRESS() function. */ + @Support({ MYSQL }) public static Field compress(String string) { return compress(val(string)); } @@ -246,6 +274,7 @@ public class MySQLDSL extends DSL { /** * Get the MySQL-specific COMPRESS() function. */ + @Support({ MYSQL }) public static Field compress(byte[] string) { return compress(val(string)); } @@ -253,6 +282,7 @@ public class MySQLDSL extends DSL { /** * Get the MySQL-specific COMPRESS() function. */ + @Support({ MYSQL }) public static Field compress(Field string) { return function("compress", string.getType(), string); } @@ -260,6 +290,7 @@ public class MySQLDSL extends DSL { /** * Get the MySQL-specific UNCOMPRESS() function. */ + @Support({ MYSQL }) public static Field uncompress(String string) { return uncompress(val(string)); } @@ -267,6 +298,7 @@ public class MySQLDSL extends DSL { /** * Get the MySQL-specific UNCOMPRESS() function. */ + @Support({ MYSQL }) public static Field uncompress(byte[] string) { return uncompress(val(string)); } @@ -274,6 +306,7 @@ public class MySQLDSL extends DSL { /** * Get the MySQL-specific UNCOMPRESS() function. */ + @Support({ MYSQL }) public static Field uncompress(Field string) { return function("uncompress", string.getType(), string); } @@ -281,6 +314,7 @@ public class MySQLDSL extends DSL { /** * Get the MySQL-specific UNCOMPRESSED_LENGTH() function. */ + @Support({ MYSQL }) public static Field uncompressedLength(String string) { return uncompressedLength(val(string)); } @@ -288,6 +322,7 @@ public class MySQLDSL extends DSL { /** * Get the MySQL-specific UNCOMPRESSED_LENGTH() function. */ + @Support({ MYSQL }) public static Field uncompressedLength(byte[] string) { return uncompressedLength(val(string)); } @@ -295,6 +330,7 @@ public class MySQLDSL extends DSL { /** * Get the MySQL-specific UNCOMPRESSED_LENGTH() function. */ + @Support({ MYSQL }) public static Field uncompressedLength(Field string) { return function("uncompressed_length", Integer.class, string); } @@ -302,6 +338,7 @@ public class MySQLDSL extends DSL { /** * Get the MySQL-specific SHA1() function. */ + @Support({ MYSQL }) public static Field sha1(String string) { return sha1(val(string)); } @@ -309,6 +346,7 @@ public class MySQLDSL extends DSL { /** * Get the MySQL-specific SHA1() function. */ + @Support({ MYSQL }) public static Field sha1(byte[] string) { return sha1(val(string)); } @@ -316,6 +354,7 @@ public class MySQLDSL extends DSL { /** * Get the MySQL-specific SHA1() function. */ + @Support({ MYSQL }) public static Field sha1(Field string) { return function("sha1", string.getType(), string); } @@ -323,6 +362,7 @@ public class MySQLDSL extends DSL { /** * Get the MySQL-specific SHA2() function. */ + @Support({ MYSQL }) public static Field sha2(String string, int hashLength) { return sha2(val(string), val(hashLength)); } @@ -330,6 +370,7 @@ public class MySQLDSL extends DSL { /** * Get the MySQL-specific SHA2() function. */ + @Support({ MYSQL }) public static Field sha2(byte[] string, int hashLength) { return sha2(val(string), val(hashLength)); } @@ -337,6 +378,7 @@ public class MySQLDSL extends DSL { /** * Get the MySQL-specific SHA2() function. */ + @Support({ MYSQL }) public static Field sha2(Field string, Field hashLength) { return function("sha2", string.getType(), string, hashLength); } @@ -344,6 +386,7 @@ public class MySQLDSL extends DSL { /** * Get the MySQL-specific PASSWORD() function. */ + @Support({ MYSQL }) public static Field password(String string) { return password(val(string)); } @@ -351,6 +394,7 @@ public class MySQLDSL extends DSL { /** * Get the MySQL-specific PASSWORD() function. */ + @Support({ MYSQL }) public static Field password(byte[] string) { return password(val(string)); } @@ -358,6 +402,7 @@ public class MySQLDSL extends DSL { /** * Get the MySQL-specific PASSWORD() function. */ + @Support({ MYSQL }) public static Field password(Field string) { return function("password", string.getType(), string); } diff --git a/jOOQ/src/main/java/org/jooq/util/postgres/PostgresDSL.java b/jOOQ/src/main/java/org/jooq/util/postgres/PostgresDSL.java index 1b39230ffc..626a41fa03 100644 --- a/jOOQ/src/main/java/org/jooq/util/postgres/PostgresDSL.java +++ b/jOOQ/src/main/java/org/jooq/util/postgres/PostgresDSL.java @@ -77,6 +77,7 @@ public class PostgresDSL extends DSL { * */ @SuppressWarnings({ "rawtypes", "unchecked" }) + @Support({ POSTGRES }) public static Field array(Select> select) { return DSL.field("array({0})", (DataType) select.getSelect().get(0).getDataType().getArrayDataType(), select); }