Changelog

First Release : 21032009

First release.

22032009

Added the JDBMS_MIMETYPES package.

05042009

  • Completed JDBMS_CHECKSUM package with more CRC32 functions
  • Started to implement the JDBMS_COMPRESS package with the ZIP(BLOB) and UNZIP(BLOB) functions, with some test cases. Single Entry ZIP BLOB only are supported for now.

13042009

  • Added the PIPELINED FUNCTION ZipEntries(iBLOB IN BLOB) that takes in input the BLOB of a zipped stream/file and returns as output the table that describes the description (all entries, CRC, ...) of the BLOB.

Warning

To be able to use completely ZipEntries function, 11.1.0.6 will have to be patched to at least 11.1.0.7. Once done, everything will be completely fine (i did test it by myself).

I provide you Metalink details :

                        This problem is encountered when trying to access an NVARCHAR2 using a
                        TABLE function in PL/SQL.
                        ORA-12714: invalid national character set specified
                        due to error bug fixed in 11.1.0.7 (Server Patch Set)  :

                        Subject: Bug 6029647 - ORA-12714 accessing typed column from
                        TABLE() function

                        Range of versions believed to be affected Versions < 11.2
                        Fixed:

                        11.1.0.7 (Server Patch Set)  Patch no 6890831 => Sucess Test is OK
                        11.2 (Future Release)
                    

18042009

  • Completed JDBMS_COMPRESS package with the UNZIP_BLOB_ZIPENTRY_TO_BLOB. Now, if you have a zip archive in a BLOB, you are able to extract a given Entry in the BLOB straight in a BLOB. Test case has been provided in the test_JDBMS_COMPRESS.sql file. The test is very easy to perform.

03052009

  • Created JDBMS_XMPP package : migrate oracle-xmpp functionalities, java code totally rewritten to give more functionalities and correct some unexpected Java behavior while running inside Oracle (SASL Authentication) as well as Presence detection. Still a lot of work to perform !
  • Created new version of send_single_plain_text_message function, this function version will be overloaded with full Connection Configuration Settings and proper/safe return code.
  • Totally rewritten the PIPELINED function (XmppRosters ) that provides Roster through a real relational table. This time i did implement the Oracle's native SQLData interface. Furthermore i do now provide much more details about Rosters than in previous (OracleXMPP) version.
  • Added some easy to use functions in JDMBS_XMPP to ping servers, test connection, ...
  • Still to do : first of all messages batch sending methods.

08052009

  • Correction in install script : i did forget to include the JDBMS_XMPP install script
  • Created first version of JDBMS_JACKSUM, that wrapps JackSum library. Now it is possible to compute a very wide range of checksums on files from sql, but of course also on BLOBs (from sql too). As detailed on JackSum website, through JDBMS_JACKSUM, JDBMS inherits a huge amount of checksums :

    "Jacksum supports 58 popular standard algorithms (Adler32, BSD sum, Bzip2's CRC-32, POSIX cksum, CRC-8, CRC-16, CRC-24, CRC-32 (FCS-32), CRC-64, ELF-32, eMule/eDonkey, FCS-16, GOST R 34.11-94, HAS-160, HAVAL (3/4/5 passes, 128/160/192/224/256 bits), MD2, MD4, MD5, MPEG-2's CRC-32, RIPEMD-128, RIPEMD-160, RIPEMD-256, RIPEMD-320, SHA-0, SHA-1, SHA-224, SHA-256, SHA-384, SHA-512, Tiger-128, Tiger-160, Tiger, Tiger2, Tiger Tree Hash, Tiger2 Tree Hash, Unix System V sum, sum8, sum16, sum24, sum32, Whirlpool-0, Whirlpool-1, Whirlpool and xor8). "

    "Jacksum supports the "Rocksoft (tm) Model CRC Algorithm", it can calculate customized CRC algorithms (all from 8 bit to 64 bit) and it supports the combination of multiple algorithms. Due to those features, millions of different new algorithms are possible. "

