Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

T321 Add CREATE OR ALTER PROCEDURE support #94

Merged
merged 4 commits into from
Sep 2, 2024

Conversation

makssent
Copy link

Fixes #93.

request: CREATE OR ALTER PROCEDURE SUMM (A INTEGER, B INTEGER) RETURNS(C INTEGER) AS BEGIN c = a + b; SUSPEND; END

error message: You have an error in your SQL syntax: CREATE OR ALTER PROCEDURE SUMM (A INTEGER B INTEGER) RETURNS(C INTEGER) AS BEGIN c = a + b; SUSPEND; END no viable alternative at input 'CREATEOR' at line 1 position 8 near @18:9='OR'<99>1:8

NEW err message:
Can not accept SQL type CreateOrAlterProcedureContext.

@makssent
Copy link
Author

makssent commented Aug 27, 2024

Нужно добавить ещё поддержку WHILE DO и FETCH, выдает ошибку в тесте: E121-010 
(CREATE OR ALTER PROCEDURE GET_NAMECOMPANY RETURNS (NAMECOM CHAR(30)) AS DECLARE curs1 CURSOR FOR (Select namecompany from Company where typeproduct = 'pc'); BEGIN OPEN curs1; WHILE (1=1) DO BEGIN FETCH curs1 INTO :NAMECOM; IF (ROW_COUNT = 0) THEN LEAVE; SUSPEND; END CLOSE curs1; END;)

Copy link
Collaborator

@TedCraft TedCraft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Тут я бы тоже по аналогии с CREATE OR ALTER TRIGGER сделал сразу три правила, для CREATE, ALTER и CREATE OR ALTER.

@TedCraft TedCraft merged commit 506574f into red-soft-ru:master Sep 2, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

T321 Add CREATE OR ALTER PROCEDURE support
2 participants