Note that Oracle's DBMS_OBFUSCATION_TOOLKIT package seems to offer
other hashing algorithms as well, e.g. DES. I might consider moving
more functions up from MySQLFactory to Factory

2012/11/21 Lukas Eder <[email protected]>:
> I see, I wasn't aware of other databases shipping with similar
> functions. Let's pull this method up to Factory, then:
> https://github.com/jOOQ/jOOQ/issues/1972
>
> So, Oracle has some MD5 function:
> LOWER(RAWTOHEX(SYS.DBMS_OBFUSCATION_TOOLKIT.MD5(input_string=>'mypass')))
>
> How would you generically go about this for HSQLDB (without creating a
> UDF, of course)?
>
> 2012/11/21 Ben Hood <[email protected]>:
>> Actually I was hoping for Oracle, MySQL and HSQL support :-)
>>
>> So the MySQLFactory looks like a good solution for MySQL, but I guess that I
>> going to have to look at a way of executing the native queries on a dialect
>> by dialect basis. Is this something that could be patched into the default
>> Factory and implemented separately for each DB you want to support?
>>
>>
>>
>> On Wed, Nov 21, 2012 at 2:04 PM, Lukas Eder <[email protected]> wrote:
>>>
>>> I'm guessing that this is about MySQL? Have a look at MySQLFactory, then:
>>> http://www.jooq.org/javadoc/latest/org/jooq/util/mysql/MySQLFactory.html
>>>
>>> http://www.jooq.org/javadoc/latest/org/jooq/util/mysql/MySQLFactory.html#md5(org.jooq.Field)
>>>
>>> Cheers
>>> Lukas
>>>
>>> 2012/11/21 Ben Hood <[email protected]>:
>>> > Hi,
>>> >
>>> > I was wondering whether there is a factory method to call an MD5()
>>> > string
>>> > function in a query. Natively I was thinking of the following SQL:
>>> >
>>> > select year(some_date), md5(group_concat(some_column))
>>> > from some_table
>>> > group by year(some_date)
>>> >
>>> > The generic Factory class offers functions to generate year() and
>>> > group_concat(), but I couldn't see one for md5().
>>> >
>>> > How should I proceed?
>>> >
>>> > TIA,
>>> >
>>> > Cheers,
>>> >
>>> > Ben
>>
>>

Reply via email to