Parser and formatter?

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

Parser and formatter?

Stefan Keller-4
Hello,

I'm looking for two things:
I'd like to analyse SQL syntax (i.e. VIEWs) in order to find out
relationships between tables.
And I'd simply like to pretty print SQL.

1. Are there tools and/examples around which use the SQL parser only of hsqldb?

2. Any hints to open source SQL formatter / beautifiers around (e.g.
based on libaries of hsqldb)?

Yours, Stefan

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
hsqldb-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/hsqldb-developers
Reply | Threaded
Open this post in threaded view
|

Re: Parser and formatter?

Fred Toussi-2
Over the years, I have heard of a few closed source and open source
products that use the HSQLDB SQL parser. I don't recall the names
though.

The parser and compiler are closely linked. With version 2.0, you can
compile a Statement, which has information about table usage and
suchlike.

For formatter usage, you can use the getSQL methods of the expressions
that form the statement. These methods have been written for all the
objects, but some are not used at all and may not be complete. Still
they should be usable for formatting most SQL statements.

Fred

On Fri, 29 Jan 2010 11:49 +0100, "Stefan Keller" <[hidden email]>
wrote:

> Hello,
>
> I'm looking for two things:
> I'd like to analyse SQL syntax (i.e. VIEWs) in order to find out
> relationships between tables.
> And I'd simply like to pretty print SQL.
>
> 1. Are there tools and/examples around which use the SQL parser only of
> hsqldb?
>
> 2. Any hints to open source SQL formatter / beautifiers around (e.g.
> based on libaries of hsqldb)?
>
> Yours, Stefan
>
> ------------------------------------------------------------------------------
> The Planet: dedicated and managed hosting, cloud storage, colocation
> Stay online with enterprise data centers and the best network in the
> business
> Choose flexible plans and management services without long-term contracts
> Personal 24x7 support from experience hosting pros just a phone call
> away.
> http://p.sf.net/sfu/theplanet-com
> _______________________________________________
> hsqldb-developers mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/hsqldb-developers

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
hsqldb-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/hsqldb-developers