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

Method 'table' not found in ClanCats\Hydrahon\Builder #55

Open
mahdiazarm opened this issue Oct 1, 2021 · 4 comments
Open

Method 'table' not found in ClanCats\Hydrahon\Builder #55

mahdiazarm opened this issue Oct 1, 2021 · 4 comments

Comments

@mahdiazarm
Copy link

Hi
I'm not sure if I'm doing something wrong or not but I get this error In Phpstorm and PHP error log.
Also, I searched the Builder.php file and found no reference to the table function inside it.
Please tell me what to do
Thanks.

@KarelWintersky
Copy link

same issue.

package looks like useless

@marek-hanzal
Copy link

There would be problem somewhere else:

  • Builder has a magick __call() method which refers to current query builder; by a dialect (MySQL/SQLite) it chooses on of Translators and for both SQL builder is the same (ClanCats\Hydrahon\Query\Sql)
  • If you look inside that class (Sql), the very first method is table(), so the problem is not likely this package (as I'm using it under MySQL without - almost - problems), but maybe a setup/config, for example if the Builder has selected right dialect?
  • So as a way you can try to debug this is to see what $grammarKey goes into constructor of Builder (also if it is called)
  • Also you can try to debug __call() method of the Builder to see what class is in $queryBuilder property

And for the final: yes, if there is wrong class inside, it could be the library's bug. Have you tried some debugging before?

@KarelWintersky
Copy link

https://github.com/envms/fluentpdo - is more useful SQL builder.

@marek-hanzal
Copy link

It's opinion based - when I was looking for one, this (hydrahon) was best for me as it has very nice "where" (and the other) API; for me much better than for example one you mentioned; I don't like to write sql fragments in where like they'we or "manual" joins and so on. In this case (and for me) Hydrahon wins.

Also keep in mind that dudes around here and there put a lot of time and mind effort to create some library with as good API as they can, so saying "package is useless" is quite rude. From the other side, you can say, hey, I like the API of that library, looks good.

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

3 participants