org.jooq.util.mysql
Class MySQLFactory

java.lang.Object
  extended by org.jooq.impl.Factory
      extended by org.jooq.util.mysql.MySQLFactory
All Implemented Interfaces:
Serializable, Configuration, FactoryOperations

public class MySQLFactory
extends Factory

A SQLDialect.MYSQL specific factory

Author:
Lukas Eder
See Also:
Serialized Form

Constructor Summary
MySQLFactory(Connection connection)
          Create a factory with connection
MySQLFactory(Connection connection, SchemaMapping mapping)
          Deprecated. - 2.0.5 - Use MySQLFactory(Connection, Settings) instead
MySQLFactory(Connection connection, Settings settings)
          Create a factory with connection and a settings configured
 
Method Summary
static Field<String> aesDecrypt(Field<String> cryptString, Field<String> keyString)
          Get the MySQL-specific AES_DECRYPT() function
static Field<String> aesDecrypt(String cryptString, String keyString)
          Get the MySQL-specific AES_DECRYPT() function
static Field<String> aesEncrypt(Field<String> string, Field<String> keyString)
          Get the MySQL-specific AES_ENCRYPT() function
static Field<String> aesEncrypt(String string, String keyString)
          Get the MySQL-specific AES_ENCRYPT() function
static Field<String> compress(Field<String> string)
          Get the MySQL-specific COMPRESS() function
static Field<String> compress(String string)
          Get the MySQL-specific COMPRESS() function
static Field<String> decode(Field<String> cryptString, Field<String> keyString)
          Get the MySQL-specific DECODE() function Don't mix this up with the various Factory.decode() methods!
static Field<String> decode(String cryptString, String keyString)
          Get the MySQL-specific DECODE() function Don't mix this up with the various Factory.decode() methods!
static Field<String> desDecrypt(Field<String> cryptString)
          Get the MySQL-specific DES_DECRYPT() function
static Field<String> desDecrypt(Field<String> cryptString, Field<String> keyString)
          Get the MySQL-specific DES_DECRYPT() function
static Field<String> desDecrypt(String cryptString)
          Get the MySQL-specific DES_DECRYPT() function
static Field<String> desDecrypt(String cryptString, String keyString)
          Get the MySQL-specific DES_DECRYPT() function
static Field<String> desEncrypt(Field<String> string)
          Get the MySQL-specific DES_ENCRYPT() function
static Field<String> desEncrypt(Field<String> string, Field<String> keyString)
          Get the MySQL-specific DES_ENCRYPT() function
static Field<String> desEncrypt(String string)
          Get the MySQL-specific DES_ENCRYPT() function
static Field<String> desEncrypt(String string, String keyString)
          Get the MySQL-specific DES_ENCRYPT() function
static Field<String> encode(Field<String> string, Field<String> keyString)
          Get the MySQL-specific ENCODE() function
static Field<String> encode(String string, String keyString)
          Get the MySQL-specific ENCODE() function
static
<E extends Enum<E> & EnumType>
E
enumType(Class<E> type, int index)
          Get a field based EnumType by its MySQL-specific index If your MySQL enum type contains these three values: A, B, C , then this will be the mapping of indexes to values: Enum literal as in Enum.name() Enum ordinal as in Enum.ordinal() MySQL index null-0A01B12C23 See dev.mysql.com/doc/ refman/5.5/en/enum.html for more details about MySQL enum types
static Field<String> md5(Field<String> string)
          Get the MySQL-specific MD5() function
static Field<String> md5(String string)
          Get the MySQL-specific MD5() function
static Field<String> password(Field<String> string)
          Get the MySQL-specific PASSWORD() function
static Field<String> password(String string)
          Get the MySQL-specific PASSWORD() function
static Field<String> sha1(Field<String> string)
          Get the MySQL-specific SHA1() function
static Field<String> sha1(String string)
          Get the MySQL-specific SHA1() function
static Field<String> sha2(Field<String> string, Field<Integer> hashLength)
          Get the MySQL-specific SHA2() function
static Field<String> sha2(String string, int hashLength)
          Get the MySQL-specific SHA2() function
static Field<String> uncompress(Field<String> string)
          Get the MySQL-specific UNCOMPRESS() function
static Field<String> uncompress(String string)
          Get the MySQL-specific UNCOMPRESS() function
static Field<Integer> uncompressedLength(Field<String> string)
          Get the MySQL-specific UNCOMPRESSED_LENGTH() function
static Field<Integer> uncompressedLength(String string)
          Get the MySQL-specific UNCOMPRESSED_LENGTH() function
 
