fSQL icon indicating copy to clipboard operation
fSQL copied to clipboard

Refactor Environment

Open sbuberl opened this issue 8 years ago • 1 comments

Environment is a mess. Last stable release this was all one php file (with less features).

In preparation for #10, first thing I want to do is separate the parsing and execution logic. The execution logic should go in classes in Statement classes. The parsing can stay in Environment for now. Right now, only all the Create queries and Insert have Statement classes.

While adding these Statement classes is a good time to add testing. Rather than adding unit tests for the Statement, add testing for the SQL command. See tests/SQL for example.

Once everything is in a Statement would to like pull out all the parsing logic in Environment into a new Parser class but not required.

sbuberl avatar Aug 26 '17 17:08 sbuberl

As right now, all the queries have been refactored into Statements and have tests. I just need to move the parser logic into a new class (or multiple?) and this will be done.

sbuberl avatar Feb 17 '19 22:02 sbuberl