Oracle Text?

Oracle Text?

Postby llappall » Thu 04 Nov 2010 19:09

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
llappall
 
Posts: 2
Joined: Thu 04 Nov 2010 18:28

Postby StanislavK » Fri 05 Nov 2010 12:21

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
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);
StanislavK
Devart Team
 
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Thanks StanislavK!

Postby llappall » Fri 05 Nov 2010 20:35

Hi,
thank you for answering.
I did not received the letter with the sample.
Is there any online examples I could see?

Thanks
llappall
llappall
 
Posts: 2
Joined: Thu 04 Nov 2010 18:28

Postby StanislavK » Mon 08 Nov 2010 12:53

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?
StanislavK
Devart Team
 
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Postby osavioro » Mon 18 Apr 2011 13:47

Can You send me the sample too.
I will provide email through PM.

P.S. I guess that PM is not an option. So please can you send me the sample to the email used for registration.
osavioro
 
Posts: 2
Joined: Mon 18 Apr 2011 12:24

Postby StanislavK » Tue 19 Apr 2011 09:11

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
Code: Select all
from myEntity in context.MyEntities
where context.Contains(myEntity.Field1, "some value") > 0
select myEntity;

Such queries will be translated into the SQL including the CONTAINS invocation.

Please tell us if this helps.
StanislavK
Devart Team
 
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Postby sylfeline » Mon 17 Oct 2011 09:44

Hello
I have exactly the same problem (perform a oracle fulltext with "contains" function), can you post code here ? (or send me a email)
Or is there a new easier solution ?

Thanks
Sylfeline
sylfeline
 
Posts: 1
Joined: Mon 17 Oct 2011 09:18

Postby StanislavK » Wed 19 Oct 2011 11:38

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.
StanislavK
Devart Team
 
Posts: 1710
Joined: Thu 03 Dec 2009 10:48


Return to dotConnect for Oracle