[#4385] Missing @Support annotation in MySQLDSL

This commit is contained in:
lukaseder 2015-06-15 09:30:20 +02:00
parent 3bc8ada3d2
commit b3635e2662
2 changed files with 46 additions and 0 deletions

View File

@ -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 {
* <p>
* Don't mix this up with the various {@link DSL#decode()} methods!
*/
@Support({ MYSQL })
public static Field<String> decode(String cryptString, String keyString) {
return decode(val(cryptString), val(keyString));
}
@ -76,6 +80,7 @@ public class MySQLDSL extends DSL {
* <p>
* Don't mix this up with the various {@link DSL#decode()} methods!
*/
@Support({ MYSQL })
public static Field<byte[]> decode(byte[] cryptString, byte[] keyString) {
return decode(val(cryptString), val(keyString));
}
@ -85,6 +90,7 @@ public class MySQLDSL extends DSL {
* <p>
* Don't mix this up with the various {@link DSL#decode()} methods!
*/
@Support({ MYSQL })
public static <T> Field<T> decode(Field<T> cryptString, Field<T> keyString) {
return function("decode", cryptString.getType(), cryptString, keyString);
}
@ -92,6 +98,7 @@ public class MySQLDSL extends DSL {
/**
* Get the MySQL-specific <code>ENCODE()</code> function.
*/
@Support({ MYSQL })
public static Field<String> encode(String string, String keyString) {
return encode(val(string), val(keyString));
}
@ -99,6 +106,7 @@ public class MySQLDSL extends DSL {
/**
* Get the MySQL-specific <code>ENCODE()</code> function.
*/
@Support({ MYSQL })
public static Field<byte[]> encode(byte[] string, byte[] keyString) {
return encode(val(string), val(keyString));
}
@ -106,6 +114,7 @@ public class MySQLDSL extends DSL {
/**
* Get the MySQL-specific <code>ENCODE()</code> function.
*/
@Support({ MYSQL })
public static <T> Field<T> encode(Field<T> string, Field<T> keyString) {
return function("encode", string.getType(), string, keyString);
}
@ -113,6 +122,7 @@ public class MySQLDSL extends DSL {
/**
* Get the MySQL-specific <code>AES_DECRYPT()</code> function.
*/
@Support({ MYSQL })
public static Field<String> aesDecrypt(String cryptString, String keyString) {
return aesDecrypt(val(cryptString), val(keyString));
}
@ -120,6 +130,7 @@ public class MySQLDSL extends DSL {
/**
* Get the MySQL-specific <code>AES_DECRYPT()</code> function.
*/
@Support({ MYSQL })
public static Field<byte[]> aesDecrypt(byte[] cryptString, byte[] keyString) {
return aesDecrypt(val(cryptString), val(keyString));
}
@ -127,6 +138,7 @@ public class MySQLDSL extends DSL {
/**
* Get the MySQL-specific <code>AES_DECRYPT()</code> function.
*/
@Support({ MYSQL })
public static <T> Field<T> aesDecrypt(Field<T> cryptString, Field<T> keyString) {
return function("aes_decrypt", cryptString.getType(), cryptString, keyString);
}
@ -134,6 +146,7 @@ public class MySQLDSL extends DSL {
/**
* Get the MySQL-specific <code>AES_ENCRYPT()</code> function.
*/
@Support({ MYSQL })
public static Field<String> aesEncrypt(String string, String keyString) {
return aesEncrypt(val(string), val(keyString));
}
@ -141,6 +154,7 @@ public class MySQLDSL extends DSL {
/**
* Get the MySQL-specific <code>AES_ENCRYPT()</code> function.
*/
@Support({ MYSQL })
public static Field<byte[]> aesEncrypt(byte[] string, byte[] keyString) {
return aesEncrypt(val(string), val(keyString));
}
@ -148,6 +162,7 @@ public class MySQLDSL extends DSL {
/**
* Get the MySQL-specific <code>AES_ENCRYPT()</code> function.
*/
@Support({ MYSQL })
public static <T> Field<T> aesEncrypt(Field<T> string, Field<T> keyString) {
return function("aes_encrypt", string.getType(), string, keyString);
}
@ -155,6 +170,7 @@ public class MySQLDSL extends DSL {
/**
* Get the MySQL-specific <code>DES_DECRYPT()</code> function.
*/
@Support({ MYSQL })
public static Field<String> desDecrypt(String cryptString) {
return desDecrypt(val(cryptString));
}
@ -162,6 +178,7 @@ public class MySQLDSL extends DSL {
/**
* Get the MySQL-specific <code>DES_DECRYPT()</code> function.
*/
@Support({ MYSQL })
public static Field<byte[]> desDecrypt(byte[] cryptString) {
return desDecrypt(val(cryptString));
}
@ -169,6 +186,7 @@ public class MySQLDSL extends DSL {
/**
* Get the MySQL-specific <code>DES_DECRYPT()</code> function.
*/
@Support({ MYSQL })
public static <T> Field<T> desDecrypt(Field<T> cryptString) {
return function("des_decrypt", cryptString.getType(), cryptString);
}
@ -176,6 +194,7 @@ public class MySQLDSL extends DSL {
/**
* Get the MySQL-specific <code>DES_DECRYPT()</code> function.
*/
@Support({ MYSQL })
public static Field<String> desDecrypt(String cryptString, String keyString) {
return desDecrypt(val(cryptString), val(keyString));
}
@ -183,6 +202,7 @@ public class MySQLDSL extends DSL {
/**
* Get the MySQL-specific <code>DES_DECRYPT()</code> function.
*/
@Support({ MYSQL })
public static Field<byte[]> desDecrypt(byte[] cryptString, byte[] keyString) {
return desDecrypt(val(cryptString), val(keyString));
}
@ -190,6 +210,7 @@ public class MySQLDSL extends DSL {
/**
* Get the MySQL-specific <code>DES_DECRYPT()</code> function.
*/
@Support({ MYSQL })
public static <T> Field<T> desDecrypt(Field<T> cryptString, Field<T> keyString) {
return function("des_decrypt", cryptString.getType(), cryptString, keyString);
}
@ -197,6 +218,7 @@ public class MySQLDSL extends DSL {
/**
* Get the MySQL-specific <code>DES_ENCRYPT()</code> function.
*/
@Support({ MYSQL })
public static Field<String> desEncrypt(String string) {
return desEncrypt(val(string));
}
@ -204,6 +226,7 @@ public class MySQLDSL extends DSL {
/**
* Get the MySQL-specific <code>DES_ENCRYPT()</code> function.
*/
@Support({ MYSQL })
public static Field<byte[]> desEncrypt(byte[] string) {
return desEncrypt(val(string));
}
@ -211,6 +234,7 @@ public class MySQLDSL extends DSL {
/**
* Get the MySQL-specific <code>DES_ENCRYPT()</code> function.
*/
@Support({ MYSQL })
public static <T> Field<T> desEncrypt(Field<T> string) {
return function("des_encrypt", string.getType(), string);
}
@ -218,6 +242,7 @@ public class MySQLDSL extends DSL {
/**
* Get the MySQL-specific <code>DES_ENCRYPT()</code> function.
*/
@Support({ MYSQL })
public static Field<String> desEncrypt(String string, String keyString) {
return desEncrypt(val(string), val(keyString));
}
@ -225,6 +250,7 @@ public class MySQLDSL extends DSL {
/**
* Get the MySQL-specific <code>DES_ENCRYPT()</code> function.
*/
@Support({ MYSQL })
public static Field<byte[]> desEncrypt(byte[] string, byte[] keyString) {
return desEncrypt(val(string), val(keyString));
}
@ -232,6 +258,7 @@ public class MySQLDSL extends DSL {
/**
* Get the MySQL-specific <code>DES_ENCRYPT()</code> function.
*/
@Support({ MYSQL })
public static <T> Field<T> desEncrypt(Field<T> string, Field<T> keyString) {
return function("des_encrypt", string.getType(), string, keyString);
}
@ -239,6 +266,7 @@ public class MySQLDSL extends DSL {
/**
* Get the MySQL-specific <code>COMPRESS()</code> function.
*/
@Support({ MYSQL })
public static Field<String> compress(String string) {
return compress(val(string));
}
@ -246,6 +274,7 @@ public class MySQLDSL extends DSL {
/**
* Get the MySQL-specific <code>COMPRESS()</code> function.
*/
@Support({ MYSQL })
public static Field<byte[]> compress(byte[] string) {
return compress(val(string));
}
@ -253,6 +282,7 @@ public class MySQLDSL extends DSL {
/**
* Get the MySQL-specific <code>COMPRESS()</code> function.
*/
@Support({ MYSQL })
public static <T> Field<T> compress(Field<T> string) {
return function("compress", string.getType(), string);
}
@ -260,6 +290,7 @@ public class MySQLDSL extends DSL {
/**
* Get the MySQL-specific <code>UNCOMPRESS()</code> function.
*/
@Support({ MYSQL })
public static Field<String> uncompress(String string) {
return uncompress(val(string));
}
@ -267,6 +298,7 @@ public class MySQLDSL extends DSL {
/**
* Get the MySQL-specific <code>UNCOMPRESS()</code> function.
*/
@Support({ MYSQL })
public static Field<byte[]> uncompress(byte[] string) {
return uncompress(val(string));
}
@ -274,6 +306,7 @@ public class MySQLDSL extends DSL {
/**
* Get the MySQL-specific <code>UNCOMPRESS()</code> function.
*/
@Support({ MYSQL })
public static <T> Field<T> uncompress(Field<T> string) {
return function("uncompress", string.getType(), string);
}
@ -281,6 +314,7 @@ public class MySQLDSL extends DSL {
/**
* Get the MySQL-specific <code>UNCOMPRESSED_LENGTH()</code> function.
*/
@Support({ MYSQL })
public static Field<Integer> uncompressedLength(String string) {
return uncompressedLength(val(string));
}
@ -288,6 +322,7 @@ public class MySQLDSL extends DSL {
/**
* Get the MySQL-specific <code>UNCOMPRESSED_LENGTH()</code> function.
*/
@Support({ MYSQL })
public static Field<Integer> uncompressedLength(byte[] string) {
return uncompressedLength(val(string));
}
@ -295,6 +330,7 @@ public class MySQLDSL extends DSL {
/**
* Get the MySQL-specific <code>UNCOMPRESSED_LENGTH()</code> function.
*/
@Support({ MYSQL })
public static <T> Field<Integer> uncompressedLength(Field<T> string) {
return function("uncompressed_length", Integer.class, string);
}
@ -302,6 +338,7 @@ public class MySQLDSL extends DSL {
/**
* Get the MySQL-specific <code>SHA1()</code> function.
*/
@Support({ MYSQL })
public static Field<String> sha1(String string) {
return sha1(val(string));
}
@ -309,6 +346,7 @@ public class MySQLDSL extends DSL {
/**
* Get the MySQL-specific <code>SHA1()</code> function.
*/
@Support({ MYSQL })
public static Field<byte[]> sha1(byte[] string) {
return sha1(val(string));
}
@ -316,6 +354,7 @@ public class MySQLDSL extends DSL {
/**
* Get the MySQL-specific <code>SHA1()</code> function.
*/
@Support({ MYSQL })
public static <T> Field<T> sha1(Field<T> string) {
return function("sha1", string.getType(), string);
}
@ -323,6 +362,7 @@ public class MySQLDSL extends DSL {
/**
* Get the MySQL-specific <code>SHA2()</code> function.
*/
@Support({ MYSQL })
public static Field<String> sha2(String string, int hashLength) {
return sha2(val(string), val(hashLength));
}
@ -330,6 +370,7 @@ public class MySQLDSL extends DSL {
/**
* Get the MySQL-specific <code>SHA2()</code> function.
*/
@Support({ MYSQL })
public static Field<byte[]> sha2(byte[] string, int hashLength) {
return sha2(val(string), val(hashLength));
}
@ -337,6 +378,7 @@ public class MySQLDSL extends DSL {
/**
* Get the MySQL-specific <code>SHA2()</code> function.
*/
@Support({ MYSQL })
public static <T> Field<T> sha2(Field<T> string, Field<Integer> hashLength) {
return function("sha2", string.getType(), string, hashLength);
}
@ -344,6 +386,7 @@ public class MySQLDSL extends DSL {
/**
* Get the MySQL-specific <code>PASSWORD()</code> function.
*/
@Support({ MYSQL })
public static Field<String> password(String string) {
return password(val(string));
}
@ -351,6 +394,7 @@ public class MySQLDSL extends DSL {
/**
* Get the MySQL-specific <code>PASSWORD()</code> function.
*/
@Support({ MYSQL })
public static Field<byte[]> password(byte[] string) {
return password(val(string));
}
@ -358,6 +402,7 @@ public class MySQLDSL extends DSL {
/**
* Get the MySQL-specific <code>PASSWORD()</code> function.
*/
@Support({ MYSQL })
public static <T> Field<T> password(Field<T> string) {
return function("password", string.getType(), string);
}

View File

@ -77,6 +77,7 @@ public class PostgresDSL extends DSL {
* </pre></code>
*/
@SuppressWarnings({ "rawtypes", "unchecked" })
@Support({ POSTGRES })
public static <T> Field<T[]> array(Select<? extends Record1<T>> select) {
return DSL.field("array({0})", (DataType) select.getSelect().get(0).getDataType().getArrayDataType(), select);
}