-
Notifications
You must be signed in to change notification settings - Fork 118
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
How to insert comment or fragment in sql? #244
Labels
Comments
Hi @canuran |
It seems impossible, optimizer_hints can only be used for mysql and the format is fixed, not suitable for prompting db proxy. |
What database proxy are you using? Does a comment have to appear at a specific position inside the statement? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Such as
select name from user /* shard_id=1 */ where name like 'can%'
, the shard_id comment is to tell the database proxy how to route to the sharded database.Suggest:
SELECT(User.Name).FROM(User).FRAG(FRAG("/* shard_id=1 */").BeforeWhere()).WHERE(...)
The text was updated successfully, but these errors were encountered: