Important Announcement

This forum will be discontinued.

The creation of new topics is disabled.

Please open GitHub issues for the corresponding topics/products in the following Trivadis repositories:

A lot of users have already a GitHub account and the management of the issues is better than in this forum. For example, closing a forum topic is never related to a product change. Closing a GitHub issue for an accepted bug means that the bug is fixed. This should simplify the work for all involved parties.

See this blog post for more information.

Thank you for your understanding.

Notifications
Clear all

[Solved] table validator

2 Posts
2 Users
1 Likes
1,030 Views
0
Topic starter

We're in the process of writing some additional validators. Some of them should be triggered by create table and alter table statements ... but we're struggling to achieve this. We succesfully used the 'CreateView' object before, consequently we tried the CreateTable/AlterTable objects. And although the Eclipse EDI suggests to import 'com.trivadis.oracle.sqlplus.sqlplus.CreateTable' and 'com.trivadis.oracle.sqlplus.sqlplus.AlterTable', and the code compiles just fine, CreateTable and AlterTable are nowhere to be found in the documentation. There seems no way to 'catch' a create table of an alter table statement. We've tried the DataDefinitionStatement, but no luck either. Even a custom check on EObject is not triggered when we're checking a 'create table ... ' statement.

In the PL/SQL Editor, a create/alter table statement does not seem to be recognized either, since it is marked as erroneous. Neither does the outline window manage to make sense of it.

So our question is: is it currently possible create a custom validator on a Create or Alter Table statement?
And if not: is there some kind of workaround, like maybe a way to access the whole create/alter statement and parse it ourselves for example?

1 Answer
1

So our question is: is it currently possible create a custom validator on a Create or Alter Table statement?

No, not with the PL/SQL validator. There are ways when using a SQL*Plus validator. But this is something we do not support and it will not be satisfying since the SQL*Plus grammar is just a shallow parser with rudimentary functionality. 

tomvdyck Topic starter 12/12/2019 11:11 am

Thanks for your quick and clear answer!