-
Notifications
You must be signed in to change notification settings - Fork 38
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
Data does not appear if fetched from table name with dot symbol #37
Comments
it leads me to this function
on the first conditional, on else block, if the table are from other scheme, the table name have double quotes on each which is separated by dot if i'm changing to table without any schema defined, like this.. so i'm trying to debug how does getFieldData works since it was a part of Codeigniter 4 it self
Here is the result... Well, looks like it doesn't need to include the schema name (even with dot, just table name), and here is the result...
|
i have proposed the PR #38 |
did you try schema on config? I'm worried that if your pull request is applied it will damage other database drivers.. |
in my case, i have some connection that depends on other database type (mysqly postgre, and oraclr), i need to still define the dot on option which is required to choose the table by name (especially postgre which is linked to schema) the code i've applied just doing the general task (detecting dots, if the string are looks normal, just leave it be) i know that soo many of library user are reliying on mySQL, if they saw the similar problem, they just simply use another lib honestly, i'm not forcing you to accept my pr, just making use of this lib a bit easier, readable, and understandable, i have spend my time doing the test based on the changes i made, soo i was thinking it's "optionally good" implement those changes you might need to test it out too it's interesting to know more about the config, which option that i should set? and what value should i define though? ps: sorry i'm not on my laptop at the moment right now |
sorry for having kept you waiting, thanks for suggestion though, i tried tinkering with all of those configuration... nothing met my expectation, the best i can do is modify the base code based on my proposed PR (i was thinking at the beginning, maybe it works because the way of codeigniter is create new connection with new schema, but it fails) and there's another problem too, while doing search (fetched from non-public schema) the error shown up since the key pressed i'll try to find what causing this but i'm 100% percent sure the lib base code should handle these behavior might be a good benefit... |
Bug Description
All data from query result wont simply return the all column of the data, resulting only show the data which is came from add() method (but the amount of data is correct).
As my investigation goes, this is caused by table which is placed on different schema (for ex: the data shown up if the table is from "public" schema instead of "other_public" schema)
My Code
In controller
if using model, here is what it looks like:
Model
Controller
Screenshots
![image](https://private-user-images.githubusercontent.com/44340813/258062957-079fb22f-d6f7-45a9-8e43-17b951750c77.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ0NTcxODYsIm5iZiI6MTcyNDQ1Njg4NiwicGF0aCI6Ii80NDM0MDgxMy8yNTgwNjI5NTctMDc5ZmIyMmYtZDZmNy00NWE5LThlNDMtMTdiOTUxNzUwYzc3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIzVDIzNDgwNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTdiZGQyNzU4NGYyYjk3NzIxNTk1M2ViMDVhY2U2M2Y1MTgwNjY2YTg2Zjg4ZGNjZmI3YWJlMDc0NTExNDdjYzImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.8UVEK5NrplPoJqFplZU9EWfaEnmHw2M6d3xcfl-L47w)
but if you check the query result using dd or whatever, it shows all the data
The text was updated successfully, but these errors were encountered: