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

Can add a new debug mode for the output executable SQL statement? #488

Closed
iscraft opened this issue Oct 25, 2016 · 1 comment
Closed

Can add a new debug mode for the output executable SQL statement? #488

iscraft opened this issue Oct 25, 2016 · 1 comment

Comments

@iscraft
Copy link

iscraft commented Oct 25, 2016

So the output SQL statement to the screen when debugging
Copy paste to the SQL manager, such as phpMyAdmin can be directly run to see the results are very convenient
Current.Log () debug () and last_query () methods are required to manually replace the field's double quotes as the number or delete to perform
Thanks!
PS:Your point of view impeccable!

@catfan
Copy link
Owner

catfan commented Oct 26, 2016

The reason why you can not execute the generated query directly because Medoo is using the standard quote identifier from SQL-92 https://en.wikipedia.org/wiki/SQL-92 for all queries. You can see Medoo run SET SQL_MODE=ANSI_QUOTES for MySQL and SET QUOTED_IDENTIFIER ON for MSSQL from initialization to make them using this standard.

It's not the correct way to use Medoo that just copy and execute the Medoo generated query to another place alone, and that's not the usage Medoo recommended.

But we are considering to make the quote identifier be customizable from initialization, so that you can control what kind of quote should used.

@catfan catfan closed this as completed Nov 4, 2016
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

2 participants