#29 SQL updated to work with Sybase ASA (more ANSI SQL) and

closed
None
5
2007-06-04
2005-03-15
No

The patch was made against the published 5.5.4 release
of sql.c.

sql.c for 5.5.4 is very geared for Oracle syntax. I
have fixed a number of issues where it was unable to
parse a variety of my PLSQL packages. So there are
quite a few Oracle specific parsing bug fixed.

This patch was made to work specifically with Sybase
Adaptive Server Anywhere 9.0.2, but in doing this, it
means opening the syntax to support more ANSI style SQL.

Some of the additional syntax types supported are:
create view;
create synonym;
create index;
create event;
create publication;
create service;
create domain;
MobiLink Table Scripts
MobiLink Conn Scripts

The other item I have added is scope. For example,
with the current sql.c you can turn on "local
variables". But if you have a complex Oracle package
which could easily have 30 different procedures within,
you did not know which variable was defined in which
procedure. Now the local variables are displayed with:
proc_name.local_var_name

This type of scoping was added to a number of objects,
like records and fields. Depends what object was
tagged if adding scope made sense or not.

Expanded the syntax for existing objects. For example
it will recognize:
CREATE TABLE DBA.T1
CREATE TABLE "DBA"."T2"

So many objects can have owner/schema names (DBA
above), the parser now accepts this. Double quotes
should be ignored, but accepted.

When reading records, choose a more appropriate
stopping point since tables can look like this:
create table t1 (
c1 integer,
c2 char(30),
c3 numeric(10,5),
c4 integer,
constraint whatever,
primary key(c1),
foreign key (),
check ()
)
You do not want to create tags for constraint, primary
key and so on.

Support EXCEPTION clauses.
EXCEPTION
<exception handler>;

Where an exception handler could be:
BEGIN
WHEN OTHERS THEN
x := x + 3;
END;

There have been many more refinements, just not sure
what level of detail is needed on this page.

Dave

Discussion

  • David Fishburn

    David Fishburn - 2005-03-15

    sql.c patch for ASA

     
  • Elliott Hughes

    Elliott Hughes - 2007-05-27

    Logged In: YES
    user_id=1127237
    Originator: NO

    i think you already applied this patch, or something like it. want to close this?

     
  • Elliott Hughes

    Elliott Hughes - 2007-05-27
    • assigned_to: nobody --> dfishburn
     
  • David Fishburn

    David Fishburn - 2007-06-04

    Logged In: YES
    user_id=983517
    Originator: YES

    These changes should be in the 5.7 release (or at least the next release after May 2007).

     
  • David Fishburn

    David Fishburn - 2007-06-04
    • status: open --> closed
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks