![]() This is because there is no function that it is linked to by default. If this is not done beforehand, using the regex clause will result in an error message. However, it is important to note that the function needs to be defined and loaded before regex is used. The function can perform any activity that the user requires. Its main purpose is to call a user-defined function which is then loaded into the database and performs some additional tasks that may have been added after the regex clause. Regex is the clause used when a user wants to refer to a regular expression. An extension to this is the regex operator, frequently used to provide a better user experience by shortening queries and allowing users to process data faster. Using functions makes SQLite much easier, and data processing tends to be much quicker. Use Regex From the Command Line in SQLite.Cross-provider code is always a lot of work and care.īottom line: I think adding those as some kind of provider-specific bool Match(string, string) with no attempt to look at the regex itself is useful, simple and the way to go. In fact, even basic operations can't be bridged between providers, did you know that 'abc' + null does not yield the same result in SQL Server and Oracle? Try to blindly port your code from one to the other now □. I see linq2db more as "full access to RDMBS power" than a "minimal common layer between all RDBMS". In fact I have mapped Oracle regexp_like myself because we need to use it in our queries. (2) On the other hand, just like all other provider-specific SQL extensions linq2db exposes, I see value in using these functions even when they're not portable. I can foresee the bug reports on specific RDBMS or even RDBMS point releases, the issues asking support for a provider-specific non-standard extension that is not in your lingua franca, etc. It opens a long-term, huge, can of worms.Users will be confused as they need to learn a different regex flavor than the actual one from their db (speaking from experience, I have to use 3 different regexes flavors at my job and man it's mentally taxing).It won't work for dynamically built regexes based on data.It will incur extra parsing/compilation work at runtime.It's a very big task that requires a lot of difficult effort and testing. ![]() (1) I don't see why someone would attempt to create an abstraction layer to unify all regexps flavors: Users will have hard time understanding why are there error messages returned by SQL Server when their perfect LINQ to DB should just run. I think implementing a simple generic wrappers is doable, but it's going to be a supportability nightmare. ![]() So, having a truly portable regular expressions in LINQ to DB is a hard task. If you want more information, please check your favorite engine's documentation. Then the flavor of supported regexps will be whatever the extension provide.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |