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

Broken Conversion #1

Open
Zeda opened this issue Jul 21, 2020 · 0 comments
Open

Broken Conversion #1

Zeda opened this issue Jul 21, 2020 · 0 comments

Comments

@Zeda
Copy link
Owner

Zeda commented Jul 21, 2020

These are some conversions that are either missing or broken:

  • open <filename> as <file> and write <file> from are broken, especially with the file parameter.
    • remedy: Just figure out where the file string is being mangled
  • evaluate is not converted
    • remedy: Easy way is to just convert to IF/ELSIF/ELSIF/ELSE/END IF
  • write is often not converted to a utl_file.put_line( statement
    • No idea, probably forgot some code
  • print is not at all supported.
    • This will require helper routines and more complicated analysis of the program.
    • I have a PL/SQL function (f_overstr(in, str, col[,width]) that let's you overwrite a section of a string with a substring and that helps immensely, but that doesn't help with the more complicated print breaks (these execute a function/procedure when when a given variable's value changes, then prints a heading and executes another function/procedure).
  • display commands should translate to DBMS_OUTPUT.PUT() and DBMS_OUTPUT.PUT_LINE().
  • In SQR, you can have a SQL SELECT query and directly reference the columns in other scopes. This doesn't work in PL/SQL, so conversion should try to locate which query a given &my_col came from and assign the value to a global var.
  • move just assumes that it is formatting to a string and that it is a valid to_char() format. It should at the very least detect the type of the conversion.
  • Conditions that span multiple lines, like in Ifstatements will not convert properly.
    • Remedy: A basic expression parser to figure out when the condition is finished.
  • Conditions with comments on the same line will append the THEN or LOOP to the end of the comment.
    • Remedy: insert before the comment.
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

No branches or pull requests

1 participant