• flip111's avatar
    Made cleaner code and remove unneccessary checks. · 75048b21
    flip111 authored
    1. combine the regexes into one. The only thing that needs to be captured
    is the alias. Used a non-capturing group for "AS " to avoid confusion and
    have cleaner regex. It tries to match "Table.Column Alias" or
    "Table.Column AS Alias". (line 861)
    2. No fallback on line 865 like "$column['table'] . '.' .
    $column['column']" this wouldn't make sense as this can not be possible
    when it's a wrapped query. Better not insert some random SQL that's gonna
    confuse the hell out of everybody.
    3. Removed "($column['hasTable'] ? $column['table']  . '.' : '') .
    $column['column']" because the original regex always tries to match the
    table name. Therefor hasTable will always be true or the entire function
    fails anyway. (this references line 868 now) (this was unit tested on
    mysql, postgresql and sql server and did not increase errors/failures)
    75048b21
Name
Last commit
Last update
bin Loading commit data...
docs Loading commit data...
lib Loading commit data...
tests Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.gitmodules Loading commit data...
.travis.yml Loading commit data...
LICENSE Loading commit data...
README.md Loading commit data...
UPGRADE Loading commit data...
build.properties Loading commit data...
build.xml Loading commit data...
composer.json Loading commit data...
composer.lock Loading commit data...
phpunit.xml.dist Loading commit data...
run-all.sh Loading commit data...