Since today, you are for example able to generate edk links from a dumped BLOB and provide the edk url on APEX to create a P2P sharing model of database contents, and many other cool stuff, within a very few number of lines (a single line of code is required to generate the edk url, have a look at test_JDBMS_JACKSUM to see how.

16052009

  • Now using 1.75.0 Docbook xsl to compile documentation
  • JDBMS_JACKSUM : Added the function to compute checksums on NVARCHARs and recfactored java code for Jacksum functions
  • JDBMS_XMPP : Upgraded package with batch send procedures. For now, from a single XMPP session, you can send a same message to a list of recipients. The recipient list can be provided as a comma-separated NVARCHAR2 value or from a cursor in case you would like to send messages to a set of people that you have in a personal table. Have a look at JDBMS_XMPP screenshots for more details. Having a look at test_JDBMS_XMPP.sql will also show you how to perform these batch send operations.
  • Modified a little screenshots size to make them more readable in pdf and ps versions, and hence printable.

22052009

  • Correction in install_oracle-jutils.sql : the path to cacerts was not correct dur to bad copy paste.
  • Finally added LZMA/7zip compression (and uncompression) functions. From now, it is possible to compress BLOB into the well known 7z format and hence save a lot of space with a very efficient algorithm. I'll try to find time to make a benchmark between zip compression (Level 9), Oracle 11g secured file storage COMPRESS (and COMPRESS HIGH) and LZMA algorithm (dictonary size fixed to 22).

    I have used the 7zip LZMA SDK v4.65

    For people hwo do master the LZMA algorithm, you have the handle to set your own compression parameters, the one used in the LzmaAlone class. I did inherite from LzmaAlone class so thins are clean, and so you can get documentation straight from there, in all cases, if you want to deal with custom command line switches, have a look at the JDBMS_COMPRESS package source code or at the JDBMS_COMPRESS section in this documentation.

30052009

Note

You have only have to reload the oracle-jutils.jar file for this upgrade and of course re-compile the PL/SQL packages.

  • JDBMS_CHECKSUM : Added CRC32 computation on multiple input BLOBs (up to 10). So you are now able to compute CRC32 in single shot on multiple BLOBS (the CRC32 is sequentally updated with BLOB's bytes, null BLOBs are skipped during computation). I have implemented this feature because of a specific need in my job. I'll try to implement the same overload in JDBMS_JACKUSM package, it may be useful and more homegeneous.
  • Updated test_JDBMS_COMPRESS with the grant to be able to test the LZMA compression function
  • Updated JDBMS_JACKSUM with overloaded functions to make standard checkum computations simpler : now you can just provide the algorithm. The overload is available for BLOBs, filesystem file and text. The TEST_JDBMS_JACKSUM has been updated with code samples.
  • Updated JDBMS_JACKSUM with checksum computation on up to 10 BLOBS in a single time (like in JDBMS_CHECKSUM in this same release). Overload for light version also provided (you can only provide the algorithm for shorter PL/SQL calls). You can compare the JDBMS_CHECKSUM and JDBMS_JACKSUM for crc32 algorithm, although the JDBMS_JACKSUM is much more complete but a bit slower (around 2 times slower as we do not use the same method to compute the CRC).
  • Completed the jmimemagic magic.xml file with chm mimetype. Hence, since now, JDBMS_JACKSUM will be able to detect chm files (from file or BLOB). Just reload the library to have this new mime type enabled, therefore just :
                                    loadjava -u OJUTILS/OJUTILS -resolve lib/jmimemagic-0.1.0.jar
                                    loadjava -u OJUTILS/OJUTILS -resolve dist/oracle-jutils.jar
                                
    .. and of course re-compile related PL/SQL packages (JDBMS_CHECKSUM, JDBMS_JACKSUM). On this specific topic, help is welcome to enhance the magic.xml file with new mime types, such a donation would be greatly appreciated.

05072009

  • For each new release, since now, will add the method to patch oracle-jutils within a minimal number of steps (script is as generic as possible so you should be able to patch easily on linux, windows and other 'nix OS).
  • JDBMS_COMPRESS : Added function that zips up to 10 BLOBS into a new BLOB. Have a look at test_JDBMS_COMPRESS.sql for more details.
  • Completed the magic file with application/msoutlook mime type. Now Outlook messages will be recognized
  • Changed JDBMS_CHECKSUM.get_CRC32(BLOB) beahviour : now JDBMS_CHECKSUM.get_CRC32(EMPTY_BLOB()) (same on a NULL types BLOB parameter) returns NULL instead of throwing an Exception (behaviour asked by developer as it finally makes more sense to get a null CRC than making a try/catch in client code).

To patch upgrade, just do :

                        cd $OJUTILS_HOME
                        loadjava -u OJUTILS/OJUTILS -resolve lib/jmimemagic-0.1.0.jar
                        loadjava -u OJUTILS/OJUTILS -resolve dist/oracle-jutils.jar
                        cd doc
                        cd files
                        sqlplus OJUTILS/OJUTILS
                        spool patch_05072009.log
                        @install_JDBMS_COMPRESS.sql
                        @install_JDBMS_CHECKSUM.sql
                        spool off
                        exit
                    

13072009

Mainly, in this release, i've added the LIST_FILES (to list directory contents in a relational way) pipelinded table function. So from now, we are able to list directory like :

                        select *
                        from
                        table(LIST_FILES(iDirectory => 'H:\Incoming', ...
                    

And get in return the list of files with their properties (Last Modified Date, privileges, hash, mime types, ... and all the properties i could grap from Java) in a relational way. Have a look at the JDBMS_FILESYSTEM screenshots as the output is really cool : you can now make crossed reports between your os files and relational content thanks to a simple join.

I've also started to implement JDBMS_FILESYSTEM package to interact with the filesystem from Oracle.

  • Added LIST_FILES to list files in a directory in a relational way
  • Added JDBMS_FILESYSTEM.get_file_name(file_absolute_path in NVARCHAR2) to extract the file name from the absolute path. Notice that it uses local OS file separator but does not require any directory read privilege.
  • Added JDBMS_FILESYSTEM.get_file_path(file_absolute_path in NVARCHAR2) to extract the file name from the absolute path. Notice that it uses local OS file separator but does not require any directory read privilege.

To patch upgrade, just do :

                        cd $OJUTILS_HOME
                        loadjava -u OJUTILS/OJUTILS -resolve lib/jmimemagic-0.1.0.jar
                        loadjava -u OJUTILS/OJUTILS -resolve dist/oracle-jutils.jar
                        cd doc
                        cd files
                        sqlplus OJUTILS/OJUTILS
                        spool patch_LATEST.log
                        @install_JDBMS_FILESYSTEM.sql
                        spool off
                        exit
                    

15032010

  • Added JDBMS_TWITTER package. For now, only one feature is available on this package, but pretty soon, other features will come. I've base this package on a customized version of JTwitter (the Java library for the Twitter API). For now, you can post Messages and ping the Twitter server. Have a look at test_JDBMS_TWITTER.sql for examples but the package is pretty straight forward as you will see.
  • Changed JDBMS_JACKSUM.GET_CHECKSUM (BLOB, ...) on single BLOB hash computing : will now return NULL if input BLOB is NULL.
                                    select JDBMS_JACKSUM.GET_CHECKSUM(nvl(NULL, empty_blob()),
                                    'crc32',
                                    8,--JDBMS_JACKSUM.ENCODING_HEX_UPPERCASE
                                    null,--separator
                                    '#CHECKSUM',-- put a standard output format
                                    -1,
                                    null) as CRC32
                                    from dual;
                                

    was throwing the exception. Now, it returns a NULL checksum.

  • Modified the loadjava command : they do now are verbose
  • Corrected install.sql : i have added the install_JDBMS_FILESYSTEM.sql as i did forgot to add it in the complete install.

20032010

In this release i did especially focus on pipelined functions around Twitter functionalities. I had to denormalize some outputs to make the functions easy to use in real situations. I think to add later other simple functions, but i'm pretty convinced that this release make a real step in Twitter features inside Oracle. If one function is missing or that you would like to be added, please do not hesitate to contact me, i'll be glad to add it. And in all cases, any feedback is always welcome. Have fun Twitter from Oracle.

  • Added pipelined function (TWITTER_STATUS) to get the status of a given user by its name. As output, you get User Creation Date, the ID, mentionned twitters, the Text itself, and hte userid. Therefore, just run :
                                    select * from table(TWITTER_STATUS(NULL, 'YOUR_LOGIN', 'YOUR_PASSWORD', 'dcmomo'))
                                
  • Added the pipelined function TWITTER_FRIENDS that enables you to query on you friends properties, and their status to make things as convenient as possible. Have a look at the screenshots for more details but things start to look nice, for example to make statistics on twitter locations, timezones, ...
  • Upgraded the JTwitter library with 1.4.4 version, see official JTwitter changelog. Many thanks to Daniel WInterwell for his reactive support on Bug corrections.
  • Added the TWITTER_FAVORITES pipelied function to get favorites as a table. Returns your favorites or anyone else favorites if username is provided (not null). Have a look at Screenshots.
  • Now, the TWITTER_FRIENDS function does provide a TIMESTAMP as the type of T_TWITTER_FRIEND.CREATION_DATE can now be a Timestamp due to JTwitter 1.4.4 feature request (on User.createdAt is now a Date).
  • Added the pipelined TWITTER_DIRECT_MESSAGES function that enable you to perform queries on your Inbox and sent (direct) messages.
  • Added the TWITTER_FOLLOWERS pipelined function to get the followers of a given Twitter account, or of your own twitter account. As for each newly added function, screenshots and test statements are provided.
  • Added the TWITTER_REPLIES pipelined function that returns the 20 most recent replies/mentions (status updates).

28032010

  • Bug Correction on TWITTER_REPLIES (dumb null variable Bug)
  • Added the TWITTER_TIMELINE pipelined function. With this function you can get your Friends Timeline or your own Home Timelines. Just set iFriendsFlag to 1 to Friends Timeline, and to 0 for your own Timeline.
  • Added the TwitterUtil class to make some tasks easier to perform (for now for Mentions management).

04042010

This is a little release around Twitter (send Message) and Compression (added gzip format) :

  • Added the SEND_MESSAGE function that sends a message and return the Message ID as output.
  • Added the USER_EXISTS function to test if a Twitter User exists (use Screen Name)
  • Added the GZIP(BLOB) and GUNZIP_BLOB functions in JDBMS_COMPRESS package

To upgrade from previous version, just run

                        -- As OJUTILS
                        cd $OJUTILS_HOME/doc/files
                        sqlplus OJUTILS/OJUTILS @install_JDBMS_COMPRESS.sql
                        sqlplus OJUTILS/OJUTILS @install_JDBMS_TWITTER.sql

                        cd $OJUTILS_HOME
                        loadjava -v -u OJUTILS/OJUTILS -resolve dist/oracle-jutils.jar
                    

Then you are ready to gzip BLOBs and send Twitter messages.

2010808

  • Added the JDBMS_COMPRESS.TAR_DIRECTORY_RECURSIVE->BLOB function to recursively tar all files (except already existing tar files) from a directory (and subdirectories) and get the tar output as a BLOB, useful to directly take a snapshot of files in a BLOB.
  • Added JDBMS_COMPRESS.TAR_DIRECTORY that tar all files of the directory, an overloaded version is also provided to apply a regular exepression of the files you wat to tar.
  • Added buffer size argument to JDBMS_COMPRESS.GZIP_BLOB function so you can choose the buffer size while compressing /uncompressing gzip blobs.
  • Changed release naming convention, now is YYYYMMDD.
  • Upgraded Log4J library with latest log4j-1.2.16 version. Libray is provided with oracle-jutils distribution.
  • Added JDBMS_QRCODE package to deal with QrCodes in a convenient Way, that is, encoding and decoding QrCodes. Encoding is for now using Google Charts as i could not find a suitable open source library, so, for now, you can :
    1. JDBMS_QRCODE.get_google_qrchart_url and other overload versions : get the suitable Google Chart url that will be used to encode the QrCode
    2. JDBMS_QRCODE.get_Google_QrCode_Png_Image -> BLOB : to get the PNG image straight in a BLOB. All parameters can be specified according to Google Chart documentation ( Encoding, chart size, Correction Level, Margin). So, it's very easy to use and as customizable than Google online generator. Have a look at screenshots to see how easy it is to use, or at test script in test_JDBMS_QRCODE.sql
    Soon, i will add offline QrCode decoding, taking a BLOB of the png QrCode, returning the Text, and also deal with standard urs to encode contents (url, sms, phone number, email, mms,...), based on Standard specifications.

To patch from previous version :

cd $OJUTILS_HOME
loadjava -v -u OJUTILS/OJUTILS -resolve lib/log4j-1.2.16.jar
loadjava -v -u OJUTILS/OJUTILS -resolve dist/oracle-jutils.jar
cd doc/files
sqlplus OJUTILS/OJUTILS @install_JDBMS_COMPRESS.sql

20100814

This release is focused on JDBMS_QRCODE package, and first of all the feature that allows to decode QrCode from the image, without any call to google (no internet connexion required). zxing project is used to decode QrCodes.

  • JDBMS_QRCODE : added decode_qrcode(BLOB)->NVARCHAR2 function, used to decode a QRCode image on the fly : just call the function to decode it, that's it.
  • Added functions based on standard tags to encode informations in standard urls (phone number, email address, sms, mms, ...), and then launch proper application when the QrCode is loaded on the device that implements these urls. Provided functions are GENERATE_TEXT_FOR_EMAIL, GENERATE_TEXT_FOR_MAIL_ADDRESS, GENERATE_TEXT_FOR_MEDCARD, GENERATE_TEXT_FOR_MMS, GENERATE_TEXT_FOR_URL, GENERATE_TEXT_FOR_PHONE_NUMBER, GENERATE_TEXT_FOR_SMS. I have used zxing wiki to deal with urls
  • Offline QrCode encding added with JDBMS_QRCODE.get_ZXing_QrCode_Png_Image function and other overloads. Now, QrCode encoding is possible without having to connect to Google Charts. Futhermore, encoding is much faster : 0.2 seconds on my laptop, ... and of course much more confidential as your data are not sent over the network.

To patch from previous release, just :

                        -- As OJUTILS
                        cd $OJUTILS_HOME/doc/files
                        sqlplus OJUTILS/OJUTILS @install_JDBMS_QRCODE.sql

                        cd $OJUTILS_HOME
                        loadjava -v -u OJUTILS/OJUTILS -resolve dist/oracle-jutils.jar