Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Override how Guid.ToString for Sqlite is implemented in SQL #4295

Closed
jogibear9988 opened this issue Oct 9, 2023 · 2 comments · May be fixed by #4297
Closed

Override how Guid.ToString for Sqlite is implemented in SQL #4295

jogibear9988 opened this issue Oct 9, 2023 · 2 comments · May be fixed by #4297

Comments

@jogibear9988
Copy link
Member

Is there a way, so I could override, how ToString() of a guid will be converted to SQL?

In Sqlite I need it to generate SQL like this:

    substr(hex(id), 1, 8)
    || '-' || substr(hex(id), 9, 4)
    || '-' || substr(hex(id), 13, 4)
    || '-' || substr(hex(id), 17, 4)
    || '-' || substr(hex(id), 21, 12)
@jogibear9988
Copy link
Member Author

I could do it like this in SQLLiteQueryOptimizer, but is this the correct location?
And also I could not provide SQLiteDataProvider my own "SqliteOptimizer", without implementing also my own SQLiteDataProvider

image

@jogibear9988
Copy link
Member Author

And also the SQLiteSqlOptimizer is sealed, so I need to copy the whole code

@linq2db linq2db locked and limited conversation to collaborators Oct 10, 2023
@MaceWindu MaceWindu converted this issue into discussion #4296 Oct 10, 2023
@MaceWindu MaceWindu added this to the In-progress milestone Feb 3, 2024
@MaceWindu MaceWindu added the status: has-pr There is active PR for issue label Feb 3, 2024
@MaceWindu MaceWindu modified the milestone: In-progress Feb 3, 2024
@MaceWindu MaceWindu removed the status: has-pr There is active PR for issue label Feb 3, 2024
@MaceWindu MaceWindu removed this from the In-progress milestone Feb 3, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants