Custom DataType handler

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Custom DataType handler

Christian Domsch
Hi all,

Yesterday, I wrote a quick plugin to display custom blob content of our application (we put zipped streams into a blob, so essentially it just unzippes the stream). Works like a charm and the API of Squirrel SQL is really nice.

Now, my problem is that the IDataTypeComponentFactory.matches(DialectType, int, String) method only allows to match for column type. That means all BLOB columns will now be handled by my plugin. Clearly, that will fail for columns not associated with our application.

Is there a way to have a more fine granular control? Or is there a way to have a fallback from my plugin to the normal DataTypeBlob class?

Thanks in advance,
Christian
--
Christian Domsch
Head of Issue Resolution, Development

Assentis Technologies AG
Blegistrasse 1
6343 Rotkreuz
Switzerland

Web      www.assentis.com <http://www.assentis.com/>
E-mail   [hidden email] <mailto:[hidden email]>
Phone   +41 41 790 91 92

This e-mail, any associated files and the information contained in the e-mail might be confidential and are intended for the addressee(s) only. Any unauthorised use, disclosure, alteration or any other use of this message is prohibited and might be unlawful. Any views or opinions expressed in this e-mail are those of the sender and do not necessarily represent those of the company. Neither Assentis Technologies nor the sender accept any responsibility for any kind of damage as the result of viruses or transmission problems.

------------------------------------------------------------------------------
_______________________________________________
Squirrel-sql-develop mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/squirrel-sql-develop
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Custom DataType handler

Neville Rowe
Hi Christian,
On a quick read of the source, if you return null from your readResultSet method it should fall back to the default handling.
Of course the default handling for a Blob is not useful, however that should work.
N.

> From: [hidden email]
> To: [hidden email]
> Date: Wed, 19 Aug 2015 08:13:33 +0000
> Subject: [Squirrel-sql-develop] Custom DataType handler
>
> Hi all,
>
> Yesterday, I wrote a quick plugin to display custom blob content of our application (we put zipped streams into a blob, so essentially it just unzippes the stream). Works like a charm and the API of Squirrel SQL is really nice.
>
> Now, my problem is that the IDataTypeComponentFactory.matches(DialectType, int, String) method only allows to match for column type. That means all BLOB columns will now be handled by my plugin. Clearly, that will fail for columns not associated with our application.
>
> Is there a way to have a more fine granular control? Or is there a way to have a fallback from my plugin to the normal DataTypeBlob class?
>
> Thanks in advance,
> Christian
> --
> Christian Domsch
> Head of Issue Resolution, Development
>
> Assentis Technologies AG
> Blegistrasse 1
> 6343 Rotkreuz
> Switzerland
>
> Web      www.assentis.com <http://www.assentis.com/>
> E-mail   [hidden email] <mailto:[hidden email]>
> Phone   +41 41 790 91 92
>
> This e-mail, any associated files and the information contained in the e-mail might be confidential and are intended for the addressee(s) only. Any unauthorised use, disclosure, alteration or any other use of this message is prohibited and might be unlawful. Any views or opinions expressed in this e-mail are those of the sender and do not necessarily represent those of the company. Neither Assentis Technologies nor the sender accept any responsibility for any kind of damage as the result of viruses or transmission problems.
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Squirrel-sql-develop mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/squirrel-sql-develop
     
------------------------------------------------------------------------------
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140
_______________________________________________
Squirrel-sql-develop mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/squirrel-sql-develop
Loading...