Methods inherited from class org.jooq.impl.Factory
abs, abs, acos, acos, ascii, ascii, asin, asin, atan, atan, atan2, atan2, atan2, atan2, attach, attach, avg, avgDistinct, batch, batch, batch, bind, bindContext, bitAnd, bitAnd, bitAnd, bitAnd, bitCount, bitCount, bitLength, bitLength, bitNand, bitNand, bitNand, bitNand, bitNor, bitNor, bitNor, bitNor, bitNot, bitNot, bitOr, bitOr, bitOr, bitOr, bitXNor, bitXNor, bitXNor, bitXNor, bitXor, bitXor, bitXor, bitXor, cast, cast, cast, castNull, castNull, castNull, ceil, ceil, charLength, charLength, coalesce, coalesce, concat, concat, condition, condition, connectByIsCycle, connectByIsLeaf, cos, cos, cosh, cosh, cot, cot, coth, coth, count, count, countDistinct, cube, cumeDist, currentDate, currentTime, currentTimestamp, currentUser, currval, dateDiff, dateDiff, dateDiff, dateDiff, day, day, decode, decode, decode, decode, decode, deg, deg, delete, deleteQuery, denseRank, e, escape, escape, execute, execute, executeDelete, executeDelete, executeDeleteOne, executeDeleteOne, executeInsert, executeUpdate, executeUpdate, executeUpdateOne, executeUpdateOne, exists, exp, exp, extract, extract, falseCondition, fetch, fetch, fetch, fetch, fetch, fetchAny, fetchLazy, fetchLazy, fetchMany, fetchMany, fetchOne, fetchOne, fetchOne, fetchOne, field, field, field, field, field, field, field, field, field, firstValue, floor, floor, function, function, getConnection, getData, getData, getDataType, getDialect, getSchemaMapping, getSettings, greatest, greatest, groupConcat, groupConcatDistinct, grouping, groupingId, groupingSets, groupingSets, groupingSets, hour, hour, insertInto, insertInto, insertInto, insertInto, insertQuery, lag, lag, lag, lag, lastID, lastValue, lead, lead, lead, lead, least, least, length, length, level, listAgg, listAgg, literal, literal, literal, ln, ln, loadInto, log, log, lower, lower, lpad, lpad, lpad, lpad, lpad, ltrim, ltrim, max, maxDistinct, median, mergeInto, min, minDistinct, minute, minute, month, month, newRecord, newRecord, newRecord, nextval, notExists, ntile, nullif, nullif, nullif, nullif, nvl, nvl, nvl, nvl, nvl2, nvl2, nvl2, nvl2, octetLength, octetLength, one, param, param, param, param, percentRank, pi, position, position, position, position, power, power, power, power, prior, query, query, rad, rad, rand, rank, render, renderContext, renderInlined, renderNamedParams, repeat, repeat, repeat, repeat, replace, replace, replace, replace, resultQuery, resultQuery, rollup, round, round, round, round, rowNumber, rpad, rpad, rpad, rpad, rpad, rtrim, rtrim, second, second, select, select, selectCount, selectDistinct, selectDistinct, selectFrom, selectOne, selectQuery, selectQuery, selectZero, setConnection, setData, shl, shl, shl, shl, shr, shr, shr, shr, sign, sign, sin, sin, sinh, sinh, sqrt, sqrt, stddevPop, stddevSamp, substring, substring, substring, substring, sum, sumDistinct, sysConnectByPath, table, table, table, table, table, table, table, tan, tan, tanh, tanh, timestampDiff, timestampDiff, timestampDiff, timestampDiff, toString, trim, trim, trueCondition, truncate, two, unnest, unnest, unnest, unnest, update, updateQuery, upper, upper, use, use, val, val, val, val, vals, value, value, value, value, varPop, varSamp, year, year, zero
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MySQLFactory

@Deprecated
public MySQLFactory(Connection connection,
                               SchemaMapping mapping)
Deprecated. - 2.0.5 - Use MySQLFactory(Connection, Settings) instead

Create a factory with connection and a schema mapping configured

Parameters:
connection - The connection to use with objects created from this factory
mapping - The schema mapping to use with objects created from this factory

MySQLFactory

public MySQLFactory(Connection connection,
                    Settings settings)
Create a factory with connection and a settings configured

Parameters:
connection - The connection to use with objects created from this factory
settings - The runtime settings to apply to objects created from this factory

MySQLFactory

public MySQLFactory(Connection connection)
Create a factory with connection

Parameters:
connection - The connection to use with objects created from this factory
Method Detail

decode

public static Field<String> decode(String cryptString,
                                   String keyString)
Get the MySQL-specific DECODE() function

Don't mix this up with the various Factory.decode() methods!


decode

public static Field<String> decode(Field<String> cryptString,
                                   Field<String> keyString)
Get the MySQL-specific DECODE() function

Don't mix this up with the various Factory.decode() methods!


encode

public static Field<String> encode(String string,
                                   String keyString)
Get the MySQL-specific ENCODE() function


encode

public static Field<String> encode(Field<String> string,
                                   Field<String> keyString)
Get the MySQL-specific ENCODE() function


aesDecrypt

public static Field<String> aesDecrypt(String cryptString,
                                       String keyString)
Get the MySQL-specific AES_DECRYPT() function


aesDecrypt

public static Field<String> aesDecrypt(Field<String> cryptString,
                                       Field<String> keyString)
Get the MySQL-specific AES_DECRYPT() function


aesEncrypt

public static Field<String> aesEncrypt(String string,
                                       String keyString)
Get the MySQL-specific AES_ENCRYPT() function


aesEncrypt

public static Field<String> aesEncrypt(Field<String> string,
                                       Field<String> keyString)
Get the MySQL-specific AES_ENCRYPT() function


desDecrypt

public static Field<String> desDecrypt(String cryptString)
Get the MySQL-specific DES_DECRYPT() function


desDecrypt

public static Field<String> desDecrypt(Field<String> cryptString)
Get the MySQL-specific DES_DECRYPT() function


desDecrypt

public static Field<String> desDecrypt(String cryptString,
                                       String keyString)
Get the MySQL-specific DES_DECRYPT() function


desDecrypt

public static Field<String> desDecrypt(Field<String> cryptString,
                                       Field<String> keyString)
Get the MySQL-specific DES_DECRYPT() function


desEncrypt

public static Field<String> desEncrypt(String string)
Get the MySQL-specific DES_ENCRYPT() function


desEncrypt

public static Field<String> desEncrypt(Field<String> string)
Get the MySQL-specific DES_ENCRYPT() function


desEncrypt

public static Field<String> desEncrypt(String string,
                                       String keyString)
Get the MySQL-specific DES_ENCRYPT() function


desEncrypt

public static Field<String> desEncrypt(Field<String> string,
                                       Field<String> keyString)
Get the MySQL-specific DES_ENCRYPT() function


compress

public static Field<String> compress(String string)
Get the MySQL-specific COMPRESS() function


compress

public static Field<String> compress(Field<String> string)
Get the MySQL-specific COMPRESS() function


uncompress

public static Field<String> uncompress(String string)
Get the MySQL-specific UNCOMPRESS() function


uncompress

public static Field<String> uncompress(Field<String> string)
Get the MySQL-specific UNCOMPRESS() function


uncompressedLength

public static Field<Integer> uncompressedLength(String string)
Get the MySQL-specific UNCOMPRESSED_LENGTH() function


uncompressedLength

public static Field<Integer> uncompressedLength(Field<String> string)
Get the MySQL-specific UNCOMPRESSED_LENGTH() function


md5

public static Field<String> md5(String string)
Get the MySQL-specific MD5() function


md5

public static Field<String> md5(Field<String> string)
Get the MySQL-specific MD5() function


sha1

public static Field<String> sha1(String string)
Get the MySQL-specific SHA1() function


sha1

public static Field<String> sha1(Field<String> string)
Get the MySQL-specific SHA1() function


sha2

public static Field<String> sha2(String string,
                                 int hashLength)
Get the MySQL-specific SHA2() function


sha2

public static Field<String> sha2(Field<String> string,
                                 Field<Integer> hashLength)
Get the MySQL-specific SHA2() function


password

public static Field<String> password(String string)
Get the MySQL-specific PASSWORD() function


password

public static Field<String> password(Field<String> string)
Get the MySQL-specific PASSWORD() function


enumType

public static <E extends Enum<E> & EnumType> E enumType(Class<E> type,
                                                       int index)
Get a field based EnumType by its MySQL-specific index

If your MySQL enum type contains these three values: A, B, C , then this will be the mapping of indexes to values:

Enum literal as in Enum.name() Enum ordinal as in Enum.ordinal() MySQL index
null - 0
A 0 1
B 1 2
C 2 3

See dev.mysql.com/doc/ refman/5.5/en/enum.html for more details about MySQL enum types



Copyright © 2012. All Rights Reserved.