Welcome, Guest. Please login or register.
Did you miss your activation email?
Feb. 09, 2010, 12:32:31 PM
52584 Posts in 11677 Topics by 7491 Members
Latest Member: startyourhomebasedbusines
News: PRADO 3.1.6 is released!
 
The PRADO Community » Prado v3.x » General Discussion » How to give YOU (prado community) some class files ? « previous next »
Pages: [1] Print
Author Topic: How to give YOU (prado community) some class files ?  (Read 3712 times)
marcosanobre
Senior Member
***

Karma: 3
Offline Offline

Posts: 256


View Profile
« on: Jul. 23, 2007, 02:56:13 PM »

Hi all.

I am need to working with Oracle from ActiveRecord classes.

In the lack of this resource I decided to write the necessary classes for this.

I have re-wrote this files:

TOracleCommandBuilder
TOracleTableInfo
TOracleMetaData
TOracleTableColumn

and have modifyed TDbMetaData.php to include :
Code:
case 'oci':
Prado::using('System.Data.Common.Oracle.TOracleMetaData');
return new TOracleMetaData($conn);
(see the new Oracle directory at System.Data.Common)


and I am needing to share them with the community.

How can I upload this files to here ?

TIA,

MN
« Last Edit: Jul. 23, 2007, 03:00:31 PM by marcosanobre » Logged
jasrags
PRADO v3.x Developer
Platinum Member
*****

Karma: 7
Offline Offline

Posts: 587



View Profile WWW
« Reply #1 on: Jul. 23, 2007, 04:35:14 PM »

For now you could just attach the files to your post. or post them in the wiki
Logged
DaMule
Senior Member
***

Karma: 11
Offline Offline

Posts: 245


Sam Hennessy


View Profile WWW
« Reply #2 on: Jul. 23, 2007, 04:38:17 PM »

Hi marcosanobre,
   First off thanks for you effort in generosity and making this available to the community.

To get the ball rolling you can care a thread in the components repository board of this forum. That will get the code in the hands of the developers right away.

Then you can submit a ticket to http://trac.pradosoft.com/prado (login with your forum username and password) with your new code attached. Then it will be considered to inclusion in to the core code.

I don't know if the core developers have access to Oracle maybe that's something your could offer to help provide for them.
Logged

Qiang
PRADO Team Leader
Administrator
Diamond Member
*****

Karma: 100
Offline Offline

Posts: 3241



View Profile
« Reply #3 on: Jul. 23, 2007, 09:16:41 PM »

marcosanobre , thank you for your contribution.

Yes, please create a ticket on our trac system and attach your code there. I will include them into SVN later. Thanks!
Logged
tof06
PRADO v3.x Developer
Platinum Member
*****

Karma: 83
Offline Offline

Posts: 1027



View Profile
« Reply #4 on: Jul. 26, 2007, 01:22:29 PM »

Hello Marcos,

I've added almost as-is your code in the framework. I just did some minor cleanup. Thanks for this work !
I didn't have access to Oracle Database, so, I can't test your code. I think Wei will review it in depth when he came back.

I closed the ticket you created, but, what was the problem with prado-cli ? Is there any error messages ?

I had an old install of Oracle (7 or 8, something like that)... Maybe I could power on this old server to see if Mr. Scott Tiger is still there ! Cheesy

Thanks again.

Tof.
Logged
marcosanobre
Senior Member
***

Karma: 3
Offline Offline

Posts: 256


View Profile
« Reply #5 on: Jul. 26, 2007, 02:45:17 PM »

Ok boys, I have maded the classroom.

So, with my poor hability with track system, I thing that I did some erros in deal with it.

a) Version: I dev this classes for using in prado v3.1;
b) the ticket isn't in my space or signature; I am having dificulties in find it to edit/continue the work;

I am needing some help in:
a) testing Oracle AR with others versions rather than Oracle v10.g;
b) using prado-cli to create AR classes;

TIA.

ps: I will post another note with prado-cli problem.

MN.
Logged
Fuse
Junior Member
**

Karma: 0
Offline Offline

Posts: 44


View Profile
« Reply #6 on: Aug. 27, 2007, 10:03:36 AM »

Here is a fix for paging support with active records. ( works for me)
( before the where parameters were deleted in the special query)


Logged
Qiang
PRADO Team Leader
Administrator
Diamond Member
*****

Karma: 100
Offline Offline

Posts: 3241



View Profile
« Reply #7 on: Aug. 27, 2007, 12:34:48 PM »

Thank you very much! I will apply your patch!
Logged
Zsolt
Senior Member
***

Karma: 3
Offline Offline

Posts: 144



View Profile
« Reply #8 on: Oct. 04, 2007, 02:39:51 PM »

Hm, this Oracle class might need some optimization.

Just for example, TOracleCommandBuilder.php has an applyLimitOffset function, which contains 30-40 lines of code, with unneccessary calls.

In my Oracle class it is:

Code:
public function applyLimitOffset($sql, $limit=-1, $offset=-1)
{
if($limit>-1 && $offset>-1)
$sql='select * from (select t.*,rownum as rn from ('.$sql.') t where rownum<='.($offset+$limit).') t where rn>'.$offset;
return $sql;
}
Logged
Pages: [1] Print 
« previous next »
Jump to: