Dan's Summer of Code My progress over the summer

Week 3

This week I started implementing the parsing library in phpMyAdmin. For now, my task is to implement the library and partially refactor code that is related to the old usage of the library.

So far, I replaced some of the helper functions that were defined in the old parser. I replaced PMA_SQP_isKeyword(), PMA_SQP_getAliasesFromQuery() and PMA_RTN_parseAllParameters(). The $PMA_SQPdata_forbidden_word array has been replaced to the array that holds all forbidden words from the Context class which and will benefit from multiple contexts when finished.

The library have seen some improvements as well: implemented some utilities (that replace old functions of the phpMyAdmin parser), changed tests’ format, has better parser for fields and data types, etc.

My task for the upcoming week is to finish replacing all calls to the old parsing library and remove it completely. This week, I have two last exams and as soon as I am done, I am going to have more free time to work on phpMyAdmin.

To see my progress, you can check out my library repository or the pull request I submit for phpMyAdmin.

Week 2

Today is the last day of the second week of Google Summer of Code. My task for this week was to continue working on the parser and the analyzer. Since last week, I got to rewrite a few parts of the library that required improvements, wrote unit tests that account for more than 90% of the code, wrote more explicit documentation, made sure that my code follows the PSR-2 standard, implemented new statement types (CREATE FUNCTION, RENAME, REPLACE, etc).

For the next two weeks, I planned to make use of the library I wrote during the past weeks in phpMyAdmin and refactor the code that uses it.

If you want to check out the code I wrote during the past weeks, you can find it in its repository here.

NOTE: The last commit is still “Initial commit” because I amended my last commit and did a force push.

Initial commit.

During this first week of Google Summer of Code I have been working on the SQL parsing library that I have to complete before continuing my work on phpMyAdmin.

Recently, I published the code I have been writing for the past weeks under a repository on my GitHub account. I decided to implement SELECT, INSERT, DELETE, UPDATE and CREATE TABLE statements first because they are some of the most used statements and analyzing their syntax helped me a lot when I sketched the first prototype.

What is interesting about these queries is that their syntax differs so much that it helped me find a balance between abstraction and performance that will help me to easily adapt current code base to implement other types of statements.

For the next week, I planned on finishing implementing the parsers for most statement types, which will let me continue my work on phpMyAdmin and start implementing it.

If you want to check out the code I wrote during the past weeks, you can find it in its repository here.

Hello, world!

Hello, world!

I am one of the participants in this year’s Google Summer of Code. During this summer, I will be working with the phpMyAdmin team to rewrite the SQL parser that is used in analyzing queries. My project’s title is “Parser and Analyzer Rewrite” and as the name suggests, the purpose of it is to rewrite a better SQL parser and analyzer that will be implemented in phpMyAdmin by the end of the summer. During this summer, Marc Delisle, who is one of the maintainers of phpMyAdmin and my mentor, is going to review my work.

To get a better idea of what my project consists, you can read the abstract of my proposal that can be found on Google Melange website here and a copy of my entire proposal, which can be found here. I hope it will serve well any students that are planning to participate in GSoC next years.