Comments (10)
I have included static arrays because of http://code.google.com/p/php-sql-parser/issues/detail?id=59 but it should be possible to change it again. There are access functions, which I use in the code, so there is no direct access to the arrays from inside the parser.
from php-sql-parser.
Ok, I will create a branch with the changes for Shard-Query. I will
compare the speed difference before and after and make sure it isn't too
great.
On Fri, Apr 11, 2014 at 12:31 AM, André Rothe [email protected]:
I have included static arrays because of
http://code.google.com/p/php-sql-parser/issues/detail?id=59 but it should
be possible to change it again. There are access functions, which I use in
the code, so there is no direct access to the arrays from inside the parser.Reply to this email directly or view it on GitHubhttps://github.com//issues/2#issuecomment-40177604
.
from php-sql-parser.
I have played around with a Singleton instance of the class... There is no time difference between both versions. I'll check-in the changes.
from php-sql-parser.
Don't use the test cases for the parser at the moment, there are a lot of errors because of the new "hints" property of the FROM clause. All tests of the Creator should work, which include some Parser tests.
from php-sql-parser.
I have my changes almost completed. I have only one issue that I can't seem to track down: When I use a custom function it shows up at 'function' instead of 'custom_function'. You can see an example in the (unfinished) test case I created called customfunctions.php in the test/cases/parser dir.
If you have a moment, do you think you could either fix that or point me in the right direction?
from php-sql-parser.
I'll check this this evening...
from php-sql-parser.
I think, I have fixed the problem.
Can we rename the new function into addCustomFunction (camel case)?
from php-sql-parser.
Hi,
Sure, I will rename it and check out your fix. Thanks!
--Justin
On Sat, Apr 12, 2014 at 1:39 PM, André Rothe [email protected]:
I think, I have fixed the problem.
Can we rename the new function into addCustomFunction (camel case)?Reply to this email directly or view it on GitHubhttps://github.com//issues/2#issuecomment-40291193
.
from php-sql-parser.
Looks good. I renamed the function.
from php-sql-parser.
I merged the customfuncs branch into master. I had to make a few changes for the singleton but that was it.
from php-sql-parser.
Related Issues (20)
- TRUNCATE in SELECT ends up in its own category
- Negative numbers prefixed with a space are not parsed correctly
- coma in function return true, false
- PHP 8.1 supporting HOT 12
- Valid query is parsed and re-created as invalid query (misplaced bracket)
- Valid query is parsed and re-created as invalid query (SQL function arguments stripped)
- Warning: Undefined variable $currCategory in C:\Users\manue\PhpstormProjects\untitled\vendor\greenlion\php-sql-parser\src\PHPSQLParser\processors\ReferenceDefinitionProcessor.php
- Valid query is parsed and re-created as invalid query (too many comma in group_concat)
- Parser fails when string contains `'` followed by `--`
- Missing data type aliases HOT 1
- 'Class not found' error HOT 1
- Support for PHP and PHPUnit versions discrapency
- Cannot calculate position if there are no space between parentheses and next query part
- CHARACTER keyword as alias of CHAR type spoils parsing CHARACTER SET utf8
- PHPSQLCreator doesn't seem to support /*comment*/ "unknown [expr_type] = comment in "WHERE" [x]" HOT 1
- CURRENT_TIMESTAMP is detected as a reserved word an generate errors when used in JOIN clause
- How to support postgresql
- "WITH" clause with comments, temporary table name is wrong.
- CREATE TABLE mytable SELECT ... throws exception in PositionCalulator Line 199
- Incredible slow parsing HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from php-sql-parser.