Oracle Text?
Oracle Text?
Hello,
I found that searching for "Oracle Text" is quite a pain!
They should have come up with a weird acronysm...
Anyway, Does anybody know if there's support in Entity & Linq for Oracle Text queries? Specifically, I'm looking for "contains" queries.
I found that if I use OracleDataTable, I can pass the query straight, but I wanted to use Oracle Text straight if possible.
Thanks
Llappall
I found that searching for "Oracle Text" is quite a pain!
They should have come up with a weird acronysm...
Anyway, Does anybody know if there's support in Entity & Linq for Oracle Text queries? Specifically, I'm looking for "contains" queries.
I found that if I use OracleDataTable, I can pass the query straight, but I wanted to use Oracle Text straight if possible.
Thanks
Llappall
-
- Devart Team
- Posts: 1710
- Joined: Thu 03 Dec 2009 10:48
You can use CONTAINS queries in LinqConnect. To do so, a method wrapping the CONTAINS SQL function should be created in the model. I will send you a test project where this wrapper method is defined, and a simple query with CONTAINS is executed.
Please check that the letter with the sample is not blocked by your mail filter. The database objects used in the sample are created as
Please check that the letter with the sample is not blocked by your mail filter. The database objects used in the sample are created as
Code: Select all
CREATE TABLE TestOracleText (
ID NUMBER(38),
VAL VARCHAR2(256),
CONSTRAINT PK_TESTORACLETEXT PRIMARY KEY (ID)
);
INSERT INTO TestOracleText VALUES (10, 'Some data');
INSERT INTO TestOracleText VALUES (20, 'Empty string');
INSERT INTO TestOracleText VALUES (30, 'Some more data');
CREATE INDEX TestOracleText_Index ON TestOracleText (VAL);
Thanks StanislavK!
Hi,
thank you for answering.
I did not received the letter with the sample.
Is there any online examples I could see?
Thanks
llappall
thank you for answering.
I did not received the letter with the sample.
Is there any online examples I could see?
Thanks
llappall
-
- Devart Team
- Posts: 1710
- Joined: Thu 03 Dec 2009 10:48
I've sent you the sample again. Please remove the second extension of the archive file.
If this letter is blocked as well, could you please specify another e-mail address (you can use our contact form for this) to which we can send the sample?
If this letter is blocked as well, could you please specify another e-mail address (you can use our contact form for this) to which we can send the sample?
-
- Devart Team
- Posts: 1710
- Joined: Thu 03 Dec 2009 10:48
I've sent the test project to both addresses you've specified, please check that the letters were not blocked by your mail filter.
To use, e.g., the CONTAINS Oracle function, you can wrap it with a model method (say, 'Contains'). After that, it will be possible to use this method in your LINQ queries, like
Such queries will be translated into the SQL including the CONTAINS invocation.
Please tell us if this helps.
To use, e.g., the CONTAINS Oracle function, you can wrap it with a model method (say, 'Contains'). After that, it will be possible to use this method in your LINQ queries, like
Code: Select all
from myEntity in context.MyEntities
where context.Contains(myEntity.Field1, "some value") > 0
select myEntity;
Please tell us if this helps.
-
- Devart Team
- Posts: 1710
- Joined: Thu 03 Dec 2009 10:48
I've sent you a sample, please check that it is not blocked by your mail filter. The point is to create the wrapper method in the model:
- open the Model Explorer tool window of Entity Developer;
- right-click the Methods node and select the 'Add Method' item from the shortcut menu;
- manually add two string parameters (the column being searched and the search expression);
- set the 'source' property to 'contains'.
In this way, this new method will be mapped to the full-text search CONTAINS function.
At the moment, LinqConnect provides no implicit translation into the CONTAINS function.
- open the Model Explorer tool window of Entity Developer;
- right-click the Methods node and select the 'Add Method' item from the shortcut menu;
- manually add two string parameters (the column being searched and the search expression);
- set the 'source' property to 'contains'.
In this way, this new method will be mapped to the full-text search CONTAINS function.
At the moment, LinqConnect provides no implicit translation into the CONTAINS function.