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

New/group fetch and fetch optionals #33257

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

atm-irvine
Copy link
Contributor

NEW|New group classic fetch and fetch optionals depending on conf

I've grouped classic fetch and fetch optionals to prevent doing multiple sql requests for the same result. For invoice and its lines. All of this depends on MAIN_DO_FETCH_IN_ONE_SQL_REQUEST conf.
Once this PR is merged, I'll do it for every document.

@hregis
Copy link
Contributor

hregis commented Feb 27, 2025

@eldy @atm-irvine the sql function "ST_AsWKT()" is not compatible with Postgresql no ?
the use of this sql function is also in "fetch_optionals()" function of commonobject.class.php" !

@atm-irvine
Copy link
Contributor Author

@hregis This function is available if you activate an option on PostgreSQL, apparently. Since it was already in the core, I took the liberty of taking it.

@hregis
Copy link
Contributor

hregis commented Feb 27, 2025

@atm-irvine are you talking about PostGIS?

https://postgis.net/

If yes the name of the function is not the same :

https://postgis.net/docs/ST_AsEWKT.html

ST_AsEWKT Instead of ST_AsWKT

Maybe the better is to use ST_AsText

https://postgis.net/docs/ST_AsText.html

ST_AsWKT is an alias of ST_AsText with Mysql/MariaDB

And what happens if PostGIS can not be installed?

Thanks

@atm-irvine
Copy link
Contributor Author

@eldy What do you think about that ?

@atm-irvine
Copy link
Contributor Author

@hregis Tbh I don't know. I just took the code.. Eldy will tell us what to do

@hregis
Copy link
Contributor

hregis commented Feb 27, 2025

@eldy it's possible to check if PostGIS is enabled with "PostGIS_Version()"
https://postgis.net/docs/PostGIS_Version.html

maybe add a specific function in sql drivers for this to avoid errors ?

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

Successfully merging this pull request may close these issues.

2 participants